@vkontakte/videoplayer-statistics 1.0.51-dev.d7acf2ac.0 → 1.0.51-dev.f47bf7bc.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 +3 -3
- package/es2015.esm.js +3 -3
- package/es2018.cjs.js +3 -3
- package/es2018.esm.js +3 -3
- package/esnext.cjs.js +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +3 -3
- package/types/OneStat.d.ts +1 -0
package/esnext.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-statistics v1.0.51-dev.
|
|
3
|
-
* Wed,
|
|
2
|
+
* @vkontakte/videoplayer-statistics v1.0.51-dev.f47bf7bc.0
|
|
3
|
+
* Wed, 10 Jul 2024 00:43:28 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-51/doc/
|
|
5
5
|
*/
|
|
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{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>"u"&&Vr!==void 0;oo.exports={all:Vr,IS_HTMLDDA:ql}});var y=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=y(),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=y(),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<"u"&&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=y(),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{return"Object"}}});var B=n((Vb,jo)=>{"use strict";var Ql=y(),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=y(),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{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{}if(Bf(e,t))return Mf(!Df($f.f,e,t),e[t])}});var ut=n((ny,pn)=>{"use strict";var Vf=x(),Gf=y(),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{}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=y(),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,c=i?oe:oe[t]||ne(oe,t,{})[t],p=c.prototype,f,a,d,v,l,m,S,E,I;for(v in e)f=gd(i?v:t+(o?".":"#")+v,r.forced),a=!f&&u&&In(u,v),m=c[v],a&&(r.dontCallGetSet?(I=hd(u,v),S=I&&I.value):S=u[v]),l=a&&S?S:e[v],!(a&&typeof m==typeof l)&&(r.bind&&a?E=md(l,Xe):r.wrap&&a?E=bd(l):s&&vd(l)?E=pd(l):E=l,(r.sham||l&&l.sham||m&&m.sham)&&ne(E,"sham",!0),ne(c,v,E),s&&(d=t+"Prototype",In(oe,d)||ne(oe,d,{}),ne(oe[d],v,l),r.real&&p&&(f||!p[v])&&ne(p,v,l)))}});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=y(),er=ee(),_d=T(),xd=_d("toStringTag"),Rd=Object,wd=er(function(){return arguments}())=="Arguments",Ad=function(r,e){try{return r[e]}catch{}};_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,c=i.length,p=Vd;return o!==void 0&&(o=jd(o),p=Ud),Bd(s,p,function(f,a){var d;switch(vt(a,0)){case"$":return"$";case"&":return r;case"`":return ht(e,0,t);case"'":return ht(e,u);case"<":d=o[ht(a,1,-1)];break;default:var v=+a;if(v===0)return f;if(v>c){var l=Fd(v/10);return l===0?f:l<=c?i[l-1]===void 0?vt(a,1):i[l-1]+vt(a,1):f}d=i[v-1]}return d===void 0?"":d})}});var Bn=n(()=>{"use strict";var Gd=k(),Kd=_(),mt=O(),$n=Ge(),Wd=y(),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,c,p,f,a,d,v,l=0,m=0,S="";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(c=se(i),p=se(e),f=Wd(t),f||(t=se(t)),a=p.length,d=ip(1,a),l=jn(c,p,0);l!==-1;)v=f?se(t(p,l,c)):Jd(p,c,l,[],void 0,t),S+=Mn(c,m,l)+v,m=l+a,l=jn(c,p,l+d);return m<c.length&&(S+=Mn(c,m)),S}})});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<"u"&&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{}}});var sa=n((Dy,aa)=>{"use strict";var pp=y(),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{}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=y(),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=y(),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{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{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=y(),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<"u"});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{}}});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=y(),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=y(),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=y(),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,c=r.domain,p,f,a;try{o?(i||(e.rejection===Fs&&dh(e),e.rejection=ii),o===!0?p=t:(c&&c.enter(),p=o(t),c&&(c.exit(),a=!0)),p===r.promise?u($s("Promise-chain cycle")):(f=Bs(p))?ge(f,p,s,u):s(p)):u(t)}catch(d){c&&!a&&c.exit(),u(d)}},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{}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),c=!!(t&&t.INTERRUPTED),p=Dh(e,i),f,a,d,v,l,m,S,E=function(q){return f&&cu(f,"normal",q),new yr(!0,q)},I=function(q){return o?(Mh(q),c?p(q[0],q[1],E):p(q[0],q[1])):c?p(q,E):p(q)};if(s)f=r.iterator;else if(u)f=r;else{if(a=Vh(r),!a)throw Gh(jh(r)+" is not iterable");if(Fh(a)){for(d=0,v=Bh(r);v>d;d++)if(l=I(r[d]),l&&uu(lu,l))return l;return new yr(!1)}f=Uh(r,a)}for(m=s?r.next:f.next;!(S=$h(m,f)).done;){try{l=I(S.value)}catch(q){cu(f,"throw",q)}if(typeof l=="object"&&l&&uu(lu,l))return l}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{}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{}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 c=Jh(t.resolve),p=[],f=0,a=1;eg(e,function(d){var v=f++,l=!1;a++,Yh(c,t,d).then(function(m){l||(l=!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=y(),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(c){cg(u,t,c).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=y(),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),c;if(r&&t!=t){for(;s>u;)if(c=o[u++],c!=c)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,c;s>u;)rm.f(e,c=o[u++],i[c]);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{}qr=typeof document<"u"?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=y(),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=y(),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=y(),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 c=function(I){if(I===o&&v)return v;if(!Tr&&I in a)return a[I];switch(I){case Ec:return function(){return new t(this,I)};case ke:return function(){return new t(this,I)};case qc:return function(){return new t(this,I)}}return function(){return new t(this)}},p=e+" Iterator",f=!1,a=r.prototype,d=a[Le]||a["@@iterator"]||o&&a[o],v=!Tr&&d||c(o),l=e=="Array"&&a.entries||d,m,S,E;if(l&&(m=bc(l.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&&d&&d.name!==ke&&(!Pr&&Bm?Mm(a,"name",ke):(f=!0,v=function(){return Lm(d,this)})),o)if(S={values:c(ke),keys:s?v:c(Ec),entries:c(qc)},u)for(E in S)(Tr||f||!(E in a))&&xi(a,E,S[E]);else Nm({target:e,proto:!0,forced:Tr||f},S);return(!Pr||u)&&a[Le]!==v&&xi(a,Le,v,{name:o}),Sc[e]=v,S}});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{}});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=(f=>(f.Q144P="mobile",f.Q240P="lowest",f.Q360P="low",f.Q480P="medium",f.Q720P="high",f.Q1080P="fullhd",f.Q1440P="quadhd",f.Q2160P="ultrahd",f.UNKNOWN="unknown",f))(rr||{}),tr=(l=>(l.MP4="mp4",l.DASH="dash",l.DASH_SEP="dash_sep",l.ONDEMAND_DASH="ondemand_dash",l.HLS="hls",l.ONDEMAND_HLS="ondemand_hls",l.WEBM="webm",l.AV1="av1",l.ONDEMAND_DASH_LIVE="ondemand_dash_live",l.ONDEMAND_HLS_LIVE="ondemand_hls_live",l.WEBRTC="webrtc",l.UNKNOWN="unknown",l.RTMP="rtmp",l))(tr||{});var ir=(i=>(i.HTTP1="http1",i.HTTP2="http2",i.HTTP3="http3",i))(ir||{});var or=(c=>(c.SLIDER="slider",c.DOUBLE_TAP="double_tap",c.TIME_CODE="time_code",c.EPISODE="episode",c.REWIND="rewind",c.LIVE="live",c.UNKNOWN="unknown",c))(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=>{let{operation:e,custom:t}=r,i=(0,Yc.default)(Object.entries(t).map(([o,s])=>{let u=Yn[o]??o,c=s;return s&&(o==="mode"?c=Xn[s]??s:o==="quality"&&(c=Jn[s]??s)),[u,c]}));return{...r,operation:Qn[e]??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??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){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey??await this._authorizeWithBackoff();if(!o)return;let s=async(u,c=this.params.config.requestRetryCount)=>{try{return await this.params.apiTransport.sendRequest(t,i,o)}catch(p){if(!p||!("error_code"in p)){this.params.error$.next({id:"logRequestUnknown",category:$.ErrorCategory.NETWORK,message:`Unknown ${t} error`,thrown:p});return}let f=p?.error_code;switch(f){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=await this._authorizeWithBackoff(),c>0?s(u,c-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=await this.refreshAuthToken(),this.sessionKey=await this._authorizeWithBackoff(),c>0?s(u,c-1):void 0;default:{this.params.error$.next({id:`LogRequest#${f}`,category:$.ErrorCategory.EXTERNAL_API,message:`${t} error`,data:p});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=>((!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:$.ErrorCategory.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=i?.session_key??void 0,this.sessionKey)).catch(async i=>{this.sessionKey=void 0;let o=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(c){Promise.resolve().then(()=>{throw c})}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{typeof document<"u"?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>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch{i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&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(f,a){let d;a&&a.signal&&(d=a.signal,delete a.signal);let v=new t(f,a);return d&&Object.defineProperty(v,"signal",{writable:!1,enumerable:!1,configurable:!0,value:d}),v},s.prototype=t.prototype);let u=e;return{fetch:(p,f)=>{let a=s&&s.prototype.isPrototypeOf(p)?p.signal:f?f.signal:void 0;if(a){let d;try{d=new DOMException("Aborted","AbortError")}catch{d=new Error("Aborted"),d.name="AbortError"}if(a.aborted)return Promise.reject(d);let v=new Promise((l,m)=>{a.addEventListener("abort",()=>m(d),{once:!0})});return f&&f.signal&&delete f.signal,Promise.race([v,u(p,f)])}return u(p,f)},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(){if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let e=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=(await(await Li(e,{method:"GET",mode:"cors",cache:"no-cache"})).json())?.Answer[0]?.data;if(!o)throw new Error("Wrong DNS response");return o}catch(e){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:V.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:e}),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=>{let c=Number(u.headers.get("content-length"))===0,p=new Date(u.headers.get("date")??"").getTime(),f=(0,V.now)()-o;if(isFinite(p)&&this.timeSynchronisation?.addServerTime(p,f),!c)return u.json().then(a=>Object.prototype.hasOwnProperty.call(a,"error_msg")?Promise.reject(a):a,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(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:w.ErrorCategory.WTF,message:String(e)??"Unknown logger error",thrown:e})}}readFromStorage(){let e=w.safeStorage.get(Cr);try{return e?JSON.parse(e):{}}catch{}return{}}addToStorage(e){if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=(t[this.userSalt]??[]).filter(ki(this.params.config.storageExpiration));w.safeStorage.set(Cr,JSON.stringify({...t,[this.userSalt]:[...o,e]}))}getFromStorage(){return this.userSalt?(this.readFromStorage()[this.userSalt]??[]).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(){return this.offset??0}setOffset(e){this.offset=e}now(){return Date.now()+(this.offset??0)}date(e=new Date){return e.setTime(e.getTime()+(this.offset??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$:c,paused$:p}=r.events,f=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)),d=!1,v=new b.Subject;i.add(f.subscribe(()=>{d||v.next(),d=!0})),i.add(a.subscribe(()=>d=!1));let l=new b.Subject,m=new b.Subject,S=(0,b.merge)(c,a,l),E=(0,b.merge)(p,v,o,r.events.looped$,m),I,q=()=>I=s.getValue(),sl=()=>{let G=s.getValue();(0,b.isNullable)(I)||I===G||(0,b.isNullable)(G)||(t.next({from:I,to:G}),I=void 0)},ul=()=>{m.next(),l.next()};if(i.add(S.subscribe(q)),i.add(E.subscribe(sl)),e.forceInterval&&isFinite(e.forceInterval)){let G=0;i.add(S.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");this.statContext=e,this.config=ea(t.config??{}),(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(t.isid??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:this.statContext.mobile??!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:c}=(0,$r.detectEmbed)();this.isEmbed=u,this.embedParent=c,this.subscribe()}updateContext(e){this.statContext={...this.statContext,...e}}attachTo(e){let t=new h.Subscription,i=(a,d)=>t.add(a.subscribe(d));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 d=e.info.isLive$.getValue(),v={start:parseFloat(a.from.toFixed(3)),end:parseFloat(a.to.toFixed(3))};d?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 d=(0,h.isNonNullable)(o)?(0,h.now)()-o:void 0;this.logCloseAtEmptyBuffer({duration:d??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,c,p=!1;i(e.events.firstBytes$,a=>{u=(0,h.now)(),this.logFirstBytes({time:a})}),i(e.events.willStart$,()=>c=(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)(c)&&this.logFirstFrame({time:(0,h.now)()-c})}),i(e.info.atLiveEdge$,a=>this.updateContext({liveEdge:a})),i((0,h.combine)({muted:e.info.muted$,volume:e.info.volume$}),({muted:a,volume:d})=>this.updateContext({audible:!a&&d>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 f;return i(e.info.hostname$,a=>{let d=f!==void 0&&f!==a;this.updateContext({cdnHostname:a,failover:d}),d&&this.logFailover(a),f=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:d})=>{let v=d.find(({id:m})=>m===a),l=v&&(v.isAuto?`${v.language}_auto`:v.language);this.updateContext({subtitles:l})}),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=>{let s=o?"pip":Lr(this.player?.info.surface$.getValue());this.updateContext({mode:s})}),i(e.inFullscreen$,o=>{let s=o?"fullscreen":Lr(this.player?.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){let t=this.timeSynchronisation?.getOffset()??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(){this.beforeunloadSubscription?.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={}){let s=this.timeSynchronisation?.now()??(0,h.now)(),u=this.vsid$.getValue();(0,h.assertNonNullable)(u);let c=this.isid$.getValue(),p=e==="empty_buffer"||e==="close_at_empty_buffer"?this.statContext.connectionType:this.statContext.firstConnectionType,f=this.statContext.firstConnectionReused,a,d;if(this.isEmbed){a=this.embedParent;let l=[...new URLSearchParams(location.search).entries()].filter(([m,S])=>this.config.embedUrlParams.includes(m));d=new URLSearchParams(l).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(a=new URL(this.statContext.refDomain||document.referrer).hostname),d=location.href.substring(0,1024));let v={vsid:u,isid:c,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:f===!0?1:f===!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:d,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 l of this.config.disabledCustomFields)delete v[l];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:s,custom:v}}};
|
|
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{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>"u"&&Vr!==void 0;oo.exports={all:Vr,IS_HTMLDDA:ql}});var S=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=S(),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=S(),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<"u"&&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=S(),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{return"Object"}}});var B=n((Vb,jo)=>{"use strict";var Ql=S(),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=S(),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{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{}if(Bf(e,t))return Mf(!Df($f.f,e,t),e[t])}});var ut=n((ny,pn)=>{"use strict";var Vf=x(),Gf=S(),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{}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=S(),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,a=r.proto,u=i?Xe:o?Xe[t]:(Xe[t]||{}).prototype,l=i?oe:oe[t]||ne(oe,t,{})[t],p=l.prototype,d,f,v,s,c,g,y,E,I;for(s in e)d=gd(i?s:t+(o?".":"#")+s,r.forced),f=!d&&u&&In(u,s),g=l[s],f&&(r.dontCallGetSet?(I=hd(u,s),y=I&&I.value):y=u[s]),c=f&&y?y:e[s],!(f&&typeof g==typeof c)&&(r.bind&&f?E=md(c,Xe):r.wrap&&f?E=bd(c):a&&vd(c)?E=pd(c):E=c,(r.sham||c&&c.sham||g&&g.sham)&&ne(E,"sham",!0),ne(l,s,E),a&&(v=t+"Prototype",In(oe,v)||ne(oe,v,{}),ne(oe[v],s,c),r.real&&p&&(d||!p[s])&&ne(p,s,c)))}});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=S(),er=ee(),_d=T(),xd=_d("toStringTag"),Rd=Object,wd=er(function(){return arguments}())=="Arguments",Ad=function(r,e){try{return r[e]}catch{}};_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,a){var u=t+r.length,l=i.length,p=Vd;return o!==void 0&&(o=jd(o),p=Ud),Bd(a,p,function(d,f){var v;switch(vt(f,0)){case"$":return"$";case"&":return r;case"`":return ht(e,0,t);case"'":return ht(e,u);case"<":v=o[ht(f,1,-1)];break;default:var s=+f;if(s===0)return d;if(s>l){var c=Fd(s/10);return c===0?d:c<=l?i[c-1]===void 0?vt(f,1):i[c-1]+vt(f,1):d}v=i[s-1]}return v===void 0?"":v})}});var Bn=n(()=>{"use strict";var Gd=k(),Kd=_(),mt=O(),$n=Ge(),Wd=S(),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,a,u,l,p,d,f,v,s,c=0,g=0,y="";if(!Hd(e)){if(o=zd(e),o&&(a=se($n(Yd(e))),!~Fn(a,"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),d=Wd(t),d||(t=se(t)),f=p.length,v=ip(1,f),c=jn(l,p,0);c!==-1;)s=d?se(t(p,c,l)):Jd(p,l,c,[],void 0,t),y+=Mn(l,g,c)+s,g=c+f,c=jn(l,p,c+v);return g<l.length&&(y+=Mn(l,g)),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<"u"&&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{}}});var sa=n((Dy,aa)=>{"use strict";var pp=S(),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{}return function(o,a){return mp(o),bp(a),r?t(o,a):o.__proto__=a,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=S(),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=S(),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{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{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=S(),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<"u"});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{}}});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=S(),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=S(),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(a){a(1)}),i=function(a){a(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=S(),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,a=r.resolve,u=r.reject,l=r.domain,p,d,f;try{o?(i||(e.rejection===Fs&&dh(e),e.rejection=ii),o===!0?p=t:(l&&l.enter(),p=o(t),l&&(l.exit(),f=!0)),p===r.promise?u($s("Promise-chain cycle")):(d=Bs(p))?ge(d,p,a,u):a(p)):u(t)}catch(v){l&&!f&&l.exit(),u(v)}},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(a){he(o,a,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,a){ge(As,i,o,a)}).then(e,t)},{unsafe:!0});try{delete pe.constructor}catch{}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(a){o=!0,i=a}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),a=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),p=Dh(e,i),d,f,v,s,c,g,y,E=function(q){return d&&cu(d,"normal",q),new yr(!0,q)},I=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(a)d=r.iterator;else if(u)d=r;else{if(f=Vh(r),!f)throw Gh(jh(r)+" is not iterable");if(Fh(f)){for(v=0,s=Bh(r);s>v;v++)if(c=I(r[v]),c&&uu(lu,c))return c;return new yr(!1)}d=Uh(r,f)}for(g=a?r.next:d.next;!(y=$h(g,d)).done;){try{c=I(y.value)}catch(q){cu(d,"throw",q)}if(typeof c=="object"&&c&&uu(lu,c))return c}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{}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{}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,a=i.reject,u=Zh(function(){var l=Jh(t.resolve),p=[],d=0,f=1;eg(e,function(v){var s=d++,c=!1;f++,Yh(l,t,v).then(function(g){c||(c=!0,p[s]=g,--f||o(p))},a)}),--f||o(p)});return u.error&&a(u.value),i.promise}})});var Su=n(()=>{"use strict";var tg=k(),ig=C(),og=fe().CONSTRUCTOR,li=J(),ng=F(),ag=S(),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,a=dg(function(){var u=lg(t.resolve);pg(e,function(l){cg(u,t,l).then(i.resolve,o)})});return a.error&&o(a.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=S(),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),a=Wg(o),u=Kg(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}};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=[],a;for(a in t)!gi(Yg,a)&&gi(t,a)&&zu(o,a);for(;e.length>i;)gi(t,a=e[i++])&&(~Qg(o,a)||zu(o,a));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),a=o.length,u=0,l;a>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{}qr=typeof document<"u"?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=S(),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=S(),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=S(),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,a,u){Dm(t,e,i);var l=function(I){if(I===o&&s)return s;if(!Tr&&I in f)return f[I];switch(I){case Ec:return function(){return new t(this,I)};case ke:return function(){return new t(this,I)};case qc:return function(){return new t(this,I)}}return function(){return new t(this)}},p=e+" Iterator",d=!1,f=r.prototype,v=f[Le]||f["@@iterator"]||o&&f[o],s=!Tr&&v||l(o),c=e=="Array"&&f.entries||v,g,y,E;if(c&&(g=bc(c.call(new r)),g!==Object.prototype&&g.next&&(!Pr&&bc(g)!==Ic&&(yc?yc(g,Ic):km(g[Le])||xi(g,Le,Pc)),$m(g,p,!0,!0),Pr&&(Sc[p]=Pc))),Fm&&o==ke&&v&&v.name!==ke&&(!Pr&&Bm?Mm(f,"name",ke):(d=!0,s=function(){return Lm(v,this)})),o)if(y={values:l(ke),keys:a?s:l(Ec),entries:l(qc)},u)for(E in y)(Tr||d||!(E in f))&&xi(f,E,y[E]);else Nm({target:e,proto:!0,forced:Tr||d},y);return(!Pr||u)&&f[Le]!==s&&xi(f,Le,s,{name:o}),Sc[e]=s,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{}});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=(a=>(a.PROD="prod",a.VK_ALIAS="vk_alias",a.VIDEOTEST="videotest",a.TEST="test",a.AUTO="auto",a))(ue||{}),rr=(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))(rr||{}),tr=(c=>(c.MP4="mp4",c.DASH="dash",c.DASH_SEP="dash_sep",c.ONDEMAND_DASH="ondemand_dash",c.HLS="hls",c.ONDEMAND_HLS="ondemand_hls",c.WEBM="webm",c.AV1="av1",c.ONDEMAND_DASH_LIVE="ondemand_dash_live",c.ONDEMAND_HLS_LIVE="ondemand_hls_live",c.WEBRTC="webrtc",c.UNKNOWN="unknown",c.RTMP="rtmp",c))(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=(a=>(a.GRAPH_SHOW="iGraphShow",a.GRAPH_HIDE="iGraphHide",a.NEXT_AREA="iNextChapterArea",a.NEXT_BUTTON="iNextChapterBtn",a.WATCH_AGAIN="iWatchAgainBtn",a))(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=>{let{operation:e,custom:t}=r,i=(0,Yc.default)(Object.entries(t).map(([o,a])=>{let u=Yn[o]??o,l=a;return a&&(o==="mode"?l=Xn[a]??a:o==="quality"&&(l=Jn[a]??a)),[u,l]}));return{...r,operation:Qn[e]??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??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){let t="log.externalLog",i=this.createLogParams(e),o=this.sessionKey??await this._authorizeWithBackoff();if(!o)return;let a=async(u,l=this.params.config.requestRetryCount)=>{try{return await this.params.apiTransport.sendRequest(t,i,o)}catch(p){if(!p||!("error_code"in p)){this.params.error$.next({id:"logRequestUnknown",category:$.ErrorCategory.NETWORK,message:`Unknown ${t} error`,thrown:p});return}let d=p?.error_code;switch(d){case 102:case 103:case 104:return this.authorized$.next(!1),this.sessionKey=await this._authorizeWithBackoff(),l>0?a(u,l-1):void 0;case 401:return this.authorized$.next(!1),this.authToken=await this.refreshAuthToken(),this.sessionKey=await this._authorizeWithBackoff(),l>0?a(u,l-1):void 0;default:{this.params.error$.next({id:`LogRequest#${d}`,category:$.ErrorCategory.EXTERNAL_API,message:`${t} error`,data:p});return}}}};return a(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=>((!i||!i.session_key)&&this.params.error$.next({id:"AuthorizeFailed",category:$.ErrorCategory.EXTERNAL_API,message:"No session key",data:i}),this.sessionKey=i?.session_key??void 0,this.sessionKey)).catch(async i=>{this.sessionKey=void 0;let o=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,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}},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{typeof document<"u"?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>"u")i=new Error("This operation was aborted"),i.name="AbortError";else try{i=new DOMException("signal is aborted without reason")}catch{i=new Error("This operation was aborted"),i.name="AbortError"}this.signal.reason=i,this.signal.dispatchEvent(t)}toString(){return"[object AbortController]"}};typeof Symbol<"u"&&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:a};let a=t;(a&&!a.prototype.hasOwnProperty("signal")||o)&&(a=function(d,f){let v;f&&f.signal&&(v=f.signal,delete f.signal);let s=new t(d,f);return v&&Object.defineProperty(s,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),s},a.prototype=t.prototype);let u=e;return{fetch:(p,d)=>{let f=a&&a.prototype.isPrototypeOf(p)?p.signal:d?d.signal:void 0;if(f){let v;try{v=new DOMException("Aborted","AbortError")}catch{v=new Error("Aborted"),v.name="AbortError"}if(f.aborted)return Promise.reject(v);let s=new Promise((c,g)=>{f.addEventListener("abort",()=>g(v),{once:!0})});return d&&d.signal&&delete d.signal,Promise.race([s,u(p,d)])}return u(p,d)},Request:a}}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(){if(this.apiEnv!=="auto"||this.isApiBaseUrlFetched)return this.apiBaseUrl;try{let e=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),o=(await(await Li(e,{method:"GET",mode:"cors",cache:"no-cache"})).json())?.Answer[0]?.data;if(!o)throw new Error("Wrong DNS response");return o}catch(e){return this.params.error$.next({id:"OneStat:ApiTransport:resolveApiBaseUrl",category:V.ErrorCategory.NETWORK,message:"Unhandled resolve api base url error",thrown:e}),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}),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: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)(),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: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=>{let l=Number(u.headers.get("content-length"))===0,p=new Date(u.headers.get("date")??"").getTime(),d=(0,V.now)()-o;if(isFinite(p)&&this.timeSynchronisation?.addServerTime(p,d),!l)return u.json().then(f=>Object.prototype.hasOwnProperty.call(f,"error_msg")?Promise.reject(f):f,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"),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(){try{this.flush()}catch(e){this.error$.next({id:"LoggerError",category:w.ErrorCategory.WTF,message:String(e)??"Unknown logger error",thrown:e})}}readFromStorage(){let e=w.safeStorage.get(Cr);try{return e?JSON.parse(e):{}}catch{}return{}}addToStorage(e){if(!this.userSalt){this.unsaltedStorage.push(e);return}let t=this.readFromStorage(),o=(t[this.userSalt]??[]).filter(ki(this.params.config.storageExpiration));w.safeStorage.set(Cr,JSON.stringify({...t,[this.userSalt]:[...o,e]}))}getFromStorage(){return this.userSalt?(this.readFromStorage()[this.userSalt]??[]).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 m=require("@vkontakte/videoplayer-core"),Di=require("@vkontakte/videoplayer-shared");var el=r=>r&&{[m.VideoQuality.INVARIANT]:"unknown",[m.VideoQuality.Q_144P]:"mobile",[m.VideoQuality.Q_240P]:"lowest",[m.VideoQuality.Q_360P]:"low",[m.VideoQuality.Q_480P]:"medium",[m.VideoQuality.Q_720P]:"high",[m.VideoQuality.Q_1080P]:"fullhd",[m.VideoQuality.Q_1440P]:"quadhd",[m.VideoQuality.Q_2160P]:"ultrahd",[m.VideoQuality.Q_4320P]:"unknown"}[r],$i=r=>r&&{[m.HttpConnectionType.HTTP1]:"http1",[m.HttpConnectionType.HTTP2]:"http2",[m.HttpConnectionType.QUIC]:"http3"}[r],rl=r=>{if(r!==void 0)switch(r){case m.VideoFormat.MPEG:return"mp4";case m.VideoFormat.DASH:case m.VideoFormat.DASH_LIVE:case m.VideoFormat.DASH_STREAMS:return"dash";case m.VideoFormat.DASH_SEP:return"dash_sep";case m.VideoFormat.DASH_ONDEMAND:return"ondemand_dash";case m.VideoFormat.DASH_WEBM:case m.VideoFormat.DASH_LIVE_WEBM:return"webm";case m.VideoFormat.DASH_WEBM_AV1:return"av1";case m.VideoFormat.DASH_LIVE_CMAF:return"ondemand_dash_live";case m.VideoFormat.HLS:case m.VideoFormat.HLS_LIVE:return"hls";case m.VideoFormat.HLS_ONDEMAND:return"ondemand_hls";case m.VideoFormat.HLS_LIVE_CMAF:return"ondemand_hls_live";case m.VideoFormat.WEB_RTC_LIVE:return"webrtc";default:return(0,Di.assertNever)(r)}},Lr=r=>{if(r!==void 0)switch(r){case m.Surface.NONE:case m.Surface.INLINE:return;case m.Surface.FULLSCREEN:return"fullscreen";case m.Surface.SECOND_SCREEN:return"chromecast";case m.Surface.PIP:return"pip";case m.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(){return this.offset??0}setOffset(e){this.offset=e}now(){return Date.now()+(this.offset??0)}date(e=new Date){return e.setTime(e.getTime()+(this.offset??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$),a=new b.ValueSubject(void 0),u;i.add(r.info.isLive$.pipe((0,b.filterChanged)()).subscribe(G=>{u&&(u.unsubscribe(),a.next(void 0)),G?u=r.info.liveTime$.pipe((0,b.map)(Mr=>Mr&&Mr/1e3)).subscribe(a):u=r.info.position$.subscribe(a),i.add(u)}));let{playing$:l,paused$:p}=r.events,d=r.events.willSeek$.pipe((0,b.filter)(()=>r.info.playbackState$.getValue()===Mi.PlaybackState.PLAYING)),f=r.events.seeked$.pipe((0,b.filter)(()=>r.info.playbackState$.getValue()===Mi.PlaybackState.PLAYING)),v=!1,s=new b.Subject;i.add(d.subscribe(()=>{v||s.next(),v=!0})),i.add(f.subscribe(()=>v=!1));let c=new b.Subject,g=new b.Subject,y=(0,b.merge)(l,f,c),E=(0,b.merge)(p,s,o,r.events.looped$,g),I,q=()=>I=a.getValue(),sl=()=>{let G=a.getValue();(0,b.isNullable)(I)||I===G||(0,b.isNullable)(G)||(t.next({from:I,to:G}),I=void 0)},ul=()=>{g.next(),c.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");this.statContext=e,this.config=ea(t.config??{}),(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(t.isid??ol());let a=new Fe({apiKey:Xc,config:this.config,error$:i,timeSynchronisation:this.timeSynchronisation});this.api=new $e({config:this.config,apiTransport:a,refreshAuthToken:t.refreshAuthToken,mobile:this.statContext.mobile??!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=(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(nl(e,{forceInterval:this.config.watchCoverageInterval}),s=>{let c=e.info.isLive$.getValue(),g={start:parseFloat(s.from.toFixed(3)),end:parseFloat(s.to.toFixed(3))};c?this.logWatchCoverageLive(g):this.logWatchCoverageRecord(g)});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??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,p=!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=>{!p&&s&&s.end-s.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})});let d;i(e.info.currentVideoStream$,s=>{s&&(d&&s.id!==d&&this.logTrackSwitch(s),d=s.id)});let f;i(e.info.currentAudioStream$,s=>{s&&(f&&s.id!==f&&this.logTrackSwitch(s),f=s.id)}),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:el(s)})),i(e.info.isAutoQualityEnabled$,s=>this.updateContext({autoQuality:s})),i(e.info.currentFormat$,s=>this.updateContext({contentType:rl(s)})),i(e.info.currentPlaybackRate$,s=>this.updateContext({rate:s})),i(e.info.is3DVideo$,s=>this.updateContext({is3d:s}));let v;return i(e.info.hostname$,s=>{let c=v!==void 0&&v!==s;this.updateContext({cdnHostname:s,failover:c}),c&&this.logFailover(s),v=s}),i(e.info.throughputEstimation$,s=>this.updateContext({downloadSpeed:s})),i(e.info.httpConnectionType$,s=>{this.statContext.firstConnectionType||this.updateContext({firstConnectionType:$i(s)}),this.updateContext({connectionType:$i(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:Lr(s)})),i((0,h.combine)({current:e.info.currentTextTrack$,available:e.info.availableTextTracks$}),({current:s,available:c})=>{let g=c.find(({id:E})=>E===s),y=g&&(g.isAuto?`${g.language}_auto`:g.language);this.updateContext({subtitles:y})}),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=>{let a=o?"pip":Lr(this.player?.info.surface$.getValue());this.updateContext({mode:a})}),i(e.inFullscreen$,o=>{let a=o?"fullscreen":Lr(this.player?.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}=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){let t=this.timeSynchronisation?.getOffset()??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(){this.beforeunloadSubscription?.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"})}logTrackSwitch(e){this.log({operation:"track_switch",param:e.id})}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={}){let a=this.timeSynchronisation?.now()??(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,d=this.statContext.firstConnectionReused,f,v;if(this.isEmbed){f=this.embedParent;let c=[...new URLSearchParams(location.search).entries()].filter(([g,y])=>this.config.embedUrlParams.includes(g));v=new URLSearchParams(c).toString()}else this.statContext.place==="direct"&&((this.statContext.refDomain||document.referrer)&&(f=new URL(this.statContext.refDomain||document.referrer).hostname),v=location.href.substring(0,1024));let s={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: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:f,direct_url:v,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 c of this.config.disabledCustomFields)delete s[c];return{operation:e,type:1,time:i,network:this.statContext.network,timestamp:a,custom:s}}};
|