@volcengine/veplayer-plugin 2.10.0 → 2.10.2-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_RTM__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,u=Function.prototype,l=u.apply,c=u.call,f="object"==typeof Reflect&&Reflect.apply||(s?c.bind(l):function(){return c.apply(l,arguments)}),d=a,p=Function.prototype,h=p.call,v=d&&p.bind.bind(h,h),m=d?v:function(e){return function(){return h.apply(e,arguments)}},y=m,g=y({}.toString),_=y("".slice),b=function(e){return _(g(e),8,-1)},w=b,S=m,k=function(e){if("Function"===w(e))return S(e)},R="object"==typeof document&&document.all,T={all:R,IS_HTMLDDA:void 0===R&&void 0!==R},x=T.all,E=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===x}:function(e){return"function"==typeof e},L={},O=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),P=a,I=Function.prototype.call,C=P?I.bind(I):function(){return I.apply(I,arguments)},Z={},j={}.propertyIsEnumerable,A=Object.getOwnPropertyDescriptor,D=A&&!j.call({1:2},1);Z.f=D?function(e){var t=A(this,e);return!!t&&t.enumerable}:j;var W,V,M=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G=o,F=b,N=Object,U=m("".split),X=G((function(){return!N("z").propertyIsEnumerable(0)}))?function(e){return"String"==F(e)?U(e,""):N(e)}:N,H=function(e){return null==e},B=H,K=TypeError,Y=function(e){if(B(e))throw K("Can't call method on "+e);return e},J=X,z=Y,Q=function(e){return J(z(e))},q=E,$=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},re=te,ne=i,ie=E,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(re[e])||oe(ne[e]):re[e]&&re[e][t]||ne[e]&&ne[e][t]},se=m({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=i,ce=ue,fe=le.process,de=le.Deno,pe=fe&&fe.versions||de&&de.version,he=pe&&pe.v8;he&&(V=(W=he.split("."))[0]>0&&W[0]<4?1:+(W[0]+W[1])),!V&&ce&&(!(W=ce.match(/Edge\/(\d+)/))||W[1]>=74)&&(W=ce.match(/Chrome\/(\d+)/))&&(V=+W[1]);var ve=V,me=ve,ye=o,ge=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!ge(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&me&&me<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,Se=E,ke=se,Re=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return Se(t)&&ke(t.prototype,Re(e))},xe=String,Ee=function(e){try{return xe(e)}catch(t){return"Object"}},Le=E,Oe=Ee,Pe=TypeError,Ie=function(e){if(Le(e))return e;throw Pe(Oe(e)+" is not a function")},Ce=Ie,Ze=H,je=function(e,t){var r=e[t];return Ze(r)?void 0:Ce(r)},Ae=C,De=E,We=ee,Ve=TypeError,Me={exports:{}},Ge=i,Fe=Object.defineProperty,Ne=function(e,t){try{Fe(Ge,e,{value:t,configurable:!0,writable:!0})}catch(r){Ge[e]=t}return t},Ue="__core-js_shared__",Xe=i[Ue]||Ne(Ue,{}),He=Xe;(Me.exports=function(e,t){return He[e]||(He[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Be=Me.exports,Ke=Y,Ye=Object,Je=function(e){return Ye(Ke(e))},ze=Je,Qe=m({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return Qe(ze(e),t)},$e=m,et=0,tt=Math.random(),rt=$e(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++et+tt,36)},it=Be,ot=qe,at=nt,st=_e,ut=be,lt=i.Symbol,ct=it("wks"),ft=ut?lt.for||lt:lt&&lt.withoutSetter||at,dt=function(e){return ot(ct,e)||(ct[e]=st&&ot(lt,e)?lt[e]:ft("Symbol."+e)),ct[e]},pt=C,ht=ee,vt=Te,mt=je,yt=function(e,t){var r,n;if("string"===t&&De(r=e.toString)&&!We(n=Ae(r,e)))return n;if(De(r=e.valueOf)&&!We(n=Ae(r,e)))return n;if("string"!==t&&De(r=e.toString)&&!We(n=Ae(r,e)))return n;throw Ve("Can't convert object to primitive value")},gt=TypeError,_t=dt("toPrimitive"),bt=function(e,t){if(!ht(e)||vt(e))return e;var r,n=mt(e,_t);if(n){if(void 0===t&&(t="default"),r=pt(n,e,t),!ht(r)||vt(r))return r;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Te,St=function(e){var t=bt(e,"string");return wt(t)?t:t+""},kt=ee,Rt=i.document,Tt=kt(Rt)&&kt(Rt.createElement),xt=function(e){return Tt?Rt.createElement(e):{}},Et=xt,Lt=!O&&!o((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),Ot=O,Pt=C,It=Z,Ct=M,Zt=Q,jt=St,At=qe,Dt=Lt,Wt=Object.getOwnPropertyDescriptor;L.f=Ot?Wt:function(e,t){if(e=Zt(e),t=jt(t),Dt)try{return Wt(e,t)}catch(r){}if(At(e,t))return Ct(!Pt(It.f,e,t),e[t])};var Vt=o,Mt=E,Gt=/#|\.prototype\./,Ft=function(e,t){var r=Ut[Nt(e)];return r==Ht||r!=Xt&&(Mt(t)?Vt(t):!!t)},Nt=Ft.normalize=function(e){return String(e).replace(Gt,".").toLowerCase()},Ut=Ft.data={},Xt=Ft.NATIVE="N",Ht=Ft.POLYFILL="P",Bt=Ft,Kt=Ie,Yt=a,Jt=k(k.bind),zt=function(e,t){return Kt(e),void 0===t?e:Yt?Jt(e,t):function(){return e.apply(t,arguments)}},Qt={},qt=O&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,er=String,tr=TypeError,rr=function(e){if($t(e))return e;throw tr(er(e)+" is not an object")},nr=O,ir=Lt,or=qt,ar=rr,sr=St,ur=TypeError,lr=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,fr="enumerable",dr="configurable",pr="writable";Qt.f=nr?or?function(e,t,r){if(ar(e),t=sr(t),ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pr in r&&!r[pr]){var n=cr(e,t);n&&n[pr]&&(e[t]=r.value,r={configurable:dr in r?r[dr]:n[dr],enumerable:fr in r?r[fr]:n[fr],writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(ar(e),t=sr(t),ar(r),ir)try{return lr(e,t,r)}catch(n){}if("get"in r||"set"in r)throw ur("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var hr=Qt,vr=M,mr=O?function(e,t,r){return hr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},yr=i,gr=f,_r=k,br=E,wr=L.f,Sr=Bt,kr=te,Rr=zt,Tr=mr,xr=qe,Er=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 gr(e,this,arguments)};return t.prototype=e.prototype,t},Lr=function(e,t){var r,n,i,o,a,s,u,l,c,f=e.target,d=e.global,p=e.stat,h=e.proto,v=d?yr:p?yr[f]:(yr[f]||{}).prototype,m=d?kr:kr[f]||Tr(kr,f,{})[f],y=m.prototype;for(o in t)n=!(r=Sr(d?o:f+(p?".":"#")+o,e.forced))&&v&&xr(v,o),s=m[o],n&&(u=e.dontCallGetSet?(c=wr(v,o))&&c.value:v[o]),a=n&&u?u:t[o],n&&typeof s==typeof a||(l=e.bind&&n?Rr(a,yr):e.wrap&&n?Er(a):h&&br(a)?_r(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tr(l,"sham",!0),Tr(m,o,l),h&&(xr(kr,i=f+"Prototype")||Tr(kr,i,{}),Tr(kr[i],o,a),e.real&&y&&(r||!y[o])&&Tr(y,o,a)))},Or=b,Pr=Array.isArray||function(e){return"Array"==Or(e)},Ir=Math.ceil,Cr=Math.floor,Zr=Math.trunc||function(e){var t=+e;return(t>0?Cr:Ir)(t)},jr=function(e){var t=+e;return t!=t||0===t?0:Zr(t)},Ar=jr,Dr=Math.min,Wr=function(e){return e>0?Dr(Ar(e),9007199254740991):0},Vr=Wr,Mr=function(e){return Vr(e.length)},Gr=TypeError,Fr=function(e){if(e>9007199254740991)throw Gr("Maximum allowed index exceeded");return e},Nr=St,Ur=Qt,Xr=M,Hr=function(e,t,r){var n=Nr(t);n in e?Ur.f(e,n,Xr(0,r)):e[n]=r},Br={};Br[dt("toStringTag")]="z";var Kr="[object z]"===String(Br),Yr=Kr,Jr=E,zr=b,Qr=dt("toStringTag"),qr=Object,$r="Arguments"==zr(function(){return arguments}()),en=Yr?zr:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=qr(e),Qr))?r:$r?zr(t):"Object"==(n=zr(t))&&Jr(t.callee)?"Arguments":n},tn=E,rn=Xe,nn=m(Function.toString);tn(rn.inspectSource)||(rn.inspectSource=function(e){return nn(e)});var on=rn.inspectSource,an=m,sn=o,un=E,ln=en,cn=on,fn=function(){},dn=[],pn=ae("Reflect","construct"),hn=/^\s*(?:class|function)\b/,vn=an(hn.exec),mn=!hn.exec(fn),yn=function(e){if(!un(e))return!1;try{return pn(fn,dn,e),!0}catch(t){return!1}},gn=function(e){if(!un(e))return!1;switch(ln(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mn||!!vn(hn,cn(e))}catch(t){return!0}};gn.sham=!0;var _n=!pn||sn((function(){var e;return yn(yn.call)||!yn(Object)||!yn((function(){e=!0}))||e}))?gn:yn,bn=Pr,wn=_n,Sn=ee,kn=dt("species"),Rn=Array,Tn=function(e){var t;return bn(e)&&(t=e.constructor,(wn(t)&&(t===Rn||bn(t.prototype))||Sn(t)&&null===(t=t[kn]))&&(t=void 0)),void 0===t?Rn:t},xn=function(e,t){return new(Tn(e))(0===t?0:t)},En=o,Ln=ve,On=dt("species"),Pn=function(e){return Ln>=51||!En((function(){var t=[];return(t.constructor={})[On]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},In=Lr,Cn=o,Zn=Pr,jn=ee,An=Je,Dn=Mr,Wn=Fr,Vn=Hr,Mn=xn,Gn=Pn,Fn=ve,Nn=dt("isConcatSpreadable"),Un=Fn>=51||!Cn((function(){var e=[];return e[Nn]=!1,e.concat()[0]!==e})),Xn=function(e){if(!jn(e))return!1;var t=e[Nn];return void 0!==t?!!t:Zn(e)};In({target:"Array",proto:!0,arity:1,forced:!Un||!Gn("concat")},{concat:function(e){var t,r,n,i,o,a=An(this),s=Mn(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Xn(o=-1===t?a:arguments[t]))for(i=Dn(o),Wn(u+i),r=0;r<i;r++,u++)r in o&&Vn(s,u,o[r]);else Wn(u+1),Vn(s,u++,o);return s.length=u,s}});var Hn=en,Bn=String,Kn=function(e){if("Symbol"===Hn(e))throw TypeError("Cannot convert a Symbol value to a string");return Bn(e)},Yn={},Jn=jr,zn=Math.max,Qn=Math.min,qn=function(e,t){var r=Jn(e);return r<0?zn(r+t,0):Qn(r,t)},$n=Q,ei=qn,ti=Mr,ri=function(e){return function(t,r,n){var i,o=$n(t),a=ti(o),s=ei(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},ni={includes:ri(!0),indexOf:ri(!1)},ii={},oi=qe,ai=Q,si=ni.indexOf,ui=ii,li=m([].push),ci=function(e,t){var r,n=ai(e),i=0,o=[];for(r in n)!oi(ui,r)&&oi(n,r)&&li(o,r);for(;t.length>i;)oi(n,r=t[i++])&&(~si(o,r)||li(o,r));return o},fi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],di=ci,pi=fi,hi=Object.keys||function(e){return di(e,pi)},vi=O,mi=qt,yi=Qt,gi=rr,_i=Q,bi=hi;Yn.f=vi&&!mi?Object.defineProperties:function(e,t){gi(e);for(var r,n=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,r=i[a++],n[r]);return e};var wi,Si=ae("document","documentElement"),ki=nt,Ri=Be("keys"),Ti=function(e){return Ri[e]||(Ri[e]=ki(e))},xi=rr,Ei=Yn,Li=fi,Oi=ii,Pi=Si,Ii=xt,Ci="prototype",Zi="script",ji=Ti("IE_PROTO"),Ai=function(){},Di=function(e){return"<"+Zi+">"+e+"</"+Zi+">"},Wi=function(e){e.write(Di("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vi=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Vi="undefined"!=typeof document?document.domain&&wi?Wi(wi):(t=Ii("iframe"),r="java"+Zi+":",t.style.display="none",Pi.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Di("document.F=Object")),e.close(),e.F):Wi(wi);for(var n=Li.length;n--;)delete Vi[Ci][Li[n]];return Vi()};Oi[ji]=!0;var Mi=Object.create||function(e,t){var r;return null!==e?(Ai[Ci]=xi(e),r=new Ai,Ai[Ci]=null,r[ji]=e):r=Vi(),void 0===t?r:Ei.f(r,t)},Gi={},Fi=ci,Ni=fi.concat("length","prototype");Gi.f=Object.getOwnPropertyNames||function(e){return Fi(e,Ni)};var Ui={},Xi=qn,Hi=Mr,Bi=Hr,Ki=Array,Yi=Math.max,Ji=function(e,t,r){for(var n=Hi(e),i=Xi(t,n),o=Xi(void 0===r?n:r,n),a=Ki(Yi(o-i,0)),s=0;i<o;i++,s++)Bi(a,s,e[i]);return a.length=s,a},zi=b,Qi=Q,qi=Gi.f,$i=Ji,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ui.f=function(e){return eo&&"Window"==zi(e)?function(e){try{return qi(e)}catch(t){return $i(eo)}}(e):qi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var ro=mr,no=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ro(e,t,r),e},io=Qt,oo=function(e,t,r){return io.f(e,t,r)},ao={},so=dt;ao.f=so;var uo,lo,co,fo=te,po=qe,ho=ao,vo=Qt.f,mo=function(e){var t=fo.Symbol||(fo.Symbol={});po(t,e)||vo(t,e,{value:ho.f(e)})},yo=C,go=ae,_o=dt,bo=no,wo=function(){var e=go("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=_o("toPrimitive");t&&!t[n]&&bo(t,n,(function(e){return yo(r,this)}),{arity:1})},So=en,ko=Kr?{}.toString:function(){return"[object "+So(this)+"]"},Ro=Kr,To=Qt.f,xo=mr,Eo=qe,Lo=ko,Oo=dt("toStringTag"),Po=function(e,t,r,n){if(e){var i=r?e:e.prototype;Eo(i,Oo)||To(i,Oo,{configurable:!0,value:t}),n&&!Ro&&xo(i,"toString",Lo)}},Io=E,Co=i.WeakMap,Zo=Io(Co)&&/native code/.test(String(Co)),jo=i,Ao=ee,Do=mr,Wo=qe,Vo=Xe,Mo=Ti,Go=ii,Fo="Object already initialized",No=jo.TypeError,Uo=jo.WeakMap;if(Zo||Vo.state){var Xo=Vo.state||(Vo.state=new Uo);Xo.get=Xo.get,Xo.has=Xo.has,Xo.set=Xo.set,uo=function(e,t){if(Xo.has(e))throw No(Fo);return t.facade=e,Xo.set(e,t),t},lo=function(e){return Xo.get(e)||{}},co=function(e){return Xo.has(e)}}else{var Ho=Mo("state");Go[Ho]=!0,uo=function(e,t){if(Wo(e,Ho))throw No(Fo);return t.facade=e,Do(e,Ho,t),t},lo=function(e){return Wo(e,Ho)?e[Ho]:{}},co=function(e){return Wo(e,Ho)}}var Bo={set:uo,get:lo,has:co,enforce:function(e){return co(e)?lo(e):uo(e,{})},getterFor:function(e){return function(t){var r;if(!Ao(t)||(r=lo(t)).type!==e)throw No("Incompatible receiver, "+e+" required");return r}}},Ko=zt,Yo=X,Jo=Je,zo=Mr,Qo=xn,qo=m([].push),$o=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,f){for(var d,p,h=Jo(u),v=Yo(h),m=Ko(l,c),y=zo(v),g=0,_=f||Qo,b=t?_(u,y):r||a?_(u,0):void 0;y>g;g++)if((s||g in v)&&(p=m(d=v[g],g,h),e))if(t)b[g]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return g;case 2:qo(b,d)}else switch(e){case 4:return!1;case 7:qo(b,d)}return o?-1:n||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=Lr,ra=i,na=C,ia=m,oa=O,aa=_e,sa=o,ua=qe,la=se,ca=rr,fa=Q,da=St,pa=Kn,ha=M,va=Mi,ma=hi,ya=Gi,ga=Ui,_a=to,ba=L,wa=Qt,Sa=Yn,ka=Z,Ra=no,Ta=oo,xa=Be,Ea=ii,La=nt,Oa=dt,Pa=ao,Ia=mo,Ca=wo,Za=Po,ja=Bo,Aa=ea.forEach,Da=Ti("hidden"),Wa="Symbol",Va="prototype",Ma=ja.set,Ga=ja.getterFor(Wa),Fa=Object[Va],Na=ra.Symbol,Ua=Na&&Na[Va],Xa=ra.TypeError,Ha=ra.QObject,Ba=ba.f,Ka=wa.f,Ya=ga.f,Ja=ka.f,za=ia([].push),Qa=xa("symbols"),qa=xa("op-symbols"),$a=xa("wks"),es=!Ha||!Ha[Va]||!Ha[Va].findChild,ts=oa&&sa((function(){return 7!=va(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Ba(Fa,t);n&&delete Fa[t],Ka(e,t,r),n&&e!==Fa&&Ka(Fa,t,n)}:Ka,rs=function(e,t){var r=Qa[e]=va(Ua);return Ma(r,{type:Wa,tag:e,description:t}),oa||(r.description=t),r},ns=function(e,t,r){e===Fa&&ns(qa,t,r),ca(e);var n=da(t);return ca(r),ua(Qa,n)?(r.enumerable?(ua(e,Da)&&e[Da][n]&&(e[Da][n]=!1),r=va(r,{enumerable:ha(0,!1)})):(ua(e,Da)||Ka(e,Da,ha(1,{})),e[Da][n]=!0),ts(e,n,r)):Ka(e,n,r)},is=function(e,t){ca(e);var r=fa(t),n=ma(r).concat(us(r));return Aa(n,(function(t){oa&&!na(os,r,t)||ns(e,t,r[t])})),e},os=function(e){var t=da(e),r=na(Ja,this,t);return!(this===Fa&&ua(Qa,t)&&!ua(qa,t))&&(!(r||!ua(this,t)||!ua(Qa,t)||ua(this,Da)&&this[Da][t])||r)},as=function(e,t){var r=fa(e),n=da(t);if(r!==Fa||!ua(Qa,n)||ua(qa,n)){var i=Ba(r,n);return!i||!ua(Qa,n)||ua(r,Da)&&r[Da][n]||(i.enumerable=!0),i}},ss=function(e){var t=Ya(fa(e)),r=[];return Aa(t,(function(e){ua(Qa,e)||ua(Ea,e)||za(r,e)})),r},us=function(e){var t=e===Fa,r=Ya(t?qa:fa(e)),n=[];return Aa(r,(function(e){!ua(Qa,e)||t&&!ua(Fa,e)||za(n,Qa[e])})),n};aa||(Na=function(){if(la(Ua,this))throw Xa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?pa(arguments[0]):void 0,t=La(e),r=function(e){this===Fa&&na(r,qa,e),ua(this,Da)&&ua(this[Da],t)&&(this[Da][t]=!1),ts(this,t,ha(1,e))};return oa&&es&&ts(Fa,t,{configurable:!0,set:r}),rs(t,e)},Ra(Ua=Na[Va],"toString",(function(){return Ga(this).tag})),Ra(Na,"withoutSetter",(function(e){return rs(La(e),e)})),ka.f=os,wa.f=ns,Sa.f=is,ba.f=as,ya.f=ga.f=ss,_a.f=us,Pa.f=function(e){return rs(Oa(e),e)},oa&&Ta(Ua,"description",{configurable:!0,get:function(){return Ga(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Na}),Aa(ma($a),(function(e){Ia(e)})),ta({target:Wa,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):is(va(e),t)},defineProperty:ns,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Ca(),Za(Na,Wa),Ea[Da]=!0;var ls=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Lr,fs=ae,ds=qe,ps=Kn,hs=Be,vs=ls,ms=hs("string-to-symbol-registry"),ys=hs("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=ps(e);if(ds(ms,t))return ms[t];var r=fs("Symbol")(t);return ms[t]=r,ys[r]=t,r}});var gs=Lr,_s=qe,bs=Te,ws=Ee,Ss=ls,ks=Be("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(ks,e))return ks[e]}});var Rs=m([].slice),Ts=Pr,xs=E,Es=b,Ls=Kn,Os=m([].push),Ps=Lr,Is=ae,Cs=f,Zs=C,js=m,As=o,Ds=E,Ws=Te,Vs=Rs,Ms=function(e){if(xs(e))return e;if(Ts(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Os(r,i):"number"!=typeof i&&"Number"!=Es(i)&&"String"!=Es(i)||Os(r,Ls(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Gs=_e,Fs=String,Ns=Is("JSON","stringify"),Us=js(/./.exec),Xs=js("".charAt),Hs=js("".charCodeAt),Bs=js("".replace),Ks=js(1..toString),Ys=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,zs=/^[\uDC00-\uDFFF]$/,Qs=!Gs||As((function(){var e=Is("Symbol")();return"[null]"!=Ns([e])||"{}"!=Ns({a:e})||"{}"!=Ns(Object(e))})),qs=As((function(){return'"\\udf06\\ud834"'!==Ns("\udf06\ud834")||'"\\udead"'!==Ns("\udead")})),$s=function(e,t){var r=Vs(arguments),n=Ms(t);if(Ds(n)||void 0!==e&&!Ws(e))return r[1]=function(e,t){if(Ds(n)&&(t=Zs(n,this,Fs(e),t)),!Ws(t))return t},Cs(Ns,null,r)},eu=function(e,t,r){var n=Xs(r,t-1),i=Xs(r,t+1);return Us(Js,e)&&!Us(zs,i)||Us(zs,e)&&!Us(Js,n)?"\\u"+Ks(Hs(e,0),16):e};Ns&&Ps({target:"JSON",stat:!0,arity:3,forced:Qs||qs},{stringify:function(e,t,r){var n=Vs(arguments),i=Cs(Qs?$s:Ns,null,n);return qs&&"string"==typeof i?Bs(i,Ys,eu):i}});var tu=to,ru=Je;Lr({target:"Object",stat:!0,forced:!_e||o((function(){tu.f(1)}))},{getOwnPropertySymbols:function(e){var t=tu.f;return t?t(ru(e)):[]}}),mo("asyncIterator"),mo("hasInstance"),mo("isConcatSpreadable"),mo("iterator"),mo("match"),mo("matchAll"),mo("replace"),mo("search"),mo("species"),mo("split");var nu=wo;mo("toPrimitive"),nu();var iu=ae,ou=Po;mo("toStringTag"),ou(iu("Symbol"),"Symbol"),mo("unscopables"),Po(i.JSON,"JSON",!0);var au,su,uu,lu=te.Symbol,cu={},fu=O,du=qe,pu=Function.prototype,hu=fu&&Object.getOwnPropertyDescriptor,vu=du(pu,"name"),mu={EXISTS:vu,PROPER:vu&&"something"===function(){}.name,CONFIGURABLE:vu&&(!fu||fu&&hu(pu,"name").configurable)},yu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),gu=qe,_u=E,bu=Je,wu=yu,Su=Ti("IE_PROTO"),ku=Object,Ru=ku.prototype,Tu=wu?ku.getPrototypeOf:function(e){var t=bu(e);if(gu(t,Su))return t[Su];var r=t.constructor;return _u(r)&&t instanceof r?r.prototype:t instanceof ku?Ru:null},xu=o,Eu=E,Lu=ee,Ou=Mi,Pu=Tu,Iu=no,Cu=dt("iterator"),Zu=!1;[].keys&&("next"in(uu=[].keys())?(su=Pu(Pu(uu)))!==Object.prototype&&(au=su):Zu=!0);var ju=!Lu(au)||xu((function(){var e={};return au[Cu].call(e)!==e}));Eu((au=ju?{}:Ou(au))[Cu])||Iu(au,Cu,(function(){return this}));var Au={IteratorPrototype:au,BUGGY_SAFARI_ITERATORS:Zu},Du=Au.IteratorPrototype,Wu=Mi,Vu=M,Mu=Po,Gu=cu,Fu=function(){return this},Nu=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Wu(Du,{next:Vu(+!n,r)}),Mu(e,i,!1,!0),Gu[i]=Fu,e},Uu=m,Xu=Ie,Hu=E,Bu=String,Ku=TypeError,Yu=function(e,t,r){try{return Uu(Xu(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},Ju=rr,zu=function(e){if("object"==typeof e||Hu(e))return e;throw Ku("Can't set "+Bu(e)+" as a prototype")},Qu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Yu(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return Ju(r),zu(n),t?e(r,n):r.__proto__=n,r}}():void 0),qu=Lr,$u=C,el=mu,tl=Nu,rl=Tu,nl=Po,il=no,ol=cu,al=Au,sl=el.PROPER,ul=al.BUGGY_SAFARI_ITERATORS,ll=dt("iterator"),cl="keys",fl="values",dl="entries",pl=function(){return this},hl=function(e,t,r,n,i,o,a){tl(r,t,n);var s,u,l,c=function(e){if(e===i&&v)return v;if(!ul&&e in p)return p[e];switch(e){case cl:case fl:case dl:return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",d=!1,p=e.prototype,h=p[ll]||p["@@iterator"]||i&&p[i],v=!ul&&h||c(i),m="Array"==t&&p.entries||h;if(m&&(s=rl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,f,!0,!0),ol[f]=pl),sl&&i==fl&&h&&h.name!==fl&&(d=!0,v=function(){return $u(h,this)}),i)if(u={values:c(fl),keys:o?v:c(cl),entries:c(dl)},a)for(l in u)(ul||d||!(l in p))&&il(p,l,u[l]);else qu({target:t,proto:!0,forced:ul||d},u);return a&&p[ll]!==v&&il(p,ll,v,{name:i}),ol[t]=v,u},vl=function(e,t){return{value:e,done:t}},ml=Q,yl=cu,gl=Bo;Qt.f;var _l=hl,bl=vl,wl="Array Iterator",Sl=gl.set,kl=gl.getterFor(wl);_l(Array,"Array",(function(e,t){Sl(this,{type:wl,target:ml(e),index:0,kind:t})}),(function(){var e=kl(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bl(void 0,!0)):bl("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),yl.Arguments=yl.Array;var Rl={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},Tl=i,xl=en,El=mr,Ll=cu,Ol=dt("toStringTag");for(var Pl in Rl){var Il=Tl[Pl],Cl=Il&&Il.prototype;Cl&&xl(Cl)!==Ol&&El(Cl,Ol,Pl),Ll[Pl]=Ll.Array}var Zl=lu;mo("dispose");var jl=Zl;mo("asyncDispose");var Al=Lr,Dl=m,Wl=ae("Symbol"),Vl=Wl.keyFor,Ml=Dl(Wl.prototype.valueOf);Al({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Vl(Ml(e))}catch(t){return!1}}});for(var Gl=Lr,Fl=Be,Nl=ae,Ul=m,Xl=Te,Hl=dt,Bl=Nl("Symbol"),Kl=Bl.isWellKnown,Yl=Nl("Object","getOwnPropertyNames"),Jl=Ul(Bl.prototype.valueOf),zl=Fl("wks"),Ql=0,ql=Yl(Bl),$l=ql.length;Ql<$l;Ql++)try{var ec=ql[Ql];Xl(Bl[ec])&&Hl(ec)}catch(PC){}Gl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Kl&&Kl(e))return!0;try{for(var t=Jl(e),r=0,n=Yl(zl),i=n.length;r<i;r++)if(zl[n[r]]==t)return!0}catch(PC){}return!1}}),mo("matcher"),mo("metadataKey"),mo("observable"),mo("metadata"),mo("patternMatch"),mo("replaceAll");var tc=jl,rc=r(tc),nc=m,ic=jr,oc=Kn,ac=Y,sc=nc("".charAt),uc=nc("".charCodeAt),lc=nc("".slice),cc=function(e){return function(t,r){var n,i,o=oc(ac(t)),a=ic(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=uc(o,a))<55296||n>56319||a+1===s||(i=uc(o,a+1))<56320||i>57343?e?sc(o,a):n:e?lc(o,a,a+2):i-56320+(n-55296<<10)+65536}},fc={codeAt:cc(!1),charAt:cc(!0)},dc=fc.charAt,pc=Kn,hc=Bo,vc=hl,mc=vl,yc="String Iterator",gc=hc.set,_c=hc.getterFor(yc);vc(String,"String",(function(e){gc(this,{type:yc,string:pc(e),index:0})}),(function(){var e,t=_c(this),r=t.string,n=t.index;return n>=r.length?mc(void 0,!0):(e=dc(r,n),t.index+=e.length,mc(e,!1))}));var bc=ao.f("iterator"),wc=r(bc);function Sc(e){return(Sc="function"==typeof rc&&"symbol"==typeof wc?function(e){return typeof e}:function(e){return e&&"function"==typeof rc&&e.constructor===rc&&e!==rc.prototype?"symbol":typeof e})(e)}var kc=r(tc),Rc=en,Tc=je,xc=H,Ec=cu,Lc=dt("iterator"),Oc=function(e){if(!xc(e))return Tc(e,Lc)||Tc(e,"@@iterator")||Ec[Rc(e)]},Pc=r(Oc),Ic=Je,Cc=hi;Lr({target:"Object",stat:!0,forced:o((function(){Cc(1)}))},{keys:function(e){return Cc(Ic(e))}});var Zc=r(te.Object.keys),jc=r(te.Object.getOwnPropertySymbols),Ac=ea.filter;Lr({target:"Array",proto:!0,forced:!Pn("filter")},{filter:function(e){return Ac(this,e,arguments.length>1?arguments[1]:void 0)}});var Dc=te,Wc=function(e){return Dc[e+"Prototype"]},Vc=Wc("Array").filter,Mc=se,Gc=Vc,Fc=Array.prototype,Nc=r((function(e){var t=e.filter;return e===Fc||Mc(Fc,e)&&t===Fc.filter?Gc:t})),Uc={exports:{}},Xc=Lr,Hc=o,Bc=Q,Kc=L.f,Yc=O;Xc({target:"Object",stat:!0,forced:!Yc||Hc((function(){Kc(1)})),sham:!Yc},{getOwnPropertyDescriptor:function(e,t){return Kc(Bc(e),t)}});var Jc=te.Object,zc=Uc.exports=function(e,t){return Jc.getOwnPropertyDescriptor(e,t)};Jc.getOwnPropertyDescriptor.sham&&(zc.sham=!0);var Qc=r(Uc.exports),qc=o,$c=function(e,t){var r=[][e];return!!r&&qc((function(){r.call(null,t||function(){return 1},1)}))},ef=ea.forEach,tf=$c("forEach")?[].forEach:function(e){return ef(this,e,arguments.length>1?arguments[1]:void 0)};Lr({target:"Array",proto:!0,forced:[].forEach!=tf},{forEach:tf});var rf=Wc("Array").forEach,nf=en,of=qe,af=se,sf=rf,uf=Array.prototype,lf={DOMTokenList:!0,NodeList:!0},cf=r((function(e){var t=e.forEach;return e===uf||af(uf,e)&&t===uf.forEach||of(lf,nf(e))?sf:t})),ff=ae,df=Gi,pf=to,hf=rr,vf=m([].concat),mf=ff("Reflect","ownKeys")||function(e){var t=df.f(hf(e)),r=pf.f;return r?vf(t,r(e)):t},yf=mf,gf=Q,_f=L,bf=Hr;Lr({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=gf(e),i=_f.f,o=yf(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&bf(a,t,r);return a}});var wf=r(te.Object.getOwnPropertyDescriptors),Sf={exports:{}},kf=Lr,Rf=O,Tf=Yn.f;kf({target:"Object",stat:!0,forced:Object.defineProperties!==Tf,sham:!Rf},{defineProperties:Tf});var xf=te.Object,Ef=Sf.exports=function(e,t){return xf.defineProperties(e,t)};xf.defineProperties.sham&&(Ef.sham=!0);var Lf=r(Sf.exports),Of={exports:{}},Pf=Lr,If=O,Cf=Qt.f;Pf({target:"Object",stat:!0,forced:Object.defineProperty!==Cf,sham:!If},{defineProperty:Cf});var Zf=te.Object,jf=Of.exports=function(e,t,r){return Zf.defineProperty(e,t,r)};Zf.defineProperty.sham&&(jf.sham=!0);var Af=r(Of.exports);Lr({target:"Object",stat:!0,sham:!O},{create:Mi});var Df=te.Object,Wf=r((function(e,t){return Df.create(e,t)})),Vf=Je,Mf=Tu,Gf=yu;Lr({target:"Object",stat:!0,forced:o((function(){Mf(1)})),sham:!Gf},{getPrototypeOf:function(e){return Mf(Vf(e))}});var Ff=r(te.Object.getPrototypeOf);Lr({target:"Object",stat:!0},{setPrototypeOf:Qu});var Nf=r(te.Object.setPrototypeOf),Uf=qe,Xf=mf,Hf=L,Bf=Qt,Kf=ee,Yf=mr,Jf=Error,zf=m("".replace),Qf=String(Jf("zxcasd").stack),qf=/\n\s*at [^:]*:[^\n]*/,$f=qf.test(Qf),ed=M,td=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",ed(1,7)),7!==e.stack)})),rd=mr,nd=function(e,t){if($f&&"string"==typeof e&&!Jf.prepareStackTrace)for(;t--;)e=zf(e,qf,"");return e},id=td,od=Error.captureStackTrace,ad=cu,sd=dt("iterator"),ud=Array.prototype,ld=function(e){return void 0!==e&&(ad.Array===e||ud[sd]===e)},cd=C,fd=Ie,dd=rr,pd=Ee,hd=Oc,vd=TypeError,md=function(e,t){var r=arguments.length<2?hd(e):t;if(fd(r))return dd(cd(r,e));throw vd(pd(e)+" is not iterable")},yd=C,gd=rr,_d=je,bd=function(e,t,r){var n,i;gd(e);try{if(!(n=_d(e,"return"))){if("throw"===t)throw r;return r}n=yd(n,e)}catch(PC){i=!0,n=PC}if("throw"===t)throw r;if(i)throw n;return gd(n),r},wd=zt,Sd=C,kd=rr,Rd=Ee,Td=ld,xd=Mr,Ed=se,Ld=md,Od=Oc,Pd=bd,Id=TypeError,Cd=function(e,t){this.stopped=e,this.result=t},Zd=Cd.prototype,jd=function(e,t,r){var n,i,o,a,s,u,l,c=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),v=wd(t,c),m=function(e){return n&&Pd(n,"normal",e),new Cd(!0,e)},y=function(e){return f?(kd(e),h?v(e[0],e[1],m):v(e[0],e[1])):h?v(e,m):v(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(i=Od(e)))throw Id(Rd(e)+" is not iterable");if(Td(i)){for(o=0,a=xd(e);a>o;o++)if((s=y(e[o]))&&Ed(Zd,s))return s;return new Cd(!1)}n=Ld(e,i)}for(u=d?e.next:n.next;!(l=Sd(u,n)).done;){try{s=y(l.value)}catch(PC){Pd(n,"throw",PC)}if("object"==typeof s&&s&&Ed(Zd,s))return s}return new Cd(!1)},Ad=Kn,Dd=Lr,Wd=se,Vd=Tu,Md=Qu,Gd=function(e,t,r){for(var n=Xf(t),i=Bf.f,o=Hf.f,a=0;a<n.length;a++){var s=n[a];Uf(e,s)||r&&Uf(r,s)||i(e,s,o(t,s))}},Fd=Mi,Nd=mr,Ud=M,Xd=function(e,t){Kf(t)&&"cause"in t&&Yf(e,"cause",t.cause)},Hd=function(e,t,r,n){id&&(od?od(e,t):rd(e,"stack",nd(r,n)))},Bd=jd,Kd=function(e,t){return void 0===e?arguments.length<2?"":t:Ad(e)},Yd=dt("toStringTag"),Jd=Error,zd=[].push,Qd=function(e,t){var r,n=Wd(qd,this);Md?r=Md(Jd(),n?Vd(this):qd):(r=n?this:Fd(qd),Nd(r,Yd,"Error")),void 0!==t&&Nd(r,"message",Kd(t)),Hd(r,Qd,r.stack,1),arguments.length>2&&Xd(r,arguments[2]);var i=[];return Bd(e,zd,{that:i}),Nd(r,"errors",i),r};Md?Md(Qd,Jd):Gd(Qd,Jd,{name:!0});var qd=Qd.prototype=Fd(Jd.prototype,{constructor:Ud(1,Qd),message:Ud(1,""),name:Ud(1,"AggregateError")});Dd({global:!0,constructor:!0,arity:2},{AggregateError:Qd});var $d,ep,tp,rp,np="undefined"!=typeof process&&"process"==b(process),ip=ae,op=oo,ap=O,sp=dt("species"),up=function(e){var t=ip(e);ap&&t&&!t[sp]&&op(t,sp,{configurable:!0,get:function(){return this}})},lp=se,cp=TypeError,fp=function(e,t){if(lp(t,e))return e;throw cp("Incorrect invocation")},dp=_n,pp=Ee,hp=TypeError,vp=function(e){if(dp(e))return e;throw hp(pp(e)+" is not a constructor")},mp=rr,yp=vp,gp=H,_p=dt("species"),bp=function(e,t){var r,n=mp(e).constructor;return void 0===n||gp(r=mp(n)[_p])?t:yp(r)},wp=TypeError,Sp=function(e,t){if(e<t)throw wp("Not enough arguments");return e},kp=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),Rp=i,Tp=f,xp=zt,Ep=E,Lp=qe,Op=o,Pp=Si,Ip=Rs,Cp=xt,Zp=Sp,jp=kp,Ap=np,Dp=Rp.setImmediate,Wp=Rp.clearImmediate,Vp=Rp.process,Mp=Rp.Dispatch,Gp=Rp.Function,Fp=Rp.MessageChannel,Np=Rp.String,Up=0,Xp={},Hp="onreadystatechange";Op((function(){$d=Rp.location}));var Bp=function(e){if(Lp(Xp,e)){var t=Xp[e];delete Xp[e],t()}},Kp=function(e){return function(){Bp(e)}},Yp=function(e){Bp(e.data)},Jp=function(e){Rp.postMessage(Np(e),$d.protocol+"//"+$d.host)};Dp&&Wp||(Dp=function(e){Zp(arguments.length,1);var t=Ep(e)?e:Gp(e),r=Ip(arguments,1);return Xp[++Up]=function(){Tp(t,void 0,r)},ep(Up),Up},Wp=function(e){delete Xp[e]},Ap?ep=function(e){Vp.nextTick(Kp(e))}:Mp&&Mp.now?ep=function(e){Mp.now(Kp(e))}:Fp&&!jp?(rp=(tp=new Fp).port2,tp.port1.onmessage=Yp,ep=xp(rp.postMessage,rp)):Rp.addEventListener&&Ep(Rp.postMessage)&&!Rp.importScripts&&$d&&"file:"!==$d.protocol&&!Op(Jp)?(ep=Jp,Rp.addEventListener("message",Yp,!1)):ep=Hp in Cp("script")?function(e){Pp.appendChild(Cp("script"))[Hp]=function(){Pp.removeChild(this),Bp(e)}}:function(e){setTimeout(Kp(e),0)});var zp={set:Dp,clear:Wp},Qp=function(){this.head=null,this.tail=null};Qp.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 qp,$p,eh,th,rh,nh=Qp,ih=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,oh=/web0s(?!.*chrome)/i.test(ue),ah=i,sh=zt,uh=L.f,lh=zp.set,ch=nh,fh=kp,dh=ih,ph=oh,hh=np,vh=ah.MutationObserver||ah.WebKitMutationObserver,mh=ah.document,yh=ah.process,gh=ah.Promise,_h=uh(ah,"queueMicrotask"),bh=_h&&_h.value;if(!bh){var wh=new ch,Sh=function(){var e,t;for(hh&&(e=yh.domain)&&e.exit();t=wh.get();)try{t()}catch(PC){throw wh.head&&qp(),PC}e&&e.enter()};fh||hh||ph||!vh||!mh?!dh&&gh&&gh.resolve?((th=gh.resolve(void 0)).constructor=gh,rh=sh(th.then,th),qp=function(){rh(Sh)}):hh?qp=function(){yh.nextTick(Sh)}:(lh=sh(lh,ah),qp=function(){lh(Sh)}):($p=!0,eh=mh.createTextNode(""),new vh(Sh).observe(eh,{characterData:!0}),qp=function(){eh.data=$p=!$p}),bh=function(e){wh.head||qp(),wh.add(e)}}var kh=bh,Rh=function(e){try{return{error:!1,value:e()}}catch(PC){return{error:!0,value:PC}}},Th=i.Promise,xh="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Eh=!xh&&!np&&"object"==typeof window&&"object"==typeof document,Lh=i,Oh=Th,Ph=E,Ih=Bt,Ch=on,Zh=dt,jh=Eh,Ah=xh,Dh=ve,Wh=Oh&&Oh.prototype,Vh=Zh("species"),Mh=!1,Gh=Ph(Lh.PromiseRejectionEvent),Fh={CONSTRUCTOR:Ih("Promise",(function(){var e=Ch(Oh),t=e!==String(Oh);if(!t&&66===Dh)return!0;if(!Wh.catch||!Wh.finally)return!0;if(!Dh||Dh<51||!/native code/.test(e)){var r=new Oh((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Vh]=n,!(Mh=r.then((function(){}))instanceof n))return!0}return!t&&(jh||Ah)&&!Gh})),REJECTION_EVENT:Gh,SUBCLASSING:Mh},Nh={},Uh=Ie,Xh=TypeError,Hh=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw Xh("Bad Promise constructor");t=e,r=n})),this.resolve=Uh(t),this.reject=Uh(r)};Nh.f=function(e){return new Hh(e)};var Bh,Kh,Yh=Lr,Jh=np,zh=i,Qh=C,qh=no,$h=Po,ev=up,tv=Ie,rv=E,nv=ee,iv=fp,ov=bp,av=zp.set,sv=kh,uv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(PC){}},lv=Rh,cv=nh,fv=Bo,dv=Th,pv=Fh,hv=Nh,vv="Promise",mv=pv.CONSTRUCTOR,yv=pv.REJECTION_EVENT,gv=fv.getterFor(vv),_v=fv.set,bv=dv&&dv.prototype,wv=dv,Sv=bv,kv=zh.TypeError,Rv=zh.document,Tv=zh.process,xv=hv.f,Ev=xv,Lv=!!(Rv&&Rv.createEvent&&zh.dispatchEvent),Ov="unhandledrejection",Pv=function(e){var t;return!(!nv(e)||!rv(t=e.then))&&t},Iv=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Dv(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),i=!0)),r===e.promise?l(kv("Promise-chain cycle")):(n=Pv(r))?Qh(n,r,u,l):u(r)):l(o)}catch(PC){c&&!i&&c.exit(),l(PC)}},Cv=function(e,t){e.notified||(e.notified=!0,sv((function(){for(var r,n=e.reactions;r=n.get();)Iv(r,e);e.notified=!1,t&&!e.rejection&&jv(e)})))},Zv=function(e,t,r){var n,i;Lv?((n=Rv.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),zh.dispatchEvent(n)):n={promise:t,reason:r},!yv&&(i=zh["on"+e])?i(n):e===Ov&&uv("Unhandled promise rejection",r)},jv=function(e){Qh(av,zh,(function(){var t,r=e.facade,n=e.value;if(Av(e)&&(t=lv((function(){Jh?Tv.emit("unhandledRejection",n,r):Zv(Ov,r,n)})),e.rejection=Jh||Av(e)?2:1,t.error))throw t.value}))},Av=function(e){return 1!==e.rejection&&!e.parent},Dv=function(e){Qh(av,zh,(function(){var t=e.facade;Jh?Tv.emit("rejectionHandled",t):Zv("rejectionhandled",t,e.value)}))},Wv=function(e,t,r){return function(n){e(t,n,r)}},Vv=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Cv(e,!0))},Mv=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw kv("Promise can't be resolved itself");var n=Pv(t);n?sv((function(){var r={done:!1};try{Qh(n,t,Wv(Mv,r,e),Wv(Vv,r,e))}catch(PC){Vv(r,PC,e)}})):(e.value=t,e.state=1,Cv(e,!1))}catch(PC){Vv({done:!1},PC,e)}}};mv&&(Sv=(wv=function(e){iv(this,Sv),tv(e),Qh(Bh,this);var t=gv(this);try{e(Wv(Mv,t),Wv(Vv,t))}catch(PC){Vv(t,PC)}}).prototype,(Bh=function(e){_v(this,{type:vv,done:!1,notified:!1,parent:!1,reactions:new cv,rejection:!1,state:0,value:void 0})}).prototype=qh(Sv,"then",(function(e,t){var r=gv(this),n=xv(ov(this,wv));return r.parent=!0,n.ok=!rv(e)||e,n.fail=rv(t)&&t,n.domain=Jh?Tv.domain:void 0,0==r.state?r.reactions.add(n):sv((function(){Iv(n,r)})),n.promise})),Kh=function(){var e=new Bh,t=gv(e);this.promise=e,this.resolve=Wv(Mv,t),this.reject=Wv(Vv,t)},hv.f=xv=function(e){return e===wv||undefined===e?new Kh(e):Ev(e)}),Yh({global:!0,constructor:!0,wrap:!0,forced:mv},{Promise:wv}),$h(wv,vv,!1,!0),ev(vv);var Gv=dt("iterator"),Fv=!1;try{var Nv=0,Uv={next:function(){return{done:!!Nv++}},return:function(){Fv=!0}};Uv[Gv]=function(){return this},Array.from(Uv,(function(){throw 2}))}catch(PC){}var Xv=function(e,t){if(!t&&!Fv)return!1;var r=!1;try{var n={};n[Gv]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(PC){}return r},Hv=Th,Bv=Fh.CONSTRUCTOR||!Xv((function(e){Hv.all(e).then(void 0,(function(){}))})),Kv=C,Yv=Ie,Jv=Nh,zv=Rh,Qv=jd;Lr({target:"Promise",stat:!0,forced:Bv},{all:function(e){var t=this,r=Jv.f(t),n=r.resolve,i=r.reject,o=zv((function(){var r=Yv(t.resolve),o=[],a=0,s=1;Qv(e,(function(e){var u=a++,l=!1;s++,Kv(r,t,e).then((function(e){l||(l=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var qv=Lr,$v=Fh.CONSTRUCTOR;Th&&Th.prototype,qv({target:"Promise",proto:!0,forced:$v,real:!0},{catch:function(e){return this.then(void 0,e)}});var em=C,tm=Ie,rm=Nh,nm=Rh,im=jd;Lr({target:"Promise",stat:!0,forced:Bv},{race:function(e){var t=this,r=rm.f(t),n=r.reject,i=nm((function(){var i=tm(t.resolve);im(e,(function(e){em(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var om=C,am=Nh;Lr({target:"Promise",stat:!0,forced:Fh.CONSTRUCTOR},{reject:function(e){var t=am.f(this);return om(t.reject,void 0,e),t.promise}});var sm=rr,um=ee,lm=Nh,cm=function(e,t){if(sm(e),um(t)&&t.constructor===e)return t;var r=lm.f(e);return(0,r.resolve)(t),r.promise},fm=Lr,dm=Th,pm=Fh.CONSTRUCTOR,hm=cm,vm=ae("Promise"),mm=!pm;fm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return hm(mm&&this===vm?dm:this,e)}});var ym=C,gm=Ie,_m=Nh,bm=Rh,wm=jd;Lr({target:"Promise",stat:!0,forced:Bv},{allSettled:function(e){var t=this,r=_m.f(t),n=r.resolve,i=r.reject,o=bm((function(){var r=gm(t.resolve),i=[],o=0,a=1;wm(e,(function(e){var s=o++,u=!1;a++,ym(r,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Sm=C,km=Ie,Rm=ae,Tm=Nh,xm=Rh,Em=jd,Lm="No one promise resolved";Lr({target:"Promise",stat:!0,forced:Bv},{any:function(e){var t=this,r=Rm("AggregateError"),n=Tm.f(t),i=n.resolve,o=n.reject,a=xm((function(){var n=km(t.resolve),a=[],s=0,u=1,l=!1;Em(e,(function(e){var c=s++,f=!1;u++,Sm(n,t,e).then((function(e){f||l||(l=!0,i(e))}),(function(e){f||l||(f=!0,a[c]=e,--u||o(new r(a,Lm)))}))})),--u||o(new r(a,Lm))}));return a.error&&o(a.value),n.promise}});var Om=Lr,Pm=Th,Im=o,Cm=ae,Zm=E,jm=bp,Am=cm,Dm=Pm&&Pm.prototype;Om({target:"Promise",proto:!0,real:!0,forced:!!Pm&&Im((function(){Dm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=jm(this,Cm("Promise")),r=Zm(e);return this.then(r?function(r){return Am(t,e()).then((function(){return r}))}:e,r?function(r){return Am(t,e()).then((function(){throw r}))}:e)}});var Wm=te.Promise,Vm=Nh,Mm=Rh;Lr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Vm.f(this),r=Mm(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var Gm=r(Wm),Fm=Lr,Nm=Pr,Um=m([].reverse),Xm=[1,2];Fm({target:"Array",proto:!0,forced:String(Xm)===String(Xm.reverse())},{reverse:function(){return Nm(this)&&(this.length=this.length),Um(this)}});var Hm=Wc("Array").reverse,Bm=se,Km=Hm,Ym=Array.prototype,Jm=r((function(e){var t=e.reverse;return e===Ym||Bm(Ym,e)&&t===Ym.reverse?Km:t})),zm=Lr,Qm=Pr,qm=_n,$m=ee,ey=qn,ty=Mr,ry=Q,ny=Hr,iy=dt,oy=Rs,ay=Pn("slice"),sy=iy("species"),uy=Array,ly=Math.max;zm({target:"Array",proto:!0,forced:!ay},{slice:function(e,t){var r,n,i,o=ry(this),a=ty(o),s=ey(e,a),u=ey(void 0===t?a:t,a);if(Qm(o)&&(r=o.constructor,(qm(r)&&(r===uy||Qm(r.prototype))||$m(r)&&null===(r=r[sy]))&&(r=void 0),r===uy||void 0===r))return oy(o,s,u);for(n=new(void 0===r?uy:r)(ly(u-s,0)),i=0;s<u;s++,i++)s in o&&ny(n,i,o[s]);return n.length=i,n}});var cy=Wc("Array").slice,fy=se,dy=cy,py=Array.prototype,hy=r((function(e){var t=e.slice;return e===py||fy(py,e)&&t===py.slice?dy:t})),vy=m,my=Ie,yy=ee,gy=qe,_y=Rs,by=a,wy=Function,Sy=vy([].concat),ky=vy([].join),Ry={},Ty=by?wy.bind:function(e){var t=my(this),r=t.prototype,n=_y(arguments,1),i=function(){var r=Sy(n,_y(arguments));return this instanceof i?function(e,t,r){if(!gy(Ry,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ry[t]=wy("C,a","return new C("+ky(n,",")+")")}return Ry[t](e,r)}(t,r.length,r):t.apply(e,r)};return yy(r)&&(i.prototype=r),i},xy=Ty;Lr({target:"Function",proto:!0,forced:Function.bind!==xy},{bind:xy});var Ey=Wc("Function").bind,Ly=se,Oy=Ey,Py=Function.prototype,Iy=r((function(e){var t=e.bind;return e===Py||Ly(Py,e)&&t===Py.bind?Oy:t})),Cy=Lr,Zy=f,jy=Ty,Ay=vp,Dy=rr,Wy=ee,Vy=Mi,My=o,Gy=ae("Reflect","construct"),Fy=Object.prototype,Ny=[].push,Uy=My((function(){function e(){}return!(Gy((function(){}),[],e)instanceof e)})),Xy=!My((function(){Gy((function(){}))})),Hy=Uy||Xy;Cy({target:"Reflect",stat:!0,forced:Hy,sham:Hy},{construct:function(e,t){Ay(e),Dy(t);var r=arguments.length<3?e:Ay(arguments[2]);if(Xy&&!Uy)return Gy(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 Zy(Ny,n,t),new(Zy(jy,e,n))}var i=r.prototype,o=Vy(Wy(i)?i:Fy),a=Zy(e,o,t);return Wy(a)?a:o}});var By=r(te.Reflect.construct),Ky=Lr,Yy=ni.indexOf,Jy=$c,zy=k([].indexOf),Qy=!!zy&&1/zy([1],1,-0)<0;Ky({target:"Array",proto:!0,forced:Qy||!Jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Qy?zy(this,e,t)||0:Yy(this,e,t)}});var qy=Wc("Array").indexOf,$y=se,eg=qy,tg=Array.prototype,rg=r((function(e){var t=e.indexOf;return e===tg||$y(tg,e)&&t===tg.indexOf?eg:t}));Lr({target:"Array",stat:!0},{isArray:Pr});var ng=r(te.Array.isArray),ig=rr,og=bd,ag=zt,sg=C,ug=Je,lg=function(e,t,r,n){try{return n?t(ig(r)[0],r[1]):t(r)}catch(PC){og(e,"throw",PC)}},cg=ld,fg=_n,dg=Mr,pg=Hr,hg=md,vg=Oc,mg=Array,yg=function(e){var t=ug(e),r=fg(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ag(i,n>2?arguments[2]:void 0));var a,s,u,l,c,f,d=vg(t),p=0;if(!d||this===mg&&cg(d))for(a=dg(t),s=r?new this(a):mg(a);a>p;p++)f=o?i(t[p],p):t[p],pg(s,p,f);else for(c=(l=hg(t,d)).next,s=r?new this:[];!(u=sg(c,l)).done;p++)f=o?lg(l,i,[u.value,p],!0):u.value,pg(s,p,f);return s.length=p,s},gg=yg;Lr({target:"Array",stat:!0,forced:!Xv((function(e){Array.from(e)}))},{from:gg});var _g=r(te.Array.from),bg=r(ao.f("toPrimitive"));function wg(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=wg(Object(i),!0)).call(r,(function(t){Og(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=wg(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function kg(){kg=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Af||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Wf(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var v={};u(v,o,(function(){return this}));var m=Ff&&Ff(Ff(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=d.prototype=Wf(v);function g(e){var t;cf(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Sc(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(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 R(e){this.tryEntries=[{tryLoc:"root"}],cf(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:x}}function x(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nf?Nf(e,h):(e.__proto__=h,u(e,s,"GeneratorFunction")),e.prototype=Wf(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Gm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(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=T,R.prototype={constructor:R,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,cf(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(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 a.type="throw",a.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 o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.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 o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),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 new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function Rg(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(PC){return void r(PC)}s.done?t(u):Gm.resolve(u).then(n,i)}function Tg(e){return function(){var t=this,r=arguments;return new Gm((function(n,i){var o=e.apply(t,r);function a(e){Rg(o,n,i,a,s,"next",e)}function s(e){Rg(o,n,i,a,s,"throw",e)}a(void 0)}))}}function xg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(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),Af(e,Gg(n.key),n)}}function Lg(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Af(e,"prototype",{writable:!1}),e}function Og(e,t,r){return(t=Gg(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Wf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Af(e,"prototype",{writable:!1}),t&&Cg(e,t)}function Ig(e){var t;return(Ig=Nf?Iy(t=Ff).call(t):function(e){return e.__proto__||Ff(e)})(e)}function Cg(e,t){var r;return(Cg=Nf?Iy(r=Nf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Zg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Zc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(jc){var o=jc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ag(e){var t=function(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ig(e);if(t){var i=Ig(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return jg(e)}(this,r)}}function Dg(e,t){return function(e){if(ng(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==kc&&Pc(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Vg(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wg(e){return function(e){if(ng(e))return Mg(e)}(e)||function(e){if(void 0!==kc&&null!=Pc(e)||null!=e["@@iterator"])return _g(e)}(e)||Vg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vg(e,t){var r;if(e){if("string"==typeof e)return Mg(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mg(e,t):void 0}}function Mg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gg(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var Fg,Ng=Wc("Array").concat,Ug=se,Xg=Ng,Hg=Array.prototype,Bg=r((function(e){var t=e.concat;return e===Hg||Ug(Hg,e)&&t===Hg.concat?Xg:t})),Kg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Yg=i,Jg=f,zg=E,Qg=Kg,qg=ue,$g=Rs,e_=Sp,t_=Yg.Function,r_=/MSIE .\./.test(qg)||Qg&&((Fg=Yg.Bun.version.split(".")).length<3||0==Fg[0]&&(Fg[1]<3||3==Fg[1]&&0==Fg[2])),n_=function(e,t){var r=t?2:1;return r_?function(n,i){var o=e_(arguments.length,1)>r,a=zg(n)?n:t_(n),s=o?$g(arguments,r):[],u=o?function(){Jg(a,this,s)}:a;return t?e(u,i):e(u)}:e},i_=Lr,o_=i,a_=n_(o_.setInterval,!0);i_({global:!0,bind:!0,forced:o_.setInterval!==a_},{setInterval:a_});var s_=Lr,u_=i,l_=n_(u_.setTimeout,!0);s_({global:!0,bind:!0,forced:u_.setTimeout!==l_},{setTimeout:l_});var c_=r(te.setTimeout),f_=o,d_=dt("iterator"),p_=!f_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[d_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),h_=O,v_=m,m_=C,y_=o,g_=hi,__=to,b_=Z,w_=Je,S_=X,k_=Object.assign,R_=Object.defineProperty,T_=v_([].concat),x_=!k_||y_((function(){if(h_&&1!==k_({b:1},k_(R_({},"a",{enumerable:!0,get:function(){R_(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!=k_({},e)[r]||g_(k_({},t)).join("")!=n}))?function(e,t){for(var r=w_(e),n=arguments.length,i=1,o=__.f,a=b_.f;n>i;)for(var s,u=S_(arguments[i++]),l=o?T_(g_(u),o(u)):g_(u),c=l.length,f=0;c>f;)s=l[f++],h_&&!m_(a,u,s)||(r[s]=u[s]);return r}:k_,E_=m,L_=2147483647,O_=/[^\0-\u007E]/,P_=/[.\u3002\uFF0E\uFF61]/g,I_="Overflow: input needs wider integers to process",C_=RangeError,Z_=E_(P_.exec),j_=Math.floor,A_=String.fromCharCode,D_=E_("".charCodeAt),W_=E_([].join),V_=E_([].push),M_=E_("".replace),G_=E_("".split),F_=E_("".toLowerCase),N_=function(e){return e+22+75*(e<26)},U_=function(e,t,r){var n=0;for(e=r?j_(e/700):e>>1,e+=j_(e/t);e>455;)e=j_(e/35),n+=36;return j_(n+36*e/(e+38))},X_=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=D_(e,r++);if(i>=55296&&i<=56319&&r<n){var o=D_(e,r++);56320==(64512&o)?V_(t,((1023&i)<<10)+(1023&o)+65536):(V_(t,i),r--)}else V_(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&V_(t,A_(n));var u=t.length,l=u;for(u&&V_(t,"-");l<i;){var c=L_;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<c&&(c=n);var f=l+1;if(c-o>j_((L_-a)/f))throw C_(I_);for(a+=(c-o)*f,o=c,r=0;r<e.length;r++){if((n=e[r])<o&&++a>L_)throw C_(I_);if(n==o){for(var d=a,p=36;;){var h=p<=s?1:p>=s+26?26:p-s;if(d<h)break;var v=d-h,m=36-h;V_(t,A_(N_(h+v%m))),d=j_(v/m),p+=36}V_(t,A_(N_(d))),s=U_(a,f,l==u),a=0,l++}}a++,o++}return W_(t,"")},H_=no,B_=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:H_(e,n,t[n],r);return e},K_=Ji,Y_=Math.floor,J_=function(e,t){var r=e.length,n=Y_(r/2);return r<8?z_(e,t):Q_(e,J_(K_(e,0,n),t),J_(K_(e,n),t),t)},z_=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},Q_=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},q_=J_,$_=Lr,eb=i,tb=C,rb=m,nb=O,ib=p_,ob=no,ab=oo,sb=B_,ub=Po,lb=Nu,cb=Bo,fb=fp,db=E,pb=qe,hb=zt,vb=en,mb=rr,yb=ee,gb=Kn,_b=Mi,bb=M,wb=md,Sb=Oc,kb=Sp,Rb=q_,Tb=dt("iterator"),xb="URLSearchParams",Eb=xb+"Iterator",Lb=cb.set,Ob=cb.getterFor(xb),Pb=cb.getterFor(Eb),Ib=Object.getOwnPropertyDescriptor,Cb=function(e){if(!nb)return eb[e];var t=Ib(eb,e);return t&&t.value},Zb=Cb("fetch"),jb=Cb("Request"),Ab=Cb("Headers"),Db=jb&&jb.prototype,Wb=Ab&&Ab.prototype,Vb=eb.RegExp,Mb=eb.TypeError,Gb=eb.decodeURIComponent,Fb=eb.encodeURIComponent,Nb=rb("".charAt),Ub=rb([].join),Xb=rb([].push),Hb=rb("".replace),Bb=rb([].shift),Kb=rb([].splice),Yb=rb("".split),Jb=rb("".slice),zb=/\+/g,Qb=Array(4),qb=function(e){return Qb[e-1]||(Qb[e-1]=Vb("((?:%[\\da-f]{2}){"+e+"})","gi"))},$b=function(e){try{return Gb(e)}catch(PC){return e}},ew=function(e){var t=Hb(e,zb," "),r=4;try{return Gb(t)}catch(PC){for(;r;)t=Hb(t,qb(r--),$b);return t}},tw=/[!'()~]|%20/g,rw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},nw=function(e){return rw[e]},iw=function(e){return Hb(Fb(e),tw,nw)},ow=lb((function(e,t){Lb(this,{type:Eb,iterator:wb(Ob(e).entries),kind:t})}),"Iterator",(function(){var e=Pb(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),aw=function(e){this.entries=[],this.url=null,void 0!==e&&(yb(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Nb(e,0)?Jb(e,1):e:gb(e)))};aw.prototype={type:xb,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=Sb(e);if(u)for(r=(t=wb(e,u)).next;!(n=tb(r,t)).done;){if(o=(i=wb(mb(n.value))).next,(a=tb(o,i)).done||(s=tb(o,i)).done||!tb(o,i).done)throw Mb("Expected sequence with length 2");Xb(this.entries,{key:gb(a.value),value:gb(s.value)})}else for(var l in e)pb(e,l)&&Xb(this.entries,{key:l,value:gb(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=Yb(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Yb(t,"="),Xb(this.entries,{key:ew(Bb(r)),value:ew(Ub(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Xb(r,iw(e.key)+"="+iw(e.value));return Ub(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var sw=function(){fb(this,uw);var e=Lb(this,new aw(arguments.length>0?arguments[0]:void 0));nb||(this.length=e.entries.length)},uw=sw.prototype;if(sb(uw,{append:function(e,t){kb(arguments.length,2);var r=Ob(this);Xb(r.entries,{key:gb(e),value:gb(t)}),nb||this.length++,r.updateURL()},delete:function(e){kb(arguments.length,1);for(var t=Ob(this),r=t.entries,n=gb(e),i=0;i<r.length;)r[i].key===n?Kb(r,i,1):i++;nb||(this.length=r.length),t.updateURL()},get:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Xb(n,t[i].value);return n},has:function(e){kb(arguments.length,1);for(var t=Ob(this).entries,r=gb(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){kb(arguments.length,1);for(var r,n=Ob(this),i=n.entries,o=!1,a=gb(e),s=gb(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Kb(i,u--,1):(o=!0,r.value=s));o||Xb(i,{key:a,value:s}),nb||(this.length=i.length),n.updateURL()},sort:function(){var e=Ob(this);Rb(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Ob(this).entries,n=hb(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new ow(this,"keys")},values:function(){return new ow(this,"values")},entries:function(){return new ow(this,"entries")}},{enumerable:!0}),ob(uw,Tb,uw.entries,{name:"entries"}),ob(uw,"toString",(function(){return Ob(this).serialize()}),{enumerable:!0}),nb&&ab(uw,"size",{get:function(){return Ob(this).entries.length},configurable:!0,enumerable:!0}),ub(sw,xb),$_({global:!0,constructor:!0,forced:!ib},{URLSearchParams:sw}),!ib&&db(Ab)){var lw=rb(Wb.has),cw=rb(Wb.set),fw=function(e){if(yb(e)){var t,r=e.body;if(vb(r)===xb)return t=e.headers?new Ab(e.headers):new Ab,lw(t,"content-type")||cw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),_b(e,{body:bb(0,gb(r)),headers:bb(0,t)})}return e};if(db(Zb)&&$_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Zb(e,arguments.length>1?fw(arguments[1]):{})}}),db(jb)){var dw=function(e){return fb(this,Db),new jb(e,arguments.length>1?fw(arguments[1]):{})};Db.constructor=dw,dw.prototype=Db,$_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:dw})}}var pw,hw=Lr,vw=O,mw=p_,yw=i,gw=zt,_w=m,bw=no,ww=oo,Sw=fp,kw=qe,Rw=x_,Tw=yg,xw=Ji,Ew=fc.codeAt,Lw=function(e){var t,r,n=[],i=G_(M_(F_(e),P_,"."),".");for(t=0;t<i.length;t++)r=i[t],V_(n,Z_(O_,r)?"xn--"+X_(r):r);return W_(n,".")},Ow=Kn,Pw=Po,Iw=Sp,Cw={URLSearchParams:sw,getState:Ob},Zw=Bo,jw=Zw.set,Aw=Zw.getterFor("URL"),Dw=Cw.URLSearchParams,Ww=Cw.getState,Vw=yw.URL,Mw=yw.TypeError,Gw=yw.parseInt,Fw=Math.floor,Nw=Math.pow,Uw=_w("".charAt),Xw=_w(/./.exec),Hw=_w([].join),Bw=_w(1..toString),Kw=_w([].pop),Yw=_w([].push),Jw=_w("".replace),zw=_w([].shift),Qw=_w("".split),qw=_w("".slice),$w=_w("".toLowerCase),eS=_w([].unshift),tS="Invalid scheme",rS="Invalid host",nS="Invalid port",iS=/[a-z]/i,oS=/[\d+-.a-z]/i,aS=/\d/,sS=/^0x/i,uS=/^[0-7]+$/,lS=/^\d+$/,cS=/^[\da-f]+$/i,fS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,dS=/[\0\t\n\r #/:<>?@[\\\]^|]/,pS=/^[\u0000-\u0020]+/,hS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,vS=/[\t\n\r]/g,mS=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)eS(t,e%256),e=Fw(e/256);return Hw(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=Bw(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},yS={},gS=Rw({},yS,{" ":1,'"':1,"<":1,">":1,"`":1}),_S=Rw({},gS,{"#":1,"?":1,"{":1,"}":1}),bS=Rw({},_S,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),wS=function(e,t){var r=Ew(e,0);return r>32&&r<127&&!kw(t,e)?e:encodeURIComponent(e)},SS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},kS=function(e,t){var r;return 2==e.length&&Xw(iS,Uw(e,0))&&(":"==(r=Uw(e,1))||!t&&"|"==r)},RS=function(e){var t;return e.length>1&&kS(qw(e,0,2))&&(2==e.length||"/"===(t=Uw(e,2))||"\\"===t||"?"===t||"#"===t)},TS=function(e){return"."===e||"%2e"===$w(e)},xS={},ES={},LS={},OS={},PS={},IS={},CS={},ZS={},jS={},AS={},DS={},WS={},VS={},MS={},GS={},FS={},NS={},US={},XS={},HS={},BS={},KS=function(e,t,r){var n,i,o,a=Ow(e);if(t){if(i=this.parse(a))throw Mw(i);this.searchParams=null}else{if(void 0!==r&&(n=new KS(r,!0)),i=this.parse(a,null,n))throw Mw(i);(o=Ww(new Dw)).bindURL(this),this.searchParams=o}};KS.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,u=this,l=t||xS,c=0,f="",d=!1,p=!1,h=!1;for(e=Ow(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Jw(e,pS,""),e=Jw(e,hS,"$1")),e=Jw(e,vS,""),n=Tw(e);c<=n.length;){switch(i=n[c],l){case xS:if(!i||!Xw(iS,i)){if(t)return tS;l=LS;continue}f+=$w(i),l=ES;break;case ES:if(i&&(Xw(oS,i)||"+"==i||"-"==i||"."==i))f+=$w(i);else{if(":"!=i){if(t)return tS;f="",l=LS,c=0;continue}if(t&&(u.isSpecial()!=kw(SS,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&SS[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=MS:u.isSpecial()&&r&&r.scheme==u.scheme?l=OS:u.isSpecial()?l=ZS:"/"==n[c+1]?(l=PS,c++):(u.cannotBeABaseURL=!0,Yw(u.path,""),l=XS)}break;case LS:if(!r||r.cannotBeABaseURL&&"#"!=i)return tS;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=xw(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=BS;break}l="file"==r.scheme?MS:IS;continue;case OS:if("/"!=i||"/"!=n[c+1]){l=IS;continue}l=jS,c++;break;case PS:if("/"==i){l=AS;break}l=US;continue;case IS:if(u.scheme=r.scheme,i==pw)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=CS;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query="",l=HS;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.path.length--,l=US;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=xw(r.path),u.query=r.query,u.fragment="",l=BS}break;case CS:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=US;continue}l=AS}else l=jS;break;case ZS:if(l=jS,"/"!=i||"/"!=Uw(f,c+1))continue;c++;break;case jS:if("/"!=i&&"\\"!=i){l=AS;continue}break;case AS:if("@"==i){d&&(f="%40"+f),d=!0,o=Tw(f);for(var v=0;v<o.length;v++){var m=o[v];if(":"!=m||h){var y=wS(m,bS);h?u.password+=y:u.username+=y}else h=!0}f=""}else if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(d&&""==f)return"Invalid authority";c-=Tw(f).length+1,f="",l=DS}else f+=i;break;case DS:case WS:if(t&&"file"==u.scheme){l=FS;continue}if(":"!=i||p){if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return rS;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=NS,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return rS;if(a=u.parseHost(f))return a;if(f="",l=VS,t==WS)return}break;case VS:if(!Xw(aS,i)){if(i==pw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=f){var g=Gw(f,10);if(g>65535)return nS;u.port=u.isSpecial()&&g===SS[u.scheme]?null:g,f=""}if(t)return;l=NS;continue}return nS}f+=i;break;case MS:if(u.scheme="file","/"==i||"\\"==i)l=GS;else{if(!r||"file"!=r.scheme){l=US;continue}if(i==pw)u.host=r.host,u.path=xw(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=xw(r.path),u.query="",l=HS;else{if("#"!=i){RS(Hw(xw(n,c),""))||(u.host=r.host,u.path=xw(r.path),u.shortenPath()),l=US;continue}u.host=r.host,u.path=xw(r.path),u.query=r.query,u.fragment="",l=BS}}break;case GS:if("/"==i||"\\"==i){l=FS;break}r&&"file"==r.scheme&&!RS(Hw(xw(n,c),""))&&(kS(r.path[0],!0)?Yw(u.path,r.path[0]):u.host=r.host),l=US;continue;case FS:if(i==pw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&kS(f))l=US;else if(""==f){if(u.host="",t)return;l=NS}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",l=NS}continue}f+=i;break;case NS:if(u.isSpecial()){if(l=US,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=pw&&(l=US,"/"!=i))continue}else u.fragment="",l=BS;else u.query="",l=HS;break;case US:if(i==pw||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=$w(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Yw(u.path,"")):TS(f)?"/"==i||"\\"==i&&u.isSpecial()||Yw(u.path,""):("file"==u.scheme&&!u.path.length&&kS(f)&&(u.host&&(u.host=""),f=Uw(f,0)+":"),Yw(u.path,f)),f="","file"==u.scheme&&(i==pw||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)zw(u.path);"?"==i?(u.query="",l=HS):"#"==i&&(u.fragment="",l=BS)}else f+=wS(i,_S);break;case XS:"?"==i?(u.query="",l=HS):"#"==i?(u.fragment="",l=BS):i!=pw&&(u.path[0]+=wS(i,yS));break;case HS:t||"#"!=i?i!=pw&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":wS(i,yS)):(u.fragment="",l=BS);break;case BS:i!=pw&&(u.fragment+=wS(i,gS))}c++}},parseHost:function(e){var t,r,n;if("["==Uw(e,0)){if("]"!=Uw(e,e.length-1))return rS;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return Uw(e,f)};if(":"==d()){if(":"!=Uw(e,1))return;f+=2,c=++l}for(;d();){if(8==l)return;if(":"!=d()){for(t=r=0;r<4&&Xw(cS,d());)t=16*t+Gw(d(),16),f++,r++;if("."==d()){if(0==r)return;if(f-=r,l>6)return;for(n=0;d();){if(i=null,n>0){if(!("."==d()&&n<4))return;f++}if(!Xw(aS,d()))return;for(;Xw(aS,d());){if(o=Gw(d(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(qw(e,1,-1)),!t)return rS;this.host=t}else if(this.isSpecial()){if(e=Lw(e),Xw(fS,e))return rS;if(t=function(e){var t,r,n,i,o,a,s,u=Qw(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==Uw(i,0)&&(o=Xw(sS,i)?16:8,i=qw(i,8==o?1:2)),""===i)a=0;else{if(!Xw(10==o?lS:8==o?uS:cS,i))return e;a=Gw(i,o)}Yw(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=Nw(256,5-t))return null}else if(a>255)return null;for(s=Kw(r),n=0;n<r.length;n++)s+=r[n]*Nw(256,3-n);return s}(e),null===t)return rS;this.host=t}else{if(Xw(dS,e))return rS;for(t="",r=Tw(e),n=0;n<r.length;n++)t+=wS(r[n],yS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return kw(SS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&kS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=mS(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Hw(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw Mw(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new YS(e.path[0]).origin}catch(PC){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+mS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ow(e)+":",xS)},getUsername:function(){return this.username},setUsername:function(e){var t=Tw(Ow(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=wS(t[r],bS)}},getPassword:function(){return this.password},setPassword:function(e){var t=Tw(Ow(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=wS(t[r],bS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?mS(e):mS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,DS)},getHostname:function(){var e=this.host;return null===e?"":mS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,WS)},getPort:function(){var e=this.port;return null===e?"":Ow(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ow(e))?this.port=null:this.parse(e,VS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Hw(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,NS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ow(e))?this.query=null:("?"==Uw(e,0)&&(e=qw(e,1)),this.query="",this.parse(e,HS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ow(e))?("#"==Uw(e,0)&&(e=qw(e,1)),this.fragment="",this.parse(e,BS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var YS=function(e){var t=Sw(this,JS),r=Iw(arguments.length,1)>1?arguments[1]:void 0,n=jw(t,new KS(e,!1,r));vw||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},JS=YS.prototype,zS=function(e,t){return{get:function(){return Aw(this)[e]()},set:t&&function(e){return Aw(this)[t](e)},configurable:!0,enumerable:!0}};if(vw&&(ww(JS,"href",zS("serialize","setHref")),ww(JS,"origin",zS("getOrigin")),ww(JS,"protocol",zS("getProtocol","setProtocol")),ww(JS,"username",zS("getUsername","setUsername")),ww(JS,"password",zS("getPassword","setPassword")),ww(JS,"host",zS("getHost","setHost")),ww(JS,"hostname",zS("getHostname","setHostname")),ww(JS,"port",zS("getPort","setPort")),ww(JS,"pathname",zS("getPathname","setPathname")),ww(JS,"search",zS("getSearch","setSearch")),ww(JS,"searchParams",zS("getSearchParams")),ww(JS,"hash",zS("getHash","setHash"))),bw(JS,"toJSON",(function(){return Aw(this).serialize()}),{enumerable:!0}),bw(JS,"toString",(function(){return Aw(this).serialize()}),{enumerable:!0}),Vw){var QS=Vw.createObjectURL,qS=Vw.revokeObjectURL;QS&&bw(YS,"createObjectURL",gw(QS,Vw)),qS&&bw(YS,"revokeObjectURL",gw(qS,Vw))}Pw(YS,"URL"),hw({global:!0,constructor:!0,forced:!mw,sham:!vw},{URL:YS});var $S=Lr,ek=o,tk=Sp,rk=Kn,nk=p_,ik=ae("URL");$S({target:"URL",stat:!0,forced:!(nk&&ek((function(){ik.canParse()})))},{canParse:function(e){var t=tk(arguments.length,1),r=rk(e),n=t<2||void 0===arguments[1]?void 0:rk(arguments[1]);try{return!!new ik(r,n)}catch(PC){return!1}}});var ok=r(te.URL),ak=Lr,sk=ea.find,uk="find",lk=!0;uk in[]&&Array(1)[uk]((function(){lk=!1})),ak({target:"Array",proto:!0,forced:lk},{find:function(e){return sk(this,e,arguments.length>1?arguments[1]:void 0)}});var ck=Wc("Array").find,fk=se,dk=ck,pk=Array.prototype,hk=r((function(e){var t=e.find;return e===pk||fk(pk,e)&&t===pk.find?dk:t})),vk=O,mk=Pr,yk=TypeError,gk=Object.getOwnPropertyDescriptor,_k=vk&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(PC){return PC instanceof TypeError}}(),bk=Ee,wk=TypeError,Sk=function(e,t){if(!delete e[t])throw wk("Cannot delete property "+bk(t)+" of "+bk(e))},kk=Lr,Rk=Je,Tk=qn,xk=jr,Ek=Mr,Lk=_k?function(e,t){if(mk(e)&&!gk(e,"length").writable)throw yk("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ok=Fr,Pk=xn,Ik=Hr,Ck=Sk,Zk=Pn("splice"),jk=Math.max,Ak=Math.min;kk({target:"Array",proto:!0,forced:!Zk},{splice:function(e,t){var r,n,i,o,a,s,u=Rk(this),l=Ek(u),c=Tk(e,l),f=arguments.length;for(0===f?r=n=0:1===f?(r=0,n=l-c):(r=f-2,n=Ak(jk(xk(t),0),l-c)),Ok(l+r-n),i=Pk(u,n),o=0;o<n;o++)(a=c+o)in u&&Ik(i,o,u[a]);if(i.length=n,r<n){for(o=c;o<l-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:Ck(u,s);for(o=l;o>l-n+r;o--)Ck(u,o-1)}else if(r>n)for(o=l-n;o>c;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:Ck(u,s);for(o=0;o<r;o++)u[o+c]=arguments[o+2];return Lk(u,l-n+r),i}});var Dk=Wc("Array").splice,Wk=se,Vk=Dk,Mk=Array.prototype,Gk=r((function(e){var t=e.splice;return e===Mk||Wk(Mk,e)&&t===Mk.splice?Vk:t}));Lr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Fk=r(te.Number.isNaN),Nk="\t\n\v\f\r                 \u2028\u2029\ufeff",Uk=Y,Xk=Kn,Hk=Nk,Bk=m("".replace),Kk=RegExp("^["+Hk+"]+"),Yk=RegExp("(^|[^"+Hk+"])["+Hk+"]+$"),Jk=function(e){return function(t){var r=Xk(Uk(t));return 1&e&&(r=Bk(r,Kk,"")),2&e&&(r=Bk(r,Yk,"$1")),r}},zk={start:Jk(1),end:Jk(2),trim:Jk(3)},Qk=i,qk=o,$k=m,eR=Kn,tR=zk.trim,rR=Nk,nR=Qk.parseInt,iR=Qk.Symbol,oR=iR&&iR.iterator,aR=/^[+-]?0x/i,sR=$k(aR.exec),uR=8!==nR(rR+"08")||22!==nR(rR+"0x16")||oR&&!qk((function(){nR(Object(oR))}))?function(e,t){var r=tR(eR(e));return nR(r,t>>>0||(sR(aR,r)?16:10))}:nR;Lr({global:!0,forced:parseInt!=uR},{parseInt:uR});var lR=r(te.parseInt),cR=ea.map;Lr({target:"Array",proto:!0,forced:!Pn("map")},{map:function(e){return cR(this,e,arguments.length>1?arguments[1]:void 0)}});var fR=Wc("Array").map,dR=se,pR=fR,hR=Array.prototype,vR=r((function(e){var t=e.map;return e===hR||dR(hR,e)&&t===hR.map?pR:t})),mR=x_;Lr({target:"Object",stat:!0,arity:2,forced:Object.assign!==mR},{assign:mR});var yR=r(te.Object.assign),gR=r(bc),_R=qe,bR=C,wR=ee,SR=rr,kR=function(e){return void 0!==e&&(_R(e,"value")||_R(e,"writable"))},RR=L,TR=Tu;Lr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return SR(t)===o?t[r]:(n=RR.f(t,r))?kR(n)?n.value:void 0===n.get?void 0:bR(n.get,o):wR(i=TR(t))?e(i,r,o):void 0}});var xR=r(te.Reflect.get);function ER(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function LR(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=ER(Object(i),!0)).call(r,(function(t){ZR(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=ER(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function OR(e){return(OR="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function PR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(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),Af(e,DR(n.key),n)}}function CR(e,t,r){return t&&IR(e.prototype,t),r&&IR(e,r),Af(e,"prototype",{writable:!1}),e}function ZR(e,t,r){return(t=DR(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jR(e){return function(e){if(ng(e))return AR(e)}(e)||function(e){if(void 0!==kc&&null!=Pc(e)||null!=e["@@iterator"])return _g(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return AR(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return _g(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AR(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function DR(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var WR={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 o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Wf&&(n.prototype=Wf(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?hy(n).call(n,1):n);return jc?Bg(i).call(i,jc(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var d,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,i);break;default:if(!u)for(d=1,u=new Array(f-1);d<f;d++)u[d-1]=arguments[d];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(WR);var VR=r(WR.exports),MR=ea.some;Lr({target:"Array",proto:!0,forced:!$c("some")},{some:function(e){return MR(this,e,arguments.length>1?arguments[1]:void 0)}});var GR=Wc("Array").some,FR=se,NR=GR,UR=Array.prototype,XR=r((function(e){var t=e.some;return e===UR||FR(UR,e)&&t===UR.some?NR:t})),HR=jr,BR=Kn,KR=Y,YR=RangeError,JR=m,zR=Wr,QR=Kn,qR=Y,$R=JR((function(e){var t=BR(KR(this)),r="",n=HR(e);if(n<0||n==1/0)throw YR("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),eT=JR("".slice),tT=Math.ceil,rT=function(e){return function(t,r,n){var i,o,a=QR(qR(t)),s=zR(r),u=a.length,l=void 0===n?" ":QR(n);return s<=u||""==l?a:((o=$R(l,tT((i=s-u)/l.length))).length>i&&(o=eT(o,0,i)),e?a+o:o+a)}},nT={start:rT(!1),end:rT(!0)},iT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ue),oT=nT.start;Lr({target:"String",proto:!0,forced:iT},{padStart:function(e){return oT(this,e,arguments.length>1?arguments[1]:void 0)}});var aT=Wc("String").padStart,sT=se,uT=aT,lT=String.prototype,cT=r((function(e){var t=e.padStart;return"string"==typeof e||e===lT||sT(lT,e)&&t===lT.padStart?uT:t})),fT=r(te.setInterval),dT=ea.every;Lr({target:"Array",proto:!0,forced:!$c("every")},{every:function(e){return dT(this,e,arguments.length>1?arguments[1]:void 0)}});var pT=Wc("Array").every,hT=se,vT=pT,mT=Array.prototype,yT=r((function(e){var t=e.every;return e===mT||hT(mT,e)&&t===mT.every?vT:t})),gT=i,_T=o,bT=Kn,wT=zk.trim,ST=Nk,kT=m("".charAt),RT=gT.parseFloat,TT=gT.Symbol,xT=TT&&TT.iterator,ET=1/RT(ST+"-0")!=-1/0||xT&&!_T((function(){RT(Object(xT))}))?function(e){var t=wT(bT(e)),r=RT(t);return 0===r&&"-"==kT(t,0)?-0:r}:RT;Lr({global:!0,forced:parseFloat!=ET},{parseFloat:ET});var LT=r(te.parseFloat),OT=mu.PROPER,PT=o,IT=Nk,CT=zk.trim;Lr({target:"String",proto:!0,forced:function(e){return PT((function(){return!!IT[e]()||"​…᠎"!=="​…᠎"[e]()||OT&&IT[e].name!==e}))}("trim")},{trim:function(){return CT(this)}});var ZT=Wc("String").trim,jT=se,AT=ZT,DT=String.prototype,WT=r((function(e){var t=e.trim;return"string"==typeof e||e===DT||jT(DT,e)&&t===DT.trim?AT:t})),VT=ue.match(/firefox\/(\d+)/i),MT=!!VT&&+VT[1],GT=/MSIE|Trident/.test(ue),FT=ue.match(/AppleWebKit\/(\d+)\./),NT=!!FT&&+FT[1],UT=Lr,XT=m,HT=Ie,BT=Je,KT=Mr,YT=Sk,JT=Kn,zT=o,QT=q_,qT=$c,$T=MT,ex=GT,tx=ve,rx=NT,nx=[],ix=XT(nx.sort),ox=XT(nx.push),ax=zT((function(){nx.sort(void 0)})),sx=zT((function(){nx.sort(null)})),ux=qT("sort"),lx=!zT((function(){if(tx)return tx<70;if(!($T&&$T>3)){if(ex)return!0;if(rx)return rx<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++)nx.push({k:t+n,v:r})}for(nx.sort((function(e,t){return t.v-e.v})),n=0;n<nx.length;n++)t=nx[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));UT({target:"Array",proto:!0,forced:ax||!sx||!ux||!lx},{sort:function(e){void 0!==e&&HT(e);var t=BT(this);if(lx)return void 0===e?ix(t):ix(t,e);var r,n,i=[],o=KT(t);for(n=0;n<o;n++)n in t&&ox(i,t[n]);for(QT(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:JT(t)>JT(r)?1:-1}}(e)),r=KT(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)YT(t,n++);return t}});var cx=Wc("Array").sort,fx=se,dx=cx,px=Array.prototype,hx=r((function(e){var t=e.sort;return e===px||fx(px,e)&&t===px.sort?dx:t})),vx=Lr,mx=Date,yx=m(mx.prototype.getTime);vx({target:"Date",stat:!0},{now:function(){return yx(new mx)}});var gx,_x=r(te.Date.now),bx="undefined"!=typeof window&&window.location&&rg(gx=window.location.href).call(gx,"xgplayerdebugger=1")>-1,wx="color: #525252; background-color: #90ee90;",Sx="color: #525252; background-color: red;",kx="color: #525252; background-color: yellow; ",Rx="%c[xgplayer]",Tx={config:{debug:bx?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,Bg(t=[Rx,wx,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,Bg(t=[Rx,kx,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,Bg(t=[Rx,Sx,e]).call(t,o))}}},xx=function(){function e(t){PR(this,e),this.bufferedList=t}return CR(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),Ex={};Ex.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,cf(e=Zc(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},Ex.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&Ex.addClass(i,r),t)cf(o=Zc(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return Tx.logError("util.createDomFromHtml",a),null}},Ex.hasClass=function(e,t){if(!e||!t)return!1;try{return XR(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===OR(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},Ex.addClass=function(e,t){if(e&&t)try{var r;cf(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){Ex.hasClass(e,t)||(e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},Ex.removeClass=function(e,t){if(e&&t)try{var r;cf(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(Ex.hasClass(e,t))cf(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},Ex.toggleClass=function(e,t){var r;e&&cf(r=t.split(/\s+/g)).call(r,(function(t){Ex.hasClass(e,t)?Ex.removeClass(e,t):Ex.addClass(e,t)}))},Ex.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===Ex.typeOf(e[r]))t.push(e[r]);else if("Object"===Ex.typeOf(e[r])){var n;vR(n=Zc(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},Ex.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){Tx.logError("util.findDom",n),0===rg(r).call(r,"#")&&(e=t.getElementById(hy(r).call(r,1)))}return e},Ex.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},Ex.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},Ex.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=cT(Ex).call(Ex,Math.floor(e/3600),2,0),r=cT(Ex).call(Ex,Math.floor((e-3600*t)/60),2,0),n=cT(Ex).call(Ex,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},Ex.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},Ex.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},Ex.deepCopy=function(e,t){var r;if("Object"===Ex.typeOf(t)&&"Object"===Ex.typeOf(e))return cf(r=Zc(t)).call(r,(function(r){if("Object"!==Ex.typeOf(t[r])||t[r]instanceof Node)if("Array"===Ex.typeOf(t[r])){var n;e[r]="Array"===Ex.typeOf(e[r])?Bg(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:Ex.deepCopy(e[r],t[r])})),e},Ex.deepMerge=function(e,t){var r;return vR(r=Zc(t)).call(r,(function(r){var n;"Array"===Ex.typeOf(t[r])&&"Array"===Ex.typeOf(e[r])?"Array"===Ex.typeOf(e[r])&&(n=e[r]).push.apply(n,jR(t[r])):Ex.typeOf(e[r])!==Ex.typeOf(t[r])||null===e[r]||"Object"!==Ex.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):Ex.deepMerge(e[r],t[r])})),e},Ex.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},Ex.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return cf(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},Ex.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=fT(Iy(r).call(r,e),n))},Ex.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},Ex.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=c_((function(){t(),Ex.clearTimeout(e,n)}),r);return e._timers.push(n),n},Ex.clearTimeout=function(e,t){var r=e._timers;if("Array"===Ex.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){Gk(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},Ex.clearAllTimers=function(e){var t=e._timers;"Array"===Ex.typeOf(t)&&(vR(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},Ex.createImgBtn=function(e,t,r,n){var i,o,a,s,u,l,c,f,d,p,h,v,m=Ex.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(m.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(yT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(rg(r).call(r,e)>-1&&rg(n).call(n,e)>-1)||(c=LT(WT(t=hy(r).call(r,0,rg(r).call(r,e))).call(t)),f=LT(WT(i=hy(n).call(n,0,rg(n).call(n,e))).call(i)),d=e,!1)})),m.style.width=Bg(o="".concat(c)).call(o,d),m.style.height=Bg(a="".concat(f)).call(a,d),m.style.backgroundSize=Bg(s=Bg(u=Bg(l="".concat(c)).call(l,d," ")).call(u,f)).call(s,d),m.style.margin="start"===e?Bg(p=Bg(h=Bg(v="-".concat(f/2)).call(v,d," auto auto -")).call(h,c/2)).call(p,d):"auto 5px auto 5px");return m},Ex.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(lR(e,16))})),Bg(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},Ex.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},Ex.checkIsFunction=function(e){return e&&"function"==typeof e},Ex.checkIsObject=function(e){return null!==e&&"object"===OR(e)},Ex.hide=function(e){e.style.display="none"},Ex.show=function(e,t){e.style.display=t||"block"},Ex.isUndefined=function(e){if(null==e)return!0},Ex.isNotNull=function(e){return!(null==e)},Ex.setStyleFromCsstext=function(e,t){if(t)if("String"===Ex.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");vR(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;vR(n=Zc(t)).call(n,(function(r){e.style[r]=t[r]}))}},Ex.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return vR(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(rg(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),vR(t=Zc(a)).call(t,(function(t){e.style[t]=a[t]})),o},Ex.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return vR(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},Ex.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},Ex.stopPropagation=function(e){e&&e.stopPropagation()},Ex.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Ex.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},Ex.checkTouchSupport=function(){return"ontouchstart"in window},Ex.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});hx(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new xx(i)},Ex.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},Ex.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},Ex.getHostFromUrl=function(e){if("String"!==Ex.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},Ex.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},Ex.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},Ex.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},Ex.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=lR(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=lR(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},Ex.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Ex.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},Ex.createPositionBar=function(e,t){var r=Ex.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},Ex.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:Bg(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=Zc(n);return cf(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Bg(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},Ex.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},Ex.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},Ex.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:Ex.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,u=o.cTime,l=o.offset;return e<a?u:e>=a&&e<=s?e-l:e>s&&n>=i-1?s:-1},Ex.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var Lx="3.0.21-rc.21",Ox={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Px=CR((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};PR(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,u=t.ended,l=t.src,c=t.currentSrc,f=t.media,d=f.readyState,p=f.networkState,h=r.errorCode||o.code;Ox[h]&&(h=Ox[h]);var v={playerVersion:Lx,currentTime:s,duration:a,ended:u,readyState:d,networkState:p,src:l||c,errorType:r.errorType,errorCode:h,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:Ex.getHostFromUrl(l||c)};return r.ext&&vR(i=Zc(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var m={playerVersion:Lx,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],g=0;g<arguments.length;g++)m[y[g]]=arguments[g];return m.ex=n?(n[arguments[0]]||{}).msg:"",m}}));function Ix(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=t.call.apply(t,Bg(n=[e]).call(n,o));r&&"function"==typeof r&&(u&&u.then?u.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,Bg(t=[e]).call(t,i))})):r.call.apply(r,Bg(s=[e]).call(s,o)))}function Cx(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Iy(r=function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Bg(a=[this]).call(a,hy(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=Bg(u=Bg(l="[pluginName: ".concat(this.pluginName,":")).call(l,e,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,f=function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&ng(e.__hooks[t])){var a,s=e.__hooks[t],u=-1,l=function e(t,r,n){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return n.call.apply(n,Bg(o=[t,t]).call(o,l));var f,d=s[u],p=d.call.apply(d,Bg(i=[t,t]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:e.apply(void 0,Bg(o=[t,r,n]).call(o,l))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==p?e.apply(void 0,Bg(f=[t,r,n]).call(f,l)):void 0};return l.apply(void 0,Bg(a=[e,t,r]).call(a,i))}var c;return r.call.apply(r,Bg(c=[e,e]).call(c,i))}(this,e,t);if(f)if(f.then)f.then((function(e){var r;!1!==e&&Ix.apply(void 0,Bg(r=[o,t,n.next]).call(r,jR(i)))})).catch((function(e){throw e}));else Ix.apply(void 0,Bg(c=[this,t,n.next]).call(c,hy(Array.prototype).call(arguments)));else if(void 0===f){var d;Ix.apply(void 0,Bg(d=[this,t,n.next]).call(d,hy(Array.prototype).call(arguments)))}}catch(v){var p,h;throw v.message=Bg(p=Bg(h="[pluginName: ".concat(this.pluginName,":")).call(h,e,"] >> ")).call(p,v.message),v}else Ix.apply(void 0,Bg(r=[this,t,n.next]).call(r,hy(Array.prototype).call(arguments)))}).call(r,this)}function Zx(e,t){var r=this.__hooks;if(!r||!ng(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function jx(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(ng(r[e])||(r[e]=[]),-1===Zx.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function Ax(e,t){var r=this.__hooks;if(r)if(ng(r[e])){var n=r[e],i=Zx.call(this,e,t);-1!==i&&Gk(n).call(n,i,1)}else r[e]&&(r[e]=null)}function Dx(e,t){var r;Tx.logError(Bg(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var Wx=function(){function e(t){PR(this,e),Ex.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&vR(t).call(t,(function(t){e.__hooks[t]=null})),Af(e,"hooks",{get:function(){var t;return e.__hooks&&vR(t=Zc(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return CR(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=Ex.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):ng(e)&&cf(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):Dx(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):ng(e)&&cf(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):Dx(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):ng(e)&&cf(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):Dx(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;cf(e=["__events","__onceEvents"]).call(e,(function(e){var r;cf(r=Zc(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,Bg(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=LR(LR({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return Cx.call.apply(Cx,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return jx.call.apply(jx,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return Ax.call.apply(Ax,Bg(r=[this]).call(r,hy(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),Ex.clearAllTimers(this),Ex.checkIsFunction(this.destroy)&&this.destroy(),vR(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Af(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Af(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),Vx=te,Mx=f;Vx.JSON||(Vx.JSON={stringify:JSON.stringify});var Gx=function(e,t,r){return Mx(Vx.JSON.stringify,null,arguments)},Fx=r(Gx),Nx=ee,Ux=b,Xx=dt("match"),Hx=function(e){var t;return Nx(e)&&(void 0!==(t=e[Xx])?!!t:"RegExp"==Ux(e))},Bx=TypeError,Kx=dt("match"),Yx=ni.includes;Lr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Yx(this,e,arguments.length>1?arguments[1]:void 0)}});var Jx=Wc("Array").includes,zx=Lr,Qx=function(e){if(Hx(e))throw Bx("The method doesn't accept regular expressions");return e},qx=Y,$x=Kn,eE=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kx]=!1,"/./"[e](t)}catch(n){}}return!1},tE=m("".indexOf);zx({target:"String",proto:!0,forced:!eE("includes")},{includes:function(e){return!!~tE($x(qx(this)),$x(Qx(e)),arguments.length>1?arguments[1]:void 0)}});var rE=Wc("String").includes,nE=se,iE=Jx,oE=rE,aE=Array.prototype,sE=String.prototype,uE=r((function(e){var t=e.includes;return e===aE||nE(aE,e)&&t===aE.includes?iE:"string"==typeof e||e===sE||nE(sE,e)&&t===sE.includes?oE:t})),lE={exports:{}},cE=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fE=o,dE=ee,pE=b,hE=cE,vE=Object.isExtensible,mE=fE((function(){vE(1)}))||hE?function(e){return!!dE(e)&&((!hE||"ArrayBuffer"!=pE(e))&&(!vE||vE(e)))}:vE,yE=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),gE=Lr,_E=m,bE=ii,wE=ee,SE=qe,kE=Qt.f,RE=Gi,TE=Ui,xE=mE,EE=yE,LE=!1,OE=nt("meta"),PE=0,IE=function(e){kE(e,OE,{value:{objectID:"O"+PE++,weakData:{}}})},CE=lE.exports={enable:function(){CE.enable=function(){},LE=!0;var e=RE.f,t=_E([].splice),r={};r[OE]=1,e(r).length&&(RE.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===OE){t(n,i,1);break}return n},gE({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:TE.f}))},fastKey:function(e,t){if(!wE(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!SE(e,OE)){if(!xE(e))return"F";if(!t)return"E";IE(e)}return e[OE].objectID},getWeakData:function(e,t){if(!SE(e,OE)){if(!xE(e))return!0;if(!t)return!1;IE(e)}return e[OE].weakData},onFreeze:function(e){return EE&&LE&&xE(e)&&!SE(e,OE)&&IE(e),e}};bE[OE]=!0;var ZE=lE.exports,jE=Lr,AE=i,DE=ZE,WE=o,VE=mr,ME=jd,GE=fp,FE=E,NE=ee,UE=Po,XE=Qt.f,HE=ea.forEach,BE=O,KE=Bo.set,YE=Bo.getterFor,JE=Mi,zE=oo,QE=B_,qE=zt,$E=fp,eL=H,tL=jd,rL=hl,nL=vl,iL=up,oL=O,aL=ZE.fastKey,sL=Bo.set,uL=Bo.getterFor,lL={getConstructor:function(e,t,r,n){var i=e((function(e,i){$E(e,o),sL(e,{type:t,index:JE(null),first:void 0,last:void 0,size:0}),oL||(e.size=0),eL(i)||tL(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=uL(t),s=function(e,t,r){var n,i,o=a(e),s=u(e,t);return s?s.value=r:(o.last=s={index:i=aL(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),oL?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var r,n=a(e),i=aL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return QE(o,{clear:function(){for(var e=a(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,oL?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),oL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=qE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),QE(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),oL&&zE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=uL(t),o=uL(n);rL(e,t,(function(e,t){sL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(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)?nL("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,nL(void 0,!0))}),r?"entries":"values",!r,!0),iL(t)}};(function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=AE[e],u=s&&s.prototype,l={};if(BE&&FE(s)&&(o||u.forEach&&!WE((function(){(new s).entries().next()})))){var c=(n=t((function(t,r){KE(GE(t,c),{type:e,collection:new s}),null!=r&&ME(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,f=YE(e);HE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||VE(c,e,(function(r,n){var i=f(this).collection;if(!t&&o&&!NE(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||XE(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else n=r.getConstructor(t,e,i,a),DE.enable();UE(n,e,!1,!0),l[e]=n,jE({global:!0,forced:!0},l),o||r.setStrong(n,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),lL);var cL=te.Map,fL=zt,dL=C,pL=Ie,hL=vp,vL=H,mL=jd,yL=[].push,gL=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return hL(this),(t=void 0!==a)&&pL(a),vL(e)?new this:(r=[],t?(n=0,i=fL(a,o>2?arguments[2]:void 0),mL(e,(function(e){dL(yL,r,i(e,n++))}))):mL(e,yL,{that:r}),new this(r))};Lr({target:"Map",stat:!0,forced:!0},{from:gL});var _L=Rs,bL=function(){return new this(_L(arguments))};Lr({target:"Map",stat:!0,forced:!0},{of:bL});var wL=Ee,SL=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(wL(e)+" is not a map")},kL=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},RL=ae("Map"),TL={Map:RL,set:kL("set",2),get:kL("get",1),has:kL("has",1),remove:kL("delete",1),proto:RL.prototype},xL=SL,EL=TL.remove;Lr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=xL(this),r=!0,n=0,i=arguments.length;n<i;n++)e=EL(t,arguments[n]),r=r&&e;return!!r}});var LL=SL,OL=TL.get,PL=TL.has,IL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=LL(this);return PL(i,e)?(r=OL(i,e),"update"in t&&(r=t.update(r,e,i),IL(i,e,r)),r):(n=t.insert(e,i),IL(i,e,n),n)}});var CL=C,ZL=function(e,t,r){for(var n,i,o=r||e.next;!(n=CL(o,e)).done;)if(void 0!==(i=t(n.value)))return i},jL=function(e,t,r){return r?ZL(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},AL=zt,DL=SL,WL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=DL(this),r=AL(e,arguments.length>1?arguments[1]:void 0);return!1!==WL(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var VL=zt,ML=SL,GL=jL,FL=TL.Map,NL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=ML(this),r=VL(e,arguments.length>1?arguments[1]:void 0),n=new FL;return GL(t,(function(e,i){r(e,i,t)&&NL(n,i,e)})),n}});var UL=zt,XL=SL,HL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=XL(this),r=UL(e,arguments.length>1?arguments[1]:void 0),n=HL(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var BL=zt,KL=SL,YL=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=KL(this),r=BL(e,arguments.length>1?arguments[1]:void 0),n=YL(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var JL=Lr,zL=C,QL=E,qL=Ie,$L=jd,eO=TL.Map,tO=m([].push);JL({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(QL(this)?this:eO);qL(t);var n=qL(r.has),i=qL(r.get),o=qL(r.set);return $L(e,(function(e){var a=t(e);zL(n,r,a)?tO(zL(i,r,a),e):zL(o,r,a,[e])})),r}});var rO=function(e,t){return e===t||e!=e&&t!=t},nO=SL,iO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iO(nO(this),(function(t){if(rO(t,e))return!0}),!0)}});var oO=C,aO=jd,sO=E,uO=Ie,lO=TL.Map;Lr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(sO(this)?this:lO);uO(t);var n=uO(r.set);return aO(e,(function(e){oO(n,r,t(e),e)})),r}});var cO=SL,fO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=fO(cO(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var dO=zt,pO=SL,hO=jL,vO=TL.Map,mO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=pO(this),r=dO(e,arguments.length>1?arguments[1]:void 0),n=new vO;return hO(t,(function(e,i){mO(n,r(e,i,t),e)})),n}});var yO=zt,gO=SL,_O=jL,bO=TL.Map,wO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=gO(this),r=yO(e,arguments.length>1?arguments[1]:void 0),n=new bO;return _O(t,(function(e,i){wO(n,i,r(e,i,t))})),n}});var SO=SL,kO=jd,RO=TL.set;Lr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=SO(this),r=arguments.length,n=0;n<r;)kO(arguments[n++],(function(e,r){RO(t,e,r)}),{AS_ENTRIES:!0});return t}});var TO=Ie,xO=SL,EO=jL,LO=TypeError;Lr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=xO(this),r=arguments.length<2,n=r?void 0:arguments[1];if(TO(e),EO(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw LO("Reduce of empty map with no initial value");return n}});var OO=zt,PO=SL,IO=jL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=PO(this),r=OO(e,arguments.length>1?arguments[1]:void 0);return!0===IO(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var CO=Ie,ZO=SL,jO=TypeError,AO=TL.get,DO=TL.has,WO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=ZO(this),n=arguments.length;CO(t);var i=DO(r,e);if(!i&&n<3)throw jO("Updating absent value");var o=i?AO(r,e):CO(n>2?arguments[2]:void 0)(e,r);return WO(r,e,t(o,e,r)),r}});var VO=C,MO=Ie,GO=E,FO=rr,NO=TypeError,UO=function(e,t){var r,n=FO(this),i=MO(n.get),o=MO(n.has),a=MO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!GO(t)&&!GO(s))throw NO("At least one callback required");return VO(o,n,e)?(r=VO(i,n,e),GO(t)&&(r=t(r),VO(a,n,e,r))):GO(s)&&(r=s(),VO(a,n,e,r)),r};Lr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:UO}),Lr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:UO});var XO=r(cL);function HO(e,t){var r=Zc(e);if(jc){var n=jc(e);t&&(n=Nc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function BO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?cf(r=HO(Object(i),!0)).call(r,(function(t){eP(e,t,i[t])})):wf?Lf(e,wf(i)):cf(n=HO(Object(i))).call(n,(function(t){Af(e,t,Qc(i,t))}))}return e}function KO(){KO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Af||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof d?t:d,a=Wf(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var f={};function d(){}function p(){}function h(){}var v={};u(v,o,(function(){return this}));var m=Ff&&Ff(Ff(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=h.prototype=d.prototype=Wf(v);function g(e){var t;cf(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Sc(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(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 R(e){this.tryEntries=[{tryLoc:"root"}],cf(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:x}}function x(){return{value:void 0,done:!0}}return p.prototype=h,n(y,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=u(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Nf?Nf(e,h):(e.__proto__=h,u(e,s,"GeneratorFunction")),e.prototype=Wf(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Gm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(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=T,R.prototype={constructor:R,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,cf(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+hy(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 a.type="throw",a.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 o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.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 o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),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 new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}function YO(e){return(YO="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function JO(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(PC){return void r(PC)}s.done?t(u):Gm.resolve(u).then(n,i)}function zO(e){return function(){var t=this,r=arguments;return new Gm((function(n,i){var o=e.apply(t,r);function a(e){JO(o,n,i,a,s,"next",e)}function s(e){JO(o,n,i,a,s,"throw",e)}a(void 0)}))}}function QO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(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),Af(e,pP(n.key),n)}}function $O(e,t,r){return t&&qO(e.prototype,t),r&&qO(e,r),Af(e,"prototype",{writable:!1}),e}function eP(e,t,r){return(t=pP(t))in e?Af(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Wf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Af(e,"prototype",{writable:!1}),t&&nP(e,t)}function rP(e){var t;return(rP=Nf?Iy(t=Ff).call(t):function(e){return e.__proto__||Ff(e)})(e)}function nP(e,t){var r;return(nP=Nf?Iy(r=Nf).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function iP(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}function oP(e,t,r){var n;iP()?oP=Iy(n=By).call(n):oP=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Iy(Function).apply(e,n));return r&&nP(i,r.prototype),i};return oP.apply(null,arguments)}function aP(e){var t="function"==typeof XO?new XO:void 0;return aP=function(e){if(null===e||(r=e,-1===rg(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return oP(e,arguments,rP(this).constructor)}return i.prototype=Wf(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),nP(i,e)},aP(e)}function sP(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Zc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(jc){var o=jc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function uP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lP(e){var t=iP();return function(){var r,n=rP(e);if(t){var i=rP(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return uP(e)}(this,r)}}function cP(){var e;"undefined"!=typeof Reflect&&xR?cP=Iy(e=xR).call(e):cP=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rP(e)););return e}(e,t);if(n){var i=Qc(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return cP.apply(this,arguments)}function fP(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dP(e,t){var r=void 0!==kc&&Pc(e)||e["@@iterator"];if(!r){if(ng(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return fP(e,t);var n=hy(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fP(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function pP(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var hP=Ie,vP=Je,mP=X,yP=Mr,gP=TypeError,_P=function(e){return function(t,r,n,i){hP(r);var o=vP(t),a=mP(o),s=yP(o),u=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw gP("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=r(i,a[u],u,o));return i}},bP={left:_P(!1),right:_P(!0)}.left;Lr({target:"Array",proto:!0,forced:!np&&ve>79&&ve<83||!$c("reduce")},{reduce:function(e){var t=arguments.length;return bP(this,e,t,t>1?arguments[1]:void 0)}});var wP,SP=Wc("Array").reduce,kP=se,RP=SP,TP=Array.prototype,xP=r((function(e){var t=e.reduce;return e===TP||kP(TP,e)&&t===TP.reduce?RP:t})),EP="network",LP="network_timeout",OP="network_forbidden",PP="network_notfound",IP="network_range_not_satisfiable",CP="demux",ZP="remux",jP="media",AP="drm",DP="other",WP="runtime",VP={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},MP=(eP(wP={},"manifest",{HLS:1100,DASH:1200}),eP(wP,EP,2100),eP(wP,LP,2101),eP(wP,OP,2103),eP(wP,PP,2104),eP(wP,IP,2116),eP(wP,CP,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),eP(wP,ZP,{FMP4:4100,MP4:4200}),eP(wP,jP,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),eP(wP,AP,{LICENSE:7100,CUSTOM_LICENSE:7200}),eP(wP,DP,8e3),eP(wP,WP,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),wP),GP=function(e){tP(r,e);var t=lP(r);function r(e,n,i,o,a){var s;return QO(this,r),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===LP?EP:e,s.originError=i,s.ext=o,s.errorCode=MP[e][n]||MP[e],s.errorMessage=s.message,s.errorCode||(s.errorType=DP,s.errorCode=MP[s.errorType]),s}return $O(r,null,[{key:"create",value:function(e,t,n,i,o){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=DP),new r(e,t,n,i,o))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?LP:EP,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(aP(Error)),FP=1,NP=2,UP=3,XP=4,HP=["Boolean","Number","String","Undefined","Null","Date","Object"],BP=function(){function e(t,r){QO(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 $O(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[FP]).call(t,o)),e.disabled||(n=console).debug.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[NP]).call(t,o)),e.disabled||(n=console).log.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[UP]).call(t,o)),e.disabled||(n=console).warn.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,Bg(t=[XP]).call(t,o)),e.disabled||(n=console).error.apply(n,Bg(r=[this._prefix,KP()]).call(r,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=vR(n).call(n,(function(e){return JP(e)}));t=this._prefix+KP()+Fx(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function KP(){return(new Date).toLocaleString()}function YP(e){var t;if("object"!==YO(e))return e;var r=hy(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function JP(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==YO(e))return e;var o=hy(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!uE(HP).call(HP,o))return o;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?i[a]=YP(e[a]):"object"===YO(e[a])?i[a]=JP(e[a],t,r+1):i[a]=e[a]);return i}}eP(BP,"disabled",!0);var zP="fetch",QP="xhr",qP="arraybuffer",$P="text",eI="json",tI=function(e){tP(r,e);var t=lP(r);function r(e,n,i,o){var a;return QO(this,r),eP(uP(a=t.call(this,o)),"retryCount",0),eP(uP(a),"isTimeout",!1),eP(uP(a),"loaderType",zP),eP(uP(a),"startTime",0),eP(uP(a),"endTime",0),eP(uP(a),"options",{}),a.url=e,a.request=n,a.response=i,a}return $O(r)}(aP(Error)),rI=Object.prototype.toString;function nI(e){if("[object Object]"!==rI.call(e))return!1;var t=Ff(e);return null===t||t===Object.prototype}function iI(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 oI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aI(e,t){var r,n;if(e){if(!t)return e;var i,o=Nc(r=vR(n=Zc(t)).call(n,(function(e){if(null!=(i=t[e]))return ng(i)?e+="[]":i=[i],vR(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===rI.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===YO(e)}(t)&&(t=Fx(t)),Bg(r="".concat(oI(e),"=")).call(r,oI(t))})).join("&")}))).call(r,Boolean).join("&");if(o){var a=rg(e).call(e,"#");-1!==a&&(e=hy(e).call(e,0,a)),e+=(-1===rg(e).call(e,"?")?"?":"&")+o}return e}}function sI(e,t,r,n,i,o,a,s,u,l,c){return i=null!=i?LT(i):null,n=lR(n||"0",10),Fk(n)&&(n=0),{data:e,done:t,options:{range:u,vid:l,index:s,contentLength:n,age:i,startTime:o,firstByteTime:a,endTime:_x(),priOptions:c},response:r}}function uI(e,t){return Math.round(8*e*1e3/t/1024)}var lI="error",cI="core.ttfb",fI="core.loadstart",dI="core.loadresponseheaders",pI="core.loadcomplete",hI="core.loadretry",vI="core.metadataparsed",mI="core.sei",yI="real_time_speed",gI=2097152,_I=function(e){tP(n,e);var t,r=lP(n);function n(){var e;return QO(this,n),eP(uP(e=r.call(this)),"_abortController",null),eP(uP(e),"_timeoutTimer",null),eP(uP(e),"_reader",null),eP(uP(e),"_response",null),eP(uP(e),"_aborted",!1),eP(uP(e),"_index",-1),eP(uP(e),"_range",null),eP(uP(e),"_receivedLength",0),eP(uP(e),"_running",!1),eP(uP(e),"_logger",null),eP(uP(e),"_vid",""),eP(uP(e),"_onProcessMinLen",0),eP(uP(e),"_onCancel",null),eP(uP(e),"_priOptions",null),e}return $O(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,u=e.index,l=e.onTimeout,c=e.onCancel,f=e.range,d=e.transformResponse,p=e.request,h=e.params,v=e.logger,m=e.method,y=e.headers,g=e.body,_=e.mode,b=e.credentials,w=e.cache,S=e.redirect,k=e.referrer,R=e.referrerPolicy,T=e.onProcessMinLen,x=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=u,this._range=f||[0,0],this._vid=i||n,this._priOptions=x||{};var E={method:m,headers:y,body:g,mode:_,credentials:b,cache:w,redirect:S,referrer:k,referrerPolicy:R,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},L=!1;clearTimeout(this._timeoutTimer),n=aI(n,h);var O=iI(f);O&&(y=p?p.headers:E.headers=E.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",O):y.Range=O),o&&(this._timeoutTimer=c_((function(){if(L=!0,r.cancel(),l){var e=new tI(n,E,null,"timeout");e.isTimeout=!0,l(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),o));var P=_x();return this._logger.debug("[fetch load start], index,",u,",range,",f),new Gm((function(e,t){fetch(p||n,p?void 0:E).then(function(){var i=zO(KO().mark((function i(o){var l,c,p,h;return KO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=o,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(d&&(o=d(o,n)||o),o.ok){i.next=7;break}throw new tI(n,E,o,"bad network response");case 7:if(l=_x(),a!==$P){i.next=15;break}return i.next=11,o.text();case 11:c=i.sent,r._running=!1,i.next=37;break;case 15:if(a!==eI){i.next=22;break}return i.next=18,o.json();case 18:c=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(o,s,P,l),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=i.sent,c=new Uint8Array(c),r._running=!1,p=_x()-P,h=uI(c.byteLength,p),r.emit(yI,{speed:h,len:c.byteLength,time:p,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",u,",range,",f),e(sI(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),P,l,u,f,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!L||((e=e instanceof tI?e:new tI(n,E,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=P,e.endTime=_x(),e.isTimeout=L,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().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(PC){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new tI(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(gI),this._writeIdx=0);var a,s,u,l=this._reader=e.body.getReader(),c=function(){var o=zO(KO().mark((function o(){var f,d,p,h,v,m,y,g;return KO().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=_x(),o.prev=1,o.next=4,l.read();case 4:a=o.sent,u=_x(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),u=_x(),i._aborted||(i._running=!1,o.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(o.t0)),o.abrupt("return");case 13:if(d=(null===(f=i._range)||void 0===f?void 0:f.length)>0?i._range[0]:0,p=d+i._receivedLength,!i._aborted){o.next=19;break}return i._running=!1,t(void 0,!1,{range:[p,p],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),o.abrupt("return");case 19:var _;if(h=a.value?a.value.byteLength:0,i._receivedLength+=h,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",p,", end,",d+i._receivedLength,", done,",a.done),i._onProcessMinLen>0){if(i._writeIdx+h>=i._onProcessMinLen||a.done)(v=new Uint8Array(i._writeIdx+h)).set(hy(_=i._cache).call(_,0,i._writeIdx),0),h>0&&v.set(a.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(h>0&&i._writeIdx+h<gI)i._cache.set(a.value,i._writeIdx),i._writeIdx+=h,i._logger.debug("【fetchLoader,onProgress cache】,len,",h,", writeIdx,",i._writeIdx);else if(h>0){var b;m=new Uint8Array(i._writeIdx+h+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+h+2048,", datalen,",h,", writeIdx,",i._writeIdx),m.set(hy(b=i._cache).call(b,0,i._writeIdx),0),h>0&&m.set(a.value,i._writeIdx),i._writeIdx+=h,delete i._cache,i._cache=m,i._logger.debug("【fetchLoader,onProgress extra end】,len,",h,", writeIdx,",i._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.done?(y=_x()-r,g=uI(i._receivedLength,y),i.emit(yI,{speed:g,len:i._receivedLength,time:y,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,",a.done),i.resolve(sI(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):c();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(VR);var bI=function(e){tP(r,e);var t=lP(r);function r(){var e;return QO(this,r),eP(uP(e=t.call(this)),"_xhr",null),eP(uP(e),"_aborted",!1),eP(uP(e),"_timeoutTimer",null),eP(uP(e),"_range",null),eP(uP(e),"_receivedLength",0),eP(uP(e),"_url",null),eP(uP(e),"_onProgress",null),eP(uP(e),"_index",-1),eP(uP(e),"_headers",null),eP(uP(e),"_currentChunkSizeKB",384),eP(uP(e),"_timeout",null),eP(uP(e),"_xhr",null),eP(uP(e),"_withCredentials",null),eP(uP(e),"_startTime",-1),eP(uP(e),"_loadCompleteResolve",null),eP(uP(e),"_loadCompleteReject",null),eP(uP(e),"_runing",!1),eP(uP(e),"_logger",!1),eP(uP(e),"_vid",""),eP(uP(e),"_responseType",void 0),eP(uP(e),"_credentials",void 0),eP(uP(e),"_method",void 0),eP(uP(e),"_transformResponse",void 0),eP(uP(e),"_firstRtt",void 0),eP(uP(e),"_onCancel",null),eP(uP(e),"_priOptions",null),e}return $O(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=aI(e.url,e.params);var r=_x();return new Gm((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 tI?e:new tI(t._url,t._request)).startTime=r,e.endTime=_x(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===qP&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=_x();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Iy(r=this._onLoad).call(r,this),i.onreadystatechange=Iy(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var o=new tI(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));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},i.ontimeout=function(e){t.cancel();var r=new tI(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 o,a=this._headers||{},s=iI(e);if(s&&(a.Range=s),a)cf(o=Zc(a)).call(o,(function(e){i.setRequestHeader(e,a[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(u){u.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(u)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=_x())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new tI(this._url,null,BO(BO({},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,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===qP){var u,l=new Uint8Array(e.target.response);if(i=s+this._receivedLength,l&&l.byteLength>0){this._receivedLength+=l.byteLength;var c=_x()-this._startTime,f=uI(this._receivedLength,c);this.emit(yI,{speed:f,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}o=l,a=!((null===(u=this._range)||void 0===u?void 0:u.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",l?l.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=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(o,a,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:_x(),priOptions:this._priOptions},d),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(sI(this._onProgress?null:o,a,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,cP(rP(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=dP(WT(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var o=r.value.split(": ");n[o[0].toLowerCase()]=hy(o).call(o,1).join(": ")}}catch(a){i.e(a)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(VR),wI=["retry","retryDelay","onRetryError","transformError"],SI=function(){function e(t,r){var n,i,o;QO(this,e),this.promise=((o=new Gm((function(e,t){n=e,i=t}))).used=!1,o.resolve=function(){return o.used=!0,n.apply(void 0,arguments)},o.reject=function(){return o.used=!0,i.apply(void 0,arguments)},o),this.alive=!!r.onProgress,!r.logger&&(r.logger=new BP("Loader")),this._loaderType=t,this._loader=t===zP&&"undefined"!=typeof fetch?new _I:new bI,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return $O(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,o=t.transformError,a=sP(t,wI),s=function(){var t=zO(KO().mark((function t(){var u,l,c;return KO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:u=t.sent,e.promise.resolve(u),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,l=t.t0,o&&(l=o(l)||l),i&&e._retryCount>0&&i(l,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,c=!0,e._retryCheckFunc&&(c=e._retryCheckFunc(t.t0)),!(c&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=c_(s,n),t.abrupt("return");case 26:e.promise.reject(l);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function kI(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Gm((function(t){return c_(t,e)}))}var RI,TI=function(e){tP(n,e);var t,r=lP(n);function n(e){var t;return QO(this,n),eP(uP(t=r.call(this,e)),"type",zP),eP(uP(t),"_queue",[]),eP(uP(t),"_alive",[]),eP(uP(t),"_currentTask",null),eP(uP(t),"_finnalUrl",""),eP(uP(t),"_config",void 0),t._config=function(e){return BO({loaderType:zP,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:$P,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==QP&&_I.isSupported()||(t.type=QP),t.log=e.logger,t}return $O(n,[{key:"isFetch",value:function(){return this.type===zP}},{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=yR({},this._config,r)).params&&(r.params=yR({},r.params)),r.headers&&nI(r.headers)&&(r.headers=yR({},r.headers)),r.body&&nI(r.body)&&(r.body=yR({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new SI(this.type,r);return n.loader.on(yI,(function(e){t.emit(yI,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){var t;return KO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=Bg(r=vR(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,vR(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Gm.all(t);case 6:return e.next=8,kI();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=Nc(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return _I.isSupported()}}]),n}(VR),xI="core.rtcstatechange",EI="core.rtcnetwork",LI={},OI={},PI={exports:{}},II=PI.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};cf(RI=Zc(II)).call(RI,(function(e){var t=II[e];cf(t).call(t,(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var CI=PI.exports;!function(e,t){var r=function(e){return String(Number(e))===e?Number(e):e},n=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},i=CI,o=Iy(t=RegExp.prototype.test).call(t,/^([a-z])=(.*)/);e.parse=function(e){var t,r,a={},s=[],u=a;return cf(t=Nc(r=e.split(/(\r\n|\r|\n)/)).call(r,o)).call(t,(function(e){var t=e[0],r=hy(e).call(e,2);"m"===t&&(s.push({rtp:[],fmtp:[]}),u=s[s.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var a=i[t][o];if(a.reg.test(r))return n(a,u,r)}})),a.media=s,a};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){var t;return xP(t=e.split(/;\s?/)).call(t,a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return vR(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var t,n=[],i=vR(t=e.split(" ")).call(t,r),o=0;o<i.length;o+=3)n.push({component:i[o],ip:i[o+1],port:i[o+2]});return n},e.parseImageAttributes=function(e){var t;return vR(t=e.split(" ")).call(t,(function(e){var t;return xP(t=e.substring(1,e.length-1).split(",")).call(t,a,{})}))},e.parseSimulcastStreamList=function(e){var t;return vR(t=e.split(";")).call(t,(function(e){var t;return vR(t=e.split(",")).call(t,(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}}(OI);var ZI=CI,jI=/%[sdv%]/g,AI=function(e){var t=1,r=arguments,n=r.length;return e.replace(jI,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},DI=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return AI.apply(null,n)},WI=["v","o","s","i","u","e","p","c","b","t","r","z","a"],VI=["i","c","b","a"],MI=OI,GI=function(e,t){var r,n;t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),cf(r=e.media).call(r,(function(e){null==e.payloads&&(e.payloads="")}));var i=t.outerOrder||WI,o=t.innerOrder||VI,a=[];return cf(i).call(i,(function(t){var r;cf(r=ZI[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(DI(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;cf(n=e[r.push]).call(n,(function(e){a.push(DI(t,r,e))}))}}))})),cf(n=e.media).call(n,(function(e){a.push(DI("m",ZI.m[0],e)),cf(o).call(o,(function(t){var r;cf(r=ZI[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(DI(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;cf(n=e[r.push]).call(n,(function(e){a.push(DI(t,r,e))}))}}))}))})),a.join("\r\n")+"\r\n"};LI.write=GI,LI.parse=MI.parse,LI.parseParams=MI.parseParams,LI.parseFmtpConfig=MI.parseFmtpConfig,LI.parsePayloads=MI.parsePayloads,LI.parseRemoteCandidates=MI.parseRemoteCandidates,LI.parseImageAttributes=MI.parseImageAttributes,LI.parseSimulcastStreamList=MI.parseSimulcastStreamList;var FI=["adaptiveJitterBuffer"];function NI(e){return new Gm((function(t){var r;null===(r=e.getStats(null))||void 0===r||r.then((function(e){var r,n,i;t((n=[],i=[],cf(r=e).call(r,(function(e){"inbound-rtp"===e.type&&n.push(e),"remote-outbound-rtp"===e.type&&i.push(e)})),vR(n).call(n,(function(e){var t,n=r.get(e.codecId),o=r.get(e.trackId);return{type:null!==(t=e.mediaType)&&void 0!==t?t:e.kind,inboundRtp:e,remoteOutBoundRtp:hk(i).call(i,(function(t){return t.mediaType===e.mediaType})),codec:n,track:o}}))))}))})).catch((function(){}))}function UI(e){var t,r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g,_,b,w,S,k,R,T,x,E,L,O,P,I,C,Z,j,A,D,W,V=null==e?void 0:Nc(e).call(e,(function(e){return"video"===e.type}))[0],M=null==e?void 0:Nc(e).call(e,(function(e){return"audio"===e.type}))[0];(V&&V.remoteOutBoundRtp&&(Z={bytesSent:V.remoteOutBoundRtp.bytesSent,packetsSent:V.remoteOutBoundRtp.packetsSent}),M&&M.remoteOutBoundRtp&&(j={bytesSent:M.remoteOutBoundRtp.bytesSent,packetsSent:M.remoteOutBoundRtp.packetsSent}),void 0!==(null==V||null===(t=V.inboundRtp)||void 0===t?void 0:t.jitterBufferDelay))&&(A=(null===(D=V.inboundRtp)||void 0===D?void 0:D.jitterBufferDelay)/(null===(W=V.inboundRtp)||void 0===W?void 0:W.jitterBufferEmittedCount)*1e3);return{video:V?{codec:null===(r=V.codec)||void 0===r?void 0:r.mimeType,payloadType:null===(n=V.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=V.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:(null===(o=V.inboundRtp)||void 0===o?void 0:o.bytesReceived)||0,firCount:null===(a=V.inboundRtp)||void 0===a?void 0:a.firCount,pliCount:null===(s=V.inboundRtp)||void 0===s?void 0:s.pliCount,frameHeight:null===(u=V.inboundRtp)||void 0===u?void 0:u.frameHeight,frameWidth:null===(l=V.inboundRtp)||void 0===l?void 0:l.frameWidth,framesDecoded:null===(c=V.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(f=V.inboundRtp)||void 0===f?void 0:f.framesDropped,framesPerSecond:null===(d=V.inboundRtp)||void 0===d?void 0:d.framesPerSecond,framesReceived:null!==(p=null===(h=V.inboundRtp)||void 0===h?void 0:h.framesReceived)&&void 0!==p?p:null===(v=V.track)||void 0===v?void 0:v.framesReceived,jitter:null===(m=V.inboundRtp)||void 0===m?void 0:m.jitter,jitterBufferDelay:null===(y=V.inboundRtp)||void 0===y?void 0:y.jitterBufferDelay,keyFramesDecoded:null===(g=V.inboundRtp)||void 0===g?void 0:g.keyFramesDecoded,nackCount:null===(_=V.inboundRtp)||void 0===_?void 0:_.nackCount,packetsLost:(null===(b=V.inboundRtp)||void 0===b?void 0:b.packetsLost)||0,packetsReceived:(null===(w=V.inboundRtp)||void 0===w?void 0:w.packetsReceived)||0,averageJitterBufferDelay:A}:void 0,audio:M?{codec:null===(S=M.codec)||void 0===S?void 0:S.mimeType,payloadType:null===(k=M.codec)||void 0===k?void 0:k.payloadType,sdpFmtpLine:null===(R=M.codec)||void 0===R?void 0:R.sdpFmtpLine,bytesReceived:(null===(T=M.inboundRtp)||void 0===T?void 0:T.bytesReceived)||0,audioLevel:null===(x=M.inboundRtp)||void 0===x?void 0:x.audioLevel,jitter:null===(E=M.inboundRtp)||void 0===E?void 0:E.jitter,jitterBufferDelay:null===(L=M.inboundRtp)||void 0===L?void 0:L.jitterBufferDelay,packetsLost:(null===(O=M.inboundRtp)||void 0===O?void 0:O.packetsLost)||0,packetsReceived:(null===(P=M.inboundRtp)||void 0===P?void 0:P.packetsReceived)||0,totalSamplesDuration:null===(I=M.inboundRtp)||void 0===I?void 0:I.totalSamplesDuration,totalSamplesReceived:null===(C=M.inboundRtp)||void 0===C?void 0:C.totalSamplesReceived}:void 0,videoRemote:Z,audioRemote:j}}var XI=function(){function e(t,r){var n=this;xg(this,e),Og(this,"_pc",null),Og(this,"_lastVideoStats",null),Og(this,"_lastRemoteVideoStats",null),Og(this,"_timer",0),Og(this,"_timerInterval",0),Og(this,"_speedQueue",[]),Og(this,"_lostRateQueue",[]),Og(this,"_receivedRateQueue",[]),Og(this,"_currentSpeed",-1),Og(this,"_currentLostRate",-1),Og(this,"_currentReceivedRate",-1),Og(this,"_evaluate",Tg(kg().mark((function e(){var t,r,i,o,a,s,u,l,c,f,d,p,h,v,m,y;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,NI(n._pc).then((function(e){return UI(e)}));case 3:t=e.sent,n._lastVideoStats&&null!=t&&t.video&&(r=t.video,i=r.bytesReceived,o=r.packetsLost,a=r.packetsReceived,s=n._lastVideoStats,u=s.bytesReceived,l=s.packetsLost,c=s.packetsReceived,u&&n._cacheSpeed(8e3*(i-u)/n._timerInterval),f=o-l,(d=a-c)&&f>=0&&n._cacheLostRate(f/(f+d)*1e3/n._timerInterval)),n._lastRemoteVideoStats&&null!=t&&t.videoRemote&&(p=t.video.bytesReceived,h=n._lastVideoStats.bytesReceived,v=null==t?void 0:t.videoRemote,m=v.bytesSent,(y=n._lastRemoteVideoStats.bytesSent)&&m&&m-y>0&&n._cacheReceivedRate((p-h)/(m-y))),n._lastVideoStats=null==t?void 0:t.video,n._lastRemoteVideoStats=null==t?void 0:t.videoRemote,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})))),this._pc=t,this._timerInterval=r,this.start(r)}return Lg(e,[{key:"start",value:function(e){clearInterval(this._timer),this._pc&&(this._timer=fT(this._evaluate,e))}},{key:"getStats",value:function(){return this._speedQueue.length?{speed:LT(this._currentSpeed.toFixed(2)),avgSpeed:LT(this._getAvgSpeed().toFixed(2)),lostRate:LT(this._currentLostRate.toFixed(2)),avgLostRate:LT(this._getAvgLostRate().toFixed(2)),receivedRate:LT(this._currentReceivedRate.toFixed(2)),avgReceivedRate:LT(this._getAvgReceivedRate().toFixed(2))}:{}}},{key:"destroy",value:function(){clearInterval(this._timer),this._pc=null,this._lastVideoStats=null}},{key:"_cacheSpeed",value:function(e){var t;(this._currentSpeed=e,this._speedQueue.length>5)&&(this._speedQueue=hy(t=this._speedQueue).call(t,5));this._speedQueue.push(e)}},{key:"_cacheLostRate",value:function(e){var t;(this._currentLostRate=e,this._lostRateQueue.length>5)&&(this._lostRateQueue=hy(t=this._lostRateQueue).call(t,5));this._lostRateQueue.push(e)}},{key:"_cacheReceivedRate",value:function(e){var t;(this._currentReceivedRate=e,this._receivedRateQueue.length>5)&&(this._receivedRateQueue=hy(t=this._receivedRateQueue).call(t,5));this._receivedRateQueue.push(e)}},{key:"_getAvgSpeed",value:function(){var e;return-1===this._currentSpeed?-1:xP(e=this._speedQueue).call(e,(function(e,t){return e+t}),0)/this._speedQueue.length}},{key:"_getAvgLostRate",value:function(){var e;return-1===this._currentLostRate?-1:xP(e=this._lostRateQueue).call(e,(function(e,t){return e+t}),0)/this._lostRateQueue.length}},{key:"_getAvgReceivedRate",value:function(){var e;return-1===this._currentReceivedRate?-1:xP(e=this._receivedRateQueue).call(e,(function(e,t){return e+t}),0)/this._receivedRateQueue.length}}]),e}();function HI(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var BI=function(){return"undefined"!=typeof window&&window.Worker},KI=function(){return"undefined"!=typeof MessageChannel},YI=function(){return"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams},JI={getNALUnits:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length-e.position<4)return[];var r=e.position;return 1===e.getInt32(r)||0===e.getInt16(r)&&1===e.getInt8(r+2)?JI.getAnnexbNals(e,t):JI.getAvccNals(e,t)},getAnnexbNals:function(e,t){for(var r=[],n=JI.getHeaderPositionAnnexB(e),i=n.pos,o=i;i<e.length-4;){var a,s,u=new Uint8Array(hy(a=e.buffer).call(a,i,i+n.headerLength));n.pos===e.position&&e.skip(n.headerLength),o=(n=JI.getHeaderPositionAnnexB(e)).pos;var l={header:u,body:new Uint8Array(hy(s=e.buffer).call(s,i+u.byteLength,o)),type:-1};t?JI.analyseH265Nal(l):JI.analyseNal(l),(l.type<=9||t&&l.type<=40)&&0!==l.type&&r.push(l),e.skip(o-e.position),i=o}return r},getAvccNals:function(e,t){for(var r=[];e.position<e.length-4;){var n=e.getInt32(e.position);if(!(e.length-e.position>=n))break;var i,o,a=new Uint8Array(hy(i=e.buffer).call(i,e.position,e.position+4));e.skip(4);var s=new Uint8Array(hy(o=e.buffer).call(o,e.position,e.position+n));e.skip(n);var u={header:a,body:s,type:-1};t?JI.analyseH265Nal(u):JI.analyseNal(u),u.type<=9&&0!==u.type&&r.push(u)}return r},analyseNal:function(e){var t=31&e.body[0];switch(e.type=t,t){case 1:e.ndr=!0;break;case 5:e.idr=!0;break;case 6:e.sei=!0;break;case 7:e.sps=!0;break;case 8:e.pps=!0}},analyseH265Nal:function(e){var t=(126&e.body[0])>>1;switch(e.type=t,t){case 39:case 40:e.sei=!0}},getHeaderPositionAnnexB:function(e){for(var t=e.position,r=0,n=e.length;3!==r&&4!==r&&t<n-4;)0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:1===e.getInt8(t+2)?r=3:t++:t++;return t===n-4&&(0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:t=n:(t++,0===e.getInt16(t)&&1===e.getInt8(t)?r=3:t=n)),{pos:t,headerLength:r}},isH265VideoFrame:function(e){var t,r,n;return uE(t=((null===(r=e.getMetadata)||void 0===r||null===(n=r.call(e))||void 0===n?void 0:n.mimeType)||"").toLowerCase()).call(t,"h265")}},zI=function(){function e(t){xg(this,e),Og(this,"_position",0),this._dataview=new DataView(t)}return Lg(e,[{key:"length",get:function(){return this.buffer.byteLength}},{key:"buffer",get:function(){return this._dataview.buffer}},{key:"position",get:function(){return this._position},set:function(e){this._position=e}},{key:"back",value:function(e){this.position-=e}},{key:"getUint8",value:function(e){return this._dataview.getUint8(e)}},{key:"getInt8",value:function(e){return this._dataview.getInt8(e)}},{key:"getInt16",value:function(e){return this._dataview.getInt16(e)}},{key:"getUint16",value:function(e){return this._dataview.getUint16(e)}},{key:"getUint32",value:function(e){return this._dataview.getUint32(e)}},{key:"getInt32",value:function(e){return this._dataview.getInt32(e)}},{key:"skip",value:function(t){for(var r=Math.floor(t/4),n=t%4,i=0;i<r;i++)e.readByte(this,4);n>0&&e.readByte(this,n)}},{key:"readUint8",value:function(){return e.readByte(this,1)}},{key:"readUint16",value:function(){return e.readByte(this,2)}},{key:"readUint24",value:function(){return e.readByte(this,3)}},{key:"readUint32",value:function(){return e.readByte(this,4)}},{key:"readUint64",value:function(){return e.readByte(this,8)}},{key:"readInt8",value:function(){return e.readByte(this,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}],[{key:"readByte",value:function(e,t,r){var n;switch(t){case 1:n=r?e.getInt8(e.position):e.getUint8(e.position);break;case 2:n=r?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(r)throw new Error("not supported for readByte 3");n=e.getUint8(e.position)<<16,n|=e.getUint8(e.position+1)<<8,n|=e.getUint8(e.position+2);break;case 4:n=r?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(r)throw new Error("not supported for readBody 8");n=e.getUint32(e.position)<<32,n|=e.getUint32(e.position+4);break;default:n=""}return e.position+=t,n}}]),e}();function QI(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),Af(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===Sc(o)?o:String(o)),n)}var i,o}function qI(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)}var $I=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=2+ ++i)>=n)return[];for(var a=[];o<n;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<n-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do{o++}while(1!==e[o]&&o<n);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<n&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],o=0;o+t<n;)if(r=qI(e,o),3===t&&(r>>>=8),o+=t,r){if(o+r>n)break;i.push(e.subarray(o,o+r)),o+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,o=0,a="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)o+=255,n++;if(o+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)a+=e[n].toString(16),n++;return{payload:e.subarray(n,n+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}}],(r=null)&&QI(t.prototype,r),n&&QI(t,n),Af(t,"prototype",{writable:!1}),e}();function eC(e){return new TransformStream({transform:function(t,r){var n=JI.isH265VideoFrame(t),i=JI.getNALUnits(new zI(t.data),n);cf(i).call(i,(function(t){if(t.sei){var r=$I.parseSEI($I.removeEPB(t.body),!1);r&&e({data:r,sei:{code:r.type,content:r.payload}})}})),r.enqueue(t)}})}"undefined"!=typeof self&&"DedicatedWorkerGlobalScope"===self.constructor.name&&self.addEventListener("rtctransform",(function(e){var t=e.transformer,r=t.options.port,n=eC((function(e){r.postMessage(e)}));t.readable.pipeThrough(n).pipeTo(e.transformer.writable)}));var tC="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPXtnZXROQUxVbml0czpmdW5jdGlvbih0KXt2YXIgbj1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXSYmYXJndW1lbnRzWzFdO2lmKHQubGVuZ3RoLXQucG9zaXRpb248NClyZXR1cm5bXTt2YXIgcj10LnBvc2l0aW9uO3JldHVybiAxPT09dC5nZXRJbnQzMihyKXx8MD09PXQuZ2V0SW50MTYocikmJjE9PT10LmdldEludDgocisyKT9lLmdldEFubmV4Yk5hbHModCxuKTplLmdldEF2Y2NOYWxzKHQsbil9LGdldEFubmV4Yk5hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W10saT1lLmdldEhlYWRlclBvc2l0aW9uQW5uZXhCKHQpLGE9aS5wb3Msbz1hO2E8dC5sZW5ndGgtNDspe3ZhciB1PW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKGEsYStpLmhlYWRlckxlbmd0aCkpO2kucG9zPT09dC5wb3NpdGlvbiYmdC5za2lwKGkuaGVhZGVyTGVuZ3RoKSxvPShpPWUuZ2V0SGVhZGVyUG9zaXRpb25Bbm5leEIodCkpLnBvczt2YXIgcz17aGVhZGVyOnUsYm9keTpuZXcgVWludDhBcnJheSh0LmJ1ZmZlci5zbGljZShhK3UuYnl0ZUxlbmd0aCxvKSksdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHMpOmUuYW5hbHlzZU5hbChzKSwocy50eXBlPD05fHxuJiZzLnR5cGU8PTQwKSYmMCE9PXMudHlwZSYmci5wdXNoKHMpLHQuc2tpcChvLXQucG9zaXRpb24pLGE9b31yZXR1cm4gcn0sZ2V0QXZjY05hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W107dC5wb3NpdGlvbjx0Lmxlbmd0aC00Oyl7dmFyIGk9dC5nZXRJbnQzMih0LnBvc2l0aW9uKTtpZighKHQubGVuZ3RoLXQucG9zaXRpb24+PWkpKWJyZWFrO3ZhciBhPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbis0KSk7dC5za2lwKDQpO3ZhciBvPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbitpKSk7dC5za2lwKGkpO3ZhciB1PXtoZWFkZXI6YSxib2R5Om8sdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHUpOmUuYW5hbHlzZU5hbCh1KSx1LnR5cGU8PTkmJjAhPT11LnR5cGUmJnIucHVzaCh1KX1yZXR1cm4gcn0sYW5hbHlzZU5hbDpmdW5jdGlvbihlKXt2YXIgdD0zMSZlLmJvZHlbMF07c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMTplLm5kcj0hMDticmVhaztjYXNlIDU6ZS5pZHI9ITA7YnJlYWs7Y2FzZSA2OmUuc2VpPSEwO2JyZWFrO2Nhc2UgNzplLnNwcz0hMDticmVhaztjYXNlIDg6ZS5wcHM9ITB9fSxhbmFseXNlSDI2NU5hbDpmdW5jdGlvbihlKXt2YXIgdD0oMTI2JmUuYm9keVswXSk+PjE7c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMzk6Y2FzZSA0MDplLnNlaT0hMH19LGdldEhlYWRlclBvc2l0aW9uQW5uZXhCOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLnBvc2l0aW9uLG49MCxyPWUubGVuZ3RoOzMhPT1uJiY0IT09biYmdDxyLTQ7KTA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OjE9PT1lLmdldEludDgodCsyKT9uPTM6dCsrOnQrKztyZXR1cm4gdD09PXItNCYmKDA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OnQ9cjoodCsrLDA9PT1lLmdldEludDE2KHQpJiYxPT09ZS5nZXRJbnQ4KHQpP249Mzp0PXIpKSx7cG9zOnQsaGVhZGVyTGVuZ3RoOm59fSxpc0gyNjVWaWRlb0ZyYW1lOmZ1bmN0aW9uKGUpe3ZhciB0LG47cmV0dXJuKChudWxsPT09KHQ9ZS5nZXRNZXRhZGF0YSl8fHZvaWQgMD09PXR8fG51bGw9PT0obj10LmNhbGwoZSkpfHx2b2lkIDA9PT1uP3ZvaWQgMDpuLm1pbWVUeXBlKXx8IiIpLnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMoImgyNjUiKX19O2Z1bmN0aW9uIHQoZSl7cmV0dXJuKHQ9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9KShlKX1mdW5jdGlvbiBuKGUsdCl7Zm9yKHZhciBuPTA7bjx0Lmxlbmd0aDtuKyspe3ZhciBpPXRbbl07aS5lbnVtZXJhYmxlPWkuZW51bWVyYWJsZXx8ITEsaS5jb25maWd1cmFibGU9ITAsInZhbHVlImluIGkmJihpLndyaXRhYmxlPSEwKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSxyKGkua2V5KSxpKX19ZnVuY3Rpb24gcihlKXt2YXIgdD1mdW5jdGlvbihlLHQpe2lmKCJvYmplY3QiIT10eXBlb2YgZXx8bnVsbD09PWUpcmV0dXJuIGU7dmFyIG49ZVtTeW1ib2wudG9QcmltaXRpdmVdO2lmKHZvaWQgMCE9PW4pe3ZhciByPW4uY2FsbChlLHR8fCJkZWZhdWx0Iik7aWYoIm9iamVjdCIhPXR5cGVvZiByKXJldHVybiByO3Rocm93IG5ldyBUeXBlRXJyb3IoIkBAdG9QcmltaXRpdmUgbXVzdCByZXR1cm4gYSBwcmltaXRpdmUgdmFsdWUuIil9cmV0dXJuKCJzdHJpbmciPT09dD9TdHJpbmc6TnVtYmVyKShlKX0oZSwic3RyaW5nIik7cmV0dXJuInN5bWJvbCI9PXR5cGVvZiB0P3Q6U3RyaW5nKHQpfXZhciBpPWZ1bmN0aW9uKCl7ZnVuY3Rpb24gZSh0KXt2YXIgbixpLGE7IWZ1bmN0aW9uKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9KHRoaXMsZSksbj10aGlzLGE9MCwoaT1yKGk9Il9wb3NpdGlvbiIpKWluIG4/T2JqZWN0LmRlZmluZVByb3BlcnR5KG4saSx7dmFsdWU6YSxlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMH0pOm5baV09YSx0aGlzLl9kYXRhdmlldz1uZXcgRGF0YVZpZXcodCl9dmFyIHQsaSxhO3JldHVybiB0PWUsYT1be2tleToicmVhZEJ5dGUiLHZhbHVlOmZ1bmN0aW9uKGUsdCxuKXt2YXIgcjtzd2l0Y2godCl7Y2FzZSAxOnI9bj9lLmdldEludDgoZS5wb3NpdGlvbik6ZS5nZXRVaW50OChlLnBvc2l0aW9uKTticmVhaztjYXNlIDI6cj1uP2UuZ2V0SW50MTYoZS5wb3NpdGlvbik6ZS5nZXRVaW50MTYoZS5wb3NpdGlvbik7YnJlYWs7Y2FzZSAzOmlmKG4pdGhyb3cgbmV3IEVycm9yKCJub3Qgc3VwcG9ydGVkIGZvciByZWFkQnl0ZSAzIik7cj1lLmdldFVpbnQ4KGUucG9zaXRpb24pPDwxNixyfD1lLmdldFVpbnQ4KGUucG9zaXRpb24rMSk8PDgscnw9ZS5nZXRVaW50OChlLnBvc2l0aW9uKzIpO2JyZWFrO2Nhc2UgNDpyPW4/ZS5nZXRJbnQzMihlLnBvc2l0aW9uKTplLmdldFVpbnQzMihlLnBvc2l0aW9uKTticmVhaztjYXNlIDg6aWYobil0aHJvdyBuZXcgRXJyb3IoIm5vdCBzdXBwb3J0ZWQgZm9yIHJlYWRCb2R5IDgiKTtyPWUuZ2V0VWludDMyKGUucG9zaXRpb24pPDwzMixyfD1lLmdldFVpbnQzMihlLnBvc2l0aW9uKzQpO2JyZWFrO2RlZmF1bHQ6cj0iIn1yZXR1cm4gZS5wb3NpdGlvbis9dCxyfX1dLChpPVt7a2V5OiJsZW5ndGgiLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmJ1ZmZlci5ieXRlTGVuZ3RofX0se2tleToiYnVmZmVyIixnZXQ6ZnVuY3Rpb24oKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuYnVmZmVyfX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLl9wb3NpdGlvbn0sc2V0OmZ1bmN0aW9uKGUpe3RoaXMuX3Bvc2l0aW9uPWV9fSx7a2V5OiJiYWNrIix2YWx1ZTpmdW5jdGlvbihlKXt0aGlzLnBvc2l0aW9uLT1lfX0se2tleToiZ2V0VWludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRVaW50OChlKX19LHtrZXk6ImdldEludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQ4KGUpfX0se2tleToiZ2V0SW50MTYiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQxNihlKX19LHtrZXk6ImdldFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQxNihlKX19LHtrZXk6ImdldFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQzMihlKX19LHtrZXk6ImdldEludDMyIix2YWx1ZTpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuZ2V0SW50MzIoZSl9fSx7a2V5OiJza2lwIix2YWx1ZTpmdW5jdGlvbih0KXtmb3IodmFyIG49TWF0aC5mbG9vcih0LzQpLHI9dCU0LGk9MDtpPG47aSsrKWUucmVhZEJ5dGUodGhpcyw0KTtyPjAmJmUucmVhZEJ5dGUodGhpcyxyKX19LHtrZXk6InJlYWRVaW50OCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDEpfX0se2tleToicmVhZFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIpfX0se2tleToicmVhZFVpbnQyNCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDMpfX0se2tleToicmVhZFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDQpfX0se2tleToicmVhZFVpbnQ2NCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDgpfX0se2tleToicmVhZEludDgiLHZhbHVlOmZ1bmN0aW9uKCl7cmV0dXJuIGUucmVhZEJ5dGUodGhpcywxLCEwKX19LHtrZXk6InJlYWRJbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIsITApfX0se2tleToicmVhZEludDMyIix2YWx1ZTpmdW5jdGlvbigpe3JldHVybiBlLnJlYWRCeXRlKHRoaXMsNCwhMCl9fSx7a2V5OiJ3cml0ZVVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KFtlPj4+MjQmMjU1LGU+Pj4xNiYyNTUsZT4+PjgmMjU1LDI1NSZlXSl9fV0pJiZuKHQucHJvdG90eXBlLGkpLGEmJm4odCxhKSxPYmplY3QuZGVmaW5lUHJvcGVydHkodCwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfSgpO2Z1bmN0aW9uIGEoZSxuKXtmb3IodmFyIHI9MDtyPG4ubGVuZ3RoO3IrKyl7dmFyIGk9bltyXTtpLmVudW1lcmFibGU9aS5lbnVtZXJhYmxlfHwhMSxpLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gaSYmKGkud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLChhPWkua2V5LG89dm9pZCAwLG89ZnVuY3Rpb24oZSxuKXtpZigib2JqZWN0IiE9PXQoZSl8fG51bGw9PT1lKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgaT1yLmNhbGwoZSxufHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT09dChpKSlyZXR1cm4gaTt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PW4/U3RyaW5nOk51bWJlcikoZSl9KGEsInN0cmluZyIpLCJzeW1ib2wiPT09dChvKT9vOlN0cmluZyhvKSksaSl9dmFyIGEsb31mdW5jdGlvbiBvKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTowO3JldHVybihlW3RdPDwyND4+PjApKyhlW3QrMV08PDE2KSsoZVt0KzJdPDw4KSsoZVt0KzNdfHwwKX12YXIgdT1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXshZnVuY3Rpb24oZSx0KXtpZighKGUgaW5zdGFuY2VvZiB0KSl0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24iKX0odGhpcyxlKX12YXIgdCxuLHI7cmV0dXJuIHQ9ZSxyPVt7a2V5OiJwYXJzZUFubmV4QiIsdmFsdWU6ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5ieXRlTGVuZ3RoLTEsbj0wO2Rve2lmKDAhPT1lW3RdKWJyZWFrO24rKyx0LS19d2hpbGUodD4wKTtuPj0zJiYoZT1lLnN1YmFycmF5KDAsdCsxKSk7Zm9yKHZhciByPWUubGVuZ3RoLGk9MixhPTA7bnVsbCE9PWVbaV0mJnZvaWQgMCE9PWVbaV0mJjEhPT1lW2ldOylpKys7aWYoKGE9MisgKytpKT49cilyZXR1cm5bXTtmb3IodmFyIG89W107YTxyOylzd2l0Y2goZVthXSl7Y2FzZSAwOmlmKDAhPT1lW2EtMV0pe2ErPTI7YnJlYWt9aWYoMCE9PWVbYS0yXSl7YSsrO2JyZWFrfWlmKGE8ci0xJiYxIT09ZVthKzFdKXthKys7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKTtkb3thKyt9d2hpbGUoMSE9PWVbYV0mJmE8cik7YT0oaT1hKzEpKzI7YnJlYWs7Y2FzZSAxOmlmKDAhPT1lW2EtMV18fDAhPT1lW2EtMl0pe2ErPTM7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKSxhPShpPWErMSkrMjticmVhaztkZWZhdWx0OmErPTN9cmV0dXJuIGk8ciYmby5wdXNoKGUuc3ViYXJyYXkoaSkpLG99fSx7a2V5OiJwYXJzZUF2Y0MiLHZhbHVlOmZ1bmN0aW9uKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTo0O2lmKCEoZS5sZW5ndGg8NCkpe2Zvcih2YXIgbixyPWUubGVuZ3RoLGk9W10sYT0wO2ErdDxyOylpZihuPW8oZSxhKSwzPT09dCYmKG4+Pj49OCksYSs9dCxuKXtpZihhK24+cilicmVhaztpLnB1c2goZS5zdWJhcnJheShhLGErbikpLGErPW59cmV0dXJuIGl9fX0se2tleToicGFyc2VTRUkiLHZhbHVlOmZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBuPWUubGVuZ3RoLHI9dD8yOjEsaT0wLGE9MCxvPSIiOzI1NT09PWVbcl07KWkrPTI1NSxyKys7Zm9yKGkrPWVbcisrXTsyNTU9PT1lW3JdOylhKz0yNTUscisrO2lmKGErPWVbcisrXSw1PT09aSYmbj5yKzE2KWZvcih2YXIgdT0wO3U8MTY7dSsrKW8rPWVbcl0udG9TdHJpbmcoMTYpLHIrKztyZXR1cm57cGF5bG9hZDplLnN1YmFycmF5KHIscithKSx0eXBlOmksc2l6ZTphLHV1aWQ6b319fSx7a2V5OiJyZW1vdmVFUEIiLHZhbHVlOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLmJ5dGVMZW5ndGgsbj1bXSxyPTE7cjx0LTI7KTA9PT1lW3JdJiYwPT09ZVtyKzFdJiYzPT09ZVtyKzJdPyhuLnB1c2gocisyKSxyKz0yKTpyKys7aWYoIW4ubGVuZ3RoKXJldHVybiBlO3ZhciBpPXQtbi5sZW5ndGgsYT1uZXcgVWludDhBcnJheShpKSxvPTA7Zm9yKHI9MDtyPGk7bysrLHIrKylvPT09blswXSYmKG8rKyxuLnNoaWZ0KCkpLGFbcl09ZVtvXTtyZXR1cm4gYX19XSwobj1udWxsKSYmYSh0LnByb3RvdHlwZSxuKSxyJiZhKHQsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KHQsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX0oKTsidW5kZWZpbmVkIiE9dHlwZW9mIHNlbGYmJiJEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSI9PT1zZWxmLmNvbnN0cnVjdG9yLm5hbWUmJnNlbGYuYWRkRXZlbnRMaXN0ZW5lcigicnRjdHJhbnNmb3JtIiwoZnVuY3Rpb24odCl7dmFyIG4scj10LnRyYW5zZm9ybWVyLGE9ci5vcHRpb25zLnBvcnQsbz0obj1mdW5jdGlvbihlKXthLnBvc3RNZXNzYWdlKGUpfSxuZXcgVHJhbnNmb3JtU3RyZWFtKHt0cmFuc2Zvcm06ZnVuY3Rpb24odCxyKXt2YXIgYT1lLmlzSDI2NVZpZGVvRnJhbWUodCk7ZS5nZXROQUxVbml0cyhuZXcgaSh0LmRhdGEpLGEpLmZvckVhY2goKGZ1bmN0aW9uKGUpe2lmKGUuc2VpKXt2YXIgdD11LnBhcnNlU0VJKHUucmVtb3ZlRVBCKGUuYm9keSksITEpO3QmJm4oe2RhdGE6dCxzZWk6e2NvZGU6dC50eXBlLGNvbnRlbnQ6dC5wYXlsb2FkfX0pfX0pKSxyLmVucXVldWUodCl9fSkpO3IucmVhZGFibGUucGlwZVRocm91Z2gobykucGlwZVRvKHQudHJhbnNmb3JtZXIud3JpdGFibGUpfSkpfSgpOwo=",rC="undefined"!=typeof window&&window.Blob&&new Blob([atob(tC)],{type:"text/javascript;charset=utf-8"});function nC(){var e=rC&&(ok||window.webkitURL).createObjectURL(rC);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+tC,{type:"module"})}finally{e&&(ok||window.webkitURL).revokeObjectURL(e)}}var iC=function(){function e(){xg(this,e),Og(this,"_audioStallTimer",null),Og(this,"_preSample",null),Og(this,"_isStallInPreReportEnd",!1),Og(this,"_stallList",[]),Og(this,"_audioTransceiver",null)}var t,r;return Lg(e,[{key:"start",value:function(t){this.stop(),this._audioTransceiver=t,e.interval>=100&&this._startStallCountInterval()}},{key:"stop",value:function(){this._stallList=[],this._audioStallTimer&&(clearTimeout(this._audioStallTimer),this._audioStallTimer=null)}},{key:"destroy",value:function(){this.stop(),this._audioTransceiver=null}},{key:"getAudioStallInfo",value:(r=Tg(kg().mark((function e(){var t,r;return kg().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return t={stats_count:Nc(n=this._stallList).call(n,(function(e){return e.get_stats_cost})).length,stall_list:Wg(this._stallList)},e.prev=1,e.next=4,this._audioStallCount();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:return r=oC(this._stallList,2,this._isStallInPreReportEnd),this._isStallInPreReportEnd=r.isStallInEnd,this.stop(),this._startStallCountInterval(),e.abrupt("return",{stallCount:r.stall_count,stallDuration:r.stall_duration,list:r.list,extra:t});case 13:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return r.apply(this,arguments)})},{key:"_startStallCountInterval",value:function(){var t=this,r=function(){var n=Tg(kg().mark((function n(){return kg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(t._audioStallTimer),t._audioStallTimer=null,n.next=4,t._audioStallCount();case 4:t._audioStallTimer||(t._audioStallTimer=c_(r,e.interval));case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();this._audioStallTimer=c_(r,e.interval)}},{key:"_audioStallCount",value:(t=Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._preSample&&_x()-this._preSample.ts<.5*e.interval)){t.next=2;break}return t.abrupt("return");case 2:return r=_x(),o=0,t.prev=4,t.next=7,null===(a=this._audioTransceiver)||void 0===a?void 0:a.receiver.getStats();case 7:null==(s=t.sent)||cf(s).call(s,(function(e){"inbound-rtp"===e.type&&(n=e),o++})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),i=t.t0.message||Fx(t.t0);case 14:if(this._preSample){t.next=17;break}return this._preSample={ts:_x(),concealedSamples:(null===(u=n)||void 0===u?void 0:u.concealedSamples)||0,totalSamplesReceived:(null===(l=n)||void 0===l?void 0:l.totalSamplesReceived)||0},t.abrupt("return");case 17:c=_x(),f=_x(),d=f-this._preSample.ts,n?(h=(p=n).concealedSamples,v=p.totalSamplesReceived,m=h-this._preSample.concealedSamples,y=v-this._preSample.totalSamplesReceived,g=m>=0&&y>=0&&m>=e.ratio*y,this._stallList.push({concealed:m,received:y,diff:d,start:this._preSample.ts,end:f,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,is_stall:g}),this._preSample.concealedSamples=h,this._preSample.totalSamplesReceived=v,this._preSample.ts=f):this._stallList.push({diff:d,start:this._preSample.ts,end:f,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,reason:o?i||"no inbound-rtp":"no report"});case 21:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return t.apply(this,arguments)})}]),e}();Og(iC,"interval",100),Og(iC,"ratio",.6);var oC=function(e,t,r){for(var n,i={stall_count:0,stall_duration:0,isStallInEnd:!1,list:[]},o=0,a=0,s=function(r){var n=e[r];n.is_stall&&(o++,a+=n.diff||0);var s=r===e.length-1;if(!n.is_stall||s){var l=o>=t,c=r+t-o-1;if(!l&&o>2){var f,d=0;cf(f=hy(e).call(e,r+1,c+1)).call(f,(function(e){e.is_stall&&(d+=e.diff||0)})),(l=a+d>iC.interval*t*iC.ratio)&&(r=c,a+=d)}l&&(i.stall_count++,i.stall_duration+=a,i.list.push(a)),s&&(i.isStallInEnd=l),o=a=0}u=r},u=0;u<e.length;u++)s(u);return!0===(null===(n=e[0])||void 0===n?void 0:n.is_stall)&&r&&i.stall_count>0&&i.stall_count--,i};function aC(){var e=navigator.userAgent;return null!==e.match("Safari")&&null===e.match("Chrome")}function sC(){return null!==navigator.userAgent.match("Firefox")}var uC=function(){function e(){var t=this;xg(this,e),Og(this,"_handleVisibilityChange",(function(){"hidden"===document.visibilityState&&t._framePause()})),Og(this,"_framePause",(function(){if(t._prePts){var e=performance.now(),r=e-t._prePts;t._stallList.push({playTime:e,timeUpdateInterval:Math.round(r)}),t._prePts=void 0}})),this._removeHandler=void 0,this._remotePlayPauseHandler=void 0,this._prePts=void 0,this._stallList=void 0,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,this._isPaused=void 0,this._pauseStart=0,this._pauseDuration=0,this._requestVideoFrameCallbackTimer=void 0,this._player=void 0,this._stallTimeThreshold={stall500ms:aC()||sC()?550:500,stall100ms:100},this._support100msStall="undefined"!=typeof window&&"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback}return Lg(e,[{key:"start",value:function(e){var t=this;if(this._player=e,this._support100msStall){var r;if(e)this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Iy(r=this._onVideoRefresh).call(r,this)),this._removeHandler=function(){t._requestVideoFrameCallbackTimer&&e.cancelVideoFrameCallback(t._requestVideoFrameCallbackTimer)}}else{var n=function(){return t._onVideoTimeupdate(e)};e.addEventListener("timeupdate",n),this._removeHandler=function(){return e.removeEventListener("timeupdate",n)}}var i=function(){return t._onVideoPause()};e.addEventListener("pause",i);var o=function(){return t._onVideoPlay()};e.addEventListener("play",o),this._remotePlayPauseHandler=function(){e.removeEventListener("pause",i),e.removeEventListener("play",o)},document.addEventListener("visibilitychange",this._handleVisibilityChange),document.addEventListener("pagehide",this._framePause())}},{key:"stop",value:function(){delete this._player,this._removeHandler&&this._removeHandler(),delete this._removeHandler,this._remotePlayPauseHandler&&this._remotePlayPauseHandler(),delete this._remotePlayPauseHandler,delete this._stallList,delete this._prePts,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,document.removeEventListener("visibilitychange",this._handleVisibilityChange),document.removeEventListener("pagehide",this._framePause())}},{key:"destroy",value:function(){this.stop()}},{key:"getStallInfo",value:function(e){var t=this,r=e.interval,n=e.frameRateReceived,i=e.frameRateDecoded,o=e.bitrate,a={pts:0,stall:{stallCount500ms:0,stallDuration500ms:0,stallRate500ms:0,stallCount100ms:0,stallDuration100ms:0,stallRate100ms:0},pauseDuration:this._getPauseDuration()};if(this._stallList&&"visible"===document.visibilityState&&!this._isPaused){var s;if((aC()||sC())&&(0===o||(i||1/0)<=1||(n||1/0)<=1)||0===this._stallList.length)a.stall.stallDuration500ms=r,a.stall.stallCount500ms=this._videoInWaiting500ms?0:1,a.stall.stallRate500ms=1,this._videoInWaiting500ms=!0,this._support100msStall&&(a.stall.stallDuration100ms=r,a.stall.stallCount100ms=this._videoInWaiting100ms?0:1,a.stall.stallRate100ms=1,this._videoInWaiting100ms=!0);else cf(s=this._stallList).call(s,(function(e,n){var i=e.timeUpdateInterval,o=e.playTime,s=i;0===n&&(t._videoInWaiting100ms||t._videoInWaiting500ms)&&(s=Math.round(i%r)),i>t._stallTimeThreshold.stall500ms?(a.stall.stallDuration500ms+=s,t._videoInWaiting500ms||a.stall.stallCount500ms++,t._videoInWaiting500ms=!0):t._videoInWaiting500ms=!1,t._support100msStall&&(i>t._stallTimeThreshold.stall100ms?(a.stall.stallDuration100ms+=s,t._videoInWaiting100ms||a.stall.stallCount100ms++,t._videoInWaiting100ms=!0):t._videoInWaiting100ms=!1),a.pts=o}));var u=a.stall,l=u.stallDuration500ms,c=u.stallDuration100ms;a.stall.stallRate500ms=Math.min(Number((l/r).toFixed(4)),1),this._support100msStall?a.stall.stallRate100ms=Math.min(Number((c/r).toFixed(4)),1):(delete a.stall.stallRate100ms,delete a.stall.stallCount100ms,delete a.stall.stallDuration100ms),this._stallList=[]}return a}},{key:"_getPauseDuration",value:function(){var e=this._pauseDuration;if(this._pauseDuration=0,this._isPaused){var t=_x(),r=t-(this._pauseStart||0);r>500&&(this._pauseStart=t,e+=r)}return e}},{key:"_onVideoPause",value:function(){this._isPaused=!0,this._pauseStart=_x(),this._framePause()}},{key:"_onVideoPlay",value:function(){this._isPaused=!1;var e=_x()-this._pauseStart;e>500&&(this._pauseDuration+=e)}},{key:"_onVideoTimeupdate",value:function(e){if(e&&0!==e.currentTime)if(void 0!==this._prePts){if(this._stallList||(this._stallList=[]),e.currentTime>this._prePts){var t=e.currentTime-this._prePts;this._stallList.push({playTime:e.currentTime,timeUpdateInterval:Math.round(1e3*t)})}this._prePts=e.currentTime}else this._prePts=e.currentTime}},{key:"_onVideoRefresh",value:function(e,t){if(this._stallList||(this._stallList=[]),this._prePts){var r=t.presentationTime-this._prePts;this._stallList.push({playTime:t.presentationTime,timeUpdateInterval:Math.round(r)})}var n;(this._prePts=t.presentationTime,this._player)&&this._player.requestVideoFrameCallback(Iy(n=this._onVideoRefresh).call(n,this))}}]),e}();function lC(e){return cC.apply(this,arguments)}function cC(){return(cC=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||cf(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,void 0!==e.jitterBufferDelay&&(r.jitterBufferDelay=e.jitterBufferDelay,r.jitterBufferEmittedCount=e.jitterBufferEmittedCount),void 0!==e.totalSamplesReceived&&(r.totalSamplesReceived=e.totalSamplesReceived,r.concealedSamples=e.concealedSamples,r.silentConcealedSamples=e.silentConcealedSamples,r.concealmentEvents=e.concealmentEvents),void 0!==e.fecPacketsReceived&&(r.fecPacketsReceived=e.fecPacketsReceived),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp),void 0!==e.totalSamplesDuration&&(r.totalSamplesDuration=e.totalSamplesDuration)):"codec"===e.type?(r.recordSampleRate=e.clockRate,e.channels&&(r.numChannels=e.channels),r.codecType=e.mimeType):"candidate-pair"===e.type?(r.rtt=1e3*e.currentRoundTripTime,r.total_rtt=1e3*e.totalRoundTripTime):"track"===e.type&&void 0!==e.audioLevel||e.type})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fC(e,t){var r=vC(e,t,"timestamp"),n=vC(e,t,"packetsLost"),i=Math.round(vC(e,t,"jitterBufferDelay")/vC(e,t,"jitterBufferEmittedCount")*1e3),o=vC(e,t,"packetsReceived");return{audioLossRate:+(n/(o+n)).toFixed(2),receivedKBitrate:+(8*vC(e,t,"bytesReceived")/r).toFixed(2),statsInterval:r,rtt:t.rtt||0,jitterBufferDelay:i,packetsReceived:o,numChannels:t.numChannels||1,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,samplesDuration:Math.round(1e3*vC(e,t,"totalSamplesDuration")),receivedSampleRate:vC(e,t,"totalSamplesReceived")/r,concealedSamples:Math.round(vC(e,t,"concealedSamples")),concealmentEvent:Math.round(vC(e,t,"concealmentEvents")),e2eDelay:Math.round(t.rtt+i)}}function dC(e){return pC.apply(this,arguments)}function pC(){return(pC=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||cf(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,r.framesDecoded=e.framesDecoded,r.totalDecodeTime=e.totalDecodeTime,r.framesReceived=e.framesReceived,r.keyFramesDecoded=e.keyFramesDecoded,r.framesDropped=e.framesDropped,r.firCount=e.firCount,r.nackCount=e.nackCount,r.pliCount=e.pliCount,void 0!==e.jitterBufferDelay&&(r.jitterBufferEmittedCount=e.jitterBufferEmittedCount,r.jitterBufferDelay=e.jitterBufferDelay),void 0!==e.frameWidth&&(r.width=e.frameWidth,r.height=e.frameHeight),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp)):"track"===e.type&&void 0!==e.frameWidth?(r.width=e.frameWidth,r.height=e.frameHeight,void 0!==e.framesReceived&&(r.framesReceived=e.framesReceived)):"codec"===e.type?r.codecType=e.mimeType:"candidate-pair"===e.type&&(r.rtt=1e3*e.currentRoundTripTime,r.totalRtt=1e3*e.totalRoundTripTime)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hC(e,t){var r=vC(e,t,"timestamp"),n=vC(e,t,"packetsLost"),i=vC(e,t,"nackCount"),o=vC(e,t,"packetsReceived"),a=Math.round(vC(e,t,"jitterBufferDelay")/vC(e,t,"jitterBufferEmittedCount")*1e3);return{statsInterval:r,width:t.width||0,height:t.height||0,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,videoLossRate:+n/(vC(e,t,"packetsReceived")+n),receivedKBitrate:+(8*vC(e,t,"bytesReceived")/r).toFixed(2),decoderOutputFrameRate:Math.round(1e3*vC(e,t,"framesDecoded")/r),receivedFrameRate:Math.round(1e3*vC(e,t,"framesReceived")/r),rtt:t.rtt||0,totalRtt:Math.round(t.totalRtt||0),jitterBufferDelay:a,codecType:t.codecType,packetsReceived:o,avgDecodeDelay:Math.round(1e3*vC(e,t,"totalDecodeTime")/vC(e,t,"framesDecoded")),keyFramesDecoded:vC(e,t,"keyFramesDecoded"),framesDropped:vC(e,t,"framesDropped"),firCount:vC(e,t,"firCount"),nackCount:i,pliCount:vC(e,t,"pliCount"),e2eDelay:Math.round(t.rtt+a),retransmittedRate:+(i/(o+n)).toFixed(2)}}function vC(e,t,r){var n=Fk(e[r])?0:+e[r],i=Fk(t[r])?0:+t[r];return Math.max(0,i-n)}var mC=1,yC=2,gC=3,_C=1,bC=2,wC=3,SC=4,kC=5,RC=6,TC=function(){function e(t,r){xg(this,e),Og(this,"_preDownlinkStats",[]),this._peer=t,this._networkQualityParams=r}return Lg(e,[{key:"getDownlinkQuality",value:function(e,t){if(0!==e.receivedKBitrate||0!==t.receivedKBitrate){if("connected"!==this._peer.connectionState&&"connecting"!==this._peer.connectionState||!navigator.onLine)return[RC,{}];var r,n,i,o=this._getQosLevel(e.rtt,e.audioLossRate,t.retransmittedRate),a=this._getDownlinkQoE("audio",e.stallDuration/e.statsInterval,e.e2eDelay),s=this._getNetworkQuality(o,a),u=this._getQosLevel(t.rtt,t.videoLossRate,t.retransmittedRate),l=this._getDownlinkQoE("video",t.stallDuration/t.statsInterval,t.e2eDelay),c=this._getNetworkQuality(u,l),f=s&&c?Math.ceil((s+c)/2):s||c,d=o&&u?Math.ceil((o+u)/2):o||u;if(f)return this._preDownlinkStats=hy(r=Bg(n=[]).call(n,Wg(this._preDownlinkStats),[f])).call(r,-2),[Math.floor(xP(i=this._preDownlinkStats).call(i,(function(e,t){return t+e}),0)/this._preDownlinkStats.length),{qualityQos:d,audioLevel:s,videoLevel:c,audioQos:o,audioQoe:a,videoQos:u,videoQoe:l}]}}},{key:"destroy",value:function(){this._preDownlinkStats=[]}},{key:"_getQosLevel",value:function(e,t,r){var n,i=this._networkQualityParams.networkQos;return n=(!e||e<=i[_C].maxRtt)&&t<=i[_C].maxLoss?_C:(!e||e<=i[bC].maxRtt)&&t<=i[bC].maxLoss?bC:(!e||e<=i[wC].maxRtt)&&t<=i[wC].maxLoss?wC:(!e||e<=i[SC].maxRtt)&&t<=i[SC].maxLoss?SC:kC,r>i[SC].minRetransmittedRate?n=Math.max(n,SC):r>i[wC].minRetransmittedRate?n=Math.max(n,wC):r>i[bC].minRetransmittedRate&&(n=Math.max(n,bC)),n}},{key:"_getDownlinkQoE",value:function(e,t,r){var n=this._networkQualityParams.networkQoe,i={audio:{delay:n.audioDelay,stallRadio:n.audioStallRadio},video:{delay:n.videoDelay,stallRadio:n.videoStallRadio}}[e];return t>i.stallRadio||r>i.delay||t>i.stallRadio/2&&r>i.delay/2?gC:(t>i.stallRadio/2||i.delay,yC)}},{key:"_getNetworkQuality",value:function(e,t){return t===mC?Math.max(e-2,1):t===yC?e:Math.min(e+1,5)}}]),e}();var xC=new BP("rts"),EC=function(e){Pg(o,e);var t,r,n,i=Ag(o);function o(e){var t;return xg(this,o),Og(jg(t=i.call(this)),"_url",""),Og(jg(t),"_pc",null),Og(jg(t),"_audioTransceicer",null),Og(jg(t),"_videoTransceicer",null),Og(jg(t),"_mediaStream",null),Og(jg(t),"_lastMediaStream",null),Og(jg(t),"_media",null),Og(jg(t),"_player",null),Og(jg(t),"_opts",null),Og(jg(t),"_loader",null),Og(jg(t),"_networkEvaluate",null),Og(jg(t),"_retry",0),Og(jg(t),"_waitingTimer",0),Og(jg(t),"_rctConnectStartTs",0),Og(jg(t),"_isReplacing",!1),Og(jg(t),"_checkStatsErrorTimer",null),Og(jg(t),"_audioStallObserver",null),Og(jg(t),"_videoStallObserver",null),Og(jg(t),"_networkQuality",null),Og(jg(t),"_preAudioStats",null),Og(jg(t),"_preVideoStats",null),Og(jg(t),"_rtcReportTimer",0),Og(jg(t),"_networkQualityResult",[]),Og(jg(t),"_peerStateTimer",null),Og(jg(t),"_checkStatsError",Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t._checkStatsErrorTimer&&clearTimeout(t._checkStatsErrorTimer),t._checkStatsErrorTimer=c_(Tg(kg().mark((function e(){var r,n,i;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getStatsSnapshoot();case 2:(r=e.sent).video&&(n=r.video,i=n.framesDecoded,n.bytesReceived?i||t._emitError(GP.create(jP,VP.MEDIA_ERR_DECODE,{message:"rts decode error"})):t._emitError(GP.create(jP,VP.MEDIA_ERR_DECODE,{message:"rts receive empty"})));case 4:case"end":return e.stop()}}),e)}))),t._opts.checkStatsErrorDelay);case 2:case"end":return e.stop()}}),e)})))),Og(jg(t),"_onTrack",(function(e){xC.log("addTrack: ",e.track,e.streams),t["_".concat(e.track.kind)]=e.track})),Og(jg(t),"_mockWaitingByTimeupdate",(function(){var e,r;"connected"!==(null===(e=t._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(r=t._pc)||void 0===r?void 0:r.iceConnectionState)||(clearTimeout(t._waitingTimer),t._waitingTimer=c_((function(){var e;null!==(e=t._player)&&void 0!==e&&e.paused||t.emit("waiting")}),t._opts.stallInterval))})),Og(jg(t),"_onLoadedData",(function(){xC.log("loadeddata emit"),t.getStatsSnapshoot().then((function(e){t.emit(vI,{type:"video",elapsed:_x()-t._rctConnectStartTs,meta:e.video}),t.emit(vI,{type:"audio",elapsed:_x()-t._rctConnectStartTs,meta:e.audio})}))})),Og(jg(t),"_setDelay",(function(e){if(t._opts.progressiveSetDelay)t._startSetDelayLoop(e);else{var r,n,i=hk(r=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(r,(function(e){var r,n;return e in(null===(r=t._audioTransceicer)||void 0===r?void 0:r.receiver)&&e in(null===(n=t._videoTransceicer)||void 0===n?void 0:n.receiver)}));if(!i)return;if(e="number"==typeof e&&e>0?e:null,(null===(n=t._audioTransceicer)||void 0===n?void 0:n.receiver[i])===e)return;t._audioTransceicer.receiver[i]=e,t._videoTransceicer.receiver[i]=e}})),Og(jg(t),"_targetDelayHint",null),Og(jg(t),"_setDelayTimer",null),Og(jg(t),"_setDelayError",null),Og(jg(t),"_startSetDelayLoop",function(){var e=Tg(kg().mark((function e(r){var n,i,o,a,s,u,l,c,f;return kg().wrap((function(e){for(var d;;)switch(e.prev=e.next){case 0:if(n=hk(d=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(d,(function(e){var r,n;return e in(null===(r=t._audioTransceicer)||void 0===r?void 0:r.receiver)&&e in(null===(n=t._videoTransceicer)||void 0===n?void 0:n.receiver)}))){e.next=3;break}return e.abrupt("return");case 3:if(r="number"==typeof r&&r>0?r:null,t._targetDelayHint!==r){e.next=6;break}return e.abrupt("return");case 6:if(t._targetDelayHint=r,!t._setDelayTimer){e.next=9;break}return e.abrupt("return");case 9:i=null,o=null,a=t._opts.adaptiveJitterBuffer,s=a.loopInterval,u=a.maxAvSyncDelay,l=a.maxJitterBufferDiff,c=a.maxStep,f=0,t._setDelayTimer=fT(Tg(kg().mark((function e(){var r,a,s,d,p,h,v,m,y,g,_,b,w,S,k,R;return kg().wrap((function(e){for(var T,x,E,L,O;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==(r=t._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(a=t._videoTransceicer)&&void 0!==a&&a.receiver){e.next=5;break}return i=null,o=null,e.abrupt("return");case 5:if((s=t._audioTransceicer.receiver[n])!==t._targetDelayHint){e.next=8;break}return e.abrupt("return");case 8:return d=1e3*t._targetDelayHint,p=1e3*s,e.next=12,Gm.all([lC(t._audioTransceicer.receiver.getStats()),dC(t._videoTransceicer.receiver.getStats())]);case 12:if(h=e.sent,v=Dg(h,2),m=v[0],y=v[1],!i||!o){e.next=36;break}if(g=fC(i,m),(_=hC(o,y)).estimatedPlayoutTimestamp&&g.estimatedPlayoutTimestamp&&(b=_.estimatedPlayoutTimestamp-g.estimatedPlayoutTimestamp),w=g.jitterBufferDelay,S=_.jitterBufferDelay,!w||!S){e.next=36;break}if(!(Math.abs(w-S)>u||b&&Math.abs(b)>u)){e.next=27;break}return f++>8&&S>w&&(t._audioTransceicer.receiver[n]=Math.min(S/1e3,t._targetDelayHint),f=0),xC.log(Bg(T=Bg(x=Bg(E="av_jb_diff(".concat(w-S,"=")).call(E,w,"-")).call(x,S,") or av_sync_diff(")).call(T,b,") too much, skip setting")),e.abrupt("return");case 27:if(f=0,null===s||!(Math.abs(w-p)>l||Math.abs(S-p)>l)){e.next=31;break}return xC.log(Bg(L="audio(".concat(w-p,"),video(")).call(L,S-p,"). current_target_diff too much, skip setting")),e.abrupt("return");case 31:k=d>(p||w)?1:-1,R=(R=(Math.abs(d-(p||w))>c?(p||w)+k*c:d)/1e3)>.2?R:null,xC.log(Bg(O="set receiver.".concat(n," = ")).call(O,R)),t._audioTransceicer.receiver[n]=R;case 36:i=m,o=y,e.next=44;break;case 40:e.prev=40,e.t0=e.catch(0),xC.error("set delay loop error:",e.t0),t._setDelayError=e.t0.message||e.t0.toString()||"unknown error";case 44:case"end":return e.stop()}}),e,null,[[0,40]])}))),s);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),Og(jg(t),"_getDelay",(function(){try{var e,r=hk(e=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(e,(function(e){return e in t._videoTransceicer.receiver&&e in t._audioTransceicer.receiver}));return t._audioTransceicer.receiver[r]}catch(PC){xC.error("get delay error")}})),Og(jg(t),"_onLoaderRetry",(function(e,r){t.emit(hI,{error:GP.network(e),retryTime:r})})),t._opts=function(e){var t=e||{},r=t.adaptiveJitterBuffer,n=void 0===r?{}:r,i=Zg(t,FI);return Sg({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,networkEvaluateInterval:1e3,delayHint:0,videoDelaySync:!1,seamlesslyReload:!1,enableSei:!1,enableOriginSdpLogger:!1,checkStatsErrorDelay:5e3,connectionStateChangeTimeout:5e3,enableNetworkQuality:!1,hackCreateOfferIssue:!1,progressiveSetDelay:!1,networkQuality:{networkQos:{1:{maxRtt:250,maxLoss:.15},2:{maxRtt:500,maxLoss:.3,minRetransmittedRate:.2},3:{maxRtt:750,maxLoss:.45,minRetransmittedRate:.35},4:{maxRtt:1e3,maxLoss:.6,minRetransmittedRate:.5}},networkQoe:{audioDelay:2e3,audioStallRadio:.3,videoDelay:2e3,videoStallRadio:.6}},enableAdaptiveJitterBuffer:!1,adaptiveJitterBuffer:Sg({networkWindow:3,windowMethod:"max",loopInterval:500,maxAvSyncDelay:400,maxJitterBufferDiff:500,maxStep:500},n),networkStrategy:{1:{jitterBuffer:null},2:{jitterBuffer:1.5},3:{jitterBuffer:2},4:{jitterBuffer:3},5:{jitterBuffer:3}}},i)}(e),t._media=t._opts.media,t._player=t._opts.player,t._loader=new TI(Sg(Sg({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:t._opts.retryCount,retryDelay:t._opts.retryDelay,timeout:t._opts.loadTimeout,onRetryError:t._onLoaderRetry,logger:xC})),t._retry=t._opts.retryCount,t._bindMediaEvent(),t._changeVolumeInHarmonyWorkaround(),t._opts.mediaStream&&t._opts.seamlesslyReload&&(t._lastMediaStream=t._opts.mediaStream),t}return Lg(o,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"loader",get:function(){return this._loader}},{key:"networkStats",get:function(){var e;return null===(e=this._networkEvaluate)||void 0===e?void 0:e.getStats()}},{key:"getStats",value:function(){return NI(this._pc)}},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return UI(e)}))}},{key:"load",value:(n=Tg(kg().mark((function e(t){var r,n,i=this;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._disconnect(),this._url=t,this._retry=this._opts.retryCount,!this._opts.hackCreateOfferIssue){e.next=6;break}return e.next=6,this._createEmptyPeer();case 6:return r=YI(),e.prev=7,(n=this._pc)&&n.close(),this._pc=new RTCPeerConnection({encodedInsertableStreams:!(!r||!this._opts.enableSei)||void 0}),this._bindRTCEvents(),e.next=14,this._connect(t);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(7),c_((function(){return i._emitError(GP.create(DP,null,e.t0))}));case 19:case"end":return e.stop()}}),e,this,[[7,16]])}))),function(e){return n.apply(this,arguments)})},{key:"switchURL",value:function(e){this.load(e||this._url)}},{key:"_bindRTCEvents",value:function(){var e=this,t=this._pc;t.addEventListener("track",this._onTrack),t.addEventListener("connectionstatechange",(function(){if(xC.warn("onconnectionstatechange:",t.connectionState),e._clearPeerStateTimeout(),e.emit(xI,{state:t.connectionState,url:e._url}),"disconnected"!==t.connectionState&&"failed"!==t.connectionState||(e.emit("waiting"),e._stopRtcReport()),"failed"===t.connectionState){if(0===e._retry)return void e._emitError(GP.network(new Error("rtc connect failed")));e._retry--,e.load(e._url)}"connected"===t.connectionState&&(e._handleMediaStream(),e.emit(cI,{url:e._url,responseUrl:e._url,elapsed:_x()-e._rctConnectStartTs}),e._checkStatsError(),e._startRtcReport())}))}},{key:"_handleMediaStream",value:function(){var e=this;if(this._lastMediaStream){var t,r=this._lastMediaStream.getVideoTracks()[0],n=this._lastMediaStream.getAudioTracks()[0];r&&this._lastMediaStream.removeTrack(r),n&&this._lastMediaStream.removeTrack(n),this._mediaStream=this._lastMediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._isReplacing=!0,this._player.pause(),null===(t=this._player.play())||void 0===t||t.finally((function(){e._isReplacing=!1}))}else{this._mediaStream=new MediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._media.srcObject=this._mediaStream;var i=this._player.play();i&&i.catch&&i.catch((function(e){}))}}},{key:"initVideoEncodedTransform",value:function(){var e=this;if(this._videoTransceicer&&this._videoTransceicer.receiver){var t=this._videoTransceicer.receiver;if(YI()){var r=t.createEncodedStreams(),n=r.readable,i=r.writable;n.pipeThrough(eC((function(t){e.emit(mI,t)}))).pipeTo(i)}else if("undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&"undefined"!=typeof RTCRtpScriptTransform&&"transform"in RTCRtpSender.prototype&&"transform"in RTCRtpReceiver.prototype&&BI()&&KI()){var o=new nC,a=new MessageChannel;this._videoTransceicer.receiver.transform=new RTCRtpScriptTransform(o,{port:a.port2},[a.port2]),a.port1.onmessage=function(t){e.emit(mI,t.data)}}}else console.log("no receiver found when trying to bind encodedTransform")}},{key:"initAudioEncodedTransform",value:function(){if(this._audioTransceicer&&this._audioTransceicer.receiver)if(YI()){var e=this._audioTransceicer.receiver.createEncodedStreams(),t=e.readable,r=e.writable;t.pipeThrough(new TransformStream({transform:function(e,t){e.data.byteLength<=1e3?t.enqueue(e):xC.log("too large audio frame",e.data.byteLength)}})).pipeTo(r)}else xC.warn("legacy EncodedTransform is not supported");else xC.warn("no receiver found when trying to bind encodedTransform")}},{key:"_bindMediaEvent",value:function(){this._media.addEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media.addEventListener("loadeddata",this._onLoadedData)}},{key:"_connect",value:(r=Tg(kg().mark((function e(){var t,r,n,i,o,a,s,u,l,c,f,d,p,h,v,m;return kg().wrap((function(e){for(var y,g,_,b;;)switch(e.prev=e.next){case 0:if(!(t=this._pc).addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),this._setDelay(this._opts.delayHint),this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=8,t.createOffer();case 8:r=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:r=e.sent;case 14:return this._opts.hackCreateOfferIssue&&this._createEmptyPeer(),xC.log("local offer"),xC.log(r.sdp),n=LI.parse(r.sdp),cf(y=Nc(g=n.media).call(g,(function(e){return"audio"===e.type}))).call(y,(function(e){var t,r,n,i,o=null===(n=Nc(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;o&&(cf(r=e.fmtp).call(r,(function(e){e.payload===o&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:o,type:"nack"}))})),r.sdp=LI.write(n),xC.log("local offer modified:\n",r.sdp),e.next=23,t.setLocalDescription(r);case 23:return i=this._url,e.prev=24,this._opts.preProcessUrl&&(i=this._opts.preProcessUrl(i).url),this._loader.finnalUrl=i,c=/_?session_id=([^&$]+)/.exec(i),f=c?c[1]:_x()+"666",this.emit(fI,{url:i,offersdp:null!==(o=this._opts)&&void 0!==o&&o.enableOriginSdpLogger?r.sdp:void 0,sessionId:f}),d=_x(),e.next=33,this._loader.load(i,{body:Fx({sessionId:f,version:"1.0-html",localSdp:r})});case 33:if(p=e.sent,this.emit(dI,{headers:p.response.headers}),404!==(null==(h=null==p?void 0:p.data)?void 0:h.code)&&403!==(null==h?void 0:h.code)){e.next=41;break}return(v=GP.create(404===h.code?PP:OP,null,h)).errorType=EP,this._emitError(v),e.abrupt("return");case 41:if(200===(null==h?void 0:h.code)){e.next=43;break}throw new Error(Bg(_="code: ".concat(null==h?void 0:h.code,", message:")).call(_,null==h?void 0:h.message));case 43:if(xC.log("answer:"),xC.log(null===(a=h.remoteSdp)||void 0===a?void 0:a.sdp),m=LI.parse(h.remoteSdp.sdp),this.emit(pI,{url:i,elapsed:_x()-d,answersdp:null!==(s=this._opts)&&void 0!==s&&s.enableOriginSdpLogger?null==h||null===(u=h.remoteSdp)||void 0===u?void 0:u.sdp:void 0,parsedSdp:null==m||null===(l=m.media)||void 0===l?void 0:vR(l).call(l,(function(e){return{candidates:e.candidates,rtp:e.rtp,type:e.type}}))}),cf(b=m.media).call(b,(function(e){var t,r;e.fingerprint.hash=e.fingerprint.hash.toUpperCase();var n=null===(t=e.ssrcs)||void 0===t||null===(r=hk(t).call(t,(function(e){return"msid"===e.attribute})))||void 0===r?void 0:r.value;n&&!e.msid&&(e.msid=n)})),h.remoteSdp.sdp=LI.write(m),xC.log("answer modified:\n",h.remoteSdp.sdp),this._rctConnectStartTs=_x(),"closed"!==t.signalingState){e.next=53;break}return e.abrupt("return");case 53:return e.next=55,t.setRemoteDescription(h.remoteSdp);case 55:this._networkEvaluate=new XI(t,this._opts.networkEvaluateInterval),this._listenPeerStateTimeout(),e.next=62;break;case 59:e.prev=59,e.t0=e.catch(24),this._emitError(GP.network(e.t0));case 62:case"end":return e.stop()}}),e,this,[[24,59]])}))),function(){return r.apply(this,arguments)})},{key:"_listenPeerStateTimeout",value:function(){var e=this;this._peerStateTimer&&this._clearPeerStateTimeout(),this._opts.connectionStateChangeTimeout&&(this._peerStateTimer=c_((function(){e._emitError(GP.create(jP,VP.MEDIA_ERR_SRC_NOT_SUPPORTED,{message:"listen connectionstatechange timeout"}))}),this._opts.connectionStateChangeTimeout))}},{key:"_clearPeerStateTimeout",value:function(){clearTimeout(this._peerStateTimer),this._peerStateTimer=null}},{key:"_startRtcReport",value:function(){var e=this;this._stopRtcReport(),this._rtcReportTimer=fT(Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,f,d,p,h,v,m,y,g,_,b;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=e._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(n=e._videoTransceicer)&&void 0!==n&&n.receiver){t.next=4;break}return e._preAudioStats=null,e._preVideoStats=null,t.abrupt("return");case 4:return!e._audioStallObserver&&e._audioTransceicer&&(e._audioStallObserver=new iC,e._audioStallObserver.start(e._audioTransceicer)),!e._videoStallObserver&&e._video&&(e._videoStallObserver=new uC,e._videoStallObserver.start(e._media)),!e._networkQuality&&e._opts.enableNetworkQuality&&(e._networkQuality=new TC(e._pc,e._opts.networkQuality)),t.next=9,Gm.all([lC(e._audioTransceicer.receiver.getStats()),dC(e._videoTransceicer.receiver.getStats())]);case 9:if(i=t.sent,o=Dg(i,2),a=o[0],s=o[1],!e._preAudioStats||!e._preVideoStats){t.next=26;break}return d=fC(e._preAudioStats,a),p=hC(e._preVideoStats,s),t.next=18,null===(u=e._audioStallObserver)||void 0===u?void 0:u.getAudioStallInfo();case 18:return h=t.sent,t.next=21,null===(l=e._videoStallObserver)||void 0===l?void 0:l.getStallInfo({interval:p.statsInterval,frameRateReceived:p.frameRateReceived,frameRateDecoded:p.frameRateDecoded,bitrate:p.receivedKBitrate});case 21:v=t.sent,m=null!==(c=null===(f=e._networkQuality)||void 0===f?void 0:f.getDownlinkQuality(Sg(Sg({},d),{},{stallDuration:h.stallDuration}),Sg(Sg({},p),{},{stallDuration:v.stall.stallDuration100ms||v.stall.stallDuration500ms})))&&void 0!==c?c:[],y=Dg(m,2),g=y[0],_=y[1],e._opts.enableAdaptiveJitterBuffer&&e._handleJitterBuffer(null==_?void 0:_.qualityQos,e._opts.adaptiveJitterBuffer,e._opts.networkStrategy),p.estimatedPlayoutTimestamp&&d.estimatedPlayoutTimestamp&&(b=p.estimatedPlayoutTimestamp-d.estimatedPlayoutTimestamp),e.emit(EI,{interval:p.statsInterval,network_quality:g,audio_stall_duration:h.stallDuration,audio_stall_count:h.stallCount,audio_stall_time_per_100sec:h.stallDuration/d.statsInterval*100,audio_stall_count_per_100sec:h.stallCount/d.statsInterval*100*1e3,video_stall_duration:v.stall.stallDuration500ms,video_stall_count:v.stall.stallCount500ms,video_stall_duration_100ms:v.stall.stallDuration100ms,video_stall_count_100ms:v.stall.stallCount100ms,video_stall_time_per_100sec:v.stall.stallDuration500ms/p.statsInterval*100,video_stall_count_per_100sec:v.stall.stallCount500ms/p.statsInterval*100*1e3,rtt:p.rtt,video_jb_delay:p.jitterBufferDelay,audio_jb_delay:d.jitterBufferDelay,audio_lost_rate:d.audioLossRate,video_lost_rate:p.videoLossRate,video_retransmitted_rate:p.retransmittedRate,quality_audio_level:null==_?void 0:_.audioLevel,quality_video_level:null==_?void 0:_.videoLevel,quality_audio_qos:null==_?void 0:_.audioQos,quality_video_qos:null==_?void 0:_.videoQos,quality_qos:null==_?void 0:_.qualityQos,quality_audio_qoe:null==_?void 0:_.audioQoe,quality_video_qoe:null==_?void 0:_.videoQoe,current_delay:e._getDelay(),visibility_state:document.visibilityState,target_delay:e._targetDelayHint,av_sync_diff:b,set_delay_error:e._setDelayError||null});case 26:e._preAudioStats=a,e._preVideoStats=s,e.set_delay_error=null;case 29:case"end":return t.stop()}}),t)}))),2e3)}},{key:"_handleJitterBuffer",value:function(e,t,r){var n;this._networkQualityResult.push(e),this._networkQualityResult.length>t.networkWindow&&this._networkQualityResult.shift();var i=Nc(n=this._networkQualityResult).call(n,Boolean);if(i.length===t.networkWindow){var o,a,s;if("min"===t.windowMethod)a=Math.min.apply(Math,Wg(i));else if("max"===t.windowMethod)a=Math.max.apply(Math,Wg(i));else{var u,l=hx(u=Wg(i)).call(u,(function(e,t){return e-t})),c=Math.floor(l.length/2);a=l.length%2!=0?l[c]:(l[c-1]+l[c])/2}if(a&&void 0!==(null===(o=r[a])||void 0===o?void 0:o.jitterBuffer))this._startSetDelayLoop(null===(s=r[a])||void 0===s?void 0:s.jitterBuffer)}}},{key:"_stopRtcReport",value:function(){var e,t,r;null===(e=this._audioStallObserver)||void 0===e||e.destroy(),null===(t=this._videoStallObserver)||void 0===t||t.destroy(),null===(r=this._networkQuality)||void 0===r||r.destroy(),this._audioStallObserver=null,this._videoStallObserver=null,this._networkQuality=null,this._preAudioStats=null,this._preVideoStats=null,this._rtcReportTimer&&(clearInterval(this._rtcReportTimer),this._rtcReportTimer=0)}},{key:"_disconnect",value:function(){var e,t;null===(e=this._loader)||void 0===e||e.cancel(),null===(t=this._networkEvaluate)||void 0===t||t.destroy(),this._stopRtcReport(),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null,this._networkEvaluate=null}},{key:"_emitError",value:function(e){this.emit(lI,e),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._pc&&(this._pc.close(),this._media&&(this._media.srcObject=null,this._media.removeAttribute("src")))}},{key:"_createEmptyPeer",value:(t=Tg(kg().mark((function e(){var t;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new RTCPeerConnection,e.next=3,t.createOffer();case 3:t.close(),t=null;case 5:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"_changeVolumeInHarmonyWorkaround",value:function(){var e=this;if(/(HarmonyOS|OpenHarmony|ArkWeb)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");this._media&&t&&(xC.log("apply HarmonyOS muted workaround"),Af(this._media,"muted",{configurable:!0,enumerable:!0,get:t.get,set:function(e){t.set.call(this,e);var r,n,i,o=Dg((r=this.volume,(i=r+(n=.01))>1&&(i=r-n),[r,i]),2),a=o[0],s=o[1];this.volume=s,this.volume=a,xC.log("HarmonyOS muted workaround. set muted =",e,"volume:",s,"->",a)}}),this._revertVolumeWorkaround=function(){xC.log("revert HarmonyOS muted workaround. video dom:",e._media),e._media&&Af(e._media,"muted",t)})}}},{key:"destroy",value:function(e){var t,r;this._disconnect(),null===(t=this._revertVolumeWorkaround)||void 0===t||t.call(this),delete this._revertVolumeWorkaround,null===(r=this._media)||void 0===r||r.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&!e&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._player=null,this._pc=null,this._opts=null}}],[{key:"enableLogger",value:function(){BP.enable()}},{key:"disableLogger",value:function(){BP.disable()}}]),o}(VR);try{localStorage.getItem("xgd")?EC.enableLogger():EC.disableLogger()}catch(PC){}var LC=function(e){Pg(n,e);var t,r=Ag(n);function n(){var e,t;xg(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Og(jg(t=r.call.apply(r,Bg(e=[this]).call(e,o))),"_rts",null),Og(jg(t),"_mediaStream",null),Og(jg(t),"_disconnectTimer",void 0),Og(jg(t),"_rtsOpts",null),Og(jg(t),"_onPause",(function(){t._disconnectTimer||(t._disconnectTimer=c_((function(){t._closeAfterPause(),t._clearDisconnectTimer()}),1e3*t.config.disconnectTime))})),Og(jg(t),"_reInit",(function(){var e;t._clearDisconnectTimer(),null!==(e=t._rts)&&void 0!==e&&e._pc||(t._init(),t._bindRtsEvents())})),Og(jg(t),"_init",(function(){var e;null===(e=t._rts)||void 0===e||e.destroy();var r=t.player.config,n=r.rts||{};t._rtsOpts=n,t._rts=new EC(Sg({media:t.player.video,player:t.player,mediaStream:t._mediaStream,preProcessUrl:function(e,r){var n,i;return(null===(n=(i=t.player).preProcessUrl)||void 0===n?void 0:n.call(i,e,r))||{url:e,ext:r}}},n)),t._rts.load(r.url)})),Og(jg(t),"_onSwitchURL",(function(e){e&&(t.player.config.url=e),t._rts?t._rts.switchURL(e):t._reInit()})),Og(jg(t),"destroy",(function(){var e;t.player.switchURL=t._originSwitchFn,t._clearDisconnectTimer(),null===(e=t._rts)||void 0===e||e.destroy(),t._rts=null})),t}return Lg(n,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"version",get:function(){return"0.2.1-alpha.47"}},{key:"beforePlayerInit",value:function(){var e,t,r,n,i=this;(this._init(),this._originSwitchFn)||(this._originSwitchFn=Iy(n=this.player.switchURL).call(n,this.player));this.player.switchURL=this._onSwitchURL,null===(e=this.player)||void 0===e||e.useHooks("replay",this._onSwitchURL),this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),void 0!==(null===(t=this.player.config)||void 0===t||null===(r=t.rts)||void 0===r?void 0:r.disconnectTime)&&(this.on("pause",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._onPause()})),this.on("play",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._reInit()}))),this._bindRtsEvents();try{Wx.defineGetterOrSetter(this.player,{__url:{get:function(){try{return ok.createObjectURL(new MediaSource)}catch(r){var e,t;null!==(e=i.player)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&t.srcObject||(i.player.video.srcObject=new MediaStream)}}}})}catch(o){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"getNetWorkInfo",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.networkStats}},{key:"setDelay",value:function(e){var t;null===(t=this._rts)||void 0===t||t._setDelay(e)}},{key:"_clearDisconnectTimer",value:function(){clearTimeout(this._disconnectTimer),this._disconnectTimer=void 0}},{key:"_closeAfterPause",value:function(){var e,t,r;if(null!==(e=this._rts)&&void 0!==e&&e._pc){var n;if(null!==(t=this.config)&&void 0!==t&&t.seamlesslyReload)this._mediaStream=null===(n=this._rts)||void 0===n?void 0:n._mediaStream;null===(r=this._rts)||void 0===r||r.destroy(!0),this._rts=null}}},{key:"_bindRtsEvents",value:function(){this._transErrorEvent(),this._transCoreEvent(fI),this._transCoreEvent(pI),this._transCoreEvent(cI),this._transCoreEvent(dI),this._transCoreEvent(hI),this._transCoreEvent(vI),this._transCoreEvent(mI),this._transCoreEvent(xI),this._transCoreEvent(EI)}},{key:"_transErrorEvent",value:function(){var e=this;this._rts.on(lI,(function(t){if(e.player){var r=new Px(e.player,t),n=e._rtsOpts,i=n.backupConstruct,o=n.backupURL;if(o){var a,s=e.player;s.emit("core_event",Sg(Sg({},{url:s.config.url,code:r.errorCode,message:r.message,httpCode:r.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:r.errorCode,message:r.message,httpCode:r.httpCode}),s.unRegisterPlugin("rts"),s.switchURL=e._originSwitchFn,e._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,i?s.registerPlugin(i).beforePlayerInit():s.video.src=o}else e.player.emit("error",r)}})),this._rts.on("waiting",(function(){var t;null===(t=e.player)||void 0===t||t.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t=this;this._rts.on(e,(function(r){t.player&&t.player.emit("core_event",Sg(Sg({},r),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return HI()}},{key:"getCapacity",value:function(){return function(){if(!HI())return Gm.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(t){return Gm.reject(null==t?void 0:t.message)}return e.createOffer().then((function(t){var r,n,i,o;xC.log(t.sdp);var a=LI.parse(t.sdp),s=null===(r=a.media)||void 0===r?void 0:Nc(r).call(r,(function(e){return"video"===e.type}))[0],u=null===(n=a.media)||void 0===n?void 0:Nc(n).call(n,(function(e){return"audio"===e.type}))[0],l=null==s||null===(i=s.rtp)||void 0===i?void 0:Nc(i).call(i,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),c=null==u||null===(o=u.rtp)||void 0===o?void 0:Nc(o).call(o,(function(e){return"opus"===e.codec})),f=null==s?void 0:s.fmtp,d=null==u?void 0:u.fmtp;return f&&vR(l).call(l,(function(e){var t;e.config=null===(t=Nc(f).call(f,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),d&&vR(c).call(c,(function(e){var t;e.config=null===(t=Nc(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:l,audio:c}}))}()}},{key:"isSupportedH264",value:(t=Tg(kg().mark((function e(t){var r,i,o,a,s;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getCapacity();case 3:if(i=e.sent,o=null===(r=i.video)||void 0===r?void 0:Nc(r).call(r,(function(e){var r;return"H264"===e.codec&&(!t||-1!==rg(r=e.config).call(r,t))})).length){e.next=10;break}return e.next=8,n.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:Nc(a).call(a,(function(e){var r;return"H264"===e.codec&&(!t||-1!==rg(r=e.config).call(r,t))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),n}(Wx),OC=window.VePlayer.DynamicModule;VePlayer.registerPlugin(OC.PluginRtm,{RtmPlugin:LC}),e.RtmPlugin=LC}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).__VEPLAYER_PLUGIN_RTM__={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),o=function(e){try{return!!e()}catch(t){return!0}},a=!o((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),s=a,u=Function.prototype,l=u.apply,c=u.call,d="object"==typeof Reflect&&Reflect.apply||(s?c.bind(l):function(){return c.apply(l,arguments)}),f=a,h=Function.prototype,p=h.call,v=f&&h.bind.bind(p,p),m=f?v:function(e){return function(){return p.apply(e,arguments)}},y=m,g=y({}.toString),_=y("".slice),b=function(e){return _(g(e),8,-1)},w=b,S=m,k=function(e){if("Function"===w(e))return S(e)},R="object"==typeof document&&document.all,T={all:R,IS_HTMLDDA:void 0===R&&void 0!==R},x=T.all,E=T.IS_HTMLDDA?function(e){return"function"==typeof e||e===x}:function(e){return"function"==typeof e},L={},O=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=a,C=Function.prototype.call,P=I?C.bind(C):function(){return C.apply(C,arguments)},D={},A={}.propertyIsEnumerable,Z=Object.getOwnPropertyDescriptor,F=Z&&!A.call({1:2},1);D.f=F?function(e){var t=Z(this,e);return!!t&&t.enumerable}:A;var j,V,W=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},M=o,N=b,G=Object,H=m("".split),U=M((function(){return!G("z").propertyIsEnumerable(0)}))?function(e){return"String"==N(e)?H(e,""):G(e)}:G,X=function(e){return null==e},B=X,K=TypeError,Y=function(e){if(B(e))throw K("Can't call method on "+e);return e},J=U,z=Y,Q=function(e){return J(z(e))},q=E,$=T.all,ee=T.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:q(e)||e===$}:function(e){return"object"==typeof e?null!==e:q(e)},te={},re=te,ne=i,ie=E,oe=function(e){return ie(e)?e:void 0},ae=function(e,t){return arguments.length<2?oe(re[e])||oe(ne[e]):re[e]&&re[e][t]||ne[e]&&ne[e][t]},se=m({}.isPrototypeOf),ue="undefined"!=typeof navigator&&String(navigator.userAgent)||"",le=i,ce=ue,de=le.process,fe=le.Deno,he=de&&de.versions||fe&&fe.version,pe=he&&he.v8;pe&&(V=(j=pe.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!V&&ce&&(!(j=ce.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ce.match(/Chrome\/(\d+)/))&&(V=+j[1]);var ve=V,me=ve,ye=o,ge=i.String,_e=!!Object.getOwnPropertySymbols&&!ye((function(){var e=Symbol();return!ge(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&me&&me<41})),be=_e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=ae,Se=E,ke=se,Re=Object,Te=be?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return Se(t)&&ke(t.prototype,Re(e))},xe=String,Ee=function(e){try{return xe(e)}catch(t){return"Object"}},Le=E,Oe=Ee,Ie=TypeError,Ce=function(e){if(Le(e))return e;throw Ie(Oe(e)+" is not a function")},Pe=Ce,De=X,Ae=function(e,t){var r=e[t];return De(r)?void 0:Pe(r)},Ze=P,Fe=E,je=ee,Ve=TypeError,We={exports:{}},Me=i,Ne=Object.defineProperty,Ge=function(e,t){try{Ne(Me,e,{value:t,configurable:!0,writable:!0})}catch(r){Me[e]=t}return t},He="__core-js_shared__",Ue=i[He]||Ge(He,{}),Xe=Ue;(We.exports=function(e,t){return Xe[e]||(Xe[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Be=We.exports,Ke=Y,Ye=Object,Je=function(e){return Ye(Ke(e))},ze=Je,Qe=m({}.hasOwnProperty),qe=Object.hasOwn||function(e,t){return Qe(ze(e),t)},$e=m,et=0,tt=Math.random(),rt=$e(1..toString),nt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rt(++et+tt,36)},it=Be,ot=qe,at=nt,st=_e,ut=be,lt=i.Symbol,ct=it("wks"),dt=ut?lt.for||lt:lt&&lt.withoutSetter||at,ft=function(e){return ot(ct,e)||(ct[e]=st&&ot(lt,e)?lt[e]:dt("Symbol."+e)),ct[e]},ht=P,pt=ee,vt=Te,mt=Ae,yt=function(e,t){var r,n;if("string"===t&&Fe(r=e.toString)&&!je(n=Ze(r,e)))return n;if(Fe(r=e.valueOf)&&!je(n=Ze(r,e)))return n;if("string"!==t&&Fe(r=e.toString)&&!je(n=Ze(r,e)))return n;throw Ve("Can't convert object to primitive value")},gt=TypeError,_t=ft("toPrimitive"),bt=function(e,t){if(!pt(e)||vt(e))return e;var r,n=mt(e,_t);if(n){if(void 0===t&&(t="default"),r=ht(n,e,t),!pt(r)||vt(r))return r;throw gt("Can't convert object to primitive value")}return void 0===t&&(t="number"),yt(e,t)},wt=Te,St=function(e){var t=bt(e,"string");return wt(t)?t:t+""},kt=ee,Rt=i.document,Tt=kt(Rt)&&kt(Rt.createElement),xt=function(e){return Tt?Rt.createElement(e):{}},Et=xt,Lt=!O&&!o((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),Ot=O,It=P,Ct=D,Pt=W,Dt=Q,At=St,Zt=qe,Ft=Lt,jt=Object.getOwnPropertyDescriptor;L.f=Ot?jt:function(e,t){if(e=Dt(e),t=At(t),Ft)try{return jt(e,t)}catch(r){}if(Zt(e,t))return Pt(!It(Ct.f,e,t),e[t])};var Vt=o,Wt=E,Mt=/#|\.prototype\./,Nt=function(e,t){var r=Ht[Gt(e)];return r==Xt||r!=Ut&&(Wt(t)?Vt(t):!!t)},Gt=Nt.normalize=function(e){return String(e).replace(Mt,".").toLowerCase()},Ht=Nt.data={},Ut=Nt.NATIVE="N",Xt=Nt.POLYFILL="P",Bt=Nt,Kt=Ce,Yt=a,Jt=k(k.bind),zt=function(e,t){return Kt(e),void 0===t?e:Yt?Jt(e,t):function(){return e.apply(t,arguments)}},Qt={},qt=O&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$t=ee,er=String,tr=TypeError,rr=function(e){if($t(e))return e;throw tr(er(e)+" is not an object")},nr=O,ir=Lt,or=qt,ar=rr,sr=St,ur=TypeError,lr=Object.defineProperty,cr=Object.getOwnPropertyDescriptor,dr="enumerable",fr="configurable",hr="writable";Qt.f=nr?or?function(e,t,r){if(ar(e),t=sr(t),ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&hr in r&&!r[hr]){var n=cr(e,t);n&&n[hr]&&(e[t]=r.value,r={configurable:fr in r?r[fr]:n[fr],enumerable:dr in r?r[dr]:n[dr],writable:!1})}return lr(e,t,r)}:lr:function(e,t,r){if(ar(e),t=sr(t),ar(r),ir)try{return lr(e,t,r)}catch(n){}if("get"in r||"set"in r)throw ur("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var pr=Qt,vr=W,mr=O?function(e,t,r){return pr.f(e,t,vr(1,r))}:function(e,t,r){return e[t]=r,e},yr=i,gr=d,_r=k,br=E,wr=L.f,Sr=Bt,kr=te,Rr=zt,Tr=mr,xr=qe,Er=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 gr(e,this,arguments)};return t.prototype=e.prototype,t},Lr=function(e,t){var r,n,i,o,a,s,u,l,c,d=e.target,f=e.global,h=e.stat,p=e.proto,v=f?yr:h?yr[d]:(yr[d]||{}).prototype,m=f?kr:kr[d]||Tr(kr,d,{})[d],y=m.prototype;for(o in t)n=!(r=Sr(f?o:d+(h?".":"#")+o,e.forced))&&v&&xr(v,o),s=m[o],n&&(u=e.dontCallGetSet?(c=wr(v,o))&&c.value:v[o]),a=n&&u?u:t[o],n&&typeof s==typeof a||(l=e.bind&&n?Rr(a,yr):e.wrap&&n?Er(a):p&&br(a)?_r(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Tr(l,"sham",!0),Tr(m,o,l),p&&(xr(kr,i=d+"Prototype")||Tr(kr,i,{}),Tr(kr[i],o,a),e.real&&y&&(r||!y[o])&&Tr(y,o,a)))},Or=b,Ir=Array.isArray||function(e){return"Array"==Or(e)},Cr=Math.ceil,Pr=Math.floor,Dr=Math.trunc||function(e){var t=+e;return(t>0?Pr:Cr)(t)},Ar=function(e){var t=+e;return t!=t||0===t?0:Dr(t)},Zr=Ar,Fr=Math.min,jr=function(e){return e>0?Fr(Zr(e),9007199254740991):0},Vr=jr,Wr=function(e){return Vr(e.length)},Mr=TypeError,Nr=function(e){if(e>9007199254740991)throw Mr("Maximum allowed index exceeded");return e},Gr=St,Hr=Qt,Ur=W,Xr=function(e,t,r){var n=Gr(t);n in e?Hr.f(e,n,Ur(0,r)):e[n]=r},Br={};Br[ft("toStringTag")]="z";var Kr="[object z]"===String(Br),Yr=Kr,Jr=E,zr=b,Qr=ft("toStringTag"),qr=Object,$r="Arguments"==zr(function(){return arguments}()),en=Yr?zr:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=qr(e),Qr))?r:$r?zr(t):"Object"==(n=zr(t))&&Jr(t.callee)?"Arguments":n},tn=E,rn=Ue,nn=m(Function.toString);tn(rn.inspectSource)||(rn.inspectSource=function(e){return nn(e)});var on=rn.inspectSource,an=m,sn=o,un=E,ln=en,cn=on,dn=function(){},fn=[],hn=ae("Reflect","construct"),pn=/^\s*(?:class|function)\b/,vn=an(pn.exec),mn=!pn.exec(dn),yn=function(e){if(!un(e))return!1;try{return hn(dn,fn,e),!0}catch(t){return!1}},gn=function(e){if(!un(e))return!1;switch(ln(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mn||!!vn(pn,cn(e))}catch(t){return!0}};gn.sham=!0;var _n=!hn||sn((function(){var e;return yn(yn.call)||!yn(Object)||!yn((function(){e=!0}))||e}))?gn:yn,bn=Ir,wn=_n,Sn=ee,kn=ft("species"),Rn=Array,Tn=function(e){var t;return bn(e)&&(t=e.constructor,(wn(t)&&(t===Rn||bn(t.prototype))||Sn(t)&&null===(t=t[kn]))&&(t=void 0)),void 0===t?Rn:t},xn=function(e,t){return new(Tn(e))(0===t?0:t)},En=o,Ln=ve,On=ft("species"),In=function(e){return Ln>=51||!En((function(){var t=[];return(t.constructor={})[On]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Cn=Lr,Pn=o,Dn=Ir,An=ee,Zn=Je,Fn=Wr,jn=Nr,Vn=Xr,Wn=xn,Mn=In,Nn=ve,Gn=ft("isConcatSpreadable"),Hn=Nn>=51||!Pn((function(){var e=[];return e[Gn]=!1,e.concat()[0]!==e})),Un=function(e){if(!An(e))return!1;var t=e[Gn];return void 0!==t?!!t:Dn(e)};Cn({target:"Array",proto:!0,arity:1,forced:!Hn||!Mn("concat")},{concat:function(e){var t,r,n,i,o,a=Zn(this),s=Wn(a,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Un(o=-1===t?a:arguments[t]))for(i=Fn(o),jn(u+i),r=0;r<i;r++,u++)r in o&&Vn(s,u,o[r]);else jn(u+1),Vn(s,u++,o);return s.length=u,s}});var Xn=en,Bn=String,Kn=function(e){if("Symbol"===Xn(e))throw TypeError("Cannot convert a Symbol value to a string");return Bn(e)},Yn={},Jn=Ar,zn=Math.max,Qn=Math.min,qn=function(e,t){var r=Jn(e);return r<0?zn(r+t,0):Qn(r,t)},$n=Q,ei=qn,ti=Wr,ri=function(e){return function(t,r,n){var i,o=$n(t),a=ti(o),s=ei(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},ni={includes:ri(!0),indexOf:ri(!1)},ii={},oi=qe,ai=Q,si=ni.indexOf,ui=ii,li=m([].push),ci=function(e,t){var r,n=ai(e),i=0,o=[];for(r in n)!oi(ui,r)&&oi(n,r)&&li(o,r);for(;t.length>i;)oi(n,r=t[i++])&&(~si(o,r)||li(o,r));return o},di=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fi=ci,hi=di,pi=Object.keys||function(e){return fi(e,hi)},vi=O,mi=qt,yi=Qt,gi=rr,_i=Q,bi=pi;Yn.f=vi&&!mi?Object.defineProperties:function(e,t){gi(e);for(var r,n=_i(t),i=bi(t),o=i.length,a=0;o>a;)yi.f(e,r=i[a++],n[r]);return e};var wi,Si=ae("document","documentElement"),ki=nt,Ri=Be("keys"),Ti=function(e){return Ri[e]||(Ri[e]=ki(e))},xi=rr,Ei=Yn,Li=di,Oi=ii,Ii=Si,Ci=xt,Pi="prototype",Di="script",Ai=Ti("IE_PROTO"),Zi=function(){},Fi=function(e){return"<"+Di+">"+e+"</"+Di+">"},ji=function(e){e.write(Fi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vi=function(){try{wi=new ActiveXObject("htmlfile")}catch(i){}var e,t,r;Vi="undefined"!=typeof document?document.domain&&wi?ji(wi):(t=Ci("iframe"),r="java"+Di+":",t.style.display="none",Ii.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Fi("document.F=Object")),e.close(),e.F):ji(wi);for(var n=Li.length;n--;)delete Vi[Pi][Li[n]];return Vi()};Oi[Ai]=!0;var Wi=Object.create||function(e,t){var r;return null!==e?(Zi[Pi]=xi(e),r=new Zi,Zi[Pi]=null,r[Ai]=e):r=Vi(),void 0===t?r:Ei.f(r,t)},Mi={},Ni=ci,Gi=di.concat("length","prototype");Mi.f=Object.getOwnPropertyNames||function(e){return Ni(e,Gi)};var Hi={},Ui=qn,Xi=Wr,Bi=Xr,Ki=Array,Yi=Math.max,Ji=function(e,t,r){for(var n=Xi(e),i=Ui(t,n),o=Ui(void 0===r?n:r,n),a=Ki(Yi(o-i,0)),s=0;i<o;i++,s++)Bi(a,s,e[i]);return a.length=s,a},zi=b,Qi=Q,qi=Mi.f,$i=Ji,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Hi.f=function(e){return eo&&"Window"==zi(e)?function(e){try{return qi(e)}catch(t){return $i(eo)}}(e):qi(Qi(e))};var to={};to.f=Object.getOwnPropertySymbols;var ro=mr,no=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ro(e,t,r),e},io=Qt,oo=function(e,t,r){return io.f(e,t,r)},ao={},so=ft;ao.f=so;var uo,lo,co,fo=te,ho=qe,po=ao,vo=Qt.f,mo=function(e){var t=fo.Symbol||(fo.Symbol={});ho(t,e)||vo(t,e,{value:po.f(e)})},yo=P,go=ae,_o=ft,bo=no,wo=function(){var e=go("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=_o("toPrimitive");t&&!t[n]&&bo(t,n,(function(e){return yo(r,this)}),{arity:1})},So=en,ko=Kr?{}.toString:function(){return"[object "+So(this)+"]"},Ro=Kr,To=Qt.f,xo=mr,Eo=qe,Lo=ko,Oo=ft("toStringTag"),Io=function(e,t,r,n){if(e){var i=r?e:e.prototype;Eo(i,Oo)||To(i,Oo,{configurable:!0,value:t}),n&&!Ro&&xo(i,"toString",Lo)}},Co=E,Po=i.WeakMap,Do=Co(Po)&&/native code/.test(String(Po)),Ao=i,Zo=ee,Fo=mr,jo=qe,Vo=Ue,Wo=Ti,Mo=ii,No="Object already initialized",Go=Ao.TypeError,Ho=Ao.WeakMap;if(Do||Vo.state){var Uo=Vo.state||(Vo.state=new Ho);Uo.get=Uo.get,Uo.has=Uo.has,Uo.set=Uo.set,uo=function(e,t){if(Uo.has(e))throw Go(No);return t.facade=e,Uo.set(e,t),t},lo=function(e){return Uo.get(e)||{}},co=function(e){return Uo.has(e)}}else{var Xo=Wo("state");Mo[Xo]=!0,uo=function(e,t){if(jo(e,Xo))throw Go(No);return t.facade=e,Fo(e,Xo,t),t},lo=function(e){return jo(e,Xo)?e[Xo]:{}},co=function(e){return jo(e,Xo)}}var Bo={set:uo,get:lo,has:co,enforce:function(e){return co(e)?lo(e):uo(e,{})},getterFor:function(e){return function(t){var r;if(!Zo(t)||(r=lo(t)).type!==e)throw Go("Incompatible receiver, "+e+" required");return r}}},Ko=zt,Yo=U,Jo=Je,zo=Wr,Qo=xn,qo=m([].push),$o=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,l,c,d){for(var f,h,p=Jo(u),v=Yo(p),m=Ko(l,c),y=zo(v),g=0,_=d||Qo,b=t?_(u,y):r||a?_(u,0):void 0;y>g;g++)if((s||g in v)&&(h=m(f=v[g],g,p),e))if(t)b[g]=h;else if(h)switch(e){case 3:return!0;case 5:return f;case 6:return g;case 2:qo(b,f)}else switch(e){case 4:return!1;case 7:qo(b,f)}return o?-1:n||i?i:b}},ea={forEach:$o(0),map:$o(1),filter:$o(2),some:$o(3),every:$o(4),find:$o(5),findIndex:$o(6),filterReject:$o(7)},ta=Lr,ra=i,na=P,ia=m,oa=O,aa=_e,sa=o,ua=qe,la=se,ca=rr,da=Q,fa=St,ha=Kn,pa=W,va=Wi,ma=pi,ya=Mi,ga=Hi,_a=to,ba=L,wa=Qt,Sa=Yn,ka=D,Ra=no,Ta=oo,xa=Be,Ea=ii,La=nt,Oa=ft,Ia=ao,Ca=mo,Pa=wo,Da=Io,Aa=Bo,Za=ea.forEach,Fa=Ti("hidden"),ja="Symbol",Va="prototype",Wa=Aa.set,Ma=Aa.getterFor(ja),Na=Object[Va],Ga=ra.Symbol,Ha=Ga&&Ga[Va],Ua=ra.TypeError,Xa=ra.QObject,Ba=ba.f,Ka=wa.f,Ya=ga.f,Ja=ka.f,za=ia([].push),Qa=xa("symbols"),qa=xa("op-symbols"),$a=xa("wks"),es=!Xa||!Xa[Va]||!Xa[Va].findChild,ts=oa&&sa((function(){return 7!=va(Ka({},"a",{get:function(){return Ka(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Ba(Na,t);n&&delete Na[t],Ka(e,t,r),n&&e!==Na&&Ka(Na,t,n)}:Ka,rs=function(e,t){var r=Qa[e]=va(Ha);return Wa(r,{type:ja,tag:e,description:t}),oa||(r.description=t),r},ns=function(e,t,r){e===Na&&ns(qa,t,r),ca(e);var n=fa(t);return ca(r),ua(Qa,n)?(r.enumerable?(ua(e,Fa)&&e[Fa][n]&&(e[Fa][n]=!1),r=va(r,{enumerable:pa(0,!1)})):(ua(e,Fa)||Ka(e,Fa,pa(1,{})),e[Fa][n]=!0),ts(e,n,r)):Ka(e,n,r)},is=function(e,t){ca(e);var r=da(t),n=ma(r).concat(us(r));return Za(n,(function(t){oa&&!na(os,r,t)||ns(e,t,r[t])})),e},os=function(e){var t=fa(e),r=na(Ja,this,t);return!(this===Na&&ua(Qa,t)&&!ua(qa,t))&&(!(r||!ua(this,t)||!ua(Qa,t)||ua(this,Fa)&&this[Fa][t])||r)},as=function(e,t){var r=da(e),n=fa(t);if(r!==Na||!ua(Qa,n)||ua(qa,n)){var i=Ba(r,n);return!i||!ua(Qa,n)||ua(r,Fa)&&r[Fa][n]||(i.enumerable=!0),i}},ss=function(e){var t=Ya(da(e)),r=[];return Za(t,(function(e){ua(Qa,e)||ua(Ea,e)||za(r,e)})),r},us=function(e){var t=e===Na,r=Ya(t?qa:da(e)),n=[];return Za(r,(function(e){!ua(Qa,e)||t&&!ua(Na,e)||za(n,Qa[e])})),n};aa||(Ga=function(){if(la(Ha,this))throw Ua("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ha(arguments[0]):void 0,t=La(e),r=function(e){this===Na&&na(r,qa,e),ua(this,Fa)&&ua(this[Fa],t)&&(this[Fa][t]=!1),ts(this,t,pa(1,e))};return oa&&es&&ts(Na,t,{configurable:!0,set:r}),rs(t,e)},Ra(Ha=Ga[Va],"toString",(function(){return Ma(this).tag})),Ra(Ga,"withoutSetter",(function(e){return rs(La(e),e)})),ka.f=os,wa.f=ns,Sa.f=is,ba.f=as,ya.f=ga.f=ss,_a.f=us,Ia.f=function(e){return rs(Oa(e),e)},oa&&Ta(Ha,"description",{configurable:!0,get:function(){return Ma(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!aa,sham:!aa},{Symbol:Ga}),Za(ma($a),(function(e){Ca(e)})),ta({target:ja,stat:!0,forced:!aa},{useSetter:function(){es=!0},useSimple:function(){es=!1}}),ta({target:"Object",stat:!0,forced:!aa,sham:!oa},{create:function(e,t){return void 0===t?va(e):is(va(e),t)},defineProperty:ns,defineProperties:is,getOwnPropertyDescriptor:as}),ta({target:"Object",stat:!0,forced:!aa},{getOwnPropertyNames:ss}),Pa(),Da(Ga,ja),Ea[Fa]=!0;var ls=_e&&!!Symbol.for&&!!Symbol.keyFor,cs=Lr,ds=ae,fs=qe,hs=Kn,ps=Be,vs=ls,ms=ps("string-to-symbol-registry"),ys=ps("symbol-to-string-registry");cs({target:"Symbol",stat:!0,forced:!vs},{for:function(e){var t=hs(e);if(fs(ms,t))return ms[t];var r=ds("Symbol")(t);return ms[t]=r,ys[r]=t,r}});var gs=Lr,_s=qe,bs=Te,ws=Ee,Ss=ls,ks=Be("symbol-to-string-registry");gs({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!bs(e))throw TypeError(ws(e)+" is not a symbol");if(_s(ks,e))return ks[e]}});var Rs=m([].slice),Ts=Ir,xs=E,Es=b,Ls=Kn,Os=m([].push),Is=Lr,Cs=ae,Ps=d,Ds=P,As=m,Zs=o,Fs=E,js=Te,Vs=Rs,Ws=function(e){if(xs(e))return e;if(Ts(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Os(r,i):"number"!=typeof i&&"Number"!=Es(i)&&"String"!=Es(i)||Os(r,Ls(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ts(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Ms=_e,Ns=String,Gs=Cs("JSON","stringify"),Hs=As(/./.exec),Us=As("".charAt),Xs=As("".charCodeAt),Bs=As("".replace),Ks=As(1..toString),Ys=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,zs=/^[\uDC00-\uDFFF]$/,Qs=!Ms||Zs((function(){var e=Cs("Symbol")();return"[null]"!=Gs([e])||"{}"!=Gs({a:e})||"{}"!=Gs(Object(e))})),qs=Zs((function(){return'"\\udf06\\ud834"'!==Gs("\udf06\ud834")||'"\\udead"'!==Gs("\udead")})),$s=function(e,t){var r=Vs(arguments),n=Ws(t);if(Fs(n)||void 0!==e&&!js(e))return r[1]=function(e,t){if(Fs(n)&&(t=Ds(n,this,Ns(e),t)),!js(t))return t},Ps(Gs,null,r)},eu=function(e,t,r){var n=Us(r,t-1),i=Us(r,t+1);return Hs(Js,e)&&!Hs(zs,i)||Hs(zs,e)&&!Hs(Js,n)?"\\u"+Ks(Xs(e,0),16):e};Gs&&Is({target:"JSON",stat:!0,arity:3,forced:Qs||qs},{stringify:function(e,t,r){var n=Vs(arguments),i=Ps(Qs?$s:Gs,null,n);return qs&&"string"==typeof i?Bs(i,Ys,eu):i}});var tu=to,ru=Je;Lr({target:"Object",stat:!0,forced:!_e||o((function(){tu.f(1)}))},{getOwnPropertySymbols:function(e){var t=tu.f;return t?t(ru(e)):[]}}),mo("asyncIterator"),mo("hasInstance"),mo("isConcatSpreadable"),mo("iterator"),mo("match"),mo("matchAll"),mo("replace"),mo("search"),mo("species"),mo("split");var nu=wo;mo("toPrimitive"),nu();var iu=ae,ou=Io;mo("toStringTag"),ou(iu("Symbol"),"Symbol"),mo("unscopables"),Io(i.JSON,"JSON",!0);var au,su,uu,lu=te.Symbol,cu={},du=O,fu=qe,hu=Function.prototype,pu=du&&Object.getOwnPropertyDescriptor,vu=fu(hu,"name"),mu={EXISTS:vu,PROPER:vu&&"something"===function(){}.name,CONFIGURABLE:vu&&(!du||du&&pu(hu,"name").configurable)},yu=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),gu=qe,_u=E,bu=Je,wu=yu,Su=Ti("IE_PROTO"),ku=Object,Ru=ku.prototype,Tu=wu?ku.getPrototypeOf:function(e){var t=bu(e);if(gu(t,Su))return t[Su];var r=t.constructor;return _u(r)&&t instanceof r?r.prototype:t instanceof ku?Ru:null},xu=o,Eu=E,Lu=ee,Ou=Wi,Iu=Tu,Cu=no,Pu=ft("iterator"),Du=!1;[].keys&&("next"in(uu=[].keys())?(su=Iu(Iu(uu)))!==Object.prototype&&(au=su):Du=!0);var Au=!Lu(au)||xu((function(){var e={};return au[Pu].call(e)!==e}));Eu((au=Au?{}:Ou(au))[Pu])||Cu(au,Pu,(function(){return this}));var Zu={IteratorPrototype:au,BUGGY_SAFARI_ITERATORS:Du},Fu=Zu.IteratorPrototype,ju=Wi,Vu=W,Wu=Io,Mu=cu,Nu=function(){return this},Gu=function(e,t,r,n){var i=t+" Iterator";return e.prototype=ju(Fu,{next:Vu(+!n,r)}),Wu(e,i,!1,!0),Mu[i]=Nu,e},Hu=m,Uu=Ce,Xu=E,Bu=String,Ku=TypeError,Yu=function(e,t,r){try{return Hu(Uu(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}},Ju=rr,zu=function(e){if("object"==typeof e||Xu(e))return e;throw Ku("Can't set "+Bu(e)+" as a prototype")},Qu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Yu(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(n){}return function(r,n){return Ju(r),zu(n),t?e(r,n):r.__proto__=n,r}}():void 0),qu=Lr,$u=P,el=mu,tl=Gu,rl=Tu,nl=Io,il=no,ol=cu,al=Zu,sl=el.PROPER,ul=al.BUGGY_SAFARI_ITERATORS,ll=ft("iterator"),cl="keys",dl="values",fl="entries",hl=function(){return this},pl=function(e,t,r,n,i,o,a){tl(r,t,n);var s,u,l,c=function(e){if(e===i&&v)return v;if(!ul&&e in h)return h[e];switch(e){case cl:case dl:case fl:return function(){return new r(this,e)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[ll]||h["@@iterator"]||i&&h[i],v=!ul&&p||c(i),m="Array"==t&&h.entries||p;if(m&&(s=rl(m.call(new e)))!==Object.prototype&&s.next&&(nl(s,d,!0,!0),ol[d]=hl),sl&&i==dl&&p&&p.name!==dl&&(f=!0,v=function(){return $u(p,this)}),i)if(u={values:c(dl),keys:o?v:c(cl),entries:c(fl)},a)for(l in u)(ul||f||!(l in h))&&il(h,l,u[l]);else qu({target:t,proto:!0,forced:ul||f},u);return a&&h[ll]!==v&&il(h,ll,v,{name:i}),ol[t]=v,u},vl=function(e,t){return{value:e,done:t}},ml=Q,yl=cu,gl=Bo;Qt.f;var _l=pl,bl=vl,wl="Array Iterator",Sl=gl.set,kl=gl.getterFor(wl);_l(Array,"Array",(function(e,t){Sl(this,{type:wl,target:ml(e),index:0,kind:t})}),(function(){var e=kl(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,bl(void 0,!0)):bl("keys"==r?n:"values"==r?t[n]:[n,t[n]],!1)}),"values"),yl.Arguments=yl.Array;var Rl={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},Tl=i,xl=en,El=mr,Ll=cu,Ol=ft("toStringTag");for(var Il in Rl){var Cl=Tl[Il],Pl=Cl&&Cl.prototype;Pl&&xl(Pl)!==Ol&&El(Pl,Ol,Il),Ll[Il]=Ll.Array}var Dl=lu;mo("dispose");var Al=Dl;mo("asyncDispose");var Zl=Lr,Fl=m,jl=ae("Symbol"),Vl=jl.keyFor,Wl=Fl(jl.prototype.valueOf);Zl({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Vl(Wl(e))}catch(t){return!1}}});for(var Ml=Lr,Nl=Be,Gl=ae,Hl=m,Ul=Te,Xl=ft,Bl=Gl("Symbol"),Kl=Bl.isWellKnown,Yl=Gl("Object","getOwnPropertyNames"),Jl=Hl(Bl.prototype.valueOf),zl=Nl("wks"),Ql=0,ql=Yl(Bl),$l=ql.length;Ql<$l;Ql++)try{var ec=ql[Ql];Ul(Bl[ec])&&Xl(ec)}catch(jP){}Ml({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Kl&&Kl(e))return!0;try{for(var t=Jl(e),r=0,n=Yl(zl),i=n.length;r<i;r++)if(zl[n[r]]==t)return!0}catch(jP){}return!1}}),mo("matcher"),mo("metadataKey"),mo("observable"),mo("metadata"),mo("patternMatch"),mo("replaceAll");var tc=Al,rc=r(tc),nc=m,ic=Ar,oc=Kn,ac=Y,sc=nc("".charAt),uc=nc("".charCodeAt),lc=nc("".slice),cc=function(e){return function(t,r){var n,i,o=oc(ac(t)),a=ic(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=uc(o,a))<55296||n>56319||a+1===s||(i=uc(o,a+1))<56320||i>57343?e?sc(o,a):n:e?lc(o,a,a+2):i-56320+(n-55296<<10)+65536}},dc={codeAt:cc(!1),charAt:cc(!0)},fc=dc.charAt,hc=Kn,pc=Bo,vc=pl,mc=vl,yc="String Iterator",gc=pc.set,_c=pc.getterFor(yc);vc(String,"String",(function(e){gc(this,{type:yc,string:hc(e),index:0})}),(function(){var e,t=_c(this),r=t.string,n=t.index;return n>=r.length?mc(void 0,!0):(e=fc(r,n),t.index+=e.length,mc(e,!1))}));var bc=ao.f("iterator"),wc=r(bc);function Sc(e){return(Sc="function"==typeof rc&&"symbol"==typeof wc?function(e){return typeof e}:function(e){return e&&"function"==typeof rc&&e.constructor===rc&&e!==rc.prototype?"symbol":typeof e})(e)}var kc=r(tc),Rc=en,Tc=Ae,xc=X,Ec=cu,Lc=ft("iterator"),Oc=function(e){if(!xc(e))return Tc(e,Lc)||Tc(e,"@@iterator")||Ec[Rc(e)]},Ic=r(Oc),Cc=Je,Pc=pi;Lr({target:"Object",stat:!0,forced:o((function(){Pc(1)}))},{keys:function(e){return Pc(Cc(e))}});var Dc=r(te.Object.keys),Ac=r(te.Object.getOwnPropertySymbols),Zc=ea.filter;Lr({target:"Array",proto:!0,forced:!In("filter")},{filter:function(e){return Zc(this,e,arguments.length>1?arguments[1]:void 0)}});var Fc=te,jc=function(e){return Fc[e+"Prototype"]},Vc=jc("Array").filter,Wc=se,Mc=Vc,Nc=Array.prototype,Gc=r((function(e){var t=e.filter;return e===Nc||Wc(Nc,e)&&t===Nc.filter?Mc:t})),Hc={exports:{}},Uc=Lr,Xc=o,Bc=Q,Kc=L.f,Yc=O;Uc({target:"Object",stat:!0,forced:!Yc||Xc((function(){Kc(1)})),sham:!Yc},{getOwnPropertyDescriptor:function(e,t){return Kc(Bc(e),t)}});var Jc=te.Object,zc=Hc.exports=function(e,t){return Jc.getOwnPropertyDescriptor(e,t)};Jc.getOwnPropertyDescriptor.sham&&(zc.sham=!0);var Qc=r(Hc.exports),qc=o,$c=function(e,t){var r=[][e];return!!r&&qc((function(){r.call(null,t||function(){return 1},1)}))},ed=ea.forEach,td=$c("forEach")?[].forEach:function(e){return ed(this,e,arguments.length>1?arguments[1]:void 0)};Lr({target:"Array",proto:!0,forced:[].forEach!=td},{forEach:td});var rd=jc("Array").forEach,nd=en,id=qe,od=se,ad=rd,sd=Array.prototype,ud={DOMTokenList:!0,NodeList:!0},ld=r((function(e){var t=e.forEach;return e===sd||od(sd,e)&&t===sd.forEach||id(ud,nd(e))?ad:t})),cd=ae,dd=Mi,fd=to,hd=rr,pd=m([].concat),vd=cd("Reflect","ownKeys")||function(e){var t=dd.f(hd(e)),r=fd.f;return r?pd(t,r(e)):t},md=vd,yd=Q,gd=L,_d=Xr;Lr({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,r,n=yd(e),i=gd.f,o=md(n),a={},s=0;o.length>s;)void 0!==(r=i(n,t=o[s++]))&&_d(a,t,r);return a}});var bd=r(te.Object.getOwnPropertyDescriptors),wd={exports:{}},Sd=Lr,kd=O,Rd=Yn.f;Sd({target:"Object",stat:!0,forced:Object.defineProperties!==Rd,sham:!kd},{defineProperties:Rd});var Td=te.Object,xd=wd.exports=function(e,t){return Td.defineProperties(e,t)};Td.defineProperties.sham&&(xd.sham=!0);var Ed=r(wd.exports),Ld={exports:{}},Od=Lr,Id=O,Cd=Qt.f;Od({target:"Object",stat:!0,forced:Object.defineProperty!==Cd,sham:!Id},{defineProperty:Cd});var Pd=te.Object,Dd=Ld.exports=function(e,t,r){return Pd.defineProperty(e,t,r)};Pd.defineProperty.sham&&(Dd.sham=!0);var Ad=r(Ld.exports);Lr({target:"Object",stat:!0,sham:!O},{create:Wi});var Zd=te.Object,Fd=r((function(e,t){return Zd.create(e,t)})),jd=Je,Vd=Tu,Wd=yu;Lr({target:"Object",stat:!0,forced:o((function(){Vd(1)})),sham:!Wd},{getPrototypeOf:function(e){return Vd(jd(e))}});var Md=r(te.Object.getPrototypeOf);Lr({target:"Object",stat:!0},{setPrototypeOf:Qu});var Nd=r(te.Object.setPrototypeOf),Gd=qe,Hd=vd,Ud=L,Xd=Qt,Bd=ee,Kd=mr,Yd=Error,Jd=m("".replace),zd=String(Yd("zxcasd").stack),Qd=/\n\s*at [^:]*:[^\n]*/,qd=Qd.test(zd),$d=W,ef=!o((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",$d(1,7)),7!==e.stack)})),tf=mr,rf=function(e,t){if(qd&&"string"==typeof e&&!Yd.prepareStackTrace)for(;t--;)e=Jd(e,Qd,"");return e},nf=ef,of=Error.captureStackTrace,af=cu,sf=ft("iterator"),uf=Array.prototype,lf=function(e){return void 0!==e&&(af.Array===e||uf[sf]===e)},cf=P,df=Ce,ff=rr,hf=Ee,pf=Oc,vf=TypeError,mf=function(e,t){var r=arguments.length<2?pf(e):t;if(df(r))return ff(cf(r,e));throw vf(hf(e)+" is not iterable")},yf=P,gf=rr,_f=Ae,bf=function(e,t,r){var n,i;gf(e);try{if(!(n=_f(e,"return"))){if("throw"===t)throw r;return r}n=yf(n,e)}catch(jP){i=!0,n=jP}if("throw"===t)throw r;if(i)throw n;return gf(n),r},wf=zt,Sf=P,kf=rr,Rf=Ee,Tf=lf,xf=Wr,Ef=se,Lf=mf,Of=Oc,If=bf,Cf=TypeError,Pf=function(e,t){this.stopped=e,this.result=t},Df=Pf.prototype,Af=function(e,t,r){var n,i,o,a,s,u,l,c=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),v=wf(t,c),m=function(e){return n&&If(n,"normal",e),new Pf(!0,e)},y=function(e){return d?(kf(e),p?v(e[0],e[1],m):v(e[0],e[1])):p?v(e,m):v(e)};if(f)n=e.iterator;else if(h)n=e;else{if(!(i=Of(e)))throw Cf(Rf(e)+" is not iterable");if(Tf(i)){for(o=0,a=xf(e);a>o;o++)if((s=y(e[o]))&&Ef(Df,s))return s;return new Pf(!1)}n=Lf(e,i)}for(u=f?e.next:n.next;!(l=Sf(u,n)).done;){try{s=y(l.value)}catch(jP){If(n,"throw",jP)}if("object"==typeof s&&s&&Ef(Df,s))return s}return new Pf(!1)},Zf=Kn,Ff=Lr,jf=se,Vf=Tu,Wf=Qu,Mf=function(e,t,r){for(var n=Hd(t),i=Xd.f,o=Ud.f,a=0;a<n.length;a++){var s=n[a];Gd(e,s)||r&&Gd(r,s)||i(e,s,o(t,s))}},Nf=Wi,Gf=mr,Hf=W,Uf=function(e,t){Bd(t)&&"cause"in t&&Kd(e,"cause",t.cause)},Xf=function(e,t,r,n){nf&&(of?of(e,t):tf(e,"stack",rf(r,n)))},Bf=Af,Kf=function(e,t){return void 0===e?arguments.length<2?"":t:Zf(e)},Yf=ft("toStringTag"),Jf=Error,zf=[].push,Qf=function(e,t){var r,n=jf(qf,this);Wf?r=Wf(Jf(),n?Vf(this):qf):(r=n?this:Nf(qf),Gf(r,Yf,"Error")),void 0!==t&&Gf(r,"message",Kf(t)),Xf(r,Qf,r.stack,1),arguments.length>2&&Uf(r,arguments[2]);var i=[];return Bf(e,zf,{that:i}),Gf(r,"errors",i),r};Wf?Wf(Qf,Jf):Mf(Qf,Jf,{name:!0});var qf=Qf.prototype=Nf(Jf.prototype,{constructor:Hf(1,Qf),message:Hf(1,""),name:Hf(1,"AggregateError")});Ff({global:!0,constructor:!0,arity:2},{AggregateError:Qf});var $f,eh,th,rh,nh="undefined"!=typeof process&&"process"==b(process),ih=ae,oh=oo,ah=O,sh=ft("species"),uh=function(e){var t=ih(e);ah&&t&&!t[sh]&&oh(t,sh,{configurable:!0,get:function(){return this}})},lh=se,ch=TypeError,dh=function(e,t){if(lh(t,e))return e;throw ch("Incorrect invocation")},fh=_n,hh=Ee,ph=TypeError,vh=function(e){if(fh(e))return e;throw ph(hh(e)+" is not a constructor")},mh=rr,yh=vh,gh=X,_h=ft("species"),bh=function(e,t){var r,n=mh(e).constructor;return void 0===n||gh(r=mh(n)[_h])?t:yh(r)},wh=TypeError,Sh=function(e,t){if(e<t)throw wh("Not enough arguments");return e},kh=/(?:ipad|iphone|ipod).*applewebkit/i.test(ue),Rh=i,Th=d,xh=zt,Eh=E,Lh=qe,Oh=o,Ih=Si,Ch=Rs,Ph=xt,Dh=Sh,Ah=kh,Zh=nh,Fh=Rh.setImmediate,jh=Rh.clearImmediate,Vh=Rh.process,Wh=Rh.Dispatch,Mh=Rh.Function,Nh=Rh.MessageChannel,Gh=Rh.String,Hh=0,Uh={},Xh="onreadystatechange";Oh((function(){$f=Rh.location}));var Bh=function(e){if(Lh(Uh,e)){var t=Uh[e];delete Uh[e],t()}},Kh=function(e){return function(){Bh(e)}},Yh=function(e){Bh(e.data)},Jh=function(e){Rh.postMessage(Gh(e),$f.protocol+"//"+$f.host)};Fh&&jh||(Fh=function(e){Dh(arguments.length,1);var t=Eh(e)?e:Mh(e),r=Ch(arguments,1);return Uh[++Hh]=function(){Th(t,void 0,r)},eh(Hh),Hh},jh=function(e){delete Uh[e]},Zh?eh=function(e){Vh.nextTick(Kh(e))}:Wh&&Wh.now?eh=function(e){Wh.now(Kh(e))}:Nh&&!Ah?(rh=(th=new Nh).port2,th.port1.onmessage=Yh,eh=xh(rh.postMessage,rh)):Rh.addEventListener&&Eh(Rh.postMessage)&&!Rh.importScripts&&$f&&"file:"!==$f.protocol&&!Oh(Jh)?(eh=Jh,Rh.addEventListener("message",Yh,!1)):eh=Xh in Ph("script")?function(e){Ih.appendChild(Ph("script"))[Xh]=function(){Ih.removeChild(this),Bh(e)}}:function(e){setTimeout(Kh(e),0)});var zh={set:Fh,clear:jh},Qh=function(){this.head=null,this.tail=null};Qh.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 qh,$h,ep,tp,rp,np=Qh,ip=/ipad|iphone|ipod/i.test(ue)&&"undefined"!=typeof Pebble,op=/web0s(?!.*chrome)/i.test(ue),ap=i,sp=zt,up=L.f,lp=zh.set,cp=np,dp=kh,fp=ip,hp=op,pp=nh,vp=ap.MutationObserver||ap.WebKitMutationObserver,mp=ap.document,yp=ap.process,gp=ap.Promise,_p=up(ap,"queueMicrotask"),bp=_p&&_p.value;if(!bp){var wp=new cp,Sp=function(){var e,t;for(pp&&(e=yp.domain)&&e.exit();t=wp.get();)try{t()}catch(jP){throw wp.head&&qh(),jP}e&&e.enter()};dp||pp||hp||!vp||!mp?!fp&&gp&&gp.resolve?((tp=gp.resolve(void 0)).constructor=gp,rp=sp(tp.then,tp),qh=function(){rp(Sp)}):pp?qh=function(){yp.nextTick(Sp)}:(lp=sp(lp,ap),qh=function(){lp(Sp)}):($h=!0,ep=mp.createTextNode(""),new vp(Sp).observe(ep,{characterData:!0}),qh=function(){ep.data=$h=!$h}),bp=function(e){wp.head||qh(),wp.add(e)}}var kp=bp,Rp=function(e){try{return{error:!1,value:e()}}catch(jP){return{error:!0,value:jP}}},Tp=i.Promise,xp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Ep=!xp&&!nh&&"object"==typeof window&&"object"==typeof document,Lp=i,Op=Tp,Ip=E,Cp=Bt,Pp=on,Dp=ft,Ap=Ep,Zp=xp,Fp=ve,jp=Op&&Op.prototype,Vp=Dp("species"),Wp=!1,Mp=Ip(Lp.PromiseRejectionEvent),Np={CONSTRUCTOR:Cp("Promise",(function(){var e=Pp(Op),t=e!==String(Op);if(!t&&66===Fp)return!0;if(!jp.catch||!jp.finally)return!0;if(!Fp||Fp<51||!/native code/.test(e)){var r=new Op((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Vp]=n,!(Wp=r.then((function(){}))instanceof n))return!0}return!t&&(Ap||Zp)&&!Mp})),REJECTION_EVENT:Mp,SUBCLASSING:Wp},Gp={},Hp=Ce,Up=TypeError,Xp=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw Up("Bad Promise constructor");t=e,r=n})),this.resolve=Hp(t),this.reject=Hp(r)};Gp.f=function(e){return new Xp(e)};var Bp,Kp,Yp=Lr,Jp=nh,zp=i,Qp=P,qp=no,$p=Io,ev=uh,tv=Ce,rv=E,nv=ee,iv=dh,ov=bh,av=zh.set,sv=kp,uv=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(jP){}},lv=Rp,cv=np,dv=Bo,fv=Tp,hv=Np,pv=Gp,vv="Promise",mv=hv.CONSTRUCTOR,yv=hv.REJECTION_EVENT,gv=dv.getterFor(vv),_v=dv.set,bv=fv&&fv.prototype,wv=fv,Sv=bv,kv=zp.TypeError,Rv=zp.document,Tv=zp.process,xv=pv.f,Ev=xv,Lv=!!(Rv&&Rv.createEvent&&zp.dispatchEvent),Ov="unhandledrejection",Iv=function(e){var t;return!(!nv(e)||!rv(t=e.then))&&t},Cv=function(e,t){var r,n,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Fv(t),t.rejection=1),!0===s?r=o:(c&&c.enter(),r=s(o),c&&(c.exit(),i=!0)),r===e.promise?l(kv("Promise-chain cycle")):(n=Iv(r))?Qp(n,r,u,l):u(r)):l(o)}catch(jP){c&&!i&&c.exit(),l(jP)}},Pv=function(e,t){e.notified||(e.notified=!0,sv((function(){for(var r,n=e.reactions;r=n.get();)Cv(r,e);e.notified=!1,t&&!e.rejection&&Av(e)})))},Dv=function(e,t,r){var n,i;Lv?((n=Rv.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),zp.dispatchEvent(n)):n={promise:t,reason:r},!yv&&(i=zp["on"+e])?i(n):e===Ov&&uv("Unhandled promise rejection",r)},Av=function(e){Qp(av,zp,(function(){var t,r=e.facade,n=e.value;if(Zv(e)&&(t=lv((function(){Jp?Tv.emit("unhandledRejection",n,r):Dv(Ov,r,n)})),e.rejection=Jp||Zv(e)?2:1,t.error))throw t.value}))},Zv=function(e){return 1!==e.rejection&&!e.parent},Fv=function(e){Qp(av,zp,(function(){var t=e.facade;Jp?Tv.emit("rejectionHandled",t):Dv("rejectionhandled",t,e.value)}))},jv=function(e,t,r){return function(n){e(t,n,r)}},Vv=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Pv(e,!0))},Wv=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw kv("Promise can't be resolved itself");var n=Iv(t);n?sv((function(){var r={done:!1};try{Qp(n,t,jv(Wv,r,e),jv(Vv,r,e))}catch(jP){Vv(r,jP,e)}})):(e.value=t,e.state=1,Pv(e,!1))}catch(jP){Vv({done:!1},jP,e)}}};mv&&(Sv=(wv=function(e){iv(this,Sv),tv(e),Qp(Bp,this);var t=gv(this);try{e(jv(Wv,t),jv(Vv,t))}catch(jP){Vv(t,jP)}}).prototype,(Bp=function(e){_v(this,{type:vv,done:!1,notified:!1,parent:!1,reactions:new cv,rejection:!1,state:0,value:void 0})}).prototype=qp(Sv,"then",(function(e,t){var r=gv(this),n=xv(ov(this,wv));return r.parent=!0,n.ok=!rv(e)||e,n.fail=rv(t)&&t,n.domain=Jp?Tv.domain:void 0,0==r.state?r.reactions.add(n):sv((function(){Cv(n,r)})),n.promise})),Kp=function(){var e=new Bp,t=gv(e);this.promise=e,this.resolve=jv(Wv,t),this.reject=jv(Vv,t)},pv.f=xv=function(e){return e===wv||undefined===e?new Kp(e):Ev(e)}),Yp({global:!0,constructor:!0,wrap:!0,forced:mv},{Promise:wv}),$p(wv,vv,!1,!0),ev(vv);var Mv=ft("iterator"),Nv=!1;try{var Gv=0,Hv={next:function(){return{done:!!Gv++}},return:function(){Nv=!0}};Hv[Mv]=function(){return this},Array.from(Hv,(function(){throw 2}))}catch(jP){}var Uv=function(e,t){if(!t&&!Nv)return!1;var r=!1;try{var n={};n[Mv]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(jP){}return r},Xv=Tp,Bv=Np.CONSTRUCTOR||!Uv((function(e){Xv.all(e).then(void 0,(function(){}))})),Kv=P,Yv=Ce,Jv=Gp,zv=Rp,Qv=Af;Lr({target:"Promise",stat:!0,forced:Bv},{all:function(e){var t=this,r=Jv.f(t),n=r.resolve,i=r.reject,o=zv((function(){var r=Yv(t.resolve),o=[],a=0,s=1;Qv(e,(function(e){var u=a++,l=!1;s++,Kv(r,t,e).then((function(e){l||(l=!0,o[u]=e,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var qv=Lr,$v=Np.CONSTRUCTOR;Tp&&Tp.prototype,qv({target:"Promise",proto:!0,forced:$v,real:!0},{catch:function(e){return this.then(void 0,e)}});var em=P,tm=Ce,rm=Gp,nm=Rp,im=Af;Lr({target:"Promise",stat:!0,forced:Bv},{race:function(e){var t=this,r=rm.f(t),n=r.reject,i=nm((function(){var i=tm(t.resolve);im(e,(function(e){em(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var om=P,am=Gp;Lr({target:"Promise",stat:!0,forced:Np.CONSTRUCTOR},{reject:function(e){var t=am.f(this);return om(t.reject,void 0,e),t.promise}});var sm=rr,um=ee,lm=Gp,cm=function(e,t){if(sm(e),um(t)&&t.constructor===e)return t;var r=lm.f(e);return(0,r.resolve)(t),r.promise},dm=Lr,fm=Tp,hm=Np.CONSTRUCTOR,pm=cm,vm=ae("Promise"),mm=!hm;dm({target:"Promise",stat:!0,forced:true},{resolve:function(e){return pm(mm&&this===vm?fm:this,e)}});var ym=P,gm=Ce,_m=Gp,bm=Rp,wm=Af;Lr({target:"Promise",stat:!0,forced:Bv},{allSettled:function(e){var t=this,r=_m.f(t),n=r.resolve,i=r.reject,o=bm((function(){var r=gm(t.resolve),i=[],o=0,a=1;wm(e,(function(e){var s=o++,u=!1;a++,ym(r,t,e).then((function(e){u||(u=!0,i[s]={status:"fulfilled",value:e},--a||n(i))}),(function(e){u||(u=!0,i[s]={status:"rejected",reason:e},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Sm=P,km=Ce,Rm=ae,Tm=Gp,xm=Rp,Em=Af,Lm="No one promise resolved";Lr({target:"Promise",stat:!0,forced:Bv},{any:function(e){var t=this,r=Rm("AggregateError"),n=Tm.f(t),i=n.resolve,o=n.reject,a=xm((function(){var n=km(t.resolve),a=[],s=0,u=1,l=!1;Em(e,(function(e){var c=s++,d=!1;u++,Sm(n,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,a[c]=e,--u||o(new r(a,Lm)))}))})),--u||o(new r(a,Lm))}));return a.error&&o(a.value),n.promise}});var Om=Lr,Im=Tp,Cm=o,Pm=ae,Dm=E,Am=bh,Zm=cm,Fm=Im&&Im.prototype;Om({target:"Promise",proto:!0,real:!0,forced:!!Im&&Cm((function(){Fm.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Am(this,Pm("Promise")),r=Dm(e);return this.then(r?function(r){return Zm(t,e()).then((function(){return r}))}:e,r?function(r){return Zm(t,e()).then((function(){throw r}))}:e)}});var jm=te.Promise,Vm=Gp,Wm=Rp;Lr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Vm.f(this),r=Wm(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var Mm=r(jm),Nm=Lr,Gm=Ir,Hm=m([].reverse),Um=[1,2];Nm({target:"Array",proto:!0,forced:String(Um)===String(Um.reverse())},{reverse:function(){return Gm(this)&&(this.length=this.length),Hm(this)}});var Xm=jc("Array").reverse,Bm=se,Km=Xm,Ym=Array.prototype,Jm=r((function(e){var t=e.reverse;return e===Ym||Bm(Ym,e)&&t===Ym.reverse?Km:t})),zm=Lr,Qm=Ir,qm=_n,$m=ee,ey=qn,ty=Wr,ry=Q,ny=Xr,iy=ft,oy=Rs,ay=In("slice"),sy=iy("species"),uy=Array,ly=Math.max;zm({target:"Array",proto:!0,forced:!ay},{slice:function(e,t){var r,n,i,o=ry(this),a=ty(o),s=ey(e,a),u=ey(void 0===t?a:t,a);if(Qm(o)&&(r=o.constructor,(qm(r)&&(r===uy||Qm(r.prototype))||$m(r)&&null===(r=r[sy]))&&(r=void 0),r===uy||void 0===r))return oy(o,s,u);for(n=new(void 0===r?uy:r)(ly(u-s,0)),i=0;s<u;s++,i++)s in o&&ny(n,i,o[s]);return n.length=i,n}});var cy=jc("Array").slice,dy=se,fy=cy,hy=Array.prototype,py=r((function(e){var t=e.slice;return e===hy||dy(hy,e)&&t===hy.slice?fy:t})),vy=m,my=Ce,yy=ee,gy=qe,_y=Rs,by=a,wy=Function,Sy=vy([].concat),ky=vy([].join),Ry={},Ty=by?wy.bind:function(e){var t=my(this),r=t.prototype,n=_y(arguments,1),i=function(){var r=Sy(n,_y(arguments));return this instanceof i?function(e,t,r){if(!gy(Ry,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ry[t]=wy("C,a","return new C("+ky(n,",")+")")}return Ry[t](e,r)}(t,r.length,r):t.apply(e,r)};return yy(r)&&(i.prototype=r),i},xy=Ty;Lr({target:"Function",proto:!0,forced:Function.bind!==xy},{bind:xy});var Ey=jc("Function").bind,Ly=se,Oy=Ey,Iy=Function.prototype,Cy=r((function(e){var t=e.bind;return e===Iy||Ly(Iy,e)&&t===Iy.bind?Oy:t})),Py=Lr,Dy=d,Ay=Ty,Zy=vh,Fy=rr,jy=ee,Vy=Wi,Wy=o,My=ae("Reflect","construct"),Ny=Object.prototype,Gy=[].push,Hy=Wy((function(){function e(){}return!(My((function(){}),[],e)instanceof e)})),Uy=!Wy((function(){My((function(){}))})),Xy=Hy||Uy;Py({target:"Reflect",stat:!0,forced:Xy,sham:Xy},{construct:function(e,t){Zy(e),Fy(t);var r=arguments.length<3?e:Zy(arguments[2]);if(Uy&&!Hy)return My(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 Dy(Gy,n,t),new(Dy(Ay,e,n))}var i=r.prototype,o=Vy(jy(i)?i:Ny),a=Dy(e,o,t);return jy(a)?a:o}});var By=r(te.Reflect.construct),Ky=Lr,Yy=ni.indexOf,Jy=$c,zy=k([].indexOf),Qy=!!zy&&1/zy([1],1,-0)<0;Ky({target:"Array",proto:!0,forced:Qy||!Jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Qy?zy(this,e,t)||0:Yy(this,e,t)}});var qy=jc("Array").indexOf,$y=se,eg=qy,tg=Array.prototype,rg=r((function(e){var t=e.indexOf;return e===tg||$y(tg,e)&&t===tg.indexOf?eg:t}));Lr({target:"Array",stat:!0},{isArray:Ir});var ng=r(te.Array.isArray),ig=rr,og=bf,ag=zt,sg=P,ug=Je,lg=function(e,t,r,n){try{return n?t(ig(r)[0],r[1]):t(r)}catch(jP){og(e,"throw",jP)}},cg=lf,dg=_n,fg=Wr,hg=Xr,pg=mf,vg=Oc,mg=Array,yg=function(e){var t=ug(e),r=dg(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=ag(i,n>2?arguments[2]:void 0));var a,s,u,l,c,d,f=vg(t),h=0;if(!f||this===mg&&cg(f))for(a=fg(t),s=r?new this(a):mg(a);a>h;h++)d=o?i(t[h],h):t[h],hg(s,h,d);else for(c=(l=pg(t,f)).next,s=r?new this:[];!(u=sg(c,l)).done;h++)d=o?lg(l,i,[u.value,h],!0):u.value,hg(s,h,d);return s.length=h,s},gg=yg;Lr({target:"Array",stat:!0,forced:!Uv((function(e){Array.from(e)}))},{from:gg});var _g=r(te.Array.from),bg=r(ao.f("toPrimitive"));function wg(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sg(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ld(r=wg(Object(i),!0)).call(r,(function(t){Og(e,t,i[t])})):bd?Ed(e,bd(i)):ld(n=wg(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function kg(){kg=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Ad||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=Fd(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var d={};function f(){}function h(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Md&&Md(Md(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=p.prototype=f.prototype=Fd(v);function g(e){var t;ld(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==Sc(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(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 R(e){this.tryEntries=[{tryLoc:"root"}],ld(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:x}}function x(){return{value:void 0,done:!0}}return h.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=u(p,s,"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 Nd?Nd(e,p):(e.__proto__=p,u(e,s,"GeneratorFunction")),e.prototype=Fd(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Mm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(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=T,R.prototype={constructor:R,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,ld(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+py(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 a.type="throw",a.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 o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.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 o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},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),d}},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 new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function Rg(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(jP){return void r(jP)}s.done?t(u):Mm.resolve(u).then(n,i)}function Tg(e){return function(){var t=this,r=arguments;return new Mm((function(n,i){var o=e.apply(t,r);function a(e){Rg(o,n,i,a,s,"next",e)}function s(e){Rg(o,n,i,a,s,"throw",e)}a(void 0)}))}}function xg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eg(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),Ad(e,Mg(n.key),n)}}function Lg(e,t,r){return t&&Eg(e.prototype,t),r&&Eg(e,r),Ad(e,"prototype",{writable:!1}),e}function Og(e,t,r){return(t=Mg(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ig(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Fd(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ad(e,"prototype",{writable:!1}),t&&Pg(e,t)}function Cg(e){var t;return(Cg=Nd?Cy(t=Md).call(t):function(e){return e.__proto__||Md(e)})(e)}function Pg(e,t){var r;return(Pg=Nd?Cy(r=Nd).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function Dg(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Dc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(Ac){var o=Ac(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ag(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zg(e){var t=function(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cg(e);if(t){var i=Cg(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ag(e)}(this,r)}}function Fg(e,t){return function(e){if(ng(e))return e}(e)||function(e,t){var r=null==e?null:void 0!==kc&&Ic(e)||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||Vg(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jg(e){return function(e){if(ng(e))return Wg(e)}(e)||function(e){if(void 0!==kc&&null!=Ic(e)||null!=e["@@iterator"])return _g(e)}(e)||Vg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vg(e,t){var r;if(e){if("string"==typeof e)return Wg(e,t);var n=py(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wg(e,t):void 0}}function Wg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Mg(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var Ng,Gg="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Hg=i,Ug=d,Xg=E,Bg=Gg,Kg=ue,Yg=Rs,Jg=Sh,zg=Hg.Function,Qg=/MSIE .\./.test(Kg)||Bg&&((Ng=Hg.Bun.version.split(".")).length<3||0==Ng[0]&&(Ng[1]<3||3==Ng[1]&&0==Ng[2])),qg=function(e,t){var r=t?2:1;return Qg?function(n,i){var o=Jg(arguments.length,1)>r,a=Xg(n)?n:zg(n),s=o?Yg(arguments,r):[],u=o?function(){Ug(a,this,s)}:a;return t?e(u,i):e(u)}:e},$g=Lr,e_=i,t_=qg(e_.setInterval,!0);$g({global:!0,bind:!0,forced:e_.setInterval!==t_},{setInterval:t_});var r_=Lr,n_=i,i_=qg(n_.setTimeout,!0);r_({global:!0,bind:!0,forced:n_.setTimeout!==i_},{setTimeout:i_});var o_=r(te.setTimeout),a_=o,s_=ft("iterator"),u_=!a_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!e.toJSON||!t.size&&true||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s_]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),l_=O,c_=m,d_=P,f_=o,h_=pi,p_=to,v_=D,m_=Je,y_=U,g_=Object.assign,__=Object.defineProperty,b_=c_([].concat),w_=!g_||f_((function(){if(l_&&1!==g_({b:1},g_(__({},"a",{enumerable:!0,get:function(){__(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!=g_({},e)[r]||h_(g_({},t)).join("")!=n}))?function(e,t){for(var r=m_(e),n=arguments.length,i=1,o=p_.f,a=v_.f;n>i;)for(var s,u=y_(arguments[i++]),l=o?b_(h_(u),o(u)):h_(u),c=l.length,d=0;c>d;)s=l[d++],l_&&!d_(a,u,s)||(r[s]=u[s]);return r}:g_,S_=m,k_=2147483647,R_=/[^\0-\u007E]/,T_=/[.\u3002\uFF0E\uFF61]/g,x_="Overflow: input needs wider integers to process",E_=RangeError,L_=S_(T_.exec),O_=Math.floor,I_=String.fromCharCode,C_=S_("".charCodeAt),P_=S_([].join),D_=S_([].push),A_=S_("".replace),Z_=S_("".split),F_=S_("".toLowerCase),j_=function(e){return e+22+75*(e<26)},V_=function(e,t,r){var n=0;for(e=r?O_(e/700):e>>1,e+=O_(e/t);e>455;)e=O_(e/35),n+=36;return O_(n+36*e/(e+38))},W_=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=C_(e,r++);if(i>=55296&&i<=56319&&r<n){var o=C_(e,r++);56320==(64512&o)?D_(t,((1023&i)<<10)+(1023&o)+65536):(D_(t,i),r--)}else D_(t,i)}return t}(e);var r,n,i=e.length,o=128,a=0,s=72;for(r=0;r<e.length;r++)(n=e[r])<128&&D_(t,I_(n));var u=t.length,l=u;for(u&&D_(t,"-");l<i;){var c=k_;for(r=0;r<e.length;r++)(n=e[r])>=o&&n<c&&(c=n);var d=l+1;if(c-o>O_((k_-a)/d))throw E_(x_);for(a+=(c-o)*d,o=c,r=0;r<e.length;r++){if((n=e[r])<o&&++a>k_)throw E_(x_);if(n==o){for(var f=a,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(f<p)break;var v=f-p,m=36-p;D_(t,I_(j_(p+v%m))),f=O_(v/m),h+=36}D_(t,I_(j_(f))),s=V_(a,d,l==u),a=0,l++}}a++,o++}return P_(t,"")},M_=no,N_=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:M_(e,n,t[n],r);return e},G_=Ji,H_=Math.floor,U_=function(e,t){var r=e.length,n=H_(r/2);return r<8?X_(e,t):B_(e,U_(G_(e,0,n),t),U_(G_(e,n),t),t)},X_=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},B_=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?n(t[a],r[s])<=0?t[a++]:r[s++]:a<i?t[a++]:r[s++];return e},K_=U_,Y_=Lr,J_=i,z_=P,Q_=m,q_=O,$_=u_,eb=no,tb=oo,rb=N_,nb=Io,ib=Gu,ob=Bo,ab=dh,sb=E,ub=qe,lb=zt,cb=en,db=rr,fb=ee,hb=Kn,pb=Wi,vb=W,mb=mf,yb=Oc,gb=Sh,_b=K_,bb=ft("iterator"),wb="URLSearchParams",Sb=wb+"Iterator",kb=ob.set,Rb=ob.getterFor(wb),Tb=ob.getterFor(Sb),xb=Object.getOwnPropertyDescriptor,Eb=function(e){if(!q_)return J_[e];var t=xb(J_,e);return t&&t.value},Lb=Eb("fetch"),Ob=Eb("Request"),Ib=Eb("Headers"),Cb=Ob&&Ob.prototype,Pb=Ib&&Ib.prototype,Db=J_.RegExp,Ab=J_.TypeError,Zb=J_.decodeURIComponent,Fb=J_.encodeURIComponent,jb=Q_("".charAt),Vb=Q_([].join),Wb=Q_([].push),Mb=Q_("".replace),Nb=Q_([].shift),Gb=Q_([].splice),Hb=Q_("".split),Ub=Q_("".slice),Xb=/\+/g,Bb=Array(4),Kb=function(e){return Bb[e-1]||(Bb[e-1]=Db("((?:%[\\da-f]{2}){"+e+"})","gi"))},Yb=function(e){try{return Zb(e)}catch(jP){return e}},Jb=function(e){var t=Mb(e,Xb," "),r=4;try{return Zb(t)}catch(jP){for(;r;)t=Mb(t,Kb(r--),Yb);return t}},zb=/[!'()~]|%20/g,Qb={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},qb=function(e){return Qb[e]},$b=function(e){return Mb(Fb(e),zb,qb)},ew=ib((function(e,t){kb(this,{type:Sb,iterator:mb(Rb(e).entries),kind:t})}),"Iterator",(function(){var e=Tb(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),tw=function(e){this.entries=[],this.url=null,void 0!==e&&(fb(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===jb(e,0)?Ub(e,1):e:hb(e)))};tw.prototype={type:wb,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,o,a,s,u=yb(e);if(u)for(r=(t=mb(e,u)).next;!(n=z_(r,t)).done;){if(o=(i=mb(db(n.value))).next,(a=z_(o,i)).done||(s=z_(o,i)).done||!z_(o,i).done)throw Ab("Expected sequence with length 2");Wb(this.entries,{key:hb(a.value),value:hb(s.value)})}else for(var l in e)ub(e,l)&&Wb(this.entries,{key:l,value:hb(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=Hb(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=Hb(t,"="),Wb(this.entries,{key:Jb(Nb(r)),value:Jb(Vb(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Wb(r,$b(e.key)+"="+$b(e.value));return Vb(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var rw=function(){ab(this,nw);var e=kb(this,new tw(arguments.length>0?arguments[0]:void 0));q_||(this.length=e.entries.length)},nw=rw.prototype;if(rb(nw,{append:function(e,t){gb(arguments.length,2);var r=Rb(this);Wb(r.entries,{key:hb(e),value:hb(t)}),q_||this.length++,r.updateURL()},delete:function(e){gb(arguments.length,1);for(var t=Rb(this),r=t.entries,n=hb(e),i=0;i<r.length;)r[i].key===n?Gb(r,i,1):i++;q_||(this.length=r.length),t.updateURL()},get:function(e){gb(arguments.length,1);for(var t=Rb(this).entries,r=hb(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){gb(arguments.length,1);for(var t=Rb(this).entries,r=hb(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Wb(n,t[i].value);return n},has:function(e){gb(arguments.length,1);for(var t=Rb(this).entries,r=hb(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){gb(arguments.length,1);for(var r,n=Rb(this),i=n.entries,o=!1,a=hb(e),s=hb(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Gb(i,u--,1):(o=!0,r.value=s));o||Wb(i,{key:a,value:s}),q_||(this.length=i.length),n.updateURL()},sort:function(){var e=Rb(this);_b(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Rb(this).entries,n=lb(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new ew(this,"keys")},values:function(){return new ew(this,"values")},entries:function(){return new ew(this,"entries")}},{enumerable:!0}),eb(nw,bb,nw.entries,{name:"entries"}),eb(nw,"toString",(function(){return Rb(this).serialize()}),{enumerable:!0}),q_&&tb(nw,"size",{get:function(){return Rb(this).entries.length},configurable:!0,enumerable:!0}),nb(rw,wb),Y_({global:!0,constructor:!0,forced:!$_},{URLSearchParams:rw}),!$_&&sb(Ib)){var iw=Q_(Pb.has),ow=Q_(Pb.set),aw=function(e){if(fb(e)){var t,r=e.body;if(cb(r)===wb)return t=e.headers?new Ib(e.headers):new Ib,iw(t,"content-type")||ow(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),pb(e,{body:vb(0,hb(r)),headers:vb(0,t)})}return e};if(sb(Lb)&&Y_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Lb(e,arguments.length>1?aw(arguments[1]):{})}}),sb(Ob)){var sw=function(e){return ab(this,Cb),new Ob(e,arguments.length>1?aw(arguments[1]):{})};Cb.constructor=sw,sw.prototype=Cb,Y_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:sw})}}var uw,lw=Lr,cw=O,dw=u_,fw=i,hw=zt,pw=m,vw=no,mw=oo,yw=dh,gw=qe,_w=w_,bw=yg,ww=Ji,Sw=dc.codeAt,kw=function(e){var t,r,n=[],i=Z_(A_(F_(e),T_,"."),".");for(t=0;t<i.length;t++)r=i[t],D_(n,L_(R_,r)?"xn--"+W_(r):r);return P_(n,".")},Rw=Kn,Tw=Io,xw=Sh,Ew={URLSearchParams:rw,getState:Rb},Lw=Bo,Ow=Lw.set,Iw=Lw.getterFor("URL"),Cw=Ew.URLSearchParams,Pw=Ew.getState,Dw=fw.URL,Aw=fw.TypeError,Zw=fw.parseInt,Fw=Math.floor,jw=Math.pow,Vw=pw("".charAt),Ww=pw(/./.exec),Mw=pw([].join),Nw=pw(1..toString),Gw=pw([].pop),Hw=pw([].push),Uw=pw("".replace),Xw=pw([].shift),Bw=pw("".split),Kw=pw("".slice),Yw=pw("".toLowerCase),Jw=pw([].unshift),zw="Invalid scheme",Qw="Invalid host",qw="Invalid port",$w=/[a-z]/i,eS=/[\d+-.a-z]/i,tS=/\d/,rS=/^0x/i,nS=/^[0-7]+$/,iS=/^\d+$/,oS=/^[\da-f]+$/i,aS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,sS=/[\0\t\n\r #/:<>?@[\\\]^|]/,uS=/^[\u0000-\u0020]+/,lS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,cS=/[\t\n\r]/g,dS=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Jw(t,e%256),e=Fw(e/256);return Mw(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,o=0;o<8;o++)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=Nw(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},fS={},hS=_w({},fS,{" ":1,'"':1,"<":1,">":1,"`":1}),pS=_w({},hS,{"#":1,"?":1,"{":1,"}":1}),vS=_w({},pS,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),mS=function(e,t){var r=Sw(e,0);return r>32&&r<127&&!gw(t,e)?e:encodeURIComponent(e)},yS={ftp:21,file:null,http:80,https:443,ws:80,wss:443},gS=function(e,t){var r;return 2==e.length&&Ww($w,Vw(e,0))&&(":"==(r=Vw(e,1))||!t&&"|"==r)},_S=function(e){var t;return e.length>1&&gS(Kw(e,0,2))&&(2==e.length||"/"===(t=Vw(e,2))||"\\"===t||"?"===t||"#"===t)},bS=function(e){return"."===e||"%2e"===Yw(e)},wS={},SS={},kS={},RS={},TS={},xS={},ES={},LS={},OS={},IS={},CS={},PS={},DS={},AS={},ZS={},FS={},jS={},VS={},WS={},MS={},NS={},GS=function(e,t,r){var n,i,o,a=Rw(e);if(t){if(i=this.parse(a))throw Aw(i);this.searchParams=null}else{if(void 0!==r&&(n=new GS(r,!0)),i=this.parse(a,null,n))throw Aw(i);(o=Pw(new Cw)).bindURL(this),this.searchParams=o}};GS.prototype={type:"URL",parse:function(e,t,r){var n,i,o,a,s,u=this,l=t||wS,c=0,d="",f=!1,h=!1,p=!1;for(e=Rw(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=Uw(e,uS,""),e=Uw(e,lS,"$1")),e=Uw(e,cS,""),n=bw(e);c<=n.length;){switch(i=n[c],l){case wS:if(!i||!Ww($w,i)){if(t)return zw;l=kS;continue}d+=Yw(i),l=SS;break;case SS:if(i&&(Ww(eS,i)||"+"==i||"-"==i||"."==i))d+=Yw(i);else{if(":"!=i){if(t)return zw;d="",l=kS,c=0;continue}if(t&&(u.isSpecial()!=gw(yS,d)||"file"==d&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=d,t)return void(u.isSpecial()&&yS[u.scheme]==u.port&&(u.port=null));d="","file"==u.scheme?l=AS:u.isSpecial()&&r&&r.scheme==u.scheme?l=RS:u.isSpecial()?l=LS:"/"==n[c+1]?(l=TS,c++):(u.cannotBeABaseURL=!0,Hw(u.path,""),l=WS)}break;case kS:if(!r||r.cannotBeABaseURL&&"#"!=i)return zw;if(r.cannotBeABaseURL&&"#"==i){u.scheme=r.scheme,u.path=ww(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=NS;break}l="file"==r.scheme?AS:xS;continue;case RS:if("/"!=i||"/"!=n[c+1]){l=xS;continue}l=OS,c++;break;case TS:if("/"==i){l=IS;break}l=VS;continue;case xS:if(u.scheme=r.scheme,i==uw)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ww(r.path),u.query=r.query;else if("/"==i||"\\"==i&&u.isSpecial())l=ES;else if("?"==i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ww(r.path),u.query="",l=MS;else{if("#"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ww(r.path),u.path.length--,l=VS;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=ww(r.path),u.query=r.query,u.fragment="",l=NS}break;case ES:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=VS;continue}l=IS}else l=OS;break;case LS:if(l=OS,"/"!=i||"/"!=Vw(d,c+1))continue;c++;break;case OS:if("/"!=i&&"\\"!=i){l=IS;continue}break;case IS:if("@"==i){f&&(d="%40"+d),f=!0,o=bw(d);for(var v=0;v<o.length;v++){var m=o[v];if(":"!=m||p){var y=mS(m,vS);p?u.password+=y:u.username+=y}else p=!0}d=""}else if(i==uw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(f&&""==d)return"Invalid authority";c-=bw(d).length+1,d="",l=CS}else d+=i;break;case CS:case PS:if(t&&"file"==u.scheme){l=FS;continue}if(":"!=i||h){if(i==uw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==d)return Qw;if(t&&""==d&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(d))return a;if(d="",l=jS,t)return;continue}"["==i?h=!0:"]"==i&&(h=!1),d+=i}else{if(""==d)return Qw;if(a=u.parseHost(d))return a;if(d="",l=DS,t==PS)return}break;case DS:if(!Ww(tS,i)){if(i==uw||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||t){if(""!=d){var g=Zw(d,10);if(g>65535)return qw;u.port=u.isSpecial()&&g===yS[u.scheme]?null:g,d=""}if(t)return;l=jS;continue}return qw}d+=i;break;case AS:if(u.scheme="file","/"==i||"\\"==i)l=ZS;else{if(!r||"file"!=r.scheme){l=VS;continue}if(i==uw)u.host=r.host,u.path=ww(r.path),u.query=r.query;else if("?"==i)u.host=r.host,u.path=ww(r.path),u.query="",l=MS;else{if("#"!=i){_S(Mw(ww(n,c),""))||(u.host=r.host,u.path=ww(r.path),u.shortenPath()),l=VS;continue}u.host=r.host,u.path=ww(r.path),u.query=r.query,u.fragment="",l=NS}}break;case ZS:if("/"==i||"\\"==i){l=FS;break}r&&"file"==r.scheme&&!_S(Mw(ww(n,c),""))&&(gS(r.path[0],!0)?Hw(u.path,r.path[0]):u.host=r.host),l=VS;continue;case FS:if(i==uw||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&gS(d))l=VS;else if(""==d){if(u.host="",t)return;l=jS}else{if(a=u.parseHost(d))return a;if("localhost"==u.host&&(u.host=""),t)return;d="",l=jS}continue}d+=i;break;case jS:if(u.isSpecial()){if(l=VS,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=uw&&(l=VS,"/"!=i))continue}else u.fragment="",l=NS;else u.query="",l=MS;break;case VS:if(i==uw||"/"==i||"\\"==i&&u.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Yw(s=d))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||Hw(u.path,"")):bS(d)?"/"==i||"\\"==i&&u.isSpecial()||Hw(u.path,""):("file"==u.scheme&&!u.path.length&&gS(d)&&(u.host&&(u.host=""),d=Vw(d,0)+":"),Hw(u.path,d)),d="","file"==u.scheme&&(i==uw||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)Xw(u.path);"?"==i?(u.query="",l=MS):"#"==i&&(u.fragment="",l=NS)}else d+=mS(i,pS);break;case WS:"?"==i?(u.query="",l=MS):"#"==i?(u.fragment="",l=NS):i!=uw&&(u.path[0]+=mS(i,fS));break;case MS:t||"#"!=i?i!=uw&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":mS(i,fS)):(u.fragment="",l=NS);break;case NS:i!=uw&&(u.fragment+=mS(i,hS))}c++}},parseHost:function(e){var t,r,n;if("["==Vw(e,0)){if("]"!=Vw(e,e.length-1))return Qw;if(t=function(e){var t,r,n,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,d=0,f=function(){return Vw(e,d)};if(":"==f()){if(":"!=Vw(e,1))return;d+=2,c=++l}for(;f();){if(8==l)return;if(":"!=f()){for(t=r=0;r<4&&Ww(oS,f());)t=16*t+Zw(f(),16),d++,r++;if("."==f()){if(0==r)return;if(d-=r,l>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;d++}if(!Ww(tS,f()))return;for(;Ww(tS,f());){if(o=Zw(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}u[l]=256*u[l]+i,2!=++n&&4!=n||l++}if(4!=n)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;u[l++]=t}else{if(null!==c)return;d++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(Kw(e,1,-1)),!t)return Qw;this.host=t}else if(this.isSpecial()){if(e=kw(e),Ww(aS,e))return Qw;if(t=function(e){var t,r,n,i,o,a,s,u=Bw(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=u[n]))return e;if(o=10,i.length>1&&"0"==Vw(i,0)&&(o=Ww(rS,i)?16:8,i=Kw(i,8==o?1:2)),""===i)a=0;else{if(!Ww(10==o?iS:8==o?nS:oS,i))return e;a=Zw(i,o)}Hw(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=jw(256,5-t))return null}else if(a>255)return null;for(s=Gw(r),n=0;n<r.length;n++)s+=r[n]*jw(256,3-n);return s}(e),null===t)return Qw;this.host=t}else{if(Ww(sS,e))return Qw;for(t="",r=bw(e),n=0;n<r.length;n++)t+=mS(r[n],fS);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return gw(yS,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&gS(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=r+(n?":"+n:"")+"@"),l+=dS(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Mw(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){var t=this.parse(e);if(t)throw Aw(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new HS(e.path[0]).origin}catch(jP){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+dS(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Rw(e)+":",wS)},getUsername:function(){return this.username},setUsername:function(e){var t=bw(Rw(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=mS(t[r],vS)}},getPassword:function(){return this.password},setPassword:function(e){var t=bw(Rw(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=mS(t[r],vS)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?dS(e):dS(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,CS)},getHostname:function(){var e=this.host;return null===e?"":dS(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,PS)},getPort:function(){var e=this.port;return null===e?"":Rw(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Rw(e))?this.port=null:this.parse(e,DS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Mw(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,jS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Rw(e))?this.query=null:("?"==Vw(e,0)&&(e=Kw(e,1)),this.query="",this.parse(e,MS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Rw(e))?("#"==Vw(e,0)&&(e=Kw(e,1)),this.fragment="",this.parse(e,NS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var HS=function(e){var t=yw(this,US),r=xw(arguments.length,1)>1?arguments[1]:void 0,n=Ow(t,new GS(e,!1,r));cw||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},US=HS.prototype,XS=function(e,t){return{get:function(){return Iw(this)[e]()},set:t&&function(e){return Iw(this)[t](e)},configurable:!0,enumerable:!0}};if(cw&&(mw(US,"href",XS("serialize","setHref")),mw(US,"origin",XS("getOrigin")),mw(US,"protocol",XS("getProtocol","setProtocol")),mw(US,"username",XS("getUsername","setUsername")),mw(US,"password",XS("getPassword","setPassword")),mw(US,"host",XS("getHost","setHost")),mw(US,"hostname",XS("getHostname","setHostname")),mw(US,"port",XS("getPort","setPort")),mw(US,"pathname",XS("getPathname","setPathname")),mw(US,"search",XS("getSearch","setSearch")),mw(US,"searchParams",XS("getSearchParams")),mw(US,"hash",XS("getHash","setHash"))),vw(US,"toJSON",(function(){return Iw(this).serialize()}),{enumerable:!0}),vw(US,"toString",(function(){return Iw(this).serialize()}),{enumerable:!0}),Dw){var BS=Dw.createObjectURL,KS=Dw.revokeObjectURL;BS&&vw(HS,"createObjectURL",hw(BS,Dw)),KS&&vw(HS,"revokeObjectURL",hw(KS,Dw))}Tw(HS,"URL"),lw({global:!0,constructor:!0,forced:!dw,sham:!cw},{URL:HS});var YS=Lr,JS=o,zS=Sh,QS=Kn,qS=u_,$S=ae("URL");YS({target:"URL",stat:!0,forced:!(qS&&JS((function(){$S.canParse()})))},{canParse:function(e){var t=zS(arguments.length,1),r=QS(e),n=t<2||void 0===arguments[1]?void 0:QS(arguments[1]);try{return!!new $S(r,n)}catch(jP){return!1}}});var ek=r(te.URL),tk=Lr,rk=ea.find,nk="find",ik=!0;nk in[]&&Array(1)[nk]((function(){ik=!1})),tk({target:"Array",proto:!0,forced:ik},{find:function(e){return rk(this,e,arguments.length>1?arguments[1]:void 0)}});var ok=jc("Array").find,ak=se,sk=ok,uk=Array.prototype,lk=r((function(e){var t=e.find;return e===uk||ak(uk,e)&&t===uk.find?sk:t})),ck=jc("Array").concat,dk=se,fk=ck,hk=Array.prototype,pk=r((function(e){var t=e.concat;return e===hk||dk(hk,e)&&t===hk.concat?fk:t})),vk=O,mk=Ir,yk=TypeError,gk=Object.getOwnPropertyDescriptor,_k=vk&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(jP){return jP instanceof TypeError}}(),bk=Ee,wk=TypeError,Sk=function(e,t){if(!delete e[t])throw wk("Cannot delete property "+bk(t)+" of "+bk(e))},kk=Lr,Rk=Je,Tk=qn,xk=Ar,Ek=Wr,Lk=_k?function(e,t){if(mk(e)&&!gk(e,"length").writable)throw yk("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ok=Nr,Ik=xn,Ck=Xr,Pk=Sk,Dk=In("splice"),Ak=Math.max,Zk=Math.min;kk({target:"Array",proto:!0,forced:!Dk},{splice:function(e,t){var r,n,i,o,a,s,u=Rk(this),l=Ek(u),c=Tk(e,l),d=arguments.length;for(0===d?r=n=0:1===d?(r=0,n=l-c):(r=d-2,n=Zk(Ak(xk(t),0),l-c)),Ok(l+r-n),i=Ik(u,n),o=0;o<n;o++)(a=c+o)in u&&Ck(i,o,u[a]);if(i.length=n,r<n){for(o=c;o<l-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:Pk(u,s);for(o=l;o>l-n+r;o--)Pk(u,o-1)}else if(r>n)for(o=l-n;o>c;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:Pk(u,s);for(o=0;o<r;o++)u[o+c]=arguments[o+2];return Lk(u,l-n+r),i}});var Fk=jc("Array").splice,jk=se,Vk=Fk,Wk=Array.prototype,Mk=r((function(e){var t=e.splice;return e===Wk||jk(Wk,e)&&t===Wk.splice?Vk:t}));Lr({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Nk=r(te.Number.isNaN),Gk="\t\n\v\f\r                 \u2028\u2029\ufeff",Hk=Y,Uk=Kn,Xk=Gk,Bk=m("".replace),Kk=RegExp("^["+Xk+"]+"),Yk=RegExp("(^|[^"+Xk+"])["+Xk+"]+$"),Jk=function(e){return function(t){var r=Uk(Hk(t));return 1&e&&(r=Bk(r,Kk,"")),2&e&&(r=Bk(r,Yk,"$1")),r}},zk={start:Jk(1),end:Jk(2),trim:Jk(3)},Qk=i,qk=o,$k=m,eR=Kn,tR=zk.trim,rR=Gk,nR=Qk.parseInt,iR=Qk.Symbol,oR=iR&&iR.iterator,aR=/^[+-]?0x/i,sR=$k(aR.exec),uR=8!==nR(rR+"08")||22!==nR(rR+"0x16")||oR&&!qk((function(){nR(Object(oR))}))?function(e,t){var r=tR(eR(e));return nR(r,t>>>0||(sR(aR,r)?16:10))}:nR;Lr({global:!0,forced:parseInt!=uR},{parseInt:uR});var lR=r(te.parseInt),cR=ea.map;Lr({target:"Array",proto:!0,forced:!In("map")},{map:function(e){return cR(this,e,arguments.length>1?arguments[1]:void 0)}});var dR=jc("Array").map,fR=se,hR=dR,pR=Array.prototype,vR=r((function(e){var t=e.map;return e===pR||fR(pR,e)&&t===pR.map?hR:t})),mR=w_;Lr({target:"Object",stat:!0,arity:2,forced:Object.assign!==mR},{assign:mR});var yR=r(te.Object.assign),gR=r(bc),_R=qe,bR=P,wR=ee,SR=rr,kR=function(e){return void 0!==e&&(_R(e,"value")||_R(e,"writable"))},RR=L,TR=Tu;Lr({target:"Reflect",stat:!0},{get:function e(t,r){var n,i,o=arguments.length<3?t:arguments[2];return SR(t)===o?t[r]:(n=RR.f(t,r))?kR(n)?n.value:void 0===n.get?void 0:bR(n.get,o):wR(i=TR(t))?e(i,r,o):void 0}});var xR=r(te.Reflect.get);function ER(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function LR(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ld(r=ER(Object(i),!0)).call(r,(function(t){DR(e,t,i[t])})):bd?Ed(e,bd(i)):ld(n=ER(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function OR(e){return(OR="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function IR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CR(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),Ad(e,FR(n.key),n)}}function PR(e,t,r){return t&&CR(e.prototype,t),r&&CR(e,r),Ad(e,"prototype",{writable:!1}),e}function DR(e,t,r){return(t=FR(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AR(e){return function(e){if(ng(e))return ZR(e)}(e)||function(e){if(void 0!==kc&&null!=Ic(e)||null!=e["@@iterator"])return _g(e)}(e)||function(e,t){var r;if(!e)return;if("string"==typeof e)return ZR(e,t);var n=py(r=Object.prototype.toString.call(e)).call(r,8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return _g(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZR(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZR(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function FR(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var jR={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 o(e,t,n,o,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,o||e,a),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Fd&&(n.prototype=Fd(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?py(n).call(n,1):n);return Ac?pk(i).call(i,Ac(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);i<o;i++)a[i]=n[i].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,o,a){var s=r?r+e:e;if(!this._events[s])return!1;var u,l,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(l=1,u=new Array(d-1);l<d;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,h=c.length;for(l=0;l<h;l++)switch(c[l].once&&this.removeListener(e,c[l].fn,void 0,!0),d){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,t);break;case 3:c[l].fn.call(c[l].context,t,n);break;case 4:c[l].fn.call(c[l].context,t,n,i);break;default:if(!u)for(f=1,u=new Array(d-1);f<d;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(jR);var VR=r(jR.exports),WR=ea.some;Lr({target:"Array",proto:!0,forced:!$c("some")},{some:function(e){return WR(this,e,arguments.length>1?arguments[1]:void 0)}});var MR=jc("Array").some,NR=se,GR=MR,HR=Array.prototype,UR=r((function(e){var t=e.some;return e===HR||NR(HR,e)&&t===HR.some?GR:t})),XR=Ar,BR=Kn,KR=Y,YR=RangeError,JR=m,zR=jr,QR=Kn,qR=Y,$R=JR((function(e){var t=BR(KR(this)),r="",n=XR(e);if(n<0||n==1/0)throw YR("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r})),eT=JR("".slice),tT=Math.ceil,rT=function(e){return function(t,r,n){var i,o,a=QR(qR(t)),s=zR(r),u=a.length,l=void 0===n?" ":QR(n);return s<=u||""==l?a:((o=$R(l,tT((i=s-u)/l.length))).length>i&&(o=eT(o,0,i)),e?a+o:o+a)}},nT={start:rT(!1),end:rT(!0)},iT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(ue),oT=nT.start;Lr({target:"String",proto:!0,forced:iT},{padStart:function(e){return oT(this,e,arguments.length>1?arguments[1]:void 0)}});var aT=jc("String").padStart,sT=se,uT=aT,lT=String.prototype,cT=r((function(e){var t=e.padStart;return"string"==typeof e||e===lT||sT(lT,e)&&t===lT.padStart?uT:t})),dT=r(te.setInterval),fT=ea.every;Lr({target:"Array",proto:!0,forced:!$c("every")},{every:function(e){return fT(this,e,arguments.length>1?arguments[1]:void 0)}});var hT=jc("Array").every,pT=se,vT=hT,mT=Array.prototype,yT=r((function(e){var t=e.every;return e===mT||pT(mT,e)&&t===mT.every?vT:t})),gT=i,_T=o,bT=Kn,wT=zk.trim,ST=Gk,kT=m("".charAt),RT=gT.parseFloat,TT=gT.Symbol,xT=TT&&TT.iterator,ET=1/RT(ST+"-0")!=-1/0||xT&&!_T((function(){RT(Object(xT))}))?function(e){var t=wT(bT(e)),r=RT(t);return 0===r&&"-"==kT(t,0)?-0:r}:RT;Lr({global:!0,forced:parseFloat!=ET},{parseFloat:ET});var LT=r(te.parseFloat),OT=mu.PROPER,IT=o,CT=Gk,PT=zk.trim;Lr({target:"String",proto:!0,forced:function(e){return IT((function(){return!!CT[e]()||"​…᠎"!=="​…᠎"[e]()||OT&&CT[e].name!==e}))}("trim")},{trim:function(){return PT(this)}});var DT=jc("String").trim,AT=se,ZT=DT,FT=String.prototype,jT=r((function(e){var t=e.trim;return"string"==typeof e||e===FT||AT(FT,e)&&t===FT.trim?ZT:t})),VT=ue.match(/firefox\/(\d+)/i),WT=!!VT&&+VT[1],MT=/MSIE|Trident/.test(ue),NT=ue.match(/AppleWebKit\/(\d+)\./),GT=!!NT&&+NT[1],HT=Lr,UT=m,XT=Ce,BT=Je,KT=Wr,YT=Sk,JT=Kn,zT=o,QT=K_,qT=$c,$T=WT,ex=MT,tx=ve,rx=GT,nx=[],ix=UT(nx.sort),ox=UT(nx.push),ax=zT((function(){nx.sort(void 0)})),sx=zT((function(){nx.sort(null)})),ux=qT("sort"),lx=!zT((function(){if(tx)return tx<70;if(!($T&&$T>3)){if(ex)return!0;if(rx)return rx<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++)nx.push({k:t+n,v:r})}for(nx.sort((function(e,t){return t.v-e.v})),n=0;n<nx.length;n++)t=nx[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));HT({target:"Array",proto:!0,forced:ax||!sx||!ux||!lx},{sort:function(e){void 0!==e&&XT(e);var t=BT(this);if(lx)return void 0===e?ix(t):ix(t,e);var r,n,i=[],o=KT(t);for(n=0;n<o;n++)n in t&&ox(i,t[n]);for(QT(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:JT(t)>JT(r)?1:-1}}(e)),r=KT(i),n=0;n<r;)t[n]=i[n++];for(;n<o;)YT(t,n++);return t}});var cx=jc("Array").sort,dx=se,fx=cx,hx=Array.prototype,px=r((function(e){var t=e.sort;return e===hx||dx(hx,e)&&t===hx.sort?fx:t})),vx=Lr,mx=Date,yx=m(mx.prototype.getTime);vx({target:"Date",stat:!0},{now:function(){return yx(new mx)}});var gx,_x=r(te.Date.now),bx="undefined"!=typeof window&&window.location&&rg(gx=window.location.href).call(gx,"xgplayerdebugger=1")>-1,wx="color: #525252; background-color: #90ee90;",Sx="color: #525252; background-color: red;",kx="color: #525252; background-color: yellow; ",Rx="%c[xgplayer]",Tx={config:{debug:bx?3:0},logInfo:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=3&&(r=console).log.apply(r,pk(t=[Rx,wx,e]).call(t,i))},logWarn:function(e){for(var t,r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.config.debug>=1&&(r=console).warn.apply(r,pk(t=[Rx,kx,e]).call(t,i))},logError:function(e){var t,r;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(r=console)[n].apply(r,pk(t=[Rx,Sx,e]).call(t,o))}}},xx=function(){function e(t){IR(this,e),this.bufferedList=t}return PR(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),Ex={};Ex.createDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(t);return o.className=i,o.innerHTML=r,ld(e=Dc(n)).call(e,(function(e){var r=e,i=n[e];"video"===t||"audio"===t||"live-video"===t?i&&o.setAttribute(r,i):o.setAttribute(r,i)})),o},Ex.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var i=n.children;if(n=null,i.length>0){var o;if(i=i[0],r&&Ex.addClass(i,r),t)ld(o=Dc(t)).call(o,(function(e){i.setAttribute(e,t[e])}));return i}return null}catch(a){return Tx.logError("util.createDomFromHtml",a),null}},Ex.hasClass=function(e,t){if(!e||!t)return!1;try{return UR(Array.prototype).call(e.classList,(function(e){return e===t}))}catch(n){var r=e.className&&"object"===OR(e.className)?e.getAttribute("class"):e.className;return r&&!!r.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},Ex.addClass=function(e,t){if(e&&t)try{var r;ld(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.add(t)}))}catch(n){Ex.hasClass(e,t)||(e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},Ex.removeClass=function(e,t){if(e&&t)try{var r;ld(r=t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(r,(function(t){t&&e.classList.remove(t)}))}catch(i){var n;if(Ex.hasClass(e,t))ld(n=t.split(/\s+/g)).call(n,(function(t){var r=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===OR(e.className)?e.setAttribute("class",e.getAttribute("class").replace(r," ")):e.className=e.className.replace(r," ")}))}},Ex.toggleClass=function(e,t){var r;e&&ld(r=t.split(/\s+/g)).call(r,(function(t){Ex.hasClass(e,t)?Ex.removeClass(e,t):Ex.addClass(e,t)}))},Ex.classNames=function(){for(var e=arguments,t=[],r=function(r){if("String"===Ex.typeOf(e[r]))t.push(e[r]);else if("Object"===Ex.typeOf(e[r])){var n;vR(n=Dc(e[r])).call(n,(function(n){e[r][n]&&t.push(n)}))}},n=0;n<arguments.length;n++)r(n);return t.join(" ")},Ex.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(r)}catch(n){Tx.logError("util.findDom",n),0===rg(r).call(r,"#")&&(e=t.getElementById(py(r).call(r,1)))}return e},Ex.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},Ex.padStart=function(e,t,r){for(var n=String(r),i=t>>0,o=Math.ceil(i/n.length),a=[],s=String(e);o--;)a.push(n);return a.join("").substring(0,i-s.length)+s},Ex.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=cT(Ex).call(Ex,Math.floor(e/3600),2,0),r=cT(Ex).call(Ex,Math.floor((e-3600*t)/60),2,0),n=cT(Ex).call(Ex,Math.floor(e-3600*t-60*r),2,0);return("00"===t?[r,n]:[t,r,n]).join(":")},Ex.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},Ex.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},Ex.deepCopy=function(e,t){var r;if("Object"===Ex.typeOf(t)&&"Object"===Ex.typeOf(e))return ld(r=Dc(t)).call(r,(function(r){if("Object"!==Ex.typeOf(t[r])||t[r]instanceof Node)if("Array"===Ex.typeOf(t[r])){var n;e[r]="Array"===Ex.typeOf(e[r])?pk(n=e[r]).call(n,t[r]):t[r]}else e[r]=t[r];else void 0===e[r]||void 0===e[r]?e[r]=t[r]:Ex.deepCopy(e[r],t[r])})),e},Ex.deepMerge=function(e,t){var r;return vR(r=Dc(t)).call(r,(function(r){var n;"Array"===Ex.typeOf(t[r])&&"Array"===Ex.typeOf(e[r])?"Array"===Ex.typeOf(e[r])&&(n=e[r]).push.apply(n,AR(t[r])):Ex.typeOf(e[r])!==Ex.typeOf(t[r])||null===e[r]||"Object"!==Ex.typeOf(e[r])||t[r]instanceof window.Node?null!==t[r]&&(e[r]=t[r]):Ex.deepMerge(e[r],t[r])})),e},Ex.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var r=document.createElement("a");return r.href=t.replace(/url\("|"\)/g,""),r.href},Ex.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return ld(Array.prototype).call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},Ex.setInterval=function(e,t,r,n){e._interval[t]||(e._interval[t]=dT(Cy(r).call(r,e),n))},Ex.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},Ex.setTimeout=function(e,t,r){e._timers||(e._timers=[]);var n=o_((function(){t(),Ex.clearTimeout(e,n)}),r);return e._timers.push(n),n},Ex.clearTimeout=function(e,t){var r=e._timers;if("Array"===Ex.typeOf(r)){for(var n=0;n<r.length;n++)if(r[n]===t){Mk(r).call(r,n,1),clearTimeout(t);break}}else clearTimeout(t)},Ex.clearAllTimers=function(e){var t=e._timers;"Array"===Ex.typeOf(t)&&(vR(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},Ex.createImgBtn=function(e,t,r,n){var i,o,a,s,u,l,c,d,f,h,p,v,m=Ex.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(m.style.backgroundImage='url("'.concat(t,'")'),r&&n)&&(yT(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(e){var t,i;return!(rg(r).call(r,e)>-1&&rg(n).call(n,e)>-1)||(c=LT(jT(t=py(r).call(r,0,rg(r).call(r,e))).call(t)),d=LT(jT(i=py(n).call(n,0,rg(n).call(n,e))).call(i)),f=e,!1)})),m.style.width=pk(o="".concat(c)).call(o,f),m.style.height=pk(a="".concat(d)).call(a,f),m.style.backgroundSize=pk(s=pk(u=pk(l="".concat(c)).call(l,f," ")).call(u,d)).call(s,f),m.style.margin="start"===e?pk(h=pk(p=pk(v="-".concat(d/2)).call(v,f," auto auto -")).call(p,c/2)).call(h,f):"auto 5px auto 5px");return m},Ex.Hex2RGBA=function(e,t){var r,n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){n.push(lR(e,16))})),pk(r="rgba(".concat(n.join(","),", ")).call(r,t,")")):"rgba(255, 255, 255, 0.1)"},Ex.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},Ex.checkIsFunction=function(e){return e&&"function"==typeof e},Ex.checkIsObject=function(e){return null!==e&&"object"===OR(e)},Ex.hide=function(e){e.style.display="none"},Ex.show=function(e,t){e.style.display=t||"block"},Ex.isUndefined=function(e){if(null==e)return!0},Ex.isNotNull=function(e){return!(null==e)},Ex.setStyleFromCsstext=function(e,t){if(t)if("String"===Ex.typeOf(t)){var r=t.replace(/\s+/g,"").split(";");vR(r).call(r,(function(t){if(t){var r=t.split(":");r.length>1&&(e.style[r[0]]=r[1])}}))}else{var n;vR(n=Dc(t)).call(n,(function(r){e.style[r]=t[r]}))}},Ex.filterStyleFromText=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var i=n.replace(/\s+/g,"").split(";"),o={},a={};return vR(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var r=0,n=t.length;r<n;r++)if(rg(e).call(e,t[r])>-1)return!0;return!1}(t[0],r)?a[t[0]]=t[1]:o[t[0]]=t[1])}})),e.setAttribute("style",""),vR(t=Dc(a)).call(t,(function(t){e.style[t]=a[t]})),o},Ex.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var r=t.replace(/\s+/g,"").split(";"),n={};return vR(r).call(r,(function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},Ex.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,r&&r(e)},n.src=e}},Ex.stopPropagation=function(e){e&&e.stopPropagation()},Ex.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},Ex.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},Ex.checkTouchSupport=function(){return"ontouchstart"in window},Ex.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=[],n=0;n<e.length;n++)r.push({start:e.start(n)<.5?0:e.start(n),end:e.end(n)});px(r).call(r,(function(e,t){var r=e.start-t.start;return r||t.end-e.end}));var i=[];if(t)for(var o=0;o<r.length;o++){var a=i.length;if(a){var s=i[a-1].end;r[o].start-s<t?r[o].end>s&&(i[a-1].end=r[o].end):i.push(r[o])}else i.push(r[o])}else i=r;return new xx(i)},Ex.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},Ex.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},Ex.getHostFromUrl=function(e){if("String"!==Ex.typeOf(e))return"";var t=e.split("/"),r="";return t.length>3&&t[2]&&(r=t[2]),r},Ex.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},Ex.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},Ex.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},Ex.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=lR(e)}catch(r){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=lR(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:3&r|8).toString(16)}))},Ex.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},Ex.adjustTimeByDuration=function(e,t,r){return t&&e&&(e>t||r&&e<t)?t:e},Ex.createPositionBar=function(e,t){var r=Ex.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(r),r},Ex.getTransformStyle=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(t.scale||1),translate:pk(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")},i=Dc(n);return ld(i).call(i,(function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=pk(t="".concat(e,"(")).call(t,n[e],")");i.test(r)?(i.lastIndex=-1,r=r.replace(i,o)):r+="".concat(o," ")})),r},Ex.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},Ex.getIndexByTime=function(e,t){var r=t.length,n=-1;if(r<1)return n;if(e<=t[0].end||r<2)n=0;else if(e>t[r-1].end)n=r-1;else for(var i=1;i<r;i++)if(e>t[i-1].end&&e<=t[i].end){n=i;break}return n},Ex.getOffsetCurrentTime=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=r>=0&&r<t.length?r:Ex.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,u=o.cTime,l=o.offset;return e<a?u:e>=a&&e<=s?e-l:e>s&&n>=i-1?s:-1},Ex.getCurrentTimeByOffset=function(e,t){var r=-1;if(!t||t.length<0)return e;for(var n=0;n<t.length;n++)if(e<=t[n].duration){r=n;break}if(-1!==r){var i=t[r].start;return r-1<0?i+e:i+(e-t[r-1].duration)}return e};var Lx="3.0.21-rc.21",Ox={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},Ix=PR((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};IR(this,e);var n=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=r.mediaError?r.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,u=t.ended,l=t.src,c=t.currentSrc,d=t.media,f=d.readyState,h=d.networkState,p=r.errorCode||o.code;Ox[p]&&(p=Ox[p]);var v={playerVersion:Lx,currentTime:s,duration:a,ended:u,readyState:f,networkState:h,src:l||c,errorType:r.errorType,errorCode:p,message:r.errorMessage||o.message,mediaError:o,originError:r.originError?r.originError.stack:"",host:Ex.getHostFromUrl(l||c)};return r.ext&&vR(i=Dc(r.ext)).call(i,(function(e){v[e]=r.ext[e]})),v}if(arguments.length>1){for(var m={playerVersion:Lx,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],g=0;g<arguments.length;g++)m[y[g]]=arguments[g];return m.ex=n?(n[arguments[0]]||{}).msg:"",m}}));function Cx(e,t,r){for(var n,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,u=t.call.apply(t,pk(n=[e]).call(n,o));r&&"function"==typeof r&&(u&&u.then?u.then((function(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];r.call.apply(r,pk(t=[e]).call(t,i))})):r.call.apply(r,pk(s=[e]).call(s,o)))}function Px(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),Cy(r=function(){var r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,pk(a=[this]).call(a,py(Array.prototype).call(arguments)))}catch(v){var u,l;throw v.message=pk(u=pk(l="[pluginName: ".concat(this.pluginName,":")).call(l,e,":pre error] >> ")).call(u,v.message),v}if(this.__hooks&&this.__hooks[e])try{var c,d=function(e,t,r){for(var n=arguments.length,i=new Array(n>3?n-3:0),o=3;o<n;o++)i[o-3]=arguments[o];if(e.__hooks&&ng(e.__hooks[t])){var a,s=e.__hooks[t],u=-1,l=function e(t,r,n){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return n.call.apply(n,pk(o=[t,t]).call(o,l));var d,f=s[u],h=f.call.apply(f,pk(i=[t,t]).call(i,l));return h&&h.then?h.then((function(i){var o;return!1===i?null:e.apply(void 0,pk(o=[t,r,n]).call(o,l))})).catch((function(e){console.warn("[runHooks]".concat(r," reject"),e.message)})):!1!==h?e.apply(void 0,pk(d=[t,r,n]).call(d,l)):void 0};return l.apply(void 0,pk(a=[e,t,r]).call(a,i))}var c;return r.call.apply(r,pk(c=[e,e]).call(c,i))}(this,e,t);if(d)if(d.then)d.then((function(e){var r;!1!==e&&Cx.apply(void 0,pk(r=[o,t,n.next]).call(r,AR(i)))})).catch((function(e){throw e}));else Cx.apply(void 0,pk(c=[this,t,n.next]).call(c,py(Array.prototype).call(arguments)));else if(void 0===d){var f;Cx.apply(void 0,pk(f=[this,t,n.next]).call(f,py(Array.prototype).call(arguments)))}}catch(v){var h,p;throw v.message=pk(h=pk(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(h,v.message),v}else Cx.apply(void 0,pk(r=[this,t,n.next]).call(r,py(Array.prototype).call(arguments)))}).call(r,this)}function Dx(e,t){var r=this.__hooks;if(!r||!ng(r[e]))return-1;for(var n=r[e],i=0;i<n.length;i++)if(n[i]===t)return i;return-1}function Ax(e,t){var r=this.__hooks;if(r)return r.hasOwnProperty(e)?(ng(r[e])||(r[e]=[]),-1===Dx.call(this,e,t)&&r[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function Zx(e,t){var r=this.__hooks;if(r)if(ng(r[e])){var n=r[e],i=Dx.call(this,e,t);-1!==i&&Mk(n).call(n,i,1)}else r[e]&&(r[e]=null)}function Fx(e,t){var r;Tx.logError(pk(r="[".concat(e,"] event or callback cant be undefined or null when call ")).call(r,t))}var jx=function(){function e(t){IR(this,e),Ex.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&vR(t).call(t,(function(t){e.__hooks[t]=null})),Ad(e,"hooks",{get:function(){var t;return e.__hooks&&vR(t=Dc(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return PR(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=Ex.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):ng(e)&&ld(e).call(e,(function(e){r.__events[e]=t,r.player.on(e,t)})):Fx(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):ng(e)&&ld(e).call(e,(function(n){r.__onceEvents[n]=t,r.player.once(e,t)})):Fx(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var r=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):ng(e)&&ld(e).call(e,(function(n){delete r.__events[e],r.player.off(n,t)})):Fx(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e,t=this;ld(e=["__events","__onceEvents"]).call(e,(function(e){var r;ld(r=Dc(t[e])).call(r,(function(r){t[e][r]&&t.off(r,t[e][r]),r&&delete t[e][r]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t,r;if(this.player){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];(r=this.player).emit.apply(r,pk(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var n=LR(LR({},r),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,n)}}},{key:"hook",value:function(e,t){var r;return Px.call.apply(Px,pk(r=[this]).call(r,py(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return Ax.call.apply(Ax,pk(r=[this]).call(r,py(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var r,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return Zx.call.apply(Zx,pk(r=[this]).call(r,py(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return r&&(t.pluginName=r),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e,t=this,r=this.player,n=this.pluginName;this.offAll(),Ex.clearAllTimers(this),Ex.checkIsFunction(this.destroy)&&this.destroy(),vR(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),r.unRegisterPlugin(n),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Ad(e,r,t[r])}},{key:"defineMethod",value:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&"function"==typeof t[r]&&Ad(e,r,{configurable:!0,value:t[r]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),Vx=te,Wx=d;Vx.JSON||(Vx.JSON={stringify:JSON.stringify});var Mx=function(e,t,r){return Wx(Vx.JSON.stringify,null,arguments)},Nx=r(Mx),Gx=ee,Hx=b,Ux=ft("match"),Xx=function(e){var t;return Gx(e)&&(void 0!==(t=e[Ux])?!!t:"RegExp"==Hx(e))},Bx=TypeError,Kx=ft("match"),Yx=ni.includes;Lr({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(e){return Yx(this,e,arguments.length>1?arguments[1]:void 0)}});var Jx=jc("Array").includes,zx=Lr,Qx=function(e){if(Xx(e))throw Bx("The method doesn't accept regular expressions");return e},qx=Y,$x=Kn,eE=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kx]=!1,"/./"[e](t)}catch(n){}}return!1},tE=m("".indexOf);zx({target:"String",proto:!0,forced:!eE("includes")},{includes:function(e){return!!~tE($x(qx(this)),$x(Qx(e)),arguments.length>1?arguments[1]:void 0)}});var rE=jc("String").includes,nE=se,iE=Jx,oE=rE,aE=Array.prototype,sE=String.prototype,uE=r((function(e){var t=e.includes;return e===aE||nE(aE,e)&&t===aE.includes?iE:"string"==typeof e||e===sE||nE(sE,e)&&t===sE.includes?oE:t})),lE={exports:{}},cE=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),dE=o,fE=ee,hE=b,pE=cE,vE=Object.isExtensible,mE=dE((function(){vE(1)}))||pE?function(e){return!!fE(e)&&((!pE||"ArrayBuffer"!=hE(e))&&(!vE||vE(e)))}:vE,yE=!o((function(){return Object.isExtensible(Object.preventExtensions({}))})),gE=Lr,_E=m,bE=ii,wE=ee,SE=qe,kE=Qt.f,RE=Mi,TE=Hi,xE=mE,EE=yE,LE=!1,OE=nt("meta"),IE=0,CE=function(e){kE(e,OE,{value:{objectID:"O"+IE++,weakData:{}}})},PE=lE.exports={enable:function(){PE.enable=function(){},LE=!0;var e=RE.f,t=_E([].splice),r={};r[OE]=1,e(r).length&&(RE.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===OE){t(n,i,1);break}return n},gE({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:TE.f}))},fastKey:function(e,t){if(!wE(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!SE(e,OE)){if(!xE(e))return"F";if(!t)return"E";CE(e)}return e[OE].objectID},getWeakData:function(e,t){if(!SE(e,OE)){if(!xE(e))return!0;if(!t)return!1;CE(e)}return e[OE].weakData},onFreeze:function(e){return EE&&LE&&xE(e)&&!SE(e,OE)&&CE(e),e}};bE[OE]=!0;var DE=lE.exports,AE=Lr,ZE=i,FE=DE,jE=o,VE=mr,WE=Af,ME=dh,NE=E,GE=ee,HE=Io,UE=Qt.f,XE=ea.forEach,BE=O,KE=Bo.set,YE=Bo.getterFor,JE=Wi,zE=oo,QE=N_,qE=zt,$E=dh,eL=X,tL=Af,rL=pl,nL=vl,iL=uh,oL=O,aL=DE.fastKey,sL=Bo.set,uL=Bo.getterFor,lL={getConstructor:function(e,t,r,n){var i=e((function(e,i){$E(e,o),sL(e,{type:t,index:JE(null),first:void 0,last:void 0,size:0}),oL||(e.size=0),eL(i)||tL(i,e[n],{that:e,AS_ENTRIES:r})})),o=i.prototype,a=uL(t),s=function(e,t,r){var n,i,o=a(e),s=u(e,t);return s?s.value=r:(o.last=s={index:i=aL(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=s),n&&(n.next=s),oL?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var r,n=a(e),i=aL(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return QE(o,{clear:function(){for(var e=a(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,oL?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),n=u(t,e);if(n){var i=n.next,o=n.previous;delete r.index[n.index],n.removed=!0,o&&(o.next=i),i&&(i.previous=o),r.first==n&&(r.first=i),r.last==n&&(r.last=o),oL?r.size--:t.size--}return!!n},forEach:function(e){for(var t,r=a(this),n=qE(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),QE(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),oL&&zE(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=uL(t),o=uL(n);rL(e,t,(function(e,t){sL(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(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)?nL("keys"==t?r.key:"values"==t?r.value:[r.key,r.value],!1):(e.target=void 0,nL(void 0,!0))}),r?"entries":"values",!r,!0),iL(t)}};(function(e,t,r){var n,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=ZE[e],u=s&&s.prototype,l={};if(BE&&NE(s)&&(o||u.forEach&&!jE((function(){(new s).entries().next()})))){var c=(n=t((function(t,r){KE(ME(t,c),{type:e,collection:new s}),null!=r&&WE(r,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=YE(e);XE(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in u)||o&&"clear"==e||VE(c,e,(function(r,n){var i=d(this).collection;if(!t&&o&&!GE(r))return"get"==e&&void 0;var a=i[e](0===r?0:r,n);return t?this:a}))})),o||UE(c,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else n=r.getConstructor(t,e,i,a),FE.enable();HE(n,e,!1,!0),l[e]=n,AE({global:!0,forced:!0},l),o||r.setStrong(n,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),lL);var cL=te.Map,dL=zt,fL=P,hL=Ce,pL=vh,vL=X,mL=Af,yL=[].push,gL=function(e){var t,r,n,i,o=arguments.length,a=o>1?arguments[1]:void 0;return pL(this),(t=void 0!==a)&&hL(a),vL(e)?new this:(r=[],t?(n=0,i=dL(a,o>2?arguments[2]:void 0),mL(e,(function(e){fL(yL,r,i(e,n++))}))):mL(e,yL,{that:r}),new this(r))};Lr({target:"Map",stat:!0,forced:!0},{from:gL});var _L=Rs,bL=function(){return new this(_L(arguments))};Lr({target:"Map",stat:!0,forced:!0},{of:bL});var wL=Ee,SL=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(wL(e)+" is not a map")},kL=function(e,t){return 1==t?function(t,r){return t[e](r)}:function(t,r,n){return t[e](r,n)}},RL=ae("Map"),TL={Map:RL,set:kL("set",2),get:kL("get",1),has:kL("has",1),remove:kL("delete",1),proto:RL.prototype},xL=SL,EL=TL.remove;Lr({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=xL(this),r=!0,n=0,i=arguments.length;n<i;n++)e=EL(t,arguments[n]),r=r&&e;return!!r}});var LL=SL,OL=TL.get,IL=TL.has,CL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var r,n,i=LL(this);return IL(i,e)?(r=OL(i,e),"update"in t&&(r=t.update(r,e,i),CL(i,e,r)),r):(n=t.insert(e,i),CL(i,e,n),n)}});var PL=P,DL=function(e,t,r){for(var n,i,o=r||e.next;!(n=PL(o,e)).done;)if(void 0!==(i=t(n.value)))return i},AL=function(e,t,r){return r?DL(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},ZL=zt,FL=SL,jL=AL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=FL(this),r=ZL(e,arguments.length>1?arguments[1]:void 0);return!1!==jL(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var VL=zt,WL=SL,ML=AL,NL=TL.Map,GL=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=WL(this),r=VL(e,arguments.length>1?arguments[1]:void 0),n=new NL;return ML(t,(function(e,i){r(e,i,t)&&GL(n,i,e)})),n}});var HL=zt,UL=SL,XL=AL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=UL(this),r=HL(e,arguments.length>1?arguments[1]:void 0),n=XL(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}});var BL=zt,KL=SL,YL=AL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=KL(this),r=BL(e,arguments.length>1?arguments[1]:void 0),n=YL(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var JL=Lr,zL=P,QL=E,qL=Ce,$L=Af,eO=TL.Map,tO=m([].push);JL({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var r=new(QL(this)?this:eO);qL(t);var n=qL(r.has),i=qL(r.get),o=qL(r.set);return $L(e,(function(e){var a=t(e);zL(n,r,a)?tO(zL(i,r,a),e):zL(o,r,a,[e])})),r}});var rO=function(e,t){return e===t||e!=e&&t!=t},nO=SL,iO=AL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===iO(nO(this),(function(t){if(rO(t,e))return!0}),!0)}});var oO=P,aO=Af,sO=E,uO=Ce,lO=TL.Map;Lr({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(sO(this)?this:lO);uO(t);var n=uO(r.set);return aO(e,(function(e){oO(n,r,t(e),e)})),r}});var cO=SL,dO=AL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=dO(cO(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var fO=zt,hO=SL,pO=AL,vO=TL.Map,mO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=hO(this),r=fO(e,arguments.length>1?arguments[1]:void 0),n=new vO;return pO(t,(function(e,i){mO(n,r(e,i,t),e)})),n}});var yO=zt,gO=SL,_O=AL,bO=TL.Map,wO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=gO(this),r=yO(e,arguments.length>1?arguments[1]:void 0),n=new bO;return _O(t,(function(e,i){wO(n,i,r(e,i,t))})),n}});var SO=SL,kO=Af,RO=TL.set;Lr({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=SO(this),r=arguments.length,n=0;n<r;)kO(arguments[n++],(function(e,r){RO(t,e,r)}),{AS_ENTRIES:!0});return t}});var TO=Ce,xO=SL,EO=AL,LO=TypeError;Lr({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=xO(this),r=arguments.length<2,n=r?void 0:arguments[1];if(TO(e),EO(t,(function(i,o){r?(r=!1,n=i):n=e(n,i,o,t)})),r)throw LO("Reduce of empty map with no initial value");return n}});var OO=zt,IO=SL,CO=AL;Lr({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=IO(this),r=OO(e,arguments.length>1?arguments[1]:void 0);return!0===CO(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var PO=Ce,DO=SL,AO=TypeError,ZO=TL.get,FO=TL.has,jO=TL.set;Lr({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=DO(this),n=arguments.length;PO(t);var i=FO(r,e);if(!i&&n<3)throw AO("Updating absent value");var o=i?ZO(r,e):PO(n>2?arguments[2]:void 0)(e,r);return jO(r,e,t(o,e,r)),r}});var VO=P,WO=Ce,MO=E,NO=rr,GO=TypeError,HO=function(e,t){var r,n=NO(this),i=WO(n.get),o=WO(n.has),a=WO(n.set),s=arguments.length>2?arguments[2]:void 0;if(!MO(t)&&!MO(s))throw GO("At least one callback required");return VO(o,n,e)?(r=VO(i,n,e),MO(t)&&(r=t(r),VO(a,n,e,r))):MO(s)&&(r=s(),VO(a,n,e,r)),r};Lr({target:"Map",proto:!0,real:!0,forced:!0},{upsert:HO}),Lr({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:HO});var UO=r(cL);function XO(e,t){var r=Dc(e);if(Ac){var n=Ac(e);t&&(n=Gc(n).call(n,(function(t){return Qc(e,t).enumerable}))),r.push.apply(r,n)}return r}function BO(e){for(var t=1;t<arguments.length;t++){var r,n,i=null!=arguments[t]?arguments[t]:{};t%2?ld(r=XO(Object(i),!0)).call(r,(function(t){eI(e,t,i[t])})):bd?Ed(e,bd(i)):ld(n=XO(Object(i))).call(n,(function(t){Ad(e,t,Qc(i,t))}))}return e}function KO(){KO=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Ad||function(e,t,r){e[t]=r.value},i="function"==typeof kc?kc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(E){u=function(e,t,r){return e[t]=r}}function l(e,t,r,i){var o=t&&t.prototype instanceof f?t:f,a=Fd(o.prototype),s=new R(i||[]);return n(a,"_invoke",{value:b(e,r,s)}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var d={};function f(){}function h(){}function p(){}var v={};u(v,o,(function(){return this}));var m=Md&&Md(Md(T([])));m&&m!==t&&r.call(m,o)&&(v=m);var y=p.prototype=f.prototype=Fd(v);function g(e){var t;ld(t=["next","throw","return"]).call(t,(function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(n,o,a,s){var u=c(e[n],e,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==Sc(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(u.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return o=o?o.then(n,n):n()}})}function b(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function w(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(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 R(e){this.tryEntries=[{tryLoc:"root"}],ld(e).call(e,S,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var 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:x}}function x(){return{value:void 0,done:!0}}return h.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=u(p,s,"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 Nd?Nd(e,p):(e.__proto__=p,u(e,s,"GeneratorFunction")),e.prototype=Fd(y),e},e.awrap=function(e){return{__await:e}},g(_.prototype),u(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,i,o){void 0===o&&(o=Mm);var a=new _(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return Jm(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=T,R.prototype={constructor:R,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,ld(t=this.tryEntries).call(t,k),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+py(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 a.type="throw",a.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 o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.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 o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},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),d}},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 new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function YO(e){return(YO="function"==typeof kc&&"symbol"==typeof gR?function(e){return typeof e}:function(e){return e&&"function"==typeof kc&&e.constructor===kc&&e!==kc.prototype?"symbol":typeof e})(e)}function JO(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(jP){return void r(jP)}s.done?t(u):Mm.resolve(u).then(n,i)}function zO(e){return function(){var t=this,r=arguments;return new Mm((function(n,i){var o=e.apply(t,r);function a(e){JO(o,n,i,a,s,"next",e)}function s(e){JO(o,n,i,a,s,"throw",e)}a(void 0)}))}}function QO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(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),Ad(e,hI(n.key),n)}}function $O(e,t,r){return t&&qO(e.prototype,t),r&&qO(e,r),Ad(e,"prototype",{writable:!1}),e}function eI(e,t,r){return(t=hI(t))in e?Ad(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tI(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Fd(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Ad(e,"prototype",{writable:!1}),t&&nI(e,t)}function rI(e){var t;return(rI=Nd?Cy(t=Md).call(t):function(e){return e.__proto__||Md(e)})(e)}function nI(e,t){var r;return(nI=Nd?Cy(r=Nd).call(r):function(e,t){return e.__proto__=t,e})(e,t)}function iI(){if("undefined"==typeof Reflect||!By)return!1;if(By.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(By(Boolean,[],(function(){}))),!0}catch(e){return!1}}function oI(e,t,r){var n;iI()?oI=Cy(n=By).call(n):oI=function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Cy(Function).apply(e,n));return r&&nI(i,r.prototype),i};return oI.apply(null,arguments)}function aI(e){var t="function"==typeof UO?new UO:void 0;return aI=function(e){if(null===e||(r=e,-1===rg(n=Function.toString.call(r)).call(n,"[native code]")))return e;var r,n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return oI(e,arguments,rI(this).constructor)}return i.prototype=Fd(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),nI(i,e)},aI(e)}function sI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Dc(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||(i[r]=e[r]);return i}(e,t);if(Ac){var o=Ac(e);for(n=0;n<o.length;n++)r=o[n],rg(t).call(t,r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function uI(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lI(e){var t=iI();return function(){var r,n=rI(e);if(t){var i=rI(this).constructor;r=By(n,arguments,i)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Sc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return uI(e)}(this,r)}}function cI(){var e;"undefined"!=typeof Reflect&&xR?cI=Cy(e=xR).call(e):cI=function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rI(e)););return e}(e,t);if(n){var i=Qc(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}};return cI.apply(this,arguments)}function dI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fI(e,t){var r=void 0!==kc&&Ic(e)||e["@@iterator"];if(!r){if(ng(e)||(r=function(e,t){var r;if(e){if("string"==typeof e)return dI(e,t);var n=py(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?_g(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dI(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function hI(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}var pI=Ce,vI=Je,mI=U,yI=Wr,gI=TypeError,_I=function(e){return function(t,r,n,i){pI(r);var o=vI(t),a=mI(o),s=yI(o),u=e?s-1:0,l=e?-1:1;if(n<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,e?u<0:s<=u)throw gI("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=l)u in a&&(i=r(i,a[u],u,o));return i}},bI={left:_I(!1),right:_I(!0)}.left;Lr({target:"Array",proto:!0,forced:!nh&&ve>79&&ve<83||!$c("reduce")},{reduce:function(e){var t=arguments.length;return bI(this,e,t,t>1?arguments[1]:void 0)}});var wI,SI=jc("Array").reduce,kI=se,RI=SI,TI=Array.prototype,xI=r((function(e){var t=e.reduce;return e===TI||kI(TI,e)&&t===TI.reduce?RI:t})),EI="network",LI="network_timeout",OI="network_forbidden",II="network_notfound",CI="network_range_not_satisfiable",PI="demux",DI="remux",AI="media",ZI="drm",FI="other",jI="runtime",VI={FLV:"FLV",HLS:"HLS",MP4:"MP4",FMP4:"FMP4",MSE_ADD_SB:"MSE_ADD_SB",MSE_APPEND_BUFFER:"MSE_APPEND_BUFFER",MSE_OTHER:"MSE_OTHER",MSE_FULL:"MSE_FULL",OPTION:"OPTION",DASH:"DASH",LICENSE:"LICENSE",CUSTOM_LICENSE:"CUSTOM_LICENSE",MSE_HIJACK:"MSE_HIJACK",EME_HIJACK:"EME_HIJACK",SIDX:"SIDX",NO_CANPLAY_ERROR:"NO_CANPLAY_ERROR",BUFFERBREAK_ERROR:"BUFFERBREAK_ERROR",WAITING_TIMEOUT_ERROR:"WAITING_TIMEOUT_ERROR",MEDIA_ERR_ABORTED:"MEDIA_ERR_ABORTED",MEDIA_ERR_NETWORK:"MEDIA_ERR_NETWORK",MEDIA_ERR_DECODE:"MEDIA_ERR_DECODE",MEDIA_ERR_SRC_NOT_SUPPORTED:"MEDIA_ERR_SRC_NOT_SUPPORTED",MEDIA_ERR_CODEC_NOT_SUPPORTED:"MEDIA_ERR_CODEC_NOT_SUPPORTED",MEDIA_ERR_URL_EMPTY:"MEDIA_ERR_URL_EMPTY"},WI=(eI(wI={},"manifest",{HLS:1100,DASH:1200}),eI(wI,EI,2100),eI(wI,LI,2101),eI(wI,OI,2103),eI(wI,II,2104),eI(wI,CI,2116),eI(wI,PI,{FLV:3100,HLS:3200,MP4:3300,FMP4:3400,SIDX:3410}),eI(wI,DI,{FMP4:4100,MP4:4200}),eI(wI,AI,{MEDIA_ERR_ABORTED:5101,MEDIA_ERR_NETWORK:5102,MEDIA_ERR_DECODE:5103,MEDIA_ERR_SRC_NOT_SUPPORTED:5104,MEDIA_ERR_CODEC_NOT_SUPPORTED:5105,MEDIA_ERR_URL_EMPTY:5106,MSE_ADD_SB:5200,MSE_APPEND_BUFFER:5201,MSE_OTHER:5202,MSE_FULL:5203,MSE_HIJACK:5204,EME_HIJACK:5301}),eI(wI,ZI,{LICENSE:7100,CUSTOM_LICENSE:7200}),eI(wI,FI,8e3),eI(wI,jI,{NO_CANPLAY_ERROR:9001,BUFFERBREAK_ERROR:9002,WAITING_TIMEOUT_ERROR:9003}),wI),MI=function(e){tI(r,e);var t=lI(r);function r(e,n,i,o,a){var s;return QO(this,r),(s=t.call(this,a||(null==i?void 0:i.message))).errorType=e===LI?EI:e,s.originError=i,s.ext=o,s.errorCode=WI[e][n]||WI[e],s.errorMessage=s.message,s.errorCode||(s.errorType=FI,s.errorCode=WI[s.errorType]),s}return $O(r,null,[{key:"create",value:function(e,t,n,i,o){return e instanceof r?e:(e instanceof Error&&(n=e,e=""),e||(e=FI),new r(e,t,n,i,o))}},{key:"network",value:function(e){var t;return new r(null!=e&&e.isTimeout?LI:EI,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}]),r}(aI(Error)),NI=1,GI=2,HI=3,UI=4,XI=["Boolean","Number","String","Undefined","Null","Date","Object"],BI=function(){function e(t,r){QO(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 $O(e,[{key:"debug",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,pk(t=[NI]).call(t,o)),e.disabled||(n=console).debug.apply(n,pk(r=[this._prefix,KI()]).call(r,o))}},{key:"log",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,pk(t=[GI]).call(t,o)),e.disabled||(n=console).log.apply(n,pk(r=[this._prefix,KI()]).call(r,o))}},{key:"warn",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,pk(t=[HI]).call(t,o)),e.disabled||(n=console).warn.apply(n,pk(r=[this._prefix,KI()]).call(r,o))}},{key:"error",value:function(){for(var t,r,n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,pk(t=[UI]).call(t,o)),e.disabled||(n=console).error.apply(n,pk(r=[this._prefix,KI()]).call(r,o))}},{key:"logCache",value:function(e){if(!(e<this.logCacheLevel)){var t="";try{for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=vR(n).call(n,(function(e){return JI(e)}));t=this._prefix+KI()+Nx(o)}catch(s){return}if(e>=this.logCacheLevel&&(this.logSize+=t.length,this.logTextArray.push(t)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var e=this.logTextArray.join("\n");return this.reset(),e}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var t;e.disabled||(console.group(this._prefix),(t=console).table.apply(t,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(e){this.logCacheLevel=e}}],[{key:"enable",value:function(){e.disabled=!1}},{key:"disable",value:function(){e.disabled=!0}}]),e}();function KI(){return(new Date).toLocaleString()}function YI(e){var t;if("object"!==YO(e))return e;var r=py(t=Object.prototype.toString.call(e)).call(t,8,-1);switch(r){case"Array":case"Uint8Array":case"ArrayBuffer":return r+"["+e.length+"]";case"Object":return"{}";default:return r}}function JI(e,t,r){var n;r||(r=1),t||(t=2);var i={};if(!e||"object"!==YO(e))return e;var o=py(n=Object.prototype.toString.call(e)).call(n,8,-1);if(!uE(XI).call(XI,o))return o;if(!(r>t)){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r===t?i[a]=YI(e[a]):"object"===YO(e[a])?i[a]=JI(e[a],t,r+1):i[a]=e[a]);return i}}eI(BI,"disabled",!0);var zI="fetch",QI="xhr",qI="arraybuffer",$I="text",eC="json",tC=function(e){tI(r,e);var t=lI(r);function r(e,n,i,o){var a;return QO(this,r),eI(uI(a=t.call(this,o)),"retryCount",0),eI(uI(a),"isTimeout",!1),eI(uI(a),"loaderType",zI),eI(uI(a),"startTime",0),eI(uI(a),"endTime",0),eI(uI(a),"options",{}),a.url=e,a.request=n,a.response=i,a}return $O(r)}(aI(Error)),rC=Object.prototype.toString;function nC(e){if("[object Object]"!==rC.call(e))return!1;var t=Md(e);return null===t||t===Object.prototype}function iC(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 oC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function aC(e,t){var r,n;if(e){if(!t)return e;var i,o=Gc(r=vR(n=Dc(t)).call(n,(function(e){if(null!=(i=t[e]))return ng(i)?e+="[]":i=[i],vR(i).call(i,(function(t){var r,n;return n=t,"[object Date]"===rC.call(n)?t=t.toISOString():function(e){return null!==e&&"object"===YO(e)}(t)&&(t=Nx(t)),pk(r="".concat(oC(e),"=")).call(r,oC(t))})).join("&")}))).call(r,Boolean).join("&");if(o){var a=rg(e).call(e,"#");-1!==a&&(e=py(e).call(e,0,a)),e+=(-1===rg(e).call(e,"?")?"?":"&")+o}return e}}function sC(e,t,r,n,i,o,a,s,u,l,c){return i=null!=i?LT(i):null,n=lR(n||"0",10),Nk(n)&&(n=0),{data:e,done:t,options:{range:u,vid:l,index:s,contentLength:n,age:i,startTime:o,firstByteTime:a,endTime:_x(),priOptions:c},response:r}}function uC(e,t){return Math.round(8*e*1e3/t/1024)}var lC="error",cC="core.ttfb",dC="core.loadstart",fC="core.loadresponseheaders",hC="core.loadcomplete",pC="core.loadretry",vC="core.metadataparsed",mC="core.sei",yC="real_time_speed",gC=2097152,_C=function(e){tI(n,e);var t,r=lI(n);function n(){var e;return QO(this,n),eI(uI(e=r.call(this)),"_abortController",null),eI(uI(e),"_timeoutTimer",null),eI(uI(e),"_reader",null),eI(uI(e),"_response",null),eI(uI(e),"_aborted",!1),eI(uI(e),"_index",-1),eI(uI(e),"_range",null),eI(uI(e),"_receivedLength",0),eI(uI(e),"_running",!1),eI(uI(e),"_logger",null),eI(uI(e),"_vid",""),eI(uI(e),"_onProcessMinLen",0),eI(uI(e),"_onCancel",null),eI(uI(e),"_priOptions",null),e}return $O(n,[{key:"load",value:function(e){var t,r=this,n=e.url,i=e.vid,o=e.timeout,a=e.responseType,s=e.onProgress,u=e.index,l=e.onTimeout,c=e.onCancel,d=e.range,f=e.transformResponse,h=e.request,p=e.params,v=e.logger,m=e.method,y=e.headers,g=e.body,_=e.mode,b=e.credentials,w=e.cache,S=e.redirect,k=e.referrer,R=e.referrerPolicy,T=e.onProcessMinLen,x=e.priOptions;this._logger=v,this._aborted=!1,this._onProcessMinLen=T,this._onCancel=c,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=u,this._range=d||[0,0],this._vid=i||n,this._priOptions=x||{};var E={method:m,headers:y,body:g,mode:_,credentials:b,cache:w,redirect:S,referrer:k,referrerPolicy:R,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal},L=!1;clearTimeout(this._timeoutTimer),n=aC(n,p);var O=iC(d);O&&(y=h?h.headers:E.headers=E.headers||(Headers?new Headers:{}),Headers&&y instanceof Headers?y.append("Range",O):y.Range=O),o&&(this._timeoutTimer=o_((function(){if(L=!0,r.cancel(),l){var e=new tC(n,E,null,"timeout");e.isTimeout=!0,l(e,{index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions})}}),o));var I=_x();return this._logger.debug("[fetch load start], index,",u,",range,",d),new Mm((function(e,t){fetch(h||n,h?void 0:E).then(function(){var i=zO(KO().mark((function i(o){var l,c,h,p;return KO().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(clearTimeout(r._timeoutTimer),r._response=o,!r._aborted&&r._running){i.next=4;break}return i.abrupt("return");case 4:if(f&&(o=f(o,n)||o),o.ok){i.next=7;break}throw new tC(n,E,o,"bad network response");case 7:if(l=_x(),a!==$I){i.next=15;break}return i.next=11,o.text();case 11:c=i.sent,r._running=!1,i.next=37;break;case 15:if(a!==eC){i.next=22;break}return i.next=18,o.json();case 18:c=i.sent,r._running=!1,i.next=37;break;case 22:if(!s){i.next=29;break}return r.resolve=e,r.reject=t,r._loadChunk(o,s,I,l),i.abrupt("return");case 29:return i.next=31,o.arrayBuffer();case 31:c=i.sent,c=new Uint8Array(c),r._running=!1,h=_x()-I,p=uC(c.byteLength,h),r.emit(yC,{speed:p,len:c.byteLength,time:h,vid:r._vid,index:r._index,range:r._range,priOptions:r._priOptions});case 37:r._logger.debug("[fetch load end], index,",u,",range,",d),e(sC(c,!0,o,o.headers.get("Content-Length"),o.headers.get("age"),I,l,u,d,r._vid,r._priOptions));case 39:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){var i;clearTimeout(r._timeoutTimer),r._running=!1,r._aborted&&!L||((e=e instanceof tC?e:new tC(n,E,null,null===(i=e)||void 0===i?void 0:i.message)).startTime=I,e.endTime=_x(),e.isTimeout=L,e.options={index:r._index,range:r._range,vid:r._vid,priOptions:r._priOptions},t(e))}))}))}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().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(jP){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions});case 16:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(){return t.apply(this,arguments)})},{key:"_loadChunk",value:function(e,t,r,n){var i=this;if(!e.body||!e.body.getReader){this._running=!1;var o=new tC(e.url,"",e,"onProgress of bad response.body.getReader");return o.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(o)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(gC),this._writeIdx=0);var a,s,u,l=this._reader=e.body.getReader(),c=function(){var o=zO(KO().mark((function o(){var d,f,h,p,v,m,y,g;return KO().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=_x(),o.prev=1,o.next=4,l.read();case 4:a=o.sent,u=_x(),o.next=13;break;case 8:return o.prev=8,o.t0=o.catch(1),u=_x(),i._aborted||(i._running=!1,o.t0.options={index:i._index,range:i._range,vid:i._vid,priOptions:i._priOptions},i.reject(o.t0)),o.abrupt("return");case 13:if(f=(null===(d=i._range)||void 0===d?void 0:d.length)>0?i._range[0]:0,h=f+i._receivedLength,!i._aborted){o.next=19;break}return i._running=!1,t(void 0,!1,{range:[h,h],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),o.abrupt("return");case 19:var _;if(p=a.value?a.value.byteLength:0,i._receivedLength+=p,i._logger.debug("【fetchLoader,onProgress call】,task,",i._range,", start,",h,", end,",f+i._receivedLength,", done,",a.done),i._onProcessMinLen>0){if(i._writeIdx+p>=i._onProcessMinLen||a.done)(v=new Uint8Array(i._writeIdx+p)).set(py(_=i._cache).call(_,0,i._writeIdx),0),p>0&&v.set(a.value,i._writeIdx),i._writeIdx=0,i._logger.debug("【fetchLoader,onProgress enough】,done,",a.done,",len,",v.byteLength,", writeIdx,",i._writeIdx);else if(p>0&&i._writeIdx+p<gC)i._cache.set(a.value,i._writeIdx),i._writeIdx+=p,i._logger.debug("【fetchLoader,onProgress cache】,len,",p,", writeIdx,",i._writeIdx);else if(p>0){var b;m=new Uint8Array(i._writeIdx+p+2048),i._logger.debug("【fetchLoader,onProgress extra start】,size,",i._writeIdx+p+2048,", datalen,",p,", writeIdx,",i._writeIdx),m.set(py(b=i._cache).call(b,0,i._writeIdx),0),p>0&&m.set(a.value,i._writeIdx),i._writeIdx+=p,delete i._cache,i._cache=m,i._logger.debug("【fetchLoader,onProgress extra end】,len,",p,", writeIdx,",i._writeIdx)}}else v=a.value;(v&&v.byteLength>0||a.done)&&t(v,a.done,{range:[i._range[0]+i._receivedLength-(v?v.byteLength:0),i._range[0]+i._receivedLength],vid:i._vid,index:i._index,startTime:s,endTime:u,st:r,firstByteTime:n,priOptions:i._priOptions},e),a.done?(y=_x()-r,g=uC(i._receivedLength,y),i.emit(yC,{speed:g,len:i._receivedLength,time:y,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,",a.done),i.resolve(sC(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),r,n,i._index,i._range,i._vid,i._priOptions))):c();case 25:case"end":return o.stop()}}),o,null,[[1,8]])})));return function(){return o.apply(this,arguments)}}();c()}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}}],[{key:"isSupported",value:function(){return!("undefined"==typeof fetch)}}]),n}(VR);var bC=function(e){tI(r,e);var t=lI(r);function r(){var e;return QO(this,r),eI(uI(e=t.call(this)),"_xhr",null),eI(uI(e),"_aborted",!1),eI(uI(e),"_timeoutTimer",null),eI(uI(e),"_range",null),eI(uI(e),"_receivedLength",0),eI(uI(e),"_url",null),eI(uI(e),"_onProgress",null),eI(uI(e),"_index",-1),eI(uI(e),"_headers",null),eI(uI(e),"_currentChunkSizeKB",384),eI(uI(e),"_timeout",null),eI(uI(e),"_xhr",null),eI(uI(e),"_withCredentials",null),eI(uI(e),"_startTime",-1),eI(uI(e),"_loadCompleteResolve",null),eI(uI(e),"_loadCompleteReject",null),eI(uI(e),"_runing",!1),eI(uI(e),"_logger",!1),eI(uI(e),"_vid",""),eI(uI(e),"_responseType",void 0),eI(uI(e),"_credentials",void 0),eI(uI(e),"_method",void 0),eI(uI(e),"_transformResponse",void 0),eI(uI(e),"_firstRtt",void 0),eI(uI(e),"_onCancel",null),eI(uI(e),"_priOptions",null),e}return $O(r,[{key:"load",value:function(e){var t=this;clearTimeout(this._timeoutTimer),this._logger=e.logger,this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this._logger.debug("【xhrLoader task】, range",this._range),this._url=aC(e.url,e.params);var r=_x();return new Mm((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 tC?e:new tC(t._url,t._request)).startTime=r,e.endTime=_x(),e.options={index:t._index,vid:t._vid,priOptions:t._priOptions},e}))}},{key:"_startLoad",value:function(){var e=null;if(this._responseType===qI&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;var t=1024*this._currentChunkSizeKB,r=this._range[0]+this._receivedLength,n=this._range[1];t<this._range[1]-r&&(n=r+t),e=[r,n],this._logger.debug("[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this._logger.debug("[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}},{key:"_internalOpen",value:function(e){var t=this;try{var r,n;this._startTime=_x();var i=this._xhr=new XMLHttpRequest;i.open(this._method||"GET",this._url,!0),i.responseType=this._responseType,this._timeout&&(i.timeout=this._timeout),i.withCredentials=this._withCredentials,i.onload=Cy(r=this._onLoad).call(r,this),i.onreadystatechange=Cy(n=this._onReadyStatechange).call(n,this),i.onerror=function(e){var r,n,i;t._running=!1;var o=new tC(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));o.options={index:t._index,range:t._range,vid:t._vid,priOptions:t._priOptions},t._loadCompleteReject(o)},i.ontimeout=function(e){t.cancel();var r=new tC(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 o,a=this._headers||{},s=iC(e);if(s&&(a.Range=s),a)ld(o=Dc(a)).call(o,(function(e){i.setRequestHeader(e,a[e])}));this._logger.debug("[xhr.send->] tast,",this._range,",load sub range, ",e),i.send(this._body)}catch(u){u.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(u)}}},{key:"_onReadyStatechange",value:function(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=_x())}},{key:"_onLoad",value:function(e){var t,r=e.target.status;if(r<200||r>299){var n=new tC(this._url,null,BO(BO({},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,o=null,a=!1,s=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===qI){var u,l=new Uint8Array(e.target.response);if(i=s+this._receivedLength,l&&l.byteLength>0){this._receivedLength+=l.byteLength;var c=_x()-this._startTime,d=uC(this._receivedLength,c);this.emit(yC,{speed:d,len:this._receivedLength,time:c,vid:this._vid,index:this._index,range:[i,s+this._receivedLength],priOptions:this._priOptions})}o=l,a=!((null===(u=this._range)||void 0===u?void 0:u.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this._logger.debug("[xhr load done->], tast :",this._range,", start",i,"end ",s+this._receivedLength,",dataLen,",l?l.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,o=e.target.response;var f={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&&(f=this._transformResponse(f,this._url)||f),this._onProgress&&this._onProgress(o,a,{index:this._index,vid:this._vid,range:[i,s+this._receivedLength],startTime:this._startTime,endTime:_x(),priOptions:this._priOptions},f),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(sC(this._onProgress?null:o,a,f,f.headers["content-length"],f.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,cI(rI(r.prototype),"removeAllListeners",this).call(this),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}},{key:"receiveLen",get:function(){return this._receivedLength}},{key:"running",get:function(){return this._running},set:function(e){this._running=e}},{key:"_getHeaders",value:function(e){var t,r,n={},i=fI(jT(t=e.getAllResponseHeaders()).call(t).split("\r\n"));try{for(i.s();!(r=i.n()).done;){var o=r.value.split(": ");n[o[0].toLowerCase()]=py(o).call(o,1).join(": ")}}catch(a){i.e(a)}finally{i.f()}return n}}],[{key:"isSupported",value:function(){return"undefined"!=typeof XMLHttpRequest}}]),r}(VR),wC=["retry","retryDelay","onRetryError","transformError"],SC=function(){function e(t,r){var n,i,o;QO(this,e),this.promise=((o=new Mm((function(e,t){n=e,i=t}))).used=!1,o.resolve=function(){return o.used=!0,n.apply(void 0,arguments)},o.reject=function(){return o.used=!0,i.apply(void 0,arguments)},o),this.alive=!!r.onProgress,!r.logger&&(r.logger=new BI("Loader")),this._loaderType=t,this._loader=t===zI&&"undefined"!=typeof fetch?new _C:new bC,this._config=r,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=r.retryCheckFunc,this._logger=r.logger}var t;return $O(e,[{key:"exec",value:function(){var e=this,t=this._config,r=t.retry,n=t.retryDelay,i=t.onRetryError,o=t.transformError,a=sI(t,wC),s=function(){var t=zO(KO().mark((function t(){var u,l,c;return KO().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e._loader.load(a);case 3:u=t.sent,e.promise.resolve(u),t.next=27;break;case 7:if(t.prev=7,t.t0=t.catch(0),e._loader.running=!1,e._logger.debug("[task request catch err]",t.t0),!e._canceled){t.next=13;break}return t.abrupt("return");case 13:if(t.t0.loaderType=e._loaderType,t.t0.retryCount=e._retryCount,l=t.t0,o&&(l=o(l)||l),i&&e._retryCount>0&&i(l,e._retryCount,{index:a.index,vid:a.vid,range:a.range,priOptions:a.priOptions}),e._retryCount++,c=!0,e._retryCheckFunc&&(c=e._retryCheckFunc(t.t0)),!(c&&e._retryCount<=r)){t.next=26;break}return clearTimeout(e._retryTimer),e._logger.debug("[task request setTimeout],retry",e._retryCount,",retry range,",a.range),e._retryTimer=o_(s,n),t.abrupt("return");case 26:e.promise.reject(l);case 27:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();return s(),this.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){return KO().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,e.abrupt("return",this._loader.cancel());case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"running",get:function(){return this._loader&&this._loader.running}},{key:"loader",get:function(){return this._loader}}]),e}();function kC(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Mm((function(t){return o_(t,e)}))}var RC,TC=function(e){tI(n,e);var t,r=lI(n);function n(e){var t;return QO(this,n),eI(uI(t=r.call(this,e)),"type",zI),eI(uI(t),"_queue",[]),eI(uI(t),"_alive",[]),eI(uI(t),"_currentTask",null),eI(uI(t),"_finnalUrl",""),eI(uI(t),"_config",void 0),t._config=function(e){return BO({loaderType:zI,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:$I,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0},e)}(e),t._config.loaderType!==QI&&_C.isSupported()||(t.type=QI),t.log=e.logger,t}return $O(n,[{key:"isFetch",value:function(){return this.type===zI}},{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=yR({},this._config,r)).params&&(r.params=yR({},r.params)),r.headers&&nC(r.headers)&&(r.headers=yR({},r.headers)),r.body&&nC(r.body)&&(r.body=yR({},r.body)),r.transformRequest&&(r=r.transformRequest(r)||r),r.logger=this.log;var n=new SC(this.type,r);return n.loader.on(yC,(function(e){t.emit(yC,e)})),this._queue.push(n),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),n.promise}},{key:"cancel",value:(t=zO(KO().mark((function e(){var t;return KO().wrap((function(e){for(var r,n,i;;)switch(e.prev=e.next){case 0:return t=pk(r=vR(n=this._queue).call(n,(function(e){return e.cancel()}))).call(r,vR(i=this._alive).call(i,(function(e){return e.cancel()}))),this._currentTask&&t.push(this._currentTask.cancel()),this._queue=[],this._alive=[],e.next=6,Mm.all(t);case 6:return e.next=8,kC();case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_processTask",value:function(){var e=this;if(this._currentTask=this._queue.shift(),this._currentTask){this._currentTask.alive&&this._alive.push(this._currentTask);var t=this._currentTask.exec().catch((function(e){}));t&&"function"==typeof t.finally&&t.finally((function(){var t,r,n;null!==(t=e._currentTask)&&void 0!==t&&t.alive&&(null===(r=e._alive)||void 0===r?void 0:r.length)>0&&(e._alive=Gc(n=e._alive).call(n,(function(t){return t&&t!==e._currentTask})));e._processTask()}))}}}],[{key:"isFetchSupport",value:function(){return _C.isSupported()}}]),n}(VR),xC=function(e){return e.RTC_STATE_CHANGE="core.rtcstatechange",e.RTC_NETWORK="core.rtcnetwork",e.RTC_FIRST_FRAME="core.rtcfirstframe",e}(xC||{}),EC=function(e){return e.LOAD_START="start_load",e.OFFER_SDP_READY="offer_sdp_ready",e.ANSWER_SDP_RECV="answer_sdp_recv",e.ANSWER_SDP_READY="answer_sdp_ready",e.ICE_CONNECTED="ice_connected",e.DTLS_CONNECTED="dtls_connected",e.PEER_CONNECTED="peer_connected",e.FIRST_PACKET_RECV="first_packet_recv",e.FIRST_FRAME_RECV="first_frame_recv",e.FIRST_FRAME_DECODED="first_frame_decoded",e.VIDEO_PLAYING="video_playing",e.VIDEO_CANPLAY="video_canplay",e.VIDEO_LOADEDDATA="video_loadeddata",e}(EC||{}),LC={},OC={},IC={exports:{}},CC=IC.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+(e["encrypt-uri"]?" %s":"%v")+" %s"+(e.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(e){return"ts-refclk:%s"+(null!=e.clksrcExt?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(e){var t="mediaclk:";return t+=null!=e.id?"id=%s %s":"%v%s",t+=null!=e.mediaClockValue?"=%s":"",t+=null!=e.rateNumerator?" rate=%s":"",t+=null!=e.rateDenominator?"/%s":""}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};ld(RC=Dc(CC)).call(RC,(function(e){var t=CC[e];ld(t).call(t,(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")}))}));var PC=IC.exports;!function(e,t){var r=function(e){return String(Number(e))===e?Number(e):e},n=function(e,t,n){var i=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:i&&!t[e.name]&&(t[e.name]={});var o=e.push?{}:i?t[e.name]:t;!function(e,t,n,i){if(i&&!n)t[i]=r(e[1]);else for(var o=0;o<n.length;o+=1)null!=e[o+1]&&(t[n[o]]=r(e[o+1]))}(n.match(e.reg),o,e.names,e.name),e.push&&t[e.push].push(o)},i=PC,o=Cy(t=RegExp.prototype.test).call(t,/^([a-z])=(.*)/);e.parse=function(e){var t,r,a={},s=[],u=a;return ld(t=Gc(r=e.split(/(\r\n|\r|\n)/)).call(r,o)).call(t,(function(e){var t=e[0],r=py(e).call(e,2);"m"===t&&(s.push({rtp:[],fmtp:[]}),u=s[s.length-1]);for(var o=0;o<(i[t]||[]).length;o+=1){var a=i[t][o];if(a.reg.test(r))return n(a,u,r)}})),a.media=s,a};var a=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length?e[n[0]]=r(n[1]):1===n.length&&t.length>1&&(e[n[0]]=void 0),e};e.parseParams=function(e){var t;return xI(t=e.split(/;\s?/)).call(t,a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){var t;return vR(t=e.toString().split(" ")).call(t,Number)},e.parseRemoteCandidates=function(e){for(var t,n=[],i=vR(t=e.split(" ")).call(t,r),o=0;o<i.length;o+=3)n.push({component:i[o],ip:i[o+1],port:i[o+2]});return n},e.parseImageAttributes=function(e){var t;return vR(t=e.split(" ")).call(t,(function(e){var t;return xI(t=e.substring(1,e.length-1).split(",")).call(t,a,{})}))},e.parseSimulcastStreamList=function(e){var t;return vR(t=e.split(";")).call(t,(function(e){var t;return vR(t=e.split(",")).call(t,(function(e){var t,n=!1;return"~"!==e[0]?t=r(e):(t=r(e.substring(1,e.length)),n=!0),{scid:t,paused:n}}))}))}}(OC);var DC=PC,AC=/%[sdv%]/g,ZC=function(e){var t=1,r=arguments,n=r.length;return e.replace(AC,(function(e){if(t>=n)return e;var i=r[t];switch(t+=1,e){case"%%":return"%";case"%s":return String(i);case"%d":return Number(i);case"%v":return""}}))},FC=function(e,t,r){var n=[e+"="+(t.format instanceof Function?t.format(t.push?r:r[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var o=t.names[i];t.name?n.push(r[t.name][o]):n.push(r[t.names[i]])}else n.push(r[t.name]);return ZC.apply(null,n)},jC=["v","o","s","i","u","e","p","c","b","t","r","z","a"],VC=["i","c","b","a"],WC=OC,MC=function(e,t){var r,n;t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),ld(r=e.media).call(r,(function(e){null==e.payloads&&(e.payloads="")}));var i=t.outerOrder||jC,o=t.innerOrder||VC,a=[];return ld(i).call(i,(function(t){var r;ld(r=DC[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(FC(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;ld(n=e[r.push]).call(n,(function(e){a.push(FC(t,r,e))}))}}))})),ld(n=e.media).call(n,(function(e){a.push(FC("m",DC.m[0],e)),ld(o).call(o,(function(t){var r;ld(r=DC[t]).call(r,(function(r){if(r.name in e&&null!=e[r.name])a.push(FC(t,r,e));else if(r.push in e&&null!=e[r.push]){var n;ld(n=e[r.push]).call(n,(function(e){a.push(FC(t,r,e))}))}}))}))})),a.join("\r\n")+"\r\n"};LC.write=MC,LC.parse=WC.parse,LC.parseParams=WC.parseParams,LC.parseFmtpConfig=WC.parseFmtpConfig,LC.parsePayloads=WC.parsePayloads,LC.parseRemoteCandidates=WC.parseRemoteCandidates,LC.parseImageAttributes=WC.parseImageAttributes,LC.parseSimulcastStreamList=WC.parseSimulcastStreamList;var NC=["adaptiveJitterBuffer"];function GC(e){return HC.apply(this,arguments)}function HC(){return(HC=Tg(kg().mark((function e(t){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[]);case 2:return e.abrupt("return",new Mm((function(e){var r;null===(r=t.getStats(null))||void 0===r||r.then((function(t){var r,n,i;e((n=[],i=[],ld(r=t).call(r,(function(e){"inbound-rtp"===e.type&&n.push(e),"remote-outbound-rtp"===e.type&&i.push(e)})),vR(n).call(n,(function(e){var t,n=r.get(e.codecId),o=r.get(e.trackId);return{type:null!==(t=e.mediaType)&&void 0!==t?t:e.kind,inboundRtp:e,remoteOutBoundRtp:lk(i).call(i,(function(t){return t.mediaType===e.mediaType})),codec:n,track:o}}))))}))})).catch((function(){return[]})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UC(e){var t,r,n,i,o,a,s,u,l,c,d,f,h,p,v,m,y,g,_,b,w,S,k,R,T,x,E,L,O,I,C,P,D,A,Z,F,j,V=null==e?void 0:Gc(e).call(e,(function(e){return"video"===e.type}))[0],W=null==e?void 0:Gc(e).call(e,(function(e){return"audio"===e.type}))[0];(V&&V.remoteOutBoundRtp&&(D={bytesSent:V.remoteOutBoundRtp.bytesSent,packetsSent:V.remoteOutBoundRtp.packetsSent}),W&&W.remoteOutBoundRtp&&(A={bytesSent:W.remoteOutBoundRtp.bytesSent,packetsSent:W.remoteOutBoundRtp.packetsSent}),void 0!==(null==V||null===(t=V.inboundRtp)||void 0===t?void 0:t.jitterBufferDelay))&&(Z=(null===(F=V.inboundRtp)||void 0===F?void 0:F.jitterBufferDelay)/(null===(j=V.inboundRtp)||void 0===j?void 0:j.jitterBufferEmittedCount)*1e3);return{video:V?{codec:null===(r=V.codec)||void 0===r?void 0:r.mimeType,payloadType:null===(n=V.codec)||void 0===n?void 0:n.payloadType,sdpFmtpLine:null===(i=V.codec)||void 0===i?void 0:i.sdpFmtpLine,bytesReceived:(null===(o=V.inboundRtp)||void 0===o?void 0:o.bytesReceived)||0,firCount:null===(a=V.inboundRtp)||void 0===a?void 0:a.firCount,pliCount:null===(s=V.inboundRtp)||void 0===s?void 0:s.pliCount,frameHeight:null===(u=V.inboundRtp)||void 0===u?void 0:u.frameHeight,frameWidth:null===(l=V.inboundRtp)||void 0===l?void 0:l.frameWidth,framesDecoded:null===(c=V.inboundRtp)||void 0===c?void 0:c.framesDecoded,framesDropped:null===(d=V.inboundRtp)||void 0===d?void 0:d.framesDropped,framesPerSecond:null===(f=V.inboundRtp)||void 0===f?void 0:f.framesPerSecond,framesReceived:null!==(h=null===(p=V.inboundRtp)||void 0===p?void 0:p.framesReceived)&&void 0!==h?h:null===(v=V.track)||void 0===v?void 0:v.framesReceived,jitter:null===(m=V.inboundRtp)||void 0===m?void 0:m.jitter,jitterBufferDelay:null===(y=V.inboundRtp)||void 0===y?void 0:y.jitterBufferDelay,keyFramesDecoded:null===(g=V.inboundRtp)||void 0===g?void 0:g.keyFramesDecoded,nackCount:null===(_=V.inboundRtp)||void 0===_?void 0:_.nackCount,packetsLost:(null===(b=V.inboundRtp)||void 0===b?void 0:b.packetsLost)||0,packetsReceived:(null===(w=V.inboundRtp)||void 0===w?void 0:w.packetsReceived)||0,averageJitterBufferDelay:Z}:void 0,audio:W?{codec:null===(S=W.codec)||void 0===S?void 0:S.mimeType,payloadType:null===(k=W.codec)||void 0===k?void 0:k.payloadType,sdpFmtpLine:null===(R=W.codec)||void 0===R?void 0:R.sdpFmtpLine,bytesReceived:(null===(T=W.inboundRtp)||void 0===T?void 0:T.bytesReceived)||0,audioLevel:null===(x=W.inboundRtp)||void 0===x?void 0:x.audioLevel,jitter:null===(E=W.inboundRtp)||void 0===E?void 0:E.jitter,jitterBufferDelay:null===(L=W.inboundRtp)||void 0===L?void 0:L.jitterBufferDelay,packetsLost:(null===(O=W.inboundRtp)||void 0===O?void 0:O.packetsLost)||0,packetsReceived:(null===(I=W.inboundRtp)||void 0===I?void 0:I.packetsReceived)||0,totalSamplesDuration:null===(C=W.inboundRtp)||void 0===C?void 0:C.totalSamplesDuration,totalSamplesReceived:null===(P=W.inboundRtp)||void 0===P?void 0:P.totalSamplesReceived}:void 0,videoRemote:D,audioRemote:A}}var XC=function(){function e(t){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;xg(this,e),this._pc=null,this._lastVideoStats=null,this._lastRemoteVideoStats=null,this._timer=0,this._timerInterval=0,this._speedQueue=[],this._lostRateQueue=[],this._receivedRateQueue=[],this._currentSpeed=-1,this._currentLostRate=-1,this._currentReceivedRate=-1,this._evaluate=Tg(kg().mark((function e(){var t,n,i,o,a,s,u,l,c,d,f,h,p,v,m,y,g,_,b,w;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,GC(r._pc).then((function(e){return UC(e)}));case 3:t=e.sent,r._lastVideoStats&&null!=t&&t.video&&(n=t.video,i=n.bytesReceived,o=n.packetsLost,a=n.packetsReceived,s=r._lastVideoStats,u=s.bytesReceived,l=s.packetsLost,c=s.packetsReceived,u&&r._cacheSpeed(8e3*(i-u)/r._timerInterval),d=o-l,(f=a-c)&&d>=0&&r._cacheLostRate(d/(d+f)*1e3/r._timerInterval)),r._lastRemoteVideoStats&&null!=t&&t.videoRemote&&(h=t.video||{},p=h.bytesReceived,v=void 0===p?0:p,m=r._lastVideoStats||{},y=m.bytesReceived,g=void 0===y?0:y,_=null==t?void 0:t.videoRemote,b=_.bytesSent,(w=r._lastRemoteVideoStats.bytesSent)&&b&&b-w>0&&r._cacheReceivedRate((v-g)/(b-w))),r._lastVideoStats=null==t?void 0:t.video,r._lastRemoteVideoStats=null==t?void 0:t.videoRemote,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])}))),this._pc=t,this._timerInterval=n,this.start(n)}return Lg(e,[{key:"start",value:function(e){clearInterval(this._timer),this._pc&&(this._timer=dT(this._evaluate,e))}},{key:"getStats",value:function(){return this._speedQueue.length?{speed:LT(this._currentSpeed.toFixed(2)),avgSpeed:LT(this._getAvgSpeed().toFixed(2)),lostRate:LT(this._currentLostRate.toFixed(2)),avgLostRate:LT(this._getAvgLostRate().toFixed(2)),receivedRate:LT(this._currentReceivedRate.toFixed(2)),avgReceivedRate:LT(this._getAvgReceivedRate().toFixed(2))}:{}}},{key:"destroy",value:function(){clearInterval(this._timer),this._pc=null,this._lastVideoStats=null}},{key:"_cacheSpeed",value:function(e){var t;(this._currentSpeed=e,this._speedQueue.length>5)&&(this._speedQueue=py(t=this._speedQueue).call(t,5));this._speedQueue.push(e)}},{key:"_cacheLostRate",value:function(e){var t;(this._currentLostRate=e,this._lostRateQueue.length>5)&&(this._lostRateQueue=py(t=this._lostRateQueue).call(t,5));this._lostRateQueue.push(e)}},{key:"_cacheReceivedRate",value:function(e){var t;(this._currentReceivedRate=e,this._receivedRateQueue.length>5)&&(this._receivedRateQueue=py(t=this._receivedRateQueue).call(t,5));this._receivedRateQueue.push(e)}},{key:"_getAvgSpeed",value:function(){var e;return-1===this._currentSpeed?-1:xI(e=this._speedQueue).call(e,(function(e,t){return e+t}),0)/this._speedQueue.length}},{key:"_getAvgLostRate",value:function(){var e;return-1===this._currentLostRate?-1:xI(e=this._lostRateQueue).call(e,(function(e,t){return e+t}),0)/this._lostRateQueue.length}},{key:"_getAvgReceivedRate",value:function(){var e;return-1===this._currentReceivedRate?-1:xI(e=this._receivedRateQueue).call(e,(function(e,t){return e+t}),0)/this._receivedRateQueue.length}}]),e}();function BC(){return!(!window.RTCPeerConnection||!window.RTCPeerConnection.prototype.addTransceiver)}var KC=function(){return"undefined"!=typeof window&&window.Worker},YC=function(){return"undefined"!=typeof MessageChannel},JC=function(){return"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams},zC={getNALUnits:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.length-e.position<4)return[];var r=e.position;return 1===e.getInt32(r)||0===e.getInt16(r)&&1===e.getInt8(r+2)?zC.getAnnexbNals(e,t):zC.getAvccNals(e,t)},getAnnexbNals:function(e,t){for(var r=[],n=zC.getHeaderPositionAnnexB(e),i=n.pos,o=i;i<e.length-4;){var a,s,u=new Uint8Array(py(a=e.buffer).call(a,i,i+n.headerLength));n.pos===e.position&&e.skip(n.headerLength),o=(n=zC.getHeaderPositionAnnexB(e)).pos;var l={header:u,body:new Uint8Array(py(s=e.buffer).call(s,i+u.byteLength,o)),type:-1};t?zC.analyseH265Nal(l):zC.analyseNal(l),(l.type<=9||t&&l.type<=40)&&0!==l.type&&r.push(l),e.skip(o-e.position),i=o}return r},getAvccNals:function(e,t){for(var r=[];e.position<e.length-4;){var n=e.getInt32(e.position);if(!(e.length-e.position>=n))break;var i,o,a=new Uint8Array(py(i=e.buffer).call(i,e.position,e.position+4));e.skip(4);var s=new Uint8Array(py(o=e.buffer).call(o,e.position,e.position+n));e.skip(n);var u={header:a,body:s,type:-1};t?zC.analyseH265Nal(u):zC.analyseNal(u),u.type<=9&&0!==u.type&&r.push(u)}return r},analyseNal:function(e){var t=31&e.body[0];switch(e.type=t,t){case 1:e.ndr=!0;break;case 5:e.idr=!0;break;case 6:e.sei=!0;break;case 7:e.sps=!0;break;case 8:e.pps=!0}},analyseH265Nal:function(e){var t=(126&e.body[0])>>1;switch(e.type=t,t){case 39:case 40:e.sei=!0}},getHeaderPositionAnnexB:function(e){for(var t=e.position,r=0,n=e.length;3!==r&&4!==r&&t<n-4;)0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:1===e.getInt8(t+2)?r=3:t++:t++;return t===n-4&&(0===e.getInt16(t)?1===e.getInt16(t+2)?r=4:t=n:(t++,0===e.getInt16(t)&&1===e.getInt8(t)?r=3:t=n)),{pos:t,headerLength:r}},isH265VideoFrame:function(e){var t,r,n;return uE(t=((null===(r=e.getMetadata)||void 0===r||null===(n=r.call(e))||void 0===n?void 0:n.mimeType)||"").toLowerCase()).call(t,"h265")}},QC=function(){function e(t){xg(this,e),this._position=0,this._dataview=new DataView(t)}return Lg(e,[{key:"length",get:function(){return this.buffer.byteLength}},{key:"buffer",get:function(){return this._dataview.buffer}},{key:"position",get:function(){return this._position},set:function(e){this._position=e}},{key:"back",value:function(e){this.position-=e}},{key:"getUint8",value:function(e){return this._dataview.getUint8(e)}},{key:"getInt8",value:function(e){return this._dataview.getInt8(e)}},{key:"getInt16",value:function(e){return this._dataview.getInt16(e)}},{key:"getUint16",value:function(e){return this._dataview.getUint16(e)}},{key:"getUint32",value:function(e){return this._dataview.getUint32(e)}},{key:"getInt32",value:function(e){return this._dataview.getInt32(e)}},{key:"skip",value:function(t){for(var r=Math.floor(t/4),n=t%4,i=0;i<r;i++)e.readByte(this,4);n>0&&e.readByte(this,n)}},{key:"readUint8",value:function(){return e.readByte(this,1)}},{key:"readUint16",value:function(){return e.readByte(this,2)}},{key:"readUint24",value:function(){return e.readByte(this,3)}},{key:"readUint32",value:function(){return e.readByte(this,4)}},{key:"readUint64",value:function(){return e.readByte(this,8)}},{key:"readInt8",value:function(){return e.readByte(this,1,!0)}},{key:"readInt16",value:function(){return e.readByte(this,2,!0)}},{key:"readInt32",value:function(){return e.readByte(this,4,!0)}},{key:"writeUint32",value:function(e){return new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}}],[{key:"readByte",value:function(e,t,r){var n;switch(t){case 1:n=r?e.getInt8(e.position):e.getUint8(e.position);break;case 2:n=r?e.getInt16(e.position):e.getUint16(e.position);break;case 3:if(r)throw new Error("not supported for readByte 3");n=e.getUint8(e.position)<<16,n|=e.getUint8(e.position+1)<<8,n|=e.getUint8(e.position+2);break;case 4:n=r?e.getInt32(e.position):e.getUint32(e.position);break;case 8:if(r)throw new Error("not supported for readBody 8");n=e.getUint32(e.position)<<32,n|=e.getUint32(e.position+4);break;default:n=""}return e.position+=t,n}}]),e}();function qC(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),Ad(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==Sc(e)||null===e)return e;var r=e[bg];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Sc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===Sc(o)?o:String(o)),n)}var i,o}function $C(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)}var eP=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"parseAnnexB",value:function(e){var t=e.byteLength-1,r=0;do{if(0!==e[t])break;r++,t--}while(t>0);r>=3&&(e=e.subarray(0,t+1));for(var n=e.length,i=2,o=0;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if((o=2+ ++i)>=n)return[];for(var a=[];o<n;)switch(e[o]){case 0:if(0!==e[o-1]){o+=2;break}if(0!==e[o-2]){o++;break}if(o<n-1&&1!==e[o+1]){o++;break}i!==o-2&&a.push(e.subarray(i,o-2));do{o++}while(1!==e[o]&&o<n);o=(i=o+1)+2;break;case 1:if(0!==e[o-1]||0!==e[o-2]){o+=3;break}i!==o-2&&a.push(e.subarray(i,o-2)),o=(i=o+1)+2;break;default:o+=3}return i<n&&a.push(e.subarray(i)),a}},{key:"parseAvcC",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var r,n=e.length,i=[],o=0;o+t<n;)if(r=$C(e,o),3===t&&(r>>>=8),o+=t,r){if(o+r>n)break;i.push(e.subarray(o,o+r)),o+=r}return i}}},{key:"parseSEI",value:function(e,t){for(var r=e.length,n=t?2:1,i=0,o=0,a="";255===e[n];)i+=255,n++;for(i+=e[n++];255===e[n];)o+=255,n++;if(o+=e[n++],5===i&&r>n+16)for(var s=0;s<16;s++)a+=e[n].toString(16),n++;return{payload:e.subarray(n,n+o),type:i,size:o,uuid:a}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,r=[],n=1;n<t-2;)0===e[n]&&0===e[n+1]&&3===e[n+2]?(r.push(n+2),n+=2):n++;if(!r.length)return e;var i=t-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=e[a];return o}}],(r=null)&&qC(t.prototype,r),n&&qC(t,n),Ad(t,"prototype",{writable:!1}),e}();function tP(e){return new TransformStream({transform:function(t,r){var n=zC.isH265VideoFrame(t),i=zC.getNALUnits(new QC(t.data),n);ld(i).call(i,(function(t){if(t.sei){var r=eP.parseSEI(eP.removeEPB(t.body),!1);r&&e({data:r,sei:{code:r.type,content:r.payload}})}})),r.enqueue(t)}})}"undefined"!=typeof self&&"DedicatedWorkerGlobalScope"===self.constructor.name&&self.addEventListener("rtctransform",(function(e){var t=e.transformer,r=t.options.port,n=tP((function(e){r.postMessage(e)}));t.readable.pipeThrough(n).pipeTo(e.transformer.writable)}));var rP="IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPXtnZXROQUxVbml0czpmdW5jdGlvbih0KXt2YXIgbj1hcmd1bWVudHMubGVuZ3RoPjEmJnZvaWQgMCE9PWFyZ3VtZW50c1sxXSYmYXJndW1lbnRzWzFdO2lmKHQubGVuZ3RoLXQucG9zaXRpb248NClyZXR1cm5bXTt2YXIgcj10LnBvc2l0aW9uO3JldHVybiAxPT09dC5nZXRJbnQzMihyKXx8MD09PXQuZ2V0SW50MTYocikmJjE9PT10LmdldEludDgocisyKT9lLmdldEFubmV4Yk5hbHModCxuKTplLmdldEF2Y2NOYWxzKHQsbil9LGdldEFubmV4Yk5hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W10saT1lLmdldEhlYWRlclBvc2l0aW9uQW5uZXhCKHQpLGE9aS5wb3Msbz1hO2E8dC5sZW5ndGgtNDspe3ZhciB1PW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKGEsYStpLmhlYWRlckxlbmd0aCkpO2kucG9zPT09dC5wb3NpdGlvbiYmdC5za2lwKGkuaGVhZGVyTGVuZ3RoKSxvPShpPWUuZ2V0SGVhZGVyUG9zaXRpb25Bbm5leEIodCkpLnBvczt2YXIgcz17aGVhZGVyOnUsYm9keTpuZXcgVWludDhBcnJheSh0LmJ1ZmZlci5zbGljZShhK3UuYnl0ZUxlbmd0aCxvKSksdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHMpOmUuYW5hbHlzZU5hbChzKSwocy50eXBlPD05fHxuJiZzLnR5cGU8PTQwKSYmMCE9PXMudHlwZSYmci5wdXNoKHMpLHQuc2tpcChvLXQucG9zaXRpb24pLGE9b31yZXR1cm4gcn0sZ2V0QXZjY05hbHM6ZnVuY3Rpb24odCxuKXtmb3IodmFyIHI9W107dC5wb3NpdGlvbjx0Lmxlbmd0aC00Oyl7dmFyIGk9dC5nZXRJbnQzMih0LnBvc2l0aW9uKTtpZighKHQubGVuZ3RoLXQucG9zaXRpb24+PWkpKWJyZWFrO3ZhciBhPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbis0KSk7dC5za2lwKDQpO3ZhciBvPW5ldyBVaW50OEFycmF5KHQuYnVmZmVyLnNsaWNlKHQucG9zaXRpb24sdC5wb3NpdGlvbitpKSk7dC5za2lwKGkpO3ZhciB1PXtoZWFkZXI6YSxib2R5Om8sdHlwZTotMX07bj9lLmFuYWx5c2VIMjY1TmFsKHUpOmUuYW5hbHlzZU5hbCh1KSx1LnR5cGU8PTkmJjAhPT11LnR5cGUmJnIucHVzaCh1KX1yZXR1cm4gcn0sYW5hbHlzZU5hbDpmdW5jdGlvbihlKXt2YXIgdD0zMSZlLmJvZHlbMF07c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMTplLm5kcj0hMDticmVhaztjYXNlIDU6ZS5pZHI9ITA7YnJlYWs7Y2FzZSA2OmUuc2VpPSEwO2JyZWFrO2Nhc2UgNzplLnNwcz0hMDticmVhaztjYXNlIDg6ZS5wcHM9ITB9fSxhbmFseXNlSDI2NU5hbDpmdW5jdGlvbihlKXt2YXIgdD0oMTI2JmUuYm9keVswXSk+PjE7c3dpdGNoKGUudHlwZT10LHQpe2Nhc2UgMzk6Y2FzZSA0MDplLnNlaT0hMH19LGdldEhlYWRlclBvc2l0aW9uQW5uZXhCOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLnBvc2l0aW9uLG49MCxyPWUubGVuZ3RoOzMhPT1uJiY0IT09biYmdDxyLTQ7KTA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OjE9PT1lLmdldEludDgodCsyKT9uPTM6dCsrOnQrKztyZXR1cm4gdD09PXItNCYmKDA9PT1lLmdldEludDE2KHQpPzE9PT1lLmdldEludDE2KHQrMik/bj00OnQ9cjoodCsrLDA9PT1lLmdldEludDE2KHQpJiYxPT09ZS5nZXRJbnQ4KHQpP249Mzp0PXIpKSx7cG9zOnQsaGVhZGVyTGVuZ3RoOm59fSxpc0gyNjVWaWRlb0ZyYW1lOmZ1bmN0aW9uKGUpe3ZhciB0LG47cmV0dXJuKChudWxsPT09KHQ9ZS5nZXRNZXRhZGF0YSl8fHZvaWQgMD09PXR8fG51bGw9PT0obj10LmNhbGwoZSkpfHx2b2lkIDA9PT1uP3ZvaWQgMDpuLm1pbWVUeXBlKXx8IiIpLnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMoImgyNjUiKX19O2Z1bmN0aW9uIHQoZSl7cmV0dXJuKHQ9ImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmInN5bWJvbCI9PXR5cGVvZiBTeW1ib2wuaXRlcmF0b3I/ZnVuY3Rpb24oZSl7cmV0dXJuIHR5cGVvZiBlfTpmdW5jdGlvbihlKXtyZXR1cm4gZSYmImZ1bmN0aW9uIj09dHlwZW9mIFN5bWJvbCYmZS5jb25zdHJ1Y3Rvcj09PVN5bWJvbCYmZSE9PVN5bWJvbC5wcm90b3R5cGU/InN5bWJvbCI6dHlwZW9mIGV9KShlKX1mdW5jdGlvbiBuKGUsdCl7Zm9yKHZhciBuPTA7bjx0Lmxlbmd0aDtuKyspe3ZhciByPXRbbl07ci5lbnVtZXJhYmxlPXIuZW51bWVyYWJsZXx8ITEsci5jb25maWd1cmFibGU9ITAsInZhbHVlImluIHImJihyLndyaXRhYmxlPSEwKSxPYmplY3QuZGVmaW5lUHJvcGVydHkoZSwoaT1yLmtleSxhPXZvaWQgMCwic3ltYm9sIj09dHlwZW9mKGE9ZnVuY3Rpb24oZSx0KXtpZigib2JqZWN0IiE9dHlwZW9mIGV8fG51bGw9PT1lKXJldHVybiBlO3ZhciBuPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1uKXt2YXIgcj1uLmNhbGwoZSx0fHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT10eXBlb2YgcilyZXR1cm4gcjt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PXQ/U3RyaW5nOk51bWJlcikoZSl9KGksInN0cmluZyIpKT9hOlN0cmluZyhhKSkscil9dmFyIGksYX12YXIgcj1mdW5jdGlvbigpe2Z1bmN0aW9uIGUodCl7IWZ1bmN0aW9uKGUsdCl7aWYoIShlIGluc3RhbmNlb2YgdCkpdGhyb3cgbmV3IFR5cGVFcnJvcigiQ2Fubm90IGNhbGwgYSBjbGFzcyBhcyBhIGZ1bmN0aW9uIil9KHRoaXMsZSksdGhpcy5fcG9zaXRpb249MCx0aGlzLl9kYXRhdmlldz1uZXcgRGF0YVZpZXcodCl9dmFyIHQscixpO3JldHVybiB0PWUsaT1be2tleToicmVhZEJ5dGUiLHZhbHVlOmZ1bmN0aW9uKGUsdCxuKXt2YXIgcjtzd2l0Y2godCl7Y2FzZSAxOnI9bj9lLmdldEludDgoZS5wb3NpdGlvbik6ZS5nZXRVaW50OChlLnBvc2l0aW9uKTticmVhaztjYXNlIDI6cj1uP2UuZ2V0SW50MTYoZS5wb3NpdGlvbik6ZS5nZXRVaW50MTYoZS5wb3NpdGlvbik7YnJlYWs7Y2FzZSAzOmlmKG4pdGhyb3cgbmV3IEVycm9yKCJub3Qgc3VwcG9ydGVkIGZvciByZWFkQnl0ZSAzIik7cj1lLmdldFVpbnQ4KGUucG9zaXRpb24pPDwxNixyfD1lLmdldFVpbnQ4KGUucG9zaXRpb24rMSk8PDgscnw9ZS5nZXRVaW50OChlLnBvc2l0aW9uKzIpO2JyZWFrO2Nhc2UgNDpyPW4/ZS5nZXRJbnQzMihlLnBvc2l0aW9uKTplLmdldFVpbnQzMihlLnBvc2l0aW9uKTticmVhaztjYXNlIDg6aWYobil0aHJvdyBuZXcgRXJyb3IoIm5vdCBzdXBwb3J0ZWQgZm9yIHJlYWRCb2R5IDgiKTtyPWUuZ2V0VWludDMyKGUucG9zaXRpb24pPDwzMixyfD1lLmdldFVpbnQzMihlLnBvc2l0aW9uKzQpO2JyZWFrO2RlZmF1bHQ6cj0iIn1yZXR1cm4gZS5wb3NpdGlvbis9dCxyfX1dLChyPVt7a2V5OiJsZW5ndGgiLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmJ1ZmZlci5ieXRlTGVuZ3RofX0se2tleToiYnVmZmVyIixnZXQ6ZnVuY3Rpb24oKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuYnVmZmVyfX0se2tleToicG9zaXRpb24iLGdldDpmdW5jdGlvbigpe3JldHVybiB0aGlzLl9wb3NpdGlvbn0sc2V0OmZ1bmN0aW9uKGUpe3RoaXMuX3Bvc2l0aW9uPWV9fSx7a2V5OiJiYWNrIix2YWx1ZTpmdW5jdGlvbihlKXt0aGlzLnBvc2l0aW9uLT1lfX0se2tleToiZ2V0VWludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRVaW50OChlKX19LHtrZXk6ImdldEludDgiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQ4KGUpfX0se2tleToiZ2V0SW50MTYiLHZhbHVlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLl9kYXRhdmlldy5nZXRJbnQxNihlKX19LHtrZXk6ImdldFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQxNihlKX19LHtrZXk6ImdldFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIHRoaXMuX2RhdGF2aWV3LmdldFVpbnQzMihlKX19LHtrZXk6ImdldEludDMyIix2YWx1ZTpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5fZGF0YXZpZXcuZ2V0SW50MzIoZSl9fSx7a2V5OiJza2lwIix2YWx1ZTpmdW5jdGlvbih0KXtmb3IodmFyIG49TWF0aC5mbG9vcih0LzQpLHI9dCU0LGk9MDtpPG47aSsrKWUucmVhZEJ5dGUodGhpcyw0KTtyPjAmJmUucmVhZEJ5dGUodGhpcyxyKX19LHtrZXk6InJlYWRVaW50OCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDEpfX0se2tleToicmVhZFVpbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIpfX0se2tleToicmVhZFVpbnQyNCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDMpfX0se2tleToicmVhZFVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDQpfX0se2tleToicmVhZFVpbnQ2NCIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDgpfX0se2tleToicmVhZEludDgiLHZhbHVlOmZ1bmN0aW9uKCl7cmV0dXJuIGUucmVhZEJ5dGUodGhpcywxLCEwKX19LHtrZXk6InJlYWRJbnQxNiIsdmFsdWU6ZnVuY3Rpb24oKXtyZXR1cm4gZS5yZWFkQnl0ZSh0aGlzLDIsITApfX0se2tleToicmVhZEludDMyIix2YWx1ZTpmdW5jdGlvbigpe3JldHVybiBlLnJlYWRCeXRlKHRoaXMsNCwhMCl9fSx7a2V5OiJ3cml0ZVVpbnQzMiIsdmFsdWU6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBVaW50OEFycmF5KFtlPj4+MjQmMjU1LGU+Pj4xNiYyNTUsZT4+PjgmMjU1LDI1NSZlXSl9fV0pJiZuKHQucHJvdG90eXBlLHIpLGkmJm4odCxpKSxPYmplY3QuZGVmaW5lUHJvcGVydHkodCwicHJvdG90eXBlIix7d3JpdGFibGU6ITF9KSxlfSgpO2Z1bmN0aW9uIGkoZSxuKXtmb3IodmFyIHI9MDtyPG4ubGVuZ3RoO3IrKyl7dmFyIGk9bltyXTtpLmVudW1lcmFibGU9aS5lbnVtZXJhYmxlfHwhMSxpLmNvbmZpZ3VyYWJsZT0hMCwidmFsdWUiaW4gaSYmKGkud3JpdGFibGU9ITApLE9iamVjdC5kZWZpbmVQcm9wZXJ0eShlLChhPWkua2V5LG89dm9pZCAwLG89ZnVuY3Rpb24oZSxuKXtpZigib2JqZWN0IiE9PXQoZSl8fG51bGw9PT1lKXJldHVybiBlO3ZhciByPWVbU3ltYm9sLnRvUHJpbWl0aXZlXTtpZih2b2lkIDAhPT1yKXt2YXIgaT1yLmNhbGwoZSxufHwiZGVmYXVsdCIpO2lmKCJvYmplY3QiIT09dChpKSlyZXR1cm4gaTt0aHJvdyBuZXcgVHlwZUVycm9yKCJAQHRvUHJpbWl0aXZlIG11c3QgcmV0dXJuIGEgcHJpbWl0aXZlIHZhbHVlLiIpfXJldHVybigic3RyaW5nIj09PW4/U3RyaW5nOk51bWJlcikoZSl9KGEsInN0cmluZyIpLCJzeW1ib2wiPT09dChvKT9vOlN0cmluZyhvKSksaSl9dmFyIGEsb31mdW5jdGlvbiBhKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTowO3JldHVybihlW3RdPDwyND4+PjApKyhlW3QrMV08PDE2KSsoZVt0KzJdPDw4KSsoZVt0KzNdfHwwKX12YXIgbz1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXshZnVuY3Rpb24oZSx0KXtpZighKGUgaW5zdGFuY2VvZiB0KSl0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgY2FsbCBhIGNsYXNzIGFzIGEgZnVuY3Rpb24iKX0odGhpcyxlKX12YXIgdCxuLHI7cmV0dXJuIHQ9ZSxyPVt7a2V5OiJwYXJzZUFubmV4QiIsdmFsdWU6ZnVuY3Rpb24oZSl7dmFyIHQ9ZS5ieXRlTGVuZ3RoLTEsbj0wO2Rve2lmKDAhPT1lW3RdKWJyZWFrO24rKyx0LS19d2hpbGUodD4wKTtuPj0zJiYoZT1lLnN1YmFycmF5KDAsdCsxKSk7Zm9yKHZhciByPWUubGVuZ3RoLGk9MixhPTA7bnVsbCE9PWVbaV0mJnZvaWQgMCE9PWVbaV0mJjEhPT1lW2ldOylpKys7aWYoKGE9MisgKytpKT49cilyZXR1cm5bXTtmb3IodmFyIG89W107YTxyOylzd2l0Y2goZVthXSl7Y2FzZSAwOmlmKDAhPT1lW2EtMV0pe2ErPTI7YnJlYWt9aWYoMCE9PWVbYS0yXSl7YSsrO2JyZWFrfWlmKGE8ci0xJiYxIT09ZVthKzFdKXthKys7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKTtkb3thKyt9d2hpbGUoMSE9PWVbYV0mJmE8cik7YT0oaT1hKzEpKzI7YnJlYWs7Y2FzZSAxOmlmKDAhPT1lW2EtMV18fDAhPT1lW2EtMl0pe2ErPTM7YnJlYWt9aSE9PWEtMiYmby5wdXNoKGUuc3ViYXJyYXkoaSxhLTIpKSxhPShpPWErMSkrMjticmVhaztkZWZhdWx0OmErPTN9cmV0dXJuIGk8ciYmby5wdXNoKGUuc3ViYXJyYXkoaSkpLG99fSx7a2V5OiJwYXJzZUF2Y0MiLHZhbHVlOmZ1bmN0aW9uKGUpe3ZhciB0PWFyZ3VtZW50cy5sZW5ndGg+MSYmdm9pZCAwIT09YXJndW1lbnRzWzFdP2FyZ3VtZW50c1sxXTo0O2lmKCEoZS5sZW5ndGg8NCkpe2Zvcih2YXIgbixyPWUubGVuZ3RoLGk9W10sbz0wO28rdDxyOylpZihuPWEoZSxvKSwzPT09dCYmKG4+Pj49OCksbys9dCxuKXtpZihvK24+cilicmVhaztpLnB1c2goZS5zdWJhcnJheShvLG8rbikpLG8rPW59cmV0dXJuIGl9fX0se2tleToicGFyc2VTRUkiLHZhbHVlOmZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBuPWUubGVuZ3RoLHI9dD8yOjEsaT0wLGE9MCxvPSIiOzI1NT09PWVbcl07KWkrPTI1NSxyKys7Zm9yKGkrPWVbcisrXTsyNTU9PT1lW3JdOylhKz0yNTUscisrO2lmKGErPWVbcisrXSw1PT09aSYmbj5yKzE2KWZvcih2YXIgdT0wO3U8MTY7dSsrKW8rPWVbcl0udG9TdHJpbmcoMTYpLHIrKztyZXR1cm57cGF5bG9hZDplLnN1YmFycmF5KHIscithKSx0eXBlOmksc2l6ZTphLHV1aWQ6b319fSx7a2V5OiJyZW1vdmVFUEIiLHZhbHVlOmZ1bmN0aW9uKGUpe2Zvcih2YXIgdD1lLmJ5dGVMZW5ndGgsbj1bXSxyPTE7cjx0LTI7KTA9PT1lW3JdJiYwPT09ZVtyKzFdJiYzPT09ZVtyKzJdPyhuLnB1c2gocisyKSxyKz0yKTpyKys7aWYoIW4ubGVuZ3RoKXJldHVybiBlO3ZhciBpPXQtbi5sZW5ndGgsYT1uZXcgVWludDhBcnJheShpKSxvPTA7Zm9yKHI9MDtyPGk7bysrLHIrKylvPT09blswXSYmKG8rKyxuLnNoaWZ0KCkpLGFbcl09ZVtvXTtyZXR1cm4gYX19XSwobj1udWxsKSYmaSh0LnByb3RvdHlwZSxuKSxyJiZpKHQsciksT2JqZWN0LmRlZmluZVByb3BlcnR5KHQsInByb3RvdHlwZSIse3dyaXRhYmxlOiExfSksZX0oKTsidW5kZWZpbmVkIiE9dHlwZW9mIHNlbGYmJiJEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSI9PT1zZWxmLmNvbnN0cnVjdG9yLm5hbWUmJnNlbGYuYWRkRXZlbnRMaXN0ZW5lcigicnRjdHJhbnNmb3JtIiwoZnVuY3Rpb24odCl7dmFyIG4saT10LnRyYW5zZm9ybWVyLGE9aS5vcHRpb25zLnBvcnQsdT0obj1mdW5jdGlvbihlKXthLnBvc3RNZXNzYWdlKGUpfSxuZXcgVHJhbnNmb3JtU3RyZWFtKHt0cmFuc2Zvcm06ZnVuY3Rpb24odCxpKXt2YXIgYT1lLmlzSDI2NVZpZGVvRnJhbWUodCk7ZS5nZXROQUxVbml0cyhuZXcgcih0LmRhdGEpLGEpLmZvckVhY2goKGZ1bmN0aW9uKGUpe2lmKGUuc2VpKXt2YXIgdD1vLnBhcnNlU0VJKG8ucmVtb3ZlRVBCKGUuYm9keSksITEpO3QmJm4oe2RhdGE6dCxzZWk6e2NvZGU6dC50eXBlLGNvbnRlbnQ6dC5wYXlsb2FkfX0pfX0pKSxpLmVucXVldWUodCl9fSkpO2kucmVhZGFibGUucGlwZVRocm91Z2godSkucGlwZVRvKHQudHJhbnNmb3JtZXIud3JpdGFibGUpfSkpfSgpOwo=",nP="undefined"!=typeof window&&window.Blob&&new Blob([atob(rP)],{type:"text/javascript;charset=utf-8"});function iP(){var e=nP&&(ek||window.webkitURL).createObjectURL(nP);try{return e?new Worker(e,{}):new Worker("data:application/javascript;base64,"+rP,{type:"module"})}finally{e&&(ek||window.webkitURL).revokeObjectURL(e)}}var oP=function(){function e(){xg(this,e),this._isStallInPreReportEnd=!1,this._stallList=[],this._audioTransceiver=null}var t,r;return Lg(e,[{key:"start",value:function(t){this.stop(),this._audioTransceiver=t,e.interval>=100&&this._startStallCountInterval()}},{key:"stop",value:function(){this._stallList=[],this._audioStallTimer&&(clearTimeout(this._audioStallTimer),delete this._audioStallTimer)}},{key:"destroy",value:function(){this.stop(),this._audioTransceiver=null}},{key:"getAudioStallInfo",value:(r=Tg(kg().mark((function e(){var t,r;return kg().wrap((function(e){for(var n;;)switch(e.prev=e.next){case 0:return t={stats_count:Gc(n=this._stallList).call(n,(function(e){return e.get_stats_cost})).length,stall_list:jg(this._stallList)},e.prev=1,e.next=4,this._audioStallCount();case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:return r=sP(this._stallList,2,this._isStallInPreReportEnd),this._isStallInPreReportEnd=r.isStallInEnd,this.stop(),this._startStallCountInterval(),e.abrupt("return",{stallCount:r.stall_count,stallDuration:r.stall_duration,list:r.list,extra:t});case 13:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return r.apply(this,arguments)})},{key:"_startStallCountInterval",value:function(){var t=this,r=function(){var n=Tg(kg().mark((function n(){return kg().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return clearTimeout(t._audioStallTimer),delete t._audioStallTimer,n.next=4,t._audioStallCount();case 4:t._audioStallTimer||(t._audioStallTimer=o_(r,e.interval));case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();this._audioStallTimer=o_(r,e.interval)}},{key:"_audioStallCount",value:(t=Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,d,f,h,p,v,m,y,g;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this._preSample&&_x()-this._preSample.ts<.5*e.interval)){t.next=2;break}return t.abrupt("return");case 2:return r=_x(),o=0,t.prev=4,t.next=7,null===(a=this._audioTransceiver)||void 0===a?void 0:a.receiver.getStats();case 7:null==(s=t.sent)||ld(s).call(s,(function(e){"inbound-rtp"===e.type&&(n=e),o++})),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),i=t.t0.message||Nx(t.t0);case 14:if(this._preSample){t.next=17;break}return this._preSample={ts:_x(),concealedSamples:(null===(u=n)||void 0===u?void 0:u.concealedSamples)||0,totalSamplesReceived:(null===(l=n)||void 0===l?void 0:l.totalSamplesReceived)||0},t.abrupt("return");case 17:c=_x(),d=_x(),f=d-this._preSample.ts,n?(p=(h=n).concealedSamples,v=h.totalSamplesReceived,m=p-this._preSample.concealedSamples,y=v-this._preSample.totalSamplesReceived,g=m>=0&&y>=0&&m>=e.ratio*y,this._stallList.push({concealed:m,received:y,diff:f,start:this._preSample.ts,end:d,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,is_stall:g}),this._preSample.concealedSamples=p,this._preSample.totalSamplesReceived=v,this._preSample.ts=d):this._stallList.push({diff:f,start:this._preSample.ts,end:d,get_stats_cost:c-r,get_stats_start:r,get_stats_end:c,reason:o?i||"no inbound-rtp":"no report"});case 21:case"end":return t.stop()}}),t,this,[[4,11]])}))),function(){return t.apply(this,arguments)})}]),e}(),aP=oP;aP.interval=100,aP.ratio=.6;var sP=function(e,t,r){for(var n,i={stall_count:0,stall_duration:0,isStallInEnd:!1,list:[]},o=0,a=0,s=function(r){var n=e[r];n.is_stall&&(o++,a+=n.diff||0);var s=r===e.length-1;if(!n.is_stall||s){var l=o>=t,c=r+t-o-1;if(!l&&o>2){var d,f=0;ld(d=py(e).call(e,r+1,c+1)).call(d,(function(e){e.is_stall&&(f+=e.diff||0)})),(l=a+f>aP.interval*t*aP.ratio)&&(r=c,a+=f)}l&&(i.stall_count++,i.stall_duration+=a,i.list.push(a)),s&&(i.isStallInEnd=l),o=a=0}u=r},u=0;u<e.length;u++)s(u);return!0===(null===(n=e[0])||void 0===n?void 0:n.is_stall)&&r&&i.stall_count>0&&i.stall_count--,i};function uP(){var e=navigator.userAgent;return null!==e.match("Safari")&&null===e.match("Chrome")}function lP(){return null!==navigator.userAgent.match("Firefox")}var cP=function(){function e(){var t=this;xg(this,e),this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,this._pauseStart=0,this._pauseDuration=0,this._stallTimeThreshold={stall500ms:uP()||lP()?550:500,stall100ms:100},this._support100msStall="undefined"!=typeof window&&"function"==typeof HTMLVideoElement.prototype.requestVideoFrameCallback,this._handleVisibilityChange=function(){"hidden"===document.visibilityState&&t._framePause()},this._framePause=function(){if(t._prePts&&t._stallList){var e=performance.now(),r=e-t._prePts;t._stallList.push({playTime:e,timeUpdateInterval:Math.round(r)}),t._prePts=void 0}}}return Lg(e,[{key:"start",value:function(e){var t=this;if(this._player=e,this._support100msStall){var r;if(e)this._requestVideoFrameCallbackTimer=e.requestVideoFrameCallback(Cy(r=this._onVideoRefresh).call(r,this)),this._removeHandler=function(){t._requestVideoFrameCallbackTimer&&e.cancelVideoFrameCallback(t._requestVideoFrameCallbackTimer)}}else{var n=function(){return t._onVideoTimeupdate(e)};e.addEventListener("timeupdate",n),this._removeHandler=function(){return e.removeEventListener("timeupdate",n)}}var i=function(){return t._onVideoPause()};e.addEventListener("pause",i);var o=function(){return t._onVideoPlay()};e.addEventListener("play",o),this._remotePlayPauseHandler=function(){e.removeEventListener("pause",i),e.removeEventListener("play",o)},document.addEventListener("visibilitychange",this._handleVisibilityChange),window.addEventListener("pagehide",this._framePause)}},{key:"stop",value:function(){delete this._player,this._removeHandler&&this._removeHandler(),delete this._removeHandler,this._remotePlayPauseHandler&&this._remotePlayPauseHandler(),delete this._remotePlayPauseHandler,delete this._stallList,delete this._prePts,this._videoInWaiting100ms=!1,this._videoInWaiting500ms=!1,document.removeEventListener("visibilitychange",this._handleVisibilityChange),window.removeEventListener("pagehide",this._framePause)}},{key:"destroy",value:function(){this.stop()}},{key:"getStallInfo",value:function(e){var t=this,r=e.interval,n=e.frameRateReceived,i=e.frameRateDecoded,o=e.bitrate,a={pts:0,stall:{stallCount500ms:0,stallDuration500ms:0,stallRate500ms:0,stallCount100ms:0,stallDuration100ms:0,stallRate100ms:0},pauseDuration:this._getPauseDuration()};if(this._stallList&&"visible"===document.visibilityState&&!this._isPaused){var s;if((uP()||lP())&&(0===o||(i||1/0)<=1||(n||1/0)<=1)||0===this._stallList.length)a.stall.stallDuration500ms=r,a.stall.stallCount500ms=this._videoInWaiting500ms?0:1,a.stall.stallRate500ms=1,this._videoInWaiting500ms=!0,this._support100msStall&&(a.stall.stallDuration100ms=r,a.stall.stallCount100ms=this._videoInWaiting100ms?0:1,a.stall.stallRate100ms=1,this._videoInWaiting100ms=!0);else ld(s=this._stallList).call(s,(function(e,n){var i=e.timeUpdateInterval,o=e.playTime,s=i;0===n&&(t._videoInWaiting100ms||t._videoInWaiting500ms)&&(s=Math.round(i%r)),i>t._stallTimeThreshold.stall500ms?(a.stall.stallDuration500ms+=s,t._videoInWaiting500ms||a.stall.stallCount500ms++,t._videoInWaiting500ms=!0):t._videoInWaiting500ms=!1,t._support100msStall&&(i>t._stallTimeThreshold.stall100ms?(a.stall.stallDuration100ms+=s,t._videoInWaiting100ms||a.stall.stallCount100ms++,t._videoInWaiting100ms=!0):t._videoInWaiting100ms=!1),a.pts=o}));var u=a.stall,l=u.stallDuration500ms,c=u.stallDuration100ms;a.stall.stallRate500ms=Math.min(Number((l/r).toFixed(4)),1),this._support100msStall&&c?a.stall.stallRate100ms=Math.min(Number((c/r).toFixed(4)),1):(delete a.stall.stallRate100ms,delete a.stall.stallCount100ms,delete a.stall.stallDuration100ms),this._stallList=[]}return a}},{key:"_getPauseDuration",value:function(){var e=this._pauseDuration;if(this._pauseDuration=0,this._isPaused){var t=_x(),r=t-(this._pauseStart||0);r>500&&(this._pauseStart=t,e+=r)}return e}},{key:"_onVideoPause",value:function(){this._isPaused=!0,this._pauseStart=_x(),this._framePause()}},{key:"_onVideoPlay",value:function(){this._isPaused=!1;var e=_x()-this._pauseStart;e>500&&(this._pauseDuration+=e)}},{key:"_onVideoTimeupdate",value:function(e){if(e&&0!==e.currentTime)if(void 0!==this._prePts){if(this._stallList||(this._stallList=[]),e.currentTime>this._prePts){var t=e.currentTime-this._prePts;this._stallList.push({playTime:e.currentTime,timeUpdateInterval:Math.round(1e3*t)})}this._prePts=e.currentTime}else this._prePts=e.currentTime}},{key:"_onVideoRefresh",value:function(e,t){if(this._stallList||(this._stallList=[]),this._prePts){var r=t.presentationTime-this._prePts;this._stallList.push({playTime:t.presentationTime,timeUpdateInterval:Math.round(r)})}var n;(this._prePts=t.presentationTime,this._player)&&this._player.requestVideoFrameCallback(Cy(n=this._onVideoRefresh).call(n,this))}}]),e}();function dP(e){return fP.apply(this,arguments)}function fP(){return(fP=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||ld(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,void 0!==e.jitterBufferDelay&&(r.jitterBufferDelay=e.jitterBufferDelay,r.jitterBufferEmittedCount=e.jitterBufferEmittedCount),void 0!==e.totalSamplesReceived&&(r.totalSamplesReceived=e.totalSamplesReceived,r.concealedSamples=e.concealedSamples,r.silentConcealedSamples=e.silentConcealedSamples,r.concealmentEvents=e.concealmentEvents),void 0!==e.fecPacketsReceived&&(r.fecPacketsReceived=e.fecPacketsReceived),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp),void 0!==e.totalSamplesDuration&&(r.totalSamplesDuration=e.totalSamplesDuration)):"codec"===e.type?(r.recordSampleRate=e.clockRate,e.channels&&(r.numChannels=e.channels),r.codecType=e.mimeType):"candidate-pair"===e.type?(r.rtt=1e3*e.currentRoundTripTime,r.total_rtt=1e3*e.totalRoundTripTime):"track"===e.type&&void 0!==e.audioLevel||e.type})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hP(e,t){var r=yP(e,t,"timestamp"),n=yP(e,t,"packetsLost"),i=Math.round(yP(e,t,"jitterBufferDelay")/yP(e,t,"jitterBufferEmittedCount")*1e3),o=yP(e,t,"packetsReceived");return{audioLossRate:+(n/(o+n)).toFixed(2),receivedKBitrate:+(8*yP(e,t,"bytesReceived")/r).toFixed(2),statsInterval:r,rtt:t.rtt||0,jitterBufferDelay:i,packetsReceived:o,numChannels:t.numChannels||1,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,samplesDuration:Math.round(1e3*yP(e,t,"totalSamplesDuration")),receivedSampleRate:yP(e,t,"totalSamplesReceived")/r,concealedSamples:Math.round(yP(e,t,"concealedSamples")),concealmentEvent:Math.round(yP(e,t,"concealmentEvents")),e2eDelay:Math.round((t.rtt||0)+i)}}function pP(e){return vP.apply(this,arguments)}function vP(){return(vP=Tg(kg().mark((function e(t){var r,n;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},e.next=3,t;case 3:return n=e.sent,r.timestamp=_x(),null==n||ld(n).call(n,(function(e){"inbound-rtp"===e.type?(r.packetsLost=e.packetsLost,r.packetsReceived=e.packetsReceived,r.bytesReceived=e.bytesReceived,r.framesDecoded=e.framesDecoded,r.totalDecodeTime=e.totalDecodeTime,r.framesReceived=e.framesReceived,r.keyFramesDecoded=e.keyFramesDecoded,r.framesDropped=e.framesDropped,r.firCount=e.firCount,r.nackCount=e.nackCount,r.pliCount=e.pliCount,void 0!==e.jitterBufferDelay&&(r.jitterBufferEmittedCount=e.jitterBufferEmittedCount,r.jitterBufferDelay=e.jitterBufferDelay),void 0!==e.frameWidth&&(r.width=e.frameWidth,r.height=e.frameHeight),void 0!==e.estimatedPlayoutTimestamp&&(r.estimatedPlayoutTimestamp=e.estimatedPlayoutTimestamp)):"track"===e.type&&void 0!==e.frameWidth?(r.width=e.frameWidth,r.height=e.frameHeight,void 0!==e.framesReceived&&(r.framesReceived=e.framesReceived)):"codec"===e.type?r.codecType=e.mimeType:"candidate-pair"===e.type&&(r.rtt=1e3*e.currentRoundTripTime,r.totalRtt=1e3*e.totalRoundTripTime)})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mP(e,t){var r=yP(e,t,"timestamp"),n=yP(e,t,"packetsLost"),i=yP(e,t,"nackCount"),o=yP(e,t,"packetsReceived"),a=Math.round(yP(e,t,"jitterBufferDelay")/yP(e,t,"jitterBufferEmittedCount")*1e3),s=(t.width||0)*(t.height||0),u=(e.width||0)*(e.height||0);return{statsInterval:r,abrState:0===s||0===u?"none":s>u?"upgrade":s<u?"degrade":"none",width:t.width||0,height:t.height||0,estimatedPlayoutTimestamp:t.estimatedPlayoutTimestamp,videoLossRate:+n/(yP(e,t,"packetsReceived")+n),receivedKBitrate:+(8*yP(e,t,"bytesReceived")/r).toFixed(2),decoderOutputFrameRate:Math.round(1e3*yP(e,t,"framesDecoded")/r),receivedFrameRate:Math.round(1e3*yP(e,t,"framesReceived")/r),rtt:t.rtt||0,totalRtt:Math.round(t.totalRtt||0),jitterBufferDelay:a,codecType:t.codecType,packetsReceived:o,avgDecodeDelay:Math.round(1e3*yP(e,t,"totalDecodeTime")/yP(e,t,"framesDecoded")),keyFramesDecoded:yP(e,t,"keyFramesDecoded"),framesDropped:yP(e,t,"framesDropped"),firCount:yP(e,t,"firCount"),nackCount:i,pliCount:yP(e,t,"pliCount"),e2eDelay:Math.round((t.rtt||0)+a),retransmittedRate:+(i/(o+n)).toFixed(2)}}function yP(e,t,r){var n=Nk(e[r])?0:+e[r],i=Nk(t[r])?0:+t[r];return Math.max(0,i-n)}var gP=1,_P=2,bP=3,wP=1,SP=2,kP=3,RP=4,TP=5,xP=6,EP=function(){function e(t,r){xg(this,e),this._peer=t,this._networkQualityParams=r,this._preDownlinkStats=[]}return Lg(e,[{key:"getDownlinkQuality",value:function(e,t){if(0!==e.receivedKBitrate||0!==t.receivedKBitrate){if("connected"!==this._peer.connectionState&&"connecting"!==this._peer.connectionState||!navigator.onLine)return[xP,{}];var r,n,i,o=this._getQosLevel(e.rtt,e.audioLossRate,t.retransmittedRate),a=this._getDownlinkQoE("audio",e.stallDuration/e.statsInterval,e.e2eDelay),s=this._getNetworkQuality(o,a),u=this._getQosLevel(t.rtt,t.videoLossRate,t.retransmittedRate),l=this._getDownlinkQoE("video",t.stallDuration/t.statsInterval,t.e2eDelay),c=this._getNetworkQuality(u,l),d=s&&c?Math.ceil((s+c)/2):s||c,f=o&&u?Math.ceil((o+u)/2):o||u;if(d)return this._preDownlinkStats=py(r=pk(n=[]).call(n,jg(this._preDownlinkStats),[d])).call(r,-2),[Math.floor(xI(i=this._preDownlinkStats).call(i,(function(e,t){return t+e}),0)/this._preDownlinkStats.length),{qualityQos:f,audioLevel:s,videoLevel:c,audioQos:o,audioQoe:a,videoQos:u,videoQoe:l}]}}},{key:"destroy",value:function(){this._preDownlinkStats=[]}},{key:"_getQosLevel",value:function(e,t,r){var n,i=this._networkQualityParams.networkQos;return n=(!e||e<=i[wP].maxRtt)&&t<=i[wP].maxLoss?wP:(!e||e<=i[SP].maxRtt)&&t<=i[SP].maxLoss?SP:(!e||e<=i[kP].maxRtt)&&t<=i[kP].maxLoss?kP:(!e||e<=i[RP].maxRtt)&&t<=i[RP].maxLoss?RP:TP,r>(i[RP].minRetransmittedRate||.5)?n=Math.max(n,RP):r>(i[kP].minRetransmittedRate||.35)?n=Math.max(n,kP):r>(i[SP].minRetransmittedRate||.2)&&(n=Math.max(n,SP)),n}},{key:"_getDownlinkQoE",value:function(e,t,r){var n=this._networkQualityParams.networkQoe,i={audio:{delay:n.audioDelay,stallRadio:n.audioStallRadio},video:{delay:n.videoDelay,stallRadio:n.videoStallRadio}}[e];return t>i.stallRadio||r>i.delay||t>i.stallRadio/2&&r>i.delay/2?bP:(t>i.stallRadio/2||i.delay,_P)}},{key:"_getNetworkQuality",value:function(e,t){return t===gP?Math.max(e-2,1):t===_P?e:Math.min(e+1,5)}}]),e}(),LP=[EC.LOAD_START,EC.OFFER_SDP_READY,EC.ANSWER_SDP_RECV,EC.ANSWER_SDP_READY,EC.ICE_CONNECTED,EC.DTLS_CONNECTED,EC.PEER_CONNECTED,EC.FIRST_PACKET_RECV,EC.FIRST_FRAME_RECV,EC.FIRST_FRAME_DECODED,EC.VIDEO_LOADEDDATA,EC.VIDEO_CANPLAY,EC.VIDEO_PLAYING],OP=function(){function e(t){var r=this;xg(this,e),this._emitFirstFrameState=t,this._startConnectTs=0,this._firstVideoFrameInterval=null,this._preState=null,this._state={},this._pc=null,this._video=null,this._videoTransceiver=null,this._extraInfo={is_preload:!1},this._handleConnectionStateChange=function(){var e;"connected"===(null===(e=r._pc)||void 0===e?void 0:e.connectionState)&&r._videoTransceiver&&(r.changeFirstFrameState(EC.PEER_CONNECTED),r._watchForFirstVideoFrameRecv(r._videoTransceiver))},this._handleICEConnectionStateChange=function(){var e;"connected"===(null===(e=r._pc)||void 0===e?void 0:e.iceConnectionState)&&r.changeFirstFrameState(EC.ICE_CONNECTED)},this._handlePlaying=function(){r.changeFirstFrameState(EC.VIDEO_PLAYING),r.reset()},this._handleCanplay=function(){r.changeFirstFrameState(EC.VIDEO_CANPLAY)},this._handleLoadeddata=function(){r.changeFirstFrameState(EC.VIDEO_LOADEDDATA)},this._handleError=function(){r.reset()}}var t,r;return Lg(e,[{key:"start",value:function(){this.reset(),this._startConnectTs=_x(),this.changeFirstFrameState(EC.LOAD_START)}},{key:"changeFirstFrameState",value:function(e){var t,r,n=this,i=null!==(t=this._preState&&rg(LP).call(LP,this._preState))&&void 0!==t?t:-1,o=rg(LP).call(LP,e),a=_x()-this._startConnectTs;o>i&&(ld(r=py(LP).call(LP,i+1,o+1)).call(r,(function(e){n._state[e]=a})),this._preState=e)}},{key:"setIsPreload",value:function(e){this._extraInfo.is_preload=e}},{key:"setFailureReason",value:function(e){this._extraInfo.failure_reason=e}},{key:"bindEvents",value:function(e,t,r){var n=this;this._pc=e,this._video=r,this._videoTransceiver=t,e.addEventListener("connectionstatechange",this._handleConnectionStateChange),e.addEventListener("iceconnectionstatechange",this._handleICEConnectionStateChange);var i=((null==t?void 0:t.receiver)||{}).transport;i&&(i.onstatechange=function(){"connected"===i.state&&n.changeFirstFrameState(EC.DTLS_CONNECTED)}),null==r||r.addEventListener("playing",this._handlePlaying),null==r||r.addEventListener("canplay",this._handleCanplay),null==r||r.addEventListener("loadeddata",this._handleLoadeddata),null==r||r.addEventListener("error",this._handleError)}},{key:"_watchForFirstVideoFrameRecv",value:function(e){var t=this,r=!1,n=!1,i=!1;this._cancelWatchForFirstVideoFrameRecv(),this._firstVideoFrameInterval=dT(Tg(kg().mark((function o(){var a,s,u;return kg().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return a=e.receiver,o.next=3,a.getStats();case 3:s=o.sent,ld(s).call(s,(function(e){"inbound-rtp"===e.type&&(u=e)})),!r&&u.packetsReceived>0&&(r=!0,t.changeFirstFrameState(EC.FIRST_PACKET_RECV)),!n&&u.framesReceived>0&&(n=!0,t.changeFirstFrameState(EC.FIRST_FRAME_RECV)),!i&&u.framesDecoded>0&&(i=!0,t.changeFirstFrameState(EC.FIRST_FRAME_DECODED),t._cancelWatchForFirstVideoFrameRecv());case 8:case"end":return o.stop()}}),o)}))),200)}},{key:"_cancelWatchForFirstVideoFrameRecv",value:function(){this._firstVideoFrameInterval&&(window.clearInterval(this._firstVideoFrameInterval),this._firstVideoFrameInterval=null)}},{key:"_getTransportInfo",value:(r=Tg(kg().mark((function e(){var t,r,n,i,o,a;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(t=this._videoTransceiver)||void 0===t||null===(r=t.receiver)||void 0===r?void 0:r.getStats();case 2:null==(n=e.sent)||ld(n).call(n,(function(e){"candidate-pair"===e.type&&(i=e,o=n.get(e.localCandidateId),a=n.get(e.remoteCandidateId))})),a&&(this._extraInfo.remote_ip=a.ip||a.address,this._extraInfo.remote_port=a.port,this._extraInfo.remote_candidate_type=a.candidateType,this._extraInfo.protocol=a.protocol),o&&(this._extraInfo.local_ip=o.ip||o.address,this._extraInfo.local_port=o.port,this._extraInfo.local_candidate_type=o.candidateType),i&&(this._extraInfo.rtt=i.currentRoundTripTime,this._extraInfo.stun_requests_sent=i.requestsSent,this._extraInfo.stun_requests_received=i.requestsReceived,this._extraInfo.stun_responses_sent=i.responsesSent,this._extraInfo.stun_responses_received=i.responsesReceived);case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"reset",value:(t=Tg(kg().mark((function e(){var t,r,n,i,o,a;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(Dc(this._state).length>0)){e.next=4;break}return e.next=3,this._getTransportInfo();case 3:this._emitFirstFrameState(this._state,this._extraInfo);case 4:this._preState=null,this._extraInfo={is_preload:!1},this._state={},null===(t=this._video)||void 0===t||t.removeEventListener("playing",this._handlePlaying),null===(r=this._video)||void 0===r||r.removeEventListener("canplay",this._handleCanplay),null===(n=this._video)||void 0===n||n.removeEventListener("loadeddata",this._handleLoadeddata),null===(i=this._video)||void 0===i||i.removeEventListener("error",this._handleError),null===(o=this._pc)||void 0===o||o.removeEventListener("connectionstatechange",this._handleConnectionStateChange),null===(a=this._pc)||void 0===a||a.removeEventListener("iceconnectionstatechange",this._handleICEConnectionStateChange),this._cancelWatchForFirstVideoFrameRecv(),this._pc=null,this._video=null,this._videoTransceiver=null;case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),IP=r(te.URLSearchParams);function CP(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if("string"!=typeof e||"string"!=typeof t)return!1;uE(e).call(e,"://")||(e=window.location.protocol+"//"+e),uE(t).call(t,"://")||(t=window.location.protocol+"//"+t);try{r=new ek(e),n=new ek(t)}catch(u){return!1}if(r.host+r.pathname!==n.host+n.pathname)return!1;var o,a=function(e,t){var r=void 0!==kc&&Ic(e)||e["@@iterator"];if(!r){if(ng(e)||(r=Vg(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(r.searchParams.get(s)!==n.searchParams.get(s))return!1}}catch(l){a.e(l)}finally{a.f()}return!0}function PP(e,t){var r;if(!t||0===Dc(t).length)return e;var n=uE(e).call(e,"?")?new IP(e.split("?")[1]):new IP;return ld(r=Dc(t)).call(r,(function(e){n.set(e,t[e])})),e.split("?")[0]+"?"+n.toString()}var DP=new BI("rts"),AP=function(e){Ig(s,e);var t,r,n,i,o,a=Zg(s);function s(e){var t,r;return xg(this,s),(r=a.call(this))._url="",r._pc=null,r._audioTransceicer=null,r._videoTransceicer=null,r._mediaStream=null,r._lastMediaStream=null,r._loader=null,r._networkEvaluate=null,r._retry=0,r._player=null,r._waitingTimer=0,r._rctConnectStartTs=0,r._isReplacing=!1,r._firstFrameObserver=new OP(Cy(t=r._emitFirstFrameState).call(t,Ag(r))),r._audio=null,r._video=null,r._preAudioStats=null,r._preVideoStats=null,r._rtcReportTimer=null,r._networkQualityResult=[],r._videoJitterBufferDelay=0,r._checkStatsError=Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r._checkStatsErrorTimer&&clearTimeout(r._checkStatsErrorTimer),r._checkStatsErrorTimer=o_(Tg(kg().mark((function e(){var t,n,i;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.getStatsSnapshoot();case 2:(t=e.sent).video&&(n=t.video,i=n.framesDecoded,n.bytesReceived?i||r._emitError(MI.create(AI,VI.MEDIA_ERR_DECODE,{message:"rts decode error"})):r._emitError(MI.create(AI,VI.MEDIA_ERR_DECODE,{message:"rts receive empty"})));case 4:case"end":return e.stop()}}),e)}))),r._opts.checkStatsErrorDelay);case 2:case"end":return e.stop()}}),e)}))),r._onTrack=function(e){DP.log("addTrack: ",e.track,e.streams),"audio"===e.track.kind?r._audio=e.track:r._video=e.track},r._mockWaitingByTimeupdate=function(){var e,t;"connected"!==(null===(e=r._pc)||void 0===e?void 0:e.connectionState)&&"connected"!==(null===(t=r._pc)||void 0===t?void 0:t.iceConnectionState)||(clearTimeout(r._waitingTimer),r._waitingTimer=o_((function(){var e;null!==(e=r._player)&&void 0!==e&&e.paused||r.emit("waiting")}),r._opts.stallInterval))},r._onLoadedData=function(){DP.log("loadeddata emit"),r.getStatsSnapshoot().then((function(e){r.emit(vC,{type:"video",elapsed:_x()-r._rctConnectStartTs,meta:e.video}),r.emit(vC,{type:"audio",elapsed:_x()-r._rctConnectStartTs,meta:e.audio})}))},r._setDelay=function(e){if(r._opts.progressiveSetDelay)r._startSetDelayLoop(e);else{var t,n,i=lk(t=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(t,(function(e){var t,n;return e in((null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._videoTransceicer)||void 0===n?void 0:n.receiver)||{})}));if(!i)return;if(e="number"==typeof e&&e>0?e:null,(null===(n=r._audioTransceicer)||void 0===n?void 0:n.receiver[i])===e)return;r._audioTransceicer.receiver[i]=e,r._videoTransceicer.receiver[i]=e}},r._targetDelayHint=null,r._setDelayError=null,r._startSetDelayLoop=function(){var e=Tg(kg().mark((function e(t){var n,i,o,a,s,u,l,c,d;return kg().wrap((function(e){for(var f;;)switch(e.prev=e.next){case 0:if(n=lk(f=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(f,(function(e){var t,n;return e in((null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._videoTransceicer)||void 0===n?void 0:n.receiver)||{})}))){e.next=3;break}return e.abrupt("return");case 3:if(t="number"==typeof t&&t>0?t:null,r._targetDelayHint!==t){e.next=6;break}return e.abrupt("return");case 6:if(DP.log("_startSetDelayLoop()","invoked, delayHint: ".concat(t)),r._targetDelayHint=t,!r._setDelayTimer){e.next=10;break}return e.abrupt("return");case 10:i=null,o=null,a=r._opts.adaptiveJitterBuffer,s=a.loopInterval,u=a.maxAvSyncDelay,l=a.maxJitterBufferDiff,c=a.maxStep,d=0,r._setDelayTimer=dT(Tg(kg().mark((function e(){var t,a,s,f,h,p,v,m,y,g,_,b,w,S,k,R;return kg().wrap((function(e){for(var T,x,E,L,O;;)switch(e.prev=e.next){case 0:if(e.prev=0,null!==(t=r._audioTransceicer)&&void 0!==t&&t.receiver&&null!==(a=r._videoTransceicer)&&void 0!==a&&a.receiver){e.next=5;break}return i=null,o=null,e.abrupt("return");case 5:if((s=r._audioTransceicer.receiver[n])!==r._targetDelayHint){e.next=8;break}return e.abrupt("return");case 8:return f=1e3*(r._targetDelayHint||0),h=1e3*s,e.next=12,Mm.all([dP(r._audioTransceicer.receiver.getStats()),pP(r._videoTransceicer.receiver.getStats())]);case 12:if(p=e.sent,v=Fg(p,2),m=v[0],y=v[1],!i||!o){e.next=36;break}if(g=hP(i,m),(_=mP(o,y)).estimatedPlayoutTimestamp&&g.estimatedPlayoutTimestamp&&(b=_.estimatedPlayoutTimestamp-g.estimatedPlayoutTimestamp),w=g.jitterBufferDelay,S=_.jitterBufferDelay,!w||!S){e.next=36;break}if(!(Math.abs(w-S)>u||b&&Math.abs(b)>u)){e.next=27;break}return d++>8&&S>w&&(r._audioTransceicer.receiver[n]=Math.min(S/1e3,r._targetDelayHint||0),d=0),DP.log(pk(T=pk(x=pk(E="av_jb_diff(".concat(w-S,"=")).call(E,w,"-")).call(x,S,") or av_sync_diff(")).call(T,b,") too much, skip setting")),e.abrupt("return");case 27:if(d=0,null===s||!(Math.abs(w-h)>l||Math.abs(S-h)>l)){e.next=31;break}return DP.log(pk(L="audio(".concat(w-h,"),video(")).call(L,S-h,"). current_target_diff too much, skip setting")),e.abrupt("return");case 31:k=f>(h||w)?1:-1,R=(R=(Math.abs(f-(h||w))>c?(h||w)+k*c:f)/1e3)>.2?R:null,DP.log(pk(O="set receiver.".concat(n," = ")).call(O,R)),r._audioTransceicer.receiver[n]=R;case 36:i=m,o=y,e.next=44;break;case 40:e.prev=40,e.t0=e.catch(0),DP.error("set delay loop error:",e.t0),r._setDelayError=e.t0.message||e.t0.toString()||"unknown error";case 44:case"end":return e.stop()}}),e,null,[[0,40]])}))),s);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r._getDelay=function(){try{var e,t,n=lk(e=["playoutDelayHint","jitterBufferDelayHint","jitterBufferTarget"]).call(e,(function(e){var t,n;return e in((null===(t=r._videoTransceicer)||void 0===t?void 0:t.receiver)||{})&&e in((null===(n=r._audioTransceicer)||void 0===n?void 0:n.receiver)||{})}));if(!n)return;return null===(t=r._audioTransceicer)||void 0===t?void 0:t.receiver[n]}catch(jP){DP.error("get delay error")}},r._onLoaderRetry=function(e,t){console.log(e,"retryTime",t),r.emit(pC,{error:MI.network(e),retryTime:t})},r._opts=function(e){var t=e||{},r=t.adaptiveJitterBuffer,n=void 0===r?{}:r,i=Dg(t,NC);return Sg({retryCount:0,retryDelay:1e3,loadTimeout:5e3,stallInterval:400,networkEvaluateInterval:1e3,delayHint:0,videoDelaySync:!1,seamlesslyReload:!1,enableSei:!1,enableOriginSdpLogger:!1,checkStatsErrorDelay:5e3,connectionStateChangeTimeout:5e3,enableNetworkQuality:!0,hackCreateOfferIssue:!1,progressiveSetDelay:!1,networkQuality:{networkQos:{1:{maxRtt:250,maxLoss:.15},2:{maxRtt:500,maxLoss:.3,minRetransmittedRate:.2},3:{maxRtt:750,maxLoss:.45,minRetransmittedRate:.35},4:{maxRtt:1e3,maxLoss:.6,minRetransmittedRate:.5}},networkQoe:{audioDelay:2e3,audioStallRadio:.3,videoDelay:2e3,videoStallRadio:.6}},enableAdaptiveJitterBuffer:!1,adaptiveJitterBuffer:Sg({networkWindow:3,windowMethod:"max",loopInterval:500,maxAvSyncDelay:400,maxJitterBufferDiff:500,maxStep:500},n),networkStrategy:{1:{jitterBuffer:null},2:{jitterBuffer:1.5},3:{jitterBuffer:2},4:{jitterBuffer:3},5:{jitterBuffer:3}}},i)}(e),r._media=r._opts.media,r._player=r._opts.player||null,r._loader=new TC(Sg(Sg({},e.fetchOptions),{},{responseType:"json",method:"POST",retry:r._opts.retryCount,retryDelay:r._opts.retryDelay,timeout:r._opts.loadTimeout,onRetryError:r._onLoaderRetry,logger:DP})),r._retry=r._opts.retryCount||0,r._preloadPromise=r._opts.preloadPromise,r._bindMediaEvent(),DP.log("constructor()",e),r._changeVolumeInHarmonyWorkaround(),r._mutedBeforePlayingWorkaround(),r._opts.mediaStream&&r._opts.seamlesslyReload&&(r._lastMediaStream=r._opts.mediaStream),r}return Lg(s,[{key:"pc",get:function(){return this._pc}},{key:"audioTrack",get:function(){return this._audio}},{key:"videoTack",get:function(){return this._video}},{key:"getJitterBufferDelay",value:function(){return this._videoJitterBufferDelay}},{key:"loader",get:function(){return this._loader}},{key:"networkStats",get:function(){var e;return null===(e=this._networkEvaluate)||void 0===e?void 0:e.getStats()}},{key:"getStats",value:(o=Tg(kg().mark((function e(){return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",GC(this._pc));case 1:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getStatsSnapshoot",value:function(){return this.getStats().then((function(e){return UC(e)}))}},{key:"load",value:(i=Tg(kg().mark((function e(t){var r,n,i,o,a,s,u=this;return kg().wrap((function(e){for(var l;;)switch(e.prev=e.next){case 0:if(DP.log("load()",'invoked, url: "'.concat(t,'"')),this._disconnect(),this._url=t,r=this._pc,!this._opts.hackCreateOfferIssue){e.next=7;break}return e.next=7,this._createEmptyPeer();case 7:if(e.prev=7,this._firstFrameObserver.start(),!this._preloadPromise){e.next=39;break}if(DP.log("load()","in preload process..."),e.prev=11,this._firstFrameObserver.setIsPreload(!0),CP(this._url,this._preloadPromise.url,["tabr_start_bitrate"])){e.next=17;break}throw i=pk(l="preload url not match, current url: ".concat(this._url,", preload url: ")).call(l,this._preloadPromise.url),delete this._preloadPromise,new Error(i);case 17:return o=this._preloadPromise.promise,delete this._preloadPromise,e.next=21,o;case 21:if("have-local-offer"===(a=e.sent).pc.signalingState){e.next=24;break}throw new Error('pc.signalingState not equal "have-local-offer", current state is '.concat(a.pc.signalingState));case 24:this._pc=a.pc,n=a.answerSdp,this._videoTransceicer=a.videoTransceiver,this._audioTransceicer=a.audioTransceiver,this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=37;break;case 31:return e.prev=31,e.t0=e.catch(11),DP.warn("load()","preload failed, ".concat(e.t0.message||e.t0.toString())),this._firstFrameObserver.setFailureReason(e.t0.message||e.t0.toString()),this.load(t),e.abrupt("return");case 37:e.next=45;break;case 39:return s=JC(),DP.log("load()","isLegacyEncodedTransformSupported: ".concat(s)),this._pc=new RTCPeerConnection({encodedInsertableStreams:!(!s||!this._opts.enableSei)||void 0}),e.next=44,this._getAnswerSdp(this._pc);case 44:n=e.sent;case 45:return this._bindRTCEvents(this._pc),e.next=48,this._handleAnswerSdp(this._pc,n);case 48:r&&r.close(),e.next=54;break;case 51:e.prev=51,e.t1=e.catch(7),o_((function(){return u._emitError(MI.create(FI,null,e.t1))}));case 54:case"end":return e.stop()}}),e,this,[[7,51],[11,31]])}))),function(e){return i.apply(this,arguments)})},{key:"switchURL",value:function(e){DP.log("switchURL()",'invoked, url: "'.concat(e,'"')),this.load(e||this._url)}},{key:"_bindRTCEvents",value:function(e){var t=this;e.addEventListener("track",this._onTrack),e.addEventListener("connectionstatechange",(function(){if(DP.warn("onconnectionstatechange:",e.connectionState),t._clearPeerStateTimeout(),t.emit(xC.RTC_STATE_CHANGE,{state:e.connectionState,url:t._url}),"disconnected"!==e.connectionState&&"failed"!==e.connectionState||(t.emit("waiting"),t._stopRtcReport()),"failed"===e.connectionState){if(0===t._retry)return void t._emitError(MI.network(new Error("rtc connect failed")));t._retry--,t.load(t._url)}"connected"===e.connectionState&&(t._handleMediaStream(),t.emit(cC,{url:t._url,responseUrl:t._url,elapsed:_x()-t._rctConnectStartTs}),t._checkStatsError(),t._startRtcReport())}))}},{key:"_handleMediaStream",value:function(){var e=this;if(this._lastMediaStream){var t,r,n,i=this._lastMediaStream.getVideoTracks()[0],o=this._lastMediaStream.getAudioTracks()[0];i&&this._lastMediaStream.removeTrack(i),o&&this._lastMediaStream.removeTrack(o),this._mediaStream=this._lastMediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._isReplacing=!0,null===(t=this._player)||void 0===t||t.pause(),null===(r=this._player)||void 0===r||null===(n=r.play())||void 0===n||n.finally((function(){e._isReplacing=!1}))}else this._mediaStream=new MediaStream,this._audio&&this._mediaStream.addTrack(this._audio),this._video&&this._mediaStream.addTrack(this._video),this._media&&(this._media.srcObject=this._mediaStream)}},{key:"initVideoEncodedTransform",value:function(){var e=this;if(this._videoTransceicer&&this._videoTransceicer.receiver){var t=this._videoTransceicer.receiver;if(JC()){var r=t.createEncodedStreams(),n=r.readable,i=r.writable;n.pipeThrough(tP((function(t){e.emit(mC,t)}))).pipeTo(i)}else if("undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&"undefined"!=typeof RTCRtpScriptTransform&&"transform"in RTCRtpSender.prototype&&"transform"in RTCRtpReceiver.prototype&&KC()&&YC()){var o=new iP,a=new MessageChannel;this._videoTransceicer.receiver.transform=new RTCRtpScriptTransform(o,{port:a.port2},[a.port2]),a.port1.onmessage=function(t){e.emit(mC,t.data)}}}else console.log("no receiver found when trying to bind encodedTransform")}},{key:"initAudioEncodedTransform",value:function(){if(this._audioTransceicer&&this._audioTransceicer.receiver)if(JC()){var e=this._audioTransceicer.receiver.createEncodedStreams(),t=e.readable,r=e.writable;t.pipeThrough(new TransformStream({transform:function(e,t){e.data.byteLength<=1e3?t.enqueue(e):DP.log("too large audio frame",e.data.byteLength)}})).pipeTo(r)}else DP.warn("legacy EncodedTransform is not supported");else DP.warn("no receiver found when trying to bind encodedTransform")}},{key:"_bindMediaEvent",value:function(){var e,t;null===(e=this._media)||void 0===e||e.addEventListener("timeupdate",this._mockWaitingByTimeupdate),null===(t=this._media)||void 0===t||t.addEventListener("loadeddata",this._onLoadedData)}},{key:"_getAnswerSdp",value:(n=Tg(kg().mark((function e(t){var r,n,i,o,a,s,u,l,c,d,f,h,p,v;return kg().wrap((function(e){for(var m,y,g,_,b;;)switch(e.prev=e.next){case 0:if(DP.log("_getAnswerSdp()"),!t.addTransceiver){e.next=11;break}return this._audioTransceicer=t.addTransceiver("audio",{direction:"recvonly"}),this._videoTransceicer=t.addTransceiver("video",{direction:"recvonly"}),this._setDelay(this._opts.delayHint||null),this._opts.enableSei&&(this.initVideoEncodedTransform(),this.initAudioEncodedTransform()),e.next=8,t.createOffer();case 8:r=e.sent,e.next=14;break;case 11:return e.next=13,t.createOffer({iceRestart:!0,offerToReceiveAudio:!0,offerToReceiveVideo:!0});case 13:r=e.sent;case 14:if(this._opts.hackCreateOfferIssue&&this._createEmptyPeer(),DP.log("local offer",r),r.sdp){e.next=18;break}throw new Error("create offer failed");case 18:return i=LC.parse(r.sdp),ld(m=Gc(y=i.media).call(y,(function(e){return"audio"===e.type}))).call(m,(function(e){var t,r,n,i,o=null===(n=Gc(t=e.rtp).call(t,(function(e){return"opus"===e.codec}))[0])||void 0===n?void 0:n.payload;o&&(ld(r=e.fmtp).call(r,(function(e){e.payload===o&&(e.config="minptime=10;stereo=1;useinbandfec=1")})),null===(i=e.rtcpFb)||void 0===i||i.push({payload:o,type:"nack"}))})),ld(g=Gc(_=i.media).call(_,(function(e){return"video"===e.type}))).call(g,(function(e){var t;ld(t=e.fmtp).call(t,(function(e){var t;-1!==rg(t=e.config).call(t,"profile-level-id")&&(e.config="".concat(e.config,";sps-pps-idr-in-keyframe=1"))}))})),r.sdp=LC.write(i),DP.log("local offer modified:\n",r),e.next=25,t.setLocalDescription(r);case 25:return o=this._url,e.prev=26,this._opts.preProcessUrl&&(o=this._opts.preProcessUrl(o).url),o=PP(o,this._opts.urlParams),this._loader&&(this._loader.finnalUrl=o),c=/_?session_id=([^&$]+)/.exec(o),d=c?c[1]:_x()+"666",this._firstFrameObserver.changeFirstFrameState(EC.OFFER_SDP_READY),this.emit(dC,{url:o,offersdp:null!==(a=this._opts)&&void 0!==a&&a.enableOriginSdpLogger?r.sdp:void 0,sessionId:d}),f=_x(),e.next=37,null===(s=this._loader)||void 0===s?void 0:s.load(o,{body:Nx({sessionId:d,version:"1.0-html",localSdp:r})});case 37:if(h=e.sent,this.emit(fC,{headers:h.response.headers}),404!==(null==(p=null==h?void 0:h.data)?void 0:p.code)&&403!==(null==p?void 0:p.code)){e.next=45;break}return(v=MI.create(404===p.code?II:OI,null,p)).errorType=EI,this._emitError(v),e.abrupt("return");case 45:if(200===(null==p?void 0:p.code)){e.next=47;break}throw new Error(pk(b="code: ".concat(null==p?void 0:p.code,", message:")).call(b,null==p?void 0:p.message));case 47:n=h.data.remoteSdp.sdp,this.emit(hC,{url:o,elapsed:_x()-f,answersdp:null!==(u=this._opts)&&void 0!==u&&u.enableOriginSdpLogger?n:void 0,parsedSdp:null==i||null===(l=i.media)||void 0===l?void 0:vR(l).call(l,(function(e){return{candidates:e.candidates,rtp:e.rtp,type:e.type}}))}),e.next=54;break;case 51:e.prev=51,e.t0=e.catch(26),this._emitError(MI.network(e.t0));case 54:return e.abrupt("return",n);case 55:case"end":return e.stop()}}),e,this,[[26,51]])}))),function(e){return n.apply(this,arguments)})},{key:"_handleAnswerSdp",value:(r=Tg(kg().mark((function e(t,r){var n,i;return kg().wrap((function(e){for(var o;;)switch(e.prev=e.next){case 0:if(DP.log("_handleAnswerSdp()","invoked, answerSdp:",{answerSdp:r}),r){e.next=3;break}return e.abrupt("return");case 3:if(this._firstFrameObserver.changeFirstFrameState(EC.ANSWER_SDP_RECV),n=LC.parse(r),ld(o=n.media).call(o,(function(e){var t,r;e.fingerprint&&(e.fingerprint.hash=e.fingerprint.hash.toUpperCase());var n=null===(t=e.ssrcs)||void 0===t||null===(r=lk(t).call(t,(function(e){return"msid"===e.attribute})))||void 0===r?void 0:r.value;n&&!e.msid&&(e.msid=n)})),i=LC.write(n),DP.log("answer modified:\n",{answer:i}),this._rctConnectStartTs=_x(),"closed"!==t.signalingState){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,t.setRemoteDescription({type:"answer",sdp:i});case 13:this._firstFrameObserver.changeFirstFrameState(EC.ANSWER_SDP_READY),this._networkEvaluate=new XC(t,this._opts.networkEvaluateInterval),this._listenPeerStateTimeout(),this._firstFrameObserver.bindEvents(t,this._videoTransceicer,this._media);case 17:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"_listenPeerStateTimeout",value:function(){var e=this;this._clearPeerStateTimeout(),this._opts.connectionStateChangeTimeout&&(this._peerStateTimer=o_((function(){e._emitError(MI.create(AI,VI.MEDIA_ERR_SRC_NOT_SUPPORTED,{message:"listen connectionstatechange timeout"}))}),this._opts.connectionStateChangeTimeout))}},{key:"_clearPeerStateTimeout",value:function(){this._peerStateTimer&&(clearTimeout(this._peerStateTimer),delete this._peerStateTimer)}},{key:"_startRtcReport",value:function(){var e=this;this._stopRtcReport();var t=function(){var t=Tg(kg().mark((function t(){var r,n,i,o,a,s,u,l,c,d,f,h,p,v,m,y,g,_,b,w,S;return kg().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!==(r=e._audioTransceicer)&&void 0!==r&&r.receiver&&null!==(n=e._videoTransceicer)&&void 0!==n&&n.receiver){t.next=4;break}return e._preAudioStats=null,e._preVideoStats=null,t.abrupt("return");case 4:return!e._audioStallObserver&&e._audioTransceicer&&(e._audioStallObserver=new aP,e._audioStallObserver.start(e._audioTransceicer)),!e._videoStallObserver&&e._video&&e._media&&(e._videoStallObserver=new cP,e._videoStallObserver.start(e._media)),e._pc&&!e._networkQuality&&e._opts.enableNetworkQuality&&e._opts.networkQuality&&(e._networkQuality=new EP(e._pc,e._opts.networkQuality)),t.next=9,Mm.all([dP(e._audioTransceicer.receiver.getStats()),pP(e._videoTransceicer.receiver.getStats())]);case 9:if(i=t.sent,o=Fg(i,2),a=o[0],s=o[1],!e._preAudioStats||!e._preVideoStats){t.next=27;break}return p=hP(e._preAudioStats,a),v=mP(e._preVideoStats,s),e._videoJitterBufferDelay=v.jitterBufferDelay,t.next=19,null===(u=e._audioStallObserver)||void 0===u?void 0:u.getAudioStallInfo();case 19:return m=t.sent,t.next=22,null===(l=e._videoStallObserver)||void 0===l?void 0:l.getStallInfo({interval:v.statsInterval,frameRateReceived:v.receivedFrameRate,frameRateDecoded:v.decoderOutputFrameRate,bitrate:v.receivedKBitrate});case 22:y=t.sent,g=null!==(c=null===(d=e._networkQuality)||void 0===d?void 0:d.getDownlinkQuality(Sg(Sg({},p),{},{stallDuration:(null==m?void 0:m.stallDuration)||0}),Sg(Sg({},v),{},{stallDuration:(null==y?void 0:y.stall.stallDuration100ms)||(null==y?void 0:y.stall.stallDuration500ms)||0})))&&void 0!==c?c:[],_=Fg(g,2),b=_[0],w=_[1],e._opts.enableAdaptiveJitterBuffer&&e._handleJitterBuffer(null==w?void 0:w.qualityQos,e._opts.adaptiveJitterBuffer,e._opts.networkStrategy),v.estimatedPlayoutTimestamp&&p.estimatedPlayoutTimestamp&&(S=v.estimatedPlayoutTimestamp-p.estimatedPlayoutTimestamp),e.emit(xC.RTC_NETWORK,{interval:v.statsInterval,network_quality:b,audio_stall_duration:null==m?void 0:m.stallDuration,audio_stall_count:null==m?void 0:m.stallCount,audio_stall_time_per_100sec:((null==m?void 0:m.stallDuration)||0)/p.statsInterval*100,audio_stall_count_per_100sec:((null==m?void 0:m.stallCount)||0)/p.statsInterval*100*1e3,video_stall_duration:null==y?void 0:y.stall.stallDuration500ms,video_stall_count:null==y?void 0:y.stall.stallCount500ms,video_stall_duration_100ms:null==y?void 0:y.stall.stallDuration100ms,video_stall_count_100ms:null==y?void 0:y.stall.stallCount100ms,video_stall_time_per_100sec:((null==y?void 0:y.stall.stallDuration500ms)||0)/v.statsInterval*100,video_stall_count_per_100sec:((null==y?void 0:y.stall.stallCount500ms)||0)/v.statsInterval*100*1e3,rtt:v.rtt,video_jb_delay:v.jitterBufferDelay,audio_jb_delay:p.jitterBufferDelay,audio_lost_rate:p.audioLossRate,video_lost_rate:v.videoLossRate,video_retransmitted_rate:v.retransmittedRate,quality_audio_level:null==w?void 0:w.audioLevel,quality_video_level:null==w?void 0:w.videoLevel,quality_audio_qos:null==w?void 0:w.audioQos,quality_video_qos:null==w?void 0:w.videoQos,quality_qos:null==w?void 0:w.qualityQos,quality_audio_qoe:null==w?void 0:w.audioQoe,quality_video_qoe:null==w?void 0:w.videoQoe,current_delay:e._getDelay(),visibility_state:document.visibilityState,target_delay:e._targetDelayHint,av_sync_diff:S,set_delay_error:e._setDelayError||null,video_width:(null===(f=e._media)||void 0===f?void 0:f.videoWidth)||0,video_height:(null===(h=e._media)||void 0===h?void 0:h.videoHeight)||0,abr_state:v.abrState||"none"});case 27:e._preAudioStats=a,e._preVideoStats=s,e._setDelayError=null;case 30:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();this._rtcReportTimer=dT((function(){return t()}),2e3),t()}},{key:"_handleJitterBuffer",value:function(e,t,r){var n;if(t&&r){this._networkQualityResult.push(e),this._networkQualityResult.length>t.networkWindow&&this._networkQualityResult.shift();var i=Gc(n=this._networkQualityResult).call(n,(function(e){return"number"==typeof e}));if(i.length===t.networkWindow){var o,a,s;if("min"===t.windowMethod)a=Math.min.apply(Math,jg(i));else if("max"===t.windowMethod)a=Math.max.apply(Math,jg(i));else{var u,l=px(u=jg(i)).call(u,(function(e,t){return e-t})),c=Math.floor(l.length/2);a=l.length%2!=0?l[c]:(l[c-1]+l[c])/2}if(a&&void 0!==(null===(o=r[a])||void 0===o?void 0:o.jitterBuffer))this._startSetDelayLoop(null===(s=r[a])||void 0===s?void 0:s.jitterBuffer)}}}},{key:"_stopRtcReport",value:function(){var e,t,r;null===(e=this._audioStallObserver)||void 0===e||e.destroy(),null===(t=this._videoStallObserver)||void 0===t||t.destroy(),null===(r=this._networkQuality)||void 0===r||r.destroy(),delete this._audioStallObserver,delete this._videoStallObserver,delete this._networkQuality,this._preAudioStats=null,this._preVideoStats=null,this._rtcReportTimer&&(clearInterval(this._rtcReportTimer),this._rtcReportTimer=0)}},{key:"_clearDelay",value:function(){this._setDelayTimer&&(clearInterval(this._setDelayTimer),delete this._setDelayTimer),this._targetDelayHint=null,this._setDelayError=null}},{key:"_disconnect",value:function(){var e,t;this._clearDelay(),null===(e=this._loader)||void 0===e||e.cancel(),null===(t=this._networkEvaluate)||void 0===t||t.destroy(),this._stopRtcReport(),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._firstFrameObserver.reset(),this._audioTransceicer=null,this._videoTransceicer=null,this._mediaStream=null}},{key:"_emitError",value:function(e){var t;this._clearDelay(),this._firstFrameObserver.setFailureReason((null==e||null===(t=e.originError)||void 0===t?void 0:t.message)||(null==e?void 0:e.originError)||e),this._firstFrameObserver.reset(),this.emit(lC,e),clearTimeout(this._checkStatsErrorTimer),this._clearPeerStateTimeout(),this._pc&&(this._pc.close(),this._media&&(this._media.srcObject=null,this._media.removeAttribute("src")))}},{key:"_createEmptyPeer",value:(t=Tg(kg().mark((function e(){var t;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new RTCPeerConnection,e.next=3,t.createOffer();case 3:t.close();case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"_emitFirstFrameState",value:function(e,t){this.emit(xC.RTC_FIRST_FRAME,Sg(Sg(Sg({},e),t),{},{initOptionsIncludePreload:!!this._opts.preloadPromise}))}},{key:"_changeVolumeInHarmonyWorkaround",value:function(){var e=this;if(/(HarmonyOS|OpenHarmony|ArkWeb)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");this._media&&t&&(DP.log("apply HarmonyOS muted workaround"),Ad(this._media,"muted",{configurable:!0,enumerable:!0,get:t.get,set:function(e){var r;null===(r=t.set)||void 0===r||r.call(this,e);var n,i,o,a=Fg((n=this.volume,(o=n+(i=.01))>1&&(o=n-i),[n,o]),2),s=a[0],u=a[1];this.volume=u,this.volume=s,DP.log("HarmonyOS muted workaround. set muted =",e,"volume:",u,"->",s)}}),this._revertVolumeWorkaround=function(){DP.log("revert HarmonyOS muted workaround. video dom:",e._media),e._media&&Ad(e._media,"muted",t)})}}},{key:"_mutedBeforePlayingWorkaround",value:function(){var e=this;if(/(HeyTapBrowser)/i.test(navigator.userAgent)||/(VivoBrowser)/i.test(navigator.userAgent)){var t=Qc(HTMLMediaElement.prototype,"muted");if(this._media&&t){DP.log("apply muted workaround for vivo & oppo");var r=this._media.muted;this._media.muted=!0,Ad(this._media,"muted",{configurable:!0,enumerable:!0,get:function(){return r},set:function(e){DP.log("muted workaround. set muted =",e),r=e}});this._media.addEventListener("playing",(function n(){DP.log("revert muted workaround. muted:",r),e._media&&(Ad(e._media,"muted",t),e._media.muted=r,e._media.removeEventListener("playing",n))}))}}}},{key:"destroy",value:function(e){var t,r;this._disconnect(),null===(t=this._revertVolumeWorkaround)||void 0===t||t.call(this),delete this._revertVolumeWorkaround,null===(r=this._media)||void 0===r||r.removeEventListener("timeupdate",this._mockWaitingByTimeupdate),this._media&&!e&&(this._media.srcObject=null),this._pc&&this._pc.close(),this._loader=null,this._media=null,this._player=null,this._pc=null}}],[{key:"enableLogger",value:function(){BI.enable()}},{key:"disableLogger",value:function(){BI.disable()}}]),s}(VR);try{localStorage.getItem("xgd")?AP.enableLogger():AP.disableLogger()}catch(jP){}var ZP=function(e){Ig(n,e);var t,r=Zg(n);function n(){var e;return xg(this,n),(e=r.apply(this,arguments))._rts=null,e._rtsOpts=null,e._mediaStream=null,e._onPause=function(){e._disconnectTimer||(e._disconnectTimer=o_((function(){e._closeAfterPause(),e._clearDisconnectTimer()}),1e3*e.config.disconnectTime))},e._reInit=function(){var t;e._clearDisconnectTimer(),null!==(t=e._rts)&&void 0!==t&&t._pc||(e._init(),e._bindRtsEvents())},e._init=function(){var t;null===(t=e._rts)||void 0===t||t.destroy();var r=e.player.config,n=r.rts||{};e._rtsOpts=n,e._rts=new AP(Sg({media:e.player.video,player:e.player,mediaStream:e._mediaStream,preProcessUrl:function(t,r){var n,i;return(null===(n=(i=e.player).preProcessUrl)||void 0===n?void 0:n.call(i,t,r))||{url:t,ext:r}}},n)),e._rts.load(r.url)},e._onSwitchURL=function(t){t&&(e.player.config.url=t),e._rts?e._rts.switchURL(t):e._reInit()},e.destroy=function(){var t;e.player.switchURL=e._originSwitchFn,e._clearDisconnectTimer(),null===(t=e._rts)||void 0===t||t.destroy(),e._rts=null},e}return Lg(n,[{key:"pc",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.pc}},{key:"jitterBufferDelay",get:function(){var e;return(null===(e=this._rts)||void 0===e?void 0:e.getJitterBufferDelay())||0}},{key:"loader",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.loader}},{key:"videoTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.videoTack}},{key:"audioTrack",get:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.audioTrack}},{key:"core",get:function(){return this._rts}},{key:"version",get:function(){return"0.2.1-alpha.51"}},{key:"beforePlayerInit",value:function(){var e,t,r,n,i=this;(this._init(),this._originSwitchFn)||(this._originSwitchFn=null===(n=this.player.switchURL)||void 0===n?void 0:Cy(n).call(n,this.player));this.player.switchURL=this._onSwitchURL,null===(e=this.player)||void 0===e||e.useHooks("replay",this._onSwitchURL),this.on("urlchange",this._onSwitchURL),this.on("destroy",this.destroy),void 0!==(null===(t=this.player.config)||void 0===t||null===(r=t.rts)||void 0===r?void 0:r.disconnectTime)&&(this.on("pause",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._onPause()})),this.on("play",(function(){var e;null!==(e=i._rts)&&void 0!==e&&e._isReplacing||i._reInit()}))),this._bindRtsEvents();try{jx.defineGetterOrSetter(this.player,{__url:{get:function(){try{return ek.createObjectURL(new MediaSource)}catch(r){var e,t;null!==(e=i.player)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&t.srcObject||(i.player.video.srcObject=new MediaStream)}}}})}catch(o){}}},{key:"getStats",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStats()}},{key:"getStatsSnapshoot",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.getStatsSnapshoot()}},{key:"getNetWorkInfo",value:function(){var e;return null===(e=this._rts)||void 0===e?void 0:e.networkStats}},{key:"setDelay",value:function(e){var t;null===(t=this._rts)||void 0===t||t._setDelay(e)}},{key:"_clearDisconnectTimer",value:function(){clearTimeout(this._disconnectTimer),this._disconnectTimer=void 0}},{key:"_closeAfterPause",value:function(){var e,t,r;if(null!==(e=this._rts)&&void 0!==e&&e._pc){var n;if(null!==(t=this.config)&&void 0!==t&&t.seamlesslyReload)this._mediaStream=null===(n=this._rts)||void 0===n?void 0:n._mediaStream;null===(r=this._rts)||void 0===r||r.destroy(!0),this._rts=null}}},{key:"_bindRtsEvents",value:function(){this._transErrorEvent(),this._transCoreEvent(dC),this._transCoreEvent(hC),this._transCoreEvent(cC),this._transCoreEvent(fC),this._transCoreEvent(pC),this._transCoreEvent(vC),this._transCoreEvent(mC),this._transCoreEvent(xC.RTC_STATE_CHANGE),this._transCoreEvent(xC.RTC_NETWORK),this._transCoreEvent(xC.RTC_FIRST_FRAME)}},{key:"_transErrorEvent",value:function(){var e,t,r=this;null===(e=this._rts)||void 0===e||e.on(lC,(function(e){if(r.player){var t=new Ix(r.player,e),n=r._rtsOpts||{},i=n.backupConstruct,o=n.backupURL;if(o){var a,s=r.player;s.emit("core_event",Sg(Sg({},{url:s.config.url,code:t.errorCode,message:t.message,httpCode:t.httpCode}),{},{eventName:"core.degrade"})),s.emit("degrade",{url:s.config.url,code:t.errorCode,message:t.message,httpCode:t.httpCode}),s.unRegisterPlugin("rts"),s.switchURL=r._originSwitchFn,r._rts=null,s.rts=null,null!==(a=s.video)&&void 0!==a&&a.srcObject&&(s.video.srcObject=null),s.config.url=o,i?s.registerPlugin(i).beforePlayerInit():s.video.src=o}else r.player.emit("error",t)}})),null===(t=this._rts)||void 0===t||t.on("waiting",(function(){var e;null===(e=r.player)||void 0===e||e.emit("waiting")}))}},{key:"_transCoreEvent",value:function(e){var t,r=this;null===(t=this._rts)||void 0===t||t.on(e,(function(t){r.player&&r.player.emit("core_event",Sg(Sg({},t),{},{eventName:e}))}))}}],[{key:"pluginName",get:function(){return"rts"}},{key:"isSupported",value:function(){return BC()}},{key:"getCapacity",value:function(){return function(){if(!BC())return Mm.reject("RTCPeerConnection no support");var e;try{(e=new RTCPeerConnection).addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"})}catch(t){return Mm.reject(null==t?void 0:t.message)}return e.createOffer().then((function(t){var r,n,i,o;if(DP.log(t.sdp),!t.sdp)return Mm.reject("createOffer no sdp");var a=LC.parse(t.sdp),s=null===(r=a.media)||void 0===r?void 0:Gc(r).call(r,(function(e){return"video"===e.type}))[0],u=null===(n=a.media)||void 0===n?void 0:Gc(n).call(n,(function(e){return"audio"===e.type}))[0],l=null==s||null===(i=s.rtp)||void 0===i?void 0:Gc(i).call(i,(function(e){return"VP8"===e.codec||"VP9"===e.codec||"H264"===e.codec})),c=null==u||null===(o=u.rtp)||void 0===o?void 0:Gc(o).call(o,(function(e){return"opus"===e.codec})),d=null==s?void 0:s.fmtp,f=null==u?void 0:u.fmtp;return d&&vR(l).call(l,(function(e){var t;e.config=null===(t=Gc(d).call(d,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),f&&vR(c).call(c,(function(e){var t;e.config=null===(t=Gc(f).call(f,(function(t){return t.payload===e.payload}))[0])||void 0===t?void 0:t.config})),e.close(),{video:l,audio:c}}))}()}},{key:"isSupportedH264",value:(t=Tg(kg().mark((function e(t){var r,i,o,a,s;return kg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.getCapacity();case 3:if(i=e.sent,o=null===(r=i.video)||void 0===r?void 0:Gc(r).call(r,(function(e){var r;return"H264"===e.codec&&(!t||-1!==(null===(r=e.config)||void 0===r?void 0:rg(r).call(r,t)))})).length){e.next=10;break}return e.next=8,n.getCapacity();case 8:s=e.sent,o=null===(a=s.video)||void 0===a?void 0:Gc(a).call(a,(function(e){var r;return"H264"===e.codec&&(!t||-1!==(null===(r=e.config)||void 0===r?void 0:rg(r).call(r,t)))})).length;case 10:return e.abrupt("return",!!o);case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),function(e){return t.apply(this,arguments)})}]),n}(jx),FP=window.VePlayer.DynamicModule;VePlayer.registerPlugin(FP.PluginRtm,{RtmPlugin:ZP}),e.RtmPlugin=ZP}));