@vkontakte/videoplayer-statistics 1.0.51-dev.8de7a773.0 → 1.0.51-dev.acdd69a1.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.
- package/es2015.cjs.js +2 -2
- package/es2015.esm.js +2 -2
- package/es2018.cjs.js +2 -2
- package/es2018.esm.js +2 -2
- package/esnext.cjs.js +2 -2
- package/esnext.esm.js +2 -2
- package/evergreen.esm.js +3 -3
- package/package.json +3 -3
package/es2015.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.51-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.51-dev.acdd69a1.0
|
|
3
|
+
* Tue, 09 Jul 2024 06:52:19 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-51/doc/
|
|
5
5
|
*/
|
|
6
6
|
"use strict";var hl=Object.create;var Se=Object.defineProperty,gl=Object.defineProperties,ml=Object.getOwnPropertyDescriptor,bl=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertyNames,Gi=Object.getOwnPropertySymbols,Sl=Object.getPrototypeOf,Wi=Object.prototype.hasOwnProperty,Il=Object.prototype.propertyIsEnumerable;var Ki=(r,e,t)=>e in r?Se(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,W=(r,e)=>{for(var t in e||(e={}))Wi.call(e,t)&&Ki(r,t,e[t]);if(Gi)for(var t of Gi(e))Il.call(e,t)&&Ki(r,t,e[t]);return r},Ge=(r,e)=>gl(r,bl(e));var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),El=(r,e)=>{for(var t in e)Se(r,t,{get:e[t],enumerable:!0})},Hi=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of yl(e))!Wi.call(r,o)&&o!==t&&Se(r,o,{get:()=>e[o],enumerable:!(i=ml(e,o))||i.enumerable});return r};var Ur=(r,e,t)=>(t=r!=null?hl(Sl(r)):{},Hi(e||!r||!r.__esModule?Se(t,"default",{value:r,enumerable:!0}):t,r)),ql=r=>Hi(Se({},"__esModule",{value:!0}),r);var M=(r,e,t)=>new Promise((i,o)=>{var a=f=>{try{l(t.next(f))}catch(d){o(d)}},u=f=>{try{l(t.throw(f))}catch(d){o(d)}},l=f=>f.done?i(f.value):Promise.resolve(f.value).then(a,u);l((t=t.apply(r,e)).next())});var zi=n(()=>{"use strict"});var Qi=n(()=>{"use strict"});var P=n((Yi,Ji)=>{"use strict";var Ke=function(r){return r&&r.Math==Math&&r};Ji.exports=Ke(typeof globalThis=="object"&&globalThis)||Ke(typeof window=="object"&&window)||Ke(typeof self=="object"&&self)||Ke(typeof global=="object"&&global)||function(){return this}()||Yi||Function("return this")()});var x=n((Tb,Xi)=>{"use strict";Xi.exports=function(r){try{return!!r()}catch(e){return!0}}});var Ie=n((Ob,Zi)=>{"use strict";var Pl=x();Zi.exports=!Pl(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var Vr=n((_b,io)=>{"use strict";var Tl=Ie(),to=Function.prototype,eo=to.apply,ro=to.call;io.exports=typeof Reflect=="object"&&Reflect.apply||(Tl?ro.bind(eo):function(){return ro.apply(eo,arguments)})});var O=n((xb,ao)=>{"use strict";var oo=Ie(),no=Function.prototype,Gr=no.call,Ol=oo&&no.bind.bind(Gr,Gr);ao.exports=oo?Ol:function(r){return function(){return Gr.apply(r,arguments)}}});var te=n((Rb,uo)=>{"use strict";var so=O(),_l=so({}.toString),xl=so("".slice);uo.exports=function(r){return xl(_l(r),8,-1)}});var Kr=n((wb,co)=>{"use strict";var Rl=te(),wl=O();co.exports=function(r){if(Rl(r)==="Function")return wl(r)}});var Hr=n((Ab,lo)=>{"use strict";var Wr=typeof document=="object"&&document.all,Al=typeof Wr=="undefined"&&Wr!==void 0;lo.exports={all:Wr,IS_HTMLDDA:Al}});var I=n((Cb,po)=>{"use strict";var fo=Hr(),Cl=fo.all;po.exports=fo.IS_HTMLDDA?function(r){return typeof r=="function"||r===Cl}:function(r){return typeof r=="function"}});var j=n((Nb,vo)=>{"use strict";var Nl=x();vo.exports=!Nl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var _=n((Lb,ho)=>{"use strict";var Ll=Ie(),We=Function.prototype.call;ho.exports=Ll?We.bind(We):function(){return We.apply(We,arguments)}});var yo=n(bo=>{"use strict";var go={}.propertyIsEnumerable,mo=Object.getOwnPropertyDescriptor,kl=mo&&!go.call({1:2},1);bo.f=kl?function(e){var t=mo(this,e);return!!t&&t.enumerable}:go});var Ee=n((Db,So)=>{"use strict";So.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var Eo=n(($b,Io)=>{"use strict";var Dl=O(),$l=x(),Ml=te(),zr=Object,jl=Dl("".split);Io.exports=$l(function(){return!zr("z").propertyIsEnumerable(0)})?function(r){return Ml(r)=="String"?jl(r,""):zr(r)}:zr});var ie=n((Mb,qo)=>{"use strict";qo.exports=function(r){return r==null}});var He=n((jb,Po)=>{"use strict";var Fl=ie(),Bl=TypeError;Po.exports=function(r){if(Fl(r))throw Bl("Can't call method on "+r);return r}});var oe=n((Fb,To)=>{"use strict";var Ul=Eo(),Vl=He();To.exports=function(r){return Ul(Vl(r))}});var F=n((Bb,xo)=>{"use strict";var Oo=I(),_o=Hr(),Gl=_o.all;xo.exports=_o.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:Oo(r)||r===Gl}:function(r){return typeof r=="object"?r!==null:Oo(r)}});var ze=n((Ub,Ro)=>{"use strict";Ro.exports={}});var B=n((Vb,Ao)=>{"use strict";var Qr=ze(),Yr=P(),Kl=I(),wo=function(r){return Kl(r)?r:void 0};Ao.exports=function(r,e){return arguments.length<2?wo(Qr[r])||wo(Yr[r]):Qr[r]&&Qr[r][e]||Yr[r]&&Yr[r][e]}});var qe=n((Gb,Co)=>{"use strict";var Wl=O();Co.exports=Wl({}.isPrototypeOf)});var Pe=n((Kb,No)=>{"use strict";No.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var Xr=n((Wb,jo)=>{"use strict";var Mo=P(),Jr=Pe(),Lo=Mo.process,ko=Mo.Deno,Do=Lo&&Lo.versions||ko&&ko.version,$o=Do&&Do.v8,A,Qe;$o&&(A=$o.split("."),Qe=A[0]>0&&A[0]<4?1:+(A[0]+A[1]));!Qe&&Jr&&(A=Jr.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=Jr.match(/Chrome\/(\d+)/),A&&(Qe=+A[1])));jo.exports=Qe});var Zr=n((Hb,Bo)=>{"use strict";var Fo=Xr(),Hl=x(),zl=P(),Ql=zl.String;Bo.exports=!!Object.getOwnPropertySymbols&&!Hl(function(){var r=Symbol();return!Ql(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Fo&&Fo<41})});var et=n((zb,Uo)=>{"use strict";var Yl=Zr();Uo.exports=Yl&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var rt=n((Qb,Vo)=>{"use strict";var Jl=B(),Xl=I(),Zl=qe(),ef=et(),rf=Object;Vo.exports=ef?function(r){return typeof r=="symbol"}:function(r){var e=Jl("Symbol");return Xl(e)&&Zl(e.prototype,rf(r))}});var Te=n((Yb,Go)=>{"use strict";var tf=String;Go.exports=function(r){try{return tf(r)}catch(e){return"Object"}}});var U=n((Jb,Ko)=>{"use strict";var of=I(),nf=Te(),af=TypeError;Ko.exports=function(r){if(of(r))return r;throw af(nf(r)+" is not a function")}});var Oe=n((Xb,Wo)=>{"use strict";var sf=U(),uf=ie();Wo.exports=function(r,e){var t=r[e];return uf(t)?void 0:sf(t)}});var zo=n((Zb,Ho)=>{"use strict";var tt=_(),it=I(),ot=F(),cf=TypeError;Ho.exports=function(r,e){var t,i;if(e==="string"&&it(t=r.toString)&&!ot(i=tt(t,r))||it(t=r.valueOf)&&!ot(i=tt(t,r))||e!=="string"&&it(t=r.toString)&&!ot(i=tt(t,r)))return i;throw cf("Can't convert object to primitive value")}});var C=n((ey,Qo)=>{"use strict";Qo.exports=!0});var Xo=n((ry,Jo)=>{"use strict";var Yo=P(),lf=Object.defineProperty;Jo.exports=function(r,e){try{lf(Yo,r,{value:e,configurable:!0,writable:!0})}catch(t){Yo[r]=e}return e}});var Ye=n((ty,en)=>{"use strict";var ff=P(),df=Xo(),Zo="__core-js_shared__",pf=ff[Zo]||df(Zo,{});en.exports=pf});var nt=n((iy,tn)=>{"use strict";var vf=C(),rn=Ye();(tn.exports=function(r,e){return rn[r]||(rn[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:vf?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Je=n((oy,on)=>{"use strict";var hf=He(),gf=Object;on.exports=function(r){return gf(hf(r))}});var N=n((ny,nn)=>{"use strict";var mf=O(),bf=Je(),yf=mf({}.hasOwnProperty);nn.exports=Object.hasOwn||function(e,t){return yf(bf(e),t)}});var at=n((ay,an)=>{"use strict";var Sf=O(),If=0,Ef=Math.random(),qf=Sf(1 .toString);an.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+qf(++If+Ef,36)}});var T=n((sy,un)=>{"use strict";var Pf=P(),Tf=nt(),sn=N(),Of=at(),_f=Zr(),xf=et(),ne=Pf.Symbol,st=Tf("wks"),Rf=xf?ne.for||ne:ne&&ne.withoutSetter||Of;un.exports=function(r){return sn(st,r)||(st[r]=_f&&sn(ne,r)?ne[r]:Rf("Symbol."+r)),st[r]}});var dn=n((uy,fn)=>{"use strict";var wf=_(),cn=F(),ln=rt(),Af=Oe(),Cf=zo(),Nf=T(),Lf=TypeError,kf=Nf("toPrimitive");fn.exports=function(r,e){if(!cn(r)||ln(r))return r;var t=Af(r,kf),i;if(t){if(e===void 0&&(e="default"),i=wf(t,r,e),!cn(i)||ln(i))return i;throw Lf("Can't convert object to primitive value")}return e===void 0&&(e="number"),Cf(r,e)}});var Xe=n((cy,pn)=>{"use strict";var Df=dn(),$f=rt();pn.exports=function(r){var e=Df(r,"string");return $f(e)?e:e+""}});var Ze=n((ly,hn)=>{"use strict";var Mf=P(),vn=F(),ut=Mf.document,jf=vn(ut)&&vn(ut.createElement);hn.exports=function(r){return jf?ut.createElement(r):{}}});var ct=n((fy,gn)=>{"use strict";var Ff=j(),Bf=x(),Uf=Ze();gn.exports=!Ff&&!Bf(function(){return Object.defineProperty(Uf("div"),"a",{get:function(){return 7}}).a!=7})});var lt=n(bn=>{"use strict";var Vf=j(),Gf=_(),Kf=yo(),Wf=Ee(),Hf=oe(),zf=Xe(),Qf=N(),Yf=ct(),mn=Object.getOwnPropertyDescriptor;bn.f=Vf?mn:function(e,t){if(e=Hf(e),t=zf(t),Yf)try{return mn(e,t)}catch(i){}if(Qf(e,t))return Wf(!Gf(Kf.f,e,t),e[t])}});var ft=n((py,yn)=>{"use strict";var Jf=x(),Xf=I(),Zf=/#|\.prototype\./,_e=function(r,e){var t=rd[ed(r)];return t==id?!0:t==td?!1:Xf(e)?Jf(e):!!e},ed=_e.normalize=function(r){return String(r).replace(Zf,".").toLowerCase()},rd=_e.data={},td=_e.NATIVE="N",id=_e.POLYFILL="P";yn.exports=_e});var xe=n((vy,In)=>{"use strict";var Sn=Kr(),od=U(),nd=Ie(),ad=Sn(Sn.bind);In.exports=function(r,e){return od(r),e===void 0?r:nd?ad(r,e):function(){return r.apply(e,arguments)}}});var dt=n((hy,En)=>{"use strict";var sd=j(),ud=x();En.exports=sd&&ud(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var L=n((gy,qn)=>{"use strict";var cd=F(),ld=String,fd=TypeError;qn.exports=function(r){if(cd(r))return r;throw fd(ld(r)+" is not an object")}});var z=n(Tn=>{"use strict";var dd=j(),pd=ct(),vd=dt(),er=L(),Pn=Xe(),hd=TypeError,pt=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,vt="enumerable",ht="configurable",gt="writable";Tn.f=dd?vd?function(e,t,i){if(er(e),t=Pn(t),er(i),typeof e=="function"&&t==="prototype"&&"value"in i&> in i&&!i[gt]){var o=gd(e,t);o&&o[gt]&&(e[t]=i.value,i={configurable:ht in i?i[ht]:o[ht],enumerable:vt in i?i[vt]:o[vt],writable:!1})}return pt(e,t,i)}:pt:function(e,t,i){if(er(e),t=Pn(t),er(i),pd)try{return pt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw hd("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var Q=n((by,On)=>{"use strict";var md=j(),bd=z(),yd=Ee();On.exports=md?function(r,e,t){return bd.f(r,e,yd(1,t))}:function(r,e,t){return r[e]=t,r}});var k=n((yy,xn)=>{"use strict";var rr=P(),Sd=Vr(),Id=Kr(),Ed=I(),qd=lt().f,Pd=ft(),ae=ze(),Td=xe(),se=Q(),_n=N(),Od=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return Sd(r,this,arguments)};return e.prototype=r.prototype,e};xn.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,a=r.proto,u=i?rr:o?rr[t]:(rr[t]||{}).prototype,l=i?ae:ae[t]||se(ae,t,{})[t],f=l.prototype,d,s,c,v,p,m,y,E,S;for(v in e)d=Pd(i?v:t+(o?".":"#")+v,r.forced),s=!d&&u&&_n(u,v),m=l[v],s&&(r.dontCallGetSet?(S=qd(u,v),y=S&&S.value):y=u[v]),p=s&&y?y:e[v],!(s&&typeof m==typeof p)&&(r.bind&&s?E=Td(p,rr):r.wrap&&s?E=Od(p):a&&Ed(p)?E=Id(p):E=p,(r.sham||p&&p.sham||m&&m.sham)&&se(E,"sham",!0),se(l,v,E),a&&(c=t+"Prototype",_n(ae,c)||se(ae,c,{}),se(ae[c],v,p),r.real&&f&&(d||!f[v])&&se(f,v,p)))}});var wn=n((Sy,Rn)=>{"use strict";var _d=F(),xd=te(),Rd=T(),wd=Rd("match");Rn.exports=function(r){var e;return _d(r)&&((e=r[wd])!==void 0?!!e:xd(r)=="RegExp")}});var tr=n((Iy,Cn)=>{"use strict";var Ad=T(),Cd=Ad("toStringTag"),An={};An[Cd]="z";Cn.exports=String(An)==="[object z]"});var ue=n((Ey,Nn)=>{"use strict";var Nd=tr(),Ld=I(),ir=te(),kd=T(),Dd=kd("toStringTag"),$d=Object,Md=ir(function(){return arguments}())=="Arguments",jd=function(r,e){try{return r[e]}catch(t){}};Nn.exports=Nd?ir:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=jd(e=$d(r),Dd))=="string"?t:Md?ir(e):(i=ir(e))=="Object"&&Ld(e.callee)?"Arguments":i}});var kn=n((qy,Ln)=>{"use strict";var Fd=ue(),Bd=String;Ln.exports=function(r){if(Fd(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Bd(r)}});var $n=n((Py,Dn)=>{"use strict";var Ud=L();Dn.exports=function(){var r=Ud(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Fn=n((Ty,jn)=>{"use strict";var Vd=_(),Gd=N(),Kd=qe(),Wd=$n(),Mn=RegExp.prototype;jn.exports=function(r){var e=r.flags;return e===void 0&&!("flags"in Mn)&&!Gd(r,"flags")&&Kd(Mn,r)?Vd(Wd,r):e}});var Un=n((Oy,Bn)=>{"use strict";var yt=O(),Hd=Je(),zd=Math.floor,mt=yt("".charAt),Qd=yt("".replace),bt=yt("".slice),Yd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jd=/\$([$&'`]|\d{1,2})/g;Bn.exports=function(r,e,t,i,o,a){var u=t+r.length,l=i.length,f=Jd;return o!==void 0&&(o=Hd(o),f=Yd),Qd(a,f,function(d,s){var c;switch(mt(s,0)){case"$":return"$";case"&":return r;case"`":return bt(e,0,t);case"'":return bt(e,u);case"<":c=o[bt(s,1,-1)];break;default:var v=+s;if(v===0)return d;if(v>l){var p=zd(v/10);return p===0?d:p<=l?i[p-1]===void 0?mt(s,1):i[p-1]+mt(s,1):d}c=i[v-1]}return c===void 0?"":c})}});var Hn=n(()=>{"use strict";var Xd=k(),Zd=_(),St=O(),Vn=He(),ep=I(),rp=ie(),tp=wn(),ce=kn(),ip=Oe(),op=Fn(),np=Un(),ap=T(),sp=C(),up=ap("replace"),cp=TypeError,Wn=St("".indexOf),lp=St("".replace),Gn=St("".slice),fp=Math.max,Kn=function(r,e,t){return t>r.length?-1:e===""?t:Wn(r,e,t)};Xd({target:"String",proto:!0},{replaceAll:function(e,t){var i=Vn(this),o,a,u,l,f,d,s,c,v,p=0,m=0,y="";if(!rp(e)){if(o=tp(e),o&&(a=ce(Vn(op(e))),!~Wn(a,"g")))throw cp("`.replaceAll` does not allow non-global regexes");if(u=ip(e,up),u)return Zd(u,e,i,t);if(sp&&o)return lp(ce(i),e,t)}for(l=ce(i),f=ce(e),d=ep(t),d||(t=ce(t)),s=f.length,c=fp(1,s),p=Kn(l,f,0);p!==-1;)v=d?ce(t(f,p,l)):np(f,l,p,[],void 0,t),y+=Gn(l,m,p)+v,m=p+s,p=Kn(l,f,p+c);return m<l.length&&(y+=Gn(l,m)),y}})});var It=n((Ry,zn)=>{"use strict";var dp=B();zn.exports=dp});var Yn=n((wy,Qn)=>{"use strict";zi();Qi();Hn();var pp=It();Qn.exports=pp("String","replaceAll")});var Xn=n((Ay,Jn)=>{"use strict";var vp=Yn();Jn.exports=vp});var ea=n((Cy,Zn)=>{"use strict";var hp=Xn();Zn.exports=hp});var sa=n(()=>{"use strict"});var Re=n((By,ua)=>{"use strict";var mp=te();ua.exports=typeof process!="undefined"&&mp(process)=="process"});var fe=n((Uy,ca)=>{"use strict";var bp=Q();ca.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:bp(r,e,t),r}});var fa=n((Vy,la)=>{"use strict";var yp=O(),Sp=U();la.exports=function(r,e,t){try{return yp(Sp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var pa=n((Gy,da)=>{"use strict";var Ip=I(),Ep=String,qp=TypeError;da.exports=function(r){if(typeof r=="object"||Ip(r))return r;throw qp("Can't set "+Ep(r)+" as a prototype")}});var Pt=n((Ky,va)=>{"use strict";var Pp=fa(),Tp=L(),Op=pa();va.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=Pp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,a){return Tp(o),Op(a),r?t(o,a):o.__proto__=a,o}}():void 0)});var ga=n((Wy,ha)=>{"use strict";var _p=tr(),xp=ue();ha.exports=_p?{}.toString:function(){return"[object "+xp(this)+"]"}});var ur=n((Hy,ba)=>{"use strict";var Rp=tr(),wp=z().f,Ap=Q(),Cp=N(),Np=ga(),Lp=T(),ma=Lp("toStringTag");ba.exports=function(r,e,t,i){if(r){var o=t?r:r.prototype;Cp(o,ma)||wp(o,ma,{configurable:!0,value:e}),i&&!Rp&&Ap(o,"toString",Np)}}});var Sa=n((zy,ya)=>{"use strict";var kp=z();ya.exports=function(r,e,t){return kp.f(r,e,t)}});var qa=n((Qy,Ea)=>{"use strict";var Dp=B(),$p=Sa(),Mp=T(),jp=j(),Ia=Mp("species");Ea.exports=function(r){var e=Dp(r);jp&&e&&!e[Ia]&&$p(e,Ia,{configurable:!0,get:function(){return this}})}});var Ta=n((Yy,Pa)=>{"use strict";var Fp=qe(),Bp=TypeError;Pa.exports=function(r,e){if(Fp(e,r))return r;throw Bp("Incorrect invocation")}});var Ot=n((Jy,Oa)=>{"use strict";var Up=O(),Vp=I(),Tt=Ye(),Gp=Up(Function.toString);Vp(Tt.inspectSource)||(Tt.inspectSource=function(r){return Gp(r)});Oa.exports=Tt.inspectSource});var Ca=n((Xy,Aa)=>{"use strict";var Kp=O(),Wp=x(),_a=I(),Hp=ue(),zp=B(),Qp=Ot(),xa=function(){},Yp=[],Ra=zp("Reflect","construct"),_t=/^\s*(?:class|function)\b/,Jp=Kp(_t.exec),Xp=!_t.exec(xa),we=function(e){if(!_a(e))return!1;try{return Ra(xa,Yp,e),!0}catch(t){return!1}},wa=function(e){if(!_a(e))return!1;switch(Hp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Xp||!!Jp(_t,Qp(e))}catch(t){return!0}};wa.sham=!0;Aa.exports=!Ra||Wp(function(){var r;return we(we.call)||!we(Object)||!we(function(){r=!0})||r})?wa:we});var La=n((Zy,Na)=>{"use strict";var Zp=Ca(),ev=Te(),rv=TypeError;Na.exports=function(r){if(Zp(r))return r;throw rv(ev(r)+" is not a constructor")}});var xt=n((eS,Da)=>{"use strict";var ka=L(),tv=La(),iv=ie(),ov=T(),nv=ov("species");Da.exports=function(r,e){var t=ka(r).constructor,i;return t===void 0||iv(i=ka(t)[nv])?e:tv(i)}});var Rt=n((rS,$a)=>{"use strict";var av=B();$a.exports=av("document","documentElement")});var ja=n((tS,Ma)=>{"use strict";var sv=O();Ma.exports=sv([].slice)});var Ba=n((iS,Fa)=>{"use strict";var uv=TypeError;Fa.exports=function(r,e){if(r<e)throw uv("Not enough arguments");return r}});var wt=n((oS,Ua)=>{"use strict";var cv=Pe();Ua.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(cv)});var jt=n((nS,Ja)=>{"use strict";var R=P(),lv=Vr(),fv=xe(),Va=I(),dv=N(),Ya=x(),Ga=Rt(),pv=ja(),Ka=Ze(),vv=Ba(),hv=wt(),gv=Re(),Dt=R.setImmediate,$t=R.clearImmediate,mv=R.process,At=R.Dispatch,bv=R.Function,Wa=R.MessageChannel,yv=R.String,Ct=0,Ae={},Ha="onreadystatechange",Ce,Y,Nt,Lt;Ya(function(){Ce=R.location});var Mt=function(r){if(dv(Ae,r)){var e=Ae[r];delete Ae[r],e()}},kt=function(r){return function(){Mt(r)}},za=function(r){Mt(r.data)},Qa=function(r){R.postMessage(yv(r),Ce.protocol+"//"+Ce.host)};(!Dt||!$t)&&(Dt=function(e){vv(arguments.length,1);var t=Va(e)?e:bv(e),i=pv(arguments,1);return Ae[++Ct]=function(){lv(t,void 0,i)},Y(Ct),Ct},$t=function(e){delete Ae[e]},gv?Y=function(r){mv.nextTick(kt(r))}:At&&At.now?Y=function(r){At.now(kt(r))}:Wa&&!hv?(Nt=new Wa,Lt=Nt.port2,Nt.port1.onmessage=za,Y=fv(Lt.postMessage,Lt)):R.addEventListener&&Va(R.postMessage)&&!R.importScripts&&Ce&&Ce.protocol!=="file:"&&!Ya(Qa)?(Y=Qa,R.addEventListener("message",za,!1)):Ha in Ka("script")?Y=function(r){Ga.appendChild(Ka("script"))[Ha]=function(){Ga.removeChild(this),Mt(r)}}:Y=function(r){setTimeout(kt(r),0)});Ja.exports={set:Dt,clear:$t}});var Ft=n((aS,Za)=>{"use strict";var Xa=function(){this.head=null,this.tail=null};Xa.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};Za.exports=Xa});var rs=n((sS,es)=>{"use strict";var Sv=Pe();es.exports=/ipad|iphone|ipod/i.test(Sv)&&typeof Pebble!="undefined"});var is=n((uS,ts)=>{"use strict";var Iv=Pe();ts.exports=/web0s(?!.*chrome)/i.test(Iv)});var fs=n((cS,ls)=>{"use strict";var J=P(),os=xe(),Ev=lt().f,Bt=jt().set,qv=Ft(),Pv=wt(),Tv=rs(),Ov=is(),Ut=Re(),ns=J.MutationObserver||J.WebKitMutationObserver,as=J.document,ss=J.process,cr=J.Promise,us=Ev(J,"queueMicrotask"),Kt=us&&us.value,de,Vt,Gt,lr,cs;Kt||(Ne=new qv,Le=function(){var r,e;for(Ut&&(r=ss.domain)&&r.exit();e=Ne.get();)try{e()}catch(t){throw Ne.head&&de(),t}r&&r.enter()},!Pv&&!Ut&&!Ov&&ns&&as?(Vt=!0,Gt=as.createTextNode(""),new ns(Le).observe(Gt,{characterData:!0}),de=function(){Gt.data=Vt=!Vt}):!Tv&&cr&&cr.resolve?(lr=cr.resolve(void 0),lr.constructor=cr,cs=os(lr.then,lr),de=function(){cs(Le)}):Ut?de=function(){ss.nextTick(Le)}:(Bt=os(Bt,J),de=function(){Bt(Le)}),Kt=function(r){Ne.head||de(),Ne.add(r)});var Ne,Le;ls.exports=Kt});var ps=n((lS,ds)=>{"use strict";ds.exports=function(r,e){try{arguments.length==1?console.error(r):console.error(r,e)}catch(t){}}});var fr=n((fS,vs)=>{"use strict";vs.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var ms=n((dS,gs)=>{"use strict";var _v=P(),xv=I(),hs=_v.WeakMap;gs.exports=xv(hs)&&/native code/.test(String(hs))});var dr=n((pS,ys)=>{"use strict";var Rv=nt(),wv=at(),bs=Rv("keys");ys.exports=function(r){return bs[r]||(bs[r]=wv(r))}});var pr=n((vS,Ss)=>{"use strict";Ss.exports={}});var Qt=n((hS,qs)=>{"use strict";var Av=ms(),Es=P(),Cv=F(),Nv=Q(),Wt=N(),Ht=Ye(),Lv=dr(),kv=pr(),Is="Object already initialized",zt=Es.TypeError,Dv=Es.WeakMap,vr,ke,hr,$v=function(r){return hr(r)?ke(r):vr(r,{})},Mv=function(r){return function(e){var t;if(!Cv(e)||(t=ke(e)).type!==r)throw zt("Incompatible receiver, "+r+" required");return t}};Av||Ht.state?(D=Ht.state||(Ht.state=new Dv),D.get=D.get,D.has=D.has,D.set=D.set,vr=function(r,e){if(D.has(r))throw zt(Is);return e.facade=r,D.set(r,e),e},ke=function(r){return D.get(r)||{}},hr=function(r){return D.has(r)}):(X=Lv("state"),kv[X]=!0,vr=function(r,e){if(Wt(r,X))throw zt(Is);return e.facade=r,Nv(r,X,e),e},ke=function(r){return Wt(r,X)?r[X]:{}},hr=function(r){return Wt(r,X)});var D,X;qs.exports={set:vr,get:ke,has:hr,enforce:$v,getterFor:Mv}});var Z=n((gS,Ps)=>{"use strict";var jv=P();Ps.exports=jv.Promise});var Yt=n((mS,Ts)=>{"use strict";Ts.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var _s=n((bS,Os)=>{"use strict";var Fv=Yt(),Bv=Re();Os.exports=!Fv&&!Bv&&typeof window=="object"&&typeof document=="object"});var pe=n((yS,ws)=>{"use strict";var Uv=P(),De=Z(),Vv=I(),Gv=ft(),Kv=Ot(),Wv=T(),Hv=_s(),zv=Yt(),Qv=C(),Jt=Xr(),xs=De&&De.prototype,Yv=Wv("species"),Xt=!1,Rs=Vv(Uv.PromiseRejectionEvent),Jv=Gv("Promise",function(){var r=Kv(De),e=r!==String(De);if(!e&&Jt===66||Qv&&!(xs.catch&&xs.finally))return!0;if(!Jt||Jt<51||!/native code/.test(r)){var t=new De(function(a){a(1)}),i=function(a){a(function(){},function(){})},o=t.constructor={};if(o[Yv]=i,Xt=t.then(function(){})instanceof i,!Xt)return!0}return!e&&(Hv||zv)&&!Rs});ws.exports={CONSTRUCTOR:Jv,REJECTION_EVENT:Rs,SUBCLASSING:Xt}});var ve=n((SS,Cs)=>{"use strict";var As=U(),Xv=TypeError,Zv=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw Xv("Bad Promise constructor");e=i,t=o}),this.resolve=As(e),this.reject=As(t)};Cs.exports.f=function(r){return new Zv(r)}});var Js=n(()=>{"use strict";var eh=k(),rh=C(),yr=Re(),H=P(),be=_(),Ns=fe(),Ls=Pt(),th=ur(),ih=qa(),oh=U(),br=I(),nh=F(),ah=Ta(),sh=xt(),js=jt().set,ii=fs(),uh=ps(),ch=fr(),lh=Ft(),Fs=Qt(),Sr=Z(),oi=pe(),Bs=ve(),Ir="Promise",Us=oi.CONSTRUCTOR,fh=oi.REJECTION_EVENT,dh=oi.SUBCLASSING,Zt=Fs.getterFor(Ir),ph=Fs.set,he=Sr&&Sr.prototype,ee=Sr,gr=he,Vs=H.TypeError,ei=H.document,ni=H.process,ri=Bs.f,vh=ri,hh=!!(ei&&ei.createEvent&&H.dispatchEvent),Gs="unhandledrejection",gh="rejectionhandled",ks=0,Ks=1,mh=2,ai=1,Ws=2,mr,Ds,bh,$s,Hs=function(r){var e;return nh(r)&&br(e=r.then)?e:!1},zs=function(r,e){var t=e.value,i=e.state==Ks,o=i?r.ok:r.fail,a=r.resolve,u=r.reject,l=r.domain,f,d,s;try{o?(i||(e.rejection===Ws&&Sh(e),e.rejection=ai),o===!0?f=t:(l&&l.enter(),f=o(t),l&&(l.exit(),s=!0)),f===r.promise?u(Vs("Promise-chain cycle")):(d=Hs(f))?be(d,f,a,u):a(f)):u(t)}catch(c){l&&!s&&l.exit(),u(c)}},Qs=function(r,e){r.notified||(r.notified=!0,ii(function(){for(var t=r.reactions,i;i=t.get();)zs(i,r);r.notified=!1,e&&!r.rejection&&yh(r)}))},Ys=function(r,e,t){var i,o;hh?(i=ei.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),H.dispatchEvent(i)):i={promise:e,reason:t},!fh&&(o=H["on"+r])?o(i):r===Gs&&uh("Unhandled promise rejection",t)},yh=function(r){be(js,H,function(){var e=r.facade,t=r.value,i=Ms(r),o;if(i&&(o=ch(function(){yr?ni.emit("unhandledRejection",t,e):Ys(Gs,e,t)}),r.rejection=yr||Ms(r)?Ws:ai,o.error))throw o.value})},Ms=function(r){return r.rejection!==ai&&!r.parent},Sh=function(r){be(js,H,function(){var e=r.facade;yr?ni.emit("rejectionHandled",e):Ys(gh,e,r.value)})},ge=function(r,e,t){return function(i){r(e,i,t)}},me=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=mh,Qs(r,!0))},ti=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Vs("Promise can't be resolved itself");var i=Hs(e);i?ii(function(){var o={done:!1};try{be(i,e,ge(ti,o,r),ge(me,o,r))}catch(a){me(o,a,r)}}):(r.value=e,r.state=Ks,Qs(r,!1))}catch(o){me({done:!1},o,r)}}};if(Us&&(ee=function(e){ah(this,gr),oh(e),be(mr,this);var t=Zt(this);try{e(ge(ti,t),ge(me,t))}catch(i){me(t,i)}},gr=ee.prototype,mr=function(e){ph(this,{type:Ir,done:!1,notified:!1,parent:!1,reactions:new lh,rejection:!1,state:ks,value:void 0})},mr.prototype=Ns(gr,"then",function(e,t){var i=Zt(this),o=ri(sh(this,ee));return i.parent=!0,o.ok=br(e)?e:!0,o.fail=br(t)&&t,o.domain=yr?ni.domain:void 0,i.state==ks?i.reactions.add(o):ii(function(){zs(o,i)}),o.promise}),Ds=function(){var r=new mr,e=Zt(r);this.promise=r,this.resolve=ge(ti,e),this.reject=ge(me,e)},Bs.f=ri=function(r){return r===ee||r===bh?new Ds(r):vh(r)},!rh&&br(Sr)&&he!==Object.prototype)){$s=he.then,dh||Ns(he,"then",function(e,t){var i=this;return new ee(function(o,a){be($s,i,o,a)}).then(e,t)},{unsafe:!0});try{delete he.constructor}catch(r){}Ls&&Ls(he,gr)}eh({global:!0,constructor:!0,wrap:!0,forced:Us},{Promise:ee});th(ee,Ir,!1,!0);ih(Ir)});var re=n((qS,Xs)=>{"use strict";Xs.exports={}});var eu=n((PS,Zs)=>{"use strict";var Ih=T(),Eh=re(),qh=Ih("iterator"),Ph=Array.prototype;Zs.exports=function(r){return r!==void 0&&(Eh.Array===r||Ph[qh]===r)}});var tu=n((TS,ru)=>{"use strict";var Th=Math.ceil,Oh=Math.floor;ru.exports=Math.trunc||function(e){var t=+e;return(t>0?Oh:Th)(t)}});var si=n((OS,iu)=>{"use strict";var _h=tu();iu.exports=function(r){var e=+r;return e!==e||e===0?0:_h(e)}});var nu=n((_S,ou)=>{"use strict";var xh=si(),Rh=Math.min;ou.exports=function(r){return r>0?Rh(xh(r),9007199254740991):0}});var ui=n((xS,au)=>{"use strict";var wh=nu();au.exports=function(r){return wh(r.length)}});var ci=n((RS,uu)=>{"use strict";var Ah=ue(),su=Oe(),Ch=ie(),Nh=re(),Lh=T(),kh=Lh("iterator");uu.exports=function(r){if(!Ch(r))return su(r,kh)||su(r,"@@iterator")||Nh[Ah(r)]}});var lu=n((wS,cu)=>{"use strict";var Dh=_(),$h=U(),Mh=L(),jh=Te(),Fh=ci(),Bh=TypeError;cu.exports=function(r,e){var t=arguments.length<2?Fh(r):e;if($h(t))return Mh(Dh(t,r));throw Bh(jh(r)+" is not iterable")}});var pu=n((AS,du)=>{"use strict";var Uh=_(),fu=L(),Vh=Oe();du.exports=function(r,e,t){var i,o;fu(r);try{if(i=Vh(r,"return"),!i){if(e==="throw")throw t;return t}i=Uh(i,r)}catch(a){o=!0,i=a}if(e==="throw")throw t;if(o)throw i;return fu(i),t}});var qr=n((CS,mu)=>{"use strict";var Gh=xe(),Kh=_(),Wh=L(),Hh=Te(),zh=eu(),Qh=ui(),vu=qe(),Yh=lu(),Jh=ci(),hu=pu(),Xh=TypeError,Er=function(r,e){this.stopped=r,this.result=e},gu=Er.prototype;mu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),f=Gh(e,i),d,s,c,v,p,m,y,E=function(q){return d&&hu(d,"normal",q),new Er(!0,q)},S=function(q){return o?(Wh(q),l?f(q[0],q[1],E):f(q[0],q[1])):l?f(q,E):f(q)};if(a)d=r.iterator;else if(u)d=r;else{if(s=Jh(r),!s)throw Xh(Hh(r)+" is not iterable");if(zh(s)){for(c=0,v=Qh(r);v>c;c++)if(p=S(r[c]),p&&vu(gu,p))return p;return new Er(!1)}d=Yh(r,s)}for(m=a?r.next:d.next;!(y=Kh(m,d)).done;){try{p=S(y.value)}catch(q){hu(d,"throw",q)}if(typeof p=="object"&&p&&vu(gu,p))return p}return new Er(!1)}});var Eu=n((NS,Iu)=>{"use strict";var Zh=T(),yu=Zh("iterator"),Su=!1;try{bu=0,li={next:function(){return{done:!!bu++}},return:function(){Su=!0}},li[yu]=function(){return this},Array.from(li,function(){throw 2})}catch(r){}var bu,li;Iu.exports=function(r,e){if(!e&&!Su)return!1;var t=!1;try{var i={};i[yu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var fi=n((LS,qu)=>{"use strict";var eg=Z(),rg=Eu(),tg=pe().CONSTRUCTOR;qu.exports=tg||!rg(function(r){eg.all(r).then(void 0,function(){})})});var Pu=n(()=>{"use strict";var ig=k(),og=_(),ng=U(),ag=ve(),sg=fr(),ug=qr(),cg=fi();ig({target:"Promise",stat:!0,forced:cg},{all:function(e){var t=this,i=ag.f(t),o=i.resolve,a=i.reject,u=sg(function(){var l=ng(t.resolve),f=[],d=0,s=1;ug(e,function(c){var v=d++,p=!1;s++,og(l,t,c).then(function(m){p||(p=!0,f[v]=m,--s||o(f))},a)}),--s||o(f)});return u.error&&a(u.value),i.promise}})});var Ou=n(()=>{"use strict";var lg=k(),fg=C(),dg=pe().CONSTRUCTOR,pi=Z(),pg=B(),vg=I(),hg=fe(),Tu=pi&&pi.prototype;lg({target:"Promise",proto:!0,forced:dg,real:!0},{catch:function(r){return this.then(void 0,r)}});!fg&&vg(pi)&&(di=pg("Promise").prototype.catch,Tu.catch!==di&&hg(Tu,"catch",di,{unsafe:!0}));var di});var _u=n(()=>{"use strict";var gg=k(),mg=_(),bg=U(),yg=ve(),Sg=fr(),Ig=qr(),Eg=fi();gg({target:"Promise",stat:!0,forced:Eg},{race:function(e){var t=this,i=yg.f(t),o=i.reject,a=Sg(function(){var u=bg(t.resolve);Ig(e,function(l){mg(u,t,l).then(i.resolve,o)})});return a.error&&o(a.value),i.promise}})});var xu=n(()=>{"use strict";var qg=k(),Pg=_(),Tg=ve(),Og=pe().CONSTRUCTOR;qg({target:"Promise",stat:!0,forced:Og},{reject:function(e){var t=Tg.f(this);return Pg(t.reject,void 0,e),t.promise}})});var vi=n((VS,Ru)=>{"use strict";var _g=L(),xg=F(),Rg=ve();Ru.exports=function(r,e){if(_g(r),xg(e)&&e.constructor===r)return e;var t=Rg.f(r),i=t.resolve;return i(e),t.promise}});var Cu=n(()=>{"use strict";var wg=k(),Ag=B(),wu=C(),Cg=Z(),Au=pe().CONSTRUCTOR,Ng=vi(),Lg=Ag("Promise"),kg=wu&&!Au;wg({target:"Promise",stat:!0,forced:wu||Au},{resolve:function(e){return Ng(kg&&this===Lg?Cg:this,e)}})});var Nu=n(()=>{"use strict";Js();Pu();Ou();_u();xu();Cu()});var $u=n(()=>{"use strict";var Dg=k(),$g=C(),Pr=Z(),Mg=x(),ku=B(),Du=I(),jg=xt(),Lu=vi(),Fg=fe(),gi=Pr&&Pr.prototype,Bg=!!Pr&&Mg(function(){gi.finally.call({then:function(){}},function(){})});Dg({target:"Promise",proto:!0,real:!0,forced:Bg},{finally:function(r){var e=jg(this,ku("Promise")),t=Du(r);return this.then(t?function(i){return Lu(e,r()).then(function(){return i})}:r,t?function(i){return Lu(e,r()).then(function(){throw i})}:r)}});!$g&&Du(Pr)&&(hi=ku("Promise").prototype.finally,gi.finally!==hi&&Fg(gi,"finally",hi,{unsafe:!0}));var hi});var ju=n((YS,Mu)=>{"use strict";sa();Nu();$u();var Ug=It();Mu.exports=Ug("Promise","finally")});var Bu=n((JS,Fu)=>{"use strict";var Vg=ju();Fu.exports=Vg});var Vu=n((XS,Uu)=>{"use strict";var Gg=Bu();Uu.exports=Gg});var Ku=n((ZS,Gu)=>{"use strict";Gu.exports=function(){}});var zu=n((eI,Hu)=>{"use strict";var mi=j(),Kg=N(),Wu=Function.prototype,Wg=mi&&Object.getOwnPropertyDescriptor,bi=Kg(Wu,"name"),Hg=bi&&function(){}.name==="something",zg=bi&&(!mi||mi&&Wg(Wu,"name").configurable);Hu.exports={EXISTS:bi,PROPER:Hg,CONFIGURABLE:zg}});var Yu=n((rI,Qu)=>{"use strict";var Qg=si(),Yg=Math.max,Jg=Math.min;Qu.exports=function(r,e){var t=Qg(r);return t<0?Yg(t+e,0):Jg(t,e)}});var Zu=n((tI,Xu)=>{"use strict";var Xg=oe(),Zg=Yu(),em=ui(),Ju=function(r){return function(e,t,i){var o=Xg(e),a=em(o),u=Zg(i,a),l;if(r&&t!=t){for(;a>u;)if(l=o[u++],l!=l)return!0}else for(;a>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Xu.exports={includes:Ju(!0),indexOf:Ju(!1)}});var tc=n((iI,rc)=>{"use strict";var rm=O(),yi=N(),tm=oe(),im=Zu().indexOf,om=pr(),ec=rm([].push);rc.exports=function(r,e){var t=tm(r),i=0,o=[],a;for(a in t)!yi(om,a)&&yi(t,a)&&ec(o,a);for(;e.length>i;)yi(t,a=e[i++])&&(~im(o,a)||ec(o,a));return o}});var Si=n((oI,ic)=>{"use strict";ic.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var nc=n((nI,oc)=>{"use strict";var nm=tc(),am=Si();oc.exports=Object.keys||function(e){return nm(e,am)}});var sc=n(ac=>{"use strict";var sm=j(),um=dt(),cm=z(),lm=L(),fm=oe(),dm=nc();ac.f=sm&&!um?Object.defineProperties:function(e,t){lm(e);for(var i=fm(t),o=dm(t),a=o.length,u=0,l;a>u;)cm.f(e,l=o[u++],i[l]);return e}});var Pi=n((sI,vc)=>{"use strict";var pm=L(),vm=sc(),uc=Si(),hm=pr(),gm=Rt(),mm=Ze(),bm=dr(),cc=">",lc="<",Ei="prototype",qi="script",dc=bm("IE_PROTO"),Ii=function(){},pc=function(r){return lc+qi+cc+r+lc+"/"+qi+cc},fc=function(r){r.write(pc("")),r.close();var e=r.parentWindow.Object;return r=null,e},ym=function(){var r=mm("iframe"),e="java"+qi+":",t;return r.style.display="none",gm.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(pc("document.F=Object")),t.close(),t.F},Tr,Or=function(){try{Tr=new ActiveXObject("htmlfile")}catch(e){}Or=typeof document!="undefined"?document.domain&&Tr?fc(Tr):ym():fc(Tr);for(var r=uc.length;r--;)delete Or[Ei][uc[r]];return Or()};hm[dc]=!0;vc.exports=Object.create||function(e,t){var i;return e!==null?(Ii[Ei]=pm(e),i=new Ii,Ii[Ei]=null,i[dc]=e):i=Or(),t===void 0?i:vm.f(i,t)}});var gc=n((uI,hc)=>{"use strict";var Sm=x();hc.exports=!Sm(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Oi=n((cI,bc)=>{"use strict";var Im=N(),Em=I(),qm=Je(),Pm=dr(),Tm=gc(),mc=Pm("IE_PROTO"),Ti=Object,Om=Ti.prototype;bc.exports=Tm?Ti.getPrototypeOf:function(r){var e=qm(r);if(Im(e,mc))return e[mc];var t=e.constructor;return Em(t)&&e instanceof t?t.prototype:e instanceof Ti?Om:null}});var wi=n((lI,Ic)=>{"use strict";var _m=x(),xm=I(),Rm=F(),wm=Pi(),yc=Oi(),Am=fe(),Cm=T(),Nm=C(),Ri=Cm("iterator"),Sc=!1,V,_i,xi;[].keys&&(xi=[].keys(),"next"in xi?(_i=yc(yc(xi)),_i!==Object.prototype&&(V=_i)):Sc=!0);var Lm=!Rm(V)||_m(function(){var r={};return V[Ri].call(r)!==r});Lm?V={}:Nm&&(V=wm(V));xm(V[Ri])||Am(V,Ri,function(){return this});Ic.exports={IteratorPrototype:V,BUGGY_SAFARI_ITERATORS:Sc}});var qc=n((fI,Ec)=>{"use strict";var km=wi().IteratorPrototype,Dm=Pi(),$m=Ee(),Mm=ur(),jm=re(),Fm=function(){return this};Ec.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=Dm(km,{next:$m(+!i,t)}),Mm(r,o,!1,!0),jm[o]=Fm,r}});var Lc=n((dI,Nc)=>{"use strict";var Bm=k(),Um=_(),_r=C(),Ac=zu(),Vm=I(),Gm=qc(),Pc=Oi(),Tc=Pt(),Km=ur(),Wm=Q(),Ai=fe(),Hm=T(),Oc=re(),Cc=wi(),zm=Ac.PROPER,Qm=Ac.CONFIGURABLE,_c=Cc.IteratorPrototype,xr=Cc.BUGGY_SAFARI_ITERATORS,$e=Hm("iterator"),xc="keys",Me="values",Rc="entries",wc=function(){return this};Nc.exports=function(r,e,t,i,o,a,u){Gm(t,e,i);var l=function(S){if(S===o&&v)return v;if(!xr&&S in s)return s[S];switch(S){case xc:return function(){return new t(this,S)};case Me:return function(){return new t(this,S)};case Rc:return function(){return new t(this,S)}}return function(){return new t(this)}},f=e+" Iterator",d=!1,s=r.prototype,c=s[$e]||s["@@iterator"]||o&&s[o],v=!xr&&c||l(o),p=e=="Array"&&s.entries||c,m,y,E;if(p&&(m=Pc(p.call(new r)),m!==Object.prototype&&m.next&&(!_r&&Pc(m)!==_c&&(Tc?Tc(m,_c):Vm(m[$e])||Ai(m,$e,wc)),Km(m,f,!0,!0),_r&&(Oc[f]=wc))),zm&&o==Me&&c&&c.name!==Me&&(!_r&&Qm?Wm(s,"name",Me):(d=!0,v=function(){return Um(c,this)})),o)if(y={values:l(Me),keys:a?v:l(xc),entries:l(Rc)},u)for(E in y)(xr||d||!(E in s))&&Ai(s,E,y[E]);else Bm({target:e,proto:!0,forced:xr||d},y);return(!_r||u)&&s[$e]!==v&&Ai(s,$e,v,{name:o}),Oc[e]=v,y}});var Dc=n((pI,kc)=>{"use strict";kc.exports=function(r,e){return{value:r,done:e}}});var Ni=n((vI,Bc)=>{"use strict";var Ym=oe(),Ci=Ku(),$c=re(),jc=Qt(),Jm=z().f,Xm=Lc(),Rr=Dc(),Zm=C(),eb=j(),Fc="Array Iterator",rb=jc.set,tb=jc.getterFor(Fc);Bc.exports=Xm(Array,"Array",function(r,e){rb(this,{type:Fc,target:Ym(r),index:0,kind:e})},function(){var r=tb(this),e=r.target,t=r.kind,i=r.index++;return!e||i>=e.length?(r.target=void 0,Rr(void 0,!0)):t=="keys"?Rr(i,!1):t=="values"?Rr(e[i],!1):Rr([i,e[i]],!1)},"values");var Mc=$c.Arguments=$c.Array;Ci("keys");Ci("values");Ci("entries");if(!Zm&&eb&&Mc.name!=="values")try{Jm(Mc,"name",{value:"values"})}catch(r){}});var Vc=n((hI,Uc)=>{"use strict";var ib=Xe(),ob=z(),nb=Ee();Uc.exports=function(r,e,t){var i=ib(e);i in r?ob.f(r,i,nb(0,t)):r[i]=t}});var Gc=n(()=>{"use strict";var ab=k(),sb=qr(),ub=Vc();ab({target:"Object",stat:!0},{fromEntries:function(e){var t={};return sb(e,function(i,o){ub(t,i,o)},{AS_ENTRIES:!0}),t}})});var Wc=n((bI,Kc)=>{"use strict";Ni();Gc();var cb=ze();Kc.exports=cb.Object.fromEntries});var zc=n((yI,Hc)=>{"use strict";Hc.exports={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}});var Jc=n(()=>{"use strict";Ni();var lb=zc(),fb=P(),db=ue(),pb=Q(),Qc=re(),vb=T(),Yc=vb("toStringTag");for(wr in lb)Li=fb[wr],Ar=Li&&Li.prototype,Ar&&db(Ar)!==Yc&&pb(Ar,Yc,wr),Qc[wr]=Qc.Array;var Li,Ar,wr});var Zc=n((EI,Xc)=>{"use strict";var hb=Wc();Jc();Xc.exports=hb});var rl=n((qI,el)=>{"use strict";var gb=Zc();el.exports=gb});var yb={};El(yb,{ApiEnv:()=>le,ConnectionType:()=>ar,ContentType:()=>nr,InteractiveInterfaceClick:()=>Et,OneStat:()=>jr,Quality:()=>or,SeekAction:()=>sr,VERSION:()=>je});module.exports=ql(yb);var dl=Ur(ea(),1);var le=(a=>(a.PROD="prod",a.VK_ALIAS="vk_alias",a.VIDEOTEST="videotest",a.TEST="test",a.AUTO="auto",a))(le||{}),or=(d=>(d.Q144P="mobile",d.Q240P="lowest",d.Q360P="low",d.Q480P="medium",d.Q720P="high",d.Q1080P="fullhd",d.Q1440P="quadhd",d.Q2160P="ultrahd",d.UNKNOWN="unknown",d))(or||{}),nr=(p=>(p.MP4="mp4",p.DASH="dash",p.DASH_SEP="dash_sep",p.ONDEMAND_DASH="ondemand_dash",p.HLS="hls",p.ONDEMAND_HLS="ondemand_hls",p.WEBM="webm",p.AV1="av1",p.ONDEMAND_DASH_LIVE="ondemand_dash_live",p.ONDEMAND_HLS_LIVE="ondemand_hls_live",p.WEBRTC="webrtc",p.UNKNOWN="unknown",p.RTMP="rtmp",p))(nr||{});var ar=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(ar||{});var sr=(l=>(l.SLIDER="slider",l.DOUBLE_TAP="double_tap",l.TIME_CODE="time_code",l.EPISODE="episode",l.REWIND="rewind",l.LIVE="live",l.UNKNOWN="unknown",l))(sr||{}),Et=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(Et||{}),ra={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo"},ta={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},ia={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},oa={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};var na=require("@vkontakte/videoplayer-shared"),gp={apiEnv:"vk_alias",requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:[],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},aa=r=>(0,na.fillWithDefault)(r,gp);function qt(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}var h=require("@vkontakte/videoplayer-shared"),Fr=require("@vkontakte/videoplayer-shared");var Cr=Ur(Vu(),1);var tl=Ur(rl(),1);var il=r=>{var o;let{operation:e,custom:t}=r,i=(0,tl.default)(Object.entries(t).map(([a,u])=>{var d,s,c;let l=(d=ta[a])!=null?d:a,f=u;return u&&(a==="mode"?f=(s=oa[u])!=null?s:u:a==="quality"&&(f=(c=ia[u])!=null?c:u)),[l,f]}));return Ge(W({},r),{operation:(o=ra[e])!=null?o:e,custom:i})};var je="__VERSION__",ol="CIOPGQJGDIHBABABA",ki={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",auto:""};var $=require("@vkontakte/videoplayer-shared");var Fe=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new $.ValueSubject(!1);this.params=e}authorize(e){return M(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this._authorizeWithBackoff()})}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e)}logRequest(e){return M(this,null,function*(){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:yield this._authorizeWithBackoff();if(!o)return;let a=(d,...s)=>M(this,[d,...s],function*(l,f=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(t,i,o)}catch(c){if(!c||!("error_code"in c)){this.params.error$.next({id:"logRequestUnknown",category:$.ErrorCategory.NETWORK,message:`Unknown ${t} error`,thrown:c});return}let v=c==null?void 0:c.error_code;switch(v){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this._authorizeWithBackoff(),f>0?a(l,f-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),f>0?a(l,f-1):void 0;default:{this.params.error$.next({id:`LogRequest#${v}`,category:$.ErrorCategory.EXTERNAL_API,message:`${t} error`,data:c});return}}}});return a(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return M(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,Cr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise})}createLogParams(e){return{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${je}`,platform:this.params.mobile?"M_WEB":"WEB",items:this.params.config.shorten?e.map(il):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=(0,$.getExponentialDelay)(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,Cr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:$.ErrorCategory.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}_authorize(){return M(this,null,function*(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.uuid,client_version:je.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,Cr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:$.ErrorCategory.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(i=>M(this,null,function*(){this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=yield this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:$.ErrorCategory.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:$.ErrorCategory.NETWORK,message:"authorize error",thrown:i})})),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise})}};var Nr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,a=i.length;o<a;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,a=i.length;o<a;o++){let u=i[o];try{u.callback.call(this,e)}catch(l){Promise.resolve().then(()=>{throw l})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},ye=class extends Nr{constructor(){super(),this.listeners||Nr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}},Be=class{constructor(){Object.defineProperty(this,"signal",{value:new ye,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(o){typeof document!="undefined"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let i=e;if(i===void 0)if(typeof document=="undefined")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(o){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(Be.prototype[Symbol.toStringTag]="AbortController",ye.prototype[Symbol.toStringTag]="AbortSignal");function Lr(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function Di(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!Lr({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(d,s){let c;s&&s.signal&&(c=s.signal,delete s.signal);let v=new t(d,s);return c&&Object.defineProperty(v,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),v},a.prototype=t.prototype);let u=e;return{fetch:(f,d)=>{let s=a&&a.prototype.isPrototypeOf(f)?f.signal:d?d.signal:void 0;if(s){let c;try{c=new DOMException("Aborted","AbortError")}catch(p){c=new Error("Aborted"),c.name="AbortError"}if(s.aborted)return Promise.reject(c);let v=new Promise((p,m)=>{s.addEventListener("abort",()=>m(c),{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([v,u(f,d)])}return u(f,d)},Request:a}}var Ue=Lr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),nl=Ue?Di({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,$i=Ue?nl.fetch:window.fetch,KI=Ue?nl.Request:window.Request,WI=Ue?Be:window.AbortController,HI=Ue?ye:window.AbortSignal;var G=require("@vkontakte/videoplayer-shared");var Ve=class{constructor(e){this.params=e,this.apiKey=e.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=ki[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}resolveApiBaseUrl(){return M(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield $i(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),a=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!a)throw new Error("Wrong DNS response");return a}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:G.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),ki.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),a=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,a)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:G.ErrorCategory.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}sendRequest(e,t,i){return M(this,null,function*(){let o=(0,G.now)(),a=u=>{if(u instanceof TypeError&&["Failed to fetch","NetworkError when attempting to fetch resource."].includes(u.message)){this.params.error$.next({id:"Network",category:G.ErrorCategory.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:G.ErrorCategory.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:(0,G.now)()-o}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),$i(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var s,c;let l=Number(u.headers.get("content-length"))===0,f=new Date((s=u.headers.get("date"))!=null?s:"").getTime(),d=(0,G.now)()-o;if(isFinite(f)&&((c=this.timeSynchronisation)==null||c.addServerTime(f,d)),!l)return u.json().then(v=>Object.prototype.hasOwnProperty.call(v,"error_msg")?Promise.reject(v):v,a)},a)})}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),Object.entries(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};var w=require("@vkontakte/videoplayer-shared");var kr="onestat_events",Mi=r=>e=>e.timestamp+r>=(0,w.now)(),Dr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return["action_play","watch_coverage_record","watch_coverage_live"].includes(t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=(0,w.debounceFn)(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=w.safeStorage.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=(0,w.debounceFn)(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){var e;try{this.flush()}catch(t){this.error$.next({id:"LoggerError",category:w.ErrorCategory.WTF,message:(e=String(t))!=null?e:"Unknown logger error",thrown:t})}}readFromStorage(){let e=w.safeStorage.get(kr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var a;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((a=t[this.userSalt])!=null?a:[]).filter(Mi(this.params.config.storageExpiration));w.safeStorage.set(kr,JSON.stringify(Ge(W({},t),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Mi(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],w.safeStorage.set(kr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of Object.entries(e)){let o=i.filter(Mi(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}w.safeStorage.set(kr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush(e=!1){let t=this.getFromStorage();t.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${t.length} events through beacon`}),this.api.logBeacon(t)):(this.loggerDebugLog({message:`Flushing ${t.length} events`}),this.api.logRequest(t)),this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};var g=require("@vkontakte/videoplayer-core"),ji=require("@vkontakte/videoplayer-shared");var al=r=>r&&{[g.VideoQuality.INVARIANT]:"unknown",[g.VideoQuality.Q_144P]:"mobile",[g.VideoQuality.Q_240P]:"lowest",[g.VideoQuality.Q_360P]:"low",[g.VideoQuality.Q_480P]:"medium",[g.VideoQuality.Q_720P]:"high",[g.VideoQuality.Q_1080P]:"fullhd",[g.VideoQuality.Q_1440P]:"quadhd",[g.VideoQuality.Q_2160P]:"ultrahd",[g.VideoQuality.Q_4320P]:"unknown"}[r],Fi=r=>r&&{[g.HttpConnectionType.HTTP1]:"http1",[g.HttpConnectionType.HTTP2]:"http2",[g.HttpConnectionType.QUIC]:"http3"}[r],sl=r=>{if(r!==void 0)switch(r){case g.VideoFormat.MPEG:return"mp4";case g.VideoFormat.DASH_LIVE:return"dash";case g.VideoFormat.DASH_SEP:return"dash_sep";case g.VideoFormat.DASH_ONDEMAND:return"ondemand_dash";case g.VideoFormat.DASH_WEBM:case g.VideoFormat.DASH_LIVE_WEBM:return"webm";case g.VideoFormat.DASH_WEBM_AV1:return"av1";case g.VideoFormat.DASH_LIVE_CMAF:return"ondemand_dash_live";case g.VideoFormat.HLS:case g.VideoFormat.HLS_LIVE:return"hls";case g.VideoFormat.HLS_ONDEMAND:return"ondemand_hls";case g.VideoFormat.HLS_LIVE_CMAF:return"ondemand_hls_live";case g.VideoFormat.WEB_RTC_LIVE:return"webrtc";default:return(0,ji.assertNever)(r)}},$r=r=>{if(r!==void 0)switch(r){case g.Surface.NONE:case g.Surface.INLINE:return;case g.Surface.FULLSCREEN:return"fullscreen";case g.Surface.SECOND_SCREEN:return"chromecast";case g.Surface.PIP:return"pip";case g.Surface.INVISIBLE:return"invisible";default:return(0,ji.assertNever)(r)}},ul=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var Mr=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var cl=()=>Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0"),ll=()=>Math.floor(Math.random()*18446744073709552e3).toString(36).padStart(13,"0");var Bi=require("@vkontakte/videoplayer-core"),b=require("@vkontakte/videoplayer-shared"),fl=(r,e)=>new b.Observable(t=>{let i=new b.Subscription,o=(0,b.merge)((0,b.fromEvent)(window,"beforeunload"),r.events.willDestruct$),a=new b.ValueSubject(void 0),u;i.add(r.info.isLive$.pipe((0,b.filterChanged)()).subscribe(K=>{u&&(u.unsubscribe(),a.next(void 0)),K?u=r.info.liveTime$.pipe((0,b.map)(Br=>Br&&Br/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:l,paused$:f}=r.events,d=r.events.willSeek$.pipe((0,b.filter)(()=>r.info.playbackState$.getValue()===Bi.PlaybackState.PLAYING)),s=r.events.seeked$.pipe((0,b.filter)(()=>r.info.playbackState$.getValue()===Bi.PlaybackState.PLAYING)),c=!1,v=new b.Subject;i.add(d.subscribe(()=>{c||v.next(),c=!0})),i.add(s.subscribe(()=>c=!1));let p=new b.Subject,m=new b.Subject,y=(0,b.merge)(l,s,p),E=(0,b.merge)(f,v,o,r.events.looped$,m),S,q=()=>S=a.getValue(),pl=()=>{let K=a.getValue();(0,b.isNullable)(S)||S===K||(0,b.isNullable)(K)||(t.next({from:S,to:K}),S=void 0)},vl=()=>{m.next(),p.next()};if(i.add(y.subscribe(q)),i.add(E.subscribe(pl)),e.forceInterval&&isFinite(e.forceInterval)){let K=0;i.add(y.subscribe(()=>K=window.setTimeout(vl,e.forceInterval))),i.add(E.subscribe(()=>window.clearTimeout(K)))}return i});var bb="_one-stat_",Ui=`${bb}uuid`,Vi=()=>{let r=new h.Subscription;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},jr=class{constructor(e,t){this.subscription=new h.Subscription;this.debugLogger=new Fr.Logger;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new h.ValueSubject(void 0);this.isid$=new h.ValueSubject(void 0);this.seekAction$=new h.ValueSubject("unknown");var f,d,s;this.statContext=e,this.config=aa((f=t.config)!=null?f:{}),(0,h.isNonNullable)(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new Mr);let i=new h.Subject;this.experimental={error$:i};let o=h.safeStorage.get(Ui);o?o.startsWith('"')&&o.endsWith('"')?(this.uuid=(0,dl.default)(o,'"',""),h.safeStorage.set(Ui,this.uuid)):this.uuid=o:(this.uuid=qt(),h.safeStorage.set(Ui,this.uuid)),this.resetViewSession(),t.useIsid&&this.isid$.next((d=t.isid)!=null?d:ll());let a=new Ve({apiKey:ol,config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new Fe({config:this.config,apiTransport:a,refreshAuthToken:t.refreshAuthToken,mobile:(s=this.statContext.mobile)!=null?s:!1,uuid:this.uuid,error$:i}),this.logger=new Dr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:u,host:l}=(0,Fr.detectEmbed)();this.isEmbed=u,this.embedParent=l,this.subscribe()}updateContext(e){this.statContext=W(W({},this.statContext),e)}attachTo(e){let t=new h.Subscription,i=(s,c)=>t.add(s.subscribe(c));i(e.events.willStart$,()=>{let s=e.info.position$.getValue();this.logActionPlay({position:s}),this.statContext.projectId&&this.logActionPlayInteractive({position:s})}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(fl(e,{forceInterval:this.config.watchCoverageInterval}),s=>{let c=e.info.isLive$.getValue(),v={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};c?this.logWatchCoverageLive(v):this.logWatchCoverageRecord(v)});let o;i(e.info.isStalled$,s=>{s?o=(0,h.now)():((0,h.isNonNullable)(o)&&this.logEmptyBuffer({duration:(0,h.now)()-o}),o=void 0)});let a=!1;t.add(e.events.fatalError$.pipe((0,h.once)()).subscribe(()=>a=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let c=(0,h.isNonNullable)(o)?(0,h.now)()-o:void 0;this.logCloseAtEmptyBuffer({duration:c!=null?c:0}),o=void 0}else a||this.logActionStop()}),i(e.events.managedError$,({id:s})=>{this.logError({fatal:!1,errorType:s})}),i(e.events.fatalError$,({id:s})=>{this.logError({fatal:!0,errorType:s})});let u,l,f=!1;i(e.events.firstBytes$,s=>{u=(0,h.now)(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>l=(0,h.now)()),i(e.info.currentBuffer$,s=>{!f&&s&&s.end-s.start>0&&(0,h.isNonNullable)(u)&&(this.logPlayerReady({duration:(0,h.now)()-u}),f=!0)}),i(e.events.firstFrame$,()=>{(0,h.isNonNullable)(u)&&!f&&(this.logPlayerReady({duration:(0,h.now)()-u}),f=!0),(0,h.isNonNullable)(l)&&this.logFirstFrame({time:(0,h.now)()-l})}),i(e.info.atLiveEdge$,s=>this.updateContext({liveEdge:s})),i((0,h.combine)({muted:e.info.muted$,volume:e.info.volume$}),({muted:s,volume:c})=>this.updateContext({audible:!s&&c>0})),i(e.info.currentQuality$,s=>this.updateContext({quality:al(s)})),i(e.info.isAutoQualityEnabled$,s=>this.updateContext({autoQuality:s})),i(e.info.currentFormat$,s=>this.updateContext({contentType:sl(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let d;return i(e.info.hostname$,s=>{let c=d!==void 0&&d!==s;this.updateContext({cdnHostname:s,failover:c}),c&&this.logFailover(s),d=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:Fi(s)}),this.updateContext({connectionType:Fi(s)})}),i(e.info.httpConnectionReused$,s=>{(0,h.isNullable)(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:s}),this.updateContext({connectionReused:s})}),i(e.info.surface$,s=>this.updateContext({mode:$r(s)})),i((0,h.combine)({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:c})=>{let v=c.find(({id:m})=>m===s),p=v&&(v.isAuto?`${v.language}_auto`:v.language);this.updateContext({subtitles:p})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Vi();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let a=o?"pip":$r((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.inFullscreen$,o=>{var u;let a=o?"fullscreen":$r((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Vi();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Vi();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(cl())}getDeviceId(){return this.uuid}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`})}logWatchCoverageLive(e){var a,u;let t=(u=(a=this.timeSynchronisation)==null?void 0:a.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add((0,h.merge)((0,h.fromEvent)(e,"change"),(0,h.observableFrom)(["init"])).subscribe(()=>this.updateContext({network:ul(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=(0,h.fromEvent)(window,"beforeunload").subscribe(()=>this.logger.flush(!0)),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(e){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(Math.round(e.position))},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if(this.config.disabledOperations.includes(e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var p,m;let a=(m=(p=this.timeSynchronisation)==null?void 0:p.now())!=null?m:(0,h.now)(),u=this.vsid$.getValue();(0,h.assertNonNullable)(u);let l=this.isid$.getValue(),f=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,d=this.statContext.firstConnectionReused,s,c;if(this.isEmbed){s=this.embedParent;let y=[...new URLSearchParams(location.search).entries()].filter(([E,S])=>this.config.embedUrlParams.includes(E));c=new URLSearchParams(y).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(s=new URL(this.statContext.refDomain||document.referrer).hostname),c=location.href.substring(0,1024));let v=W({vsid:u,isid:l,vid:this.statContext.movieId,ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:f,connection_reused:d===!0?1:d===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:s,direct_url:c,rate:this.statContext.rate===1||(0,h.isNullable)(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId},o);for(let y of this.config.disabledCustomFields)delete v[y];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:a,custom:v}}};
|
package/es2015.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.51-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.51-dev.acdd69a1.0
|
|
3
|
+
* Tue, 09 Jul 2024 06:52:19 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-51/doc/
|
|
5
5
|
*/
|
|
6
6
|
var _l=Object.create;var $r=Object.defineProperty,xl=Object.defineProperties,Rl=Object.getOwnPropertyDescriptor,wl=Object.getOwnPropertyDescriptors,Al=Object.getOwnPropertyNames,Qi=Object.getOwnPropertySymbols,Cl=Object.getPrototypeOf,Ji=Object.prototype.hasOwnProperty,Nl=Object.prototype.propertyIsEnumerable;var Yi=(r,e,t)=>e in r?$r(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,V=(r,e)=>{for(var t in e||(e={}))Ji.call(e,t)&&Yi(r,t,e[t]);if(Qi)for(var t of Qi(e))Nl.call(e,t)&&Yi(r,t,e[t]);return r},Ve=(r,e)=>xl(r,wl(e));var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ll=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Al(e))!Ji.call(r,o)&&o!==t&&$r(r,o,{get:()=>e[o],enumerable:!(i=Rl(e,o))||i.enumerable});return r};var Mr=(r,e,t)=>(t=r!=null?_l(Cl(r)):{},Ll(e||!r||!r.__esModule?$r(t,"default",{value:r,enumerable:!0}):t,r));var L=(r,e,t)=>new Promise((i,o)=>{var a=f=>{try{l(t.next(f))}catch(d){o(d)}},u=f=>{try{l(t.throw(f))}catch(d){o(d)}},l=f=>f.done?i(f.value):Promise.resolve(f.value).then(a,u);l((t=t.apply(r,e)).next())});var Xi=n(()=>{"use strict"});var Zi=n(()=>{"use strict"});var I=n((eo,ro)=>{"use strict";var Ge=function(r){return r&&r.Math==Math&&r};ro.exports=Ge(typeof globalThis=="object"&&globalThis)||Ge(typeof window=="object"&&window)||Ge(typeof self=="object"&&self)||Ge(typeof global=="object"&&global)||function(){return this}()||eo||Function("return this")()});var T=n((Zb,to)=>{"use strict";to.exports=function(r){try{return!!r()}catch(e){return!0}}});var ye=n((ey,io)=>{"use strict";var kl=T();io.exports=!kl(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var jr=n((ry,so)=>{"use strict";var Dl=ye(),ao=Function.prototype,oo=ao.apply,no=ao.call;so.exports=typeof Reflect=="object"&&Reflect.apply||(Dl?no.bind(oo):function(){return no.apply(oo,arguments)})});var q=n((ty,lo)=>{"use strict";var uo=ye(),co=Function.prototype,Fr=co.call,$l=uo&&co.bind.bind(Fr,Fr);lo.exports=uo?$l:function(r){return function(){return Fr.apply(r,arguments)}}});var Z=n((iy,po)=>{"use strict";var fo=q(),Ml=fo({}.toString),jl=fo("".slice);po.exports=function(r){return jl(Ml(r),8,-1)}});var Br=n((oy,vo)=>{"use strict";var Fl=Z(),Bl=q();vo.exports=function(r){if(Fl(r)==="Function")return Bl(r)}});var Vr=n((ny,ho)=>{"use strict";var Ur=typeof document=="object"&&document.all,Ul=typeof Ur=="undefined"&&Ur!==void 0;ho.exports={all:Ur,IS_HTMLDDA:Ul}});var b=n((ay,mo)=>{"use strict";var go=Vr(),Vl=go.all;mo.exports=go.IS_HTMLDDA?function(r){return typeof r=="function"||r===Vl}:function(r){return typeof r=="function"}});var k=n((sy,bo)=>{"use strict";var Gl=T();bo.exports=!Gl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var P=n((uy,yo)=>{"use strict";var Kl=ye(),Ke=Function.prototype.call;yo.exports=Kl?Ke.bind(Ke):function(){return Ke.apply(Ke,arguments)}});var qo=n(Eo=>{"use strict";var So={}.propertyIsEnumerable,Io=Object.getOwnPropertyDescriptor,Wl=Io&&!So.call({1:2},1);Eo.f=Wl?function(e){var t=Io(this,e);return!!t&&t.enumerable}:So});var Se=n((ly,Po)=>{"use strict";Po.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var Oo=n((fy,To)=>{"use strict";var Hl=q(),zl=T(),Ql=Z(),Gr=Object,Yl=Hl("".split);To.exports=zl(function(){return!Gr("z").propertyIsEnumerable(0)})?function(r){return Ql(r)=="String"?Yl(r,""):Gr(r)}:Gr});var ee=n((dy,_o)=>{"use strict";_o.exports=function(r){return r==null}});var We=n((py,xo)=>{"use strict";var Jl=ee(),Xl=TypeError;xo.exports=function(r){if(Jl(r))throw Xl("Can't call method on "+r);return r}});var re=n((vy,Ro)=>{"use strict";var Zl=Oo(),ef=We();Ro.exports=function(r){return Zl(ef(r))}});var D=n((hy,Co)=>{"use strict";var wo=b(),Ao=Vr(),rf=Ao.all;Co.exports=Ao.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:wo(r)||r===rf}:function(r){return typeof r=="object"?r!==null:wo(r)}});var He=n((gy,No)=>{"use strict";No.exports={}});var M=n((my,ko)=>{"use strict";var Kr=He(),Wr=I(),tf=b(),Lo=function(r){return tf(r)?r:void 0};ko.exports=function(r,e){return arguments.length<2?Lo(Kr[r])||Lo(Wr[r]):Kr[r]&&Kr[r][e]||Wr[r]&&Wr[r][e]}});var Ie=n((by,Do)=>{"use strict";var of=q();Do.exports=of({}.isPrototypeOf)});var Ee=n((yy,$o)=>{"use strict";$o.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var zr=n((Sy,Vo)=>{"use strict";var Uo=I(),Hr=Ee(),Mo=Uo.process,jo=Uo.Deno,Fo=Mo&&Mo.versions||jo&&jo.version,Bo=Fo&&Fo.v8,x,ze;Bo&&(x=Bo.split("."),ze=x[0]>0&&x[0]<4?1:+(x[0]+x[1]));!ze&&Hr&&(x=Hr.match(/Edge\/(\d+)/),(!x||x[1]>=74)&&(x=Hr.match(/Chrome\/(\d+)/),x&&(ze=+x[1])));Vo.exports=ze});var Qr=n((Iy,Ko)=>{"use strict";var Go=zr(),nf=T(),af=I(),sf=af.String;Ko.exports=!!Object.getOwnPropertySymbols&&!nf(function(){var r=Symbol();return!sf(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Go&&Go<41})});var Yr=n((Ey,Wo)=>{"use strict";var uf=Qr();Wo.exports=uf&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Jr=n((qy,Ho)=>{"use strict";var cf=M(),lf=b(),ff=Ie(),df=Yr(),pf=Object;Ho.exports=df?function(r){return typeof r=="symbol"}:function(r){var e=cf("Symbol");return lf(e)&&ff(e.prototype,pf(r))}});var qe=n((Py,zo)=>{"use strict";var vf=String;zo.exports=function(r){try{return vf(r)}catch(e){return"Object"}}});var j=n((Ty,Qo)=>{"use strict";var hf=b(),gf=qe(),mf=TypeError;Qo.exports=function(r){if(hf(r))return r;throw mf(gf(r)+" is not a function")}});var Pe=n((Oy,Yo)=>{"use strict";var bf=j(),yf=ee();Yo.exports=function(r,e){var t=r[e];return yf(t)?void 0:bf(t)}});var Xo=n((_y,Jo)=>{"use strict";var Xr=P(),Zr=b(),et=D(),Sf=TypeError;Jo.exports=function(r,e){var t,i;if(e==="string"&&Zr(t=r.toString)&&!et(i=Xr(t,r))||Zr(t=r.valueOf)&&!et(i=Xr(t,r))||e!=="string"&&Zr(t=r.toString)&&!et(i=Xr(t,r)))return i;throw Sf("Can't convert object to primitive value")}});var R=n((xy,Zo)=>{"use strict";Zo.exports=!0});var tn=n((Ry,rn)=>{"use strict";var en=I(),If=Object.defineProperty;rn.exports=function(r,e){try{If(en,r,{value:e,configurable:!0,writable:!0})}catch(t){en[r]=e}return e}});var Qe=n((wy,nn)=>{"use strict";var Ef=I(),qf=tn(),on="__core-js_shared__",Pf=Ef[on]||qf(on,{});nn.exports=Pf});var rt=n((Ay,sn)=>{"use strict";var Tf=R(),an=Qe();(sn.exports=function(r,e){return an[r]||(an[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:Tf?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var Ye=n((Cy,un)=>{"use strict";var Of=We(),_f=Object;un.exports=function(r){return _f(Of(r))}});var w=n((Ny,cn)=>{"use strict";var xf=q(),Rf=Ye(),wf=xf({}.hasOwnProperty);cn.exports=Object.hasOwn||function(e,t){return wf(Rf(e),t)}});var tt=n((Ly,ln)=>{"use strict";var Af=q(),Cf=0,Nf=Math.random(),Lf=Af(1 .toString);ln.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Lf(++Cf+Nf,36)}});var E=n((ky,dn)=>{"use strict";var kf=I(),Df=rt(),fn=w(),$f=tt(),Mf=Qr(),jf=Yr(),te=kf.Symbol,it=Df("wks"),Ff=jf?te.for||te:te&&te.withoutSetter||$f;dn.exports=function(r){return fn(it,r)||(it[r]=Mf&&fn(te,r)?te[r]:Ff("Symbol."+r)),it[r]}});var gn=n((Dy,hn)=>{"use strict";var Bf=P(),pn=D(),vn=Jr(),Uf=Pe(),Vf=Xo(),Gf=E(),Kf=TypeError,Wf=Gf("toPrimitive");hn.exports=function(r,e){if(!pn(r)||vn(r))return r;var t=Uf(r,Wf),i;if(t){if(e===void 0&&(e="default"),i=Bf(t,r,e),!pn(i)||vn(i))return i;throw Kf("Can't convert object to primitive value")}return e===void 0&&(e="number"),Vf(r,e)}});var Je=n(($y,mn)=>{"use strict";var Hf=gn(),zf=Jr();mn.exports=function(r){var e=Hf(r,"string");return zf(e)?e:e+""}});var Xe=n((My,yn)=>{"use strict";var Qf=I(),bn=D(),ot=Qf.document,Yf=bn(ot)&&bn(ot.createElement);yn.exports=function(r){return Yf?ot.createElement(r):{}}});var nt=n((jy,Sn)=>{"use strict";var Jf=k(),Xf=T(),Zf=Xe();Sn.exports=!Jf&&!Xf(function(){return Object.defineProperty(Zf("div"),"a",{get:function(){return 7}}).a!=7})});var at=n(En=>{"use strict";var ed=k(),rd=P(),td=qo(),id=Se(),od=re(),nd=Je(),ad=w(),sd=nt(),In=Object.getOwnPropertyDescriptor;En.f=ed?In:function(e,t){if(e=od(e),t=nd(t),sd)try{return In(e,t)}catch(i){}if(ad(e,t))return id(!rd(td.f,e,t),e[t])}});var st=n((By,qn)=>{"use strict";var ud=T(),cd=b(),ld=/#|\.prototype\./,Te=function(r,e){var t=dd[fd(r)];return t==vd?!0:t==pd?!1:cd(e)?ud(e):!!e},fd=Te.normalize=function(r){return String(r).replace(ld,".").toLowerCase()},dd=Te.data={},pd=Te.NATIVE="N",vd=Te.POLYFILL="P";qn.exports=Te});var Oe=n((Uy,Tn)=>{"use strict";var Pn=Br(),hd=j(),gd=ye(),md=Pn(Pn.bind);Tn.exports=function(r,e){return hd(r),e===void 0?r:gd?md(r,e):function(){return r.apply(e,arguments)}}});var ut=n((Vy,On)=>{"use strict";var bd=k(),yd=T();On.exports=bd&&yd(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var A=n((Gy,_n)=>{"use strict";var Sd=D(),Id=String,Ed=TypeError;_n.exports=function(r){if(Sd(r))return r;throw Ed(Id(r)+" is not an object")}});var K=n(Rn=>{"use strict";var qd=k(),Pd=nt(),Td=ut(),Ze=A(),xn=Je(),Od=TypeError,ct=Object.defineProperty,_d=Object.getOwnPropertyDescriptor,lt="enumerable",ft="configurable",dt="writable";Rn.f=qd?Td?function(e,t,i){if(Ze(e),t=xn(t),Ze(i),typeof e=="function"&&t==="prototype"&&"value"in i&&dt in i&&!i[dt]){var o=_d(e,t);o&&o[dt]&&(e[t]=i.value,i={configurable:ft in i?i[ft]:o[ft],enumerable:lt in i?i[lt]:o[lt],writable:!1})}return ct(e,t,i)}:ct:function(e,t,i){if(Ze(e),t=xn(t),Ze(i),Pd)try{return ct(e,t,i)}catch(o){}if("get"in i||"set"in i)throw Od("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var W=n((Wy,wn)=>{"use strict";var xd=k(),Rd=K(),wd=Se();wn.exports=xd?function(r,e,t){return Rd.f(r,e,wd(1,t))}:function(r,e,t){return r[e]=t,r}});var C=n((Hy,Cn)=>{"use strict";var er=I(),Ad=jr(),Cd=Br(),Nd=b(),Ld=at().f,kd=st(),ie=He(),Dd=Oe(),oe=W(),An=w(),$d=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return Ad(r,this,arguments)};return e.prototype=r.prototype,e};Cn.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,a=r.proto,u=i?er:o?er[t]:(er[t]||{}).prototype,l=i?ie:ie[t]||oe(ie,t,{})[t],f=l.prototype,d,s,c,v,p,h,g,y,m;for(v in e)d=kd(i?v:t+(o?".":"#")+v,r.forced),s=!d&&u&&An(u,v),h=l[v],s&&(r.dontCallGetSet?(m=Ld(u,v),g=m&&m.value):g=u[v]),p=s&&g?g:e[v],!(s&&typeof h==typeof p)&&(r.bind&&s?y=Dd(p,er):r.wrap&&s?y=$d(p):a&&Nd(p)?y=Cd(p):y=p,(r.sham||p&&p.sham||h&&h.sham)&&oe(y,"sham",!0),oe(l,v,y),a&&(c=t+"Prototype",An(ie,c)||oe(ie,c,{}),oe(ie[c],v,p),r.real&&f&&(d||!f[v])&&oe(f,v,p)))}});var Ln=n((zy,Nn)=>{"use strict";var Md=D(),jd=Z(),Fd=E(),Bd=Fd("match");Nn.exports=function(r){var e;return Md(r)&&((e=r[Bd])!==void 0?!!e:jd(r)=="RegExp")}});var rr=n((Qy,Dn)=>{"use strict";var Ud=E(),Vd=Ud("toStringTag"),kn={};kn[Vd]="z";Dn.exports=String(kn)==="[object z]"});var ne=n((Yy,$n)=>{"use strict";var Gd=rr(),Kd=b(),tr=Z(),Wd=E(),Hd=Wd("toStringTag"),zd=Object,Qd=tr(function(){return arguments}())=="Arguments",Yd=function(r,e){try{return r[e]}catch(t){}};$n.exports=Gd?tr:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=Yd(e=zd(r),Hd))=="string"?t:Qd?tr(e):(i=tr(e))=="Object"&&Kd(e.callee)?"Arguments":i}});var jn=n((Jy,Mn)=>{"use strict";var Jd=ne(),Xd=String;Mn.exports=function(r){if(Jd(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Xd(r)}});var Bn=n((Xy,Fn)=>{"use strict";var Zd=A();Fn.exports=function(){var r=Zd(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Gn=n((Zy,Vn)=>{"use strict";var ep=P(),rp=w(),tp=Ie(),ip=Bn(),Un=RegExp.prototype;Vn.exports=function(r){var e=r.flags;return e===void 0&&!("flags"in Un)&&!rp(r,"flags")&&tp(Un,r)?ep(ip,r):e}});var Wn=n((eS,Kn)=>{"use strict";var ht=q(),op=Ye(),np=Math.floor,pt=ht("".charAt),ap=ht("".replace),vt=ht("".slice),sp=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,up=/\$([$&'`]|\d{1,2})/g;Kn.exports=function(r,e,t,i,o,a){var u=t+r.length,l=i.length,f=up;return o!==void 0&&(o=op(o),f=sp),ap(a,f,function(d,s){var c;switch(pt(s,0)){case"$":return"$";case"&":return r;case"`":return vt(e,0,t);case"'":return vt(e,u);case"<":c=o[vt(s,1,-1)];break;default:var v=+s;if(v===0)return d;if(v>l){var p=np(v/10);return p===0?d:p<=l?i[p-1]===void 0?pt(s,1):i[p-1]+pt(s,1):d}c=i[v-1]}return c===void 0?"":c})}});var Jn=n(()=>{"use strict";var cp=C(),lp=P(),gt=q(),Hn=We(),fp=b(),dp=ee(),pp=Ln(),ae=jn(),vp=Pe(),hp=Gn(),gp=Wn(),mp=E(),bp=R(),yp=mp("replace"),Sp=TypeError,Yn=gt("".indexOf),Ip=gt("".replace),zn=gt("".slice),Ep=Math.max,Qn=function(r,e,t){return t>r.length?-1:e===""?t:Yn(r,e,t)};cp({target:"String",proto:!0},{replaceAll:function(e,t){var i=Hn(this),o,a,u,l,f,d,s,c,v,p=0,h=0,g="";if(!dp(e)){if(o=pp(e),o&&(a=ae(Hn(hp(e))),!~Yn(a,"g")))throw Sp("`.replaceAll` does not allow non-global regexes");if(u=vp(e,yp),u)return lp(u,e,i,t);if(bp&&o)return Ip(ae(i),e,t)}for(l=ae(i),f=ae(e),d=fp(t),d||(t=ae(t)),s=f.length,c=Ep(1,s),p=Qn(l,f,0);p!==-1;)v=d?ae(t(f,p,l)):gp(f,l,p,[],void 0,t),g+=zn(l,h,p)+v,h=p+s,p=Qn(l,f,p+c);return h<l.length&&(g+=zn(l,h)),g}})});var mt=n((iS,Xn)=>{"use strict";var qp=M();Xn.exports=qp});var ea=n((oS,Zn)=>{"use strict";Xi();Zi();Jn();var Pp=mt();Zn.exports=Pp("String","replaceAll")});var ta=n((nS,ra)=>{"use strict";var Tp=ea();ra.exports=Tp});var oa=n((aS,ia)=>{"use strict";var Op=ta();ia.exports=Op});var fa=n(()=>{"use strict"});var xe=n((gS,da)=>{"use strict";var Rp=Z();da.exports=typeof process!="undefined"&&Rp(process)=="process"});var se=n((mS,pa)=>{"use strict";var wp=W();pa.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:wp(r,e,t),r}});var ha=n((bS,va)=>{"use strict";var Ap=q(),Cp=j();va.exports=function(r,e,t){try{return Ap(Cp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var ma=n((yS,ga)=>{"use strict";var Np=b(),Lp=String,kp=TypeError;ga.exports=function(r){if(typeof r=="object"||Np(r))return r;throw kp("Can't set "+Lp(r)+" as a prototype")}});var qt=n((SS,ba)=>{"use strict";var Dp=ha(),$p=A(),Mp=ma();ba.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=Dp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,a){return $p(o),Mp(a),r?t(o,a):o.__proto__=a,o}}():void 0)});var Sa=n((IS,ya)=>{"use strict";var jp=rr(),Fp=ne();ya.exports=jp?{}.toString:function(){return"[object "+Fp(this)+"]"}});var ir=n((ES,Ea)=>{"use strict";var Bp=rr(),Up=K().f,Vp=W(),Gp=w(),Kp=Sa(),Wp=E(),Ia=Wp("toStringTag");Ea.exports=function(r,e,t,i){if(r){var o=t?r:r.prototype;Gp(o,Ia)||Up(o,Ia,{configurable:!0,value:e}),i&&!Bp&&Vp(o,"toString",Kp)}}});var Pa=n((qS,qa)=>{"use strict";var Hp=K();qa.exports=function(r,e,t){return Hp.f(r,e,t)}});var _a=n((PS,Oa)=>{"use strict";var zp=M(),Qp=Pa(),Yp=E(),Jp=k(),Ta=Yp("species");Oa.exports=function(r){var e=zp(r);Jp&&e&&!e[Ta]&&Qp(e,Ta,{configurable:!0,get:function(){return this}})}});var Ra=n((TS,xa)=>{"use strict";var Xp=Ie(),Zp=TypeError;xa.exports=function(r,e){if(Xp(e,r))return r;throw Zp("Incorrect invocation")}});var Tt=n((OS,wa)=>{"use strict";var ev=q(),rv=b(),Pt=Qe(),tv=ev(Function.toString);rv(Pt.inspectSource)||(Pt.inspectSource=function(r){return tv(r)});wa.exports=Pt.inspectSource});var Da=n((_S,ka)=>{"use strict";var iv=q(),ov=T(),Aa=b(),nv=ne(),av=M(),sv=Tt(),Ca=function(){},uv=[],Na=av("Reflect","construct"),Ot=/^\s*(?:class|function)\b/,cv=iv(Ot.exec),lv=!Ot.exec(Ca),Re=function(e){if(!Aa(e))return!1;try{return Na(Ca,uv,e),!0}catch(t){return!1}},La=function(e){if(!Aa(e))return!1;switch(nv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return lv||!!cv(Ot,sv(e))}catch(t){return!0}};La.sham=!0;ka.exports=!Na||ov(function(){var r;return Re(Re.call)||!Re(Object)||!Re(function(){r=!0})||r})?La:Re});var Ma=n((xS,$a)=>{"use strict";var fv=Da(),dv=qe(),pv=TypeError;$a.exports=function(r){if(fv(r))return r;throw pv(dv(r)+" is not a constructor")}});var _t=n((RS,Fa)=>{"use strict";var ja=A(),vv=Ma(),hv=ee(),gv=E(),mv=gv("species");Fa.exports=function(r,e){var t=ja(r).constructor,i;return t===void 0||hv(i=ja(t)[mv])?e:vv(i)}});var xt=n((wS,Ba)=>{"use strict";var bv=M();Ba.exports=bv("document","documentElement")});var Va=n((AS,Ua)=>{"use strict";var yv=q();Ua.exports=yv([].slice)});var Ka=n((CS,Ga)=>{"use strict";var Sv=TypeError;Ga.exports=function(r,e){if(r<e)throw Sv("Not enough arguments");return r}});var Rt=n((NS,Wa)=>{"use strict";var Iv=Ee();Wa.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(Iv)});var Mt=n((LS,rs)=>{"use strict";var O=I(),Ev=jr(),qv=Oe(),Ha=b(),Pv=w(),es=T(),za=xt(),Tv=Va(),Qa=Xe(),Ov=Ka(),_v=Rt(),xv=xe(),kt=O.setImmediate,Dt=O.clearImmediate,Rv=O.process,wt=O.Dispatch,wv=O.Function,Ya=O.MessageChannel,Av=O.String,At=0,we={},Ja="onreadystatechange",Ae,H,Ct,Nt;es(function(){Ae=O.location});var $t=function(r){if(Pv(we,r)){var e=we[r];delete we[r],e()}},Lt=function(r){return function(){$t(r)}},Xa=function(r){$t(r.data)},Za=function(r){O.postMessage(Av(r),Ae.protocol+"//"+Ae.host)};(!kt||!Dt)&&(kt=function(e){Ov(arguments.length,1);var t=Ha(e)?e:wv(e),i=Tv(arguments,1);return we[++At]=function(){Ev(t,void 0,i)},H(At),At},Dt=function(e){delete we[e]},xv?H=function(r){Rv.nextTick(Lt(r))}:wt&&wt.now?H=function(r){wt.now(Lt(r))}:Ya&&!_v?(Ct=new Ya,Nt=Ct.port2,Ct.port1.onmessage=Xa,H=qv(Nt.postMessage,Nt)):O.addEventListener&&Ha(O.postMessage)&&!O.importScripts&&Ae&&Ae.protocol!=="file:"&&!es(Za)?(H=Za,O.addEventListener("message",Xa,!1)):Ja in Qa("script")?H=function(r){za.appendChild(Qa("script"))[Ja]=function(){za.removeChild(this),$t(r)}}:H=function(r){setTimeout(Lt(r),0)});rs.exports={set:kt,clear:Dt}});var jt=n((kS,is)=>{"use strict";var ts=function(){this.head=null,this.tail=null};ts.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};is.exports=ts});var ns=n((DS,os)=>{"use strict";var Cv=Ee();os.exports=/ipad|iphone|ipod/i.test(Cv)&&typeof Pebble!="undefined"});var ss=n(($S,as)=>{"use strict";var Nv=Ee();as.exports=/web0s(?!.*chrome)/i.test(Nv)});var hs=n((MS,vs)=>{"use strict";var z=I(),us=Oe(),Lv=at().f,Ft=Mt().set,kv=jt(),Dv=Rt(),$v=ns(),Mv=ss(),Bt=xe(),cs=z.MutationObserver||z.WebKitMutationObserver,ls=z.document,fs=z.process,or=z.Promise,ds=Lv(z,"queueMicrotask"),Gt=ds&&ds.value,ue,Ut,Vt,nr,ps;Gt||(Ce=new kv,Ne=function(){var r,e;for(Bt&&(r=fs.domain)&&r.exit();e=Ce.get();)try{e()}catch(t){throw Ce.head&&ue(),t}r&&r.enter()},!Dv&&!Bt&&!Mv&&cs&&ls?(Ut=!0,Vt=ls.createTextNode(""),new cs(Ne).observe(Vt,{characterData:!0}),ue=function(){Vt.data=Ut=!Ut}):!$v&&or&&or.resolve?(nr=or.resolve(void 0),nr.constructor=or,ps=us(nr.then,nr),ue=function(){ps(Ne)}):Bt?ue=function(){fs.nextTick(Ne)}:(Ft=us(Ft,z),ue=function(){Ft(Ne)}),Gt=function(r){Ce.head||ue(),Ce.add(r)});var Ce,Ne;vs.exports=Gt});var ms=n((jS,gs)=>{"use strict";gs.exports=function(r,e){try{arguments.length==1?console.error(r):console.error(r,e)}catch(t){}}});var ar=n((FS,bs)=>{"use strict";bs.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var Is=n((BS,Ss)=>{"use strict";var jv=I(),Fv=b(),ys=jv.WeakMap;Ss.exports=Fv(ys)&&/native code/.test(String(ys))});var sr=n((US,qs)=>{"use strict";var Bv=rt(),Uv=tt(),Es=Bv("keys");qs.exports=function(r){return Es[r]||(Es[r]=Uv(r))}});var ur=n((VS,Ps)=>{"use strict";Ps.exports={}});var zt=n((GS,_s)=>{"use strict";var Vv=Is(),Os=I(),Gv=D(),Kv=W(),Kt=w(),Wt=Qe(),Wv=sr(),Hv=ur(),Ts="Object already initialized",Ht=Os.TypeError,zv=Os.WeakMap,cr,Le,lr,Qv=function(r){return lr(r)?Le(r):cr(r,{})},Yv=function(r){return function(e){var t;if(!Gv(e)||(t=Le(e)).type!==r)throw Ht("Incompatible receiver, "+r+" required");return t}};Vv||Wt.state?(N=Wt.state||(Wt.state=new zv),N.get=N.get,N.has=N.has,N.set=N.set,cr=function(r,e){if(N.has(r))throw Ht(Ts);return e.facade=r,N.set(r,e),e},Le=function(r){return N.get(r)||{}},lr=function(r){return N.has(r)}):(Q=Wv("state"),Hv[Q]=!0,cr=function(r,e){if(Kt(r,Q))throw Ht(Ts);return e.facade=r,Kv(r,Q,e),e},Le=function(r){return Kt(r,Q)?r[Q]:{}},lr=function(r){return Kt(r,Q)});var N,Q;_s.exports={set:cr,get:Le,has:lr,enforce:Qv,getterFor:Yv}});var Y=n((KS,xs)=>{"use strict";var Jv=I();xs.exports=Jv.Promise});var Qt=n((WS,Rs)=>{"use strict";Rs.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var As=n((HS,ws)=>{"use strict";var Xv=Qt(),Zv=xe();ws.exports=!Xv&&!Zv&&typeof window=="object"&&typeof document=="object"});var ce=n((zS,Ls)=>{"use strict";var eh=I(),ke=Y(),rh=b(),th=st(),ih=Tt(),oh=E(),nh=As(),ah=Qt(),sh=R(),Yt=zr(),Cs=ke&&ke.prototype,uh=oh("species"),Jt=!1,Ns=rh(eh.PromiseRejectionEvent),ch=th("Promise",function(){var r=ih(ke),e=r!==String(ke);if(!e&&Yt===66||sh&&!(Cs.catch&&Cs.finally))return!0;if(!Yt||Yt<51||!/native code/.test(r)){var t=new ke(function(a){a(1)}),i=function(a){a(function(){},function(){})},o=t.constructor={};if(o[uh]=i,Jt=t.then(function(){})instanceof i,!Jt)return!0}return!e&&(nh||ah)&&!Ns});Ls.exports={CONSTRUCTOR:ch,REJECTION_EVENT:Ns,SUBCLASSING:Jt}});var le=n((QS,Ds)=>{"use strict";var ks=j(),lh=TypeError,fh=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw lh("Bad Promise constructor");e=i,t=o}),this.resolve=ks(e),this.reject=ks(t)};Ds.exports.f=function(r){return new fh(r)}});var ru=n(()=>{"use strict";var dh=C(),ph=R(),vr=xe(),G=I(),ve=P(),$s=se(),Ms=qt(),vh=ir(),hh=_a(),gh=j(),pr=b(),mh=D(),bh=Ra(),yh=_t(),Vs=Mt().set,ti=hs(),Sh=ms(),Ih=ar(),Eh=jt(),Gs=zt(),hr=Y(),ii=ce(),Ks=le(),gr="Promise",Ws=ii.CONSTRUCTOR,qh=ii.REJECTION_EVENT,Ph=ii.SUBCLASSING,Xt=Gs.getterFor(gr),Th=Gs.set,fe=hr&&hr.prototype,J=hr,fr=fe,Hs=G.TypeError,Zt=G.document,oi=G.process,ei=Ks.f,Oh=ei,_h=!!(Zt&&Zt.createEvent&&G.dispatchEvent),zs="unhandledrejection",xh="rejectionhandled",js=0,Qs=1,Rh=2,ni=1,Ys=2,dr,Fs,wh,Bs,Js=function(r){var e;return mh(r)&&pr(e=r.then)?e:!1},Xs=function(r,e){var t=e.value,i=e.state==Qs,o=i?r.ok:r.fail,a=r.resolve,u=r.reject,l=r.domain,f,d,s;try{o?(i||(e.rejection===Ys&&Ch(e),e.rejection=ni),o===!0?f=t:(l&&l.enter(),f=o(t),l&&(l.exit(),s=!0)),f===r.promise?u(Hs("Promise-chain cycle")):(d=Js(f))?ve(d,f,a,u):a(f)):u(t)}catch(c){l&&!s&&l.exit(),u(c)}},Zs=function(r,e){r.notified||(r.notified=!0,ti(function(){for(var t=r.reactions,i;i=t.get();)Xs(i,r);r.notified=!1,e&&!r.rejection&&Ah(r)}))},eu=function(r,e,t){var i,o;_h?(i=Zt.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),G.dispatchEvent(i)):i={promise:e,reason:t},!qh&&(o=G["on"+r])?o(i):r===zs&&Sh("Unhandled promise rejection",t)},Ah=function(r){ve(Vs,G,function(){var e=r.facade,t=r.value,i=Us(r),o;if(i&&(o=Ih(function(){vr?oi.emit("unhandledRejection",t,e):eu(zs,e,t)}),r.rejection=vr||Us(r)?Ys:ni,o.error))throw o.value})},Us=function(r){return r.rejection!==ni&&!r.parent},Ch=function(r){ve(Vs,G,function(){var e=r.facade;vr?oi.emit("rejectionHandled",e):eu(xh,e,r.value)})},de=function(r,e,t){return function(i){r(e,i,t)}},pe=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Rh,Zs(r,!0))},ri=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Hs("Promise can't be resolved itself");var i=Js(e);i?ti(function(){var o={done:!1};try{ve(i,e,de(ri,o,r),de(pe,o,r))}catch(a){pe(o,a,r)}}):(r.value=e,r.state=Qs,Zs(r,!1))}catch(o){pe({done:!1},o,r)}}};if(Ws&&(J=function(e){bh(this,fr),gh(e),ve(dr,this);var t=Xt(this);try{e(de(ri,t),de(pe,t))}catch(i){pe(t,i)}},fr=J.prototype,dr=function(e){Th(this,{type:gr,done:!1,notified:!1,parent:!1,reactions:new Eh,rejection:!1,state:js,value:void 0})},dr.prototype=$s(fr,"then",function(e,t){var i=Xt(this),o=ei(yh(this,J));return i.parent=!0,o.ok=pr(e)?e:!0,o.fail=pr(t)&&t,o.domain=vr?oi.domain:void 0,i.state==js?i.reactions.add(o):ti(function(){Xs(o,i)}),o.promise}),Fs=function(){var r=new dr,e=Xt(r);this.promise=r,this.resolve=de(ri,e),this.reject=de(pe,e)},Ks.f=ei=function(r){return r===J||r===wh?new Fs(r):Oh(r)},!ph&&pr(hr)&&fe!==Object.prototype)){Bs=fe.then,Ph||$s(fe,"then",function(e,t){var i=this;return new J(function(o,a){ve(Bs,i,o,a)}).then(e,t)},{unsafe:!0});try{delete fe.constructor}catch(r){}Ms&&Ms(fe,fr)}dh({global:!0,constructor:!0,wrap:!0,forced:Ws},{Promise:J});vh(J,gr,!1,!0);hh(gr)});var X=n((XS,tu)=>{"use strict";tu.exports={}});var ou=n((ZS,iu)=>{"use strict";var Nh=E(),Lh=X(),kh=Nh("iterator"),Dh=Array.prototype;iu.exports=function(r){return r!==void 0&&(Lh.Array===r||Dh[kh]===r)}});var au=n((eI,nu)=>{"use strict";var $h=Math.ceil,Mh=Math.floor;nu.exports=Math.trunc||function(e){var t=+e;return(t>0?Mh:$h)(t)}});var ai=n((rI,su)=>{"use strict";var jh=au();su.exports=function(r){var e=+r;return e!==e||e===0?0:jh(e)}});var cu=n((tI,uu)=>{"use strict";var Fh=ai(),Bh=Math.min;uu.exports=function(r){return r>0?Bh(Fh(r),9007199254740991):0}});var si=n((iI,lu)=>{"use strict";var Uh=cu();lu.exports=function(r){return Uh(r.length)}});var ui=n((oI,du)=>{"use strict";var Vh=ne(),fu=Pe(),Gh=ee(),Kh=X(),Wh=E(),Hh=Wh("iterator");du.exports=function(r){if(!Gh(r))return fu(r,Hh)||fu(r,"@@iterator")||Kh[Vh(r)]}});var vu=n((nI,pu)=>{"use strict";var zh=P(),Qh=j(),Yh=A(),Jh=qe(),Xh=ui(),Zh=TypeError;pu.exports=function(r,e){var t=arguments.length<2?Xh(r):e;if(Qh(t))return Yh(zh(t,r));throw Zh(Jh(r)+" is not iterable")}});var mu=n((aI,gu)=>{"use strict";var eg=P(),hu=A(),rg=Pe();gu.exports=function(r,e,t){var i,o;hu(r);try{if(i=rg(r,"return"),!i){if(e==="throw")throw t;return t}i=eg(i,r)}catch(a){o=!0,i=a}if(e==="throw")throw t;if(o)throw i;return hu(i),t}});var br=n((sI,Iu)=>{"use strict";var tg=Oe(),ig=P(),og=A(),ng=qe(),ag=ou(),sg=si(),bu=Ie(),ug=vu(),cg=ui(),yu=mu(),lg=TypeError,mr=function(r,e){this.stopped=r,this.result=e},Su=mr.prototype;Iu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),f=tg(e,i),d,s,c,v,p,h,g,y=function(S){return d&&yu(d,"normal",S),new mr(!0,S)},m=function(S){return o?(og(S),l?f(S[0],S[1],y):f(S[0],S[1])):l?f(S,y):f(S)};if(a)d=r.iterator;else if(u)d=r;else{if(s=cg(r),!s)throw lg(ng(r)+" is not iterable");if(ag(s)){for(c=0,v=sg(r);v>c;c++)if(p=m(r[c]),p&&bu(Su,p))return p;return new mr(!1)}d=ug(r,s)}for(h=a?r.next:d.next;!(g=ig(h,d)).done;){try{p=m(g.value)}catch(S){yu(d,"throw",S)}if(typeof p=="object"&&p&&bu(Su,p))return p}return new mr(!1)}});var Ou=n((uI,Tu)=>{"use strict";var fg=E(),qu=fg("iterator"),Pu=!1;try{Eu=0,ci={next:function(){return{done:!!Eu++}},return:function(){Pu=!0}},ci[qu]=function(){return this},Array.from(ci,function(){throw 2})}catch(r){}var Eu,ci;Tu.exports=function(r,e){if(!e&&!Pu)return!1;var t=!1;try{var i={};i[qu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var li=n((cI,_u)=>{"use strict";var dg=Y(),pg=Ou(),vg=ce().CONSTRUCTOR;_u.exports=vg||!pg(function(r){dg.all(r).then(void 0,function(){})})});var xu=n(()=>{"use strict";var hg=C(),gg=P(),mg=j(),bg=le(),yg=ar(),Sg=br(),Ig=li();hg({target:"Promise",stat:!0,forced:Ig},{all:function(e){var t=this,i=bg.f(t),o=i.resolve,a=i.reject,u=yg(function(){var l=mg(t.resolve),f=[],d=0,s=1;Sg(e,function(c){var v=d++,p=!1;s++,gg(l,t,c).then(function(h){p||(p=!0,f[v]=h,--s||o(f))},a)}),--s||o(f)});return u.error&&a(u.value),i.promise}})});var wu=n(()=>{"use strict";var Eg=C(),qg=R(),Pg=ce().CONSTRUCTOR,di=Y(),Tg=M(),Og=b(),_g=se(),Ru=di&&di.prototype;Eg({target:"Promise",proto:!0,forced:Pg,real:!0},{catch:function(r){return this.then(void 0,r)}});!qg&&Og(di)&&(fi=Tg("Promise").prototype.catch,Ru.catch!==fi&&_g(Ru,"catch",fi,{unsafe:!0}));var fi});var Au=n(()=>{"use strict";var xg=C(),Rg=P(),wg=j(),Ag=le(),Cg=ar(),Ng=br(),Lg=li();xg({target:"Promise",stat:!0,forced:Lg},{race:function(e){var t=this,i=Ag.f(t),o=i.reject,a=Cg(function(){var u=wg(t.resolve);Ng(e,function(l){Rg(u,t,l).then(i.resolve,o)})});return a.error&&o(a.value),i.promise}})});var Cu=n(()=>{"use strict";var kg=C(),Dg=P(),$g=le(),Mg=ce().CONSTRUCTOR;kg({target:"Promise",stat:!0,forced:Mg},{reject:function(e){var t=$g.f(this);return Dg(t.reject,void 0,e),t.promise}})});var pi=n((bI,Nu)=>{"use strict";var jg=A(),Fg=D(),Bg=le();Nu.exports=function(r,e){if(jg(r),Fg(e)&&e.constructor===r)return e;var t=Bg.f(r),i=t.resolve;return i(e),t.promise}});var Du=n(()=>{"use strict";var Ug=C(),Vg=M(),Lu=R(),Gg=Y(),ku=ce().CONSTRUCTOR,Kg=pi(),Wg=Vg("Promise"),Hg=Lu&&!ku;Ug({target:"Promise",stat:!0,forced:Lu||ku},{resolve:function(e){return Kg(Hg&&this===Wg?Gg:this,e)}})});var $u=n(()=>{"use strict";ru();xu();wu();Au();Cu();Du()});var Bu=n(()=>{"use strict";var zg=C(),Qg=R(),yr=Y(),Yg=T(),ju=M(),Fu=b(),Jg=_t(),Mu=pi(),Xg=se(),hi=yr&&yr.prototype,Zg=!!yr&&Yg(function(){hi.finally.call({then:function(){}},function(){})});zg({target:"Promise",proto:!0,real:!0,forced:Zg},{finally:function(r){var e=Jg(this,ju("Promise")),t=Fu(r);return this.then(t?function(i){return Mu(e,r()).then(function(){return i})}:r,t?function(i){return Mu(e,r()).then(function(){throw i})}:r)}});!Qg&&Fu(yr)&&(vi=ju("Promise").prototype.finally,hi.finally!==vi&&Xg(hi,"finally",vi,{unsafe:!0}));var vi});var Vu=n((TI,Uu)=>{"use strict";fa();$u();Bu();var em=mt();Uu.exports=em("Promise","finally")});var Ku=n((OI,Gu)=>{"use strict";var rm=Vu();Gu.exports=rm});var Hu=n((_I,Wu)=>{"use strict";var tm=Ku();Wu.exports=tm});var Qu=n((xI,zu)=>{"use strict";zu.exports=function(){}});var Xu=n((RI,Ju)=>{"use strict";var gi=k(),im=w(),Yu=Function.prototype,om=gi&&Object.getOwnPropertyDescriptor,mi=im(Yu,"name"),nm=mi&&function(){}.name==="something",am=mi&&(!gi||gi&&om(Yu,"name").configurable);Ju.exports={EXISTS:mi,PROPER:nm,CONFIGURABLE:am}});var ec=n((wI,Zu)=>{"use strict";var sm=ai(),um=Math.max,cm=Math.min;Zu.exports=function(r,e){var t=sm(r);return t<0?um(t+e,0):cm(t,e)}});var ic=n((AI,tc)=>{"use strict";var lm=re(),fm=ec(),dm=si(),rc=function(r){return function(e,t,i){var o=lm(e),a=dm(o),u=fm(i,a),l;if(r&&t!=t){for(;a>u;)if(l=o[u++],l!=l)return!0}else for(;a>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};tc.exports={includes:rc(!0),indexOf:rc(!1)}});var ac=n((CI,nc)=>{"use strict";var pm=q(),bi=w(),vm=re(),hm=ic().indexOf,gm=ur(),oc=pm([].push);nc.exports=function(r,e){var t=vm(r),i=0,o=[],a;for(a in t)!bi(gm,a)&&bi(t,a)&&oc(o,a);for(;e.length>i;)bi(t,a=e[i++])&&(~hm(o,a)||oc(o,a));return o}});var yi=n((NI,sc)=>{"use strict";sc.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var cc=n((LI,uc)=>{"use strict";var mm=ac(),bm=yi();uc.exports=Object.keys||function(e){return mm(e,bm)}});var fc=n(lc=>{"use strict";var ym=k(),Sm=ut(),Im=K(),Em=A(),qm=re(),Pm=cc();lc.f=ym&&!Sm?Object.defineProperties:function(e,t){Em(e);for(var i=qm(t),o=Pm(t),a=o.length,u=0,l;a>u;)Im.f(e,l=o[u++],i[l]);return e}});var qi=n((DI,bc)=>{"use strict";var Tm=A(),Om=fc(),dc=yi(),_m=ur(),xm=xt(),Rm=Xe(),wm=sr(),pc=">",vc="<",Ii="prototype",Ei="script",gc=wm("IE_PROTO"),Si=function(){},mc=function(r){return vc+Ei+pc+r+vc+"/"+Ei+pc},hc=function(r){r.write(mc("")),r.close();var e=r.parentWindow.Object;return r=null,e},Am=function(){var r=Rm("iframe"),e="java"+Ei+":",t;return r.style.display="none",xm.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(mc("document.F=Object")),t.close(),t.F},Sr,Ir=function(){try{Sr=new ActiveXObject("htmlfile")}catch(e){}Ir=typeof document!="undefined"?document.domain&&Sr?hc(Sr):Am():hc(Sr);for(var r=dc.length;r--;)delete Ir[Ii][dc[r]];return Ir()};_m[gc]=!0;bc.exports=Object.create||function(e,t){var i;return e!==null?(Si[Ii]=Tm(e),i=new Si,Si[Ii]=null,i[gc]=e):i=Ir(),t===void 0?i:Om.f(i,t)}});var Sc=n(($I,yc)=>{"use strict";var Cm=T();yc.exports=!Cm(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Ti=n((MI,Ec)=>{"use strict";var Nm=w(),Lm=b(),km=Ye(),Dm=sr(),$m=Sc(),Ic=Dm("IE_PROTO"),Pi=Object,Mm=Pi.prototype;Ec.exports=$m?Pi.getPrototypeOf:function(r){var e=km(r);if(Nm(e,Ic))return e[Ic];var t=e.constructor;return Lm(t)&&e instanceof t?t.prototype:e instanceof Pi?Mm:null}});var Ri=n((jI,Tc)=>{"use strict";var jm=T(),Fm=b(),Bm=D(),Um=qi(),qc=Ti(),Vm=se(),Gm=E(),Km=R(),xi=Gm("iterator"),Pc=!1,F,Oi,_i;[].keys&&(_i=[].keys(),"next"in _i?(Oi=qc(qc(_i)),Oi!==Object.prototype&&(F=Oi)):Pc=!0);var Wm=!Bm(F)||jm(function(){var r={};return F[xi].call(r)!==r});Wm?F={}:Km&&(F=Um(F));Fm(F[xi])||Vm(F,xi,function(){return this});Tc.exports={IteratorPrototype:F,BUGGY_SAFARI_ITERATORS:Pc}});var _c=n((FI,Oc)=>{"use strict";var Hm=Ri().IteratorPrototype,zm=qi(),Qm=Se(),Ym=ir(),Jm=X(),Xm=function(){return this};Oc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=zm(Hm,{next:Qm(+!i,t)}),Ym(r,o,!1,!0),Jm[o]=Xm,r}});var Mc=n((BI,$c)=>{"use strict";var Zm=C(),eb=P(),Er=R(),kc=Xu(),rb=b(),tb=_c(),xc=Ti(),Rc=qt(),ib=ir(),ob=W(),wi=se(),nb=E(),wc=X(),Dc=Ri(),ab=kc.PROPER,sb=kc.CONFIGURABLE,Ac=Dc.IteratorPrototype,qr=Dc.BUGGY_SAFARI_ITERATORS,De=nb("iterator"),Cc="keys",$e="values",Nc="entries",Lc=function(){return this};$c.exports=function(r,e,t,i,o,a,u){tb(t,e,i);var l=function(m){if(m===o&&v)return v;if(!qr&&m in s)return s[m];switch(m){case Cc:return function(){return new t(this,m)};case $e:return function(){return new t(this,m)};case Nc:return function(){return new t(this,m)}}return function(){return new t(this)}},f=e+" Iterator",d=!1,s=r.prototype,c=s[De]||s["@@iterator"]||o&&s[o],v=!qr&&c||l(o),p=e=="Array"&&s.entries||c,h,g,y;if(p&&(h=xc(p.call(new r)),h!==Object.prototype&&h.next&&(!Er&&xc(h)!==Ac&&(Rc?Rc(h,Ac):rb(h[De])||wi(h,De,Lc)),ib(h,f,!0,!0),Er&&(wc[f]=Lc))),ab&&o==$e&&c&&c.name!==$e&&(!Er&&sb?ob(s,"name",$e):(d=!0,v=function(){return eb(c,this)})),o)if(g={values:l($e),keys:a?v:l(Cc),entries:l(Nc)},u)for(y in g)(qr||d||!(y in s))&&wi(s,y,g[y]);else Zm({target:e,proto:!0,forced:qr||d},g);return(!Er||u)&&s[De]!==v&&wi(s,De,v,{name:o}),wc[e]=v,g}});var Fc=n((UI,jc)=>{"use strict";jc.exports=function(r,e){return{value:r,done:e}}});var Ci=n((VI,Kc)=>{"use strict";var ub=re(),Ai=Qu(),Bc=X(),Vc=zt(),cb=K().f,lb=Mc(),Pr=Fc(),fb=R(),db=k(),Gc="Array Iterator",pb=Vc.set,vb=Vc.getterFor(Gc);Kc.exports=lb(Array,"Array",function(r,e){pb(this,{type:Gc,target:ub(r),index:0,kind:e})},function(){var r=vb(this),e=r.target,t=r.kind,i=r.index++;return!e||i>=e.length?(r.target=void 0,Pr(void 0,!0)):t=="keys"?Pr(i,!1):t=="values"?Pr(e[i],!1):Pr([i,e[i]],!1)},"values");var Uc=Bc.Arguments=Bc.Array;Ai("keys");Ai("values");Ai("entries");if(!fb&&db&&Uc.name!=="values")try{cb(Uc,"name",{value:"values"})}catch(r){}});var Hc=n((GI,Wc)=>{"use strict";var hb=Je(),gb=K(),mb=Se();Wc.exports=function(r,e,t){var i=hb(e);i in r?gb.f(r,i,mb(0,t)):r[i]=t}});var zc=n(()=>{"use strict";var bb=C(),yb=br(),Sb=Hc();bb({target:"Object",stat:!0},{fromEntries:function(e){var t={};return yb(e,function(i,o){Sb(t,i,o)},{AS_ENTRIES:!0}),t}})});var Yc=n((HI,Qc)=>{"use strict";Ci();zc();var Ib=He();Qc.exports=Ib.Object.fromEntries});var Xc=n((zI,Jc)=>{"use strict";Jc.exports={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}});var rl=n(()=>{"use strict";Ci();var Eb=Xc(),qb=I(),Pb=ne(),Tb=W(),Zc=X(),Ob=E(),el=Ob("toStringTag");for(Tr in Eb)Ni=qb[Tr],Or=Ni&&Ni.prototype,Or&&Pb(Or)!==el&&Tb(Or,el,Tr),Zc[Tr]=Zc.Array;var Ni,Or,Tr});var il=n((JI,tl)=>{"use strict";var _b=Yc();rl();tl.exports=_b});var nl=n((XI,ol)=>{"use strict";var xb=il();ol.exports=xb});var Pl=Mr(oa(),1);var _e=(a=>(a.PROD="prod",a.VK_ALIAS="vk_alias",a.VIDEOTEST="videotest",a.TEST="test",a.AUTO="auto",a))(_e||{}),bt=(d=>(d.Q144P="mobile",d.Q240P="lowest",d.Q360P="low",d.Q480P="medium",d.Q720P="high",d.Q1080P="fullhd",d.Q1440P="quadhd",d.Q2160P="ultrahd",d.UNKNOWN="unknown",d))(bt||{}),yt=(p=>(p.MP4="mp4",p.DASH="dash",p.DASH_SEP="dash_sep",p.ONDEMAND_DASH="ondemand_dash",p.HLS="hls",p.ONDEMAND_HLS="ondemand_hls",p.WEBM="webm",p.AV1="av1",p.ONDEMAND_DASH_LIVE="ondemand_dash_live",p.ONDEMAND_HLS_LIVE="ondemand_hls_live",p.WEBRTC="webrtc",p.UNKNOWN="unknown",p.RTMP="rtmp",p))(yt||{});var St=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(St||{});var It=(l=>(l.SLIDER="slider",l.DOUBLE_TAP="double_tap",l.TIME_CODE="time_code",l.EPISODE="episode",l.REWIND="rewind",l.LIVE="live",l.UNKNOWN="unknown",l))(It||{}),na=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(na||{}),aa={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo"},sa={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},ua={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},ca={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};import{fillWithDefault as _p}from"@vkontakte/videoplayer-shared";var xp={apiEnv:"vk_alias",requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:[],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},la=r=>_p(r,xp);function Et(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}import{assertNonNullable as Fb,combine as Il,fromEvent as El,isNonNullable as be,isNullable as ql,merge as Bb,now as B,observableFrom as Ub,once as Vb,safeStorage as Vi,Subject as Gb,Subscription as Hi,ValueSubject as Gi}from"@vkontakte/videoplayer-shared";import{Logger as Kb,detectEmbed as Wb}from"@vkontakte/videoplayer-shared";var xr=Mr(Hu(),1);var al=Mr(nl(),1);var sl=r=>{var o;let{operation:e,custom:t}=r,i=(0,al.default)(Object.entries(t).map(([a,u])=>{var d,s,c;let l=(d=sa[a])!=null?d:a,f=u;return u&&(a==="mode"?f=(s=ca[u])!=null?s:u:a==="quality"&&(f=(c=ua[u])!=null?c:u)),[l,f]}));return Ve(V({},r),{operation:(o=aa[e])!=null?o:e,custom:i})};var _r="__VERSION__",ul="CIOPGQJGDIHBABABA",Li={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",auto:""};import{ValueSubject as Rb,getExponentialDelay as wb,ErrorCategory as he}from"@vkontakte/videoplayer-shared";var Me=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new Rb(!1);this.params=e}authorize(e){return L(this,null,function*(){return this.authToken=e!=null?e:yield this.refreshAuthToken(),this._authorizeWithBackoff()})}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e)}logRequest(e){return L(this,null,function*(){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:yield this._authorizeWithBackoff();if(!o)return;let a=(d,...s)=>L(this,[d,...s],function*(l,f=this.params.config.requestRetryCount){try{return yield this.params.apiTransport.sendRequest(t,i,o)}catch(c){if(!c||!("error_code"in c)){this.params.error$.next({id:"logRequestUnknown",category:he.NETWORK,message:`Unknown ${t} error`,thrown:c});return}let v=c==null?void 0:c.error_code;switch(v){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=yield this._authorizeWithBackoff(),f>0?a(l,f-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=yield this.refreshAuthToken(),this.sessionKey=yield this._authorizeWithBackoff(),f>0?a(l,f-1):void 0;default:{this.params.error$.next({id:`LogRequest#${v}`,category:he.EXTERNAL_API,message:`${t} error`,data:c});return}}}});return a(e)})}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}refreshAuthToken(){return L(this,null,function*(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,xr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise})}createLogParams(e){return{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${_r}`,platform:this.params.mobile?"M_WEB":"WEB",items:this.params.config.shorten?e.map(sl):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=wb(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,xr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:he.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}_authorize(){return L(this,null,function*(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.uuid,client_version:_r.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,xr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:he.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(i=>L(this,null,function*(){this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=yield this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:he.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:he.NETWORK,message:"authorize error",thrown:i})})),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise})}};var Rr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,a=i.length;o<a;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,a=i.length;o<a;o++){let u=i[o];try{u.callback.call(this,e)}catch(l){Promise.resolve().then(()=>{throw l})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},ge=class extends Rr{constructor(){super(),this.listeners||Rr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}},je=class{constructor(){Object.defineProperty(this,"signal",{value:new ge,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(o){typeof document!="undefined"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let i=e;if(i===void 0)if(typeof document=="undefined")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(o){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(je.prototype[Symbol.toStringTag]="AbortController",ge.prototype[Symbol.toStringTag]="AbortSignal");function wr(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function ki(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!wr({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(d,s){let c;s&&s.signal&&(c=s.signal,delete s.signal);let v=new t(d,s);return c&&Object.defineProperty(v,"signal",{writable:!1,enumerable:!1,configurable:!0,value:c}),v},a.prototype=t.prototype);let u=e;return{fetch:(f,d)=>{let s=a&&a.prototype.isPrototypeOf(f)?f.signal:d?d.signal:void 0;if(s){let c;try{c=new DOMException("Aborted","AbortError")}catch(p){c=new Error("Aborted"),c.name="AbortError"}if(s.aborted)return Promise.reject(c);let v=new Promise((p,h)=>{s.addEventListener("abort",()=>h(c),{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([v,u(f,d)])}return u(f,d)},Request:a}}var Fe=wr({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),cl=Fe?ki({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Di=Fe?cl.fetch:window.fetch,IE=Fe?cl.Request:window.Request,EE=Fe?je:window.AbortController,qE=Fe?ge:window.AbortSignal;import{ErrorCategory as Ar,now as $i}from"@vkontakte/videoplayer-shared";var Be=class{constructor(e){this.params=e,this.apiKey=e.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=Li[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}resolveApiBaseUrl(){return L(this,null,function*(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=yield(yield Di(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),a=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!a)throw new Error("Wrong DNS response");return a}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:Ar.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),Li.vk_alias}finally{this.isApiBaseUrlFetched=!0}})}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),a=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,a)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:Ar.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}sendRequest(e,t,i){return L(this,null,function*(){let o=$i(),a=u=>{if(u instanceof TypeError&&["Failed to fetch","NetworkError when attempting to fetch resource."].includes(u.message)){this.params.error$.next({id:"Network",category:Ar.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:Ar.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:$i()-o}})};return this.apiBaseUrl=yield this.resolveApiBaseUrl(),Di(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var s,c;let l=Number(u.headers.get("content-length"))===0,f=new Date((s=u.headers.get("date"))!=null?s:"").getTime(),d=$i()-o;if(isFinite(f)&&((c=this.timeSynchronisation)==null||c.addServerTime(f,d)),!l)return u.json().then(v=>Object.prototype.hasOwnProperty.call(v,"error_msg")?Promise.reject(v):v,a)},a)})}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),Object.entries(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};import{ErrorCategory as Ab,now as Cb,safeStorage as Ue,debounceFn as ll}from"@vkontakte/videoplayer-shared";var Cr="onestat_events",Mi=r=>e=>e.timestamp+r>=Cb(),Nr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return["action_play","watch_coverage_record","watch_coverage_live"].includes(t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=ll(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=Ue.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=ll(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){var e;try{this.flush()}catch(t){this.error$.next({id:"LoggerError",category:Ab.WTF,message:(e=String(t))!=null?e:"Unknown logger error",thrown:t})}}readFromStorage(){let e=Ue.get(Cr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var a;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((a=t[this.userSalt])!=null?a:[]).filter(Mi(this.params.config.storageExpiration));Ue.set(Cr,JSON.stringify(Ve(V({},t),{[this.userSalt]:[...o,e]})))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(Mi(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],Ue.set(Cr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of Object.entries(e)){let o=i.filter(Mi(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}Ue.set(Cr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush(e=!1){let t=this.getFromStorage();t.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${t.length} events through beacon`}),this.api.logBeacon(t)):(this.loggerDebugLog({message:`Flushing ${t.length} events`}),this.api.logRequest(t)),this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};import{HttpConnectionType as ji,Surface as me,VideoFormat as _,VideoQuality as $}from"@vkontakte/videoplayer-core";import{assertNever as fl}from"@vkontakte/videoplayer-shared";var dl=r=>r&&{[$.INVARIANT]:"unknown",[$.Q_144P]:"mobile",[$.Q_240P]:"lowest",[$.Q_360P]:"low",[$.Q_480P]:"medium",[$.Q_720P]:"high",[$.Q_1080P]:"fullhd",[$.Q_1440P]:"quadhd",[$.Q_2160P]:"ultrahd",[$.Q_4320P]:"unknown"}[r],Fi=r=>r&&{[ji.HTTP1]:"http1",[ji.HTTP2]:"http2",[ji.QUIC]:"http3"}[r],pl=r=>{if(r!==void 0)switch(r){case _.MPEG:return"mp4";case _.DASH_LIVE:return"dash";case _.DASH_SEP:return"dash_sep";case _.DASH_ONDEMAND:return"ondemand_dash";case _.DASH_WEBM:case _.DASH_LIVE_WEBM:return"webm";case _.DASH_WEBM_AV1:return"av1";case _.DASH_LIVE_CMAF:return"ondemand_dash_live";case _.HLS:case _.HLS_LIVE:return"hls";case _.HLS_ONDEMAND:return"ondemand_hls";case _.HLS_LIVE_CMAF:return"ondemand_hls_live";case _.WEB_RTC_LIVE:return"webrtc";default:return fl(r)}},Lr=r=>{if(r!==void 0)switch(r){case me.NONE:case me.INLINE:return;case me.FULLSCREEN:return"fullscreen";case me.SECOND_SCREEN:return"chromecast";case me.PIP:return"pip";case me.INVISIBLE:return"invisible";default:return fl(r)}},vl=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var kr=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var hl=()=>Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0"),gl=()=>Math.floor(Math.random()*18446744073709552e3).toString(36).padStart(13,"0");import{PlaybackState as ml}from"@vkontakte/videoplayer-core";import{filter as bl,filterChanged as Lb,fromEvent as kb,isNullable as yl,map as Db,merge as Bi,Observable as $b,Subject as Ui,Subscription as Mb,ValueSubject as jb}from"@vkontakte/videoplayer-shared";var Sl=(r,e)=>new $b(t=>{let i=new Mb,o=Bi(kb(window,"beforeunload"),r.events.willDestruct$),a=new jb(void 0),u;i.add(r.info.isLive$.pipe(Lb()).subscribe(U=>{u&&(u.unsubscribe(),a.next(void 0)),U?u=r.info.liveTime$.pipe(Db(Dr=>Dr&&Dr/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:l,paused$:f}=r.events,d=r.events.willSeek$.pipe(bl(()=>r.info.playbackState$.getValue()===ml.PLAYING)),s=r.events.seeked$.pipe(bl(()=>r.info.playbackState$.getValue()===ml.PLAYING)),c=!1,v=new Ui;i.add(d.subscribe(()=>{c||v.next(),c=!0})),i.add(s.subscribe(()=>c=!1));let p=new Ui,h=new Ui,g=Bi(l,s,p),y=Bi(f,v,o,r.events.looped$,h),m,S=()=>m=a.getValue(),Tl=()=>{let U=a.getValue();yl(m)||m===U||yl(U)||(t.next({from:m,to:U}),m=void 0)},Ol=()=>{h.next(),p.next()};if(i.add(g.subscribe(S)),i.add(y.subscribe(Tl)),e.forceInterval&&isFinite(e.forceInterval)){let U=0;i.add(g.subscribe(()=>U=window.setTimeout(Ol,e.forceInterval))),i.add(y.subscribe(()=>window.clearTimeout(U)))}return i});var Hb="_one-stat_",Ki=`${Hb}uuid`,Wi=()=>{let r=new Hi;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},zi=class{constructor(e,t){this.subscription=new Hi;this.debugLogger=new Kb;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new Gi(void 0);this.isid$=new Gi(void 0);this.seekAction$=new Gi("unknown");var f,d,s;this.statContext=e,this.config=la((f=t.config)!=null?f:{}),be(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new kr);let i=new Gb;this.experimental={error$:i};let o=Vi.get(Ki);o?o.startsWith('"')&&o.endsWith('"')?(this.uuid=(0,Pl.default)(o,'"',""),Vi.set(Ki,this.uuid)):this.uuid=o:(this.uuid=Et(),Vi.set(Ki,this.uuid)),this.resetViewSession(),t.useIsid&&this.isid$.next((d=t.isid)!=null?d:gl());let a=new Be({apiKey:ul,config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new Me({config:this.config,apiTransport:a,refreshAuthToken:t.refreshAuthToken,mobile:(s=this.statContext.mobile)!=null?s:!1,uuid:this.uuid,error$:i}),this.logger=new Nr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:u,host:l}=Wb();this.isEmbed=u,this.embedParent=l,this.subscribe()}updateContext(e){this.statContext=V(V({},this.statContext),e)}attachTo(e){let t=new Hi,i=(s,c)=>t.add(s.subscribe(c));i(e.events.willStart$,()=>{let s=e.info.position$.getValue();this.logActionPlay({position:s}),this.statContext.projectId&&this.logActionPlayInteractive({position:s})}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(Sl(e,{forceInterval:this.config.watchCoverageInterval}),s=>{let c=e.info.isLive$.getValue(),v={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};c?this.logWatchCoverageLive(v):this.logWatchCoverageRecord(v)});let o;i(e.info.isStalled$,s=>{s?o=B():(be(o)&&this.logEmptyBuffer({duration:B()-o}),o=void 0)});let a=!1;t.add(e.events.fatalError$.pipe(Vb()).subscribe(()=>a=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let c=be(o)?B()-o:void 0;this.logCloseAtEmptyBuffer({duration:c!=null?c:0}),o=void 0}else a||this.logActionStop()}),i(e.events.managedError$,({id:s})=>{this.logError({fatal:!1,errorType:s})}),i(e.events.fatalError$,({id:s})=>{this.logError({fatal:!0,errorType:s})});let u,l,f=!1;i(e.events.firstBytes$,s=>{u=B(),this.logFirstBytes({time:s})}),i(e.events.willStart$,()=>l=B()),i(e.info.currentBuffer$,s=>{!f&&s&&s.end-s.start>0&&be(u)&&(this.logPlayerReady({duration:B()-u}),f=!0)}),i(e.events.firstFrame$,()=>{be(u)&&!f&&(this.logPlayerReady({duration:B()-u}),f=!0),be(l)&&this.logFirstFrame({time:B()-l})}),i(e.info.atLiveEdge$,s=>this.updateContext({liveEdge:s})),i(Il({muted:e.info.muted$,volume:e.info.volume$}),({muted:s,volume:c})=>this.updateContext({audible:!s&&c>0})),i(e.info.currentQuality$,s=>this.updateContext({quality:dl(s)})),i(e.info.isAutoQualityEnabled$,s=>this.updateContext({autoQuality:s})),i(e.info.currentFormat$,s=>this.updateContext({contentType:pl(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let d;return i(e.info.hostname$,s=>{let c=d!==void 0&&d!==s;this.updateContext({cdnHostname:s,failover:c}),c&&this.logFailover(s),d=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:Fi(s)}),this.updateContext({connectionType:Fi(s)})}),i(e.info.httpConnectionReused$,s=>{ql(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:s}),this.updateContext({connectionReused:s})}),i(e.info.surface$,s=>this.updateContext({mode:Lr(s)})),i(Il({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:c})=>{let v=c.find(({id:h})=>h===s),p=v&&(v.isAuto?`${v.language}_auto`:v.language);this.updateContext({subtitles:p})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Wi();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let a=o?"pip":Lr((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.inFullscreen$,o=>{var u;let a=o?"fullscreen":Lr((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:a})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Wi();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Wi();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(hl())}getDeviceId(){return this.uuid}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`})}logWatchCoverageLive(e){var a,u;let t=(u=(a=this.timeSynchronisation)==null?void 0:a.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add(Bb(El(e,"change"),Ub(["init"])).subscribe(()=>this.updateContext({network:vl(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=El(window,"beforeunload").subscribe(()=>this.logger.flush(!0)),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(e){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(Math.round(e.position))},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if(this.config.disabledOperations.includes(e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var p,h;let a=(h=(p=this.timeSynchronisation)==null?void 0:p.now())!=null?h:B(),u=this.vsid$.getValue();Fb(u);let l=this.isid$.getValue(),f=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,d=this.statContext.firstConnectionReused,s,c;if(this.isEmbed){s=this.embedParent;let g=[...new URLSearchParams(location.search).entries()].filter(([y,m])=>this.config.embedUrlParams.includes(y));c=new URLSearchParams(g).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(s=new URL(this.statContext.refDomain||document.referrer).hostname),c=location.href.substring(0,1024));let v=V({vsid:u,isid:l,vid:this.statContext.movieId,ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:f,connection_reused:d===!0?1:d===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:s,direct_url:c,rate:this.statContext.rate===1||ql(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId},o);for(let g of this.config.disabledCustomFields)delete v[g];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:a,custom:v}}};export{_e as ApiEnv,St as ConnectionType,yt as ContentType,na as InteractiveInterfaceClick,zi as OneStat,bt as Quality,It as SeekAction,_r as VERSION};
|
package/es2018.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.51-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.51-dev.acdd69a1.0
|
|
3
|
+
* Tue, 09 Jul 2024 06:52:19 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-51/doc/
|
|
5
5
|
*/
|
|
6
6
|
"use strict";var cl=Object.create;var Be=Object.defineProperty;var ll=Object.getOwnPropertyDescriptor;var fl=Object.getOwnPropertyNames;var dl=Object.getPrototypeOf,pl=Object.prototype.hasOwnProperty;var n=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),vl=(r,e)=>{for(var t in e)Be(r,t,{get:e[t],enumerable:!0})},Bi=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fl(e))!pl.call(r,o)&&o!==t&&Be(r,o,{get:()=>e[o],enumerable:!(i=ll(e,o))||i.enumerable});return r};var jr=(r,e,t)=>(t=r!=null?cl(dl(r)):{},Bi(e||!r||!r.__esModule?Be(t,"default",{value:r,enumerable:!0}):t,r)),hl=r=>Bi(Be({},"__esModule",{value:!0}),r);var Ui=n(()=>{"use strict"});var Vi=n(()=>{"use strict"});var P=n((Gi,Ki)=>{"use strict";var Ue=function(r){return r&&r.Math==Math&&r};Ki.exports=Ue(typeof globalThis=="object"&&globalThis)||Ue(typeof window=="object"&&window)||Ue(typeof self=="object"&&self)||Ue(typeof global=="object"&&global)||function(){return this}()||Gi||Function("return this")()});var x=n((mb,Wi)=>{"use strict";Wi.exports=function(r){try{return!!r()}catch(e){return!0}}});var be=n((bb,Hi)=>{"use strict";var gl=x();Hi.exports=!gl(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var Fr=n((yb,Ji)=>{"use strict";var ml=be(),Yi=Function.prototype,zi=Yi.apply,Qi=Yi.call;Ji.exports=typeof Reflect=="object"&&Reflect.apply||(ml?Qi.bind(zi):function(){return Qi.apply(zi,arguments)})});var O=n((Sb,eo)=>{"use strict";var Xi=be(),Zi=Function.prototype,Br=Zi.call,bl=Xi&&Zi.bind.bind(Br,Br);eo.exports=Xi?bl:function(r){return function(){return Br.apply(r,arguments)}}});var ee=n((Ib,to)=>{"use strict";var ro=O(),yl=ro({}.toString),Sl=ro("".slice);to.exports=function(r){return Sl(yl(r),8,-1)}});var Ur=n((Eb,io)=>{"use strict";var Il=ee(),El=O();io.exports=function(r){if(Il(r)==="Function")return El(r)}});var Gr=n((qb,oo)=>{"use strict";var Vr=typeof document=="object"&&document.all,ql=typeof Vr=="undefined"&&Vr!==void 0;oo.exports={all:Vr,IS_HTMLDDA:ql}});var I=n((Pb,ao)=>{"use strict";var no=Gr(),Pl=no.all;ao.exports=no.IS_HTMLDDA?function(r){return typeof r=="function"||r===Pl}:function(r){return typeof r=="function"}});var M=n((Tb,so)=>{"use strict";var Tl=x();so.exports=!Tl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var _=n((Ob,uo)=>{"use strict";var Ol=be(),Ve=Function.prototype.call;uo.exports=Ol?Ve.bind(Ve):function(){return Ve.apply(Ve,arguments)}});var po=n(fo=>{"use strict";var co={}.propertyIsEnumerable,lo=Object.getOwnPropertyDescriptor,_l=lo&&!co.call({1:2},1);fo.f=_l?function(e){var t=lo(this,e);return!!t&&t.enumerable}:co});var ye=n((xb,vo)=>{"use strict";vo.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var go=n((Rb,ho)=>{"use strict";var xl=O(),Rl=x(),wl=ee(),Kr=Object,Al=xl("".split);ho.exports=Rl(function(){return!Kr("z").propertyIsEnumerable(0)})?function(r){return wl(r)=="String"?Al(r,""):Kr(r)}:Kr});var re=n((wb,mo)=>{"use strict";mo.exports=function(r){return r==null}});var Ge=n((Ab,bo)=>{"use strict";var Cl=re(),Nl=TypeError;bo.exports=function(r){if(Cl(r))throw Nl("Can't call method on "+r);return r}});var te=n((Cb,yo)=>{"use strict";var Ll=go(),kl=Ge();yo.exports=function(r){return Ll(kl(r))}});var j=n((Nb,Eo)=>{"use strict";var So=I(),Io=Gr(),Dl=Io.all;Eo.exports=Io.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:So(r)||r===Dl}:function(r){return typeof r=="object"?r!==null:So(r)}});var Ke=n((Lb,qo)=>{"use strict";qo.exports={}});var F=n((kb,To)=>{"use strict";var Wr=Ke(),Hr=P(),$l=I(),Po=function(r){return $l(r)?r:void 0};To.exports=function(r,e){return arguments.length<2?Po(Wr[r])||Po(Hr[r]):Wr[r]&&Wr[r][e]||Hr[r]&&Hr[r][e]}});var Se=n((Db,Oo)=>{"use strict";var Ml=O();Oo.exports=Ml({}.isPrototypeOf)});var Ie=n(($b,_o)=>{"use strict";_o.exports=typeof navigator!="undefined"&&String(navigator.userAgent)||""});var Qr=n((Mb,No)=>{"use strict";var Co=P(),zr=Ie(),xo=Co.process,Ro=Co.Deno,wo=xo&&xo.versions||Ro&&Ro.version,Ao=wo&&wo.v8,A,We;Ao&&(A=Ao.split("."),We=A[0]>0&&A[0]<4?1:+(A[0]+A[1]));!We&&zr&&(A=zr.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=zr.match(/Chrome\/(\d+)/),A&&(We=+A[1])));No.exports=We});var Yr=n((jb,ko)=>{"use strict";var Lo=Qr(),jl=x(),Fl=P(),Bl=Fl.String;ko.exports=!!Object.getOwnPropertySymbols&&!jl(function(){var r=Symbol();return!Bl(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Lo&&Lo<41})});var Jr=n((Fb,Do)=>{"use strict";var Ul=Yr();Do.exports=Ul&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Xr=n((Bb,$o)=>{"use strict";var Vl=F(),Gl=I(),Kl=Se(),Wl=Jr(),Hl=Object;$o.exports=Wl?function(r){return typeof r=="symbol"}:function(r){var e=Vl("Symbol");return Gl(e)&&Kl(e.prototype,Hl(r))}});var Ee=n((Ub,Mo)=>{"use strict";var zl=String;Mo.exports=function(r){try{return zl(r)}catch(e){return"Object"}}});var B=n((Vb,jo)=>{"use strict";var Ql=I(),Yl=Ee(),Jl=TypeError;jo.exports=function(r){if(Ql(r))return r;throw Jl(Yl(r)+" is not a function")}});var qe=n((Gb,Fo)=>{"use strict";var Xl=B(),Zl=re();Fo.exports=function(r,e){var t=r[e];return Zl(t)?void 0:Xl(t)}});var Uo=n((Kb,Bo)=>{"use strict";var Zr=_(),et=I(),rt=j(),ef=TypeError;Bo.exports=function(r,e){var t,i;if(e==="string"&&et(t=r.toString)&&!rt(i=Zr(t,r))||et(t=r.valueOf)&&!rt(i=Zr(t,r))||e!=="string"&&et(t=r.toString)&&!rt(i=Zr(t,r)))return i;throw ef("Can't convert object to primitive value")}});var C=n((Wb,Vo)=>{"use strict";Vo.exports=!0});var Wo=n((Hb,Ko)=>{"use strict";var Go=P(),rf=Object.defineProperty;Ko.exports=function(r,e){try{rf(Go,r,{value:e,configurable:!0,writable:!0})}catch(t){Go[r]=e}return e}});var He=n((zb,zo)=>{"use strict";var tf=P(),of=Wo(),Ho="__core-js_shared__",nf=tf[Ho]||of(Ho,{});zo.exports=nf});var tt=n((Qb,Yo)=>{"use strict";var af=C(),Qo=He();(Yo.exports=function(r,e){return Qo[r]||(Qo[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.31.0",mode:af?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var ze=n((Yb,Jo)=>{"use strict";var sf=Ge(),uf=Object;Jo.exports=function(r){return uf(sf(r))}});var N=n((Jb,Xo)=>{"use strict";var cf=O(),lf=ze(),ff=cf({}.hasOwnProperty);Xo.exports=Object.hasOwn||function(e,t){return ff(lf(e),t)}});var it=n((Xb,Zo)=>{"use strict";var df=O(),pf=0,vf=Math.random(),hf=df(1 .toString);Zo.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+hf(++pf+vf,36)}});var T=n((Zb,rn)=>{"use strict";var gf=P(),mf=tt(),en=N(),bf=it(),yf=Yr(),Sf=Jr(),ie=gf.Symbol,ot=mf("wks"),If=Sf?ie.for||ie:ie&&ie.withoutSetter||bf;rn.exports=function(r){return en(ot,r)||(ot[r]=yf&&en(ie,r)?ie[r]:If("Symbol."+r)),ot[r]}});var an=n((ey,nn)=>{"use strict";var Ef=_(),tn=j(),on=Xr(),qf=qe(),Pf=Uo(),Tf=T(),Of=TypeError,_f=Tf("toPrimitive");nn.exports=function(r,e){if(!tn(r)||on(r))return r;var t=qf(r,_f),i;if(t){if(e===void 0&&(e="default"),i=Ef(t,r,e),!tn(i)||on(i))return i;throw Of("Can't convert object to primitive value")}return e===void 0&&(e="number"),Pf(r,e)}});var Qe=n((ry,sn)=>{"use strict";var xf=an(),Rf=Xr();sn.exports=function(r){var e=xf(r,"string");return Rf(e)?e:e+""}});var Ye=n((ty,cn)=>{"use strict";var wf=P(),un=j(),nt=wf.document,Af=un(nt)&&un(nt.createElement);cn.exports=function(r){return Af?nt.createElement(r):{}}});var at=n((iy,ln)=>{"use strict";var Cf=M(),Nf=x(),Lf=Ye();ln.exports=!Cf&&!Nf(function(){return Object.defineProperty(Lf("div"),"a",{get:function(){return 7}}).a!=7})});var st=n(dn=>{"use strict";var kf=M(),Df=_(),$f=po(),Mf=ye(),jf=te(),Ff=Qe(),Bf=N(),Uf=at(),fn=Object.getOwnPropertyDescriptor;dn.f=kf?fn:function(e,t){if(e=jf(e),t=Ff(t),Uf)try{return fn(e,t)}catch(i){}if(Bf(e,t))return Mf(!Df($f.f,e,t),e[t])}});var ut=n((ny,pn)=>{"use strict";var Vf=x(),Gf=I(),Kf=/#|\.prototype\./,Pe=function(r,e){var t=Hf[Wf(r)];return t==Qf?!0:t==zf?!1:Gf(e)?Vf(e):!!e},Wf=Pe.normalize=function(r){return String(r).replace(Kf,".").toLowerCase()},Hf=Pe.data={},zf=Pe.NATIVE="N",Qf=Pe.POLYFILL="P";pn.exports=Pe});var Te=n((ay,hn)=>{"use strict";var vn=Ur(),Yf=B(),Jf=be(),Xf=vn(vn.bind);hn.exports=function(r,e){return Yf(r),e===void 0?r:Jf?Xf(r,e):function(){return r.apply(e,arguments)}}});var ct=n((sy,gn)=>{"use strict";var Zf=M(),ed=x();gn.exports=Zf&&ed(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var L=n((uy,mn)=>{"use strict";var rd=j(),td=String,id=TypeError;mn.exports=function(r){if(rd(r))return r;throw id(td(r)+" is not an object")}});var W=n(yn=>{"use strict";var od=M(),nd=at(),ad=ct(),Je=L(),bn=Qe(),sd=TypeError,lt=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,ft="enumerable",dt="configurable",pt="writable";yn.f=od?ad?function(e,t,i){if(Je(e),t=bn(t),Je(i),typeof e=="function"&&t==="prototype"&&"value"in i&&pt in i&&!i[pt]){var o=ud(e,t);o&&o[pt]&&(e[t]=i.value,i={configurable:dt in i?i[dt]:o[dt],enumerable:ft in i?i[ft]:o[ft],writable:!1})}return lt(e,t,i)}:lt:function(e,t,i){if(Je(e),t=bn(t),Je(i),nd)try{return lt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw sd("Accessors not supported");return"value"in i&&(e[t]=i.value),e}});var H=n((ly,Sn)=>{"use strict";var cd=M(),ld=W(),fd=ye();Sn.exports=cd?function(r,e,t){return ld.f(r,e,fd(1,t))}:function(r,e,t){return r[e]=t,r}});var k=n((fy,En)=>{"use strict";var Xe=P(),dd=Fr(),pd=Ur(),vd=I(),hd=st().f,gd=ut(),oe=Ke(),md=Te(),ne=H(),In=N(),bd=function(r){var e=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new r;case 1:return new r(t);case 2:return new r(t,i)}return new r(t,i,o)}return dd(r,this,arguments)};return e.prototype=r.prototype,e};En.exports=function(r,e){var t=r.target,i=r.global,o=r.stat,s=r.proto,u=i?Xe:o?Xe[t]:(Xe[t]||{}).prototype,l=i?oe:oe[t]||ne(oe,t,{})[t],p=l.prototype,c,a,f,v,d,m,y,E,S;for(v in e)c=gd(i?v:t+(o?".":"#")+v,r.forced),a=!c&&u&&In(u,v),m=l[v],a&&(r.dontCallGetSet?(S=hd(u,v),y=S&&S.value):y=u[v]),d=a&&y?y:e[v],!(a&&typeof m==typeof d)&&(r.bind&&a?E=md(d,Xe):r.wrap&&a?E=bd(d):s&&vd(d)?E=pd(d):E=d,(r.sham||d&&d.sham||m&&m.sham)&&ne(E,"sham",!0),ne(l,v,E),s&&(f=t+"Prototype",In(oe,f)||ne(oe,f,{}),ne(oe[f],v,d),r.real&&p&&(c||!p[v])&&ne(p,v,d)))}});var Pn=n((dy,qn)=>{"use strict";var yd=j(),Sd=ee(),Id=T(),Ed=Id("match");qn.exports=function(r){var e;return yd(r)&&((e=r[Ed])!==void 0?!!e:Sd(r)=="RegExp")}});var Ze=n((py,On)=>{"use strict";var qd=T(),Pd=qd("toStringTag"),Tn={};Tn[Pd]="z";On.exports=String(Tn)==="[object z]"});var ae=n((vy,_n)=>{"use strict";var Td=Ze(),Od=I(),er=ee(),_d=T(),xd=_d("toStringTag"),Rd=Object,wd=er(function(){return arguments}())=="Arguments",Ad=function(r,e){try{return r[e]}catch(t){}};_n.exports=Td?er:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=Ad(e=Rd(r),xd))=="string"?t:wd?er(e):(i=er(e))=="Object"&&Od(e.callee)?"Arguments":i}});var Rn=n((hy,xn)=>{"use strict";var Cd=ae(),Nd=String;xn.exports=function(r){if(Cd(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Nd(r)}});var An=n((gy,wn)=>{"use strict";var Ld=L();wn.exports=function(){var r=Ld(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Ln=n((my,Nn)=>{"use strict";var kd=_(),Dd=N(),$d=Se(),Md=An(),Cn=RegExp.prototype;Nn.exports=function(r){var e=r.flags;return e===void 0&&!("flags"in Cn)&&!Dd(r,"flags")&&$d(Cn,r)?kd(Md,r):e}});var Dn=n((by,kn)=>{"use strict";var gt=O(),jd=ze(),Fd=Math.floor,vt=gt("".charAt),Bd=gt("".replace),ht=gt("".slice),Ud=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Vd=/\$([$&'`]|\d{1,2})/g;kn.exports=function(r,e,t,i,o,s){var u=t+r.length,l=i.length,p=Vd;return o!==void 0&&(o=jd(o),p=Ud),Bd(s,p,function(c,a){var f;switch(vt(a,0)){case"$":return"$";case"&":return r;case"`":return ht(e,0,t);case"'":return ht(e,u);case"<":f=o[ht(a,1,-1)];break;default:var v=+a;if(v===0)return c;if(v>l){var d=Fd(v/10);return d===0?c:d<=l?i[d-1]===void 0?vt(a,1):i[d-1]+vt(a,1):c}f=i[v-1]}return f===void 0?"":f})}});var Bn=n(()=>{"use strict";var Gd=k(),Kd=_(),mt=O(),$n=Ge(),Wd=I(),Hd=re(),zd=Pn(),se=Rn(),Qd=qe(),Yd=Ln(),Jd=Dn(),Xd=T(),Zd=C(),ep=Xd("replace"),rp=TypeError,Fn=mt("".indexOf),tp=mt("".replace),Mn=mt("".slice),ip=Math.max,jn=function(r,e,t){return t>r.length?-1:e===""?t:Fn(r,e,t)};Gd({target:"String",proto:!0},{replaceAll:function(e,t){var i=$n(this),o,s,u,l,p,c,a,f,v,d=0,m=0,y="";if(!Hd(e)){if(o=zd(e),o&&(s=se($n(Yd(e))),!~Fn(s,"g")))throw rp("`.replaceAll` does not allow non-global regexes");if(u=Qd(e,ep),u)return Kd(u,e,i,t);if(Zd&&o)return tp(se(i),e,t)}for(l=se(i),p=se(e),c=Wd(t),c||(t=se(t)),a=p.length,f=ip(1,a),d=jn(l,p,0);d!==-1;)v=c?se(t(p,d,l)):Jd(p,l,d,[],void 0,t),y+=Mn(l,m,d)+v,m=d+a,d=jn(l,p,d+f);return m<l.length&&(y+=Mn(l,m)),y}})});var bt=n((Iy,Un)=>{"use strict";var op=F();Un.exports=op});var Gn=n((Ey,Vn)=>{"use strict";Ui();Vi();Bn();var np=bt();Vn.exports=np("String","replaceAll")});var Wn=n((qy,Kn)=>{"use strict";var ap=Gn();Kn.exports=ap});var zn=n((Py,Hn)=>{"use strict";var sp=Wn();Hn.exports=sp});var ra=n(()=>{"use strict"});var Oe=n((Ny,ta)=>{"use strict";var cp=ee();ta.exports=typeof process!="undefined"&&cp(process)=="process"});var ce=n((Ly,ia)=>{"use strict";var lp=H();ia.exports=function(r,e,t,i){return i&&i.enumerable?r[e]=t:lp(r,e,t),r}});var na=n((ky,oa)=>{"use strict";var fp=O(),dp=B();oa.exports=function(r,e,t){try{return fp(dp(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var sa=n((Dy,aa)=>{"use strict";var pp=I(),vp=String,hp=TypeError;aa.exports=function(r){if(typeof r=="object"||pp(r))return r;throw hp("Can't set "+vp(r)+" as a prototype")}});var It=n(($y,ua)=>{"use strict";var gp=na(),mp=L(),bp=sa();ua.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=gp(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return function(o,s){return mp(o),bp(s),r?t(o,s):o.__proto__=s,o}}():void 0)});var la=n((My,ca)=>{"use strict";var yp=Ze(),Sp=ae();ca.exports=yp?{}.toString:function(){return"[object "+Sp(this)+"]"}});var nr=n((jy,da)=>{"use strict";var Ip=Ze(),Ep=W().f,qp=H(),Pp=N(),Tp=la(),Op=T(),fa=Op("toStringTag");da.exports=function(r,e,t,i){if(r){var o=t?r:r.prototype;Pp(o,fa)||Ep(o,fa,{configurable:!0,value:e}),i&&!Ip&&qp(o,"toString",Tp)}}});var va=n((Fy,pa)=>{"use strict";var _p=W();pa.exports=function(r,e,t){return _p.f(r,e,t)}});var ma=n((By,ga)=>{"use strict";var xp=F(),Rp=va(),wp=T(),Ap=M(),ha=wp("species");ga.exports=function(r){var e=xp(r);Ap&&e&&!e[ha]&&Rp(e,ha,{configurable:!0,get:function(){return this}})}});var ya=n((Uy,ba)=>{"use strict";var Cp=Se(),Np=TypeError;ba.exports=function(r,e){if(Cp(e,r))return r;throw Np("Incorrect invocation")}});var qt=n((Vy,Sa)=>{"use strict";var Lp=O(),kp=I(),Et=He(),Dp=Lp(Function.toString);kp(Et.inspectSource)||(Et.inspectSource=function(r){return Dp(r)});Sa.exports=Et.inspectSource});var Oa=n((Gy,Ta)=>{"use strict";var $p=O(),Mp=x(),Ia=I(),jp=ae(),Fp=F(),Bp=qt(),Ea=function(){},Up=[],qa=Fp("Reflect","construct"),Pt=/^\s*(?:class|function)\b/,Vp=$p(Pt.exec),Gp=!Pt.exec(Ea),_e=function(e){if(!Ia(e))return!1;try{return qa(Ea,Up,e),!0}catch(t){return!1}},Pa=function(e){if(!Ia(e))return!1;switch(jp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Gp||!!Vp(Pt,Bp(e))}catch(t){return!0}};Pa.sham=!0;Ta.exports=!qa||Mp(function(){var r;return _e(_e.call)||!_e(Object)||!_e(function(){r=!0})||r})?Pa:_e});var xa=n((Ky,_a)=>{"use strict";var Kp=Oa(),Wp=Ee(),Hp=TypeError;_a.exports=function(r){if(Kp(r))return r;throw Hp(Wp(r)+" is not a constructor")}});var Tt=n((Wy,wa)=>{"use strict";var Ra=L(),zp=xa(),Qp=re(),Yp=T(),Jp=Yp("species");wa.exports=function(r,e){var t=Ra(r).constructor,i;return t===void 0||Qp(i=Ra(t)[Jp])?e:zp(i)}});var Ot=n((Hy,Aa)=>{"use strict";var Xp=F();Aa.exports=Xp("document","documentElement")});var Na=n((zy,Ca)=>{"use strict";var Zp=O();Ca.exports=Zp([].slice)});var ka=n((Qy,La)=>{"use strict";var ev=TypeError;La.exports=function(r,e){if(r<e)throw ev("Not enough arguments");return r}});var _t=n((Yy,Da)=>{"use strict";var rv=Ie();Da.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(rv)});var Dt=n((Jy,Ka)=>{"use strict";var R=P(),tv=Fr(),iv=Te(),$a=I(),ov=N(),Ga=x(),Ma=Ot(),nv=Na(),ja=Ye(),av=ka(),sv=_t(),uv=Oe(),Nt=R.setImmediate,Lt=R.clearImmediate,cv=R.process,xt=R.Dispatch,lv=R.Function,Fa=R.MessageChannel,fv=R.String,Rt=0,xe={},Ba="onreadystatechange",Re,z,wt,At;Ga(function(){Re=R.location});var kt=function(r){if(ov(xe,r)){var e=xe[r];delete xe[r],e()}},Ct=function(r){return function(){kt(r)}},Ua=function(r){kt(r.data)},Va=function(r){R.postMessage(fv(r),Re.protocol+"//"+Re.host)};(!Nt||!Lt)&&(Nt=function(e){av(arguments.length,1);var t=$a(e)?e:lv(e),i=nv(arguments,1);return xe[++Rt]=function(){tv(t,void 0,i)},z(Rt),Rt},Lt=function(e){delete xe[e]},uv?z=function(r){cv.nextTick(Ct(r))}:xt&&xt.now?z=function(r){xt.now(Ct(r))}:Fa&&!sv?(wt=new Fa,At=wt.port2,wt.port1.onmessage=Ua,z=iv(At.postMessage,At)):R.addEventListener&&$a(R.postMessage)&&!R.importScripts&&Re&&Re.protocol!=="file:"&&!Ga(Va)?(z=Va,R.addEventListener("message",Ua,!1)):Ba in ja("script")?z=function(r){Ma.appendChild(ja("script"))[Ba]=function(){Ma.removeChild(this),kt(r)}}:z=function(r){setTimeout(Ct(r),0)});Ka.exports={set:Nt,clear:Lt}});var $t=n((Xy,Ha)=>{"use strict";var Wa=function(){this.head=null,this.tail=null};Wa.prototype={add:function(r){var e={item:r,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r){var e=this.head=r.next;return e===null&&(this.tail=null),r.item}}};Ha.exports=Wa});var Qa=n((Zy,za)=>{"use strict";var dv=Ie();za.exports=/ipad|iphone|ipod/i.test(dv)&&typeof Pebble!="undefined"});var Ja=n((eS,Ya)=>{"use strict";var pv=Ie();Ya.exports=/web0s(?!.*chrome)/i.test(pv)});var ns=n((rS,os)=>{"use strict";var Q=P(),Xa=Te(),vv=st().f,Mt=Dt().set,hv=$t(),gv=_t(),mv=Qa(),bv=Ja(),jt=Oe(),Za=Q.MutationObserver||Q.WebKitMutationObserver,es=Q.document,rs=Q.process,ar=Q.Promise,ts=vv(Q,"queueMicrotask"),Ut=ts&&ts.value,le,Ft,Bt,sr,is;Ut||(we=new hv,Ae=function(){var r,e;for(jt&&(r=rs.domain)&&r.exit();e=we.get();)try{e()}catch(t){throw we.head&&le(),t}r&&r.enter()},!gv&&!jt&&!bv&&Za&&es?(Ft=!0,Bt=es.createTextNode(""),new Za(Ae).observe(Bt,{characterData:!0}),le=function(){Bt.data=Ft=!Ft}):!mv&&ar&&ar.resolve?(sr=ar.resolve(void 0),sr.constructor=ar,is=Xa(sr.then,sr),le=function(){is(Ae)}):jt?le=function(){rs.nextTick(Ae)}:(Mt=Xa(Mt,Q),le=function(){Mt(Ae)}),Ut=function(r){we.head||le(),we.add(r)});var we,Ae;os.exports=Ut});var ss=n((tS,as)=>{"use strict";as.exports=function(r,e){try{arguments.length==1?console.error(r):console.error(r,e)}catch(t){}}});var ur=n((iS,us)=>{"use strict";us.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var fs=n((oS,ls)=>{"use strict";var yv=P(),Sv=I(),cs=yv.WeakMap;ls.exports=Sv(cs)&&/native code/.test(String(cs))});var cr=n((nS,ps)=>{"use strict";var Iv=tt(),Ev=it(),ds=Iv("keys");ps.exports=function(r){return ds[r]||(ds[r]=Ev(r))}});var lr=n((aS,vs)=>{"use strict";vs.exports={}});var Wt=n((sS,ms)=>{"use strict";var qv=fs(),gs=P(),Pv=j(),Tv=H(),Vt=N(),Gt=He(),Ov=cr(),_v=lr(),hs="Object already initialized",Kt=gs.TypeError,xv=gs.WeakMap,fr,Ce,dr,Rv=function(r){return dr(r)?Ce(r):fr(r,{})},wv=function(r){return function(e){var t;if(!Pv(e)||(t=Ce(e)).type!==r)throw Kt("Incompatible receiver, "+r+" required");return t}};qv||Gt.state?(D=Gt.state||(Gt.state=new xv),D.get=D.get,D.has=D.has,D.set=D.set,fr=function(r,e){if(D.has(r))throw Kt(hs);return e.facade=r,D.set(r,e),e},Ce=function(r){return D.get(r)||{}},dr=function(r){return D.has(r)}):(Y=Ov("state"),_v[Y]=!0,fr=function(r,e){if(Vt(r,Y))throw Kt(hs);return e.facade=r,Tv(r,Y,e),e},Ce=function(r){return Vt(r,Y)?r[Y]:{}},dr=function(r){return Vt(r,Y)});var D,Y;ms.exports={set:fr,get:Ce,has:dr,enforce:Rv,getterFor:wv}});var J=n((uS,bs)=>{"use strict";var Av=P();bs.exports=Av.Promise});var Ht=n((cS,ys)=>{"use strict";ys.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"});var Is=n((lS,Ss)=>{"use strict";var Cv=Ht(),Nv=Oe();Ss.exports=!Cv&&!Nv&&typeof window=="object"&&typeof document=="object"});var fe=n((fS,Ps)=>{"use strict";var Lv=P(),Ne=J(),kv=I(),Dv=ut(),$v=qt(),Mv=T(),jv=Is(),Fv=Ht(),Bv=C(),zt=Qr(),Es=Ne&&Ne.prototype,Uv=Mv("species"),Qt=!1,qs=kv(Lv.PromiseRejectionEvent),Vv=Dv("Promise",function(){var r=$v(Ne),e=r!==String(Ne);if(!e&&zt===66||Bv&&!(Es.catch&&Es.finally))return!0;if(!zt||zt<51||!/native code/.test(r)){var t=new Ne(function(s){s(1)}),i=function(s){s(function(){},function(){})},o=t.constructor={};if(o[Uv]=i,Qt=t.then(function(){})instanceof i,!Qt)return!0}return!e&&(jv||Fv)&&!qs});Ps.exports={CONSTRUCTOR:Vv,REJECTION_EVENT:qs,SUBCLASSING:Qt}});var de=n((dS,Os)=>{"use strict";var Ts=B(),Gv=TypeError,Kv=function(r){var e,t;this.promise=new r(function(i,o){if(e!==void 0||t!==void 0)throw Gv("Bad Promise constructor");e=i,t=o}),this.resolve=Ts(e),this.reject=Ts(t)};Os.exports.f=function(r){return new Kv(r)}});var Ks=n(()=>{"use strict";var Wv=k(),Hv=C(),gr=Oe(),K=P(),ge=_(),_s=ce(),xs=It(),zv=nr(),Qv=ma(),Yv=B(),hr=I(),Jv=j(),Xv=ya(),Zv=Tt(),Ns=Dt().set,ei=ns(),eh=ss(),rh=ur(),th=$t(),Ls=Wt(),mr=J(),ri=fe(),ks=de(),br="Promise",Ds=ri.CONSTRUCTOR,ih=ri.REJECTION_EVENT,oh=ri.SUBCLASSING,Yt=Ls.getterFor(br),nh=Ls.set,pe=mr&&mr.prototype,X=mr,pr=pe,$s=K.TypeError,Jt=K.document,ti=K.process,Xt=ks.f,ah=Xt,sh=!!(Jt&&Jt.createEvent&&K.dispatchEvent),Ms="unhandledrejection",uh="rejectionhandled",Rs=0,js=1,ch=2,ii=1,Fs=2,vr,ws,lh,As,Bs=function(r){var e;return Jv(r)&&hr(e=r.then)?e:!1},Us=function(r,e){var t=e.value,i=e.state==js,o=i?r.ok:r.fail,s=r.resolve,u=r.reject,l=r.domain,p,c,a;try{o?(i||(e.rejection===Fs&&dh(e),e.rejection=ii),o===!0?p=t:(l&&l.enter(),p=o(t),l&&(l.exit(),a=!0)),p===r.promise?u($s("Promise-chain cycle")):(c=Bs(p))?ge(c,p,s,u):s(p)):u(t)}catch(f){l&&!a&&l.exit(),u(f)}},Vs=function(r,e){r.notified||(r.notified=!0,ei(function(){for(var t=r.reactions,i;i=t.get();)Us(i,r);r.notified=!1,e&&!r.rejection&&fh(r)}))},Gs=function(r,e,t){var i,o;sh?(i=Jt.createEvent("Event"),i.promise=e,i.reason=t,i.initEvent(r,!1,!0),K.dispatchEvent(i)):i={promise:e,reason:t},!ih&&(o=K["on"+r])?o(i):r===Ms&&eh("Unhandled promise rejection",t)},fh=function(r){ge(Ns,K,function(){var e=r.facade,t=r.value,i=Cs(r),o;if(i&&(o=rh(function(){gr?ti.emit("unhandledRejection",t,e):Gs(Ms,e,t)}),r.rejection=gr||Cs(r)?Fs:ii,o.error))throw o.value})},Cs=function(r){return r.rejection!==ii&&!r.parent},dh=function(r){ge(Ns,K,function(){var e=r.facade;gr?ti.emit("rejectionHandled",e):Gs(uh,e,r.value)})},ve=function(r,e,t){return function(i){r(e,i,t)}},he=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=ch,Vs(r,!0))},Zt=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw $s("Promise can't be resolved itself");var i=Bs(e);i?ei(function(){var o={done:!1};try{ge(i,e,ve(Zt,o,r),ve(he,o,r))}catch(s){he(o,s,r)}}):(r.value=e,r.state=js,Vs(r,!1))}catch(o){he({done:!1},o,r)}}};if(Ds&&(X=function(e){Xv(this,pr),Yv(e),ge(vr,this);var t=Yt(this);try{e(ve(Zt,t),ve(he,t))}catch(i){he(t,i)}},pr=X.prototype,vr=function(e){nh(this,{type:br,done:!1,notified:!1,parent:!1,reactions:new th,rejection:!1,state:Rs,value:void 0})},vr.prototype=_s(pr,"then",function(e,t){var i=Yt(this),o=Xt(Zv(this,X));return i.parent=!0,o.ok=hr(e)?e:!0,o.fail=hr(t)&&t,o.domain=gr?ti.domain:void 0,i.state==Rs?i.reactions.add(o):ei(function(){Us(o,i)}),o.promise}),ws=function(){var r=new vr,e=Yt(r);this.promise=r,this.resolve=ve(Zt,e),this.reject=ve(he,e)},ks.f=Xt=function(r){return r===X||r===lh?new ws(r):ah(r)},!Hv&&hr(mr)&&pe!==Object.prototype)){As=pe.then,oh||_s(pe,"then",function(e,t){var i=this;return new X(function(o,s){ge(As,i,o,s)}).then(e,t)},{unsafe:!0});try{delete pe.constructor}catch(r){}xs&&xs(pe,pr)}Wv({global:!0,constructor:!0,wrap:!0,forced:Ds},{Promise:X});zv(X,br,!1,!0);Qv(br)});var Z=n((hS,Ws)=>{"use strict";Ws.exports={}});var zs=n((gS,Hs)=>{"use strict";var ph=T(),vh=Z(),hh=ph("iterator"),gh=Array.prototype;Hs.exports=function(r){return r!==void 0&&(vh.Array===r||gh[hh]===r)}});var Ys=n((mS,Qs)=>{"use strict";var mh=Math.ceil,bh=Math.floor;Qs.exports=Math.trunc||function(e){var t=+e;return(t>0?bh:mh)(t)}});var oi=n((bS,Js)=>{"use strict";var yh=Ys();Js.exports=function(r){var e=+r;return e!==e||e===0?0:yh(e)}});var Zs=n((yS,Xs)=>{"use strict";var Sh=oi(),Ih=Math.min;Xs.exports=function(r){return r>0?Ih(Sh(r),9007199254740991):0}});var ni=n((SS,eu)=>{"use strict";var Eh=Zs();eu.exports=function(r){return Eh(r.length)}});var ai=n((IS,tu)=>{"use strict";var qh=ae(),ru=qe(),Ph=re(),Th=Z(),Oh=T(),_h=Oh("iterator");tu.exports=function(r){if(!Ph(r))return ru(r,_h)||ru(r,"@@iterator")||Th[qh(r)]}});var ou=n((ES,iu)=>{"use strict";var xh=_(),Rh=B(),wh=L(),Ah=Ee(),Ch=ai(),Nh=TypeError;iu.exports=function(r,e){var t=arguments.length<2?Ch(r):e;if(Rh(t))return wh(xh(t,r));throw Nh(Ah(r)+" is not iterable")}});var su=n((qS,au)=>{"use strict";var Lh=_(),nu=L(),kh=qe();au.exports=function(r,e,t){var i,o;nu(r);try{if(i=kh(r,"return"),!i){if(e==="throw")throw t;return t}i=Lh(i,r)}catch(s){o=!0,i=s}if(e==="throw")throw t;if(o)throw i;return nu(i),t}});var Sr=n((PS,fu)=>{"use strict";var Dh=Te(),$h=_(),Mh=L(),jh=Ee(),Fh=zs(),Bh=ni(),uu=Se(),Uh=ou(),Vh=ai(),cu=su(),Gh=TypeError,yr=function(r,e){this.stopped=r,this.result=e},lu=yr.prototype;fu.exports=function(r,e,t){var i=t&&t.that,o=!!(t&&t.AS_ENTRIES),s=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),p=Dh(e,i),c,a,f,v,d,m,y,E=function(q){return c&&cu(c,"normal",q),new yr(!0,q)},S=function(q){return o?(Mh(q),l?p(q[0],q[1],E):p(q[0],q[1])):l?p(q,E):p(q)};if(s)c=r.iterator;else if(u)c=r;else{if(a=Vh(r),!a)throw Gh(jh(r)+" is not iterable");if(Fh(a)){for(f=0,v=Bh(r);v>f;f++)if(d=S(r[f]),d&&uu(lu,d))return d;return new yr(!1)}c=Uh(r,a)}for(m=s?r.next:c.next;!(y=$h(m,c)).done;){try{d=S(y.value)}catch(q){cu(c,"throw",q)}if(typeof d=="object"&&d&&uu(lu,d))return d}return new yr(!1)}});var gu=n((TS,hu)=>{"use strict";var Kh=T(),pu=Kh("iterator"),vu=!1;try{du=0,si={next:function(){return{done:!!du++}},return:function(){vu=!0}},si[pu]=function(){return this},Array.from(si,function(){throw 2})}catch(r){}var du,si;hu.exports=function(r,e){if(!e&&!vu)return!1;var t=!1;try{var i={};i[pu]=function(){return{next:function(){return{done:t=!0}}}},r(i)}catch(o){}return t}});var ui=n((OS,mu)=>{"use strict";var Wh=J(),Hh=gu(),zh=fe().CONSTRUCTOR;mu.exports=zh||!Hh(function(r){Wh.all(r).then(void 0,function(){})})});var bu=n(()=>{"use strict";var Qh=k(),Yh=_(),Jh=B(),Xh=de(),Zh=ur(),eg=Sr(),rg=ui();Qh({target:"Promise",stat:!0,forced:rg},{all:function(e){var t=this,i=Xh.f(t),o=i.resolve,s=i.reject,u=Zh(function(){var l=Jh(t.resolve),p=[],c=0,a=1;eg(e,function(f){var v=c++,d=!1;a++,Yh(l,t,f).then(function(m){d||(d=!0,p[v]=m,--a||o(p))},s)}),--a||o(p)});return u.error&&s(u.value),i.promise}})});var Su=n(()=>{"use strict";var tg=k(),ig=C(),og=fe().CONSTRUCTOR,li=J(),ng=F(),ag=I(),sg=ce(),yu=li&&li.prototype;tg({target:"Promise",proto:!0,forced:og,real:!0},{catch:function(r){return this.then(void 0,r)}});!ig&&ag(li)&&(ci=ng("Promise").prototype.catch,yu.catch!==ci&&sg(yu,"catch",ci,{unsafe:!0}));var ci});var Iu=n(()=>{"use strict";var ug=k(),cg=_(),lg=B(),fg=de(),dg=ur(),pg=Sr(),vg=ui();ug({target:"Promise",stat:!0,forced:vg},{race:function(e){var t=this,i=fg.f(t),o=i.reject,s=dg(function(){var u=lg(t.resolve);pg(e,function(l){cg(u,t,l).then(i.resolve,o)})});return s.error&&o(s.value),i.promise}})});var Eu=n(()=>{"use strict";var hg=k(),gg=_(),mg=de(),bg=fe().CONSTRUCTOR;hg({target:"Promise",stat:!0,forced:bg},{reject:function(e){var t=mg.f(this);return gg(t.reject,void 0,e),t.promise}})});var fi=n((kS,qu)=>{"use strict";var yg=L(),Sg=j(),Ig=de();qu.exports=function(r,e){if(yg(r),Sg(e)&&e.constructor===r)return e;var t=Ig.f(r),i=t.resolve;return i(e),t.promise}});var Ou=n(()=>{"use strict";var Eg=k(),qg=F(),Pu=C(),Pg=J(),Tu=fe().CONSTRUCTOR,Tg=fi(),Og=qg("Promise"),_g=Pu&&!Tu;Eg({target:"Promise",stat:!0,forced:Pu||Tu},{resolve:function(e){return Tg(_g&&this===Og?Pg:this,e)}})});var _u=n(()=>{"use strict";Ks();bu();Su();Iu();Eu();Ou()});var Au=n(()=>{"use strict";var xg=k(),Rg=C(),Ir=J(),wg=x(),Ru=F(),wu=I(),Ag=Tt(),xu=fi(),Cg=ce(),pi=Ir&&Ir.prototype,Ng=!!Ir&&wg(function(){pi.finally.call({then:function(){}},function(){})});xg({target:"Promise",proto:!0,real:!0,forced:Ng},{finally:function(r){var e=Ag(this,Ru("Promise")),t=wu(r);return this.then(t?function(i){return xu(e,r()).then(function(){return i})}:r,t?function(i){return xu(e,r()).then(function(){throw i})}:r)}});!Rg&&wu(Ir)&&(di=Ru("Promise").prototype.finally,pi.finally!==di&&Cg(pi,"finally",di,{unsafe:!0}));var di});var Nu=n((US,Cu)=>{"use strict";ra();_u();Au();var Lg=bt();Cu.exports=Lg("Promise","finally")});var ku=n((VS,Lu)=>{"use strict";var kg=Nu();Lu.exports=kg});var $u=n((GS,Du)=>{"use strict";var Dg=ku();Du.exports=Dg});var ju=n((KS,Mu)=>{"use strict";Mu.exports=function(){}});var Uu=n((WS,Bu)=>{"use strict";var vi=M(),$g=N(),Fu=Function.prototype,Mg=vi&&Object.getOwnPropertyDescriptor,hi=$g(Fu,"name"),jg=hi&&function(){}.name==="something",Fg=hi&&(!vi||vi&&Mg(Fu,"name").configurable);Bu.exports={EXISTS:hi,PROPER:jg,CONFIGURABLE:Fg}});var Gu=n((HS,Vu)=>{"use strict";var Bg=oi(),Ug=Math.max,Vg=Math.min;Vu.exports=function(r,e){var t=Bg(r);return t<0?Ug(t+e,0):Vg(t,e)}});var Hu=n((zS,Wu)=>{"use strict";var Gg=te(),Kg=Gu(),Wg=ni(),Ku=function(r){return function(e,t,i){var o=Gg(e),s=Wg(o),u=Kg(i,s),l;if(r&&t!=t){for(;s>u;)if(l=o[u++],l!=l)return!0}else for(;s>u;u++)if((r||u in o)&&o[u]===t)return r||u||0;return!r&&-1}};Wu.exports={includes:Ku(!0),indexOf:Ku(!1)}});var Yu=n((QS,Qu)=>{"use strict";var Hg=O(),gi=N(),zg=te(),Qg=Hu().indexOf,Yg=lr(),zu=Hg([].push);Qu.exports=function(r,e){var t=zg(r),i=0,o=[],s;for(s in t)!gi(Yg,s)&&gi(t,s)&&zu(o,s);for(;e.length>i;)gi(t,s=e[i++])&&(~Qg(o,s)||zu(o,s));return o}});var mi=n((YS,Ju)=>{"use strict";Ju.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Zu=n((JS,Xu)=>{"use strict";var Jg=Yu(),Xg=mi();Xu.exports=Object.keys||function(e){return Jg(e,Xg)}});var rc=n(ec=>{"use strict";var Zg=M(),em=ct(),rm=W(),tm=L(),im=te(),om=Zu();ec.f=Zg&&!em?Object.defineProperties:function(e,t){tm(e);for(var i=im(t),o=om(t),s=o.length,u=0,l;s>u;)rm.f(e,l=o[u++],i[l]);return e}});var Ii=n((ZS,uc)=>{"use strict";var nm=L(),am=rc(),tc=mi(),sm=lr(),um=Ot(),cm=Ye(),lm=cr(),ic=">",oc="<",yi="prototype",Si="script",ac=lm("IE_PROTO"),bi=function(){},sc=function(r){return oc+Si+ic+r+oc+"/"+Si+ic},nc=function(r){r.write(sc("")),r.close();var e=r.parentWindow.Object;return r=null,e},fm=function(){var r=cm("iframe"),e="java"+Si+":",t;return r.style.display="none",um.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(sc("document.F=Object")),t.close(),t.F},Er,qr=function(){try{Er=new ActiveXObject("htmlfile")}catch(e){}qr=typeof document!="undefined"?document.domain&&Er?nc(Er):fm():nc(Er);for(var r=tc.length;r--;)delete qr[yi][tc[r]];return qr()};sm[ac]=!0;uc.exports=Object.create||function(e,t){var i;return e!==null?(bi[yi]=nm(e),i=new bi,bi[yi]=null,i[ac]=e):i=qr(),t===void 0?i:am.f(i,t)}});var lc=n((eI,cc)=>{"use strict";var dm=x();cc.exports=!dm(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var qi=n((rI,dc)=>{"use strict";var pm=N(),vm=I(),hm=ze(),gm=cr(),mm=lc(),fc=gm("IE_PROTO"),Ei=Object,bm=Ei.prototype;dc.exports=mm?Ei.getPrototypeOf:function(r){var e=hm(r);if(pm(e,fc))return e[fc];var t=e.constructor;return vm(t)&&e instanceof t?t.prototype:e instanceof Ei?bm:null}});var _i=n((tI,hc)=>{"use strict";var ym=x(),Sm=I(),Im=j(),Em=Ii(),pc=qi(),qm=ce(),Pm=T(),Tm=C(),Oi=Pm("iterator"),vc=!1,U,Pi,Ti;[].keys&&(Ti=[].keys(),"next"in Ti?(Pi=pc(pc(Ti)),Pi!==Object.prototype&&(U=Pi)):vc=!0);var Om=!Im(U)||ym(function(){var r={};return U[Oi].call(r)!==r});Om?U={}:Tm&&(U=Em(U));Sm(U[Oi])||qm(U,Oi,function(){return this});hc.exports={IteratorPrototype:U,BUGGY_SAFARI_ITERATORS:vc}});var mc=n((iI,gc)=>{"use strict";var _m=_i().IteratorPrototype,xm=Ii(),Rm=ye(),wm=nr(),Am=Z(),Cm=function(){return this};gc.exports=function(r,e,t,i){var o=e+" Iterator";return r.prototype=xm(_m,{next:Rm(+!i,t)}),wm(r,o,!1,!0),Am[o]=Cm,r}});var xc=n((oI,_c)=>{"use strict";var Nm=k(),Lm=_(),Pr=C(),Tc=Uu(),km=I(),Dm=mc(),bc=qi(),yc=It(),$m=nr(),Mm=H(),xi=ce(),jm=T(),Sc=Z(),Oc=_i(),Fm=Tc.PROPER,Bm=Tc.CONFIGURABLE,Ic=Oc.IteratorPrototype,Tr=Oc.BUGGY_SAFARI_ITERATORS,Le=jm("iterator"),Ec="keys",ke="values",qc="entries",Pc=function(){return this};_c.exports=function(r,e,t,i,o,s,u){Dm(t,e,i);var l=function(S){if(S===o&&v)return v;if(!Tr&&S in a)return a[S];switch(S){case Ec:return function(){return new t(this,S)};case ke:return function(){return new t(this,S)};case qc:return function(){return new t(this,S)}}return function(){return new t(this)}},p=e+" Iterator",c=!1,a=r.prototype,f=a[Le]||a["@@iterator"]||o&&a[o],v=!Tr&&f||l(o),d=e=="Array"&&a.entries||f,m,y,E;if(d&&(m=bc(d.call(new r)),m!==Object.prototype&&m.next&&(!Pr&&bc(m)!==Ic&&(yc?yc(m,Ic):km(m[Le])||xi(m,Le,Pc)),$m(m,p,!0,!0),Pr&&(Sc[p]=Pc))),Fm&&o==ke&&f&&f.name!==ke&&(!Pr&&Bm?Mm(a,"name",ke):(c=!0,v=function(){return Lm(f,this)})),o)if(y={values:l(ke),keys:s?v:l(Ec),entries:l(qc)},u)for(E in y)(Tr||c||!(E in a))&&xi(a,E,y[E]);else Nm({target:e,proto:!0,forced:Tr||c},y);return(!Pr||u)&&a[Le]!==v&&xi(a,Le,v,{name:o}),Sc[e]=v,y}});var wc=n((nI,Rc)=>{"use strict";Rc.exports=function(r,e){return{value:r,done:e}}});var wi=n((aI,kc)=>{"use strict";var Um=te(),Ri=ju(),Ac=Z(),Nc=Wt(),Vm=W().f,Gm=xc(),Or=wc(),Km=C(),Wm=M(),Lc="Array Iterator",Hm=Nc.set,zm=Nc.getterFor(Lc);kc.exports=Gm(Array,"Array",function(r,e){Hm(this,{type:Lc,target:Um(r),index:0,kind:e})},function(){var r=zm(this),e=r.target,t=r.kind,i=r.index++;return!e||i>=e.length?(r.target=void 0,Or(void 0,!0)):t=="keys"?Or(i,!1):t=="values"?Or(e[i],!1):Or([i,e[i]],!1)},"values");var Cc=Ac.Arguments=Ac.Array;Ri("keys");Ri("values");Ri("entries");if(!Km&&Wm&&Cc.name!=="values")try{Vm(Cc,"name",{value:"values"})}catch(r){}});var $c=n((sI,Dc)=>{"use strict";var Qm=Qe(),Ym=W(),Jm=ye();Dc.exports=function(r,e,t){var i=Qm(e);i in r?Ym.f(r,i,Jm(0,t)):r[i]=t}});var Mc=n(()=>{"use strict";var Xm=k(),Zm=Sr(),eb=$c();Xm({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Zm(e,function(i,o){eb(t,i,o)},{AS_ENTRIES:!0}),t}})});var Fc=n((lI,jc)=>{"use strict";wi();Mc();var rb=Ke();jc.exports=rb.Object.fromEntries});var Uc=n((fI,Bc)=>{"use strict";Bc.exports={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}});var Kc=n(()=>{"use strict";wi();var tb=Uc(),ib=P(),ob=ae(),nb=H(),Vc=Z(),ab=T(),Gc=ab("toStringTag");for(_r in tb)Ai=ib[_r],xr=Ai&&Ai.prototype,xr&&ob(xr)!==Gc&&nb(xr,Gc,_r),Vc[_r]=Vc.Array;var Ai,xr,_r});var Hc=n((vI,Wc)=>{"use strict";var sb=Fc();Kc();Wc.exports=sb});var Qc=n((hI,zc)=>{"use strict";var ub=Hc();zc.exports=ub});var fb={};vl(fb,{ApiEnv:()=>ue,ConnectionType:()=>ir,ContentType:()=>tr,InteractiveInterfaceClick:()=>yt,OneStat:()=>Dr,Quality:()=>rr,SeekAction:()=>or,VERSION:()=>De});module.exports=hl(fb);var al=jr(zn(),1);var ue=(s=>(s.PROD="prod",s.VK_ALIAS="vk_alias",s.VIDEOTEST="videotest",s.TEST="test",s.AUTO="auto",s))(ue||{}),rr=(c=>(c.Q144P="mobile",c.Q240P="lowest",c.Q360P="low",c.Q480P="medium",c.Q720P="high",c.Q1080P="fullhd",c.Q1440P="quadhd",c.Q2160P="ultrahd",c.UNKNOWN="unknown",c))(rr||{}),tr=(d=>(d.MP4="mp4",d.DASH="dash",d.DASH_SEP="dash_sep",d.ONDEMAND_DASH="ondemand_dash",d.HLS="hls",d.ONDEMAND_HLS="ondemand_hls",d.WEBM="webm",d.AV1="av1",d.ONDEMAND_DASH_LIVE="ondemand_dash_live",d.ONDEMAND_HLS_LIVE="ondemand_hls_live",d.WEBRTC="webrtc",d.UNKNOWN="unknown",d.RTMP="rtmp",d))(tr||{});var ir=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(ir||{});var or=(l=>(l.SLIDER="slider",l.DOUBLE_TAP="double_tap",l.TIME_CODE="time_code",l.EPISODE="episode",l.REWIND="rewind",l.LIVE="live",l.UNKNOWN="unknown",l))(or||{}),yt=(s=>(s.GRAPH_SHOW="iGraphShow",s.GRAPH_HIDE="iGraphHide",s.NEXT_AREA="iNextChapterArea",s.NEXT_BUTTON="iNextChapterBtn",s.WATCH_AGAIN="iWatchAgainBtn",s))(yt||{}),Qn={action_play:"ap",action_play_interactive:"api",first_bytes:"fb",player_ready:"pr",first_frame:"ff",seek:"sk",watch_coverage_record:"wr",watch_coverage_live:"wl",empty_buffer:"eb",action_stop:"as",close_at_empty_buffer:"cb",content_error:"er",player_interface_click:"pc",next_movie:"nm",track_switch:"ts",failover:"fo"},Yn={vsid:"si",isid:"is",vid:"vi",place:"pl",quality:"qt",cdn_host:"ch",stat_type:"st",param:"pm",vk_app_id:"va",track_code:"tc",connection_type:"cnt",connection_reused:"cr",cached_data:"cd",live:"lv",muted:"mu",mode:"mo",subtitles:"sb",failover:"fo",download_speed:"ds",manual_quality:"mq",ref_domain:"rd",direct_url:"du"},Jn={unknown:"un",mobile:"m",lowest:"ls",low:"l",medium:"md",high:"h",fullhd:"f",quadhd:"q",ultrahd:"u"},Xn={pip:"pi",fullscreen:"fs",external:"ex",prefetch:"pr",airplay:"ap",chromecast:"cc",invisible:"iv"};var Zn=require("@vkontakte/videoplayer-shared"),up={apiEnv:"vk_alias",requestRetryCount:1,firstFlushTime:5e3,flushDebounceTime:1e4,flushMaxWait:6e4,storageExpiration:36*60*60*1e3,watchCoverageInterval:15e3,disabledOperations:[],disabledCustomFields:[],shorten:!0,maxLoops:100,embedUrlParams:[],useBeacon:!0,synchronizeTime:!0,debugLog:!1,backoff:{start:1e3,factor:1.5,max:5*60*1e3,random:.1}},ea=r=>(0,Zn.fillWithDefault)(r,up);function St(){let r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),t=0,i,o;for(o=0;o<36;o++)o===8||o===13||o===18||o===23?e[o]="-":o===14?e[o]="4":(t<=2&&(t=33554432+Math.random()*16777216|0),i=t&15,t=t>>4,e[o]=r[o===19?i&3|8:i]);return e.join("")}var h=require("@vkontakte/videoplayer-shared"),$r=require("@vkontakte/videoplayer-shared");var Rr=jr($u(),1);var Yc=jr(Qc(),1);var Jc=r=>{var o;let{operation:e,custom:t}=r,i=(0,Yc.default)(Object.entries(t).map(([s,u])=>{var c,a,f;let l=(c=Yn[s])!=null?c:s,p=u;return u&&(s==="mode"?p=(a=Xn[u])!=null?a:u:s==="quality"&&(p=(f=Jn[u])!=null?f:u)),[l,p]}));return{...r,operation:(o=Qn[e])!=null?o:e,custom:i}};var De="__VERSION__",Xc="CIOPGQJGDIHBABABA",Ci={prod:"https://api.ok.ru",vk_alias:"https://api.mycdn.me",videotest:"https://videotestapi.ok.ru/api",test:"https://apitest.ok.ru",auto:""};var $=require("@vkontakte/videoplayer-shared");var $e=class{constructor(e){this.consequentAuthErrors=0;this.authorized$=new $.ValueSubject(!1);this.params=e}async authorize(e){return this.authToken=e!=null?e:await this.refreshAuthToken(),this._authorizeWithBackoff()}logBeacon(e){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey;if(!o)return;this.params.apiTransport.sendBeacon(t,i,o)||this.logRequest(e)}async logRequest(e){var u;let t="log.externalLog",i=this.createLogParams(e),o=(u=this.sessionKey)!=null?u:await this._authorizeWithBackoff();if(!o)return;let s=async(l,p=this.params.config.requestRetryCount)=>{try{return await this.params.apiTransport.sendRequest(t,i,o)}catch(c){if(!c||!("error_code"in c)){this.params.error$.next({id:"logRequestUnknown",category:$.ErrorCategory.NETWORK,message:`Unknown ${t} error`,thrown:c});return}let a=c==null?void 0:c.error_code;switch(a){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=await this._authorizeWithBackoff(),p>0?s(l,p-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=await this.refreshAuthToken(),this.sessionKey=await this._authorizeWithBackoff(),p>0?s(l,p-1):void 0;default:{this.params.error$.next({id:`LogRequest#${a}`,category:$.ErrorCategory.EXTERNAL_API,message:`${t} error`,data:c});return}}}};return s(e)}destroy(){window.clearTimeout(this.backoffTimeoutId),this.backoffTimeoutId=0}async refreshAuthToken(){if(this.params.refreshAuthToken)return this.refreshAuthTokenPromise||(this.refreshAuthTokenPromise=(0,Rr.default)(this.params.refreshAuthToken(),()=>{this.refreshAuthTokenPromise=void 0})),this.refreshAuthTokenPromise}createLogParams(e){return{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`@vkontakte/videoplayer-statistics:${De}`,platform:this.params.mobile?"M_WEB":"WEB",items:this.params.config.shorten?e.map(Jc):e})}}_authorizeWithBackoff(){if(!this.consequentAuthErrors)return this._authorize();let e=(0,$.getExponentialDelay)(this.consequentAuthErrors,this.params.config.backoff);return new Promise(t=>{this.backoffTimeoutId||(this.backoffTimeoutId=window.setTimeout(()=>{(0,Rr.default)(this._authorize().then(t).catch(i=>this.params.error$.next({id:"AuthorizeBackoff",category:$.ErrorCategory.NETWORK,message:"Otherwise unhandled error in authorization",thrown:i})),()=>this.backoffTimeoutId=0)},e))})}async _authorize(){if(this.authorizePromise)return this.authorizePromise;this.sessionKey=void 0,this.authorized$.next(!1);let e="auth.anonymLogin",t={session_data:{version:2,device_id:this.params.uuid,client_version:De.split("-")[0],client_type:"SDK_JS"}};return this.authToken!==void 0&&(t.session_data.auth_token=this.authToken,t.session_data.version=3),this.authorizePromise=(0,Rr.default)(this.params.apiTransport.sendRequest(e,t).then(i=>{var o;return(!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:$.ErrorCategory.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=(o=i==null?void 0:i.session_key)!=null?o:void 0,this.sessionKey}).catch(async i=>{this.sessionKey=void 0;let o=i==null?void 0:i.error_code;switch(o){case 401:return this.authToken=await this.refreshAuthToken(),this._authorizeWithBackoff()}o?this.params.error$.next({id:`Authorize#${o}`,category:$.ErrorCategory.EXTERNAL_API,message:"authorize error",data:i}):this.params.error$.next({id:"AuthorizeUnknown",category:$.ErrorCategory.NETWORK,message:"authorize error",thrown:i})}),()=>{this.authorizePromise=void 0,this.consequentAuthErrors=this.sessionKey?0:this.consequentAuthErrors+1,this.authorized$.next(this.sessionKey!==void 0)}),this.authorizePromise}};var wr=class{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,i){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:i})}removeEventListener(e,t){if(!(e in this.listeners))return;let i=this.listeners[e];for(let o=0,s=i.length;o<s;o++)if(i[o].callback===t){i.splice(o,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let i=this.listeners[e.type].slice();for(let o=0,s=i.length;o<s;o++){let u=i[o];try{u.callback.call(this,e)}catch(l){Promise.resolve().then(()=>{throw l})}u.options&&u.options.once&&this.removeEventListener(e.type,u.callback)}return!e.defaultPrevented}},me=class extends wr{constructor(){super(),this.listeners||wr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return"[object AbortSignal]"}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,e)),super.dispatchEvent(e)}},Me=class{constructor(){Object.defineProperty(this,"signal",{value:new me,writable:!0,configurable:!0})}abort(e){let t;try{t=new Event("abort")}catch(o){typeof document!="undefined"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}let i=e;if(i===void 0)if(typeof document=="undefined")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch(o){i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol!="undefined"&&Symbol.toStringTag&&(Me.prototype[Symbol.toStringTag]="AbortController",me.prototype[Symbol.toStringTag]="AbortSignal");function Ar(r){return r.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof r.Request=="function"&&!r.Request.prototype.hasOwnProperty("signal")||!r.AbortController}function Ni(r){typeof r=="function"&&(r={fetch:r});let{fetch:e,Request:t=e.Request,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o=!1}=r;if(!Ar({fetch:e,Request:t,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:o}))return{fetch:e,Request:s};let s=t;(s&&!s.prototype.hasOwnProperty("signal")||o)&&(s=function(c,a){let f;a&&a.signal&&(f=a.signal,delete a.signal);let v=new t(c,a);return f&&Object.defineProperty(v,"signal",{writable:!1,enumerable:!1,configurable:!0,value:f}),v},s.prototype=t.prototype);let u=e;return{fetch:(p,c)=>{let a=s&&s.prototype.isPrototypeOf(p)?p.signal:c?c.signal:void 0;if(a){let f;try{f=new DOMException("Aborted","AbortError")}catch(d){f=new Error("Aborted"),f.name="AbortError"}if(a.aborted)return Promise.reject(f);let v=new Promise((d,m)=>{a.addEventListener("abort",()=>m(f),{once:!0})});return c&&c.signal&&delete c.signal,Promise.race([v,u(p,c)])}return u(p,c)},Request:s}}var je=Ar({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}),Zc=je?Ni({fetch:window.fetch,Request:window.Request,AbortController:window.AbortController}):void 0,Li=je?Zc.fetch:window.fetch,kI=je?Zc.Request:window.Request,DI=je?Me:window.AbortController,$I=je?me:window.AbortSignal;var V=require("@vkontakte/videoplayer-shared");var Fe=class{constructor(e){this.params=e,this.apiKey=e.apiKey,this.apiEnv=e.config.apiEnv,this.apiBaseUrl=Ci[this.apiEnv],this.timeSynchronisation=e.timeSynchronisation,this.isApiBaseUrlFetched=!1}async resolveApiBaseUrl(){var e;if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=await(await Li(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),s=(e=o==null?void 0:o.Answer[0])==null?void 0:e.data;if(!s)throw new Error("Wrong DNS response");return s}catch(t){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:V.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:t}),Ci.vk_alias}finally{this.isApiBaseUrlFetched=!0}}sendBeacon(e,t,i){if(!window.Blob||!window.navigator.sendBeacon)return!1;let o=this._prepareQueryParams({method:e,queryParams:t,sessionKey:i}),s=new window.Blob([o.toString()],{type:"application/x-www-form-urlencoded"});try{return window.navigator.sendBeacon(`${this.apiBaseUrl}/fb.do`,s)}catch(u){this.params.error$.next({id:"OneStat:ApiTransport:sendBeacon",category:V.ErrorCategory.NETWORK,message:"Unhandled beacon error",thrown:u,data:{method:e,params:t}})}return!1}async sendRequest(e,t,i){let o=(0,V.now)(),s=u=>{if(u instanceof TypeError&&["Failed to fetch","NetworkError when attempting to fetch resource."].includes(u.message)){this.params.error$.next({id:"Network",category:V.ErrorCategory.NETWORK,message:"Request failed",thrown:u});return}this.params.error$.next({id:"OneStat:ApiTransport:sendRequest",category:V.ErrorCategory.NETWORK,message:"Unhandled request error",thrown:u,data:{method:e,params:t,sessionKey:i,time:(0,V.now)()-o}})};return this.apiBaseUrl=await this.resolveApiBaseUrl(),Li(`${this.apiBaseUrl}/fb.do`,{method:"post",headers:{"Content-type":"application/x-www-form-urlencoded"},body:this._prepareQueryParams({method:e,queryParams:t,sessionKey:i})}).then(u=>{var a,f;let l=Number(u.headers.get("content-length"))===0,p=new Date((a=u.headers.get("date"))!=null?a:"").getTime(),c=(0,V.now)()-o;if(isFinite(p)&&((f=this.timeSynchronisation)==null||f.addServerTime(p,c)),!l)return u.json().then(v=>Object.prototype.hasOwnProperty.call(v,"error_msg")?Promise.reject(v):v,s)},s)}_prepareQueryParams(e){let t=new URLSearchParams({format:"JSON",method:e.method,application_key:this.apiKey});return e.sessionKey!==void 0&&t.append("session_key",e.sessionKey),Object.entries(e.queryParams).forEach(([i,o])=>t.append(i,typeof o=="string"?o:JSON.stringify(o))),t}};var w=require("@vkontakte/videoplayer-shared"),Cr="onestat_events",ki=r=>e=>e.timestamp+r>=(0,w.now)(),Nr=class{constructor(e){this.unsaltedStorage=[];this.isPaused=!1;this.isUrgent=e=>{let{operation:t}=e;return["action_play","watch_coverage_record","watch_coverage_live"].includes(t)};this.params=e,this.api=e.api,this.error$=e.error$,this.userSalt=e.userSalt,this.loggerDebugLog=e.debugLogger.createComponentLog("stat logger"),this.firstFlush=(0,w.debounceFn)(()=>this.safeFlush(),this.params.config.firstFlushTime,{maxWait:this.params.config.firstFlushTime});let t=w.safeStorage.isPersistent()?this.params.config.flushMaxWait:0;this.debouncedFlush=(0,w.debounceFn)(()=>this.safeFlush(),this.params.config.flushDebounceTime,{maxWait:t}),this.subscription=this.api.authorized$.subscribe(i=>{i&&this.debouncedFlush()}),this.housekeepStorage()}safeFlush(){var e;try{this.flush()}catch(t){this.error$.next({id:"LoggerError",category:w.ErrorCategory.WTF,message:(e=String(t))!=null?e:"Unknown logger error",thrown:t})}}readFromStorage(){let e=w.safeStorage.get(Cr);try{return e?JSON.parse(e):{}}catch(t){}return{}}addToStorage(e){var s;if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=((s=t[this.userSalt])!=null?s:[]).filter(ki(this.params.config.storageExpiration));w.safeStorage.set(Cr,JSON.stringify({...t,[this.userSalt]:[...o,e]}))}getFromStorage(){var i;return this.userSalt?((i=this.readFromStorage()[this.userSalt])!=null?i:[]).filter(ki(this.params.config.storageExpiration)):this.unsaltedStorage}markStorageSent(){if(!this.userSalt){this.unsaltedStorage=[];return}let e=this.readFromStorage();delete e[this.userSalt],w.safeStorage.set(Cr,JSON.stringify(e))}housekeepStorage(){let e=this.readFromStorage();for(let[t,i]of Object.entries(e)){let o=i.filter(ki(this.params.config.storageExpiration));o.length?e[t]=o:delete e[t],this.loggerDebugLog({message:`${i.length} retrieved from storage, ${o.length} of them actual`})}w.safeStorage.set(Cr,JSON.stringify(e))}log(e){this.addToStorage(e),!this.isPaused&&(this.isUrgent(e)?this.flush():this.lastVsid!==e.custom.vsid?this.firstFlush():this.debouncedFlush(),this.lastVsid=e.custom.vsid)}flush(e=!1){let t=this.getFromStorage();t.length!==0&&(this.api.authorized$.getValue()?(e&&this.params.config.useBeacon?(this.loggerDebugLog({message:`Flushing ${t.length} events through beacon`}),this.api.logBeacon(t)):(this.loggerDebugLog({message:`Flushing ${t.length} events`}),this.api.logRequest(t)),this.markStorageSent()):this.api.authorize(),this.firstFlush.cancel(),this.debouncedFlush.cancel())}pause(){this.isPaused=!0,this.debouncedFlush.cancel()}resume(){this.isPaused=!1,this.debouncedFlush()}destroy(){this.subscription.unsubscribe(),this.firstFlush.cancel(),this.debouncedFlush.cancel()}};var g=require("@vkontakte/videoplayer-core"),Di=require("@vkontakte/videoplayer-shared");var el=r=>r&&{[g.VideoQuality.INVARIANT]:"unknown",[g.VideoQuality.Q_144P]:"mobile",[g.VideoQuality.Q_240P]:"lowest",[g.VideoQuality.Q_360P]:"low",[g.VideoQuality.Q_480P]:"medium",[g.VideoQuality.Q_720P]:"high",[g.VideoQuality.Q_1080P]:"fullhd",[g.VideoQuality.Q_1440P]:"quadhd",[g.VideoQuality.Q_2160P]:"ultrahd",[g.VideoQuality.Q_4320P]:"unknown"}[r],$i=r=>r&&{[g.HttpConnectionType.HTTP1]:"http1",[g.HttpConnectionType.HTTP2]:"http2",[g.HttpConnectionType.QUIC]:"http3"}[r],rl=r=>{if(r!==void 0)switch(r){case g.VideoFormat.MPEG:return"mp4";case g.VideoFormat.DASH_LIVE:return"dash";case g.VideoFormat.DASH_SEP:return"dash_sep";case g.VideoFormat.DASH_ONDEMAND:return"ondemand_dash";case g.VideoFormat.DASH_WEBM:case g.VideoFormat.DASH_LIVE_WEBM:return"webm";case g.VideoFormat.DASH_WEBM_AV1:return"av1";case g.VideoFormat.DASH_LIVE_CMAF:return"ondemand_dash_live";case g.VideoFormat.HLS:case g.VideoFormat.HLS_LIVE:return"hls";case g.VideoFormat.HLS_ONDEMAND:return"ondemand_hls";case g.VideoFormat.HLS_LIVE_CMAF:return"ondemand_hls_live";case g.VideoFormat.WEB_RTC_LIVE:return"webrtc";default:return(0,Di.assertNever)(r)}},Lr=r=>{if(r!==void 0)switch(r){case g.Surface.NONE:case g.Surface.INLINE:return;case g.Surface.FULLSCREEN:return"fullscreen";case g.Surface.SECOND_SCREEN:return"chromecast";case g.Surface.PIP:return"pip";case g.Surface.INVISIBLE:return"invisible";default:return(0,Di.assertNever)(r)}},tl=r=>{switch(r){case"slow-2g":return"poor";case"2g":return"poor";case"3g":return"good";case"4g":return"excellent"}};var kr=class{constructor(e){this.offset=void 0;this.offset=e}getOffset(){var e;return(e=this.offset)!=null?e:0}setOffset(e){this.offset=e}now(){var e;return Date.now()+((e=this.offset)!=null?e:0)}date(e=new Date){var t;return e.setTime(e.getTime()+((t=this.offset)!=null?t:0)),e}addServerTime(e,t){let i=Date.now(),o=e-i-t/2;if(Math.abs(o)<1e3){this.offset=0;return}this.offset===void 0?this.offset=Math.round(o):this.offset=Math.round(.2*o+(1-.2)*this.offset)}};var il=()=>Math.floor(Math.random()*4294967296).toString(36).padStart(7,"0"),ol=()=>Math.floor(Math.random()*18446744073709552e3).toString(36).padStart(13,"0");var Mi=require("@vkontakte/videoplayer-core"),b=require("@vkontakte/videoplayer-shared"),nl=(r,e)=>new b.Observable(t=>{let i=new b.Subscription,o=(0,b.merge)((0,b.fromEvent)(window,"beforeunload"),r.events.willDestruct$),s=new b.ValueSubject(void 0),u;i.add(r.info.isLive$.pipe((0,b.filterChanged)()).subscribe(G=>{u&&(u.unsubscribe(),s.next(void 0)),G?u=r.info.liveTime$.pipe((0,b.map)(Mr=>Mr&&Mr/1e3)).subscribe(s):u=r.info.position$.subscribe(s),i.add(u)}));let{playing$:l,paused$:p}=r.events,c=r.events.willSeek$.pipe((0,b.filter)(()=>r.info.playbackState$.getValue()===Mi.PlaybackState.PLAYING)),a=r.events.seeked$.pipe((0,b.filter)(()=>r.info.playbackState$.getValue()===Mi.PlaybackState.PLAYING)),f=!1,v=new b.Subject;i.add(c.subscribe(()=>{f||v.next(),f=!0})),i.add(a.subscribe(()=>f=!1));let d=new b.Subject,m=new b.Subject,y=(0,b.merge)(l,a,d),E=(0,b.merge)(p,v,o,r.events.looped$,m),S,q=()=>S=s.getValue(),sl=()=>{let G=s.getValue();(0,b.isNullable)(S)||S===G||(0,b.isNullable)(G)||(t.next({from:S,to:G}),S=void 0)},ul=()=>{m.next(),d.next()};if(i.add(y.subscribe(q)),i.add(E.subscribe(sl)),e.forceInterval&&isFinite(e.forceInterval)){let G=0;i.add(y.subscribe(()=>G=window.setTimeout(ul,e.forceInterval))),i.add(E.subscribe(()=>window.clearTimeout(G)))}return i});var lb="_one-stat_",ji=`${lb}uuid`,Fi=()=>{let r=new h.Subscription;return{subscription:r,subscribe:(e,t)=>{e&&r.add(e.subscribe(t))}}},Dr=class{constructor(e,t){this.subscription=new h.Subscription;this.debugLogger=new $r.Logger;this.oneStatDebugLog=this.debugLogger.createComponentLog("onestat");this.loopCounter=0;this.disabled=!1;this.vsid$=new h.ValueSubject(void 0);this.isid$=new h.ValueSubject(void 0);this.seekAction$=new h.ValueSubject("unknown");var p,c,a;this.statContext=e,this.config=ea((p=t.config)!=null?p:{}),(0,h.isNonNullable)(t.apiEnv)&&(this.config.apiEnv=t.apiEnv),this.config.synchronizeTime&&(this.timeSynchronisation=new kr);let i=new h.Subject;this.experimental={error$:i};let o=h.safeStorage.get(ji);o?o.startsWith('"')&&o.endsWith('"')?(this.uuid=(0,al.default)(o,'"',""),h.safeStorage.set(ji,this.uuid)):this.uuid=o:(this.uuid=St(),h.safeStorage.set(ji,this.uuid)),this.resetViewSession(),t.useIsid&&this.isid$.next((c=t.isid)!=null?c:ol());let s=new Fe({apiKey:Xc,config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new $e({config:this.config,apiTransport:s,refreshAuthToken:t.refreshAuthToken,mobile:(a=this.statContext.mobile)!=null?a:!1,uuid:this.uuid,error$:i}),this.logger=new Nr({config:this.config,debugLogger:this.debugLogger,api:this.api,error$:i,userSalt:t.userSalt});let{isEmbed:u,host:l}=(0,$r.detectEmbed)();this.isEmbed=u,this.embedParent=l,this.subscribe()}updateContext(e){this.statContext={...this.statContext,...e}}attachTo(e){let t=new h.Subscription,i=(a,f)=>t.add(a.subscribe(f));i(e.events.willStart$,()=>{let a=e.info.position$.getValue();this.logActionPlay({position:a}),this.statContext.projectId&&this.logActionPlayInteractive({position:a})}),i(e.events.looped$,()=>{this.resetViewSession(),++this.loopCounter>this.config.maxLoops&&(this.disabled=!0),this.logActionPlay({position:e.info.position$.getValue()})}),i(e.events.seeked$,()=>{this.logSeek({action:this.seekAction$.getValue(),time:e.info.position$.getValue()}),this.seekAction$.next("unknown")}),i(e.events.paused$,()=>{this.logPause({position:e.info.position$.getValue()})}),i(e.events.willResume$,()=>{this.logPlay()}),i(e.events.started$,()=>{this.statContext.clip&&this.logWatchCoverageRecord({start:0,end:0})}),i(nl(e,{forceInterval:this.config.watchCoverageInterval}),a=>{let f=e.info.isLive$.getValue(),v={start:parseFloat(a.from.toFixed(3)),end:parseFloat(a.to.toFixed(3))};f?this.logWatchCoverageLive(v):this.logWatchCoverageRecord(v)});let o;i(e.info.isStalled$,a=>{a?o=(0,h.now)():((0,h.isNonNullable)(o)&&this.logEmptyBuffer({duration:(0,h.now)()-o}),o=void 0)});let s=!1;t.add(e.events.fatalError$.pipe((0,h.once)()).subscribe(()=>s=!0)),i(e.events.willStop$,()=>{if(e.info.isStalled$.getValue()){let f=(0,h.isNonNullable)(o)?(0,h.now)()-o:void 0;this.logCloseAtEmptyBuffer({duration:f!=null?f:0}),o=void 0}else s||this.logActionStop()}),i(e.events.managedError$,({id:a})=>{this.logError({fatal:!1,errorType:a})}),i(e.events.fatalError$,({id:a})=>{this.logError({fatal:!0,errorType:a})});let u,l,p=!1;i(e.events.firstBytes$,a=>{u=(0,h.now)(),this.logFirstBytes({time:a})}),i(e.events.willStart$,()=>l=(0,h.now)()),i(e.info.currentBuffer$,a=>{!p&&a&&a.end-a.start>0&&(0,h.isNonNullable)(u)&&(this.logPlayerReady({duration:(0,h.now)()-u}),p=!0)}),i(e.events.firstFrame$,()=>{(0,h.isNonNullable)(u)&&!p&&(this.logPlayerReady({duration:(0,h.now)()-u}),p=!0),(0,h.isNonNullable)(l)&&this.logFirstFrame({time:(0,h.now)()-l})}),i(e.info.atLiveEdge$,a=>this.updateContext({liveEdge:a})),i((0,h.combine)({muted:e.info.muted$,volume:e.info.volume$}),({muted:a,volume:f})=>this.updateContext({audible:!a&&f>0})),i(e.info.currentQuality$,a=>this.updateContext({quality:el(a)})),i(e.info.isAutoQualityEnabled$,a=>this.updateContext({autoQuality:a})),i(e.info.currentFormat$,a=>this.updateContext({contentType:rl(a)})),i(e.info.currentPlaybackRate$,a=>this.updateContext({rate:a})),i(e.info.is3DVideo$,a=>this.updateContext({is3d:a}));let c;return i(e.info.hostname$,a=>{let f=c!==void 0&&c!==a;this.updateContext({cdnHostname:a,failover:f}),f&&this.logFailover(a),c=a}),i(e.info.throughputEstimation$,a=>this.updateContext({downloadSpeed:a})),i(e.info.httpConnectionType$,a=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:$i(a)}),this.updateContext({connectionType:$i(a)})}),i(e.info.httpConnectionReused$,a=>{(0,h.isNullable)(this.statContext.firstConnectionReused)&&this.updateContext({firstConnectionReused:a}),this.updateContext({connectionReused:a})}),i(e.info.surface$,a=>this.updateContext({mode:Lr(a)})),i((0,h.combine)({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:a,available:f})=>{let v=f.find(({id:m})=>m===a),d=v&&(v.isAuto?`${v.language}_auto`:v.language);this.updateContext({subtitles:d})}),this.player=e,this.uiEvents&&this.attachToUi(this.uiEvents),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToUi(e){this.uiEvents=e;let{subscription:t,subscribe:i}=Fi();return this.player&&(i(e.actionRewind$,()=>{this.player&&(this.resetViewSession(),this.logActionPlay({position:this.player.info.position$.getValue()}))}),i(e.actionSeek$,this.seekAction$),i(e.inPiP$,o=>{var u;let s=o?"pip":Lr((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:s})}),i(e.inFullscreen$,o=>{var u;let s=o?"fullscreen":Lr((u=this.player)==null?void 0:u.info.surface$.getValue());this.updateContext({mode:s})}),i(e.actionSetSubtitle$,o=>this.updateContext({subtitles:o})),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t)),t}attachToAds(e){let{subscription:t,subscribe:i}=Fi();return i(e.slotRequested$,()=>this.logAdSlotRequest()),i(e.started$,o=>this.logAdStarted(o)),i(e.paused$,()=>this.logAdPaused()),i(e.resumed$,()=>this.logAdResumed()),i(e.ended$,()=>this.logAdEnded()),i(e.skipped$,()=>this.logAdSkipped()),i(e.clicked$,()=>this.logAdClicked()),this.resubscribeBeforeunload(),this.subscription.add(t),t}attachToInteractive(e){let{subscription:t,subscribe:i}=Fi();return i(e.click$,o=>this.logInterfaceClick(o)),i(e.nextMovie$,o=>this.logNextMovie(o)),this.resubscribeBeforeunload(),this.subscription.add(t),t}authorize(e){return this.api.authorize(e)}pause(){this.logger.pause(),this.oneStatDebugLog({message:"paused"})}resume(){this.logger.resume(),this.oneStatDebugLog({message:"resumed"})}destroy(){this.logger.flush(),this.subscription.unsubscribe(),this.api.destroy(),this.logger.destroy()}resetViewSession(){this.oneStatDebugLog({message:"VSID reset"}),this.vsid$.next(il())}getDeviceId(){return this.uuid}setFieldBlacklist(){}logInited(){}logReady(e){this.log({operation:"player_ready",param:String(e.time)})}logStarted(...e){this.logActionPlay(...e)}logPlay(){this.log({operation:"play_toggle"})}logPause(e){this.log({operation:"pause",param:String(Math.round(e.position))})}logSeek(e){this.log({operation:"seek",param:e.action,time:e.time})}logFirstBytes(e){this.log({operation:"first_bytes",param:String(e.time)})}logFirstFrame(e){this.log({operation:"first_frame",param:String(e.time)})}logError(e){this.log({operation:"content_error",param:`${e.fatal?"fatal":"recoverable"}_${e.errorType}`})}logWatchCoverageRecord(e){this.log({operation:"watch_coverage_record",param:`${e.start}-${e.end}`})}logWatchCoverageLive(e){var s,u;let t=(u=(s=this.timeSynchronisation)==null?void 0:s.getOffset())!=null?u:0,i=e.start+t,o=e.end+t;this.log({operation:"watch_coverage_live",param:`${i}-${o}`})}logEmptyBuffer(e){this.log({operation:"empty_buffer",param:String(e.duration)})}logDownloadSpeed(){}logAdSlotRequest(){this.log({operation:"adv",param:"slot_request"})}logAdStarted(e){this.log({operation:"adv",param:e})}logAdPaused(){this.log({operation:"adv",param:"pause"})}logAdResumed(){this.log({operation:"adv",param:"resume"})}logAdEnded(){this.log({operation:"adv",param:"ended"})}logAdSkipped(){this.log({operation:"adv",param:"skip"})}logAdClicked(){this.log({operation:"adv",param:"click"})}logInterfaceClick(e){this.log({operation:"player_interface_click",param:e})}logNextMovie(e){this.log({operation:"next_movie",param:String(e)})}subscribe(){this.resubscribeBeforeunload();let e=window.navigator.connection;e&&"onchange"in e&&"effectiveType"in e&&this.subscription.add((0,h.merge)((0,h.fromEvent)(e,"change"),(0,h.observableFrom)(["init"])).subscribe(()=>this.updateContext({network:tl(e.effectiveType)}))),this.config.debugLog&&this.debugLogger.log$.subscribe(t=>{console.debug("%c stat ","background:#fa6470;",`component: ${t.component}.`,t.message)})}resubscribeBeforeunload(){var e;(e=this.beforeunloadSubscription)==null||e.unsubscribe(),this.beforeunloadSubscription=(0,h.fromEvent)(window,"beforeunload").subscribe(()=>this.logger.flush(!0)),this.subscription.add(this.beforeunloadSubscription)}logPlayerReady(e){this.log({operation:"player_ready",param:String(Math.round(e.duration))})}logActionPlay(e){this.log({operation:"action_play",param:String(Math.round(e.position))})}logActionPlayInteractive(e){this.statContext.projectId&&this.log({operation:"action_play_interactive",param:String(Math.round(e.position))},{vid:this.statContext.projectId})}logFailover(e){this.log({operation:"failover",param:e})}logCloseAtEmptyBuffer(e){this.log({operation:"close_at_empty_buffer",param:String(Math.round(e.duration))})}logActionStop(){this.log({operation:"action_stop"})}log(e,t={}){if(this.disabled){this.oneStatDebugLog({message:`operation ${e.operation} but statistics is disabled`});return}if(this.config.disabledOperations.includes(e.operation)){this.oneStatDebugLog({message:`operation ${e.operation} but it is disabled`});return}this.oneStatDebugLog({message:`operation ${e.operation} ${e.param}`});let i=this.createLogItem(e,t);this.logger.log(i)}createLogItem({operation:e,param:t,time:i},o={}){var d,m;let s=(m=(d=this.timeSynchronisation)==null?void 0:d.now())!=null?m:(0,h.now)(),u=this.vsid$.getValue();(0,h.assertNonNullable)(u);let l=this.isid$.getValue(),p=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,c=this.statContext.firstConnectionReused,a,f;if(this.isEmbed){a=this.embedParent;let y=[...new URLSearchParams(location.search).entries()].filter(([E,S])=>this.config.embedUrlParams.includes(E));f=new URLSearchParams(y).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(a=new URL(this.statContext.refDomain||document.referrer).hostname),f=location.href.substring(0,1024));let v={vsid:u,isid:l,vid:this.statContext.movieId,ct:this.statContext.contentType,place:this.isEmbed?"embed":this.statContext.place,quality:this.statContext.quality,cdn_host:this.statContext.cdnHostname,stat_type:this.statContext.autoplay===!0?"auto":this.statContext.autoplay===!1?"":void 0,param:t,vk_app_id:this.statContext.vkAppId,track_code:this.statContext.trackCode,connection_type:p,connection_reused:c===!0?1:c===!1?0:void 0,cached_data:this.statContext.cached===!0?1:this.statContext.cached===!1?0:void 0,live:this.statContext.liveEdge?1:void 0,muted:this.statContext.audible===!1?1:void 0,mode:this.statContext.mode,subtitles:this.statContext.subtitles,download_speed:this.statContext.downloadSpeed,manual_quality:this.statContext.autoQuality?void 0:1,ref_domain:a,direct_url:f,rate:this.statContext.rate===1||(0,h.isNullable)(this.statContext.rate)?void 0:this.statContext.rate.toFixed(2),view_360:this.statContext.is3d?1:void 0,aid:this.statContext.albumId,vk_playlist_id:this.statContext.vkPlaylistId,...o};for(let y of this.config.disabledCustomFields)delete v[y];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:s,custom:v}}};
|