2 lines
321 KiB
Plaintext
2 lines
321 KiB
Plaintext
/*! For license information please see 35365.297b1a99.js.LICENSE.txt */
|
||
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["35365"],{71889:function(e,t,r){r.d(t,{Mp4Preloader:function(){return Tu}});var n,i,a,o,u,s,c,l,f,d,h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{};function v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p=function(e){return e&&e.Math===Math&&e},g=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof h&&h)||p("object"==typeof h&&h)||function(){return this}()||Function("return this")(),y=function(e){try{return!!e()}catch(e){return!0}},m=!y(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),_=Function.prototype,b=_.apply,k=_.call,w="object"==typeof Reflect&&Reflect.apply||(m?k.bind(b):function(){return k.apply(b,arguments)}),S=Function.prototype,T=S.call,x=m&&S.bind.bind(T,T),I=m?x:function(e){return function(){return T.apply(e,arguments)}},C=I({}.toString),P=I("".slice),E=function(e){return P(C(e),8,-1)},O=function(e){if("Function"===E(e))return I(e)},L="object"==typeof document&&document.all,R=void 0===L&&void 0!==L?function(e){return"function"==typeof e||e===L}:function(e){return"function"==typeof e},A={},D=!y(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),M=Function.prototype.call,B=m?M.bind(M):function(){return M.apply(M,arguments)},j={},N={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,F=U&&!N.call({1:2},1);j.f=F?function(e){var t=U(this,e);return!!t&&t.enumerable}:N;var z,K,V=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},q=Object,H=I("".split),G=y(function(){return!q("z").propertyIsEnumerable(0)})?function(e){return"String"===E(e)?H(e,""):q(e)}:q,W=function(e){return null==e},Y=TypeError,X=function(e){if(W(e))throw new Y("Can't call method on "+e);return e},Q=function(e){return G(X(e))},$=function(e){return"object"==typeof e?null!==e:R(e)},J={},Z=function(e){return R(e)?e:void 0},ee=function(e,t){return arguments.length<2?Z(J[e])||Z(g[e]):J[e]&&J[e][t]||g[e]&&g[e][t]},et=I({}.isPrototypeOf),er=g.navigator,en=er&&er.userAgent,ei=en?String(en):"",ea=g.process,eo=g.Deno,eu=ea&&ea.versions||eo&&eo.version,es=eu&&eu.v8;es&&(K=(z=es.split("."))[0]>0&&z[0]<4?1:+(z[0]+z[1])),!K&&ei&&(!(z=ei.match(/Edge\/(\d+)/))||z[1]>=74)&&(z=ei.match(/Chrome\/(\d+)/))&&(K=+z[1]);var ec=K,el=g.String,ef=!!Object.getOwnPropertySymbols&&!y(function(){var e=Symbol("symbol detection");return!el(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&ec&&ec<41}),ed=ef&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,eh=Object,ev=ed?function(e){return"symbol"==typeof e}:function(e){var t=ee("Symbol");return R(t)&&et(t.prototype,eh(e))},ep=String,eg=function(e){try{return ep(e)}catch(e){return"Object"}},ey=TypeError,em=function(e){if(R(e))return e;throw new ey(eg(e)+" is not a function")},e_=function(e,t){var r=e[t];return W(r)?void 0:em(r)},eb=TypeError,ek={exports:{}},ew=Object.defineProperty,eS="__core-js_shared__",eT=ek.exports=g[eS]||function(e,t){try{ew(g,e,{value:t,configurable:!0,writable:!0})}catch(r){g[e]=t}return t}(eS,{});(eT.versions||(eT.versions=[])).push({version:"3.45.1",mode:"pure",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"});var ex=ek.exports,eI=function(e,t){return ex[e]||(ex[e]=t||{})},eC=Object,eP=function(e){return eC(X(e))},eE=I({}.hasOwnProperty),eO=Object.hasOwn||function(e,t){return eE(eP(e),t)},eL=0,eR=Math.random(),eA=I(1.1.toString),eD=function(e){return"Symbol("+(void 0===e?"":e)+")_"+eA(++eL+eR,36)},eM=g.Symbol,eB=eI("wks"),ej=ed?eM.for||eM:eM&&eM.withoutSetter||eD,eN=function(e){return eO(eB,e)||(eB[e]=ef&&eO(eM,e)?eM[e]:ej("Symbol."+e)),eB[e]},eU=function(e,t){var r,n;if("string"===t&&R(r=e.toString)&&!$(n=B(r,e))||R(r=e.valueOf)&&!$(n=B(r,e))||"string"!==t&&R(r=e.toString)&&!$(n=B(r,e)))return n;throw new eb("Can't convert object to primitive value")},eF=TypeError,ez=eN("toPrimitive"),eK=function(e,t){if(!$(e)||ev(e))return e;var r,n=e_(e,ez);if(n){if(void 0===t&&(t="default"),!$(r=B(n,e,t))||ev(r))return r;throw new eF("Can't convert object to primitive value")}return void 0===t&&(t="number"),eU(e,t)},eV=function(e){var t=eK(e,"string");return ev(t)?t:t+""},eq=g.document,eH=$(eq)&&$(eq.createElement),eG=function(e){return eH?eq.createElement(e):{}},eW=!D&&!y(function(){return 7!==Object.defineProperty(eG("div"),"a",{get:function(){return 7}}).a}),eY=Object.getOwnPropertyDescriptor;A.f=D?eY:function(e,t){if(e=Q(e),t=eV(t),eW)try{return eY(e,t)}catch(e){}if(eO(e,t))return V(!B(j.f,e,t),e[t])};var eX=/#|\.prototype\./,eQ=function(e,t){var r=eJ[e$(e)];return r===e0||r!==eZ&&(R(t)?y(t):!!t)},e$=eQ.normalize=function(e){return String(e).replace(eX,".").toLowerCase()},eJ=eQ.data={},eZ=eQ.NATIVE="N",e0=eQ.POLYFILL="P",e1=O(O.bind),e2=function(e,t){return em(e),void 0===t?e:m?e1(e,t):function(){return e.apply(t,arguments)}},e4={},e3=D&&y(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),e6=String,e8=TypeError,e5=function(e){if($(e))return e;throw new e8(e6(e)+" is not an object")},e9=TypeError,e7=Object.defineProperty,te=Object.getOwnPropertyDescriptor,tt="enumerable",tr="configurable",tn="writable";e4.f=D?e3?function(e,t,r){if(e5(e),t=eV(t),e5(r),"function"==typeof e&&"prototype"===t&&"value"in r&&tn in r&&!r[tn]){var n=te(e,t);n&&n[tn]&&(e[t]=r.value,r={configurable:tr in r?r[tr]:n[tr],enumerable:tt in r?r[tt]:n[tt],writable:!1})}return e7(e,t,r)}:e7:function(e,t,r){if(e5(e),t=eV(t),e5(r),eW)try{return e7(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new e9("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var ti=D?function(e,t,r){return e4.f(e,t,V(1,r))}:function(e,t,r){return e[t]=r,e},ta=A.f,to=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return w(e,this,arguments)};return t.prototype=e.prototype,t},tu=function(e,t){var r,n,i,a,o,u,s,c,l,f=e.target,d=e.global,h=e.stat,v=e.proto,p=d?g:h?g[f]:g[f]&&g[f].prototype,y=d?J:J[f]||ti(J,f,{})[f],m=y.prototype;for(a in t)n=!(r=eQ(d?a:f+(h?".":"#")+a,e.forced))&&p&&eO(p,a),u=y[a],n&&(s=e.dontCallGetSet?(l=ta(p,a))&&l.value:p[a]),o=n&&s?s:t[a],(r||v||typeof u!=typeof o)&&(c=e.bind&&n?e2(o,g):e.wrap&&n?to(o):v&&R(o)?O(o):o,(e.sham||o&&o.sham||u&&u.sham)&&ti(c,"sham",!0),ti(y,a,c),v&&(eO(J,i=f+"Prototype")||ti(J,i,{}),ti(J[i],a,o),e.real&&m&&(r||!m[a])&&ti(m,a,o)))},ts=I([].slice),tc=Function,tl=I([].concat),tf=I([].join),td={},th=function(e,t,r){if(!eO(td,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";td[t]=tc("C,a","return new C("+tf(n,",")+")")}return td[t](e,r)},tv=m?tc.bind:function(e){var t=em(this),r=t.prototype,n=ts(arguments,1),i=function(){var r=tl(n,ts(arguments));return this instanceof i?th(t,r.length,r):t.apply(e,r)};return $(r)&&(i.prototype=r),i},tp=eN("toStringTag"),tg={};tg[tp]="z";var ty="[object z]"===String(tg),tm=eN("toStringTag"),t_=Object,tb="Arguments"===E(function(){return arguments}()),tk=function(e,t){try{return e[t]}catch(e){}},tw=ty?E:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tk(t=t_(e),tm))?r:tb?E(t):"Object"===(n=E(t))&&R(t.callee)?"Arguments":n},tS=I(Function.toString);R(ex.inspectSource)||(ex.inspectSource=function(e){return tS(e)});var tT=ex.inspectSource,tx=function(){},tI=ee("Reflect","construct"),tC=/^\s*(?:class|function)\b/,tP=I(tC.exec),tE=!tC.test(tx),tO=function(e){if(!R(e))return!1;try{return tI(tx,[],e),!0}catch(e){return!1}},tL=function(e){if(!R(e))return!1;switch(tw(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return tE||!!tP(tC,tT(e))}catch(e){return!0}};tL.sham=!0;var tR=!tI||y(function(){var e;return tO(tO.call)||!tO(Object)||!tO(function(){e=!0})||e})?tL:tO,tA=TypeError,tD=function(e){if(tR(e))return e;throw new tA(eg(e)+" is not a constructor")},tM={},tB=Math.ceil,tj=Math.floor,tN=Math.trunc||function(e){var t=+e;return(t>0?tj:tB)(t)},tU=function(e){var t=+e;return t!=t||0===t?0:tN(t)},tF=Math.max,tz=Math.min,tK=function(e,t){var r=tU(e);return r<0?tF(r+t,0):tz(r,t)},tV=Math.min,tq=function(e){var t=tU(e);return t>0?tV(t,9007199254740991):0},tH=function(e){return tq(e.length)},tG=function(e){return function(t,r,n){var i=Q(t),a=tH(i);if(0===a)return!e&&-1;var o,u=tK(n,a);if(e&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((e||u in i)&&i[u]===r)return e||u||0;return!e&&-1}},tW={includes:tG(!0),indexOf:tG(!1)},tY={},tX=tW.indexOf,tQ=I([].push),t$=function(e,t){var r,n=Q(e),i=0,a=[];for(r in n)!eO(tY,r)&&eO(n,r)&&tQ(a,r);for(;t.length>i;)eO(n,r=t[i++])&&(~tX(a,r)||tQ(a,r));return a},tJ=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tZ=Object.keys||function(e){return t$(e,tJ)};tM.f=D&&!e3?Object.defineProperties:function(e,t){e5(e);for(var r,n=Q(t),i=tZ(t),a=i.length,o=0;a>o;)e4.f(e,r=i[o++],n[r]);return e};var t0,t1=ee("document","documentElement"),t2=eI("keys"),t4=function(e){return t2[e]||(t2[e]=eD(e))},t3="prototype",t6="script",t8=t4("IE_PROTO"),t5=function(){},t9=function(e){return"<"+t6+">"+e+"</"+t6+">"},t7=function(e){e.write(t9("")),e.close();var t=e.parentWindow.Object;return e=null,t},re=function(){var e,t=eG("iframe");return t.style.display="none",t1.appendChild(t),t.src=String("java"+t6+":"),(e=t.contentWindow.document).open(),e.write(t9("document.F=Object")),e.close(),e.F},rt=function(){try{t0=new ActiveXObject("htmlfile")}catch(e){}rt="undefined"!=typeof document?document.domain&&t0?t7(t0):re():t7(t0);for(var e=tJ.length;e--;)delete rt[t3][tJ[e]];return rt()};tY[t8]=!0;var rr=Object.create||function(e,t){var r;return null!==e?(t5[t3]=e5(e),r=new t5,t5[t3]=null,r[t8]=e):r=rt(),void 0===t?r:tM.f(r,t)},rn=ee("Reflect","construct"),ri=Object.prototype,ra=[].push,ro=y(function(){function e(){}return!(rn(function(){},[],e) instanceof e)}),ru=!y(function(){rn(function(){})}),rs=ro||ru;tu({target:"Reflect",stat:!0,forced:rs,sham:rs},{construct:function(e,t){tD(e),e5(t);var r=arguments.length<3?e:tD(arguments[2]);if(ru&&!ro)return rn(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return w(ra,n,t),new(w(tv,e,n))}var i=r.prototype,a=rr($(i)?i:ri),o=w(e,a,t);return $(o)?o:a}});var rc=J.Reflect.construct,rl=v(rc),rf=v(rc),rd=!y(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),rh=t4("IE_PROTO"),rv=Object,rp=rv.prototype,rg=rd?rv.getPrototypeOf:function(e){var t=eP(e);if(eO(t,rh))return t[rh];var r=t.constructor;return R(r)&&t instanceof r?r.prototype:t instanceof rv?rp:null};tu({target:"Object",stat:!0,forced:y(function(){rg(1)}),sham:!rd},{getPrototypeOf:function(e){return rg(eP(e))}});var ry=J.Object.getPrototypeOf,rm=v(ry),r_=Array.isArray||function(e){return"Array"===E(e)},rb=I([].reverse),rk=[1,2];tu({target:"Array",proto:!0,forced:String(rk)===String(rk.reverse())},{reverse:function(){return r_(this)&&(this.length=this.length),rb(this)}});var rw=function(e,t){var r=J[e+"Prototype"],n=r&&r[t];if(n)return n;var i=g[e],a=i&&i.prototype;return a&&a[t]},rS=rw("Array","reverse"),rT=Array.prototype,rx=function(e){var t=e.reverse;return e===rT||et(rT,e)&&t===rT.reverse?rS:t},rI=v(rx);function rC(e,t){this.v=e,this.k=t}var rP=TypeError,rE=function(e){if(e>9007199254740991)throw rP("Maximum allowed index exceeded");return e},rO=function(e,t,r){D?e4.f(e,t,V(0,r)):e[t]=r},rL=eN("species"),rR=Array,rA=function(e){var t;return r_(e)&&(tR(t=e.constructor)&&(t===rR||r_(t.prototype))||$(t)&&null===(t=t[rL]))&&(t=void 0),void 0===t?rR:t},rD=function(e,t){return new(rA(e))(0===t?0:t)},rM=eN("species"),rB=function(e){return ec>=51||!y(function(){var t=[];return(t.constructor={})[rM]=function(){return{foo:1}},1!==t[e](Boolean).foo})},rj=eN("isConcatSpreadable"),rN=ec>=51||!y(function(){var e=[];return e[rj]=!1,e.concat()[0]!==e}),rU=function(e){if(!$(e))return!1;var t=e[rj];return void 0!==t?!!t:r_(e)};tu({target:"Array",proto:!0,arity:1,forced:!rN||!rB("concat")},{concat:function(e){var t,r,n,i,a,o=eP(this),u=rD(o,0),s=0;for(t=-1,n=arguments.length;t<n;t++)if(rU(a=-1===t?o:arguments[t]))for(rE(s+(i=tH(a))),r=0;r<i;r++,s++)r in a&&rO(u,s,a[r]);else rE(s+1),rO(u,s++,a);return u.length=s,u}});var rF=String,rz=function(e){if("Symbol"===tw(e))throw TypeError("Cannot convert a Symbol value to a string");return rF(e)},rK={},rV=tJ.concat("length","prototype");rK.f=Object.getOwnPropertyNames||function(e){return t$(e,rV)};var rq={},rH=rK.f,rG="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],rW=function(e){try{return rH(e)}catch(e){return ts(rG)}};rq.f=function(e){return rG&&"Window"===E(e)?rW(e):rH(Q(e))};var rY={};rY.f=Object.getOwnPropertySymbols;var rX=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ti(e,t,r),e},rQ=function(e,t,r){return e4.f(e,t,r)},r$={};r$.f=eN;var rJ,rZ,r0,r1=e4.f,r2=function(e){var t=J.Symbol||(J.Symbol={});eO(t,e)||r1(t,e,{value:r$.f(e)})},r4=function(){var e=ee("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=eN("toPrimitive");t&&!t[n]&&rX(t,n,function(e){return B(r,this)},{arity:1})},r3=e4.f,r6=ty?({}).toString:function(){return"[object "+tw(this)+"]"},r8=eN("toStringTag"),r5=function(e,t,r,n){var i=r?e:e&&e.prototype;i&&(eO(i,r8)||r3(i,r8,{configurable:!0,value:t}),n&&!ty&&ti(i,"toString",r6))},r9=g.WeakMap,r7=R(r9)&&/native code/.test(String(r9)),ne="Object already initialized",nt=g.TypeError,nr=g.WeakMap;if(r7||ex.state){var nn=ex.state||(ex.state=new nr);nn.get=nn.get,nn.has=nn.has,nn.set=nn.set,rJ=function(e,t){if(nn.has(e))throw new nt(ne);return t.facade=e,nn.set(e,t),t},rZ=function(e){return nn.get(e)||{}},r0=function(e){return nn.has(e)}}else{var ni=t4("state");tY[ni]=!0,rJ=function(e,t){if(eO(e,ni))throw new nt(ne);return t.facade=e,ti(e,ni,t),t},rZ=function(e){return eO(e,ni)?e[ni]:{}},r0=function(e){return eO(e,ni)}}var na={set:rJ,get:rZ,has:r0,enforce:function(e){return r0(e)?rZ(e):rJ(e,{})},getterFor:function(e){return function(t){var r;if(!$(t)||(r=rZ(t)).type!==e)throw new nt("Incompatible receiver, "+e+" required");return r}}},no=I([].push),nu=function(e){var t=1===e,r=2===e,n=3===e,i=4===e,a=6===e,o=7===e,u=5===e||a;return function(s,c,l,f){for(var d,h,v=eP(s),p=G(v),g=tH(p),y=e2(c,l),m=0,_=f||rD,b=t?_(s,g):r||o?_(s,0):void 0;g>m;m++)if((u||m in p)&&(h=y(d=p[m],m,v),e)){if(t)b[m]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:no(b,d)}else switch(e){case 4:return!1;case 7:no(b,d)}}return a?-1:n||i?i:b}},ns={forEach:nu(0),map:nu(1),filter:nu(2),some:nu(3),every:nu(4),find:nu(5),findIndex:nu(6),filterReject:nu(7)},nc=ns.forEach,nl=t4("hidden"),nf="Symbol",nd="prototype",nh=na.set,nv=na.getterFor(nf),np=Object[nd],ng=g.Symbol,ny=ng&&ng[nd],nm=g.RangeError,n_=g.TypeError,nb=g.QObject,nk=A.f,nw=e4.f,nS=rq.f,nT=j.f,nx=I([].push),nI=eI("symbols"),nC=eI("op-symbols"),nP=eI("wks"),nE=!nb||!nb[nd]||!nb[nd].findChild,nO=function(e,t,r){var n=nk(np,t);n&&delete np[t],nw(e,t,r),n&&e!==np&&nw(np,t,n)},nL=D&&y(function(){return 7!==rr(nw({},"a",{get:function(){return nw(this,"a",{value:7}).a}})).a})?nO:nw,nR=function(e,t){var r=nI[e]=rr(ny);return nh(r,{type:nf,tag:e,description:t}),D||(r.description=t),r},nA=function(e,t,r){e===np&&nA(nC,t,r),e5(e);var n=eV(t);return e5(r),eO(nI,n)?(r.enumerable?(eO(e,nl)&&e[nl][n]&&(e[nl][n]=!1),r=rr(r,{enumerable:V(0,!1)})):(eO(e,nl)||nw(e,nl,V(1,rr(null))),e[nl][n]=!0),nL(e,n,r)):nw(e,n,r)},nD=function(e,t){e5(e);var r=Q(t);return nc(tZ(r).concat(nN(r)),function(t){D&&!B(nM,r,t)||nA(e,t,r[t])}),e},nM=function(e){var t=eV(e),r=B(nT,this,t);return!(this===np&&eO(nI,t)&&!eO(nC,t))&&(!(r||!eO(this,t)||!eO(nI,t)||eO(this,nl)&&this[nl][t])||r)},nB=function(e,t){var r=Q(e),n=eV(t);if(r!==np||!eO(nI,n)||eO(nC,n)){var i=nk(r,n);return!i||!eO(nI,n)||eO(r,nl)&&r[nl][n]||(i.enumerable=!0),i}},nj=function(e){var t=nS(Q(e)),r=[];return nc(t,function(e){eO(nI,e)||eO(tY,e)||nx(r,e)}),r},nN=function(e){var t=e===np,r=nS(t?nC:Q(e)),n=[];return nc(r,function(e){eO(nI,e)&&(!t||eO(np,e))&&nx(n,nI[e])}),n};ef||(rX(ny=(ng=function(){if(et(ny,this))throw new n_("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?rz(arguments[0]):void 0,t=eD(e),r=function(e){var n=void 0===this?g:this;n===np&&B(r,nC,e),eO(n,nl)&&eO(n[nl],t)&&(n[nl][t]=!1);var i=V(1,e);try{nL(n,t,i)}catch(e){if(!(e instanceof nm))throw e;nO(n,t,i)}};return D&&nE&&nL(np,t,{configurable:!0,set:r}),nR(t,e)})[nd],"toString",function(){return nv(this).tag}),rX(ng,"withoutSetter",function(e){return nR(eD(e),e)}),j.f=nM,e4.f=nA,tM.f=nD,A.f=nB,rK.f=rq.f=nj,rY.f=nN,r$.f=function(e){return nR(eN(e),e)},D&&rQ(ny,"description",{configurable:!0,get:function(){return nv(this).description}})),tu({global:!0,constructor:!0,wrap:!0,forced:!ef,sham:!ef},{Symbol:ng}),nc(tZ(nP),function(e){r2(e)}),tu({target:nf,stat:!0,forced:!ef},{useSetter:function(){nE=!0},useSimple:function(){nE=!1}}),tu({target:"Object",stat:!0,forced:!ef,sham:!D},{create:function(e,t){return void 0===t?rr(e):nD(rr(e),t)},defineProperty:nA,defineProperties:nD,getOwnPropertyDescriptor:nB}),tu({target:"Object",stat:!0,forced:!ef},{getOwnPropertyNames:nj}),r4(),r5(ng,nf),tY[nl]=!0;var nU=ef&&!!Symbol.for&&!!Symbol.keyFor,nF=eI("string-to-symbol-registry"),nz=eI("symbol-to-string-registry");tu({target:"Symbol",stat:!0,forced:!nU},{for:function(e){var t=rz(e);if(eO(nF,t))return nF[t];var r=ee("Symbol")(t);return nF[t]=r,nz[r]=t,r}});var nK=eI("symbol-to-string-registry");tu({target:"Symbol",stat:!0,forced:!nU},{keyFor:function(e){if(!ev(e))throw TypeError(eg(e)+" is not a symbol");if(eO(nK,e))return nK[e]}});var nV=I([].push),nq=function(e){if(R(e))return e;if(r_(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?nV(r,i):"number"!=typeof i&&"Number"!==E(i)&&"String"!==E(i)||nV(r,rz(i))}var a=r.length,o=!0;return function(e,t){if(o)return o=!1,t;if(r_(this))return t;for(var n=0;n<a;n++)if(r[n]===e)return t}}},nH=String,nG=ee("JSON","stringify"),nW=I(/./.exec),nY=I("".charAt),nX=I("".charCodeAt),nQ=I("".replace),n$=I(1.1.toString),nJ=/[\uD800-\uDFFF]/g,nZ=/^[\uD800-\uDBFF]$/,n0=/^[\uDC00-\uDFFF]$/,n1=!ef||y(function(){var e=ee("Symbol")("stringify detection");return"[null]"!==nG([e])||"{}"!==nG({a:e})||"{}"!==nG(Object(e))}),n2=y(function(){return'"\udf06\ud834"'!==nG("\udf06\ud834")||'"\udead"'!==nG("\udead")}),n4=function(e,t){var r=ts(arguments),n=nq(t);if(R(n)||void 0!==e&&!ev(e))return r[1]=function(e,t){if(R(n)&&(t=B(n,this,nH(e),t)),!ev(t))return t},w(nG,null,r)},n3=function(e,t,r){var n=nY(r,t-1),i=nY(r,t+1);return nW(nZ,e)&&!nW(n0,i)||nW(n0,e)&&!nW(nZ,n)?"\\u"+n$(nX(e,0),16):e};nG&&tu({target:"JSON",stat:!0,arity:3,forced:n1||n2},{stringify:function(e,t,r){var n=ts(arguments),i=w(n1?n4:nG,null,n);return n2&&"string"==typeof i?nQ(i,nJ,n3):i}}),tu({target:"Object",stat:!0,forced:!ef||y(function(){rY.f(1)})},{getOwnPropertySymbols:function(e){var t=rY.f;return t?t(eP(e)):[]}});r2("asyncDispose");r2("asyncIterator");r2("dispose");r2("hasInstance");r2("isConcatSpreadable");r2("iterator");r2("match");r2("matchAll");r2("replace");r2("search");r2("species");r2("split");r2("toPrimitive"),r4();r2("toStringTag"),r5(ee("Symbol"),"Symbol");r2("unscopables");r5(g.JSON,"JSON",!0);var n6,n8,n5,n9=J.Symbol,n7={},ie=Function.prototype,it=D&&Object.getOwnPropertyDescriptor,ir=eO(ie,"name"),ii=ir&&(!D||D&&it(ie,"name").configurable),ia={EXISTS:ir,PROPER:ir&&"something"===(function(){}).name,CONFIGURABLE:ii},io=eN("iterator"),iu=!1;[].keys&&("next"in(n5=[].keys())?(n8=rg(rg(n5)))!==Object.prototype&&(n6=n8):iu=!0),R((n6=!$(n6)||y(function(){var e={};return n6[io].call(e)!==e})?{}:rr(n6))[io])||rX(n6,io,function(){return this});var is={IteratorPrototype:n6,BUGGY_SAFARI_ITERATORS:iu},ic=is.IteratorPrototype,il=function(){return this},id=String,ih=TypeError,iv=function(e,t,r){try{return I(em(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}},ip=function(e){var t;if($(t=e)||null===t)return e;throw new ih("Can't set "+id(e)+" as a prototype")},ig=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=iv(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return X(r),ip(n),$(r)&&(t?e(r,n):r.__proto__=n),r}}():void 0),iy=function(e,t,r,n){var i=t+" Iterator";return e.prototype=rr(ic,{next:V(+!n,r)}),r5(e,i,!1,!0),n7[i]=il,e},im=ia.PROPER;ia.CONFIGURABLE,is.IteratorPrototype;var i_=is.BUGGY_SAFARI_ITERATORS,ib=eN("iterator"),ik="keys",iw="values",iS="entries",iT=function(){return this},ix=function(e,t,r,n,i,a,o){iy(r,t,n);var u,s,c,l=function(e){if(e===i&&p)return p;if(!i_&&e&&e in h)return h[e];switch(e){case ik:case iw:case iS:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",d=!1,h=e.prototype,v=h[ib]||h["@@iterator"]||i&&h[i],p=!i_&&v||l(i),g="Array"===t&&h.entries||v;if(g&&(u=rg(g.call(new e)))!==Object.prototype&&u.next&&(r5(u,f,!0,!0),n7[f]=iT),im&&i===iw&&v&&v.name!==iw&&(d=!0,p=function(){return B(v,this)}),i){if(s={values:l(iw),keys:a?p:l(ik),entries:l(iS)},o)for(c in s)!i_&&!d&&c in h||rX(h,c,s[c]);else tu({target:t,proto:!0,forced:i_||d},s)}return o&&h[ib]!==p&&rX(h,ib,p,{name:i}),n7[t]=p,s},iI=function(e,t){return{value:e,done:t}};e4.f;var iC="Array Iterator",iP=na.set,iE=na.getterFor(iC);ix(Array,"Array",function(e,t){iP(this,{type:iC,target:Q(e),index:0,kind:t})},function(){var e=iE(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,iI(void 0,!0);switch(e.kind){case"keys":return iI(r,!1);case"values":return iI(t[r],!1)}return iI([r,t[r]],!1)},"values"),n7.Arguments=n7.Array;var iO={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};for(var iL in iO)r5(g[iL],iL),n7[iL]=n7.Array;var iR=e4.f,iA=eN("metadata"),iD=Function.prototype;void 0===iD[iA]&&iR(iD,iA,{value:null});r2("metadata");var iM=ee("Symbol"),iB=iM.keyFor,ij=I(iM.prototype.valueOf),iN=iM.isRegisteredSymbol||function(e){try{return void 0!==iB(ij(e))}catch(e){return!1}};tu({target:"Symbol",stat:!0},{isRegisteredSymbol:iN});for(var iU=ee("Symbol"),iF=iU.isWellKnownSymbol,iz=ee("Object","getOwnPropertyNames"),iK=I(iU.prototype.valueOf),iV=eI("wks"),iq=0,iH=iz(iU),iG=iH.length;iq<iG;iq++)try{var iW=iH[iq];ev(iU[iW])&&eN(iW)}catch(e){}var iY=function(e){if(iF&&iF(e))return!0;try{for(var t=iK(e),r=0,n=iz(iV),i=n.length;r<i;r++)if(iV[n[r]]==t)return!0}catch(e){}return!1};tu({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:iY});r2("customMatcher");r2("observable");tu({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:iN});tu({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:iY});r2("matcher");r2("metadataKey");r2("patternMatch");r2("replaceAll");var iX=v(n9);tu({target:"Object",stat:!0,sham:!D},{create:rr});var iQ=J.Object,i$=function(e,t){return iQ.create(e,t)},iJ=v(i$);tu({target:"Function",proto:!0,forced:Function.bind!==tv},{bind:tv});var iZ=rw("Function","bind"),i0=Function.prototype,i1=function(e){var t=e.bind;return e===i0||et(i0,e)&&t===i0.bind?iZ:t},i2=v(i1);tu({target:"Object",stat:!0},{setPrototypeOf:ig});var i4=J.Object.setPrototypeOf,i3=v(i4),i6={exports:{}},i8=e4.f;tu({target:"Object",stat:!0,forced:Object.defineProperty!==i8,sham:!D},{defineProperty:i8});var i5=J.Object,i9=i6.exports=function(e,t,r){return i5.defineProperty(e,t,r)};i5.defineProperty.sham&&(i9.sham=!0);var i7=i6.exports,ae=v(i7);function at(e,t,r,n){var i=ae;try{i({},"",{})}catch(e){i=0}(at=function(e,t,r,n){function a(t,r){at(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(a("next",0),a("throw",1),a("return",2))})(e,t,r,n)}function ar(){var e,t,r="function"==typeof iX?iX:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(r,n,i,a){var s=iJ((n&&n.prototype instanceof u?n:u).prototype);return at(s,"_invoke",function(r,n,i){var a,u,s,c=0,l=i||[],f=!1,d={p:0,n:0,v:e,a:h,f:i2(h).call(h,e,4),d:function(t,r){return a=t,u=0,s=e,d.n=r,o}};function h(r,n){for(u=r,s=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,a=l[t],h=d.p,v=a[2];r>3?(i=v===n)&&(s=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=e):a[0]<=h&&((i=r<2&&h<a[1])?(u=0,d.v=n,d.n=a[1]):h<v&&(i=r<3||a[0]>n||n>v)&&(a[4]=r,a[5]=n,d.n=v,u=0))}if(i||r>1)return o;throw f=!0,n}return function(i,l,v){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,v),u=l,s=v;(t=u<2?e:s)||!f;){a||(u?u<3?(u>1&&(d.n=-1),h(u,s)):d.n=s:d.v=s);try{if(c=2,a){if(u||(i="next"),t=a[i]){if(!(t=t.call(a,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,u<2&&(u=0)}else 1===u&&(t=a.return)&&t.call(a),u<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),u=1);a=e}else if((t=(f=d.n<0)?s:r.call(n,d))!==o)break}catch(t){a=e,u=1,s=t}finally{c=1}}return{value:t,done:f}}}(r,i,a),!0),s}var o={};function u(){}function s(){}function c(){}t=rm;var l=[][n]?t(t([][n]())):(at(t={},n,function(){return this}),t),f=c.prototype=u.prototype=iJ(l);function d(e){return i3?i3(e,c):(e.__proto__=c,at(e,i,"GeneratorFunction")),e.prototype=iJ(f),e}return s.prototype=c,at(f,"constructor",c),at(c,"constructor",s),s.displayName="GeneratorFunction",at(c,i,"GeneratorFunction"),at(f),at(f,i,"Generator"),at(f,n,function(){return this}),at(f,"toString",function(){return"[object Generator]"}),(ar=function(){return{w:a,m:d}})()}var an=I([].concat),ai=ee("Reflect","ownKeys")||function(e){var t=rK.f(e5(e)),r=rY.f;return r?an(t,r(e)):t},aa=Error,ao=I("".replace),au=String(new aa("zxcasd").stack),as=/\n\s*at [^:]*:[^\n]*/,ac=as.test(au),al=!y(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",V(1,7)),7!==e.stack)}),af=function(e,t){if(ac&&"string"==typeof e&&!aa.prepareStackTrace)for(;t--;)e=ao(e,as,"");return e},ad=Error.captureStackTrace,ah=eN("iterator"),av=Array.prototype,ap=function(e){return void 0!==e&&(n7.Array===e||av[ah]===e)},ag=eN("iterator"),ay=function(e){if(!W(e))return e_(e,ag)||e_(e,"@@iterator")||n7[tw(e)]},am=TypeError,a_=function(e,t){var r=arguments.length<2?ay(e):t;if(em(r))return e5(B(r,e));throw new am(eg(e)+" is not iterable")},ab=function(e,t,r){var n,i;e5(e);try{if(!(n=e_(e,"return"))){if("throw"===t)throw r;return r}n=B(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return e5(n),r},ak=TypeError,aw=function(e,t){this.stopped=e,this.result=t},aS=aw.prototype,aT=function(e,t,r){var n,i,a,o,u,s,c,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),p=e2(t,l),g=function(e){return n&&ab(n,"normal"),new aw(!0,e)},y=function(e){return f?(e5(e),v?p(e[0],e[1],g):p(e[0],e[1])):v?p(e,g):p(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(i=ay(e)))throw new ak(eg(e)+" is not iterable");if(ap(i)){for(a=0,o=tH(e);o>a;a++)if((u=y(e[a]))&&et(aS,u))return u;return new aw(!1)}n=a_(e,i)}for(s=d?e.next:n.next;!(c=B(s,n)).done;){try{u=y(c.value)}catch(e){ab(n,"throw",e)}if("object"==typeof u&&u&&et(aS,u))return u}return new aw(!1)},ax=function(e,t){$(t)&&"cause"in t&&ti(e,"cause",t.cause)},aI=function(e,t,r,n){al&&(ad?ad(e,t):ti(e,"stack",af(r,n)))},aC=eN("toStringTag"),aP=Error,aE=[].push,aO=function(e,t){var r,n=et(aL,this);ig?r=ig(new aP,n?rg(this):aL):ti(r=n?this:rr(aL),aC,"Error"),void 0!==t&&ti(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:rz(e)}(t)),aI(r,aO,r.stack,1),arguments.length>2&&ax(r,arguments[2]);var i=[];return aT(e,aE,{that:i}),ti(r,"errors",i),r};ig?ig(aO,aP):function(e,t,r){for(var n=ai(t),i=e4.f,a=A.f,o=0;o<n.length;o++){var u=n[o];eO(e,u)||r&&eO(r,u)||i(e,u,a(t,u))}}(aO,aP,{name:!0});var aL=aO.prototype=rr(aP.prototype,{constructor:V(1,aO),message:V(1,""),name:V(1,"AggregateError")});tu({global:!0,constructor:!0,arity:2},{AggregateError:aO});var aR,aA,aD,aM,aB=function(e){return ei.slice(0,e.length)===e},aj=aB("Bun/")?"BUN":aB("Cloudflare-Workers")?"CLOUDFLARE":aB("Deno/")?"DENO":aB("Node.js/")?"NODE":g.Bun&&"string"==typeof Bun.version?"BUN":g.Deno&&"object"==typeof Deno.version?"DENO":"process"===E(g.process)?"NODE":g.window&&g.document?"BROWSER":"REST",aN="NODE"===aj,aU=eN("species"),aF=function(e){var t=ee(e);D&&t&&!t[aU]&&rQ(t,aU,{configurable:!0,get:function(){return this}})},az=TypeError,aK=function(e,t){if(et(t,e))return e;throw new az("Incorrect invocation")},aV=eN("species"),aq=function(e,t){var r,n=e5(e).constructor;return void 0===n||W(r=e5(n)[aV])?t:tD(r)},aH=TypeError,aG=function(e,t){if(e<t)throw new aH("Not enough arguments");return e},aW=/(?:ipad|iphone|ipod).*applewebkit/i.test(ei),aY=g.setImmediate,aX=g.clearImmediate,aQ=g.process,a$=g.Dispatch,aJ=g.Function,aZ=g.MessageChannel,a0=g.String,a1=0,a2={},a4="onreadystatechange";y(function(){aR=g.location});var a3=function(e){if(eO(a2,e)){var t=a2[e];delete a2[e],t()}},a6=function(e){return function(){a3(e)}},a8=function(e){a3(e.data)},a5=function(e){g.postMessage(a0(e),aR.protocol+"//"+aR.host)};aY&&aX||(aY=function(e){aG(arguments.length,1);var t=R(e)?e:aJ(e),r=ts(arguments,1);return a2[++a1]=function(){w(t,void 0,r)},aA(a1),a1},aX=function(e){delete a2[e]},aN?aA=function(e){aQ.nextTick(a6(e))}:a$&&a$.now?aA=function(e){a$.now(a6(e))}:aZ&&!aW?(aM=(aD=new aZ).port2,aD.port1.onmessage=a8,aA=e2(aM.postMessage,aM)):g.addEventListener&&R(g.postMessage)&&!g.importScripts&&aR&&"file:"!==aR.protocol&&!y(a5)?(aA=a5,g.addEventListener("message",a8,!1)):aA=a4 in eG("script")?function(e){t1.appendChild(eG("script"))[a4]=function(){t1.removeChild(this),a3(e)}}:function(e){setTimeout(a6(e),0)});var a9=aY,a7=Object.getOwnPropertyDescriptor,oe=function(){this.head=null,this.tail=null};oe.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var ot,or,on,oi,oa,oo=/ipad|iphone|ipod/i.test(ei)&&"undefined"!=typeof Pebble,ou=/web0s(?!.*chrome)/i.test(ei),os=a9,oc=g.MutationObserver||g.WebKitMutationObserver,ol=g.document,of=g.process,od=g.Promise,oh=function(e){if(!D)return g[e];var t=a7(g,e);return t&&t.value}("queueMicrotask");if(!oh){var ov=new oe,op=function(){var e,t;for(aN&&(e=of.domain)&&e.exit();t=ov.get();)try{t()}catch(e){throw ov.head&&ot(),e}e&&e.enter()};aW||aN||ou||!oc||!ol?!oo&&od&&od.resolve?((oi=od.resolve(void 0)).constructor=od,oa=e2(oi.then,oi),ot=function(){oa(op)}):aN?ot=function(){of.nextTick(op)}:(os=e2(os,g),ot=function(){os(op)}):(or=!0,on=ol.createTextNode(""),new oc(op).observe(on,{characterData:!0}),ot=function(){on.data=or=!or}),oh=function(e){ov.head||ot(),ov.add(e)}}var og=oh,oy=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},om=g.Promise,o_=om&&om.prototype,ob=eN("species"),ok=!1,ow=R(g.PromiseRejectionEvent),oS={CONSTRUCTOR:eQ("Promise",function(){var e=tT(om),t=e!==String(om);if(!t&&66===ec||!o_.catch||!o_.finally)return!0;if(!ec||ec<51||!/native code/.test(e)){var r=new om(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((r.constructor={})[ob]=n,!(ok=r.then(function(){}) instanceof n))return!0}return!(t||"BROWSER"!==aj&&"DENO"!==aj||ow)}),REJECTION_EVENT:ow,SUBCLASSING:ok},oT={},ox=TypeError,oI=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw new ox("Bad Promise constructor");t=e,r=n}),this.resolve=em(t),this.reject=em(r)};oT.f=function(e){return new oI(e)};var oC=a9,oP=function(e,t){try{}catch(e){}},oE="Promise",oO=oS.CONSTRUCTOR,oL=oS.REJECTION_EVENT;oS.SUBCLASSING;var oR,oA,oD,oM=na.getterFor(oE),oB=na.set,oj=om&&om.prototype,oN=om,oU=oj,oF=g.TypeError,oz=g.document,oK=g.process,oV=oT.f,oq=oV,oH=!!(oz&&oz.createEvent&&g.dispatchEvent),oG="unhandledrejection",oW=function(e){var t;return!(!$(e)||!R(t=e.then))&&t},oY=function(e,t){var r,n,i,a=t.value,o=1===t.state,u=o?e.ok:e.fail,s=e.resolve,c=e.reject,l=e.domain;try{u?(o||(2===t.rejection&&oZ(t),t.rejection=1),!0===u?r=a:(l&&l.enter(),r=u(a),l&&(l.exit(),i=!0)),r===e.promise?c(new oF("Promise-chain cycle")):(n=oW(r))?B(n,r,s,c):s(r)):c(a)}catch(e){l&&!i&&l.exit(),c(e)}},oX=function(e,t){e.notified||(e.notified=!0,og(function(){for(var r,n=e.reactions;r=n.get();)oY(r,e);e.notified=!1,t&&!e.rejection&&o$(e)}))},oQ=function(e,t,r){var n,i;oH?((n=oz.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),g.dispatchEvent(n)):n={promise:t,reason:r},!oL&&(i=g["on"+e])?i(n):e===oG&&oP("Unhandled promise rejection",r)},o$=function(e){B(oC,g,function(){var t,r=e.facade,n=e.value;if(oJ(e)&&(t=oy(function(){aN?oK.emit("unhandledRejection",n,r):oQ(oG,r,n)}),e.rejection=aN||oJ(e)?2:1,t.error))throw t.value})},oJ=function(e){return 1!==e.rejection&&!e.parent},oZ=function(e){B(oC,g,function(){var t=e.facade;aN?oK.emit("rejectionHandled",t):oQ("rejectionhandled",t,e.value)})},o0=function(e,t,r){return function(n){e(t,n,r)}},o1=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,oX(e,!0))},o2=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new oF("Promise can't be resolved itself");var n=oW(t);n?og(function(){var r={done:!1};try{B(n,t,o0(o2,r,e),o0(o1,r,e))}catch(t){o1(r,t,e)}}):(e.value=t,e.state=1,oX(e,!1))}catch(t){o1({done:!1},t,e)}}};oO&&(oU=(oN=function(e){aK(this,oU),em(e),B(oR,this);var t=oM(this);try{e(o0(o2,t),o0(o1,t))}catch(e){o1(t,e)}}).prototype,(oR=function(e){oB(this,{type:oE,done:!1,notified:!1,parent:!1,reactions:new oe,rejection:!1,state:0,value:null})}).prototype=rX(oU,"then",function(e,t){var r=oM(this),n=oV(aq(this,oN));return r.parent=!0,n.ok=!R(e)||e,n.fail=R(t)&&t,n.domain=aN?oK.domain:void 0,0===r.state?r.reactions.add(n):og(function(){oY(n,r)}),n.promise}),oA=function(){var e=new oR,t=oM(e);this.promise=e,this.resolve=o0(o2,t),this.reject=o0(o1,t)},oT.f=oV=function(e){return e===oN||e===oD?new oA(e):oq(e)}),tu({global:!0,constructor:!0,wrap:!0,forced:oO},{Promise:oN}),oD=J.Promise,r5(oN,oE,!1,!0),aF(oE);var o4=eN("iterator"),o3=!1;try{var o6=0,o8={next:function(){return{done:!!o6++}},return:function(){o3=!0}};o8[o4]=function(){return this},Array.from(o8,function(){throw 2})}catch(e){}var o5=function(e,t){try{if(!t&&!o3)return!1}catch(e){return!1}var r=!1;try{var n={};n[o4]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},o9=oS.CONSTRUCTOR||!o5(function(e){om.all(e).then(void 0,function(){})});tu({target:"Promise",stat:!0,forced:o9},{all:function(e){var t=this,r=oT.f(t),n=r.resolve,i=r.reject,a=oy(function(){var r=em(t.resolve),a=[],o=0,u=1;aT(e,function(e){var s=o++,c=!1;u++,B(r,t,e).then(function(e){c||(c=!0,a[s]=e,--u||n(a))},i)}),--u||n(a)});return a.error&&i(a.value),r.promise}});var o7=oS.CONSTRUCTOR;om&&om.prototype,tu({target:"Promise",proto:!0,forced:o7,real:!0},{catch:function(e){return this.then(void 0,e)}});tu({target:"Promise",stat:!0,forced:o9},{race:function(e){var t=this,r=oT.f(t),n=r.reject,i=oy(function(){var i=em(t.resolve);aT(e,function(e){B(i,t,e).then(r.resolve,n)})});return i.error&&n(i.value),r.promise}}),tu({target:"Promise",stat:!0,forced:oS.CONSTRUCTOR},{reject:function(e){var t=oT.f(this);return(0,t.reject)(e),t.promise}});var ue=function(e,t){if(e5(e),$(t)&&t.constructor===e)return t;var r=oT.f(e);return(0,r.resolve)(t),r.promise},ut=oS.CONSTRUCTOR,ur=ee("Promise"),un=!ut;tu({target:"Promise",stat:!0,forced:!0},{resolve:function(e){return ue(un&&this===ur?om:this,e)}});tu({target:"Promise",stat:!0,forced:o9},{allSettled:function(e){var t=this,r=oT.f(t),n=r.resolve,i=r.reject,a=oy(function(){var r=em(t.resolve),i=[],a=0,o=1;aT(e,function(e){var u=a++,s=!1;o++,B(r,t,e).then(function(e){s||(s=!0,i[u]={status:"fulfilled",value:e},--o||n(i))},function(e){s||(s=!0,i[u]={status:"rejected",reason:e},--o||n(i))})}),--o||n(i)});return a.error&&i(a.value),r.promise}});var ui="No one promise resolved";tu({target:"Promise",stat:!0,forced:o9},{any:function(e){var t=this,r=ee("AggregateError"),n=oT.f(t),i=n.resolve,a=n.reject,o=oy(function(){var n=em(t.resolve),o=[],u=0,s=1,c=!1;aT(e,function(e){var l=u++,f=!1;s++,B(n,t,e).then(function(e){f||c||(c=!0,i(e))},function(e){f||c||(f=!0,o[l]=e,--s||a(new r(o,ui)))})}),--s||a(new r(o,ui))});return o.error&&a(o.value),n.promise}});var ua=g.Promise,uo=!1;tu({target:"Promise",stat:!0,forced:!ua||!ua.try||oy(function(){ua.try(function(e){uo=8===e},8)}).error||!uo},{try:function(e){var t=arguments.length>1?ts(arguments,1):[],r=oT.f(this),n=oy(function(){return w(em(e),void 0,t)});return(n.error?r.reject:r.resolve)(n.value),r.promise}});tu({target:"Promise",stat:!0},{withResolvers:function(){var e=oT.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var uu=om&&om.prototype;tu({target:"Promise",proto:!0,real:!0,forced:!!om&&y(function(){uu.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=aq(this,ee("Promise")),r=R(e);return this.then(r?function(r){return ue(t,e()).then(function(){return r})}:e,r?function(r){return ue(t,e()).then(function(){throw r})}:e)}});var us=I("".charAt),uc=I("".charCodeAt),ul=I("".slice),uf=function(e){return function(t,r){var n,i,a=rz(X(t)),o=tU(r),u=a.length;return o<0||o>=u?e?"":void 0:(n=uc(a,o))<55296||n>56319||o+1===u||(i=uc(a,o+1))<56320||i>57343?e?us(a,o):n:e?ul(a,o,o+2):i-56320+(n-55296<<10)+65536}},ud={codeAt:uf(!1),charAt:uf(!0)}.charAt,uh="String Iterator",uv=na.set,up=na.getterFor(uh);ix(String,"String",function(e){uv(this,{type:uh,string:rz(e),index:0})},function(){var e,t=up(this),r=t.string,n=t.index;return n>=r.length?iI(void 0,!0):(e=ud(r,n),t.index+=e.length,iI(e,!1))});var ug=J.Promise,uy=v(ug),um=r$.f("asyncIterator"),u_=v(um);function ub(e,t){var r;this.next||(at(ub.prototype),at(ub.prototype,"function"==typeof iX&&u_||"@asyncIterator",function(){return this})),at(this,"_invoke",function(n,i,a){function o(){return new t(function(r,i){(function r(n,i,a,o){try{var u=e[n](i),s=u.value;return s instanceof rC?t.resolve(s.v).then(function(e){r("next",e,a,o)},function(e){r("throw",e,a,o)}):t.resolve(s).then(function(e){u.value=e,a(u)},function(e){return r("throw",e,a,o)})}catch(e){o(e)}})(n,a,r,i)})}return r=r?r.then(o,o):o()},!0)}function uk(e,t,r,n,i){return new ub(ar().w(e,t,r,n),i||uy)}var uw=TypeError,uS=Object.getOwnPropertyDescriptor,uT=D&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(r_(e)&&!uS(e,"length").writable)throw new uw("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ux=TypeError,uI=function(e,t){if(!delete e[t])throw new ux("Cannot delete property "+eg(t)+" of "+eg(e))};tu({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=eP(this),r=tH(t),n=arguments.length;if(n){rE(r+n);for(var i=r;i--;){var a=i+n;i in t?t[a]=t[i]:uI(t,a)}for(var o=0;o<n;o++)t[o]=arguments[o]}return uT(t,r+n)}});var uC=rw("Array","unshift"),uP=Array.prototype,uE=v(function(e){var t=e.unshift;return e===uP||et(uP,e)&&t===uP.unshift?uC:t});function uO(e){var t=Object(e),r=[];for(var n in t)uE(r).call(r,n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}}var uL=r$.f("iterator"),uR=v(uL);function uA(e){return(uA="function"==typeof iX&&"symbol"==typeof uR?function(e){return typeof e}:function(e){return e&&"function"==typeof iX&&e.constructor===iX&&e!==iX.prototype?"symbol":typeof e})(e)}function uD(e){if(null!=e){var t=e["function"==typeof iX&&uR||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(uA(e)+" is not iterable")}function uM(){var e=ar(),t=e.m(uM),r=(rm?rm(t):t.__proto__).constructor;function n(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===r||"GeneratorFunction"===(t.displayName||t.name))}var i={throw:1,return:2,break:3,continue:3};function a(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,i[e],t)},delegateYield:function(e,i,a){return t.resultName=i,r(n.d,uD(e),a)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(uM=function(){return{wrap:function(t,r,n,i){return e.w(a(t),r,n,i&&rI(i).call(i))},isGeneratorFunction:n,mark:e.m,awrap:function(e,t){return new rC(e,t)},AsyncIterator:ub,async:function(e,t,r,i,o){return(n(t)?uk:function(e,t,r,n,i){var a=uk(e,t,r,n,i);return a.next().then(function(e){return e.done?e.value:a.next()})})(a(e),t,r,i,o)},keys:uO,values:uD}})()}function uB(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):uy.resolve(s).then(n,i)}function uj(e){return function(){var t=this,r=arguments;return new uy(function(n,i){var a=e.apply(t,r);function o(e){uB(a,n,i,o,u,"next",e)}function u(e){uB(a,n,i,o,u,"throw",e)}o(void 0)})}}tu({target:"Object",stat:!0,forced:y(function(){tZ(1)})},{keys:function(e){return tZ(eP(e))}});var uN=J.Object.keys,uU=v(uN),uF=J.Object.getOwnPropertySymbols,uz=v(uF),uK=ns.filter;tu({target:"Array",proto:!0,forced:!rB("filter")},{filter:function(e){return uK(this,e,arguments.length>1?arguments[1]:void 0)}});var uV=rw("Array","filter"),uq=Array.prototype,uH=function(e){var t=e.filter;return e===uq||et(uq,e)&&t===uq.filter?uV:t},uG=v(uH),uW={exports:{}},uY=A.f;tu({target:"Object",stat:!0,forced:!D||y(function(){uY(1)}),sham:!D},{getOwnPropertyDescriptor:function(e,t){return uY(Q(e),t)}});var uX=J.Object,uQ=uW.exports=function(e,t){return uX.getOwnPropertyDescriptor(e,t)};uX.getOwnPropertyDescriptor.sham&&(uQ.sham=!0);var u$=uW.exports,uJ=v(u$);tu({target:"Array",proto:!0,arity:1,forced:y(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=eP(this),r=tH(t),n=arguments.length;rE(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return uT(t,r),r}});var uZ=rw("Array","push"),u0=Array.prototype,u1=v(function(e){var t=e.push;return e===u0||et(u0,e)&&t===u0.push?uZ:t}),u2=function(e,t){var r=[][e];return!!r&&y(function(){r.call(null,t||function(){return 1},1)})},u4=ns.forEach,u3=u2("forEach")?[].forEach:function(e){return u4(this,e,arguments.length>1?arguments[1]:void 0)};tu({target:"Array",proto:!0,forced:[].forEach!==u3},{forEach:u3});var u6=rw("Array","forEach"),u8=Array.prototype,u5={DOMTokenList:!0,NodeList:!0},u9=function(e){var t=e.forEach;return e===u8||et(u8,e)&&t===u8.forEach||eO(u5,tw(e))?u6:t},u7=v(u9);tu({target:"Object",stat:!0,sham:!D},{getOwnPropertyDescriptors:function(e){for(var t,r,n=Q(e),i=A.f,a=ai(n),o={},u=0;a.length>u;)void 0!==(r=i(n,t=a[u++]))&&rO(o,t,r);return o}});var se=J.Object.getOwnPropertyDescriptors,st=v(se),sr={exports:{}},sn=tM.f;tu({target:"Object",stat:!0,forced:Object.defineProperties!==sn,sham:!D},{defineProperties:sn});var si=J.Object,sa=sr.exports=function(e,t){return si.defineProperties(e,t)};si.defineProperties.sham&&(sa.sham=!0);var so=sr.exports,su=v(so),ss=r$.f("toPrimitive"),sc=v(ss);function sl(e){var t=function(e,t){if("object"!=uA(e)||!e)return e;var r=e[sc];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uA(t)?t:t+""}function sf(e,t,r){return(t=sl(t))in e?ae(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sd(e,t){var r=uU(e);if(uz){var n=uz(e);t&&(n=uG(n).call(n,function(t){return uJ(e,t).enumerable})),u1(r).apply(r,n)}return r}function sh(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?u7(r=sd(Object(i),!0)).call(r,function(t){sf(e,t,i[t])}):st?su(e,st(i)):u7(n=sd(Object(i))).call(n,function(t){ae(e,t,uJ(i,t))})}return e}function sv(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function sp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),ae(e,sl(n.key),n)}}function sg(e,t,r){return t&&sp(e.prototype,t),r&&sp(e,r),ae(e,"prototype",{writable:!1}),e}function sy(e,t){if(t&&("object"==uA(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function sm(){try{var e=!Boolean.prototype.valueOf.call(rl(Boolean,[],function(){}))}catch(e){}return(sm=function(){return!!e})()}function s_(e){return(s_=i3?i2(rm).call(rm):function(e){return e.__proto__||rm(e)})(e)}function sb(e,t){return(sb=i3?i2(i3).call(i3):function(e,t){return e.__proto__=t,e})(e,t)}function sk(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=iJ(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),ae(e,"prototype",{writable:!1}),t&&sb(e,t)}var sw=Object.assign,sS=Object.defineProperty,sT=I([].concat),sx=!sw||y(function(){if(D&&1!==sw({b:1},sw(sS({},"a",{enumerable:!0,get:function(){sS(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!==sw({},e)[r]||tZ(sw({},t)).join("")!==n})?function(e,t){for(var r=eP(e),n=arguments.length,i=1,a=rY.f,o=j.f;n>i;)for(var u,s=G(arguments[i++]),c=a?sT(tZ(s),a(s)):tZ(s),l=c.length,f=0;l>f;)u=c[f++],D&&!B(o,s,u)||(r[u]=s[u]);return r}:sw;tu({target:"Object",stat:!0,arity:2,forced:Object.assign!==sx},{assign:sx});var sI=J.Object.assign,sC=v(sI),sP=sg(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};sv(this,e),sf(this,"player",void 0);var r=!0;try{r=!t.player}catch(e){}this.player=r?t:t.player},[{key:"playerConfig",get:function(){return this.player.config}},{key:"config",get:function(){var e;return null!==(e=(this.player.config.pluginsConfig||this.player.config||{})[this.constructor.pluginName])&&void 0!==e?e:{}}},{key:"beforePlayerInit",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"configDidUpdate",value:function(){}},{key:"beforeDestroy",value:function(){}},{key:"getConfig",value:function(e){var t=this.playerConfig,r=t.baseConfig||{};return((null==r?void 0:r.mediaInfo)||{})[e]||r[e]||t[e]}},{key:"setBaseConfig",value:function(e,t){var r=this.playerConfig.baseConfig||{};"string"==typeof e?r[e]=t:sC(r,e)}},{key:"setSharedConfig",value:function(e,t){var r=this.playerConfig.shared||{};"string"==typeof e?r[e]=t:sC(r,e)}}]),sE=sg(function e(t){sv(this,e),sf(this,"strategyCenter",void 0),sf(this,"ctx",void 0),sf(this,"config",void 0),sf(this,"player",void 0),sf(this,"strategyName",void 0),this.ctx=t.ctx,this.config=t.config,this.strategyName=t.strategyName,this.strategyCenter=t.strategyCenter,this.player=null},[{key:"strategyPriority",get:function(){return this.constructor.strategyPriority}},{key:"getStrategyConfig",value:function(){return this.config}},{key:"setPlayerInst",value:function(e){this.player=e.getInst()}},{key:"onBasePluginCreated",value:function(e){}},{key:"beforePlayerCreate",value:function(e){}},{key:"onPlayerEvent",value:function(e,t){}},{key:"onGlobalEvent",value:function(e,t){}}]),sO=RangeError,sL=I(function(e){var t=rz(X(this)),r="",n=tU(e);if(n<0||n===1/0)throw new sO("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r}),sR=I("".slice),sA=Math.ceil,sD=function(e){return function(t,r,n){var i,a,o=rz(X(t)),u=tq(r),s=o.length,c=void 0===n?" ":rz(n);return u<=s||""===c?o:((a=sL(c,sA((i=u-s)/c.length))).length>i&&(a=sR(a,0,i)),e?o+a:a+o)}},sM={start:sD(!1),end:sD(!0)},sB=sM.start,sj=RangeError,sN=isFinite,sU=Math.abs,sF=Date.prototype,sz=sF.toISOString,sK=I(sF.getTime),sV=I(sF.getUTCDate),sq=I(sF.getUTCFullYear),sH=I(sF.getUTCHours),sG=I(sF.getUTCMilliseconds),sW=I(sF.getUTCMinutes),sY=I(sF.getUTCMonth),sX=I(sF.getUTCSeconds),sQ=y(function(){return"0385-07-25T07:06:39.999Z"!==sz.call(new Date(-50000000000001))})||!y(function(){sz.call(new Date(NaN))})?function(){if(!sN(sK(this)))throw new sj("Invalid time value");var e=sq(this),t=sG(this),r=e<0?"-":e>9999?"+":"";return r+sB(sU(e),r?6:4,0)+"-"+sB(sY(this)+1,2,0)+"-"+sB(sV(this),2,0)+"T"+sB(sH(this),2,0)+":"+sB(sW(this),2,0)+":"+sB(sX(this),2,0)+"."+sB(t,3,0)+"Z"}:sz;tu({target:"Date",proto:!0,forced:y(function(){return null!==new Date(NaN).toJSON()||1!==B(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(e){var t=eP(this),r=eK(t,"number");return"number"!=typeof r||isFinite(r)?"toISOString"in t||"Date"!==E(t)?t.toISOString():B(sQ,t):null}});J.JSON||(J.JSON={stringify:JSON.stringify});var s$=v(function(e,t,r){return w(J.JSON.stringify,null,arguments)}),sJ=Date,sZ=I(sJ.prototype.getTime);tu({target:"Date",stat:!0},{now:function(){return sZ(new sJ)}});var s0=J.Date.now,s1=v(s0),s2=((vt=s2||{}).h265="h265",vt.adaptRange="adaptRange",vt.preload="preload",vt.bitrateSelector="bitrateSelector",vt.testSpeed="testSpeed",vt.degrade="degrade",vt.vodLogger="vodLogger",vt.pcdn="pcdn",vt.urlProcess="urlProcess",vt.abr="abr",vt.bufferControl="bufferControl",vt),s4=((vr=s4||{})[vr.urlProcess=4]="urlProcess",vr[vr.degrade=4]="degrade",vr[vr.testSpeed=3]="testSpeed",vr[vr.bitrateSelector=2]="bitrateSelector",vr[vr.h265=0]="h265",vr[vr.adaptRange=0]="adaptRange",vr[vr.preload=0]="preload",vr[vr.vodLogger=0]="vodLogger",vr[vr.pcdn=0]="pcdn",vr[vr.abr=0]="abr",vr[vr.bufferControl=0]="bufferControl",vr),s3=rw("Array","concat"),s6=Array.prototype,s8=v(function(e){var t=e.concat;return e===s6||et(s6,e)&&t===s6.concat?s3:t}),s5={info:3,warn:2,error:1},s9=!1;try{s9=!!window.localStorage.getItem("VESTRATEGY_LOG")}catch(e){}var s7=sg(function e(t,r){var n=this;sv(this,e),sf(this,"logger",void 0),sf(this,"level",void 0),sf(this,"customLogger",void 0),this.level=null==r?void 0:r.level,this.customLogger=null==r?void 0:r.logger,this.logger=function(e,r){var i,a,o,u;try{u="2.0.0-rc.58"}catch(e){u="--"}for(var s,c,l,f,d,h,v,p,g,y,m,_=s8(i=s8(a="[".concat(t,"][")).call(a,u,"][")).call(i,r,"]"),b=arguments.length,k=Array(b>2?b-2:0),w=2;w<b;w++)k[w-2]=arguments[w];if(n.customLogger)return"info"===e?n.customLogger.info?(f=n.customLogger).info.apply(f,s8(d=[_]).call(d,k)):null===(h=(v=n.customLogger).log)||void 0===h?void 0:h.call.apply(h,s8(p=[v,_]).call(p,k)):null===(s=(c=n.customLogger)[e])||void 0===s?void 0:s.call.apply(s,s8(l=[c,_]).call(l,k));((null!==(o=n.level)&&void 0!==o?o:1)>=s5[e]||"undefined"!=typeof window&&s9)&&(null===(g=window.console)||void 0===g||null===(y=g[e])||void 0===y||y.call.apply(y,s8(m=[g,_]).call(m,k)))}},[{key:"update",value:function(e){var t=e||{},r=t.logger,n=t.level;this.updateLevel(n),this.updateLogger(r)}},{key:"info",value:function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.logger.apply(this,s8(t=["info",e]).call(t,n))}},{key:"warn",value:function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.logger.apply(this,s8(t=["warn",e]).call(t,n))}},{key:"error",value:function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this.logger.apply(this,s8(t=["error",e]).call(t,n))}},{key:"updateLevel",value:function(e){void 0!==uA(e)&&(this.level=e)}},{key:"updateLogger",value:function(e){e&&(this.customLogger=e)}}]),ce=tW.includes;tu({target:"Array",proto:!0,forced:y(function(){return![,].includes()})},{includes:function(e){return ce(this,e,arguments.length>1?arguments[1]:void 0)}});var ct=rw("Array","includes"),cr=eN("match"),cn=function(e){var t;return $(e)&&(void 0!==(t=e[cr])?!!t:"RegExp"===E(e))},ci=TypeError,ca=function(e){if(cn(e))throw new ci("The method doesn't accept regular expressions");return e},co=eN("match"),cu=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[co]=!1,"/./"[e](t)}catch(e){}}return!1},cs=I("".indexOf);tu({target:"String",proto:!0,forced:!cu("includes")},{includes:function(e){return!!~cs(rz(X(this)),rz(ca(e)),arguments.length>1?arguments[1]:void 0)}});var cc=rw("String","includes"),cl=Array.prototype,cf=String.prototype,cd=v(function(e){var t=e.includes;return e===cl||et(cl,e)&&t===cl.includes?ct:"string"==typeof e||e===cf||et(cf,e)&&t===cf.includes?cc:t});tu({target:"Array",stat:!0},{isArray:r_});var ch=J.Array.isArray,cv=v(ch),cp=v(ch),cg=ns.map;tu({target:"Array",proto:!0,forced:!rB("map")},{map:function(e){return cg(this,e,arguments.length>1?arguments[1]:void 0)}});var cy=rw("Array","map"),cm=Array.prototype,c_=v(function(e){var t=e.map;return e===cm||et(cm,e)&&t===cm.map?cy:t}),cb=v(u9),ck=v(i7),cw=v(uN),cS=v(ug);tu({target:"Array",proto:!0},{fill:function(e){for(var t=eP(this),r=tH(t),n=arguments.length,i=tK(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:tK(a,r);o>i;)t[i++]=e;return t}});var cT=rw("Array","fill"),cx=Array.prototype,cI=v(function(e){var t=e.fill;return e===cx||et(cx,e)&&t===cx.fill?cT:t}),cC=v(uH),cP=TypeError,cE="Reduce of empty array with no initial value",cO=function(e){return function(t,r,n,i){var a=eP(t),o=G(a),u=tH(a);if(em(r),0===u&&n<2)throw new cP(cE);var s=e?u-1:0,c=e?-1:1;if(n<2)for(;;){if(s in o){i=o[s],s+=c;break}if(s+=c,e?s<0:u<=s)throw new cP(cE)}for(;e?s>=0:u>s;s+=c)s in o&&(i=r(i,o[s],s,a));return i}},cL={left:cO(!1),right:cO(!0)}.left;tu({target:"Array",proto:!0,forced:!aN&&ec>79&&ec<83||!u2("reduce")},{reduce:function(e){var t=arguments.length;return cL(this,e,t,t>1?arguments[1]:void 0)}});var cR=rw("Array","reduce"),cA=Array.prototype,cD=v(function(e){var t=e.reduce;return e===cA||et(cA,e)&&t===cA.reduce?cR:t}),cM=" \n\v\f\r \xa0 \u2028\u2029\uFEFF",cB=I("".replace),cj=RegExp("^["+cM+"]+"),cN=RegExp("(^|[^"+cM+"])["+cM+"]+$"),cU=function(e){return function(t){var r=rz(X(t));return 1&e&&(r=cB(r,cj,"")),2&e&&(r=cB(r,cN,"$1")),r}},cF={start:cU(1),end:cU(2),trim:cU(3)},cz=cF.trim,cK=g.parseInt,cV=g.Symbol,cq=cV&&cV.iterator,cH=/^[+-]?0x/i,cG=I(cH.exec),cW=8!==cK(cM+"08")||22!==cK(cM+"0x16")||cq&&!y(function(){cK(Object(cq))})?function(e,t){var r=cz(rz(e));return cK(r,t>>>0||(cG(cH,r)?16:10))}:cK;tu({global:!0,forced:parseInt!==cW},{parseInt:cW});var cY=J.parseInt,cX=v(cY),cQ=ia.PROPER,c$="\x85",cJ=cF.trim;tu({target:"String",proto:!0,forced:(vn="trim",y(function(){return!!cM[vn]()||c$[vn]()!==c$||cQ&&cM[vn].name!==vn}))},{trim:function(){return cJ(this)}});var cZ=rw("String","trim"),c0=String.prototype,c1=v(function(e){var t=e.trim;return"string"==typeof e||e===c0||et(c0,e)&&t===c0.trim?cZ:t}),c2=cF.trim,c4=I("".charAt),c3=g.parseFloat,c6=g.Symbol,c8=c6&&c6.iterator,c5=1/c3(cM+"-0")!=-Infinity||c8&&!y(function(){c3(Object(c8))})?function(e){var t=c2(rz(e)),r=c3(t);return 0===r&&"-"===c4(t,0)?-0:r}:c3;tu({global:!0,forced:parseFloat!==c5},{parseFloat:c5});var c9=J.parseFloat,c7=v(c9),le=ns.find,lt="find",lr=!0;lt in[]&&[,][lt](function(){lr=!1}),tu({target:"Array",proto:!0,forced:lr},{find:function(e){return le(this,e,arguments.length>1?arguments[1]:void 0)}});var ln=rw("Array","find"),li=Array.prototype,la=v(function(e){var t=e.find;return e===li||et(li,e)&&t===li.find?ln:t}),lo=tW.indexOf,lu=O([].indexOf),ls=!!lu&&1/lu([1],1,-0)<0;tu({target:"Array",proto:!0,forced:ls||!u2("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return ls?lu(this,e,t)||0:lo(this,e,t)}});var lc=rw("Array","indexOf"),ll=Array.prototype,lf=v(function(e){var t=e.indexOf;return e===ll||et(ll,e)&&t===ll.indexOf?lc:t}),ld=rB("splice"),lh=Math.max,lv=Math.min;tu({target:"Array",proto:!0,forced:!ld},{splice:function(e,t){var r,n,i,a,o,u,s=eP(this),c=tH(s),l=tK(e,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=lv(lh(tU(t),0),c-l)),rE(c+r-n),i=rD(s,n),a=0;a<n;a++)(o=l+a)in s&&rO(i,a,s[o]);if(i.length=n,r<n){for(a=l;a<c-n;a++)u=a+r,(o=a+n)in s?s[u]=s[o]:uI(s,u);for(a=c;a>c-n+r;a--)uI(s,a-1)}else if(r>n)for(a=c-n;a>l;a--)u=a+r-1,(o=a+n-1)in s?s[u]=s[o]:uI(s,u);for(a=0;a<r;a++)s[a+l]=arguments[a+2];return uT(s,c-n+r),i}});var lp=rw("Array","splice"),lg=Array.prototype,ly=v(function(e){var t=e.splice;return e===lg||et(lg,e)&&t===lg.splice?lp:t}),lm=v(rx),l_={exports:{}},lb=y(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),lk=Object.isExtensible,lw=y(function(){lk(1)})||lb?function(e){return!!$(e)&&(!lb||"ArrayBuffer"!==E(e))&&(!lk||lk(e))}:lk,lS=!y(function(){return Object.isExtensible(Object.preventExtensions({}))}),lT=e4.f,lx=!1,lI=eD("meta"),lC=0,lP=function(e){lT(e,lI,{value:{objectID:"O"+lC++,weakData:{}}})},lE=l_.exports={enable:function(){lE.enable=function(){},lx=!0;var e=rK.f,t=I([].splice),r={};r[lI]=1,e(r).length&&(rK.f=function(r){for(var n=e(r),i=0,a=n.length;i<a;i++)if(n[i]===lI){t(n,i,1);break}return n},tu({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:rq.f}))},fastKey:function(e,t){if(!$(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!eO(e,lI)){if(!lw(e))return"F";if(!t)return"E";lP(e)}return e[lI].objectID},getWeakData:function(e,t){if(!eO(e,lI)){if(!lw(e))return!0;if(!t)return!1;lP(e)}return e[lI].weakData},onFreeze:function(e){return lS&&lx&&lw(e)&&!eO(e,lI)&&lP(e),e}};tY[lI]=!0;var lO=l_.exports,lL=e4.f,lR=ns.forEach,lA=na.set,lD=na.getterFor,lM=function(e,t,r){var n,i=-1!==e.indexOf("Map"),a=-1!==e.indexOf("Weak"),o=i?"set":"add",u=g[e],s=u&&u.prototype,c={};if(D&&R(u)&&(a||s.forEach&&!y(function(){(new u).entries().next()}))){var l=(n=t(function(t,r){lA(aK(t,l),{type:e,collection:new u}),W(r)||aT(r,t[o],{that:t,AS_ENTRIES:i})})).prototype,f=lD(e);lR(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(e){var t="add"===e||"set"===e;e in s&&(!a||"clear"!==e)&&ti(l,e,function(r,n){var i=f(this).collection;if(!t&&a&&!$(r))return"get"===e&&void 0;var o=i[e](0===r?0:r,n);return t?this:o})}),a||lL(l,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(t,e,i,o),lO.enable();return r5(n,e,!1,!0),c[e]=n,tu({global:!0,forced:!0},c),a||r.setStrong(n,e,i),n},lB=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:rX(e,n,t[n],r);return e},lj=lO.fastKey,lN=na.set,lU=na.getterFor,lF={getConstructor:function(e,t,r,n){var i=e(function(e,i){aK(e,a),lN(e,{type:t,index:rr(null),first:null,last:null,size:0}),D||(e.size=0),W(i)||aT(i,e[n],{that:e,AS_ENTRIES:r})}),a=i.prototype,o=lU(t),u=function(e,t,r){var n,i,a=o(e),u=s(e,t);return u?u.value=r:(a.last=u={index:i=lj(t,!0),key:t,value:r,previous:n=a.last,next:null,removed:!1},a.first||(a.first=u),n&&(n.next=u),D?a.size++:e.size++,"F"!==i&&(a.index[i]=u)),e},s=function(e,t){var r,n=o(e),i=lj(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===t)return r};return lB(a,{clear:function(){for(var e=o(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=rr(null),D?e.size=0:this.size=0},delete:function(e){var t=o(this),r=s(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index],r.removed=!0,i&&(i.next=n),n&&(n.previous=i),t.first===r&&(t.first=n),t.last===r&&(t.last=i),D?t.size--:this.size--}return!!r},forEach:function(e){for(var t,r=o(this),n=e2(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),lB(a,r?{get:function(e){var t=s(this,e);return t&&t.value},set:function(e,t){return u(this,0===e?0:e,t)}}:{add:function(e){return u(this,e=0===e?0:e,e)}}),D&&rQ(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=lU(t),a=lU(n);ix(e,t,function(e,t){lN(this,{type:n,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?iI("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=null,iI(void 0,!0))},r?"entries":"values",!r,!0),aF(t)}};lM("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},lF);var lz=function(e,t){return 1===t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},lK=ee("Map"),lV={Map:lK,set:lz("set",2),get:lz("get",1),has:lz("has",1),remove:lz("delete",1),proto:lK.prototype},lq=lV.Map,lH=lV.has,lG=lV.get,lW=lV.set,lY=I([].push);tu({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){X(e),em(t);var r=new lq,n=0;return aT(e,function(e){var i=t(e,n++);lH(r,i)?lY(lG(r,i),e):lW(r,i,[e])}),r}});var lX=J.Map,lQ=TypeError,l$=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 new lQ(eg(e)+" is not a map")},lJ=lV.get,lZ=lV.has,l0=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{getOrInsert:function(e,t){return lZ(l$(this),e)?lJ(this,e):(l0(this,e,t),t)}});var l1=lV.get,l2=lV.has,l4=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{getOrInsertComputed:function(e,t){if(l$(this),em(t),l2(this,e))return l1(this,e);0===e&&1/e==-Infinity&&(e=0);var r=t(e);return l4(this,e,r),r}});var l3=function(e,t,r){return function(n){var i=eP(n),a=arguments.length,o=a>1?arguments[1]:void 0,u=void 0!==o,s=u?e2(o,a>2?arguments[2]:void 0):void 0,c=new e,l=0;return aT(i,function(e){var n=u?s(e,l++):e;r?t(c,e5(n)[0],n[1]):t(c,n)}),c}};tu({target:"Map",stat:!0,forced:!0},{from:l3(lV.Map,lV.set,!0)});var l6=function(e,t,r){return function(){for(var n=new e,i=arguments.length,a=0;a<i;a++){var o=arguments[a];r?t(n,e5(o)[0],o[1]):t(n,o)}return n}};tu({target:"Map",stat:!0,forced:!0},{of:l6(lV.Map,lV.set,!0)});var l8=lV.Map;tu({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(R(this)?this:l8);em(t);var n=em(r.set);return aT(e,function(e){B(n,r,t(e),e)}),r}});var l5=lV.remove;tu({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=l$(this),r=!0,n=0,i=arguments.length;n<i;n++)e=l5(t,arguments[n]),r=r&&e;return!!r}});var l9=lV.get,l7=lV.has,fe=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=l$(this);return l7(i,e)?(r=l9(i,e),"update"in t&&(r=t.update(r,e,i),fe(i,e,r)),r):(n=t.insert(e,i),fe(i,e,n),n)}});var ft=function(e,t,r){for(var n,i,a=r?e:e.iterator,o=e.next;!(n=B(o,a)).done;)if(void 0!==(i=t(n.value)))return i},fr=function(e,t,r){return r?ft(e.entries(),function(e){return t(e[1],e[0])},!0):e.forEach(t)};tu({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0);return!1!==fr(t,function(e,n){if(!r(e,n,t))return!1},!0)}});var fn=lV.Map,fi=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=new fn;return fr(t,function(e,i){r(e,i,t)&&fi(n,i,e)}),n}});tu({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=fr(t,function(e,n){if(r(e,n,t))return{value:e}},!0);return n&&n.value}});tu({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=fr(t,function(e,n){if(r(e,n,t))return{key:n}},!0);return n&&n.key}});tu({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===fr(l$(this),function(t){var r,n;if((r=t)===(n=e)||r!=r&&n!=n)return!0},!0)}});tu({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=fr(l$(this),function(t,r){if(t===e)return{key:r}},!0);return t&&t.key}});var fa=lV.Map,fo=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=new fa;return fr(t,function(e,i){fo(n,r(e,i,t),e)}),n}});var fu=lV.Map,fs=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=new fu;return fr(t,function(e,i){fs(n,i,r(e,i,t))}),n}});var fc=lV.set;tu({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=l$(this),r=arguments.length,n=0;n<r;)aT(arguments[n++],function(e,r){fc(t,e,r)},{AS_ENTRIES:!0});return t}});var fl=TypeError;tu({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=l$(this),r=arguments.length<2,n=r?void 0:arguments[1];if(em(e),fr(t,function(i,a){r?(r=!1,n=i):n=e(n,i,a,t)}),r)throw new fl("Reduce of empty map with no initial value");return n}});tu({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=l$(this),r=e2(e,arguments.length>1?arguments[1]:void 0);return!0===fr(t,function(e,n){if(r(e,n,t))return!0},!0)}});var ff=TypeError,fd=lV.get,fh=lV.has,fv=lV.set;tu({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=l$(this),n=arguments.length;em(t);var i=fh(r,e);if(!i&&n<3)throw new ff("Updating absent value");var a=i?fd(r,e):em(n>2?arguments[2]:void 0)(e,r);return fv(r,e,t(a,e,r)),r}});var fp=TypeError,fg=function(e,t){var r,n=e5(this),i=em(n.get),a=em(n.has),o=em(n.set),u=arguments.length>2?arguments[2]:void 0;if(!R(t)&&!R(u))throw new fp("At least one callback required");return B(a,n,e)?(r=B(i,n,e),R(t)&&B(o,n,e,r=t(r))):R(u)&&B(o,n,e,r=u()),r};tu({target:"Map",proto:!0,real:!0,forced:!0},{upsert:fg});tu({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:fg});var fy=v(lX),fm=function(e,t,r,n){try{return n?t(e5(r)[0],r[1]):t(r)}catch(t){ab(e,"throw",t)}},f_=Array;tu({target:"Array",stat:!0,forced:!o5(function(e){Array.from(e)})},{from:function(e){var t=eP(e),r=tR(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=e2(i,n>2?arguments[2]:void 0));var o,u,s,c,l,f,d=ay(t),h=0;if(!d||this===f_&&ap(d))for(o=tH(t),u=r?new this(o):f_(o);o>h;h++)f=a?i(t[h],h):t[h],rO(u,h,f);else for(u=r?new this:[],l=(c=a_(t,d)).next;!(s=B(l,c)).done;h++)f=a?fm(c,i,[s.value,h],!0):s.value,rO(u,h,f);return u.length=h,u}});var fb=J.Array.from,fk=v(fb),fw=v(fb),fS=Math.floor,fT=function(e,t){var r=e.length;if(r<8)for(var n,i,a=1;a<r;){for(i=a,n=e[a];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==a++&&(e[i]=n)}else for(var o=fS(r/2),u=fT(ts(e,0,o),t),s=fT(ts(e,o),t),c=u.length,l=s.length,f=0,d=0;f<c||d<l;)e[f+d]=f<c&&d<l?0>=t(u[f],s[d])?u[f++]:s[d++]:f<c?u[f++]:s[d++];return e},fx=ei.match(/firefox\/(\d+)/i),fI=!!fx&&+fx[1],fC=/MSIE|Trident/.test(ei),fP=ei.match(/AppleWebKit\/(\d+)\./),fE=!!fP&&+fP[1],fO=[],fL=I(fO.sort),fR=I(fO.push),fA=y(function(){fO.sort(void 0)}),fD=y(function(){fO.sort(null)}),fM=u2("sort"),fB=!y(function(){if(ec)return ec<70;if(!(fI&&fI>3)){if(fC)return!0;if(fE)return fE<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)fO.push({k:t+n,v:r})}for(fO.sort(function(e,t){return t.v-e.v}),n=0;n<fO.length;n++)t=fO[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});tu({target:"Array",proto:!0,forced:fA||!fD||!fM||!fB},{sort:function(e){void 0!==e&&em(e);var t,r=eP(this);if(fB)return void 0===e?fL(r):fL(r,e);var n,i,a=[],o=tH(r);for(i=0;i<o;i++)i in r&&fR(a,r[i]);for(fT(a,(t=e,function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:rz(e)>rz(r)?1:-1})),n=tH(a),i=0;i<n;)r[i]=a[i++];for(;i<o;)uI(r,i++);return r}});var fj=rw("Array","sort"),fN=Array.prototype,fU=v(function(e){var t=e.sort;return e===fN||et(fN,e)&&t===fN.sort?fj:t});tu({global:!0,forced:g.globalThis!==g},{globalThis:g});var fF=v(g);function fz(e,t){if(t){var r=e.config;e.defineProperty&&e.defineProperty("curDefinition",{value:t,enumerable:!0,configurable:!0,writable:!0});try{e.curDefinition=t}catch(e){}if(r.baseConfig){if("string"==typeof t.url?r.baseConfig.url=t.url:cp(t.url)&&t.url.length>0&&(r.baseConfig.urlList=t.url,r.baseConfig.url=t.url[0].src),r.baseConfig.mediaInfo||(r.baseConfig.mediaInfo={}),r.baseConfig.mediaInfo.file_id=t.file_id,r.baseConfig.mediaInfo.bitrate=t.bitrate,cp(t.pktOffsetMap)&&t.pktOffsetMap.length>0){var n=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return(null==e||null===(t=la(e).call(e,function(e){return(null==e?void 0:e.time)===r}))||void 0===t?void 0:t.offset)||0}(t.pktOffsetMap,5);n>0&&(r.baseConfig.firstLoadSize=n)}}else r.url=t.url}}function fK(e){var t,r=null;try{r=(null===(t=e.getProperty)||void 0===t?void 0:t.call(e,"curDefinition"))||e.curDefinition}catch(e){}return r}function fV(e,t,r){e.defineProperty&&e.defineProperty(t,{value:r,enumerable:!0,configurable:!0,writable:!0});try{e[t]=r}catch(e){}}function fq(e){var t,r,n=e.config;return n.vid||(null===(t=n.baseConfig)||void 0===t||null===(t=t.mediaInfo)||void 0===t?void 0:t.vid)||(null===(r=n.baseConfig)||void 0===r||null===(r=r.mediaInfo)||void 0===r?void 0:r.id)||void 0}var fH=((vi=fH||{}).DEFAULT="default",vi.USER_SELECT="userSelect",vi.PRELOAD="preload",vi.BITRATE_ADAPTER="bitRateAdapter",vi.OVER_SCORE="overscore",vi),fG=((va=fG||{})[va.PRELOAD_NOT_HIT=0]="PRELOAD_NOT_HIT",va[va.ERROR_ON_FLY=1]="ERROR_ON_FLY",va);function fW(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var fY=v(ay),fX=rB("slice"),fQ=eN("species"),f$=Array,fJ=Math.max;tu({target:"Array",proto:!0,forced:!fX},{slice:function(e,t){var r,n,i,a=Q(this),o=tH(a),u=tK(e,o),s=tK(void 0===t?o:t,o);if(r_(a)&&((tR(r=a.constructor)&&(r===f$||r_(r.prototype))||$(r)&&null===(r=r[fQ]))&&(r=void 0),r===f$||void 0===r))return ts(a,u,s);for(n=new(void 0===r?f$:r)(fJ(s-u,0)),i=0;u<s;u++,i++)u in a&&rO(n,i,a[u]);return n.length=i,n}});var fZ=rw("Array","slice"),f0=Array.prototype,f1=function(e){var t=e.slice;return e===f0||et(f0,e)&&t===f0.slice?fZ:t},f2=v(f1);function f4(e,t){if(e){if("string"==typeof e)return fW(e,t);var r,n=f2(r=({}).toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?fk(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fW(e,t):void 0}}function f3(e){return function(e){if(cv(e))return fW(e)}(e)||function(e){if(void 0!==iX&&null!=fY(e)||null!=e["@@iterator"])return fk(e)}(e)||f4(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}lM("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},lF);var f6=TypeError,f8=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw new f6(eg(e)+" is not a set")},f5=ee("Set"),f9=f5.prototype,f7={Set:f5,add:lz("add",1),has:lz("has",1),remove:lz("delete",1),proto:f9},de=function(e,t,r){return r?ft(e.keys(),t,!0):e.forEach(t)},dt=f7.Set,dr=f7.add,dn=function(e){var t=new dt;return de(e,function(e){dr(t,e)}),t},di=function(e){return e.size},da="Invalid size",du=RangeError,ds=TypeError,dc=Math.max,dl=function(e,t){this.set=e,this.size=dc(t,0),this.has=em(e.has),this.keys=em(e.keys)};dl.prototype={getIterator:function(){var e;return{iterator:e=e5(B(this.keys,this.set)),next:e.next,done:!1}},includes:function(e){return B(this.has,this.set,e)}};var df=function(e){e5(e);var t=+e.size;if(t!=t)throw new ds(da);var r=tU(t);if(r<0)throw new du(da);return new dl(e,r)},dd=f7.has,dh=f7.remove,dv=function(e){var t=f8(this),r=df(e),n=dn(t);return di(t)<=r.size?de(t,function(e){r.includes(e)&&dh(n,e)}):ft(r.getIterator(),function(e){dd(n,e)&&dh(n,e)}),n},dp=function(){return!1},dg=!dp();tu({target:"Set",proto:!0,real:!0,forced:dg},{difference:dv});var dy=f7.Set,dm=f7.add,d_=f7.has,db=function(e){var t=f8(this),r=df(e),n=new dy;return di(t)>r.size?ft(r.getIterator(),function(e){d_(t,e)&&dm(n,e)}):de(t,function(e){r.includes(e)&&dm(n,e)}),n};tu({target:"Set",proto:!0,real:!0,forced:!dp()},{intersection:db});var dk=f7.has,dw=function(e){var t=f8(this),r=df(e);if(di(t)<=r.size)return!1!==de(t,function(e){if(r.includes(e))return!1},!0);var n=r.getIterator();return!1!==ft(n,function(e){if(dk(t,e))return ab(n,"normal",!1)})};tu({target:"Set",proto:!0,real:!0,forced:!dp()},{isDisjointFrom:dw});var dS=function(e){var t=f8(this),r=df(e);return!(di(t)>r.size)&&!1!==de(t,function(e){if(!r.includes(e))return!1},!0)};tu({target:"Set",proto:!0,real:!0,forced:!dp()},{isSubsetOf:dS});var dT=f7.has,dx=function(e){var t=f8(this),r=df(e);if(di(t)<r.size)return!1;var n=r.getIterator();return!1!==ft(n,function(e){if(!dT(t,e))return ab(n,"normal",!1)})};tu({target:"Set",proto:!0,real:!0,forced:!dp()},{isSupersetOf:dx});var dI=f7.add,dC=f7.has,dP=f7.remove,dE=function(e){var t=f8(this),r=df(e).getIterator(),n=dn(t);return ft(r,function(e){dC(t,e)?dP(n,e):dI(n,e)}),n};tu({target:"Set",proto:!0,real:!0,forced:!dp()},{symmetricDifference:dE});var dO=f7.add,dL=function(e){var t=f8(this),r=df(e).getIterator(),n=dn(t);return ft(r,function(e){dO(n,e)}),n};tu({target:"Set",proto:!0,real:!0,forced:!dp()},{union:dL});var dR=J.Set;tu({target:"Set",stat:!0,forced:!0},{from:l3(f7.Set,f7.add,!1)});tu({target:"Set",stat:!0,forced:!0},{of:l6(f7.Set,f7.add,!1)});var dA=f7.add;tu({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=f8(this),t=0,r=arguments.length;t<r;t++)dA(e,arguments[t]);return e}});var dD=f7.remove;tu({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=f8(this),r=!0,n=0,i=arguments.length;n<i;n++)e=dD(t,arguments[n]),r=r&&e;return!!r}});tu({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=f8(this),r=e2(e,arguments.length>1?arguments[1]:void 0);return!1!==de(t,function(e){if(!r(e,e,t))return!1},!0)}});var dM=eN("iterator"),dB=Object,dj=function(e){if(W(e))return!1;var t=dB(e);return void 0!==t[dM]||"@@iterator"in t||eO(n7,tw(t))},dN=ee("Set"),dU=function(e){var t;return $(t=e)&&"number"==typeof t.size&&R(t.has)&&R(t.keys)?e:dj(e)?new dN(e):e};tu({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return B(dv,this,dU(e))}});var dF=f7.Set,dz=f7.add;tu({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=f8(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=new dF;return de(t,function(e){r(e,e,t)&&dz(n,e)}),n}});tu({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=f8(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=de(t,function(e){if(r(e,e,t))return{value:e}},!0);return n&&n.value}});tu({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return B(db,this,dU(e))}});tu({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return B(dw,this,dU(e))}});tu({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return B(dS,this,dU(e))}});tu({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return B(dx,this,dU(e))}});var dK=I([].join),dV=I([].push);tu({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=f8(this),r=void 0===e?",":rz(e),n=[];return de(t,function(e){dV(n,e)}),dK(n,r)}});var dq=f7.Set,dH=f7.add;tu({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=f8(this),r=e2(e,arguments.length>1?arguments[1]:void 0),n=new dq;return de(t,function(e){dH(n,r(e,e,t))}),n}});var dG=TypeError;tu({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=f8(this),r=arguments.length<2,n=r?void 0:arguments[1];if(em(e),de(t,function(i){r?(r=!1,n=i):n=e(n,i,i,t)}),r)throw new dG("Reduce of empty set with no initial value");return n}});tu({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=f8(this),r=e2(e,arguments.length>1?arguments[1]:void 0);return!0===de(t,function(e){if(r(e,e,t))return!0},!0)}});tu({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return B(dE,this,dU(e))}});tu({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return B(dL,this,dU(e))}});var dW=v(dR),dY=["cdn"],dX=0,dQ=function(){function e(){sv(this,e);for(var t,r,n,i,a,o=arguments.length,u=Array(o),s=0;s<o;s++)u[s]=arguments[s];return sf((n=this,i=e,a=s8(t=[]).call(t,u),i=s_(i),r=sy(n,sm()?rf(i,a||[],s_(n).constructor):i.apply(n,a))),"_channel",void 0),sf(r,"appendList",function(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"cdn";e.speedListCache&&e.speedListCache[a]&&(e.speedListCache[a].length>=r.saveSpeedMax&&e.speedListCache[a].shift(),e.speedListCache[a].push({speed:t,bytes:n,time:i}),r._updateSpeed(a))}),sf(r,"_onChannelMessage",function(e){if("speedSample"===e.data.type){var t=e.data.data,n=t.speed,i=t.bytes,a=t.timestamp,o=t.type;r.appendList(8*n,i,a,o||"cdn")}}),sf(r,"_onChannelError",function(e){}),r}return sk(e,sP),sg(e,[{key:"saveSpeedMax",get:function(){var e,t=null===(e=this.config)||void 0===e?void 0:e.saveSpeedMax;return"number"==typeof t?t:20}},{key:"avgSpeed",get:function(){return dX},set:function(e){var t;dX=e,null===(t=this._channel)||void 0===t||t.postMessage({type:"speedAvg",data:{value:e}})}},{key:"afterPlayerInit",value:function(){var e=this.player._core;"undefined"!=typeof BroadcastChannel&&(this._channel=new BroadcastChannel(e._cfg.broadcastChannelName),this._channel.addEventListener("message",this._onChannelMessage),this._channel.addEventListener("error",this._onChannelError));var t=this.config.addSpeedTypeList;if(cp(t)){var r,n=f3(new dW(s8(r=[]).call(r,dY,f3(t))));dY.length=0,dY.push.apply(dY,f3(n))}this._initSpeedList()}},{key:"destroy",value:function(){this._channel&&(this._channel.removeEventListener("message",this._onChannelMessage),this._channel.removeEventListener("error",this._onChannelError),this._channel.close(),this._channel=void 0)}},{key:"getSpeedName",value:function(e,t){return e+"Speed"+t.toUpperCase()}},{key:"_updateSpeed",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cdn",r=e.getAvgSpeedKbs(t),n=this.player;if(n){var i=!1;if("cdn"===t)this.avgSpeed&&r===this.avgSpeed||(this.avgSpeed=r,i=!0);else{var a=this.getSpeedName("avg",t);this[a]&&r===this[a]||(this[a]=r,i=!0)}i&&n.emit("download_speed_change",{type:t,speed:r})}}},{key:"_initSpeedList",value:function(){cb(dY).call(dY,function(t){e.speedListCache[t]||(e.speedListCache[t]=[])})}}],[{key:"pluginName",get:function(){return"testspeed"}},{key:"speedSampleList",get:function(){return e.speedListCache}},{key:"getAvgSpeedKbs",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cdn";if(!e.speedListCache||!e.speedListCache[r]||e.speedListCache[r].length<=0)return -1;var n=0;return c_(t=e.speedListCache[r]).call(t,function(e){n+=e.speed}),Math.floor(n/e.speedListCache[r].length)}},{key:"getWeightedSpeedKbs",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cdn",n=-1;if(!e.speedListCache||!e.speedListCache[r]||e.speedListCache[r].length<=0)return n;var i=[];cb(t=e.speedListCache[r]).call(t,function(e){i.push(e)}),fU(i).call(i,function(e,t){return e.speed-t.speed});for(var a=i.length,o=0,u=0;u<a;u++)o+=i[u].bytes;o/=2;for(var s=0;s<a;s++)(o-=i[s].bytes)<=0&&(n=i[s].speed);return n<0?-1:n}}])}();sf(dQ,"speedListCache",{});var d$=((vo=d$||{})[vo.UNKNOWN=0]="UNKNOWN",vo[vo.USER_SELECT=1]="USER_SELECT",vo[vo.SR=2]="SR",vo[vo.BUFFER_INFO_ONLY_ONE_ITEM=3]="BUFFER_INFO_ONLY_ONE_ITEM",vo[vo.BUFFER_INFO_TARGET_NOT_FOUND=4]="BUFFER_INFO_TARGET_NOT_FOUND",vo[vo.BUFFER_INFO_FIND_ADAPT_BITRATE=5]="BUFFER_INFO_FIND_ADAPT_BITRATE",vo),dJ=sg(function e(){sv(this,e),sf(this,"type",0),sf(this,"reason","")});function dZ(e,t,r){return 1===r?function(e,t){if(!e)return null;for(var r=-1,n=0;n<e.length;n++){var i=e[n];if(i&&i._xgOrgBitrate&&t>=i._xgOrgBitrate){r=n;break}}return r<0?null:e[r]}(e,t):function(e,t){if(!e)return null;var r=1/0,n=null;return cb(e).call(e,function(e){var i=Math.abs(e._xgOrgBitrate-t);r>i&&(n=e,r=i)}),n||null}(e,t)}function d0(e,t){return cb(e).call(e,function(e){e[t]?e._xgOrgBitrate=e[t]:e.bitrate&&(e._xgOrgBitrate=e.bitrate)}),e}var d1=sg(function e(t){sv(this,e),sf(this,"analysis",void 0),sf(this,"_config",void 0),this._config=sC({},t)},[{key:"select",value:function(e,t,r){if(e.length<=1)return e[0];var n,i=r.autoBitrateParams,a=i.paramA,o=i.paramB,u=i.paramC,s=i.paramD;this._config=sC({},r);var c=this._config.defaultBitrate,l=t<=0||!t?c:a*Math.pow(t,3)+o*Math.pow(t,2)+u*t+s;return(n=dZ(e,l,r.selectAlgType))||(n=e[e.length-1]),n._targetBitrate=l,n}}]),d2=g.Function,d4=/MSIE .\./.test(ei)||"BUN"===aj&&((vu=g.Bun.version.split(".")).length<3||"0"===vu[0]&&(vu[1]<3||"3"===vu[1]&&"0"===vu[2])),d3=function(e,t){var r=t?2:1;return d4?function(n,i){var a=aG(arguments.length,1)>r,o=R(n)?n:d2(n),u=a?ts(arguments,r):[],s=a?function(){w(o,this,u)}:o;return t?e(s,i):e(s)}:e},d6=d3(g.setInterval,!0);tu({global:!0,bind:!0,forced:g.setInterval!==d6},{setInterval:d6});var d8=d3(g.setTimeout,!0);tu({global:!0,bind:!0,forced:g.setTimeout!==d8},{setTimeout:d8});var d5=J.setTimeout,d9=v(d5),d7=sg(function e(t){var r=this;sv(this,e),sf(this,"player",void 0),sf(this,"_timer",null),sf(this,"_prevPauseTime",0),sf(this,"_prevStallTime",0),sf(this,"_prevCurrentTime",0),sf(this,"_info",void 0),sf(this,"_onPlay",function(){r._calcPausedTime()}),sf(this,"_onPause",function(){r._prevPauseTime=s1()}),sf(this,"_onEnded",function(){!r._info.downloadDuration&&r._info.canPlayTime&&(r._info.downloadDuration=(s1()-r._info.canPlayTime)/1e3),r.disable()}),sf(this,"_canPlay",function(){r._info.canPlayTime=s1();var e,t=null===(e=r.player)||void 0===e?void 0:e.buffered;t&&t.length&&(r._info.startBufferTime=t.end(t.length-1))}),sf(this,"_onProgress",function(){var e=r.player;if(e){var t=e.buffered;r._info.canPlayTime&&t&&t.length&&t.end(t.length-1)+.8>e.duration&&(r._info.downloadDuration=(s1()-r._info.canPlayTime)/1e3)}}),sf(this,"_onTick",function(){var e=r.player;if(e){r._timer=d9(r._onTick,500);var t=e.currentTime;(!e.paused||e.ended||0===e.playbackRate||0===e.readyState)&&(r._prevCurrentTime===t?r._prevStallTime||(r._prevStallTime=s1()):r._calcStallTime()),r._prevCurrentTime=t}}),this.player=t,this.resetInfo(),this.enable()},[{key:"isStalling",get:function(){return!!this._prevStallTime}},{key:"destroy",value:function(){this.disable(),this.player=void 0}},{key:"enable",value:function(){this.disable();var e=this.player;e&&(e.on("play",this._onPlay),e.on("pause",this._onPause),e.on("canplay",this._canPlay),e.on("progress",this._onProgress),e.on("ended",this._onEnded),this._timer=d9(this._onTick,500))}},{key:"disable",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=null),this.resetInfo();var e=this.player;e&&(e.off("play",this._onPlay),e.off("pause",this._onPause),e.off("canplay",this._canPlay),e.off("progress",this._onProgress),e.off("ended",this._onEnded))}},{key:"endPlay",value:function(){if(this.player){var e=this.player.buffered;if(e.length)try{this._info.endBufferTime=e.end(e.length-1)}catch(e){}this._info.leaveWithBlock=this.isStalling,this._calcPausedTime(),this._calcStallTime(),!this._info.downloadDuration&&this._info.canPlayTime&&(this._info.downloadDuration=(s1()-this._info.canPlayTime)/1e3)}}},{key:"getInfo",value:function(){return this._info}},{key:"resetInfo",value:function(){this._prevPauseTime=0,this._prevStallTime=0,this._prevCurrentTime=0,this._info={pausedTime:0,stalledTime:0,downloadDuration:0,startBufferTime:0,endBufferTime:0,canPlayTime:0,leaveWithBlock:!1}}},{key:"_calcStallTime",value:function(){this._prevStallTime&&(this._info.stalledTime+=(s1()-this._prevStallTime)/1e3,this._prevStallTime=0)}},{key:"_calcPausedTime",value:function(){this._prevPauseTime&&(this._info.pausedTime+=(s1()-this._prevPauseTime)/1e3,this._prevPauseTime=0)}}]),he=v(f1),ht=sg(function e(){sv(this,e),sf(this,"_queue",[]),sf(this,"_current",{}),sf(this,"_config",{defaultTargetBitrate:1e6,paramBf:1e-6,paramBp:1e-6,paramUpperBl:1.2,paramUpper:1.2,paramLower:.5,slidingWindowWeight:"time",slidingWindowType:"by_weight",slidingWindowWeightThreshold:1e3,slidingWindowCountThreshold:10,paramVlLower:.8,paramVlUpper:.9,paramVl1:.8,paramVl2:1e3,bitrateLower:1e5,bitrateUpper:1e6,slidingWindowExtraction:"weighted_median"})},[{key:"queue",get:function(){return this._queue}},{key:"setConfig",value:function(e){sC(this._config,e||{})}},{key:"setCurrent",value:function(e){sC(this._current,e)}},{key:"getCurrent",value:function(){return this._current}},{key:"resetCurrent",value:function(){this._current={}}},{key:"calcAndReset",value:function(){var e=this._current,t=e.startBufferTime,r=e.duration,n=e.endBufferTime,i=e.leaveWithBlock,a=e.stalledTime,o=e.pausedTime,u=e.downloadDuration,s=e.bitrate;if(r&&s&&n){var c,l,f,d=this._config,h=d.paramBf,v=d.paramBp,p=d.paramUpperBl,g=d.paramUpper,y=d.slidingWindowWeight,m=d.slidingWindowType,_=d.slidingWindowWeightThreshold,b=d.slidingWindowCountThreshold,k=1+((n-t)*h-(a+o)*v)/u;i&&(k=Math.min(k,p));var w=s*Math.max(g,k),S=0;if(S="time"===y?Math.min(u,r+a):Math.min(u,r)*s,this._queue.push([w,S,this._current]),"by_weight"===m){this._queue=he(c=this._queue).call(c,-30);for(var T=cD(l=this._queue).call(l,function(e,t){return e+t[1]},0)-_;T>0;){var x=this._queue.shift();if(!x)break;if(x[1]>T){x[1]-=T,this._queue.unshift(x);break}T-=x[1]}}else this._queue=he(f=this._queue).call(f,-b);this.resetCurrent()}else this.resetCurrent()}},{key:"getDefaultBitrate",value:function(e){if(!e||0===e.length)return 0;for(var t=this._config.defaultTargetBitrate||1e6,r=0,n=0;n<e.length;n++)e[n]._xgOrgBitrate<=t&&e[n]._xgOrgBitrate>=r&&(r=e[n]._xgOrgBitrate);return r||(r=e[e.length-1]._xgOrgBitrate),r}},{key:"getTargetBitrate",value:function(e,t){if(!this._queue.length||!e)return 0;var r,n=this._config,i=n.paramVlLower,a=n.paramVlUpper,o=n.paramVl1,u=n.paramVl2,s=n.bitrateLower,c=n.bitrateUpper,l=n.slidingWindowExtraction,f=0,d=cD(h=this._queue).call(h,function(e,t){return e+t[1]},0);if("weighted_median"===l){var h,v,p=d/2,g=1/0,y=0;cb(v=this._queue).call(v,function(e){(y=Math.abs(p-e[1]))<g&&(f=e[0],g=y)})}else f=cD(r=this._queue).call(r,function(e,t){return e+t[1]/d*t[0]},0);return Math.max(s,Math.min(c,f*Math.min(a,Math.max(i,o+u/e))))}}]),hr="object"===("undefined"==typeof window?"undefined":uA(window))&&window.playerBitrateSelectorRuler?window.playerBitrateSelectorRuler:new ht;"object"!==("undefined"==typeof window?"undefined":uA(window))||window.playerBitrateSelectorRuler||(window.playerBitrateSelectorRuler=hr);var hn=sg(function e(t,r){var n=this;sv(this,e),sf(this,"analysis",void 0),sf(this,"_rule",void 0),sf(this,"_player",void 0),sf(this,"_playingInfo",void 0),sf(this,"_selectAlgType",void 0),sf(this,"_onEnded",function(){n._updateInfo()}),sf(this,"_onPlayNext",function(){n._updateInfo()}),this._player=t,this._rule=hr,this._selectAlgType=r.selectAlgType,this._playingInfo=t?new d7(t):void 0,this._rule.setConfig(r),this._bindEvent()},[{key:"select",value:function(e){if(!e.length)return null;var t,r=e[0].duration||0,n=null;1===e.length&&(n=e[0],this.analysis&&(this.analysis.type=d$.BUFFER_INFO_ONLY_ONE_ITEM));var i=0;return n||((i=this.getTargetBitrate(r,e))?(n=dZ(e,i,this._selectAlgType),this.analysis&&(this.analysis.type=d$.BUFFER_INFO_FIND_ADAPT_BITRATE,this.analysis.reason=s$({selectAlgType:this._selectAlgType,targetBitRate:i}))):(n=e[0],this.analysis&&(this.analysis.type=d$.BUFFER_INFO_TARGET_NOT_FOUND,this.analysis.reason=s$({duration:r,itemsLen:e.length,ruleQueueLen:hr.queue.length}))),n&&(n._targetBitrate=i)),hr.resetCurrent(),n&&hr.setCurrent({bitrate:n.bitrate,_xgOrgBitrate:n._xgOrgBitrate,duration:r}),null===(t=this._playingInfo)||void 0===t||t.enable(),n}},{key:"getTargetBitrate",value:function(e,t){return hr.getTargetBitrate(e,t)}},{key:"destroy",value:function(){var e;this._endPlay(),this._player&&(null===(e=this._playingInfo)||void 0===e||e.destroy(),this._player.off("ended",this._onEnded),this._player.off("playnext",this._onPlayNext))}},{key:"_bindEvent",value:function(){if(!this._player)return this._player;this._player.on("ended",this._onEnded),this._player.on("playnext",this._onPlayNext)}},{key:"_updateInfo",value:function(){if(this._playingInfo){this._playingInfo.endPlay();var e=this._playingInfo.getInfo();this._playingInfo.resetInfo(),hr.setCurrent({downloadDuration:e.downloadDuration||hr.getCurrent().duration,startBufferTime:e.startBufferTime,endBufferTime:e.endBufferTime,pausedTime:e.pausedTime,stalledTime:e.stalledTime,leaveWithBlock:e.leaveWithBlock})}hr.calcAndReset()}},{key:"_endPlay",value:function(){var e;this._updateInfo(),null===(e=this._playingInfo)||void 0===e||e.disable()}}]),hi=sg(function e(){sv(this,e),sf(this,"analysis",void 0)},[{key:"select",value:function(e,t,r){if(e.length<=1)return e[0];var n=r.autoBitrateParams,i=n.paramA,a=n.paramB,o=n.paramC,u=n.paramD,s=r.defaultBitrate,c=-1===t?s:i*Math.pow(t,3)+a*Math.pow(t,2)+o*t+u,l=null;return(l=dZ(e,c,r.selectAlgType)||null)||(l=e[e.length-1]),l._targetBitrate=c,l}}]),ha=20,ho=((vs=ho||{}).SIMPLE="simple",vs.BUFFER_INFO="buffer-info",vs.BANDWIDTH="bandwidth-buffer",vs),hu=((vc=hu||{}).AVG="avg",vc.WEIGHT="weight",vc),hs=sg(function e(t,r){var n,i=this;sv(this,e),sf(this,"config",e.defaultConfig),sf(this,"speed",0),sf(this,"_analysis",void 0),sf(this,"_selectorMap",void 0);var a=t.config||{};c_(n=cw(a)).call(n,function(e){i.config[e]=a[e]}),this._selectorMap=sf(sf(sf({},"simple",new hi),"buffer-info",new hn(r,this.config)),"bandwidth-buffer",new d1(this.config))},[{key:"analysis",get:function(){return this._analysis},set:function(e){var t,r=this;e&&(this._analysis=e,c_(t=cw(this._selectorMap)).call(t,function(t){r._selectorMap[t].analysis=e}))}},{key:"select",value:function(e,t,r){if(this.config.disabled)return null;t=t||this.config.mode;var n=this.config,i=n.bitrateRange,a=n.defaultBitrate,o=fU(u=cC(e=d0(e,n.bitrateKey)).call(e,function(e){return void 0===e._xgOrgBitrate||e._xgOrgBitrate>=i[0]&&e._xgOrgBitrate<=i[1]})).call(u,function(e,t){return"number"==typeof t._xgOrgBitrate&&"number"==typeof e._xgOrgBitrate?t._xgOrgBitrate-e._xgOrgBitrate:0});if(!o.length){var u,s,c=1/0;cb(e).call(e,function(e){var t=Math.abs(e._xgOrgBitrate-a);t<c&&(s=e,c=t)}),s&&o.push(s)}var l=(this._selectorMap[t]||this._selectorMap.simple).select(o,r,this.config);return l&&(l.filterRateCnt=(null==o?void 0:o.length)||0,l.isFilterMaxRate=function(e,t){if(null==e||!e.length||!t||!t._xgOrgBitrate)return -1;var r,n,i=e.length-1;return(null===(r=e[0])||void 0===r?void 0:r._xgOrgBitrate)>=(null===(n=e[e.length-1])||void 0===n?void 0:n._xgOrgBitrate)&&(i=0),e[i]._xgOrgBitrate<=t._xgOrgBitrate?1:0}(o,l)),l}},{key:"selector",get:function(){var e=this.config.mode;return this._selectorMap[e]||this._selectorMap.simple}},{key:"getTargetBitrate",value:function(e,t){var r=this.selector;if("getTargetBitrate"in r)return r.getTargetBitrate(e,t)}},{key:"addSelect",value:function(e,t){var r=e||t.name;this._selectorMap[r]=t}},{key:"destroy",value:function(){var e,t=this._selectorMap;cb(e=cw(t)).call(e,function(e){var r=t[e];"destroy"in r&&"function"==typeof r.destroy&&r.destroy()})}}],[{key:"defaultConfig",get:function(){return{disabled:!1,paramBf:.3,paramBp:.5,paramUpper:1.5,paramLower:.6,paramUpperBl:.7,paramVl1:.7,paramVl2:1e3,paramVlUpper:.9,paramVlLower:.8,bitrateUpper:2e6,bitrateLower:2e5,slidingWindowType:"by_weight",slidingWindowWeight:"size",slidingWindowWeightThreshold:3e5,slidingWindowCountThreshold:30,slidingWindowExtraction:"weighted_median",bitrateRange:[2e5,25e5],defaultBitrate:1e6,defaultTargetBitrate:1e6,autoBitrateParams:{paramA:0,paramB:404330129e-17,paramC:.0164405979,paramD:225511.28,minBitrate:2e5},mSpeedRecordValidThreshold:2,mode:"simple",needCheckDuration:!0,overscore:{isOpen:!1,type:"filter",enable266:!0,filterKey:"definition",filterList:[],scoreMultiple:2},bitrateKey:"bitrate"}}},{key:"MaxQueueCapacity",get:function(){return ha},set:function(e){ha=e}}]),hc=sg(function e(){var t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};sv(this,e),sf(this,"config",{size:30,severeBlockDuration:1500,slightBlockDuration:100,highBitrateRatio:1.5,lowBitrateRatio:.8,highLadderSelectedCnt:1,lowLadderSelectedCnt:1,blockSumMaxTime:6e5}),sf(this,"timerId",null),sf(this,"_tBQueue",[]),sf(this,"_sBQueue",[]),sf(this,"_blockQueue",[]),sf(this,"_info",{blockDurationSum:0,currentBlockDur:0,targetBitrateAvg:0,selectedBitrateAvg:0,higherSelectedCnt:0,lowerSelectedCnt:0}),c_(t=cw(n)).call(t,function(e){r.config[e]=n[e]||0}),this.setTimer()},[{key:"targetBitRate",set:function(e){var t;if(e&&"number"==typeof e){this._tBQueue.push(cX("".concat(e),10)),this._tBQueue.length>this.config.size&&this._tBQueue.shift();var r=0;c_(t=this._tBQueue).call(t,function(e){r+=e}),this._info.targetBitrateAvg=r/this._tBQueue.length}}},{key:"selectBitRate",set:function(e){var t;if(e&&"number"==typeof e){this._sBQueue.push(e),this._sBQueue.length>this.config.size&&this._sBQueue.shift();var r=0;c_(t=this._sBQueue).call(t,function(e){r+=e}),this._info.selectedBitrateAvg=r/this._sBQueue.length}}},{key:"blockDuration",set:function(e){this._blockQueue.push(e),this._blockQueue.length>this.config.size&&this._blockQueue.shift();var t,r=0;c_(t=this._blockQueue).call(t,function(e){r+=e}),this._info.blockDurationSum=r}},{key:"currentBlockDur",set:function(e){this._info.currentBlockDur+=e}},{key:"updateBitRateInfo",value:function(e,t){e&&t&&(e>t?this._info.higherSelectedCnt++:e<t&&this._info.lowerSelectedCnt++)}},{key:"checkDefinition",value:function(){var e=this.config,t=this._info;return t.blockDurationSum>e.severeBlockDuration&&(t.selectedBitrateAvg>t.targetBitrateAvg*e.highBitrateRatio&&t.higherSelectedCnt>=e.highLadderSelectedCnt||t.currentBlockDur>e.severeBlockDuration)?1:t.blockDurationSum<e.slightBlockDuration&&t.selectedBitrateAvg<t.targetBitrateAvg*e.lowBitrateRatio&&t.lowerSelectedCnt>=e.lowLadderSelectedCnt?2:0}},{key:"setConfig",value:function(){var e,t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c_(e=cw(r)).call(e,function(e){t.config[e]=r[e]||0})}},{key:"resetCurrent",value:function(){this._info.currentBlockDur=0}},{key:"setTimer",value:function(){var e=this;this._blockQueue=[],this._tBQueue=[],this._sBQueue=[],this._info={blockDurationSum:0,currentBlockDur:0,targetBitrateAvg:0,selectedBitrateAvg:0,higherSelectedCnt:0,lowerSelectedCnt:0},this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.timerId=d9(function(){e.setTimer()},this.config.blockSumMaxTime)}}]),hl=new hc({}),hf=null,hd=null,hh={needCheckDuration:!0};function hv(e){var t=0,r=e.speedAlgoType;return r&&r!==hu.AVG?r===hu.WEIGHT&&(t=dQ.getWeightedSpeedKbs()):t=dQ.getAvgSpeedKbs(),t}function hp(e,t){var r,n,i=t.userDefinition,a=t.config,o=t.bitrateAdapter,u=new dJ;if(y=[],cb(g=e).call(g,function(e){e.mediaType&&"video"!==e.mediaType||y.push(e)}),e=y,a.disabled||!e||e.length<1)return null;var s=d0(e,a.bitrateKey),c=fU(s).call(s,function(e,t){return"number"==typeof t._xgOrgBitrate&&"number"==typeof e._xgOrgBitrate?t._xgOrgBitrate-e._xgOrgBitrate:0}),l=1024*hv(a),f=null;if(o||(hf||(hf=new hs({config:a})),o=hf),o.analysis=u,c&&c.length&&(f=o.select(c,a.mode,l))&&a.mode===ho.BANDWIDTH){var d=f._targetBitrate||f._xgOrgBitrate,h=null;if(!l||l<0||1!==a.mixFactor){var v=sC({},a);v.mode=ho.BUFFER_INFO;var p=new hs({config:v});"number"==typeof l&&l>0&&(p.speed=l),h=null==p?void 0:p.select(s,v.mode,l)}if(h){var g,y,m,_=h._targetBitrate||h._xgOrgBitrate;(f=dZ(s,m=!l||l<0?_:a&&"number"==typeof a.mixFactor&&a.mixFactor>=0&&a.mixFactor<=1?d*a.mixFactor+_*(1-a.mixFactor):a&&"number"==typeof a.mixFactor&&a.mixFactor>1?Math.max(d,_):Math.min(d,_),a.selectAlgType))||(f=e[e.length-1]),f._targetBitrate=m}}f&&(f.type=fH.BITRATE_ADAPTER);var b=(null===(r=f)||void 0===r?void 0:r.duration)||0,k=null===(n=o)||void 0===n?void 0:n.getTargetBitrate(b,e);if(k&&(hl.targetBitRate=k),i){var w=hg.getUserSelectBitrate(c,i);w&&(hl.selectBitRate=w._xgOrgBitrate,hl.updateBitRateInfo(w._xgOrgBitrate,k),f=w,u.type=d$.USER_SELECT)}if(a.overscore&&a.overscore.isOpen&&f){var S=function(e,t,r){var n=r.isOpen,i=r.enable266,a=r.filterKey,o=r.filterList,u=r.scoreMultiple,s=r.type;if(!n)return e;var c=null;return"filter"===s?c=function(e,t,r,n){var i=null;if(cb(r).call(r,function(r){r.source===t[e]&&(i=r)}),!i)return null;for(var a=null,o=function(t){var r;if(cb(r=i.target).call(r,function(r){n[t][e]===r&&(a=n[t])}),a)return 1},u=0;u<n.length&&!o(u);u++);return a}(a,e,o,t):"multiple"===s&&(c=function(e,t,r){if(!e)return null;for(var n=-1,i=0;i<r.length;i++)if(t.definition===r[i].definition){n=i;break}return n>-1&&n<r.length-1?r[n+e>r.length-1?r.length-1:n+e]:null}(u,e,t)),c&&(!c.isH266||i)?(c.type=fH.OVER_SCORE,c.fromType=e.type,c.orgDefinition=e.definition,c):e}(f,c,a.overscore);u.type=d$.SR,f=S}return f&&(f.chosenType=u.type,f.chosenReason=u.reason),f}var hg=function(){function e(t){var r,n,i,a;return sv(this,e),sf((n=this,i=e,a=[t],i=s_(i),r=sy(n,sm()?rf(i,a||[],s_(n).constructor):i.apply(n,a))),"bitRateAdapter",void 0),sf(r,"curBitRate",void 0),sf(r,"_onXLog",function(e){"waitingEnd"===e.eventType&&0===e.type&&(hl.blockDuration=e.costTime,r.player.isUserActive&&(hl.currentBlockDur=e.costTime))}),e.defaultConfig=r.config,r}return sk(e,sP),sg(e,[{key:"detectDefInfo",get:function(){return hl}},{key:"beforeDestroy",value:function(){this.destroy()}},{key:"destroy",value:function(){var e,t;null===(e=this.player)||void 0===e||e.off("xglog",this._onXLog),null===(t=this.bitRateAdapter)||void 0===t||t.destroy(),this.bitRateAdapter=void 0,null==hl||hl.resetCurrent()}},{key:"beforePlayerInit",value:function(){var e=this.player,t=this.config,r=t.multiFactors;(null==r?void 0:r.length)>0&&this.updateParamsByFactor(r),this._bindEvent(),this.bitRateAdapter=new hs({config:t},e),hf||(hf=new hs({config:t})),hl.setConfig(t.detectConfig||{}),hl.resetCurrent();var n=this.getInitBitrate();this.curBitRate=n,fz(e,n)}},{key:"updateParamsByFactor",value:function(e){for(var t,r=this,n=this.playerConfig.mediaInfo||this.playerConfig,i=(this.playerConfig.baseConfig||n).codecType,a=n.videoHeight,o=n.videoWidth,u=0|navigator.deviceMemory,s=0|navigator.hardwareConcurrency,c=null,l={codecType:i,videoHeight:a,videoWidth:o,memory:u,core:s},f=0;f<e.length;f++){for(var d=e[f].factor||{},h=cw(d),v=!0,p=0;p<h.length;p++)if(!this.matchFactor(h[p],d[h[p]],l)){v=!1;break}if(v){c=e[f].config;break}}c&&cb(t=cw(c)).call(t,function(e){r.config[e]=c[e]})}},{key:"getInitBitrate",value:function(){if(!this.config.disabled&&!1!==this.config.enable){var e=this.player,t=this.playerConfig,r=null;try{r=e.definitionList}catch(e){}var n=(t.shared||t).definition,i=r||(null==n?void 0:n.list)||[],a=(n||{}).userSelectDefinition;hd=a;var o,u,s,c,l,f=this.getSuitableBitrate(i,a);return!f&&(f={url:cp(null===(o=t.baseConfig)||void 0===o?void 0:o.urlList)&&(null===(u=t.baseConfig)||void 0===u?void 0:u.urlList.length)>0?null===(s=t.baseConfig)||void 0===s?void 0:s.urlList:(null===(c=t.baseConfig)||void 0===c?void 0:c.url)||t.url,definition:(null==n?void 0:n.defaultDefinition)||t.defaultDefinition||-1,bitrate:(n||t).defaultBitrate||((null===(l=t.baseConfig)||void 0===l?void 0:l.mediaInfo)||t).bitrate||-1,type:fH.DEFAULT}),f&&(f.networkSpeed=this.getSpeed()),f||void 0}}},{key:"getSuitableBitrate",value:function(e,t){if(this.bitRateAdapter)return hp(e,{config:this.config,bitrateAdapter:this.bitRateAdapter,userDefinition:t})}},{key:"getAdaptBitrate",value:function(e,t){var r,n=null,i=this.bitRateAdapter,a=this.config;return a.disabled||!i||(cp(e=fU(r=d0(e,a.bitrateKey)).call(r,function(e,t){return"number"==typeof e._xgOrgBitrate&&"number"==typeof t._xgOrgBitrate?t._xgOrgBitrate-e._xgOrgBitrate:0}))&&e.length&&(i.speed=t,n=i.select(e,a.mode,t)),n&&(n.type=fH.BITRATE_ADAPTER)),n}},{key:"getDefinition",value:function(e,t,r){for(var n=-1,i=0;i<e.length;i++)e[i]._xgOrgBitrate===t&&(n=i);return -1===n?null:r&&e.length>n+1?e[n+1]:!r&&n-1>=0?e[n-1]:null}},{key:"needChangeDefinition",value:function(){var t,r,n,i,a=this.playerConfig,o=this.player,u=[];try{i=o.curDefinition,u=(null===(t=a.shared)||void 0===t||null===(t=t.definition)||void 0===t?void 0:t.list)||o.definitionList}catch(e){}var s=(null===(r=a.shared)||void 0===r||null===(r=r.definition)||void 0===r?void 0:r.userSelectDefinition)||a.userSelectDefinition,c=(null===(n=a.shared)||void 0===n||null===(n=n.definition)||void 0===n?void 0:n.extDefinition)||a.extDefinition,l=cp(c)&&c.length>0?c:u||[],f={type:0,message:"DO_NOT_UPDATE",targetDefinition:null};if(!s||l.length<2)return f;var d=i;s&&(d=e.getUserSelectBitrate(l,s));var h=hl.checkDefinition();f.type=h;var v=1024*this.getSpeed(),p=this.getAdaptBitrate(l,v);if(!(p&&0!==h&&p&&p._xgOrgBitrate&&d&&d._xgOrgBitrate))return f.message="DO_NOT_UPDATE",f;var g=p._xgOrgBitrate>=d._xgOrgBitrate,y=p._xgOrgBitrate<d._xgOrgBitrate,m=null;switch(1===h?m=g?this.getDefinition(l,d._xgOrgBitrate,!0):p:2===h&&(m=y?this.getDefinition(l,d._xgOrgBitrate,!1):p),f.targetDefinition=m,f.targetDefinition&&f.targetDefinition.definition!==s||(f.type=0),f.type){case 1:f.message="NEED_TO_REDUCE_BITRATE";break;case 2:f.message="CAN_UPGRADE_BITRATE";break;default:f.message="DO_NOT_UPDATE"}return f}},{key:"_bindEvent",value:function(){this.player.on("xglog",this._onXLog)}},{key:"matchFactor",value:function(e,t,r){var n,i,a,o,u="Array"===(n=t,(i=Object.prototype.toString.call(n).match(/([^\s.*]+)(?=]$)/g))?i[0]:"")?t:[],s=!1;switch(e){case"core_cnt":r.core&&u.length>1&&r.core>=Number(u[0])&&r.core<=Number(u[1])&&(s=!0);break;case"memory":r.memory&&u.length>1&&r.memory>=Number(u[0])&&r.memory<=Number(u[1])&&(s=!0);break;case"video_screen_mode":;u.length>0&&"landscape"===u[0]&&(a=r.videoHeight,o=r.videoWidth,a&&o&&o>a)&&(s=!0);break;case"encoder":u.length>0&&u[0]&&r.codecType&&u[0]===r.codecType&&(s=!0)}return s}},{key:"getSpeed",value:function(){return hv(this.config)}}],[{key:"pluginName",get:function(){return"BitrateSelector"}},{key:"defaultConfig",get:function(){return sC({needCheckDuration:!0},hh)},set:function(e){var t;cb(t=cw(e)).call(t,function(t){hh[t]=e[t]})}},{key:"getSuitableBitrate",value:function(t,r,n){return n||(n=e.defaultConfig),n=sC(n,hh),r||(r=hd),hp(t,{userDefinition:r,config:n})}},{key:"getUserSelectBitrate",value:function(e,t){if(t&&e&&e.length>0){for(var r=null,n=null,i=0;i<e.length;i++){if(t===e[i].definition){r=e[i];break}!n&&t<e[i].definition&&(n=e[i])}return r||(r=n||e[e.length-1]),r.type=fH.USER_SELECT,r}return null}}])}(),hy=ns.findIndex,hm="findIndex",h_=!0;hm in[]&&[,][hm](function(){h_=!1}),tu({target:"Array",proto:!0,forced:h_},{findIndex:function(e){return hy(this,e,arguments.length>1?arguments[1]:void 0)}});var hb=rw("Array","findIndex"),hk=Array.prototype,hw=v(function(e){var t=e.findIndex;return e===hk||et(hk,e)&&t===hk.findIndex?hb:t}),hS=((vl=hS||{})[vl.DURATION=0]="DURATION",vl[vl.SIZE=1]="SIZE",vl),hT=((vf=hT||{})[vf.INDEXDB=0]="INDEXDB",vf[vf.MEMORY=1]="MEMORY",vf),hx=((vd=hx||{}).PRELOAD_NEXT="PRELOAD_NEXT",vd.PRELOAD_START="PRELOAD_START",vd.PRELOAD_CANCEL="PRELOAD_CANCEL",vd),hI=v(n9),hC=v(ay),hP=v(i4),hE=v(i1),hO=v(ry),hL=v(i$),hR=v(uF),hA=v(u$),hD=v(se),hM=v(so),hB=v(ss),hj=v(uL);function hN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function hU(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):cS.resolve(s).then(n,i)}function hF(e){return function(){var t=this,r=arguments;return new cS(function(n,i){var a=e.apply(t,r);function o(e){hU(a,n,i,o,u,"next",e)}function u(e){hU(a,n,i,o,u,"throw",e)}o(void 0)})}}function hz(e,t,r){return t=hW(t),function(e,t){if(t&&("object"==uA(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,hX()?rf(t,r||[],hW(e).constructor):t.apply(e,r))}function hK(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function hV(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),ck(e,h1(n.key),n)}}function hq(e,t,r){return t&&hV(e.prototype,t),r&&hV(e,r),ck(e,"prototype",{writable:!1}),e}function hH(e,t){var r=void 0!==hI&&hC(e)||e["@@iterator"];if(!r){if(cp(e)||(r=h4(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function hG(e,t,r){return(t=h1(t))in e?ck(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hW(e){return(hW=hP?hE(hO).call(hO):function(e){return e.__proto__||hO(e)})(e)}function hY(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=hL(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),ck(e,"prototype",{writable:!1}),t&&h0(e,t)}function hX(){try{var e=!Boolean.prototype.valueOf.call(rf(Boolean,[],function(){}))}catch(e){}return(hX=function(){return!!e})()}function hQ(e,t){var r=cw(e);if(hR){var n=hR(e);t&&(n=cC(n).call(n,function(t){return hA(e,t).enumerable})),r.push.apply(r,n)}return r}function h$(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cb(r=hQ(Object(i),!0)).call(r,function(t){hG(e,t,i[t])}):hD?hM(e,hD(i)):cb(n=hQ(Object(i))).call(n,function(t){ck(e,t,hA(i,t))})}return e}function hJ(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==lf(t).call(t,n))continue;r[n]=e[n]}return r}(e,t);if(hR){var a=hR(e);for(n=0;n<a.length;n++)r=a[n],-1===lf(t).call(t,r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hZ(){hZ=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=ck||function(e,t,r){e[t]=r.value},a="function"==typeof hI?hI:{},o=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return ck(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(t,r,n,a){var o=hL((r&&r.prototype instanceof g?r:g).prototype);return i(o,"_invoke",{value:function(t,r,n){var i=d;return function(a,o){if(i===h)throw Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var u=n.delegate;if(u){var s=function t(r,n){var i=n.method,a=r.iterator[i];if(a===e)return n.delegate=null,"throw"===i&&r.iterator.return&&(n.method="return",n.arg=e,t(r,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=TypeError("The iterator does not provide a '"+i+"' method")),p;var o=f(a,r.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var u=o.arg;return u?u.done?(n[r.resultName]=u.value,n.next=r.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):u:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,p)}(u,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?v:"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}(t,n,new I(a||[]))}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var d="suspendedStart",h="executing",v="completed",p={};function g(){}function y(){}function m(){}var _={};c(_,o,function(){return this});var b=hO&&hO(hO(C([])));b&&b!==r&&n.call(b,o)&&(_=b);var k=m.prototype=g.prototype=hL(_);function w(e){var t;cb(t=["next","throw","return"]).call(t,function(t){c(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){var r;i(this,"_invoke",{value:function(i,a){function o(){return new t(function(r,o){!function r(i,a,o,u){var s=f(e[i],e,a);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==uA(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,o,u)},function(e){r("throw",e,o,u)}):t.resolve(l).then(function(e){c.value=e,o(c)},function(e){return r("throw",e,o,u)})}u(s.arg)}(i,a,r,o)})}return r=r?r.then(o,o):o()}})}function T(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],cb(e).call(e,T,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw TypeError(uA(t)+" is not iterable")}return y.prototype=m,i(k,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:y,configurable:!0}),y.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return hP?hP(e,m):(e.__proto__=m,c(e,s,"GeneratorFunction")),e.prototype=hL(k),e},t.awrap=function(e){return{__await:e}},w(S.prototype),c(S.prototype,u,function(){return this}),t.AsyncIterator=S,t.async=function(e,r,n,i,a){void 0===a&&(a=cS);var o=new S(l(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},w(k),c(k,s,"Generator"),c(k,o,function(){return this}),c(k,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return lm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=C,I.prototype={constructor:I,reset:function(t){var r;if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,cb(r=this.tryEntries).call(r,x),!t)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+he(i).call(i,1))&&(this[i]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return u.type="throw",u.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(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 a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}function h0(e,t){return(h0=hP?hE(hP).call(hP):function(e,t){return e.__proto__=t,e})(e,t)}function h1(e){var t=function(e,t){if("object"!=uA(e)||!e)return e;var r=e[hB];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uA(t)?t:t+""}function h2(e){return(h2="function"==typeof hI&&"symbol"==typeof hj?function(e){return typeof e}:function(e){return e&&"function"==typeof hI&&e.constructor===hI&&e!==hI.prototype?"symbol":typeof e})(e)}function h4(e,t){if(e){if("string"==typeof e)return hN(e,t);var r,n=he(r=({}).toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?fw(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hN(e,t):void 0}}var h3=function(e){return e&&e.Math==Math&&e},h6=h3("object"==typeof globalThis&&globalThis)||h3("object"==typeof window&&window)||h3("object"==typeof self&&self)||h3("object"==typeof h&&h)||function(){return this}()||Function("return this")(),h8={exports:{}},h5=Object.defineProperty,h9=function(e,t){try{h5(h6,e,{value:t,configurable:!0,writable:!0})}catch(r){h6[e]=t}return t},h7="__core-js_shared__",ve=h6[h7]||h9(h7,{});(h8.exports=function(e,t){return ve[e]||(ve[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xa9 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 vt,vr,vn,vi,va,vo,vu,vs,vc,vl,vf,vd,vh,vv,vp=h8.exports,vg=function(e){try{return!!e()}catch(e){return!0}},vy=!vg(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),vm=Function.prototype,v_=vm.call,vb=vy&&vm.bind.bind(v_,v_),vk=vy?vb:function(e){return function(){return v_.apply(e,arguments)}},vw=function(e){return null==e},vS=TypeError,vT=function(e){if(vw(e))throw vS("Can't call method on "+e);return e},vx=Object,vI=function(e){return vx(vT(e))},vC=vk({}.hasOwnProperty),vP=Object.hasOwn||function(e,t){return vC(vI(e),t)},vE=0,vO=Math.random(),vL=vk(1..toString),vR=function(e){return"Symbol("+(void 0===e?"":e)+")_"+vL(++vE+vO,36)},vA="object"==typeof document&&document.all,vD={all:vA,IS_HTMLDDA:void 0===vA&&void 0!==vA},vM=vD.all,vB=vD.IS_HTMLDDA?function(e){return"function"==typeof e||e===vM}:function(e){return"function"==typeof e},vj=function(e,t){var r;return arguments.length<2?vB(r=h6[e])?r:void 0:h6[e]&&h6[e][t]},vN=vj("navigator","userAgent")||"",vU=h6.process,vF=h6.Deno,vz=vU&&vU.versions||vF&&vF.version,vK=vz&&vz.v8;vK&&(vv=(vh=vK.split("."))[0]>0&&vh[0]<4?1:+(vh[0]+vh[1])),!vv&&vN&&(!(vh=vN.match(/Edge\/(\d+)/))||vh[1]>=74)&&(vh=vN.match(/Chrome\/(\d+)/))&&(vv=+vh[1]);var vV=vv,vq=!!Object.getOwnPropertySymbols&&!vg(function(){var e=Symbol();return!String(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&vV&&vV<41}),vH=vq&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,vG=vp("wks"),vW=h6.Symbol,vY=vW&&vW.for,vX=vH?vW:vW&&vW.withoutSetter||vR,vQ=function(e){if(!vP(vG,e)||!vq&&"string"!=typeof vG[e]){var t="Symbol."+e;vq&&vP(vW,e)?vG[e]=vW[e]:vG[e]=vH&&vY?vY(t):vX(t)}return vG[e]},v$=vQ("toStringTag"),vJ={};vJ[v$]="z";var vZ="[object z]"===String(vJ),v0={},v1=!vg(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),v2=vD.all,v4=vD.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:vB(e)||e===v2}:function(e){return"object"==typeof e?null!==e:vB(e)},v3=h6.document,v6=v4(v3)&&v4(v3.createElement),v8=function(e){return v6?v3.createElement(e):{}},v5=!v1&&!vg(function(){return 7!=Object.defineProperty(v8("div"),"a",{get:function(){return 7}}).a}),v9=v1&&vg(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),v7=String,pe=TypeError,pt=function(e){if(v4(e))return e;throw pe(v7(e)+" is not an object")},pr=Function.prototype.call,pn=vy?pr.bind(pr):function(){return pr.apply(pr,arguments)},pi=vk({}.isPrototypeOf),pa=Object,po=vH?function(e){return"symbol"==typeof e}:function(e){var t=vj("Symbol");return vB(t)&&pi(t.prototype,pa(e))},pu=String,ps=function(e){try{return pu(e)}catch(e){return"Object"}},pc=TypeError,pl=function(e){if(vB(e))return e;throw pc(ps(e)+" is not a function")},pf=function(e,t){var r=e[t];return vw(r)?void 0:pl(r)},pd=TypeError,ph=function(e,t){var r,n;if("string"===t&&vB(r=e.toString)&&!v4(n=pn(r,e))||vB(r=e.valueOf)&&!v4(n=pn(r,e))||"string"!==t&&vB(r=e.toString)&&!v4(n=pn(r,e)))return n;throw pd("Can't convert object to primitive value")},pv=TypeError,pp=vQ("toPrimitive"),pg=function(e,t){if(!v4(e)||po(e))return e;var r,n=pf(e,pp);if(n){if(void 0===t&&(t="default"),!v4(r=pn(n,e,t))||po(r))return r;throw pv("Can't convert object to primitive value")}return void 0===t&&(t="number"),ph(e,t)},py=function(e){var t=pg(e,"string");return po(t)?t:t+""},pm=TypeError,p_=Object.defineProperty,pb=Object.getOwnPropertyDescriptor,pk="enumerable",pw="configurable",pS="writable";v0.f=v1?v9?function(e,t,r){if(pt(e),t=py(t),pt(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pS in r&&!r[pS]){var n=pb(e,t);n&&n[pS]&&(e[t]=r.value,r={configurable:pw in r?r[pw]:n[pw],enumerable:pk in r?r[pk]:n[pk],writable:!1})}return p_(e,t,r)}:p_:function(e,t,r){if(pt(e),t=py(t),pt(r),v5)try{return p_(e,t,r)}catch(e){}if("get"in r||"set"in r)throw pm("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var pT={exports:{}},px=Function.prototype,pI=v1&&Object.getOwnPropertyDescriptor,pC=vP(px,"name"),pP=pC&&(!v1||v1&&pI(px,"name").configurable),pE={EXISTS:pC,PROPER:pC&&"something"===(function(){}).name,CONFIGURABLE:pP},pO=vk(Function.toString);vB(ve.inspectSource)||(ve.inspectSource=function(e){return pO(e)});var pL,pR,pA,pD=ve.inspectSource,pM=h6.WeakMap,pB=vB(pM)&&/native code/.test(String(pM)),pj=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},pN=v1?function(e,t,r){return v0.f(e,t,pj(1,r))}:function(e,t,r){return e[t]=r,e},pU=vp("keys"),pF=function(e){return pU[e]||(pU[e]=vR(e))},pz={},pK="Object already initialized",pV=h6.TypeError,pq=h6.WeakMap;if(pB||ve.state){var pH=ve.state||(ve.state=new pq);pH.get=pH.get,pH.has=pH.has,pH.set=pH.set,pL=function(e,t){if(pH.has(e))throw pV(pK);return t.facade=e,pH.set(e,t),t},pR=function(e){return pH.get(e)||{}},pA=function(e){return pH.has(e)}}else{var pG=pF("state");pz[pG]=!0,pL=function(e,t){if(vP(e,pG))throw pV(pK);return t.facade=e,pN(e,pG,t),t},pR=function(e){return vP(e,pG)?e[pG]:{}},pA=function(e){return vP(e,pG)}}var pW={set:pL,get:pR,has:pA,enforce:function(e){return pA(e)?pR(e):pL(e,{})},getterFor:function(e){return function(t){var r;if(!v4(t)||(r=pR(t)).type!==e)throw pV("Incompatible receiver, "+e+" required");return r}}},pY=pE.CONFIGURABLE,pX=pW.enforce,pQ=pW.get,p$=Object.defineProperty,pJ=v1&&!vg(function(){return 8!==p$(function(){},"length",{value:8}).length}),pZ=String(String).split("String"),p0=pT.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!vP(e,"name")||pY&&e.name!==t)&&(v1?p$(e,"name",{value:t,configurable:!0}):e.name=t),pJ&&r&&vP(r,"arity")&&e.length!==r.arity&&p$(e,"length",{value:r.arity});try{r&&vP(r,"constructor")&&r.constructor?v1&&p$(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=pX(e);return vP(n,"source")||(n.source=pZ.join("string"==typeof t?t:"")),e};Function.prototype.toString=p0(function(){return vB(this)&&pQ(this).source||pD(this)},"toString");var p1=pT.exports,p2=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(vB(r)&&p1(r,a,n),n.global)i?e[t]=r:h9(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:v0.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},p4=vk({}.toString),p3=vk("".slice),p6=function(e){return p3(p4(e),8,-1)},p8=vQ("toStringTag"),p5=Object,p9="Arguments"==p6(function(){return arguments}()),p7=function(e,t){try{return e[t]}catch(e){}},ge=vZ?p6:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=p7(t=p5(e),p8))?r:p9?p6(t):"Object"==(n=p6(t))&&vB(t.callee)?"Arguments":n};vZ||p2(Object.prototype,"toString",vZ?({}).toString:function(){return"[object "+ge(this)+"]"},{unsafe:!0});var gt={},gr={},gn={}.propertyIsEnumerable,gi=Object.getOwnPropertyDescriptor,ga=gi&&!gn.call({1:2},1);gr.f=ga?function(e){var t=gi(this,e);return!!t&&t.enumerable}:gn;var go=Object,gu=vk("".split),gs=vg(function(){return!go("z").propertyIsEnumerable(0)})?function(e){return"String"==p6(e)?gu(e,""):go(e)}:go,gc=function(e){return gs(vT(e))},gl=Object.getOwnPropertyDescriptor;gt.f=v1?gl:function(e,t){if(e=gc(e),t=py(t),v5)try{return gl(e,t)}catch(e){}if(vP(e,t))return pj(!pn(gr.f,e,t),e[t])};var gf={},gd=Math.ceil,gh=Math.floor,gv=Math.trunc||function(e){var t=+e;return(t>0?gh:gd)(t)},gp=function(e){var t=+e;return t!=t||0===t?0:gv(t)},gg=Math.max,gy=Math.min,gm=function(e,t){var r=gp(e);return r<0?gg(r+t,0):gy(r,t)},g_=Math.min,gb=function(e){return e>0?g_(gp(e),9007199254740991):0},gk=function(e){return gb(e.length)},gw=function(e){return function(t,r,n){var i,a=gc(t),o=gk(a),u=gm(n,o);if(e&&r!=r){for(;o>u;)if((i=a[u++])!=i)return!0}else for(;o>u;u++)if((e||u in a)&&a[u]===r)return e||u||0;return!e&&-1}},gS={includes:gw(!0),indexOf:gw(!1)},gT=gS.indexOf,gx=vk([].push),gI=function(e,t){var r,n=gc(e),i=0,a=[];for(r in n)!vP(pz,r)&&vP(n,r)&&gx(a,r);for(;t.length>i;)vP(n,r=t[i++])&&(~gT(a,r)||gx(a,r));return a},gC=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gP=gC.concat("length","prototype");gf.f=Object.getOwnPropertyNames||function(e){return gI(e,gP)};var gE={};gE.f=Object.getOwnPropertySymbols;var gO=vk([].concat),gL=vj("Reflect","ownKeys")||function(e){var t=gf.f(pt(e)),r=gE.f;return r?gO(t,r(e)):t},gR=/#|\.prototype\./,gA=function(e,t){var r=gM[gD(e)];return r==gj||r!=gB&&(vB(t)?vg(t):!!t)},gD=gA.normalize=function(e){return String(e).replace(gR,".").toLowerCase()},gM=gA.data={},gB=gA.NATIVE="N",gj=gA.POLYFILL="P",gN=gt.f,gU=function(e,t,r){for(var n=gL(t),i=v0.f,a=gt.f,o=0;o<n.length;o++){var u=n[o];vP(e,u)||r&&vP(r,u)||i(e,u,a(t,u))}},gF=function(e,t){var r,n,i,a,o,u=e.target,s=e.global,c=e.stat;if(r=s?h6:c?h6[u]||h9(u,{}):(h6[u]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=gN(r,n))&&o.value:r[n],!gA(s?n:u+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;gU(a,i)}(e.sham||i&&i.sham)&&pN(a,"sham",!0),p2(r,n,a,e)}},gz="process"==p6(h6.process),gK=String,gV=TypeError,gq=function(e){if("object"==typeof e||vB(e))return e;throw gV("Can't set "+gK(e)+" as a prototype")},gH=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=vk(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return pt(r),gq(n),t?e(r,n):r.__proto__=n,r}}():void 0),gG=v0.f,gW=vQ("toStringTag"),gY=function(e,t,r){e&&!r&&(e=e.prototype),e&&!vP(e,gW)&&gG(e,gW,{configurable:!0,value:t})},gX=vQ("species"),gQ=function(e){var t=vj(e),r=v0.f;v1&&t&&!t[gX]&&r(t,gX,{configurable:!0,get:function(){return this}})},g$=TypeError,gJ=function(e,t){if(pi(t,e))return e;throw g$("Incorrect invocation")},gZ=function(){},g0=[],g1=vj("Reflect","construct"),g2=/^\s*(?:class|function)\b/,g4=vk(g2.exec),g3=!g2.exec(gZ),g6=function(e){if(!vB(e))return!1;try{return g1(gZ,g0,e),!0}catch(e){return!1}},g8=function(e){if(!vB(e))return!1;switch(ge(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g3||!!g4(g2,pD(e))}catch(e){return!0}};g8.sham=!0;var g5,g9,g7,ye,yt=!g1||vg(function(){var e;return g6(g6.call)||!g6(Object)||!g6(function(){e=!0})||e})?g8:g6,yr=TypeError,yn=function(e){if(yt(e))return e;throw yr(ps(e)+" is not a constructor")},yi=vQ("species"),ya=function(e,t){var r,n=pt(e).constructor;return void 0===n||vw(r=pt(n)[yi])?t:yn(r)},yo=Function.prototype,yu=yo.apply,ys=yo.call,yc="object"==typeof Reflect&&Reflect.apply||(vy?ys.bind(yu):function(){return ys.apply(yu,arguments)}),yl=function(e){if("Function"===p6(e))return vk(e)},yf=yl(yl.bind),yd=function(e,t){return pl(e),void 0===t?e:vy?yf(e,t):function(){return e.apply(t,arguments)}},yh=vj("document","documentElement"),yv=vk([].slice),yp=TypeError,yg=/(?:ipad|iphone|ipod).*applewebkit/i.test(vN),yy=function(e,t){if(e<t)throw yp("Not enough arguments");return e},ym=h6.setImmediate,y_=h6.clearImmediate,yb=h6.process,yk=h6.Dispatch,yw=h6.Function,yS=h6.MessageChannel,yT=h6.String,yx=0,yI={},yC="onreadystatechange";try{g5=h6.location}catch(e){}var yP=function(e){if(vP(yI,e)){var t=yI[e];delete yI[e],t()}},yE=function(e){return function(){yP(e)}},yO=function(e){yP(e.data)},yL=function(e){h6.postMessage(yT(e),g5.protocol+"//"+g5.host)};ym&&y_||(ym=function(e){yy(arguments.length,1);var t=vB(e)?e:yw(e),r=yv(arguments,1);return yI[++yx]=function(){yc(t,void 0,r)},g9(yx),yx},y_=function(e){delete yI[e]},gz?g9=function(e){yb.nextTick(yE(e))}:yk&&yk.now?g9=function(e){yk.now(yE(e))}:yS&&!yg?(ye=(g7=new yS).port2,g7.port1.onmessage=yO,g9=yd(ye.postMessage,ye)):h6.addEventListener&&vB(h6.postMessage)&&!h6.importScripts&&g5&&"file:"!==g5.protocol&&!vg(yL)?(g9=yL,h6.addEventListener("message",yO,!1)):g9=yC in v8("script")?function(e){yh.appendChild(v8("script"))[yC]=function(){yh.removeChild(this),yP(e)}}:function(e){setTimeout(yE(e),0)});var yR,yA,yD,yM,yB,yj,yN,yU,yF=ym,yz=/ipad|iphone|ipod/i.test(vN)&&void 0!==h6.Pebble,yK=/web0s(?!.*chrome)/i.test(vN),yV=gt.f,yq=yF,yH=h6.MutationObserver||h6.WebKitMutationObserver,yG=h6.document,yW=h6.process,yY=h6.Promise,yX=yV(h6,"queueMicrotask"),yQ=yX&&yX.value;yQ||(yR=function(){var e,t;for(gz&&(e=yW.domain)&&e.exit();yA;){t=yA.fn,yA=yA.next;try{t()}catch(e){throw yA?yM():yD=void 0,e}}yD=void 0,e&&e.enter()},yg||gz||yK||!yH||!yG?!yz&&yY&&yY.resolve?((yN=yY.resolve(void 0)).constructor=yY,yU=yd(yN.then,yN),yM=function(){yU(yR)}):gz?yM=function(){yW.nextTick(yR)}:(yq=yd(yq,h6),yM=function(){yq(yR)}):(yB=!0,yj=yG.createTextNode(""),new yH(yR).observe(yj,{characterData:!0}),yM=function(){yj.data=yB=!yB}));var y$=yQ||function(e){var t={fn:e,next:void 0};yD&&(yD.next=t),yA||(yA=t,yM()),yD=t},yJ=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},yZ=function(){this.head=null,this.tail=null};yZ.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 y0=h6.Promise,y1="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,y2=!y1&&!gz&&"object"==typeof window&&"object"==typeof document;y0&&y0.prototype;var y4=vQ("species"),y3=!1,y6=vB(h6.PromiseRejectionEvent),y8={CONSTRUCTOR:gA("Promise",function(){var e=pD(y0),t=e!==String(y0);if(!t&&66===vV)return!0;if(!vV||vV<51||!/native code/.test(e)){var r=new y0(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((r.constructor={})[y4]=n,!(y3=r.then(function(){}) instanceof n))return!0}return!t&&(y2||y1)&&!y6}),REJECTION_EVENT:y6,SUBCLASSING:y3},y5={},y9=TypeError,y7=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw y9("Bad Promise constructor");t=e,r=n}),this.resolve=pl(t),this.reject=pl(r)};y5.f=function(e){return new y7(e)};var me,mt,mr,mn,mi=yF,ma=function(e,t){var r=h6.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},mo="Promise",mu=y8.CONSTRUCTOR,ms=y8.REJECTION_EVENT,mc=y8.SUBCLASSING,ml=pW.getterFor(mo),mf=pW.set,md=y0&&y0.prototype,mh=y0,mv=md,mp=h6.TypeError,mg=h6.document,my=h6.process,mm=y5.f,m_=mm,mb=!!(mg&&mg.createEvent&&h6.dispatchEvent),mk="unhandledrejection",mw=function(e){var t;return!(!v4(e)||!vB(t=e.then))&&t},mS=function(e,t){var r,n,i,a=t.value,o=1==t.state,u=o?e.ok:e.fail,s=e.resolve,c=e.reject,l=e.domain;try{u?(o||(2===t.rejection&&mP(t),t.rejection=1),!0===u?r=a:(l&&l.enter(),r=u(a),l&&(l.exit(),i=!0)),r===e.promise?c(mp("Promise-chain cycle")):(n=mw(r))?pn(n,r,s,c):s(r)):c(a)}catch(e){l&&!i&&l.exit(),c(e)}},mT=function(e,t){e.notified||(e.notified=!0,y$(function(){for(var r,n=e.reactions;r=n.get();)mS(r,e);e.notified=!1,t&&!e.rejection&&mI(e)}))},mx=function(e,t,r){var n,i;mb?((n=mg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),h6.dispatchEvent(n)):n={promise:t,reason:r},!ms&&(i=h6["on"+e])?i(n):e===mk&&ma("Unhandled promise rejection",r)},mI=function(e){pn(mi,h6,function(){var t,r=e.facade,n=e.value;if(mC(e)&&(t=yJ(function(){gz?my.emit("unhandledRejection",n,r):mx(mk,r,n)}),e.rejection=gz||mC(e)?2:1,t.error))throw t.value})},mC=function(e){return 1!==e.rejection&&!e.parent},mP=function(e){pn(mi,h6,function(){var t=e.facade;gz?my.emit("rejectionHandled",t):mx("rejectionhandled",t,e.value)})},mE=function(e,t,r){return function(n){e(t,n,r)}},mO=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,mT(e,!0))},mL=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw mp("Promise can't be resolved itself");var n=mw(t);n?y$(function(){var r={done:!1};try{pn(n,t,mE(mL,r,e),mE(mO,r,e))}catch(t){mO(r,t,e)}}):(e.value=t,e.state=1,mT(e,!1))}catch(t){mO({done:!1},t,e)}}};if(mu&&(mv=(mh=function(e){gJ(this,mv),pl(e),pn(me,this);var t=ml(this);try{e(mE(mL,t),mE(mO,t))}catch(e){mO(t,e)}}).prototype,(me=function(e){mf(this,{type:mo,done:!1,notified:!1,parent:!1,reactions:new yZ,rejection:!1,state:0,value:void 0})}).prototype=p2(mv,"then",function(e,t){var r=ml(this),n=mm(ya(this,mh));return r.parent=!0,n.ok=!vB(e)||e,n.fail=vB(t)&&t,n.domain=gz?my.domain:void 0,0==r.state?r.reactions.add(n):y$(function(){mS(n,r)}),n.promise}),mt=function(){var e=new me,t=ml(e);this.promise=e,this.resolve=mE(mL,t),this.reject=mE(mO,t)},y5.f=mm=function(e){return e===mh||e===mr?new mt(e):m_(e)},vB(y0)&&md!==Object.prototype)){mn=md.then,mc||p2(md,"then",function(e,t){var r=this;return new mh(function(e,t){pn(mn,r,e,t)}).then(e,t)},{unsafe:!0});try{delete md.constructor}catch(e){}gH&&gH(md,mv)}gF({global:!0,constructor:!0,wrap:!0,forced:mu},{Promise:mh}),gY(mh,mo,!1),gQ(mo);var mR={},mA=vQ("iterator"),mD=Array.prototype,mM=vQ("iterator"),mB=function(e){if(!vw(e))return pf(e,mM)||pf(e,"@@iterator")||mR[ge(e)]},mj=TypeError,mN=function(e,t){var r=arguments.length<2?mB(e):t;if(pl(r))return pt(pn(r,e));throw mj(ps(e)+" is not iterable")},mU=function(e,t,r){var n,i;pt(e);try{if(!(n=pf(e,"return"))){if("throw"===t)throw r;return r}n=pn(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return pt(n),r},mF=TypeError,mz=function(e,t){this.stopped=e,this.result=t},mK=mz.prototype,mV=function(e,t,r){var n,i,a,o,u,s,c,l,f=r&&r.that,d=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),v=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),g=yd(t,f),y=function(e){return i&&mU(i,"normal",e),new mz(!0,e)},m=function(e){return d?(pt(e),p?g(e[0],e[1],y):g(e[0],e[1])):p?g(e,y):g(e)};if(h)i=e.iterator;else if(v)i=e;else{;if(!(a=mB(e)))throw mF(ps(e)+" is not iterable");if(void 0!==(n=a)&&(mR.Array===n||mD[mA]===n)){for(o=0,u=gk(e);u>o;o++)if((s=m(e[o]))&&pi(mK,s))return s;return new mz(!1)}i=mN(e,a)}for(c=h?e.next:i.next;!(l=pn(c,i)).done;){try{s=m(l.value)}catch(e){mU(i,"throw",e)}if("object"==typeof s&&s&&pi(mK,s))return s}return new mz(!1)},mq=vQ("iterator"),mH=!1;try{var mG=0,mW={next:function(){return{done:!!mG++}},return:function(){mH=!0}};mW[mq]=function(){return this},Array.from(mW,function(){throw 2})}catch(e){}var mY=function(e,t){if(!t&&!mH)return!1;var r=!1;try{var n={};n[mq]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},mX=y8.CONSTRUCTOR||!mY(function(e){y0.all(e).then(void 0,function(){})});gF({target:"Promise",stat:!0,forced:mX},{all:function(e){var t=this,r=y5.f(t),n=r.resolve,i=r.reject,a=yJ(function(){var r=pl(t.resolve),a=[],o=0,u=1;mV(e,function(e){var s=o++,c=!1;u++,pn(r,t,e).then(function(e){c||(c=!0,a[s]=e,--u||n(a))},i)}),--u||n(a)});return a.error&&i(a.value),r.promise}});var mQ=y8.CONSTRUCTOR,m$=y0&&y0.prototype;if(gF({target:"Promise",proto:!0,forced:mQ,real:!0},{catch:function(e){return this.then(void 0,e)}}),vB(y0)){var mJ=vj("Promise").prototype.catch;m$.catch!==mJ&&p2(m$,"catch",mJ,{unsafe:!0})}gF({target:"Promise",stat:!0,forced:mX},{race:function(e){var t=this,r=y5.f(t),n=r.reject,i=yJ(function(){var i=pl(t.resolve);mV(e,function(e){pn(i,t,e).then(r.resolve,n)})});return i.error&&n(i.value),r.promise}}),gF({target:"Promise",stat:!0,forced:y8.CONSTRUCTOR},{reject:function(e){var t=y5.f(this);return pn(t.reject,void 0,e),t.promise}});var mZ=function(e,t){if(pt(e),v4(t)&&t.constructor===e)return t;var r=y5.f(e);return(0,r.resolve)(t),r.promise},m0=y8.CONSTRUCTOR;vj("Promise"),gF({target:"Promise",stat:!0,forced:m0},{resolve:function(e){return mZ(this,e)}});var m1=y0&&y0.prototype;if(gF({target:"Promise",proto:!0,real:!0,forced:!!y0&&vg(function(){m1.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=ya(this,vj("Promise")),r=vB(e);return this.then(r?function(r){return mZ(t,e()).then(function(){return r})}:e,r?function(r){return mZ(t,e()).then(function(){throw r})}:e)}}),vB(y0)){var m2=vj("Promise").prototype.finally;m1.finally!==m2&&p2(m1,"finally",m2,{unsafe:!0})}var m4={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!=typeof n)throw TypeError("The listener must be a function");var u=new i(n,a||e,o),s=r?r+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],u]:e._events[s].push(u):(e._events[s]=u,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function u(){this._events=new n,this._eventsCount=0}hL&&(n.prototype=hL(null),(new n).__proto__||(r=!1)),u.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?he(n).call(n,1):n);return hR?s8(i).call(i,hR(e)):i},u.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},u.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},u.prototype.emit=function(e,t,n,i,a,o){var u=r?r+e:e;if(!this._events[u])return!1;var s,c,l=this._events[u],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,a),!0;case 6:return l.fn.call(l.context,t,n,i,a,o),!0}for(c=1,s=Array(f-1);c<f;c++)s[c-1]=arguments[c];l.fn.apply(l.context,s)}else{var d,h=l.length;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!s)for(d=1,s=Array(f-1);d<f;d++)s[d-1]=arguments[d];l[c].fn.apply(l[c].context,s)}}return!0},u.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},u.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},u.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var u=this._events[a];if(u.fn)u.fn!==t||i&&!u.once||n&&u.context!==n||o(this,a);else{for(var s=0,c=[],l=u.length;s<l;s++)(u[s].fn!==t||i&&!u[s].once||n&&u[s].context!==n)&&c.push(u[s]);c.length?this._events[a]=1===c.length?c[0]:c:o(this,a)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u}(m4);var m3=v(m4.exports),m6=Array.isArray||function(e){return"Array"==p6(e)},m8=TypeError,m5=function(e){if(e>9007199254740991)throw m8("Maximum allowed index exceeded");return e},m9=function(e,t,r){var n=py(t);n in e?v0.f(e,n,pj(0,r)):e[n]=r},m7=vQ("species"),_e=Array,_t=function(e){var t;return m6(e)&&(yt(t=e.constructor)&&(t===_e||m6(t.prototype))||v4(t)&&null===(t=t[m7]))&&(t=void 0),void 0===t?_e:t},_r=function(e,t){return new(_t(e))(0===t?0:t)},_n=vQ("species"),_i=function(e){return vV>=51||!vg(function(){var t=[];return(t.constructor={})[_n]=function(){return{foo:1}},1!==t[e](Boolean).foo})},_a=vQ("isConcatSpreadable"),_o=vV>=51||!vg(function(){var e=[];return e[_a]=!1,e.concat()[0]!==e}),_u=_i("concat"),_s=function(e){if(!v4(e))return!1;var t=e[_a];return void 0!==t?!!t:m6(e)};gF({target:"Array",proto:!0,arity:1,forced:!_o||!_u},{concat:function(e){var t,r,n,i,a,o=vI(this),u=_r(o,0),s=0;for(t=-1,n=arguments.length;t<n;t++)if(_s(a=-1===t?o:arguments[t]))for(m5(s+(i=gk(a))),r=0;r<i;r++,s++)r in a&&m9(u,s,a[r]);else m5(s+1),m9(u,s++,a);return u.length=s,u}});var _c=vk([].push),_l=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,u=5==e||a;return function(s,c,l,f){for(var d,h,v=vI(s),p=gs(v),g=yd(c,l),y=gk(p),m=0,_=f||_r,b=t?_(s,y):r||o?_(s,0):void 0;y>m;m++)if((u||m in p)&&(h=g(d=p[m],m,v),e)){if(t)b[m]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:_c(b,d)}else switch(e){case 4:return!1;case 7:_c(b,d)}}return a?-1:n||i?i:b}},_f={forEach:_l(0),map:_l(1),filter:_l(2),some:_l(3),every:_l(4),find:_l(5),findIndex:_l(6),filterReject:_l(7)},_d=_f.filter;gF({target:"Array",proto:!0,forced:!_i("filter")},{filter:function(e){return _d(this,e,arguments.length>1?arguments[1]:void 0)}});var _h=TypeError,_v=function(e,t){if(!delete e[t])throw _h("Cannot delete property "+ps(t)+" of "+ps(e))},_p=String,_g=function(e){if("Symbol"===ge(e))throw TypeError("Cannot convert a Symbol value to a string");return _p(e)},_y=Array,_m=Math.max,__=function(e,t,r){for(var n=gk(e),i=gm(t,n),a=gm(void 0===r?n:r,n),o=_y(_m(a-i,0)),u=0;i<a;i++,u++)m9(o,u,e[i]);return o.length=u,o},_b=Math.floor,_k=function(e,t){var r=e.length,n=_b(r/2);return r<8?_w(e,t):_S(e,_k(__(e,0,n),t),_k(__(e,n),t),t)},_w=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},_S=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,u=0;o<i||u<a;)e[o+u]=o<i&&u<a?0>=n(t[o],r[u])?t[o++]:r[u++]:o<i?t[o++]:r[u++];return e},_T=function(e,t){var r=[][e];return!!r&&vg(function(){r.call(null,t||function(){return 1},1)})},_x=vN.match(/firefox\/(\d+)/i),_I=!!_x&&+_x[1],_C=/MSIE|Trident/.test(vN),_P=vN.match(/AppleWebKit\/(\d+)\./),_E=!!_P&&+_P[1],_O=[],_L=vk(_O.sort),_R=vk(_O.push),_A=vg(function(){_O.sort(void 0)}),_D=vg(function(){_O.sort(null)}),_M=_T("sort"),_B=!vg(function(){if(vV)return vV<70;if(!(_I&&_I>3)){if(_C)return!0;if(_E)return _E<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)_O.push({k:t+n,v:r})}for(_O.sort(function(e,t){return t.v-e.v}),n=0;n<_O.length;n++)t=_O[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});gF({target:"Array",proto:!0,forced:_A||!_D||!_M||!_B},{sort:function(e){void 0!==e&&pl(e);var t,r=vI(this);if(_B)return void 0===e?_L(r):_L(r,e);var n,i,a=[],o=gk(r);for(i=0;i<o;i++)i in r&&_R(a,r[i]);for(_k(a,(t=e,function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:_g(e)>_g(r)?1:-1})),n=gk(a),i=0;i<n;)r[i]=a[i++];for(;i<o;)_v(r,i++);return r}});var _j=TypeError,_N=Object.getOwnPropertyDescriptor,_U=v1&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(m6(e)&&!_N(e,"length").writable)throw _j("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},_F=_i("splice"),_z=Math.max,_K=Math.min;gF({target:"Array",proto:!0,forced:!_F},{splice:function(e,t){var r,n,i,a,o,u,s=vI(this),c=gk(s),l=gm(e,c),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=c-l):(r=f-2,n=_K(_z(gp(t),0),c-l)),m5(c+r-n),i=_r(s,n),a=0;a<n;a++)(o=l+a)in s&&m9(i,a,s[o]);if(i.length=n,r<n){for(a=l;a<c-n;a++)u=a+r,(o=a+n)in s?s[u]=s[o]:_v(s,u);for(a=c;a>c-n+r;a--)_v(s,a-1)}else if(r>n)for(a=c-n;a>l;a--)u=a+r-1,(o=a+n-1)in s?s[u]=s[o]:_v(s,u);for(a=0;a<r;a++)s[a+l]=arguments[a+2];return _U(s,c-n+r),i}});var _V=Object.keys||function(e){return gI(e,gC)},_q=Object.assign,_H=Object.defineProperty,_G=vk([].concat),_W=!_q||vg(function(){if(v1&&1!==_q({b:1},_q(_H({},"a",{enumerable:!0,get:function(){_H(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=_q({},e)[r]||_V(_q({},t)).join("")!=n})?function(e,t){for(var r=vI(e),n=arguments.length,i=1,a=gE.f,o=gr.f;n>i;)for(var u,s=gs(arguments[i++]),c=a?_G(_V(s),a(s)):_V(s),l=c.length,f=0;l>f;)u=c[f++],v1&&!pn(o,s,u)||(r[u]=s[u]);return r}:_q;gF({target:"Object",stat:!0,arity:2,forced:Object.assign!==_W},{assign:_W}),gF({target:"Object",stat:!0,forced:vg(function(){_V(1)})},{keys:function(e){return _V(vI(e))}});var _Y={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},_X=v8("span").classList,_Q=_X&&_X.constructor&&_X.constructor.prototype,_$=_Q===Object.prototype?void 0:_Q,_J=_f.forEach,_Z=_T("forEach")?[].forEach:function(e){return _J(this,e,arguments.length>1?arguments[1]:void 0)},_0=function(e){if(e&&e.forEach!==_Z)try{pN(e,"forEach",_Z)}catch(t){e.forEach=_Z}};for(var _1 in _Y)_Y[_1]&&_0(h6[_1]&&h6[_1].prototype);_0(_$);tu({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,a,o=arguments.length<3?t:arguments[2];return e5(t)===o?t[r]:(i=A.f(t,r))?void 0!==(n=i)&&(eO(n,"value")||eO(n,"writable"))?i.value:void 0===i.get?void 0:B(i.get,o):$(a=rg(t))?e(a,r,o):void 0}});var _2=J.Reflect.get,_4=v(_2),_3=v(_2);function _6(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=uA(e)||!e)return e;var r=e[hB];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=uA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uA(t)?t:t+""}(t))in e?ck(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _8=((bc=_8||{}).MP4="MP4",bc.MP4_MSE_SOFT="MP4_MSE_SOFT",bc.MP4_MSE="MP4_MSE",bc.MP4_0="MP4_0",bc.MP4_1="MP4_1",bc.MP4_2="MP4_2",bc.DASH="DASH",bc.HLS="HLS",bc),_5={CDN:"cdn"},_9=0,_7=1,be=2,bt=3,br=4,bn=5,bi=6,ba=7,bo=8,bu=9;_6(_6(_6(_6(_6(_6(_6(_6(_6(_6({},_9,"before start"),_7,"codec not support"),be,"start init destroy"),bt,"no preload"),br,"close downgrade"),bn,"init promise catch"),bi,"player error"),ba,"http error"),bo,"mse error"),bu,"destroy");var bs={};bs.f=v1&&!v9?Object.defineProperties:function(e,t){pt(e);for(var r,n=gc(t),i=_V(t),a=i.length,o=0;a>o;)v0.f(e,r=i[o++],n[r]);return e};var bc,bl,bf="prototype",bd="script",bh=pF("IE_PROTO"),bv=function(){},bp=function(e){return"<"+bd+">"+e+"</"+bd+">"},bg=function(e){e.write(bp("")),e.close();var t=e.parentWindow.Object;return e=null,t},by=function(){var e,t=v8("iframe");return t.style.display="none",yh.appendChild(t),t.src=String("java"+bd+":"),(e=t.contentWindow.document).open(),e.write(bp("document.F=Object")),e.close(),e.F},bm=function(){try{bl=new ActiveXObject("htmlfile")}catch(e){}bm="undefined"!=typeof document?document.domain&&bl?bg(bl):by():bg(bl);for(var e=gC.length;e--;)delete bm[bf][gC[e]];return bm()};pz[bh]=!0;var b_=Object.create||function(e,t){var r;return null!==e?(bv[bf]=pt(e),r=new bv,bv[bf]=null,r[bh]=e):r=bm(),void 0===t?r:bs.f(r,t)},bb=v0.f,bk=vQ("unscopables"),bw=Array.prototype;null==bw[bk]&&bb(bw,bk,{configurable:!0,value:b_(null)});var bS,bT,bx,bI=function(e){bw[bk][e]=!0},bC=!vg(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),bP=pF("IE_PROTO"),bE=Object,bO=bE.prototype,bL=bC?bE.getPrototypeOf:function(e){var t=vI(e);if(vP(t,bP))return t[bP];var r=t.constructor;return vB(r)&&t instanceof r?r.prototype:t instanceof bE?bO:null},bR=vQ("iterator"),bA=!1;[].keys&&("next"in(bx=[].keys())?(bT=bL(bL(bx)))!==Object.prototype&&(bS=bT):bA=!0),(!v4(bS)||vg(function(){var e={};return bS[bR].call(e)!==e}))&&(bS={}),vB(bS[bR])||p2(bS,bR,function(){return this});var bD={IteratorPrototype:bS,BUGGY_SAFARI_ITERATORS:bA},bM=bD.IteratorPrototype,bB=function(){return this},bj=function(e,t,r,n){var i=t+" Iterator";return e.prototype=b_(bM,{next:pj(+!n,r)}),gY(e,i,!1),mR[i]=bB,e},bN=pE.PROPER,bU=pE.CONFIGURABLE,bF=bD.IteratorPrototype,bz=bD.BUGGY_SAFARI_ITERATORS,bK=vQ("iterator"),bV="keys",bq="values",bH="entries",bG=function(){return this},bW=function(e,t,r,n,i,a,o){bj(r,t,n);var u,s,c,l=function(e){if(e===i&&p)return p;if(!bz&&e in h)return h[e];switch(e){case bV:case bq:case bH:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",d=!1,h=e.prototype,v=h[bK]||h["@@iterator"]||i&&h[i],p=!bz&&v||l(i),g="Array"==t&&h.entries||v;if(g&&(u=bL(g.call(new e)))!==Object.prototype&&u.next&&(bL(u)!==bF&&(gH?gH(u,bF):vB(u[bK])||p2(u,bK,bG)),gY(u,f,!0)),bN&&i==bq&&v&&v.name!==bq&&(bU?pN(h,"name",bq):(d=!0,p=function(){return pn(v,this)})),i){if(s={values:l(bq),keys:a?p:l(bV),entries:l(bH)},o)for(c in s)!bz&&!d&&c in h||p2(h,c,s[c]);else gF({target:t,proto:!0,forced:bz||d},s)}return h[bK]!==p&&p2(h,bK,p,{name:i}),mR[t]=p,s},bY=function(e,t){return{value:e,done:t}},bX=v0.f,bQ="Array Iterator",b$=pW.set,bJ=pW.getterFor(bQ),bZ=bW(Array,"Array",function(e,t){b$(this,{type:bQ,target:gc(e),index:0,kind:t})},function(){var e=bJ(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bY(void 0,!0)):bY("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)},"values"),b0=mR.Arguments=mR.Array;if(bI("keys"),bI("values"),bI("entries"),v1&&"values"!==b0.name)try{bX(b0,"name",{value:"values"})}catch(e){}var b1={exports:{}},b2={},b4=gf.f,b3="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b6=function(e){try{return b4(e)}catch(e){return __(b3)}};b2.f=function(e){return b3&&"Window"==p6(e)?b6(e):b4(gc(e))};var b8=vg(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),b5=Object.isExtensible,b9=vg(function(){b5(1)})||b8?function(e){return!!v4(e)&&(!b8||"ArrayBuffer"!=p6(e))&&(!b5||b5(e))}:b5,b7=!vg(function(){return Object.isExtensible(Object.preventExtensions({}))}),ke=v0.f,kt=!1,kr=vR("meta"),kn=0,ki=function(e){ke(e,kr,{value:{objectID:"O"+kn++,weakData:{}}})},ka=b1.exports={enable:function(){ka.enable=function(){},kt=!0;var e=gf.f,t=vk([].splice),r={};r[kr]=1,e(r).length&&(gf.f=function(r){for(var n=e(r),i=0,a=n.length;i<a;i++)if(n[i]===kr){t(n,i,1);break}return n},gF({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:b2.f}))},fastKey:function(e,t){if(!v4(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!vP(e,kr)){if(!b9(e))return"F";if(!t)return"E";ki(e)}return e[kr].objectID},getWeakData:function(e,t){if(!vP(e,kr)){if(!b9(e))return!0;if(!t)return!1;ki(e)}return e[kr].weakData},onFreeze:function(e){return b7&&kt&&b9(e)&&!vP(e,kr)&&ki(e),e}};pz[kr]=!0;var ko=b1.exports,ku=function(e,t,r){var n,i;return gH&&vB(n=t.constructor)&&n!==r&&v4(i=n.prototype)&&i!==r.prototype&&gH(e,i),e},ks=v0.f,kc=function(e,t,r){for(var n in t)p2(e,n,t[n],r);return e},kl=ko.fastKey,kf=pW.set,kd=pW.getterFor;!function(e,t,r){var n=-1!=="Map".indexOf("Map"),i=-1!==e.indexOf("Weak"),a=n?"set":"add",o=h6[e],u=o&&o.prototype,s=o,c={},l=function(e){var t=vk(u[e]);p2(u,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!v4(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!v4(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!v4(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(gA(e,!vB(o)||!(i||u.forEach&&!vg(function(){(new o).entries().next()}))))s=r.getConstructor(t,e,n,a),ko.enable();else if(gA(e,!0)){var f=new s,d=f[a](i?{}:-0,1)!=f,h=vg(function(){f.has(1)}),v=mY(function(e){new o(e)}),p=!i&&vg(function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)});v||((s=t(function(e,t){gJ(e,u);var r=ku(new o,e,s);return vw(t)||mV(t,r[a],{that:r,AS_ENTRIES:n}),r})).prototype=u,u.constructor=s),(h||p)&&(l("delete"),l("has"),n&&l("get")),(p||d)&&l(a),i&&u.clear&&delete u.clear}c[e]=s,gF({global:!0,constructor:!0,forced:s!=o},c),gY(s,e),i||r.setStrong(s,e,n)}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,t,r,n){var i=e(function(e,i){gJ(e,a),kf(e,{type:t,index:b_(null),first:void 0,last:void 0,size:0}),v1||(e.size=0),vw(i)||mV(i,e[n],{that:e,AS_ENTRIES:r})}),a=i.prototype,o=kd(t),u=function(e,t,r){var n,i,a=o(e),u=s(e,t);return u?u.value=r:(a.last=u={index:i=kl(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=u),n&&(n.next=u),v1?a.size++:e.size++,"F"!==i&&(a.index[i]=u)),e},s=function(e,t){var r,n=o(e),i=kl(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return kc(a,{clear:function(){for(var e=o(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,v1?e.size=0:this.size=0},delete:function(e){var t=o(this),r=s(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index],r.removed=!0,i&&(i.next=n),n&&(n.previous=i),t.first==r&&(t.first=n),t.last==r&&(t.last=i),v1?t.size--:this.size--}return!!r},forEach:function(e){for(var t,r=o(this),n=yd(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),kc(a,r?{get:function(e){var t=s(this,e);return t&&t.value},set:function(e,t){return u(this,0===e?0:e,t)}}:{add:function(e){return u(this,e=0===e?0:e,e)}}),v1&&ks(a,"size",{get:function(){return o(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=kd(t),a=kd(n);bW(e,t,function(e,t){kf(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?bY("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,bY(void 0,!0))},r?"entries":"values",!r,!0),gQ(t)}});var kh=vk("".charAt),kv=vk("".charCodeAt),kp=vk("".slice),kg=function(e){return function(t,r){var n,i,a=_g(vT(t)),o=gp(r),u=a.length;return o<0||o>=u?e?"":void 0:(n=kv(a,o))<55296||n>56319||o+1===u||(i=kv(a,o+1))<56320||i>57343?e?kh(a,o):n:e?kp(a,o,o+2):i-56320+(n-55296<<10)+65536}},ky={codeAt:kg(!1),charAt:kg(!0)},km=ky.charAt,k_="String Iterator",kb=pW.set,kk=pW.getterFor(k_);bW(String,"String",function(e){kb(this,{type:k_,string:_g(e),index:0})},function(){var e,t=kk(this),r=t.string,n=t.index;return n>=r.length?bY(void 0,!0):(e=km(r,n),t.index+=e.length,bY(e,!1))});gF({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=pt(this),r=pl(t.delete),n=!0,i=0,a=arguments.length;i<a;i++)e=pn(r,t,arguments[i]),n=n&&e;return!!n}});var kw=function(e){return pn(Map.prototype.entries,e)};gF({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0);return!mV(r,function(e,r,i){if(!n(r,e,t))return i()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});gF({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0),i=new(ya(t,vj("Map"))),a=pl(i.set);return mV(r,function(e,r){n(r,e,t)&&pn(a,i,e,r)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});gF({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0);return mV(r,function(e,r,i){if(n(r,e,t))return i(r)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});gF({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0);return mV(r,function(e,r,i){if(n(r,e,t))return i(e)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});gF({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return mV(kw(pt(this)),function(t,r,n){var i,a;if((i=r)===(a=e)||i!=i&&a!=a)return n()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});gF({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return mV(kw(pt(this)),function(t,r,n){if(r===e)return n(t)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});gF({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0),i=new(ya(t,vj("Map"))),a=pl(i.set);return mV(r,function(e,r){pn(a,i,n(r,e,t),r)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});gF({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0),i=new(ya(t,vj("Map"))),a=pl(i.set);return mV(r,function(e,r){pn(a,i,e,n(r,e,t))},{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});gF({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=pt(this),r=pl(t.set),n=arguments.length,i=0;i<n;)mV(arguments[i++],r,{that:t,AS_ENTRIES:!0});return t}});var kS=TypeError;gF({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=pt(this),r=kw(t),n=arguments.length<2,i=n?void 0:arguments[1];if(pl(e),mV(r,function(r,a){n?(n=!1,i=a):i=e(i,a,r,t)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),n)throw kS("Reduce of empty map with no initial value");return i}});gF({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=pt(this),r=kw(t),n=yd(e,arguments.length>1?arguments[1]:void 0);return mV(r,function(e,r,i){if(n(r,e,t))return i()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var kT=TypeError;gF({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=pt(this),n=pl(r.get),i=pl(r.has),a=pl(r.set),o=arguments.length;pl(t);var u=pn(i,r,e);if(!u&&o<3)throw kT("Updating absent value");var s=u?pn(n,r,e):pl(o>2?arguments[2]:void 0)(e,r);return pn(a,r,e,t(s,e,r)),r}});var kx=vQ("iterator"),kI=vQ("toStringTag"),kC=bZ.values,kP=function(e,t){if(e){if(e[kx]!==kC)try{pN(e,kx,kC)}catch(t){e[kx]=kC}if(e[kI]||pN(e,kI,t),_Y[t]){for(var r in bZ)if(e[r]!==bZ[r])try{pN(e,r,bZ[r])}catch(t){e[r]=bZ[r]}}}};for(var kE in _Y)kP(h6[kE]&&h6[kE].prototype,kE);kP(_$,"DOMTokenList");tu({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var kO=J.Number.isNaN,kL=v(kO),kR=vQ("match"),kA=function(e){var t;return v4(e)&&(void 0!==(t=e[kR])?!!t:"RegExp"==p6(e))},kD=function(){var e=pt(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},kM=RegExp.prototype,kB=h6.RegExp,kj=vg(function(){var e=kB("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),kN=kj||vg(function(){return!kB("a","y").sticky}),kU={BROKEN_CARET:kj||vg(function(){var e=kB("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),MISSED_STICKY:kN,UNSUPPORTED_Y:kj},kF=h6.RegExp,kz=vg(function(){var e=kF(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),kK=h6.RegExp,kV=vg(function(){var e=kK("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),kq=pW.get,kH=vp("native-string-replace",String.prototype.replace),kG=RegExp.prototype.exec,kW=kG,kY=vk("".charAt),kX=vk("".indexOf),kQ=vk("".replace),k$=vk("".slice),kJ=(i=/b*/g,pn(kG,n=/a/,"a"),pn(kG,i,"a"),0!==n.lastIndex||0!==i.lastIndex),kZ=kU.BROKEN_CARET,k0=void 0!==/()??/.exec("")[1];(kJ||k0||kZ||kz||kV)&&(kW=function(e){var t,r,n,i,a,o,u,s=kq(this),c=_g(e),l=s.raw;if(l)return l.lastIndex=this.lastIndex,t=pn(kW,l,c),this.lastIndex=l.lastIndex,t;var f=s.groups,d=kZ&&this.sticky,h=pn(kD,this),v=this.source,p=0,g=c;if(d&&(-1===kX(h=kQ(h,"y",""),"g")&&(h+="g"),g=k$(c,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==kY(c,this.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,p++),r=RegExp("^(?:"+v+")",h)),k0&&(r=RegExp("^"+v+"$(?!\\s)",h)),kJ&&(n=this.lastIndex),i=pn(kG,d?r:this,g),d?i?(i.input=k$(i.input,p),i[0]=k$(i[0],p),i.index=this.lastIndex,this.lastIndex+=i[0].length):this.lastIndex=0:kJ&&i&&(this.lastIndex=this.global?i.index+i[0].length:n),k0&&i&&i.length>1&&pn(kH,i[0],r,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)}),i&&f)for(i.groups=o=b_(null),a=0;a<f.length;a++)o[(u=f[a])[0]]=i[u[1]];return i});var k1=kW;gF({target:"RegExp",proto:!0,forced:/./.exec!==k1},{exec:k1});var k2=pE.PROPER,k4=function(e){var t=e.flags;return void 0!==t||"flags"in kM||vP(e,"flags")||!pi(kM,e)?t:pn(kD,e)},k3="toString",k6=RegExp.prototype[k3],k8=vg(function(){return"/a/b"!=k6.call({source:"a",flags:"b"})}),k5=k2&&k6.name!=k3;(k8||k5)&&p2(RegExp.prototype,k3,function(){var e=pt(this);return"/"+_g(e.source)+"/"+_g(k4(e))},{unsafe:!0});var k9=vQ("species"),k7=RegExp.prototype,we=ky.charAt,wt=TypeError,wr=I(j.f),wn=I([].push),wi=D&&y(function(){var e=Object.create(null);return e[2]=2,!wr(e,2)}),wa=function(e){return function(t){for(var r,n=Q(t),i=tZ(n),a=wi&&null===rg(n),o=i.length,u=0,s=[];o>u;)r=i[u++],(!D||(a?r in n:wr(n,r)))&&wn(s,e?[r,n[r]]:n[r]);return s}},wo={entries:wa(!0),values:wa(!1)}.values;tu({target:"Object",stat:!0},{values:function(e){return wo(e)}});var wu=J.Object.values,ws=v(wu),wc=gS.includes;gF({target:"Array",proto:!0,forced:vg(function(){return![,].includes()})},{includes:function(e){return wc(this,e,arguments.length>1?arguments[1]:void 0)}}),bI("includes");var wl=vk([].join),wf=gs!=Object,wd=_T("join",",");gF({target:"Array",proto:!0,forced:wf||!wd},{join:function(e){return wl(gc(this),void 0===e?",":e)}});var wh=_i("slice"),wv=vQ("species"),wp=Array,wg=Math.max;gF({target:"Array",proto:!0,forced:!wh},{slice:function(e,t){var r,n,i,a=gc(this),o=gk(a),u=gm(e,o),s=gm(void 0===t?o:t,o);if(m6(a)&&((yt(r=a.constructor)&&(r===wp||m6(r.prototype))||v4(r)&&null===(r=r[wv]))&&(r=void 0),r===wp||void 0===r))return yv(a,u,s);for(n=new(void 0===r?wp:r)(wg(s-u,0)),i=0;u<s;u++,i++)u in a&&m9(n,i,a[u]);return n.length=i,n}});var wy=vk(gr.f),wm=vk([].push),w_=function(e){return function(t){for(var r,n=gc(t),i=_V(n),a=i.length,o=0,u=[];a>o;)r=i[o++],v1&&!wy(n,r)||wm(u,e?[r,n[r]]:n[r]);return u}},wb={entries:w_(!0),values:w_(!1)}.values;gF({target:"Object",stat:!0},{values:function(e){return wb(e)}});var wk=TypeError,ww=vQ("match"),wS=function(e){if(kA(e))throw wk("The method doesn't accept regular expressions");return e},wT=vk("".indexOf);gF({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[ww]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~wT(_g(vT(this)),_g(wS(e)),arguments.length>1?arguments[1]:void 0)}});var wx=function(e,t){var r=e.exec;if(vB(r)){var n=pn(r,e,t);return null!==n&&pt(n),n}if("RegExp"===p6(e))return pn(k1,e,t);throw wt("RegExp#exec called on incompatible receiver")},wI=kU.UNSUPPORTED_Y,wC=Math.min,wP=[].push,wE=vk(/./.exec),wO=vk(wP),wL=vk("".slice),wR=!vg(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]});function wA(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function wD(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),ck(e,function(e){var t=function(e,t){if("object"!==uA(e)||null===e)return e;var r=e[hB];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==uA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===uA(t)?t:String(t)}(n.key),n)}}function wM(e,t,r){return t&&wD(e.prototype,t),r&&wD(e,r),ck(e,"prototype",{writable:!1}),e}!function(e,t,r,n){var i=vQ(e),a=!vg(function(){var t={};return t[i]=function(){return 7},7!=""[e](t)}),o=a&&!vg(function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[k9]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t});if(!a||!o||r){var u=yl(/./[i]),s=t(i,""[e],function(e,t,r,n,i){var o=yl(e),s=t.exec;return s===k1||s===k7.exec?a&&!i?{done:!0,value:u(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}});p2(String.prototype,e,s[0]),p2(k7,i,s[1])}n&&pN(k7[i],"sham",!0)}("split",function(e,t,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=_g(vT(this)),i=void 0===r?4294967295:r>>>0;if(0===i)return[];if(void 0===e)return[n];if(!kA(e))return pn(t,n,e,i);for(var a,o,u,s=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,f=RegExp(e.source,c+"g");(a=pn(k1,f,n))&&!((o=f.lastIndex)>l&&(wO(s,wL(n,l,a.index)),a.length>1&&a.index<n.length&&yc(wP,s,__(a,1)),u=a[0].length,l=o,s.length>=i));)f.lastIndex===a.index&&f.lastIndex++;return l===n.length?!u&&wE(f,"")||wO(s,""):wO(s,wL(n,l)),s.length>i?__(s,0,i):s}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:pn(t,this,e,r)}:t,[function(t,r){var i=vT(this),a=vw(t)?void 0:pf(t,e);return a?pn(a,t,i,r):pn(n,_g(i),t,r)},function(e,i){var a=pt(this),o=_g(e),u=r(n,a,o,i,n!==t);if(u.done)return u.value;var s=ya(a,RegExp),c=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(wI?"g":"y"),f=new s(wI?"^(?:"+a.source+")":a,l),d=void 0===i?4294967295:i>>>0;if(0===d)return[];if(0===o.length)return null===wx(f,o)?[o]:[];for(var h=0,v=0,p=[];v<o.length;){f.lastIndex=wI?0:v;var g,y,m,_=wx(f,wI?wL(o,v):o);if(null===_||(m=wC(gb(f.lastIndex+(wI?v:0)),o.length))===h){;g=o,v=(y=v)+(c?we(g,y).length:1)}else{if(wO(p,wL(o,h,v)),p.length===d)return p;for(var b=1;b<=_.length-1;b++)if(wO(p,_[b]),p.length===d)return p;v=h=m}}return wO(p,wL(o,h)),p}]},!wR,wI);var wB=function(){return wj&&!function(){var e="_localstorage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()}();function wj(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}var wN={length:wB?localStorage.length:0,clear:function(e){try{for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===lf(r).call(r,e)&&localStorage.removeItem(r)}}catch(e){}},getItem:function(e){try{return localStorage.getItem(e)}catch(e){return null}},key:function(e){try{return localStorage.key(e)}catch(e){return null}},setItem:function(e,t){try{localStorage.setItem(e,t)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},isSupport:wB},wU=function(){function e(){wA(this,e);var t,r,n=new cS(function(e,n){t=e,r=n});return n.resolve=t,n.reject=r,n}return wM(e,[{key:"resolve",value:function(e){}},{key:"reject",value:function(e){}}]),e}(),wF=pE.EXISTS,wz=v0.f,wK=Function.prototype,wV=vk(wK.toString),wq=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,wH=vk(wq.exec);v1&&!wF&&wz(wK,"name",{configurable:!0,get:function(){try{return wH(wq,wV(this))[1]}catch(e){return""}}});var wG=function(){function e(){wA(this,e)}return wM(e,null,[{key:"parse",value:function(t){var r=e.parseXmlString(t);return null!==r?e.parseDOMChildren(r):null}},{key:"parseXmlString",value:function(e){if(void 0===e)return null;var t,r=new window.DOMParser;try{(t=r.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}return t}},{key:"parseDOMChildren",value:function(t,r){if(t.nodeType===Node.DOCUMENT_NODE){for(var n={},i=t.childNodes,a=0;a<i.length;a++){var o=i[a];o.nodeType===Node.ELEMENT_NODE&&(n=e.parseDOMChildren(o))}return n}if(t.nodeType===Node.ELEMENT_NODE){for(var u={__cnt:0},s=[],c=t.childNodes,l=0;l<c.length;l++){var f=c[l],d=e.getNodeLocalName(f);if(f.nodeType!==Node.COMMENT_NODE){var h,v=s8(h="".concat(r,".")).call(h,d);if(u.__cnt++,null==u[d]){var p=e.parseDOMChildren(f,v);if("#text"!==d||/[^\s]/.test(p)){var g={};g[d]=p,s.push(g)}u[d]=p,e.toArrayAccessForm(u,d)}else{null!=u[d]&&(u[d]instanceof Array||(u[d]=[u[d]],e.toArrayAccessForm(u,d,v)));var y=e.parseDOMChildren(f,v);if("#text"!==d||/[^\s]/.test(y)){var m={};m[d]=y,s.push(m)}u[d][u[d].length]=y}}}for(var _=0;_<t.attributes.length;_++){var b=t.attributes[_];u.__cnt++;var k=b.value;u[b.name]=k}var w=t.prefix;return null!=w&&""!==w&&(u.__cnt++,u.__prefix=w),null!=u["#text"]&&(u.__text=u["#text"],u.__text instanceof Array&&(u.__text=u.__text.join("\n")),delete u["#text"],delete u["#text_asArray"]),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],delete u["#cdata-section_asArray"]),1===u.__cnt&&null!=u.__text?u=u.__text:1===u.__cnt&&null!=u.__cdata&&(u=u.__cdata),delete u.__cnt,u}if(t.nodeType===Node.TEXT_NODE||t.nodeType===Node.CDATA_SECTION_NODE)return t.nodeValue}},{key:"getNodeLocalName",value:function(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}},{key:"toArrayAccessForm",value:function(e,t){e[t]instanceof Array||(e[t]=[e[t]])}}]),e}();cS.withResolvers||(cS.withResolvers=function(){var e={};return e.promise=new cS(function(t,r){e.resolve=t,e.reject=r}),e});var wW=function(){try{if("undefined"!=typeof indexedDB)return indexedDB}catch(e){}}();function wY(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function wX(e){return"string"!=typeof e&&(e=String(e)),e}var wQ={},w$="readonly",wJ="readwrite";function wZ(e){var t=wQ[e.name],r={};r.promise=new cS(function(e,t){r.resolve=e,r.reject=t}),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then(function(){return r.promise}):t.dbReady=r.promise}function w0(e,t){return new cS(function(r,n){if(wQ[e.name]=wQ[e.name]||w6(),e.db){if(!t)return r(e.db);wZ(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var a=null==wW?void 0:wW.open.apply(wW,i);t&&(a.onupgradeneeded=function(t){var r=a.result;try{r.createObjectStore(e.storeName)}catch(e){if("ConstraintError"!==e.name)throw e}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){r(a.result),function(e){var t=wQ[e.name].deferredOperations.pop();if(t)t.resolve(),t.promise}(e)}})}function w1(e){return w0(e,!1)}function w2(e){return w0(e,!0)}function w4(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version,e.version=e.db.version),i||r){if(r){var a=e.db.version+1;a>e.version&&(e.version=a)}return!0}return!1}function w3(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return cS.resolve().then(function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),w0(e,!0)}).then(function(){return(function(e){wZ(e);for(var t=wQ[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,w0(e,!1).then(function(t){return e.db=t,w4(e)?w0(e,!0):t}).then(function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n}).catch(function(t){throw function(e,t){var r=wQ[e.name].deferredOperations.pop();if(r)r.reject(t),r.promise}(e,t),t})})(e).then(function(){w3(e,t,r,n-1)})}).catch(r);r(i)}}function w6(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}var w8=hq(function e(){hK(this,e)},[{key:"ready",value:function(){return this._ready}},{key:"_initStorage",value:function(e){var t,r=this;r._defaultConfig=e;var n={db:null,name:"",version:""};if(e)for(var i in e)n[i]=e[i];var a=wQ[n.name];a||(a=w6(),wQ[n.name]=a),a.forages.push(r),r._initReady||(r._initReady=r.ready,r._ready=r._fullyReady);var o=[];function u(){return cS.resolve()}for(var s=0;s<a.forages.length;s++){var c=a.forages[s];c!==r&&o.push(c._initReady().catch(u))}var l=he(t=a.forages).call(t,0);return r._ready=cS.all(o).then(function(){return n.db=a.db,w0(n,!1)}).then(function(e){return n.db=e,w4(n,r._defaultConfig.version)?w0(n,!0):e}).then(function(e){n.db=a.db=e,r._dbInfo=n;for(var t=0;t<l.length;t++){var i=l[t];i!==r&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}}),r._ready}},{key:"probeSupport",get:function(){return function(){try{if(null==wW||!wW.open)return!1;var e,t=/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),r="function"==typeof fetch&&-1!==lf(e=fetch.toString()).call(e,"[native code");return(!t||r)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}()}},{key:"getItem",value:function(e,t){var r=this;e=wX(e);var n=new cS(function(t,n){r.ready().then(function(){w3(r._dbInfo,w$,function(i,a){if(i)return n(i);try{var o=a.objectStore(r._dbInfo.storeName).get(e);o.onsuccess=function(){var e=o.result;void 0===e&&(e=null),t(e)},o.onerror=function(){n(o.error)}}catch(e){n(e)}})}).catch(n)});return wY(n,t),n}},{key:"setItem",value:function(e,t,r){var n=this;e=wX(e);var i=new cS(function(r,i){n.ready().then(function(){return n._dbInfo,t}).then(function(t){w3(n._dbInfo,wJ,function(a,o){if(a)return i(a);try{var u=o.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=u.put(t,e);o.oncomplete=function(){void 0===t&&(t=null),r(t)},o.onabort=o.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}})}).catch(i)});return wY(i,r),i}},{key:"removeItem",value:function(e,t){var r=this;e=wX(e);var n=new cS(function(t,n){r.ready().then(function(){w3(r._dbInfo,wJ,function(i,a){if(i)return n(i);try{var o=a.objectStore(r._dbInfo.storeName).delete(e);a.oncomplete=function(){t()},a.onerror=function(){n(o.error)},a.onabort=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}})}).catch(n)});return wY(n,t),n}},{key:"clear",value:function(e){var t=this,r=new cS(function(e,r){t.ready().then(function(){w3(t._dbInfo,wJ,function(n,i){if(n)return r(n);try{var a=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(e){r(e)}})}).catch(r)});return wY(r,e),r}},{key:"length",value:function(e){var t=this,r=new cS(function(e,r){t.ready().then(function(){w3(t._dbInfo,w$,function(n,i){if(n)return r(n);try{var a=i.objectStore(t._dbInfo.storeName).count();a.onsuccess=function(){e(a.result)},a.onerror=function(){r(a.error)}}catch(e){r(e)}})}).catch(r)});return wY(r,e),r}},{key:"all",value:function(e){var t=this,r=new cS(function(e,r){t.ready().then(function(){w3(t._dbInfo,w$,function(n,i){if(n)return r(n);try{var a=i.objectStore(t._dbInfo.storeName).openCursor(),o=[];a.onsuccess=function(){var t=a.result;t?(o.push({key:t.key,value:t.value}),t.continue()):e(o)},a.onerror=function(){r(a.error)}}catch(e){r(e)}})}).catch(r)});return wY(r,e),r}},{key:"_fullyReady",value:function(e){var t,r,n,i=this,a=i._initReady().then(function(){var e=wQ[i._dbInfo.name];if(null!=e&&e.dbReady)return e.dbReady});return t=a,r=e,n=e,"function"==typeof r&&t.then(r),"function"==typeof n&&t.catch(n),a}},{key:"getItemSync",value:function(){throw Error("NotSupported")}}]),w5=hq(function e(){hK(this,e)},[{key:"_initStorage",value:function(e){var t,r=e.name,n=e.storeName,i=s8(t="".concat(r,"_")).call(t,n);return this.key=i,window[i]&&"object"===h2(window[i])||(window[i]={}),this.store=window[i],cS.resolve()}},{key:"getItem",value:function(e,t){var r=this.store[e];return void 0===r&&(r=null),this._internalPromise(t,r)}},{key:"getItemSync",value:function(e,t){var r=this.store[e];return void 0===r&&(r=null),t&&t(r),r}},{key:"setItem",value:function(e,t,r){return this.store[e]=t,this._internalPromise(r)}},{key:"removeItem",value:function(e,t){return delete this.store[e],this._internalPromise(t)}},{key:"clear",value:function(e){return this.store={},window[this.key]={},this._internalPromise(e)}},{key:"length",value:function(e){var t=cw(this.store).length;return this._internalPromise(e,t)}},{key:"_internalPromise",value:function(e,t){var r=t?cS.resolve(t):cS.resolve();return wY(r,e),r}},{key:"all",value:function(e){for(var t=[],r=cw(this.store),n=0;n<r.length;n++){var i=r[n];t.push({key:i,value:this.store[i]})}return this._internalPromise(e,t)}},{key:"probeSupport",value:function(){return!0}}]),w9={description:"",name:"__PRE_CACHE__",storeName:"keyvaluepairs",version:1},w7="__PRE_CACHE__KEYS",Se=hq(function e(t,r){hK(this,e),this._allCachedKeyMap={},this._memory=0,this._cnt=0;var n=r===hT.MEMORY?w5:w8;this._cacheType=r,this._driver=new n,this._driver._initStorage(w9).catch(function(){}),this._hasIdbForbidden=!1,this._maxCache=!t||t<=0?200:t,this.setMaxCache(this._maxCache),this._allCachedKeys={},this._allCachedTimeKeys={},this.getCachedKeysFromLocal(),this._readyPromise=new wU,this.init()},[{key:"supportSync",value:function(){return this._cacheType===hT.MEMORY}},{key:"getCachedKeysFromLocal",value:function(){var e=wN.getItem(w7);if(e)for(var t=e.split("|"),r=0;r<t.length;r++){var n=t[r],i=this._getCacheKeyInfos(n),a=i.time,o=i.cachedKey;this._allCachedKeys[o]=1,this._allCachedTimeKeys[o]=a}}},{key:"_getCacheKeyInfos",value:function(e){var t,r=e.split("$");return 2===r.length&&(t=r[0],e=r[1]),{time:t,cachedKey:e}}},{key:"writeCachedKeysToLocal",value:function(e){var t=[];this._allCachedKeys={},this._allCachedTimeKeys={};for(var r=0;r<e.length;r++){var n=e[r].key,i=this._getCacheKeyInfos(n),a=i.time,o=i.cachedKey;this._allCachedKeys[o]=1,this._allCachedTimeKeys[o]=a,t.push(n)}var u=t.join("|");wN.setItem(w7,u)}},{key:"init",value:function(){var e=this;this._driver.setItem("test","test").then(function(){}).catch(function(){e._hasIdbForbidden=!0}).finally(function(){e._driver.removeItem("test").catch(function(){}),e._hasIdbForbidden&&(e._driver=new w5,e._driver._initStorage(w9)),e._getAll(),e._readyPromise.resolve()})}},{key:"_getAll",value:function(){var e=this;this._memory=0,this._cnt=0,this._driver.all().then(function(t){e._cachedLength=t.length;var r=t.length-e._maxCache,n=t;if(r>0){var i=he(t).call(t,0,r);n=he(t).call(t,r);for(var a=0;a<i.length;a++)e.removeItem(i[a].key).then(function(){})}e._cnt=n.length;for(var o=0;o<n.length;o++){var u=n[o];if("object"===h2(u.value)){var s=ws(u.value);cb(s).call(s,function(t){e._memory+=(null==t?void 0:t.memory)||0});var c=e._getCacheKeyInfos(u.key).cachedKey;e._allCachedKeyMap[c]=cw(u.value)}}e.writeCachedKeysToLocal(n)}).catch(function(){})}},{key:"getAllCachedDataKeys",value:function(){var e,t=[];return cb(e=ws(this._allCachedKeyMap)).call(e,function(e){var r;t.push.apply(t,function(e){if(cp(e))return hN(e)}(r=e)||function(e){if(void 0!==hI&&null!=hC(e)||null!=e["@@iterator"])return fw(e)}(r)||h4(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),t}},{key:"getItem",value:(a=hF(hZ().mark(function e(t,r,n){var i,a,o,u;return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((i=this.hasItem(t))&&n&&(i=(null==(a=this._allCachedKeyMap[t])?void 0:cd(a).call(a,n))||!1),i){e.next=4;break}return e.abrupt("return",cS.resolve(!1));case 4:return o=this._getTimeKey(t).timeKey,e.next=7,this._driver.getItem(o,r);case 7:if(u=e.sent,!n){e.next=10;break}return e.abrupt("return",u[n]);case 10:return e.abrupt("return",u);case 11:case"end":return e.stop()}},e,this)})),function(e,t,r){return a.apply(this,arguments)})},{key:"getItemSync",value:function(e,t,r){var n=this.hasItem(e);if(n&&r){var i=this._allCachedKeyMap[e];n=(null==i?void 0:cd(i).call(i,r))||!1}if(!n)return!1;var a=this._getTimeKey(e).timeKey,o=this._driver.getItemSync(a,t);return o&&r?o[r]:o}},{key:"setItem",value:function(e,t,r){var n=this;this._getTimeKey(e).timeKey&&this.removeItem(e);var i=(new Date).getTime();this._allCachedKeys[e]=1,this._allCachedTimeKeys[e]=i;var a=this._genTimeKey(e,i);return r=r?function(){n._getAll(),r()}:function(){n._getAll()},this._driver.setItem(a,t,r)}},{key:"_getTimeKey",value:function(e){var t=this._allCachedTimeKeys[e],r=e;return t&&(r=this._genTimeKey(e,t)),{timeKey:r,time:t}}},{key:"_genTimeKey",value:function(e,t){var r,n;return s8(r=s8(n="".concat(t)).call(n,"$")).call(r,e)}},{key:"removeItem",value:function(e,t){var r=this._getTimeKey(e).timeKey,n=this._driver.removeItem(r,t);return delete this._allCachedKeys[e],delete this._allCachedTimeKeys[e],delete this._allCachedKeyMap[e],n}},{key:"hasItem",value:function(e){return!!this._allCachedKeys[e]}},{key:"clear",value:function(e){return this._driver.clear(e)}},{key:"length",value:function(e){return this._driver.length(e)}},{key:"setMaxCache",value:function(e){"number"==typeof e&&e>0&&(this._maxCache=e)}},{key:"getMemoryInfo",value:function(){return{memory:this._memory,cnt:this._cnt}}}]),St=["vid","loadType","size","speed","cacheKey","vtype","duration","bitrate"],Sr=0,Sn=hq(function e(t){var r=this;hK(this,e),this._preload_bandwith_map=new fy,this._usepreload_info=new fy,this._pcdn_info_map=new fy,this._updateRealTimeSpeed=function(e){Sr=e.speed,r.emit("real_time_speed",e)},this._manager=t},[{key:"setPreloadBandwidth",value:function(e,t){this._preload_bandwith_map.set(e,t)}},{key:"getPreloadBandwidth",value:function(e){return this._preload_bandwith_map.get(e)}},{key:"_updateLoadInfo",value:function(e,t,r){var n=this._pcdn_info_map.get(e);n||(n={}),n[t]||(n[t]={},n[t].loadLen=0),n[t].loadLen=n[t].loadLen+r,this._pcdn_info_map.set(e,n)}},{key:"getLoadInfoAndDelete",value:function(e){var t=this._pcdn_info_map.get(e);return this._pcdn_info_map.delete(e),t}},{key:"getPreloadUnuseInfo",value:function(){var e,t={},r=hH(this._preload_bandwith_map);try{for(r.s();!(e=r.n()).done;){var n,i,a=(n=e.value,i=2,function(e){if(cp(e))return e}(n)||function(e,t){var r=null==e?null:void 0!==hI&&hC(e)||e["@@iterator"];if(null!=r){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}(n,2)||h4(n,i)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],u=a[1];if(this._usepreload_info.get(o))this._preload_bandwith_map.delete(o);else{var s=o.split("#"),c=s.length>0?s[0]:o;t[c]?(t[c].bw+=u.bw||0,t[c].pbw+=u.pbw||0):t[c]={vid:c,bw:u.bw||0,pbw:u.pbw||0,bitrate:u.bitrate||0,duration:u.duration||0}}}}catch(e){r.e(e)}finally{r.f()}return ws(t)}},{key:"bwEventEmit",value:function(e){var t=e.vid,r=e.loadType,n=e.size,i=e.speed,a=e.cacheKey,o=e.vtype,u=e.duration,s=e.bitrate,c=hJ(e,St),l=this.getPreloadBandwidth(a)||{bw:0,pbw:0,vid:t,duration:u,bitrate:s};r&&r!==_5.CDN?(l.pbw=l.pbw+n,this.emit("prf_data_size",h$({vid:t,task_type:2,pcdn_size:n,pcdn_speed:i,vtype:o,bitrate:s,duration:u},c))):(l.bw=l.bw+n,this.emit("prf_data_size",h$({vid:t,task_type:2,cdn_size:n,cdn_speed:i,vtype:o,duration:u,bitrate:s},c))),this.setPreloadBandwidth(a,l),this._updateRealTimeSpeed({speed:i,type:r||_5.CDN}),this._updateLoadInfo(a,r,n)}},{key:"setUsePreloadInfo",value:function(e,t){this._usepreload_info.set(e,t)}},{key:"realTimeSpeed",get:function(){return Sr}},{key:"emit",value:function(e,t){var r;null===(r=this._manager)||void 0===r||r.emit(e,t)}},{key:"destroy",value:function(){this._preload_bandwith_map=new fy,this._usepreload_info=new fy,this._pcdn_info_map=new fy,this._manager=null}}]);function Si(e,t){var r=[0,0];if(e)for(var n=0,i=e.length;n<i&&(r[0]=e.start(n),r[1]=e.end(n),!(r[0]<=t&&t<=r[1]));n++);return r[0]-t<=0&&t-r[1]<=0?r:[0,0]}function Sa(e,t,r){for(var n=0;n<e.length;n++)if(r===e[n][t])return n;return -1}var So=["vid","loadType","size","speed","cacheKey","vtype","duration","bitrate"],Su=!1,Ss=function(){var e,t,r,n,i,a;function o(){var e;return hK(this,o),(e=hz(this,o))._loaders={},e._loaderInsts={},e._taskIntervalId=0,e._currentPreloadInst=null,e._preloadDataList=[],e._player=null,e._stepwise=!1,e._playingVids=[],e._isOpen=!0,e._userDefinition=null,e._startDefinition=null,e.onPreloadNext=hF(hZ().mark(function t(){var r,n,i,a,o,u,s,c,l,f,d,h,v,p;return hZ().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=(i=e)._preloadDataList,o=i._config,!(!e._isOpen||e._currentPreloadInst||e._preloadDataList.length<1)){t.next=3;break}return t.abrupt("return",!1);case 3:if(s=null==(u=e.findPreloadItem(a,!1))?void 0:u.data,u&&null!=s&&s.payload){t.next=7;break}return t.abrupt("return",!1);case 7:if(c=e.selectBeforeStart(s),e._filterMixPayload(s,c),e.setStartDefinition(null===(r=c)||void 0===r?void 0:r.definition),e.log("log","selectBeforeStart",null===(n=c)||void 0===n?void 0:n.vtype,c),l=e._getPreloaderKey(c||s)){t.next=17;break}return e.log("warn","need to set vtype, no preloader",s),o.autoPreload&&e.emit(hx.PRELOAD_NEXT),t.abrupt("return",!1);case 17:if(f=e._getLoaderInst(l)){t.next=23;break}if(d=e._getLoader(l)){t.next=22;break}return t.abrupt("return",!1);case 22:f=new d(e,e._config);case 23:return e._currentPreloadInst=f,e._currentPreloadInst.setData(s),e._emitEvtByStart(s),t.prev=26,e.log("log","loaderInst.start",l,e.getStartDefinition(),s),t.next=30,f.start(s,e.getStartDefinition());case 30:(h=t.sent)&&h.remove&&(v=lf(a).call(a,u))>-1&&ly(a).call(a,v,1),t.next=37;break;case 34:t.prev=34,t.t0=t.catch(26),e.log("error","preload data error!",t.t0);case 37:return t.prev=37,null===(p=e._currentPreloadInst)||void 0===p||p.setData(null),e._currentPreloadInst=null,e._config.autoPreload&&e.emit(hx.PRELOAD_NEXT),t.finish(37);case 42:return t.abrupt("return",!0);case 43:case"end":return t.stop()}},t,null,[[26,34,37,42]])})),e._stats=new Sn(e),e}return hY(o,m3),hq(o,[{key:"VTYPES",get:function(){return _8}},{key:"player",get:function(){return this._player}},{key:"stepwise",get:function(){return this._stepwise}},{key:"realTimeSpeed",get:function(){return this._stats.realTimeSpeed}},{key:"currentPreloadInst",get:function(){return this._currentPreloadInst}},{key:"cacheInst",get:function(){return this._cacheInst}},{key:"preloadDataList",get:function(){return this._preloadDataList}},{key:"log",value:function(e){for(var t,r,n=arguments.length,i=Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];Su&&(r=console)[e].apply(r,s8(t=["[PreloaderManager]"]).call(t,i))}},{key:"register",value:function(e){try{if("undefined"==typeof window)return void this.log("preloader in ssr");var t=o.getDefaultConfig();this._config=sC({},t,e.config),this._options=e;var r=this._config,n=r.preloadMaxCacheCount,i=r.preloadCacheType;this._stepwise=!!this._config.stepwise,this._cacheInst=new Se(n,i),this._selector=e.BitrateSelector,this.on(hx.PRELOAD_NEXT,this.onPreloadNext);for(var a=e.loaders,u=0;u<a.length;u++)this.registerLoader(a[u].vtype,a[u])}catch(e){this.log("register error",e)}}},{key:"registerLoader",value:function(e,t){e&&(this._loaders[e]&&this.log("warn","vtype:".concat(e," Preloader already exist")),this._loaders[e]=t,this._loaderInsts[e]=new t(this,this._config))}},{key:"_checkIfCanPreload",value:function(){if(null===this._currentPreloadInst&&this._preloadDataList.length>0){var e=this.findPreloadItem(this._preloadDataList),t=null==e?void 0:e.data;if(this._wipPreloadTask=e,e&&null!=t&&t.payload){if(!this._getPreloaderKey(t))return this.log("warn","need to set vtype"),this.stopCheckTask(),!1;var r=this._config.checkIfCanPreload;return r&&"function"==typeof r?r(t):this._config.autoCheckPreload?this._autoCheckPreload(t,e):(this.stopCheckTask(),!1)}}return!1}},{key:"_autoCheckPreload",value:function(e,t){return this._player?function(e,t,r){if(!e)return!1;var n=Si(e.buffered,e.currentTime),i=t.startPreloadControl,a=t.startPreloadMinBuffer,o=t.startPreloadMinPosTime,u=t.minBufferLength;if(i){var s=Math.max(n[1]-e.currentTime,0);if("number"==typeof a&&s>a){if("number"==typeof o&&e.currentTime>o||e.currentTime>e.duration/2)return null==r||r("log","[checkIfStartPreload] hit buffer",s,"startPreloadMinBuffer",a),!0}else if(e.currentTime+a+1>e.duration&&e.currentTime+s>e.duration-1)return null==r||r("log","[checkIfStartPreload] hit end"),!0}else{var c="number"==typeof u&&e.duration>u+5?u:e.duration/2,l=Math.min(e.currentTime+u,e.duration),f=n[1]-l;if(e.currentTime>c&&f>-1)return null==r||r("log","[checkIfStartPreload] hit minPos",c,"minCacheTime",l),!0}return!1}(this._player,this._config,this.log):(this.log("warn","need set video"),!1)}},{key:"_getPreloaderKey",value:function(e){return e.vtype?e.vtype.toUpperCase():""}},{key:"_sort",value:function(e){fU(e).call(e,function(e,t){return void 0===e.order&&void 0===t.order||"number"==typeof e.order&&"number"==typeof t.order&&e.order<t.order?-1:1})}},{key:"_addPlayingVid",value:function(e,t){var r=this._playingVids,n=Sa(this._playingVids,"playerId",e);n>-1?r[n].vid=t:r.push({vid:t,playerId:e})}},{key:"selectBeforeStart",value:function(e){var t=e.targetDefinition,r=e.defaultDefinition;if(t)return h$({},t);var n=this.getUserSelectDefinition(),i=this.selectBitrate(null==e?void 0:e.payload,r,n),a=(null==i?void 0:i.vtype)||e.vtype,o=h$(h$({},i),{},{vtype:a});return e.targetDefinition=o,this.log("log","selectBeforeStart",null==e?void 0:e.vid,a,null==i?void 0:i.definition,null==e?void 0:e.payload,i),o}},{key:"selectBitrate",value:function(e,t,r){if(e.length<1)return null;var n,i,a,o=null;if(this._selector)o=this._selector.getSuitableBitrate(e,r),this.log("log","BitRateAdapter result",null===(n=o)||void 0===n?void 0:n.vtype,null===(i=o)||void 0===i?void 0:i.definition,null===(a=o)||void 0===a?void 0:a.bitrate);else{for(var u=-1,s=-1,c=0;c<e.length;c++){var l=e[c];r&&l.definition===r?u=c:t&&l.definition===t&&(s=c)}o=e[u>=0?u:s>=0?s:0]}return h$({},o)}},{key:"startCheckTask",value:function(){var e=this,t=this._preloadDataList,r=this._currentPreloadInst,n=this._config.autoCheck;(this._taskIntervalId&&(clearTimeout(this._taskIntervalId),this._taskIntervalId=0),null!=r&&r.taskInProgress&&function(e,t,r){var n=t.endPreloadControl,i=t.endPreloadMinBuffer,a=t.startPreloadMinBuffer;if(!e)return!1;if(n){if("number"==typeof a&&e.currentTime+a>=e.duration)return!1;var o,u=Math.max(Si(e.buffered,e.currentTime)[1]-e.currentTime,0);if(u<=i)return null==r||r("log","[checkIfCancelPreload] hit buffer:",u,"endPreloadMinBuffer:",i,"video:",s8(o="".concat(e.currentTime,"/")).call(o,e.duration)),!0}return!1}(this._player,this._config,this.log))?this.cancelPreloadingTask():0!==t.length&&(this._checkIfCanPreload()&&this.onPreloadNext(),this._taskIntervalId=d9(function(){e.startCheckTask()},n.interval))}},{key:"cancelPreloadingTask",value:function(){var e,t=this._preloadDataList,r=this._wipPreloadTask,n=this._config.endPreloadTaskStrategy;this.cancel(),r&&(this.stepwise?"number"==typeof(null===(e=r.data)||void 0===e?void 0:e.stepIdx)&&r.data.stepIdx>-1&&r.data.stepIdx--:0!==n&&t.unshift(r),this._emitEvtByCancel(r.data),this._wipPreloadTask=void 0)}},{key:"stopCheckTask",value:function(){this._taskIntervalId&&(clearTimeout(this._taskIntervalId),this._taskIntervalId=-1)}},{key:"getPreloadMetaByVid",value:function(e,t){for(var r=this.getAllCachedDataKeys(),n=[],i="",a=0;a<r.length;a++){var u=r[a],s=o.parseKey(u);s.vid===e&&(i=s.vtype,null!=t&&t.vtype&&t.vtype!==i||n.push(u))}if(0===n.length)return null;var c=this._getLoaderInst(i);return c?c.parseKey(n):null}},{key:"preloadNext",value:function(){this.onPreloadNext()}},{key:"_filterMixPayload",value:function(e,t){var r=t.vtype;if(r&&cp(e.payload)){var n,i=e.vtype===r;e.vtype=r,e.payload=cC(n=e.payload).call(n,function(e){return e.vtype===r||i})}}},{key:"_emitEvtByStart",value:function(e){var t=this._player;if(e&&t)try{this.emit(hx.PRELOAD_START,this._getEventPayload(e,t))}catch(e){this.log("warn","preload emit start error",null==e?void 0:e.stack)}}},{key:"_emitEvtByCancel",value:function(e){var t=this._player;if(e&&t)try{this.emit(hx.PRELOAD_CANCEL,this._getEventPayload(e,t))}catch(e){this.log("warn","preload emit cancel error",null==e?void 0:e.stack)}}},{key:"_getEventPayload",value:function(e,t){var r=t.config.vid,n=this._config,i=n.minBufferLength,a=n.startPreloadControl,o=n.startPreloadMinBuffer,u=n.startPreloadMinPosTime,s=n.endPreloadMinBuffer,c=n.endPreloadControl,l=Si(t.video.buffered,t.currentTime),f=l[1]?l[1]-t.currentTime:0;return{vid:r,pid:e.vid,buffer:l,bufferHead:f,currentTime:t.currentTime,minBufferLength:i,startPreloadControl:a,startPreloadMinBuffer:o,startPreloadMinPosTime:u,endPreloadControl:c,endPreloadMinBuffer:s}}},{key:"addPreloadList",value:(a=hF(hZ().mark(function e(t){var r,n,i;return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this._sort(t),r=hH(t),e.prev=2,r.s();case 4:if((n=r.n()).done){e.next=10;break}return i=n.value,e.next=8,this._addData(i);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),r.e(e.t0);case 15:return e.prev=15,r.f(),e.finish(15);case 18:this._checkAutoTask();case 19:case"end":return e.stop()}},e,this,[[2,12,15,18]])})),function(e){return a.apply(this,arguments)})},{key:"addPlayingId",value:function(e,t){for(var r=this._preloadDataList,n=-1,i=0;i<r.length;i++)if(e===r[i].data.vid){n=i;break}if(n>-1){var a=ly(r).call(r,n,1);this.log("log","cancelPreloadByVid remove from list",a.length>0&&a[0].data.vid)}var o=this._currentPreloadInst,u=o?o.getData():null;this.log("log","_currentPreloadInst",u),u&&u.vid===e&&this.cancel(),t&&this._addPlayingVid(t,e)}},{key:"removePlayingId",value:function(e){var t=this._playingVids,r=Sa(t,"playerId",e);if(r>-1){var n=ly(t).call(t,r,1);this.log("log","removePlayingId",n.length>0&&n[0].playerId)}}},{key:"addPreload",value:(i=hF(hZ().mark(function e(t){return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._addData(t);case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:this._sort(this._preloadDataList),this._checkAutoTask();case 7:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"_addData",value:(n=hF(hZ().mark(function e(t){var r,n,i,a,o,u,s,c,l,f=this;return hZ().wrap(function(e){for(var d,h;;)switch(e.prev=e.next){case 0:if(t.data.vtype){e.next=3;break}return this.log("warn","vtype is null, can\xb7t select loader"),e.abrupt("return",!1);case 3:if(r=t.data,n=this._getLoader(r.vtype)){e.next=8;break}return this.log("warn","the loader for ".concat(r.vtype," not registered")),e.abrupt("return",!1);case 8:if(!((a=Sa(i=this._playingVids,"vid",t.data.vid))>=0)){e.next=14;break}return o=i[a],this.log("log",s8(d="vid:".concat(o.vid," is already instantiated and loaded, playerId is ")).call(d,o.playerId)),e.abrupt("return");case 14:return u=this._getUniqueKey(t),e.next=17,this.getItem(t.data,!0);case 17:if(!(s=e.sent)||!n.isUniqueCache(s)){e.next=22;break}return this.log("log","".concat(u," already exist in cache")),e.abrupt("return",!1);case 22:if(!this._currentPreloadInst||!(c=this._currentPreloadInst.getData())||this._getUniqueKey({data:c,order:0})!==u){e.next=29;break}return this.log("log","currentKey repeat"),e.abrupt("return");case 29:if(l=cC(h=this._preloadDataList).call(h,function(e){return f._getUniqueKey(e)===u}),this.log("log","addedItems",u,l),0!==l.length){e.next=35;break}return this._stepwise&&void 0===t.data.steps&&(t.data.steps=[0]),this._preloadDataList.push(t),e.abrupt("return",!0);case 35:return this.log("log","".concat(u," already exist in preloadList")),e.abrupt("return",!1);case 37:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"_getUniqueKey",value:function(e){return e.data.vtype?o.generateUniqueCacheKey(e.data):e.data.vid}},{key:"_checkAutoTask",value:function(){var e=this,t=this._config,r=t.autoCheck,n=t.autoPreload;cS.resolve().then(function(){n&&e.emit(hx.PRELOAD_NEXT),null!=r&&r.enable&&!e._taskIntervalId&&e.startCheckTask()})}},{key:"setItem",value:function(e,t,r,n){var i=o.generateUniqueCacheKey(e);if(!r){var a=this._getLoader(e.vtype);if(!a)return this.log("warn","no ".concat(e.vtype," preloader, register")),cS.resolve(!1);t=hG({},a.generateUniqueKey(e),t)}return this._cacheInst.setItem(i,t,n)}},{key:"getItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=o.generateUniqueCacheKey(e),i=this._getLoader(e.vtype);if(!i)return this.log("warn","no ".concat(e.vtype," preloader, register")),cS.resolve(!1);var a=t?"":i.generateUniqueKey(e);return this._cacheInst.getItem(n,r,a)}},{key:"getItemSync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=o.generateUniqueCacheKey(e),i=this._getLoader(e.vtype);if(!i)return this.log("warn","no ".concat(e.vtype," preloader, register")),!1;var a=t?"":i.generateUniqueKey(e);return this._cacheInst.getItemSync(n,r,a)}},{key:"supportSync",value:function(){return this._cacheInst.supportSync()}},{key:"removeItem",value:function(e,t){var r=o.generateUniqueCacheKey(e);return this._cacheInst.removeItem(r,t)}},{key:"getPreLoadData",value:(r=hF(hZ().mark(function e(t){var r,n,i;return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.vtype,!(n=this._getLoaderInst(r))){e.next=7;break}return e.next=5,n.getPreLoadData(t);case 5:return i=e.sent,e.abrupt("return",i);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"getPreLoadDataSync",value:function(e){var t=e.vtype,r=this._getLoaderInst(t);return r?r.getPreLoadDataSync(e):null}},{key:"removeAll",value:function(){var e=this,t=this.getAllCachedDataKeys();cb(t).call(t,function(t){var r=e.getPreloadMetaByVid(t.split("#")[0]);r&&e.removeItem(r,null)})}},{key:"removeAllPreloadTask",value:function(){this.cancel(),this._preloadDataList=[],this._playingVids=[]}},{key:"disable",value:function(){this._isOpen=!1,this.stopCheckTask()}},{key:"enable",value:function(){this._isOpen=!0,this._config.autoCheck.enable&&!this._taskIntervalId&&this._preloadDataList.length>0&&this.startCheckTask()}},{key:"setUserSelectDefinition",value:function(e){this._userDefinition=e}},{key:"getUserSelectDefinition",value:function(){return this._userDefinition||null}},{key:"getStartDefinition",value:function(){return this._startDefinition}},{key:"setStartDefinition",value:function(e){this._startDefinition=e}},{key:"destroy",value:(t=hF(hZ().mark(function e(){var t,r,n,i;return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this._stats.destroy(),t=cw(this._loaderInsts),r=0;case 3:if(!(r<t.length)){e.next=12;break}if(n=t[r],!(i=this._getLoaderInst(n))){e.next=9;break}return e.next=9,i.destroy();case 9:r++,e.next=3;break;case 12:this.removeAllListeners(),this._loaderInsts={},this._loaders={},this._playingVids=[],this.detachPlayer();case 17:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"cancel",value:(e=hF(hZ().mark(function e(){var t;return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._currentPreloadInst){e.next=4;break}return e.next=3,this._currentPreloadInst.cancel();case 3:null===(t=this._currentPreloadInst)||void 0===t||t.setData(null);case 4:this._currentPreloadInst=null;case 5:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"removeByPlayInst",value:function(e,t){for(var r=this._preloadDataList.length-1;r>-1;r--){var n,i=this._preloadDataList[r];if(i.data.vid===e&&i.playerId===t){ly(n=this._preloadDataList).call(n,r,1);break}}}},{key:"getAllCachedDataKeys",value:function(){var e;return(null===(e=this._cacheInst)||void 0===e?void 0:e.getAllCachedDataKeys())||[]}},{key:"getDataUniqueKey",value:function(e){var t=this._getLoader(e.vtype);return!!t&&t.generateUniqueKey(e)}},{key:"hasItemSameVid",value:function(e){var t=this._getLoader(e.vtype),r=this._getLoaderInst(e.vtype);if(t&&r){var n=t.generateUniqueKey(e);return r.hasItemSameVid(n)}return!1}},{key:"_getLoader",value:function(e){return e=e||"",this._loaders[e]||this._loaders[e.toLocaleLowerCase()]||(this.log("warn","no ".concat(e," preloader, register")),null)}},{key:"_getLoaderInst",value:function(e){return e=e||"",this._loaderInsts[e]||this._loaderInsts[e.toLocaleLowerCase()]||(this.log("warn","no ".concat(e," preloader, register")),null)}},{key:"getPreloadMemoryInfo",value:function(){return this._cacheInst.getMemoryInfo()}},{key:"attachPlayer",value:function(e){this._player=e}},{key:"detachPlayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&this._player!==e||(this._player=null)}},{key:"setPreloadBandwidth",value:function(e,t){this._stats.setPreloadBandwidth(e,t)}},{key:"getPreloadBandwidth",value:function(e){return this._stats.getPreloadBandwidth(e)}},{key:"getLoadInfoAndDelete",value:function(e){return this._stats.getLoadInfoAndDelete(e)}},{key:"getPreloadUnuseInfo",value:function(){return this._stats.getPreloadUnuseInfo()}},{key:"setUsePreloadInfo",value:function(e,t){this._stats.setUsePreloadInfo(e,t)}},{key:"bwEventEmit",value:function(e){var t=e.vid,r=e.loadType,n=e.size,i=e.speed,a=e.cacheKey,o=e.vtype,u=e.duration,s=e.bitrate,c=hJ(e,So);this._stats.bwEventEmit(h$({vid:t,loadType:r,size:n,speed:i,cacheKey:a,vtype:o,duration:u,bitrate:s},c))}},{key:"findPreloadItem",value:function(e){var t,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._stepwise){var n=cD(e).call(e,function(e,t){return void 0===t.data.stepIdx||"number"==typeof t.data.stepIdx&&"number"==typeof e.data.stepIdx&&t.data.stepIdx<e.data.stepIdx?t:e}),i=cC(e).call(e,function(e){return e.data.stepIdx===n.data.stepIdx});if(i.length>1&&this._sort(i),t=i[0],!r){if("number"!=typeof t.data.stepIdx&&(t.data.stepIdx=-1),t.data.stepIdx++,cp(t.data.steps)&&t.data.stepIdx>=t.data.steps.length-1){var a=lf(e).call(e,t);ly(e).call(e,a,1)}t.data.stepIdx===1/0&&(t=void 0)}}else t=r?e[0]:e.shift();return t}},{key:"updateConfig",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this._config=sC({},o.getDefaultConfig(),e):sC(this._config,e);var t=this._config.autoCheck;t&&!t.enable&&this.stopCheckTask(),t&&t.enable&&this.startCheckTask()}},{key:"preProcessUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this._config,n=r.preProcessUrl,i=r.preProcessUrlOptions;return"function"==typeof n?n(e,sC({},i,t)):{url:e}}}],[{key:"getDefaultConfig",value:function(){return{autoPreload:!1,autoCheck:{enable:!1,interval:1e3},preloadMaxCacheCount:5,preloadCacheType:hT.MEMORY,autoCheckPreload:!0,startPreloadControl:!1,startPreloadMinBuffer:5,startPreloadMinPosTime:5,minBufferLength:5,endPreloadControl:!1,endPreloadTaskStrategy:0}}},{key:"generateUniqueCacheKey",value:function(e){var t,r,n=e.vid,i=e.codecType,a=e.vtype;return s8(t=s8(r="".concat(n,"#")).call(r,i,"#")).call(t,a.toUpperCase())}},{key:"parseKey",value:function(e){if(!e)throw Error("key ".concat(e," is empty"));var t=e.split("#");if(t.length<6)throw Error("key ".concat(e," is not right format"));return{vid:t[0],mediaType:t[1],codecType:t[2],vtype:t[3],definition:t[4],bitrate:cX("".concat(t[5]||0),10)||0}}},{key:"debugger",set:function(e){Su=!!e}}])}(),Sc=function(){var e,t,r,n;function i(e,t){var r;return hK(this,i),(r=hz(this,i))._data=null,r.preloadManager=e,r._config=t,r.promisePolyfill(),r}return hY(i,m3),hq(i,[{key:"taskInProgress",get:function(){return!1}},{key:"stepwise",get:function(){return this.preloadManager.stepwise}},{key:"getRequestOption",value:function(e){var t=this._config,r=t.getRequestOptionsCallback,n=t.reqOptions,i={};return e?i=e.reqOptions?e.reqOptions:"function"==typeof r?r(e):n||{}:i}},{key:"getUserSelectDefinition",value:function(){return this.preloadManager.getUserSelectDefinition()}},{key:"selectBitrate",value:function(e,t,r){return this.preloadManager.selectBitrate(e,t,r)}},{key:"promisePolyfill",value:function(){cS.prototype.finally||(cS.prototype.finally=({finally:function(e){var t=function(t){return cS.resolve(e()).then(t)};return this.then(function(e){return t(function(){return e})},function(e){return t(function(){return cS.reject(e)})})}}).finally)}},{key:"getData",value:function(){return this._data}},{key:"setData",value:function(e){this._data=e}},{key:"start",value:(n=hF(hZ().mark(function e(t,r){return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:throw Error("start need implement, return Promise");case 1:case"end":return e.stop()}},e)})),function(e,t){return n.apply(this,arguments)})},{key:"cancel",value:(r=hF(hZ().mark(function e(){return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:throw Error("cancel need implement, cancel current preload request");case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"getPreLoadData",value:(t=hF(hZ().mark(function e(t){return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:throw Error("getPreLoadData not implement");case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"getPreLoadDataSync",value:function(e){return null}},{key:"hasItemSameVid",value:function(e){return!0}},{key:"destroy",value:(e=hF(hZ().mark(function e(){return hZ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",cS.resolve());case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"parseKey",value:function(e){return Ss.parseKey(e[0])}}],[{key:"generateUniqueKey",value:function(e){throw Error("generateUniqueCacheKey need implement, return string")}},{key:"vtype",get:function(){throw Error("need vtype")}},{key:"isUniqueCache",value:function(e){return!0}}])}();function Sl(e){return(null==e?void 0:e.preLoadMeta)||{}}var Sf=((o=Sf||{})[o.NORMAL=0]="NORMAL",o[o.FEED=1]="FEED",o),Sd=new(function(){var e,t;function r(){sv(this,r),sf(this,"isRegistered",!1),sf(this,"initPromise",void 0),sf(this,"_inst",void 0),sf(this,"_tracker",void 0),sf(this,"pendingLoadList",[]),sf(this,"prevCount",1),sf(this,"nextCount",2),sf(this,"preloadScene",Sf.NORMAL)}return sg(r,[{key:"bitrateSelector",get:function(){var e;return null===(e=this._inst)||void 0===e?void 0:e._selector}},{key:"prepare",value:(t=uj(uM().mark(function e(t){var r;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isRegistered){e.next=1;break}return e.abrupt("return",!0);case 1:return this.initPromise||(this.initPromise=this._init(t)),e.next=2,null!==(r=this.initPromise)&&void 0!==r&&r;case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"register",value:function(e){if(!this.isRegistered){var t=sh(sh({},e),{},{preloadScene:(null==e?void 0:e.preloadScene)||Sf.NORMAL});this._register(this._adaptPreloadConfig(t)),this.isRegistered=!0,this.trackPreloadData()}}},{key:"inst",value:function(){return this._inst}},{key:"addPreloadList",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isRegistered){if(null==r||!r.delayAdd)return this._addPreloadList(e);if(Sf.FEED!==this.preloadScene)return Sf.NORMAL===this.preloadScene?this._addPreloadList(e):void 0;this.pendingLoadList=s8(t=this.pendingLoadList).call(t,null!=e?e:[])}}},{key:"setPreloadList",value:function(e){if(this.isRegistered){if(Sf.FEED!==this.preloadScene)return Sf.NORMAL===this.preloadScene?this._addPreloadList(e):void 0;this.pendingLoadList=null!=e?e:[]}}},{key:"clearPreloadList",value:function(){this.pendingLoadList=[]}},{key:"attachPlayer",value:function(e){var t,r;e&&this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(r=t.attachPlayer)||void 0===r||r.call(t,e))}},{key:"detachPlayer",value:function(e){var t,r;this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(r=t.detachPlayer)||void 0===r||r.call(t,e))}},{key:"configure",value:function(e){return this.updateConfig(e)}},{key:"setPreloadScene",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.preloadScene,t=arguments.length>1?arguments[1]:void 0;return this.preloadScene!==e&&this.clearPreloadList(),this.updateConfig(sh({preloadScene:e},null!=t?t:{}))}},{key:"removeAll",value:function(){var e,t;return null===(e=this._inst)||void 0===e||null===(t=e.removeAll)||void 0===t?void 0:t.call(e)}},{key:"removeAllPreloadTask",value:function(){var e,t;return this.pendingLoadList=[],null===(e=this._inst)||void 0===e||null===(t=e.removeAllPreloadTask)||void 0===t?void 0:t.call(e)}},{key:"bindTracker",value:function(e){this._tracker=e}},{key:"checkPreloadData",value:function(e){var t;if(null!==(t=this.pendingLoadList)&&void 0!==t&&t.length&&e){var r=this._recPreloadList(e);null!=r&&r.length&&this._addPreloadList(r)}}},{key:"checkPreloadDataExist",value:function(e){var t,r=Sl(fK(e));return!!(null===(t=this._inst)||void 0===t?void 0:t.hasItemSameVid(r))}},{key:"addPlayingId",value:function(e,t){var r;null===(r=this._inst)||void 0===r||r.addPlayingId(e,t)}},{key:"removePlayingId",value:function(e){var t;null===(t=this._inst)||void 0===t||t.removePlayingId(e)}},{key:"getDataUniqueKey",value:function(e){var t;return null===(t=this._inst)||void 0===t?void 0:t.getDataUniqueKey(e)}},{key:"getPreloadMetaByVid",value:function(e,t){var r;return null===(r=this._inst)||void 0===r?void 0:r.getPreloadMetaByVid(e,t)}},{key:"getPreloadDataInfo",value:function(e){var t,r,n=fK(e),i=Sl(n),a=!1,o="DASH"===n.vtype;o&&(i={vid:fq(e),vtype:n.vtype,codecType:n.codecType},a=!0);var u=null===(t=this._inst)||void 0===t?void 0:t.getItemSync(i,a),s=[];if(u&&(null===(r=u)||void 0===r||null===(r=r.buffer)||void 0===r?void 0:r.byteLength)>0)s.push({type:"mixed",start:0,data:u.buffer,dur:u.duration||0});else if(o){var c,l={audioDuration:0,byteLength:0,preloadTime:0};cb(c=cw(u)).call(c,function(e){var t=u[e],r=t.isInitSegment;l.byteLength+=t.res.byteLength,"video"===t.mediaType?l.preloadTime+=t.duration||0:l.audioDuration+=t.duration||0,s.push({type:"mixed",start:0,data:t.res,dur:r?0:t.duration||5,cacheKey:e,range:t.range})}),u=l}return{preloadData:u,preloadDataList:s}}},{key:"getCachedBitrate",value:function(e){var t,r,n=e.config,i=(n.shared||n).definition,a=(null==i?void 0:i.list)||[],o=null==i?void 0:i.userSelectDefinition,u=null==i?void 0:i.focusUserDefinition,s=n.vid||(null===(t=n.baseConfig)||void 0===t||null===(t=t.mediaInfo)||void 0===t?void 0:t.vid)||(null===(r=n.baseConfig)||void 0===r||null===(r=r.mediaInfo)||void 0===r?void 0:r.id)||"",c=null;if(a.length>0){var l=this.getPreloadMetaByVid(s);if(l){var f=this.getDataUniqueKey(l),d=function(e,t){for(var r,n=e.vtype,i=e.codecType,a=e.definition,o=e.bitrate,u=null,s=0;r=t[s];s++){var c=r.vtype===n;if(c&&(c=r.codecType===i),c&&(c=r.definition===a||r.definition===Number(a)),c&&(c=!r.bitrate||!o||Number(r.bitrate)===Number(o)),c){u=r;break}}return u}(l,a);d&&(d.cacheKey=f,(c=d).type=fH.PRELOAD,c.preLoadMeta=l)}if(c&&o&&u){var h={m:1,ud:o,d:c.definition};o!==c.definition&&(c=null,h.m=1)}}return c}},{key:"_init",value:(e=uj(uM().mark(function e(t){var r,n,i;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t){e.next=2;break}return e.next=1,t();case 1:i=e.sent,e.next=3;break;case 2:i=t;case 3:if((n=i).PreloaderModule=n.PreloaderModule||Ss,null!=n&&n.PreloaderModule&&null!=n&&null!==(r=n.loaders)&&void 0!==r&&r.length){e.next=4;break}return e.abrupt("return",!1);case 4:return n.enableDebugger&&(n.PreloaderModule.debugger=n.enableDebugger),this.register(n),e.abrupt("return",!0);case 5:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"_addPreloadList",value:function(e){if(null!=e&&e.length){var t,r=null!=(t=e)&&t.length?c_(t).call(t,function(e){var t,r;if("data"in e)return e;return{order:1,data:{vid:e.vid,vtype:(null===(t=e.streamType)||void 0===t||null===(r=t.toUpperCase)||void 0===r?void 0:r.call(t))||"MP4",codecType:e.codec||"h264",payload:[{url:cp(e.url)?e.url:[{src:e.url}],bitrate:e.bitrate,definition:e.definition,duration:e.duration,size:e.size}],defaultDefinition:e.definition,bizType:0}}}):[];null!=r&&r.length&&this._addList(r)}}},{key:"trackPreloadData",value:function(){var e,t,r=this;null===(e=this._inst)||void 0===e||null===(t=e.on)||void 0===t||t.call(e,"prf_data_size",function(e){var t,n;null===(t=r._tracker)||void 0===t||null===(n=t.track)||void 0===n||n.call(t,"vestrategy_preload_prf_data_size",sh({},e))})}},{key:"_register",value:function(e){var t,n,i=this,a=e||{},o=a.playPlugins,u=a.loaders,s=a.preloader;if(Ss&&null!=u&&u.length){e.enableDebugger&&(Ss.debugger=e.enableDebugger);var c=s||(void 0!==fF?fF:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).playerPreloader;c?this._inst=c:(this._inst=new Ss,this._inst.register({config:sC({},r.defaultConfig,(null==e?void 0:e.config)||e),loaders:cC(u).call(u,function(e){return!!e}),BitrateSelector:e.BitrateSelector})),null!=o&&o.length&&cb(o).call(o,function(e){var t;null==e||null===(t=e.registerPreloader)||void 0===t||t.call(e,i._inst)}),null===(t=this._inst)||void 0===t||null===(n=t.enable)||void 0===n||n.call(t)}}},{key:"updateConfig",value:function(e){var t,r;e&&this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(r=t.updateConfig)||void 0===r||r.call(t,this._adaptPreloadConfig(e)))}},{key:"_addList",value:function(e){var t,r;null!=e&&e.length&&this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(r=t.addPreloadList)||void 0===r||r.call(t,e))}},{key:"_adaptPreloadConfig",value:function(e){var t,r,n;return this.nextCount=null!==(t=null==e?void 0:e.nextCount)&&void 0!==t?t:this.nextCount,this.prevCount=null!==(r=null==e?void 0:e.prevCount)&&void 0!==r?r:this.prevCount,void 0!==(null==e?void 0:e.preloadScene)&&cd(n=[Sf.FEED,Sf.NORMAL]).call(n,null==e?void 0:e.preloadScene)?(this.preloadScene=e.preloadScene,Sf.FEED===e.preloadScene?sh({autoPreload:!1,autoCheckPreload:!0},e):sh({autoPreload:!0,autoCheckPreload:!1},e)):sh({},e)}},{key:"_recPreloadList",value:function(e){var t,r=this.pendingLoadList;if(!e||null==r||!r.length)return[];var n=hw(r).call(r,function(t){var r;return t.vid===e||(null===(r=t.data)||void 0===r?void 0:r.vid)===e});if(-1===n)return[];var i=this.prevCount?he(r).call(r,n-this.prevCount<0?0:n-this.prevCount,n):[],a=this.nextCount?he(r).call(r,n+1,n+this.nextCount+1):[];return cC(t=s8(a).call(a,i)).call(t,function(e){return!!e})}}],[{key:"defaultConfig",get:function(){return{preloadCacheType:1,autoPreload:!0,autoCheckPreload:!1,autoCheck:{enable:!0,interval:1e3},preloadTime:5,preloadMaxCacheCount:15,startPreloadMinBuffer:5,startPreloadControl:!0,startPreloadMinPosTime:0,minBufferLength:15,segmentMinDuration:5,loadRangeType:"gop"}}}])}());function Sh(){return(Sh="undefined"!=typeof Reflect&&_4?i2(_4).call(_4):function(e,t,r){var n=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=s_(e)););return e}(e,t);if(n){var i=uJ(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}}).apply(null,arguments)}var Sv=new s7("VeStrategy-preload-plugin"),Sp=function(){function e(t){var r,n,i,a,o;return sv(this,e),sf((i=this,a=e,o=[t],a=s_(a),n=sy(i,sm()?rf(a,o||[],s_(i).constructor):a.apply(i,o))),"ctx",void 0),sf(n,"preloader",void 0),sf(n,"playerId",void 0),sf(n,"_onPlayerActiveChange",function(){n._initPreloader()}),sf(n,"_checkPreloadData",function(){var e,t,r,i;if(n.preloader&&n.player){var a=n.playerConfig,o=(null===(e=a.baseConfig)||void 0===e||null===(e=e.mediaInfo)||void 0===e?void 0:e.id)||(null===(t=a.shared)||void 0===t?void 0:t.vid);null===(r=(i=n.preloader).checkPreloadData)||void 0===r||r.call(i,o)}}),n.ctx=n.config.ctx,n.preloader=n.config.preloader,Sv.update(null===(r=n.ctx)||void 0===r||null===(r=r.dataCenter)||void 0===r||null===(r=r.getAppConfig())||void 0===r?void 0:r.log),Sv.info("PreloadPluginInitCompleted"),function(e,t){var r,n=null;try{n=(null===(r=e.getProperty)||void 0===r?void 0:r.call(e,t))||e[t]}catch(e){}return n}(n.player,"preloader")||fV(n.player,"preloader",Sd),n._bindEvents(),n}return sk(e,sP),sg(e,[{key:"beforePlayerInit",value:function(){(t=e,r="beforePlayerInit",n=this,i=3,a=Sh(s_(1&3?t.prototype:t),r,n),2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a)([]);var t,r,n,i,a,o=this.preloader,u=fq(this.player);this.playerId=this.player.playerId,this._initPreloader(),u&&this.playerId&&(null==o||o.addPlayingId(u,this.playerId));var s=this._getCachedBitrate();s&&fz(this.player,s);var c=fK(this.player);if(null!=o&&o.checkPreloadDataExist(this.player)||u&&null!=o&&o.getPreloadMetaByVid(u)&&"DASH"===c.vtype){var l=o.getPreloadDataInfo(this.player),f=l.preloadData,d=l.preloadDataList;if(cp(d)&&d.length>0){this.setBaseConfig({preloadDataInfo:{preloadDataList:d}});var h=f.byteLength||0,v=f.preloadTime||(null==d?void 0:cD(d).call(d,function(e,t){return e+(t.dur||0)},0))||0;fV(this.player,"preloadData",{byteLength:h,duration:v,audioDuration:f.audioDuration||0})}}else if(this.config.needPreloadCheck)return void this.player.emit("degrade",{category:fG.PRELOAD_NOT_HIT,errc:-1,err_msg:"preload data not exist"})}},{key:"beforeDestroy",value:function(){var e;this.playerId&&(null===(e=this.preloader)||void 0===e||e.removePlayingId(this.playerId)),this.preloader=void 0,this.playerId=void 0,this._unbindEvents()}},{key:"_bindEvents",value:function(){this.player&&this.player.on("user_active_change",this._onPlayerActiveChange)}},{key:"_unbindEvents",value:function(){this.player&&this.player.off("user_active_change",this._onPlayerActiveChange)}},{key:"_initPreloader",value:function(){var e,t,r=this.player,n=this.preloader;r.isUserActive?null==n||null===(e=n.attachPlayer)||void 0===e||e.call(n,r):null==n||null===(t=n.detachPlayer)||void 0===t||t.call(n,r),this._checkPreloadData()}},{key:"_getCachedBitrate",value:function(){var e,t=this.playerConfig,r=this.preloader,n=(t.shared||t).definition,i=(null==n?void 0:n.list)||[],a=t||n||{},o=a.userSelectDefinition,u=a.focusUserDefinition;if(null==r||!r.isRegistered)return e;if(cp(i)&&i.length>0&&(r&&(e=r.getCachedBitrate(this.player)),e&&o&&u)){var s={m:1,ud:o,d:e.definition};o!==e.definition&&(e=void 0,s.m=1)}return e}}],[{key:"pluginName",get:function(){return"AutoPreloadPlugin"}},{key:"defaultConfig",get:function(){return{}}}])}(),Sg=((u=Sg||{}).MP4="MP4",u.MP4_MSE_SOFT="MP4_MSE_SOFT",u.MP4_MSE="MP4_MSE",u.MP4_0="MP4_0",u.MP4_1="MP4_1",u.MP4_2="MP4_2",u.DASH="DASH",u.HLS="HLS",u),Sy=((s=Sy||{})[s.AVC=0]="AVC",s[s.HEVC=1]="HEVC",s[s.VVC=2]="VVC",s.H264="h264",s.H265="h265",s.H266="h266",s),Sm={CDN:"cdn",PCDN:"pcdn"};function S_(e,t){var r=cw(e);if(hR){var n=hR(e);t&&(n=cC(n).call(n,function(t){return hA(e,t).enumerable})),r.push.apply(r,n)}return r}function Sb(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cb(r=S_(Object(i),!0)).call(r,function(t){SP(e,t,i[t])}):hD?hM(e,hD(i)):cb(n=S_(Object(i))).call(n,function(t){ck(e,t,hA(i,t))})}return e}function Sk(){Sk=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=ck||function(e,t,r){e[t]=r.value},i="function"==typeof hI?hI:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return ck(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,i){var a=hL((t&&t.prototype instanceof d?t:d).prototype);return n(a,"_invoke",{value:function(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var u=function e(t,r){var n=r.method,i=t.iterator[n];if(void 0===i)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=void 0,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),f;var a=l(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,f)}(o,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(e,r,new w(i||[]))}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f={};function d(){}function h(){}function v(){}var p={};s(p,a,function(){return this});var g=hO&&hO(hO(S([])));g&&g!==t&&r.call(g,a)&&(p=g);var y=v.prototype=d.prototype=hL(p);function m(e){var t;cb(t=["next","throw","return"]).call(t,function(t){s(e,t,function(e){return this._invoke(t,e)})})}function _(e,t){var i;n(this,"_invoke",{value:function(n,a){function o(){return new t(function(i,o){!function n(i,a,o,u){var s=l(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==uA(f)&&r.call(f,"__await")?t.resolve(f.__await).then(function(e){n("next",e,o,u)},function(e){n("throw",e,o,u)}):t.resolve(f).then(function(e){c.value=e,o(c)},function(e){return n("throw",e,o,u)})}u(s.arg)}(n,a,i,o)})}return i=i?i.then(o,o):o()}})}function b(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 w(e){this.tryEntries=[{tryLoc:"root"}],cb(e).call(e,b,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=v,n(y,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:h,configurable:!0}),h.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return hP?hP(e,v):(e.__proto__=v,s(e,u,"GeneratorFunction")),e.prototype=hL(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),s(_.prototype,o,function(){return this}),e.AsyncIterator=_,e.async=function(t,r,n,i,a){void 0===a&&(a=cS);var o=new _(c(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},m(y),s(y,u,"Generator"),s(y,a,function(){return this}),s(y,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return lm(r).call(r),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,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,cb(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+he(n).call(n,1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Sw(e){return(Sw="function"==typeof hI&&"symbol"==typeof hj?function(e){return typeof e}:function(e){return e&&"function"==typeof hI&&e.constructor===hI&&e!==hI.prototype?"symbol":typeof e})(e)}function SS(e,t,r,n,i,a,o){try{var u=e[a](o),s=u.value}catch(e){return void r(e)}u.done?t(s):cS.resolve(s).then(n,i)}function ST(e){return function(){var t=this,r=arguments;return new cS(function(n,i){var a=e.apply(t,r);function o(e){SS(a,n,i,o,u,"next",e)}function u(e){SS(a,n,i,o,u,"throw",e)}o(void 0)})}}function Sx(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function SI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),ck(e,SU(n.key),n)}}function SC(e,t,r){return t&&SI(e.prototype,t),r&&SI(e,r),ck(e,"prototype",{writable:!1}),e}function SP(e,t,r){return(t=SU(t))in e?ck(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SE(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=hL(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),ck(e,"prototype",{writable:!1}),t&&SL(e,t)}function SO(e){return(SO=hP?hE(hO).call(hO):function(e){return e.__proto__||hO(e)})(e)}function SL(e,t){return(SL=hP?hE(hP).call(hP):function(e,t){return e.__proto__=t,e})(e,t)}function SR(){if("undefined"==typeof Reflect||!rf||rf.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(rf(Boolean,[],function(){})),!0}catch(e){return!1}}function SA(e,t,r){return(SA=SR()?hE(rf).call(rf):function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(hE(Function).apply(e,n));return r&&SL(i,r.prototype),i}).apply(null,arguments)}function SD(e){var t="function"==typeof fy?new fy:void 0;return(SD=function(e){var r,n;if(null===e||(r=e,-1===lf(n=Function.toString.call(r)).call(n,"[native code]")))return e;if("function"!=typeof e)throw 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 SA(e,arguments,SO(this).constructor)}return i.prototype=hL(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),SL(i,e)})(e)}function SM(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SB(e){var t=SR();return function(){var r,n=SO(e);return r=t?rf(n,arguments,SO(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===uA(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return SM(e)}(this,r)}}function Sj(){return(Sj="undefined"!=typeof Reflect&&_3?hE(_3).call(_3):function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=SO(e)););return e}(e,t);if(n){var i=hA(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}}).apply(this,arguments)}function SN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function SU(e){var t=function(e,t){if("object"!==uA(e)||null===e)return e;var r=e[hB];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==uA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===uA(t)?t:String(t)}var SF={DEBUG:1,LOG:2,WARN:3,ERROR:4},Sz=["Boolean","Number","String","Undefined","Null","Date","Object"],SK=function(){function e(t,r){Sx(this,e),this.name=t||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==r?void 0:r.logCacheLevel)||3,this.logMaxSize=(null==r?void 0:r.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}return SC(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,s8(t=[SF.DEBUG]).call(t,a)),e.disabled||(n=console).debug.apply(n,s8(r=[this._prefix,SV()]).call(r,a))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,s8(t=[SF.LOG]).call(t,a)),e.disabled||(n=console).log.apply(n,s8(r=[this._prefix,SV()]).call(r,a))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,s8(t=[SF.WARN]).call(t,a)),e.disabled||(n=console).warn.apply(n,s8(r=[this._prefix,SV()]).call(r,a))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];this.logCache.apply(this,s8(t=[SF.ERROR]).call(t,a)),e.disabled||(n=console).error.apply(n,s8(r=[this._prefix,SV()]).call(r,a))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var a=c_(n).call(n,function(e){return function e(t,r,n){n||(n=1),r||(r=2);var i,a={};if(!t||"object"!==Sw(t))return t;var o=he(i=Object.prototype.toString.call(t)).call(i,8,-1);if(!cd(Sz).call(Sz,o))return o;if(!(n>r)){for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(n===r?a[u]=function(e){if("object"!==Sw(e))return e;var t,r=he(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}(t[u]):"object"===Sw(t[u])?a[u]=e(t[u],r,n+1):a[u]=t[u]);return a}}(e)});t=this._prefix+SV()+s$(a)}catch(e){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var o=this.logTextArray.shift();this.logSize-=o.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(t=console).table.apply(t,arguments)}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function SV(){return(new Date).toLocaleString()}SP(SK,"disabled",!0);var Sq={FETCH:"fetch",XHR:"xhr"},SH={ARRAY_BUFFER:"arraybuffer",TEXT:"text",JSON:"json"},SG=function(){SE(t,SD(Error));var e=SB(t);function t(r,n,i,a){var o;return Sx(this,t),SP(SM(o=e.call(this,a)),"retryCount",0),SP(SM(o),"isTimeout",!1),SP(SM(o),"loaderType",Sq.FETCH),SP(SM(o),"startTime",0),SP(SM(o),"endTime",0),SP(SM(o),"options",{}),o.url=r,o.request=n,o.response=i,o}return SC(t)}(),SW=Object.prototype.toString;function SY(e){if("[object Object]"!==SW.call(e))return!1;var t=hO(e);return null===t||t===Object.prototype}function SX(e){if(e&&null!==e[0]&&void 0!==e[0]&&(0!==e[0]||null!==e[1]&&void 0!==e[1])){var t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}}function SQ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function S$(e,t){var r,n;if(e){if(!t)return e;var i,a=cC(r=c_(n=cw(t)).call(n,function(e){if(null!=(i=t[e]))return cp(i)?e+="[]":i=[i],c_(i).call(i,function(t){var r,n,i;return(n=t,"[object Date]"===SW.call(n))?t=t.toISOString():null!==(i=t)&&"object"===Sw(i)&&(t=s$(t)),s8(r="".concat(SQ(e),"=")).call(r,SQ(t))}).join("&")})).call(r,Boolean).join("&");if(a){var o=lf(e).call(e,"#");-1!==o&&(e=he(e).call(e,0,o)),e+=(-1===lf(e).call(e,"?")?"?":"&")+a}return e}}function SJ(e,t,r,n,i,a,o,u,s,c,l){return i=null!=i?c7(i):null,kL(n=cX(n||"0",10))&&(n=0),{data:e,done:t,options:{range:s,vid:c,index:u,contentLength:n,age:i,startTime:a,firstByteTime:o,endTime:s1(),priOptions:l},response:r}}function SZ(e,t){return Math.round(8*e*1e3/t/1024)}var S0={REAL_TIME_SPEED:"real_time_speed"},S1=function(){SE(r,m3);var e,t=SB(r);function r(){var e;return Sx(this,r),SP(SM(e=t.call(this)),"_abortController",null),SP(SM(e),"_timeoutTimer",null),SP(SM(e),"_reader",null),SP(SM(e),"_response",null),SP(SM(e),"_aborted",!1),SP(SM(e),"_index",-1),SP(SM(e),"_range",null),SP(SM(e),"_receivedLength",0),SP(SM(e),"_running",!1),SP(SM(e),"_logger",null),SP(SM(e),"_vid",""),SP(SM(e),"_onProcessMinLen",0),SP(SM(e),"_onCancel",null),SP(SM(e),"_priOptions",null),SP(SM(e),"_processMaxGapTime",1/0),e}return SC(r,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,a=e.timeout,o=e.responseType,u=e.onProgress,s=e.index,c=e.onTimeout,l=e.onCancel,f=e.range,d=e.transformResponse,h=e.request,v=e.params,p=e.logger,g=e.method,y=e.headers,m=e.body,_=e.mode,b=e.credentials,k=e.cache,w=e.redirect,S=e.referrer,T=e.referrerPolicy,x=e.onProcessMinLen,I=e.processMaxGapTime,C=e.priOptions;this._logger=p,this._aborted=!1,this._onProcessMinLen=x,this._onCancel=l,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._receivedLength=0,this._index=s,this._range=f||[0,0],this._vid=i||n,this._priOptions=C||{},this._processMaxGapTime=I;var P={method:g,headers:y,body:m,mode:_,credentials:b,cache:k,redirect:w,referrer:S,referrerPolicy:T,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},E=!1;clearTimeout(this._timeoutTimer),n=S$(n,v);var O=SX(f);O&&(y=h?h.headers:P.headers=P.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",O):y.Range=O),a&&(this._timeoutTimer=d9(ST(Sk().mark(function e(){var t;return Sk().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return E=!0,e.next=3,r.cancel();case 3:c&&((t=new SG(n,P,null,"timeout")).isTimeout=!0,c(t,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions}));case 4:case"end":return e.stop()}},e)})),a));var L=s1();return this._logger.debug("[fetch load start], index,",s,",range,",f),new cS(function(e,t){var i;fetch(h||n,h?void 0:P).then((i=ST(Sk().mark(function i(a){var c,l,h,v;return Sk().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=a,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(d&&(a=d(a,n)||a),a.ok){i.next=7;break}throw new SG(n,P,a,"bad network response");case 7:if(c=s1(),o!==SH.TEXT){i.next=15;break}return i.next=11,a.text();case 11:case 18:l=i.sent,r._running=!1,i.next=37;break;case 15:if(o!==SH.JSON){i.next=22;break}return i.next=18,a.json();case 22:if(!u){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(a,u,L,c),i.abrupt("return");case 29:return i.next=31,a.arrayBuffer();case 31:l=new Uint8Array(l=i.sent),r._running=!1,h=s1()-L,v=SZ(l.byteLength,h),r.emit(S0.REAL_TIME_SPEED,{speed:v,len:l.byteLength,time:h,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",s,",range,",f),e(SJ(l,!0,a,a.headers.get("Content-Length"),a.headers.get("age"),L,c,s,f,r._vid,r._priOptions));case 39:case"end":return i.stop()}},i)})),function(e){return i.apply(this,arguments)})).catch(function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!E||((e=e instanceof SG?e:new SG(n,P,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=L,e.endTime=s1(),e.isTimeout=E,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))})})}},{key:"cancel",value:(e=ST(Sk().mark(function e(){return Sk().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._aborted){e.next=2;break}return e.abrupt("return");case 2:if(this._aborted=!0,this._running=!1,!this._response){e.next=14;break}if(e.prev=5,!this._reader){e.next=9;break}return e.next=9,this._reader.cancel();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(5);case 13:this._response=this._reader=null;case 14:if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}},e,this,[[5,11]])})),function(){return e.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var a=new SG(e.url,"",e,"onProgress of bad response.body.getReader");return a.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(a)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(2097152),this._writeIdx=0);var o,u,s,c,l=this._reader=e.body.getReader(),f=s1(),d=(o=ST(Sk().mark(function a(){var o,h,v,p,g,y,m,_,b;return Sk().wrap(function(a){for(var k,w;;)switch(a.prev=a.next){case 0:return s=s1(),a.prev=1,a.next=4,l.read();case 4:u=a.sent,c=s1(),a.next=13;break;case 8:return a.prev=8,a.t0=a.catch(1),c=s1(),i._aborted||(i._running=!1,a.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(a.t0)),a.abrupt("return");case 13:if(v=(h=(null===(o=i._range)||void 0===o?void 0:o.length)>0?i._range[0]:0)+i._receivedLength,!i._aborted){a.next=19;break}return i._running=!1,t(void 0,!1,{range:[v,v],vid:i._vid,index:i._index,startTime:s,endTime:c,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.abrupt("return");case 19:if(p=u.value?u.value.byteLength:0,i._receivedLength+=p,i._onProcessMinLen>0?i._writeIdx+p>=i._onProcessMinLen||u.done?((g=new Uint8Array(i._writeIdx+p)).set(i._cache.subarray(0,i._writeIdx),0),p>0&&g.set(u.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",u.done,",len,",g.byteLength,", writeIdx,",i._writeIdx)):p>0&&i._writeIdx+p<2097152?(i._cache.set(u.value,i._writeIdx),i._writeIdx+=p,i._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",i._writeIdx)):p>0&&(y=new Uint8Array(i._writeIdx+p+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+p+2048,", datalen,",p,", writeIdx,",i._writeIdx),y.set(i._cache.subarray(0,i._writeIdx),0),p>0&&y.set(u.value,i._writeIdx),i._writeIdx+=p,delete i._cache,i._cache=y,i._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",i._writeIdx)):g=u.value,!(g&&g.byteLength>0||u.done)){a.next=28;break}i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",v,", end,",h+i._receivedLength,", done,",u.done,r),t(g,u.done,{range:[i._range[0]+i._receivedLength-(g?g.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:c,st:r,firstByteTime:n,priOptions:i._priOptions},e),f=s1(),a.next=37;break;case 28:if(!(s1()-f>=i._processMaxGapTime)){a.next=37;break}return i._logger.debug(s8(k=s8(w="[onProgress timeout],task: ".concat(s$(i._range)," done: ")).call(w,u.done," processMaxGapTime: ")).call(k,i._processMaxGapTime)),(m=new SG(e.url,null,e,"process timeout")).options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.running=!1,a.next=35,i.cancel();case 35:return i.reject(m),a.abrupt("return");case 37:u.done?(_=s1()-r,b=SZ(i._receivedLength,_),i.emit(S0.REAL_TIME_SPEED,{speed:b,len:i._receivedLength,time:_,vid:i._vid,index:i._index,range:i._range,priOptions:i._priOptions}),i._running=!1,i._logger.debug("[fetchLoader onProgress end],task,",i._range,",done,",u.done),i.resolve(SJ(u,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):d();case 38:case"end":return a.stop()}},a,null,[[1,8]])})),function(){return o.apply(this,arguments)});d()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof fetch}}]),r}(),S2=function(){SE(t,m3);var e=SB(t);function t(){var r;return Sx(this,t),SP(SM(r=e.call(this)),"_xhr",null),SP(SM(r),"_aborted",!1),SP(SM(r),"_timeoutTimer",null),SP(SM(r),"_range",null),SP(SM(r),"_receivedLength",0),SP(SM(r),"_url",null),SP(SM(r),"_onProgress",null),SP(SM(r),"_index",-1),SP(SM(r),"_headers",null),SP(SM(r),"_currentChunkSizeKB",384),SP(SM(r),"_timeout",null),SP(SM(r),"_xhr",null),SP(SM(r),"_withCredentials",null),SP(SM(r),"_startTime",-1),SP(SM(r),"_loadCompleteResolve",null),SP(SM(r),"_loadCompleteReject",null),SP(SM(r),"_runing",!1),SP(SM(r),"_logger",!1),SP(SM(r),"_vid",""),SP(SM(r),"_responseType",void 0),SP(SM(r),"_credentials",void 0),SP(SM(r),"_method",void 0),SP(SM(r),"_transformResponse",void 0),SP(SM(r),"_firstRtt",void 0),SP(SM(r),"_onCancel",null),SP(SM(r),"_priOptions",null),r}return SC(t,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=S$(e.url,e.params);var r=s1();return new cS(function(e,r){t._loadCompleteResolve=e,t._loadCompleteReject=r,t._startLoad()}).catch(function(e){if(clearTimeout(t._timeoutTimer),t._runing=!1,!t._aborted)throw(e=e instanceof SG?e:new SG(t._url,t._request)).startTime=r,e.endTime=s1(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e})}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===SH.ARRAY_BUFFER&&this._range&&this._range.length>1){if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e)}this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{this._startTime=s1();var r=this._xhr=new XMLHttpRequest;r.open(this._method||"GET",this._url,!0),r.responseType=this._responseType,this._timeout&&(r.timeout=this._timeout),r.withCredentials=this._withCredentials,r.onload=hE(n=this._onLoad).call(n,this),r.onreadystatechange=hE(i=this._onReadyStatechange).call(i,this),r.onerror=function(e){t._running=!1;var r,n,i,a=new SG(t._url,t._request,null==e||null===(r=e.currentTarget)||void 0===r?void 0:r.response,"xhr.onerror.status:"+(null==e||null===(n=e.currentTarget)||void 0===n?void 0:n.status)+",statusText,"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.statusText));a.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(a)},r.ontimeout=function(e){t.cancel();var r=new SG(t._url,t._request,{status:408},"timeout");t._onTimeout&&(r.isTimeout=!0,t._onTimeout(r,{index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions})),r.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(r)};var n,i,a,o=this._headers||{},u=SX(e);u&&(o.Range=u),o&&cb(a=cw(o)).call(a,function(e){r.setRequestHeader(e,o[e])}),this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),r.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=s1())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new SG(this._url,null,Sb(Sb({},e.target.response),{},{status:r}),"bad response,status:"+r);return n.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(n)}var i,a=null,o=!1,u=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===SH.ARRAY_BUFFER){var s,c=new Uint8Array(e.target.response);if(i=u+this._receivedLength,c&&c.byteLength>0){this._receivedLength+=c.byteLength;var l=s1()-this._startTime,f=SZ(this._receivedLength,l);this.emit(S0.REAL_TIME_SPEED,{speed:f,len:this._receivedLength,time:l,vid:this._vid,index:this._index,range:[i,u+this._receivedLength],priOptions:this._priOptions})}a=c,o=!((null===(s=this._range)||void 0===s?void 0:s.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",u+this._receivedLength,",dataLen,",c?c.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",o)}else o=!0,a=e.target.response;var d={ok:r>=200&&r<300,status:r,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(d=this._transformResponse(d,this._url)||d),this._onProgress&&this._onProgress(a,o,{index:this._index,vid:this._vid,range:[i,u+this._receivedLength],startTime:this._startTime,endTime:s1(),priOptions:this._priOptions},d),o?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(SJ(this._onProgress?null:a,o,d,d.headers["content-length"],d.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}},{key:"cancel",value:function(){if(!this._aborted)return this._aborted=!0,this._runing=!1,Sj(SO(t.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=function(e,t){var r=void 0!==hI&&hC(e)||e["@@iterator"];if(!r){if(cp(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return SN(e,void 0);var n=he(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?fw(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?SN(e,t):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}(c1(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var a=r.value.split(": ");n[a[0].toLowerCase()]=he(a).call(a,1).join(": ")}}catch(e){i.e(e)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),t}(),S4=["retry","retryDelay","onRetryError","transformError"],S3=function(){var e;function t(e,r){var n,i,a;Sx(this,t),this.promise=((a=new cS(function(e,t){n=e,i=t})).used=!1,a.resolve=function(){return a.used=!0,n.apply(void 0,arguments)},a.reject=function(){return a.used=!0,i.apply(void 0,arguments)},a),this.alive=!!r.onProgress,r.logger||(r.logger=new SK("Loader")),this._loaderType=e,this._loader=e===Sq.FETCH&&window.fetch?new S1:new S2,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}return SC(t,[{key:"exec",value:function(){var e,t=this,r=this._config,n=r.retry,i=r.retryDelay,a=r.onRetryError,o=r.transformError,u=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=cw(e);for(n=0;n<a.length;n++)r=a[n],lf(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(hR){var a=hR(e);for(n=0;n<a.length;n++)r=a[n],lf(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(r,S4),s=(e=ST(Sk().mark(function e(){var r,c,l;return Sk().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t._loader.load(u);case 3:r=e.sent,t.promise.resolve(r),e.next=27;break;case 7:if(e.prev=7,e.t0=e.catch(0),t._loader.running=!1,t._logger.debug("[task request catch err]",e.t0),!t._canceled){e.next=13;break}return e.abrupt("return");case 13:if(e.t0.loaderType=t._loaderType,e.t0.retryCount=t._retryCount,c=e.t0,o&&(c=o(c)||c),a&&t._retryCount>0&&a(c,t._retryCount,{index:u.index,vid:u.vid,range:u.range,priOptions:u.priOptions}),t._retryCount++,l=!0,t._retryCheckFunc&&(l=t._retryCheckFunc(e.t0)),!(l&&t._retryCount<=n)){e.next=26;break}return clearTimeout(t._retryTimer),t._logger.debug("[task request setTimeout],retry",t._retryCount,",retry range,",u.range),t._retryTimer=d9(s,i),e.abrupt("return");case 26:t.promise.reject(c);case 27:case"end":return e.stop()}},e,null,[[0,7]])})),function(){return e.apply(this,arguments)});return s(),this.promise}},{key:"cancel",value:(e=ST(Sk().mark(function e(){return Sk().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),t}();function S6(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if((t=cC(t).call(t,Boolean)).length<2)return t[0];var n=function(e){for(var t,r=0;r<10;)try{if((t=new Uint8Array(e)).byteLength>0)break;r++}catch(e){if(!(r<10))throw Error("new array failed final,".concat(null==e?void 0:e.message));r++}return t}(cD(t).call(t,function(e,t){return e+t.byteLength},0)),i=0;return cb(t).call(t,function(e){n.set(e,i),i+=e.byteLength}),n}var S8=function(){SE(r,m3);var e,t=SB(r);function r(e){var n,i;return Sx(this,r),SP(SM(n=t.call(this,e)),"type",Sq.FETCH),SP(SM(n),"_queue",[]),SP(SM(n),"_alive",[]),SP(SM(n),"_currentTask",null),SP(SM(n),"_finnalUrl",""),SP(SM(n),"_config",void 0),n._config=(i=e,Sb({loaderType:Sq.FETCH,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:SH.TEXT,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0,processMaxGapTime:1/0},i)),n._config.loaderType!==Sq.XHR&&S1.isSupported()||(n.type=Sq.XHR),n.log=e.logger,n}return SC(r,[{key:"isFetch",value:function(){return this.type===Sq.FETCH}},{key:"load",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?r=e:r.url=e||r.url||this._config.url,(r=sC({},this._config,r)).params&&(r.params=sC({},r.params)),r.headers&&SY(r.headers)&&(r.headers=sC({},r.headers)),r.body&&SY(r.body)&&(r.body=sC({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new S3(this.type,r);return n.loader.on(S0.REAL_TIME_SPEED,function(e){t.emit(S0.REAL_TIME_SPEED,e)}),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(e=ST(Sk().mark(function e(){var t;return Sk().wrap(function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=s8(r=c_(n=this._queue).call(n,function(e){return e.cancel()})).call(r,c_(i=this._alive).call(i,function(e){return e.cancel()})),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,cS.all(t);case 6:return e.next=8,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new cS(function(t){return d9(t,e)})}();case 8:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch(function(e){});t&&"function"==typeof t.finally&&t.finally(function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=cC(n=e._alive).call(n,function(t){return t&&t!==e._currentTask})),e._processTask()})}}}],[{key:"isFetchSupport",value:function(){return S1.isSupported()}}]),r}(),S5=[{range:[0,90],size:614400},{range:[90,120],size:819200},{range:[120,Number.MAX_VALUE],size:1024e3}];var S9=((c=S9||{}).H264="h264",c.H265="h265",c.H266="h266",c);function S7(){return{supportHevc:!1,preloadTime:5,preloadSize:0,segmentMinDuration:5,vtype:"MP4",preloadCacheType:1,preloadMaxCacheCount:5,globalKey:null,autoPreload:!1,reqOptions:null,getRequestOptionsCallback:null,minBufferLength:5,timeout:3e3,autoCheck:{enable:!0,interval:1e3},logCacheConfig:{logCacheLevel:2,logMaxSize:204800},pcdnConfig:{openPreloadPCDN:!1,enterMinBuffer:10,outMaxBuffer:5,pcdn_duration:2,pcdn_open:!0,openPCDN:!0,minDuration:25,trackerUrl:""},switchPCDNMaxCnt:2,retryCount:1,retryDelay:1e3,loaderType:"fetch"}}A.f;var Te=O("".slice),Tt=Math.min;tu({target:"String",proto:!0,forced:!cu("startsWith")},{startsWith:function(e){var t=rz(X(this));ca(e);var r=tq(Tt(arguments.length>1?arguments[1]:void 0,t.length)),n=rz(e);return Te(t,r,r+n.length)===n}});var Tr=rw("String","startsWith"),Tn=String.prototype,Ti=v(function(e){var t=e.startsWith;return"string"==typeof e||e===Tn||et(Tn,e)&&t===Tn.startsWith?Tr:t}),Ta="content-range";function To(e,t,r,n){var i=Sh(s_(1&n?e.prototype:e),t,r);return 2&n&&"function"==typeof i?function(e){return i.apply(r,e)}:i}var Tu=function(){var e,t,r,n;function i(e,t){sv(this,i),sf((r=this,n=i,a=[e,t],n=s_(n),s=sy(r,sm()?rf(n,a||[],s_(r).constructor):n.apply(r,a))),"options",void 0),sf(s,"playerId",void 0),sf(s,"logger",void 0),sf(s,"_nextPreloadCount",0),sf(s,"_netLoader",void 0),sf(s,"_pendingTask",{resolve:void 0,data:void 0});var r,n,a,o,u,s,c=S7();cb(o=cw(t)).call(o,function(e){c[e]=t[e]}),s.options=c,s.playerId=(null===(u=e.player)||void 0===u?void 0:u.playerId)||"default";var l=s.options.logCacheConfig,f=l.logCacheLevel,d=l.logMaxSize;return s.logger=new SK("[Mp4Preloader]",{logCacheLevel:f,logMaxSize:d}),s.log(SF.DEBUG,"[Preloader] new preloader, playerId",s.playerId),s}return sk(i,Sc),sg(i,[{key:"currentPreloadInst",get:function(){return this.preloadManager.currentPreloadInst}},{key:"allCachedKeys",get:function(){return this.preloadManager.getAllCachedDataKeys()}},{key:"cacheInst",get:function(){return this.preloadManager.cacheInst}},{key:"realTimeSpeed",get:function(){return 0}},{key:"taskInProgress",get:function(){return!!this._pendingTask.resolve&&!!this._pendingTask.data}},{key:"log",value:function(e,t){for(var r,n,i=arguments.length,a=Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];(r=this.logger).log.apply(r,s8(n=[e,t]).call(n,a))}},{key:"getPreloadUnuseInfo",value:function(){return this.preloadManager.getPreloadUnuseInfo()}},{key:"generateUniqueKey",value:function(e){var t=e.vid,r=e.definition,n=e.mediaType,a=e.codecType,o=e.vtype;return i.generateUniqueKey({vid:t,mediaType:n,definition:r,codecType:a,vtype:o})}},{key:"start",value:(n=uj(uM().mark(function e(t,r){var n,i=this;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._beforeStart(t,r)){e.next=1;break}return e.abrupt("return",{remove:!0});case 1:return this.loadByChunkSize(n,null),e.next=2,new cS(function(e){i._pendingTask.resolve=e,i._pendingTask.data=n});case 2:return e.abrupt("return",{remove:!0});case 3:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"getInitDefinition",value:function(e,t){for(var r=null,n=0,i=0;i<e.length;i++)if(e[i].definition===t){n=i;break}return(r=e[n])||(r=e[0]),r}},{key:"getPreLoadData",value:function(e){var t=this;return new cS(function(r,n){t.getItemSameVid(e).then(function(e){if(t.log(SF.DEBUG,"[Preloader] getPreLoadData",!!e.value),e.value){var n=e.value,i=n.mediaSegList,a=n.meta,o=n.type,u=n.buffer,s=n.preloadTime,c=n.vid,l=n.cacheKey,f=n.definition,d=n.orgDefinition,h=n.byteLength,v=n.duration,p=n.fileSize,g=n.from,y=n.vtype,m=n.codecType,_=n.initSeg;r(sh({generateBy:"preloader",vid:c,type:o,vtype:y,codecType:m,definition:f,orgDefinition:d,bitrate:n.bitrate,cacheKey:l,duration:v||0,byteLength:h,from:g,adaptTimeRange:n.adaptTimeRange,repeatData:n.repeatData,repeatDataStartPos:n.repeatDataStartPos,memory:n.memory,meta:a,preloadTime:s,fileSize:p||0},o===hS.SIZE?{buffer:u}:{initSeg:_,mediaSegList:i}))}else r(null)}).catch(function(e){n(e)})})}},{key:"checkCacheKey",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Sg.MP4,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Sy.H264;if(r){var a=this.generateUniqueKey({vid:e,definition:r,vtype:n,codecType:i});return a&&this.hasItemSameVid(a)?a:null}for(var o=0;o<t.length;o++){var u=this.generateUniqueKey({vid:e,definition:t[o].definition,vtype:n,codecType:i});if(u&&this.hasItemSameVid(u))return u}return null}},{key:"bwEventEmit",value:function(e,t,r,n,i){var a,o,u=(null===(a=this._pendingTask.data)||void 0===a?void 0:a.duration)||0,s=(null===(o=this._pendingTask.data)||void 0===o?void 0:o.bitrate)||0;this.preloadManager.bwEventEmit({vid:e,loadType:t,size:r,speed:n,cacheKey:i,vtype:Sg.MP4,duration:u,bitrate:s})}},{key:"loadByChunkSize",value:(r=uj(uM().mark(function e(t,r){var n,i,a,o,u,s,c,l,f,d,h,v,p,g,y,m,_,b,k,w,S,T;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.vid,o=t.cacheKey,u=t.definition,s=t.orgDefinition,c=t.duration,l=t.bitrate,f=t.codecType,d=t.vtype,h=t.size,v=this._getLoadUrl(t)){e.next=1;break}return this._endLoadFragments(!1),e.abrupt("return");case 1:return v=function(e,t){try{if(!t||Ti(e).call(e,"blob"))return e;var r,n=lf(e).call(e,"?"),i=n===e.length-1,a="";return cb(r=cw(t)).call(r,function(e){var r,n,i=t[e];null!=i&&""!==i&&(a+=s8(r=s8(n="".concat(a?"&":"")).call(n,e,"=")).call(r,t[e]))}),e+=(n<0?"?":i?"":"&")+a}catch(t){return e}}(v,{__vid:a}),g=(p=this._decideRequestRange({bitrate:l,size:h,duration:c,pktOffsetMap:t.pktOffsetMap})).range,y=p.duration,this.log(SF.LOG,s8(n=s8(i="".concat(a," loadByChunkSize ")).call(i,g[0],"-")).call(n,g[1]),t.cacheKey,t.definition,y),m={vid:a,definition:u,orgDefinition:s,cacheKey:o,codecType:f,vtype:d,fileSize:h,bitrate:l||0,byteLength:0,preloadTime:y,buffer:new ArrayBuffer(0)},_=this.getRequestOption(sh(sh({},t),{},{url:v})),b=new S8({responseType:"arraybuffer"}),e.prev=2,e.next=3,b.load(v,sh({range:g},_));case 3:w=e.sent,m.fileSize||(S=function(e){var t,r=null==e||null===(t=e.get)||void 0===t?void 0:t.call(e,Ta);if(r){var n=r.split("/");if(cp(n)&&2===n.length)return Number(n[1])}return null}(w.headers),m.fileSize=S),(null==w||null===(k=w.data)||void 0===k?void 0:k.byteLength)>0&&(m.buffer=w.data,m.byteLength+=m.buffer.byteLength,this._setPreLoadData(t,m)),e.next=5;break;case 4:e.prev=4,e.catch(2);case 5:this._endLoadFragments(!1);case 6:case"end":return e.stop()}},e,this,[[2,4]])})),function(e,t){return r.apply(this,arguments)})},{key:"setItem",value:function(e,t){return this.preloadManager.setItem(e,t,!1)}},{key:"clearPreloaderList",value:function(){}},{key:"setUserSelectDefinition",value:function(e){this.preloadManager&&this.preloadManager.setUserSelectDefinition(e)}},{key:"getUserSelectDefinition",value:function(){return this.preloadManager.getUserSelectDefinition()}},{key:"cancel",value:function(){return this.log(SF.LOG,"cancelLoading"),this._endLoadFragments(),cS.resolve()}},{key:"destroy",value:function(){return this.cancel(),cS.resolve()}},{key:"on",value:function(e,t){for(var r,n=arguments.length,a=Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];To(i,"on",this,3)(s8(r=[e,t]).call(r,a))}},{key:"off",value:function(e,t){for(var r,n=arguments.length,a=Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];To(i,"off",this,3)(s8(r=[e,t]).call(r,a))}},{key:"hasItemSameVid",value:function(e){if(!e)return!1;for(var t=e.split("#"),r=this.allCachedKeys,n=0;n<r.length;n++){var i=r[n];if(i===e)return!0;var a=i.split("#");if(a.length>=4&&t.length>=4&&a[0]===t[0]){if(0===lf(o=a[2]).call(o,"pretime")&&0===lf(u=t[2]).call(u,"pretime"))return!0;var o,u,s=[cX(a[2]),cX(a[3])],c=[cX(t[2]),cX(t[3])];if(c[0]>=s[0]&&c[1]>c[0]&&c[1]<=s[1])return!0}}return!1}},{key:"getItemSameVid",value:(t=uj(uM().mark(function e(t){var r,n,a,o;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=(n=i.generateUniqueKey(t))&&this.hasItemSameVid(n),this.log(SF.DEBUG,s8(r="getItemSameVid: key:".concat(n," checkResult:")).call(r,a)),a){e.next=1;break}return e.abrupt("return",{});case 1:return e.next=2,this.preloadManager.getItem(t);case 2:return o=e.sent,e.abrupt("return",{value:o,key:a});case 3:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"_beforeStart",value:function(e,t){var r,n,i,a,o,u,s,c,l=e.payload||[];if(0===l.length)return this.log(SF.LOG,"preload_is_null"),null;var f=e.vid,d=e.steps,h=e.stepIdx,v=e.targetDefinition,p=e.vtype||Sg.MP4,g=e.codecType||S9.H264,y="".concat(this.getUserSelectDefinition()||""),m=this.checkCacheKey(f,l,y,p,g);if(this.log(SF.LOG,s8(r="".concat(this.playerId," ")).call(r,f),s8(n=s8(i="codecType:".concat(g," vtype:")).call(i,p," hasCache:")).call(n,m)),m&&!this.stepwise||"MP3"===p)return this.log(SF.LOG,"vtype_".concat(p)),null;var _=v||this.getInitDefinition(l,t);if(this.log(SF.LOG,s8(a=" ".concat(this.playerId," ")).call(a,f," getInitDefinition"),null==_?void 0:_.definition),!_)return this.log(SF.WARN,"definition_error"),null;var b=_.definition,k=_.orgDefinition,w=e.preloadTime||this.options.preloadTime,S=e.preloadSize||this.options.preloadSize||390624,T=this.generateUniqueKey({vid:f,definition:b,vtype:p,codecType:g});this._nextPreloadCount>0&&this._nextPreloadCount--,this.log(SF.LOG,s8(o="".concat(this.playerId," ")).call(o,f),s8(u=s8(s="cacheKey:".concat(T," duration:")).call(s,_.duration," preloadTime:")).call(u,w));var x=sh({vid:f,definition:b,orgDefinition:k,preloadTime:w,preloadSize:S,cacheKey:T,codecType:g,vtype:p,steps:d,stepIdx:h,payload:e},_);return e.reqOptions&&(x.reqOptions=e.reqOptions),this.log(SF.LOG,s8(c="start preload,".concat(f," playerId:")).call(c,this.playerId)),x}},{key:"_decideRequestRange",value:function(e){var t=e.pktOffsetMap,r=e.bitrate,n=e.size,i=e.duration,a=[0,8e5],o=this._getRangeByOffsetMap(t,5),u=0;if("number"==typeof o&&o>0)a[1]=o,u=5;else{var s=n||function(e,t){try{return e&&t?cX("".concat(t*e/8),10):0}catch(e){return 0}}(r,i),c=function(e,t,r){var n=r>51200?Math.min(r,8e5):t;if(!e)return n||S5[0].size;var i=la(S5).call(S5,function(t){return e>=t.range[0]&&e<t.range[1]});return i&&(n=Math.min(i.size,r>0?r:t)),n||S5[0].size}(i,8e5,s);a[1]=c,u=1}return{range:a,duration:u}}},{key:"_getRangeByOffsetMap",value:function(e,t){var r=this,n=null==e?void 0:la(e).call(e,function(e){var n;return(null==e?void 0:e.time)===((null===(n=r.options)||void 0===n?void 0:n.firstLoadTimePos)||t)});return null==n?void 0:n.offset}},{key:"_setPreLoadData",value:(e=uj(uM().mark(function e(t,r){var n,i,a,o,u,s,c,l,f,d,h,v,p;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=r.vid,i=r.definition,a=r.orgDefinition,o=r.type,u=r.buffer,s=r.byteLength,c=r.preloadTime,l=r.fileSize,f=r.from,d=r.vtype,h=r.codecType,v=r.bitrate,(p={codecType:h,vtype:d,vid:n,definition:i,orgDefinition:a,cacheKey:r.cacheKey,type:o,from:f,fileSize:l,bitrate:v,memory:0,byteLength:0,preloadSize:0,preloadTime:0,buffer:u}).byteLength=s||0,p.preloadSize=s||0,p.preloadTime=c||0,p.fileSize=l,p.buffer&&p.buffer.byteLength>0&&(p.memory+=(null==u?void 0:u.byteLength)||0,this.setItem(t,p));case 1:case"end":return e.stop()}},e,this)})),function(t,r){return e.apply(this,arguments)})},{key:"_getLoadUrl",value:function(e){var t=cp(e.url)?e.url[0].src:e.url;return this.preloadManager.preProcessUrl&&(t=this.preloadManager.preProcessUrl(t).url),t}},{key:"_endLoadFragments",value:function(e){var t,r;this.log(SF.LOG,"[Preloader] _endLoadFragments ".concat(this.playerId)),this._netLoader&&(this._netLoader.cancel(),this._netLoader=void 0),null!==(t=this._pendingTask)&&void 0!==t&&t.resolve&&(null===(r=this._pendingTask)||void 0===r||r.resolve(),this._pendingTask.resolve=void 0)}}],[{key:"vtype",get:function(){return Sg.MP4}},{key:"PRELOAD_TYPES",get:function(){return hS}},{key:"getDefaultConfig",value:function(){return S7()}},{key:"getInfoByUniqueKey",value:function(e){var t=e.split("#"),r=["vid","mediaType","codecType","vtype","definition"],n={};return cb(t).call(t,function(e,t){n[r[t]]=e}),n}},{key:"generateUniqueKey",value:function(e){var t,r,n,i,a,o=e.vid,u=e.mediaType,s=e.definition,c=e.codecType,l=e.vtype,f=e.bitrate;return u=u||"video",s="".concat(s)||"-1",c=c||Sy.H264,l=l||Sg.MP4,f=f||0,o?s8(t=s8(r=s8(n=s8(i=s8(a="".concat(o,"#")).call(a,u,"#")).call(i,c,"#")).call(n,l,"#")).call(r,s,"#")).call(t,f):null}}])}();function Ts(e,t){var r=void 0!==iX&&fY(e)||e["@@iterator"];if(!r){if(cv(e)||(r=f4(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}var Tc=Math.min,Tl=[].lastIndexOf,Tf=!!Tl&&1/[1].lastIndexOf(1,-0)<0,Td=u2("lastIndexOf"),Th=Tf||!Td?function(e){if(Tf)return w(Tl,this,arguments)||0;var t=Q(this),r=tH(t);if(0===r)return -1;var n=r-1;for(arguments.length>1&&(n=Tc(n,tU(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return -1}:Tl;tu({target:"Array",proto:!0,forced:Th!==[].lastIndexOf},{lastIndexOf:Th});var Tv=rw("Array","lastIndexOf"),Tp=Array.prototype,Tg=v(function(e){var t=e.lastIndexOf;return e===Tp||et(Tp,e)&&t===Tp.lastIndexOf?Tv:t});function Ty(e){var t=0,r=0,n=0;return e=he(e).call(e,lf(e).call(e,"PT")+2),lf(e).call(e,"H")>-1&&lf(e).call(e,"M")>-1&&lf(e).call(e,"S")>-1?(t=c7(he(e).call(e,0,lf(e).call(e,"H"))),r=c7(he(e).call(e,lf(e).call(e,"H")+1,lf(e).call(e,"M"))),n=c7(he(e).call(e,lf(e).call(e,"M")+1,lf(e).call(e,"S")))):lf(e).call(e,"H")>-1&&lf(e).call(e,"M")>-1&&0>lf(e).call(e,"S")?(t=c7(he(e).call(e,0,lf(e).call(e,"H"))),r=c7(he(e).call(e,lf(e).call(e,"H")+1,lf(e).call(e,"M")))):0>lf(e).call(e,"H")&&lf(e).call(e,"M")>-1&&lf(e).call(e,"S")>-1?(r=c7(he(e).call(e,0,lf(e).call(e,"M"))),n=c7(he(e).call(e,lf(e).call(e,"M")+1,lf(e).call(e,"S")))):lf(e).call(e,"H")>-1&&0>lf(e).call(e,"M")&&lf(e).call(e,"S")>-1?(t=c7(he(e).call(e,0,lf(e).call(e,"H"))),n=c7(he(e).call(e,lf(e).call(e,"H")+1,lf(e).call(e,"S")))):0>lf(e).call(e,"H")&&0>lf(e).call(e,"M")&&lf(e).call(e,"S")>-1?n=c7(he(e).call(e,0,lf(e).call(e,"S"))):0>lf(e).call(e,"H")&&lf(e).call(e,"M")>-1&&0>lf(e).call(e,"S")&&(r=c7(he(e).call(e,0,lf(e).call(e,"M")))),3600*t+60*r+n}function Tm(e){var t,r,n,i,a,o,u,s,c,l,f,d,h=e.vid,v=e.start,p=e.end,g=e.mediaType,y=e.definition,m=e.codecType,_=e.vtype,b=e.bitrate,k=e.fileId,w=e.range;if(w&&w.length>0?(v=w[0],p=w[1]):(v=v||0,p=p||0),m="hevc"===m?"h265":m||"h264",_=_||Sg.DASH,!h||!g)return"";var S,T=y?s8(t=s8(r=s8(n=s8(i=s8(a=s8(o="".concat(h,"#")).call(o,g,"#")).call(a,m,"#")).call(i,_,"#")).call(n,y,"#")).call(r,v,"#")).call(t,p):s8(u=s8(s=s8(c=s8(l=s8(f=s8(d="".concat(h,"#")).call(d,g,"#")).call(f,m,"#")).call(l,_,"##")).call(c,v,"#")).call(s,p,"#")).call(u,b);return k?s8(S="".concat(T,"#")).call(S,k):T}function T_(e){var t,r={},n=Ts(cw(e));try{for(n.s();!(t=n.n()).done;){var i=t.value,a=e[i],o=i.split("#"),u=o[1],s=o[4],c=o[7],l="video"===u?s:c;r[l]||(r[l]={}),r[l][i]=a}}catch(e){n.e(e)}finally{n.f()}return r}function Tb(e){var t,r,n=ws(e);if(fU(n).call(n,function(e,t){return e.range[0]-t.range[0]}),0===n.length)return{};var i,a,o=0,u=0,s=new Uint8Array,c=Ts(n);try{for(c.s();!(a=c.n()).done;){var l=a.value,f=l.range[0],d=l.range[1];if(o>0){if(u+1!==f)break;s=S6(s,new Uint8Array(l.res))}else s=S6(s,new Uint8Array(l.res));o=f,u=d,i=l}}catch(e){c.e(e)}finally{c.f()}var h=(t=i.cacheKey.split("#"),r=9,function(e){if(cv(e))return e}(t)||function(e,t){var r=null==e?null:void 0!==iX&&fY(e)||e["@@iterator"];if(null!=r){var n,i,a,o,u=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(u1(u).call(u,n.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}(t,9)||f4(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),v=h[0],p=h[1],g=h[2],y=h[3],m=h[4],_=h[5],b=h[6],k=h[7],w=h[8],S=n[0].range[0],T=Tm({vid:v,mediaType:p,codecType:g,vtype:y,definition:m,start:_,end:b,fileId:"video"===p?k:w,range:[S,u],bitrate:k});return T?(delete i.cacheKey,sf({},T,sh(sh({},i),{},{res:s.buffer,range:[S,u],memory:s.buffer.byteLength}))):null}var Tk=sg(function e(t,r,n,i,a,o){sv(this,e),sf(this,"type",void 0),sf(this,"codecs",void 0),sf(this,"visualEntryBox",void 0),sf(this,"configurationBox",void 0),sf(this,"types",void 0),sf(this,"logCodeType",void 0),this.type=t,this.codecs=r,this.visualEntryBox=n,this.configurationBox=i,this.types=a,this.logCodeType=o}),Tw={AVC:"avc",AV1:"av1",HEVC:"hevc",BYTEVC1:"bytevc1",BYTEVC2:"bytevc2",BVC2:"bvc2"},TS=sf(sf(sf(sf(sf(sf({},Tw.AVC,new Tk("avc","avc1.64001E","avc1","avcC",["h264"],"h264")),Tw.AV1,new Tk("av1","av01.0.08M.08","av01","av1C",["av1"],"av1")),Tw.HEVC,new Tk("hevc","hev1.1.6.L120.90","hvc1","hvcC",["h265"],"h265")),Tw.BYTEVC1,new Tk("hevc","hev1.1.6.L120.90","hvc1","hvcC",["bytevc1","h265"],"h265")),Tw.BVC2,new Tk("bvc2","bvc2.1.6.L93.B0","bvc2","bvc2",["h266"],"h266")),Tw.BYTEVC2,new Tk("bvc2","bvc2.1.6.L93.B0","bvc2","bvc2",["bytevc2","h266"],"h266"));function TT(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function Tx(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),ck(e,TC(n.key),n)}}function TI(e,t,r){return t&&Tx(e.prototype,t),r&&Tx(e,r),ck(e,"prototype",{writable:!1}),e}function TC(e){var t=function(e,t){if("object"!==uA(e)||null===e)return e;var r=e[hB];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==uA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===uA(t)?t:String(t)}var TP={AV1:"av1",HEVC:"hevc"},TE={G711PCMA:"g7110a",G711PCMU:"g7110m"},TO="undefined"!=typeof window,TL=TO&&navigator.userAgent.toLocaleLowerCase(),TR=TO&&cd(TL).call(TL,"firefox"),TA=TO&&cd(TL).call(TL,"android"),TD=function(){function e(){TT(this,e)}return TI(e,null,[{key:"getRateIndexByRate",value:function(t){var r;return lf(r=e.FREQ).call(r,t)}},{key:"parseADTS",value:function(t,r){for(var n=t.length,i=0;i+2<n&&(255!==t[i]||240!=(246&t[i+1]));)i++;if(!(i>=n)){var a=i,o=[],u=(60&t[i+2])>>>2,s=e.FREQ[u];if(!s)throw Error("Invalid sampling index: ".concat(u));for(var c,l,f=((192&t[i+2])>>>6)+1,d=(1&t[i+2])<<2|(192&t[i+3])>>>6,h=e._getConfig(u,d,f),v=h.config,p=h.codec,g=0,y=e.getFrameDuration(s);i+7<n;)if(255===t[i]&&240==(246&t[i+1])){if(!(l=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5)||n-i<l)break;c=2*(1&~t[i+1]),o.push({pts:r+g*y,data:t.subarray(i+7+c,i+l)}),g++,i+=l}else i++;return{skip:a,remaining:i>=n?void 0:t.subarray(i),frames:o,samplingFrequencyIndex:u,sampleRate:s,objectType:f,channelCount:d,codec:p,config:v,originCodec:"mp4a.40.".concat(f)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var r=t[0]>>>3,n=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,a=e.FREQ[n];if(a){var o=e._getConfig(n,i,r);return{samplingFrequencyIndex:n,sampleRate:a,objectType:r,channelCount:i,config:o.config,codec:o.codec,originCodec:"mp4a.40.".concat(r)}}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,r){var n,i,a=[];return TR?e>=6?(n=5,i=e-3):(n=2,i=e):TA?(n=2,i=e):(n=5,i=e,e>=6?i=e-3:1===t&&(n=2,i=e)),a[0]=n<<3,a[0]|=(14&e)>>1,a[1]=(1&e)<<7,a[1]|=t<<3,5===n&&(a[1]|=(14&i)>>1,a[2]=(1&i)<<7,a[2]|=8,a[3]=0),{config:a,codec:"mp4a.40.".concat(n)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t||3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}]),e}();l=TD,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],(f=TC(f="FREQ"))in l?ck(l,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):l[f]=d;var TM=Math.hypot,TB=Math.abs,Tj=Math.sqrt;tu({target:"Math",stat:!0,arity:2,forced:!!TM&&TM(1/0,NaN)!==1/0},{hypot:function(e,t){for(var r,n,i=0,a=0,o=arguments.length,u=0;a<o;)u<(r=TB(arguments[a++]))?(i=i*(n=u/r)*n+1,u=r):i+=r>0?(n=r/u)*n:r;return u===1/0?1/0:u*Tj(i)}});var TN=J.Math.hypot,TU=v(TN);function TF(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function Tz(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function TK(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 4294967296*Tz(e,t)+Tz(e,t+4)}function TV(e,t){return Number(e+"."+t)}var Tq=g.RegExp,TH={correct:!y(function(){var e=!0;try{Tq(".","d")}catch(t){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var o in e&&(a.hasIndices="d"),a)i(o,a[o]);return Object.getOwnPropertyDescriptor(Tq.prototype,"flags").get.call(t)!==n||r!==n})},TG=function(){var e=e5(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},TW=RegExp.prototype,TY=TH.correct?function(e){return e.flags}:function(e){return TH.correct||!et(TW,e)||eO(e,"flags")?e.flags:B(TG,e)},TX=RegExp.prototype,TQ=v(function(e){return e===TX||et(TX,e)?TY(e):e.flags}),T$=rw("Array","entries"),TJ=Array.prototype,TZ={DOMTokenList:!0,NodeList:!0},T0=v(function(e){var t=e.entries;return e===TJ||et(TJ,e)&&t===TJ.entries||eO(TZ,tw(e))?T$:t}),T1=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ei),T2=sM.start;tu({target:"String",proto:!0,forced:T1},{padStart:function(e){return T2(this,e,arguments.length>1?arguments[1]:void 0)}});var T4=rw("String","padStart"),T3=String.prototype,T6=v(function(e){var t=e.padStart;return"string"==typeof e||e===T3||et(T3,e)&&t===T3.padStart?T4:t}),T8=function(){function e(t,r,n){TT(this,e),this.dv=new DataView(t),this.start=this.offset=r||this.dv.byteOffset,this.end=n?this.start+n:this.start+this.dv.byteLength}return TI(e,[{key:"buffer",get:function(){return this.dv.buffer}},{key:"unreadLength",get:function(){return Math.max(this.end-this.offset,0)}},{key:"size",get:function(){return this.end-this.start}},{key:"readFloat",value:function(e){var t=0;switch(e){case 4:t=this.dv.getFloat32(this.offset);break;case 8:t=this.dv.getFloat64(this.offset);break;default:throw Error("read ".concat(e,"-byte float is not supported"))}return this.offset+=e,t}},{key:"back",value:function(e){this.offset-=e}},{key:"skip",value:function(e){this.offset+=e}},{key:"readInt",value:function(e){var t=this.offset;switch(this.offset+=e,e){case 1:return this.dv.getInt8(t);case 2:return this.dv.getInt16(t);case 4:return this.dv.getInt32(t);default:throw Error("read ".concat(e,"-byte integers is not supported"))}}},{key:"read",value:function(e){var t=this.offset;switch(this.offset+=e,e){case 1:return this.dv.getUint8(t);case 2:return this.dv.getUint16(t);case 3:return(this.dv.getUint16(t)<<8)+this.dv.getUint8(t+2);case 4:return this.dv.getUint32(t);default:return this.back(e-4),this.read(e-4)+this.dv.getUint32(t)*Math.pow(256,e-4)}}},{key:"write",value:function(e,t){var r=this.offset;switch(this.offset+=e,e){case 1:return this.dv.setUint8(r,t);case 2:return this.dv.setUint16(r,t);case 3:return this.dv.setUint8(r,t>>>16),this.dv.setUint16(r+1,65535&t);case 4:return this.dv.setUint32(r,t);default:throw Error("write ".concat(e,"-byte integers is not supported"))}}},{key:"readToBuffer",value:function(e){var t,r;return t=this.offset||e?he(r=this.dv.buffer).call(r,this.offset,e?this.offset+e:this.end):this.dv.buffer,this.offset+=t.byteLength,t}},{key:"readToUint8",value:function(e){var t=new Uint8Array(this.dv.buffer,this.offset,e||this.unreadLength);return this.offset+=t.byteLength,t}},{key:"readString",value:function(e){for(var t=0,r="";t<e;t++)r+=String.fromCharCode(this.dv.getUint8(this.offset)),this.offset++;return r}}],[{key:"fromUint8",value:function(t){return new e(t.buffer,t.byteOffset,t.byteLength)}},{key:"concatUint8s",value:function(e){var t=new Uint8Array(cD(e).call(e,function(e,t){return e+t.byteLength},0)),r=0;return cb(e).call(e,function(e){t.set(e,r),r+=e.byteLength}),t}},{key:"concatUint8",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.concatUint8s(t)}}]),e}(),T5=function(){function e(t,r){TT(this,e),this.offset=0,this.val=t,this.size=r}return TI(e,[{key:"skip",value:function(e){this.offset+=e}},{key:"read",value:function(e){var t=this.size-this.offset-e;if(t>=0){var r=0,n=0;if(this.offset+=e,this.size>31){for(;n<e;n++)r+=Math.pow(2,n);return this.val/Math.pow(2,t)&r}for(;n<e;n++)r+=1<<n;return this.val>>>t&r}throw Error("the number of the read operation exceeds the total length limit of bits")}}],[{key:"fromByte",value:function(t,r){return new e(t.read(r),r<<3)}}]),e}(),T9=function(){function e(){TT(this,e)}return TI(e,null,[{key:"findBox",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=[];if(!t)return i;for(var a=0,o="",u=0;t.length>7;){if(a=Tz(t),o=String.fromCharCode.apply(null,t.subarray(4,8)),u=8,1===a?(a=TK(t,8),u+=8):a||(a=t.length),!r[0]||o===r[0]){var s=t.subarray(0,a);if(!(r.length<2))return e.findBox(s.subarray(u),he(r).call(r,1),n+u);i.push({start:n,size:a,headerSize:u,type:o,data:s})}n+=a,t=t.subarray(a)}return i}},{key:"tfhd",value:function(e){return xr(e,!0,function(e,t){e.trackId=Tz(t);var r=4,n=1&TQ(e),i=2&TQ(e),a=8&TQ(e),o=16&TQ(e),u=32&TQ(e);n&&(r+=4,e.baseDataOffset=Tz(t,r),r+=4),i&&(e.sampleDescriptionIndex=Tz(t,r),r+=4),a&&(e.defaultSampleDuration=Tz(t,r),r+=4),o&&(e.defaultSampleSize=Tz(t,r),r+=4),u&&(e.defaultSampleFlags=Tz(t,r))})}},{key:"sidx",value:function(e){return xr(e,!0,function(e,t){var r=0;e.reference_ID=Tz(t,r),r+=4,e.timescale=Tz(t,r),r+=4,0===e.version?(e.earliest_presentation_time=Tz(t,r),r+=4,e.first_offset=Tz(t,r),r+=4):(e.earliest_presentation_time=TK(t,r),r+=8,e.first_offset=TK(t,r),r+=8),r+=2,e.references=[];var n=TF(t,r);r+=2;for(var i=0;i<n;i++){var a={};e.references.push(a);var o=Tz(t,r);r+=4,a.reference_type=o>>31&1,a.referenced_size=2147483647&o,a.subsegment_duration=Tz(t,r),o=Tz(t,r+=4),r+=4,a.starts_with_SAP=o>>31&1,a.SAP_type=o>>28&7,a.SAP_delta_time=268435455&o}})}},{key:"moov",value:function(t){return xr(t,!1,function(t,r,n){var i;t.mvhd=e.mvhd(e.findBox(r,["mvhd"],n)[0]),t.trak=c_(i=e.findBox(r,["trak"],n)).call(i,function(t){return e.trak(t)}),t.pssh=e.pssh(e.findBox(r,["pssh"],n)[0])})}},{key:"mvhd",value:function(e){return xr(e,!0,function(e,t){var r=0;1===e.version?(e.timescale=Tz(t,16),e.duration=TK(t,20),r+=28):(e.timescale=Tz(t,8),e.duration=Tz(t,12),r+=16),e.nextTrackId=Tz(t,r+76)})}},{key:"trak",value:function(t){return xr(t,!1,function(t,r,n){t.tkhd=e.tkhd(e.findBox(r,["tkhd"],n)[0]),t.mdia=e.mdia(e.findBox(r,["mdia"],n)[0])})}},{key:"tkhd",value:function(e){return xr(e,!0,function(e,t){var r=T8.fromUint8(t);1===e.version?(r.read(8),r.read(8),e.trackId=r.read(4),r.read(4),e.duration=r.read(8)):(r.read(4),r.read(4),e.trackId=r.read(4),r.read(4),e.duration=r.read(4)),r.skip(16),e.matrix=[];for(var n=0;n<36;n++)e.matrix.push(r.read(1));r.back(36);for(var i,a=[],o=0;o<3;o++)a.push(TV(r.readInt(2),r.readInt(2))),a.push(TV(r.readInt(2),r.readInt(2))),i=r.readInt(4),a.push(TV(i>>30,1073741823&i));e.rotation=function(e){if(e.length<5)return 0;var t=TU(e[0],e[3]),r=TU(e[1],e[4]);return 0===t||0===r?0:180*Math.atan2(e[1]/r,e[0]/t)/Math.PI}(a),e.width=r.read(4),e.height=r.read(4)})}},{key:"mdia",value:function(t){return xr(t,!1,function(t,r,n){t.mdhd=e.mdhd(e.findBox(r,["mdhd"],n)[0]),t.hdlr=e.hdlr(e.findBox(r,["hdlr"],n)[0]),t.minf=e.minf(e.findBox(r,["minf"],n)[0])})}},{key:"mdhd",value:function(e){return xr(e,!0,function(e,t){var r=0;1===e.version?(e.timescale=Tz(t,16),e.duration=TK(t,20),r+=28):(e.timescale=Tz(t,8),e.duration=Tz(t,12),r+=16);var n=TF(t,r);e.language=String.fromCharCode(96+(n>>10&31),96+(n>>5&31),96+(31&n))})}},{key:"hdlr",value:function(e){return xr(e,!0,function(e,t){0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))})}},{key:"minf",value:function(t){return xr(t,!1,function(t,r,n){t.vmhd=e.vmhd(e.findBox(r,["vmhd"],n)[0]),t.smhd=e.smhd(e.findBox(r,["smhd"],n)[0]),t.stbl=e.stbl(e.findBox(r,["stbl"],n)[0])})}},{key:"vmhd",value:function(e){return xr(e,!0,function(e,t){e.graphicsmode=TF(t),e.opcolor=[TF(t,2),TF(t,4),TF(t,6)]})}},{key:"smhd",value:function(e){return xr(e,!0,function(e,t){e.balance=TF(t)})}},{key:"stbl",value:function(t){return xr(t,!1,function(t,r,n){t.stsd=e.stsd(e.findBox(r,["stsd"],n)[0]),t.stts=e.stts(e.findBox(r,["stts"],n)[0]),t.ctts=e.ctts(e.findBox(r,["ctts"],n)[0]),t.stsc=e.stsc(e.findBox(r,["stsc"],n)[0]),t.stsz=e.stsz(e.findBox(r,["stsz"],n)[0]),t.stco=e.stco(e.findBox(r,["stco"],n)[0]),t.stco||(t.co64=e.co64(e.findBox(r,["co64"],n)[0]),t.stco=t.co64);var i,a,o,u=null===(i=T0(t.stsd)[0])||void 0===i||null===(a=i.sinf)||void 0===a||null===(o=a.schi)||void 0===o?void 0:o.tenc.default_IV_size;t.stss=e.stss(e.findBox(r,["stss"],n)[0]),t.senc=e.senc(e.findBox(r,["senc"],n)[0],u)})}},{key:"senc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return xr(e,!0,function(e,r){var n=0,i=Tz(r,0);n+=4,e.samples=[];for(var a=0;a<i;a++){for(var o={InitializationVector:[]},u=0;u<t;u++)o.InitializationVector[u]=r[n+u];if(n+=t,2&TQ(e)){o.subsamples=[];var s=TF(r,n);n+=2;for(var c=0;c<s;c++){var l={};l.BytesOfClearData=TF(r,n),n+=2,l.BytesOfProtectedData=Tz(r,n),n+=4,o.subsamples.push(l)}}e.samples.push(o)}})}},{key:"pssh",value:function(e){return xr(e,!0,function(e,t){for(var r=[],n=[],i=0,a=0;a<16;a++)n.push(xi(t[i+a]));if(i+=16,e.version>0){var o=Tz(t,i);i+=4;for(var u=0;u<(""+o).length;u++)for(var s=0;s<16;s++){var c=t[i];i+=1,r.push(xi(c))}}var l=Tz(t,i);e.data_size=l,i+=4,e.kid=r,e.system_id=n,e.buffer=t})}},{key:"stsd",value:function(t){return xr(t,!0,function(t,r,n){var i,a;t.entryCount=Tz(r),t.entries=cC(i=c_(a=e.findBox(r.subarray(4),[],n+4)).call(a,function(t){switch(t.type){case"av01":return e.av01(t);case"avc1":case"avc2":case"avc3":case"avc4":return e.avc1(t);case"hvc1":case"hev1":return e.hvc1(t);case"mp4a":return e.mp4a(t);case"alaw":case"ulaw":return e.alaw(t);case"enca":return xr(t,!1,function(t,r,n){t.channelCount=TF(r,16),t.samplesize=TF(r,18),t.sampleRate=Tz(r,24)/65536,r=r.subarray(28),t.sinf=e.sinf(e.findBox(r,["sinf"],n)[0]),t.esds=e.esds(e.findBox(r,["esds"],n)[0])});case"encv":return xr(t,!1,function(t,r,n){t.width=TF(r,24),t.height=TF(r,26),t.horizresolution=Tz(r,28),t.vertresolution=Tz(r,32),r=r.subarray(78),t.sinf=e.sinf(e.findBox(r,["sinf"],n)[0]),t.avcC=e.avcC(e.findBox(r,["avcC"],n)[0]),t.hvcC=e.hvcC(e.findBox(r,["hvcC"],n)[0]),t.pasp=e.pasp(e.findBox(r,["pasp"],n)[0])})}})).call(i,Boolean)})}},{key:"tenc",value:function(e){return xr(e,!1,function(e,t){var r=6;e.default_IsEncrypted=t[r],r+=1,e.default_IV_size=t[r],r+=1,e.default_KID=[];for(var n=0;n<16;n++)e.default_KID.push(xi(t[r])),r+=1})}},{key:"schi",value:function(t){return xr(t,!1,function(t,r,n){t.tenc=e.tenc(e.findBox(r,["tenc"],n)[0])})}},{key:"sinf",value:function(t){return xr(t,!1,function(t,r,n){t.schi=e.schi(e.findBox(r,["schi"],n)[0]),t.frma=e.frma(e.findBox(r,["frma"],n)[0])})}},{key:"frma",value:function(e){return xr(e,!1,function(e,t){e.data_format="";for(var r=0;r<4;r++)e.data_format+=String.fromCharCode(t[r])})}},{key:"colr",value:function(e){return xr(e,!1,function(t,r){var n=T8.fromUint8(r);t.data=e.data,t.colorType=n.readString(4),"nclx"===t.colorType?(t.colorPrimaries=n.read(2),t.transferCharacteristics=n.read(2),t.matrixCoefficients=n.read(2),t.fullRangeFlag=n.read(1)>>7):"rICC"!==t.colorType&&"prof"!==t.colorType||(t.iccProfile=r.readToUint8())})}},{key:"av01",value:function(t){return xr(t,!1,function(t,r,n){var i=xe(t,r),a=r.subarray(i);n+=i,t.av1C=e.av1C(e.findBox(a,["av1C"],n)[0]),t.colr=e.colr(e.findBox(a,["colr"],n)[0])})}},{key:"av1C",value:function(e){return xr(e,!1,function(t,r){t.data=e.data;var n,i=T8.fromUint8(r),a=T5.fromByte(i,4);t.marker=a.read(1),t.version=a.read(7),t.seqProfile=a.read(3),t.seqLevelIdx0=a.read(5),t.seqTier0=a.read(1),t.highBitdepth=a.read(1),t.twelveBit=a.read(1),t.monochrome=a.read(1),t.chromaSubsamplingX=a.read(1),t.chromaSubsamplingY=a.read(1),t.chromaSamplePosition=a.read(2),t.reserved=a.read(3),t.initialPresentationDelayPresent=a.read(1),t.initialPresentationDelayPresent?t.initialPresentationDelayMinusOne=a.read(4):t.initialPresentationDelayMinusOne=0,t.configOBUs=i.readToUint8(),2===t.seqLevelIdx0&&1===t.highBitdepth?n=1===t.twelveBit?"12":"10":t.seqProfile<=2&&(n=1===t.highBitdepth?"10":"08"),t.codec=["av01",t.seqProfile,(t.seqLevelIdx0<10?"0"+t.seqLevelIdx0:t.seqLevelIdx0)+(t.seqTier0?"H":"M"),n].join(".")})}},{key:"avc1",value:function(t){return xr(t,!1,function(t,r,n){var i=xe(t,r),a=r.subarray(i);n+=i,t.avcC=e.avcC(e.findBox(a,["avcC"],n)[0]),t.pasp=e.pasp(e.findBox(a,["pasp"],n)[0])})}},{key:"avcC",value:function(e){return xr(e,!1,function(t,r){t.data=e.data,t.configurationVersion=r[0],t.AVCProfileIndication=r[1],t.profileCompatibility=r[2],t.AVCLevelIndication=r[3],t.codec=function(e){for(var t,r="avc1.",n=0;n<3;n++)(t=e[n].toString(16)).length<2&&(t="0".concat(t)),r+=t;return r}([r[1],r[2],r[3]]),t.lengthSizeMinusOne=3&r[4],t.spsLength=31&r[5],t.sps=[];for(var n=6,i=0;i<t.spsLength;i++){var a=TF(r,n);n+=2,t.sps.push(r.subarray(n,n+a)),n+=a}t.ppsLength=r[n],n+=1,t.pps=[];for(var o=0;o<t.ppsLength;o++){var u=TF(r,n);n+=2,t.pps.push(r.subarray(n,n+=u)),n+=u}})}},{key:"hvc1",value:function(t){return xr(t,!1,function(t,r,n){var i=xe(t,r),a=r.subarray(i);n+=i,t.hvcC=e.hvcC(e.findBox(a,["hvcC"],n)[0]),t.pasp=e.pasp(e.findBox(a,["pasp"],n)[0])})}},{key:"hvcC",value:function(e){return xr(e,!1,function(t,r){t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=r[0];var n=r[1];t.generalProfileSpace=n>>6,t.generalTierFlag=(32&n)>>5,t.generalProfileIdc=31&n,t.generalProfileCompatibility=Tz(r,2),t.generalConstraintIndicatorFlags=r.subarray(6,12),t.generalLevelIdc=r[12],t.avgFrameRate=TF(r,19),t.numOfArrays=r[22],t.vps=[],t.sps=[],t.pps=[];for(var i=23,a=0,o=0,u=0,s=0;s<t.numOfArrays;s++){a=63&r[i],o=TF(r,i+1),i+=3;for(var c,l,f,d=[],h=0;h<o;h++)u=TF(r,i),i+=2,d.push(r.subarray(i,i+u)),i+=u;32===a?(f=t.vps).push.apply(f,d):33===a?(c=t.sps).push.apply(c,d):34===a&&(l=t.pps).push.apply(l,d)}})}},{key:"pasp",value:function(e){return xr(e,!1,function(e,t){e.hSpacing=Tz(t),e.vSpacing=Tz(t,4)})}},{key:"mp4a",value:function(t){return xr(t,!1,function(t,r,n){var i=xt(t,r);t.esds=e.esds(e.findBox(r.subarray(i),["esds"],n+i)[0])})}},{key:"esds",value:function(e){return xr(e,!0,function(e,t){e.codec="mp4a.";for(var r=0,n=0,i=0,a=0;t.length;){for(a=t[r=0],n=t[r+1],r+=2;128&n;)i=(127&n)<<7,n=t[r],r+=1;if(i+=127&n,3===a)t=t.subarray(r+3);else{if(4!==a){if(5===a){var o,u=e.config=t.subarray(r,r+i),s=(248&u[0])>>3;return 31===s&&u.length>=2&&(s=32+((7&u[0])<<3)+((224&u[1])>>5)),e.objectType=s,e.codec+=s.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}e.codec+=T6(o=t[r].toString(16)+".").call(o,3,"0"),t=t.subarray(r+13)}}})}},{key:"alaw",value:function(e){return xr(e,!1,function(e,t){xt(e,t)})}},{key:"stts",value:function(e){return xr(e,!0,function(e,t){for(var r=Tz(t),n=[],i=4,a=0;a<r;a++)n.push({count:Tz(t,i),delta:Tz(t,i+4)}),i+=8;e.entryCount=r,e.entries=n})}},{key:"ctts",value:function(e){return xr(e,!0,function(e,t){var r=Tz(t),n=[],i=4;if(1===e.version)for(var a=0;a<r;a++)n.push({count:Tz(t,i),offset:Tz(t,i+4)}),i+=8;else for(var o=0;o<r;o++)n.push({count:Tz(t,i),offset:-(1+~Tz(t,i+4))}),i+=8;e.entryCount=r,e.entries=n})}},{key:"stsc",value:function(e){return xr(e,!0,function(e,t){for(var r=Tz(t),n=[],i=4,a=0;a<r;a++)n.push({firstChunk:Tz(t,i),samplesPerChunk:Tz(t,i+4),sampleDescriptionIndex:Tz(t,i+8)}),i+=12;e.entryCount=r,e.entries=n})}},{key:"stsz",value:function(e){return xr(e,!0,function(e,t){var r=Tz(t),n=Tz(t,4),i=[];if(!r)for(var a=8,o=0;o<n;o++)i.push(Tz(t,a)),a+=4;e.sampleSize=r,e.sampleCount=n,e.entrySizes=i})}},{key:"stco",value:function(e){return xr(e,!0,function(e,t){for(var r=Tz(t),n=[],i=4,a=0;a<r;a++)n.push(Tz(t,i)),i+=4;e.entryCount=r,e.entries=n})}},{key:"co64",value:function(e){return xr(e,!0,function(e,t){for(var r=Tz(t),n=[],i=4,a=0;a<r;a++)n.push(TK(t,i)),i+=8;e.entryCount=r,e.entries=n})}},{key:"stss",value:function(e){return xr(e,!0,function(e,t){for(var r=Tz(t),n=[],i=4,a=0;a<r;a++)n.push(Tz(t,i)),i+=4;e.entryCount=r,e.entries=n})}},{key:"moof",value:function(t){return xr(t,!1,function(t,r,n){var i;t.mfhd=e.mfhd(e.findBox(r,["mfhd"],n)[0]),t.traf=c_(i=e.findBox(r,["traf"],n)).call(i,function(t){return e.traf(t)})})}},{key:"mfhd",value:function(e){return xr(e,!0,function(e,t){e.sequenceNumber=Tz(t)})}},{key:"traf",value:function(t){return xr(t,!1,function(t,r,n){t.tfhd=e.tfhd(e.findBox(r,["tfhd"],n)[0]),t.tfdt=e.tfdt(e.findBox(r,["tfdt"],n)[0]),t.trun=e.trun(e.findBox(r,["trun"],n)[0])})}},{key:"trun",value:function(e){return xr(e,!0,function(e,t){var r=e.version,n=TQ(e),i=t.length,a=e.sampleCount=Tz(t),o=4;if(i>4&&1&n&&(e.dataOffset=-(1+~Tz(t,o)),o+=4),i>o&&4&n&&(e.firstSampleFlags=Tz(t,o),o+=4),e.samples=[],i>o)for(var u,s=0;s<a;s++)u={},256&n&&(u.duration=Tz(t,o),o+=4),512&n&&(u.size=Tz(t,o),o+=4),1024&n&&(u.flags=Tz(t,o),o+=4),2048&n&&(u.cts=r?-(1+~Tz(t,o+4)):Tz(t,o),o+=4),e.samples.push(u)})}},{key:"tfdt",value:function(e){return xr(e,!0,function(e,t){1===e.version?e.baseMediaDecodeTime=TK(t):e.baseMediaDecodeTime=Tz(t)})}},{key:"probe",value:function(t){return!!e.findBox(t,["ftyp"])}},{key:"parseSampleFlags",value:function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},{key:"moovToTrack",value:function(e,t,r){var n,i,a=e.trak;if(a&&a.length){var o=la(a).call(a,function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}),u=la(a).call(a,function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)});if(o&&t){null!=(null===(s=o.tkhd)||void 0===s?void 0:s.trackId)&&(t.id=o.tkhd.trackId),t.tkhdDuration=o.tkhd.duration,t.mvhdDurtion=e.mvhd.duration,t.mvhdTimecale=e.mvhd.timescale,t.timescale=t.formatTimescale=o.mdia.mdhd.timescale,t.duration=o.mdia.mdhd.duration||t.mvhdDurtion/t.mvhdTimecale*t.timescale,t.rotation=o.tkhd.rotation,t.matrix=o.tkhd.matrix;var s,c,l,f,d,h,v,p,g,y,m,_,b,k,w,S=T0(o.mdia.minf.stbl.stsd)[0];if(t.width=S.width,t.height=S.height,S.pasp&&(t.sarRatio=[S.pasp.hSpacing,S.pasp.vSpacing]),S.av1C)t.codecType=TP.AV1,t.codec=S.av1C.codec,t.av1C=S.av1C.data,S.colr&&(t.colr=S.colr.data);else if(S.hvcC)t.codecType=TP.HEVC,t.codec=S.hvcC.codec,t.vps=S.hvcC.vps,t.sps=S.hvcC.sps,t.pps=S.hvcC.pps,t.hvcC=S.hvcC.data;else{if(!S.avcC)throw Error("unknown video stsd entry");t.codec=S.avcC.codec,t.sps=S.avcC.sps,t.pps=S.avcC.pps}t.present=!0,t.ext={},t.ext.stss=null===(c=o.mdia)||void 0===c||null===(l=c.minf)||void 0===l||null===(f=l.stbl)||void 0===f?void 0:f.stss,t.ext.ctts=null===(d=o.mdia)||void 0===d||null===(h=d.minf)||void 0===h||null===(v=h.stbl)||void 0===v?void 0:v.ctts,S&&"encv"===S.type&&(t.isVideoEncryption=!0,S.default_KID=null===(p=S.sinf)||void 0===p||null===(g=p.schi)||void 0===g?void 0:g.tenc.default_KID,S.default_IsEncrypted=null===(y=S.sinf)||void 0===y||null===(m=y.schi)||void 0===m?void 0:m.tenc.default_IsEncrypted,S.default_IV_size=null===(_=S.sinf)||void 0===_||null===(b=_.schi)||void 0===b?void 0:b.tenc.default_IV_size,t.videoSenc=o.mdia.minf.stbl.senc&&o.mdia.minf.stbl.senc.samples,S.data_format=null===(k=S.sinf)||void 0===k||null===(w=k.frma)||void 0===w?void 0:w.data_format,t.useEME=e.useEME,t.kidValue=e.kidValue,t.pssh=e.pssh,t.encv=S)}if(u&&r){null!=(null===(T=u.tkhd)||void 0===T?void 0:T.trackId)&&(r.id=u.tkhd.trackId),r.tkhdDuration=u.tkhd.duration,r.mvhdDurtion=e.mvhd.duration,r.mvhdTimecale=e.mvhd.timescale,r.timescale=r.formatTimescale=u.mdia.mdhd.timescale,r.duration=u.mdia.mdhd.duration||r.mvhdDurtion/r.mvhdTimecale*r.timescale;var T,x,I,C,P,E,O,L,R,A,D,M,B,j,N,U,F,z=T0(u.mdia.minf.stbl.stsd)[0];switch(r.sampleSize=z.sampleSize,r.sampleRate=z.sampleRate,r.channelCount=z.channelCount,r.present=!0,z.type){case"alaw":r.codecType=r.codec=TE.G711PCMA,r.sampleRate=8e3;break;case"ulaw":r.codecType=r.codec=TE.G711PCMU,r.sampleRate=8e3;break;default:r.sampleDuration=TD.getFrameDuration(r.sampleRate,r.timescale),r.sampleRateIndex=TD.getRateIndexByRate(r.sampleRate),r.objectType=(null===(n=z.esds)||void 0===n?void 0:n.objectType)||2,z.esds&&(r.config=fw(z.esds.config)),r.codec=(null===(i=z.esds)||void 0===i?void 0:i.codec)||"mp4a.40.2"}r.sampleDuration=TD.getFrameDuration(r.sampleRate,r.timescale),r.objectType=(null===(x=z.esds)||void 0===x?void 0:x.objectType)||2,z.esds&&z.esds.config&&(r.config=fw(z.esds.config)),r.codec=(null===(I=z.esds)||void 0===I?void 0:I.codec)||"mp4a.40.2",r.sampleRateIndex=TD.getRateIndexByRate(r.sampleRate),r.ext={},r.ext.stss=null===(C=u.mdia)||void 0===C||null===(P=C.minf)||void 0===P||null===(E=P.stbl)||void 0===E?void 0:E.stss,r.ext.ctts=null===(O=u.mdia)||void 0===O||null===(L=O.minf)||void 0===L||null===(R=L.stbl)||void 0===R?void 0:R.ctts,r.present=!0,z&&"enca"===z.type&&(r.isAudioEncryption=!0,z.data_format=null===(A=z.sinf)||void 0===A||null===(D=A.frma)||void 0===D?void 0:D.data_format,z.default_KID=null===(M=z.sinf)||void 0===M||null===(B=M.schi)||void 0===B?void 0:B.tenc.default_KID,z.default_IsEncrypted=null===(j=z.sinf)||void 0===j||null===(N=j.schi)||void 0===N?void 0:N.tenc.default_IsEncrypted,z.default_IV_size=null===(U=z.sinf)||void 0===U||null===(F=U.schi)||void 0===F?void 0:F.tenc.default_IV_size,r.audioSenc=u.mdia.minf.stbl.senc&&u.mdia.minf.stbl.senc.samples,r.useEME=e.useEME,r.kidValue=e.kidValue,r.enca=z)}if(r&&(r.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!r&&r.isAudioEncryption),null!=t&&t.encv||null!=r&&r.enca){var K,V,q=null==t||null===(K=t.encv)||void 0===K?void 0:K.default_KID,H=null==r||null===(V=r.enca)||void 0===V?void 0:V.default_KID,G=q||H?(q||H).join(""):null;t&&(t.kid=G),r&&(r.kid=G)}return t&&(t.flags=3841),r&&(r.flags=1793),{videoTrack:t,audioTrack:r}}}},{key:"evaluateDefaultDuration",value:function(e,t,r){var n,i=null==t||null===(n=t.samples)||void 0===n?void 0:n.length;return i?1024*i/t.timescale*e.timescale/r:1024}},{key:"moofToSamples",value:function(t,r,n){var i,a={};return t.mfhd&&(r&&(r.sequenceNumber=t.mfhd.sequenceNumber),n&&(n.sequenceNumber=t.mfhd.sequenceNumber)),cb(i=t.traf).call(i,function(t){var i=t.tfhd,o=t.tfdt,u=t.trun;if(i&&u){o&&(r&&r.id===i.trackId&&(r.baseMediaDecodeTime=o.baseMediaDecodeTime),n&&n.id===i.trackId&&(n.baseMediaDecodeTime=o.baseMediaDecodeTime));var s,c=i.defaultSampleSize||0,l=i.defaultSampleDuration||e.evaluateDefaultDuration(r,n,u.samples.length||u.sampleCount),f=u.dataOffset||0,d=0,h=-1;if(!u.samples.length&&u.sampleCount){a[i.trackId]=[];for(var v=0;v<u.sampleCount;v++)a[i.trackId].push({offset:f,dts:d,duration:l,size:c}),d+=l,f+=c}else a[i.trackId]=c_(s=u.samples).call(s,function(e,t){return(e={offset:f,dts:d,pts:d+(e.cts||0),duration:e.duration||l,size:e.size||c,gopId:h,keyframe:0===t||null!==TQ(e)&&void 0!==TQ(e)&&(65536&TQ(e))>>>0!=65536}).keyframe&&(h++,e.gopId=h),d+=e.duration,f+=e.size,e})}}),a}},{key:"moovToSamples",value:function(e){var t=e.trak;if(t&&t.length){var r=la(t).call(t,function(e){var t,r;return"vide"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)}),n=la(t).call(t,function(e){var t,r;return"soun"===(null===(t=e.mdia)||void 0===t||null===(r=t.hdlr)||void 0===r?void 0:r.handlerType)});if(r||n){if(r){var i,a,o,u,s=null===(o=r.mdia)||void 0===o||null===(u=o.minf)||void 0===u?void 0:u.stbl;if(!s)return;var c=s.stts,l=s.stsc,f=s.stsz,d=s.stco,h=s.stss,v=s.ctts;if(!(c&&l&&f&&d&&h))return;i=T7(c,l,f,d,v,h)}if(n){var p,g,y,m=null===(p=n.mdia)||void 0===p||null===(g=p.minf)||void 0===g?void 0:g.stbl;if(!m)return;var _=null===(y=n.mdia.mdhd)||void 0===y?void 0:y.timescale,b=m.stts,k=m.stsc,w=m.stsz,S=m.stco;if(!(_&&b&&k&&w&&S))return;a=T7(b,k,w,S)}return{videoSamples:i,audioSamples:a}}}}}]),e}();function T7(e,t,r,n,i,a){var o,u,s,c,l=[],f=null==i?void 0:T0(i),d=T0(t),h=T0(n),v=r.entrySizes,p=null==a?void 0:T0(a);p&&(u={},cb(p).call(p,function(e){u[e-1]=!0})),f&&(s=[],cb(f).call(f,function(e){for(var t=e.count,r=e.offset,n=0;n<t;n++)s.push(r)}));var g=-1,y=0,m=0,_=0,b=0,k=0,w=d[0].samplesPerChunk,S=d[1]?d[1].firstChunk-1:1/0;return cb(o=T0(e)).call(o,function(e){for(var t=e.count,n=e.delta,i=0;i<t;i++)c={dts:y,duration:n,size:v[m]||r.sampleSize,offset:h[_]+k,index:m},p&&(c.keyframe=u[m],c.keyframe&&g++,c.gopId=g),s&&m<s.length&&(c.pts=c.dts+s[m]),l.push(c),y+=n,++m<w?k+=c.size:(_++,k=0,_>=S&&(S=d[++b+1]?d[b+1].firstChunk-1:1/0),w+=d[b].samplesPerChunk)}),l}function xe(e,t){return e.dataReferenceIndex=TF(t,6),e.width=TF(t,24),e.height=TF(t,26),e.horizresolution=Tz(t,28),e.vertresolution=Tz(t,32),e.frameCount=TF(t,40),e.depth=TF(t,74),78}function xt(e,t){return e.dataReferenceIndex=TF(t,6),e.channelCount=TF(t,16),e.sampleSize=TF(t,18),e.sampleRate=Tz(t,24)/65536,28}function xr(e,t,r){if(e){if(e.size!==e.data.length)throw Error("box ".concat(e.type," size !== data.length"));var n={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(n.version=e.data[e.headerSize],n.flags=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}(e.data,e.headerSize+1),n.headerSize+=4),r(n,e.data.subarray(n.headerSize),n.start+n.headerSize),n}}var xn=function(e,t,r){for(var n=String(r),i=0|t,a=Math.ceil(i/n.length),o=[],u=String(e);a--;)o.push(n);return o.join("").substring(0,i-u.length)+u},xi=function(){for(var e=[],t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return cb(r).call(r,function(t){e.push(xn(Number(t).toString(16),2,0))}),e[0]};function xa(e,t,r,n){return e[t]?n?n(e[t]):e[t]:r}var xo=function(){var e;function t(e){var r,n,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sv(this,t),sf((r=this,n=s_(n=t),a=sy(r,sm()?rf(n,[],s_(r).constructor):n.apply(r,i))),"duration",void 0),sf(a,"url",void 0),sf(a,"options",void 0),sf(a,"mediaList",void 0),sf(a,"retryMax",void 0),sf(a,"retry",void 0),sf(a,"type",void 0),sf(a,"isEnd",void 0),sf(a,"videoCodecType",void 0),sf(a,"videoCodecs",void 0),sf(a,"hasSync",void 0),sf(a,"_readyPromise",void 0),sf(a,"dashType",void 0),sf(a,"sidxHanded",void 0),a.url=e,a.options=o,a.mediaList={video:[],audio:[]},a.mediaList.audio.selectedIdx=0,a.retryMax=10,a.retry=0,a.type="live",a.isEnd=!1,a.duration=0,a.videoCodecType="",a.videoCodecs="",a.hasSync=!1,a.dashType="segment_base",a._readyPromise=new wU,a}return sk(t,m3),sg(t,[{key:"_createLoadingState",value:function(){return{currentIndex:0,isLoading:!1}}},{key:"readyPromise",get:function(){return this._readyPromise}},{key:"calcVideoCodeType",value:function(e,t){if(e||t){var r=null;t?r=t.split(".")[0]:e&&(r=e.split(".")[0]);for(var n=cw(TS),i=0;i<n.length;i++){var a,o=n[i],u=TS[o],s=s8(a=u.types).call(a,u.visualEntryBox);if(lf(s).call(s,r)>-1){this.videoCodecType=o,"hevc"===o?this.videoCodecType="h265":"bvc2"===o&&(this.videoCodecType="h266"),this.videoCodecs=u.codecs;break}}this.videoCodecType||(this.videoCodecType=Tw.AVC,this.videoCodecs=TS[Tw.AVC].codecs)}}},{key:"fetch",value:(e=uj(uM().mark(function e(r){var n,i,a,o,u,s,c=this;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={TYPE:"LIVE",ENDLIST:""},i=[],e.prev=1,a=new S8({}),e.next=2,a.load(r);case 2:if(!(o=e.sent.data)){e.next=4;break}if(u=t.parseMPD(o)){e.next=3;break}throw Error("parse mpd error");case 3:return this._parseMeta(n,u),this._parseSegments(u,r),cb(s=["video","audio"]).call(s,function(e){var t;c.mediaList[e].length>0&&(c.mediaList[e].selectedIdx=0,fU(t=c.mediaList[e]).call(t,function(t,r){return"video"===e?r.height-t.height:r.bandwidth-t.bandwidth}))}),e.abrupt("return",{meta:n,segments:i});case 4:throw Error("MPD_PARSE_ERROR");case 5:e.next=7;break;case 6:throw e.prev=6,Error(e.catch(1).message);case 7:case"end":return e.stop()}},e,this,[[1,6]])})),function(t){return e.apply(this,arguments)})},{key:"_parseMeta",value:function(e,t){"static"===t.type&&(e.TYPE="VOD"),t.minBufferTime&&(e.minBufferTime=Ty(t.minBufferTime)),t.maxSegmentDuration&&(e.maxSegmentDuration=Ty(t.maxSegmentDuration)),t.mediaPresentationDuration&&(this.duration=Ty(t.mediaPresentationDuration));var r=t.Period[0];!this.duration&&r&&r.duration&&(this.duration=Ty(r.duration)),e.duration=this.duration}},{key:"_parseST",value:function(e,t,r,n,i){for(var a=c7(e.timescale),o=c7(e.duration),u=Math.round(o/a),s=cX(e.startNumber,10),c=s+Math.ceil(this.duration/u)-1,l=s;l<=c;l++){var f=u*(l-s),d=u*(l-s+1);l===c&&(u=this.duration-u*(c-s),d=this.duration),t.push({idx:l,start:Math.round(f),end:Math.round(d),url:n+e.media.replace("$RepresentationID$",r).replace("$Number%04d$",function(e,t){var r;return he(r="000"+e).call(r,-t)}(l,4)),downloaded:0,segmentDuration:u,height:i})}}},{key:"_getVideoSegments",value:function(e){var t,r,n,i,a=e.bandwidth,o=e.id,u=e.baseURL,s=e.initSegment,c=e.mediaSegments,l=e.mimeType,f=e.codecs,d=e.width,h=e.height,v=e.frameRate,p=e.sar,g=e.startWithSAP,y=e.timescale,m=e.duration,_=e.encrypted;if(this.options.dynamic_video&&this.options.dynamic_video.dynamic_video_list)for(var b=0;b<this.options.dynamic_video.dynamic_video_list.length;b++){var k=this.options.dynamic_video.dynamic_video_list[b];k.bitrate===a&&(t=k.size,r=k.definition,n=k.file_id,i=k.audio_file_id)}this.mediaList.video.push({id:o,baseURL:u,initSegment:u+s.replace("$RepresentationID$",o),inited:!1,mediaSegments:c,mimeType:l,codecs:f,width:d,height:h,size:t,frameRate:v,sar:p,startWithSAP:g,bandwidth:a,timescale:y,duration:m,encrypted:_,definition:r,fileId:n,audioFileId:i})}},{key:"_getAudioSegments",value:function(e){var t,r=e.bandwidth,n=e.id,i=e.baseURL,a=e.initSegment,o=e.mediaSegments,u=e.mimeType,s=e.codecs,c=e.startWithSAP,l=e.timescale,f=e.duration,d=e.encrypted;if(this.options.dynamic_video&&this.options.dynamic_video.dynamic_audio_list)for(var h=0;h<this.options.dynamic_video.dynamic_audio_list.length;h++)this.options.dynamic_video.dynamic_audio_list[h].bitrate===r&&(t=this.options.dynamic_video.dynamic_audio_list[h].size);this.mediaList.audio.push({id:n,baseURL:i,initSegment:i+a.replace("$RepresentationID$",n),inited:!1,mediaSegments:o,mimeType:u,codecs:s,startWithSAP:c,bandwidth:r,size:t,timescale:l,duration:f,encrypted:d})}},{key:"_parseSegments",value:function(e,t){var r,n=this,i=[],a="";e.BaseURL&&(a=e.BaseURL[0]);var o=e.Period[0];o.AdaptationSet&&o.AdaptationSet.length>1&&cb(r=o.AdaptationSet).call(r,function(e){var r,o="video/mp4",u="avc1.64001E",s=640,c=360,l=25,f="1:1",d="1",h=588633;e.mimeType&&("video/mp4"===(o=e.mimeType)?(u=e.codecs,s=c7(e.width),c=c7(e.height),l=c7(e.frameRate),f=e.sar,d=e.startWithSAP,h=c7(e.bandwidth),n.calcVideoCodeType(void 0,u)):"audio/mp4"===o&&(u=e.codecs,d=e.startWithSAP,h=c7(e.bandwidth))),cb(r=e.Representation).call(r,function(r){lf(i).call(i,r.id)>-1&&(r.id=(cX(i[i.length-1],10)+1).toString()),i.push(r.id);var v,p="",g=[],y=0,m=he(t).call(t,0,Tg(t).call(t,"/")+1)+a;"video/mp4"===(o=xa(r,"mimeType",o))?(r.codecs&&(u=r.codecs,n.calcVideoCodeType(void 0,u)),s=xa(r,"width",s,c7),c=xa(r,"height",c,c7),l=xa(r,"frameRate",l,c7),f=xa(r,"sar",f)):"audio/mp4"===o&&(u=xa(r,"codecs",u)),d=xa(r,"startWithSAP",d),h=xa(r,"bandwidth",h,c7),r.BaseURL&&r.BaseURL.length>0&&(m+=r.BaseURL[0]),e.SegmentTemplate&&e.SegmentTemplate.length>0&&(v=e.SegmentTemplate[0]),r.SegmentTemplate&&r.SegmentTemplate.length>0&&(v=r.SegmentTemplate[0]);var _=!1;(e.ContentProtection||r.ContentProtection)&&(_=!0),v&&(p=v.initialization,y=c7(v.duration),n._parseST(v,g,r.id,m,c)),h="string"==typeof h?cX(h):h,"video/mp4"===o?n._getVideoSegments({id:r.id,bandwidth:h,baseURL:m,initSegment:p,mediaSegments:g,mimeType:o,codecs:u,width:s,height:c,frameRate:l,sar:f,startWithSAP:d,timescale:0,duration:y,encrypted:_}):"audio/mp4"===o&&n._getAudioSegments({id:r.id,baseURL:m,bandwidth:h,initSegment:p,mediaSegments:g,mimeType:o,codecs:u,startWithSAP:d,timescale:0,duration:y,encrypted:_})})})}},{key:"init",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.mediaList={video:[],audio:[]};var r=this.options;if(r.dynamic_video.dynamic_type&&"segment_template"!==r.dynamic_video.dynamic_type){this.dashType="segment_base",r.duration;var n,i,a=r.dynamic_video;cb(n=["dynamic_video_list","dynamic_audio_list"]).call(n,function(t){var n,i="dynamic_audio_list"===t,o=0;cb(n=a[t]).call(n,function(n){var a=cX(n.init_range.split("-")[0],10),u=cX(n.init_range.split("-")[1],10),s=cX(n.index_range.split("-")[0],10),c=cX(n.index_range.split("-")[1],10),l=n.first_segment_range,f=l?[cX(l.split("-")[0],10),cX(l.split("-")[1],10)]:null;i||e.calcVideoCodeType(n.codec_type);e.mediaList["dynamic_audio_list"===t?"audio":"video"].push({id:(o++).toString(),baseURL:n.main_url,initSegment:n.main_url,initSegmentRange:[a,u],sidxRange:[s,c],firstMoofMdatRange:f,inited:!1,hasSidx:!1,mediaSegments:[],mimeType:i?"audio/mp4":"video/mp4",codecs:i?"mp4a.40.2":e.videoCodecs,width:n.vwidth,height:n.vheight,bandwidth:cX(n.bitrate),avg_bitrate:n.avg_bitrate,size:n.size,duration:r.duration,definition:n.definition,sidxRes:void 0,fileId:n.file_id,audioFileId:n.audio_file_id,fallbackUrl:n.fallback_url,hasFallback:!1,backupUrl:n.backup_url_1,hasBackup:!1})})}),this.type="vod",cb(i=["video","audio"]).call(i,function(t){var r;e.mediaList[t].length>0&&(e.mediaList[t].selectedIdx=0,"video"===t&&fU(r=e.mediaList[t]).call(r,function(e,r){return"video"===t?r.height-e.height:r.bandwidth-e.bandwidth}))}),t&&this.emit("ready"),this._readyPromise.resolve()}else this.dashType="segment_template",this.fetch(r.dynamic_video.main_url).then(function(t){e.type=t.meta.TYPE.toLocaleLowerCase(),e.emit("ready"),e._readyPromise.resolve()},function(){})}},{key:"getSidx",value:function(e){var t,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"video",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=this.mediaList[n][i],u=o.sidxRange[1];try{var s,c,l,f,d=e instanceof ArrayBuffer?e:e.buffer,h=new Uint8Array(d),v=String.fromCharCode.apply(null,fw(h.subarray(4,8)));if("sidx"!==v)throw Error(s8(c=s8(l=s8(f="topLevel ".concat(v,", index:")).call(f,i,", res:")).call(l,e.byteLength,", range:")).call(c,s$(o.sidxRange)));var p=(t=T9.sidx(T9.findBox(new Uint8Array(d),[])[0])).timescale,g=[],y=0,m=0,_=u+1,b=_-1;cb(s=t.references).call(s,function(e,t){m+=e.subsegment_duration,b+=e.referenced_size,g.push({idx:t+1,url:o.initSegment,start:Math.round(y/p),end:Math.round(m/p),startRaw:y/p,endRaw:m/p,range:[_,b],segmentDuration:Math.round(e.subsegment_duration/p),codecType:r.getCodecType(),mediaType:n,fileId:o.fileId}),y=m+1,_=b+1}),g[0].startTime_=0,o.mediaDuration=0,cb(g).call(g,function(e,t){o.mediaDuration+=e.segmentDuration,t>0&&(e.startTime_=g[t-1].startTime_+g[t-1].segmentDuration),t===g.length-1&&a&&(e.end=a)}),o.hasSidx=!0,o.mediaSegments=g,o.timescale=p,o.sidxRes=e}catch(e){if(this.sidxHanded)return;this.sidxHanded=!0}}},{key:"getCodecType",value:function(){return"bvc2"===this.videoCodecType?"h266":"hevc"===this.videoCodecType?"h265":this.videoCodecType?this.videoCodecType:"h264"}}],[{key:"parseMPD",value:function(e){var t;if("string"==typeof e&&(t=e),e instanceof ArrayBuffer){var r=new Uint8Array(e);t=String.fromCharCode.apply(null,fw(r))}return t?(t=t.replace(/<(\/)?(\w+:)+(\w+)/g,"<$1$3"),wG.parse(t)):null}}])}();!function(){var e,t,r,n,i,a,o;function u(e,t){var r,n,i,a;return sv(this,u),sf((n=this,i=u,a=[e,t],i=s_(i),r=sy(n,sm()?rf(i,a||[],s_(n).constructor):i.apply(n,a))),"_loader",void 0),sf(r,"_pendingItem",void 0),sf(r,"_pendingTask",void 0),sf(r,"options",void 0),sf(r,"preloadManager",void 0),r.preloadManager=e,r._loader=new S8({loaderType:Sq.XHR,responseType:"arraybuffer"}),r._loader.on("real_time_speed",function(t){if((null==t?void 0:t.len)>0){var n,i,a=(null==t||null===(n=t.priOptions)||void 0===n?void 0:n.type)||Sm.CDN,o=Math.round(8*t.len*1e3/t.time/1024),u=null==t?void 0:t.priOptions.extData,s=u.cacheKey,c=null===(i=r._pendingItem)||void 0===i?void 0:i.duration,l={vid:u.vid,loadType:a,size:t.len,speed:o,cacheKey:s,vtype:Sg.DASH,duration:c,bitrate:u.bitrate,range:t.range,mediaType:u.mediaType,format:Sg.DASH,segmentDuration:null==u?void 0:u.segmentDuration};e.bwEventEmit(l)}}),r.options=t,r._pendingTask=null,r}sk(u,Sc),sg(u,[{key:"_setItem",value:(o=uj(uM().mark(function e(t,r){var n,i;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.vtype=Sg.DASH,e.next=1,this.preloadManager.getItem(t,!0);case 1:(n=e.sent)?(i=function(e){var t,r={},n={},i={},a=Ts(cw(e));try{for(a.s();!(t=a.n()).done;){var o,u,s=t.value,c=e[s];c.isInitSegment?i[s]=c:(c.rangeEnd===(null===(o=c.range)||void 0===o?void 0:o[1])&&c.rangeStart===(null===(u=c.range)||void 0===u?void 0:u[0])?i[s]=c:"audio"===c.mediaType?r[s]=c:"video"===c.mediaType&&(n[s]=c),c.cacheKey=s)}}catch(e){a.e(e)}finally{a.f()}for(var l=T_(r),f=0,d=cw(l);f<d.length;f++)sC(i,Tb(l[d[f]]));for(var h=T_(n),v=0,p=cw(h);v<p.length;v++)sC(i,Tb(h[p[v]]));return i}(i=sC({},n,r)),this.preloadManager.setItem(t,i,!0)):this.preloadManager.setItem(t,r,!0);case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"_getDashContext",value:function(e){var t,r,n=e.payload;if("TOP"===e.playInfoType){var i={dashOpts:e.payload};(function(e){e.duration=e.dashOpts.Data.Duration,e.dashOpts.dynamic_video=e.dashOpts.Data,e.dashOpts.dynamic_video.dynamic_video_list=[],e.dashOpts.dynamic_video.dynamic_audio_list=[],e.dashOpts.dynamic_video.dynamic_type=e.dashOpts.Data.AdaptiveInfo.AdaptiveType,e.dashOpts.dynamic_video.main_url=e.dashOpts.Data.AdaptiveInfo.MainPlayUrl;for(var t=0;t<e.dashOpts.Data.PlayInfoList.length;t++){var r=e.dashOpts.Data.PlayInfoList[t],n={backup_url_1:r.BackupPlayUrl,bitrate:e.dashOpts.Data.VideoID?r.Bitrate:1e3*r.Bitrate,check_info:r.CheckInfo,codec_type:r.Codec,definition:r.Definition,encrypt:!(!r.PlayAuth||!r.PlayAuthID&&!r.PlayAuthId),file_hash:r.FileHash||r.Md5,file_id:r.FileID,index_range:r.IndexRange,init_range:r.InitRange,first_segment_range:r.FirstSegmentRange,kid:r.PlayAuthID||r.PlayAuthId,logo_type:r.Logo||r.LogoType,main_url:r.MainPlayUrl,preload_interval:r.PreloadInterval,preload_max_step:r.PreloadMaxStep,preload_min_step:r.PreloadMinStep,preload_size:r.PreloadSize,quality:r.Quality,size:r.Size,spade_a:r.PlayAuth,vheight:r.Height,vtype:r.Format,vwidth:r.Width};"video"===r.MediaType||"video"===r.FileType?e.dashOpts.dynamic_video.dynamic_video_list.push(n):"audio"!==r.MediaType&&"audio"!==r.FileType||e.dashOpts.dynamic_video.dynamic_audio_list.push(n)}})(i),n=i.dashOpts.dynamic_video}if(cp(n)){var a={dashOpts:{Data:e,dynamic_video:e}};(function(e){var t=e.dashOpts.dynamic_video=e.dashOpts.Data;t.video_duration=t.duration,t.dynamic_video_list=[],t.dynamic_audio_list=[],e.dashOpts.dynamic_video.dynamic_type="segment_base";for(var r=t.playInfoList||t.payload,n=0;n<r.length;n++){var i,a,o,u=r[n];u.vtype.toUpperCase()===Sg.DASH&&(u.main_url=(null===(i=u.url)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.src)||u.main_url,u.backup_url_1=(null===(a=u.url)||void 0===a||null===(a=a[1])||void 0===a?void 0:a.src)||u.backup_url_1,u.fallback_url=(null===(o=u.url)||void 0===o||null===(o=o[2])||void 0===o?void 0:o.src)||u.fallback_url,u.codec_type="bytevc1"===u.codecType?"h265":u.codecType,"video"===u.mediaType&&t.dynamic_video_list.push(JSON.parse(s$(u))),"audio"===u.mediaType&&t.dynamic_audio_list.push(u))}})(a),n=a.dashOpts.dynamic_video}return n.dynamic_video_list&&cb(t=n.dynamic_video_list).call(t,function(e){e.bitrate=e.real_bitrate||e.bitrate}),n.dynamic_audio_list&&cb(r=n.dynamic_audio_list).call(r,function(e){e.bitrate=e.real_bitrate||e.bitrate}),{dynamic_video:n}}},{key:"_getStartContext",value:function(){return{mediaInfos:{dynamic_video_list:[],dynamic_audio_list:[]},vtype:"",video:{segments:[]},audio:{segments:[]}}}},{key:"_cacheInitSegments",value:(a=uj(uM().mark(function e(t,r,n,i){var a,o,u,s,c,l,f,d;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.mediaList.video||[],o=t.mediaList.audio||[],u=[],o&&o.length>0&&(s=this.makeInitBaseSegemntRequest(t,r.duration,"audio",o.selectedIdx,void 0,r.vid),u.push(s)),a&&a.length>0&&(c=this._calVideoItemIdx(a,i.bandwidth)||0,l=a[c].definition,f=this.makeInitBaseSegemntRequest(t,r.duration,"video",c,l,r.vid),u.push(f)),e.next=1,cS.all(u);case 1:cb(d=e.sent).call(d,function(e){"video"===e.data.mediaType&&(e.data.orgDefinition=i.orgDefinition),n[e.key]=e.data});case 2:case"end":return e.stop()}},e,this)})),function(e,t,r,n){return a.apply(this,arguments)})},{key:"start",value:(i=uj(uM().mark(function e(t,r){var n,i,a,o,u,s,c,l,f,d,h,v,p,g,y,m,_,b,k,w,S,T,x,I,C,P,E,O,L,R,A,D,M,B,j,N,U,F,z,K,V,q,H,G,W,Y,X,Q,$=this;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=(n=cS.withResolvers()).resolve,a=n.promise,o={},this._pendingTask={resolve:i,data:t,map:o},s=(u=cS.withResolvers()).resolve,c=u.promise,l=new xo("anytext",this._getDashContext(t)),f=this._getStartContext(),d=function(){f.mediaInfos.dynamic_video_list=l.mediaList.video||[],f.mediaInfos.dynamic_audio_list=l.mediaList.audio||[],s(f)},l.once("ready",d),l.init(),e.next=1,c;case 1:if(this._pendingTask){e.next=2;break}return h=this.isStepWise(),i({remove:!h}),e.abrupt("return",a);case 2:if(p=(v=cS.withResolvers()).resolve,g=v.promise,y=f.mediaInfos,m=this._getIdx(y.dynamic_video_list,r||t.defaultDefinition),_=y.dynamic_video_list[m]||y.dynamic_video_list[0],y.dynamic_video_list[m]&&l.mediaList.audio&&y.dynamic_audio_list.length>0&&(l.mediaList.video.selectedIdx=m,-1===(b=function(e,t,r){var n,i=e.selectedIdx;var a=null===(n=e[i])||void 0===n?void 0:n.audioFileId;if(!a)return -1;for(var o=0;o<t.length;o++)if(t[o].fileId===a)return o;return 0}(l.mediaList.video,l.mediaList.audio,-1))&&(b=0),l.mediaList.audio.selectedIdx=b),t.dashType=l.dashType,this._pendingItem=_,this._pendingItem.duration||(this._pendingItem.duration=t.duration),k={bandwidth:_.bitrate||_.bandwidth,time:t.startTime||0,orgDefinition:_.orgDefinition,hasSegmentRange:!1},w=[],S=this.isStepWise(),e.prev=3,E=void 0===t.video||0===(null===(T=t.video.segments)||void 0===T?void 0:T.length),void 0===t.stepIdx&&(t.stepIdx=0),void 0===t.steps&&(t.steps=[0]),S||(t.steps=[0]),0!==t.stepIdx&&!E){e.next=10;break}if("segment_template"!==l.dashType){e.next=4;break}this._calRequests(l,k,p,t,!0),p(),e.next=9;break;case 4:if(0!==t.stepIdx){e.next=8;break}if(A=!1,(null==(D=l.mediaList)||null===(O=D.video)||void 0===O?void 0:O.length)>0&&(null==D||null===(L=D.audio)||void 0===L?void 0:L.length)>0&&(A=D.video[D.video.selectedIdx].firstMoofMdatRange&&D.audio[D.audio.selectedIdx].firstMoofMdatRange),S||!A||null===(R=this.options)||void 0===R||!R.useSegmentRange){e.next=5;break}t.hasSegmentRange=!0,this._requestAcc(l,k,p,t),e.next=7;break;case 5:return e.next=6,this._cacheInitSegments(l,t,o,k);case 6:this._calRequests(l,k,p,t);case 7:e.next=9;break;case 8:p([]);case 9:e.next=11;break;case 10:p([]);case 11:return e.next=12,g;case 12:if(w=e.sent,0===(M=S?t.stepIdx:0)&&this._setItem(t,o),this._pendingTask){e.next=13;break}return i({remove:!S}),e.abrupt("return",a);case 13:S&&(N=t.steps.length,N<(U=Math.max(null===(B=t.video)||void 0===B?void 0:B.segments.length,null===(j=t.audio)||void 0===j?void 0:j.segments.length))&&(K=cI(F=Array(U-N)).call(F,1),(z=t.steps).push.apply(z,f3(K)))),V=[null===(x=t.video)||void 0===x?void 0:x.segments[M],null===(I=t.audio)||void 0===I?void 0:I.segments[M]],q=cC(C=s8(P=w||[]).call(P,V)).call(C,function(e){return!!e}),H=[],G=Ts(q),e.prev=14,Y=uM().mark(function e(){var r,n,i,a,u;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=(r=W.value).url,i=r.range,a=r.extData,u=$._getData(n,i,a).then(function(e){"video"===e.mediaType&&(e.orgDefinition=k.orgDefinition),!e.fromCache&&(o[a.cacheKey]=e,$._setItem(t,o))}),H.push(u);case 1:case"end":return e.stop()}},e)}),G.s();case 15:if((W=G.n()).done){e.next=17;break}return e.delegateYield(Y(),"t0",16);case 16:e.next=15;break;case 17:e.next=19;break;case 18:e.prev=18,X=e.catch(14),G.e(X);case 19:return e.prev=19,G.f(),e.finish(19);case 20:return e.next=21,cS.all(H);case 21:e.next=23;break;case 22:e.prev=22,e.catch(3);case 23:return e.prev=23,i({remove:!S}),e.finish(23);case 24:return this._pendingTask=null,e.abrupt("return",a);case 25:case"end":return e.stop()}},e,this,[[3,22,23,24],[14,18,19,20]])})),function(e,t){return i.apply(this,arguments)})},{key:"isStepWise",value:function(){var e=this.options.openStepwiseType;return this.stepwise&&(void 0===e||e.toUpperCase()===Sg.DASH)}},{key:"_getIdx",value:function(e,t){var r=0;return cb(e).call(e,function(e,n){e.definition===t&&(r=n)}),r}},{key:"_calRequests",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=[],o=t.bandwidth,u=e.mediaList.video||[],s=e.mediaList.audio||[],c=n.vid,l=e.videoCodecType;if(s&&s.length>0){var f=s.selectedIdx;s[f].codec_type=l;var d=this._calUrls(s[f],"audio",c,null,i,n);a=s8(a).call(a,d)}if(u&&u.length>0){var h=u[this._calVideoItemIdx(u,o)||0];h.codec_type=l;var v=this._calUrls(h,"video",c,h.definition,i,n);a=s8(a).call(a,v)}a.length,r(a)}},{key:"_getSplitGopRange",value:function(e,t,r){var n=e.segment,i=n.range;if(!e.isStep){var a=n.range[1],o=n.range[0];return{allRangeItems:[{item:n,range:i,segmentDuration:n.endRaw-n.startRaw,rangeEnd:a,rangeStart:o}],newSteps:t}}var u,s=[],c=[],l=Ts(t);try{for(l.s();!(u=l.n()).done;){var f=u.value;if(f>=n.endRaw){c.push(n.endRaw);break}c.push(f)}}catch(e){l.e(e)}finally{l.f()}var d=void 0===this.options.needfixSizeSegment||this.options.needfixSizeSegment;d&&c.length>0&&c[c.length-1]<n.endRaw&&c.push(n.endRaw);for(var h=i[0],v=0,p=c.length,g=n.range[1],y=0;y<c.length;y++){var m,_=c[y],b=h,k=d?v===c.length-1:_>=n.endRaw,w=Math.floor(_*r/8)+i[0]+1,S=k?null===(m=n.range)||void 0===m?void 0:m[1]:w-1;h=S+1;var T=S>=g;if(i=[b,T?g:S],b>=S)break;s.push({item:n,range:i,segmentDuration:T?n.endRaw:_,rangeEnd:n.range[1],rangeStart:n.range[0]}),v++}return v<p&&ly(c).call(c,v,p-v),{allRangeItems:s,newSteps:c}}},{key:"_recalcSteps",value:function(e,t){var r,n=0,i=!1,a=[],o=Ts(t);try{for(o.s();!(r=o.n()).done;){var u=r.value,s=e[n],c=e[e.length-1],l=u.endRaw;if(u.startRaw<=s&&c<l&&!i)for(;n<e.length;)a.push({stepTime:e[n],segment:u,isStep:!0}),n++;else for(;n<e.length;){var f=e[n],d=e[n+1];if(!(f<u.endRaw&&d<u.endRaw)){n++,a.push({stepTime:u.endRaw,isStep:!1,segment:u}),i=!0;break}n++}if(n>=e.length)break}}catch(e){o.e(e)}finally{o.f()}return a}},{key:"_getRange",value:function(e,t){var r,n,i,a=e.mediaSegments,o=c_(r=t.steps).call(r,function(e){return e+0}),u=this._recalcSteps(o,a),s=[],c="segment_template"===t.dashType;if((null===(n=t.steps)||void 0===n?void 0:n.length)>0&&(null===(i=t.steps)||void 0===i?void 0:i[0])>0&&!c){if(u[0].isStep){var l=this._getSplitGopRange(u[0],t.steps,e.bandwidth).allRangeItems;s.push.apply(s,f3(l))}else{var f,d=Ts(u);try{for(d.s();!(f=d.n()).done;){var h=f.value,v=this._getSplitGopRange(h,t.steps,e.bandwidth).allRangeItems;s.push.apply(s,f3(v))}}catch(e){d.e(e)}finally{d.f()}}}else{var p=u[0].segment,g=p.range,y=p.range[0],m=p.range[1];s.push({item:p,range:g,segmentDuration:p.endRaw-p.startRaw,rangeEnd:m,rangeStart:y})}return s}},{key:"_calUrls",value:function(e,t,r,n,i,a){var o=[];if(e){var s=e.avg_bitrate||e.bandwidth||e.bitrate,c=u.vtype;a[t]||(a[t]={initSegment:null,segments:[]});var l=a[t];if(i){var f,d,h=[null===(f=e.initSegmentRange)||void 0===f?void 0:f[0],null===(d=e.sidxRange)||void 0===d?void 0:d[1]],v={url:e.initSegment,range:h,extData:{cacheKey:Tm({vid:r,mediaType:t,codecType:e.codec_type,vtype:c,bitrate:s,fileId:e.fileId,range:h,definition:n}),vid:r,vtype:c,isInitSegment:!0,mediaType:t,codecType:e.codec_type,range:h,bitrate:s,segmentDuration:0,checkPreload:!0}};o.push(v),l.initSegment=v}var p=[];if(a.hasSegmentRange){var g=e.firstMoofMdatRange[0],y=e.firstMoofMdatRange[1];p=[{item:{start:0,end:7,url:e.initSegment},range:[g,y],segmentDuration:7,rangeEnd:y,rangeStart:g}]}else p=this._getRange(e,a);var m,_=Ts(p);try{for(_.s();!(m=_.n()).done;){var b=m.value,k=b.item,w=b.range,S=b.segmentDuration,T=b.rangeEnd,x=b.rangeStart,I=Tm({vid:r,mediaType:t,codecType:e.codec_type,vtype:c,start:k.start,end:k.end,definition:n,bitrate:s,fileId:e.fileId,range:w});l.segments.push({url:k.url,range:w,extData:{cacheKey:I,vid:r,vtype:c,isInitSegment:!1,mediaType:t,codecType:e.codec_type,range:w,bitrate:s,segmentDuration:S,checkPreload:!0,rangeEnd:T,rangeStart:x,fileId:e.fileId}})}}catch(e){_.e(e)}finally{_.f()}}return o}},{key:"_requestAcc",value:function(e,t,r,n){this._calRequests(e,t,r,n,!0)}},{key:"_calStartEnd",value:function(e,t){for(var r=-1,n=0;n<e.length;n++){var i=e[n],a=t||0;if(i.start>=a&&a<i.end){r=n;break}}return -1===r&&(r=0),r}},{key:"_calVideoItemIdx",value:function(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(n&&n.bandwidth===t)return r}return null}},{key:"_getData",value:(n=uj(uM().mark(function e(t,r,n){var i,a,o,s,c,l,f,d,h,v,p,g;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n.reqOptions=this.getRequestOption(null===(i=this._pendingTask)||void 0===i?void 0:i.data.reqOptions),o=n.isPCDN,s=this.options.headers||{},e.next=1,null===(a=this._loader)||void 0===a?void 0:a.load(t,sh({range:r,priOptions:{extData:n,type:o?Sm.PCDN:Sm.CDN},headers:o?sC({},s,{"X-Origin-Server-Host":n.cdnHost}):s},n.reqOptions));case 1:if(c=e.sent){e.next=2;break}return e.abrupt("return",{res:null});case 2:return l=c.data,d=(f=c.response).headers,h=f.status,v=f.fromCache,p=l instanceof Uint8Array?l.buffer:l,e.abrupt("return",{res:p,headers:function(e){if(window.Headers&&e instanceof Headers){var t,r={},n=Ts(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;r[i[0]]=i[1]}}catch(e){n.e(e)}finally{n.f()}return r}return e}(d),status:h,fromCache:v,memory:p.byteLength,vtype:u.vtype,mediaType:n.mediaType,duration:n.segmentDuration,orgDefinition:void 0,range:r,rangeEnd:n.rangeEnd,rangeStart:n.rangeStart,fileId:n.fileId});case 3:return e.prev=3,e.catch(0),e.abrupt("return",{res:null});case 4:case"end":return e.stop()}},e,this,[[0,3]])})),function(e,t,r){return n.apply(this,arguments)})},{key:"makeInitBaseSegemntRequest",value:function(e,t,r,n,i,a){var o=this,s=cS.withResolvers(),c=s.resolve,l=s.promise,f=s.reject,d=e.mediaList[r][n],h=[d.initSegmentRange[0],d.sidxRange[1]],v=d.initSegment,p=e.videoCodecType,g=d.avg_bitrate||d.bandwidth||d.bitrate,y=u.vtype,m={checkPreload:!0,mediaType:r,vid:a,definition:i,useUrlRange:!1,timeout:-1,isInitSegment:!0,bitrate:g,codecType:p,fileId:d.fileId,cacheKey:Tm({vid:a,codecType:p,mediaType:r,definition:i,vtype:y,bitrate:g,fileId:d.fileId,range:h})};return this._getData(v,h,m).then(function(i){var u=i.res;u&&"error"!==u?o.handleInitData(u,h,d.sidxRange).then(function(o){if(o.sidxSegmentRes&&e.getSidx(o.sidxSegmentRes,r,n,t),function(e,t){if(e instanceof ArrayBuffer){try{var r=new Uint8Array(e,4,4),n=String.fromCharCode.apply(null,fw(r));if(2===t.length){var i=t[1]-t[0]+1;if(e.byteLength!==i)return}if("moof"!==n&&"styp"!==n&&"ftyp"!==n)return!1}catch(e){return!1}return!0}return!1}(o.initSegmentRes,h)){var u=sC({},i,{vid:a,mediaType:r,isInitSegment:!0,vtype:y});c({key:m.cacheKey,data:u})}else f({mediaType:r,index:n,initSegmentRange:h,url:v,rejected:!0})}).catch(function(){f({mediaType:r,index:n,initSegmentRange:h,url:v,rejected:!0})}):f({mediaType:r,index:n,initSegmentRange:h,url:v,rejected:!0})}).catch(function(){f({mediaType:r,index:n,initSegmentRange:h,url:v,rejected:!0})}),l}},{key:"handleInitData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=cS.withResolvers(),i=n.resolve,a=n.promise;return e instanceof ArrayBuffer&&i({initSegmentRes:0===t.length?e:he(e).call(e,t[0],t[1]+1),sidxSegmentRes:null===r?null:he(e).call(e,r[0],r[1]+1)}),a}},{key:"cancel",value:(r=uj(uM().mark(function e(){var t,r,n,i;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._loader){e.next=1;break}return e.next=1,this._loader.cancel();case 1:this._pendingTask&&(r=(t=this._pendingTask).data,n=c_(t),i=this.isStepWise(),this._pendingTask.resolve({remove:!i}),ws(n).length>0&&this._setItem(r,n),this._pendingTask=null);case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"getPreLoadDataSync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Tm(e),n=this.preloadManager.getItemSync(e,t),i=this.preloadManager.getLoadInfoAndDelete(r);return sh(sh({cacheKey:r},n),{},{loadInfo:i})}},{key:"getPreLoadData",value:(t=uj(uM().mark(function e(t){var r,n,i,a,o=arguments;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]&&o[1],n=Tm(t),e.next=1,this.preloadManager.getItem(t,r);case 1:return i=e.sent,a=this.preloadManager.getLoadInfoAndDelete(n),e.abrupt("return",sh(sh({cacheKey:n},i),{},{loadInfo:a}));case 2:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"destroy",value:(e=uj(uM().mark(function e(){var t;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=this._loader)||void 0===t||t.removeAllListeners(),this._loader=null;case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"parseKey",value:function(e){var t,r,n=Ts(e);try{for(n.s();!(r=n.n()).done;){var i=r.value,a=Ss.parseKey(i);"audio"===a.mediaType?a.hasAudio=!0:(a.hasVideo=!0,t=sC({},t,a))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"taskInProgress",get:function(){return!!this._pendingTask.resolve&&!!this._pendingTask.data}}],[{key:"vtype",get:function(){return Sg.DASH}},{key:"isUniqueCache",value:function(e){return!!e&&4===cw(e).length}},{key:"generateUniqueKey",value:function(e){return Tm(e)}}])}();var xu=new s7("VeStrategy-preload"),xs=function(){var e,t;function r(e){var t,n,i,a,o,u;return sv(this,r),a=this,o=r,u=[e],o=s_(o),i=sy(a,sm()?rf(o,u||[],s_(a).constructor):o.apply(a,u)),Sd.bindTracker(null==e||null===(t=e.ctx)||void 0===t?void 0:t.tracker),xu.update(null===(n=e.ctx.dataCenter)||void 0===n||null===(n=n.getAppConfig())||void 0===n?void 0:n.log),xu.info("VeStrategyPreloadInit"),i}return sk(r,sE),sg(r,[{key:"getRecommendation",value:function(e){var t={plugins:[],pluginConfiguration:{},result:{enable:!1}};return!1!==this.config.disableAutoCheckPlugin&&(t.plugins=[Sp],t.pluginConfiguration=sf({},Sp.pluginName,sh({preloader:Sd},this.config))),t.result={enable:!0},!1===e.recResult&&delete t.result,t}}],[{key:"prepare",value:(t=uj(uM().mark(function e(t){var r,n,i,a,o;return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.config,n=t.loaders,i=t.preloader,a=t.useBitrateSelector,e.next=1,this.preloader.prepare({config:r,loaders:n,preloader:i,BitrateSelector:a?hg:null});case 1:return o=e.sent,this._checkSelectorConfig(),e.abrupt("return",o);case 2:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"addPreloadList",value:(e=uj(uM().mark(function e(t){return uM().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this._checkSelectorConfig(),this.preloader.addPreloadList(t);case 1:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"_checkSelectorConfig",value:function(){var e=this.preloader.bitrateSelector;e&&(!e.defaultConfig||e.defaultConfig.mode&&e.defaultConfig.mode===hg.defaultConfig.mode||(e.defaultConfig=sC(e.defaultConfig,hg.defaultConfig)))}}])}();sf(xs,"strategyName",s2.preload),sf(xs,"strategyPriority",s4.preload),sf(xs,"preloader",Sd)}}]); |