@vkontakte/videoplayer 1.1.81-dev.ea6e4e42.0 → 1.1.81-dev.f4d0e2c9.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.esm.js CHANGED
@@ -1,63 +1,63 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.81-dev.ea6e4e42.0
3
- * Wed, 14 Jan 2026 08:03:21 GMT
2
+ * @vkontakte/videoplayer v1.1.81-dev.f4d0e2c9.0
3
+ * Tue, 20 Jan 2026 09:24:08 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-81/doc/
5
5
  */
6
- var l$=Object.defineProperty,d$=Object.defineProperties;var c$=Object.getOwnPropertyDescriptors;var Xv=Object.getOwnPropertySymbols;var u$=Object.prototype.hasOwnProperty,p$=Object.prototype.propertyIsEnumerable;var Zv=t=>{throw TypeError(t)};var Tp=(t,e,i)=>e in t?l$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ee=(t,e)=>{for(var i in e||(e={}))u$.call(e,i)&&Tp(t,i,e[i]);if(Xv)for(var i of Xv(e))p$.call(e,i)&&Tp(t,i,e[i]);return t},Gt=(t,e)=>d$(t,c$(e));var pr=(t,e,i)=>Tp(t,typeof e!="symbol"?e+"":e,i),Ip=(t,e,i)=>e.has(t)||Zv("Cannot "+i);var Di=(t,e,i)=>(Ip(t,e,"read from private field"),i?i.call(t):e.get(t)),Qs=(t,e,i)=>e.has(t)?Zv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),dl=(t,e,i,o)=>(Ip(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Jv=(t,e,i)=>(Ip(t,e,"access private method"),i);var vt=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())});var Gs="[",Ys="[!",$a="]",ls={};var to=Symbol(),Wn=Symbol("filename"),eg=Symbol("hmr"),tg="http://www.w3.org/1999/xhtml",zc="http://www.w3.org/2000/svg";var Ep="@attach";var Wc=!0;var og,ng,ig=(ng=(og=globalThis.process)==null?void 0:og.env)==null?void 0:ng.NODE_ENV,Pe=ig&&!ig.toLowerCase().startsWith("prod");var fr=Array.isArray,rg=Array.prototype.indexOf,nd=Array.from,Pp=Object.keys,po=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,Kc=Object.getOwnPropertyDescriptors,kp=Object.prototype,sg=Array.prototype,ya=Object.getPrototypeOf,Ap=Object.isExtensible;function js(t){return typeof t=="function"}var gt=()=>{};function ag(t){return t()}function Xs(t){for(var e=0;e<t.length;e++)t[e]()}var Go=Symbol("$state"),cl=Symbol("legacy props"),lg=Symbol(""),qc=Symbol("proxy path"),Qc=1,ul=3,mr=8;function Gc(t){return t===this.v}function pl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function dg(t,e){return t!==e}function fl(t){return!pl(t,this.v)}function cg(){if(Pe){let t=new Error(`derived_references_self
6
+ var l$=Object.defineProperty,d$=Object.defineProperties;var c$=Object.getOwnPropertyDescriptors;var Zv=Object.getOwnPropertySymbols;var u$=Object.prototype.hasOwnProperty,p$=Object.prototype.propertyIsEnumerable;var Jv=t=>{throw TypeError(t)};var Pp=(t,e,i)=>e in t?l$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ke=(t,e)=>{for(var i in e||(e={}))u$.call(e,i)&&Pp(t,i,e[i]);if(Zv)for(var i of Zv(e))p$.call(e,i)&&Pp(t,i,e[i]);return t},Qt=(t,e)=>d$(t,c$(e));var lr=(t,e,i)=>Pp(t,typeof e!="symbol"?e+"":e,i),kp=(t,e,i)=>e.has(t)||Jv("Cannot "+i);var Vi=(t,e,i)=>(kp(t,e,"read from private field"),i?i.call(t):e.get(t)),Xs=(t,e,i)=>e.has(t)?Jv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),ul=(t,e,i,o)=>(kp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),eg=(t,e,i)=>(kp(t,e,"access private method"),i);var mt=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())});var Zs="[",Js="[!",xa="]",cs={};var to=Symbol(),Qn=Symbol("filename"),tg=Symbol("hmr"),ig="http://www.w3.org/1999/xhtml",Wc="http://www.w3.org/2000/svg";var Ap="@attach";var Kc=!0;var ng,rg,og=(rg=(ng=globalThis.process)==null?void 0:ng.env)==null?void 0:rg.NODE_ENV,Ae=og&&!og.toLowerCase().startsWith("prod");var dr=Array.isArray,sg=Array.prototype.indexOf,od=Array.from,Lp=Object.keys,po=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,qc=Object.getOwnPropertyDescriptors,Mp=Object.prototype,ag=Array.prototype,wa=Object.getPrototypeOf,Vp=Object.isExtensible;function ea(t){return typeof t=="function"}var vt=()=>{};function lg(t){return t()}function ta(t){for(var e=0;e<t.length;e++)t[e]()}var Ko=Symbol("$state"),pl=Symbol("legacy props"),dg=Symbol(""),Qc=Symbol("proxy path"),Gc=1,fl=3,cr=8;function Yc(t){return t===this.v}function ml(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function cg(t,e){return t!==e}function vl(t){return!ml(t,this.v)}function ug(){if(Ae){let t=new Error(`derived_references_self
7
7
  A derived value cannot reference itself recursively
8
- https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function ug(t){if(Pe){let e=new Error(`effect_in_teardown
8
+ https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function pg(t){if(Ae){let e=new Error(`effect_in_teardown
9
9
  \`${t}\` cannot be used inside an effect cleanup function
10
- https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function pg(){if(Pe){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fg(t){if(Pe){let e=new Error(`effect_orphan
10
+ https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function fg(){if(Ae){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function mg(t){if(Ae){let e=new Error(`effect_orphan
11
11
  \`${t}\` can only be used inside an effect (e.g. during component initialisation)
12
- https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function mg(){if(Pe){let t=new Error(`effect_update_depth_exceeded
12
+ https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function vg(){if(Ae){let t=new Error(`effect_update_depth_exceeded
13
13
  Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
14
- https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vg(){if(Pe){let t=new Error(`hydration_failed
14
+ https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function gg(){if(Ae){let t=new Error(`hydration_failed
15
15
  Failed to hydrate the application
16
- https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function gg(){if(Pe){let t=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function hg(t){if(Pe){let e=new Error(`props_invalid_value
16
+ https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function hg(){if(Ae){let t=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function _g(t){if(Ae){let e=new Error(`props_invalid_value
17
17
  Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
18
- https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function _g(t){if(Pe){let e=new Error(`props_rest_readonly
18
+ https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function bg(t){if(Ae){let e=new Error(`props_rest_readonly
19
19
  Rest element properties of \`$props()\` such as \`${t}\` are readonly
20
- https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function bg(t){if(Pe){let e=new Error(`rune_outside_svelte
20
+ https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function $g(t){if(Ae){let e=new Error(`rune_outside_svelte
21
21
  The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
22
- https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function $g(){if(Pe){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function yg(){if(Pe){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function xg(){if(Pe){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var ds=!1,cs=!1;function wg(){ds=!0}var rd=null;function Cs(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
22
+ https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function yg(){if(Ae){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function xg(){if(Ae){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function wg(){if(Ae){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var us=!1,ps=!1;function Sg(){us=!0}var nd=null;function Ps(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
23
23
  `),r=[`
24
24
  `];for(let a=0;a<o.length;a++){let l=o[a];if(l!=="Error"){if(l.includes("validate_each_keys"))return null;l.includes("svelte/src/internal")||r.push(l)}}if(r.length===1)return null;po(e,"stack",{value:r.join(`
25
- `)}),po(e,"name",{value:`${t}Error`})}return e}function qr(t,e){return t.label=e,Yc(t.v,e),t}function Yc(t,e){var i;return(i=t==null?void 0:t[qc])==null||i.call(t,e),t}function ml(t){if(Pe){let e=new Error(`lifecycle_outside_component
25
+ `)}),po(e,"name",{value:`${t}Error`})}return e}function Xr(t,e){return t.label=e,jc(t.v,e),t}function jc(t,e){var i;return(i=t==null?void 0:t[Qc])==null||i.call(t,e),t}function gl(t){if(Ae){let e=new Error(`lifecycle_outside_component
26
26
  \`${t}(...)\` can only be used during component initialisation
27
- https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Kt=null;function sd(t){Kt=t}var vr=null;function ad(t){vr=t}function vl(t){return Vp("getContext").get(t)}function gl(t,e){return Vp("setContext").set(t,e),e}function ld(){return Vp("getAllContexts")}function B(t,e=!1,i){var o=Kt={p:Kt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ds&&!e&&(Kt.l={s:null,u:null,r1:[],r2:Lr(!1)}),Ao(()=>{o.d=!0}),Pe&&(Kt.function=i,vr=i)}function F(t){var l,d;let e=Kt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=_t,o=Rt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];fo(a.effect),Wi(a.reaction),Lo(a.fn)}}finally{fo(i),Wi(o)}}Kt=e.p,Pe&&(vr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function us(){return!ds||Kt!==null&&Kt.l===null}function Vp(t){var e;return Kt===null&&ml(t),(e=Kt.c)!=null?e:Kt.c=new Map(m$(Kt)||void 0)}function m$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var v$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||Go in t)return t;let e=ya(t);if(e!==kp&&e!==sg)return t;var i=new Map,o=fr(t),r=K(0),a=Pe&&cs?Cs("CreatedAt"):null,l=Rt,d=f=>{var p=Rt;Wi(l);var v=f();return Wi(p),v};o&&i.set("length",K(t.length,a));var s="";function u(f){s=f,qr(r,`${s} version`);for(let[p,v]of i)qr(v,xa(s,p))}return new Proxy(t,{defineProperty(f,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&$g();var $=i.get(p);return $===void 0?$=d(()=>{var y=K(v.value,a);return i.set(p,y),Pe&&typeof p=="string"&&qr(y,xa(s,p)),y}):O($,v.value,!0),!0},deleteProperty(f,p){var v=i.get(p);if(v===void 0){if(p in f){let g=d(()=>K(to,a));i.set(p,g),Rp(r),Pe&&qr(g,xa(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(v,to),Rp(r)}return!0},get(f,p,v){var w;if(p===Go)return t;if(Pe&&p===qc)return u;var $=i.get(p),y=p in f;if($===void 0&&(!y||(w=Qo(f,p))!=null&&w.writable)&&($=d(()=>{var I=ci(y?f[p]:to),C=K(I,a);return Pe&&qr(C,xa(s,p)),C}),i.set(p,$)),$!==void 0){var g=n($);return g===to?void 0:g}return Reflect.get(f,p,v)},getOwnPropertyDescriptor(f,p){var v=Reflect.getOwnPropertyDescriptor(f,p);if(v&&"value"in v){var $=i.get(p);$&&(v.value=n($))}else if(v===void 0){var y=i.get(p),g=y==null?void 0:y.v;if(y!==void 0&&g!==to)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return v},has(f,p){var g;if(p===Go)return!0;var v=i.get(p),$=v!==void 0&&v.v!==to||Reflect.has(f,p);if(v!==void 0||_t!==null&&(!$||(g=Qo(f,p))!=null&&g.writable)){v===void 0&&(v=d(()=>{var w=$?ci(f[p]):to,I=K(w,a);return Pe&&qr(I,xa(s,p)),I}),i.set(p,v));var y=n(v);if(y===to)return!1}return $},set(f,p,v,$){var P;var y=i.get(p),g=p in f;if(o&&p==="length")for(var w=v;w<y.v;w+=1){var I=i.get(w+"");I!==void 0?O(I,to):w in f&&(I=d(()=>K(to,a)),i.set(w+"",I),Pe&&qr(I,xa(s,w)))}if(y===void 0)(!g||(P=Qo(f,p))!=null&&P.writable)&&(y=d(()=>K(void 0,a)),O(y,ci(v)),i.set(p,y),Pe&&qr(y,xa(s,p)));else{g=y.v!==to;var C=d(()=>ci(v));O(y,C)}var N=Reflect.getOwnPropertyDescriptor(f,p);if(N!=null&&N.set&&N.set.call($,v),!g){if(o&&typeof p=="string"){var L=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=L.v&&O(L,E+1)}Rp(r)}return!0},ownKeys(f){n(r);var p=Reflect.ownKeys(f).filter(y=>{var g=i.get(y);return g===void 0||g.v!==to});for(var[v,$]of i)$.v!==to&&!(v in f)&&p.push(v);return p},setPrototypeOf(){yg()}})}function xa(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:v$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Rp(t,e=1){O(t,t.v+e)}function hl(t){try{if(t!==null&&typeof t=="object"&&Go in t)return t[Go]}catch(e){}return t}function Np(t,e){return Object.is(hl(t),hl(e))}function Qr(t){var e=2050,i=Rt!==null&&(Rt.f&2)!==0?Rt:null;_t===null||i!==null&&(i.f&256)!==0?e|=256:_t.f|=1048576;let o={ctx:Kt,deps:null,effects:null,equals:Gc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:_t};return Pe&&cs&&(o.created=Cs("CreatedAt")),o}function m(t){let e=Qr(t);return Zc(e),e}function Sn(t){let e=Qr(t);return e.equals=fl,e}function jc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Ki(e[i])}}var Op=[];function g$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Fp(t){var e,i=_t;if(fo(g$(t)),Pe){let o=wa;Dp(new Set);try{Op.includes(t)&&cg(),Op.push(t),jc(t),e=Xc(t)}finally{fo(i),Dp(o),Op.pop()}}else try{jc(t),e=Xc(t)}finally{fo(i)}return e}function Hp(t){var e=Fp(t);if(t.equals(e)||(t.v=e,t.wv=dd()),!Ts){var i=(Is||(t.f&256)!==0)&&t.deps!==null?4096:1024;Cn(t,i)}}var wa=new Set,_l=new Map;function Dp(t){wa=t}function Lr(t,e){var i={f:0,v:t,reactions:null,equals:Gc,rv:0,wv:0};return Pe&&cs&&(i.created=e!=null?e:Cs("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Lr(t,e);return Zc(i),i}function ps(t,e=!1,i=!0){var r,a;let o=Lr(t);return e||(o.equals=fl),ds&&i&&Kt!==null&&Kt.l!==null&&((a=(r=Kt.l).s)!=null?a:r.s=[]).push(o),o}function O(t,e,i=!1){var r;Rt!==null&&(!_r||(Rt.f&262144)!==0)&&us()&&(Rt.f&262162)!==0&&!((r=jo)!=null&&r[1].includes(t)&&jo[0]===Rt)&&xg();let o=i?ci(e):e;return Pe&&Yc(o,t.label),bl(t,o)}function bl(t,e){if(!t.equals(e)){var i=t.v;if(Ts?_l.set(t,e):_l.set(t,i),t.v=e,Pe&&cs&&(t.updated=Cs("UpdatedAt"),_t!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Fp(t),Cn(t,(t.f&256)===0?1024:4096)),t.wv=dd(),Cg(t,2048),us()&&_t!==null&&(_t.f&1024)!==0&&(_t.f&96)===0&&(hr===null?Tg([t]):hr.push(t)),Pe&&wa.size>0){let o=Array.from(wa);for(let r of o)(r.f&1024)!==0&&Cn(r,4096),Ca(r)&&$l(r);wa.clear()}}return e}function Cg(t,e){var i=t.reactions;if(i!==null)for(var o=us(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===_t)){if(Pe&&(d&262144)!==0){wa.add(l);continue}Cn(l,e),(d&1280)!==0&&((d&2)!==0?Cg(l,4096):ud(l))}}}var yl="font-weight: bold",xl="font-weight: normal";function Ig(t,e,i){Pe?console.warn(`%c[svelte] hydration_attribute_changed
27
+ https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Ut=null;function rd(t){Ut=t}var ur=null;function sd(t){ur=t}function hl(t){return Op("getContext").get(t)}function _l(t,e){return Op("setContext").set(t,e),e}function ad(){return Op("getAllContexts")}function B(t,e=!1,i){var o=Ut={p:Ut,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};us&&!e&&(Ut.l={s:null,u:null,r1:[],r2:Lr(!1)}),ko(()=>{o.d=!0}),Ae&&(Ut.function=i,ur=i)}function H(t){var l,d;let e=Ut;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=bt,o=Dt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];fo(a.effect),Qi(a.reaction),Ao(a.fn)}}finally{fo(i),Qi(o)}}Ut=e.p,Ae&&(ur=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function fs(){return!us||Ut!==null&&Ut.l===null}function Op(t){var e;return Ut===null&&gl(t),(e=Ut.c)!=null?e:Ut.c=new Map(m$(Ut)||void 0)}function m$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var v$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||Ko in t)return t;let e=wa(t);if(e!==Mp&&e!==ag)return t;var i=new Map,o=dr(t),r=q(0),a=Ae&&ps?Ps("CreatedAt"):null,l=Dt,d=m=>{var p=Dt;Qi(l);var v=m();return Qi(p),v};o&&i.set("length",q(t.length,a));var s="";function u(m){s=m,Xr(r,`${s} version`);for(let[p,v]of i)Xr(v,Sa(s,p))}return new Proxy(t,{defineProperty(m,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&yg();var b=i.get(p);return b===void 0?b=d(()=>{var y=q(v.value,a);return i.set(p,y),Ae&&typeof p=="string"&&Xr(y,Sa(s,p)),y}):R(b,v.value,!0),!0},deleteProperty(m,p){var v=i.get(p);if(v===void 0){if(p in m){let g=d(()=>q(to,a));i.set(p,g),Dp(r),Ae&&Xr(g,Sa(s,p))}}else{if(o&&typeof p=="string"){var b=i.get("length"),y=Number(p);Number.isInteger(y)&&y<b.v&&R(b,y)}R(v,to),Dp(r)}return!0},get(m,p,v){var w;if(p===Ko)return t;if(Ae&&p===Qc)return u;var b=i.get(p),y=p in m;if(b===void 0&&(!y||(w=Wo(m,p))!=null&&w.writable)&&(b=d(()=>{var I=ci(y?m[p]:to),C=q(I,a);return Ae&&Xr(C,Sa(s,p)),C}),i.set(p,b)),b!==void 0){var g=n(b);return g===to?void 0:g}return Reflect.get(m,p,v)},getOwnPropertyDescriptor(m,p){var v=Reflect.getOwnPropertyDescriptor(m,p);if(v&&"value"in v){var b=i.get(p);b&&(v.value=n(b))}else if(v===void 0){var y=i.get(p),g=y==null?void 0:y.v;if(y!==void 0&&g!==to)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return v},has(m,p){var g;if(p===Ko)return!0;var v=i.get(p),b=v!==void 0&&v.v!==to||Reflect.has(m,p);if(v!==void 0||bt!==null&&(!b||(g=Wo(m,p))!=null&&g.writable)){v===void 0&&(v=d(()=>{var w=b?ci(m[p]):to,I=q(w,a);return Ae&&Xr(I,Sa(s,p)),I}),i.set(p,v));var y=n(v);if(y===to)return!1}return b},set(m,p,v,b){var P;var y=i.get(p),g=p in m;if(o&&p==="length")for(var w=v;w<y.v;w+=1){var I=i.get(w+"");I!==void 0?R(I,to):w in m&&(I=d(()=>q(to,a)),i.set(w+"",I),Ae&&Xr(I,Sa(s,w)))}if(y===void 0)(!g||(P=Wo(m,p))!=null&&P.writable)&&(y=d(()=>q(void 0,a)),R(y,ci(v)),i.set(p,y),Ae&&Xr(y,Sa(s,p)));else{g=y.v!==to;var C=d(()=>ci(v));R(y,C)}var N=Reflect.getOwnPropertyDescriptor(m,p);if(N!=null&&N.set&&N.set.call(b,v),!g){if(o&&typeof p=="string"){var A=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=A.v&&R(A,E+1)}Dp(r)}return!0},ownKeys(m){n(r);var p=Reflect.ownKeys(m).filter(y=>{var g=i.get(y);return g===void 0||g.v!==to});for(var[v,b]of i)b.v!==to&&!(v in m)&&p.push(v);return p},setPrototypeOf(){xg()}})}function Sa(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:v$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Dp(t,e=1){R(t,t.v+e)}function bl(t){try{if(t!==null&&typeof t=="object"&&Ko in t)return t[Ko]}catch(e){}return t}function Bp(t,e){return Object.is(bl(t),bl(e))}function Zr(t){var e=2050,i=Dt!==null&&(Dt.f&2)!==0?Dt:null;bt===null||i!==null&&(i.f&256)!==0?e|=256:bt.f|=1048576;let o={ctx:Ut,deps:null,effects:null,equals:Yc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:bt};return Ae&&ps&&(o.created=Ps("CreatedAt")),o}function f(t){let e=Zr(t);return Jc(e),e}function In(t){let e=Zr(t);return e.equals=vl,e}function Xc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Gi(e[i])}}var Hp=[];function g$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function zp(t){var e,i=bt;if(fo(g$(t)),Ae){let o=Ca;Fp(new Set);try{Hp.includes(t)&&ug(),Hp.push(t),Xc(t),e=Zc(t)}finally{fo(i),Fp(o),Hp.pop()}}else try{Xc(t),e=Zc(t)}finally{fo(i)}return e}function Wp(t){var e=zp(t);if(t.equals(e)||(t.v=e,t.wv=ld()),!ks){var i=(As||(t.f&256)!==0)&&t.deps!==null?4096:1024;En(t,i)}}var Ca=new Set,$l=new Map;function Fp(t){Ca=t}function Lr(t,e){var i={f:0,v:t,reactions:null,equals:Yc,rv:0,wv:0};return Ae&&ps&&(i.created=e!=null?e:Ps("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function q(t,e){let i=Lr(t,e);return Jc(i),i}function ms(t,e=!1,i=!0){var r,a;let o=Lr(t);return e||(o.equals=vl),us&&i&&Ut!==null&&Ut.l!==null&&((a=(r=Ut.l).s)!=null?a:r.s=[]).push(o),o}function R(t,e,i=!1){var r;Dt!==null&&(!mr||(Dt.f&262144)!==0)&&fs()&&(Dt.f&262162)!==0&&!((r=Qo)!=null&&r[1].includes(t)&&Qo[0]===Dt)&&wg();let o=i?ci(e):e;return Ae&&jc(o,t.label),yl(t,o)}function yl(t,e){if(!t.equals(e)){var i=t.v;if(ks?$l.set(t,e):$l.set(t,i),t.v=e,Ae&&ps&&(t.updated=Ps("UpdatedAt"),bt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&zp(t),En(t,(t.f&256)===0?1024:4096)),t.wv=ld(),Tg(t,2048),fs()&&bt!==null&&(bt.f&1024)!==0&&(bt.f&96)===0&&(fr===null?Ig([t]):fr.push(t)),Ae&&Ca.size>0){let o=Array.from(Ca);for(let r of o)(r.f&1024)!==0&&En(r,4096),Ia(r)&&xl(r);Ca.clear()}}return e}function Tg(t,e){var i=t.reactions;if(i!==null)for(var o=fs(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===bt)){if(Ae&&(d&262144)!==0){Ca.add(l);continue}En(l,e),(d&1280)!==0&&((d&2)!==0?Tg(l,4096):cd(l))}}}var wl="font-weight: bold",Sl="font-weight: normal";function Eg(t,e,i){Ae?console.warn(`%c[svelte] hydration_attribute_changed
28
28
  %cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
29
- https://svelte.dev/e/hydration_attribute_changed`,yl,xl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Eg(t){Pe?console.warn(`%c[svelte] hydration_html_changed
29
+ https://svelte.dev/e/hydration_attribute_changed`,wl,Sl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Pg(t){Ae?console.warn(`%c[svelte] hydration_html_changed
30
30
  %c${t?`The value of an \`{@html ...}\` block ${t} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
31
- https://svelte.dev/e/hydration_html_changed`,yl,xl):console.warn("https://svelte.dev/e/hydration_html_changed")}function Zs(t){Pe?console.warn(`%c[svelte] hydration_mismatch
31
+ https://svelte.dev/e/hydration_html_changed`,wl,Sl):console.warn("https://svelte.dev/e/hydration_html_changed")}function ia(t){Ae?console.warn(`%c[svelte] hydration_mismatch
32
32
  %c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
33
- https://svelte.dev/e/hydration_mismatch`,yl,xl):console.warn("https://svelte.dev/e/hydration_mismatch")}function Pg(){Pe?console.warn(`%c[svelte] lifecycle_double_unmount
33
+ https://svelte.dev/e/hydration_mismatch`,wl,Sl):console.warn("https://svelte.dev/e/hydration_mismatch")}function kg(){Ae?console.warn(`%c[svelte] lifecycle_double_unmount
34
34
  %cTried to unmount a component that was not mounted
35
- https://svelte.dev/e/lifecycle_double_unmount`,yl,xl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function kg(){Pe?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",yl,xl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Jc(t){Pe?console.warn(`%c[svelte] state_proxy_equality_mismatch
35
+ https://svelte.dev/e/lifecycle_double_unmount`,wl,Sl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Ag(){Ae?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",wl,Sl):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function eu(t){Ae?console.warn(`%c[svelte] state_proxy_equality_mismatch
36
36
  %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
37
- https://svelte.dev/e/state_proxy_equality_mismatch`,yl,xl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var et=!1;function mo(t){et=t}var bt;function Ci(t){if(t===null)throw Zs(),ls;return bt=t}function qi(){return Ci(Xo(bt))}function S(t){if(et){if(Xo(bt)!==null)throw Zs(),ls;bt=t}}function ui(t=1){if(et){for(var e=t,i=bt;e--;)i=Xo(i);bt=i}}function Ta(){for(var t=0,e=bt;;){if(e.nodeType===mr){var i=e.data;if(i===$a){if(t===0)return e;t-=1}else(i===Gs||i===Ys)&&(t+=1)}var o=Xo(e);e.remove(),e=o}}function eu(t){if(!t||t.nodeType!==mr)throw Zs(),ls;return t.data}function Ag(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:r}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let s=l!=null?l:0;s<this.length;s+=1)if(hl(this[s])===a){Jc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let s=0;s<=(l!=null?l:this.length-1);s+=1)if(hl(this[s])===a){Jc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(hl(this[s])===a){Jc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ia,Lg,pd,Mg,Vg;function tu(){if(Ia===void 0){Ia=window,Lg=document,pd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Mg=Qo(e,"firstChild").get,Vg=Qo(e,"nextSibling").get,Ap(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ap(i)&&(i.__t=void 0),Pe&&(t.__svelte_meta=null,Ag())}}function Tn(t=""){return document.createTextNode(t)}function Pi(t){return Mg.call(t)}function Xo(t){return Vg.call(t)}function T(t,e){if(!et)return Pi(t);var i=Pi(bt);if(i===null)i=bt.appendChild(Tn());else if(e&&i.nodeType!==ul){var o=Tn();return i==null||i.before(o),Ci(o),o}return Ci(i),i}function ce(t,e){var r,a;if(!et){var i=Pi(t);return i.nodeType===8&&i.data===""?Xo(i):i}if(e&&((r=bt)==null?void 0:r.nodeType)!==ul){var o=Tn();return(a=bt)==null||a.before(o),Ci(o),o}return bt}function A(t,e=1,i=!1){let o=et?bt:t;for(var r;e--;)r=o,o=Xo(o);if(!et)return o;if(i&&(o==null?void 0:o.nodeType)!==ul){var a=Tn();return o===null?r==null||r.after(a):o.before(a),Ci(a),a}return Ci(o),o}function fd(t){t.textContent=""}function Wp(t){_t===null&&Rt===null&&fg(t),Rt!==null&&(Rt.f&256)!==0&&_t===null&&pg(),Ts&&ug(t)}function h$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ea(t,e,i,o=!0){var s;var r=_t;if(Pe)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Kt,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Pe&&(a.component_function=vr),i)try{$l(a),a.f|=32768}catch(u){throw Ki(a),u}else e!==null&&ud(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(r!==null&&h$(a,r),Rt!==null&&(Rt.f&2)!==0)){var d=Rt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Ao(t){let e=Ea(8,null,!1);return Cn(e,1024),e.teardown=t,e}function Oe(t){var r;Wp("$effect");var e=_t!==null&&(_t.f&32)!==0&&Kt!==null&&!Kt.m;if(Pe&&po(t,"name",{value:"$effect"}),e){var i=Kt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:_t,reaction:Rt})}else{var o=Lo(t);return o}}function gd(t){return Wp("$effect.pre"),Pe&&po(t,"name",{value:"$effect.pre"}),Zo(t)}function nu(t){let e=Ea(64,t,!0);return()=>{Ki(e)}}function Ng(t){let e=Ea(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Gn(e,()=>{Ki(e),o(void 0)}):(Ki(e),o(void 0))})}function Lo(t){return Ea(4,t,!1)}function Zo(t){return Ea(8,t,!0)}function D(t,e=[],i=Qr){if(Pe)return Zo(()=>{var r=_t,a=()=>t(...l.map(n));po(r.fn,"name",{value:"{expression}"}),po(a,"name",{value:"{expression}"});let l=e.map(i);Qi(a)});let o=e.map(i);return Qi(()=>t(...o.map(n)))}function Qi(t,e=0){return Ea(24|e,t,!0)}function Bi(t,e=!0){return Ea(40,t,!0,e)}function Kp(t){var e=t.teardown;if(e!==null){let i=Ts,o=Rt;Up(!0),Wi(null);try{e.call(null)}finally{Up(i),Wi(o)}}}function qp(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){var o=i.next;(i.f&64)!==0?i.parent=null:Ki(i,e),i=o}}function Og(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Ki(e),e=i}}function Ki(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Qp(t.nodes_start,t.nodes_end),i=!0),qp(t,e&&!i),hd(t,0),Cn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Kp(t);var r=t.parent;r!==null&&r.first!==null&&Gp(t),Pe&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Qp(t,e){for(;t!==null;){var i=t===e?null:Xo(t);t.remove(),t=i}}function Gp(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Gn(t,e){var i=[];ru(t,i,!0),Yp(i,()=>{Ki(t),e&&e()})}function Yp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function ru(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;ru(o,e,a?i:!1),o=r}}}function Ps(t){Dg(t,!0)}function Dg(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;Dg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var _d=[],jp=[];function Bg(){var t=_d;_d=[],Xs(t)}function _$(){var t=jp;jp=[],Xs(t)}function In(t){_d.length===0&&queueMicrotask(Bg),_d.push(t)}function Fg(){_d.length>0&&Bg(),jp.length>0&&_$()}function Ug(t){var e=_t;if(Pe&&t instanceof Error&&b$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else bd(t,e)}function bd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Hg=new WeakSet;function b$(t,e){var l,d;if(Hg.has(t))return;Hg.add(t);let i=Qo(t,"message");if(!(i&&!i.configurable)){for(var o=pd?" ":" ",r=`
37
+ https://svelte.dev/e/state_proxy_equality_mismatch`,wl,Sl):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var tt=!1;function mo(t){tt=t}var $t;function Si(t){if(t===null)throw ia(),cs;return $t=t}function Yi(){return Si(Go($t))}function S(t){if(tt){if(Go($t)!==null)throw ia(),cs;$t=t}}function ui(t=1){if(tt){for(var e=t,i=$t;e--;)i=Go(i);$t=i}}function Ea(){for(var t=0,e=$t;;){if(e.nodeType===cr){var i=e.data;if(i===xa){if(t===0)return e;t-=1}else(i===Zs||i===Js)&&(t+=1)}var o=Go(e);e.remove(),e=o}}function tu(t){if(!t||t.nodeType!==cr)throw ia(),cs;return t.data}function Lg(){let t=Array.prototype,e=Array.__svelte_cleanup;e&&e();let{indexOf:i,lastIndexOf:o,includes:r}=t;t.indexOf=function(a,l){let d=i.call(this,a,l);if(d===-1){for(let s=l!=null?l:0;s<this.length;s+=1)if(bl(this[s])===a){eu("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let s=0;s<=(l!=null?l:this.length-1);s+=1)if(bl(this[s])===a){eu("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(bl(this[s])===a){eu("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Pa,Mg,ud,Vg,Rg;function iu(){if(Pa===void 0){Pa=window,Mg=document,ud=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Vg=Wo(e,"firstChild").get,Rg=Wo(e,"nextSibling").get,Vp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Vp(i)&&(i.__t=void 0),Ae&&(t.__svelte_meta=null,Lg())}}function Pn(t=""){return document.createTextNode(t)}function Ti(t){return Vg.call(t)}function Go(t){return Rg.call(t)}function T(t,e){if(!tt)return Ti(t);var i=Ti($t);if(i===null)i=$t.appendChild(Pn());else if(e&&i.nodeType!==fl){var o=Pn();return i==null||i.before(o),Si(o),o}return Si(i),i}function ue(t,e){var r,a;if(!tt){var i=Ti(t);return i.nodeType===8&&i.data===""?Go(i):i}if(e&&((r=$t)==null?void 0:r.nodeType)!==fl){var o=Pn();return(a=$t)==null||a.before(o),Si(o),o}return $t}function k(t,e=1,i=!1){let o=tt?$t:t;for(var r;e--;)r=o,o=Go(o);if(!tt)return o;if(i&&(o==null?void 0:o.nodeType)!==fl){var a=Pn();return o===null?r==null||r.after(a):o.before(a),Si(a),a}return Si(o),o}function pd(t){t.textContent=""}function Qp(t){bt===null&&Dt===null&&mg(t),Dt!==null&&(Dt.f&256)!==0&&bt===null&&fg(),ks&&pg(t)}function h$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function ka(t,e,i,o=!0){var s;var r=bt;if(Ae)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Ut,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Ae&&(a.component_function=ur),i)try{xl(a),a.f|=32768}catch(u){throw Gi(a),u}else e!==null&&cd(a);var l=i&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&1048704)===0;if(!l&&o&&(r!==null&&h$(a,r),Dt!==null&&(Dt.f&2)!==0)){var d=Dt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function ko(t){let e=ka(8,null,!1);return En(e,1024),e.teardown=t,e}function De(t){var r;Qp("$effect");var e=bt!==null&&(bt.f&32)!==0&&Ut!==null&&!Ut.m;if(Ae&&po(t,"name",{value:"$effect"}),e){var i=Ut;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:bt,reaction:Dt})}else{var o=Ao(t);return o}}function vd(t){return Qp("$effect.pre"),Ae&&po(t,"name",{value:"$effect.pre"}),Yo(t)}function ru(t){let e=ka(64,t,!0);return()=>{Gi(e)}}function Og(t){let e=ka(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Xn(e,()=>{Gi(e),o(void 0)}):(Gi(e),o(void 0))})}function Ao(t){return ka(4,t,!1)}function Yo(t){return ka(8,t,!0)}function O(t,e=[],i=Zr){if(Ae)return Yo(()=>{var r=bt,a=()=>t(...l.map(n));po(r.fn,"name",{value:"{expression}"}),po(a,"name",{value:"{expression}"});let l=e.map(i);ji(a)});let o=e.map(i);return ji(()=>t(...o.map(n)))}function ji(t,e=0){return ka(24|e,t,!0)}function Ri(t,e=!0){return ka(40,t,!0,e)}function Gp(t){var e=t.teardown;if(e!==null){let i=ks,o=Dt;Kp(!0),Qi(null);try{e.call(null)}finally{Kp(i),Qi(o)}}}function Yp(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){var o=i.next;(i.f&64)!==0?i.parent=null:Gi(i,e),i=o}}function Dg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Gi(e),e=i}}function Gi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(jp(t.nodes_start,t.nodes_end),i=!0),Yp(t,e&&!i),gd(t,0),En(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Gp(t);var r=t.parent;r!==null&&r.first!==null&&Xp(t),Ae&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function jp(t,e){for(;t!==null;){var i=t===e?null:Go(t);t.remove(),t=i}}function Xp(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Xn(t,e){var i=[];su(t,i,!0),Zp(i,()=>{Gi(t),e&&e()})}function Zp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function su(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;su(o,e,a?i:!1),o=r}}}function Ms(t){Bg(t,!0)}function Bg(t,e){if((t.f&8192)!==0){t.f^=8192;for(var i=t.first;i!==null;){var o=i.next,r=(i.f&65536)!==0||(i.f&32)!==0;Bg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var hd=[],Jp=[];function Hg(){var t=hd;hd=[],ta(t)}function _$(){var t=Jp;Jp=[],ta(t)}function kn(t){hd.length===0&&queueMicrotask(Hg),hd.push(t)}function Fg(){hd.length>0&&Hg(),Jp.length>0&&_$()}function zg(t){var e=bt;if(Ae&&t instanceof Error&&b$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else _d(t,e)}function _d(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Ug=new WeakSet;function b$(t,e){var l,d;if(Ug.has(t))return;Ug.add(t);let i=Wo(t,"message");if(!(i&&!i.configurable)){for(var o=ud?" ":" ",r=`
38
38
  ${o}in ${((l=e.fn)==null?void 0:l.name)||"<unknown>"}`,a=e.ctx;a!==null;)r+=`
39
- ${o}in ${(d=a.function)==null?void 0:d[Wn].split("/").pop()}`,a=a.p;po(t,"message",{value:t.message+`
39
+ ${o}in ${(d=a.function)==null?void 0:d[Qn].split("/").pop()}`,a=a.p;po(t,"message",{value:t.message+`
40
40
  ${r}
41
41
  `}),t.stack&&po(t,"stack",{value:t.stack.split(`
42
42
  `).filter(s=>!s.includes("svelte/src/internal")).join(`
43
- `)})}}var Pa=!1,wl=null,ka=!1,Ts=!1;function Up(t){Ts=t}var $d=[],yd=[],Rt=null,_r=!1;function Wi(t){Rt=t}var _t=null;function fo(t){_t=t}var jo=null;function Zc(t){Rt!==null&&Rt.f&2097152&&(jo===null?jo=[Rt,[t]]:jo[1].push(t))}var En=null,br=0,hr=null;function Tg(t){hr=t}var Kg=1,au=0,Is=!1,lu=null;function dd(){return++Kg}function Ca(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&_t!==null&&!Is,s=i.length;if(l||d){var u=t,f=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&f!==null&&(f.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],Ca(a)&&Hp(a),a.wv>t.wv)return!0}(!o||_t!==null&&!Is)&&Cn(t,1024)}return!1}function qg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];jo!=null&&jo[1].includes(t)&&jo[0]===Rt||((a.f&2)!==0?qg(a,e,!1):e===a&&(i?Cn(a,2048):(a.f&1024)!==0&&Cn(a,4096),ud(a)))}}function Xc(t){var $,y;var e=En,i=br,o=hr,r=Rt,a=Is,l=jo,d=Kt,s=_r,u=t.f;En=null,br=0,hr=null,Is=(u&256)!==0&&(_r||!ka||Rt===null),Rt=(u&96)===0?t:null,jo=null,sd(t.ctx),_r=!1,au++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(En!==null){var v;if(hd(t,br),p!==null&&br>0)for(p.length=br+En.length,v=0;v<En.length;v++)p[br+v]=En[v];else t.deps=p=En;if(!Is||(u&2)!==0&&t.reactions!==null)for(v=br;v<p.length;v++)((y=($=p[v]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&br<p.length&&(hd(t,br),p.length=br);if(us()&&hr!==null&&!_r&&p!==null&&(t.f&6146)===0)for(v=0;v<hr.length;v++)qg(hr[v],t);return r!==null&&r!==t&&(au++,hr!==null&&(o===null?o=hr:o.push(...hr))),f}catch(g){Ug(g)}finally{En=e,br=i,hr=o,Rt=r,Is=a,jo=l,sd(d),_r=s,t.f^=2097152}}function $$(t,e){let i=e.reactions;if(i!==null){var o=rg.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(En===null||!En.includes(e))&&(Cn(e,4096),(e.f&768)===0&&(e.f^=512),jc(e),hd(e,0))}function hd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)$$(t,i[o])}function $l(t){var e=t.f;if((e&16384)===0){Cn(t,1024);var i=_t,o=ka;if(_t=t,ka=!0,Pe){var r=vr;ad(t.component_function)}try{(e&16)!==0?Og(t):qp(t),Kp(t);var a=Xc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Kg,Pe&&cs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=dd(),l.set_during_effect=!1);Pe&&yd.push(t)}finally{ka=o,_t=i,Pe&&ad(r)}}}function zg(){console.error("Last ten effects were: ",yd.slice(-10).map(t=>t.fn)),yd=[]}function y$(){try{mg()}catch(t){if(Pe&&po(t,"stack",{value:""}),wl!==null)if(Pe)try{bd(t,wl)}catch(e){throw zg(),e}else bd(t,wl);else throw Pe&&zg(),t}}function Zp(){var t=ka;try{var e=0;for(ka=!0;$d.length>0;){e++>1e3&&y$();var i=$d,o=i.length;$d=[];for(var r=0;r<o;r++){var a=w$(i[r]);x$(a)}_l.clear()}}finally{Pa=!1,ka=t,wl=null,Pe&&(yd=[])}}function x$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Ca(o)&&($l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Gp(o):o.fn=null))}}function ud(t){Pa||(Pa=!0,queueMicrotask(Zp));for(var e=wl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}$d.push(e)}function w$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:Ca(i)&&$l(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function Sl(t){var e;for(t&&(Pa=!0,Zp(),Pa=!0,e=t());;){if(Fg(),$d.length===0)return Pa=!1,wl=null,Pe&&(yd=[]),e;Pa=!0,Zp()}}function vo(){return vt(this,null,function*(){yield Promise.resolve(),Sl()})}function n(t){var e=t.f,i=(e&2)!==0;if(lu!==null&&lu.add(t),Rt!==null&&!_r){if(!(jo!=null&&jo[1].includes(t))||jo[0]!==Rt){var o=Rt.deps;t.rv<au&&(t.rv=au,En===null&&o!==null&&o[br]===t?br++:En===null?En=[t]:(!Is||!En.includes(t))&&En.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,Ca(r)&&Hp(r)),Pe&&cs&&!_r&&rd!==null&&Rt!==null&&rd.reaction===Rt)if(t.trace)t.trace();else{var l=Cs("TracedAt");if(l){var d=rd.entries.get(t);d===void 0&&(d={traces:[]},rd.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return Ts&&_l.has(t)?_l.get(t):t.v}function Ct(t){var e=_r;try{return _r=!0,t()}finally{_r=e}}var S$=-7169;function Cn(t,e){t.f=t.f&S$|e}function cu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Go in t)du(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Go in i&&du(i)}}}function du(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{du(t[o],e)}catch(r){}let i=ya(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Kc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Jp(t,e){if(e){let i=document.body;t.autofocus=!0,In(()=>{document.activeElement===i&&t.focus()})}}function xd(t){var e=Rt,i=_t;Wi(null),fo(null);try{return t()}finally{Wi(e),fo(i)}}var ef=new Set,uu=new Set;function Aa(t){if(!et)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function tf(t,e,i,o={}){function r(a){if(o.capture||Cl.call(e,a),!a.cancelBubble)return xd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?In(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function at(t,e,i,o,r){var a={capture:o,passive:r},l=tf(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ao(()=>{e.removeEventListener(t,l,a)})}function Ye(t){for(var e=0;e<t.length;e++)ef.add(t[e]);for(var i of uu)i(t)}function Cl(t){var C;var e=this,i=e.ownerDocument,o=t.type,r=((C=t.composedPath)==null?void 0:C.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){po(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Rt,p=_t;Wi(null),fo(null);try{for(var v,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var g=a["__"+o];if(g!=null&&(!a.disabled||t.target===a))if(fr(g)){var[w,...I]=g;w.apply(a,[t,...I])}else g.call(a,t)}catch(N){v?$.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of $)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,Wi(f),fo(p)}}}var T$;function Qg(){T$=void 0}function Tl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Mo(t,e){var i=_t;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(et)return Mo(bt,null),bt;r===void 0&&(r=Tl(a?t:"<!>"+t),i||(r=Pi(r)));var l=o||pd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Pi(l),s=l.lastChild;Mo(d,s)}else Mo(l,l);return l}}function P$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(et)return Mo(bt,null),bt;if(!l){var d=Tl(a),s=Pi(d);if(r)for(l=document.createDocumentFragment();Pi(s);)l.appendChild(Pi(s));else l=Pi(s)}var u=l.cloneNode(!0);if(r){var f=Pi(u),p=u.lastChild;Mo(f,p)}else Mo(u,u);return u}}function Ce(t,e){return P$(t,e,"svg")}function fs(t=""){if(!et){var e=Tn(t+"");return Mo(e,e),e}var i=bt;return i.nodeType!==ul&&(i.before(i=Tn()),Ci(i)),Mo(i,i),i}function Le(){if(et)return Mo(bt,null),bt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Tn();return t.append(e,i),Mo(e,i),t}function b(t,e){if(et){_t.nodes_end=bt,qi();return}t!==null&&t.before(e)}var k$=/\r/g;function Yg(t){t=t.replace(k$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function jg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var A$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Xg(t){return A$.includes(t)}var L$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var M$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Zg(t){var e;return t=t.toLowerCase(),(e=M$[t])!=null?e:t}var VP=[...L$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var V$=["touchstart","touchmove"];function Jg(t){return V$.includes(t)}var R$=["$state","$state.raw","$derived","$derived.by"],RP=[...R$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var N$=["textarea","script","style","title"];function eh(t){return N$.includes(t)}function pu(t){return t==null?void 0:t.replace(/\//g,"/​")}var wd=!0;function fu(t){wd=t}function me(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function jr(t,e){return th(t,e)}function nf(t,e){var l;tu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=et,r=bt;try{for(var a=Pi(i);a&&(a.nodeType!==mr||a.data!==Gs);)a=Xo(a);if(!a)throw ls;mo(!0),Ci(a),qi();let d=th(t,Gt(Ee({},e),{anchor:a}));if(bt===null||bt.nodeType!==mr||bt.data!==$a)throw Zs(),ls;return mo(!1),d}catch(d){if(d===ls)return e.recover===!1&&vg(),tu(),fd(i),mo(!1),jr(t,e);throw d}finally{mo(o),Ci(r),Qg()}}var Il=new Map;function th(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){tu();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var $=p[v];if(!d.has($)){d.add($);var y=Jg($);e.addEventListener($,Cl,{passive:y});var g=Il.get($);g===void 0?(document.addEventListener($,Cl,{passive:y}),Il.set($,1)):Il.set($,g+1)}}};s(nd(ef)),uu.add(s);var u=void 0,f=Ng(()=>{var p=i!=null?i:e.appendChild(Tn());return Bi(()=>{if(a){B({});var v=Kt;v.c=a}r&&(o.$$events=r),et&&Mo(p,null),wd=l,u=t(p,o)||{},wd=!0,et&&(_t.nodes_end=bt),a&&F()}),()=>{var y;for(var v of d){e.removeEventListener(v,Cl);var $=Il.get(v);--$===0?(document.removeEventListener(v,Cl),Il.delete(v)):Il.set(v,$)}uu.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return of.set(u,f),u}var of=new WeakMap;function La(t,e){let i=of.get(t);return i?(of.delete(t),i(e)):(Pe&&Pg(),Promise.resolve())}function ni(t,e,...i){var o=t,r=gt,a;Qi(()=>{r!==(r=e())&&(a&&(Ki(a),a=null),Pe&&r==null&&gg(),a=Bi(()=>r(o,...i)))},65536),et&&(o=bt)}if(Pe){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;bg(e)},set:o=>{i=o}})}};F$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var F$;function Lt(t){Kt===null&&ml("onMount"),ds&&Kt.l!==null?B$(Kt).m.push(t):Oe(()=>{let e=Ct(t);if(typeof e=="function")return e})}function cn(t){Kt===null&&ml("onDestroy"),Lt(()=>()=>Ct(t))}function B$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var ih=new Map;function oh(t,e){var i=ih.get(t);i||(i=new Set,ih.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){et&&i===0&&qi();var r=t,a=null,l=null,d=to,s=i>0?65536:0,u=!1;let f=(v,$=!0)=>{u=!0,p($,v)},p=(v,$)=>{if(d===(d=v))return;let y=!1;if(et&&o!==-1){if(i===0){let w=eu(r);w===Gs?o=0:w===Ys?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let g=o>i;!!d===g&&(r=Ta(),Ci(r),mo(!1),y=!0,o=-1)}d?(a?Ps(a):$&&(a=Bi(()=>$(r))),l&&Gn(l,()=>{l=null})):(l?Ps(l):$&&(l=Bi(()=>$(r,[i+1,o]))),a&&Gn(a,()=>{a=null})),y&&mo(!0)};Qi(()=>{u=!1,e(f),u||p(null,null)},s),et&&(r=bt)}function ks(t,e,i){et&&qi();var o=t,r=to,a,l=us()?dg:pl;Qi(()=>{l(r,r=e())&&(a&&Gn(a),a=Bi(()=>i(o)))}),et&&(o=bt)}var ea=null;function af(t){ea=t}function Sd(t,e){return e}function z$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)ru(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;fd(s),s.append(i),o.clear(),Js(t,e[0].prev,e[a-1].next)}Yp(r,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),Js(t,f.prev,f.next)),Ki(f.e,!d)}})}function $i(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=et?Ci(Pi(u)):u.appendChild(Tn())}et&&qi();var f=null,p=!1,v=Sn(()=>{var $=i();return fr($)?$:$==null?[]:nd($)});Qi(()=>{var $=n(v),y=$.length;if(p&&y===0)return;p=y===0;let g=!1;if(et){var w=eu(l)===Ys;w!==(y===0)&&(l=Ta(),Ci(l),mo(!1),g=!0)}if(et){for(var I=null,C,N=0;N<y;N++){if(bt.nodeType===mr&&bt.data===$a){l=bt,g=!0,mo(!1);break}var L=$[N],E=o(L,N);C=sh(bt,d,I,null,L,E,N,r,e,i),d.items.set(E,C),I=C}y>0&&Ci(Ta())}et||W$($,d,l,r,e,o,i),a!==null&&(y===0?f?Ps(f):f=Bi(()=>a(l)):f!==null&&Gn(f,()=>{f=null})),g&&mo(!0),n(v)}),et&&(l=bt)}function W$(t,e,i,o,r,a,l){var ee,we,pe,re;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,f=e.items,p=e.first,v=p,$,y=null,g,w=[],I=[],C,N,L,E;if(d)for(E=0;E<u;E+=1)C=t[E],N=a(C,E),L=f.get(N),L!==void 0&&((ee=L.a)==null||ee.measure(),(g!=null?g:g=new Set).add(L));for(E=0;E<u;E+=1){if(C=t[E],N=a(C,E),L=f.get(N),L===void 0){var P=v?v.e.nodes_start:i;y=sh(P,e,y,y===null?e.first:y.next,C,N,E,o,r,l),f.set(N,y),w=[],I=[],v=y.next;continue}if(s&&K$(L,C,E,r),(L.e.f&8192)!==0&&(Ps(L.e),d&&((we=L.a)==null||we.unfix(),(g!=null?g:g=new Set).delete(L))),L!==v){if($!==void 0&&$.has(L)){if(w.length<I.length){var q=I[0],H;y=q.prev;var z=w[0],j=w[w.length-1];for(H=0;H<w.length;H+=1)nh(w[H],q,i);for(H=0;H<I.length;H+=1)$.delete(I[H]);Js(e,z.prev,j.next),Js(e,y,z),Js(e,j,q),v=q,y=j,E-=1,w=[],I=[]}else $.delete(L),nh(L,v,i),Js(e,L.prev,L.next),Js(e,L,y===null?e.first:y.next),Js(e,y,L),y=L;continue}for(w=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&($!=null?$:$=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;L=v}w.push(L),y=L,v=L.next}if(v!==null||$!==void 0){for(var ae=$===void 0?[]:nd($);v!==null;)(v.e.f&8192)===0&&ae.push(v),v=v.next;var X=ae.length;if(X>0){var ne=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(pe=ae[E].a)==null||pe.measure();for(E=0;E<X;E+=1)(re=ae[E].a)==null||re.fix()}z$(e,ae,ne,f)}}d&&In(()=>{var _e;if(g!==void 0)for(L of g)(_e=L.a)==null||_e.apply()}),_t.first=e.first&&e.first.e,_t.last=y&&y.e}function K$(t,e,i,o){(o&1)!==0&&bl(t.v,e),(o&2)!==0?bl(t.i,i):t.i=i}function sh(t,e,i,o,r,a,l,d,s,u){var f=ea,p=(s&1)!==0,v=(s&16)===0,$=p?v?ps(r,!1,!1):Lr(r):r,y=(s&2)===0?l:Lr(l);Pe&&p&&($.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var g={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};ea=g;try{return g.e=Bi(()=>d(t,$,y,u),et),g.e.prev=i&&i.e,g.e.next=o&&o.e,i===null?e.first=g:(i.next=g,i.e.next=g.e),o!==null&&(o.prev=g,o.e.prev=g.e),g}finally{ea=f}}function nh(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=Xo(a);r.before(a),a=l}}function Js(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function q$(t,e,i){var a,l;if(!e||e===Yg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=vr)!=null&&l[Wn]&&(o=`in ${vr[Wn]}`),Eg(pu(o))}function Cd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=_t;if(l===(l=($=e())!=null?$:"")){et&&qi();return}if(d.nodes_start!==null&&(Qp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(et){for(var s=bt.data,u=qi(),f=u;u!==null&&(u.nodeType!==mr||u.data!=="");)f=u,u=Xo(u);if(u===null)throw Zs(),ls;Pe&&!r&&q$(u.parentNode,s,l),Mo(bt,f),a=Ci(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Tl(p);if((i||o)&&(v=Pi(v)),Mo(Pi(v),v.lastChild),i||o)for(;Pi(v);)a.before(Pi(v));else a.before(v)}})}function Fi(t,e,i){et&&qi();var o=t,r,a;Qi(()=>{r!==(r=e())&&(a&&(Gn(a),a=null),r&&(a=Bi(()=>i(o,r))))},65536),et&&(o=bt)}function Ma(t,e,i,o,r,a){var y;let l=et;et&&qi();var d=Pe&&a&&((y=Kt)==null?void 0:y.function[Wn]),s,u,f=null;et&&bt.nodeType===Qc&&(f=bt,qi());var p=et?bt:t,v,$=ea;Qi(()=>{let g=e()||null;var w=r?r():i||g==="svg"?zc:null;if(g!==s){var I=ea;af($),v&&(g===null?Gn(v,()=>{v=null,u=null}):g===u?Ps(v):(Ki(v),fu(!1))),g&&g!==u&&(v=Bi(()=>{if(f=et?f:w?document.createElementNS(w,g):document.createElement(g),Pe&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Mo(f,f),o){et&&eh(g)&&f.append(document.createComment(""));var C=et?Pi(f):f.appendChild(Tn());et&&(C===null?mo(!1):Ci(C)),o(f,C)}_t.nodes_end=f,p.before(f)})),s=g,s&&(u=s),fu(!0),af(I)}},65536),l&&(mo(!0),Ci(p))}var df;function ah(t){return df=t.target,new lf(t)}var As,Mr,lf=class{constructor(e){Qs(this,As);Qs(this,Mr);var a,l;var i=new Map,o=(d,s)=>{var u=ps(s,!1,!1);return i.set(d,u),u};let r=new Proxy(Gt(Ee({},e.props||{}),{$$events:{}}),{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===cl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var f;return O((f=i.get(s))!=null?f:o(s,u),u),Reflect.set(d,s,u)}});dl(this,Mr,(e.hydrate?nf:jr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Sl(),dl(this,As,r.$$events);for(let d of Object.keys(Di(this,Mr)))d==="$set"||d==="$destroy"||d==="$on"||po(this,d,{get(){return Di(this,Mr)[d]},set(s){Di(this,Mr)[d]=s},enumerable:!0});Di(this,Mr).$set=d=>{Object.assign(r,d)},Di(this,Mr).$destroy=()=>{La(Di(this,Mr))}}$set(e){Di(this,Mr).$set(e)}$on(e,i){Di(this,As)[e]=Di(this,As)[e]||[];let o=(...r)=>i.call(this,...r);return Di(this,As)[e].push(o),()=>{Di(this,As)[e]=Di(this,As)[e].filter(r=>r!==o)}}$destroy(){Di(this,Mr).$destroy()}};As=new WeakMap,Mr=new WeakMap;function Q(t,e){In(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=df)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Pe&&oh(e.hash,d)}})}function Ls(t,e){var i=void 0,o;Qi(()=>{i!==(i=e())&&(o&&(Ki(o),o=null),i&&(o=Bi(()=>{Lo(()=>i(t))})))})}function lh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=lh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function dh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=lh(t))&&(o&&(o+=" "),o+=e);return o}function Td(t){return typeof t=="object"?dh(t):t!=null?t:""}var ch=[...`
44
- \r\f \v\uFEFF`];function ph(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||ch.includes(o[l-1]))&&(d===o.length||ch.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function uh(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function cf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function fh(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(cf)),r&&s.push(...Object.keys(r).map(cf));var u=0,f=-1;let g=t.length;for(var p=0;p<g;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&f===-1)f=p;else if(v===";"||p===g-1){if(f!==-1){var $=cf(t.substring(u,f).trim());if(!s.includes($)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,f=-1}}}}return o&&(i+=uh(o)),r&&(i+=uh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function se(t,e,i,o,r,a){var l=t.__className;if(et||l!==i||l===void 0){var d=ph(i,o,a);(!et||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function uf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function Qe(t,e,i,o){var r=t.__style;if(et||r!==e){var a=fh(e,o);(!et||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(uf(t,i==null?void 0:i[0],o[0]),uf(t,i==null?void 0:i[1],o[1],"important")):uf(t,i,o));return o}function Id(t,e,i){if(t.multiple){if(e==null)return;if(!fr(e))return kg();for(var o of t.options)o.selected=e.includes(mh(o));return}for(o of t.options){var r=mh(o);if(Np(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function pf(t){var e=new MutationObserver(()=>{Id(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ao(()=>{e.disconnect()})}function mh(t){return"__value"in t?t.__value:t.value}var El=Symbol("class"),Pl=Symbol("style"),hh=Symbol("is custom element"),_h=Symbol("is html");function bh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var r=yh(t);if(et&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||e1(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[lg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&xh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function $h(t,e,i,o,r=!1){var L;var a=yh(t),l=a[hh],d=!a[_h];let s=et&&l;s&&mo(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Td(i.class):(o||i[El])&&(i.class=null),i[Pl]&&((L=i.style)!=null||(i.style=null));var v=xh(t);for(let E in i){let P=i[E];if(f&&E==="value"&&P==null){t.value=t.__value="",u[E]=P;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,P,o,e==null?void 0:e[El],i[El]),u[E]=P,u[El]=i[El];continue}if(E==="style"){Qe(t,P,e==null?void 0:e[Pl],i[Pl]),u[E]=P,u[Pl]=i[Pl];continue}var y=u[E];if(!(P===y&&!(P===void 0&&t.hasAttribute(E)))){u[E]=P;var g=E[0]+E[1];if(g!=="$$")if(g==="on"){let q={},H="$$"+E,z=E.slice(2);var w=Xg(z);if(jg(z)&&(z=z.slice(0,-7),q.capture=!0),!w&&y){if(P!=null)continue;t.removeEventListener(z,u[H],q),u[H]=null}if(P!=null)if(w)t[`__${z}`]=P,Ye([z]);else{let j=function(ae){u[E].call(this,ae)};var N=j;u[H]=tf(z,t,j,q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Me(t,E,P);else if(E==="autofocus")Jp(t,!!P);else if(!l&&(E==="__value"||E==="value"&&P!=null))t.value=t.__value=P;else if(E==="selected"&&f)bh(t,P);else{var I=E;d||(I=Zg(I));var C=I==="defaultValue"||I==="defaultChecked";if(P==null&&!l&&!C)if(a[E]=null,I==="value"||I==="checked"){let q=t,H=e===void 0;if(I==="value"){let z=q.defaultValue;q.removeAttribute(I),q.defaultValue=z,q.value=q.__value=H?z:null}else{let z=q.defaultChecked;q.removeAttribute(I),q.defaultChecked=z,q.checked=H?z:!1}}else t.removeAttribute(E);else C||v.includes(I)&&(l||typeof P!="string")?t[I]=P:typeof P!="function"&&Me(t,I,P,r)}}}return s&&mo(!0),u}function io(t,e,i=[],o,r=!1,a=Qr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",f=!1;if(Qi(()=>{var v=e(...l.map(n)),$=$h(t,d,v,o,r);f&&u&&"value"in v&&Id(t,v.value,!1);for(let g of Object.getOwnPropertySymbols(s))v[g]||Ki(s[g]);for(let g of Object.getOwnPropertySymbols(v)){var y=v[g];g.description===Ep&&(!d||y!==d[g])&&(s[g]&&Ki(s[g]),s[g]=Bi(()=>Ls(t,()=>y))),$[g]=y}d=$}),u){var p=t;Lo(()=>{Id(p,d.value),pf(p)})}f=!0}function yh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[hh]:t.nodeName.includes("-"),[_h]:t.namespaceURI===tg}}var vh=new Map;function xh(t){var e=vh.get(t.nodeName);if(e)return e;vh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Kc(o);for(var a in i)i[a].set&&e.push(a);o=ya(o)}return e}function e1(t,e,i){var o;Pe&&(e==="srcset"&&t1(t,i)||ff((o=t.getAttribute(e))!=null?o:"",i)||Ig(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function ff(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function gh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function t1(t,e){var i=gh(t.srcset),o=gh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(ff(i[l][0],r)||ff(r,i[l][0])))}var i1=Wc?()=>performance.now():()=>Date.now(),Xr={tick:t=>(Wc?requestAnimationFrame:gt)(t),now:()=>i1(),tasks:new Set};function wh(){let t=Xr.now();Xr.tasks.forEach(e=>{e.c(t)||(Xr.tasks.delete(e),e.f())}),Xr.tasks.size!==0&&Xr.tick(wh)}function Sh(t){let e;return Xr.tasks.size===0&&Xr.tick(wh),{promise:new Promise(i=>{Xr.tasks.add(e={c:t,f:i})}),abort(){Xr.tasks.delete(e)}}}function mu(t,e){xd(()=>{t.dispatchEvent(new CustomEvent(e))})}function s1(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function Ch(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=s1(r.trim());e[l]=a.trim()}return e}var a1=t=>t;function Zr(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,f=e.inert,p=e.style.overflow,v,$;function y(){var P;var L=Rt,E=_t;Wi(null),fo(null);try{return u!=null?u:u=i()(e,(P=o==null?void 0:o())!=null?P:{},{direction:s})}finally{Wi(L),fo(E)}}var g={is_global:d,in(){var L;if(e.inert=f,!r){$==null||$.abort(),(L=$==null?void 0:$.reset)==null||L.call($);return}a||v==null||v.abort(),mu(e,"introstart"),v=mf(e,y(),$,1,()=>{mu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(L){if(!a){L==null||L(),u=void 0;return}e.inert=!0,mu(e,"outrostart"),$=mf(e,y(),v,0,()=>{mu(e,"outroend"),L==null||L()})},stop:()=>{v==null||v.abort(),$==null||$.abort()}},w=_t;if(((N=w.transitions)!=null?N:w.transitions=[]).push(g),r&&wd){var I=d;if(!I){for(var C=w.parent;C&&(C.f&65536)!==0;)for(;(C=C.parent)&&(C.f&16)===0;);I=!C||(C.f&32768)!==0}I&&Lo(()=>{Ct(()=>g.in())})}}function mf(t,e,i,o,r){var a=o===1;if(js(e)){var l,d=!1;return In(()=>{if(!d){var w=e({direction:a?"in":"out"});l=mf(t,w,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:gt,deactivate:gt,reset:gt,t:()=>o};let{delay:s=0,css:u,tick:f,easing:p=a1}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var $=Ch(u(0,1));v.push($,$)}var y=()=>1-o,g=t.animate(v,{duration:s,fill:"forwards"});return g.onfinish=()=>{var z;g.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-w,C=e.duration*Math.abs(I),N=[];if(C>0){var L=!1;if(u)for(var E=Math.ceil(C/16.666666666666668),P=0;P<=E;P+=1){var q=w+I*p(P/E),H=Ch(u(q,1-q));N.push(H),L||(L=H.overflow==="hidden")}L&&(t.style.overflow="hidden"),y=()=>{var j=g.currentTime;return w+I*p(j/C)},f&&Sh(()=>{if(g.playState!=="running")return!1;var j=y();return f(j,1-j),!0})}g=t.animate(N,{duration:C,fill:"forwards"}),g.onfinish=()=>{y=()=>o,f==null||f(o,1-o),r()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=gt)},deactivate:()=>{r=gt},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function vf(t,e,i){var o=Qo(t,e);o&&o.set&&(t[e]=i,Ao(()=>{t[e]=null}))}var ta,kl,Ed,gu,Th,hu=class hu{constructor(e){Qs(this,gu);Qs(this,ta,new WeakMap);Qs(this,kl);Qs(this,Ed);dl(this,Ed,e)}observe(e,i){var o=Di(this,ta).get(e)||new Set;return o.add(i),Di(this,ta).set(e,o),Jv(this,gu,Th).call(this).observe(e,Di(this,Ed)),()=>{var r=Di(this,ta).get(e);r.delete(i),r.size===0&&(Di(this,ta).delete(e),Di(this,kl).unobserve(e))}}};ta=new WeakMap,kl=new WeakMap,Ed=new WeakMap,gu=new WeakSet,Th=function(){var e;return(e=Di(this,kl))!=null?e:dl(this,kl,new ResizeObserver(i=>{for(var o of i){hu.entries.set(o.target,o);for(var r of Di(this,ta).get(o.target)||[])r(o)}}))},pr(hu,"entries",new WeakMap);var gf=hu;var l1=new gf({box:"border-box"});function Pn(t,e,i){var o=l1.observe(t,()=>i(t[e]));Lo(()=>(Ct(()=>i(t[e])),o))}function Ih(t,e){return t===e||(t==null?void 0:t[Go])===e}function Xe(t={},e,i,o){return Lo(()=>{var r,a;return Zo(()=>{r=a,a=(o==null?void 0:o())||[],Ct(()=>{t!==i(...a)&&(e(t,...a),r&&Ih(i(...r),t)&&e(null,...r))})}),()=>{In(()=>{a&&Ih(i(...a),t)&&e(null,...a)})}}),t}function yo(t=!1){let e=Kt,i=e.l.u;if(!i)return;let o=()=>cu(e.s);if(t){let r=0,a={},l=Qr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&gd(()=>{Eh(e,o),Xs(i.b)}),Oe(()=>{let r=Ct(()=>i.m.map(ag));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{Eh(e,o),Xs(i.a)})}function Eh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Pd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),gt;let o=Ct(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Al=[];function Vr(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=gt){let i=null,o=new Set;function r(d){if(pl(t,d)&&(t=d,i)){let s=!Al.length;for(let u of o)u[1](),Al.push(u,t);if(s){for(let u=0;u<Al.length;u+=2)Al[u][0](Al[u+1]);Al.length=0}}}function a(d){r(d(t))}function l(d,s=gt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||gt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function mi(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Vr(i,(l,d)=>{let s=!1,u=[],f=0,p=gt,v=()=>{if(f)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:gt},$=r.map((y,g)=>Pd(y,w=>{u[g]=w,f&=~(1<<g),s&&v()},()=>{f|=1<<g}));return s=!0,v(),function(){Xs($),p(),s=!1}})}function ge(t){let e;return Pd(t,i=>e=i)(),e}var _u=!1,hf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ps(void 0),unsubscribe:gt};if(o.store!==t&&!(hf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=gt;else{var r=!0;o.unsubscribe=Pd(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&hf in i?ge(t):n(o.source)}function Re(){let t={};function e(){Ao(()=>{for(var i in t)t[i].unsubscribe();po(t,hf,{enumerable:!1,value:!0})})}return[t,e]}function _f(t){var e=_u;try{return _u=!1,[t(),_u]}finally{_u=e}}var v1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Pe&&_g(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function kn(t,e,i){return new Proxy(Pe?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},v1)}var g1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];js(r)&&(r=r());let a=Qo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Qo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Go||e===cl)return!1;for(let i of t.props)if(js(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(js(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function Jr(...t){return new Proxy({props:t},g1)}function Ph(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var q,H;var r=(i&1)!==0,a=!ds||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=_f(()=>t[e]):u=t[e];var f=Go in t||cl in t,p=l&&((H=(q=Qo(t,e))==null?void 0:q.set)!=null?H:f&&e in t&&(z=>t[e]=z))||void 0,v=o,$=!0,y=!1,g=()=>(y=!0,$&&($=!1,d?v=Ct(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&hg(e),u=g(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?g():($=!0,y=!1,z)};else{var I=(r?Qr:Sn)(()=>t[e]);I.f|=131072,w=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return w;if(p){var C=t.$$legacy;return function(z,j){return arguments.length>0?((!a||!j||C||s)&&p(j?w():z),z):w()}}var N=!1,L=!1,E=ps(u),P=Qr(()=>{var z=w(),j=n(E);return N?(N=!1,L=!0,j):(L=!1,E.v=z)});return l&&n(P),r||(P.equals=fl),function(z,j){if(lu!==null&&(N=L,w(),n(E)),arguments.length>0){let ae=j?n(P):a&&l?ci(z):z;if(!P.equals(ae)){if(N=!0,O(E,ae),y&&v!==void 0&&(v=ae),Ph(P))return z;Ct(()=>n(P))}return z}return Ph(P)?P.v:n(P)}}var h1;typeof HTMLElement=="function"&&(h1=class extends HTMLElement{constructor(e,i,o){super();pr(this,"$$ctor");pr(this,"$$s");pr(this,"$$c");pr(this,"$$cn",!1);pr(this,"$$d",{});pr(this,"$$r",!1);pr(this,"$$p_d",{});pr(this,"$$l",{});pr(this,"$$l_u",new Map);pr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}connectedCallback(){return vt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=_1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=bf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=ah({component:this.$$ctor,target:this.shadowRoot||this,props:Gt(Ee({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=nu(()=>{Zo(()=>{var a;this.$$r=!0;for(let l of Pp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=bf(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=bf(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Pp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function bf(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function _1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var kh="5";var Ah,Lh,Mh;typeof window!="undefined"&&((Mh=(Lh=(Ah=window.__svelte)!=null?Ah:window.__svelte={}).v)!=null?Mh:Lh.v=new Set).add(kh);import{areValidLiveRecordSources as HT,clientChecker as kv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Hb,safeStorage as UT,throttleFn as zT}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as WT}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as b1,fillWithDefault as $1,VideoQuality as Vh}from"@vkontakte/videoplayer-shared/es2015";var y1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:b1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Vh.Q_480P,highQualityLimit:Vh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Rh=t=>$1(t,y1),Nh=t=>gl("ui-config",t),Mt=()=>vl("ui-config");var kd="vk_player_debug_panel_opened";var Oh="videoplayer",Dh="videoplayer";var ms={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Bh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Fh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Hh=new Set(["ShiftRight","ShiftLeft"]);var Uh=["TIMELINE"],Ad=[...Uh,"GRAPH_BUTTON"],$f=[...Uh,"PLAY_BUTTON"],Ld=[...Ad,"PLAY_BUTTON"];var vs=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(vs||{}),Md={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as zh,VERSION as x1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as w1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as S1}from"@vkontakte/videoplayer-statistics/es2015";var bu="prod",Ll="1.1.81-dev.ea6e4e42.0";var Ra=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Wh=Symbol("storeContext"),Kh=Symbol("microStoresContext"),qh=(t,e)=>{gl(Wh,t),gl(Kh,e),bu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=vl(Wh);return zh(t,"Store context is empty!"),t},xo=()=>{let t=vl(Kh);return zh(t,"MicroStores context is empty!"),t},ri=(t,e)=>yu(t,t.getValue(),e),yu=(t,e,i)=>Vr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Qh=(t,e,i,o)=>{var q,H,z,j,ae,X,ne,ee,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(q=r.throughputEstimation$.getValue())==null?void 0:q.toFixed(0))!=null?H:0,s=(j=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?j:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",f=`${Ll} (core: ${w1}, stat: ${S1}, shared: ${x1})`,p=ge(i.state.errorLog$),v=p.length?`
45
- `+p.map((pe,re)=>{var Ne;let _e=`${re}) Type: ${pe.id}
46
- `,$e=`Message: ${pe.message} (${pe.thrown})
47
- `,J=`Trace: ${(Ne=pe.thrown)==null?void 0:Ne.stack}
48
- `;return _e+$e+J}).join(`
49
- `):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),g=t.info.currentAudioStream$.getValue(),w=[];y&&w.push(`Video: ${(ae=y==null?void 0:y.codec)!=null?ae:""}`+(y!=null&&y.hdr?" (HDR)":"")),g&&w.push(`Audio: ${(X=g==null?void 0:g.codec)!=null?X:""}`+(g!=null&&g.language?` (${g.language})`:""));let I=r.currentQuality$.getValue(),C="";if(I){let pe=r.availableQualitiesFps$.getValue()[I];C=pe?`${pe}fps`:""}let N=r.httpConnectionType$.getValue(),L=(ee=(ne=r.currentBuffer$.getValue())==null?void 0:ne.end)!=null?ee:0,E=Math.max(L-ge(i.state.positionExact$),0),P={Version:f,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":N?N+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:w.join(", "),Quality:`${u} ${I!=null?I:""} ${C}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:$,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:v};return Object.entries(P).filter(([pe,re])=>re!==void 0).map(([pe,re])=>`${pe}: ${re}`).join(`
50
- `)},Gh=(t,e,i)=>{var H,z,j,ae;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:Ll,viewport:`${r}x${a}`,volume:Math.round(ge(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),$=o.liveBufferTime$.getValue();f&&p&&(v&&$?(l.buffer=f.end-$,l.nativeBuffer=p.end-$):(l.buffer=Math.max(f.end-ge(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-ge(i.state.positionExact$),0))),l.position=ge(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let g=o.videoBitrate$.getValue();g&&(l.bitrate=g);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let N=ge(i.vsid);typeof N=="string"&&(l.vsid=N);let L=(H=t.info.currentVideoStream$.getValue())==null?void 0:H.codec;L&&(l.videoCodec=L);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let q=(ae=t.info.currentAudioStream$.getValue())==null?void 0:ae.language;return q&&(l.audioLanguage=q),l},Yh=(t,e)=>Ra(t,e,"mp4"),jh=t=>!t.type,Xh=t=>!!t.type,Zh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},$u=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return vt(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as Sf,safeStorage as ki}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var C1="vk_player_",Jh="vk_player_prefer_traffic_saving_enabled",e_="vk_player_preferred_volume",t_="vk_player_prefer_volume_mute",Cf="vk_player_preferred_quality",yf="vk_player_preferred_default_quality_settings",xf="vk_player_preferred_quality_settings_by_video",i_="vk_player_preferred_stream_language",o_="vk_player_preferred_rate",n_="vk_player_preferred_autoplay_next",wf="vk_player_preferred_subtitles_language",r_="vk_player_user_video_prefs",s_=`${C1}preview_track_close_tooltip`,a_=t=>t>1?1:t<0?0:t,Tf=t=>ki.set(e_,a_(t).toString(10)),xu=()=>{let t=ki.get(e_);return Sf(t)?void 0:a_(parseFloat(t))},If=(t,e)=>ki.set(Cf,JSON.stringify({videoId:t,value:e})),wu=()=>ki.remove(Cf),Ef=t=>{let e=ki.get(Cf);if(Sf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){wu();return}return o},l_=(t,e)=>{e?ki.set(t,"true"):ki.remove(t)},Pf=t=>ki.get(t)==="true",kf=t=>l_(t_,t),d_=()=>Pf(t_),Vd=t=>l_(Jh,t),Af=()=>Pf(Jh),c_=()=>ki.get(i_),Lf=t=>ki.set(i_,t),Mf=()=>ki.get(wf),Vf=t=>{t?ki.set(wf,t):ki.remove(wf)},u_=t=>ki.set(o_,JSON.stringify({rate:t})),p_=()=>{let t=ki.get(o_);if(Sf(t))return;let{rate:e}=JSON.parse(t);return e},f_=t=>{ki.set(n_,String(t))},m_=()=>Pf(n_),T1=()=>{let t=f=>{ki.set(yf,JSON.stringify(f))},e=()=>{try{let f=ki.get(yf);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=ki.get(xf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{ki.set(xf,JSON.stringify(f))},r=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return Gt(Ee({},p),{appliesTo:"to-video"});p&&a();let v=e();return v?Gt(Ee({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{ki.remove(xf)},l=()=>{ki.remove(yf)},d=(f,p="as-default")=>{f.type==="exact_quality"||p==="to-video"?o(f):t(f)},s=f=>{let p=r(f);if(p){switch(p.type){case"traffic_saving":Vd(!0);break;case"exact_quality":If(f,p.quality)}a(),l()}},u=f=>{let p=Ef(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}Af()&&t({type:"traffic_saving",videoId:f}),Vd(!1),wu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Mf,savePreferredSubtitlesLanguage:Vf}},{getPreferredQualitySettings:v_,migrateSettingsToLegacyWay:g_,savePreferredQualitySettings:Su,savePreferredDefaultQualitySettings:aR,removePreferredQualitySettingsByVideo:lR,getPreferredDefaultQualitySettings:Cu}=T1(),I1=3,E1=3,h_=()=>{let t=ki.get(r_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Tu=(t,e)=>{var r,a;let i=h_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Rf=(t,e,i)=>{var l,d,s;let o=(l=h_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=P1(o);ki.set(r_,JSON.stringify(a))};function P1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(E1),e.reduce((o,[r])=>(o[r]=k1(t[r]),o),{})}function k1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(I1),Object.fromEntries(e)}function __(){ki.set(s_,JSON.stringify(!0))}function b_(){let t=ki.get(s_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Db}from"@vkontakte/videoplayer-core/es2015";wg();var ia="var(--btn-color, #fff)";var A1=Ce('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),L1=Ce('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ze(t,e){var f;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,ia),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=L1(),d=T(l);{var s=p=>{var v=A1(),$=ce(v),y=T($);ni(y,()=>e.children),S($),ui(),b(p,v)},u=p=>{var v=Le(),$=ce(v);ni($,()=>e.children),b(p,v)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{Me(l,"aria-label",e.ariaLabel),Me(l,"aria-hidden",!e.ariaLabel),Me(l,"width",i()),Me(l,"height",o()),Me(l,"viewBox",a),Me(l,"fill",r()),Qe(l,e.style),Me(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as x_,InterfaceLanguage as w_}from"@vkontakte/videoplayer-shared/es2015";var M1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
43
+ `)})}}var Aa=!1,Cl=null,La=!1,ks=!1;function Kp(t){ks=t}var bd=[],$d=[],Dt=null,mr=!1;function Qi(t){Dt=t}var bt=null;function fo(t){bt=t}var Qo=null;function Jc(t){Dt!==null&&Dt.f&2097152&&(Qo===null?Qo=[Dt,[t]]:Qo[1].push(t))}var An=null,vr=0,fr=null;function Ig(t){fr=t}var qg=1,lu=0,As=!1,du=null;function ld(){return++qg}function Ia(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&bt!==null&&!As,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&m!==null&&(m.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],Ia(a)&&Wp(a),a.wv>t.wv)return!0}(!o||bt!==null&&!As)&&En(t,1024)}return!1}function Qg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Qo!=null&&Qo[1].includes(t)&&Qo[0]===Dt||((a.f&2)!==0?Qg(a,e,!1):e===a&&(i?En(a,2048):(a.f&1024)!==0&&En(a,4096),cd(a)))}}function Zc(t){var b,y;var e=An,i=vr,o=fr,r=Dt,a=As,l=Qo,d=Ut,s=mr,u=t.f;An=null,vr=0,fr=null,As=(u&256)!==0&&(mr||!La||Dt===null),Dt=(u&96)===0?t:null,Qo=null,rd(t.ctx),mr=!1,lu++,t.f|=2097152;try{var m=(0,t.fn)(),p=t.deps;if(An!==null){var v;if(gd(t,vr),p!==null&&vr>0)for(p.length=vr+An.length,v=0;v<An.length;v++)p[vr+v]=An[v];else t.deps=p=An;if(!As||(u&2)!==0&&t.reactions!==null)for(v=vr;v<p.length;v++)((y=(b=p[v]).reactions)!=null?y:b.reactions=[]).push(t)}else p!==null&&vr<p.length&&(gd(t,vr),p.length=vr);if(fs()&&fr!==null&&!mr&&p!==null&&(t.f&6146)===0)for(v=0;v<fr.length;v++)Qg(fr[v],t);return r!==null&&r!==t&&(lu++,fr!==null&&(o===null?o=fr:o.push(...fr))),m}catch(g){zg(g)}finally{An=e,vr=i,fr=o,Dt=r,As=a,Qo=l,rd(d),mr=s,t.f^=2097152}}function $$(t,e){let i=e.reactions;if(i!==null){var o=sg.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(An===null||!An.includes(e))&&(En(e,4096),(e.f&768)===0&&(e.f^=512),Xc(e),gd(e,0))}function gd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)$$(t,i[o])}function xl(t){var e=t.f;if((e&16384)===0){En(t,1024);var i=bt,o=La;if(bt=t,La=!0,Ae){var r=ur;sd(t.component_function)}try{(e&16)!==0?Dg(t):Yp(t),Gp(t);var a=Zc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=qg,Ae&&ps&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=ld(),l.set_during_effect=!1);Ae&&$d.push(t)}finally{La=o,bt=i,Ae&&sd(r)}}}function Wg(){console.error("Last ten effects were: ",$d.slice(-10).map(t=>t.fn)),$d=[]}function y$(){try{vg()}catch(t){if(Ae&&po(t,"stack",{value:""}),Cl!==null)if(Ae)try{_d(t,Cl)}catch(e){throw Wg(),e}else _d(t,Cl);else throw Ae&&Wg(),t}}function tf(){var t=La;try{var e=0;for(La=!0;bd.length>0;){e++>1e3&&y$();var i=bd,o=i.length;bd=[];for(var r=0;r<o;r++){var a=w$(i[r]);x$(a)}$l.clear()}}finally{Aa=!1,La=t,Cl=null,Ae&&($d=[])}}function x$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Ia(o)&&(xl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Xp(o):o.fn=null))}}function cd(t){Aa||(Aa=!0,queueMicrotask(tf));for(var e=Cl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}bd.push(e)}function w$(t){for(var e=[],i=t;i!==null;){var o=i.f,r=(o&96)!==0,a=r&&(o&1024)!==0;if(!a&&(o&8192)===0){(o&4)!==0?e.push(i):r?i.f^=1024:Ia(i)&&xl(i);var l=i.first;if(l!==null){i=l;continue}}var d=i.parent;for(i=i.next;i===null&&d!==null;)i=d.next,d=d.parent}return e}function Tl(t){var e;for(t&&(Aa=!0,tf(),Aa=!0,e=t());;){if(Fg(),bd.length===0)return Aa=!1,Cl=null,Ae&&($d=[]),e;Aa=!0,tf()}}function vo(){return mt(this,null,function*(){yield Promise.resolve(),Tl()})}function n(t){var e=t.f,i=(e&2)!==0;if(du!==null&&du.add(t),Dt!==null&&!mr){if(!(Qo!=null&&Qo[1].includes(t))||Qo[0]!==Dt){var o=Dt.deps;t.rv<lu&&(t.rv=lu,An===null&&o!==null&&o[vr]===t?vr++:An===null?An=[t]:(!As||!An.includes(t))&&An.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,Ia(r)&&Wp(r)),Ae&&ps&&!mr&&nd!==null&&Dt!==null&&nd.reaction===Dt)if(t.trace)t.trace();else{var l=Ps("TracedAt");if(l){var d=nd.entries.get(t);d===void 0&&(d={traces:[]},nd.entries.set(t,d));var s=d.traces[d.traces.length-1];l.stack!==(s==null?void 0:s.stack)&&d.traces.push(l)}}return ks&&$l.has(t)?$l.get(t):t.v}function Tt(t){var e=mr;try{return mr=!0,t()}finally{mr=e}}var S$=-7169;function En(t,e){t.f=t.f&S$|e}function uu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Ko in t)cu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Ko in i&&cu(i)}}}function cu(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{cu(t[o],e)}catch(r){}let i=wa(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=qc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function of(t,e){if(e){let i=document.body;t.autofocus=!0,kn(()=>{document.activeElement===i&&t.focus()})}}function yd(t){var e=Dt,i=bt;Qi(null),fo(null);try{return t()}finally{Qi(e),fo(i)}}var nf=new Set,pu=new Set;function Ma(t){if(!tt)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function rf(t,e,i,o={}){function r(a){if(o.capture||Il.call(e,a),!a.cancelBubble)return yd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?kn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function at(t,e,i,o,r){var a={capture:o,passive:r},l=rf(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ko(()=>{e.removeEventListener(t,l,a)})}function Ge(t){for(var e=0;e<t.length;e++)nf.add(t[e]);for(var i of pu)i(t)}function Il(t){var C;var e=this,i=e.ownerDocument,o=t.type,r=((C=t.composedPath)==null?void 0:C.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){po(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Dt,p=bt;Qi(null),fo(null);try{for(var v,b=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var g=a["__"+o];if(g!=null&&(!a.disabled||t.target===a))if(dr(g)){var[w,...I]=g;w.apply(a,[t,...I])}else g.call(a,t)}catch(N){v?b.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of b)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,Qi(m),fo(p)}}}var T$;function Gg(){T$=void 0}function El(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Lo(t,e){var i=bt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(tt)return Lo($t,null),$t;r===void 0&&(r=El(a?t:"<!>"+t),i||(r=Ti(r)));var l=o||ud?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ti(l),s=l.lastChild;Lo(d,s)}else Lo(l,l);return l}}function P$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(tt)return Lo($t,null),$t;if(!l){var d=El(a),s=Ti(d);if(r)for(l=document.createDocumentFragment();Ti(s);)l.appendChild(Ti(s));else l=Ti(s)}var u=l.cloneNode(!0);if(r){var m=Ti(u),p=u.lastChild;Lo(m,p)}else Lo(u,u);return u}}function Ie(t,e){return P$(t,e,"svg")}function vs(t=""){if(!tt){var e=Pn(t+"");return Lo(e,e),e}var i=$t;return i.nodeType!==fl&&(i.before(i=Pn()),Si(i)),Lo(i,i),i}function Le(){if(tt)return Lo($t,null),$t;var t=document.createDocumentFragment(),e=document.createComment(""),i=Pn();return t.append(e,i),Lo(e,i),t}function $(t,e){if(tt){bt.nodes_end=$t,Yi();return}t!==null&&t.before(e)}var k$=/\r/g;function jg(t){t=t.replace(k$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Xg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var A$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Zg(t){return A$.includes(t)}var L$=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var M$={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Jg(t){var e;return t=t.toLowerCase(),(e=M$[t])!=null?e:t}var R3=[...L$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var V$=["touchstart","touchmove"];function eh(t){return V$.includes(t)}var R$=["$state","$state.raw","$derived","$derived.by"],N3=[...R$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var N$=["textarea","script","style","title"];function th(t){return N$.includes(t)}function fu(t){return t==null?void 0:t.replace(/\//g,"/​")}var xd=!0;function mu(t){xd=t}function ve(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function ts(t,e){return ih(t,e)}function af(t,e){var l;iu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=tt,r=$t;try{for(var a=Ti(i);a&&(a.nodeType!==cr||a.data!==Zs);)a=Go(a);if(!a)throw cs;mo(!0),Si(a),Yi();let d=ih(t,Qt(ke({},e),{anchor:a}));if($t===null||$t.nodeType!==cr||$t.data!==xa)throw ia(),cs;return mo(!1),d}catch(d){if(d===cs)return e.recover===!1&&gg(),iu(),pd(i),mo(!1),ts(t,e);throw d}finally{mo(o),Si(r),Gg()}}var Pl=new Map;function ih(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){iu();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var b=p[v];if(!d.has(b)){d.add(b);var y=eh(b);e.addEventListener(b,Il,{passive:y});var g=Pl.get(b);g===void 0?(document.addEventListener(b,Il,{passive:y}),Pl.set(b,1)):Pl.set(b,g+1)}}};s(od(nf)),pu.add(s);var u=void 0,m=Og(()=>{var p=i!=null?i:e.appendChild(Pn());return Ri(()=>{if(a){B({});var v=Ut;v.c=a}r&&(o.$$events=r),tt&&Lo(p,null),xd=l,u=t(p,o)||{},xd=!0,tt&&(bt.nodes_end=$t),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,Il);var b=Pl.get(v);--b===0?(document.removeEventListener(v,Il),Pl.delete(v)):Pl.set(v,b)}pu.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return sf.set(u,m),u}var sf=new WeakMap;function Va(t,e){let i=sf.get(t);return i?(sf.delete(t),i(e)):(Ae&&kg(),Promise.resolve())}function ni(t,e,...i){var o=t,r=vt,a;ji(()=>{r!==(r=e())&&(a&&(Gi(a),a=null),Ae&&r==null&&hg(),a=Ri(()=>r(o,...i)))},65536),tt&&(o=$t)}if(Ae){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;$g(e)},set:o=>{i=o}})}};H$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var H$;function Nt(t){Ut===null&&gl("onMount"),us&&Ut.l!==null?B$(Ut).m.push(t):De(()=>{let e=Tt(t);if(typeof e=="function")return e})}function dn(t){Ut===null&&gl("onDestroy"),Nt(()=>()=>Tt(t))}function B$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var oh=new Map;function nh(t,e){var i=oh.get(t);i||(i=new Set,oh.set(t,i)),i.add(e)}function V(t,e,[i,o]=[0,0]){tt&&i===0&&Yi();var r=t,a=null,l=null,d=to,s=i>0?65536:0,u=!1;let m=(v,b=!0)=>{u=!0,p(b,v)},p=(v,b)=>{if(d===(d=v))return;let y=!1;if(tt&&o!==-1){if(i===0){let w=tu(r);w===Zs?o=0:w===Js?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let g=o>i;!!d===g&&(r=Ea(),Si(r),mo(!1),y=!0,o=-1)}d?(a?Ms(a):b&&(a=Ri(()=>b(r))),l&&Xn(l,()=>{l=null})):(l?Ms(l):b&&(l=Ri(()=>b(r,[i+1,o]))),a&&Xn(a,()=>{a=null})),y&&mo(!0)};ji(()=>{u=!1,e(m),u||p(null,null)},s),tt&&(r=$t)}function Vs(t,e,i){tt&&Yi();var o=t,r=to,a,l=fs()?cg:ml;ji(()=>{l(r,r=e())&&(a&&Xn(a),a=Ri(()=>i(o)))}),tt&&(o=$t)}var na=null;function cf(t){na=t}function wd(t,e){return e}function z$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)su(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;pd(s),s.append(i),o.clear(),oa(t,e[0].prev,e[a-1].next)}Zp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),oa(t,m.prev,m.next)),Gi(m.e,!d)}})}function yi(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=tt?Si(Ti(u)):u.appendChild(Pn())}tt&&Yi();var m=null,p=!1,v=In(()=>{var b=i();return dr(b)?b:b==null?[]:od(b)});ji(()=>{var b=n(v),y=b.length;if(p&&y===0)return;p=y===0;let g=!1;if(tt){var w=tu(l)===Js;w!==(y===0)&&(l=Ea(),Si(l),mo(!1),g=!0)}if(tt){for(var I=null,C,N=0;N<y;N++){if($t.nodeType===cr&&$t.data===xa){l=$t,g=!0,mo(!1);break}var A=b[N],E=o(A,N);C=ah($t,d,I,null,A,E,N,r,e,i),d.items.set(E,C),I=C}y>0&&Si(Ea())}tt||W$(b,d,l,r,e,o,i),a!==null&&(y===0?m?Ms(m):m=Ri(()=>a(l)):m!==null&&Xn(m,()=>{m=null})),g&&mo(!0),n(v)}),tt&&(l=$t)}function W$(t,e,i,o,r,a,l){var J,Ce,me,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,p=e.first,v=p,b,y=null,g,w=[],I=[],C,N,A,E;if(d)for(E=0;E<u;E+=1)C=t[E],N=a(C,E),A=m.get(N),A!==void 0&&((J=A.a)==null||J.measure(),(g!=null?g:g=new Set).add(A));for(E=0;E<u;E+=1){if(C=t[E],N=a(C,E),A=m.get(N),A===void 0){var P=v?v.e.nodes_start:i;y=ah(P,e,y,y===null?e.first:y.next,C,N,E,o,r,l),m.set(N,y),w=[],I=[],v=y.next;continue}if(s&&K$(A,C,E,r),(A.e.f&8192)!==0&&(Ms(A.e),d&&((Ce=A.a)==null||Ce.unfix(),(g!=null?g:g=new Set).delete(A))),A!==v){if(b!==void 0&&b.has(A)){if(w.length<I.length){var Q=I[0],F;y=Q.prev;var z=w[0],X=w[w.length-1];for(F=0;F<w.length;F+=1)rh(w[F],Q,i);for(F=0;F<I.length;F+=1)b.delete(I[F]);oa(e,z.prev,X.next),oa(e,y,z),oa(e,X,Q),v=Q,y=X,E-=1,w=[],I=[]}else b.delete(A),rh(A,v,i),oa(e,A.prev,A.next),oa(e,A,y===null?e.first:y.next),oa(e,y,A),y=A;continue}for(w=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&(b!=null?b:b=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;A=v}w.push(A),y=A,v=A.next}if(v!==null||b!==void 0){for(var se=b===void 0?[]:od(b);v!==null;)(v.e.f&8192)===0&&se.push(v),v=v.next;var Z=se.length;if(Z>0){var oe=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<Z;E+=1)(me=se[E].a)==null||me.measure();for(E=0;E<Z;E+=1)(ee=se[E].a)==null||ee.fix()}z$(e,se,oe,m)}}d&&kn(()=>{var be;if(g!==void 0)for(A of g)(be=A.a)==null||be.apply()}),bt.first=e.first&&e.first.e,bt.last=y&&y.e}function K$(t,e,i,o){(o&1)!==0&&yl(t.v,e),(o&2)!==0?yl(t.i,i):t.i=i}function ah(t,e,i,o,r,a,l,d,s,u){var m=na,p=(s&1)!==0,v=(s&16)===0,b=p?v?ms(r,!1,!1):Lr(r):r,y=(s&2)===0?l:Lr(l);Ae&&p&&(b.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var g={i:y,v:b,k:a,a:null,e:null,prev:i,next:o};na=g;try{return g.e=Ri(()=>d(t,b,y,u),tt),g.e.prev=i&&i.e,g.e.next=o&&o.e,i===null?e.first=g:(i.next=g,i.e.next=g.e),o!==null&&(o.prev=g,o.e.prev=g.e),g}finally{na=m}}function rh(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var l=Go(a);r.before(a),a=l}}function oa(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function q$(t,e,i){var a,l;if(!e||e===jg(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=ur)!=null&&l[Qn]&&(o=`in ${ur[Qn]}`),Pg(fu(o))}function Sd(t,e,i=!1,o=!1,r=!1){var a=t,l="";O(()=>{var b;var d=bt;if(l===(l=(b=e())!=null?b:"")){tt&&Yi();return}if(d.nodes_start!==null&&(jp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(tt){for(var s=$t.data,u=Yi(),m=u;u!==null&&(u.nodeType!==cr||u.data!=="");)m=u,u=Go(u);if(u===null)throw ia(),cs;Ae&&!r&&q$(u.parentNode,s,l),Lo($t,m),a=Si(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=El(p);if((i||o)&&(v=Ti(v)),Lo(Ti(v),v.lastChild),i||o)for(;Ti(v);)a.before(Ti(v));else a.before(v)}})}function Ni(t,e,i){tt&&Yi();var o=t,r,a;ji(()=>{r!==(r=e())&&(a&&(Xn(a),a=null),r&&(a=Ri(()=>i(o,r))))},65536),tt&&(o=$t)}function Ra(t,e,i,o,r,a){var y;let l=tt;tt&&Yi();var d=Ae&&a&&((y=Ut)==null?void 0:y.function[Qn]),s,u,m=null;tt&&$t.nodeType===Gc&&(m=$t,Yi());var p=tt?$t:t,v,b=na;ji(()=>{let g=e()||null;var w=r?r():i||g==="svg"?Wc:null;if(g!==s){var I=na;cf(b),v&&(g===null?Xn(v,()=>{v=null,u=null}):g===u?Ms(v):(Gi(v),mu(!1))),g&&g!==u&&(v=Ri(()=>{if(m=tt?m:w?document.createElementNS(w,g):document.createElement(g),Ae&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Lo(m,m),o){tt&&th(g)&&m.append(document.createComment(""));var C=tt?Ti(m):m.appendChild(Pn());tt&&(C===null?mo(!1):Si(C)),o(m,C)}bt.nodes_end=m,p.before(m)})),s=g,s&&(u=s),mu(!0),cf(I)}},65536),l&&(mo(!0),Si(p))}var pf;function lh(t){return pf=t.target,new uf(t)}var Rs,Mr,uf=class{constructor(e){Xs(this,Rs);Xs(this,Mr);var a,l;var i=new Map,o=(d,s)=>{var u=ms(s,!1,!1);return i.set(d,u),u};let r=new Proxy(Qt(ke({},e.props||{}),{$$events:{}}),{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===pl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var m;return R((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});ul(this,Mr,(e.hydrate?af:ts)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Tl(),ul(this,Rs,r.$$events);for(let d of Object.keys(Vi(this,Mr)))d==="$set"||d==="$destroy"||d==="$on"||po(this,d,{get(){return Vi(this,Mr)[d]},set(s){Vi(this,Mr)[d]=s},enumerable:!0});Vi(this,Mr).$set=d=>{Object.assign(r,d)},Vi(this,Mr).$destroy=()=>{Va(Vi(this,Mr))}}$set(e){Vi(this,Mr).$set(e)}$on(e,i){Vi(this,Rs)[e]=Vi(this,Rs)[e]||[];let o=(...r)=>i.call(this,...r);return Vi(this,Rs)[e].push(o),()=>{Vi(this,Rs)[e]=Vi(this,Rs)[e].filter(r=>r!==o)}}$destroy(){Vi(this,Mr).$destroy()}};Rs=new WeakMap,Mr=new WeakMap;function G(t,e){kn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=pf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Ae&&nh(e.hash,d)}})}function Ns(t,e){var i=void 0,o;ji(()=>{i!==(i=e())&&(o&&(Gi(o),o=null),i&&(o=Ri(()=>{Ao(()=>i(t))})))})}function dh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=dh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function ch(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=dh(t))&&(o&&(o+=" "),o+=e);return o}function Cd(t){return typeof t=="object"?ch(t):t!=null?t:""}var uh=[...`
44
+ \r\f \v\uFEFF`];function fh(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var r in i)if(i[r])o=o?o+" "+r:r;else if(o.length)for(var a=r.length,l=0;(l=o.indexOf(r,l))>=0;){var d=l+a;(l===0||uh.includes(o[l-1]))&&(d===o.length||uh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function ph(t,e=!1){var i=e?" !important;":";",o="";for(var r in t){var a=t[r];a!=null&&a!==""&&(o+=" "+r+": "+a+i)}return o}function ff(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function mh(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(ff)),r&&s.push(...Object.keys(r).map(ff));var u=0,m=-1;let g=t.length;for(var p=0;p<g;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&m===-1)m=p;else if(v===";"||p===g-1){if(m!==-1){var b=ff(t.substring(u,m).trim());if(!s.includes(b)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,m=-1}}}}return o&&(i+=ph(o)),r&&(i+=ph(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ne(t,e,i,o,r,a){var l=t.__className;if(tt||l!==i||l===void 0){var d=fh(i,o,a);(!tt||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function mf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function Ke(t,e,i,o){var r=t.__style;if(tt||r!==e){var a=mh(e,o);(!tt||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(mf(t,i==null?void 0:i[0],o[0]),mf(t,i==null?void 0:i[1],o[1],"important")):mf(t,i,o));return o}function Td(t,e,i){if(t.multiple){if(e==null)return;if(!dr(e))return Ag();for(var o of t.options)o.selected=e.includes(vh(o));return}for(o of t.options){var r=vh(o);if(Bp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function vf(t){var e=new MutationObserver(()=>{Td(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ko(()=>{e.disconnect()})}function vh(t){return"__value"in t?t.__value:t.value}var kl=Symbol("class"),Al=Symbol("style"),_h=Symbol("is custom element"),bh=Symbol("is html");function $h(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var r=xh(t);if(tt&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||e1(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[dg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&wh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function yh(t,e,i,o,r=!1){var A;var a=xh(t),l=a[_h],d=!a[bh];let s=tt&&l;s&&mo(!1);var u=e||{},m=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Cd(i.class):(o||i[kl])&&(i.class=null),i[Al]&&((A=i.style)!=null||(i.style=null));var v=wh(t);for(let E in i){let P=i[E];if(m&&E==="value"&&P==null){t.value=t.__value="",u[E]=P;continue}if(E==="class"){var b=t.namespaceURI==="http://www.w3.org/1999/xhtml";ne(t,b,P,o,e==null?void 0:e[kl],i[kl]),u[E]=P,u[kl]=i[kl];continue}if(E==="style"){Ke(t,P,e==null?void 0:e[Al],i[Al]),u[E]=P,u[Al]=i[Al];continue}var y=u[E];if(!(P===y&&!(P===void 0&&t.hasAttribute(E)))){u[E]=P;var g=E[0]+E[1];if(g!=="$$")if(g==="on"){let Q={},F="$$"+E,z=E.slice(2);var w=Zg(z);if(Xg(z)&&(z=z.slice(0,-7),Q.capture=!0),!w&&y){if(P!=null)continue;t.removeEventListener(z,u[F],Q),u[F]=null}if(P!=null)if(w)t[`__${z}`]=P,Ge([z]);else{let X=function(se){u[E].call(this,se)};var N=X;u[F]=rf(z,t,X,Q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Ve(t,E,P);else if(E==="autofocus")of(t,!!P);else if(!l&&(E==="__value"||E==="value"&&P!=null))t.value=t.__value=P;else if(E==="selected"&&m)$h(t,P);else{var I=E;d||(I=Jg(I));var C=I==="defaultValue"||I==="defaultChecked";if(P==null&&!l&&!C)if(a[E]=null,I==="value"||I==="checked"){let Q=t,F=e===void 0;if(I==="value"){let z=Q.defaultValue;Q.removeAttribute(I),Q.defaultValue=z,Q.value=Q.__value=F?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(I),Q.defaultChecked=z,Q.checked=F?z:!1}}else t.removeAttribute(E);else C||v.includes(I)&&(l||typeof P!="string")?t[I]=P:typeof P!="function"&&Ve(t,I,P,r)}}}return s&&mo(!0),u}function io(t,e,i=[],o,r=!1,a=Zr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",m=!1;if(ji(()=>{var v=e(...l.map(n)),b=yh(t,d,v,o,r);m&&u&&"value"in v&&Td(t,v.value,!1);for(let g of Object.getOwnPropertySymbols(s))v[g]||Gi(s[g]);for(let g of Object.getOwnPropertySymbols(v)){var y=v[g];g.description===Ap&&(!d||y!==d[g])&&(s[g]&&Gi(s[g]),s[g]=Ri(()=>Ns(t,()=>y))),b[g]=y}d=b}),u){var p=t;Ao(()=>{Td(p,d.value),vf(p)})}m=!0}function xh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[_h]:t.nodeName.includes("-"),[bh]:t.namespaceURI===ig}}var gh=new Map;function wh(t){var e=gh.get(t.nodeName);if(e)return e;gh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=qc(o);for(var a in i)i[a].set&&e.push(a);o=wa(o)}return e}function e1(t,e,i){var o;Ae&&(e==="srcset"&&t1(t,i)||gf((o=t.getAttribute(e))!=null?o:"",i)||Eg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function gf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function hh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function t1(t,e){var i=hh(t.srcset),o=hh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(gf(i[l][0],r)||gf(r,i[l][0])))}var i1=Kc?()=>performance.now():()=>Date.now(),is={tick:t=>(Kc?requestAnimationFrame:vt)(t),now:()=>i1(),tasks:new Set};function Sh(){let t=is.now();is.tasks.forEach(e=>{e.c(t)||(is.tasks.delete(e),e.f())}),is.tasks.size!==0&&is.tick(Sh)}function Ch(t){let e;return is.tasks.size===0&&is.tick(Sh),{promise:new Promise(i=>{is.tasks.add(e={c:t,f:i})}),abort(){is.tasks.delete(e)}}}function vu(t,e){yd(()=>{t.dispatchEvent(new CustomEvent(e))})}function s1(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;let e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function Th(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=s1(r.trim());e[l]=a.trim()}return e}var a1=t=>t;function os(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,m=e.inert,p=e.style.overflow,v,b;function y(){var P;var A=Dt,E=bt;Qi(null),fo(null);try{return u!=null?u:u=i()(e,(P=o==null?void 0:o())!=null?P:{},{direction:s})}finally{Qi(A),fo(E)}}var g={is_global:d,in(){var A;if(e.inert=m,!r){b==null||b.abort(),(A=b==null?void 0:b.reset)==null||A.call(b);return}a||v==null||v.abort(),vu(e,"introstart"),v=hf(e,y(),b,1,()=>{vu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,vu(e,"outrostart"),b=hf(e,y(),v,0,()=>{vu(e,"outroend"),A==null||A()})},stop:()=>{v==null||v.abort(),b==null||b.abort()}},w=bt;if(((N=w.transitions)!=null?N:w.transitions=[]).push(g),r&&xd){var I=d;if(!I){for(var C=w.parent;C&&(C.f&65536)!==0;)for(;(C=C.parent)&&(C.f&16)===0;);I=!C||(C.f&32768)!==0}I&&Ao(()=>{Tt(()=>g.in())})}}function hf(t,e,i,o,r){var a=o===1;if(ea(e)){var l,d=!1;return kn(()=>{if(!d){var w=e({direction:a?"in":"out"});l=hf(t,w,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:vt,deactivate:vt,reset:vt,t:()=>o};let{delay:s=0,css:u,tick:m,easing:p=a1}=e;var v=[];if(a&&i===void 0&&(m&&m(0,1),u)){var b=Th(u(0,1));v.push(b,b)}var y=()=>1-o,g=t.animate(v,{duration:s,fill:"forwards"});return g.onfinish=()=>{var z;g.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-w,C=e.duration*Math.abs(I),N=[];if(C>0){var A=!1;if(u)for(var E=Math.ceil(C/16.666666666666668),P=0;P<=E;P+=1){var Q=w+I*p(P/E),F=Th(u(Q,1-Q));N.push(F),A||(A=F.overflow==="hidden")}A&&(t.style.overflow="hidden"),y=()=>{var X=g.currentTime;return w+I*p(X/C)},m&&Ch(()=>{if(g.playState!=="running")return!1;var X=y();return m(X,1-X),!0})}g=t.animate(N,{duration:C,fill:"forwards"}),g.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=vt)},deactivate:()=>{r=vt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function _f(t,e,i){var o=Wo(t,e);o&&o.set&&(t[e]=i,ko(()=>{t[e]=null}))}var ra,Ll,Id,hu,Ih,_u=class _u{constructor(e){Xs(this,hu);Xs(this,ra,new WeakMap);Xs(this,Ll);Xs(this,Id);ul(this,Id,e)}observe(e,i){var o=Vi(this,ra).get(e)||new Set;return o.add(i),Vi(this,ra).set(e,o),eg(this,hu,Ih).call(this).observe(e,Vi(this,Id)),()=>{var r=Vi(this,ra).get(e);r.delete(i),r.size===0&&(Vi(this,ra).delete(e),Vi(this,Ll).unobserve(e))}}};ra=new WeakMap,Ll=new WeakMap,Id=new WeakMap,hu=new WeakSet,Ih=function(){var e;return(e=Vi(this,Ll))!=null?e:ul(this,Ll,new ResizeObserver(i=>{for(var o of i){_u.entries.set(o.target,o);for(var r of Vi(this,ra).get(o.target)||[])r(o)}}))},lr(_u,"entries",new WeakMap);var bf=_u;var l1=new bf({box:"border-box"});function Ln(t,e,i){var o=l1.observe(t,()=>i(t[e]));Ao(()=>(Tt(()=>i(t[e])),o))}function Eh(t,e){return t===e||(t==null?void 0:t[Ko])===e}function Xe(t={},e,i,o){return Ao(()=>{var r,a;return Yo(()=>{r=a,a=(o==null?void 0:o())||[],Tt(()=>{t!==i(...a)&&(e(t,...a),r&&Eh(i(...r),t)&&e(null,...r))})}),()=>{kn(()=>{a&&Eh(i(...a),t)&&e(null,...a)})}}),t}function ho(t=!1){let e=Ut,i=e.l.u;if(!i)return;let o=()=>uu(e.s);if(t){let r=0,a={},l=Zr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&vd(()=>{Ph(e,o),ta(i.b)}),De(()=>{let r=Tt(()=>i.m.map(lg));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&De(()=>{Ph(e,o),ta(i.a)})}function Ph(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Ed(t,e,i){if(t==null)return e(void 0),i&&i(void 0),vt;let o=Tt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Ml=[];function Vr(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=vt){let i=null,o=new Set;function r(d){if(ml(t,d)&&(t=d,i)){let s=!Ml.length;for(let u of o)u[1](),Ml.push(u,t);if(s){for(let u=0;u<Ml.length;u+=2)Ml[u][0](Ml[u+1]);Ml.length=0}}}function a(d){r(d(t))}function l(d,s=vt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||vt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function hi(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Vr(i,(l,d)=>{let s=!1,u=[],m=0,p=vt,v=()=>{if(m)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:vt},b=r.map((y,g)=>Ed(y,w=>{u[g]=w,m&=~(1<<g),s&&v()},()=>{m|=1<<g}));return s=!0,v(),function(){ta(b),p(),s=!1}})}function $e(t){let e;return Ed(t,i=>e=i)(),e}var bu=!1,$f=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ms(void 0),unsubscribe:vt};if(o.store!==t&&!($f in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=vt;else{var r=!0;o.unsubscribe=Ed(t,l=>{r?o.source.v=l:R(o.source,l)}),r=!1}return t&&$f in i?$e(t):n(o.source)}function Oe(){let t={};function e(){ko(()=>{for(var i in t)t[i].unsubscribe();po(t,$f,{enumerable:!1,value:!0})})}return[t,e]}function yf(t){var e=bu;try{return bu=!1,[t(),bu]}finally{bu=e}}var v1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ae&&bg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Mn(t,e,i){return new Proxy(Ae?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},v1)}var g1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ea(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];ea(r)&&(r=r());let a=Wo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ea(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Wo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Ko||e===pl)return!1;for(let i of t.props)if(ea(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(ea(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function ns(...t){return new Proxy({props:t},g1)}function kh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var Q,F;var r=(i&1)!==0,a=!us||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=yf(()=>t[e]):u=t[e];var m=Ko in t||pl in t,p=l&&((F=(Q=Wo(t,e))==null?void 0:Q.set)!=null?F:m&&e in t&&(z=>t[e]=z))||void 0,v=o,b=!0,y=!1,g=()=>(y=!0,b&&(b=!1,d?v=Tt(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&_g(e),u=g(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?g():(b=!0,y=!1,z)};else{var I=(r?Zr:In)(()=>t[e]);I.f|=131072,w=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return w;if(p){var C=t.$$legacy;return function(z,X){return arguments.length>0?((!a||!X||C||s)&&p(X?w():z),z):w()}}var N=!1,A=!1,E=ms(u),P=Zr(()=>{var z=w(),X=n(E);return N?(N=!1,A=!0,X):(A=!1,E.v=z)});return l&&n(P),r||(P.equals=vl),function(z,X){if(du!==null&&(N=A,w(),n(E)),arguments.length>0){let se=X?n(P):a&&l?ci(z):z;if(!P.equals(se)){if(N=!0,R(E,se),y&&v!==void 0&&(v=se),kh(P))return z;Tt(()=>n(P))}return z}return kh(P)?P.v:n(P)}}var h1;typeof HTMLElement=="function"&&(h1=class extends HTMLElement{constructor(e,i,o){super();lr(this,"$$ctor");lr(this,"$$s");lr(this,"$$c");lr(this,"$$cn",!1);lr(this,"$$d",{});lr(this,"$$r",!1);lr(this,"$$p_d",{});lr(this,"$$l",{});lr(this,"$$l_u",new Map);lr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}connectedCallback(){return mt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),$(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=_1(this);for(let a of this.$$s)a in r&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let l=this.$$g_p(a.name);l in this.$$d||(this.$$d[l]=xf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=lh({component:this.$$ctor,target:this.shadowRoot||this,props:Qt(ke({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=ru(()=>{Yo(()=>{var a;this.$$r=!0;for(let l of Lp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=xf(l,this.$$d[l],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,d)}this.$$r=!1})});for(let a in this.$$l)for(let l of this.$$l[a]){let d=this.$$c.$on(a,l);this.$$l_u.set(l,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=xf(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Lp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function xf(t,e,i,o){var a;let r=(a=i[t])==null?void 0:a.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function _1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Ah="5";var Lh,Mh,Vh;typeof window!="undefined"&&((Vh=(Mh=(Lh=window.__svelte)!=null?Lh:window.__svelte={}).v)!=null?Vh:Mh.v=new Set).add(Ah);import{areValidLiveRecordSources as UT,clientChecker as Mv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Ub,safeStorage as zT,throttleFn as WT}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as KT}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as b1,fillWithDefault as $1,VideoQuality as Rh}from"@vkontakte/videoplayer-shared/es2015";var y1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:b1.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!0,isSmoothVideoRotate:!0,showSupport:!0,supportLink:"https://vk.com/support?act=new&from=v",showLogo:void 0,logoLink:"https://vk.com/video",logoType:"vk_video",volumeDefault:1,volumeMinRestore:.05,loaderDelay:500,minSubtitlesFontSize:13,autoSubtitlesTimeout:2e3,allowChangingFullscreenTarget:!0,trafficSavingLimit:Rh.Q_480P,highQualityLimit:Rh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Nh=t=>$1(t,y1),Oh=t=>_l("ui-config",t),Ot=()=>hl("ui-config");var Pd="vk_player_debug_panel_opened";var Dh="videoplayer",Bh="videoplayer";var gs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Hh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Fh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Uh=new Set(["ShiftRight","ShiftLeft"]);var zh=["TIMELINE"],kd=[...zh,"GRAPH_BUTTON"],wf=[...zh,"PLAY_BUTTON"],Ad=[...kd,"PLAY_BUTTON"];var hs=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(hs||{}),Ld={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Wh,VERSION as x1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as w1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as S1}from"@vkontakte/videoplayer-statistics/es2015";var $u="prod",Vl="1.1.81-dev.f4d0e2c9.0";var Oa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Kh=Symbol("storeContext"),qh=Symbol("microStoresContext"),Qh=(t,e)=>{_l(Kh,t),_l(qh,e),$u==="dev"&&(window.app={store:t,microStores:e})},_e=()=>{let t=hl(Kh);return Wh(t,"Store context is empty!"),t},_o=()=>{let t=hl(qh);return Wh(t,"MicroStores context is empty!"),t},ri=(t,e)=>xu(t,t.getValue(),e),xu=(t,e,i)=>Vr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Gh=(t,e,i,o,r=["meta config not provided"])=>{var F,z,X,se,Z,oe,J,Ce,me;let a=t.info,{width:l,height:d}=$e(i.ui.playerSize),s=(z=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?z:0,u=(se=(X=a.rttEstimation$.getValue())==null?void 0:X.toFixed(0))!=null?se:0,m=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Vl} (core: ${w1}, stat: ${S1}, shared: ${x1})`,v=$e(i.state.errorLog$),b=v.length?`
45
+ `+v.map((ee,be)=>{var qe;let we=`${be}) Type: ${ee.id}
46
+ `,ge=`Message: ${ee.message} (${ee.thrown})
47
+ `,pe=`Trace: ${(qe=ee.thrown)==null?void 0:qe.stack}
48
+ `;return we+ge+pe}).join(`
49
+ `):void 0,y=i.state.isAudioDisabled?"disabled":$e(i.state.isAudioAvailable$)?void 0:"unavailable",g=t.info.currentVideoStream$.getValue(),w=t.info.currentAudioStream$.getValue(),I=[];g&&I.push(`Video: ${(Z=g==null?void 0:g.codec)!=null?Z:""}`+(g!=null&&g.hdr?" (HDR)":"")),w&&I.push(`Audio: ${(oe=w==null?void 0:w.codec)!=null?oe:""}`+(w!=null&&w.language?` (${w.language})`:""));let C=a.currentQuality$.getValue(),N="";if(C){let ee=a.availableQualitiesFps$.getValue()[C];N=ee?`${ee}fps`:""}let A=a.httpConnectionType$.getValue(),E=(Ce=(J=a.currentBuffer$.getValue())==null?void 0:J.end)!=null?Ce:0,P=Math.max(E-$e(i.state.positionExact$),0),Q={Version:p,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:$e(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":A?A+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${s}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${m} ${C!=null?C:""} ${N}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${$e(i.state.positionExact$)}s`,Buffer:`${P}s`,State:`${$e(i.playerPhase)} ${(me=a.playbackState$.getValue())!=null?me:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:b};return Object.entries(Q).filter(([ee,be])=>be!==void 0).map(([ee,be])=>`${ee}: ${be}`).join(`
50
+ `)},Yh=(t,e,i)=>{var F,z,X,se;let o=t.info,{width:r,height:a}=$e(i.ui.playerSize),l={version:Vl,viewport:`${r}x${a}`,volume:Math.round($e(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let m=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),b=o.liveBufferTime$.getValue();m&&p&&(v&&b?(l.buffer=m.end-b,l.nativeBuffer=p.end-b):(l.buffer=Math.max(m.end-$e(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-$e(i.state.positionExact$),0))),l.position=$e(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let g=o.videoBitrate$.getValue();g&&(l.bitrate=g);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let N=$e(i.vsid);typeof N=="string"&&(l.vsid=N);let A=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;A&&(l.videoCodec=A);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((X=t.info.currentVideoStream$.getValue())==null?void 0:X.hdr)&&(l.hdr=!0);let Q=(se=t.info.currentAudioStream$.getValue())==null?void 0:se.language;return Q&&(l.audioLanguage=Q),l},jh=(t,e)=>Oa(t,e,"mp4"),Xh=t=>!t.type,Zh=t=>!!t.type,Jh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},yu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return mt(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as If,safeStorage as Ii}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var C1="vk_player_",e_="vk_player_prefer_traffic_saving_enabled",t_="vk_player_preferred_volume",i_="vk_player_prefer_volume_mute",Ef="vk_player_preferred_quality",Sf="vk_player_preferred_default_quality_settings",Cf="vk_player_preferred_quality_settings_by_video",o_="vk_player_preferred_stream_language",n_="vk_player_preferred_rate",r_="vk_player_preferred_autoplay_next",Tf="vk_player_preferred_subtitles_language",s_="vk_player_user_video_prefs",a_=`${C1}preview_track_close_tooltip`,l_=t=>t>1?1:t<0?0:t,Pf=t=>Ii.set(t_,l_(t).toString(10)),wu=()=>{let t=Ii.get(t_);return If(t)?void 0:l_(parseFloat(t))},kf=(t,e)=>Ii.set(Ef,JSON.stringify({videoId:t,value:e})),Su=()=>Ii.remove(Ef),Af=t=>{let e=Ii.get(Ef);if(If(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){Su();return}return o},d_=(t,e)=>{e?Ii.set(t,"true"):Ii.remove(t)},Lf=t=>Ii.get(t)==="true",Mf=t=>d_(i_,t),c_=()=>Lf(i_),Md=t=>d_(e_,t),Vf=()=>Lf(e_),u_=()=>Ii.get(o_),Rf=t=>Ii.set(o_,t),Nf=()=>Ii.get(Tf),Of=t=>{t?Ii.set(Tf,t):Ii.remove(Tf)},p_=t=>Ii.set(n_,JSON.stringify({rate:t})),f_=()=>{let t=Ii.get(n_);if(If(t))return;let{rate:e}=JSON.parse(t);return e},m_=t=>{Ii.set(r_,String(t))},v_=()=>Lf(r_),T1=()=>{let t=m=>{Ii.set(Sf,JSON.stringify(m))},e=()=>{try{let m=Ii.get(Sf);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Ii.get(Cf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Ii.set(Cf,JSON.stringify(m))},r=m=>{u(m);let p=m?i():null;if(p&&(p==null?void 0:p.videoId)===m)return Qt(ke({},p),{appliesTo:"to-video"});p&&a();let v=e();return v?Qt(ke({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ii.remove(Cf)},l=()=>{Ii.remove(Sf)},d=(m,p="as-default")=>{m.type==="exact_quality"||p==="to-video"?o(m):t(m)},s=m=>{let p=r(m);if(p){switch(p.type){case"traffic_saving":Md(!0);break;case"exact_quality":kf(m,p.quality)}a(),l()}},u=m=>{let p=Af(m);if(p){o({type:"exact_quality",videoId:m,quality:p});return}Vf()&&t({type:"traffic_saving",videoId:m}),Md(!1),Su()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Nf,savePreferredSubtitlesLanguage:Of}},{getPreferredQualitySettings:g_,migrateSettingsToLegacyWay:h_,savePreferredQualitySettings:Cu,savePreferredDefaultQualitySettings:lR,removePreferredQualitySettingsByVideo:dR,getPreferredDefaultQualitySettings:Tu}=T1(),I1=3,E1=3,__=()=>{let t=Ii.get(s_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Iu=(t,e)=>{var r,a;let i=__();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Df=(t,e,i)=>{var l,d,s;let o=(l=__())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=P1(o);Ii.set(s_,JSON.stringify(a))};function P1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(E1),e.reduce((o,[r])=>(o[r]=k1(t[r]),o),{})}function k1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(I1),Object.fromEntries(e)}function b_(){Ii.set(a_,JSON.stringify(!0))}function $_(){let t=Ii.get(a_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Bb}from"@vkontakte/videoplayer-core/es2015";Sg();var sa="var(--btn-color, #fff)";var A1=Ie('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),L1=Ie('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ze(t,e){var m;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,sa),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=L1(),d=T(l);{var s=p=>{var v=A1(),b=ue(v),y=T(b);ni(y,()=>e.children),S(b),ui(),$(p,v)},u=p=>{var v=Le(),b=ue(v);ni(b,()=>e.children),$(p,v)};V(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),O(()=>{Ve(l,"aria-label",e.ariaLabel),Ve(l,"aria-hidden",!e.ariaLabel),Ve(l,"width",i()),Ve(l,"height",o()),Ve(l,"viewBox",a),Ve(l,"fill",r()),Ke(l,e.style),Ve(l,"data-testid",e.testId)}),$(t,l),H()}import{isNullable as w_,InterfaceLanguage as S_}from"@vkontakte/videoplayer-shared/es2015";var M1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
51
51
  качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
52
- попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},$_=M1;var V1={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
52
+ попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},y_=M1;var V1={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
53
53
  so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
54
- Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},y_=V1;var Ms=new Map;Ms.set(w_.EN,y_);Ms.set(w_.RU,$_);var S_=new Map,Nf=({language:t,pack:e,fallback:i})=>{if(Ms.has(t)){let o=Ms.get(t);Ms.set(t,Ee(Ee({},o),e))}else Ms.set(t,e);S_.set(t,i)},Of=t=>Ms.has(t),Df=(t,e,i,o)=>{var l;let r=Ms.get(t),a=r==null?void 0:r[e];if(x_(a)){let d=(l=S_.get(t))!=null?l:o,s=d?Ms.get(d):void 0;a=s==null?void 0:s[e]}return x_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},G=(t,e)=>{let{interfaceLanguage$:i}=ve(),o=ge(i),r=Mt();return Df(o,t,e,r.defaultLanguage)};var R1=Ce('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Rd(t,e){B(e,!1);let i=G("video360");yo(),Ze(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=R1();b(o,a)},$$slots:{default:!0}}),F()}import"@vkontakte/videoplayer-core/es2015";var Ml;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Ml||(Ml={}));var N1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,O1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,D1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Iu="?",B1="X-Sentry-Auth",F1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function H1(t){if(!t.stack)return null;let e=[],i=t.stack.split(`
55
- `),o,r;for(let a=0;a<i.length;++a){if(o=N1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Iu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=D1.exec(i[a]))r={filename:o[2],function:o[1]||Iu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=O1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Iu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Iu),e.push(r)}return e.length?{value:C_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function C_(t){return(t&&t.message||"No error message").split(`
56
- `).filter(i=>!!i)[0]}function U1(t){try{let e=H1(t);if(e)return e}catch(e){}return{value:C_(t),type:t&&t.name,stacktrace:{frames:[]}}}function z1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Eu=class{constructor(e){if(e&&e.dsn){let i=F1.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return Gt(Ee({},this.getRequestBlank()),{exception:{values:[U1(e)]}})}report(e){this.send(this.prepare(e))}send(e){!this.apiUrl||!e||this.createRequest(e)}createRequest(e){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(B1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:z1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function T_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function W1(){return window}var Pu=class t extends Eu{constructor(e,i=W1()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",Ee({},e)),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",Ee({},e)),this}setUser(e){return this.setKeyState("user",Ee({},e)),this}clone(){let e=new t(Gt(Ee({},this.options),{plugins:[]}));return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[Ee({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(Gt(Ee({},this.getRequestBlank()),{message:e,level:i}))}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>T_(i,o))):!1}getRequestBlank(){return Ee(Gt(Ee({request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}}},super.getRequestBlank()),{sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"}}),this.state)}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend(Ee({release:this.release},e))),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>T_(i,o)):!1}getEventFilterUrl(e){try{if(e.exception){let i=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(i){return null}}extendState(e){this._state=Object.keys(e).reduce((i,o)=>{let r=this._state[o],a=Array.isArray(r)?r:null,l=e[o],d=Array.isArray(l)?l:null;return Gt(Ee({},i),{[o]:a||d?[...a||[],...d||[]]:Ee(Ee({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as ku,Subscription as K1}from"@vkontakte/videoplayer-shared/es2015";var Au=null,Na=class{constructor(e,i,o={}){!Au&&e.dsn&&(this.sentryClient=new Pu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new K1,this.options=e,this.context=o,Au=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Au=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:f,blackErrorCategoryList:p}=l,{errorType:v,category:$}=i;if(ku($)&&p.includes($)||ku(v)&&f.includes(v))return;if(Math.random()<=d||ku($)&&u.includes($)||ku(v)&&s.includes(v)){Object.keys(i).length&&r.setTags(Ee({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ee(Ee({},a),o));try{v&&r.captureMessage(v,i.fatal?Ml.fatal:Ml.error),r.report(e)}catch(g){console.error(g)}}}static getInstance(){return Au}};var gs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(gs||{});var Lu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Mu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),I_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,E_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Nd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},oa=()=>!!Nd(),Vu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Ru=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},P_=t=>{let e=window.screen;return(r=>vt(null,null,function*(){return e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject()}))(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as k_}from"@vkontakte/videoplayer-core/es2015";var A_=()=>({title:G("hotkey_map_modal_title"),closeBtnText:G("hotkey_map_modal_close_btn_text"),groups:[{title:G("hotkey_map_group_title_common"),items:[{description:G("hotkey_map_item_mute_description"),value:G("hotkey_map_item_mute_value")},{description:G("hotkey_map_item_volume_up_description"),value:G("hotkey_map_item_volume_up_value")},{description:G("hotkey_map_item_volume_down_description"),value:G("hotkey_map_item_volume_down_value")},{description:G("hotkey_map_item_pip_description"),value:G("hotkey_map_item_pip_value")},{description:G("hotkey_map_item_full_screen_description"),value:G("hotkey_map_item_full_screen_value")},{description:G("hotkey_map_item_show_context_menu_description"),value:G("hotkey_map_item_show_context_menu_value")},{description:G("hotkey_map_item_show_hotkey_map_description"),value:G("hotkey_map_item_show_hotkey_map_value")}]},{title:G("hotkey_map_group_title_playback"),items:[{description:G("hotkey_map_item_play_toggle_description"),value:G("hotkey_map_item_play_toggle_value")},{description:G("hotkey_map_item_seek_backward_description"),value:G("hotkey_map_item_seek_backward_value")},{description:G("hotkey_map_item_seek_forward_description"),value:G("hotkey_map_item_seek_forward_value")},{description:G("hotkey_map_item_fast_seek_backward_description"),value:G("hotkey_map_item_fast_seek_backward_value")},{description:G("hotkey_map_item_fast_seek_forward_description"),value:G("hotkey_map_item_fast_seek_forward_value")},{description:G("hotkey_map_item_rate_down_description"),value:G("hotkey_map_item_rate_down_value")},{description:G("hotkey_map_item_rate_up_description"),value:G("hotkey_map_item_rate_up_value")},{description:G("hotkey_map_item_prev_frame_description"),value:G("hotkey_map_item_prev_frame_value")},{description:G("hotkey_map_item_next_frame_description"),value:G("hotkey_map_item_next_frame_value")},{description:G("hotkey_map_item_jump_seek_description"),value:G("hotkey_map_item_jump_seek_value")},{description:G("hotkey_map_item_next_video_description"),value:G("hotkey_map_item_next_video_value")},{description:G("hotkey_map_item_prev_video_description"),value:G("hotkey_map_item_prev_video_value")}]},{title:G("hotkey_map_group_title_subtitles"),items:[{description:G("hotkey_map_item_subtitles_toggle_description"),value:G("hotkey_map_item_subtitles_toggle_value")}]},{title:G("hotkey_map_group_title_episodes"),items:[{description:G("hotkey_map_item_prev_episode_description"),value:k_.device.isApple?G("hotkey_map_item_prev_episode_mac_value"):G("hotkey_map_item_prev_episode_pc_value")},{description:G("hotkey_map_item_next_episode_description"),value:k_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as q1,ValueSubject as Bf}from"@vkontakte/videoplayer-shared/es2015";var Oa=class{constructor({enabled:e=!0}={enabled:!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:q1(this.onResize.bind(this),300)};this.info={isActive$:new Bf(!1),isEnabled$:new Bf(!1),type:0};this.info.isEnabled$=new Bf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return vt(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return vt(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return vt(this,null,function*(){!this.isSupported()||!this.isActive()||(yield document.exitPictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Ee({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return vt(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Da(t){return t instanceof Oa}import{devNull as L_,now as M_}from"@vkontakte/videoplayer-shared/es2015";function Hf(t,e){B(e,!1);let i=ve();Lt(()=>{i.getAdmanWrapper().startPostroll()}),yo(),F()}import{noop as Y1}from"@vkontakte/videoplayer-shared/es2015";var Q1=Ce('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),G1=Ce('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Rr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let f="";return n(a)&&(f+="transform: rotate(180deg);"),f.length?f:void 0})()),s=m(()=>o()?ia:"currentColor"),u=m(()=>n(r)?"7":"16");Ze(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(f,p)=>{var v=Le(),$=ce(v);{var y=w=>{var I=Q1();b(w,I)},g=w=>{var I=G1();b(w,I)};R($,w=>{n(r)?w(y):w(g,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var j1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},X1=M('<div class="skip s-1h"> <!></div>'),Z1=M("<div><!></div>"),J1={hash:"s-1h",code:".container.s-1h{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1h{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1h{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1h{color:var(--white);cursor:pointer}.skippable.s-1h:hover{color:hsla(0,0%,100%,.75)}"};function Uf(t,e){B(e,!0),Q(t,J1);let[i,o]=Re(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,Y1),u=ve().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=Z1();let v;p.__click=[j1,f,d];var $=T(p);{var y=w=>{var I=X1(),C=T(I),N=A(C);Rr(N,{direction:"right"}),S(I),D(L=>me(C,`${L!=null?L:""} `),[()=>G("skip_ads_now")]),b(w,I)},g=w=>{var I=fs();D(C=>me(I,C),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(w,I)};R($,w=>{n(f)?w(y):w(g,!1)})}S(p),D(w=>v=se(p,1,"container s-1h",null,v,w),[()=>({"container-mobile":r(),skippable:n(f)})]),b(t,p),F(),o()}Ye(["click"]);var ey=M('<button class="go-to-site s-1i"> </button>'),ty={hash:"s-1i",code:"button.go-to-site.s-1i{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function zf(t,e){B(e,!1),Q(t,ty),yo();var i=ey(),o=T(i,!0);S(i),D(r=>me(o,r),[()=>G("visit_advertiser")],Sn),b(t,i),F()}var iy=M('<div class="top-gradient-mobile s-l"></div>'),oy=M('<div class="container s-l"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),ny={hash:"s-l",code:".container.s-l{height:100%;width:100%}.top-gradient-mobile.s-l{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Dd(t,e){B(e,!0),Q(t,ny);let[i,o]=Re(),r=()=>x(H,"$canSkipAd",i),a=()=>x(q,"$adPlaybackState",i),l=()=>x(C,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(j,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),f=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),$=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),g=ve(),w=Mt(),I=g.state.isEnded$,C=g.ui.isMobile,N=w.ads.isMobileGoToSiteButton,L=K(void 0),E=K(void 0),P=!1,q=g.ads.playbackState,H=g.ads.canSkip,z=g.ads.position,j=g.ads.secondsToWatchBeforeSkip,ae=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);Lt(()=>{let k=g.getAdmanWrapper();if(L_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[M_(),f()]}),!f()){k.onAdmanLoadingError();return}let Ke=()=>{var ke;let{width:De,height:Be}=ge(g.ui.playerSize),it=ge(g.ui.isFullscreen),U=(ke=v())!=null?ke:ge(g.ui.isAutoplay),Ae=w.ads.paramsOverride;return{width:De,height:Be,isFullscreen:it,isAutoplay:U,adsContainer:n(L),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:Ae,duration:$(),externalApi:y()}},Te=De=>vt(null,null,function*(){De&&(yield vo());let Be=Ke();yield k.initAdman(Be),P=!0}),Z=new AbortController,ie=()=>{Z.abort()};return window.AdmanHTML?Te(!0).catch(()=>{k.onAdmanLoadingError()}):k.loadAdman(Z.signal).then(()=>Te(!1)).catch(()=>{k.onAdmanLoadingError()}),()=>{L_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[M_(),f()]}),!P&&ie()}});var ne=oy(),ee=T(ne);{var we=k=>{var Ke=iy();b(k,Ke)};R(ee,k=>{l()&&k(we)})}var pe=A(ee,2);Xe(pe,k=>O(E,k),()=>n(E));var re=A(pe,2);{var _e=k=>{Uf(k,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return g.actions.internal.skipAd}})};R(re,k=>{n(ae)&&k(_e)})}var $e=A(re,2);{var J=k=>{Hf(k,{})};R($e,k=>{u()&&k(J)})}var Ne=A($e,2);{var fe=k=>{zf(k,{})};R(Ne,k=>{n(X)&&k(fe)})}S(ne),Xe(ne,k=>O(L,k),()=>n(L)),b(t,ne),F(),o()}var Jo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var ry=Ce('<path fill="#fff"></path>'),sy=Ce("<path></path><!>",1);function Bd(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),r=m(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";Ze(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=sy(),u=ce(s),f=A(u);{var p=v=>{var $=ry();Me($,"d",a),b(v,$)};R(f,v=>{i()&&v(p)})}D(()=>Me(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),b(l,s)},$$slots:{default:!0}})}var ay=M('<div class="equalizer s-d"><div class="col s-d"></div> <div class="col s-d"></div> <div class="col s-d"></div></div>'),ly=M('<div class="live-icon s-d"><!></div>'),dy=M('<span class="text s-d"> </span>'),cy=M("<div><!> <!></div>"),uy={hash:"s-d",code:".wrapper.s-d{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-d{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-d{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-d .equalizer:where(.s-d){margin-top:-2px}.equalizer.s-d .col:where(.s-d){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-d .equalizer:where(.s-d) .col:where(.s-d){animation-play-state:running}.equalizer.s-d .col:where(.s-d):first-child{animation-name:s-d-thumb-timer-equalizer-col1;left:0}.equalizer.s-d .col:where(.s-d):nth-child(2){animation-name:s-d-thumb-timer-equalizer-col2;left:3px}.equalizer.s-d .col:where(.s-d):nth-child(3){animation-name:s-d-thumb-timer-equalizer-col3;left:6px}.live-icon.s-d{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-d-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-d-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-d-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-d{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Fd(t,e){Q(t,uy);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=cy();let l;var d=T(a);{var s=v=>{var $=ay();b(v,$)};R(d,v=>{i()&&v(s)})}var u=A(d,2);{var f=v=>{var $=ly(),y=T($);Bd(y,{isActive:!0}),S($),b(v,$)},p=v=>{var $=dy(),y=T($,!0);S($),D(()=>me(y,e.time)),b(v,$)};R(u,v=>{o()?v(f):v(p,!1)})}S(a),D(v=>l=se(a,1,"wrapper s-d",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var Vl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var py=M('<div role="timer" data-testid="thumb-timer"><!></div>'),fy={hash:"s-i",code:".thumb-timer.s-i{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Hd(t,e){B(e,!0),Q(t,fy);let[i,o]=Re(),r=()=>x(f,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Mt(),u=m(()=>Jo(e.duration-e.position)),f=de(!1);var p=py();let v;var $=T(p);Fd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ls(p,()=>Vl(a()&&s.features.usePerformanceFix,f,s.disableInvisibleComponentsTimeout)),D(y=>v=se(p,1,"thumb-timer s-i",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Rl=t=>{if(!navigator.clipboard){V_(t);return}navigator.clipboard.writeText(t).catch(()=>V_(t))};function V_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as Sy,clientChecker as Cy}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as R_}from"@vkontakte/videoplayer-core/es2015";var Wf="focus-hidden";var Nr=t=>{t.stopPropagation(),t.preventDefault()},Kf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Wf)},vy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},gy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},hy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},_y=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},N_=t=>t.code==="Escape",by=t=>t.code==="ArrowLeft",Ud=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},O_=t=>{hy(t)?(Nr(t),gy(t.target)):_y(t)&&(Nr(t),vy(t.target))},sa=t=>!R_.device.isAndroid&&(t==null?void 0:t.detail)===0||R_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Nl=(t,e,i)=>vt(null,null,function*(){yield vo(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield vo(),i.set(!1),t.focus())}),D_=(t,e,i)=>vt(null,null,function*(){yield vo(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),zd=(t,e,i,o=!1)=>vt(null,null,function*(){if(yield vo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Wf,!i),a==null||a.focus()}}),B_=(t,e)=>vt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Nu=(t,e)=>{O_(t),Kf(t.target),N_(t)&&(Nr(t),e())},Ou=(t,e)=>vt(null,null,function*(){Ud(t,["ArrowRight"])&&(Nr(t),e())}),F_=(t,e,i)=>vt(null,null,function*(){if(O_(t),by(t)){Nr(t),e();return}N_(t)&&(Nr(t),i())}),Ol=(t,e)=>{Ud(t)&&(Nr(t),e())},H_=(t,e,i)=>{if(Ud(t))Nr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Nr(t);return}o==="ArrowRight"&&!e&&(i(!0),Nr(t))}},U_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},z_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Du,isValidURL as Ty}from"@vkontakte/videoplayer-shared/es2015";var es={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as W_}from"@vkontakte/videoplayer-shared/es2015";var yy=(t,e)=>{Ol(t,()=>e())},xy=M('<li class="item s-1k" role="menuitem" tabindex="0"> </li>'),wy={hash:"s-1k",code:".item.s-1k{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1k:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function qf(t,e){B(e,!0),Q(t,wy);let i=h(e,"onClick",3,W_),o=h(e,"closeContextMenu",3,W_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=xy();a.__click=r,a.__keydown=[yy,r];var l=T(a,!0);S(a),D(()=>{var d;Me(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Me(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}Ye(["click","keydown"]);var Fa=(t,e)=>t.weight-e.weight;var Wd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Wd||{});var Iy=(t,e)=>{Nu(t,e)},Ey=t=>{t.preventDefault()},Py=M('<ul role="menu" class="s-s"></ul>'),ky={hash:"s-s",code:"ul.s-s{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Qf(t,e){B(e,!0),Q(t,ky);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(ae,"$isLive$",i),l=()=>x(pe,"$isPiPEnabled$",i),d=()=>x(j,"$chromecastState$",i),s=()=>x(re,"$pictureInPictureApiIsActive$",i),u=()=>x(ee,"$isLooped$",i),f=()=>x(X,"$positionExact$",i),p=()=>x(q,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),$=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),g=h(e,"menuElementRef",15,void 0),w=K(0),I=K(0),C=ve(),{pictureInPicture$:N}=xo(),L=Mt(),E=C.ui.contextMenu.visible$,P=C.ui.debugPanelVisible,q=C.ui.additionalContextMenuItems$,H=C.ui.t,z=C.actions.internal.togglePictureInPicture,j=C.state.chromecastState$,ae=C.state.isLive$,X=C.state.positionExact$,ne=C.state.isInteractive,ee=C.state.looped$,we=C.playerPhase,{isEnabled$:pe,isActive$:re}=N,_e=m(()=>r()==="video"),$e=m(()=>!!a()&&n(_e)),J=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=m(()=>{var ue;return L.features.copyVideoLink&&((ue=C.callbacks)==null?void 0:ue.onCopyVideoLink)}),fe=m(()=>n(Ne)&&!n(J)&&!ne&&!n($e)),k=m(()=>{var ue;return!!((ue=C.callbacks)!=null&&ue.onCopyEmbedCodeClicked)}),Ke=m(()=>l()&&d()!==Sy.CONNECTED&&!ne&&n(_e)&&!Cy.browser.isFirefox),Te=m(()=>!ne&&!n(J)&&!n($e)),Z=m(()=>L.features.videoRotate&&!ne&&!n(J)),ie=m(()=>L.showSupport&&!s()),De=m(()=>L.features.saveTraceInfoToFile),Be=()=>{var ue;E.set(!1),(ue=e.returnFocus)==null||ue.call(e)},it=(ue,We)=>{if(!g()||!y())return;let Ge=g().getBoundingClientRect(),dt=y().getBoundingClientRect();O(w,ue-dt.left),O(I,We-dt.top),n(w)+Ge.width>dt.width&&O(w,dt.width-Ge.width),n(I)+Ge.height>dt.height&&O(I,dt.height-Ge.height),O(w,Math.max(n(w),0),!0),O(I,Math.max(n(I),0),!0)};Oe(()=>{vt(null,null,function*(){if(g()&&y()){yield vo();let{top:We,left:Ge,bottom:dt,right:Ht}=$(),Ut=Ge!=null?Ge:0,oi=We!=null?We:0,_i=g().getBoundingClientRect();Du(Ge)&&!Du(Ht)&&(Ut=Ht-_i.width),Du(We)&&!Du(dt)&&(oi=dt-_i.height),Ut=Math.max(Ut,0),oi=Math.max(oi,0),it(Ut,oi)}})});let U=()=>{C.actions.internal.videoRotate()},Ae=()=>{Ty(e.supportLink)&&window.open(e.supportLink,"_blank"),C.actions.internal.reportProblem(),C.actions.internal.pause()},ke=()=>{let ue=C.actions.internal.getDebugTextData();if(L.features.saveDebugInfoToFile){let We=new Blob([...ue],{type:"plain/text"}),Ge=window.URL.createObjectURL(We);Ra(Ge,"vk_player_debug_info","txt")}else Rl(C.actions.internal.getDebugTextData())},ze=()=>{let ue=C.actions.internal.getTraceTextData(),We=new Blob([...ue],{type:"application/json"}),Ge=window.URL.createObjectURL(We);Ra(Ge,"vk_player_trace_info","json")},tt=()=>{P.set(!0)},ye=()=>vt(null,null,function*(){var ue;try{z()}finally{(ue=e.returnFocus)==null||ue.call(e)}}),Ie=()=>{C.actions.internal.setLooped(!u())},Fe=()=>{var ue,We;if(n(k)){let Ge=(We=(ue=C.callbacks)==null?void 0:ue.onCopyEmbedCodeClicked)==null?void 0:We.call(ue);Ge&&Rl(Ge)}},Nt=(ue=!1)=>{var We,Ge;if((We=C.callbacks)!=null&&We.onCopyVideoLink){let dt=(Ge=C.callbacks)==null?void 0:Ge.onCopyVideoLink(ue,f());dt&&Rl(dt)}},ft=m(()=>L.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Bt=m(()=>n(Ne)?{id:"copy-link",weight:es["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Nt()}:void 0),lt=m(()=>n(fe)?{id:"copy-link-timestamp",weight:es["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Nt(!0)}:void 0),xt=m(()=>n(k)?{id:"copy-embed-code",weight:es["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Fe}:void 0),ii=m(()=>n(Ke)?{id:"pip",weight:es.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Pt=m(()=>n(Te)?{id:"video-loop",weight:es["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:Ie}:void 0),Ot=m(()=>n(Z)?{id:"rotate",weight:es.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),Ft=m(()=>n(ie)?{id:"report",weight:es.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Ae}:void 0),Y=m(()=>({id:"save-debug",weight:es["save-debug"],label:n(ft),onClick:ke})),Se=m(()=>n(De)?{id:"save-trace",weight:es["save-trace"],label:H("menu_save_debug"),onClick:ze}:void 0),le=m(()=>({id:"debug-info",weight:es["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:tt})),he=m(()=>[n(Bt),n(lt),n(xt),n(ii),n(Pt),n(Ot),n(Ft),n(Y),n(Se),n(le),...p()].filter(ue=>!!ue).sort(Fa));var Ve=Le(),rt=ce(Ve);{var pt=ue=>{var We=Py();We.__contextmenu=[Ey],We.__keydown=[Iy,Be],$i(We,21,()=>n(he),Ge=>Ge.id,(Ge,dt)=>{qf(Ge,{get id(){return n(dt).id},get label(){return n(dt).label},get ariaLabel(){return n(dt).ariaLabel},get onClick(){return n(dt).onClick},closeContextMenu:Be})}),S(We),Xe(We,Ge=>g(Ge),()=>g()),D(()=>{var Ge,dt;return Qe(We,`top: ${(Ge=n(I))!=null?Ge:""}px; left: ${(dt=n(w))!=null?dt:""}px;`)}),b(ue,We)};R(rt,ue=>{v()&&ue(pt)})}b(t,Ve),F(),o()}Ye(["contextmenu","keydown"]);var Bu=class{constructor(e){this.value=e,this.next=null}};var Dl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Bu(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var Ay=M('<div class="container s-1g"><canvas class="s-1g"></canvas></div>'),Ly={hash:"s-1g",code:".container.s-1g{display:inline-block;height:16px;width:120px}canvas.s-1g{margin-top:2px;transform:scaleY(-1)}"};function Kd(t,e){B(e,!0),Q(t,Ly);let i=h(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Lt(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(v,$,y,g,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect($,y,g,w)}Oe(()=>{let v="";if(n(r)){let $=i()[0];for(let g=1;g<i().length;g++)i()[g]>$&&($=i()[g]);n(r).clearRect(0,0,l,a);let y=d-1;for(let g=i().length-1;g>=0;g--){let w=y*s,I=$>0?a*(i()[g]/$):0;u(n(r),w,0,s,I),v=I+" "+v,y--}}});var f=Ay(),p=T(f);Xe(p,v=>O(o,v),()=>n(o)),S(f),b(t,f),F()}import{safeStorage as K_}from"@vkontakte/videoplayer-shared/es2015";var My=(t,e)=>{t.stopPropagation(),K_.remove(kd),e.set(!1)},Vy=M('<div class="s-p"><div class="s-p">Video id</div> <span> </span></div>'),Ry=M('<div class="s-p"><div class="s-p">VSID</div> <span> </span></div>'),Ny=M('<div class="s-p"><div class="s-p">Provider</div> <span> </span></div>'),Oy=M('<div class="s-p"><div class="s-p">Streams</div> <span> </span></div>'),Dy=M('<div class="s-p"><div class="s-p">Viewport</div> <span> </span></div>'),By=M('<div class="s-p"><div class="s-p">Video size</div> <span> </span></div>'),Fy=M('<div class="s-p"><div class="s-p">CDN host</div> <span> </span></div>'),Hy=M('<div class="s-p"><div class="s-p">Volume</div> <span> </span></div>'),Uy=M('<div class="s-p"><div class="s-p">Position</div> <span> </span></div>'),zy=M('<div class="s-p"><div class="s-p">Buffer</div> <span> </span></div>'),Wy=M('<div class="s-p"><div class="s-p">Nbuffer</div> <span> </span></div>'),Ky=M('<div class="s-p"><div class="s-p">Live latency</div> <span> </span></div>'),qy=M('<div class="s-p"><div class="s-p">Segment</div> <span> </span></div>'),Qy=M('<div class="s-p"><div class="s-p">Network</div> <!> <span> </span></div>'),Gy=M('<div class="s-p"><div class="s-p">V bitrate</div> <!> <span> </span></div>'),Yy=M('<div role="region"><button class="close s-p" title="закрыть">[x]</button> <div class="content s-p"><div class="s-p"><div class="s-p">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-p"><div class="s-p">Dropped</div> <span> </span></div> <!> <!> <div class="s-p"><div class="s-p">FPS</div> <!> <span> </span></div></div></div>'),jy={hash:"s-p",code:".container.s-p{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-p{left:16px;top:16px}button.close.s-p{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-p{padding:5px}.content.s-p>div:where(.s-p)>div:where(.s-p){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function qd(t,e){B(e,!0),Q(t,jy);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=K(0),p=K(0),v=K(0),$=new Dl(60),y=new Dl(60),g=new Dl(60),w=K(ci([])),I=K(ci([])),C=K(ci([])),N=G("aria_label_debug_panel");Lt(()=>{K_.set(kd,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Y=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),Se;return u&&(Se=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;O(v,le-n(f)),O(f,le,!0),$.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&g.push(n(s).bitrate),O(w,$.getValuesFromBottom(),!0),O(I,y.getValuesFromBottom(),!0),O(C,g.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Y),Se&&clearInterval(Se)}});var L=Yy();let E;var P=T(L);P.__click=[My,l];var q=A(P,2),H=T(q),z=A(T(H),2),j=T(z,!0);S(z),S(H);var ae=A(H,2);{var X=Y=>{var Se=Vy(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).id)),b(Y,Se)};R(ae,Y=>{n(s).id&&Y(X)})}var ne=A(ae,2);{var ee=Y=>{var Se=Ry(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).vsid)),b(Y,Se)};R(ne,Y=>{n(s).vsid&&Y(ee)})}var we=A(ne,2);{var pe=Y=>{var Se=Ny(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).provider)),b(Y,Se)};R(we,Y=>{n(s).provider&&Y(pe)})}var re=A(we,2);{var _e=Y=>{var Se=Oy(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(()=>{var Ve,rt;return me(he,`Video: ${(Ve=n(s).videoCodec||"")!=null?Ve:""} ${n(s).hdr?"(HDR)":""}
54
+ Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},x_=V1;var Os=new Map;Os.set(S_.EN,x_);Os.set(S_.RU,y_);var C_=new Map,Bf=({language:t,pack:e,fallback:i})=>{if(Os.has(t)){let o=Os.get(t);Os.set(t,ke(ke({},o),e))}else Os.set(t,e);C_.set(t,i)},Hf=t=>Os.has(t),Ff=(t,e,i,o)=>{var l;let r=Os.get(t),a=r==null?void 0:r[e];if(w_(a)){let d=(l=C_.get(t))!=null?l:o,s=d?Os.get(d):void 0;a=s==null?void 0:s[e]}return w_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},j=(t,e)=>{let{interfaceLanguage$:i}=_e(),o=$e(i),r=Ot();return Ff(o,t,e,r.defaultLanguage)};var R1=Ie('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Vd(t,e){B(e,!1);let i=j("video360");ho(),Ze(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=R1();$(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2015";var Rl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Rl||(Rl={}));var N1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,O1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,D1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Eu="?",B1="X-Sentry-Auth",H1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function F1(t){if(!t.stack)return null;let e=[],i=t.stack.split(`
55
+ `),o,r;for(let a=0;a<i.length;++a){if(o=N1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Eu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=D1.exec(i[a]))r={filename:o[2],function:o[1]||Eu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=O1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Eu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Eu),e.push(r)}return e.length?{value:T_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function T_(t){return(t&&t.message||"No error message").split(`
56
+ `).filter(i=>!!i)[0]}function U1(t){try{let e=F1(t);if(e)return e}catch(e){}return{value:T_(t),type:t&&t.name,stacktrace:{frames:[]}}}function z1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Pu=class{constructor(e){if(e&&e.dsn){let i=H1.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return Qt(ke({},this.getRequestBlank()),{exception:{values:[U1(e)]}})}report(e){this.send(this.prepare(e))}send(e){!this.apiUrl||!e||this.createRequest(e)}createRequest(e){let i=new XMLHttpRequest;i.open("POST",this.apiUrl,!0),i.setRequestHeader("Content-type","application/json"),i.setRequestHeader(B1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:z1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function I_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function W1(){return window}var ku=class t extends Pu{constructor(e,i=W1()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",ke({},e)),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",ke({},e)),this}setUser(e){return this.setKeyState("user",ke({},e)),this}clone(){let e=new t(Qt(ke({},this.options),{plugins:[]}));return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[ke({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(Qt(ke({},this.getRequestBlank()),{message:e,level:i}))}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>I_(i,o))):!1}getRequestBlank(){return ke(Qt(ke({request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}}},super.getRequestBlank()),{sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"}}),this.state)}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend(ke({release:this.release},e))),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>I_(i,o)):!1}getEventFilterUrl(e){try{if(e.exception){let i=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return i&&i[i.length-1].filename||null}return null}catch(i){return null}}extendState(e){this._state=Object.keys(e).reduce((i,o)=>{let r=this._state[o],a=Array.isArray(r)?r:null,l=e[o],d=Array.isArray(l)?l:null;return Qt(ke({},i),{[o]:a||d?[...a||[],...d||[]]:ke(ke({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Au,Subscription as K1}from"@vkontakte/videoplayer-shared/es2015";var Lu=null,Da=class{constructor(e,i,o={}){!Lu&&e.dsn&&(this.sentryClient=new ku({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new K1,this.options=e,this.context=o,Lu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Lu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:m,blackErrorCategoryList:p}=l,{errorType:v,category:b}=i;if(Au(b)&&p.includes(b)||Au(v)&&m.includes(v))return;if(Math.random()<=d||Au(b)&&u.includes(b)||Au(v)&&s.includes(v)){Object.keys(i).length&&r.setTags(ke({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(ke(ke({},a),o));try{v&&r.captureMessage(v,i.fatal?Rl.fatal:Rl.error),r.report(e)}catch(g){console.error(g)}}}static getInstance(){return Lu}};var _s=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(_s||{});var Mu=t=>{if(t.requestFullscreen)return t.requestFullscreen();if(t.msRequestFullscreen)return t.msRequestFullscreen();if(t.webkitRequestFullscreen)return t.webkitRequestFullscreen();if(t.mozRequestFullScreen)return t.mozRequestFullScreen();let e=t.querySelector("video");return e!=null&&e.webkitEnterFullscreen?(e.webkitEnterFullscreen(),Promise.resolve()):Promise.reject()},Vu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),E_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,P_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Rd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},aa=()=>!!Rd(),Ru=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Nu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},k_=t=>{let e=window.screen;return(r=>mt(null,null,function*(){return e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject()}))(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};import{clientChecker as A_}from"@vkontakte/videoplayer-core/es2015";var L_=()=>({title:j("hotkey_map_modal_title"),closeBtnText:j("hotkey_map_modal_close_btn_text"),groups:[{title:j("hotkey_map_group_title_common"),items:[{description:j("hotkey_map_item_mute_description"),value:j("hotkey_map_item_mute_value")},{description:j("hotkey_map_item_volume_up_description"),value:j("hotkey_map_item_volume_up_value")},{description:j("hotkey_map_item_volume_down_description"),value:j("hotkey_map_item_volume_down_value")},{description:j("hotkey_map_item_pip_description"),value:j("hotkey_map_item_pip_value")},{description:j("hotkey_map_item_full_screen_description"),value:j("hotkey_map_item_full_screen_value")},{description:j("hotkey_map_item_show_context_menu_description"),value:j("hotkey_map_item_show_context_menu_value")},{description:j("hotkey_map_item_show_hotkey_map_description"),value:j("hotkey_map_item_show_hotkey_map_value")}]},{title:j("hotkey_map_group_title_playback"),items:[{description:j("hotkey_map_item_play_toggle_description"),value:j("hotkey_map_item_play_toggle_value")},{description:j("hotkey_map_item_seek_backward_description"),value:j("hotkey_map_item_seek_backward_value")},{description:j("hotkey_map_item_seek_forward_description"),value:j("hotkey_map_item_seek_forward_value")},{description:j("hotkey_map_item_fast_seek_backward_description"),value:j("hotkey_map_item_fast_seek_backward_value")},{description:j("hotkey_map_item_fast_seek_forward_description"),value:j("hotkey_map_item_fast_seek_forward_value")},{description:j("hotkey_map_item_rate_down_description"),value:j("hotkey_map_item_rate_down_value")},{description:j("hotkey_map_item_rate_up_description"),value:j("hotkey_map_item_rate_up_value")},{description:j("hotkey_map_item_prev_frame_description"),value:j("hotkey_map_item_prev_frame_value")},{description:j("hotkey_map_item_next_frame_description"),value:j("hotkey_map_item_next_frame_value")},{description:j("hotkey_map_item_jump_seek_description"),value:j("hotkey_map_item_jump_seek_value")},{description:j("hotkey_map_item_next_video_description"),value:j("hotkey_map_item_next_video_value")},{description:j("hotkey_map_item_prev_video_description"),value:j("hotkey_map_item_prev_video_value")}]},{title:j("hotkey_map_group_title_subtitles"),items:[{description:j("hotkey_map_item_subtitles_toggle_description"),value:j("hotkey_map_item_subtitles_toggle_value")}]},{title:j("hotkey_map_group_title_episodes"),items:[{description:j("hotkey_map_item_prev_episode_description"),value:A_.device.isApple?j("hotkey_map_item_prev_episode_mac_value"):j("hotkey_map_item_prev_episode_pc_value")},{description:j("hotkey_map_item_next_episode_description"),value:A_.device.isApple?j("hotkey_map_item_next_episode_mac_value"):j("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as q1,ValueSubject as Uf}from"@vkontakte/videoplayer-shared/es2015";var Ba=class{constructor({enabled:e=!0}={enabled:!0}){this.isRequested=!1;this.videoElement=void 0;this.playerContainer=void 0;this.externalEventHandlers={};this.eventHandlers={enterpictureinpicture:this.onEnterPictureInPicture.bind(this),leavepictureinpicture:this.onLeavePictureInPicture.bind(this),resize:q1(this.onResize.bind(this),300)};this.info={isActive$:new Uf(!1),isEnabled$:new Uf(!1),type:0};this.info.isEnabled$=new Uf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return mt(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return mt(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return mt(this,null,function*(){!this.isSupported()||!this.isActive()||(yield document.exitPictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=ke({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return mt(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Ha(t){return t instanceof Ba}import{devNull as M_,now as V_}from"@vkontakte/videoplayer-shared/es2015";function Wf(t,e){B(e,!1);let i=_e();Nt(()=>{i.getAdmanWrapper().startPostroll()}),ho(),H()}import{noop as Y1}from"@vkontakte/videoplayer-shared/es2015";var Q1=Ie('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),G1=Ie('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Rr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=f(()=>["up","down"].includes(i())),a=f(()=>["right","down"].includes(i())),l=f(()=>`chevron-icon--${i()}`),d=f(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=f(()=>o()?sa:"currentColor"),u=f(()=>n(r)?"7":"16");Ze(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(m,p)=>{var v=Le(),b=ue(v);{var y=w=>{var I=Q1();$(w,I)},g=w=>{var I=G1();$(w,I)};V(b,w=>{n(r)?w(y):w(g,!1)})}$(m,v)},$$slots:{default:!0}}),H()}var j1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},X1=L('<div class="skip s-16"> <!></div>'),Z1=L("<div><!></div>"),J1={hash:"s-16",code:".container.s-16{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-16{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-16{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-16{color:var(--white);cursor:pointer}.skippable.s-16:hover{color:hsla(0,0%,100%,.75)}"};function Kf(t,e){B(e,!0),G(t,J1);let[i,o]=Oe(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,Y1),u=_e().ui.isMobile,m=f(()=>a()>0&&a()>=l());var p=Z1();let v;p.__click=[j1,m,d];var b=T(p);{var y=w=>{var I=X1(),C=T(I),N=k(C);Rr(N,{direction:"right"}),S(I),O(A=>ve(C,`${A!=null?A:""} `),[()=>j("skip_ads_now")]),$(w,I)},g=w=>{var I=vs();O(C=>ve(I,C),[()=>j("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),$(w,I)};V(b,w=>{n(m)?w(y):w(g,!1)})}S(p),O(w=>v=ne(p,1,"container s-16",null,v,w),[()=>({"container-mobile":r(),skippable:n(m)})]),$(t,p),H(),o()}Ge(["click"]);var ey=L('<button class="go-to-site s-17"> </button>'),ty={hash:"s-17",code:"button.go-to-site.s-17{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function qf(t,e){B(e,!1),G(t,ty),ho();var i=ey(),o=T(i,!0);S(i),O(r=>ve(o,r),[()=>j("visit_advertiser")],In),$(t,i),H()}var iy=L('<div class="top-gradient-mobile s-n"></div>'),oy=L('<div class="container s-n"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),ny={hash:"s-n",code:".container.s-n{height:100%;width:100%}.top-gradient-mobile.s-n{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Od(t,e){B(e,!0),G(t,ny);let[i,o]=Oe(),r=()=>x(F,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(C,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(X,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),m=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),b=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),g=_e(),w=Ot(),I=g.state.isEnded$,C=g.ui.isMobile,N=w.ads.isMobileGoToSiteButton,A=q(void 0),E=q(void 0),P=!1,Q=g.ads.playbackState,F=g.ads.canSkip,z=g.ads.position,X=g.ads.secondsToWatchBeforeSkip,se=f(()=>r()&&a()!=="inactive"),Z=f(()=>l()&&a()!=="inactive"&&N);Nt(()=>{let U=g.getAdmanWrapper();if(M_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[V_(),m()]}),!m()){U.onAdmanLoadingError();return}let D=()=>{var Ne;let{width:xe,height:He}=$e(g.ui.playerSize),it=$e(g.ui.isFullscreen),re=(Ne=v())!=null?Ne:$e(g.ui.isAutoplay),ce=w.ads.paramsOverride;return{width:xe,height:He,isFullscreen:it,isAutoplay:re,adsContainer:n(A),adsVideoElement:n(E),slotId:m(),params:p(),paramsOverride:ce,duration:b(),externalApi:y()}},Qe=xe=>mt(null,null,function*(){xe&&(yield vo());let He=D();yield U.initAdman(He),P=!0}),K=new AbortController,ae=()=>{K.abort()};return window.AdmanHTML?Qe(!0).catch(()=>{U.onAdmanLoadingError()}):U.loadAdman(K.signal).then(()=>Qe(!1)).catch(()=>{U.onAdmanLoadingError()}),()=>{M_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[V_(),m()]}),!P&&ae()}});var oe=oy(),J=T(oe);{var Ce=U=>{var D=iy();$(U,D)};V(J,U=>{l()&&U(Ce)})}var me=k(J,2);Xe(me,U=>R(E,U),()=>n(E));var ee=k(me,2);{var be=U=>{Kf(U,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return g.actions.internal.skipAd}})};V(ee,U=>{n(se)&&U(be)})}var we=k(ee,2);{var ge=U=>{Wf(U,{})};V(we,U=>{u()&&U(ge)})}var pe=k(we,2);{var qe=U=>{qf(U,{})};V(pe,U=>{n(Z)&&U(qe)})}S(oe),Xe(oe,U=>R(A,U),()=>n(A)),$(t,oe),H(),o()}var jo=t=>{if(!isFinite(t))return"00:00";let e=Math.round(t),i=Math.floor(e/(60*60));e-=i*3600;let o=Math.floor(e/60);e-=o*60;let r=[o,e].map(a=>String(a).padStart(2,"0")).join(":");return i>0&&(r=`${i}:${r}`),r};var ry=Ie('<path fill="#fff"></path>'),sy=Ie("<path></path><!>",1);function Dd(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"live-active-icon":"live-icon"),r=f(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";Ze(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=sy(),u=ue(s),m=k(u);{var p=v=>{var b=ry();Ve(b,"d",a),$(v,b)};V(m,v=>{i()&&v(p)})}O(()=>Ve(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),$(l,s)},$$slots:{default:!0}})}var ay=L('<div class="equalizer s-b"><div class="col s-b"></div> <div class="col s-b"></div> <div class="col s-b"></div></div>'),ly=L('<div class="live-icon s-b"><!></div>'),dy=L('<span class="text s-b"> </span>'),cy=L("<div><!> <!></div>"),uy={hash:"s-b",code:".wrapper.s-b{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-b{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-b{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-b .equalizer:where(.s-b){margin-top:-2px}.equalizer.s-b .col:where(.s-b){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-b .equalizer:where(.s-b) .col:where(.s-b){animation-play-state:running}.equalizer.s-b .col:where(.s-b):first-child{animation-name:s-b-thumb-timer-equalizer-col1;left:0}.equalizer.s-b .col:where(.s-b):nth-child(2){animation-name:s-b-thumb-timer-equalizer-col2;left:3px}.equalizer.s-b .col:where(.s-b):nth-child(3){animation-name:s-b-thumb-timer-equalizer-col3;left:6px}.live-icon.s-b{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-b-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-b-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-b-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-b{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Bd(t,e){G(t,uy);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=cy();let l;var d=T(a);{var s=v=>{var b=ay();$(v,b)};V(d,v=>{i()&&v(s)})}var u=k(d,2);{var m=v=>{var b=ly(),y=T(b);Dd(y,{isActive:!0}),S(b),$(v,b)},p=v=>{var b=dy(),y=T(b,!0);S(b),O(()=>ve(y,e.time)),$(v,b)};V(u,v=>{o()?v(m):v(p,!1)})}S(a),O(v=>l=ne(a,1,"wrapper s-b",null,l,v),[()=>({live:o(),playing:r()})]),$(t,a)}var Nl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var py=L('<div role="timer" data-testid="thumb-timer"><!></div>'),fy={hash:"s-l",code:".thumb-timer.s-l{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function Hd(t,e){B(e,!0),G(t,fy);let[i,o]=Oe(),r=()=>x(m,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Ot(),u=f(()=>jo(e.duration-e.position)),m=de(!1);var p=py();let v;var b=T(p);Bd(b,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ns(p,()=>Nl(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),O(y=>v=ne(p,1,"thumb-timer s-l",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),$(t,p),H(),o()}var Ol=t=>{if(!navigator.clipboard){R_(t);return}navigator.clipboard.writeText(t).catch(()=>R_(t))};function R_(t){if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}}import{ChromecastState as Sy}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as N_}from"@vkontakte/videoplayer-core/es2015";var Qf="focus-hidden";var Nr=t=>{t.stopPropagation(),t.preventDefault()},Gf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Qf)},vy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},gy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},hy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},_y=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},O_=t=>t.code==="Escape",by=t=>t.code==="ArrowLeft",Fd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},D_=t=>{hy(t)?(Nr(t),gy(t.target)):_y(t)&&(Nr(t),vy(t.target))},ca=t=>!N_.device.isAndroid&&(t==null?void 0:t.detail)===0||N_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Dl=(t,e,i)=>mt(null,null,function*(){yield vo(),t&&!t.classList.contains("opened")&&!e&&$e(i)&&(yield vo(),i.set(!1),t.focus())}),B_=(t,e,i)=>mt(null,null,function*(){yield vo(),t&&!e&&$e(i)&&(i.set(!1),t.focus())}),Ud=(t,e,i,o=!1)=>mt(null,null,function*(){if(yield vo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Qf,!i),a==null||a.focus()}}),H_=(t,e)=>mt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Ou=(t,e)=>{D_(t),Gf(t.target),O_(t)&&(Nr(t),e())},Du=(t,e)=>mt(null,null,function*(){Fd(t,["ArrowRight"])&&(Nr(t),e())}),F_=(t,e,i)=>mt(null,null,function*(){if(D_(t),by(t)){Nr(t),e();return}O_(t)&&(Nr(t),i())}),Bl=(t,e)=>{Fd(t)&&(Nr(t),e())},U_=(t,e,i)=>{if(Fd(t))Nr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Nr(t);return}o==="ArrowRight"&&!e&&(i(!0),Nr(t))}},z_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},W_=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,r=e.left+o;return{bottom:e.bottom+i,left:r}};import{isNullable as Bu,isValidURL as Cy}from"@vkontakte/videoplayer-shared/es2015";var rs={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as K_}from"@vkontakte/videoplayer-shared/es2015";var yy=(t,e)=>{Bl(t,()=>e())},xy=L('<li class="item s-1q" role="menuitem" tabindex="0"> </li>'),wy={hash:"s-1q",code:".item.s-1q{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1q:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Yf(t,e){B(e,!0),G(t,wy);let i=h(e,"onClick",3,K_),o=h(e,"closeContextMenu",3,K_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=xy();a.__click=r,a.__keydown=[yy,r];var l=T(a,!0);S(a),O(()=>{var d;Ve(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ve(a,"data-testid",e.id),ve(l,e.label)}),$(t,a),H()}Ge(["click","keydown"]);var Ua=(t,e)=>t.weight-e.weight;var zd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(zd||{});var Ty=(t,e)=>{Ou(t,e)},Iy=t=>{t.preventDefault()},Ey=L('<ul role="menu" class="s-1c"></ul>'),Py={hash:"s-1c",code:"ul.s-1c{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function jf(t,e){B(e,!0),G(t,Py);let[i,o]=Oe(),r=()=>x(Ce,"$playerPhase",i),a=()=>x(se,"$isLive$",i),l=()=>x(me,"$isPiPEnabled$",i),d=()=>x(X,"$chromecastState$",i),s=()=>x(ee,"$pictureInPictureApiIsActive$",i),u=()=>x(J,"$isLooped$",i),m=()=>x(Z,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),b=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),g=h(e,"menuElementRef",15,void 0),w=q(0),I=q(0),C=_e(),{pictureInPicture$:N}=_o(),A=Ot(),E=C.ui.contextMenu.visible$,P=C.ui.debugPanelVisible,Q=C.ui.additionalContextMenuItems$,F=C.ui.t,z=C.actions.internal.togglePictureInPicture,X=C.state.chromecastState$,se=C.state.isLive$,Z=C.state.positionExact$,oe=C.state.isInteractive,J=C.state.looped$,Ce=C.playerPhase,{isEnabled$:me,isActive$:ee}=N,be=f(()=>r()==="video"),we=f(()=>!!a()&&n(be)),ge=f(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),pe=f(()=>{var fe;return A.features.copyVideoLink&&((fe=C.callbacks)==null?void 0:fe.onCopyVideoLink)}),qe=f(()=>n(pe)&&!n(ge)&&!oe&&!n(we)),U=f(()=>{var fe;return!!((fe=C.callbacks)!=null&&fe.onCopyEmbedCodeClicked)}),D=f(()=>l()&&d()!==Sy.CONNECTED&&!oe&&n(be)),Qe=f(()=>!oe&&!n(ge)&&!n(we)),K=f(()=>A.features.videoRotate&&!oe&&!n(ge)),ae=f(()=>A.showSupport&&!s()),xe=f(()=>A.features.saveTraceInfoToFile),He=()=>{var fe;E.set(!1),(fe=e.returnFocus)==null||fe.call(e)},it=(fe,Be)=>{if(!g()||!y())return;let We=g().getBoundingClientRect(),yt=y().getBoundingClientRect();R(w,fe-yt.left),R(I,Be-yt.top),n(w)+We.width>yt.width&&R(w,yt.width-We.width),n(I)+We.height>yt.height&&R(I,yt.height-We.height),R(w,Math.max(n(w),0),!0),R(I,Math.max(n(I),0),!0)};De(()=>{mt(null,null,function*(){if(g()&&y()){yield vo();let{top:Be,left:We,bottom:yt,right:Kt}=b(),At=We!=null?We:0,mi=Be!=null?Be:0,pi=g().getBoundingClientRect();Bu(We)&&!Bu(Kt)&&(At=Kt-pi.width),Bu(Be)&&!Bu(yt)&&(mi=yt-pi.height),At=Math.max(At,0),mi=Math.max(mi,0),it(At,mi)}})});let re=()=>{C.actions.internal.videoRotate()},ce=()=>{Cy(e.supportLink)&&window.open(e.supportLink,"_blank"),C.actions.internal.reportProblem(),C.actions.internal.pause()},Ne=()=>{let fe=C.actions.internal.getDebugTextData();if(A.features.saveDebugInfoToFile){let Be=new Blob([...fe],{type:"plain/text"}),We=window.URL.createObjectURL(Be);Oa(We,"vk_player_debug_info","txt")}else Ol(C.actions.internal.getDebugTextData())},Re=()=>{let fe=C.actions.internal.getTraceTextData(),Be=new Blob([...fe],{type:"application/json"}),We=window.URL.createObjectURL(Be);Oa(We,"vk_player_trace_info","json")},et=()=>{P.set(!0)},Ee=()=>mt(null,null,function*(){var fe;try{z()}finally{(fe=e.returnFocus)==null||fe.call(e)}}),Te=()=>{C.actions.internal.setLooped(!u())},Fe=()=>{var fe,Be;if(n(U)){let We=(Be=(fe=C.callbacks)==null?void 0:fe.onCopyEmbedCodeClicked)==null?void 0:Be.call(fe);We&&Ol(We)}},It=(fe=!1)=>{var Be,We;if((Be=C.callbacks)!=null&&Be.onCopyVideoLink){let yt=(We=C.callbacks)==null?void 0:We.onCopyVideoLink(fe,m());yt&&Ol(yt)}},wt=f(()=>A.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),Mt=f(()=>n(pe)?{id:"copy-link",weight:rs["copy-link"],label:F("menu_copy_video_link"),onClick:()=>It()}:void 0),lt=f(()=>n(qe)?{id:"copy-link-timestamp",weight:rs["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>It(!0)}:void 0),Et=f(()=>n(U)?{id:"copy-embed-code",weight:rs["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:Fe}:void 0),Jt=f(()=>n(D)?{id:"pip",weight:rs.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Ee}:void 0),Pt=f(()=>n(Qe)?{id:"video-loop",weight:rs["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:Te}:void 0),Bt=f(()=>n(K)?{id:"rotate",weight:rs.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:re}:void 0),Wt=f(()=>n(ae)?{id:"report",weight:rs.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:ce}:void 0),Y=f(()=>({id:"save-debug",weight:rs["save-debug"],label:n(wt),onClick:Ne})),Pe=f(()=>n(xe)?{id:"save-trace",weight:rs["save-trace"],label:F("menu_save_debug"),onClick:Re}:void 0),le=f(()=>({id:"debug-info",weight:rs["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:et})),ye=f(()=>[n(Mt),n(lt),n(Et),n(Jt),n(Pt),n(Bt),n(Wt),n(Y),n(Pe),n(le),...p()].filter(fe=>!!fe).sort(Ua));var Me=Le(),rt=ue(Me);{var kt=fe=>{var Be=Ey();Be.__contextmenu=[Iy],Be.__keydown=[Ty,He],yi(Be,21,()=>n(ye),We=>We.id,(We,yt)=>{Yf(We,{get id(){return n(yt).id},get label(){return n(yt).label},get ariaLabel(){return n(yt).ariaLabel},get onClick(){return n(yt).onClick},closeContextMenu:He})}),S(Be),Xe(Be,We=>g(We),()=>g()),O(()=>{var We,yt;return Ke(Be,`top: ${(We=n(I))!=null?We:""}px; left: ${(yt=n(w))!=null?yt:""}px;`)}),$(fe,Be)};V(rt,fe=>{v()&&fe(kt)})}$(t,Me),H(),o()}Ge(["contextmenu","keydown"]);var Hu=class{constructor(e){this.value=e,this.next=null}};var Hl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Hu(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var ky=L('<div class="container s-13"><canvas class="s-13"></canvas></div>'),Ay={hash:"s-13",code:".container.s-13{display:inline-block;height:16px;width:120px}canvas.s-13{margin-top:2px;transform:scaleY(-1)}"};function Wd(t,e){B(e,!0),G(t,Ay);let i=h(e,"values",19,()=>[]),o=q(void 0),r=q(null),a=16,l=120,d=60,s=l/d;Nt(()=>{n(o).width=l,n(o).height=a,R(r,n(o).getContext("2d"),!0)});function u(v,b,y,g,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect(b,y,g,w)}De(()=>{let v="";if(n(r)){let b=i()[0];for(let g=1;g<i().length;g++)i()[g]>b&&(b=i()[g]);n(r).clearRect(0,0,l,a);let y=d-1;for(let g=i().length-1;g>=0;g--){let w=y*s,I=b>0?a*(i()[g]/b):0;u(n(r),w,0,s,I),v=I+" "+v,y--}}});var m=ky(),p=T(m);Xe(p,v=>R(o,v),()=>n(o)),S(m),$(t,m),H()}import{safeStorage as q_}from"@vkontakte/videoplayer-shared/es2015";var Ly=(t,e)=>{t.stopPropagation(),q_.remove(Pd),e.set(!1)},My=L('<div class="s-j"><div class="s-j">Video id</div> <span> </span></div>'),Vy=L('<div class="s-j"><div class="s-j">VSID</div> <span> </span></div>'),Ry=L('<div class="s-j"><div class="s-j">Provider</div> <span> </span></div>'),Ny=L('<div class="s-j"><div class="s-j">Streams</div> <span> </span></div>'),Oy=L('<div class="s-j"><div class="s-j">Viewport</div> <span> </span></div>'),Dy=L('<div class="s-j"><div class="s-j">Video size</div> <span> </span></div>'),By=L('<div class="s-j"><div class="s-j">CDN host</div> <span> </span></div>'),Hy=L('<div class="s-j"><div class="s-j">Volume</div> <span> </span></div>'),Fy=L('<div class="s-j"><div class="s-j">Position</div> <span> </span></div>'),Uy=L('<div class="s-j"><div class="s-j">Buffer</div> <span> </span></div>'),zy=L('<div class="s-j"><div class="s-j">Nbuffer</div> <span> </span></div>'),Wy=L('<div class="s-j"><div class="s-j">Live latency</div> <span> </span></div>'),Ky=L('<div class="s-j"><div class="s-j">Segment</div> <span> </span></div>'),qy=L('<div class="s-j"><div class="s-j">Network</div> <!> <span> </span></div>'),Qy=L('<div class="s-j"><div class="s-j">V bitrate</div> <!> <span> </span></div>'),Gy=L('<div role="region"><button class="close s-j" title="закрыть">[x]</button> <div class="content s-j"><div class="s-j"><div class="s-j">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-j"><div class="s-j">Dropped</div> <span> </span></div> <!> <!> <div class="s-j"><div class="s-j">FPS</div> <!> <span> </span></div></div></div>'),Yy={hash:"s-j",code:".container.s-j{background:rgba(28,28,28,.8);border-radius:4px;color:#fff;font-size:10px;left:20px;min-width:160px;position:absolute;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container-mobile.s-j{left:16px;top:16px}button.close.s-j{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-j{padding:5px}.content.s-j>div:where(.s-j)>div:where(.s-j){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Kd(t,e){B(e,!0),G(t,Yy);let[i,o]=Oe(),r=()=>x(d,"$isMobile",i),a=_e(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=q(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=q(0),p=q(0),v=q(0),b=new Hl(60),y=new Hl(60),g=new Hl(60),w=q(ci([])),I=q(ci([])),C=q(ci([])),N=j("aria_label_debug_panel");Nt(()=>{q_.set(Pd,"true"),a.actions.internal.startLogging(),u&&(R(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),R(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Y=window.setInterval(()=>{R(s,a.actions.internal.getDebugPanelData(),!0)},500),Pe;return u&&(Pe=window.setInterval(()=>{if(u){R(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;R(v,le-n(m)),R(m,le,!0),b.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&g.push(n(s).bitrate),R(w,b.getValuesFromBottom(),!0),R(I,y.getValuesFromBottom(),!0),R(C,g.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Y),Pe&&clearInterval(Pe)}});var A=Gy();let E;var P=T(A);P.__click=[Ly,l];var Q=k(P,2),F=T(Q),z=k(T(F),2),X=T(z,!0);S(z),S(F);var se=k(F,2);{var Z=Y=>{var Pe=My(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(()=>ve(ye,n(s).id)),$(Y,Pe)};V(se,Y=>{n(s).id&&Y(Z)})}var oe=k(se,2);{var J=Y=>{var Pe=Vy(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(()=>ve(ye,n(s).vsid)),$(Y,Pe)};V(oe,Y=>{n(s).vsid&&Y(J)})}var Ce=k(oe,2);{var me=Y=>{var Pe=Ry(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(()=>ve(ye,n(s).provider)),$(Y,Pe)};V(Ce,Y=>{n(s).provider&&Y(me)})}var ee=k(Ce,2);{var be=Y=>{var Pe=Ny(),le=k(T(Pe),2),ye=T(le);S(le),S(Pe),O(()=>{var Me,rt;return ve(ye,`Video: ${(Me=n(s).videoCodec||"")!=null?Me:""} ${n(s).hdr?"(HDR)":""}
57
57
  &
58
- Audio: ${(rt=n(s).audioCodec||"")!=null?rt:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(Y,Se)};R(re,Y=>{(n(s).videoCodec||n(s).audioCodec)&&Y(_e)})}var $e=A(re,2);{var J=Y=>{var Se=Dy(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).viewport)),b(Y,Se)};R($e,Y=>{n(s).viewport&&Y(J)})}var Ne=A($e,2);{var fe=Y=>{var Se=By(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).videoSize)),b(Y,Se)};R(Ne,Y=>{n(s).videoSize&&Y(fe)})}var k=A(Ne,2);{var Ke=Y=>{var Se=Fy(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).cdn)),b(Y,Se)};R(k,Y=>{n(s).cdn&&Y(Ke)})}var Te=A(k,2);{var Z=Y=>{var Se=Hy(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(()=>{var Ve;return me(he,`${(Ve=n(s).volume)!=null?Ve:""} %`)}),b(Y,Se)};R(Te,Y=>{n(s).volume&&Y(Z)})}var ie=A(Te,2);{var De=Y=>{var Se=Uy(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).position.toFixed(2)]),b(Y,Se)};R(ie,Y=>{n(s).position&&Y(De)})}var Be=A(ie,2);{var it=Y=>{var Se=zy(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).buffer.toFixed(2)]),b(Y,Se)};R(Be,Y=>{n(s).buffer&&Y(it)})}var U=A(Be,2);{var Ae=Y=>{var Se=Wy(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(Y,Se)};R(U,Y=>{n(s).nativeBuffer&&Y(Ae)})}var ke=A(U,2);{var ze=Y=>{var Se=Ky(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(Y,Se)};R(ke,Y=>{n(s).liveLatency&&Y(ze)})}var tt=A(ke,2);{var ye=Y=>{var Se=qy(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(Ve=>me(he,Ve),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ve})=>Ve).map(({value:Ve,title:rt})=>`${rt} ${((Ve!=null?Ve:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Y,Se)};R(tt,Y=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Y(ye)})}var Ie=A(tt,2),Fe=A(T(Ie),2),Nt=T(Fe);S(Fe),S(Ie);var ft=A(Ie,2);{var Bt=Y=>{var Se=Qy(),le=A(T(Se),2);Kd(le,{get values(){return n(I)}});var he=A(le,2),Ve=T(he);S(he),S(Se),D(rt=>me(Ve,`${rt!=null?rt:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(Y,Se)};R(ft,Y=>{n(s).speed&&Y(Bt)})}var lt=A(ft,2);{var xt=Y=>{var Se=Gy(),le=A(T(Se),2);Kd(le,{get values(){return n(C)}});var he=A(le,2),Ve=T(he);S(he),S(Se),D(rt=>me(Ve,`${rt!=null?rt:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(Y,Se)};R(lt,Y=>{n(s).bitrate&&Y(xt)})}var ii=A(lt,2),Pt=A(T(ii),2);Kd(Pt,{get values(){return n(w)}});var Ot=A(Pt,2),Ft=T(Ot,!0);S(Ot),S(ii),S(q),S(L),D(Y=>{var Se,le;E=se(L,1,"container s-p",null,E,Y),Me(L,"aria-label",N),me(j,n(s).version),me(Nt,`${(Se=n(p))!=null?Se:""} / ${(le=n(f))!=null?le:""} frames`),me(Ft,n(v))},[()=>({"container-mobile":r()})]),b(t,L),F(),o()}Ye(["click"]);import{noop as Xy}from"@vkontakte/videoplayer-shared/es2015";var Zy=(t,e)=>{t.stopPropagation(),e()()},Jy=M('<div class="close s-1c"></div>'),e0={hash:"s-1c",code:'.close.s-1c{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1c:hover{opacity:1}.close.s-1c:after,.close.s-1c:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1c:before{transform:rotate(45deg)}.close.s-1c:after{transform:rotate(-45deg)}'};function Vs(t,e){B(e,!0),Q(t,e0);let i=h(e,"onClick",3,Xy);var o=Jy();o.__click=[Zy,i],b(t,o),F()}Ye(["click"]);import{noop as i0}from"@vkontakte/videoplayer-shared/es2015";var un=t=>`width:${t}px;height:${t}px;`;var t0=Ce('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function An(t,e){B(e,!0);let i=m(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=t0();b(o,a)},$$slots:{default:!0}}),F()}var o0=M('<div class="timer s-1b"><canvas class="timer-canvas s-1b" width="100" height="100"></canvas> <!></div>'),n0={hash:"s-1b",code:".timer.s-1b{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-1b:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1b{height:50px;position:absolute;width:50px}"};function Qd(t,e){B(e,!0),Q(t,n0);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,i0),r=5e3,a=K(void 0),l,d,s=0,u;Oe(()=>{i()&&Ct(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let f=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{f(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Lt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),cn(()=>{f()});var v=o0(),$=T(v);Xe($,g=>O(a,g),()=>n(a));var y=A($,2);An(y,{get size(){return"24"}}),S(v),b(t,v),F()}var r0=(t,e,i)=>{e(!1),i()},s0=M('<div class="overlay s-w"></div> <div class="next-video s-w"><div class="top s-w"><div class="caption s-w"> </div> <!></div> <div class="row s-w"><div class="column s-w"><div class="thumb s-w"><div></div> <!></div></div> <div class="column s-w"><div class="title s-w"> </div></div></div></div>',1),a0={hash:"s-w",code:".overlay.s-w{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-w{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-w{display:flex;justify-content:space-between}.caption.s-w{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-w{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-w{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-w{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-w,.thumb-overlay.s-w{height:100%;width:100%}.thumb-overlay.s-w{position:absolute}.thumb-overlay.withOpacity.s-w{background:var(--black);opacity:.3}.title.s-w{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Gf(t,e){B(e,!0),Q(t,a0);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},g=()=>{e.clickCloseIcon(),$()};Lt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ce(w);{var C=N=>{var L=s0(),E=A(ce(L),2),P=T(E),q=T(P),H=T(q,!0);S(q);var z=A(q,2);Vs(z,{onClick:g}),S(P);var j=A(P,2);j.__click=[r0,u,p];var ae=T(j),X=T(ae),ne=T(X);let ee;var we=A(ne,2);{var pe=J=>{let Ne=m(()=>a()&&r());Qd(J,{get isRunning(){return n(Ne)},onTimerEnded:y})};R(we,J=>{r()&&J(pe)})}S(X),S(ae);var re=A(ae,2),_e=T(re),$e=T(_e,!0);S(_e),S(re),S(j),S(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),ee=se(ne,1,"thumb-overlay s-w",null,ee,Ne),me($e,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(C)})}b(t,w),F(),o()}Ye(["click"]);import{PlaybackState as Ha}from"@vkontakte/videoplayer-core/es2015";import{checkNever as d0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Yn}from"@vkontakte/videoplayer-statistics/es2015";var Yf=(t,e)=>Math.min(+(t+e).toFixed(2),1),jf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Fu=(t,e,i)=>{let o=Yf(e,i);e<1&&t.actions.internal.setVolume(o)},Hu=(t,e,i)=>{let o=jf(e,i);e>0&&t.actions.internal.setVolume(o)};var aa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Uu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var c0=(t,e)=>{e(t)},u0=M('<div class="keyboard-controls s-k" tabindex="-1" role="region"><!></div>'),p0={hash:"s-k",code:".keyboard-controls.s-k{bottom:0;left:0;position:absolute;right:0;top:0}"};function Xf(t,e){var Y,Se;B(e,!0),Q(t,p0);let[i,o]=Re(),r=()=>x(we,"$disabledControls$",i),a=()=>x(it,"$isInteractiveTime$",i),l=()=>x(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(Ke,"$isEnded$",i),u=()=>x(fe,"$doubleForwardAvailable$",i),f=()=>x(Ne,"$doubleForwardOn$",i),p=()=>x(Te,"$overlayContainer$",i),v=()=>x(ae,"$adPlaybackState",i),$=()=>x(X,"$positionExact$",i),y=()=>x(ne,"$duration$",i),g=()=>x(De,"$isAudioAvailable$",i),w=()=>x(ee,"$volume$",i),I=()=>x(j,"$canChangePlaybackSpeed$",i),C=()=>x(pe,"$muted$",i),N=()=>x(re,"$currentSubtitle$",i),L=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),P=ve(),q=Mt(),H=P.getLogger().createComponentLog("KeyboardControls component"),z=P.state.playbackState$,j=P.state.canChangePlaybackSpeed$,ae=P.ads.playbackState,X=P.state.positionExact$,ne=P.state.duration$,ee=P.state.volume$,we=P.ui.controls.disabledControls$,pe=P.state.muted$,re=P.state.currentSubtitle$,_e=P.ui.contextMenu.openedByHotKey$,$e=P.ui.contextMenu.lastActiveElem$,J=P.ui.contextMenu.visible$,Ne=P.ui.doubleForwardOn$,fe=P.ui.doubleForwardAvailable$,k=P.ui.contextMenu.position$,Ke=P.state.isEnded$,Te=P.ui.overlayContainer$,Z=(Y=P.callbacks)==null?void 0:Y.onAudioDoesNotExistHint,ie=(Se=P.callbacks)==null?void 0:Se.onAudioDisabledHint,De=P.state.isAudioAvailable$,Be=P.state.isAudioDisabled,it=P.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=xo(),Ae=0,ke=!0,ze=K(void 0),tt=le=>(le!==ke&&(ke=le,Ae=0),Ae+=1,(q.controls.seekStepKeyboard+q.controls.seekStepKeyboard*Ae)/1e3),ye=!0,Ie=({type:le,repeat:he,disableDoubleForward:Ve})=>{let rt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{P.actions.internal.togglePlay();let ue="PLAY";d()===Ha.PAUSED?ue="PAUSE":s()&&(ue="REPLAY"),e.showHotKeyHelpers({type:ue})}},pt=le==="down";if(!u()||Ve){pt&&rt(),ye=!0;return}if(pt)ye=!1;else if(ye)return;if(pt){!he&&e.startDoubleForwardActivationTimer();return}f()||rt(),e.stopDoubleForward(),ye=!0},Fe=le=>{let he=z_(p());k.set(he),$e.set(le.target),_e.set(!0),J.set(!0)},Nt=(le,he=!1)=>{var fi,vi;let Ve=le.target,rt=(fi=Ve==null?void 0:Ve.getAttribute("role"))==null?void 0:fi.includes("menuitem"),pt=Ve.classList.contains("btn"),ue=le.code;if(pt&&ue==="Space")return!1;let We=Fh.has(ue);if(rt&&We)return!1;let Ge=!Bh.has(ue);if(le.ctrlKey&&Ge||le.altKey&&Ge||le.metaKey)return!1;let dt=rt&&ue==="Escape";Hh.has(ue)||dt||e.hideContextMenu();let Ht=d()===Ha.PLAYING||d()===Ha.PAUSED,Ut=e.isAds&&(v()==="paused"||v()==="playing"),oi=!Ut&&!r().has("TIMELINE"),_i=le.shiftKey&&["Digit1","Numpad1"].includes(ue);if(!_i&&!(Ht||Ut))return!1;H({message:`key down, code: ${ue}, isExternal = ${he}`});let Yi=!1,Vt=()=>{Yi=!0,he||le.preventDefault()};if(_i)return Fe(le),Vt(),!0;switch(ue){case"KeyJ":case"ArrowLeft":{if(!oi)break;if(le.ctrlKey||le.altKey){let ht=P.actions.internal.getPrevEpisode();P.actions.internal.seekToPrevEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ht.text}),Vt()}else{let ht=le.shiftKey?tt(!1):q.controls.seekStepKeyboard/1e3,Zt=Math.max($()-ht,0);$()>0&&(P.actions.internal.seekTime(Zt,Yn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ht.toString()}),Vt())}break}case"KeyL":case"ArrowRight":{if(!oi)break;if(le.ctrlKey||le.altKey){let ht=P.actions.internal.getNextEpisode();P.actions.internal.seekToNextEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ht.text}),Vt()}else{let ht=le.shiftKey?tt(!0):q.controls.seekStepKeyboard/1e3,Zt=Math.min($()+ht,y());Math.round($())<Math.round(y())&&(P.actions.internal.seekTime(Zt,Yn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ht.toString()}),Vt())}break}case"ArrowUp":{if(aa({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let ht=w(),Zt=q.controls.volumeStepKeyboard,yi=ht<=1;if(Fu(P,ht,Zt),yi){let ji=Math.round(Yf(ht,Zt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:ji}})}}Vt();break}case"ArrowDown":{if(aa({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let ht=w(),Zt=q.controls.volumeStepKeyboard,yi=ht>=0;if(Hu(P,ht,Zt),yi){let ji=Math.round(jf(ht,Zt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:ji}})}}Vt();break}case"Comma":{if(le.shiftKey){if(!f()&&I()){let ht=P.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ht==null?void 0:ht.displayValue}),Vt()}}else{if(Ut||d()!==Ha.PAUSED)break;let ht=Math.max($()-q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(ht,Yn.DOUBLE_TAP),Vt())}break}case"Period":{if(le.shiftKey){if(!f()&&I()){let ht=P.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ht==null?void 0:ht.displayValue}),Vt()}}else{if(Ut||d()!==Ha.PAUSED)break;let ht=Math.min($()+q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(ht,Yn.DOUBLE_TAP),Vt())}break}case"KeyK":case"Space":Ie({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===ue}),Vt();break;case"KeyM":{aa({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:Z,isAds:e.isAds})&&(e.showHotKeyHelpers({type:C()?"VOLUME":"MUTE"}),P.actions.internal.toggleMuted()),Vt();break}case"KeyF":e.toggleFullscreen(),Vt();break;case"KeyC":P.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(vi=N())==null?void 0:vi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Vt();break;case"KeyI":P.actions.internal.togglePictureInPicture(),Vt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.1,Yn.DOUBLE_TAP),Vt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.2,Yn.DOUBLE_TAP),Vt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.3,Yn.DOUBLE_TAP),Vt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.4,Yn.DOUBLE_TAP),Vt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.5,Yn.DOUBLE_TAP),Vt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.6,Yn.DOUBLE_TAP),Vt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.7,Yn.DOUBLE_TAP),Vt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.8,Yn.DOUBLE_TAP),Vt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.9,Yn.DOUBLE_TAP),Vt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(0,Yn.DOUBLE_TAP),Vt();break;case"Slash":{le.shiftKey&&q.features.hotKeyMapModal&&(e.showKeyMap(),Vt());break}case"KeyN":le.shiftKey&&L()&&(P.actions.internal.nextVideoClick(),Vt());break;case"KeyP":le.shiftKey&&E()&&(P.actions.internal.prevVideoClick(),Vt());break;case"ShiftLeft":case"ShiftRight":Vt();break;case"Tab":case"Escape":case"Enter":break;default:d0(ue);break}return Yi},ft=le=>{let he=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Ve=d()===Ha.PLAYING||d()===Ha.PAUSED,rt=e.isAds&&(v()==="paused"||v()==="playing");if(Ve||rt)switch(he){case"ShiftLeft":case"ShiftRight":Ae=0;break;case"Space":Ie({type:"up"});break}},Bt=G("aria_label_video_player"),lt=()=>{var le;return(le=n(ze))==null?void 0:le.focus()},xt=()=>n(ze)===Uu(),ii=le=>le.type==="keydown"?Nt(le,!0):(le.type==="keyup"&&ft(le),!1);var Pt=u0();Pt.__keyup=ft,Pt.__keydown=[c0,Nt];var Ot=T(Pt);ni(Ot,()=>{var le;return(le=e.children)!=null?le:gt}),S(Pt),Xe(Pt,le=>O(ze,le),()=>n(ze)),D(()=>Me(Pt,"aria-label",Bt)),b(t,Pt);var Ft=F({focus:lt,isFocused:xt,handleExternalKeyboardEvent:ii});return o(),Ft}Ye(["keyup","keydown"]);var f0=M('<div class="container s-n"><div class="dot s-n"></div> <div class="dot s-n"></div> <div class="dot s-n"></div></div>'),m0={hash:"s-n",code:".container.s-n{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-n:first-child{animation-delay:0s}.dot.s-n:nth-child(2){animation-delay:.18s}.dot.s-n:nth-child(3){animation-delay:.36s}@keyframes s-n-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-n{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-n-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-n+.dot:where(.s-n){margin-left:4px}"};function Ua(t,e){Q(t,m0);let i=h(e,"style",3,"");var o=f0();D(()=>Qe(o,i())),b(t,o)}var v0=Ce('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Zf(t,e){Ze(t,{get fill(){return e.fill},children:(i,o)=>{var r=v0();b(i,r)},$$slots:{default:!0}})}import{noop as Bl}from"@vkontakte/videoplayer-shared/es2015";var g0=t=>{t.stopPropagation()},h0=M("<button><!></button>"),_0={hash:"s-1o",code:"button.btn.s-1o{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1o{width:100%}button.btn--live.s-1o{padding:10px 4px}button.btn-jc-l.s-1o{justify-content:left}button.btn-m.s-1o{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1o,button.btn-m--play.s-1o{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1o{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1o,button.btn-m--prev.s-1o{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1o{right:calc(100% + 35px)}button.btn-m--next.s-1o{left:calc(100% + 35px)}button.btn.s-1o:disabled{cursor:default;pointer-events:none}button.btn.s-1o:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1o:not(:disabled):hover{opacity:.8}button.pr-0.s-1o{padding-right:0}button.pl-0.s-1o{padding-left:0}"};function qt(t,e){B(e,!0),Q(t,_0);let i=h(e,"className",3,""),o=h(e,"style",3,""),r=h(e,"disabled",3,void 0),a=h(e,"testId",3,void 0),l=h(e,"ariaHidden",3,void 0),d=h(e,"ariaLabel",3,void 0),s=h(e,"ref",15,void 0),u=h(e,"ariaKeyShortCut",3,void 0),f=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),v=h(e,"click",3,Bl),$=h(e,"focus",3,Bl),y=h(e,"blur",3,Bl),g=m(()=>v()===Bl?null:L=>{L.stopPropagation(),v()(L)}),w=m(()=>$()===Bl?null:L=>{L.preventDefault(),$()()}),I=m(()=>y()===Bl?null:L=>{L.preventDefault(),y()()});var C=h0();C.__pointerdown=[g0],C.__click=function(...L){var E;(E=n(g))==null||E.apply(this,L)};var N=T(C);ni(N,()=>{var L;return(L=e.children)!=null?L:gt}),S(C),Xe(C,L=>s(L),()=>s()),D(()=>{var L,E,P,q,H,z,j,ae;se(C,1,`btn ${(L=i())!=null?L:""}`,"s-1o"),Qe(C,o()||null),C.disabled=(E=r())!=null?E:null,Me(C,"aria-hidden",(P=l())!=null?P:null),Me(C,"aria-label",(q=d())!=null?q:null),Me(C,"aria-keyshortcuts",(H=u())!=null?H:null),Me(C,"aria-expanded",(z=f())!=null?z:null),Me(C,"data-testid",(j=a())!=null?j:null),Me(C,"tabindex",p()),Me(C,"role",e.role),Me(C,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),at("focus",C,function(...L){var E;(E=n(w))==null||E.apply(this,L)}),at("blur",C,function(...L){var E;(E=n(I))==null||E.apply(this,L)}),b(t,C),F()}Ye(["pointerdown","click"]);var b0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},$0=M('<div class="modal-header s-1d"><h3 class="modal-title s-1d"> </h3> <!></div>'),y0=M('<div class="modal-overlay s-1d"><div class="modal-container s-1d" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1d" tabindex="0" role="scrollbar"><div class="modal-main s-1d"><!></div></div></div></div>'),x0={hash:"s-1d",code:'.modal-overlay.s-1d{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1d{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1d{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1d{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1d{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1d::-webkit-scrollbar{width:8px}.modal-scroll.s-1d::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1d::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1d::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1d{margin:-8px -4px 0 0}'};function Jf(t,e){B(e,!0),Q(t,x0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Lt(()=>{var g;return(g=n(r))==null||g.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=y0();s.__keydown=[b0,e];var u=T(s),f=T(u);{var p=g=>{var w=$0(),I=T(w),C=T(I,!0);S(I);var N=A(I,2);{var L=E=>{qt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(P,q)=>{Zf(P,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(L)})}S(w),D(()=>me(C,e.title)),b(g,w)};R(f,g=>{i()&&g(p)})}var v=A(f,2),$=T(v),y=T($);ni(y,()=>{var g;return(g=e.children)!=null?g:gt}),S($),S(v),Xe(v,g=>O(r,g),()=>n(r)),S(u),Xe(u,g=>O(a,g),()=>n(a)),S(s),b(t,s),F()}Ye(["keydown"]);var w0=new Set(["BR"]),q_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;w0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var S0=M('<li class="hot-key-map-item s-j"><span class="hot-key-map-item-description s-j"><!></span> &nbsp; <span class="hot-key-map-item-value s-j"> </span></li>'),C0=M('<div class="hot-key-map-group s-j"><h5 class="hot-key-map-group-title s-j"> </h5> <ul class="hot-key-map-group-items s-j"></ul></div>'),T0=M('<div class="hot-key-map s-j"></div>'),I0={hash:"s-j",code:'.hot-key-map.s-j{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-j{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-j:last-child{border-bottom:none}.hot-key-map-group-title.s-j{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-j,.hot-key-map-item.s-j{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-j{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-j{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-j{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-j{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-j,.hot-key-map-item-value.s-j{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function em(t,e){B(e,!1),Q(t,I0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};yo(),Jf(t,{get title(){return r().title},onClose:s,children:(u,f)=>{var p=T0();$i(p,5,()=>r().groups,({title:v,items:$})=>v,(v,$)=>{let y=()=>n($).title,g=()=>n($).items;var w=C0(),I=T(w),C=T(I,!0);S(I);var N=A(I,2);$i(N,5,g,({description:L,value:E})=>E,(L,E)=>{let P=()=>n(E).description,q=()=>n(E).value;var H=S0(),z=T(H),j=T(z);Cd(j,()=>q_(P())),S(z);var ae=A(z,2),X=T(ae,!0);S(ae),S(H),D(()=>me(X,q())),b(L,H)}),S(N),S(w),D(()=>me(C,y())),b(v,w)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as bb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as fb,PlaybackState as Um}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as O0}from"@vkontakte/videoplayer-shared/es2015";var E0=M('<div class="pillow s-1y"><!></div>'),P0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function tm(t,e){Q(t,P0);var i=E0(),o=T(i);ni(o,()=>{var r;return(r=e.children)!=null?r:gt}),S(i),D(()=>Me(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Gd}from"@vkontakte/videoplayer-shared/es2015";var k0=Ce('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function im(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=k0();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(),S(o),b(t,o)}var A0=Ce('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function om(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=A0();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(),S(o),b(t,o)}var L0=Ce('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function nm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=L0();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(),S(o),b(t,o)}var M0=Ce('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function rm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=M0();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(),S(o),b(t,o)}var V0=Ce('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function sm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=V0();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(),S(o),b(t,o)}var zu=t=>{switch(t){case Gd.Q_720P:return nm;case Gd.Q_1080P:return rm;case Gd.Q_1440P:return sm;case Gd.Q_2160P:return im;case Gd.Q_4320P:return om}};var R0=Ce('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function am(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=R0();b(i,r)},$$slots:{default:!0}})}var N0=Ce('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function lm(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=N0();b(i,r)},$$slots:{default:!0}})}var D0=M('<div aria-hidden="true"><!> <!></div>'),B0={hash:"s-1v",code:".icon.s-1v{display:flex;height:24px;position:relative;width:24px}.icon.s-1v .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1v .pillow{right:-13px}.icon.s-1v svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Yd(t,e){B(e,!0),Q(t,B0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=m(()=>o()?O0(o()):""),a=m(()=>zu(o())),l=m(()=>n(r).length>2);var d=Le(),s=ce(d);{var u=p=>{am(p,{testId:"settings-mobile-icon"})},f=p=>{var v=D0();let $;var y=T(v);{var g=C=>{let N=m(()=>`${n(r)}-pill-icon`);tm(C,{get testId(){return n(N)},children:(L,E)=>{var P=Le(),q=ce(P);Fi(q,()=>n(a),(H,z)=>{z(H,{})}),b(L,P)},$$slots:{default:!0}})};R(y,C=>{n(a)&&C(g)})}var w=A(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");lm(w,{get testId(){return n(I)}}),S(v),D(C=>$=se(v,1,"icon s-1v",null,$,C),[()=>({triple:n(l)})]),b(p,v)};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}var F0=M('<span class="settings-icon-wrapper s-20"><!></span>'),H0={hash:"s-20",code:".settings-icon-wrapper.s-20{position:relative;width:24px}"};function Fl(t,e){B(e,!0),Q(t,H0);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,$=d.ui.t,y=K(void 0);Oe(()=>{n(y)&&Ct(()=>{e.ref$.set(n(y))})});let g=$("aria_label_settings");function w(C){return vt(this,null,function*(){let N=sa(C);r()?p():f(N,vo)})}let I=m(()=>r()?"opened":"");qt(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return g},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(C){O(y,C,!0)},children:(C,N)=>{var L=F0(),E=T(L);Yd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(L),b(C,L)},$$slots:{default:!0}}),F(),o()}var U0=Ce('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),z0=Ce("<path></path>");function la(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Le(),d=ce(l);{var s=f=>{var p=U0();ui(),b(f,p)},u=f=>{var p=z0();D(()=>Me(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
58
+ Audio: ${(rt=n(s).audioCodec||"")!=null?rt:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),$(Y,Pe)};V(ee,Y=>{(n(s).videoCodec||n(s).audioCodec)&&Y(be)})}var we=k(ee,2);{var ge=Y=>{var Pe=Oy(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(()=>ve(ye,n(s).viewport)),$(Y,Pe)};V(we,Y=>{n(s).viewport&&Y(ge)})}var pe=k(we,2);{var qe=Y=>{var Pe=Dy(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(()=>ve(ye,n(s).videoSize)),$(Y,Pe)};V(pe,Y=>{n(s).videoSize&&Y(qe)})}var U=k(pe,2);{var D=Y=>{var Pe=By(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(()=>ve(ye,n(s).cdn)),$(Y,Pe)};V(U,Y=>{n(s).cdn&&Y(D)})}var Qe=k(U,2);{var K=Y=>{var Pe=Hy(),le=k(T(Pe),2),ye=T(le);S(le),S(Pe),O(()=>{var Me;return ve(ye,`${(Me=n(s).volume)!=null?Me:""} %`)}),$(Y,Pe)};V(Qe,Y=>{n(s).volume&&Y(K)})}var ae=k(Qe,2);{var xe=Y=>{var Pe=Fy(),le=k(T(Pe),2),ye=T(le);S(le),S(Pe),O(Me=>ve(ye,`${Me!=null?Me:""} s`),[()=>n(s).position.toFixed(2)]),$(Y,Pe)};V(ae,Y=>{n(s).position&&Y(xe)})}var He=k(ae,2);{var it=Y=>{var Pe=Uy(),le=k(T(Pe),2),ye=T(le);S(le),S(Pe),O(Me=>ve(ye,`${Me!=null?Me:""} s`),[()=>n(s).buffer.toFixed(2)]),$(Y,Pe)};V(He,Y=>{n(s).buffer&&Y(it)})}var re=k(He,2);{var ce=Y=>{var Pe=zy(),le=k(T(Pe),2),ye=T(le);S(le),S(Pe),O(Me=>ve(ye,`${Me!=null?Me:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),$(Y,Pe)};V(re,Y=>{n(s).nativeBuffer&&Y(ce)})}var Ne=k(re,2);{var Re=Y=>{var Pe=Wy(),le=k(T(Pe),2),ye=T(le);S(le),S(Pe),O(Me=>ve(ye,`${Me!=null?Me:""} s`),[()=>n(s).liveLatency.toFixed(2)]),$(Y,Pe)};V(Ne,Y=>{n(s).liveLatency&&Y(Re)})}var et=k(Ne,2);{var Ee=Y=>{var Pe=Ky(),le=k(T(Pe),2),ye=T(le,!0);S(le),S(Pe),O(Me=>ve(ye,Me),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Me})=>Me).map(({value:Me,title:rt})=>`${rt} ${((Me!=null?Me:0)/1e3).toFixed(2)} s`).join(" & ")]),$(Y,Pe)};V(et,Y=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Y(Ee)})}var Te=k(et,2),Fe=k(T(Te),2),It=T(Fe);S(Fe),S(Te);var wt=k(Te,2);{var Mt=Y=>{var Pe=qy(),le=k(T(Pe),2);Wd(le,{get values(){return n(I)}});var ye=k(le,2),Me=T(ye);S(ye),S(Pe),O(rt=>ve(Me,`${rt!=null?rt:""} Kbps`),[()=>n(s).speed.toFixed(2)]),$(Y,Pe)};V(wt,Y=>{n(s).speed&&Y(Mt)})}var lt=k(wt,2);{var Et=Y=>{var Pe=Qy(),le=k(T(Pe),2);Wd(le,{get values(){return n(C)}});var ye=k(le,2),Me=T(ye);S(ye),S(Pe),O(rt=>ve(Me,`${rt!=null?rt:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),$(Y,Pe)};V(lt,Y=>{n(s).bitrate&&Y(Et)})}var Jt=k(lt,2),Pt=k(T(Jt),2);Wd(Pt,{get values(){return n(w)}});var Bt=k(Pt,2),Wt=T(Bt,!0);S(Bt),S(Jt),S(Q),S(A),O(Y=>{var Pe,le;E=ne(A,1,"container s-j",null,E,Y),Ve(A,"aria-label",N),ve(X,n(s).version),ve(It,`${(Pe=n(p))!=null?Pe:""} / ${(le=n(m))!=null?le:""} frames`),ve(Wt,n(v))},[()=>({"container-mobile":r()})]),$(t,A),H(),o()}Ge(["click"]);import{noop as jy}from"@vkontakte/videoplayer-shared/es2015";var Xy=(t,e)=>{t.stopPropagation(),e()()},Zy=L('<div class="close s-x"></div>'),Jy={hash:"s-x",code:'.close.s-x{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-x:hover{opacity:1}.close.s-x:after,.close.s-x:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-x:before{transform:rotate(45deg)}.close.s-x:after{transform:rotate(-45deg)}'};function Ds(t,e){B(e,!0),G(t,Jy);let i=h(e,"onClick",3,jy);var o=Zy();o.__click=[Xy,i],$(t,o),H()}Ge(["click"]);import{noop as t0}from"@vkontakte/videoplayer-shared/es2015";var cn=t=>`width:${t}px;height:${t}px;`;var e0=Ie('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Vn(t,e){B(e,!0);let i=f(()=>cn(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=e0();$(o,a)},$$slots:{default:!0}}),H()}var i0=L('<div class="timer s-y"><canvas class="timer-canvas s-y" width="100" height="100"></canvas> <!></div>'),o0={hash:"s-y",code:".timer.s-y{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-y:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-y{height:50px;position:absolute;width:50px}"};function qd(t,e){B(e,!0),G(t,o0);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,t0),r=5e3,a=q(void 0),l,d,s=0,u;De(()=>{i()&&Tt(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{m(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Nt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),dn(()=>{m()});var v=i0(),b=T(v);Xe(b,g=>R(a,g),()=>n(a));var y=k(b,2);Vn(y,{get size(){return"24"}}),S(v),$(t,v),H()}var n0=(t,e,i)=>{e(!1),i()},r0=L('<div class="overlay s-18"></div> <div class="next-video s-18"><div class="top s-18"><div class="caption s-18"> </div> <!></div> <div class="row s-18"><div class="column s-18"><div class="thumb s-18"><div></div> <!></div></div> <div class="column s-18"><div class="title s-18"> </div></div></div></div>',1),s0={hash:"s-18",code:".overlay.s-18{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-18{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-18{display:flex;justify-content:space-between}.caption.s-18{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-18{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-18{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-18{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-18,.thumb-overlay.s-18{height:100%;width:100%}.thumb-overlay.s-18{position:absolute}.thumb-overlay.withOpacity.s-18{background:var(--black);opacity:.3}.title.s-18{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Xf(t,e){B(e,!0),G(t,s0);let[i,o]=Oe(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=_e(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},g=()=>{e.clickCloseIcon(),b()};Nt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ue(w);{var C=N=>{var A=r0(),E=k(ue(A),2),P=T(E),Q=T(P),F=T(Q,!0);S(Q);var z=k(Q,2);Ds(z,{onClick:g}),S(P);var X=k(P,2);X.__click=[n0,u,p];var se=T(X),Z=T(se),oe=T(Z);let J;var Ce=k(oe,2);{var me=ge=>{let pe=f(()=>a()&&r());qd(ge,{get isRunning(){return n(pe)},onTimerEnded:y})};V(Ce,ge=>{r()&&ge(me)})}S(Z),S(se);var ee=k(se,2),be=T(ee),we=T(be,!0);S(be),S(ee),S(X),S(E),O((ge,pe)=>{ve(F,ge),Ke(Z,`background-image: url('${e.thumb}')`),J=ne(oe,1,"thumb-overlay s-18",null,J,pe),ve(we,e.title)},[()=>j("end_screen_next_video"),()=>({withOpacity:r()})]),$(N,A)};V(I,N=>{e.isHide||N(C)})}$(t,w),H(),o()}Ge(["click"]);import{PlaybackState as za}from"@vkontakte/videoplayer-core/es2015";import{checkNever as l0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Zn}from"@vkontakte/videoplayer-statistics/es2015";var Zf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Jf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Fu=(t,e,i)=>{let o=Zf(e,i);e<1&&t.actions.internal.setVolume(o)},Uu=(t,e,i)=>{let o=Jf(e,i);e>0&&t.actions.internal.setVolume(o)};var ua=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function zu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var d0=(t,e)=>{e(t)},c0=L('<div class="keyboard-controls s-19" tabindex="-1" role="region"><!></div>'),u0={hash:"s-19",code:".keyboard-controls.s-19{bottom:0;left:0;position:absolute;right:0;top:0}"};function em(t,e){var Y,Pe;B(e,!0),G(t,u0);let[i,o]=Oe(),r=()=>x(Ce,"$disabledControls$",i),a=()=>x(it,"$isInteractiveTime$",i),l=()=>x(re,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(D,"$isEnded$",i),u=()=>x(qe,"$doubleForwardAvailable$",i),m=()=>x(pe,"$doubleForwardOn$",i),p=()=>x(Qe,"$overlayContainer$",i),v=()=>x(se,"$adPlaybackState",i),b=()=>x(Z,"$positionExact$",i),y=()=>x(oe,"$duration$",i),g=()=>x(xe,"$isAudioAvailable$",i),w=()=>x(J,"$volume$",i),I=()=>x(X,"$canChangePlaybackSpeed$",i),C=()=>x(me,"$muted$",i),N=()=>x(ee,"$currentSubtitle$",i),A=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),P=_e(),Q=Ot(),F=P.getLogger().createComponentLog("KeyboardControls component"),z=P.state.playbackState$,X=P.state.canChangePlaybackSpeed$,se=P.ads.playbackState,Z=P.state.positionExact$,oe=P.state.duration$,J=P.state.volume$,Ce=P.ui.controls.disabledControls$,me=P.state.muted$,ee=P.state.currentSubtitle$,be=P.ui.contextMenu.openedByHotKey$,we=P.ui.contextMenu.lastActiveElem$,ge=P.ui.contextMenu.visible$,pe=P.ui.doubleForwardOn$,qe=P.ui.doubleForwardAvailable$,U=P.ui.contextMenu.position$,D=P.state.isEnded$,Qe=P.ui.overlayContainer$,K=(Y=P.callbacks)==null?void 0:Y.onAudioDoesNotExistHint,ae=(Pe=P.callbacks)==null?void 0:Pe.onAudioDisabledHint,xe=P.state.isAudioAvailable$,He=P.state.isAudioDisabled,it=P.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:re}=_o(),ce=0,Ne=!0,Re=q(void 0),et=le=>(le!==Ne&&(Ne=le,ce=0),ce+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*ce)/1e3),Ee=!0,Te=({type:le,repeat:ye,disableDoubleForward:Me})=>{let rt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&re.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{P.actions.internal.togglePlay();let fe="PLAY";d()===za.PAUSED?fe="PAUSE":s()&&(fe="REPLAY"),e.showHotKeyHelpers({type:fe})}},kt=le==="down";if(!u()||Me){kt&&rt(),Ee=!0;return}if(kt)Ee=!1;else if(Ee)return;if(kt){!ye&&e.startDoubleForwardActivationTimer();return}m()||rt(),e.stopDoubleForward(),Ee=!0},Fe=le=>{let ye=W_(p());U.set(ye),we.set(le.target),be.set(!0),ge.set(!0)},It=(le,ye=!1)=>{var vi,$i;let Me=le.target,rt=(vi=Me==null?void 0:Me.getAttribute("role"))==null?void 0:vi.includes("menuitem"),kt=Me.classList.contains("btn"),fe=le.code;if(kt&&fe==="Space")return!1;let Be=Fh.has(fe);if(rt&&Be)return!1;let We=!Hh.has(fe);if(le.ctrlKey&&We||le.altKey&&We||le.metaKey)return!1;let yt=rt&&fe==="Escape";Uh.has(fe)||yt||e.hideContextMenu();let Kt=d()===za.PLAYING||d()===za.PAUSED,At=e.isAds&&(v()==="paused"||v()==="playing"),mi=!At&&!r().has("TIMELINE"),pi=le.shiftKey&&["Digit1","Numpad1"].includes(fe);if(!pi&&!(Kt||At))return!1;F({message:`key down, code: ${fe}, isExternal = ${ye}`});let Oi=!1,Vt=()=>{Oi=!0,ye||le.preventDefault()};if(pi)return Fe(le),Vt(),!0;switch(fe){case"KeyJ":case"ArrowLeft":{if(!mi)break;if(le.ctrlKey||le.altKey){let pt=P.actions.internal.getPrevEpisode();P.actions.internal.seekToPrevEpisode(pt),pt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:pt.text}),Vt()}else{let pt=le.shiftKey?et(!1):Q.controls.seekStepKeyboard/1e3,Xt=Math.max(b()-pt,0);b()>0&&(P.actions.internal.seekTime(Xt,Zn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:pt.toString()}),Vt())}break}case"KeyL":case"ArrowRight":{if(!mi)break;if(le.ctrlKey||le.altKey){let pt=P.actions.internal.getNextEpisode();P.actions.internal.seekToNextEpisode(pt),pt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:pt.text}),Vt()}else{let pt=le.shiftKey?et(!0):Q.controls.seekStepKeyboard/1e3,Xt=Math.min(b()+pt,y());Math.round(b())<Math.round(y())&&(P.actions.internal.seekTime(Xt,Zn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:pt.toString()}),Vt())}break}case"ArrowUp":{if(ua({isAudioDisabled:He,audioDisabledHintCallback:ae,isAudioAvailable:g(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let pt=w(),Xt=Q.controls.volumeStepKeyboard,Di=pt<=1;if(Fu(P,pt,Xt),Di){let xi=Math.round(Zf(pt,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:xi}})}}Vt();break}case"ArrowDown":{if(ua({isAudioDisabled:He,audioDisabledHintCallback:ae,isAudioAvailable:g(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let pt=w(),Xt=Q.controls.volumeStepKeyboard,Di=pt>=0;if(Uu(P,pt,Xt),Di){let xi=Math.round(Jf(pt,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:xi}})}}Vt();break}case"Comma":{if(le.shiftKey){if(!m()&&I()){let pt=P.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:pt==null?void 0:pt.displayValue}),Vt()}}else{if(At||d()!==za.PAUSED)break;let pt=Math.max(b()-Q.controls.seekStepFrame/1e3,0);b()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(pt,Zn.DOUBLE_TAP),Vt())}break}case"Period":{if(le.shiftKey){if(!m()&&I()){let pt=P.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:pt==null?void 0:pt.displayValue}),Vt()}}else{if(At||d()!==za.PAUSED)break;let pt=Math.min(b()+Q.controls.seekStepFrame/1e3,y());b()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(pt,Zn.DOUBLE_TAP),Vt())}break}case"KeyK":case"Space":Te({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===fe}),Vt();break;case"KeyM":{ua({isAudioDisabled:He,audioDisabledHintCallback:ae,isAudioAvailable:g(),audioIsNotExistHintCallback:K,isAds:e.isAds})&&(e.showHotKeyHelpers({type:C()?"VOLUME":"MUTE"}),P.actions.internal.toggleMuted()),Vt();break}case"KeyF":e.toggleFullscreen(),Vt();break;case"KeyC":P.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:($i=N())==null?void 0:$i.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Vt();break;case"KeyI":P.actions.internal.togglePictureInPicture(),Vt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.1,Zn.DOUBLE_TAP),Vt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.2,Zn.DOUBLE_TAP),Vt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.3,Zn.DOUBLE_TAP),Vt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.4,Zn.DOUBLE_TAP),Vt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.5,Zn.DOUBLE_TAP),Vt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.6,Zn.DOUBLE_TAP),Vt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.7,Zn.DOUBLE_TAP),Vt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.8,Zn.DOUBLE_TAP),Vt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.9,Zn.DOUBLE_TAP),Vt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(0,Zn.DOUBLE_TAP),Vt();break;case"Slash":{le.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),Vt());break}case"KeyN":le.shiftKey&&A()&&(P.actions.internal.nextVideoClick(),Vt());break;case"KeyP":le.shiftKey&&E()&&(P.actions.internal.prevVideoClick(),Vt());break;case"ShiftLeft":case"ShiftRight":Vt();break;case"Tab":case"Escape":case"Enter":break;default:l0(fe);break}return Oi},wt=le=>{let ye=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Me=d()===za.PLAYING||d()===za.PAUSED,rt=e.isAds&&(v()==="paused"||v()==="playing");if(Me||rt)switch(ye){case"ShiftLeft":case"ShiftRight":ce=0;break;case"Space":Te({type:"up"});break}},Mt=j("aria_label_video_player"),lt=()=>{var le;return(le=n(Re))==null?void 0:le.focus()},Et=()=>n(Re)===zu(),Jt=le=>le.type==="keydown"?It(le,!0):(le.type==="keyup"&&wt(le),!1);var Pt=c0();Pt.__keyup=wt,Pt.__keydown=[d0,It];var Bt=T(Pt);ni(Bt,()=>{var le;return(le=e.children)!=null?le:vt}),S(Pt),Xe(Pt,le=>R(Re,le),()=>n(Re)),O(()=>Ve(Pt,"aria-label",Mt)),$(t,Pt);var Wt=H({focus:lt,isFocused:Et,handleExternalKeyboardEvent:Jt});return o(),Wt}Ge(["keyup","keydown"]);var p0=L('<div class="container s-m"><div class="dot s-m"></div> <div class="dot s-m"></div> <div class="dot s-m"></div></div>'),f0={hash:"s-m",code:".container.s-m{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-m:first-child{animation-delay:0s}.dot.s-m:nth-child(2){animation-delay:.18s}.dot.s-m:nth-child(3){animation-delay:.36s}@keyframes s-m-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-m{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-m-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-m+.dot:where(.s-m){margin-left:4px}"};function Wa(t,e){G(t,f0);let i=h(e,"style",3,"");var o=p0();O(()=>Ke(o,i())),$(t,o)}var m0=Ie('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function tm(t,e){Ze(t,{get fill(){return e.fill},children:(i,o)=>{var r=m0();$(i,r)},$$slots:{default:!0}})}import{noop as Fl}from"@vkontakte/videoplayer-shared/es2015";var v0=t=>{t.stopPropagation()},g0=L("<button><!></button>"),h0={hash:"s-1w",code:"button.btn.s-1w{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1w{width:100%}button.btn--live.s-1w{padding:10px 4px}button.btn-jc-l.s-1w{justify-content:left}button.btn-m.s-1w{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1w,button.btn-m--play.s-1w{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1w{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1w,button.btn-m--prev.s-1w{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1w{right:calc(100% + 35px)}button.btn-m--next.s-1w{left:calc(100% + 35px)}button.btn.s-1w:disabled{cursor:default;pointer-events:none}button.btn.s-1w:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1w:not(:disabled):hover{opacity:.8}button.pr-0.s-1w{padding-right:0}button.pl-0.s-1w{padding-left:0}"};function zt(t,e){B(e,!0),G(t,h0);let i=h(e,"className",3,""),o=h(e,"style",3,""),r=h(e,"disabled",3,void 0),a=h(e,"testId",3,void 0),l=h(e,"ariaHidden",3,void 0),d=h(e,"ariaLabel",3,void 0),s=h(e,"ref",15,void 0),u=h(e,"ariaKeyShortCut",3,void 0),m=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),v=h(e,"click",3,Fl),b=h(e,"focus",3,Fl),y=h(e,"blur",3,Fl),g=f(()=>v()===Fl?null:A=>{A.stopPropagation(),v()(A)}),w=f(()=>b()===Fl?null:A=>{A.preventDefault(),b()()}),I=f(()=>y()===Fl?null:A=>{A.preventDefault(),y()()});var C=g0();C.__pointerdown=[v0],C.__click=function(...A){var E;(E=n(g))==null||E.apply(this,A)};var N=T(C);ni(N,()=>{var A;return(A=e.children)!=null?A:vt}),S(C),Xe(C,A=>s(A),()=>s()),O(()=>{var A,E,P,Q,F,z,X,se;ne(C,1,`btn ${(A=i())!=null?A:""}`,"s-1w"),Ke(C,o()||null),C.disabled=(E=r())!=null?E:null,Ve(C,"aria-hidden",(P=l())!=null?P:null),Ve(C,"aria-label",(Q=d())!=null?Q:null),Ve(C,"aria-keyshortcuts",(F=u())!=null?F:null),Ve(C,"aria-expanded",(z=m())!=null?z:null),Ve(C,"data-testid",(X=a())!=null?X:null),Ve(C,"tabindex",p()),Ve(C,"role",e.role),Ve(C,"aria-checked",(se=e.areaChecked)!=null?se:null)}),at("focus",C,function(...A){var E;(E=n(w))==null||E.apply(this,A)}),at("blur",C,function(...A){var E;(E=n(I))==null||E.apply(this,A)}),$(t,C),H()}Ge(["pointerdown","click"]);var _0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},b0=L('<div class="modal-header s-1m"><h3 class="modal-title s-1m"> </h3> <!></div>'),$0=L('<div class="modal-overlay s-1m"><div class="modal-container s-1m" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1m" tabindex="0" role="scrollbar"><div class="modal-main s-1m"><!></div></div></div></div>'),y0={hash:"s-1m",code:'.modal-overlay.s-1m{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-1m{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-1m{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-1m{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-1m{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1m::-webkit-scrollbar{width:8px}.modal-scroll.s-1m::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1m::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1m::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1m{margin:-8px -4px 0 0}'};function im(t,e){B(e,!0),G(t,y0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=q(void 0),a=q(void 0),{webApi:{focusManager:l}}=_e(),d=j("hotkey_map_modal_close_btn_text");Nt(()=>{var g;return(g=n(r))==null||g.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=$0();s.__keydown=[_0,e];var u=T(s),m=T(u);{var p=g=>{var w=b0(),I=T(w),C=T(I,!0);S(I);var N=k(I,2);{var A=E=>{zt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(P,Q)=>{tm(P,{fill:"currentColor"})},$$slots:{default:!0}})};V(N,E=>{o()&&E(A)})}S(w),O(()=>ve(C,e.title)),$(g,w)};V(m,g=>{i()&&g(p)})}var v=k(m,2),b=T(v),y=T(b);ni(y,()=>{var g;return(g=e.children)!=null?g:vt}),S(b),S(v),Xe(v,g=>R(r,g),()=>n(r)),S(u),Xe(u,g=>R(a,g),()=>n(a)),S(s),$(t,s),H()}Ge(["keydown"]);var x0=new Set(["BR"]),Q_=t=>{var r;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],l=a.tagName;x0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var w0=L('<li class="hot-key-map-item s-1g"><span class="hot-key-map-item-description s-1g"><!></span> &nbsp; <span class="hot-key-map-item-value s-1g"> </span></li>'),S0=L('<div class="hot-key-map-group s-1g"><h5 class="hot-key-map-group-title s-1g"> </h5> <ul class="hot-key-map-group-items s-1g"></ul></div>'),C0=L('<div class="hot-key-map s-1g"></div>'),T0={hash:"s-1g",code:'.hot-key-map.s-1g{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-1g{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-1g:last-child{border-bottom:none}.hot-key-map-group-title.s-1g{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-1g,.hot-key-map-item.s-1g{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-1g{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-1g{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-1g{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-1g{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-1g,.hot-key-map-item-value.s-1g{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function om(t,e){B(e,!1),G(t,T0);let[i,o]=Oe(),r=()=>x(l,"$data",i),a=_e(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};ho(),im(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var p=C0();yi(p,5,()=>r().groups,({title:v,items:b})=>v,(v,b)=>{let y=()=>n(b).title,g=()=>n(b).items;var w=S0(),I=T(w),C=T(I,!0);S(I);var N=k(I,2);yi(N,5,g,({description:A,value:E})=>E,(A,E)=>{let P=()=>n(E).description,Q=()=>n(E).value;var F=w0(),z=T(F),X=T(z);Sd(X,()=>Q_(P())),S(z);var se=k(z,2),Z=T(se,!0);S(se),S(F),O(()=>ve(Z,Q())),$(A,F)}),S(N),S(w),O(()=>ve(C,y())),$(v,w)}),S(p),$(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as $b}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as mb,PlaybackState as Km}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as N0}from"@vkontakte/videoplayer-shared/es2015";var I0=L('<div class="pillow s-1y"><!></div>'),E0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function nm(t,e){G(t,E0);var i=I0(),o=T(i);ni(o,()=>{var r;return(r=e.children)!=null?r:vt}),S(i),O(()=>Ve(i,"data-testid",e.testId)),$(t,i)}import{VideoQuality as Qd}from"@vkontakte/videoplayer-shared/es2015";var P0=Ie('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function rm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=P0();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),S(o),$(t,o)}var k0=Ie('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function sm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=k0();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),S(o),$(t,o)}var A0=Ie('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function am(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=A0();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),S(o),$(t,o)}var L0=Ie('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function lm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=L0();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),S(o),$(t,o)}var M0=Ie('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function dm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=M0();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),S(o),$(t,o)}var Wu=t=>{switch(t){case Qd.Q_720P:return am;case Qd.Q_1080P:return lm;case Qd.Q_1440P:return dm;case Qd.Q_2160P:return rm;case Qd.Q_4320P:return sm}};var V0=Ie('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function cm(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=V0();$(i,r)},$$slots:{default:!0}})}var R0=Ie('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function um(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=R0();$(i,r)},$$slots:{default:!0}})}var O0=L('<div aria-hidden="true"><!> <!></div>'),D0={hash:"s-1v",code:".icon.s-1v{display:flex;height:24px;position:relative;width:24px}.icon.s-1v .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1v .pillow{right:-13px}.icon.s-1v svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Gd(t,e){B(e,!0),G(t,D0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=f(()=>o()?N0(o()):""),a=f(()=>Wu(o())),l=f(()=>n(r).length>2);var d=Le(),s=ue(d);{var u=p=>{cm(p,{testId:"settings-mobile-icon"})},m=p=>{var v=O0();let b;var y=T(v);{var g=C=>{let N=f(()=>`${n(r)}-pill-icon`);nm(C,{get testId(){return n(N)},children:(A,E)=>{var P=Le(),Q=ue(P);Ni(Q,()=>n(a),(F,z)=>{z(F,{})}),$(A,P)},$$slots:{default:!0}})};V(y,C=>{n(a)&&C(g)})}var w=k(y,2);let I=f(()=>n(a)?"settings-icon--labeled":"settings-icon");um(w,{get testId(){return n(I)}}),S(v),O(C=>b=ne(v,1,"icon s-1v",null,b,C),[()=>({triple:n(l)})]),$(p,v)};V(s,p=>{i()?p(u):p(m,!1)})}$(t,d),H()}var B0=L('<span class="settings-icon-wrapper s-21"><!></span>'),H0={hash:"s-21",code:".settings-icon-wrapper.s-21{position:relative;width:24px}"};function Ul(t,e){B(e,!0),G(t,H0);let[i,o]=Oe(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=_e(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,b=d.ui.t,y=q(void 0);De(()=>{n(y)&&Tt(()=>{e.ref$.set(n(y))})});let g=b("aria_label_settings");function w(C){return mt(this,null,function*(){let N=ca(C);r()?p():m(N,vo)})}let I=f(()=>r()?"opened":"");zt(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return g},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(C){R(y,C,!0)},children:(C,N)=>{var A=B0(),E=T(A);Gd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(A),$(C,A)},$$slots:{default:!0}}),H(),o()}var F0=Ie('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),U0=Ie("<path></path>");function pa(t,e){B(e,!0);let i=f(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=f(()=>cn(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Le(),d=ue(l);{var s=m=>{var p=F0();ui(),$(m,p)},u=m=>{var p=U0();O(()=>Ve(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
59
59
  ${e.type==="outline"?"M12.54 11.68c-1.04.1-1.64.26-2.1.48a5.2 5.2 90 00-2.28 2.28c-.22.46-.4 1.06-.48 2.1-.08 1.08-.08 2.46-.08 4.46v6c0 2 0 3.38.08 4.46.1 1.04.26 1.64.48 2.1q.78 1.5 2.28 2.28c.46.22 1.06.4 2.1.48 1.08.08 2.48.08 4.46.08h14c2 0 3.38 0 4.46-.08 1.04-.1 1.64-.26 2.1-.48a5.2 5.2 90 002.28-2.28c.22-.46.4-1.06.48-2.1.08-1.08.08-2.48.08-4.46v-6c0-2 0-3.38-.08-4.46a6 6 90 00-.48-2.1 5.2 5.2 90 00-2.28-2.28c-.46-.22-1.06-.4-2.1-.48-1.08-.08-2.48-.08-4.46-.08h-14c-2 0-3.38 0-4.46.08":""}
60
- M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),b(f,p)};R(d,f=>{e.type==="off"?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function dm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));qt(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return ms.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");la(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var W0=M('<span class="duration s-22" data-testid="video_duration"> </span>'),K0=M('<div><span class="current s-22" data-testid="current_time"> </span> <!></div>'),q0={hash:"s-22",code:'.time.s-22{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-22{padding:0 0 0 8px}.current.s-22{position:relative}.duration.s-22{opacity:.7}.duration.s-22:before{content:" / ";white-space:pre}'};function jd(t,e){B(e,!0),Q(t,q0);let i=h(e,"isMobile",3,!1),o=h(e,"isHidden",3,!1),r=h(e,"showDuration",3,!0),a=h(e,"ref",15),l=Mt(),d=de(!1),s=m(()=>Jo(e.duration)),u=m(()=>Jo(e.position));var f=K0();let p;var v=T(f),$=T(v,!0);S(v);var y=A(v,2);{var g=w=>{var I=W0(),C=T(I,!0);S(I),D(()=>me(C,n(s))),b(w,I)};R(y,w=>{r()&&w(g)})}S(f),Ls(f,()=>Vl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Xe(f,w=>a(w),()=>a()),D(w=>{p=se(f,1,"time s-22",null,p,w),me($,n(u))},[()=>({mobile:i()})]),b(t,f),F()}import{noop as Wu}from"@vkontakte/videoplayer-shared/es2015";var Q0=Ce('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),G0=Ce("<path></path>"),Y0=Ce('<path d="M14 3.96997C14.5523 3.96997 15 4.41769 15 4.96997V20.97C15 21.5223 14.5523 21.97 14 21.97C13.3585 21.97 12.7422 21.7208 12.2808 21.2751L6.79013 15.97H4C2.89543 15.97 2 15.0745 2 13.97V11.97C2 10.8654 2.89543 9.96997 4 9.96997H6.765L12.2794 4.66337C12.7417 4.21849 13.3584 3.96997 14 3.96997Z"></path><!>',1);function da(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(u,f)=>f?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>un(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Ze(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,f)=>{var p=Y0(),v=A(ce(p));{var $=g=>{var w=Q0();ui(),b(g,w)},y=g=>{var w=G0();D(()=>Me(w,"d",`${d}${n(a)==="max"?s:""}`)),b(g,w)};R(v,g=>{n(a)==="off"?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}import{isNonNullable as G_,noop as jn}from"@vkontakte/videoplayer-shared/es2015";import{noop as um}from"@vkontakte/videoplayer-shared/es2015";import{noop as X0}from"@vkontakte/videoplayer-shared/es2015";var j0=M('<div class="overlay"><!></div>');function cm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Oe(()=>{u(r())}),Lt(()=>(u(r()),()=>s(r())));var f=j0(),p=T(f);ni(p,()=>{var v;return(v=e.children)!=null?v:gt}),S(f),Xe(f,v=>O(d,v),()=>n(d)),b(t,f),F(),o()}var Z0=M('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),J0=M("<div><!></div> <!>",1),ex={hash:"s-1p",code:'.tooltip-wrapper.s-1p{display:flex;flex-direction:column;min-width:0}.full-width.s-1p{width:100%}.tooltip.s-1p{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1p{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1p{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function za(t,e){B(e,!0),Q(t,ex);let[i,o]=Re(),r=()=>x(j,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),f=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),$=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,X0),g=5,w=K(void 0),I=K(void 0),C,N=K(0),L=K(0),E=K(0),P=K(0),q=Mt(),H=ve(),z=H.ui.playerSize,j=H.ui.overlayContainer$;Oe(()=>{Ct(()=>{y()(s())})});let ae=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(I)||!n(w))return;O(L,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.width,ze=n(I).clientWidth,tt=a().width,ye=(ke-ze)/2,Ie=Ae.left+u()-U.left,Fe=Ie+ye,Nt=Ae.top+f()-U.top,ft=ze/2-g,Bt=Fe<8,lt=Fe+ze>tt-8;Bt&&(Fe=8,ft=Ie+Ae.width/2-2.5*g),lt&&(Fe=tt-8-ze,ft=Ae.left-U.left+Ae.width/2-Fe-g),O(E,Fe,!0),O(P,Nt),O(N,ft,!0)},ne=()=>{!r()||!n(I)||!n(w)||O(L,-g)},ee=()=>{if(!r()||!n(I)||!n(w))return;O(N,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.height,ze=n(I).clientHeight,tt=(ke-ze)/2+ze,ye=Ae.left+u()-U.left-n(I).clientWidth,Ie=2,Fe=ye-g;Fe<8&&(Fe=8);let ft=Ae.top+f()-U.top+tt,Bt=Ie-tt/2,lt=Ie-g;O(E,Fe,!0),O(P,ft),O(L,Bt),O(N,lt)},we=()=>{!r()||!n(I)||!n(w)||O(N,-g)},pe=()=>{switch($()){case"top":X();break;case"bottom":ne();break;case"left":ee();break;default:we()}},re=()=>{try{if(!r()||!n(w))return;pe(),s(!0)}catch(U){ae({message:String(U)})}},_e=()=>{s(!1)},$e=()=>{n(I)&&(C||(C=window.setTimeout(re,q.controls.hideTimeoutTooltips)),s()&&re())},J=()=>{_e(),window.clearTimeout(C),C=void 0},Ne=(U,Ae,ke)=>{let ze="";switch($()){case"top":ze=`transform: translate(${U}px, ${Ae}px);`;break;case"bottom":ze=`transform: translate(${U}px, ${Ae}px); top: auto; bottom: 100%;`;break;case"left":ze=`transform: translate(${U}px, ${Ae}px); left: 0; right: auto;`;break;default:ze=`transform: translate(${U}px, ${Ae}px);`}return ze+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,ze+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,ze},fe=(U,Ae)=>{let ke="";switch($()){case"top":ke=`transform: translate(${U}px, ${Ae}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":ke=`transform: translate(${U}px, ${Ae}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":ke=`transform: translate(${U}px, ${Ae}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:ke=`transform: translate(${U}px, ${Ae}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return ke},k=m(()=>Ne(n(E),n(P),s())),Ke=m(()=>fe(n(N),n(L)));Lt(pe),cn(()=>window.clearTimeout(C));var Te=J0(),Z=ce(Te);let ie;Z.__pointermove=$e,Z.__pointerdown=J,Z.__pointerup=function(...U){var Ae;(Ae=e.disableMouseupTooltipShow?void 0:$e)==null||Ae.apply(this,U)};var De=T(Z);ni(De,()=>{var U;return(U=e.children)!=null?U:gt}),S(Z),Xe(Z,U=>O(w,U),()=>n(w));var Be=A(Z,2);{var it=U=>{cm(U,{children:(Ae,ke)=>{var ze=Z0(),tt=T(ze),ye=T(tt,!0);S(tt);var Ie=A(tt,2);S(ze),Xe(ze,Fe=>O(I,Fe),()=>n(I)),D(()=>{Qe(ze,n(k)),me(ye,d()),Qe(Ie,n(Ke))}),b(Ae,ze)},$$slots:{default:!0}})};R(Be,U=>{d()&&!l()&&U(it)})}D(U=>ie=se(Z,1,"tooltip-wrapper s-1p",null,ie,U),[()=>({"full-width":p()})]),at("pointerenter",Z,$e),at("pointerleave",Z,J),b(t,Te),F(),o()}Ye(["pointermove","pointerdown","pointerup"]);var Q_=t=>{t.stopPropagation()},tx=M("<div><!></div>"),ix={hash:"s-1j",code:".btn-container.s-1j{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1j{min-width:0;width:100%}"};function Vo(t,e){B(e,!0),Q(t,ix);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=xo(),s=l.ui.isMobile,u=d.graphIsOpened$,f=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),$=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),g=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),C=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),L=h(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),P=h(e,"onTooltipVisibilityChange",3,um),q=h(e,"initialTranslateXPx",3,0),H=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,um),j=h(e,"mouseLeave",3,um),ae=m(()=>v()?r()?f("tooltip_disabled_when_graph_on"):L():I()),X=K(!1);Oe(()=>{C()||O(X,!1)});var ne=tx();ne.__pointerdown=[Q_],ne.__click=[Q_];var ee=T(ne);{var we=re=>{za(re,{get content(){return n(ae)},get translateX(){return q()},get translateY(){return H()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return P()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){O(X,_e,!0)},children:(_e,$e)=>{var J=Le(),Ne=ce(J);ni(Ne,()=>{var fe;return(fe=e.children)!=null?fe:gt}),b(_e,J)},$$slots:{default:!0}})},pe=re=>{var _e=Le(),$e=ce(_e);ni($e,()=>{var J;return(J=e.children)!=null?J:gt}),b(re,_e)};R(ee,re=>{$()&&n(ae)&&!a()?re(we):re(pe,!1)})}S(ne),Xe(ne,re=>y(re),()=>y()),D(()=>{var re;se(ne,1,`btn-container ${(re=p())!=null?re:""}`,"s-1j"),Me(ne,"aria-hidden",E()||null)}),at("mouseenter",ne,function(...re){var _e;(_e=z())==null||_e.apply(this,re)}),at("mouseleave",ne,function(...re){var _e;(_e=j())==null||_e.apply(this,re)}),Pn(ne,"clientWidth",g),b(t,ne),F(),o()}Ye(["pointerdown","click"]);var ox=Ce('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function Xd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));Ze(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=ox(),l=ce(a),d=A(l);D(()=>{Me(l,"fill",ia),Me(l,"fill-opacity",e.completed?1:.24),Me(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var nx=M("<div><!></div>"),rx={hash:"s-17",code:".interactive-episode-icon.s-17{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-17{opacity:.4;pointer-events:none}"};function pm(t,e){B(e,!0),Q(t,rx);let o=ve().ui.t,r=K(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Vo(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=nx();let u;var f=T(s);let p=m(()=>!!e.videoEpisode.completed);Xd(f,{get completed(){return n(p)}}),S(s),D(v=>{u=se(s,1,"interactive-episode-icon s-17",null,u,v),Qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Pn(s,"clientWidth",v=>O(r,v)),b(l,s)},$$slots:{default:!0}}),F()}var sx=M('<div><div class="video-episode-inner s-16"><div class="video-episode-loaded s-16"></div> <div></div></div></div>'),ax=M('<div class="video-episodes-wrap s-16"></div>'),lx={hash:"s-16",code:".video-episodes-wrap.s-16{height:100%;position:absolute;width:100%}.video-episode.s-16{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-16:first-child{padding-left:0}.video-episode.s-16:last-child{padding-right:0}.video-episode.s-16:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-16,.video-episode-inner.s-16,.video-episode-loaded.s-16{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-16{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-16:first-child .video-episode-inner:where(.s-16),.video-episode.s-16:last-child .video-episode-inner:where(.s-16){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-16{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-16,.video-episode-loaded.s-16{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-16{background-color:var(--slider-filled-bg)}"};function fm(t,e){Q(t,lx);let i=h(e,"videoEpisodes",19,()=>[]);var o=ax();$i(o,21,i,r=>r.from,(r,a)=>{var l=sx();let d;var s=T(l),u=T(s),f=A(u,2);let p;S(s),S(l),D((v,$)=>{d=se(l,1,"video-episode s-16",null,d,v),Qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(f,1,"video-episode-filled s-16",null,p,$),Qe(f,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function dx(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;O(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function cx(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function ux(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;O(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function px(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function fx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var mx=M("<div></div>"),vx=M('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),gx=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),hx={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Wa(t,e){B(e,!0),Q(t,hx);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),f=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),$=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),g=h(e,"onPointerDown",3,jn),w=h(e,"onHandleMove",3,jn),I=h(e,"onPointerUp",3,jn),C=h(e,"onPointerEnter",3,jn),N=h(e,"onPointerMove",3,jn),L=h(e,"onPointerLeave",3,jn),E=h(e,"onMouseEnter",3,jn),P=h(e,"onMouseLeave",3,jn),q=h(e,"onWheelUp",3,jn),H=h(e,"onWheelDown",3,jn),z=h(e,"onWheelLeft",3,jn),j=h(e,"onWheelRight",3,jn),ae=h(e,"onDisabledClick",3,jn),X=h(e,"loadedProgress",3,0),ne=h(e,"filledProgress",3,0),ee=h(e,"handleProgress",3,0),we=h(e,"ariaLabel",3,""),pe=h(e,"ariaValueMin",3,void 0),re=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),$e=h(e,"ariaValueText",3,""),J=h(e,"onContextMenu",3,jn),Ne=h(e,"handleAlwaysVisible",3,!1),fe=Mt(),k=K(void 0),Ke=K(!1),Te=m(()=>{var he;return(he=re())!=null?he:0}),Z=m(()=>{var he;return G_(f())&&((he=f()[f().length-1])==null?void 0:he.time)<n(Te)}),ie=m(()=>G_(f())&&f().length&&n(Z)&&n(Te)?tt(X()*100,ne()*100):[]);function De(he){if(he.preventDefault(),i()&&O(k,i().getBoundingClientRect(),!0),$())return;let Ve=ke(he.clientX,he.clientY),rt=ze(he.clientX);C()(Ve,rt,n(k).width)}function Be(he){he.preventDefault(),!$()&&L()()}function it(){E()()}function U(){P()()}function Ae(he){$()||p()&&(he.preventDefault(),he.deltaY<0?q()():he.deltaY>0?H()():he.deltaX>0?j()():z()())}function ke(he,Ve){return l()?Math.max(0,Math.min(1,(n(k).height-(Ve-n(k).top))/n(k).height)):Math.min(Math.max(he-n(k).x,0),n(k).width)/n(k).width}function ze(he){return Math.min(Math.max(he-n(k).x,0),n(k).width)}function tt(he,Ve){let rt=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,pt=[],ue=f()[0].time/n(Te)*100,We=0,Ge=0;for(let Ut=1;Ut<f().length;Ut++)We=f()[Ut].time/n(Te)*100,We-ue>rt&&(pt.push({from:ue,width:Math.max(0,We-ue),loadedWidth:Math.max(0,Math.min(We,he)-ue),filledWidth:Math.max(0,Math.min(We,Ve)-ue),interactive:f()[Ut-1].interactive,completed:f()[Ut-1].completed}),ue=f()[Ut].time/n(Te)*100,Ge++);let dt={from:ue,width:Math.max(0,100-ue),loadedWidth:Math.max(0,Math.min(he,100)-ue),filledWidth:Math.max(0,Math.min(Ve,100)-ue),interactive:f()[Ge].interactive,completed:f()[Ge].completed};100-ue<rt?(Ge-=1,pt[Ge].width+=100-ue,pt[Ge].loadedWidth+=Math.max(0,Math.min(he,100)-ue),pt[Ge].filledWidth+=Math.max(0,Math.min(Ve,100)-ue)):pt[Ge]=dt;let Ht=f()[0].time;if(Ht!==0){let Ut=Ht/n(Te)*100;pt.unshift({from:0,width:Ut,loadedWidth:Math.min(Ut,he),filledWidth:Math.min(Ut,Ve)})}return pt}function ye(he){return Math.max(0,Math.min(100,he*100))}let Ie=m(()=>ye(X())),Fe=m(()=>ye(ne()));var Nt=gx(),ft=ce(Nt);{var Bt=he=>{var Ve=mx();let rt;$i(Ve,21,()=>n(ie),pt=>pt.from,(pt,ue)=>{var We=Le(),Ge=ce(We);{var dt=Ht=>{pm(Ht,{get videoEpisode(){return n(ue)},get disabled(){return $()}})};R(Ge,Ht=>{n(ue).interactive&&Ht(dt)})}b(pt,We)}),S(Ve),D(pt=>rt=se(Ve,1,"interactive-icons s-h",null,rt,pt),[()=>({mobile:s(),hidden:s()&&!n(Ke)})]),b(he,Ve)};R(ft,he=>{v()&&he(Bt)})}var lt=A(ft,2);let xt;lt.__pointerdown=[dx,i,k,$,Ke,ke,g],lt.__pointermove=[cx,$,ke,ze,N,k,Ke,w],lt.__pointerup=[ux,$,Ke,ke,I],lt.__click=[px,$,ae,ke],lt.__contextmenu=[fx,ke,$,ae,Ke,J];var ii=T(lt);{var Pt=he=>{fm(he,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},Ot=he=>{var Ve=vx(),rt=T(Ve),pt=A(rt,2);let ue;S(Ve),D(We=>{Me(rt,"data-value",n(Ie)),Qe(rt,`transform: translateX(${n(Ie)}%);`),ue=se(pt,1,"filled s-h",null,ue,We),Me(pt,"data-value",n(Fe)),Qe(pt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(he,Ve)};R(ii,he=>{n(ie).length?he(Pt):he(Ot,!1)})}var Ft=A(ii,2);let Y;var Se=T(Ft);let le;S(Ft),S(lt),Xe(lt,he=>i(he),()=>i()),D((he,Ve,rt,pt)=>{var ue,We;xt=se(lt,1,`slider ${(ue=o())!=null?ue:""}`,"s-h",xt,he),Me(lt,"aria-label",we()),Me(lt,"aria-valuemin",pe()),Me(lt,"aria-valuemax",re()),Me(lt,"aria-valuenow",_e()),Me(lt,"aria-valuetext",$e()),Me(lt,"data-testid",(We=r())!=null?We:null),Y=se(Ft,1,"handleWrap s-h",null,Y,Ve),Qe(Ft,rt),le=se(Se,1,"handle s-h",null,le,pt)},[()=>({disabled:$(),"slider-dragging":n(Ke),hidden:a(),"handle-always-visible":Ne(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(ee())}%);`,()=>({"active-live":d()})]),at("pointerenter",lt,De),at("pointerleave",lt,Be),at("mouseenter",lt,it),at("mouseleave",lt,U),at("wheel",lt,Ae),b(t,Nt),F()}Ye(["pointerdown","pointermove","pointerup","click","contextmenu"]);var oo=(t,e)=>Md[t]>=Md[e];var Rs=(t,e)=>Md[t]<=Md[e],Y_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var bx=M("<div><!></div>"),$x=M("<div><!> <!></div>"),yx={hash:"s-29",code:".volumeBar-container.s-29{align-items:center;display:flex}.vertical.s-29 .btn,.vertical.s-29 .tooltip-wrapper,.volumeBar-container.vertical.s-29{width:40px}.volumeBar.s-29{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-29{padding:0 8px 0 0;width:0}"};function mm(t,e){var ze,tt;B(e,!0),Q(t,yx);let[i,o]=Re(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(De,"$controlsVisible",i),u=ve(),f=Mt(),p=u.state.volume$,v=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:g}=u.actions.internal,w=u.ui.currentGridType$,I=(ze=u.callbacks)==null?void 0:ze.onAudioDoesNotExistHint,C=(tt=u.callbacks)==null?void 0:tt.onAudioDisabledHint,N=u.state.isAudioAvailable$,L=u.state.isAudioDisabled,E=u.ui.t,P=K(!1),q,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),j=m(()=>Rs(d(),"l")),ae=m(()=>n(j)?"":n(z)?!r()||L?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),ne=m(()=>n(z)?0:l()),ee=!1,we=m(()=>e.isAds?!1:L?!C:r()?!1:!I);function pe(ye){y(),$(ye)}function re(){Fu(u,l(),f.controls.volumeStepWheel)}function _e(){Hu(u,l(),f.controls.volumeStepWheel)}function $e(ye){$(ye)}function J(ye){$(ye),g()}function Ne(){ee=!0}function fe(){ee=!1,Te()}function k(){clearTimeout(q),O(P,!0)}function Ke(){Te()}function Te(){q=window.setTimeout(()=>{ee||O(P,!1)},f.controls.volumeBarTimeout)}function Z(ye){ye.preventDefault(),ye.deltaY<0?re():ye.deltaY>0&&_e()}let ie=K(!1),De=u.ui.controlsVisible;Oe(()=>{s()||O(ie,!1)});var Be=$x();let it;var U=T(Be);za(U,{get content(){return n(ae)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,Ie)=>{let Fe=m(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");qt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Fe)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return ms.KeyM},role:"button",children:(Nt,ft)=>{da(Nt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=A(U,2);{var ke=ye=>{var Ie=bx();let Fe;var Nt=T(Ie);let ft=m(()=>n(j)?"volumeBar-slider-vertical":""),Bt=m(()=>n(j)&&!n(P)),lt=m(()=>n(j)?Ne:Wu),xt=m(()=>n(j)?fe:Wu),ii=m(()=>Math.round(n(ne)*100)),Pt=m(()=>`${Math.round(n(ne)*100)}%`),Ot=m(()=>n(j)?"volume-slider-vertical":"volume-slider");Wa(Nt,{get className(){return n(ft)},get isHidden(){return n(Bt)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:re,onWheelDown:_e,onPointerDown:pe,onHandleMove:$e,onPointerUp:J,get onPointerEnter(){return n(lt)},get onPointerLeave(){return n(xt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(ii)},get ariaValueText(){return n(Pt)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n(Ot)}}),S(Ie),D(Ft=>Fe=se(Ie,1,"volumeBar s-29",null,Fe,Ft),[()=>({"volumeBar-vertical":n(j)})]),b(ye,Ie)};R(Ae,ye=>{n(H)&&ye(ke)})}S(Be),D(ye=>it=se(Be,1,"volumeBar-container s-29",null,it,ye),[()=>({vertical:n(j)})]),at("mouseenter",Be,function(...ye){var Ie;(Ie=n(j)?k:Wu)==null||Ie.apply(this,ye)}),at("mouseleave",Be,function(...ye){var Ie;(Ie=n(j)?Ke:Wu)==null||Ie.apply(this,ye)}),at("wheel",Be,Z),b(t,Be),F(),o()}import{noop as Sx}from"@vkontakte/videoplayer-shared/es2015";var xx=Ce('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),wx=Ce('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function vm(t,e){let i=h(e,"isFullscreen",8,!1),o=Sn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=ce(l);{var s=f=>{var p=xx();b(f,p)},u=f=>{var p=wx();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Zd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,Sx),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));qt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=sa(u);a.set(f),o()()},get ariaKeyShortCut(){return ms.KeyF},role:"button",children:(u,f)=>{vm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var Cx=Ce('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function gm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=Cx();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(),S(o),b(t,o)}var Tx=Ce('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function hm(t,e){let i=kn(e,["$$slots","$$events","$$legacy","children"]);var o=Tx();io(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:gt}),ui(6),S(o),b(t,o)}var Ix={hash:"s-2a",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function _m(t,e){B(e,!0),Q(t,Ix);let i=h(e,"short",3,!1),o=h(e,"isCyrillic",3,!0),r=h(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),s=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`0 0 ${n(d)} 24`);hm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),F()}function Jd(t,e){B(e,!0);let[i,o]=Re(),r=()=>x($,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(g,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),f=Mt(),p=ve(),v=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,g=p.isCyrillicRelatedInterface$,w=m(()=>f.logoType!=="vk"),I=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),C=m(()=>(r()&&Rs(a(),"m")||Rs(a(),"l"))&&n(w)),N=()=>{var P,q;e.click(),(P=p.callbacks)!=null&&P.onLogoClicked?(q=p.callbacks)==null||q.onLogoClicked():u()&&window.open(u(),"_blank")},L=m(()=>!s()),E=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");qt(t,{className:"btn-full-opacity",get disabled(){return n(L)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(P){d(P)},children:(P,q)=>{var H=Le(),z=ce(H);{var j=X=>{_m(X,{get logo(){return f.logoType},get short(){return n(C)},get isCyrillic(){return l()}})},ae=X=>{gm(X,{})};R(z,X=>{n(w)?X(j):X(ae,!1)})}b(P,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as Ax}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as X_}from"@vkontakte/videoplayer-core/es2015";var Ex=Ce('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-18"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-18"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-18"></path>',1),Px=Ce('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),kx={hash:"s-18",code:".animated.s-18{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-18{animation-name:s-18-wave1}.wave2.animated.s-18{animation-name:s-18-wave2}.wave3.animated.s-18{animation-name:s-18-wave3}@keyframes s-18-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-18-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-18-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function ec(t,e){B(e,!0),Q(t,kx);let i=h(e,"isMobile",3,!1),o=m(()=>e.iconState===X_.CONNECTED),r=m(()=>e.iconState===X_.CONNECTING),a=m(()=>n(o)?"#2688EB":ia),l=m(()=>e.size?un(e.size):void 0);var d=Le(),s=ce(d);{var u=p=>{Ze(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,$)=>{var y=Ex();ui(2),b(v,y)},$$slots:{default:!0}})},f=p=>{Ze(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,$)=>{var y=Px(),g=ce(y);let w;var I=A(g);let C;var N=A(I);let L;var E=A(N);let P;var q=A(E);let H;D((z,j,ae,X,ne)=>{w=se(g,0,"wave2 s-18",null,w,z),C=se(I,0,"wave3 s-18",null,C,j),L=se(N,0,"wave1 s-18",null,L,ae),P=se(E,0,"s-18",null,P,X),H=se(q,0,"s-18",null,H,ne)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}import{noop as Lx}from"@vkontakte/videoplayer-shared/es2015";function tc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Lx),l=ve().ui.t,d=m(()=>e.state===Ax.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));qt(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{ec(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as Vx}from"@vkontakte/videoplayer-shared/es2015";var Mx=Ce('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function bm(t){Ze(t,{testId:"episodes-icon",children:(e,i)=>{var o=Mx();ui(2),b(e,o)},$$slots:{default:!0}})}var Ku=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Rx=M('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),Nx=M('<span class="text s-23"> </span>'),Ox=M('<span class="text count s-23"> </span>'),Dx=M('<span class="icon s-23"><!></span> <!>',1),Bx={hash:"s-23",code:".icon.s-23{flex-shrink:0}.text.s-23{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-23{overflow:visible}.text.mobile.s-23{padding:0 3px 0 4px}.chevron-episodes.s-23{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function ic(t,e){var ee,we,pe;B(e,!0),Q(t,Bx);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x(g,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),f=h(e,"timeCodes",19,()=>[]),p=ve(),v=(we=(ee=p.callbacks)==null?void 0:ee.onEpisodeChanged)!=null?we:Vx,$=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,g=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,I=p.ui.isMobile,C=p.ui.t,N=K(void 0),L=re=>{var $e,J,Ne;if(!!(($e=p.callbacks)!=null&&$e.onEpisodeClicked)){let fe=sa(re);g.set(fe),w.set(!0),(Ne=(J=p.callbacks)==null?void 0:J.onEpisodeClicked)==null||Ne.call(J,fe)}},E=K(null),P=m(()=>s()/u());Oe(()=>{var _e;let re=Ku(n(P),u(),f());re?((_e=n(E))==null?void 0:_e.time)!==re.time&&(v(re),O(E,re,!0)):O(E,null)});let q=m(()=>{var re;return((re=n(E))==null?void 0:re.text)||""}),H=m(()=>oo(r(),"xl")?"FULL":oo(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${C("tooltip_episodes")}: ${n(q)}`),j=(re,_e,$e)=>vt(null,null,function*(){yield vo(),(re==null?void 0:re.getAttribute("aria-expanded"))==="false"&&_e&&!$e&&Ct(()=>{g.set(!1),re.focus()})});Oe(()=>{j(n(N),a(),l())});var ae=Le(),X=ce(ae);{var ne=re=>{let _e=m(()=>d()?"px-0":""),$e=m(()=>!$);qt(re,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:L,get disabled(){return n($e)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(J){O(N,J,!0)},children:(J,Ne)=>{var fe=Le(),k=ce(fe);{var Ke=Z=>{var ie=Rx(),De=ce(ie),Be=T(De,!0);S(De);var it=A(De,2),U=T(it);Rr(U,{direction:"right"}),S(it),D(()=>me(Be,n(q))),b(Z,ie)},Te=Z=>{var ie=Dx(),De=ce(ie),Be=T(De);bm(Be,{}),S(De);var it=A(De,2);{var U=ke=>{var ze=Nx(),tt=T(ze,!0);S(ze),D(()=>me(tt,n(q))),b(ke,ze)},Ae=(ke,ze)=>{{var tt=ye=>{var Ie=Ox(),Fe=T(Ie,!0);S(Ie),D(()=>me(Fe,f().length)),b(ye,Ie)};R(ke,ye=>{n(H)==="COUNT"&&ye(tt)},ze)}};R(it,ke=>{n(H)==="FULL"?ke(U):ke(Ae,!1)})}b(Z,ie)};R(k,Z=>{d()?Z(Ke):Z(Te,!1)})}b(J,fe)},$$slots:{default:!0}})};R(X,re=>{n(E)&&re(ne)})}b(t,ae),F(),o()}import{debounceFn as mb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Gx,PlaybackState as zl,Player as Yx,PredefinedQualityLimits as _s,VideoFormat as nc,clientChecker as ob}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as $r,getHighestQuality as jx,InterfaceLanguage as Xx,isInvariantQuality as Zx,isNonNullable as Jx,loadVKLangPack as e2,Logger as t2,map as nb,merge as i2,Observable as Zu,Subject as Wl,Subscription as Cm,TracerFactory as o2,ValueSubject as n2,VideoQuality as r2,devNull as s2,now as a2,filter as l2,once as d2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Os}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Fx,devNull as si,isNonNullable as Hx,now as ai}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Ux,Subject as pn,clearVideoElement as zx}from"@vkontakte/videoplayer-shared/es2015";var Wx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",qu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new pn,loadStarted$:new pn,loadEnded$:new pn,loadError$:new pn,ready$:new pn,slotRequested$:new pn,started$:new pn,timeRemained$:new pn,paused$:new pn,resumed$:new pn,ended$:new pn,empty$:new pn,skipped$:new pn,clicked$:new pn,closed$:new pn,error$:new pn};this.loadAdman=e=>(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ai()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ai()]}),o())};Ux(Wx,e,this.loadTimeout).then(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ai()]}),window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ai()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ai()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ai()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ai()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ai()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ai()]}),!d&&(window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ai()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ai()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ai(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?ge(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ai()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ai()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),si.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ai()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return vt(this,null,function*(){var N,L;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ai(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:f,externalApi:p}=e;this.externalApi=p;let v,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?v=$:v=parseInt($,36));let{isEmbed:y,immediateOrigin:g}=Fx(),w=(N=y?g:window.location.href)!=null?N:window.location.href,I=Ee(Gt(Ee(Gt(Ee({},s),{dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o}),v?{request_id:v}:{}),{duration:f}),u);I=Object.fromEntries(Object.entries(I).filter(([E,P])=>Hx(P)));let C={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:I,browser:{mobile:!1}};try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),(L=this.externalApi)!=null&&L.videoGetAds){let P=yield this.safeExternalCall(this.externalApi.videoGetAds,I);P&&(delete C.slot,delete C.params,Object.assign(C,{json:P}))}E.init(C),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(C)}`})}catch(E){si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ai()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ai()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adsState){this.log({message:"toggle play"});let i=ge(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ai()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,f,p,v;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ai()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&zx(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return vt(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var Z_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var $m=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Qu,{startTime:f,endTime:p}=u.parse(s);l.startTime=f,l.endTime=p}else if(s.trim()!==""){let u=new ym,{texts:f}=u.parse(s);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Qu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},ym=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((f,p)=>{let v=l.indexOf(p,d);return f===-1||f>v?v:f},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Qu;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},J_=$m;import{isNonNullable as xm}from"@vkontakte/videoplayer-shared/es2015";var Ka,Ri,wm=0,Sm=!1,eb="",tb=(t,e=0,i=0)=>t<e&&t<i,Gu=(t,e=0,i=0)=>t>=e&&t<=i,Kx=(t,e=0,i=0)=>t>e&&t>i,ib=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:f})=>Gu(t,u,f));let a=t>=wm,l=t<wm;if(wm=t,l&&(Sm=!1),xm(Ka)&&Gu(t,Ka.startTime,Ka.endTime)&&eb===e.value)return Ka;if(!xm(Ri)&&(r!=null&&r.length)&&!Sm){Ri=r.find(({startTime:u,endTime:f})=>Gu(t,u,f)||a&&tb(t,u,f)),Ka=void 0,!xm(Ri)&&r[r.length-1].endTime<t&&(Sm=!0);return}else{if(Gu(t,Ri==null?void 0:Ri.startTime,Ri==null?void 0:Ri.endTime))return Ka=Ri,Ri=void 0,eb=e.value,Ka;(a&&Kx(t,Ri==null?void 0:Ri.startTime,Ri==null?void 0:Ri.endTime)||l&&tb(t,Ri==null?void 0:Ri.startTime,Ri==null?void 0:Ri.endTime))&&(Ri=void 0)}};var Yu={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},qx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},oc=t=>{var e,i;return(i=(e=Yu[t])!=null?e:Yu[qx[t]])!=null?i:void 0};import{Subscription as Qx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var ju=class{constructor(e,i,o,r=new Qx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Xu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Xu||{});var hs=t=>t!=null?t:0,Ns=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(hs(i==null?void 0:i.top)-hs(o==null?void 0:o.top)),left:Math.round(hs(i==null?void 0:i.left)-hs(o==null?void 0:o.left)),bottom:Math.round(hs(i==null?void 0:i.bottom)-hs(o==null?void 0:o.top)),right:Math.round(hs(i==null?void 0:i.right)-hs(o==null?void 0:o.left))}},Hl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:hs(e==null?void 0:e.width),height:hs(e==null?void 0:e.height)}};var Ln="off";var Ul=t=>!!(Math.round(Math.abs(t)/90)%2);var rb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:$,player:y,disabledControls:g,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:C,replayInteractive:N,stopPlayer:L,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,additionalButtons:q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:j,playNextVideo:ae,onVideoChanged:X,looped:ne=!1,statistics:ee,saveRate:we,internalsExposure:pe,playerView:re,playerId:_e})=>{var Gv,Yv,jv;let $e=Gt(Ee({},$),{configName:[...(Gv=$.configName)!=null?Gv:[],"ui"],isAudioDisabled:l,live:Gt(Ee({},(Yv=$.live)!=null?Yv:{}),{isLiveCatchUpMode:!!r})}),J=v,Ne=o2.createRootTracer(J.features.tracer),fe=Ne.createComponentTracer("Store"),k=y||new Yx($e,Ne,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});pe==null||pe.expose({corePlayer:k});let Ke=new t2,Te=new qu(Ke,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),Z=Na.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,De=u==null?void 0:u.annotationsApi,Be=u==null?void 0:u.slotsApi,it=u==null?void 0:u.focusManager,U=Ke.createComponentLog("Store"),Ae,ke,ze={},tt=new $u,ye=new Cm,Ie="",Fe=de(!1),Nt=ee&&ee.oneStat?ri(ee.oneStat.vsid$):Vr(void 0),ft=de(oa()),Bt=de(!1),lt=()=>I_(document,ob.device.isIOS),xt=(jv=ie==null?void 0:ie.info.isActive$)!=null?jv:new n2(!1),ii=de(0),Pt=de(!1),Ot=de(!1),Ft=de([]),Y=i2(k.events.fatalError$,k.events.managedError$).subscribe(c=>Ft.update(_=>[..._,c])),Se=Vr(!1,c=>{let _=k.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),le=c=>vt(null,null,function*(){var oe;let _=Object.values(Xx).includes(c);if(J.downloadVKLanguages&&(_&&J.updateBuiltinLanguages||!Of(c))){let xe;try{xe=yield e2(c,Oh,Dh)}catch(je){(oe=ee==null?void 0:ee.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),Z==null||Z.report(je,{errorType:"VKLangPack",fatal:!1})}xe&&(Nf({language:c,pack:xe,fallback:J.defaultLanguage}),he.set(c),Ve.update(je=>je+1))}Of(c)&&he.set(c)}),he=de(t),Ve=de(0),rt=de(e);le(t);let pt=(c,_)=>{let V=ge(he);return Df(V,c,_,J.defaultLanguage)},ue=de("thumb");ue.subscribe(c=>{c==="ads"&&k.info.playbackState$.getValue()&&dt()});let We=(()=>{let c=mi([Se,ue],([_,V])=>_?"crashed":V);return Gt(Ee({},c),{is:_=>ge(c)===_})})(),Ge=de(),dt=()=>{Ge.set({muted:k.info.muted$.getValue()})},Ht=(()=>{let c=de(new Set(g));return Gt(Ee({},c),{add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(xe=>!_.includes(xe)):oe.filter(xe=>xe!==_))})},includes:_=>{let V=ge(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}})})(),Ut=de({width:0,height:0}),oi=null,_i=k.info.isBuffering$,Yi=Vr(_i.getValue(),c=>{let _=_i.subscribe(V=>{V&&oi===null?oi=window.setTimeout(()=>{c(_i.getValue()),oi=null},J.loaderDelay):c(V)});return()=>{_.unsubscribe(),oi&&clearTimeout(oi)}});fe.log("create store"),U({message:"create store"});let Vt=c=>{let _=c.container,V=()=>{ei=new MutationObserver(xe=>{let{removedNodes:je}=xe[0];je.length&&_.append(k.experimental.element$.getValue())}),ei.observe(_,{childList:!0})},oe=k.experimental.element$.getValue();if(oe)_.append(oe),V();else{let xe=k.experimental.element$.pipe(l2(je=>!!je),d2()).subscribe(je=>{_.append(je),V()});ye.add(xe)}},fi=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),w?Vt(c):(s2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[a2()]}),k.initVideo(c)),fe.log("init video",{isInteractive:w}),c.subtitles&&k.setExternalTextTracks(c.subtitles),Ae=c,Ie=c.subtitlesForcedLanguage||""},vi=new Wl,ht=c=>vi.next(c),Zt=new Wl,yi=new Wl,ji=new Wl,ei=null,Tt={actionRewind$:Zt,actionSeek$:yi,inPiP$:xt,inFullscreen$:new Zu(c=>ft.subscribe(_=>c.next(_))),actionSetSubtitle$:ji,nextMovie$:vi},qe=new Wl,bi=new Wl,wo={actionSeek$:yi,actionSubtitlesSwitched$:qe,actionQuality$:bi,playerSize$:new Zu(c=>Ut.subscribe(_=>c.next(_))),inPiP$:xt,inFullscreen$:new Zu(c=>ft.subscribe(_=>c.next(_))),isLoaderVisible$:new Zu(c=>Yi.subscribe(_=>c.next(_)))};if(ee){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=ee;c&&(w||oe.add(c.attachTo(k)),oe.add(c.attachToUi(Tt)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(xe=>{U({message:`onestat auth error ${String(xe)}`})}),V&&V.attachTo(k)),_&&(oe.add(_.attachTo(k,Te.events)),oe.add(_.attachToUi(wo)),oe.add(_.attachToAds(Te.events)),_.updateContext({isMobile:ge(Fe)}),_.authorize(a))}if(Z){let c=new Cm,_=(V,oe)=>c.add(V.subscribe(oe));if(_(k.events.managedError$,V=>{Z.logIError(V)}),_(k.events.fatalError$,V=>{Z.logIError(V,!0)}),ee){let{oneStat:V}=ee;V&&_(V.experimental.error$,oe=>{Z.logIError(oe)})}Z.sentrySubscription.add(c)}let Ro=()=>{if(ob.device.isIOS&&ke)try{E_(ke)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(k.experimental.element$.subscribe(c=>{c&&(ke=c,c.classList.add("player-media"),Da(ie)&&ie.updateVideoElement(),w&&c.setAttribute("pip","false"),(re==="preview"||!J.features.pip&&!J.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(k.events.ended$.subscribe(()=>{var c;Ro(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(k.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(k.events.started$.subscribe(()=>vt(null,null,function*(){var _,V;Da(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=k.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=ze.onStarted)==null||V.call(ze,c)}))).add(k.events.willSeek$.subscribe(({from:c,to:_})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,_)})).add(k.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(k.info.position$.subscribe(c=>{var V;let _=k.info.duration$.getValue();isFinite(_)&&_>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,_,c),Te.setPosition(c,_))})).add(k.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(k.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(k.events.loadedMetadata$.subscribe(()=>{Pt.set(!0)})).add(k.info.is3DVideo$.subscribe(c=>{Ot.set(c)})).add(k.info.isEnded$.subscribe(c=>{w&&(c?(C!=null&&C.getValue()&&Ht.add(Ld),Ht.add("PLAY_BUTTON")):Ht.remove("PLAY_BUTTON"))})).add(k.info.liveTime$.subscribe(c=>{var _;(_=s==null?void 0:s.onLiveTime)==null||_.call(s,c)})).add(k.info.isStalled$.subscribe(c=>{var _;(_=s==null?void 0:s.onStalledChanged)==null||_.call(s,c)})).add(k.info.isLiveEnded$.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onLiveEnded)==null?void 0:_.call(s))})).add(Te.events.loadStarted$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:_.call(c)})).add(Te.events.loadEnded$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:_.call(c)})).add(Te.events.loadError$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:_.call(c)})).add(Te.events.init$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:_.call(c)})).add(Te.events.ready$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:_.call(c)})).add(Te.events.started$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onStarted)==null?void 0:V.call(_,c)})).add(Te.events.timeRemained$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onTimeRemained)==null?void 0:V.call(_,c)})).add(Te.events.ended$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onCompleted)==null?void 0:V.call(_,c)})).add(Te.events.empty$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:_.call(c)})).add(Te.events.clicked$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClicked)==null?void 0:V.call(_,c)})).add(Te.events.closed$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClosed)==null?void 0:V.call(_,c)})).add(Te.events.error$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onError)==null?void 0:V.call(_,c)})).add(Te.events.paused$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:_.call(c)})).add(Te.events.resumed$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:_.call(c)}));let No=new Cm,wt=()=>{var je,Et,Wt;let{debugLog:c}=J,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Xt}=c;_=c.tag,V=(je=Xt==null?void 0:Xt[0])!=null?je:V,oe=(Wt=(Et=Xt==null?void 0:Xt[1])!=null?Et:Xt==null?void 0:Xt[0])!=null?Wt:oe}let xe=_?`: ${_}`:"";No.add(k.events.log$.subscribe(Xt=>{console.debug(`%c sdk${xe} `,`background:${V};`,`sdk component: ${Xt.component}`,Xt.message)})).add(Ke.log$.subscribe(Xt=>{console.debug(`%c ui${xe} `,`background:${oe};`,`ui component: ${Xt.component}.`,Xt.message)}))},zt=()=>{No.unsubscribe()},W=(c,_)=>{fe.log("start camera manual rotation",{mx:c,my:_}),k.startCameraManualRotation(c,_)},kt=(c=!1)=>{fe.log("stop camera manual rotation",{immediate:c}),k.stopCameraManualRotation(c)},li=(c,_,V)=>{fe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),k.moveCameraFocusPX(c,_,V)},ct=()=>{k.holdCamera()},St=()=>{k.releaseCamera()},Yt=Vr(k.info.position$.getValue(),c=>{let _,V,oe=()=>{let xe=k.info.playbackState$.getValue(),je=k.info.isLive$.getValue(),Et=k.info.duration$.getValue(),Wt=k.info.position$.getValue();if(xe&&[zl.PLAYING,zl.PAUSED].includes(xe)){let Xt=je?Wt-Et:k.getExactTime();Xt!==V&&c(Xt),V=Xt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),nt=ri(k.info.playbackState$),Hi=ri(k.info.isBuffering$),Ui=mi([nt,Hi],([c,_])=>_?"buffering":c),en=ri(k.info.currentBuffer$),Oo=ri(k.info.isEnded$),ro=ri(k.info.isLive$),Vi=J.features.playbackRate?ri(k.info.canChangePlaybackSpeed$):Vr(!1),Or=ri(k.info.liveBufferTime$),go=ri(k.info.volume$),ho=ri(k.info.muted$),Ai=yu(k.info.predefinedQualityLimitType$.pipe(nb(c=>c===_s.TRAFFIC_SAVING)),k.info.predefinedQualityLimitType$.getValue()===_s.TRAFFIC_SAVING),tn=yu(k.info.predefinedQualityLimitType$.pipe(nb(c=>c===_s.HIGH_QUALITY)),k.info.predefinedQualityLimitType$.getValue()===_s.HIGH_QUALITY),Do=ri(k.info.autoQualityLimitingAvailable$),Mn=ri(k.info.availableQualities$),yr=ri(k.info.availableQualitiesFps$),xr=ri(k.info.chromecastState$),$s=ri(k.info.chromecastDeviceName$),is=ri(k.info.currentFormat$),os=ri(k.info.throughputEstimation$),Jn=ri(k.info.videoBitrate$),Dr=ri(k.info.intrinsicVideoSize$),on=ri(k.info.duration$),Vn=ri(k.info.isAudioAvailable$),wr=()=>{oi&&clearTimeout(oi),oi=null},Bo=mi([on,ro],([c,_])=>_?-c:c),er=mi([nt],([c])=>c===zl.PLAYING),tr=ri(k.info.atLiveEdge$),Br=ri(k.info.atLiveDurationEdge$),ir=ri(k.info.position$),so=mi([ir,on],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),Fr=mi([xr],([c])=>c===Gx.CONNECTED),or=ri(k.info.availableVideoStreams$),mn=J.features.audioLanguages?ri(k.info.availableAudioStreams$):Vr([]),_o=ri(k.info.currentVideoStream$),Sr=ri(k.info.currentAudioStream$),nr=c=>{c.language&&Lf(c.language),k.setVideoStream(c)},mt=(c,_)=>{k.setAudioStream(c),sn(_)&&(c.language&&Lf(c.language),J.features.userVideoPrefs&&i&&Rf(J.userSalt,String(i),{audioTrackId:c.id}))},di=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(oe=>"isDefault"in oe&&oe.isDefault)),J.features.userVideoPrefs&&i){let oe=Tu(J.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let xe=c.find(je=>je.id===oe.audioTrackId);_=xe!=null?xe:_}}let V=c_();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},Hr=c=>{fe.log("change audio stream",{id:c});let _=k.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&mt(_,!0)},rr=!1;ye.add(k.info.availableAudioStreams$.subscribe(c=>{if(!rr&&c.length){let _=di(c);_&&(k.setAudioStream(_),rr=!0)}})),mn.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:V="",id:oe="",language:xe=""})=>({label:V,language:xe,id:oe})))}),Sr.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let Ur=!1;ye.add(k.info.availableVideoStreams$.subscribe(c=>{if(!Ur&&c.length){let _=di(c);_&&(k.setVideoStream(_),Ur=!0)}}));let Fo=de(void 0),Rn=ri(k.info.isAutoQualityEnabled$,c=>c&&Fo.set(void 0)),vn=ri(k.info.currentQuality$,()=>Fo.set(void 0)),nn=mi([Fo,vn],([c,_])=>c!=null?c:_),gn=mi(is,c=>c!==nc.MPEG),Cr=mi([Mn,yr,Rn,nn,gn],([c,_,V,oe,xe])=>{let je=[];xe&&je.push({value:"auto",displayValue:pt("auto_quality_option"),selected:V});let Et=c.filter(Wt=>!Zx(Wt));for(let Wt of Et){let Xt=_[Wt];je.push({value:Wt,displayValue:`${Wt}${Xt?Z_(Xt):""}`,selected:V?!1:Wt===oe})}return je}),Ho=ri(k.info.currentPlaybackRate$),Uo=mi([Ho,tr,Br],([c,_,V])=>{let oe=V||w?1:J.controls.playbackRateMin,xe=_?1:J.controls.playbackRateMax,je=J.controls.playbackRateStep,Et=[];for(let Wt=oe;Wt<=xe;Wt+=je)Et.push({value:Wt,displayValue:Wt===1?pt("playback_rate_1"):pt("playback_rate",{multiplier:Wt.toString(10)}),selected:c===Wt});return Et}),hn=()=>({displayValue:pt("subtitles_off"),value:Ln,language:""}),Tr=de(hn()),xi=mi([Tr,Ve],([c],_)=>{c.value===Ln?_(hn()):_(c)}),_n=J.features.subtitles?ri(k.info.availableTextTracks$):Vr([]),Nn=Zh(),sr=mi([_n,xi],([c,_],V)=>{var je;let oe=[],xe=c.find(({id:Et})=>Et===_.value);if(xe!=null&&xe.url){let[,Et]=(je=Nn.find(xe.url))!=null?je:[];if(Et){V(Et);return}tt.download(xe.url).then(Wt=>{if(!Wt||tt.isDestroyed())return;let Xt=new J_,qs=xe.language;if(qs){let s$=!!xe.isAuto,a$=Xt.parse(Wt,qs);oe.push({lang:qs,subtitles:a$,isAuto:s$,id:xe.id})}Nn.add(xe.url,oe),ge(xi).value===_.value&&V(oe)}).catch(Wt=>{var Xt;(Xt=ee==null?void 0:ee.oneStat)==null||Xt.logError({errorType:"Subtitles download",fatal:!1}),Z==null||Z.report(Wt,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),Ir=mi([Ho,er,xi],([c,_,V],oe)=>{let Et;if(k.info.isLive$.getValue()&&_&&V.value!==Ln){let Xt=()=>{let qs=1e3/(3*c);Et=setTimeout(Xt,qs),oe(Date.now())};return Xt(),()=>clearTimeout(Et)}}),On=mi([_n,xi],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:xe,id:je}of c){let Et=oe&&oc(oe);oe&&Et&&V.push({displayValue:xe?pt("subtitles_auto",{language:Et}):Et,value:je,selected:(_==null?void 0:_.value)===je,isAuto:xe,language:oe})}return V.length?(V.unshift(Gt(Ee({},hn()),{selected:(_==null?void 0:_.value)===Ln})),V):[]}),rn={available:[],prev:[]},$t=()=>{var _,V;let c=k.experimental.getCurrentTime$.getValue();return(V=(_=c==null?void 0:c())!=null?_:ke==null?void 0:ke.currentTime)!=null?V:0},It=mi([Yt,xi,sr,Ir],([c,_,V,oe])=>{var je;let xe=k.info.isLive$.getValue();if(xe&&rn.prev!==V){let Et=V.find(({id:Xt})=>Xt===_.value),Wt=rn.prev.find(({id:Xt})=>Xt===_.value);if(Et){let Xt=Gt(Ee({},Et),{subtitles:[...(je=Wt==null?void 0:Wt.subtitles)!=null?je:[],...Et.subtitles]});rn.available=[Xt],rn.prev=V}}if(_&&_.value!==Ln){let Et=xe?$t():c,Wt=xe?rn.available:V;return ib(Et,_,Wt,xe)}}),ao=mi([It],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(xi.subscribe(c=>{var _,V;if(c.value===Ln)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(Yu).find(([xe,je])=>je===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let So=de(!0),Co=mi([en,Bo,ir,Or],([c,_,V,oe])=>{var Wt;let xe=(Wt=c==null?void 0:c.end)!=null?Wt:0;if(!oe)return xe/_;let Et=-V+oe-_;return(xe-Et)/_}),lo=ri(k.info.availableSources$),Ni=mi([lo],([c])=>Object.keys((c==null?void 0:c[nc.MPEG])||{}).length>0),Dn=()=>{var V,oe,xe;let c=Object.keys(((oe=(V=k.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[nc.MPEG])||{}),_=jx(c)||r2.Q_144P;return(xe=Ae.sources[nc.MPEG])==null?void 0:xe[_]},Xi=()=>{var _;let c=Dn();if(c)fe.log("download video",{url:c}),Yh(c,((_=Ae==null?void 0:Ae.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";fe.log("download video",{message:V}),U({message:V})}},zr=()=>{U({message:"toggle muted"});let c=k.info.muted$.getValue();k.info.volume$.getValue()===0&&!c?ar(Er(),!1):To(!c,!1)},Li=()=>{var c;if(Qt.ui.settingsMenu.visible$.set(!1),!ge(Qt.ui.settingsSubMenu.visible$)){let _=ge(Qt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let oe=Hl(_),xe={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:xe,name:"settings"})}}fe.log("close settings menu")},ys=(c,_=()=>Promise.resolve())=>vt(null,null,function*(){var xe;Qt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Qt.ui.settingsMenu.visible$.set(!0),yield _();let V=ge(Qt.ui.settingsMenu.ref$),oe=ll();if((xe=s==null?void 0:s.uiInfo)!=null&&xe.onSettingsMenu&&V&&oe){let Et=Hl(V),Wt=Ns(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Et,position:Wt,name:"settings"})}fe.log("open settings menu",{wasOpenedByKeyboard:c})}),ns=(c,_=!1)=>{var je;Qt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Qt.ui.settingsMenu.ref$),oe=ll(),xe=ge(Qt.ui.settingsMenu.visible$);if((je=s==null?void 0:s.uiInfo)!=null&&je.onSettingsMenu&&V&&oe)if(xe&&!_){let Wt=Hl(V),Xt=Ns(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Wt,position:Xt,name:"settings"})}else{let Wt=Hl(c),Xt={top:0,left:0,bottom:0,right:0},qs=ge(Qt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Wt,position:Xt,name:qs})}fe.log("close settings sub menu")},rs=(c,_)=>{var oe;Qt.ui.settingsSubMenu.visible$.set(!0),Qt.ui.settingsSubMenu.ref$.set(_),Qt.ui.settingsSubMenu.name$.set(c);let V=ll();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let je=Hl(_),Et=Ns(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:je,position:Et})}fe.log("open settings sub menu",{name:c})},Er=()=>{var _;let c=Math.max(J.volumeMinRestore,(_=xu())!=null?_:0);return c===0?J.volumeDefault:c},sn=c=>{let _=J.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},ar=(c,_)=>{let V=c===0?Er():c,oe=k.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let xe=!l||We.is("ads");oe&&c>0&&xe&&(oe=!1,sn(_)&&kf(!1)),k.setVolume(c,oe),Te.setVolume(c),sn(_)&&Tf(V)},To=(c,_)=>{let V=k.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=We.is("ads");if(k.setMuted(c,oe),Te.setVolume(c?0:V),sn(_)&&(!oe||!c)&&kf(c),!c&&V===0){let xe=Er();k.setVolume(xe),sn(_)&&Tf(xe),Te.setVolume(xe)}},Io=de(!1),lr=c=>{var _,V;fe.log("set looped",{isLooped:c}),Io.set(c),k.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};lr(ne);let Ue=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},At=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),fe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Qt.ui.autoplayNextEnabled$.set(c),f_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},wi=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),fe.log("set timer next video running",{timerNextVideoRunning:c}),Qt.ui.timerNextVideoRunning$.set(c)},zo=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{_=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}X(!0),_&&j()},co=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onNextVideoClick))try{_=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}X(!1),_&&ae()},Eo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},uo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Wo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Bn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},an=()=>{k.prepare()},bo=()=>{$r(Qt);let c=ge(Qt.ui.controls.disabledControls$),_=ge(Qt.playerPhase),V={playerPhase:_,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),_==="ads"){V.action="play",fe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var je;U({message:"toggle play, call player.play"}),V.action="play",k.play(),(je=s==null?void 0:s.onPlay)==null||je.call(s)},xe=()=>{var je;U({message:"toggle play, call player.pause"}),V.action="pause",k.pause(),(je=s==null?void 0:s.onPause)==null||je.call(s)};if(k.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Zt.next(),yi.next(Os.REWIND),w){N==null||N();return}k.seekTime(0),oe()}else k.info.playbackState$.getValue()!==zl.PLAYING?oe():xe();fe.log("toggle play",V)},Zi=(c,{changeReason:_="default",appliesTo:V="to-video",byUser:oe=!1}={},xe)=>{U({message:`set quality, quality: ${c}`}),fe.log("set quality",{quality:c}),oe&&bi.next(c),k.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:je}=J.features;wu(),c!=="auto"?(je?(Su({type:"exact_quality",quality:c,videoId:i},V),k.setPredefinedQualityLimits(_s.UNKNOWN)):If(i,c),Fo.set(c),k.setQuality(c)):je&&_==="default"&&(Pr("auto_quality",V,xe),ge(Ai)&&Fn(!1,void 0,xe),ge(tn)&&Hn(!1,void 0,xe))},Fn=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),fe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?_s.TRAFFIC_SAVING:_s.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(Un(oe,_,V),Vd(!1)):(k.setPredefinedQualityLimits(oe),sn(V)&&Vd(c))},Hn=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),fe.log("set high quality enabled",{highQualityEnabled:c}),Un(c?_s.HIGH_QUALITY:_s.UNKNOWN,_,V)},Un=(c,_,V)=>{c!==_s.UNKNOWN&&(ge(Do)&&!ge(Rn)&&Zi("auto",{appliesTo:_,changeReason:"limit-changed"},V),Pr(c,_,V)),k.setPredefinedQualityLimits(c)},Pr=(c,_,V)=>{sn(V)&&(Su({type:c,videoId:i},_),_==="as-default"&&Su({type:c,videoId:i},"to-video"))},dr=(c,_=!0)=>{fe.log("set playback rate",{playbackRate:c}),k.setPlaybackRate(c),J.features.saveRate&&we&&!k.info.isLive$.getValue()&&_&&u_(c)},xs=()=>{let c=ge(Vi),_=ge(Uo),V=_.findIndex(({selected:xe})=>xe);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return dr(oe.value),oe},Je=()=>{let c=ge(Vi),_=ge(Uo),V=_.findIndex(({selected:xe})=>xe);if(V===0||!c)return _[V];let oe=_[V-1];return dr(oe.value),oe},jt=(c=Gt(Ee({},hn()),{selected:!1}),_)=>{fe.log("set subtitles",Ee({},c)),c.value!==Ln&&ji.next(c.isAuto?c.value+"_auto":c.value),qe.next({enabled:c.value!==Ln,lang:c.language,auto:!!c.isAuto}),Tr.set(c),sn(_)&&(Vf(c.value===Ln?void 0:c.language),J.features.userVideoPrefs&&i&&Rf(J.userSalt,String(i),{subtitleTrackId:c.value===Ln?void 0:c.value}))},Ti=c=>{fe.log("toggle subtitles");let _=ge(xi);(_==null?void 0:_.value)===Ln?Ko(c):Wr(c)},$o=(c,_)=>{fe.log("change subtitle",{enabled:c}),c?Ko(!0,_):Wr(!0)},Ko=(c,_)=>{fe.log("subtitle on");let V=ge(On),oe=ge(he),xe=Ie!=null?Ie:oe,je;_&&(je=V.find(Et=>Et.value===_)),je!=null||(je=V.filter(Et=>Et.value!==Ln).find(Et=>Et.language===xe)),jt(je!=null?je:V[1],c)},Wr=c=>{fe.log("subtitle off"),jt(void 0,c)};ye.add(k.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:xe,isAuto:je,id:Et}of c){let Wt=xe&&oc(xe);xe&&Wt&&oe.push({id:Et,language:xe,title:je?pt("subtitles_auto",{language:Wt}):Wt})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let Po=de(!0),cr=c=>{Po.set(c)},zn=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),fe.log("seek to time",{time:c,action:_,forcePrecise:V}),yi.next(_),k.info.isLive$.getValue()){let xe=k.info.duration$.getValue(),je=Math.min(0,xe+c);k.seekTime(je,V)}else{if(C!=null&&C.getValue())return;k.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),k.seekTime(Kv(c),V)}},ua=c=>{U({message:`seek to episode start time: ${c}`}),fe.log("seek to episode start time",{time:c}),zn(c,Os.EPISODE,!0)},Us=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),fe.log("seek to percent",{percent:c,action:_});let oe=ge(Bo)*c;zn(oe,_,V)},zs=c=>{U({message:`seek external, time: ${c}`}),fe.log("seek external",{time:c}),yi.next(Os.UNKNOWN),k.seekTime(k.info.isLive$.getValue()?-c:c)},bn=c=>{var oe,xe;let _=(oe=c.max)!=null?oe:"none",V=(xe=c.min)!=null?xe:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),fe.log("set auto quality limits",{max:_,min:V}),k.setAutoQualityLimits(c)},st=c=>{U({message:`seek external to episode start time: ${c}`}),fe.log("seek external to episode start time",{time:c}),zn(c,Os.EPISODE,!0)},pi=c=>{U({message:`set playback rate to: ${c}`}),fe.log("set playback rate external",{playbackRate:c}),k.setPlaybackRate(c)},Oi=de(!1),$n=de(!1),Kr=mi([Bo],([c])=>!!p&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!w),yn=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),be=mi([ii],([c])=>{let _=Ul(c);return yn?!_:_});ye.add(We.subscribe(c=>{c!=="video"&&Oi.set(!1)}));let yt=de(void 0),Dt=de(!1),ti=c=>{U({message:`start scrubbing, progress: ${c}`}),fe.log("start scrubbing",{progress:c}),Dt.set(!0),Ii(c)},Ii=c=>{yt.set(c)},Ei,Mi,Si=()=>{yt.set(void 0),Dt.set(!1)},ss=()=>{clearTimeout(Mi),clearTimeout(Ei),Ei=window.setTimeout(()=>{Si()},500),ke==null||ke.removeEventListener("seeked",ss)},Ws=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),fe.log("complete scrubbing",{progress:c}),Us(c,Os.SLIDER,_),ge(Qt.ui.isMobile)&&ge(Qt.state.currentFormat$)===nc.HLS?(ke==null||ke.addEventListener("seeked",ss),Mi=window.setTimeout(()=>{ss()},300)):Si()},ol=mi([Yt,Bo,yt],([c,_,V],oe)=>{oe(Jx(V)?V*_:c)}),pa=de(!1),fa=()=>{pa.set(!0)},as=()=>{pa.set(!1)},ws=mi([Ut],([{width:c}],_)=>{let V=Y_(c);_(V)}),ma=q.filter(c=>jh(c)),va=mi([ws,Fe],([c,_])=>_?ma.filter(V=>!V.hideOnMobile):ma.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),xn=de(q.filter(c=>Xh(c))),Ss=mi([xn,ws],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),nl=mi([Ss,va],([c,_])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?_.map((V,oe)=>{var xe;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(xe=V.ariaLabel)!=null?xe:V.tooltip,tooltipText:V.tooltip}}):[]].filter(V=>!v.disabledAdditionalButtonIds.includes(V.id))),ur=de(H),Zl=mi([ur],([c])=>J.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?Gt(Ee({},_),{onClick:_.onChangeEnabled}):_):[]),rl=(c,_)=>{let V=ge(xn).map(oe=>oe.id!==c?oe:Ee(Ee({},oe),_));xn.set(V)},Jl=c=>{let _=ge(xn);if(_.some(V=>V.id===c.id)){U({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),xn.set(_)},ga=c=>{let _=ge(xn);if(!_.some(V=>V.id===c)){U({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),xn.set(_)},ed=c=>{yi.next(Os.LIVE),U({message:"live switch to low latency "+c}),fe.log("live switch to low latency "+c),k.setLiveLowLatency(c)},sl=(c,_)=>{let V=ge(ur).map(oe=>oe.id!==c?oe:Ee(Ee({},oe),_));ur.set(V)},al=c=>{let _=ge(ur);if(_.some(V=>V.id===c.id)){U({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),ur.set(_)},ha=c=>{let _=ge(ur);if(!_.some(V=>V.id===c)){U({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),ur.set(_)},ot=de(z),ut=mi([ot],([c])=>J.features.additionalContextMenuItems?c:[]),Ji=(c,_)=>{let V=ge(ot).map(oe=>oe.id!==c?oe:Ee(Ee({},oe),_));ot.set(V)},ko=c=>{let _=ge(ot);if(_.some(V=>V.id===c.id)){U({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),ot.set(_)},eo=c=>{let _=ge(ot);if(!_.some(V=>V.id===c)){U({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(V=>V.id!==c),ot.set(_)},gi=mi([Fe,Se],([c,_],V)=>{V(c&&_)}),zi=()=>{yi.next(Os.LIVE),U({message:"switch to active live"}),fe.log("switch to active live"),k.seekTime(0),k.info.playbackState$.getValue()!==zl.PLAYING&&Qt.actions.internal.togglePlay()},Ks=()=>{fe.log("skip adman"),Te.skip()},td=(c=!0)=>{var oe;$r(Qt),U({message:`switch from ads to video, callPlay: ${c}`}),fe.log("switch from ads to video",{callPlay:c}),ue.set("video"),c&&k.play(),l&&To(!0,!0);let _=(oe=ge(Ge))==null?void 0:oe.muted,V=!k.info.muted$.getValue();_!==void 0&&!V&&To(_,!0),Ge.set(void 0)},Vc=()=>{$r(Qt),U({message:"switch from video to ads"}),fe.log("switch from video to ads"),Qt.actions.internal.pause(),Ro(),ue.set("ads")},$p=c=>{$r(Qt);let _=c?"LiveWaitingStart":"thumb";fe.log("set live waiting start",{state:c,playerPhase:_}),ue.set(_)},Rc=c=>{$r(Qt);let _=c?"LiveWaitingRecover":"thumb";fe.log("set live waiting recover",{state:c,playerPhase:_}),ue.set(_)},yp=c=>{$r(Qt);let _=c?"LiveWaitingRecord":"thumb";fe.log("set live waiting record",{state:c,playerPhase:_}),ue.set(_)},Nc=()=>($r(Qt),fe.log("get debug text data"),Qh(k,Ae,Qt,Ne.getTraceId())),Oc=()=>($r(Qt),JSON.stringify(Ne.getFinishedSpans())),Dc=()=>($r(Qt),Gh(k,Ae,Qt)),ll=()=>ke,Bc=()=>{U({message:"toggle chromecast"}),fe.log("toggle chromecast"),k.toggleChromecast()},_a=c=>{var V;if($r(Qt),k.info.isEnded$.getValue())return;let _=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),fe.log("pause ads",{internalCall:_}),Te.pause();return}U({message:`pause video, internalCall: ${_}`}),fe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),k.pause()},ba=c=>{var V;$r(Qt);let _=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),fe.log("play ads",{internalCall:_}),Te.play();return}U({message:`play video, internalCall: ${_}`}),fe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),k.play()},xp=c=>{$r(Qt);let _=!c;if(ge(Qt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${_}`}),L==null||L()},id=(c,_)=>{$r(Qt),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),fe.log("first start",{showAds:c,external:_}),c?ue.set("ads"):(ue.set("video"),_?k.play():Qt.actions.internal.togglePlay())},od=()=>(U({message:"getting time codes"}),f),Fc=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let _=k.info.position$.getValue();return c.find(V=>V.time>_)},wp=c=>{let _=c;_||(_=Fc());let V=k.info.position$.getValue();fe.log("seek to next episode",Ee({currentTime:V},_)),_&&(U({message:"seek to next episode"}),zn(_.time,Os.EPISODE,!0))},He=()=>{let c=od();if(!c||[0,1].includes(c.length))return;let _=k.info.position$.getValue(),V=c.findIndex(xe=>xe.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},hi=c=>{let _=c;_||(_=He());let V=k.info.position$.getValue();fe.log("seek to prev episode",Ee({currentTime:V},_)),_&&(U({message:"seek to prev episode"}),zn(_.time,Os.EPISODE,!0))},qo=()=>(U({message:"getting preview thumbs data"}),fe.log("get preview thumbs data",Ee({},p)),p),kr=()=>vt(null,null,function*(){let c=ie==null?void 0:ie.isActive(),_="none";ie!=null&&ie.isActive()?(_="exit",yield ie==null?void 0:ie.exit()):(_="request",yield ie==null?void 0:ie.request()),fe.log("toggle picture in picture",{isActive:c,action:_})}),wn=(c=-90)=>{fe.log("rotate video",{alphaDiff:c}),ii.update(_=>_+c)},Hc=de([]);I==null||I.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,xe],subjects:je}=c[V];V===0&&oe!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:oe/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!je.length||je.every(Et=>Et.isRemoved):!je.length}),xe!==1/0&&_.push({time:xe/1e3,text:"",interactive:!1,completed:!0})}Hc.set(_)});let Zb=de(!1);C==null||C.subscribe(c=>{c&&ge(Dt)&&Si()});let Kv=c=>{if(!w)return c;let _=ge(Hc),V=ge(Bo),xe=ge(ir)/V,je=_.find(Et=>Et.interactive&&!Et.completed&&Et.time>xe);return typeof(je==null?void 0:je.time)=="number"?Math.min(c,je.time-.05):c},Jb=()=>{Qt.ui.episodes.panelOpened$.set(!1)},e$=()=>{fe.log("destroy store"),clearTimeout(Mi),clearTimeout(Ei),ye.unsubscribe(),No.unsubscribe(),k.destroy(),Te.destroy(),ee==null||ee.destroy(),Z==null||Z.destroy(),Y.unsubscribe(),ei==null||ei.disconnect(),ei=null,tt.destroy()},t$=mi([tr,We,Vi],([c,_,V])=>v.features.doubleForwardAvailable&&!c&&_==="video"&&V),Sp=de(!1),qv=2,Uc=null,Qv=c=>{if(!ge(er)&&c)return;let _=k.info.currentPlaybackRate$.getValue();c?_!==qv&&(Uc=_,dr(qv,!1),Sp.set(!0)):(Uc&&dr(Uc,!1),Sp.set(!1),Uc=null)};We.subscribe(c=>{c!=="video"&&Qv(!1)});let i$=()=>{_a(!1),Oi.set(!0)},o$=()=>{ba(!1),Oi.set(!1)},Cp=!1,n$=()=>{$n.set(!0),Cp=k.info.playbackState$.getValue()===zl.PLAYING,_a(!1)},r$=()=>{$n.set(!1),!ge(Oi)&&Cp&&ba(!1),Cp=!1};k.events.playing$.subscribe(()=>{ge(Oi)&&_a(!1)});let Qt={interfaceLanguage$:he,isCyrillicRelatedInterface$:rt,initVideo:fi,videoId:i,isClip:o,playerPhase:We,vsid:Nt,state:{positionExact$:Yt,positionWithScrubbing$:ol,duration$:Bo,playbackState$:nt,playbackStateRealistic$:Ui,isPlaying$:er,isLoaderVisible:Yi,bufferedProgress$:Co,isLive$:ro,canChangePlaybackSpeed$:Vi,isActiveLive$:tr,isOldestAvailableLive$:Br,isRewindableLive$:so,isEnded$:Oo,muted$:ho,volume$:go,trafficSavingEnabled$:Ai,highQualityEnabled$:tn,autoQualityLimitingAvailable$:Do,availableVideoStreams$:or,availableAudioStreams$:mn,videoStream$:_o,audioStream$:Sr,currentQuality$:nn,isAutoQualityEnabled$:Rn,availableQualities$:Cr,currentPlaybackRate$:Ho,availablePlaybackRates$:Uo,currentSubtitle$:xi,availableTextTracks$:_n,availableSubtitlesList$:On,currentSubtitleCaptions$:ao,isAutoSubtitleCaptionVisible$:So,chromecastState$:xr,chromecastDeviceName$:$s,chromecastConnected$:Fr,currentFormat$:is,throughputEstimation$:os,videoBitrate$:Jn,videoSize$:Dr,errorLog$:Ft,crashed$:Se,isAudioAvailable$:Vn,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:lo,hasMpegSources$:Ni,isInteractive:w,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Hc).length,interactiveEpisodes$:Hc,isInteractiveTime$:C?ri(C):de(!1),isInteractiveExpectation$:Zb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,looped$:Io,loadedMetadata$:Pt,isAutoQualityAvailable$:gn,previewTrackActive:Oi,previewTrackDragInProgress:$n},ui:{t:pt,controlsVisible:de(!1),touched:de(!1),controls:{prevButton:de(void 0),playButton:de(void 0),replayButton:de(void 0),nextButton:de(void 0),playPrevChapterButton:de(void 0),seekToInteractiveButton:de(void 0),interactiveGraphButton:de(void 0),liveButton:de(void 0),time:de(void 0),episodes:de(void 0),volume:de(void 0),subtitles:de(void 0),settings:de(void 0),context:de(void 0),chromecast:de(void 0),pip:de(void 0),fullscreen:de(void 0),vkLogo:de(void 0),interactiveTimeIndicator:de(void 0),timeline:de(void 0),autoplayNextToggle:de(void 0),additionalButtons:q.length?q.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:Ht},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:ft,isFullscreenOpenedByKeyboard:Bt,rotateAlpha:ii,isAutoplay:de(!1),debugPanelVisible:de(!1),episodes:{panelOpened$:de(!1),openedByKeyboard$:de(!1)},contextMenu:{visible$:de(!1),btnRef$:de(void 0),openedByBtnKeyboard$:de(!1),openedByHotKey$:de(!1),lastActiveElem$:de(void 0),showContextMenuBtn$:de(!1),position$:de({top:0,left:0})},playerSize:Ut,isMobile:Fe,mobileNotReportControlHidden$:gi,icon3DVideoVisible:de(!1),scrubbingInProgress:Dt,volumeChangingInProgress:pa,is3DVideo:Ot,currentGridType$:ws,additionalButtonsDeprecated$:va,additionalDesktopControlPanelRightButtons$:nl,additionalSettingsMenuItems$:Zl,additionalContextMenuItems$:ut,interactiveHideMobileControls:de(!1),overlayContainer$:de(void 0),startedByKeyboard$:de(!1),autoplayNextEnabled$:de(!1),timerNextVideoRunning$:de(!0),settingsMenu:{visible$:de(!1),ref$:de(void 0),openedByBtnKeyboard$:de(!1)},settingsSubMenu:{visible$:de(!1),ref$:de(void 0),name$:de(void 0)},userActionsDisabled:de(!1),hiddenControls:{volume:de(!1),vkLogo:de(!1),pip:de(!1),chromecast:de(!1),settings:de(!1)},isControlsAvailable:Po,controlBlocks:{topLeft:de(void 0),topRight:de(void 0),middle:de(void 0),bottom:de(void 0),bottomLeft:de(void 0),bottomRight:de(void 0)},videoTitleInfo:de(void 0),doubleForwardOn$:Sp,doubleForwardAvailable$:t$,previewTrackNotificationVisible:de(!1),previewTrackActive:Oi,previewTrackDragInProgress:$n,previewTrackAvailable:Kr,isPreviewTrackHorizontallyAligned:be},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Be,focusManager:it},actions:{internal:{preload:an,firstStart:c=>id(c,!1),play:()=>ba(!1),pause:()=>_a(!1),togglePlay:bo,toggleMuted:zr,openSettingsMenu:ys,closeSettingsMenu:Li,openSettingsSubMenu:rs,closeSettingsSubMenu:ns,setVolume:c=>ar(c,!1),setMuted:c=>To(c,!1),startVolumeChanging:fa,stopVolumeChanging:as,setVideoStream:nr,setAudioStream:c=>mt(c,!1),setQuality:(c,_)=>Zi(c,_,!1),setTrafficSavingEnabled:(c,_)=>Fn(c,_,!1),setHighQualityEnabled:(c,_)=>Hn(c,_,!1),setPlaybackRate:dr,incrementPlaybackRate:xs,decrementPlaybackRate:Je,setSubtitle:c=>jt(c,!1),toggleSubtitle:()=>Ti(!1),togglePictureInPicture:kr,startScrubbing:ti,progressScrubbing:Ii,completeScrubbing:Ws,toggleChromecast:Bc,switchToActiveLive:zi,switchFromAdsToVideo:td,switchFromVideoToAds:Vc,skipAd:Ks,setLiveWaitingStart:$p,setLiveWaitingRecover:Rc,setLiveWaitingRecord:yp,getDebugTextData:Nc,getTraceTextData:Oc,getDebugPanelData:Dc,getVideoElement:ll,seekTime:(c,_,V)=>zn(c,_,V),clearDelayedBufferingCheckTimeout:wr,seekEpisodeStartTime:ua,seekToPercent:Us,getNextEpisode:Fc,seekToNextEpisode:wp,getPrevEpisode:He,seekToPrevEpisode:hi,startLogging:wt,stopLogging:zt,startCameraManualRotation:W,stopCameraManualRotation:kt,moveCameraFocusPX:li,holdCamera:ct,releaseCamera:St,getVideoEpisodes:od,getPreviewThumbsData:qo,downloadVideo:Xi,addLanguage:Nf,setLanguage:le,nextMovie:ht,videoRotate:wn,correctSeekTimeToInteractive:Kv,replayInteractive:N,setLooped:lr,reportProblem:Ue,setAutoplayNextEnabled:At,setTimerNextVideoRunning:wi,prevVideoClick:zo,nextVideoClick:co,nextVideoAnnouncementShow:Eo,nextVideoAnnouncementClick:uo,nextVideoAnnouncementAuto:Wo,nextVideoAnnouncementCancel:Bn,checkFullscreenSupport:lt,changeDoubleForwardOn:Qv,closePreviewTrack:o$,previewTrackOpened:i$,previewTrackDragStarted:n$,previewTrackDragFinished:r$},external:{firstStart:c=>id(c,!0),play:()=>ba(!0),pause:()=>_a(!0),stop:()=>xp(!0),seekTime:c=>zs(c),seekEpisodeStartTime:c=>st(c),setPlaybackRate:c=>pi(c),setAutoQualityLimits:c=>bn(c),setMuted:c=>To(c,!0),toggleSubtitle:()=>Ti(!0),changeSubtitle:$o,setVolume:c=>ar(c,!0),returnFocusToEpisodes:Jb,updateAdditionalSettingsItem:sl,addAdditionalSettingsItem:al,removeAdditionalSettingsItem:ha,updateAdditionalContextItem:Ji,addAdditionalContextItem:ko,removeAdditionalContextItem:eo,updateAdditionalButton:rl,addAdditionalButton:Jl,removeAdditionalButton:ga,setLiveLowLatency:ed,hideControls:()=>cr(!1),showControls:()=>cr(!0),setQuality:c=>Zi(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Fn(c,"to-video",!0),setHighQualityEnabled:c=>Hn(c,"to-video",!0),changeAudioStream:Hr}},callbacks:s,setUiCallbacks:c=>{ze=Ee({},c)},getAdmanWrapper:()=>Te,getLogger:()=>Ke,getPlayer:()=>k,destroy:e$};return Qt};function Xn(t,e,i,o){var f;let r=(f=e[i])==null?void 0:f.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Ns(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?s:0,isDisplayed:a}}var c2=["disabledControls$","additionalButtons"],u2=["interactiveTimeIndicator"],ql=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!c2.includes(r)){let l=o||u2.includes(r);a.set(Xn(t,i,r,l))}}};var Ju=(t,e,i)=>vt(null,null,function*(){yield vo(),e&&i&&(i.focus(),t.set(!1))});var p2=Ce('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function Tm(t){Ze(t,{children:(e,i)=>{var o=p2();b(e,o)},$$slots:{default:!0}})}function Im(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,$=K(void 0);Oe(()=>{n($)&&Ct(()=>{v.set(n($))})});let y=C=>{let N=sa(C),L=U_(n($));p.set(L),u.set(N),s.set(!r())},g=()=>{f.set(!0)},w=()=>{f.set(!1)},I=m(()=>r()?"opened":"");qt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:g,blur:w,get ariaExpanded(){return r()},get ref(){return n($)},set ref(C){O($,C,!0)},children:(C,N)=>{Tm(C,{})},$$slots:{default:!0}}),F(),o()}var f2=t=>{t.stopPropagation()},m2=M("<div><!> <div></div> <div></div></div>"),v2={hash:"s-27",code:'.interactive-episode-icon-animated.s-27{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-27{height:28px;width:28px}.invisible.s-27{opacity:0;visibility:hidden}.fullscreen.s-27:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-27{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-27{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-27{right:16px;top:40px}}@keyframes s-27-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-27{animation:s-27-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-27{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-27{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-27{display:none}'};function rc(t,e){var Z;B(e,!0),Q(t,v2);let[i,o]=Re(),r=()=>x(w,"$isMobile",i),a=()=>x(L,"$areControlsVisible",i),l=()=>x(P,"$currentGridType$",i),d=()=>x(C,"$isInteractiveTime$",i),s=()=>x(g,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>x(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=K(void 0),$=ve(),y=xo(),{interactiveControlsOpacity$:g}=y,w=$.ui.isMobile,I=$.ui.isFullscreen,C=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,L=$.ui.controlsVisible,E=(Z=$.callbacks)==null?void 0:Z.onInteractiveTimeIndicatorClick,P=$.ui.currentGridType$,q=m(()=>!r()&&a()),H=m(()=>Rs(l(),"s")),z=m(()=>!d()||!!s()||n(q)),j=K(!1);Oe(()=>{O(j,n(z),!0)});let ae=()=>{O(j,!0)},X=()=>{var ie;ne(),(ie=n(v))==null||ie.addEventListener("animationiteration",ae,{once:!0})},ne=()=>{var ie;O(j,!1),(ie=n(v))==null||ie.removeEventListener("animationiteration",ae)},ee=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Oe(()=>{u()?X():ne()});let pe=()=>{n(z)||(N.set(!0),E==null||E())};cn(()=>{N.clearTimeout(),ne()});let re=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var $e=m2();let J;$e.__mousemove=[f2],$e.__click=pe;var Ne=T($e);Vo(Ne,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:ee,get ref(){return p()},set ref(ie){p(ie)},children:(ie,De)=>{Xd(ie,{completed:!0})},$$slots:{default:!0}});var fe=A(Ne,2);let k;Xe(fe,ie=>p(ie),()=>p());var Ke=A(fe,2);let Te;Xe(Ke,ie=>O(v,ie),()=>n(v)),S($e),D((ie,De,Be)=>{J=se($e,1,"interactive-episode-icon-animated s-27",null,J,ie),k=se(fe,1,"ref-block s-27",null,k,De),Te=se(Ke,1,"pulse s-27",null,Te,Be)},[()=>({mobile:r(),fullscreen:f(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(j)})]),at("mouseleave",$e,re),b(t,$e),F(),o()}Ye(["mousemove","click"]);function ep(t,e){B(e,!0);let i=h(e,"tooltipEnabled",3,!0),o=h(e,"disabled",3,!1),r=h(e,"className",3,void 0),a=h(e,"ref",15),l=h(e,"tooltipVisible",3,!1);Vo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Le();let f=m(()=>e.buttonComponent);var p=ce(u);Fi(p,()=>n(f),(v,$)=>{$(v,Jr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Ds={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var h2=Ce('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ca(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=m(()=>`${un(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=h2();b(l,s)},$$slots:{default:!0}}),F()}var _2=M('<div class="icon-background-mobile s-25"><!></div>'),b2={hash:"s-25",code:".icon-background-mobile.s-25{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function qa(t,e){B(e,!0),Q(t,b2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=ve().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);qt(t,{get className(){return n(u)},get testId(){var f;return`btn-${(f=e.type)!=null?f:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{var v=Le(),$=ce(v);{var y=w=>{var I=_2(),C=T(I);let N=m(()=>e.type==="prev");ca(C,{get size(){return"32"},get reversed(){return n(N)}}),S(I),b(w,I)},g=w=>{let I=m(()=>e.type==="prev");ca(w,{get size(){return"24"},get reversed(){return n(I)}})};R($,w=>{o()?w(y):w(g,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var $2=Ce('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function sc(t,e){B(e,!0);let i=m(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=$2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as y2}from"@vkontakte/videoplayer-shared/es2015";var x2=M('<div class="icon-background-mobile s-24"></div>'),w2=M("<!> <div><!></div>",1),S2={hash:"s-24",code:".mobile.s-24{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-24{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Ql(t,e){B(e,!0),Q(t,S2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),a=h(e,"className",3,""),l=h(e,"click",3,y2),d=G("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);qt(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return ms.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,f)=>{var p=w2(),v=ce(p);{var $=C=>{var N=x2();b(C,N)};R(v,C=>{o()&&C($)})}var y=A(v,2);let g;var w=T(y);let I=m(()=>o()?"48":"24");sc(w,{get size(){return n(I)}}),S(y),D(C=>g=se(y,1,"s-24",null,g,C),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var C2=Ce('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Bs(t,e){B(e,!0);let i=m(()=>un(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=C2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as T2}from"@vkontakte/videoplayer-shared/es2015";var I2=M('<div class="icon-background-mobile s-21"><!></div>'),E2={hash:"s-21",code:".icon-background-mobile.s-21{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Gl(t,e){B(e,!0),Q(t,E2);let[i,o]=Re(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=xo(),l=h(e,"ref",15,void 0),d=h(e,"isMobile",3,!1),s=h(e,"isPlaying",3,!1),u=h(e,"disabled",3,!1),f=h(e,"className",3,""),p=h(e,"click",3,T2),$=ve().ui.t,{toggle:y}=a,g=m(()=>y),w=m(()=>r()!==null),I=m(()=>n(w)?r():s()),C=m(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(I)?Bs:An),L=m(()=>`${d()?"btn-m--play":""} ${f()}`),E=m(()=>n(w)?n(g):p());qt(t,{get className(){return n(L)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(C)},get ariaKeyShortCut(){return ms.KeyK},get ref(){return l()},set ref(P){l(P)},children:(P,q)=>{var H=Le();let z=m(()=>n(N));var j=ce(H);{var ae=ne=>{var ee=I2(),we=T(ee);Fi(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"48"}})}),S(ee),b(ne,ee)},X=ne=>{var ee=Le(),we=ce(ee);Fi(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"24"}})}),b(ne,ee)};R(j,ne=>{d()?ne(ae):ne(X,!1)})}b(P,H)},$$slots:{default:!0}}),F(),o()}var P2=Ce('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Em(t){Ze(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=P2();b(e,o)},$$slots:{default:!0}})}function ac(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");qt(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Em(d,{})},$$slots:{default:!0}}),F()}var k2=M('<span class="gutter s-26"><span><!></span></span>'),A2={hash:"s-26",code:".gutter.s-26{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-26{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-26{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function lc(t,e){B(e,!0),Q(t,A2);let[i,o]=Re(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,f=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",$="#000",y=m(()=>r()?"true":"false");qt(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(g){a(g)},children:(g,w)=>{var I=k2(),C=T(I);let N;var L=T(C);{var E=q=>{An(q,{get size(){return v},fill:$})},P=q=>{Bs(q,{get size(){return v},fill:$})};R(L,q=>{r()?q(E):q(P,!1)})}S(C),S(I),D(q=>N=se(C,1,"toggler s-26",null,N,q),[()=>({enabled:r()})]),b(g,I)},$$slots:{default:!0}}),F(),o()}var L2=Ce('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Pm(t){Ze(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=L2();ui(),b(e,o)},$$slots:{default:!0}})}function dc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");qt(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Pm(d,{})},$$slots:{default:!0}}),F()}var M2=Ce('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),V2=Ce('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function km(t,e){let i=h(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=V2(),d=A(ce(l));{var s=u=>{var f=M2();b(u,f)};R(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function cc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=h(e,"graphIsOpened",3,!1),d=ve().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");qt(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{let v=m(()=>!!a());km(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),F()}import{PlaybackState as sb}from"@vkontakte/videoplayer-core/es2015";function uc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,f=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}r()===sb.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),g=m(()=>l()&&r()===sb.PLAYING);qt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(g)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{Bd(w,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as ab}from"@vkontakte/videoplayer-shared/es2015";var R2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),N2=M('<img class="icon" aria-hidden="true"/>');function Qa(t,e){"use strict";let i=K(!1),o=()=>{O(i,!0)};var r=Le(),a=ce(r);{var l=s=>{var u=R2();b(s,u)},d=s=>{var u=N2();D(()=>Me(u,"src",e.icon)),at("error",u,o),Aa(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Am(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,ab),r=h(e,"ref",15),a=m(()=>o()===ab),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Vo(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});qt(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(f)},children:(p,v)=>{Qa(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var lb=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var tp=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Xn(t,i,r,o))};import{interpolate as Lm}from"@vkontakte/videoplayer-shared/es2015";var db=10,cb=40,Mm=.2,D2=.5,B2=65,F2=114,H2=4,ub=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?B2:F2),r=K(!1),a=K(0),l=K(0),d=m(()=>n(o)+db-cb-H2),s=m(()=>Lm(n(a),[Mm,1],[0,-n(d)])),u=m(()=>Lm(n(a),[Mm,1],[0,cb])),f=m(()=>Lm(n(a),[Mm,1],[0,n(o)+db]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:g=>{var w;O(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:g=>{if(!n(r))return;let w=Math.max(Math.min(g.clientY-n(l),0),-n(d));O(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=D2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var U2=t=>t;function bs(t,{delay:e=0,duration:i=400,easing:o=U2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var z2=M('<span class="root s-2b"> </span>'),W2={hash:"s-2b",code:".root.s-2b{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Vm(t,e){Q(t,W2);var i=z2(),o=T(i,!0);S(i),D(()=>me(o,e.time)),b(t,i)}var K2=M('<div class="tooltip-wrapper s-14"><div><!></div></div>'),q2={hash:"s-14",code:'.tooltip-wrapper.s-14{display:block;position:relative}.tooltip.s-14{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-14:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-14{opacity:1;visibility:visible}'};function Rm(t,e){Q(t,q2);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=K(void 0),u=K(void 0);function f(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),C=I/2;return w<C?C+l():w>e.containerWidth-C?e.containerWidth-C-d():w}let p=m(()=>f(r()));var v=K2(),$=T(v);let y;var g=T($);ni(g,()=>{var w;return(w=e.children)!=null?w:gt}),S($),Xe($,w=>O(u,w),()=>n(u)),S(v),Xe(v,w=>O(s,w),()=>n(s)),D(w=>{Qe(v,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-14",null,y,w),Qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var pb=t=>Math.abs(t)/90%4===1;var Q2=M('<div class="preview s-15"></div>'),G2=M('<div class="time s-15"> </div>'),Y2=M('<div><!> <div class="episode s-15"><!></div> <!></div>'),j2={hash:"s-15",code:".timeline-preview.s-15{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-15{bottom:72px}.preview.s-15{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow)}.episode.s-15{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-15,.time.s-15{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-15{color:var(--white)}"};function Nm(t,e){B(e,!0),Q(t,j2);let[i,o]=Re(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(g,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),f=h(e,"progress",3,0),p=h(e,"duration",3,0),v=h(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,g=$.ui.playerSize,w=K(0),I=K(0),C=K(""),N=K(0),L=K(0),E=K(0),P=K(0),q=m(()=>Ku(f(),p(),u())),H=m(()=>Ul(r())),z=m(()=>pb(r())),j=m(ne),ae=m(()=>(n(z)?1:-1)*(n(w)/2-n(I)/2)),X=m(()=>n(ae)*-1);Oe(()=>{(Z=>{O(w,Z.width,!0),O(I,Z.height,!0)})(we())}),Oe(()=>{(Z=>{O(C,Z.imgSrc,!0),O(N,Z.imgWidth,!0),O(L,Z.imgHeight,!0),O(E,Z.imgOffsetX,!0),O(P,Z.imgOffsetY,!0)})(pe(f()))});function ne(){var Be;let Z=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=ee(),De=30;return(Be=n(q))!=null&&Be.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),Z)}function ee(){let Z=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>Z;return{width:Z,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:Z,isHorizontal:ie,isVertical:De,width:Be}=ee();return ie&&(Z=Z/Be*n(j),Be=n(j)),De&&(Be=Be/Z*n(j),Z=n(j)),{width:Be,height:Z}}function pe(Z){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*Z/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*Z)));let De=Math.floor(ie/e.previewThumbsData.countPerImage),Be=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),it=ie%e.previewThumbsData.countPerRow,U=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(U=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&U++);let Ae=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ae=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let ke=n(w)*Ae,ze=n(I)*U,tt=-it*n(w),ye=-Be*n(I);return{imgSrc:e.previewThumbsData.links[De],imgWidth:ke,imgHeight:ze,imgOffsetX:tt,imgOffsetY:ye}}var re=Y2();let _e;var $e=T(re);{var J=Z=>{var ie=Q2();D(()=>Qe(ie,`width: ${n(w)}px; height: ${n(I)}px; background-image: url(${n(C)}); background-size: ${n(N)}px ${n(L)}px; background-position: ${n(E)}px ${n(P)}px;
61
- transform: rotate(${r()}deg) ${n(H)?`translate(${n(ae)}px, ${n(X)}px)`:""};
62
- `)),b(Z,ie)};R($e,Z=>{n(C)&&Z(J)})}var Ne=A($e,2),fe=T(Ne);{var k=Z=>{var ie=Le(),De=ce(ie);{var Be=U=>{var Ae=fs();D(ke=>me(Ae,ke),[()=>G("tooltip_episode_unfinished")]),b(U,Ae)},it=U=>{var Ae=fs();D(()=>me(Ae,n(q).text||"")),b(U,Ae)};R(De,U=>{v()&&n(q).completed===!1?U(Be):U(it,!1)})}b(Z,ie)};R(fe,Z=>{n(q)&&Z(k)})}S(Ne);var Ke=A(Ne,2);{var Te=Z=>{var ie=G2(),De=T(ie,!0);S(ie),D(()=>me(De,d())),b(Z,ie)};R(Ke,Z=>{v()||Z(Te)})}S(re),D(Z=>{_e=se(re,1,"timeline-preview s-15",null,_e,Z),Qe(re,`width: ${n(H)?n(I):n(w)}px;`)},[()=>({mobile:s()})]),b(t,re),F(),o()}var X2=M('<span class="time s-g"> </span>'),Z2=M("<!> <!>",1),J2={hash:"s-g",code:".time.s-g{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function Om(t,e){var le,he,Ve,rt,pt;B(e,!0),Q(t,J2);let[i,o]=Re(),r=()=>x(X,"$interactiveEpisodes$",i),a=()=>x(P,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(ee,"$isInteractiveTime$",i),u=()=>x($e,"$previewTrackActive",i),f=()=>x(q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),v=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(L,"$bufferedProgress$",i),g=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),C=ve(),N=Mt(),L=C.state.bufferedProgress$,E=C.state.positionWithScrubbing$,P=C.state.duration$,q=C.state.isLive$,H=C.state.isActiveLive$,z=C.ui.isMobile,j=N.features.episodes&&w()?C.actions.internal.getVideoEpisodes():void 0,ae=C.actions.internal.getPreviewThumbsData(),X=C.state.interactiveEpisodes$,ne=C.state.isInteractive,ee=C.state.isInteractiveTime$,we=C.state.isInteractiveExpectation$,pe=C.actions.internal.correctSeekTimeToInteractive,re=(le=C.callbacks)==null?void 0:le.onDisabledTimelineClick,_e=C.ui.controls.disabledControls$,$e=C.ui.previewTrackActive,J=(Ve=(he=C.callbacks)==null?void 0:he.uiInfo)==null?void 0:Ve.onTimelineMouseEnter,Ne=(pt=(rt=C.callbacks)==null?void 0:rt.uiInfo)==null?void 0:pt.onTimelineMouseLeave,fe=C.ui.t,k=N.features.interactiveResponsiveUi,Ke=m(()=>ne?r():j),Te=m(()=>Jo(a())),Z=m(()=>Jo(l())),ie=m(()=>l()/a()),De=m(()=>d()||s()),Be=K(!1),it=K(""),U=K(0),Ae=K(0),ke=K(0),ze=m(()=>({containerWidth:n(Ae),translateXPx:n(U),translateYPx:ne&&ae?-36:-16,active:n(Be)&&g()&&!n(De)&&!k&&!u(),pointer:!N.features.timelinePreview||!ae||f()})),tt=fe("aria_timeline"),ye=m(()=>fe("aria_timeline_value",{position:n(Z),duration:n(Te)}));function Ie(ue){return!pe||!ne?ue:pe(ue*a())/a()}function Fe(ue,We){var Ge;(Ge=e.onSliderPointerDown)==null||Ge.call(e,We),C.actions.internal.startScrubbing(Ie(ue))}function Nt(ue){s()||C.actions.internal.progressScrubbing(Ie(ue))}function ft(ue){var We;C.actions.internal.completeScrubbing(Ie(ue)),O(Be,!1),(We=e.onSliderPointerUp)==null||We.call(e)}function Bt(ue,We,Ge){var dt;(dt=e.onSliderPointerEnter)==null||dt.call(e,ue),ii(ue,We,Ge),O(Be,!0)}function lt(ue,We,Ge,dt){var Ht;(Ht=e.onSliderMove)==null||Ht.call(e,dt,ue),ii(ue,We,Ge),O(Be,!0)}function xt(){var ue;O(Be,!1),(ue=e.onSliderLeave)==null||ue.call(e)}function ii(ue,We,Ge){O(ke,Ie(ue),!0),O(U,We,!0),Ge&&O(Ae,Ge,!0),O(it,Pt(ue),!0)}function Pt(ue){let We=Jo((f()?1-ue:ue)*a());return f()?`-${We}`:We}let Ot=m(()=>p().has("TIMELINE"));var Ft=Z2(),Y=ce(Ft);Rm(Y,Jr(()=>n(ze),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ue,We)=>{var Ge=Le(),dt=ce(Ge);{var Ht=oi=>{Nm(oi,{get time(){return n(it)},get isMobile(){return v()},get videoEpisodes(){return n(Ke)},get previewThumbsData(){return ae},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return ne}})},Ut=oi=>{var _i=X2(),Yi=T(_i,!0);S(_i),D(()=>me(Yi,n(it))),b(oi,_i)};R(dt,oi=>{N.features.timelinePreview&&ae&&!f()?oi(Ht):oi(Ut,!1)})}b(ue,Ge)},$$slots:{default:!0}}));var Se=A(Y,2);Wa(Se,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},get ariaLabel(){return tt},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(ye)},get loadedProgress(){return y()},get filledProgress(){return n(ie)},get handleProgress(){return n(ie)},get videoEpisodes(){return n(Ke)},onPointerDown:Fe,onHandleMove:Nt,onPointerMove:lt,onPointerUp:ft,onPointerEnter:Bt,onPointerLeave:xt,get onMouseEnter(){return J},get onMouseLeave(){return Ne},get onDisabledClick(){return re},get isInteractive(){return ne},get disabled(){return n(Ot)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:ft,get ref(){return I()},set ref(ue){I(ue)}}),b(t,Ft),F(),o()}var ew={hash:"s-f",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function pc(t,e){B(e,!0),Q(t,ew);let[i,o]=Re(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,f=m(()=>Jo(l())),p=m(()=>Jo(a())),v=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Wa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var tw=M("<div><!></div>"),iw=M("<div></div>"),ow={hash:"s-b",code:".timeline.s-b{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-b{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-b{padding:0}.timeline-stub.s-b{min-width:20px;width:100%}.timeline-stub.mobile.s-b{height:8px}"};function Ga(t,e){B(e,!0),Q(t,ow);let[i,o]=Re(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(L,"$disabled",i),d=()=>x(C,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=h(e,"isAds",3,!1),f=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),$=h(e,"ref",15,void 0),y=ve(),g=Mt(),w=y.state.isLive$,I=y.ads.duration,C=y.ads.position,N=y.ui.isMobile,L=de(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var P=Le(),q=ce(P);{var H=j=>{var ae=tw();let X;var ne=T(ae);{var ee=pe=>{pc(pe,{get position(){return d()},get duration(){return s()}})},we=pe=>{Om(pe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return $()},set ref(re){$(re)}})};R(ne,pe=>{u()?pe(ee):pe(we,!1)})}S(ae),Ls(ae,()=>Vl(f()&&g.features.usePerformanceFix,L,g.disableInvisibleComponentsTimeout)),D(pe=>X=se(ae,1,"timeline s-b",null,X,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(j,ae)},z=j=>{var ae=iw();let X;D(ne=>X=se(ae,1,"timeline-stub s-b",null,X,ne),[()=>({mobile:a()})]),b(j,ae)};R(q,j=>{n(E)?j(H):j(z,!1)})}b(t,P),F(),o()}import{getRangeAroundIndex as nw}from"@vkontakte/videoplayer-shared/es2015";var rw=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},sw=M("<div></div>"),aw=M('<div><div class="track s-2d"></div></div>'),lw={hash:"s-2d",code:'.root.s-2d{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2d,.root.vertically-rotated.s-2d{height:var(--preview-track-frame-height-vertical)}.root.s-2d:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2d{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2d,.track.s-2d{position:absolute}.frame.s-2d{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2d .frame:where(.s-2d){transform-origin:0 0}.rotate-1.s-2d{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2d{transform:rotate(-180deg)}.rotate-3.s-2d{transform:rotate(-270deg) translateY(-100%)}'};function Bm(t,e){B(e,!0),Q(t,lw);let[i,o]=Re(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(g,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:g}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:C}=d.actions.internal,N=d.ui.rotateAlpha,L=K(void 0),E=K(!1),P=K(0),q=K(0),H=K(0),z=K(0),j=m(()=>v<=$),ae=m(()=>Ul(r())),X=m(()=>n(j)?!n(ae):n(ae)),ne=114,ee=65,we=3,pe=m(()=>n(X)?ne:ee),re=m(()=>n(j)?ne:ee),_e=m(()=>n(j)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),$e=m(()=>f*n(pe)),J=K(0);Oe(()=>{O(z,Math.ceil(-n(H)/n(pe))-1),O(H,-n($e)*a()/l())});let Ne=()=>{C(fe(),!0)},fe=()=>l()*-n(H)/n($e)/l(),k=!1,Ke=ye=>{if(!n(E))return!1;let Ie=ye.clientX-n(P);O(H,n(q)+Ie),O(H,Math.max(Math.min(n(H),0),-n($e)),!0),Math.abs(Ie)>1&&(k=!0),I(fe())},Te=ye=>{n(E)&&(O(E,!1),!k&&ye&&O(H,-(ye.offsetX-n(J)/2)),k=!1,Ne())},Z=()=>{n(E)&&Te()},ie=m(()=>s/u),De=(ye,Ie)=>{if(ye!==p.length-1)return u;let Fe=0,Nt=Ie*u;for(let ft=1;ft<=u;ft++)ye*s+Fe+Nt<f&&Fe++;return Fe},Be=m(()=>Math.floor(n(z)/s)),it=m(()=>nw(3,n(Be),p.length-1)),U=(ye,Ie,Fe)=>{let Nt=s*n(pe);return ye*Nt+Ie*n(pe)*u+n(J)/2-we/2+Fe*n(pe)},Ae=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(re)}px`,`--frame-height: ${n(_e)}`].join(";"));var ke=aw();let ze;var tt=T(ke);tt.__pointerdown=[rw,E,P,q,H,w,fe],tt.__pointermove=Ke,tt.__pointerup=Te,$i(tt,20,()=>n(it),ye=>ye,(ye,Ie)=>{var Fe=Le(),Nt=ce(Fe);$i(Nt,16,()=>Array.from({length:n(ie)},(ft,Bt)=>Bt),ft=>ft,(ft,Bt)=>{var lt=Le(),xt=ce(lt);$i(xt,16,()=>Array.from({length:De(Ie,Bt)},(ii,Pt)=>Pt),ii=>ii,(ii,Pt)=>{var Ot=sw();D((Ft,Y)=>{Qe(Ot,Ft),se(Ot,1,Y,"s-2d")},[()=>`--row-index: ${Bt}; --column-index: ${Pt}; left: ${U(Ie,Bt,Pt)}px; background-image: url(${p[Ie]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(ii,Ot)}),b(ft,lt)}),b(ye,Fe)}),S(tt),S(ke),Xe(ke,ye=>O(L,ye),()=>n(L)),D(ye=>{ze=se(ke,1,"root s-2d",null,ze,ye),Qe(ke,n(Ae)),Qe(tt,`transform: translateX(${n(H)}px); width: ${n($e)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(ae)})]),at("mouseleave",tt,Z),Pn(ke,"clientWidth",ye=>O(J,ye)),b(t,ke),F(),o()}Ye(["pointerdown","pointermove","pointerup"]);var dw=M('<div class="notification s-2c"><span class="description s-2c"> </span></div>'),cw={hash:"s-2c",code:".notification.s-2c{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2c{font-size:14px;line-height:18px}"};function Fm(t,e){B(e,!1),Q(t,cw);let i=340,{ui:{t:o}}=ve();yo();var r=dw(),a=T(r),l=T(a,!0);S(a),S(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],Sn),Zr(3,r,()=>bs,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as uw}from"@vkontakte/videoplayer-shared/es2015";var pw=M('<div class="preview-track-close tooltip s-28"><!></div>'),fw=M('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),mw=M('<div class="wrapper-preview-track s-28"><!></div>'),vw=M('<div class="enriched-timeline s-28"><!> <!> <!></div>'),gw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Hm(t,e){B(e,!0),Q(t,gw);let[i,o]=Re(),r=()=>x(g,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),f=ve(),p=200,{positionWithScrubbing$:v,isRewindableLive$:$,duration$:y}=f.state,{playerSize:g,previewTrackActive:w}=f.ui,{countPerImage:I=0,links:C=[],frequency:N=0}=f.actions.internal.getPreviewThumbsData()||{},L=m(()=>r().width>100),E=K(!b_()),P=()=>{n(E)&&(__(),O(E,!1))},q=pe=>{let re=Math.floor(a()*pe/N),_e=Math.floor(re/I),$e=uw(3,_e,C.length-1);for(let J of $e){let Ne=new Image;Ne.src=C[J]}},H=(pe,re)=>{q(re),!l()&&e.onTimelineMove(pe)};var z=vw(),j=T(z);{var ae=pe=>{var re=fw(),_e=T(re);let $e=m(()=>Jo(d()));Vm(_e,{get time(){return n($e)}});var J=A(_e,2),Ne=T(J);Vs(Ne,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(J);var fe=A(J,2);{var k=Ke=>{var Te=pw(),Z=T(Te);Fm(Z,{}),S(Te),b(Ke,Te)};R(fe,Ke=>{n(E)&&Ke(k)})}S(re),at("mouseleave",J,P),Zr(3,re,()=>bs,()=>({duration:p})),b(pe,re)};R(j,pe=>{l()&&pe(ae)})}var X=A(j,2);let ne=m(()=>!n(L));Ga(X,{get isHidden(){return n(ne)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:H,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:q,get ref(){return u()},set ref(pe){u(pe)}});var ee=A(X,2);{var we=pe=>{var re=mw(),_e=T(re);Bm(_e,{}),S(re),D(()=>Qe(re,`height: ${e.animatedPreviewTrackHeight}px;`)),b(pe,re)};R(ee,pe=>{e.previewTrackAvailable&&pe(we)})}S(z),D(()=>Qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var _w=M('<div><!> <div class="controls s-1a" data-testid="player_controls"><div class="controls-left s-1a"><!> <!> <!></div> <div class="controls-right s-1a"></div></div></div> <!>',1),bw={hash:"s-1a",code:'.wrapper-bottom.s-1a{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-1a:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1a>:where(.s-1a){pointer-events:auto}.controls.s-1a{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls-left.s-1a,.controls-right.s-1a{align-content:center;display:flex}.controls-left.s-1a{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1a >:not(:first-child),.controls-right.s-1a >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1a{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1a{transition:none}'};function zm(t,e){var al,ha;B(e,!0),Q(t,bw);let[i,o]=Re(),r=()=>x(Ro,"$disabledControls$",i),a=()=>x(nt,"$adPlaybackState",i),l=()=>x(Ut,"$playbackState$",i),d=()=>x(wo,"$currentSubtitle$",i),s=()=>x(Yi,"$isEnded$",i),u=()=>x(en,"$currentGridType$",i),f=()=>x(Vt,"$isLive$",i),p=()=>x(qe,"$chromecastState$",i),v=()=>x(ht,"$isPictureInPictureActive",i),$=()=>x(Zt,"$pictureInPictureType$",i),y=()=>x(bi,"$availableSubtitlesList$",i),g=()=>x(zt,"$contextMenuOpenedByKeyboard$",i),w=()=>x(wt,"$showContextMenuBtn$",i),I=()=>x(vi,"$isRewindableLive$",i),C=()=>x(fi,"$isActiveLive$",i),N=()=>x(os,"$graphIsOpened$",i),L=()=>x(No,"$contextMenuVisible$",i),E=()=>x(Hi,"$isFullscreen",i),P=()=>x(ro,"$autoplayNextEnabled",i),q=()=>x(n(So),"$prevButton",i),H=()=>x(n(Co),"$replayButton",i),z=()=>x(n(lo),"$playButton",i),j=()=>x(n(Ni),"$nextButton",i),ae=()=>x(n(Dn),"$playPrevChapterButton",i),X=()=>x(n(Xi),"$seekToInteractiveButton",i),ne=()=>x(n(zr),"$interactiveGraphButton",i),ee=()=>x(n(Li),"$liveButton",i),we=()=>x(n(ys),"$time",i),pe=()=>x(n(ns),"$episodes",i),re=()=>x(n(rs),"$vkLogo",i),_e=()=>x(n(Er),"$volume",i),$e=()=>x(n(sn),"$subtitles",i),J=()=>x(n(ar),"$settings",i),Ne=()=>x(n(To),"$context",i),fe=()=>x(n(Io),"$fullscreen",i),k=()=>x(n(lr),"$chromecast",i),Ke=()=>x(Oo,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Ui,"$playerSize",i),Z=()=>x(tn,"$isInteractiveTime$",i),ie=()=>x(pi,"$previewTrackActive",i),De=()=>x(yi,"$settingsMenuVisible",i),Be=()=>x(uo,"$settingButtonRef$",i),it=()=>x(W,"$startedByKeyboard$",i),U=()=>x(oi,"$isAudioAvailable$",i),Ae=()=>x(Ft,"$fakeIsPlaying$",i),ke=()=>x(is,"$seekToInteractiveDisabledTooltip$",i),ze=()=>x(Kr,"$isPreviewTrackHorizontallyAligned$",i),tt=()=>x($n,"$previewTrackAvailable",i),ye=()=>x(Oi,"$previewTrackDragInProgress",i),Ie=()=>x(Yt,"$adPosition",i),Fe=()=>x(Ht,"$position$",i),Nt=()=>x(St,"$adDuration",i),ft=()=>x(dt,"$duration$",i),Bt=h(e,"playerControlsWrapperRef",15,void 0),lt=h(e,"playerControlsRef",15,void 0),xt=h(e,"isAds",3,!1),ii=h(e,"logoTargetUrl",3,""),Pt=h(e,"isOneVideoPlaylist",3,!1),Ot=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ft}=xo(),Y=ve(),Se=xo(),le=Mt(),he=Y.actions.internal.toggleMuted,Ve=Y.actions.internal.togglePlay,rt=Y.actions.internal.pause,pt=Y.actions.internal.toggleSubtitle,ue=Y.actions.internal.checkFullscreenSupport,We=(al=Y.callbacks)==null?void 0:al.onAudioDoesNotExistHint,Ge=(ha=Y.callbacks)==null?void 0:ha.onAudioDisabledHint,dt=Y.state.duration$,Ht=Y.state.positionWithScrubbing$,Ut=Y.state.playbackState$,oi=Y.state.isAudioAvailable$,_i=Y.state.isAudioDisabled,Yi=Y.state.isEnded$,Vt=Y.state.isLive$,fi=Y.state.isActiveLive$,vi=Y.state.isRewindableLive$,{isActive$:ht,type$:Zt}=Se.pictureInPicture$,yi=Y.ui.settingsMenu.visible$,ji=Y.ui.settingsMenu.openedByBtnKeyboard$,ei=Y.ui.controls,Tt=Y.actions.internal.getVideoEpisodes(),qe=Y.state.chromecastState$,bi=Y.state.availableSubtitlesList$,wo=Y.state.currentSubtitle$,Ro=ei.disabledControls$,No=Y.ui.contextMenu.visible$,wt=Y.ui.contextMenu.showContextMenuBtn$,zt=Y.ui.contextMenu.openedByBtnKeyboard$,W=Y.ui.startedByKeyboard$,kt=Y.ui.controlBlocks,li=Y.ui.previewTrackNotificationVisible,ct=Y.ui.t,St=Y.ads.duration,Yt=Y.ads.position,nt=Y.ads.playbackState,Hi=Y.ui.isFullscreen,Ui=Y.ui.playerSize,en=Y.ui.currentGridType$,Oo=Y.ui.additionalDesktopControlPanelRightButtons$,ro=Y.ui.autoplayNextEnabled$,Vi=Y.actions.internal.getVideoElement,Or=Y.actions.internal.replayInteractive,go=Y.actions.internal.prevVideoClick,ho=Y.actions.internal.nextVideoClick,Ai=Y.state.isInteractive,tn=Y.state.isInteractiveTime$,Do=Y.state.showInteractiveGraph,Mn=Y.state.showSeekToInteractive,yr=Y.state.showPlayPrevChapter,xr=Y.state.showInteractiveTimeIndicator,$s=Y.state.playPrevChapterDisabledTooltip,is=Se.seekToInteractiveDisabledTooltip$,os=Se.graphIsOpened$,Jn=le.features.interactiveResponsiveUi,Dr=m(()=>r().has("EPISODE_BUTTON")),on=m(()=>r().has("GRAPH_BUTTON")),Vn=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),wr=m(()=>r().has("PLAY_BUTTON")),Bo=m(()=>r().has("REPLAY_BUTTON")),er=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),tr=()=>Y.actions.internal.toggleChromecast(),Br=m(()=>xt()?a()==="playing":l()===Um.PLAYING),ir=m(()=>d().value!=="off"),so=m(()=>s()&&!xt()||Ai),Fr=m(()=>Jn?n(so)&&oo(u(),"m"):n(so)),or=m(()=>!s()||Ai||xt()),mn=m(()=>oo(u(),"m")),_o=m(()=>e.showNextPrevButtons&&oo(u(),"m")&&!xt()&&e.nextButtonActive),Sr=m(()=>e.showNextPrevButtons&&oo(u(),"m")&&!xt()&&e.prevButtonActive),nr=m(()=>!xt()&&!!f()),mt=m(()=>p()!==fb.NOT_AVAILABLE&&!(v()&&$()===1)&&oo(u(),"m")&&!Ai),di=m(()=>e.showAutoplayNext&&!Pt()&&oo(u(),"s")),Hr=m(()=>y().length>0&&oo(u(),"m")),rr=m(()=>g()||w()),Ur=m(()=>oo(u(),"s")&&!xt()),Fo=m(()=>!e.logoHidden&&!xt()),Rn=m(()=>le.features.fullscreen&&ue()&&(e.logoHidden||oo(u(),Jn?"xs":"s"))&&!(v()&&$()===1)&&(Ai?Ot():!0)),vn=m(()=>(!f()||xt())&&!(le.features.interactiveHideTime&&Ai)),nn=m(()=>Do&&oo(u(),"m")),gn=m(()=>Jn?Mn&&oo(u(),"s"):Mn),Cr=m(()=>Jn?yr&&oo(u(),"s"):yr),Ho=m(()=>!xt()&&!f()&&!!(Tt!=null&&Tt.length)&&n(mn)&&!n(Dr)),Uo=m(()=>!I()||!!C()),hn=m(()=>N()?ct("tooltip_interactive_graph_on"):ct("tooltip_interactive_graph_off")),Tr=m(()=>L()?ct("tooltip_context_menu_close"):ct("tooltip_context_menu_open")),xi=(ot,ut)=>ot?ut&&ut===Um.PAUSED?ct("tooltip_play"):"":ct("tooltip_live"),_n=m(()=>xi(n(Uo),l())),Nn=m(()=>le.logoType==="vk_video"?ct("tooltip_vk_video_logo"):ct("tooltip_vk_logo")),sr=m(()=>n(ir)?ct("tooltip_subtitles_on"):ct("tooltip_subtitles_off")),Ir=m(()=>E()?ct("tooltip_fullscreen_on"):ct("tooltip_fullscreen_off")),On=m(()=>p()===fb.CONNECTED?ct("tooltip_chromecast_on"):ct("tooltip_chromecast_off")),rn=m(()=>P()?ct("tooltip_autoplay_on"):ct("tooltip_autoplay_off")),$t=K(0),It=ci({}),ao=ci({}),So=m(()=>ei.prevButton),Co=m(()=>ei.replayButton),lo=m(()=>ei.playButton),Ni=m(()=>ei.nextButton),Dn=m(()=>ei.playPrevChapterButton),Xi=m(()=>ei.seekToInteractiveButton),zr=m(()=>ei.interactiveGraphButton),Li=m(()=>ei.liveButton),ys=m(()=>ei.time),ns=m(()=>ei.episodes),rs=m(()=>ei.vkLogo),Er=m(()=>ei.volume),sn=m(()=>ei.subtitles),ar=m(()=>ei.settings),To=m(()=>ei.context),Io=m(()=>ei.fullscreen),lr=m(()=>ei.chromecast),Ue=m(()=>({prevButton:q()?q().right-q().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:j()?j().right-j().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton:ee()?ee().right-ee().left:0,time:we()?we().right-we().left:0,episodes:pe()?pe().right-pe().left:0,vkLogo:re()?re().right-re().left:0,volume:_e()?_e().right-_e().left:0,subtitles:$e()?$e().right-$e().left:0,settings:J()?J().right-J().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:fe()?fe().right-fe().left:0,chromecast:k()?k().right-k().left:0,additionalButtons:Ke().length?Ke().reduce(ot=>[...ot,40],[]):[]})),At=K(0);Oe(()=>{(!n(At)||n(At)<n(Ue).time)&&Ct(()=>O(At,n(Ue).time,!0))});let wi=K(!1);Oe(()=>{let ot=0;n(Ho)&&(oo(u(),"xl")?ot=n(Ue).time:ot=60);let ut=n(Ue).prevButton+n(Ue).playButton+n(Ue).nextButton+n(Ue).seekToInteractiveButton+n(Ue).interactiveGraphButton+n(Ue).liveButton+n(At)+ot;O(wi,n(vn)&&n($t)>=ut,!0)});let zo=m(()=>n(wi)&&oo(u(),"m")),co=mb(ql,260),Eo=mb(tp,260);Oe(()=>{Te(),Z(),ie(),co(Vi(),ei,It,e.showControls),Eo(Vi(),kt,ao,e.showControls)}),Oe(()=>{ao.bottom=Bt()});let uo=de();Oe(()=>{De(),Be()&&Ct(()=>Nl(Be(),De(),ji))});let Wo;Oe(()=>{it(),Ct(()=>Ju(W,it(),Wo))});function Bn(){aa({isAudioDisabled:_i,isAudioAvailable:U(),isAds:xt(),audioIsNotExistHintCallback:We,audioDisabledHintCallback:Ge})&&he()}let an=Ai?Or:Ve,bo=m(()=>Ae()!==null),Zi=m(()=>n(bo)?Ae():n(Br)),Fn=m(()=>n(Zi)?ct("tooltip_pause"):ct("tooltip_play")),Hn=ct("tooltip_episodes"),Un=m(()=>{var ot,ut,Ji,ko;return n(Sr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ds.prevButton,buttonComponent:qa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:go.bind(null,!0)},tooltipEnabled:!((ut=(ot=Y.callbacks)==null?void 0:ot.uiInfo)!=null&&ut.onPrevButtonMouseEnter)&&!((ko=(Ji=Y.callbacks)==null?void 0:Ji.uiInfo)!=null&&ko.onPrevButtonMouseLeave),mouseEnter:()=>{var eo,gi,zi;(zi=(gi=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:gi.onPrevButtonMouseEnter)==null||zi.call(gi,Xn(Vi(),It,"prevButton",e.showControls))},mouseLeave:()=>{var eo,gi,zi;(zi=(gi=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:gi.onPrevButtonMouseLeave)==null||zi.call(gi,Xn(Vi(),It,"prevButton",e.showControls))},tooltipText:ct("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Pr=m(()=>n(Fr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ds.replayButton,buttonComponent:Ql,buttonComponentProps:{disabled:n(Bo),click:an},tooltipText:ct("tooltip_restart"),disabled:n(Bo)}:void 0),dr=m(()=>n(or)?{id:"playButton",type:"desktop-control-panel-left",weight:Ds.playButton,buttonComponent:Gl,buttonComponentProps:{disabled:n(wr),isPlaying:n(Br),click:Ve},tooltipText:n(Fn),disabled:n(wr)}:void 0),xs=m(()=>{var ot,ut,Ji,ko;return n(_o)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ds.nextButton,buttonComponent:qa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:ho.bind(null,!0)},tooltipEnabled:!((ut=(ot=Y.callbacks)==null?void 0:ot.uiInfo)!=null&&ut.onNextButtonMouseEnter)&&!((ko=(Ji=Y.callbacks)==null?void 0:Ji.uiInfo)!=null&&ko.onNextButtonMouseLeave),mouseEnter:()=>{var eo,gi,zi;(zi=(gi=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:gi.onNextButtonMouseEnter)==null||zi.call(gi,Xn(Vi(),It,"nextButton",e.showControls))},mouseLeave:()=>{var eo,gi,zi;(zi=(gi=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:gi.onNextButtonMouseLeave)==null||zi.call(gi,Xn(Vi(),It,"nextButton",e.showControls))},tooltipText:ct("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Je=m(()=>Ai&&n(Cr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ds.playPrevChapterButton,buttonComponent:ac,buttonComponentProps:{disabled:n(er),click:e.playPrevChapter},tooltipText:ct("tooltip_interactive_go_back"),disabledTooltipContent:ct($s),disabled:n(er)}:void 0),jt=m(()=>Ai&&n(gn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ds.seekToInteractiveButton,buttonComponent:dc,buttonComponentProps:{disabled:n(Vn),click:e.seekToInteractive},tooltipText:ct("tooltip_interactive_seek"),disabled:n(Vn),disabledTooltipContent:ct(ke())}:void 0),Ti=m(()=>Ai&&n(nn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ds.interactiveGraphButton,buttonComponent:cc,buttonComponentProps:{disabled:n(on),click:os.toggle,graphIsOpened:N()},tooltipText:n(hn)}:void 0),$o=m(()=>n(nr)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ds.liveButton,buttonComponent:uc,buttonComponentProps:{isLiveActive:n(Uo),ariaLabel:n(_n)},tooltipText:n(_n),disabled:n(Uo)&&l()===Um.PLAYING}:void 0),Ko=m(()=>[n(Un),n(Pr),n(dr),n(xs),n(Je),n(jt),n(Ti),n($o)].filter(ot=>!!ot).sort(Fa)),Wr=m(()=>n(Fo)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:Jd,buttonComponentProps:{targetUrl:ii(),logoClickable:e.logoClickable,click:rt},tooltipText:n(Nn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Po=m(()=>n(di)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:lc,tooltipText:n(rn)}:void 0),cr=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:mm,buttonComponentProps:{click:Bn,isAds:xt()}})),zn=m(()=>n(Hr)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:dm,buttonComponentProps:{isSubtitlesEnabled:n(ir),click:pt},tooltipText:n(sr)}:void 0),ua=m(()=>n(Ur)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Fl,buttonComponentProps:{ref$:uo},tooltipText:De()?void 0:ct("tooltip_settings_off")}:void 0),Us=m(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:Im,buttonComponentProps:{ariaLabel:ct("aria_label_context_menu")},className:n(rr)?"":"out-of-view",tooltipText:n(Tr)}:void 0),zs=m(()=>n(Rn)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:Zd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Ir)}:void 0),bn=m(()=>n(mt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:tc,buttonComponentProps:{state:p(),click:tr},tooltipText:n(On)}:void 0),st=m(()=>[n(Wr),n(Po),n(cr),n(zn),n(ua),n(Us),n(zs),n(bn),...Ke()].filter(ot=>!!ot).sort(Fa)),pi=Y.ui.previewTrackActive,Oi=Y.ui.previewTrackDragInProgress,$n=Y.ui.previewTrackAvailable,Kr=Y.ui.isPreviewTrackHorizontallyAligned,yn=m(()=>ub({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>It.timeline,isHorizontal:ze()})),be=m(()=>n(yn).progressBarY),yt=m(()=>n(yn).controlsY),Dt=m(()=>n(yn).onPointerDown),ti=m(()=>n(yn).onPointerMove),Ii=m(()=>n(yn).onPointerUp),Ei=m(()=>n(yn).calculatedHeight),Mi=m(()=>n(yn).closePreviewTrack);Oe(()=>{ie()?li.set(!1):n(Mi)()});let Si;Lt(()=>()=>Si&&clearTimeout(Si));let ss=ot=>{ie()||!tt()||(n(Dt)(ot),Si=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},Ws=()=>{ie()||n(Ii)(),Si&&clearTimeout(Si),ye()&&Y.actions.internal.previewTrackDragFinished()},ol=ot=>{n(ti)(ot),!ie()&&tt()&&!ie()&&li.set(!0)},pa=()=>{li.set(!1)};var fa=_w(),as=ce(fa);let ws;var ma=T(as);{var va=ot=>{let ut=m(()=>n(be)()),Ji=m(()=>n(Ei)());Hm(ot,{get animatedOffsetY(){return n(ut)},get animatedPreviewTrackHeight(){return n(Ji)},get canRewindLive(){return e.canRewindLive},get isAds(){return xt()},onTimelineMove:ol,onTimelinePointerDown:ss,onTimelinePointerUp:Ws,onTimelinePointerLeave:pa,get previewTrackAvailable(){return tt()},get timelineRef(){return It.timeline},set timelineRef(ko){It.timeline=ko}})};R(ma,ot=>{e.showControls&&ot(va)})}var xn=A(ma,2),Ss=T(xn),nl=T(Ss);$i(nl,17,()=>n(Ko),ot=>ot.id,(ot,ut)=>{ep(ot,{get buttonComponent(){return n(ut).buttonComponent},get buttonComponentProps(){return n(ut).buttonComponentProps},get tooltipText(){return n(ut).tooltipText},get disabledTooltipContent(){return n(ut).disabledTooltipContent},get disabled(){return n(ut).disabled},get className(){return n(ut).className},get tooltipEnabled(){return n(ut).tooltipEnabled},get mouseEnter(){return n(ut).mouseEnter},get mouseLeave(){return n(ut).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return It[n(ut).id]},set ref(Ji){It[n(ut).id]=Ji}})});var ur=A(nl,2);{var Zl=ot=>{let ut=m(()=>!e.showControls),Ji=m(()=>xt()?Ie():Fe()),ko=m(()=>xt()?Nt():ft());jd(ot,{get isHidden(){return n(ut)},isMobile:!1,get showDuration(){return n(zo)},get position(){return n(Ji)},get duration(){return n(ko)},get ref(){return It.time},set ref(eo){It.time=eo}})};R(ur,ot=>{n(vn)&&ot(Zl)})}var rl=A(ur,2);let Jl=m(()=>!n(Ho));Vo(rl,{className:"w-max",get disabled(){return n(Jl)},get tooltipContent(){return Hn},get tooltipVisible(){return e.showControls},get ref(){return It.episodes},set ref(ot){It.episodes=ot},children:(ot,ut)=>{var Ji=Le(),ko=ce(Ji);{var eo=gi=>{ic(gi,{get position(){return Fe()},get duration(){return ft()},get timeCodes(){return Tt}})};R(ko,gi=>{n(Ho)&&gi(eo)})}b(ot,Ji)},$$slots:{default:!0}}),S(Ss);var ga=A(Ss,2);$i(ga,21,()=>n(st),ot=>ot.id,(ot,ut)=>{var Ji=Le(),ko=ce(Ji);{var eo=zi=>{ep(zi,{get buttonComponent(){return n(ut).buttonComponent},get buttonComponentProps(){return n(ut).buttonComponentProps},get tooltipText(){return n(ut).tooltipText},get disabledTooltipContent(){return n(ut).disabledTooltipContent},get disabled(){return n(ut).disabled},get className(){return n(ut).className},get tooltipVisible(){return e.showControls},get ref(){return It[n(ut).id]},set ref(Ks){It[n(ut).id]=Ks}})},gi=zi=>{let Ks=m(()=>!!n(ut).disabled);Am(zi,{get id(){return n(ut).id},get testId(){return n(ut).testId},get icon(){return n(ut).icon},get ariaLabel(){return n(ut).ariaLabel},get tooltipText(){return n(ut).tooltipText},get disabledTooltipContent(){return n(ut).disabledTooltipContent},get disabled(){return n(Ks)},get onClick(){return n(ut).onClick},get disableMouseupTooltipShow(){return n(ut).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return It[n(ut).id]},set ref(td){It[n(ut).id]=td}})};R(ko,zi=>{lb(n(ut))?zi(eo):zi(gi,!1)})}b(ot,Ji)}),S(ga),S(xn),Xe(xn,ot=>lt(ot),()=>lt()),S(as),Xe(as,ot=>Bt(ot),()=>Bt());var ed=A(as,2);{var sl=ot=>{rc(ot,{get ref(){return It.interactiveTimeIndicator},set ref(ut){It.interactiveTimeIndicator=ut}})};R(ed,ot=>{xr&&ot(sl)})}D((ot,ut)=>{ws=se(as,1,"wrapper-bottom s-1a",null,ws,ot),Qe(xn,ut),xn.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(yt)()}px);`]),Pn(Ss,"clientWidth",ot=>O($t,ot)),b(t,fa),F(),o()}import{ChromecastState as gb,PlaybackState as hb}from"@vkontakte/videoplayer-core/es2015";import{noop as vb}from"@vkontakte/videoplayer-shared/es2015";var $w=M('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),yw=M('<img class="icon s-1z" aria-hidden="true"/>'),xw={hash:"s-1z",code:".icon.s-1z{height:24px!important;width:24px!important}.inner.s-1z{background-color:var(--white);height:16px;width:16px}"};function Wm(t,e){Q(t,xw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,vb),r=m(()=>o()===vb),a=m(()=>n(r)||i()),l=K(!1),d=()=>{O(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");qt(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Le(),v=ce(p);{var $=g=>{var w=$w();b(g,w)},y=g=>{var w=yw();D(()=>Me(w,"src",e.iconUrl)),at("error",w,d),Aa(w),b(g,w)};R(v,g=>{n(l)?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}})}var ww=Ce('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Km(t){Ze(t,{testId:"muted-icon",children:(e,i)=>{var o=ww();b(e,o)},$$slots:{default:!0}})}import{noop as Sw}from"@vkontakte/videoplayer-shared/es2015";function ip(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,Sw),r=h(e,"ref",15,void 0),l=ve().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");qt(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,f)=>{var p=Le(),v=ce(p);{var $=g=>{Km(g,{})},y=g=>{da(g,{get size(){return"24"}})};R(v,g=>{i()?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var Cw=Ce('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),Tw=Ce('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),Iw=Ce('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function qm(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=Iw(),d=A(ce(l));{var s=f=>{var p=Cw();b(f,p)},u=f=>{var p=Tw();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as Ew}from"@vkontakte/videoplayer-shared/es2015";function Qm(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,Ew),a=G("menu_pip");qt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{qm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as _b}from"@vkontakte/videoplayer-shared/es2015";var Pw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},kw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Aw=M("<div><!></div>"),Lw=M("<div><!></div>"),Mw=M("<div><!></div>"),Vw=M("<!> <!> <!>",1),Rw=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Nw=M('<div class="wrapper-middle s-19"><!></div>'),Ow=M("<div><!></div> <!> <div><!></div>",1),Dw=M('<div aria-hidden="true">·</div> <!>',1),Bw=M('<!> <!> <div><div><div class="controls mobile s-19" data-testid="bottom-controls"><div class="controls-group contain s-19"><!> <!> <!> <!></div> <div class="controls-group s-19"><!> <!> <!></div></div> <!></div></div> <!>',1),Fw={hash:"s-19",code:".wrapper-bottom.s-19{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-19>:where(.s-19){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-19{height:9px;padding:0 4px 4px}.wrapper-middle.s-19{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-19,.wrapper-top-right.s-19{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-19{right:8px;top:4px}.wrapper-top-left.s-19{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-19,.wrapper-middle-left-second.s-19,.wrapper-middle-right.s-19{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-19{left:12px}.wrapper-middle-left-second.s-19{left:64px}.wrapper-middle-right.s-19{right:12px}.controls.s-19{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-19,.controls-group.s-19{display:flex}.controls-group.contain.s-19{min-width:0}.controls-group.s-19 >:not(:first-child){margin-left:8px}.hidden.s-19{opacity:0;visibility:hidden}.controls-hidden.s-19{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-19{transition:none}.overlay-mobile.s-19{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-19,.wrapper-top-right.fullscreen.s-19{top:16px}.controls-wrapper.fullscreen.s-19{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-19{left:44px;top:12px}.wrapper-top-right.fullscreen.s-19{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-19{left:44px}.wrapper-middle-left-second.fullscreen.s-19{left:96px}.wrapper-middle-right.fullscreen.s-19{right:44px}.controls-wrapper.fullscreen.s-19{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Gm(t,e){var Io,lr;B(e,!0),Q(t,Fw);let[i,o]=Re(),r=()=>x(Ui,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(ei,"$disabledControls$",i),l=()=>x(Pt,"$playbackState$",i),d=()=>x(Ro,"$adPlaybackState",i),s=()=>x(Y,"$isEnded$",i),u=()=>x(wt,"$playerSize",i),f=()=>x(pt,"$scrubbingInProgress",i),p=()=>x(yi,"$chromecastState$",i),v=()=>x(We,"$isPictureInPictureActive",i),$=()=>x(Ge,"$pictureInPictureType$",i),y=()=>x(ue,"$mobileNotReportControlHidden$",i),g=()=>x(vi,"$chromecastHidden",i),w=()=>x(lt,"$playerPhase",i),I=()=>x(Vt,"$pipHidden",i),C=()=>x(qe,"$currentGridType$",i),N=()=>x(_i,"$vkLogoHidden",i),L=()=>x(oi,"$volumeHidden",i),E=()=>x(Se,"$isLive$",i),P=()=>x(dt,"$settingsMenuVisible",i),q=()=>x(rt,"$isRewindableLive$",i),H=()=>x(Ve,"$isActiveLive$",i),z=()=>x(Ot,"$isAudioAvailable$",i),j=()=>x(he,"$muted$",i),ae=()=>x(le,"$volume$",i),X=()=>x(ct,"$isInteractiveTime$",i),ne=()=>x(gn,"$settingButtonRef$",i),ee=()=>x(Tt,"$startedByKeyboard$",i),we=()=>x(No,"$isFullscreen",i),pe=()=>x(zt,"$additionalButtons$",i),re=()=>x(Yi,"$autoplayNextToggleHidden",i),_e=()=>x(ji,"$crashed$",i),$e=()=>x(fi,"$settingsHidden",i),J=()=>x(en,"$graphIsOpened$",i),Ne=()=>x(wo,"$adPosition",i),fe=()=>x(bi,"$adDuration",i),k=()=>x(ii,"$position$",i),Ke=()=>x(xt,"$duration$",i),Te=h(e,"playerControlsWrapperRef",15,void 0),Z=h(e,"playerControlsRef",15,void 0),ie=h(e,"isAds",3,!1),De=h(e,"logoTargetUrl",3,""),Be=h(e,"isOneVideoPlaylist",3,!1),it=h(e,"customFullscreenSupported",3,!0),U=ve(),Ae=xo(),ke=Mt(),ze=U.actions.internal.toggleMuted,tt=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Ie=U.actions.internal.prevVideoClick,Fe=U.actions.internal.nextVideoClick,Nt=U.actions.internal.checkFullscreenSupport,ft=(Io=U.callbacks)==null?void 0:Io.onAudioDoesNotExistHint,Bt=(lr=U.callbacks)==null?void 0:lr.onAudioDisabledHint,lt=U.playerPhase,xt=U.state.duration$,ii=U.state.positionWithScrubbing$,Pt=U.state.playbackState$,Ot=U.state.isAudioAvailable$,Ft=U.state.isAudioDisabled,Y=U.state.isEnded$,Se=U.state.isLive$,le=U.state.volume$,he=U.state.muted$,Ve=U.state.isActiveLive$,rt=U.state.isRewindableLive$,pt=U.ui.scrubbingInProgress,ue=U.ui.mobileNotReportControlHidden$,{isActive$:We,type$:Ge}=Ae.pictureInPicture$,dt=U.ui.settingsMenu.visible$,Ht=U.ui.settingsMenu.openedByBtnKeyboard$,Ut=U.ui.controls,{volume:oi,vkLogo:_i,autoplayNextToggle:Yi,pip:Vt,settings:fi,chromecast:vi}=U.ui.hiddenControls,ht=U.actions.internal.getVideoEpisodes(),Zt=U.webApi.pictureInPictureApi,yi=U.state.chromecastState$,ji=U.state.crashed$,ei=Ut.disabledControls$,Tt=U.ui.startedByKeyboard$,qe=U.ui.currentGridType$,bi=U.ads.duration,wo=U.ads.position,Ro=U.ads.playbackState,No=U.ui.isFullscreen,wt=U.ui.playerSize,zt=U.ui.additionalButtonsDeprecated$,W=U.actions.internal.getVideoElement,kt=U.actions.internal.replayInteractive,li=U.state.isInteractive,ct=U.state.isInteractiveTime$,St=U.state.showInteractiveGraph,Yt=U.state.showSeekToInteractive,nt=U.state.showPlayPrevChapter,Hi=U.state.showInteractiveTimeIndicator,Ui=Ae.seekToInteractiveDisabledTooltip$,en=Ae.graphIsOpened$,Oo=U.ui.controlBlocks,ro=m(()=>G(U.state.playPrevChapterDisabledTooltip)),Vi=m(()=>G(r())),Or=m(()=>a().has("EPISODE_BUTTON")),go=m(()=>a().has("GRAPH_BUTTON")),ho=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ai=m(()=>a().has("PLAY_BUTTON")),tn=m(()=>a().has("REPLAY_BUTTON")),Do=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Mn=m(()=>l()===hb.PLAYING),yr=m(()=>d()==="paused"),xr=m(()=>s()&&!ie()&&!li),$s=m(()=>!s()||ie()),is=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),os=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),Jn=m(()=>u().width>300),Dr=m(()=>u().width>400),on=m(f),Vn=m(()=>p()!==gb.NOT_AVAILABLE&&!(v()&&$()===1)&&!y()&&!li&&!g()),wr=m(()=>w()==="LiveWaitingStart"),Bo=m(()=>!!Zt&&p()!==gb.CONNECTED&&!y()&&($()===1&&n(wr)||!n(wr))&&!n(on)&&!li&&!I()),er=K(!1);Lt(()=>{let Ue=Zt==null?void 0:Zt.info.isActive$.subscribe(At=>O(er,At,!0));return()=>Ue==null?void 0:Ue.unsubscribe()});let tr=m(()=>!n(on)&&oo(C(),"s")),Br=m(()=>!e.logoHidden&&u().width>350&&!N()),ir=m(()=>ke.features.fullscreen&&Nt()&&!(v()&&$()===1)&&(li?it():!0)&&!n(on)&&!n(er)),so=m(()=>!L()&&!n(on)),Fr=m(()=>(!E()||ie())&&u().width>260&&!n(on)&&!(ke.features.interactiveHideTime&&li)),or=m(()=>P()||e.showControls),mn=m(()=>!ie()&&!E()&&!!(ht!=null&&ht.length)&&n(Jn)&&!n(Or)&&!n(on)),_o=m(()=>!q()||!!H()),Sr=m(()=>St&&oo(C(),"m")),nr=m(()=>!z()||j()||ae()===0),mt=ci({}),di=ci({}),Hr=_b(ql,260),rr=_b(tp,260);Oe(()=>{u(),X(),Hr(W(),Ut,mt,e.showControls),rr(W(),Oo,di,e.showControls)});let Ur=()=>U.actions.internal.toggleChromecast();function Fo(){return vt(this,null,function*(){Zt!=null&&Zt.isActive()?yield Zt==null?void 0:Zt.exit():yield Zt==null?void 0:Zt.request()})}function Rn(){aa({isAudioDisabled:Ft,audioDisabledHintCallback:Bt,isAudioAvailable:z(),audioIsNotExistHintCallback:ft,isAds:ie()})&&ze()}let vn=K(""),nn=(Ue,At)=>{if(!Ue){O(vn,G("tooltip_live"),!0);return}At&&At===hb.PAUSED&&O(vn,G("tooltip_play"),!0)};Oe(()=>{nn(n(_o),l())});let gn=de();Oe(()=>{ne()&&Nl(ne(),P(),Ht)}),Oe(()=>{Ju(Tt,ee(),mt.playButton)});var Cr=Bw(),Ho=ce(Cr);{var Uo=Ue=>{var At=Rw(),wi=ce(At);let zo;var co=A(wi,2);let Eo;Xe(co,st=>di.topLeft=st,()=>di==null?void 0:di.topLeft);var uo=A(co,2);let Wo;var Bn=T(uo);$i(Bn,1,pe,({iconUrl:st,ariaLabel:pi,testId:Oi,onClick:$n,tooltip:Kr})=>st,(st,pi)=>{let Oi=()=>n(pi).iconUrl,$n=()=>n(pi).ariaLabel,Kr=()=>n(pi).testId,yn=()=>n(pi).onClick,be=()=>n(pi).tooltip,yt=m(()=>{var Dt;return(Dt=$n())!=null?Dt:be()});Wm(st,{get iconUrl(){return Oi()},get ariaLabel(){return n(yt)},get testId(){return Kr()},get onClick(){return yn()}})});var an=A(Bn,2);{var bo=st=>{lc(st,{get ref(){return mt.autoplayNextToggle},set ref(pi){mt.autoplayNextToggle=pi}})};R(an,st=>{e.showAutoplayNext&&!Be()&&!re()&&st(bo)})}var Zi=A(an,2);{var Fn=st=>{tc(st,{isMobile:!0,click:Ur,get state(){return p()},get ref(){return mt.chromecast},set ref(pi){mt.chromecast=pi}})};R(Zi,st=>{n(Vn)&&st(Fn)})}var Hn=A(Zi,2);{var Un=st=>{Qm(st,{click:Fo,get isPictureInPictureActive(){return v()},get ref(){return mt.pip},set ref(pi){mt.pip=pi}})};R(Hn,st=>{n(Bo)&&st(Un)})}var Pr=A(Hn,2);{var dr=st=>{Fl(st,{get ref$(){return gn}})};R(Pr,st=>{_e()&&!$e()&&st(dr)})}var xs=A(Pr,2);{var Je=st=>{Jd(st,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return mt.vkLogo},set ref(pi){mt.vkLogo=pi}})};R(xs,st=>{n(Br)&&st(Je)})}S(uo),Xe(uo,st=>di.topRight=st,()=>di==null?void 0:di.topRight);var jt=A(uo,2);let Ti;var $o=T(jt);{var Ko=st=>{let pi=m(()=>Ie.bind(null,!0));qa(st,{get click(){return n(pi)},type:"prev",isMobile:!0,get ref(){return mt.prevButton},set ref(Oi){mt.prevButton=Oi}})};R($o,st=>{n(is)&&st(Ko)})}var Wr=A($o,2);{var Po=st=>{Gl(st,{get disabled(){return n(Ai)},get click(){return tt},isMobile:!0,get isPlaying(){return n(Mn)},get ref(){return mt.playButton},set ref(pi){mt.playButton=pi}})};R(Wr,st=>{n($s)&&st(Po)})}var cr=A(Wr,2);{var zn=st=>{Ql(st,{get disabled(){return n(tn)},get click(){return tt},isMobile:!0,get ref(){return mt.replayButton},set ref(pi){mt.replayButton=pi}})};R(cr,st=>{n(xr)&&st(zn)})}var ua=A(cr,2);{var Us=st=>{let pi=m(()=>Fe.bind(null,!0));qa(st,{get click(){return n(pi)},type:"next",isMobile:!0,get ref(){return mt.nextButton},set ref(Oi){mt.nextButton=Oi}})};R(ua,st=>{n(os)&&st(Us)})}S(jt),Xe(jt,st=>di.middle=st,()=>di==null?void 0:di.middle);var zs=A(jt,2);{var bn=st=>{var pi=Vw(),Oi=ce(pi);{var $n=Dt=>{var ti=Aw();let Ii;ti.__click=[Pw,Do,e,ro];var Ei=T(ti);let Mi=m(()=>!e.showControls);ac(Ei,{get hidden(){return n(Mi)},get disabled(){return n(Do)},get click(){return e.playPrevChapter},get ref(){return mt.playPrevChapterButton},set ref(Si){mt.playPrevChapterButton=Si}}),S(ti),D(Si=>Ii=se(ti,1,"wrapper-middle-left s-19",null,Ii,Si),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Dt,ti)};R(Oi,Dt=>{nt&&Dt($n)})}var Kr=A(Oi,2);{var yn=Dt=>{var ti=Lw();let Ii;var Ei=T(ti);let Mi=m(()=>!e.showControls&&!J());cc(Ei,{get hidden(){return n(Mi)},get disabled(){return n(go)},get click(){return en.toggle},get graphIsOpened(){return J()},get ref(){return mt.interactiveGraphButton},set ref(Si){mt.interactiveGraphButton=Si}}),S(ti),D(Si=>Ii=se(ti,1,Td(nt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-19",Ii,Si),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(Dt,ti)};R(Kr,Dt=>{n(Sr)&&Dt(yn)})}var be=A(Kr,2);{var yt=Dt=>{var ti=Mw();let Ii;ti.__click=[kw,ho,e,Vi];var Ei=T(ti);let Mi=m(()=>!e.showControls);dc(Ei,{get hidden(){return n(Mi)},get disabled(){return n(ho)},get click(){return e.seekToInteractive},get ref(){return mt.seekToInteractiveButton},set ref(Si){mt.seekToInteractiveButton=Si}}),S(ti),D(Si=>Ii=se(ti,1,"wrapper-middle-right s-19",null,Ii,Si),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Dt,ti)};R(be,Dt=>{Yt&&Dt(yt)})}b(st,pi)};R(zs,st=>{li&&!f()&&st(bn)})}D((st,pi,Oi,$n)=>{zo=se(wi,1,"overlay-mobile s-19",null,zo,st),Eo=se(co,1,"wrapper-top-left s-19",null,Eo,pi),Wo=se(uo,1,"wrapper-top-right s-19",null,Wo,Oi),Ti=se(jt,1,"wrapper-middle s-19",null,Ti,$n)},[()=>({hidden:!n(or)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),b(Ue,At)};R(Ho,Ue=>{ie()||Ue(Uo)})}var hn=A(Ho,2);{var Tr=Ue=>{var At=Ow(),wi=ce(At);let zo;var co=T(wi);ip(co,{get muted(){return j()},click:Rn,get ref(){return mt.volume},set ref(bo){mt.volume=bo}}),S(wi);var Eo=A(wi,2);{var uo=bo=>{var Zi=Nw(),Fn=T(Zi);let Hn=m(()=>!n(yr));Gl(Fn,{get disabled(){return n(Ai)},get click(){return tt},isMobile:!0,get isPlaying(){return n(Hn)},get ref(){return mt.playButton},set ref(Un){mt.playButton=Un}}),S(Zi),b(bo,Zi)};R(Eo,bo=>{n(yr)&&bo(uo)})}var Wo=A(Eo,2);let Bn;var an=T(Wo);pc(an,{get position(){return Ne()},get duration(){return fe()}}),S(Wo),D((bo,Zi)=>{zo=se(wi,1,"wrapper-top-right s-19",null,zo,bo),Bn=se(Wo,1,"wrapper-bottom ads-timeline-mobile s-19",null,Bn,Zi)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(Ue,At)};R(hn,Ue=>{ie()&&d()!=="inactive"&&Ue(Tr)})}var xi=A(hn,2);let _n;var Nn=T(xi);let sr;var Ir=T(Nn),On=T(Ir),rn=T(On);{var $t=Ue=>{Vo(Ue,{get disabled(){return n(tn)},get ref(){return mt.replayButton},set ref(At){mt.replayButton=At},children:(At,wi)=>{Ql(At,{get disabled(){return n(tn)},get click(){return kt}})},$$slots:{default:!0}})};R(rn,Ue=>{li&&Ue($t)})}var It=A(rn,2);{var ao=Ue=>{Vo(Ue,{get ref(){return mt.liveButton},set ref(At){mt.liveButton=At},children:(At,wi)=>{uc(At,{get isLiveActive(){return n(_o)},isMobile:!0,get ariaLabel(){return n(vn)}})},$$slots:{default:!0}})};R(It,Ue=>{!ie()&&E()&&Ue(ao)})}var So=A(It,2);{var Co=Ue=>{let At=m(()=>ie()?Ne():k()),wi=m(()=>ie()?fe():Ke()),zo=m(()=>!e.showControls);jd(Ue,{get showDuration(){return n(Dr)},get position(){return n(At)},get duration(){return n(wi)},isMobile:!0,get isHidden(){return n(zo)},get ref(){return mt.time},set ref(co){mt.time=co}})};R(So,Ue=>{n(Fr)&&Ue(Co)})}var lo=A(So,2);let Ni=m(()=>!n(mn));Vo(lo,{className:"w-max",get disabled(){return n(Ni)},get ref(){return mt.episodes},set ref(Ue){mt.episodes=Ue},children:(Ue,At)=>{var wi=Le(),zo=ce(wi);{var co=Eo=>{var uo=Dw(),Wo=A(ce(uo),2);ic(Wo,{get position(){return k()},get duration(){return Ke()},get timeCodes(){return ht}}),b(Eo,uo)};R(zo,Eo=>{n(mn)&&Eo(co)})}b(Ue,wi)},$$slots:{default:!0}}),S(On),Xe(On,Ue=>di.bottomLeft=Ue,()=>di==null?void 0:di.bottomLeft);var Dn=A(On,2),Xi=T(Dn);{var zr=Ue=>{Vo(Ue,{get ref(){return mt.volume},set ref(At){mt.volume=At},children:(At,wi)=>{ip(At,{get muted(){return n(nr)},click:Rn})},$$slots:{default:!0}})};R(Xi,Ue=>{n(so)&&Ue(zr)})}var Li=A(Xi,2);{var ys=Ue=>{Vo(Ue,{get ref(){return mt.settings},set ref(At){mt.settings=At},children:(At,wi)=>{Fl(At,{get ref$(){return gn}})},$$slots:{default:!0}})};R(Li,Ue=>{n(tr)&&Ue(ys)})}var ns=A(Li,2);{var rs=Ue=>{Vo(Ue,{get ref(){return mt.fullscreen},set ref(At){mt.fullscreen=At},children:(At,wi)=>{Zd(At,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(ns,Ue=>{n(ir)&&Ue(rs)})}S(Dn),Xe(Dn,Ue=>di.bottomRight=Ue,()=>di==null?void 0:di.bottomRight),S(Ir),Xe(Ir,Ue=>Z(Ue),()=>Z());var Er=A(Ir,2);let sn=m(()=>!e.showControls);Ga(Er,{get isHidden(){return n(sn)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return q()},get ref(){return mt.timeline},set ref(Ue){mt.timeline=Ue}}),S(Nn),Xe(Nn,Ue=>di.bottom=Ue,()=>di==null?void 0:di.bottom),S(xi),Xe(xi,Ue=>Te(Ue),()=>Te());var ar=A(xi,2);{var To=Ue=>{rc(Ue,{get ref(){return mt.interactiveTimeIndicator},set ref(At){mt.interactiveTimeIndicator=At}})};R(ar,Ue=>{Hi&&Ue(To)})}D((Ue,At)=>{_n=se(xi,1,"wrapper-bottom mobile s-19",null,_n,Ue),sr=se(Nn,1,"controls-wrapper s-19",null,sr,At)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,Cr),F(),o()}Ye(["click"]);function fc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(I,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),f=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),$=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,bb),g=h(e,"onDisabledSeekToInteractiveClick",3,bb),I=ve().ui.isMobile,C=K(!1);Lt(()=>{let P=setTimeout(()=>O(C,!0),0);return()=>clearTimeout(P)});var N=Le(),L=ce(N);{var E=P=>{var q=Le(),H=ce(q);{var z=ae=>{Gm(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return g()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},j=ae=>{zm(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};R(H,ae=>{r()?ae(z):ae(j,!1)})}b(P,q)};R(L,P=>{n(C)&&P(E)})}b(t,N),F(),o()}var Hw=Ce('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function mc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${un(e.size)}${n(i)}`);Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Hw();b(r,l)},$$slots:{default:!0}}),F()}var Uw=Ce('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function Ym(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=m(()=>`seek-icon-${i()?"backward":"forward"}`);Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Uw();b(a,d)},$$slots:{default:!0}}),F()}var zw=M('<span class="hot-key-helpers-text s-m"> </span>'),Ww=M('<div data-testid="hotkey-helper-icon" class="s-m"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Kw=M("<div><!></div>"),qw={hash:"s-m",code:'.hot-key-helpers-container.s-m{align-items:center;animation:s-m-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-m{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-m{left:calc(75% - 100px)}.hot-key-helpers-text.s-m{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-m{animation:s-m-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-m-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-m-fadeOut{0%{opacity:1}to{opacity:0}}'};function jm(t,e){B(e,!0),Q(t,qw);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Mt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=r())==null?void 0:I.type}),v=m(()=>{var I,C;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(C=r())==null?void 0:C.text});var $=Kw();let y;var g=T($);{var w=I=>{var C=Ww(),N=ce(C),L=T(N);{var E=Z=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");Ym(Z,{get reversed(){return n(ie)},shadow:!0})};R(L,Z=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&Z(E)})}var P=A(L,2);{var q=Z=>{Bs(Z,{get size(){return"48"},shadow:!0})};R(P,Z=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&Z(q)})}var H=A(P,2);{var z=Z=>{An(Z,{get size(){return"48"},shadow:!0})};R(H,Z=>{n(p)==="PLAY"&&!l.playbackStatusShow&&Z(z)})}var j=A(H,2);{var ae=Z=>{sc(Z,{get size(){return"48"},shadow:!0})};R(j,Z=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&Z(ae)})}var X=A(j,2);{var ne=Z=>{la(Z,{get size(){return"48"},type:"off",shadow:!0})};R(X,Z=>{n(p)==="SUBTITLES_OFF"&&Z(ne)})}var ee=A(X,2);{var we=Z=>{la(Z,{get size(){return"48"},shadow:!0})};R(ee,Z=>{n(p)==="SUBTITLES_ON"&&Z(we)})}var pe=A(ee,2);{var re=Z=>{let ie=m(()=>n(p)==="RATE_DOWN");mc(Z,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(pe,Z=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&Z(re)})}var _e=A(pe,2);{var $e=Z=>{let ie=m(()=>n(p)==="EPISODE_PREV");ca(Z,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,Z=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&Z($e)})}var J=A(_e,2);{var Ne=Z=>{da(Z,{get size(){return"48"},volume:0,shadow:!0})};R(J,Z=>{n(p)==="MUTE"&&Z(Ne)})}var fe=A(J,2);{var k=Z=>{da(Z,{get size(){return"48"},volume:1,shadow:!0})};R(fe,Z=>{n(p)==="VOLUME"&&Z(k)})}S(N);var Ke=A(N,2);{var Te=Z=>{var ie=zw(),De=T(ie,!0);S(ie),D(()=>me(De,n(v))),b(Z,ie)};R(Ke,Z=>{n(v)&&Z(Te)})}D(()=>Me(N,"data-type",n(p))),b(I,C)};R(g,I=>{!n(s)&&n(p)&&I(w)})}S($),D(I=>y=se($,1,"hot-key-helpers-container s-m",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(f)})]),b(t,$),F(),o()}var Qw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Gw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Yw=M('<div tabindex="0" role="button"><div class="button-block s-r" aria-hidden="true"><div class="button-row s-r"><div class="button button-up s-r"><!></div> <div class="button button-right s-r"><!></div></div> <div class="button-row s-r"><div class="button button-left s-r"><!></div> <div class="button button-down s-r"><!></div></div></div></div>'),jw={hash:"s-r",code:".immersive-controls.s-r{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-r{left:20px;top:50px}.button-block.s-r{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-r{display:flex;flex-direction:row;position:relative}.button.s-r{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-r svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-r svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-r svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-r svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-r svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-r:hover svg{opacity:1}"};function vc(t,e){B(e,!0),Q(t,jw);let i=h(e,"isShifted",3,!1),o=ve(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),f=G("aria_label_spherical_control");var p=Yw();let v;p.__keydown=[Qw,r,a,l,s,d],p.__keyup=[Gw,r,u];var $=T(p),y=T($),g=T(y);g.__mousedown=a,g.__mouseup=u;var w=T(g);Rr(w,{direction:"up",useBtnColor:!0}),S(g);var I=A(g,2);I.__mousedown=d,I.__mouseup=u;var C=T(I);Rr(C,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=A(y,2),L=T(N);L.__mousedown=s,L.__mouseup=u;var E=T(L);Rr(E,{direction:"up",useBtnColor:!0}),S(L);var P=A(L,2);P.__mousedown=l,P.__mouseup=u;var q=T(P);Rr(q,{direction:"up",useBtnColor:!0}),S(P),S(N),S($),S(p),D(H=>{v=se(p,1,"immersive-controls s-r",null,v,H),Me(p,"aria-label",f)},[()=>({"m-shifted":i()})]),at("mouseleave",g,u),at("mouseleave",I,u),at("mouseleave",L,u),at("mouseleave",P,u),b(t,p),F()}Ye(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as yb,Subscription as Xw,filterChanged as Zw,filter as Jw}from"@vkontakte/videoplayer-shared/es2015";var $b=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var op=class{constructor(){this.flickeringTimeout=$b(1e3);this.subscriptions=new Xw;this.isAuto=!1;this.isLive=!1;this.captions$=new yb([]);this.captionsPrepared$=new yb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Jw(()=>this.isEnabled()),Zw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var eS=M('<span class="caption-line s-e"><span class="caption-segment s-e"> </span></span>'),tS=M('<span class="caption-line s-e"><span class="caption-segment s-e"></span></span>'),iS=M('<span class="caption-line s-e"><span class="caption-segment s-e"> </span></span>'),oS=M('<div><span class="caption s-e"><!></span></div>'),nS=M("<div><!></div>"),rS={hash:"s-e",code:".subtitles-container.s-e{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-e{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-e{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-e .subtitles-caption:where(.s-e){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-e{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-e{bottom:8%}.subtitles-container.auto.s-e .subtitles-caption:where(.s-e){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-e{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-e .caption:where(.s-e){width:100%}.caption-line.s-e{display:block;text-align:center}.subtitles-container.auto.s-e .caption-line:where(.s-e){text-align:left}.caption-segment.s-e{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function ja(t,e){B(e,!0),Q(t,rS);let[i,o]=Re(),r=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(g,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),f=ve(),p=Mt(),v=f.state.currentSubtitle$,$=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,g=f.ui.isFullscreen,w=f.ui.previewTrackActive,I=m(()=>!!r().isAuto),C=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),L=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=K(null);Oe(()=>{var X,ne,ee;(X=n(E))==null||X.setIsAuto(n(I)),(ne=n(E))==null||ne.setIsLive(n(C)),(ee=n(E))==null||ee.setCaptions(e.captions)});let P=K(ci([[]]));Lt(()=>{O(E,new op().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(ne=>{O(P,ne,!0)});return()=>{var ne;(ne=n(E))==null||ne.destroy(),X.unsubscribe()}}),Lt(()=>{if(n(I)){let X=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(X)}}else $.set(!1)});let q=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=nS();let z;var j=T(H);{var ae=X=>{var ne=oS();let ee;var we=T(ne),pe=T(we);{var re=$e=>{var J=eS(),Ne=T(J),fe=T(Ne,!0);S(Ne),S(J),D(k=>{var Ke;Qe(Ne,`font-size: ${(Ke=n(L))!=null?Ke:""}px`),me(fe,k)},[()=>G("subtitles_auto_caption")]),b($e,J)},_e=($e,J)=>{{var Ne=k=>{var Ke=Le(),Te=ce(Ke);$i(Te,17,()=>n(P),Sd,(Z,ie)=>{var De=tS(),Be=T(De);$i(Be,21,()=>n(ie),({value:it,timeAppeared:U})=>U,(it,U)=>{let Ae=()=>n(U).value,ke=()=>n(U).timeAppeared;var ze=Le(),tt=ce(ze);{var ye=Ie=>{var Fe=fs();D(()=>me(Fe,Ae())),b(Ie,Fe)};R(tt,Ie=>{(!ke()||ke()<=e.position)&&Ie(ye)})}b(it,ze)}),S(Be),S(De),D(()=>{var it;return Qe(Be,`font-size: ${(it=n(L))!=null?it:""}px`)}),b(Z,De)}),b(k,Ke)},fe=k=>{var Ke=Le(),Te=ce(Ke);$i(Te,17,()=>e.captions,({value:Z})=>Z,(Z,ie)=>{let De=()=>n(ie).value;var Be=iS(),it=T(Be),U=T(it,!0);S(it),S(Be),D(()=>{var Ae;Qe(it,`font-size: ${(Ae=n(L))!=null?Ae:""}px`),me(U,De())}),b(Z,Be)}),b(k,Ke)};R($e,k=>{var Ke;n(I)&&((Ke=n(P))!=null&&Ke.length)?k(Ne):k(fe,!1)},J)}};R(pe,$e=>{n(I)&&s()?$e(re):$e(_e,!1)})}S(we),S(ne),D($e=>{var J;ee=se(ne,1,"subtitles-caption s-e",null,ee,$e),Qe(ne,`--subtitles-caption-margin: ${(J=n(q))!=null?J:""}%`)},[()=>({mobile:u()})]),b(X,ne)};R(j,X=>{var ne;(e.captions.length||(ne=n(P))!=null&&ne.length)&&X(ae)})}S(H),D(X=>z=se(H,1,"subtitles-container s-e",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(C)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as sS}from"@vkontakte/videoplayer-core/es2015";var aS=M('<div class="text s-o"> </div>'),lS=M('<div><div class="icon_wrapper s-o"><!></div> <!></div>'),dS={hash:"s-o",code:".wrapper.s-o{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-o{background-size:cover}.icon_wrapper.s-o{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-o{margin-top:20px}"};function gc(t,e){B(e,!0),Q(t,dS);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Mt();var r=lS();let a;r.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},r.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},r.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=T(r),d=T(l);ec(d,{get size(){return"48"},get iconState(){return sS.CONNECTED}}),S(l);var s=A(l,2);{var u=f=>{var p=aS(),v=T(p);S(p),D(()=>{var $;return me(v,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(f,p)};R(s,f=>{i()&&f(u)})}S(r),D(f=>{a=se(r,1,"wrapper s-o",null,a,f),Qe(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,r),F()}Ye(["contextmenu","click","dblclick"]);var cS=Ce('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function Xm(t){Ze(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=cS();b(e,o)},$$slots:{default:!0}})}var uS=M('<div class="container s-4"><!></div>'),pS={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Xa(t){Q(t,pS);var e=uS(),i=T(e);Xm(i,{}),S(e),b(t,e)}var fS=M('<div class="playButton s-a" tabindex="0" role="button"><div class="playButtonBackground s-a"></div> <!></div>'),mS=M('<div data-testid="unstarted-thumb"><!></div>'),vS={hash:"s-a",code:".container.s-a{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-a{opacity:0;visibility:hidden}.container.bgCover.s-a{background-size:cover}.playButton.s-a{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-a,.playButtonBackground.s-a{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-a{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-a:hover .playButtonBackground:where(.s-a){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-a svg{position:relative}"};function Za(t,e){B(e,!0),Q(t,vS);let i=h(e,"iconVisible",3,!0),o=ve(),r=Mt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var g;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(g=e.startVideo)==null||g.call(e))},s=$=>{var y,g;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(g=e.onClick)==null||g.call(e,$)};var u=mS();let f;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=T(u);{var v=$=>{var y=fS();y.__keydown=d;var g=A(T(y),2);An(g,{get size(){return"48"}}),S(y),D(()=>Me(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(v)})}return S(u),D($=>{f=se(u,1,"container s-a",null,f,$),Qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:s})}Ye(["click","contextmenu","keydown"]);var gS=M('<span class="text s-u"> </span>'),hS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},_S=M('<a target="_blank" class="link s-u"><!></a>'),bS=M('<div data-testid="video_title"><!></div>'),$S={hash:"s-u",code:".title.s-u{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-u,.title.s-u{color:var(--white)}.link.s-u{pointer-events:auto;text-decoration:none}.link.s-u:hover{text-decoration:underline}.text.s-u{pointer-events:auto}.size-sm.s-u{font-size:14px;font-weight:500;line-height:18px}.hidden.s-u{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Zm(t,e){var y;B(e,!0),Q(t,$S);let i=g=>{var w=gS(),I=T(w,!0);S(w),Xe(w,C=>l(C),()=>l()),D(()=>me(I,o())),at("mouseenter",w,function(...C){var N;(N=e.onMouseEnter)==null||N.apply(this,C)}),at("mouseleave",w,function(...C){var N;(N=e.onMouseLeave)==null||N.apply(this,C)}),b(g,w)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=K(void 0);Lt(()=>{var w;requestAnimationFrame(()=>{var I;(I=e.onVisibilityChanged)==null||I.call(e,!0)});function g(I){var C;I.propertyName==="transform"&&((C=e.onVisibilityChanged)==null||C.call(e,!r()))}return(w=n(d))==null||w.addEventListener("transitionend",g),()=>{var I;return(I=n(d))==null?void 0:I.removeEventListener("transitionend",g)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=bS();let f;var p=T(u);{var v=g=>{var w=_S();w.__click=[hS,e];var I=T(w);i(I),S(w),D(()=>Me(w,"href",s||"")),b(g,w)},$=g=>{i(g)};R(p,g=>{s||e.onTitleClicked?g(v):g($,!1)})}S(u),Xe(u,g=>O(d,g),()=>n(d)),D(g=>f=se(u,1,`title size-${a()}`,"s-u",f,g),[()=>({hidden:r()})]),b(t,u),F()}Ye(["click"]);import{throttleFn as IS}from"@vkontakte/videoplayer-shared/es2015";var yS=M('<div class="timer__cell cell s-1f"><span class="cell__value s-1f"> </span> <span class="cell__unit s-1f"> </span></div> <span class="timer__points s-1f"> </span>',1),xS=M('<div class="timer__cell cell s-1f"><span class="cell__value s-1f"> </span> <span class="cell__unit s-1f"> </span></div> <span class="timer__points s-1f"> </span>',1),wS=M('<div class="timer__cell cell s-1f"><span class="cell__value s-1f"> </span> <span class="cell__unit s-1f"> </span></div> <span class="timer__points s-1f"> </span>',1),SS=M('<div class="timer__cell cell s-1f"><span class="cell__value s-1f"> </span> <span class="cell__unit s-1f"> </span></div>'),CS=M("<div><!> <!> <!> <!></div>"),TS={hash:"s-1f",code:".timer__container.s-1f{align-items:flex-start;display:flex;justify-content:center}.cell.s-1f{align-items:center;display:flex;flex-direction:column}.cell__value.s-1f{font-size:48px;font-weight:600;line-height:1.2}.small.s-1f .cell__value:where(.s-1f){font-size:24px}.cell__unit.s-1f{font-size:14px;font-weight:400;line-height:1.2}.small.s-1f .cell__unit:where(.s-1f){font-size:12px}.timer__points.s-1f{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1f .timer__points:where(.s-1f){font-size:20px}"};function Jm(t,e){B(e,!0),Q(t,TS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),f=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*f(H)}px`,v=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let j=Math.floor(H/3600);O(o,u(j),!0);let ae=Math.floor(H/60)%60;O(r,u(ae),!0);let X=H%60;O(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;v(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Lt(()=>{l=requestAnimationFrame($)}),cn(()=>{cancelAnimationFrame(l)});var y=CS();let g;var w=T(y);{var I=H=>{var z=yS(),j=ce(z);let ae;var X=T(j),ne=T(X,!0);S(X);var ee=A(X,2),we=T(ee,!0);S(ee),S(j);var pe=A(j,2),re=T(pe,!0);S(pe),D((_e,$e,J)=>{ae=Qe(j,"",ae,{width:_e}),me(ne,n(i)),me(we,$e),me(re,J)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(w,H=>{n(i)&&H(I)})}var C=A(w,2);{var N=H=>{var z=xS(),j=ce(z);let ae;var X=T(j),ne=T(X,!0);S(X);var ee=A(X,2),we=T(ee,!0);S(ee),S(j);var pe=A(j,2),re=T(pe,!0);S(pe),D((_e,$e,J)=>{ae=Qe(j,"",ae,{width:_e}),me(ne,n(o)),me(we,$e),me(re,J)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(C,H=>{n(o)&&H(N)})}var L=A(C,2);{var E=H=>{var z=wS(),j=ce(z);let ae;var X=T(j),ne=T(X,!0);S(X);var ee=A(X,2),we=T(ee,!0);S(ee),S(j);var pe=A(j,2),re=T(pe,!0);S(pe),D((_e,$e,J)=>{ae=Qe(j,"",ae,{width:_e}),me(ne,n(r)),me(we,$e),me(re,J)},[()=>p(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(L,H=>{n(r)&&H(E)})}var P=A(L,2);{var q=H=>{var z=SS();let j;var ae=T(z),X=T(ae,!0);S(ae);var ne=A(ae,2),ee=T(ne,!0);S(ne),S(z),D((we,pe)=>{j=Qe(z,"",j,{width:we}),me(X,n(a)),me(ee,pe)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(P,H=>{n(a)&&H(q)})}S(y),D(H=>g=se(y,1,"timer__container s-1f",null,g,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var ES=M('<div class="waiting s-q"><span> </span></div>'),PS=M('<div class="upcoming-timer timer s-q"><span> </span> <!></div>'),kS=M('<div class="waiting-container s-q"><!></div>'),AS={hash:"s-q",code:'.waiting-container.s-q{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-q,.waiting-container.s-q:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-q:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-q{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-q{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-q{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-q{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-q{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-q{font-size:15px}.medium.s-q{font-size:17px}'};function hc(t,e){B(e,!0),Q(t,AS);let i=h(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=m(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),f=m(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?IS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,I)})},300):void 0;Oe(()=>{n(s),n(d),n(o),p==null||p()}),cn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var v=kS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var $=T(v);{var y=w=>{var I=ES(),C=T(I);let N;var L=T(C,!0);S(C),S(I),Xe(I,E=>O(r,E),()=>n(r)),D((E,P)=>{N=se(C,1,"waiting__title s-q",null,N,E),me(L,P)},[()=>({medium:n(f),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(w,I)},g=w=>{var I=PS(),C=T(I);let N;var L=T(C,!0);S(C);var E=A(C,2);let P=m(()=>n(u)||n(f)),q=m(()=>i()||0);Jm(E,{get isSmallSize(){return n(P)},get startTime(){return n(q)},onTimerOver:()=>O(o,!0)}),S(I),Xe(I,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(C,1,"timer__title s-q",null,N,H),me(L,z)},[()=>({medium:n(f),small:n(u)}),()=>G("waiting_live_timer_title")]),b(w,I)};R($,w=>{n(o)?w(y):w(g,!1)})}S(v),D(()=>Qe(v,`background-image: url(${e.thumbUrl})`)),Pn(v,"clientWidth",w=>O(d,w)),Pn(v,"clientHeight",w=>O(s,w)),b(t,v),F()}Ye(["contextmenu","click"]);var LS=M('<div class="waiting-container s-v"><div class="waiting-caption s-v"><!> <p class="waiting-title s-v"> </p></div></div>'),MS={hash:"s-v",code:'.waiting-container.s-v{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-v,.waiting-container.s-v:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-v:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-v{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-v{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Ja(t,e){B(e,!0),Q(t,MS);let i=h(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=LS();a.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},a.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)};var l=T(a),d=T(l);Ua(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=T(s,!0);S(s),S(l),S(a),D(()=>{Qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}Ye(["contextmenu","click"]);var VS=Ce('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function ev(t){Ze(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=VS();b(e,o)},$$slots:{default:!0}})}var RS=M('<div class="select-icon s-1x"><!></div>'),NS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function _c(t){Q(t,NS);var e=RS(),i=T(e);ev(i,{}),S(e),b(t,e)}var OS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},DS=(t,e)=>{Ol(t,()=>e.item.selectItem(e.item.value))},BS=M("<p> </p>"),FS=M('<p class="sublabel s-1u"> </p>'),HS=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),US={hash:"s-1u",code:".menu-item-value.s-1u{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1u{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1u,.sublabel.s-1u{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1u{opacity:.5}"};function tv(t,e){B(e,!0),Q(t,US);let i=h(e,"isMobile",3,!1);var o=HS();let r;o.__click=[OS,e],o.__keydown=[DS,e];var a=T(o);{var l=y=>{_c(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let s;var u=T(d);{var f=y=>{var g=Le(),w=ce(g);Fi(w,()=>e.item.valueComponent,(I,C)=>{C(I,Jr(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,g)},p=y=>{var g=BS();let w;var I=T(g,!0);S(g),D(C=>{var N;w=se(g,1,"label s-1u",null,w,C),me(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,g)};R(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=A(u,2);{var $=y=>{var g=FS(),w=T(g,!0);S(g),D(()=>me(w,e.item.sublabel)),b(y,g)};R(v,y=>{e.item.sublabel&&y($)})}S(d),S(o),D((y,g,w)=>{var I;r=se(o,1,"item",null,r,y),Me(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Me(o,"aria-label",g),Me(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1u",null,s,w),Me(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,g;return(g=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?g:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}Ye(["click","keydown"]);var zS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function iv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>g=>Ou(g,n(r)));var l=zS();let d;l.__click=function(...g){var w;(w=n(r))==null||w.apply(this,g)},l.__keydown=function(...g){var w;(w=n(a))==null||w.apply(this,g)};var s=T(l);{var u=g=>{_c(g,{})};R(s,g=>{e.item.selected&&g(u)})}var f=A(s,2);let p;var v=T(f);{var $=g=>{var w=Le();let I=m(()=>e.item.valueComponent);var C=ce(w);Fi(C,()=>n(I),(N,L)=>{L(N,Jr(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(g,w)},y=g=>{var w=fs();D(()=>me(w,e.item.label)),b(g,w)};R(v,g=>{e.item.valueComponent?g($):g(y,!1)})}S(f),S(l),Xe(l,g=>o(o()[e.item.id]=g,!0),()=>{var g;return(g=o())==null?void 0:g[e.item.id]}),D((g,w)=>{var I;d=se(l,1,"item",null,d,g),Me(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Me(l,"data-testid",e.item.id),p=se(f,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}Ye(["click","keydown"]);var ts={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var KS=(t,e)=>{F_(t,e.returnFromSubMenu,e.closeSettingsMenu)},qS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},QS=(t,e)=>{Ud(t)&&(Nr(t),e.returnFromSubMenu())},GS=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1l"> </p></li> <!></ul></div>'),YS={hash:"s-1l",code:".sub-menu.s-1l{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1l .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1l{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1l{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1l .items:where(.s-1l) .item.header:where(.s-1l){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1l .title:where(.s-1l){margin-left:8px}.sub-menu.s-1l .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1l .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1l .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1l .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1l .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1l .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1l .item .sublabel{font-size:12px;line-height:14px}.item.s-1l:not(.mobile) p:where(.s-1l),.sub-menu.s-1l .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function nv(t,e){B(e,!0),Q(t,YS);let[i,o]=Re(),r=()=>x(p,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=h(e,"listRef",15);Lt(()=>{let X=e.items.findIndex(ne=>ne.selected);u().children[X+1].focus()});let f=ve(),p=f.ui.isFullscreen,v=f.ui.playerSize,$=K(void 0),y=K(0),g=K(0),w=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(g)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var C=GS();let N;var L=T(C);let E;L.__keydown=[KS,e];var P=T(L);let q;P.__click=[qS,e],P.__keydown=[QS,e];var H=T(P);Rr(H,{direction:"left"});var z=A(H,2),j=T(z,!0);S(z),S(P),Xe(P,X=>O($,X),()=>n($));var ae=A(P,2);$i(ae,17,()=>e.items,Sd,(X,ne)=>{var ee=Le(),we=ce(ee);{var pe=_e=>{tv(_e,{get item(){return n(ne)},get isMobile(){return l()}})},re=(_e,$e)=>{{var J=Ne=>{iv(Ne,{get isMobile(){return l()},get item(){return n(ne)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Ne=>{n(ne).type==="OPEN_SUB_MENU"&&Ne(J)},$e)}};R(we,_e=>{n(ne).type==="SELECT_VALUE"?_e(pe):_e(re,!1)})}b(X,ee)}),S(L),Xe(L,X=>u(X),()=>u()),S(C),D((X,ne,ee)=>{N=se(C,1,"sub-menu menu s-1l",null,N,X),Me(C,"data-testid",`${e.id}-sub-menu`),Qe(C,`min-width: ${n(I)}px`),E=se(L,1,"items s-1l",null,E,ne),Qe(L,n(w)),q=se(P,1,"item header back s-1l",null,q,ee),Me(P,"aria-label",s()),me(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Pn(P,"clientWidth",X=>O(y,X)),Pn(P,"clientHeight",X=>O(g,X)),b(t,C),F(),o()}Ye(["keydown","click"]);import{noop as jS}from"@vkontakte/videoplayer-shared/es2015";var XS=(t,e)=>Ou(t,e()),ZS=(t,e)=>{t.stopPropagation(),e()()},JS=M('<div class="value s-1m"> </div>'),eC=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),tC={hash:"s-1m",code:".value.s-1m{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function rv(t,e){B(e,!0),Q(t,tC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,jS),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=eC();let s;d.__click=[ZS,o],d.__keydown=[XS,o];var u=T(d),f=T(u);{var p=C=>{Qa(C,{get icon(){return e.icon}})},v=C=>{var N=Le();let L=m(()=>e.icon);var E=ce(N);Fi(E,()=>n(L),(P,q)=>{q(P,Jr(a))}),b(C,N)};R(f,C=>{typeof e.icon=="string"?C(p):C(v,!1)})}S(u);var $=A(u,2),y=T($,!0);S($);var g=A($,2);{var w=C=>{var N=Le();let L=m(r);var E=ce(N);Fi(E,()=>n(L),(P,q)=>{q(P,{})}),b(C,N)},I=C=>{var N=JS(),L=T(N,!0);S(N),D(()=>me(L,e.value)),b(C,N)};R(g,C=>{r()?C(w):C(I,!1)})}S(d),Xe(d,C=>l(C),()=>l()),D(C=>{s=se(d,1,"item",null,s,C),Me(d,"aria-label",e.ariaLabel),Me(d,"data-testid",e.id),me(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}Ye(["click","keydown"]);import{noop as wb}from"@vkontakte/videoplayer-shared/es2015";var iC=(t,e)=>{Ol(t,()=>e())},oC=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),nC=M('<img class="icon" aria-hidden="true"/>'),rC=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),sC={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function sv(t,e){B(e,!0),Q(t,sC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,wb),r=h(e,"closeSettings",3,wb),a=K(!1),l=()=>{O(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=rC();let u;s.__click=d,s.__keydown=[iC,d];var f=T(s),p=T(f);{var v=w=>{var I=Le(),C=ce(I);{var N=E=>{var P=oC();b(E,P)},L=E=>{var P=nC();D(()=>Me(P,"src",e.icon)),at("error",P,l),Aa(P),b(E,P)};R(C,E=>{n(a)?E(N):E(L,!1)})}b(w,I)},$=w=>{var I=Le();let C=m(()=>e.icon);var N=ce(I);Fi(N,()=>n(C),(L,E)=>{E(L,{})}),b(w,I)};R(p,w=>{typeof e.icon=="string"?w(v):w($,!1)})}S(f);var y=A(f,2),g=T(y,!0);S(y),S(s),D(w=>{var I;u=se(s,1,"item",null,u,w),Me(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Me(s,"data-testid",e.id),me(g,e.label)},[()=>({mobile:i()})]),b(t,s),F()}Ye(["click","keydown"]);import{noop as dC}from"@vkontakte/videoplayer-shared/es2015";var aC=M('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),lC={hash:"s-1r",code:'.toggle_wrap.s-1r{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1r{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1r:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1r:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1r{overflow:hidden}'};function av(t,e){Q(t,lC);let i=h(e,"enabled",3,!1);var o=aC(),r=T(o);let a;ui(2),S(o),D(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),b(t,o)}var cC=(t,e,i)=>{H_(t,e(),o=>i()(o))},uC=(t,e,i)=>{t.stopPropagation(),e()(!i())},pC=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),fC=M('<li role="menuitem" tabindex="0"><!></li>');function lv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,dC),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=fC();let s;d.__click=[uC,o,r],d.__keydown=[cC,r,o];var u=T(d);za(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(f,p)=>{var v=pC();let $;var y=T(v),g=T(y);{var w=E=>{Qa(E,{get icon(){return e.icon}})},I=E=>{var P=Le();let q=m(()=>e.icon);var H=ce(P);Fi(H,()=>n(q),(z,j)=>{j(z,{})}),b(E,P)};R(g,E=>{typeof e.icon=="string"?E(w):E(I,!1)})}S(y);var C=A(y,2),N=T(C,!0);S(C);var L=A(C,2);av(L,{get enabled(){return r()}}),S(v),D(E=>{$=se(v,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(f,v)},$$slots:{default:!0}}),S(d),D(f=>{var p;s=se(d,1,"item switch-item",null,s,f),Me(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Me(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}Ye(["click","keydown"]);import{isValidURL as DC,VideoQuality as Vb}from"@vkontakte/videoplayer-shared/es2015";var Sb=()=>{let t=K(ci([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};import{getVideoQualityLabel as mC}from"@vkontakte/videoplayer-shared/es2015";var vC=M('<div class="quality-icon s-1q"><!></div>'),gC=M('<div class="quality-label s-1q"><span> </span> <!></div>'),hC={hash:"s-1q",code:".quality-label.s-1q{position:relative}.quality.s-1q{font-size:13px;line-height:18px}.quality.sub.s-1q{opacity:.7}.quality-icon.s-1q{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1q svg{color:var(--blue-light)}"};function el(t,e){B(e,!0),Q(t,hC);let i=h(e,"isSubCase",3,!1),o=m(()=>e.quality?mC(e.quality):""),r=m(()=>zu(e.quality));var a=gC(),l=T(a);let d;var s=T(l,!0);S(l);var u=A(l,2);{var f=p=>{var v=vC();let $=m(()=>n(r));var y=T(v);Fi(y,()=>n($),(g,w)=>{w(g,{})}),S(v),D(()=>Me(v,"data-testid",`${n(o)}-icon`)),b(p,v)};R(u,p=>{n(r)&&!e.isMobile&&p(f)})}S(a),D(p=>{d=se(l,1,"s-1q",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as _C}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Cb}from"@vkontakte/videoplayer-core/es2015";var Tb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Ib=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Tb({quality:t,availableQualities:e});return i?t===Cb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},Eb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Cb.INVARIANT?i:`${i}${Tb({quality:t,availableQualities:e})}`:"...";var bC=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),$C={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Yl(t,e){B(e,!0),Q(t,$C);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(f,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&r()!==_C.INVARIANT?p:"")),$=m(()=>Eb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=bC(),g=T(y);let w=m(()=>e.selected?r():void 0);el(g,{get quality(){return n(w)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var yC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},xC={br:!0,span:!0},dv=(t,e={})=>{var d,s,u,f,p,v,$;if(!t)return t;let i=Ee(Ee({},xC),e),o=Object.keys(i);if(!o.length)return t;let r=yC(o),a=[],l=0;for(let y of t.matchAll(r)){let g=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+g.length;continue}let C=(p=y.groups)!=null&&p.childrenhtml?dv(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?g.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>C||""):g;a.push(t.slice(l,I),N),l=I+g.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function bc(t,e){B(e,!1);let i=h(e,"message",8),o=dv(i());yo();var r=Le(),a=ce(r);{var l=d=>{var s=Le(),u=ce(s);Cd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var wC=M('<p class="quality-applies sublabel s-1t"><!></p>'),SC={hash:"s-1t",code:".quality-applies.s-1t{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function cv(t,e){B(e,!1),Q(t,SC),yo();var i=wC(),o=T(i);let r=Sn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));bc(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var kb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:G("other_quality"),selected:o,valueComponent:Yl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},uv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?Yl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Ab=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:cv,bottomBordered:!0,children:"quality-appliance"}),pv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:G("high_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),fv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:G("traffic_saving_quality"),valueComponent:t?Yl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var np=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),rp=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=oc(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return G("audio_stream_display_language_label",{language:r,label:o});{let s=np(t,d);return G("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=np(t,d);return G("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=np(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=np(t,e);return G("audio_stream_display_unknown",{index:a})};var CC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:uv,selected:e&&!o&&!r||!1}),a.push({handler:fv,selected:o},{handler:pv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[Ab(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),kb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:G("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:el,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:G("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:uv,selected:((i=Cu())==null?void 0:i.type)==="auto_quality"},{handler:fv,selected:((o=Cu())==null?void 0:o.type)==="traffic_saving"},{handler:pv,selected:((r=Cu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:G("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:rp(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:G("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:G("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Ln?"sub_off":void 0}))})},Lb=({subMenuId:t,context:e})=>t?[CC[t](e)]:[];var TC=Ce('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function mv(t){Ze(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=TC();b(e,o)},$$slots:{default:!0}})}var IC=Ce('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function vv(t){Ze(t,{width:"18",height:"15",children:(e,i)=>{var o=IC();b(e,o)},$$slots:{default:!0}})}var EC=Ce('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function gv(t){Ze(t,{testId:"play-speed-icon",children:(e,i)=>{var o=EC();b(e,o)},$$slots:{default:!0}})}var PC=Ce('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function hv(t){Ze(t,{testId:"download-icon",children:(e,i)=>{var o=PC();b(e,o)},$$slots:{default:!0}})}var kC=Ce('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function _v(t){Ze(t,{testId:"report-icon",children:(e,i)=>{var o=kC();b(e,o)},$$slots:{default:!0}})}var AC=Ce('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function sp(t){Ze(t,{children:(e,i)=>{var o=AC();b(e,o)},$$slots:{default:!0}})}var LC=Ce('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function bv(t){Ze(t,{testId:"info-icon",children:(e,i)=>{var o=LC();b(e,o)},$$slots:{default:!0}})}var MC=M('<div class="menu-item-value-wrapper s-1w"><!></div>'),VC={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function $v(t,e){B(e,!0),Q(t,VC);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(f,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,f=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,$=m(()=>Ib({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=MC(),g=T(y);el(g,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var NC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?G("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_quality",{actual:o}),icon:Yd,label:G("menu_quality"),value:e,valueComponent:$v,weight:ts["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ts["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:mv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=rp(t,e);return{id:"audio-tracks-settings",weight:ts["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:vv,label:G("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:ts["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:gv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ts["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:la,iconProps:{type:"outline"},label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ts.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:hv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ts.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:_v,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ts["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:sp,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ts["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:sp,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ts["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:bv,isHiddenFor:["desktop"]})},Mb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>NC[r](e)),...i.map(r=>Gt(Ee({},r),{isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Fa)};var BC=(t,e)=>{Nu(t,e)},FC=M('<div><div> </div> <div class="close s-t"></div></div>'),HC=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),UC=M("<div><!> <!></div>"),zC={hash:"s-t",code:'.settings-menu-container.mobile.s-t{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-t ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-t .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-t .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-t .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-t .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-t .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-t .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-t{line-height:40px}.settings-menu.desktop.s-t{min-width:300px}.settings-menu-container.s-t .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-t .menu.mobile.hidden{display:none}.settings-menu-container.s-t .menu .item:not(.switch-item),.settings-menu-container.s-t .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-t .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-t .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-t .item:not(.switch-item),.settings-menu.s-t .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-t .item.mobile:not(.switch-item),.settings-menu.s-t .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-t .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-t .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-t .item.header.mobile:where(.s-t){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-t .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-t .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-t .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-t .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-t .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-t{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-t:after,.close.s-t:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-t:before{transform:rotate(45deg)}.close.s-t:after{transform:rotate(-45deg)}'};function $c(t,e){B(e,!0),Q(t,zC);let[i,o]=Re(),r=()=>x(Be,"$settingsMenuVisible",i),a=()=>x(it,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Fe,"$debugPanelVisible",i),d=()=>x(Ae,"$isMobile",i),s=()=>x(Ie,"$playerSize",i),u=()=>x(De,"$hasMpegSources$",i),f=()=>x(ke,"$mobileNotReportControlHidden$",i),p=()=>x(J,"$autoQualityLimitingAvailable$",i),v=()=>x(Z,"$availableSubtitlesList$",i),$=()=>x(ze,"$isLiveWithPlaybackSpeed",i),y=()=>x(re,"$availableAudioStreams$",i),g=()=>x(Ke,"$availablePlaybackRates$",i),w=()=>x(pe,"$currentAudioStream$",i),I=()=>x(k,"$currentPlaybackRate$",i),C=()=>x(tt,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),L=()=>x(Ne,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),P=()=>x(ft,"$additionalSettingsMenuItems$",i),q=()=>x(fe,"$isAutoQualityAvailable$",i),H=()=>x($e,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),j=h(e,"ref",15,void 0),ae=h(e,"playerControlsHeight",3,0),X=ci({}),ne=ci({}),ee=ve(),we=Mt(),pe=ee.state.audioStream$,re=ee.state.availableAudioStreams$,_e=ee.state.currentQuality$,$e=ee.state.availableQualities$,J=ee.state.autoQualityLimitingAvailable$,Ne=ee.state.isAutoQualityEnabled$,fe=ee.state.isAutoQualityAvailable$,k=ee.state.currentPlaybackRate$,Ke=ee.state.availablePlaybackRates$,Te=ee.state.currentSubtitle$,Z=ee.state.availableSubtitlesList$,ie=ee.state.canDownload,De=ee.state.hasMpegSources$,Be=ee.ui.settingsMenu.visible$,it=ee.ui.settingsMenu.openedByBtnKeyboard$,U=ee.ui.settingsMenu.ref$,Ae=ee.ui.isMobile,ke=ee.ui.mobileNotReportControlHidden$,ze=ee.state.canChangePlaybackSpeed$,tt=ee.state.trafficSavingEnabled$,ye=ee.state.highQualityEnabled$,Ie=ee.ui.playerSize,Fe=ee.ui.debugPanelVisible,Nt=ee.state.isInteractiveTime$,ft=ee.ui.additionalSettingsMenuItems$,Bt=ee.ui.t,lt=ee.actions.internal.downloadVideo,xt=ee.actions.internal.closeSettingsMenu,ii=ee.actions.internal.openSettingsSubMenu,Pt=ee.actions.internal.closeSettingsSubMenu,Ot=K(!1),Ft=K(void 0),Y=Sb();Oe(()=>{!r()&&Y.current&&(Pt(ne[Y.current]),Y.popAllSubMenus())}),Oe(()=>{r()||O(Ft,void 0)}),Oe(()=>{!Y.current&&n(Ft)&&B_(X,n(Ft))}),Oe(()=>{j()&&U.set(j())});function Se(wt){return vt(this,null,function*(){var W;Y.pushSubMenu(wt),yield vo(),ii(wt,ne[wt]);let zt=(W=j())==null?void 0:W.firstElementChild;zt&&Kf(zt)})}function le(wt){var zt;wt==null||wt.stopPropagation(),a()||(zt=e.returnFocus)==null||zt.call(e),xt(),O(Ot,!1)}function he(wt,zt){ee.actions.internal.setQuality(wt,{appliesTo:zt,byUser:!0}),le()}function Ve(wt){ee.actions.internal.setAudioStream(wt),le()}function rt(wt,zt){ee.actions.internal.setTrafficSavingEnabled(wt,zt),we.features.qualityDetailsSubMenuEnabled&&le()}function pt(wt,zt){ee.actions.internal.setHighQualityEnabled(wt,zt),le()}function ue(wt){ee.actions.internal.setPlaybackRate(wt),le()}function We(wt){ee.actions.internal.setSubtitle(wt),le()}function Ge(){lt()}function dt(){DC(e.supportLink)&&window.open(e.supportLink,"_blank"),ee.actions.internal.reportProblem(),ee.actions.internal.pause()}function Ht(){Rl(ee.actions.internal.getDebugTextData())}let Ut=()=>{let wt=ee.actions.internal.getTraceTextData(),zt=new Blob([...wt],{type:"application/json"}),W=window.URL.createObjectURL(zt);Ra(W,"vk_player_trace_info","json")};function oi(){Fe.set(!l())}function _i(){O(Ot,!0)}function Yi(){O(Ot,!1)}function Vt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let fi=m(()=>ie&&u()&&!f()),vi=m(()=>we.features.trafficSaving&&!f()&&p()&&!we.features.qualityDetailsSubMenuEnabled),ht=m(()=>v().length>0&&!f()),Zt=m(()=>!!$()&&!f()),yi=m(()=>we.features.audioLanguages&&y().length>=2&&!f()),ji=m(()=>!f());Lt(()=>Nt.subscribe(wt=>{wt&&!d()&&!n(Ot)&&!a()&&le()}));let ei=m(()=>{let wt=[n(ji)&&"quality-settings",n(yi)&&"audio-tracks-settings",n(Zt)&&"playback-rate-settings",n(ht)&&"subtitles-settings",n(vi)&&"traffic-saving-switch",n(fi)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(zt=>!!zt);return Mb({items:wt,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:g(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ue,trafficSavingEnabled:C(),toggleTrafficSaving:rt,currentQuality:N()||Vb.INVARIANT,isAutoQualityEnabled:L()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Ge,onCopyDataClick:Ht,onReportProblemClick:dt,onSaveTraceDataClick:Ut,toggleShowDebugInfo:oi},additionalSettingsMenuItems:P()})}),Tt=m(()=>Lb({subMenuId:Y.current,context:{availablePlaybackRates:g(),selectPlaybackRate:ue,trafficSavingEnabled:C(),toggleTrafficSaving:rt,currentQuality:N()||Vb.INVARIANT,isAutoQualityEnabled:L()||!1,isAutoQualityAvailable:q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:pt,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:xt,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:Ve,selectQuality:he,selectSubtitle:We}}));var qe=UC();let bi;var wo=T(qe);{var Ro=wt=>{var zt=HC();let W;zt.__keydown=[BC,xt];var kt=T(zt);{var li=Yt=>{var nt=FC();let Hi;var Ui=T(nt),en=T(Ui,!0);S(Ui);var Oo=A(Ui,2);Oo.__click=le,S(nt),D((ro,Vi)=>{Hi=se(nt,1,"item header s-t",null,Hi,ro),me(en,Vi)},[()=>({mobile:d()}),()=>Bt("submenu_settings")]),b(Yt,nt)};R(kt,Yt=>{d()&&Yt(li)})}var ct=A(kt,2);let St;$i(ct,21,()=>n(ei),Yt=>Yt.id,(Yt,nt)=>{var Hi=Le(),Ui=ce(Hi);{var en=ro=>{rv(ro,{get isMobile(){return d()},get id(){return n(nt).id},get icon(){return n(nt).icon},get iconProps(){return n(nt).iconProps},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get value(){return n(nt).value},get valueComponent(){return n(nt).valueComponent},onClick:()=>{Se(n(nt).children),O(Ft,n(nt).id,!0)},get ref(){return X[n(nt).id]},set ref(Vi){X[n(nt).id]=Vi}})},Oo=(ro,Vi)=>{{var Or=ho=>{let Ai=m(()=>`${n(nt).id}-menu-item`);sv(ho,{get isMobile(){return d()},get id(){return n(Ai)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},closeSettings:le})},go=(ho,Ai)=>{{var tn=Do=>{let Mn=m(()=>`${n(nt).id}-menu-item`);lv(Do,{get isMobile(){return d()},get id(){return n(Mn)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get enabled(){return n(nt).enabled},get tooltipText(){return n(nt).tooltipText},get maxTooltipWidth(){return n(nt).maxTooltipWidth}})};R(ho,Do=>{n(nt).type==="SWITCH"&&Do(tn)},Ai)}};R(ro,ho=>{n(nt).type==="CLICK"?ho(Or):ho(go,!1)},Vi)}};R(Ui,ro=>{n(nt).type==="OPEN_SUB_MENU"?ro(en):ro(Oo,!1)})}b(Yt,Hi)}),S(ct),Xe(ct,Yt=>j(Yt),()=>j()),S(zt),D((Yt,nt,Hi)=>{W=se(zt,1,"settings-menu menu s-t",null,W,Yt),St=se(ct,1,"items",null,St,nt),Qe(ct,Hi)},[()=>({desktop:!d(),mobile:d(),hidden:!!Y.current}),()=>({mobile:d()}),Vt]),at("mouseenter",zt,_i),at("mouseleave",zt,Yi),b(wt,zt)};R(wo,wt=>{r()&&wt(Ro)})}var No=A(wo,2);$i(No,17,()=>n(Tt),wt=>wt.id,(wt,zt)=>{let W=m(()=>{var kt;return(kt=n(zt).minWidth)!=null?kt:137});nv(wt,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return Y.popSubMenu},get id(){return n(zt).id},get title(){return n(zt).title},get closeSettingsMenu(){return xt},openSubMenuList:Se,get items(){return n(zt).items},get minWidth(){return n(W)},get refMenuItems(){return X},get listRef(){return ne[n(zt).id]},set listRef(kt){ne[n(zt).id]=kt}})}),S(qe),D(wt=>bi=se(qe,1,"settings-menu-container s-t",null,bi,wt),[()=>({mobile:d(),hidden:!r()})]),b(t,qe),F(),o()}Ye(["keydown","click"]);var WC=M('<button class="btn s-1e"> </button>'),KC={hash:"s-1e",code:"button.btn.s-1e{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function yv(t,e){Q(t,KC);var i=WC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);S(i),D(()=>me(o,e.label)),b(t,i)}Ye(["click"]);var qC=M('<div class="container s-10"><div class="notification s-10"><div><p class="description s-10"><!></p> <!></div> <!></div></div>'),QC={hash:"s-10",code:".container.s-10{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-10{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-10{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function yc(t,e){B(e,!0),Q(t,QC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Mt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=qC(),d=T(l),s=T(d),u=T(s),f=T(u);bc(f,{get message(){return a}}),S(u);var p=A(u,2);{var v=y=>{let g=m(()=>r("slow_video_notification_button"));yv(y,{get label(){return n(g)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(v)})}S(s);var $=A(s,2);Vs($,{get onClick(){return e.onClose}}),S(d),S(l),Zr(3,d,()=>bs,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Rb,Subscription as GC}from"@vkontakte/videoplayer-shared/es2015";var tl="annotation",ap=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;return this.disabledIds.has(r)?{success:!1,message:"current slotId is disabled via config"}:(e.setAttribute("slot",tl),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1)),{success:!0})}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(r,a){return vt(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},f=new MutationObserver($=>$.forEach(()=>{let y=Ns(d,this.shadowRootContainer);o.forEach(g=>{let w=s==null?void 0:s[g],I=w?ge(w):null,C=u==null?void 0:u[g];I&&(C==null||C.set(Rb(I,y)))})}));f.observe(d,{childList:!0,subtree:!0}),l.observer=f;let p=new GC;o.forEach($=>{s&&p.add(s[$].subscribe(y=>{let g=u==null?void 0:u[$];y&&y.isDisplayed?g==null||g.set(Rb(y,Ns(d,this.shadowRootContainer))):g==null||g.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return vt(this,null,function*(){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,$;($=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var YC=M('<div class="container s-6"><!></div>'),jC={hash:"s-6",code:".container.s-6{align-items:center;animation-fill-mode:forwards;animation-name:s-6-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-6-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function xc(t,e){B(e,!0),Q(t,jC);let i=h(e,"reversed",3,!1);var o=Le(),r=ce(o);ks(r,()=>e.Icon,a=>{var l=YC(),d=T(l);Fi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),D(()=>Qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as Nb}from"@vkontakte/videoplayer-core/es2015";var XC=M('<div class="container s-x"><!></div>'),ZC={hash:"s-x",code:".container.s-x{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function xv(t,e){B(e,!0),Q(t,ZC);let[i,o]=Re(),r=()=>x(s,"$playbackState$",i),a=()=>x(f,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=ve(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:$}=Mt(),y=0,g=K(null),w=K(!1);Oe(()=>{r()===Nb.PLAYING?O(g,An,!0):r()===Nb.PAUSED?O(g,Bs,!0):O(g,null)}),Oe(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,O(g,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Oe(()=>{d()&&!n(w)&&(O(w,!0),O(g,null))});var I=Le(),C=ce(I);{var N=L=>{var E=XC(),P=T(E);xc(P,{get duration(){return $},get Icon(){return n(g)}}),S(E),b(L,E)};R(C,L=>{n(g)&&v&&L(N)})}b(t,I),F(),o()}var JC=M('<div><div data-testid="video-container"></div></div>'),eT={hash:"s-c",code:".video-container.s-c,.video-wrapper.s-c{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-c{background:var(--black)}.video-container.s-c,.video-wrapper.s-c{z-index:var(--video-container-z-index)}.video-container.s-c{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-c{transition:none}.nocursor.s-c{cursor:none}"};function il(t,e){B(e,!0),Q(t,eT);let[i,o]=Re(),r=()=>x(p,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(f,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),s=()=>x($,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:$,chromecastConnected$:y}}=ve(),{isSmoothVideoRotate:g}=Mt(),w=m(()=>u()&&r()%180?a().height/a().width:1);var I=JC();let C;I.__contextmenu=function(...E){var P;(P=e.onContextMenu)==null||P.apply(this,E)},I.__mousedown=function(...E){var P;(P=e.onMouseDown)==null||P.apply(this,E)},I.__mouseup=function(...E){var P;(P=e.onMouseUp)==null||P.apply(this,E)},I.__click=function(...E){var P;(P=e.onClick)==null||P.apply(this,E)},I.__dblclick=function(...E){var P;(P=e.onDblClick)==null||P.apply(this,E)};var N=T(I);let L;Xe(N,E=>u(E),()=>u()),S(I),D((E,P)=>{C=se(I,1,"video-wrapper s-c",null,C,E),L=se(N,1,"video-container s-c",null,L,P),Qe(N,`transform: rotate(${r()}deg) scale(${n(w)})`),Me(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!g})]),b(t,I),F(),o()}Ye(["contextmenu","mousedown","mouseup","click","dblclick"]);var tT=M('<div><span class="text s-y"> </span> <!></div>'),iT={hash:"s-y",code:".root.s-y{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-y,.root.visible.s-y{transform:translateX(-50%)}.root.visible.s-y{opacity:1;visibility:visible}.text.s-y{font-size:13px;font-weight:600;line-height:16px}"};function wv(t,e){B(e,!0),Q(t,iT);let{ui:{t:i}}=ve();var o=tT();let r;var a=T(o),l=T(a,!0);S(a);var d=A(a,2);mc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=se(o,1,"root s-y",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var oT=M('<div class="container s-z" role="button" data-testid="preview-track-overlay"><div class="icon s-z"><!></div></div>'),nT={hash:"s-z",code:".container.s-z{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-z,.icon.s-z{align-items:center;display:flex;justify-content:center}.icon.s-z{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-z:hover .icon:where(.s-z){transform:scale(1.15)}"};function Sv(t,e){B(e,!1),Q(t,nT);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};yo();var l=oT();l.__click=a;var d=T(l),s=T(d);return An(s,{get size(){return"32"}}),S(d),S(l),Zr(3,l,()=>bs,()=>({duration:r})),b(t,l),vf(e,"handleClick",a),F({handleClick:a})}Ye(["click"]);var rT=M('<div class="container s-11"><div class="notification s-11"><span class="text s-11"> </span></div></div>'),sT={hash:"s-11",code:".container.s-11{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-11{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-11{font-size:14px;font-weight:500;line-height:18px}"};function Cv(t,e){B(e,!1),Q(t,sT);let{ui:{t:i}}=ve();yo();var o=rT(),r=T(o),a=T(r),l=T(a,!0);S(a),S(r),S(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],Sn),Zr(3,r,()=>bs,()=>({duration:340})),b(t,o),F()}var aT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},lT=M("<div><!></div>"),dT=M('<div class="spherical-video-icon s-8"><!></div>'),cT=M("<div><!></div>"),uT=M('<div class="settings-menu s-8"><!></div>'),pT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),fT=M("<!> <!> <!>",1),mT=M('<div class="blocked s-8"></div>'),vT=M('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),gT={hash:"s-8",code:".blocked.s-8,.player-wrapper.s-8{height:100%;position:absolute;width:100%}.blocked.s-8{z-index:var(--overlay-container-z-index)}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-8{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function Tv(t,e){B(e,!0),Q(t,gT);let[i,o]=Re(),r=()=>x(di,"$notificationsToShow$",i),a=()=>x(fi,"$playerPhase",i),l=()=>x(wo,"$isLoaderVisible",i),d=()=>x(_i,"$adPlaybackState",i),s=()=>x(li,"$crashed",i),u=()=>x(ro,"$isInteractiveTime$",i),f=()=>x(yi,"$settingsMenuVisible",i),p=()=>x(Vi,"$isInteractiveExpectation$",i),v=()=>x(Zt,"$controlsVisible",i),$=()=>x(go,"$touched",i),y=()=>x(ir,"$graphIsOpened$",i),g=()=>x(vi,"$isFullscreen",i),w=()=>x(is,"$autoplayNextEnabled$",i),I=()=>x(zt,"$postrollPassed",i),C=()=>x(Ro,"$isEnded$",i),N=()=>x(Cr,"$cursorInside",i),L=()=>x(Jn,"$isControlsAvailable",i),E=()=>x(on,"$doubleForwardOn$",i),P=()=>x(tr,"$fakeIsPlaying$",i),q=()=>x(Rn,"$bottomNoSmooth",i),H=()=>x(Do,"$interactiveTimeIndicator",i),z=()=>x(Hi,"$playerSize",i),j=()=>x(Ui,"$is3DVideo",i),ae=()=>x(Vn,"$doubleForwardAvailable$",i),X=()=>x(qe,"$contextMenuVisible$",i),ne=()=>x(oi,"$playbackState$",i),ee=()=>x(ho,"$hotKeyMapData",i),we=()=>x(ei,"$scrubbingInProgress",i),pe=()=>x(Tt,"$volumeChangingInProgress",i),re=()=>x(No,"$chromecastConnected$",i),_e=()=>x(nn,"$controlsTimeoutActive",i),$e=()=>x(ji,"$settingsMenuOpenedByKeyboard",i),J=()=>x(jt,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Ko,"$contextMenuOpenedByHotKey$",i),fe=()=>x(Ti,"$contextMenuButtonRef$",i),k=()=>x(Wr,"$contextMenuLastActiveElem$",i),Ke=()=>x(ht,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Ut,"$language$",i),Z=()=>x(cr,"$previewTrackActive$",i),ie=()=>x(en,"$icon3DVideoVisible",i),De=()=>x(wt,"$chromecastDeviceName$",i),Be=()=>x(Yt,"$currentSubtitle$",i),it=()=>x(nt,"$currentSubtitleCaptions$",i),U=()=>x(Yi,"$position$",i),Ae=()=>x(Vt,"$duration$",i),ke=()=>x(W,"$isLive$",i),ze=()=>x(kt,"$isPlaying$",i),tt=()=>x(yr,"$contextMenuPosition$",i),ye=()=>x(wr,"$previewTrackNotificationVisible$",i),Ie=()=>x(Ai,"$showHotKeyMap",i),Fe=()=>x(bi,"$debugPanelVisible",i),Nt=()=>x(os,"$userActionsDisabled$",i),ft=h(e,"videoContainer",15),Bt=h(e,"adsSlotId",3,void 0),lt=h(e,"adsParams",3,void 0),xt=h(e,"adsAutoplayParam",3,void 0),ii=h(e,"duration",3,void 0),Pt=h(e,"logoTargetUrl",3,""),Ot=h(e,"showNextPrevButtons",3,!1),Ft=h(e,"nextButtonActive",3,!1),Y=h(e,"prevButtonActive",3,!1),Se=h(e,"endScreenVideoTitle",3,void 0),le=h(e,"endScreenVideoThumb",3,void 0),he=h(e,"isOneVideoPlaylist",3,!1),Ve=h(e,"shadowRootContainer",3,void 0),rt=h(e,"outerContainerRef",3,void 0),pt=h(e,"playerStarted",3,!1),ue=h(e,"fullScreenTarget",3,void 0),We=h(e,"showMiniTimer",3,!1),Ge=h(e,"showEndScreen",3,!0),dt=h(e,"keyboardControls",15),Ht=e.store.getLogger().createComponentLog("Root component"),Ut=e.store.interfaceLanguage$,oi=e.store.state.playbackState$,_i=e.store.ads.playbackState,Yi=e.store.state.positionWithScrubbing$,Vt=e.store.state.duration$,fi=e.store.playerPhase,vi=e.store.ui.isFullscreen,ht=e.store.ui.isFullscreenOpenedByKeyboard,Zt=e.store.ui.controlsVisible,yi=e.store.ui.settingsMenu.visible$,ji=e.store.ui.settingsMenu.openedByBtnKeyboard$,ei=e.store.ui.scrubbingInProgress,Tt=e.store.ui.volumeChangingInProgress,qe=e.store.ui.contextMenu.visible$,bi=e.store.ui.debugPanelVisible,wo=e.store.state.isLoaderVisible,Ro=e.store.state.isEnded$,No=e.store.state.chromecastConnected$,wt=e.store.state.chromecastDeviceName$,zt=e.store.ads.postrollPassed,W=e.store.state.isLive$,kt=e.store.state.isPlaying$,li=e.store.state.crashed$,ct=e.store.webApi.annotationsApi,St=e.store.webApi.pictureInPictureApi,Yt=e.store.state.currentSubtitle$,nt=e.store.state.currentSubtitleCaptions$,Hi=e.store.ui.playerSize,Ui=e.store.ui.is3DVideo,en=e.store.ui.icon3DVideoVisible,Oo=e.store.state.isInteractive,ro=e.store.state.isInteractiveTime$,Vi=e.store.state.isInteractiveExpectation$,Or=e.store.state.hasInteractiveBranches,go=e.store.ui.touched,ho=e.store.ui.modals.hotKeyMap.data,Ai=e.store.ui.modals.hotKeyMap.show,tn=e.store.ui.overlayContainer$,Do=e.store.ui.controls.interactiveTimeIndicator,Mn=e.store.state.showInteractiveTimeIndicator,yr=e.store.ui.contextMenu.position$,xr=e.store.actions.internal.setQuality,$s=e.store.actions.internal.closeSettingsMenu,is=e.store.ui.autoplayNextEnabled$,os=e.store.ui.userActionsDisabled,Jn=e.store.ui.isControlsAvailable,Dr=e.store.ui.videoTitleInfo,on=e.store.ui.doubleForwardOn$,Vn=e.store.ui.doubleForwardAvailable$,wr=e.store.ui.previewTrackNotificationVisible,Bo=e.store.actions.internal.getVideoElement,er=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:tr,notifications$:Br,graphIsOpened$:ir}=xo(),so=K(void 0),Fr=K(void 0),or=K(void 0),mn=K(void 0),_o,Sr,nr;ho.set(A_());let{closeNotification:mt,notificationsToShow$:di}=Br,Hr=m(()=>!!r().slow_video),rr=()=>mt("slow_video"),Ur=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),Fo=K(void 0),Rn=de(!1),vn,nn=de(!1),gn=de(),Cr=de(!1),Ho=K(!1),Uo=K(!1),hn=K(!1),Tr=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),xi=m(()=>u()&&!f()&&!(n(Ho)||n(Uo))&&!(n(hn)&&!p())),_n=!0,Nn=m(()=>e.uiConfig.features.thumbTimer&&We()&&a()==="video"&&!v()&&!s()&&!Oo&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),sr=e.uiConfig.titleShowBehaviour,Ir=m(()=>!["video","thumb"].includes(a())||sr==="never"||y()?!1:sr==="fullscreen"?g():!0),On=m(()=>sr==="always"||a()==="thumb"?!1:!v()),rn=K(!1),$t=m(()=>(Ge()||e.showAutoplayNext&&w())&&!!Se()&&!!le()&&(e.showAds&&I()||!e.showAds)&&C()&&!s()&&!n(rn)),It=m(()=>N()&&!(v()||n($t))&&!u()&&L()&&!E()),ao=K(!1),So=m(()=>P()!==null),{toggle:Co}=tr,lo=!1,Ni=null;St==null||St.setContext(ld());let Dn=()=>{e.autoplay&&!Oo&&e.uiConfig.controls.showOnStartupAtAutoplay&&Li(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Dn});let Xi=()=>{window.clearTimeout(_o),nn.set(!1)},zr=()=>{window.clearTimeout(Sr),gn.set(null)},Li=be=>{Xi(),nn.set(!0),_o=window.setTimeout(()=>nn.set(!1),be);let yt=be-100;vn=window.setTimeout(()=>{q()&&Rn.set(!1)},yt>0?yt:be)},ys=(be,yt)=>{zr(),gn.set(yt),Sr=window.setTimeout(()=>gn.set(null),be)},ns=Ui.subscribe(be=>{en.set(be),be&&(window.clearTimeout(nr),nr=window.setTimeout(()=>en.set(!1),e.uiConfig.controls.hide360IconTimeout))}),rs=()=>vt(null,null,function*(){var yt,Dt,ti,Ii;let be=oa();if(be){let Ei=Nd(),Mi=ar();be=Ei===Mi||Ei===Ve()}if(be){Li(e.uiConfig.controls.hideTimeoutFullscreen);try{yield St==null?void 0:St.exit()}catch(Ei){Ht({message:String(Ei)})}}vi.set(be),e.store.getAdmanWrapper().setFullscreen(be),g()?(Dt=(yt=e.store.callbacks)==null?void 0:yt.onFullscreenEnter)==null||Dt.call(yt):(Ii=(ti=e.store.callbacks)==null?void 0:ti.onFullscreenExit)==null||Ii.call(ti)}),Er=be=>{let{width:yt,height:Dt}=be.target;Hi.set({width:yt,height:Dt})},sn=()=>{let{width:be,height:yt}=n(so).getBoundingClientRect();Hi.set({width:be,height:yt})};Lt(()=>{var yt;return Vu(rs),e.uiConfig.features.annotationsInside&&(ct==null||ct.init(n(so))),Da(St)&&(St==null||St.assignPlayerContainer(n(so)),St==null||St.setExternalEventHandlers({resize:Er,leavepictureinpicture:sn})),e.interactiveContainer&&((yt=ft().parentElement)==null||yt.insertBefore(e.interactiveContainer,ft().nextSibling)),()=>{window.clearTimeout(_o),window.clearTimeout(vn),window.clearTimeout(Sr),window.clearTimeout(nr),ns(),St==null||St.dispose().catch(Dt=>{Ht({message:String(Dt)})}),Ru(rs)}});let ar=()=>{let be=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!rt()?n(so):rt(),yt=be.getRootNode(),Dt=yt instanceof ShadowRoot?yt.host:yt,ti=ue()instanceof HTMLElement&&ue().contains(Dt);return e.uiConfig.allowChangingFullscreenTarget&&ue()&&ti?ue():be},To=()=>{qe.set(!1)},Io=()=>{$s(),To()},lr=()=>vt(null,null,function*(){if(!er()){Ht({message:"fullscreen disabled"});return}To(),oa()?(yield Mu(document),Ht({message:"exit fullscreen"})):(Ht({message:"request fullscreen"}),yield Lu(ar()))}),Ue=be=>{y()||(be.preventDefault(),qe.set(!0),yr.set({left:be.clientX,top:be.clientY}))};function At(){Cr.set(!0),Oo||Li(e.uiConfig.controls.hideTimeoutCursor)}function wi(be){var Ii,Ei;let{relatedTarget:yt}=be,ti=!!(yt&&((Ii=n(or))!=null&&Ii.contains(yt)))&&((Ei=dt())==null?void 0:Ei.isFocused());!Oo&&!ti&&(Rn.set(!0),Li(e.uiConfig.controls.hideTimeoutCursor))}function zo(){Cr.set(!1),O(Uo,!1),O(Ho,!1),lo=!1,e.store.actions.internal.releaseCamera(),Li(e.uiConfig.controls.hideTimeout),E()&&Zi()}function co(be){return be?be.offsetTop+co(be.offsetParent):0}function Eo(be){return be?be.offsetLeft+Eo(be.offsetParent):0}function uo(be){if(H()&&Mn){let yt=be.currentTarget,Dt=co(yt),ti=Eo(yt),Ii=be.pageX-ti,Ei=be.pageY-Dt,{left:Mi,bottom:Si,right:ss}=H(),Ws=ss-Mi;return Ii>=Mi-Ws&&Ei<=Si+Ws}}function Wo(be){if(n(so)){let yt=co(be.currentTarget),Dt=z().height,ti=be.pageY-yt;if(uo(be)){O(Uo,!1);return}ti<40?O(Uo,!0):ti>Dt-40?O(Ho,!0):(O(Uo,!1),f()||O(Ho,!1))}}function Bn(be){Wo(be),!n(xi)&&!E()&&Li(e.uiConfig.controls.hideTimeoutCursor),j()&&lo&&Ni&&e.store.actions.internal.moveCameraFocusPX(Ni.clientX-be.clientX,Ni.clientY-be.clientY,be.timeStamp-Ni.timeStamp),Ni=be}let an=null,bo=()=>{an=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Xi()},e.uiConfig.doubleForwardActivationTime)},Zi=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),an&&clearTimeout(an),an=null},Fn=be=>{be.preventDefault(),be.button===0&&(lo=!0,e.store.actions.internal.holdCamera(),ae()&&bo()),!lo&&Li(e.uiConfig.controls.hideTimeoutCursor)},Hn=be=>{be.preventDefault(),be.button===0&&(Ni=be,lo=!1,e.store.actions.internal.releaseCamera()),!E()&&Li(e.uiConfig.controls.hideTimeoutCursor)},Un=be=>{be.preventDefault(),_n&&(Ht({message:"double click on video"}),lr(),Li(e.uiConfig.controls.hideTimeoutCursor))},Pr=be=>{var yt;if(be.preventDefault(),E()){Zi();return}if(an&&Zi(),X()||f()){Io();return}if(!(C()&&!Or)){if(n(So))return Co();if((yt=dt())==null||yt.focus(),!pt()){e.firstStart(),Li(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==Db.PLAYING)&&e.store.actions.internal.togglePlay(),Li(e.uiConfig.controls.hideTimeoutCursor)}},dr=be=>{Io(),go.set(!0),Li(e.uiConfig.controls.hideTimeout),be&&ys(e.uiConfig.controls.hideHotKeyHelpers,be)},xs=()=>{var be,yt;Io(),(be=e.store.callbacks)!=null&&be.onOpenHotKeyMap?(yt=e.store.callbacks)==null||yt.onOpenHotKeyMap(ee()):Ai.update(Dt=>!Dt)},Je=()=>{go.set(!0)},jt=e.store.ui.contextMenu.openedByBtnKeyboard$,Ti=e.store.ui.contextMenu.btnRef$,$o=K(void 0),Ko=e.store.ui.contextMenu.openedByHotKey$,Wr=e.store.ui.contextMenu.lastActiveElem$,Po=K(!1),cr=e.store.ui.previewTrackActive;Oe(()=>{tn.set(n(Fo))}),Oe(()=>{O(hn,n(Tr)&&ne()!==Db.PLAYING,!0),n(Tr)||Ct(()=>O(Tr,!0))}),Oe(()=>{var yt,Dt;let be=(n(hn)||C()||f()||we()||pe()||re()||_e()||n(Po))&&!n(xi)&&(a()==="video"||a()==="ads")&&!s()&&L();Zt.set(be),!be&&!_e()&&((yt=n(or))!=null&&yt.contains(Uu()))&&((Dt=dt())==null||Dt.focus())}),Oe(()=>{!we()&&n(ao)&&!u()&&Li(e.uiConfig.controls.hideTimeoutCursor),Ct(()=>O(ao,we(),!0))}),Oe(()=>{n(mn),f(),$e(),Ct(()=>zd(n(mn),f(),$e()))}),Oe(()=>{n($o),X(),J(),Ne(),Ct(()=>{let be=J()||Ne();zd(n($o),X(),be)})}),Oe(()=>{let be=fe();be&&(X(),Ct(()=>Nl(be,X(),jt)))}),Oe(()=>{let be=k();be&&(X(),Ct(()=>D_(be,X(),Ko)))}),Oe(()=>{var be;!Ke()&&g()&&(Ct(()=>ht.set(!1)),(be=dt())==null||be.focus())}),Oe(()=>{y()&&Io()});let zn=K(void 0),ua=be=>{Dr.set(Xn(Bo(),{title:n(zn)},"title",be))},Us=(be,yt)=>{var Ei,Mi;let Dt=(Mi=(Ei=e.store.callbacks)==null?void 0:Ei.uiInfo)==null?void 0:Mi.onUpcomingLiveViewStateChanged;if(!Dt)return;let ti=!!yt,Ii=Ee(Ee({},Xn(n(so),{upcomingLiveScreen:yt},"upcomingLiveScreen",ti)),be);Dt(Ii)};var zs=vT();at("blur",Ia,Io);var bn=ce(zs);bn.__mousemove=Bn;var st=T(bn);let pi=m(()=>a()==="ads"),Oi=m(()=>n(So)?Co:void 0);Xe(Xf(st,{startDoubleForwardActivationTimer:bo,stopDoubleForward:Zi,toggleFullscreen:lr,hideContextMenu:Io,showHotKeyHelpers:dr,showKeyMap:xs,get isAds(){return n(pi)},get fakePlayButtonHandler(){return n(Oi)},get nextButtonActive(){return Ft()},get prevButtonActive(){return Y()},children:(be,yt)=>{var Dt=fT(),ti=ce(Dt);il(ti,{get hideCursor(){return n(It)},onClick:Pr,onContextMenu:Ue,onMouseDown:Fn,onMouseUp:Hn,onDblClick:Un,get videoContainer(){return ft()},set videoContainer(Mi){ft(Mi)}});var Ii=A(ti,2);Ma(Ii,()=>"slot",!1,(Mi,Si)=>{io(Mi,()=>({name:tl}))});var Ei=A(Ii,2);ks(Ei,Te,Mi=>{var Si=pT(),ss=ce(Si);let Ws=m(()=>a()!=="thumb"||s()||Oo&&e.autoplay);Za(ss,{get hidden(){return n(Ws)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ue,onClick:To});var ol=A(ss,2);{var pa=He=>{Sv(He,{})};R(ol,He=>{Z()&&He(pa)})}var fa=A(ol,2);xv(fa,{});var as=A(fa,2);wv(as,{get isVisible(){return E()}});var ws=A(as,2);{var ma=He=>{let hi=m(()=>{var qo;return(qo=e.live)==null?void 0:qo.startTime});hc(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(hi)},onUpcomingLiveViewStateChanged:Us,onContextMenu:Ue,onClick:To})};R(ws,He=>{a()==="LiveWaitingStart"&&He(ma)})}var va=A(ws,2);{var xn=He=>{Ja(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:To})};R(va,He=>{a()==="LiveWaitingRecover"&&He(xn)})}var Ss=A(va,2);{var nl=He=>{Ja(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:To})};R(Ss,He=>{a()==="LiveWaitingRecord"&&He(nl)})}var ur=A(Ss,2);{var Zl=He=>{var hi=lT();let qo;var kr=T(hi);Dd(kr,{get adsSlotId(){return Bt()},get adsParams(){return lt()},get adsAutoplayParam(){return xt()},get duration(){return ii()},get adsExternalApi(){return e.adsExternalApi}}),S(hi),D(wn=>qo=se(hi,1,"ads-container s-8",null,qo,wn),[()=>({hidden:a()!=="ads"})]),b(He,hi)};R(ur,He=>{e.showAds&&pt()&&He(Zl)})}var rl=A(ur,2);{var Jl=He=>{let hi=m(()=>!Ge()&&e.showAutoplayNext&&w());Gf(He,{get title(){return Se()},get thumb(){return le()},get isHide(){return n(hi)},clickCloseIcon:()=>O(rn,!0)})};R(rl,He=>{n($t)&&Se()&&le()&&He(Jl)})}var ga=A(rl,2);{var ed=He=>{let hi=m(()=>g()?"md":"sm"),qo=m(()=>{var kr;return(kr=e.store.callbacks)==null?void 0:kr.onTitleClicked});Zm(He,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(On)},onVisibilityChanged:ua,onMouseEnter:()=>{O(Po,!0)},onMouseLeave:()=>{O(Po,!1)},get size(){return n(hi)},get onTitleClicked(){return n(qo)},get ref(){return n(zn)},set ref(kr){O(zn,kr,!0)}})};R(ga,He=>{n(Ir)&&He(ed)})}var sl=A(ga,2);{var al=He=>{let hi=m(()=>a()==="video"&&v());vc(He,{get isShifted(){return n(hi)}})};R(sl,He=>{j()&&He(al)})}var ha=A(sl,2);{var ot=He=>{var hi=dT(),qo=T(hi);Rd(qo,{}),S(hi),b(He,hi)};R(ha,He=>{ie()&&He(ot)})}var ut=A(ha,2);{var Ji=He=>{gc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()},onClick:Pr,onContextMenu:Ue,onDblClick:Un})};R(ut,He=>{re()&&He(Ji)})}var ko=A(ut,2);{var eo=He=>{ja(He,{get shifted(){return v()},get captions(){return it()},get position(){return U()},get playerSize(){return z()}})};R(ko,He=>{Be().value!=="off"&&He(eo)})}var gi=A(ko,2);{var zi=He=>{var hi=cT();hi.__contextmenu=Ue,hi.__click=[aT,X,qe,f,yi,Io];var qo=T(hi);Xa(qo,{}),S(hi),b(He,hi)};R(gi,He=>{s()&&He(zi)})}var Ks=A(gi,2);{var td=He=>{let hi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),qo=m(()=>a()==="ads"),kr=m(()=>e.canRewindLive&&Ae()!==0);fc(He,{get bottomHidden(){return n(hi)},get bottomNoSmooth(){return q()},get showControls(){return v()},get isAds(){return n(qo)},get canRewindLive(){return n(kr)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Pt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ot()},get nextButtonActive(){return Ft()},get prevButtonActive(){return Y()},get isOneVideoPlaylist(){return he()},customFullscreenSupported:_n,toggleFullscreen:lr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Fr)},set playerControlsWrapperRef(wn){O(Fr,wn,!0)},get playerControlsRef(){return n(or)},set playerControlsRef(wn){O(or,wn,!0)}})};R(Ks,He=>{pt()&&He(td)})}var Vc=A(Ks,2);{var $p=He=>{var hi=uT(),qo=T(hi);let kr=m(()=>{var wn;return(wn=n(or))==null?void 0:wn.clientHeight});$c(qo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(kr)},returnFocus:()=>{var wn;return(wn=dt())==null?void 0:wn.focus()},get ref(){return n(mn)},set ref(wn){O(mn,wn,!0)}}),S(hi),b(He,hi)};R(Vc,He=>{!re()&&a()!=="ads"&&He($p)})}var Rc=A(Vc,2);let yp=m(()=>!n(Nn));Hd(Rc,{get isLive(){return ke()},get isHidden(){return n(yp)},get isPlaying(){return ze()},get position(){return U()},get duration(){return Ae()}});var Nc=A(Rc,2);jm(Nc,{get data(){return gn}});var Oc=A(Nc,2);Qf(Oc,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=dt())==null?void 0:He.focus()},get visible(){return X()},get playerContainerRef(){return n(so)},get position(){return tt()},get menuElementRef(){return n($o)},set menuElementRef(He){O($o,He,!0)}});var Dc=A(Oc,2);{var ll=He=>{yc(He,{onClose:rr,onSelectAutoQuality:()=>{xr("auto"),rr()}})};R(Dc,He=>{n(Hr)&&He(ll)})}var Bc=A(Dc,2);{var _a=He=>{Cv(He,{})};R(Bc,He=>{ye()&&He(_a)})}var ba=A(Bc,2);{var xp=He=>{Ua(He,{})};R(ba,He=>{n(Ur)&&He(xp)})}var id=A(ba,2);{var od=He=>{em(He,{})};R(id,He=>{Ie()&&He(od)})}var Fc=A(id,2);{var wp=He=>{qd(He,{})};R(Fc,He=>{Fe()&&He(wp)})}b(Mi,Si)}),b(be,Dt)},$$slots:{default:!0}}),be=>dt(be),()=>dt());var $n=A(st,2);Xe($n,be=>O(Fo,be),()=>n(Fo)),S(bn),Xe(bn,be=>O(so,be),()=>n(so));var Kr=A(bn,2);{var yn=be=>{var yt=mT();b(be,yt)};R(Kr,be=>{Nt()&&be(yn)})}at("mouseenter",bn,At),at("mouseleave",bn,zo),at("click",bn,Je,!0),at("focusin",bn,wi,!0),b(t,zs),F(),o()}Ye(["mousemove","contextmenu","click"]);import{clientChecker as wc,PlaybackState as TT}from"@vkontakte/videoplayer-core/es2015";import{noop as IT}from"@vkontakte/videoplayer-shared/es2015";var hT=M('<div></div> <div class="info s-12"><div class="triangles-wrapper s-12"><div></div> <div></div> <div></div></div> <p class="step-caption s-12"> </p></div>',1),_T=M("<div><!></div>"),bT={hash:"s-12",code:".double-click-area.s-12{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-12{left:0}.double-click-area.right.s-12{right:0}.semicircle.s-12{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-12{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-12{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-12{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-12,.triangles-wrapper.s-12{display:flex;justify-content:center}.triangles-wrapper.s-12{margin-bottom:10px;position:relative}.triangle.s-12{animation:s-12-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-12:nth-child(3),.triangle.right.s-12:first-child{animation-delay:0s}.triangle.left.s-12:nth-child(2),.triangle.right.s-12:nth-child(2){animation-delay:.1s}.triangle.left.s-12:first-child,.triangle.right.s-12:nth-child(3){animation-delay:.2s}@keyframes s-12-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-12{border-right:8px solid var(--white)}.triangle.right.s-12{border-left:8px solid var(--white)}.triangle.s-12:not(:last-child){margin-right:5px}.step-caption.s-12{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function lp(t,e){B(e,!0),Q(t,bT);let i=h(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ci(i())),d=p=>{p.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};cn(()=>{window.clearTimeout(r)});var s=_T();s.__click=d;var u=T(s);{var f=p=>{var v=hT(),$=ce(v),y=A($,2),g=T(y),w=T(g),I=A(w,2),C=A(I,2);S(g);var N=A(g,2),L=T(N,!0);S(N),S(y),D(E=>{var P,q,H,z;se($,1,`semicircle ${(P=e.side)!=null?P:""}`,"s-12"),se(w,1,`triangle ${(q=e.side)!=null?q:""}`,"s-12"),se(I,1,`triangle ${(H=e.side)!=null?H:""}`,"s-12"),se(C,1,`triangle ${(z=e.side)!=null?z:""}`,"s-12"),me(L,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};R(u,p=>{n(o)&&p(f)})}S(s),D(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-12")}),b(t,s),F()}Ye(["click"]);var $T=(t,e,i)=>{e(!1),i()},yT=M('<div class="overlay s-13"></div> <div class="next-video s-13"><div class="top s-13"><div class="caption s-13"> </div> <!></div> <div class="row s-13"><div class="column s-13"><div class="thumb s-13"><div></div> <!></div></div> <div class="column s-13"><div class="title s-13"> </div></div></div></div>',1),xT={hash:"s-13",code:".overlay.s-13{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-13{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-13{display:flex;justify-content:space-between}.caption.s-13{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-13{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-13{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-13{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-13,.thumb-overlay.s-13{height:100%;width:100%}.thumb-overlay.s-13{position:absolute}.thumb-overlay.withOpacity.s-13{background:var(--black);opacity:.3}.title.s-13{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Iv(t,e){B(e,!0),Q(t,xT);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},g=()=>{e.clickCloseIcon(),$()};Lt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ce(w);{var C=N=>{var L=yT(),E=A(ce(L),2),P=T(E),q=T(P),H=T(q,!0);S(q);var z=A(q,2);Vs(z,{onClick:g}),S(P);var j=A(P,2);j.__click=[$T,u,p];var ae=T(j),X=T(ae),ne=T(X);let ee;var we=A(ne,2);{var pe=J=>{Qd(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(pe)})}S(X),S(ae);var re=A(ae,2),_e=T(re),$e=T(_e,!0);S(_e),S(re),S(j),S(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),ee=se(ne,1,"thumb-overlay s-13",null,ee,Ne),me($e,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(C)})}b(t,w),F(),o()}Ye(["click"]);import{clientChecker as wT}from"@vkontakte/videoplayer-core/es2015";var Bb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Lt(()=>{wT.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),cn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as ST}from"@vkontakte/videoplayer-core/es2015";var dp=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as CT}from"@vkontakte/videoplayer-core/es2015";var Fb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),f=()=>CT.device.isIOS&&ge(l)===ST.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=$=>{if(p(),!f()||!$)return;let y=u();if(!y)return;let g=new dp(y),w=ge(d),I=ge(a),C=ge(r);for(let E of w)I.some(q=>q.value===E.id)&&g.attach(E,C.value===E.id);let N=d.subscribe(E=>{for(let P of E)g.updateSrc(P)}),L=()=>{let E=g.getCurrentShowingId();o(ge(a).find(P=>P.value===E))};y.textTracks.addEventListener("change",L),s=()=>{N(),g.detachAll(),y.textTracks.removeEventListener("change",L)}};Lt(()=>i.subscribe(v)),cn(p)};var ET=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},PT=M("<!> <!>",1),kT=M("<div><!></div>"),AT=M('<div class="spherical-video-icon s-9"><!></div>'),LT=M("<div><!></div>"),MT=M('<div class="settings-mobile s-9"><!></div>'),VT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),RT=M('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),NT={hash:"s-9",code:".player-wrapper.s-9{height:100%;position:absolute;width:100%}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-9{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function Ev(t,e){var On,rn;B(e,!0),Q(t,NT);let[i,o]=Re(),r=()=>x(Ve,"$playerPhase",i),a=()=>x(_i,"$isLoaderVisible",i),l=()=>x(Se,"$adPlaybackState",i),d=()=>x(ei,"$crashed",i),s=()=>x(is,"$notificationsToShow$",i),u=()=>x(Y,"$playbackState$",i),f=()=>x(Pt,"$graphIsOpened$",i),p=()=>x(We,"$interactiveHideMobileControls",i),v=()=>x(Yi,"$isEnded$",i),$=()=>x(ct,"$isInteractiveExpectation$",i),y=()=>x(pt,"$controlsVisible",i),g=()=>x(nt,"$touched",i),w=()=>x(Ui,"$autoplayNextEnabled$",i),I=()=>x(vi,"$postrollPassed",i),C=()=>x(Dr,"$bottomNoSmooth",i),N=()=>x(bi,"$videoSize",i),L=()=>x(wt,"$playerSize",i),E=()=>x(rt,"$isFullscreen",i),P=()=>x(le,"$position$",i),q=()=>x(he,"$duration$",i),H=()=>x(en,"$loadedMetadata",i),z=()=>x(Ge,"$settingsMenuVisible",i),j=()=>x(Ht,"$scrubbingInProgress",i),ae=()=>x(Ut,"$volumeChangingInProgress",i),X=()=>x(Vt,"$chromecastConnected$",i),ne=()=>x(ue,"$isControlsAvailable",i),ee=()=>x(li,"$isInteractiveTime$",i),we=()=>x(yi,"$isActiveLive",i),pe=()=>x(dt,"$settingsMenuOpenedByKeyboard",i),re=()=>x(Ft,"$language$",i),_e=()=>x(Yt,"$disabledControls$",i),$e=()=>x(zt,"$is3DVideo",i),J=()=>x(W,"$icon3DVideoVisible",i),Ne=()=>x(fi,"$chromecastDeviceName$",i),fe=()=>x(wo,"$currentSubtitle$",i),k=()=>x(Ro,"$currentSubtitleCaptions$",i),Ke=()=>x(No,"$realDuration$",i),Te=()=>x(ht,"$isLive$",i),Z=()=>x(Zt,"$isPlaying$",i),ie=()=>x(oi,"$debugPanelVisible",i),De=h(e,"videoContainer",15),Be=h(e,"adsSlotId",3,void 0),it=h(e,"adsParams",3,void 0),U=h(e,"adsAutoplayParam",3,void 0),Ae=h(e,"duration",3,void 0),ke=h(e,"logoTargetUrl",3,""),ze=h(e,"showNextPrevButtons",3,!1),tt=h(e,"nextButtonActive",3,!1),ye=h(e,"prevButtonActive",3,!1),Ie=h(e,"endScreenVideoTitle",3,void 0),Fe=h(e,"endScreenVideoThumb",3,void 0),Nt=h(e,"isOneVideoPlaylist",3,!1),ft=h(e,"showMiniTimer",3,!1),Bt=h(e,"fullScreenTarget",3,void 0),lt=h(e,"playerStarted",3,!1),xt=h(e,"showEndScreen",3,!0),{notifications$:ii,graphIsOpened$:Pt}=xo(),Ot=e.store.getLogger().createComponentLog("Root component"),Ft=e.store.interfaceLanguage$,Y=e.store.state.playbackState$,Se=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,he=e.store.state.duration$,Ve=e.store.playerPhase,rt=e.store.ui.isFullscreen,pt=e.store.ui.controlsVisible,ue=e.store.ui.isControlsAvailable,We=e.store.ui.interactiveHideMobileControls,Ge=e.store.ui.settingsMenu.visible$,dt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Ht=e.store.ui.scrubbingInProgress,Ut=e.store.ui.volumeChangingInProgress,oi=e.store.ui.debugPanelVisible,_i=e.store.state.isLoaderVisible,Yi=e.store.state.isEnded$,Vt=e.store.state.chromecastConnected$,fi=e.store.state.chromecastDeviceName$,vi=e.store.ads.postrollPassed,ht=e.store.state.isLive$,Zt=e.store.state.isPlaying$,yi=e.store.state.isActiveLive$,ji=e.store.state.isRewindableLive$,ei=e.store.state.crashed$,Tt=e.store.webApi.annotationsApi,qe=e.store.webApi.pictureInPictureApi,bi=e.store.state.videoSize$,wo=e.store.state.currentSubtitle$,Ro=e.store.state.currentSubtitleCaptions$,No=e.store.state.duration$,wt=e.store.ui.playerSize,zt=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,kt=e.store.state.isInteractive,li=e.store.state.isInteractiveTime$,ct=e.store.state.isInteractiveExpectation$,St=e.store.state.hasInteractiveBranches,Yt=e.store.ui.controls.disabledControls$,nt=e.store.ui.touched,Hi=e.store.ui.overlayContainer$,Ui=e.store.ui.autoplayNextEnabled$,en=e.store.state.loadedMetadata$,Oo=e.store.actions.internal.closeSettingsMenu,ro=(On=e.store.callbacks)==null?void 0:On.onDisabledPlayPrevChapterClick,Vi=(rn=e.store.callbacks)==null?void 0:rn.onDisabledSeekToInteractiveClick,Or=e.store.actions.internal.setQuality,go=K(void 0),ho=K(void 0),Ai=K(void 0),tn=K(void 0),Do,Mn,yr=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),xr=K(void 0),{closeNotification:$s,notificationsToShow$:is}=ii,os=m(()=>!!s().slow_video),Jn=()=>$s("slow_video"),Dr=de(!1),on,Vn=K(!1),wr=m(()=>u()!==TT.PLAYING),Bo=K(!1),er=m(()=>f()||p()||!n(Vn)&&(v()&&!!St||n(wr)&&$())),tr=K(!0),Br=m(()=>e.uiConfig.features.thumbTimer&&ft()&&r()==="video"&&!y()&&!d()&&!kt&&(e.uiConfig.hideThumbTimerAfterTouch&&!g()||!e.uiConfig.hideThumbTimerAfterTouch)),ir=K(!1),so=m(()=>(xt()||e.showAutoplayNext&&w())&&!!Ie()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(ir)),Fr=K(!1);qe==null||qe.setContext(ld());let or=$t=>{$t&&!kt&&_o(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:or});let mn=()=>{clearTimeout(Do),O(Vn,!1),p()&&We.set(!1)},_o=$t=>{mn(),O(Vn,!0),Do=setTimeout(()=>O(Vn,!1),$t);let It=$t-100;on=setTimeout(()=>{C()&&Dr.set(!1)},It>0?It:$t)},Sr=zt.subscribe($t=>{W.set($t),$t&&(clearTimeout(Mn),Mn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),nr=(...It)=>vt(null,[...It],function*($t=oa()){var ao,So,Co,lo,Ni,Dn;if($t&&!wc.device.isIOS){let Xi=Nd(),zr=Fo(),Li=wc.browser.isSamsungBrowser&&Xi===e.shadowRootContainer;$t=Xi===zr||Li}if($t){_o(e.uiConfig.controls.hideTimeoutFullscreen);try{yield qe==null?void 0:qe.exit()}catch(Xi){Ot({message:String(Xi)})}try{let Xi=(ao=N())!=null&&ao.width&&((So=N())!=null&&So.height)?N():L();yield P_(Xi)}catch(Xi){Ot({message:String(Xi)})}}rt.set($t),e.store.getAdmanWrapper().setFullscreen($t),E()?(lo=(Co=e.store.callbacks)==null?void 0:Co.onFullscreenEnter)==null||lo.call(Co):(Dn=(Ni=e.store.callbacks)==null?void 0:Ni.onFullscreenExit)==null||Dn.call(Ni)}),mt=$t=>{let It=$t,{width:ao,height:So}=It.target;wt.set({width:ao,height:So})},di=()=>{let{width:$t,height:It}=n(go).getBoundingClientRect();wt.set({width:$t,height:It})};Lt(()=>{var $t;return Vu(nr),e.uiConfig.features.annotationsInside&&(Tt==null||Tt.init(n(go))),Da(qe)&&(qe==null||qe.assignPlayerContainer(n(go)),qe==null||qe.setExternalEventHandlers({resize:mt,leavepictureinpicture:di})),O(tr,!wc.device.isIphoneOrOldIpad),e.interactiveContainer&&(($t=De().parentElement)==null||$t.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(Do),clearTimeout(on),clearTimeout(Mn),Sr(),qe==null||qe.dispose().catch(It=>{Ot({message:String(It)})}),Ru(nr)}});let Hr=K(!0),rr=K(!0),Ur=$t=>{let It=P()+($t==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;It<0?(O(Hr,!1),It=0):It>=q()&&(O(rr,!1),It=q()),O(Bo,!0),e.seekTime(It)},Fo=()=>wc.device.isIOS?n(go):!e.uiConfig.allowChangingFullscreenTarget||!Bt()?e.outerContainerRef:Bt().contains(e.outerContainerRef)?Bt():e.outerContainerRef,Rn=()=>vt(null,null,function*(){try{if(oa())yield Mu(document),Ot({message:"exit fullscreen"});else{if(Ot({message:"request fullscreen"}),wc.device.isIOS&&!H())return;yield Lu(Fo())}}catch($t){Ot({message:String($t)})}}),vn=()=>{Oo()},nn=$t=>{if($t.preventDefault(),z()){vn();return}if(!lt()){e.firstStart(),_o(e.uiConfig.controls.hideTimeoutCursor);return}O(Bo,!1),y()?mn():_o(e.uiConfig.controls.hideTimeoutMobile)},gn=()=>{nt.set(!0)},Cr=()=>{kt||(Dr.set(!0),_o(e.uiConfig.controls.hideTimeoutCursor))},Ho=$t=>{ro&&(ro($t),_o(e.uiConfig.controls.hideTimeoutMobile))},Uo=$t=>{Vi&&(Vi($t),_o(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{Hi.set(n(xr))}),Oe(()=>{pt.set((n(wr)||z()||j()||ae()||X()||!n(so)&&(v()||n(Vn)&&!n(Bo)))&&!n(er)&&r()==="video"&&!d()&&ne())}),Oe(()=>{!j()&&n(Fr)&&!ee()&&_o(e.uiConfig.controls.hideTimeoutMobile),O(Fr,j(),!0)}),Oe(()=>{O(Hr,P()>0),O(rr,!we()&&P()<q(),!0)}),Oe(()=>{zd(n(tn),z(),pe(),!0)});let hn=G("aria_label_video_player");Bb({fullScreenChangeHandler:nr,getFullscreenTarget:Fo}),Fb({store:e.store,getFullscreenTarget:Fo});let Tr=($t,It)=>{var lo,Ni;let ao=(Ni=(lo=e.store.callbacks)==null?void 0:lo.uiInfo)==null?void 0:Ni.onUpcomingLiveViewStateChanged;if(!ao)return;let So=!!It,Co=Ee(Ee({},Xn(n(go),{upcomingLiveScreen:It},"upcomingLiveScreen",So)),$t);ao(Co)};var xi=RT();at("blur",Ia,vn);var _n=T(xi);il(_n,{onClick:nn,get videoContainer(){return De()},set videoContainer($t){De($t)}});var Nn=A(_n,2);Ma(Nn,()=>"slot",!1,($t,It)=>{io($t,()=>({name:tl}))});var sr=A(Nn,2);ks(sr,re,$t=>{var It=VT(),ao=ce(It);let So=m(()=>r()!=="thumb"||d()||kt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Za(ao,{get hidden(){return n(So)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Co=A(ao,2);{var lo=Je=>{var jt=PT(),Ti=ce(jt);{var $o=Po=>{let cr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);lp(Po,{side:"left",get seekStep(){return n(cr)},handleSingleFirstClick:nn,handleSecondClick:()=>Ur("backward")})};R(Ti,Po=>{n(Hr)&&Po($o)})}var Ko=A(Ti,2);{var Wr=Po=>{let cr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);lp(Po,{side:"right",get seekStep(){return n(cr)},handleSingleFirstClick:nn,handleSecondClick:()=>Ur("forward")})};R(Ko,Po=>{n(rr)&&Po(Wr)})}b(Je,jt)};R(Co,Je=>{e.canRewindLive&&ji&&!_e().has("TIMELINE")&&Je(lo)})}var Ni=A(Co,2);{var Dn=Je=>{let jt=m(()=>{var Ti;return(Ti=e.live)==null?void 0:Ti.startTime});hc(Je,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(jt)},onUpcomingLiveViewStateChanged:Tr})};R(Ni,Je=>{r()==="LiveWaitingStart"&&Je(Dn)})}var Xi=A(Ni,2);{var zr=Je=>{Ja(Je,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Xi,Je=>{r()==="LiveWaitingRecover"&&Je(zr)})}var Li=A(Xi,2);{var ys=Je=>{Ja(Je,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Li,Je=>{r()==="LiveWaitingRecord"&&Je(ys)})}var ns=A(Li,2);{var rs=Je=>{var jt=kT();let Ti;var $o=T(jt);Dd($o,{get adsSlotId(){return Be()},get adsParams(){return it()},get adsAutoplayParam(){return U()},get duration(){return Ae()},get adsExternalApi(){return e.adsExternalApi}}),S(jt),D(Ko=>Ti=se(jt,1,"ads-container s-9",null,Ti,Ko),[()=>({hidden:r()!=="ads"})]),b(Je,jt)};R(ns,Je=>{e.showAds&&lt()&&Je(rs)})}var Er=A(ns,2);{var sn=Je=>{let jt=m(()=>!xt()&&e.showAutoplayNext&&w());Iv(Je,{get title(){return Ie()},get thumb(){return Fe()},get isHide(){return n(jt)},clickCloseIcon:()=>O(ir,!0)})};R(Er,Je=>{n(so)&&Ie()&&Fe()&&Je(sn)})}var ar=A(Er,2);{var To=Je=>{vc(Je,{})};R(ar,Je=>{$e()&&Je(To)})}var Io=A(ar,2);{var lr=Je=>{var jt=AT(),Ti=T(jt);Rd(Ti,{}),S(jt),b(Je,jt)};R(Io,Je=>{J()&&Je(lr)})}var Ue=A(Io,2);{var At=Je=>{gc(Je,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()},onClick:nn})};R(Ue,Je=>{X()&&Je(At)})}var wi=A(Ue,2);{var zo=Je=>{ja(Je,{get shifted(){return y()},get captions(){return k()},get position(){return P()},get playerSize(){return L()},isMobile:!0})};R(wi,Je=>{fe().value!=="off"&&Je(zo)})}var co=A(wi,2);{var Eo=Je=>{var jt=LT();jt.__click=[ET,z,Ge,vn];var Ti=T(jt);Xa(Ti,{}),S(jt),b(Je,jt)};R(co,Je=>{d()&&Je(Eo)})}var uo=A(co,2);{var Wo=Je=>{let jt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ti=m(()=>r()==="ads"),$o=m(()=>e.canRewindLive&&Ke()!==0);fc(Je,{get bottomHidden(){return n(jt)},get showControls(){return y()},get bottomNoSmooth(){return C()},get isAds(){return n(Ti)},get canRewindLive(){return n($o)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return ke()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return ze()},get nextButtonActive(){return tt()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Nt()},get customFullscreenSupported(){return n(tr)},get endScreenShown(){return n(so)},toggleFullscreen:Rn,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Ho,onDisabledSeekToInteractiveClick:Uo,get playerControlsWrapperRef(){return n(ho)},set playerControlsWrapperRef(Ko){O(ho,Ko,!0)},get playerControlsRef(){return n(Ai)},set playerControlsRef(Ko){O(Ai,Ko,!0)}})};R(uo,Je=>{lt()&&Je(Wo)})}var Bn=A(uo,2);{var an=Je=>{var jt=MT(),Ti=T(jt);$c(Ti,{get supportLink(){return e.supportLink},get returnFocus(){return IT},get ref(){return n(tn)},set ref($o){O(tn,$o,!0)}}),S(jt),b(Je,jt)};R(Bn,Je=>{z()&&Je(an)})}var bo=A(Bn,2);let Zi=m(()=>!n(Br));Hd(bo,{get isLive(){return Te()},get isHidden(){return n(Zi)},get isPlaying(){return Z()},get position(){return P()},get duration(){return q()}});var Fn=A(bo,2);{var Hn=Je=>{Ua(Je,{})};R(Fn,Je=>{n(yr)&&Je(Hn)})}var Un=A(Fn,2);{var Pr=Je=>{qd(Je,{})};R(Un,Je=>{ie()&&Je(Pr)})}var dr=A(Un,2);{var xs=Je=>{yc(Je,{onClose:Jn,onSelectAutoQuality:()=>{Or("auto"),Jn()}})};R(dr,Je=>{n(os)&&Je(xs)})}b($t,It)});var Ir=A(sr,2);Xe(Ir,$t=>O(xr,$t),()=>n(xr)),S(xi),Xe(xi,$t=>O(go,$t),()=>n(go)),D(()=>Me(xi,"aria-label",hn)),at("click",xi,gn,!0),at("focusin",xi,Cr,!0),b(t,xi),F(),o()}Ye(["click"]);function cp(t){let e="";return no(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),no(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),no(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),no(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),no(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),no(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),no(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),no(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),no(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),no(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),no(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),no(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),no(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),no(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),no(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),no(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),no(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),no(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),no(t.font)&&(e+=`--font:${t.font};`),no(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),no(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function no(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as OT}from"@vkontakte/videoplayer-shared/es2015";var DT=M('<div class="time-container s-7"><!></div>'),BT=M('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),FT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Pv(t,e){B(e,!0),Q(t,FT);let[i,o]=Re(),r=()=>x(ee,"$scrubbingInProgress",i),a=()=>x(X,"$playerSize",i),l=()=>x(P,"$isPlaying$",i),d=()=>x(L,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(C,"$playerPhase",i),f=()=>x(N,"$crashed$",i),p=()=>x(q,"$currentSubtitle$",i),v=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(j,"$isLive$",i),g=()=>x(ae,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:C,state:{crashed$:N,duration$:L,positionExact$:E,isPlaying$:P,currentSubtitle$:q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:j,isRewindableLive$:ae},ui:{playerSize:X,controls:ne,scrubbingInProgress:ee},actions:{internal:{getVideoElement:we}}}=ve(),pe=8,re=K(!1),_e=ci({}),$e=K(!1),J=m(()=>!r()&&!n($e)),Ne=()=>{O(re,!0)},fe=()=>{O(re,!1)},k=OT(ql,260);Oe(()=>{a(),k(we(),ne,_e,n(re))});let Ke=m(()=>l()?Jo(d()-s()):Jo(isFinite(d())?d():w()));var Te=BT(),Z=T(Te);il(Z,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Ie){I(Ie)}});var ie=A(Z,2);Ma(ie,()=>"slot",!1,(Ie,Fe)=>{io(Ie,()=>({name:tl}))});var De=A(ie,2);let Be=m(()=>u()!=="thumb"||f());Za(De,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=A(De,2);{var U=Ie=>{ja(Ie,{shifted:!1,get captions(){return v()},get position(){return $()},get playerSize(){return a()}})};R(it,Ie=>{p().value!=="off"&&n(J)&&Ie(U)})}var Ae=A(it,2);{var ke=Ie=>{var Fe=DT(),Nt=T(Fe);Fd(Nt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Ke)}}),S(Fe),b(Ie,Fe)};R(Ae,Ie=>{n(J)&&Ie(ke)})}var ze=A(Ae,2);let tt;var ye=T(ze);Ga(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return g()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return _e.timeline},set ref(Ie){_e.timeline=Ie}}),S(ze),S(Te),D(Ie=>tt=se(ze,1,"timeline s-7",null,tt,Ie),[()=>({visible:n(re)})]),at("mouseenter",Te,Ne),at("mouseleave",Te,fe),at("mouseenter",ze,()=>O($e,!0)),at("mouseleave",ze,()=>O($e,!1)),b(t,Te),F(),o()}var KT=M("<div><!></div>"),qT={hash:"s-2",code:'.vk-vp-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-2{overflow:visible}.vk-vp-root.s-2 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-2 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-2 p{margin:0}.vk-vp-root.s-2 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-2 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-2 :focus,.vk-vp-root.s-2 :focus-visible{outline:none}.vk-vp-root.s-2 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-2 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-2 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-2 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-2 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-2 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-2 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Av(t,e){B(e,!0),Q(t,qT);let[i,o]=Re(),r=()=>x(lt,"$isLive$",i),a=()=>x(Tt,"$availableSubtitlesList$",i),l=()=>x(qe,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),f=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),$=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),g=h(e,"interactiveController",7),w=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),C=h(e,"live",7),N=h(e,"preload",7),L=h(e,"autoplay",7),E=h(e,"volume",7,void 0),P=h(e,"muted",7,void 0),q=h(e,"fromTime",7),H=h(e,"canRewindLive",7),z=h(e,"showAds",7),j=h(e,"adsSlotId",7,void 0),ae=h(e,"adsParams",7,void 0),X=h(e,"adsAutoplayParam",7,void 0),ne=h(e,"duration",7,void 0),ee=h(e,"logoClickable",7),we=h(e,"logoHidden",7),pe=h(e,"isMobile",7),re=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),$e=h(e,"prevButtonActive",7,!1),J=h(e,"endScreenVideoTitle",7,void 0),Ne=h(e,"endScreenVideoThumb",7,void 0),fe=h(e,"isOneVideoPlaylist",7,!1),k=h(e,"supportLink",7),Ke=h(e,"shadowRootContainer",7),Te=h(e,"outerContainerRef",7),Z=h(e,"fullScreenTarget",7,void 0),ie=h(e,"failoverHosts",7,void 0),De=h(e,"showMiniTimer",7,!1),Be=h(e,"saveRate",7),it=h(e,"seekToInteractive",7,Hb),U=h(e,"playPrevChapter",7,Hb),Ae=h(e,"volumeMultiplier",7),ke=h(e,"showAutoplayNext",7),ze=h(e,"showEndScreen",7,!0),tt=h(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Ie}=u();Nh(p());let Fe=Mt(),Nt=p().logoLink,ft=s().ui.debugPanelVisible,Bt=s().ui.playerSize,lt=s().state.isLive$,ii=s().state.isInteractive&&kv.device.isAndroid,Pt=K(void 0),Ot=null,Ft=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),qh(s(),Ie),Oe(()=>{var W,kt;s().ui.isMobile.set(pe()),(kt=(W=f().callbacks)==null?void 0:W.onDomReady)==null||kt.call(W)});let Y=(W=!1)=>{O(Ft,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Se=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let W=v_(s().videoId);if(W)switch(W.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,W.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,W.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(W.quality);break}}else{g_(s().videoId),Af()&&s().actions.internal.setTrafficSavingEnabled(!0);let kt=Ef(s().videoId);kt&&s().actions.internal.setQuality(kt)}};function le(W){var Yt,nt,Hi;let kt=d()||W;kt&&s().initVideo({container:n(Pt),sources:kt,failoverHosts:ie(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:Ae()});let li=UT.get(kd)==="true";ft.set(li),q()>0&&s().actions.external.seekTime(q());let ct=pe()?Fe.volumeDefault:(nt=(Yt=E())!=null?Yt:xu())!=null?nt:Fe.volumeDefault,St=(Hi=P())!=null?Hi:d_();if(s().actions.external.setVolume(ct),s().actions.external.setMuted(St),s().getAdmanWrapper().setInitialVolume(St?0:ct),Se(),Fe.features.saveRate&&Be()){let Ui=p_();Ui&&!r()&&s().actions.internal.setPlaybackRate(Ui)}if(ke()){let Ui=m_();Ui&&s().actions.internal.setAutoplayNextEnabled(Ui)}s().ui.isAutoplay.set(L()),L()&&Y(),N()&&Fe.features.preload&&s().actions.internal.preload()}let he=W=>{if(window.ResizeObserver){let kt,li;Ot=new ResizeObserver(zT(ct=>{let St=ct[0];if(St.contentBoxSize){let Yt=Array.isArray(St.contentBoxSize)?St.contentBoxSize[0]:St.contentBoxSize;kt=Yt.inlineSize,li=Yt.blockSize}else St.contentRect&&(kt=St.contentRect.width,li=St.contentRect.height);Bt.set({width:kt,height:li})},300)),Ot.observe(W)}W.clientWidth&&W.clientHeight&&Bt.set({width:W.clientWidth,height:W.clientHeight})},Ve=()=>{document.hidden&&s().actions.external.stop()};Lt(()=>{var li,ct,St,Yt;ii&&document.addEventListener("visibilitychange",Ve),Fe.debugLog&&s().actions.internal.startLogging(),he(n(Pt));let W=ye.map(nt=>nt.init({store:s(),microStores:Ie,config:f(),interactiveController:g(),uiConfig:p()})),kt=()=>{ii&&document.removeEventListener("visibilitychange",Ve),Ot==null||Ot.disconnect(),W.forEach(nt=>nt.unsubscribe()),s().destroy()};return((li=C())==null?void 0:li.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),kt):((ct=C())==null?void 0:ct.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),kt):(((St=C())==null?void 0:St.status)==="finished"||((Yt=C())==null?void 0:Yt.status)==="postlive")&&!(d()&&HT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),kt):(le(),kt)});function rt(){n(Ft)?s().actions.external.play():Y(!0)}function pt(){s().actions.external.pause()}function ue(W){s().actions.external.setMuted(W)}function We(){s().actions.external.toggleSubtitle()}function Ge(W,kt){s().actions.external.changeSubtitle(W,kt)}function dt(W){s().actions.external.changeAudioStream(W)}function Ht(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function Ut(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function oi(W){pe()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function _i(W){s().actions.internal.seekTime(W,WT.UNKNOWN)}function Yi(W){s().actions.external.seekEpisodeStartTime(W)}function Vt(){s().actions.external.returnFocusToEpisodes()}function fi(W){s().actions.external.setPlaybackRate(W)}function vi(W){s().actions.external.setAutoQualityLimits(W)}function ht(){s().actions.external.setQuality("auto")}function Zt(W){s().actions.external.setTrafficSavingEnabled(W)}function yi(W){s().actions.external.setHighQualityEnabled(W)}let ji=cp(Fe.view),ei=f().playerView==="preview",Tt=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let W=!1;Oe(()=>{var kt;if(!W&&a().length){W=!0;let li;if(Fe.features.userVideoPrefs&&s().videoId){let St=Tu(Fe.userSalt,String(s().videoId));St!=null&&St.subtitleTrackId&&(li=a().find(Yt=>Yt.value===St.subtitleTrackId))}let ct=(kt=I())!=null?kt:Mf();ct&&(li=a().find(St=>St.language===ct)),s().actions.internal.setSubtitle(li)}})}let qe=s().ui.isPreviewTrackHorizontallyAligned;var bi=KT();let wo;var Ro=T(bi);{var No=W=>{Ev(W,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return ee()},get logoHidden(){return we()},get logoTargetUrl(){return Nt},get nextButtonActive(){return _e()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return fe()},get supportLink(){return k()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Ft)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:Y,seekTime:_i,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Pt)},set videoContainer(kt){O(Pt,kt,!0)}})},wt=W=>{var kt=Le(),li=ce(kt);{var ct=Yt=>{Pv(Yt,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return H()},get videoContainer(){return n(Pt)},set videoContainer(nt){O(Pt,nt,!0)}})},St=Yt=>{Tv(Yt,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return ee()},get logoHidden(){return we()},get logoTargetUrl(){return Nt},get nextButtonActive(){return _e()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return fe()},get supportLink(){return k()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Ft)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:Y,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Pt)},set videoContainer(nt){O(Pt,nt,!0)},get keyboardControls(){return tt()},set keyboardControls(nt){tt(nt)}})};R(li,Yt=>{ei?Yt(ct):Yt(St,!1)})}b(W,kt)};R(Ro,W=>{pe()?W(No):W(wt,!1)})}S(bi),D(W=>{wo=se(bi,1,"vk-vp-root s-2",null,wo,W),Qe(bi,ji)},[()=>({"root--miui-browser":kv.device.isMobile&&kv.browser.isMiuiBrowser,"visible-outside":ei,"preview-track-horizontally-alinged":l()})]),b(t,bi);var zt=F({initVideo:le,play:rt,pause:pt,setMuted:ue,toggleSubtitle:We,changeSubtitle:Ge,changeAudioStream:dt,hideControls:Ht,showControls:Ut,setVolume:oi,seekTime:_i,seekEpisodeStartTime:Yi,returnFocusToEpisodes:Vt,setPlaybackRate:fi,setAutoQualityLimits:vi,setAutoQuality:ht,toggleTrafficSaving:Zt,toggleHighQuality:yi,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return f()},set videoConfig(W){f(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return $()},set thumbUrl(W){$(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return g()},set interactiveController(W){g(W)},get subtitles(){return w()},set subtitles(W){w(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return C()},set live(W){C(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return L()},set autoplay(W){L(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return P()},set muted(W){P(W)},get fromTime(){return q()},set fromTime(W){q(W)},get canRewindLive(){return H()},set canRewindLive(W){H(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return j()},set adsSlotId(W){j(W)},get adsParams(){return ae()},set adsParams(W){ae(W)},get adsAutoplayParam(){return X()},set adsAutoplayParam(W){X(W)},get duration(){return ne()},set duration(W){ne(W)},get logoClickable(){return ee()},set logoClickable(W){ee(W)},get logoHidden(){return we()},set logoHidden(W){we(W)},get isMobile(){return pe()},set isMobile(W){pe(W)},get showNextPrevButtons(){return re()},set showNextPrevButtons(W){re(W)},get nextButtonActive(){return _e()},set nextButtonActive(W){_e(W)},get prevButtonActive(){return $e()},set prevButtonActive(W){$e(W)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(W){J(W)},get endScreenVideoThumb(){return Ne()},set endScreenVideoThumb(W){Ne(W)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(W){fe(W)},get supportLink(){return k()},set supportLink(W){k(W)},get shadowRootContainer(){return Ke()},set shadowRootContainer(W){Ke(W)},get outerContainerRef(){return Te()},set outerContainerRef(W){Te(W)},get fullScreenTarget(){return Z()},set fullScreenTarget(W){Z(W)},get failoverHosts(){return ie()},set failoverHosts(W){ie(W)},get showMiniTimer(){return De()},set showMiniTimer(W){De(W)},get saveRate(){return Be()},set saveRate(W){Be(W)},get showAutoplayNext(){return ke()},set showAutoplayNext(W){ke(W)},get seekToInteractive(){return it()},set seekToInteractive(W){it(W)},get playPrevChapter(){return U()},set playPrevChapter(W){U(W)},get volumeMultiplier(){return Ae()},set volumeMultiplier(W){Ae(W)},get showEndScreen(){return ze()},set showEndScreen(W){ze(W)},get keyboardControls(){return tt()},set keyboardControls(W){tt(W)}});return o(),zt}var QT=Ce('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Lv(t,e){let i=h(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");Ze(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=QT();ui(9),b(r,l)},$$slots:{default:!0}})}var GT=M('<div class="title s-0"> </div>'),YT=M('<div class="playerStub s-0"><!> <!></div>'),jT={hash:"s-0",code:".playerStub.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-0{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Mv(t,e){Q(t,jT);var i=YT(),o=T(i);{var r=d=>{var s=GT(),u=T(s,!0);S(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);Lv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),D(()=>Qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var XT=M('<div class="playerError s-1"><!></div>'),ZT={hash:"s-1",code:".playerError.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function Vv(t){Q(t,ZT);var e=XT(),i=T(e);Xa(i,{}),S(e),b(t,e)}import{now as AI,ValueSubject as LI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as MI,InterfaceLanguage as VI,isNonNullable as Uv,Logger as RI,Observable as NI,Subscription as jb,once as OI,InternalsExposure as DI,skip as BI,getPlayerId as FI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Xb,isMobile as HI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as UI,ThinOneStat as zI,MediascopePixel as WI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as JT,Subscription as eI}from"@vkontakte/videoplayer-shared/es2015";var up=class{constructor(){this.subscription=new eI,this.logger=new JT,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=ge(e.state.currentPlaybackRate$),r=ge(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Ov,detectEmbed as sI}from"@vkontakte/videoplayer-shared/es2015";var tI=Ce('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),iI=M('<div><div><!></div> <span class="title s-5"> </span></div>'),oI={hash:"s-5",code:".player-pip-dummy.s-5{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-5{position:relative}.dummy-image.s-5 svg{transform:scale(1.07143)}.dummy-image.desktop.s-5{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-5{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function Rv(t,e){B(e,!0),Q(t,oI);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(f,"$isMobile$",i),l=ve(),d=Mt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>r()&&p("pip_dummy_title")),$=cp(d.view);var y=iI();let g;var w=T(y);let I;var C=T(w);Ze(C,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,P)=>{var q=tI();ui(),b(E,q)},$$slots:{default:!0}}),S(w);var N=A(w,2),L=T(N,!0);S(N),S(y),D((E,P)=>{g=se(y,1,"player-pip-dummy s-5",null,g,E),Qe(y,$),I=se(w,1,"dummy-image s-5",null,I,P),me(L,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var nI=Object.defineProperty,rI=(t,e,i)=>e in t?nI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,jl=(t,e,i)=>rI(t,typeof e!="symbol"?e+"":e,i),Nv=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),aI=460,lI=280,Sc=class{constructor({enabled:e=!0}={enabled:!0}){jl(this,"playerDomElement"),jl(this,"playerParentShadowRoot"),jl(this,"playerDummyElement"),jl(this,"svelteContext"),jl(this,"pipWindow"),jl(this,"info",{isActive$:new Ov(!1),isEnabled$:new Ov(!1),type:1}),this.info.isEnabled$=new Ov(e)}isSupported(){let{isEmbed:e}=sI();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Nv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:aI,height:lI,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
63
- `),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=jr(Rv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(La(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Nv(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return Nv(this,null,function*(){yield this.exit()})}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function Ub(t){return t instanceof Sc}var pp=class{static getLatestSupportedVersion(e){let i=new Oa(e),o=new Sc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Cc(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var zb="Inner error. Unexpectedly root annotation container null reference exception",Wb="Annotation with such name already exists",Kb="Annotation with such name does not exist";var Xl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as dI,Subscription as cI,throttleFn as uI}from"@vkontakte/videoplayer-shared/es2015";var pI="1",fI=100,fp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new cI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=uI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},fI);this.subscriptions.add(dI(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Xl(zb);if(this.annotations.has(e))throw new Xl(Wb);i.style.zIndex=(o=i.style.zIndex)!=null?o:pI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Xl(Kb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as mp,Subscription as mI}from"@vkontakte/videoplayer-shared/es2015";var fn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return mp(e),mp(i),mp(r),r.interactiveData&&mp(o),this.subscription=new mI,this.subscription}};var Tc=class extends fn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Gt(Ee({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Ic=class extends fn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Gt(Ee({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:f}=a.ui,p=ge(f),v=()=>p&&ge(u);return o.add(u.subscribe($=>{if(!p)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||v())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Ec=class extends fn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as vI}from"@vkontakte/videoplayer-shared/es2015";var Dv=de(!1),vp=null,Pc=class extends fn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Gt(Ee({},Dv),{set:(i,o=!1)=>{i!==ge(Dv)&&(this.clearTimeout(),Dv.set(i),!i&&vp&&(vp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{ge(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(vI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:$})=>{var y,g;if(!(!p||!($!=null&&$.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&vp===null&&(vp=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(g=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||g.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as gI,noop as hI}from"@vkontakte/videoplayer-shared/es2015";var kc=class extends fn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Gt(Ee({},de(null)),{toggle:hI});this.checkIfShouldHide=i=>Rs(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>vt(this,null,function*(){if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:f}=r.state,{disabledControls$:p}=r.ui.controls,v=ge(u),$=ge(f);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove($f),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add($f),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(gI({graphIsOpened:this.state$,currentGridType:l}).subscribe(f=>vt(this,[f],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as qb}from"@vkontakte/videoplayer-shared/es2015";var Ac=class extends fn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:de(!1),isEnabled$:de(!1),type$:de(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new qb(!1),isEnabled$:new qb(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as $I,filterChanged as yI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Bv}from"@vkontakte/videoplayer-shared/es2015";var Qb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?_I({maxCount:t}):void 0,e!==0?bI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},_I=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Bv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},bI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Bv.get(e)||"{}")}catch(a){return{}}},o=a=>Bv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Gt(Ee({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Lc=class extends fn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:de({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Qb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(yI(),$I(f=>f)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Gb=()=>[Tc,Ic,Ec,Pc,kc,Ac,Lc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Gt(Ee({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Mc}from"@vkontakte/videoplayer-shared/es2015";var gp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var hp=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new gp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var xI=M('<div class="root s-3"><!></div>'),wI={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Fv(t,e){B(e,!0),Q(t,wI);let i=null,o=K(null);Oe(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&O(o,s?"prev":"next",!0)}var a=Le(),l=ce(a);{var d=s=>{var u=Le(),f=ce(u);ks(f,()=>n(o),p=>{var v=xI(),$=T(v);let y=m(()=>n(o)==="prev");xc($,{get duration(){return e.animationDuration},get Icon(){return ca},get reversed(){return n(y)}}),S(v),b(p,v)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}import{getWindow as SI}from"@vkontakte/videoplayer-shared/es2015";var Hv=SI().HTMLElement||class{constructor(){this.isConnected=!1}};var CI=Object.defineProperty,TI=Object.defineProperties,II=Object.getOwnPropertyDescriptors,Yb=Object.getOwnPropertySymbols,EI=Object.prototype.hasOwnProperty,PI=Object.prototype.propertyIsEnumerable,Wv=(t,e,i)=>e in t?CI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Hs=(t,e)=>{for(var i in e||(e={}))EI.call(e,i)&&Wv(t,i,e[i]);if(Yb)for(var i of Yb(e))PI.call(e,i)&&Wv(t,i,e[i]);return t},kI=(t,e)=>TI(t,II(e)),Jt=(t,e,i)=>Wv(t,typeof e!="symbol"?e+"":e,i),_p=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),KI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:VI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:HI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Zn=K(void 0),zv=ci({animationDuration:0,playbackStatusShow:!1}),bp=class extends Hv{constructor(){super(),Jt(this,"svelteStubComponent"),Jt(this,"svelteRootComponent"),Jt(this,"sveltePersistentLayerComponent"),Jt(this,"svelteErrorComponent"),Jt(this,"store"),Jt(this,"microStoresRoot"),Jt(this,"statistics"),Jt(this,"sentry"),Jt(this,"_shadowRoot"),Jt(this,"playerContainer"),Jt(this,"rootContainer"),Jt(this,"stateContainer"),Jt(this,"shadowRootContainer"),Jt(this,"playerId"),Jt(this,"uiConfig"),Jt(this,"coreConfig"),Jt(this,"statisticsConfig"),Jt(this,"interactiveController"),Jt(this,"interactiveContainer"),Jt(this,"graphMadePause"),Jt(this,"currentPlayingVideoIndex",0),Jt(this,"needToRepeatPlaylist",!1),Jt(this,"videoConfig"),Jt(this,"pictureInPictureApi"),Jt(this,"mediaSessionApi"),Jt(this,"unsubscribePlayerPhaseSubscription"),Jt(this,"logger"),Jt(this,"log"),Jt(this,"subscription"),Jt(this,"interactiveSubscription"),Jt(this,"annotationsApi"),Jt(this,"slotsApi"),Jt(this,"focusManager"),Jt(this,"prevIsid"),Jt(this,"isInited",!1),Jt(this,"postponedInitParams",null),Jt(this,"internalsExposure",null),Jt(this,"shadowDOMCallbacksDisabled",!1),Jt(this,"fatalError$",new LI(null)),Jt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:$,isMobile:y,isTouch:g,refDomain:w,deviceId:I,interactiveData:C}=Cc(this.videoConfig,i),N=(o=C==null?void 0:C.projectInfo)==null?void 0:o.pid,L=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;L&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:P=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new UI(Hs({movieId:E,albumId:d,place:s,trackCode:f,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:g!=null?g:y,clip:P,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||L)&&{projectId:Number(N)}),Hs({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(H){console.error(H),this.log({message:H.message})}}),Mc.create("ui"),this.logger=new RI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new jb,this.interactiveSubscription=new jb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=jr(Vv,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ci({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=jr(Mv,l),this.sveltePersistentLayerComponent=jr(Fv,{target:this.playerContainer,props:zv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;zv.animationDuration=e,zv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Mc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=Cc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new zI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,f,p,v,$;if(!this.videoConfig)return;let{albumId:y,statPlace:g,statAuthToken:w,preload:I,autoplay:C,volume:N,muted:L,fromTime:E,canRewindLive:P,supportLink:q,showAds:H,adsSlotId:z,adsParams:j={},adsAutoplayParam:ae,interfaceLanguage:X,isCyrillicRelatedInterface:ne,logoClickable:ee,logoHidden:we,isMobile:pe,isTouch:re,isAudioDisabled:_e,isLiveCatchUpMode:$e,fullScreenTarget:J,failoverHosts:Ne,canDownload:fe,callbacks:k,interactiveData:Ke,showThumbTimer:Te,additionalButtons:Z=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Be,loop:it,saveRate:U,volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,mediascopePixels:tt}=Cc(this.videoConfig,i),{sources:ye,title:Ie,thumbUrl:Fe,unitedVideoId:Nt,isClip:ft=!1,duration:Bt,adsParams:lt={},videoEpisodes:xt,previewThumbsData:ii,subtitles:Pt,subtitlesForcedLanguage:Ot,live:Ft,adsExternalApi:Y}=e;if(!ye&&!Ft){let fi=new Error("empty sources and live");this.fatalError$.next(fi),(r=k.onCrashed)==null||r.call(k,fi.message);return}let Se=Hs(Hs({},j),lt),le=this.getNextVideoInfo(),he={sources:ye,title:Ie,thumbUrl:Fe,subtitles:Pt,subtitlesForcedLanguage:Ot,unitedVideoId:Nt,isClip:ft,live:Ft,albumId:y,statPlace:g,autoplay:C,muted:L,volume:N,fromTime:E,canRewindLive:P,showAds:H,adsSlotId:z,adsParams:Se,adsAutoplayParam:ae,duration:Bt,logoClickable:ee,logoHidden:we,isTouch:re!=null?re:pe,repeat:Be,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ve={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(he)}`});let rt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),pt=(rt==null?void 0:rt.oneStat)||this.createOneStat(e,i),ue=this.createThinOneStat(e,i),We;tt&&(We=new WI({pixels:tt})),(pt||ue)&&(this.statistics=new ju(pt,ue,We,rt==null?void 0:rt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Na(this.uiConfig.sentry,{version:Ll,env:bu},{movieId:Nt,albumId:y,place:g,autoplay:(l=C&&!this.interactiveController)!=null?l:!1,mobile:re!=null?re:pe,clip:ft}),this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue())),this.sentry=Hs(Hs({},this.sentry),Na.getInstance());let dt=!!Ke,Ht=[],Ut="tooltip_interactive_go_back_disabled_first";if(dt&&this.interactiveController){let fi=this.interactiveController.state.isInitialChapter$.getValue(),vi=this.interactiveController.getHistoryState();fi&&Ht.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ht.push("SEEK_TO_INTERACTIVE_BUTTON"),vi.hasPrevChapter$.getValue()||(Ht.push("PLAY_PREV_CHAPTER_BUTTON"),fi||(vi.isGoBackLimited$.getValue()?Ut="tooltip_interactive_go_back_disabled_limit":Ut="tooltip_interactive_go_back_disabled"))}let oi=()=>{var fi;this.isInited=!1,this.prevIsid=void 0;let vi=(o==null?void 0:o.info.isEnded$.getValue())&&((fi=this.interactiveController)==null?void 0:fi.state.isEndChapter$.getValue());k.onReplayInteractiveVideo&&!vi?k.onReplayInteractiveVideo():this.replayInteractiveVideo()},_i=Be&&this.videoConfig.videos.length===1;this.store=rb({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:ne,videoId:Nt,isClip:ft,isLiveCatchUpMode:$e,isAudioDisabled:_e,statAuthToken:w,callbacks:k,webApi:Ve,videoEpisodes:xt,previewThumbsData:ii,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ht,isInteractive:dt,saveRate:U,interactiveRanges$:(f=this.interactiveController)==null?void 0:f.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:oi,playPrevChapterDisabledTooltip:Ut,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?Z:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:fi=>{var vi;return(vi=this.sveltePersistentLayerComponent)==null?void 0:vi.startVideoChangedAnimation(fi)},looped:this.uiConfig.features.useLoopSetting?it:_i,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Yi}=this.microStoresRoot=Gb(),Vt=()=>{var fi,vi,ht,Zt,yi,ji;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onCurrentFormatChanged)==null?void 0:qe.call(k,Tt)})),this.subscription.add(Yi.interactiveControlsOpacity$.subscribe(Tt=>{var qe;Tt!==null&&((qe=this==null?void 0:this.interactiveController)==null||qe.setDisabledControls(Tt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onThroughputEstimationChanged)==null?void 0:qe.call(k,Tt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onTrafficSavingEnabledChanged)==null?void 0:qe.call(k,Tt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onHighQualityEnabledChanged)==null?void 0:qe.call(k,Tt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onAutoQualityEnabledChanged)==null?void 0:qe.call(k,!!Tt)})),this.subscription.add(new NI(Tt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(qe=>Tt.next(qe)))}).pipe(BI(1)).subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onCurrentPlaybackRateChanged)==null?void 0:qe.call(k,Tt)})),this.subscription.add(this.store.state.volume$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onVolumeChange)==null?void 0:qe.call(k,Tt)})),this.subscription.add(this.store.state.muted$.subscribe(Tt=>{var qe,bi,wo,Ro;if(Tt)(qe=k==null?void 0:k.onMute)==null||qe.call(k);else{let No=(wo=((bi=this.store)==null?void 0:bi.state.volume$)&&ge(this.store.state.volume$))!=null?wo:0;(Ro=k==null?void 0:k.onUnmute)==null||Ro.call(k,No)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onVideoBitrateChanged)==null?void 0:qe.call(k,Tt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Tt=>{var qe;let bi=(qe=this.store)==null?void 0:qe.ui.controls.disabledControls$;bi&&(Tt&&!bi.includes(Ad)&&bi.add(Ad),Tt||bi.remove(Ad))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(Tt=>_p(this,null,function*(){var qe;if(!Xb.browser.isSamsungBrowser||!Tt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((qe=this.videoConfig)==null?void 0:qe.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Tt=>{var qe;return(qe=k==null?void 0:k.onVSIDChanged)==null?void 0:qe.call(k,Tt)})),this.initMediaSession(),O(Zn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ie,thumbUrl:Fe,subtitles:Pt,subtitlesForcedLanguage:Ot,live:Ft,preload:I,autoplay:C,muted:L,volume:N,fromTime:E,canRewindLive:P,supportLink:q,showAds:H,adsSlotId:z,adsParams:Se,adsAutoplayParam:ae,duration:Bt,logoClickable:ee,logoHidden:we,isMobile:re!=null?re:pe,failoverHosts:Ne,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let ei={target:this.playerContainer,props:n(Zn)};this.svelteRootComponent=jr(Av,ei),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ht=(vi=(fi=this.videoConfig)==null?void 0:fi.callbacks)==null?void 0:vi.onInited)==null||ht.call(vi)),(Zt=this.internalsExposure)==null||Zt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((ji=(yi=this.videoConfig)==null?void 0:yi.callbacks)!=null&&ji.onDevNullLog)?Mc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Mc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Xb.isInited$.subscribe(fi=>{fi&&(console.log("UI SDK async start"),Vt())}):Vt()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Uv(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return _p(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:f,initChapterId:p,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:f,initChapterId:p,historyApi:v,vkVideoLoader:$,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:g}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(g.subscribe(I=>{if(!this.isInited)return;let C=this.store;I?C.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):C.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=kI(Hs({},I.config),{title:(f==null?void 0:f.title)||I.config.title});let C=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,C),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:C})=>{var N,L,E,P,q,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&C==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Ld)),I==="action-choice-canceled"){let j=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(L=this.videoConfig)!=null&&L.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(P=this.videoConfig)==null?void 0:(q=P.callbacks).onDisabledInteractiveClick)==null||H.call(q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:C})=>{this.store&&I==="container-fake-removed"&&C&&this.store.ui.controls.disabledControls$.remove(Ld)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(C=>{var N,L,E;C.length&&((E=(L=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:L.onInteractiveHistoryChanged)==null||E.call(L,C))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var C,N,L;(L=(C=this.videoConfig)==null?void 0:(N=C.callbacks).onInteractiveChapterChanged)==null||L.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,C,N,L;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(L=(C=this.videoConfig)==null?void 0:(N=C.callbacks).onInteractiveTimeIndicatorClick)==null||L.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,f,p,v,$,y,g,w,I,C,N,L,E,P,q,H,z,j,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let X=new Error("empty videos");this.fatalError$.next(X),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,X.message);return}else this.fatalError$.next(null);if(this.videoConfig=Cc(KI,MI(e,X=>X instanceof Hv?X:void 0)),this.playerId=FI(e.playerId),this.uiConfig=Rh((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{configName:[]},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new DI("ui",this.playerId))),Mc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((f=this.videoConfig)==null?void 0:f.showAds)],numbers:[AI()]}),Uv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Uv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(g=this.uiConfig.features.dpip)!=null?g:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride=Hs({preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(C=this.uiConfig.isMobile)!=null?C:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(L=this.videoConfig).autoplay&&(L.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(P=this.uiConfig.ads.slot)!=null?P:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((q=this.uiConfig.showLogo)!=null?q:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((j=this.videoConfig.videos)!=null&&j[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let X={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=pp.getLatestSupportedVersion(X):this.pictureInPictureApi=new Oa(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new up:void 0,this.slotsApi=this.uiConfig.features.slots?new ap(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new fp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new hp(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),Ub(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(ae=this.slotsApi)==null||ae.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Zn)&&(n(Zn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Zn).nextButtonActive=this.isNextButtonActive(),n(Zn).prevButtonActive=this.isPrevButtonActive(),n(Zn).endScreenVideoTitle=o.nextVideoTitle,n(Zn).endScreenVideoThumb=o.nextVideoThumb,n(Zn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=Hs({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Zn)&&(n(Zn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Zn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Zn).nextButtonActive=this.isNextButtonActive(),n(Zn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return _p(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return _p(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(OI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&La(e)}};import{InterfaceLanguage as Lne,VKNumericLanguage as Mne,loadVKLangPack as Vne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Nne,VideoFormat as One}from"@vkontakte/videoplayer-core/es2015";var Sne=()=>{window.customElements.define("vk-video-player",bp)};export{Xu as ControlButtonType,vs as GridTypes,Lne as InterfaceLanguage,Wd as MenuItemType,gs as PlayerPhase,Ll as VERSION,Mne as VKNumericLanguage,One as VideoFormat,Nne as VideoQuality,Vne as loadVKLangPack,Sne as registerPlayerWebComponent};
60
+ M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),$(m,p)};V(d,m=>{e.type==="off"?m(s):m(u,!1)})}$(r,l)},$$slots:{default:!0}}),H()}function pm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=_e().ui.t,a=f(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));zt(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return gs.KeyC},role:"button",children:(l,d)=>{let s=f(()=>i()?void 0:"outline");pa(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var z0=L('<span class="duration s-1z" data-testid="video_duration"> </span>'),W0=L('<div><span class="current s-1z" data-testid="current_time"> </span> <!></div>'),K0={hash:"s-1z",code:'.time.s-1z{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-1z{padding:0 0 0 8px}.current.s-1z{position:relative}.duration.s-1z{opacity:.7}.duration.s-1z:before{content:" / ";white-space:pre}'};function Yd(t,e){B(e,!0),G(t,K0);let i=h(e,"isMobile",3,!1),o=h(e,"isHidden",3,!1),r=h(e,"showDuration",3,!0),a=h(e,"ref",15),l=Ot(),d=de(!1),s=f(()=>jo(e.duration)),u=f(()=>jo(e.position));var m=W0();let p;var v=T(m),b=T(v,!0);S(v);var y=k(v,2);{var g=w=>{var I=z0(),C=T(I,!0);S(I),O(()=>ve(C,n(s))),$(w,I)};V(y,w=>{r()&&w(g)})}S(m),Ns(m,()=>Nl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Xe(m,w=>a(w),()=>a()),O(w=>{p=ne(m,1,"time s-1z",null,p,w),ve(b,n(u))},[()=>({mobile:i()})]),$(t,m),H()}import{noop as Ku}from"@vkontakte/videoplayer-shared/es2015";var q0=Ie('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),Q0=Ie("<path></path>"),G0=Ie('<path d="M14 3.96997C14.5523 3.96997 15 4.41769 15 4.96997V20.97C15 21.5223 14.5523 21.97 14 21.97C13.3585 21.97 12.7422 21.7208 12.2808 21.2751L6.79013 15.97H4C2.89543 15.97 2 15.0745 2 13.97V11.97C2 10.8654 2.89543 9.96997 4 9.96997H6.765L12.2794 4.66337C12.7417 4.21849 13.3584 3.96997 14 3.96997Z"></path><!>',1);function fa(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=f(()=>r(i(),o())),l=f(()=>cn(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Ze(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,m)=>{var p=G0(),v=k(ue(p));{var b=g=>{var w=q0();ui(),$(g,w)},y=g=>{var w=Q0();O(()=>Ve(w,"d",`${d}${n(a)==="max"?s:""}`)),$(g,w)};V(v,g=>{n(a)==="off"?g(b):g(y,!1)})}$(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as Y_,noop as Jn}from"@vkontakte/videoplayer-shared/es2015";import{noop as mm}from"@vkontakte/videoplayer-shared/es2015";import{noop as j0}from"@vkontakte/videoplayer-shared/es2015";var Y0=L('<div class="overlay"><!></div>');function fm(t,e){B(e,!0);let[i,o]=Oe(),r=()=>x(l,"$overlayContainer$",i),l=_e().ui.overlayContainer$,d=q(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};De(()=>{u(r())}),Nt(()=>(u(r()),()=>s(r())));var m=Y0(),p=T(m);ni(p,()=>{var v;return(v=e.children)!=null?v:vt}),S(m),Xe(m,v=>R(d,v),()=>n(d)),$(t,m),H(),o()}var X0=L('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),Z0=L("<div><!></div> <!>",1),J0={hash:"s-1o",code:'.tooltip-wrapper.s-1o{display:flex;flex-direction:column;min-width:0}.full-width.s-1o{width:100%}.tooltip.s-1o{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1o{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1o{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;line-height:0;position:absolute;width:0}'};function Ka(t,e){B(e,!0),G(t,J0);let[i,o]=Oe(),r=()=>x(X,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),m=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),b=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,j0),g=5,w=q(void 0),I=q(void 0),C,N=q(0),A=q(0),E=q(0),P=q(0),Q=Ot(),F=_e(),z=F.ui.playerSize,X=F.ui.overlayContainer$;De(()=>{Tt(()=>{y()(s())})});let se=F.getLogger().createComponentLog("Tooltip component"),Z=()=>{if(!r()||!n(I)||!n(w))return;R(A,g);let re=r().getBoundingClientRect(),ce=n(w).getBoundingClientRect(),Ne=ce.width,Re=n(I).clientWidth,et=a().width,Ee=(Ne-Re)/2,Te=ce.left+u()-re.left,Fe=Te+Ee,It=ce.top+m()-re.top,wt=Re/2-g,Mt=Fe<8,lt=Fe+Re>et-8;Mt&&(Fe=8,wt=Te+ce.width/2-2.5*g),lt&&(Fe=et-8-Re,wt=ce.left-re.left+ce.width/2-Fe-g),R(E,Fe,!0),R(P,It),R(N,wt,!0)},oe=()=>{!r()||!n(I)||!n(w)||R(A,-g)},J=()=>{if(!r()||!n(I)||!n(w))return;R(N,g);let re=r().getBoundingClientRect(),ce=n(w).getBoundingClientRect(),Ne=ce.height,Re=n(I).clientHeight,et=(Ne-Re)/2+Re,Ee=ce.left+u()-re.left-n(I).clientWidth,Te=2,Fe=Ee-g;Fe<8&&(Fe=8);let wt=ce.top+m()-re.top+et,Mt=Te-et/2,lt=Te-g;R(E,Fe,!0),R(P,wt),R(A,Mt),R(N,lt)},Ce=()=>{!r()||!n(I)||!n(w)||R(N,-g)},me=()=>{switch(b()){case"top":Z();break;case"bottom":oe();break;case"left":J();break;default:Ce()}},ee=()=>{try{if(!r()||!n(w))return;me(),s(!0)}catch(re){se({message:String(re)})}},be=()=>{s(!1)},we=()=>{n(I)&&(C||(C=window.setTimeout(ee,Q.controls.hideTimeoutTooltips)),s()&&ee())},ge=()=>{be(),window.clearTimeout(C),C=void 0},pe=(re,ce,Ne)=>{let Re="";switch(b()){case"top":Re=`transform: translate(${re}px, ${ce}px);`;break;case"bottom":Re=`transform: translate(${re}px, ${ce}px); top: auto; bottom: 100%;`;break;case"left":Re=`transform: translate(${re}px, ${ce}px); left: 0; right: auto;`;break;default:Re=`transform: translate(${re}px, ${ce}px);`}return Re+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Re+=` opacity: ${Ne?1:0}; visibility: ${Ne?"visible":"hidden"}`,Re},qe=(re,ce)=>{let Ne="";switch(b()){case"top":Ne=`transform: translate(${re}px, ${ce}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Ne=`transform: translate(${re}px, ${ce}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Ne=`transform: translate(${re}px, ${ce}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Ne=`transform: translate(${re}px, ${ce}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Ne},U=f(()=>pe(n(E),n(P),s())),D=f(()=>qe(n(N),n(A)));Nt(me),dn(()=>window.clearTimeout(C));var Qe=Z0(),K=ue(Qe);let ae;K.__pointermove=we,K.__pointerdown=ge,K.__pointerup=function(...re){var ce;(ce=e.disableMouseupTooltipShow?void 0:we)==null||ce.apply(this,re)};var xe=T(K);ni(xe,()=>{var re;return(re=e.children)!=null?re:vt}),S(K),Xe(K,re=>R(w,re),()=>n(w));var He=k(K,2);{var it=re=>{fm(re,{children:(ce,Ne)=>{var Re=X0(),et=T(Re),Ee=T(et,!0);S(et);var Te=k(et,2);S(Re),Xe(Re,Fe=>R(I,Fe),()=>n(I)),O(()=>{Ke(Re,n(U)),ve(Ee,d()),Ke(Te,n(D))}),$(ce,Re)},$$slots:{default:!0}})};V(He,re=>{d()&&!l()&&re(it)})}O(re=>ae=ne(K,1,"tooltip-wrapper s-1o",null,ae,re),[()=>({"full-width":p()})]),at("pointerenter",K,we),at("pointerleave",K,ge),$(t,Qe),H(),o()}Ge(["pointermove","pointerdown","pointerup"]);var G_=t=>{t.stopPropagation()},ex=L("<div><!></div>"),tx={hash:"s-1j",code:".btn-container.s-1j{align-items:center;display:flex;height:100%;position:relative;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent}.w-max.s-1j{min-width:0;width:100%}"};function Mo(t,e){B(e,!0),G(t,tx);let[i,o]=Oe(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=_e(),d=_o(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),b=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),g=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),C=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),A=h(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),P=h(e,"onTooltipVisibilityChange",3,mm),Q=h(e,"initialTranslateXPx",3,0),F=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,mm),X=h(e,"mouseLeave",3,mm),se=f(()=>v()?r()?m("tooltip_disabled_when_graph_on"):A():I()),Z=q(!1);De(()=>{C()||R(Z,!1)});var oe=ex();oe.__pointerdown=[G_],oe.__click=[G_];var J=T(oe);{var Ce=ee=>{Ka(ee,{get content(){return n(se)},get translateX(){return Q()},get translateY(){return F()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return P()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(Z)},set active(be){R(Z,be,!0)},children:(be,we)=>{var ge=Le(),pe=ue(ge);ni(pe,()=>{var qe;return(qe=e.children)!=null?qe:vt}),$(be,ge)},$$slots:{default:!0}})},me=ee=>{var be=Le(),we=ue(be);ni(we,()=>{var ge;return(ge=e.children)!=null?ge:vt}),$(ee,be)};V(J,ee=>{b()&&n(se)&&!a()?ee(Ce):ee(me,!1)})}S(oe),Xe(oe,ee=>y(ee),()=>y()),O(()=>{var ee;ne(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1j"),Ve(oe,"aria-hidden",E()||null)}),at("mouseenter",oe,function(...ee){var be;(be=z())==null||be.apply(this,ee)}),at("mouseleave",oe,function(...ee){var be;(be=X())==null||be.apply(this,ee)}),Ln(oe,"clientWidth",g),$(t,oe),H(),o()}Ge(["pointerdown","click"]);var ix=Ie('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function jd(t,e){let i=f(()=>(e.completed,"interactive-episode-completed-icon"));Ze(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=ix(),l=ue(a),d=k(l);O(()=>{Ve(l,"fill",sa),Ve(l,"fill-opacity",e.completed?1:.24),Ve(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),$(o,a)},$$slots:{default:!0}})}var ox=L("<div><!></div>"),nx={hash:"s-15",code:".interactive-episode-icon.s-15{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-15{opacity:.4;pointer-events:none}"};function vm(t,e){B(e,!0),G(t,nx);let o=_e().ui.t,r=q(0),a=f(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Mo(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=ox();let u;var m=T(s);let p=f(()=>!!e.videoEpisode.completed);jd(m,{get completed(){return n(p)}}),S(s),O(v=>{u=ne(s,1,"interactive-episode-icon s-15",null,u,v),Ke(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Ln(s,"clientWidth",v=>R(r,v)),$(l,s)},$$slots:{default:!0}}),H()}var rx=L('<div><div class="video-episode-inner s-14"><div class="video-episode-loaded s-14"></div> <div></div></div></div>'),sx=L('<div class="video-episodes-wrap s-14"></div>'),ax={hash:"s-14",code:".video-episodes-wrap.s-14{height:100%;position:absolute;width:100%}.video-episode.s-14{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-14:first-child{padding-left:0}.video-episode.s-14:last-child{padding-right:0}.video-episode.s-14:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-14,.video-episode-inner.s-14,.video-episode-loaded.s-14{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-14{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-14:first-child .video-episode-inner:where(.s-14),.video-episode.s-14:last-child .video-episode-inner:where(.s-14){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-14{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-14,.video-episode-loaded.s-14{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-14{background-color:var(--slider-filled-bg)}"};function gm(t,e){G(t,ax);let i=h(e,"videoEpisodes",19,()=>[]);var o=sx();yi(o,21,i,r=>r.from,(r,a)=>{var l=rx();let d;var s=T(l),u=T(s),m=k(u,2);let p;S(s),S(l),O((v,b)=>{d=ne(l,1,"video-episode s-14",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=ne(m,1,"video-episode-filled s-14",null,p,b),Ke(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),$(r,l)}),S(o),$(t,o)}function lx(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&R(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;R(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function dx(t,e,i,o,r,a,l,d){if(t.preventDefault(),e())return;let s=i(t.clientX,t.clientY),u=o(t.clientX);r()(s,u,n(a).width,t),n(l)&&d()(s)}function cx(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;R(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function ux(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function px(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),R(r,!1),a()(l)}var fx=L("<div></div>"),mx=L('<div class="bars s-t"><div class="loaded s-t"></div> <div></div></div>'),vx=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),gx={hash:"s-t",code:'.interactive-icons.s-t{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-t{top:-10px}.slider.s-t{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-t{cursor:default}.slider.s-t:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-t{background:var(--slider-bg);overflow:hidden}.bars.s-t,.loaded.s-t{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-t{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-t{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-t,.slider.square.s-t .filled:where(.s-t),.slider.square.s-t .loaded:where(.s-t),.slider.square.s-t>.bars:where(.s-t){border-radius:unset}.filled.active-live.s-t{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-t{background-color:var(--slider-filled-ads)}.handleWrap.s-t{left:-100%;position:absolute;width:100%}.handle.s-t{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-t{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-t .handle:where(.s-t),.slider-dragging.s-t .handle:where(.s-t),.slider.s-t:hover .handle:where(.s-t){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-t .handle:where(.s-t){transform:scale(1.3)}.slider-vertical.s-t{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-t{cursor:default;opacity:.4}'};function qa(t,e){B(e,!0),G(t,gx);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),m=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),b=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),g=h(e,"onPointerDown",3,Jn),w=h(e,"onHandleMove",3,Jn),I=h(e,"onPointerUp",3,Jn),C=h(e,"onPointerEnter",3,Jn),N=h(e,"onPointerMove",3,Jn),A=h(e,"onPointerLeave",3,Jn),E=h(e,"onMouseEnter",3,Jn),P=h(e,"onMouseLeave",3,Jn),Q=h(e,"onWheelUp",3,Jn),F=h(e,"onWheelDown",3,Jn),z=h(e,"onWheelLeft",3,Jn),X=h(e,"onWheelRight",3,Jn),se=h(e,"onDisabledClick",3,Jn),Z=h(e,"loadedProgress",3,0),oe=h(e,"filledProgress",3,0),J=h(e,"handleProgress",3,0),Ce=h(e,"ariaLabel",3,""),me=h(e,"ariaValueMin",3,void 0),ee=h(e,"ariaValueMax",3,void 0),be=h(e,"ariaValueNow",3,void 0),we=h(e,"ariaValueText",3,""),ge=h(e,"onContextMenu",3,Jn),pe=h(e,"handleAlwaysVisible",3,!1),qe=Ot(),U=q(void 0),D=q(!1),Qe=f(()=>{var ye;return(ye=ee())!=null?ye:0}),K=f(()=>{var ye;return Y_(m())&&((ye=m()[m().length-1])==null?void 0:ye.time)<n(Qe)}),ae=f(()=>Y_(m())&&m().length&&n(K)&&n(Qe)?et(Z()*100,oe()*100):[]);function xe(ye){if(ye.preventDefault(),i()&&R(U,i().getBoundingClientRect(),!0),b())return;let Me=Ne(ye.clientX,ye.clientY),rt=Re(ye.clientX);C()(Me,rt,n(U).width)}function He(ye){ye.preventDefault(),!b()&&A()()}function it(){E()()}function re(){P()()}function ce(ye){b()||p()&&(ye.preventDefault(),ye.deltaY<0?Q()():ye.deltaY>0?F()():ye.deltaX>0?X()():z()())}function Ne(ye,Me){return l()?Math.max(0,Math.min(1,(n(U).height-(Me-n(U).top))/n(U).height)):Math.min(Math.max(ye-n(U).x,0),n(U).width)/n(U).width}function Re(ye){return Math.min(Math.max(ye-n(U).x,0),n(U).width)}function et(ye,Me){let rt=qe.features.episodesClustering&&!v()?qe.episodeMinWidthPc:0,kt=[],fe=m()[0].time/n(Qe)*100,Be=0,We=0;for(let At=1;At<m().length;At++)Be=m()[At].time/n(Qe)*100,Be-fe>rt&&(kt.push({from:fe,width:Math.max(0,Be-fe),loadedWidth:Math.max(0,Math.min(Be,ye)-fe),filledWidth:Math.max(0,Math.min(Be,Me)-fe),interactive:m()[At-1].interactive,completed:m()[At-1].completed}),fe=m()[At].time/n(Qe)*100,We++);let yt={from:fe,width:Math.max(0,100-fe),loadedWidth:Math.max(0,Math.min(ye,100)-fe),filledWidth:Math.max(0,Math.min(Me,100)-fe),interactive:m()[We].interactive,completed:m()[We].completed};100-fe<rt?(We-=1,kt[We].width+=100-fe,kt[We].loadedWidth+=Math.max(0,Math.min(ye,100)-fe),kt[We].filledWidth+=Math.max(0,Math.min(Me,100)-fe)):kt[We]=yt;let Kt=m()[0].time;if(Kt!==0){let At=Kt/n(Qe)*100;kt.unshift({from:0,width:At,loadedWidth:Math.min(At,ye),filledWidth:Math.min(At,Me)})}return kt}function Ee(ye){return Math.max(0,Math.min(100,ye*100))}let Te=f(()=>Ee(Z())),Fe=f(()=>Ee(oe()));var It=vx(),wt=ue(It);{var Mt=ye=>{var Me=fx();let rt;yi(Me,21,()=>n(ae),kt=>kt.from,(kt,fe)=>{var Be=Le(),We=ue(Be);{var yt=Kt=>{vm(Kt,{get videoEpisode(){return n(fe)},get disabled(){return b()}})};V(We,Kt=>{n(fe).interactive&&Kt(yt)})}$(kt,Be)}),S(Me),O(kt=>rt=ne(Me,1,"interactive-icons s-t",null,rt,kt),[()=>({mobile:s(),hidden:s()&&!n(D)})]),$(ye,Me)};V(wt,ye=>{v()&&ye(Mt)})}var lt=k(wt,2);let Et;lt.__pointerdown=[lx,i,U,b,D,Ne,g],lt.__pointermove=[dx,b,Ne,Re,N,U,D,w],lt.__pointerup=[cx,b,D,Ne,I],lt.__click=[ux,b,se,Ne],lt.__contextmenu=[px,Ne,b,se,D,ge];var Jt=T(lt);{var Pt=ye=>{gm(ye,{get videoEpisodes(){return n(ae)},get disabled(){return b()},get isMobile(){return s()}})},Bt=ye=>{var Me=mx(),rt=T(Me),kt=k(rt,2);let fe;S(Me),O(Be=>{Ve(rt,"data-value",n(Te)),Ke(rt,`transform: translateX(${n(Te)}%);`),fe=ne(kt,1,"filled s-t",null,fe,Be),Ve(kt,"data-value",n(Fe)),Ke(kt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),$(ye,Me)};V(Jt,ye=>{n(ae).length?ye(Pt):ye(Bt,!1)})}var Wt=k(Jt,2);let Y;var Pe=T(Wt);let le;S(Wt),S(lt),Xe(lt,ye=>i(ye),()=>i()),O((ye,Me,rt,kt)=>{var fe,Be;Et=ne(lt,1,`slider ${(fe=o())!=null?fe:""}`,"s-t",Et,ye),Ve(lt,"aria-label",Ce()),Ve(lt,"aria-valuemin",me()),Ve(lt,"aria-valuemax",ee()),Ve(lt,"aria-valuenow",be()),Ve(lt,"aria-valuetext",we()),Ve(lt,"data-testid",(Be=r())!=null?Be:null),Y=ne(Wt,1,"handleWrap s-t",null,Y,Me),Ke(Wt,rt),le=ne(Pe,1,"handle s-t",null,le,kt)},[()=>({disabled:b(),"slider-dragging":n(D),hidden:a(),"handle-always-visible":pe(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ee(J())}%);`,()=>({"active-live":d()})]),at("pointerenter",lt,xe),at("pointerleave",lt,He),at("mouseenter",lt,it),at("mouseleave",lt,re),at("wheel",lt,ce),$(t,It),H()}Ge(["pointerdown","pointermove","pointerup","click","contextmenu"]);var oo=(t,e)=>Ld[t]>=Ld[e];var Bs=(t,e)=>Ld[t]<=Ld[e],j_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var _x=L("<div><!></div>"),bx=L("<div><!> <!></div>"),$x={hash:"s-28",code:".volumeBar-container.s-28{align-items:center;display:flex}.vertical.s-28 .btn,.vertical.s-28 .tooltip-wrapper,.volumeBar-container.vertical.s-28{width:40px}.volumeBar.s-28{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-28{padding:0 8px 0 0;width:0}"};function hm(t,e){var Re,et;B(e,!0),G(t,$x);let[i,o]=Oe(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(xe,"$controlsVisible",i),u=_e(),m=Ot(),p=u.state.volume$,v=u.state.muted$,{setVolume:b,startVolumeChanging:y,stopVolumeChanging:g}=u.actions.internal,w=u.ui.currentGridType$,I=(Re=u.callbacks)==null?void 0:Re.onAudioDoesNotExistHint,C=(et=u.callbacks)==null?void 0:et.onAudioDisabledHint,N=u.state.isAudioAvailable$,A=u.state.isAudioDisabled,E=u.ui.t,P=q(!1),Q,F=f(()=>e.isAds||r()),z=f(()=>!n(F)||a()||l()===0),X=f(()=>Bs(d(),"l")),se=f(()=>n(X)?"":n(z)?!r()||A?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),Z=f(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),oe=f(()=>n(z)?0:l()),J=!1,Ce=f(()=>e.isAds?!1:A?!C:r()?!1:!I);function me(Ee){y(),b(Ee)}function ee(){Fu(u,l(),m.controls.volumeStepWheel)}function be(){Uu(u,l(),m.controls.volumeStepWheel)}function we(Ee){b(Ee)}function ge(Ee){b(Ee),g()}function pe(){J=!0}function qe(){J=!1,Qe()}function U(){clearTimeout(Q),R(P,!0)}function D(){Qe()}function Qe(){Q=window.setTimeout(()=>{J||R(P,!1)},m.controls.volumeBarTimeout)}function K(Ee){Ee.preventDefault(),Ee.deltaY<0?ee():Ee.deltaY>0&&be()}let ae=q(!1),xe=u.ui.controlsVisible;De(()=>{s()||R(ae,!1)});var He=bx();let it;var re=T(He);Ka(re,{get content(){return n(se)},translateY:-18,get active(){return n(ae)},set active(Ee){R(ae,Ee,!0)},children:(Ee,Te)=>{let Fe=f(()=>n(X)?"btn-volume-vertical":"btn-volume-horizontal");zt(Ee,{className:"btn-full-opacity",get disabled(){return n(Ce)},get testId(){return n(Fe)},get ariaLabel(){return n(Z)},get click(){return e.click},get ariaKeyShortCut(){return gs.KeyM},role:"button",children:(It,wt)=>{fa(It,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var ce=k(re,2);{var Ne=Ee=>{var Te=_x();let Fe;var It=T(Te);let wt=f(()=>n(X)?"volumeBar-slider-vertical":""),Mt=f(()=>n(X)&&!n(P)),lt=f(()=>n(X)?pe:Ku),Et=f(()=>n(X)?qe:Ku),Jt=f(()=>Math.round(n(oe)*100)),Pt=f(()=>`${Math.round(n(oe)*100)}%`),Bt=f(()=>n(X)?"volume-slider-vertical":"volume-slider");qa(It,{get className(){return n(wt)},get isHidden(){return n(Mt)},get isVertical(){return n(X)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:be,onPointerDown:me,onHandleMove:we,onPointerUp:ge,get onPointerEnter(){return n(lt)},get onPointerLeave(){return n(Et)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Jt)},get ariaValueText(){return n(Pt)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Bt)}}),S(Te),O(Wt=>Fe=ne(Te,1,"volumeBar s-28",null,Fe,Wt),[()=>({"volumeBar-vertical":n(X)})]),$(Ee,Te)};V(ce,Ee=>{n(F)&&Ee(Ne)})}S(He),O(Ee=>it=ne(He,1,"volumeBar-container s-28",null,it,Ee),[()=>({vertical:n(X)})]),at("mouseenter",He,function(...Ee){var Te;(Te=n(X)?U:Ku)==null||Te.apply(this,Ee)}),at("mouseleave",He,function(...Ee){var Te;(Te=n(X)?D:Ku)==null||Te.apply(this,Ee)}),at("wheel",He,K),$(t,He),H(),o()}import{noop as wx}from"@vkontakte/videoplayer-shared/es2015";var yx=Ie('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),xx=Ie('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function _m(t,e){let i=h(e,"isFullscreen",8,!1),o=In(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=ue(l);{var s=m=>{var p=yx();$(m,p)},u=m=>{var p=xx();$(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}$(r,l)},$$slots:{default:!0}})}function Xd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,wx),r=_e(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=f(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));zt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=ca(u);a.set(m),o()()},get ariaKeyShortCut(){return gs.KeyF},role:"button",children:(u,m)=>{_m(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var Sx=Ie('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function bm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=Sx();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),S(o),$(t,o)}var Cx=Ie('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function $m(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=Cx();io(o,()=>ke({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var r=T(o);ni(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(6),S(o),$(t,o)}var Tx={hash:"s-2a",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function ym(t,e){B(e,!0),G(t,Tx);let i=h(e,"short",3,!1),o=h(e,"isCyrillic",3,!0),r=h(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=f(()=>!o()&&!i()?91:i()?l:95),s=f(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=f(()=>`0 0 ${n(d)} 24`);$m(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),H()}function Zd(t,e){B(e,!0);let[i,o]=Oe(),r=()=>x(b,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(g,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),m=Ot(),p=_e(),v=p.ui.currentGridType$,b=p.ui.isMobile,y=p.ui.t,g=p.isCyrillicRelatedInterface$,w=f(()=>m.logoType!=="vk"),I=f(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),C=f(()=>(r()&&Bs(a(),"m")||Bs(a(),"l"))&&n(w)),N=()=>{var P,Q;e.click(),(P=p.callbacks)!=null&&P.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},A=f(()=>!s()),E=f(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");zt(t,{className:"btn-full-opacity",get disabled(){return n(A)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(P){d(P)},children:(P,Q)=>{var F=Le(),z=ue(F);{var X=Z=>{ym(Z,{get logo(){return m.logoType},get short(){return n(C)},get isCyrillic(){return l()}})},se=Z=>{bm(Z,{})};V(z,Z=>{n(w)?Z(X):Z(se,!1)})}$(P,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as kx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Z_}from"@vkontakte/videoplayer-core/es2015";var Ix=Ie('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-w"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-w"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-w"></path>',1),Ex=Ie('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),Px={hash:"s-w",code:".animated.s-w{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-w{animation-name:s-w-wave1}.wave2.animated.s-w{animation-name:s-w-wave2}.wave3.animated.s-w{animation-name:s-w-wave3}@keyframes s-w-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-w-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-w-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Jd(t,e){B(e,!0),G(t,Px);let i=h(e,"isMobile",3,!1),o=f(()=>e.iconState===Z_.CONNECTED),r=f(()=>e.iconState===Z_.CONNECTING),a=f(()=>n(o)?"#2688EB":sa),l=f(()=>e.size?cn(e.size):void 0);var d=Le(),s=ue(d);{var u=p=>{Ze(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,b)=>{var y=Ix();ui(2),$(v,y)},$$slots:{default:!0}})},m=p=>{Ze(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,b)=>{var y=Ex(),g=ue(y);let w;var I=k(g);let C;var N=k(I);let A;var E=k(N);let P;var Q=k(E);let F;O((z,X,se,Z,oe)=>{w=ne(g,0,"wave2 s-w",null,w,z),C=ne(I,0,"wave3 s-w",null,C,X),A=ne(N,0,"wave1 s-w",null,A,se),P=ne(E,0,"s-w",null,P,Z),F=ne(Q,0,"s-w",null,F,oe)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),$(v,y)},$$slots:{default:!0}})};V(s,p=>{i()?p(u):p(m,!1)})}$(t,d),H()}import{noop as Ax}from"@vkontakte/videoplayer-shared/es2015";function ec(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Ax),l=_e().ui.t,d=f(()=>e.state===kx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));zt(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{Jd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as Mx}from"@vkontakte/videoplayer-shared/es2015";var Lx=Ie('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function xm(t){Ze(t,{testId:"episodes-icon",children:(e,i)=>{var o=Lx();ui(2),$(e,o)},$$slots:{default:!0}})}var qu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Vx=L('<span class="text mobile s-26"> </span> <div class="chevron-episodes s-26" data-testid="btn-episodes_icon"><!></div>',1),Rx=L('<span class="text s-26"> </span>'),Nx=L('<span class="text count s-26"> </span>'),Ox=L('<span class="icon s-26"><!></span> <!>',1),Dx={hash:"s-26",code:".icon.s-26{flex-shrink:0}.text.s-26{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-26{overflow:visible}.text.mobile.s-26{padding:0 3px 0 4px}.chevron-episodes.s-26{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function tc(t,e){var J,Ce,me;B(e,!0),G(t,Dx);let[i,o]=Oe(),r=()=>x(y,"$currentGridType$",i),a=()=>x(g,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),m=h(e,"timeCodes",19,()=>[]),p=_e(),v=(Ce=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?Ce:Mx,b=!!((me=p.callbacks)!=null&&me.onEpisodeClicked),y=p.ui.currentGridType$,g=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,I=p.ui.isMobile,C=p.ui.t,N=q(void 0),A=ee=>{var we,ge,pe;if(!!((we=p.callbacks)!=null&&we.onEpisodeClicked)){let qe=ca(ee);g.set(qe),w.set(!0),(pe=(ge=p.callbacks)==null?void 0:ge.onEpisodeClicked)==null||pe.call(ge,qe)}},E=q(null),P=f(()=>s()/u());De(()=>{var be;let ee=qu(n(P),u(),m());ee?((be=n(E))==null?void 0:be.time)!==ee.time&&(v(ee),R(E,ee,!0)):R(E,null)});let Q=f(()=>{var ee;return((ee=n(E))==null?void 0:ee.text)||""}),F=f(()=>oo(r(),"xl")?"FULL":oo(r(),"m")?"COUNT":"SHORT"),z=f(()=>`${C("tooltip_episodes")}: ${n(Q)}`),X=(ee,be,we)=>mt(null,null,function*(){yield vo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&be&&!we&&Tt(()=>{g.set(!1),ee.focus()})});De(()=>{X(n(N),a(),l())});var se=Le(),Z=ue(se);{var oe=ee=>{let be=f(()=>d()?"px-0":""),we=f(()=>!b);zt(ee,{get className(){var ge;return`w-max btn-full-opacity btn-jc-l ${(ge=n(be))!=null?ge:""}`},testId:"btn-episodes",click:A,get disabled(){return n(we)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(ge){R(N,ge,!0)},children:(ge,pe)=>{var qe=Le(),U=ue(qe);{var D=K=>{var ae=Vx(),xe=ue(ae),He=T(xe,!0);S(xe);var it=k(xe,2),re=T(it);Rr(re,{direction:"right"}),S(it),O(()=>ve(He,n(Q))),$(K,ae)},Qe=K=>{var ae=Ox(),xe=ue(ae),He=T(xe);xm(He,{}),S(xe);var it=k(xe,2);{var re=Ne=>{var Re=Rx(),et=T(Re,!0);S(Re),O(()=>ve(et,n(Q))),$(Ne,Re)},ce=(Ne,Re)=>{{var et=Ee=>{var Te=Nx(),Fe=T(Te,!0);S(Te),O(()=>ve(Fe,m().length)),$(Ee,Te)};V(Ne,Ee=>{n(F)==="COUNT"&&Ee(et)},Re)}};V(it,Ne=>{n(F)==="FULL"?Ne(re):Ne(ce,!1)})}$(K,ae)};V(U,K=>{d()?K(D):K(Qe,!1)})}$(ge,qe)},$$slots:{default:!0}})};V(Z,ee=>{n(E)&&ee(oe)})}$(t,se),H(),o()}import{debounceFn as vb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Qx,PlaybackState as Kl,Player as Gx,PredefinedQualityLimits as $s,VideoFormat as oc,clientChecker as nb}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as gr,getHighestQuality as Yx,InterfaceLanguage as jx,isInvariantQuality as Xx,isNonNullable as Zx,loadVKLangPack as Jx,Logger as e2,map as rb,merge as t2,Observable as Ju,Subject as ql,Subscription as Em,TracerFactory as i2,ValueSubject as o2,VideoQuality as n2,devNull as r2,now as s2,filter as a2,once as l2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Fs}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Bx,devNull as si,isNonNullable as Hx,now as ai}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Fx,Subject as un,clearVideoElement as Ux}from"@vkontakte/videoplayer-shared/es2015";var zx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Qu=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new un,loadStarted$:new un,loadEnded$:new un,loadError$:new un,ready$:new un,slotRequested$:new un,started$:new un,timeRemained$:new un,paused$:new un,resumed$:new un,ended$:new un,empty$:new un,skipped$:new un,clicked$:new un,closed$:new un,error$:new un};this.loadAdman=e=>(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ai()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ai()]}),o())};Fx(zx,e,this.loadTimeout).then(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ai()]}),window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ai()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ai()]}),o(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let r;this.events.loadStarted$.next();let a=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ai()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ai()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ai()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ai()]}),!d&&(window.AdmanHTML?(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ai()]}),i(),this.events.loadEnded$.next()):(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ai()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ai()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ai(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(o=this.externalApi)!=null&&o.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var o;((o=this.adsState)!=null&&o.playbackState?$e(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ai()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{si.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ai()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),si.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ai()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return mt(this,null,function*(){var N,A;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ai(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:m,externalApi:p}=e;this.externalApi=p;let v,b=this.playerState&&$e(this.playerState.vsid);b&&(this.isVsidOriginal?v=b:v=parseInt(b,36));let{isEmbed:y,immediateOrigin:g}=Bx(),w=(N=y?g:window.location.href)!=null?N:window.location.href,I=ke(Qt(ke(Qt(ke({},s),{dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o}),v?{request_id:v}:{}),{duration:m}),u);I=Object.fromEntries(Object.entries(I).filter(([E,P])=>Hx(P)));let C={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:I,browser:{mobile:!1}};try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),(A=this.externalApi)!=null&&A.videoGetAds){let P=yield this.safeExternalCall(this.externalApi.videoGetAds,I);P&&(delete C.slot,delete C.params,Object.assign(C,{json:P}))}E.init(C),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(C)}`})}catch(E){si.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ai()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ai()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let l="Switch to video: Adman state was not updated correctly";this.log({message:l}),this.events.error$.next(l)}(a=(r=this.actions).switchFromAdsToVideo)==null||a.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adsState){this.log({message:"toggle play"});let i=$e(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(o){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ai()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(si.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ai()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,m,p,v;si.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ai()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(m=this.adman)==null||m.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Ux(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return mt(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var J_=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var wm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new Gu,{startTime:m,endTime:p}=u.parse(s);l.startTime=m,l.endTime=p}else if(s.trim()!==""){let u=new Sm,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Gu=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},o=this.timingRegExp.exec(e);return o&&(i.startTime=this.calcTime(o[1],o[2],o[3],o[4]),i.endTime=this.calcTime(o[6],o[7],o[8],o[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",o="0",r="0"){let a=Number(e)*60*60,l=Number(i)*60,d=Number(o),s=+`0.${r}`;return a+l+d+s}},Sm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((m,p)=>{let v=l.indexOf(p,d);return m===-1||m>v?v:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Gu;for(let l of r)a.isTime(l)?i.texts.push({type:"timestamp",value:a.parseTime(l)}):i.texts.push({type:"text",value:l});return i}},eb=wm;import{isNonNullable as Cm}from"@vkontakte/videoplayer-shared/es2015";var Qa,Ai,Tm=0,Im=!1,tb="",ib=(t,e=0,i=0)=>t<e&&t<i,Yu=(t,e=0,i=0)=>t>=e&&t<=i,Wx=(t,e=0,i=0)=>t>e&&t>i,ob=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:m})=>Yu(t,u,m));let a=t>=Tm,l=t<Tm;if(Tm=t,l&&(Im=!1),Cm(Qa)&&Yu(t,Qa.startTime,Qa.endTime)&&tb===e.value)return Qa;if(!Cm(Ai)&&(r!=null&&r.length)&&!Im){Ai=r.find(({startTime:u,endTime:m})=>Yu(t,u,m)||a&&ib(t,u,m)),Qa=void 0,!Cm(Ai)&&r[r.length-1].endTime<t&&(Im=!0);return}else{if(Yu(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime))return Qa=Ai,Ai=void 0,tb=e.value,Qa;(a&&Wx(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime)||l&&ib(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime))&&(Ai=void 0)}};var ju={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Kx={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},ic=t=>{var e,i;return(i=(e=ju[t])!=null?e:ju[Kx[t]])!=null?i:void 0};import{Subscription as qx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Xu=class{constructor(e,i,o,r=new qx){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=o;this.statSubscription=r}destroy(){var e,i,o;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(o=this.mediascopePixel)==null||o.destroy(),this.statSubscription.unsubscribe()}};var Zu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Zu||{});var bs=t=>t!=null?t:0,Hs=(t,e)=>{var r,a;let i=(r=t==null?void 0:t.getBoundingClientRect)==null?void 0:r.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(bs(i==null?void 0:i.top)-bs(o==null?void 0:o.top)),left:Math.round(bs(i==null?void 0:i.left)-bs(o==null?void 0:o.left)),bottom:Math.round(bs(i==null?void 0:i.bottom)-bs(o==null?void 0:o.top)),right:Math.round(bs(i==null?void 0:i.right)-bs(o==null?void 0:o.left))}},zl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:bs(e==null?void 0:e.width),height:bs(e==null?void 0:e.height)}};var Rn="off";var Wl=t=>!!(Math.round(Math.abs(t)/90)%2);var sb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:p,uiConfig:v,coreConfig:b,player:y,disabledControls:g,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:C,replayInteractive:N,stopPlayer:A,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,additionalButtons:Q,additionalSettingsMenuItems:F,additionalContextMenuItems:z,playPrevVideo:X,playNextVideo:se,onVideoChanged:Z,looped:oe=!1,statistics:J,saveRate:Ce,internalsExposure:me,playerView:ee,playerId:be,metaConfig:we})=>{var jv,Xv;let ge=Qt(ke({},b),{isAudioDisabled:l,live:Qt(ke({},(jv=b.live)!=null?jv:{}),{isLiveCatchUpMode:!!r})}),pe=v,qe=i2.createRootTracer(pe.features.tracer),U=qe.createComponentTracer("Store"),D=y||new Gx(ge,qe,{playerId:be,onDevNullLog:s==null?void 0:s.onDevNullLog});me==null||me.expose({corePlayer:D});let Qe=new e2,K=new Qu(Qe,{loadTimeout:pe.ads.loadTimeout,initTimeout:pe.ads.initTimeout,runtimeTimeout:pe.ads.runtimeTimeout,useAdmanFromNPM:pe.ads.useAdmanFromNPM,volumeMultiplier:pe.ads.volumeMultiplier,isVsidOriginal:pe.ads.isVsidOriginal}),ae=Da.getInstance(),xe=u==null?void 0:u.pictureInPictureApi,He=u==null?void 0:u.annotationsApi,it=u==null?void 0:u.slotsApi,re=u==null?void 0:u.focusManager,ce=Qe.createComponentLog("Store"),Ne,Re,et={},Ee=new yu,Te=new Em,Fe="",It=de(!1),wt=J&&J.oneStat?ri(J.oneStat.vsid$):Vr(void 0),Mt=de(aa()),lt=de(!1),Et=()=>E_(document,nb.device.isIOS),Jt=(Xv=xe==null?void 0:xe.info.isActive$)!=null?Xv:new o2(!1),Pt=de(0),Bt=de(!1),Wt=de(!1),Y=de([]),Pe=t2(D.events.fatalError$,D.events.managedError$).subscribe(c=>Y.update(_=>[..._,c])),le=Vr(!1,c=>{let _=D.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),ye=c=>mt(null,null,function*(){var ie;let _=Object.values(jx).includes(c);if(pe.downloadVKLanguages&&(_&&pe.updateBuiltinLanguages||!Hf(c))){let Se;try{Se=yield Jx(c,Dh,Bh)}catch(je){(ie=J==null?void 0:J.oneStat)==null||ie.logError({errorType:"VKLangPack",fatal:!1}),ae==null||ae.report(je,{errorType:"VKLangPack",fatal:!1})}Se&&(Bf({language:c,pack:Se,fallback:pe.defaultLanguage}),Me.set(c),rt.update(je=>je+1))}Hf(c)&&Me.set(c)}),Me=de(t),rt=de(0),kt=de(e);ye(t);let fe=(c,_)=>{let M=$e(Me);return Ff(M,c,_,pe.defaultLanguage)},Be=de("thumb");Be.subscribe(c=>{c==="ads"&&D.info.playbackState$.getValue()&&Kt()});let We=(()=>{let c=hi([le,Be],([_,M])=>_?"crashed":M);return Qt(ke({},c),{is:_=>$e(c)===_})})(),yt=de(),Kt=()=>{yt.set({muted:D.info.muted$.getValue()})},At=(()=>{let c=de(new Set(g));return Qt(ke({},c),{add:_=>{c.update(M=>new Set([...M].concat(_)))},remove:_=>{c.update(M=>{let ie=[...M];return new Set(Array.isArray(_)?ie.filter(Se=>!_.includes(Se)):ie.filter(Se=>Se!==_))})},includes:_=>{let M=$e(c);return Array.isArray(_)?_.every(ie=>M.has(ie)):M.has(_)}})})(),mi=de({width:0,height:0}),pi=null,Oi=D.info.isBuffering$,Vt=Vr(Oi.getValue(),c=>{let _=Oi.subscribe(M=>{M&&pi===null?pi=window.setTimeout(()=>{c(Oi.getValue()),pi=null},pe.loaderDelay):c(M)});return()=>{_.unsubscribe(),pi&&clearTimeout(pi)}});U.log("create store"),ce({message:"create store"});let vi=c=>{let _=c.container,M=()=>{gt=new MutationObserver(Se=>{let{removedNodes:je}=Se[0];je.length&&_.append(D.experimental.element$.getValue())}),gt.observe(_,{childList:!0})},ie=D.experimental.element$.getValue();if(ie)_.append(ie),M();else{let Se=D.experimental.element$.pipe(a2(je=>!!je),l2()).subscribe(je=>{_.append(je),M()});Te.add(Se)}},$i=c=>{ce({message:`init video, config: ${JSON.stringify(c)}`}),w?vi(c):(r2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[s2()]}),D.initVideo(c)),U.log("init video",{isInteractive:w}),c.subtitles&&D.setExternalTextTracks(c.subtitles),Ne=c,Fe=c.subtitlesForcedLanguage||""},pt=new ql,Xt=c=>pt.next(c),Di=new ql,xi=new ql,oi=new ql,gt=null,Ye={actionRewind$:Di,actionSeek$:xi,inPiP$:Jt,inFullscreen$:new Ju(c=>Mt.subscribe(_=>c.next(_))),actionSetSubtitle$:oi,nextMovie$:pt},gi=new ql,go=new ql,Xo={actionSeek$:xi,actionSubtitlesSwitched$:gi,actionQuality$:go,playerSize$:new Ju(c=>mi.subscribe(_=>c.next(_))),inPiP$:Jt,inFullscreen$:new Ju(c=>Mt.subscribe(_=>c.next(_))),isLoaderVisible$:new Ju(c=>Vt.subscribe(_=>c.next(_)))};if(J){let{oneStat:c,thinOneStat:_,mediascopePixel:M,statSubscription:ie}=J;c&&(w||ie.add(c.attachTo(D)),ie.add(c.attachToUi(Ye)),ie.add(c.attachToAds(K.events)),c.authorize(a).catch(Se=>{ce({message:`onestat auth error ${String(Se)}`})}),M&&M.attachTo(D)),_&&(ie.add(_.attachTo(D,K.events)),ie.add(_.attachToUi(Xo)),ie.add(_.attachToAds(K.events)),_.updateContext({isMobile:$e(It)}),_.authorize(a))}if(ae){let c=new Em,_=(M,ie)=>c.add(M.subscribe(ie));if(_(D.events.managedError$,M=>{ae.logIError(M)}),_(D.events.fatalError$,M=>{ae.logIError(M,!0)}),J){let{oneStat:M}=J;M&&_(M.experimental.error$,ie=>{ae.logIError(ie)})}ae.sentrySubscription.add(c)}let Zo=()=>{if(nb.device.isIOS&&Re)try{P_(Re)}catch(c){ce({message:`exitIosSafariFullscreen failed: ${c}`})}};Te.add(D.experimental.element$.subscribe(c=>{c&&(Re=c,c.classList.add("player-media"),Ha(xe)&&xe.updateVideoElement(),w&&c.setAttribute("pip","false"),(ee==="preview"||!pe.features.pip&&!pe.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(D.events.ended$.subscribe(()=>{var c;Zo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(D.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(D.events.started$.subscribe(()=>mt(null,null,function*(){var _,M;Ha(xe)&&(yield xe==null?void 0:xe.revealPictureInPicture());let c=D.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(M=et.onStarted)==null||M.call(et,c)}))).add(D.events.willSeek$.subscribe(({from:c,to:_})=>{var M;(M=s==null?void 0:s.onSeek)==null||M.call(s,c,_)})).add(D.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(D.info.position$.subscribe(c=>{var M;let _=D.info.duration$.getValue();isFinite(_)&&_>0&&((M=s==null?void 0:s.onTimeupdate)==null||M.call(s,_,c),K.setPosition(c,_))})).add(D.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(D.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(D.events.loadedMetadata$.subscribe(()=>{Bt.set(!0)})).add(D.info.is3DVideo$.subscribe(c=>{Wt.set(c)})).add(D.info.isEnded$.subscribe(c=>{w&&(c?(C!=null&&C.getValue()&&At.add(Ad),At.add("PLAY_BUTTON")):At.remove("PLAY_BUTTON"))})).add(D.info.liveTime$.subscribe(c=>{var _;(_=s==null?void 0:s.onLiveTime)==null||_.call(s,c)})).add(D.info.isStalled$.subscribe(c=>{var _;(_=s==null?void 0:s.onStalledChanged)==null||_.call(s,c)})).add(D.info.isLiveEnded$.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onLiveEnded)==null?void 0:_.call(s))})).add(K.events.loadStarted$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:_.call(c)})).add(K.events.loadEnded$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:_.call(c)})).add(K.events.loadError$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:_.call(c)})).add(K.events.init$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:_.call(c)})).add(K.events.ready$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:_.call(c)})).add(K.events.started$.subscribe(c=>{var _,M;return(M=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onStarted)==null?void 0:M.call(_,c)})).add(K.events.timeRemained$.subscribe(c=>{var _,M;return(M=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onTimeRemained)==null?void 0:M.call(_,c)})).add(K.events.ended$.subscribe(c=>{var _,M;return(M=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onCompleted)==null?void 0:M.call(_,c)})).add(K.events.empty$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:_.call(c)})).add(K.events.clicked$.subscribe(c=>{var _,M;return(M=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClicked)==null?void 0:M.call(_,c)})).add(K.events.closed$.subscribe(c=>{var _,M;return(M=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClosed)==null?void 0:M.call(_,c)})).add(K.events.error$.subscribe(c=>{var _,M;return(M=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onError)==null?void 0:M.call(_,c)})).add(K.events.paused$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:_.call(c)})).add(K.events.resumed$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:_.call(c)}));let xt=new Em,Ht=()=>{var je,Lt,Ft;let{debugLog:c}=pe,_,M="#9df7b7",ie="#efd169";if(c&&c!==!0){let{colors:Gt}=c;_=c.tag,M=(je=Gt==null?void 0:Gt[0])!=null?je:M,ie=(Ft=(Lt=Gt==null?void 0:Gt[1])!=null?Lt:Gt==null?void 0:Gt[0])!=null?Ft:ie}let Se=_?`: ${_}`:"";xt.add(D.events.log$.subscribe(Gt=>{console.debug(`%c sdk${Se} `,`background:${M};`,`sdk component: ${Gt.component}`,Gt.message)})).add(Qe.log$.subscribe(Gt=>{console.debug(`%c ui${Se} `,`background:${ie};`,`ui component: ${Gt.component}.`,Gt.message)}))},W=()=>{xt.unsubscribe()},Rt=(c,_)=>{U.log("start camera manual rotation",{mx:c,my:_}),D.startCameraManualRotation(c,_)},li=(c=!1)=>{U.log("stop camera manual rotation",{immediate:c}),D.stopCameraManualRotation(c)},ft=(c,_,M)=>{U.log("move camera focus px",{xpx:c,ypx:_,dt:M}),D.moveCameraFocusPX(c,_,M)},ei=()=>{D.holdCamera()},ht=()=>{D.releaseCamera()},nt=Vr(D.info.position$.getValue(),c=>{let _,M,ie=()=>{let Se=D.info.playbackState$.getValue(),je=D.info.isLive$.getValue(),Lt=D.info.duration$.getValue(),Ft=D.info.position$.getValue();if(Se&&[Kl.PLAYING,Kl.PAUSED].includes(Se)){let Gt=je?Ft-Lt:D.getExactTime();Gt!==M&&c(Gt),M=Gt}_=requestAnimationFrame(ie)};return ie(),()=>cancelAnimationFrame(_)}),Bi=ri(D.info.playbackState$),Li=ri(D.info.isBuffering$),fn=hi([Bi,Li],([c,_])=>_?"buffering":c),mn=ri(D.info.currentBuffer$),Mi=ri(D.info.isEnded$),Hi=ri(D.info.isLive$),Nn=pe.features.playbackRate?ri(D.info.canChangePlaybackSpeed$):Vr(!1),bo=ri(D.info.liveBufferTime$),ro=ri(D.info.volume$),ki=ri(D.info.muted$),Vo=xu(D.info.predefinedQualityLimitType$.pipe(rb(c=>c===$s.TRAFFIC_SAVING)),D.info.predefinedQualityLimitType$.getValue()===$s.TRAFFIC_SAVING),Ro=xu(D.info.predefinedQualityLimitType$.pipe(rb(c=>c===$s.HIGH_QUALITY)),D.info.predefinedQualityLimitType$.getValue()===$s.HIGH_QUALITY),vn=ri(D.info.autoQualityLimitingAvailable$),Or=ri(D.info.availableQualities$),Dr=ri(D.info.availableQualitiesFps$),Br=ri(D.info.chromecastState$),xs=ri(D.info.chromecastDeviceName$),Hr=ri(D.info.currentFormat$),ir=ri(D.info.throughputEstimation$),Fr=ri(D.info.videoBitrate$),gn=ri(D.info.intrinsicVideoSize$),hn=ri(D.info.duration$),hr=ri(D.info.isAudioAvailable$),_r=()=>{pi&&clearTimeout(pi),pi=null},Jo=hi([hn,Hi],([c,_])=>_?-c:c),br=hi([Bi],([c])=>c===Kl.PLAYING),$r=ri(D.info.atLiveEdge$),or=ri(D.info.atLiveDurationEdge$),On=ri(D.info.position$),as=hi([On,hn],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),No=hi([Br],([c])=>c===Qx.CONNECTED),yr=ri(D.info.availableVideoStreams$),Fi=pe.features.audioLanguages?ri(D.info.availableAudioStreams$):Vr([]),xr=ri(D.info.currentVideoStream$),Dn=ri(D.info.currentAudioStream$),ut=c=>{c.language&&Rf(c.language),D.setVideoStream(c)},ti=(c,_)=>{D.setAudioStream(c),Do(_)&&(c.language&&Rf(c.language),pe.features.userVideoPrefs&&i&&Df(pe.userSalt,String(i),{audioTrackId:c.id}))},wr=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(ie=>"isDefault"in ie&&ie.isDefault)),pe.features.userVideoPrefs&&i){let ie=Iu(pe.userSalt,String(i));if(ie!=null&&ie.audioTrackId){let Se=c.find(je=>je.id===ie.audioTrackId);_=Se!=null?Se:_}}let M=u_();return M&&(_!=null||(_=c.find(({language:ie})=>M===ie))),_!=null||(_=c.at(0)),_},Ur=c=>{U.log("change audio stream",{id:c});let _=D.info.availableAudioStreams$.getValue().find(M=>M.id===c);_&&ti(_,!0)},zr=!1;Te.add(D.info.availableAudioStreams$.subscribe(c=>{if(!zr&&c.length){let _=wr(c);_&&(D.setAudioStream(_),zr=!0)}})),Fi.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:M="",id:ie="",language:Se=""})=>({label:M,language:Se,id:ie})))}),Dn.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let Bn=!1;Te.add(D.info.availableVideoStreams$.subscribe(c=>{if(!Bn&&c.length){let _=wr(c);_&&(D.setVideoStream(_),Bn=!0)}}));let nr=de(void 0),$o=ri(D.info.isAutoQualityEnabled$,c=>c&&nr.set(void 0)),Hn=ri(D.info.currentQuality$,()=>nr.set(void 0)),rr=hi([nr,Hn],([c,_])=>c!=null?c:_),Fn=hi(Hr,c=>c!==oc.MPEG),_n=hi([Or,Dr,$o,rr,Fn],([c,_,M,ie,Se])=>{let je=[];Se&&je.push({value:"auto",displayValue:fe("auto_quality_option"),selected:M});let Lt=c.filter(Ft=>!Xx(Ft));for(let Ft of Lt){let Gt=_[Ft];je.push({value:Ft,displayValue:`${Ft}${Gt?J_(Gt):""}`,selected:M?!1:Ft===ie})}return je}),bn=ri(D.info.currentPlaybackRate$),$n=hi([bn,$r,or],([c,_,M])=>{let ie=M||w?1:pe.controls.playbackRateMin,Se=_?1:pe.controls.playbackRateMax,je=pe.controls.playbackRateStep,Lt=[];for(let Ft=ie;Ft<=Se;Ft+=je)Lt.push({value:Ft,displayValue:Ft===1?fe("playback_rate_1"):fe("playback_rate",{multiplier:Ft.toString(10)}),selected:c===Ft});return Lt}),en=()=>({displayValue:fe("subtitles_off"),value:Rn,language:""}),Ui=de(en()),Zi=hi([Ui,rt],([c],_)=>{c.value===Rn?_(en()):_(c)}),tn=pe.features.subtitles?ri(D.info.availableTextTracks$):Vr([]),sr=Jh(),Sr=hi([tn,Zi],([c,_],M)=>{var je;let ie=[],Se=c.find(({id:Lt})=>Lt===_.value);if(Se!=null&&Se.url){let[,Lt]=(je=sr.find(Se.url))!=null?je:[];if(Lt){M(Lt);return}Ee.download(Se.url).then(Ft=>{if(!Ft||Ee.isDestroyed())return;let Gt=new eb,js=Se.language;if(js){let s$=!!Se.isAuto,a$=Gt.parse(Ft,js);ie.push({lang:js,subtitles:a$,isAuto:s$,id:Se.id})}sr.add(Se.url,ie),$e(Zi).value===_.value&&M(ie)}).catch(Ft=>{var Gt;(Gt=J==null?void 0:J.oneStat)==null||Gt.logError({errorType:"Subtitles download",fatal:!1}),ae==null||ae.report(Ft,{errorType:"Subtitles download",fatal:!1})})}M(ie)}),yn=hi([bn,br,Zi],([c,_,M],ie)=>{let Lt;if(D.info.isLive$.getValue()&&_&&M.value!==Rn){let Gt=()=>{let js=1e3/(3*c);Lt=setTimeout(Gt,js),ie(Date.now())};return Gt(),()=>clearTimeout(Lt)}}),Cr=hi([tn,Zi],([c,_])=>{if(!c.length)return[];let M=[];for(let{language:ie,isAuto:Se,id:je}of c){let Lt=ie&&ic(ie);ie&&Lt&&M.push({displayValue:Se?fe("subtitles_auto",{language:Lt}):Lt,value:je,selected:(_==null?void 0:_.value)===je,isAuto:Se,language:ie})}return M.length?(M.unshift(Qt(ke({},en()),{selected:(_==null?void 0:_.value)===Rn})),M):[]}),dt={available:[],prev:[]},St=()=>{var _,M;let c=D.experimental.getCurrentTime$.getValue();return(M=(_=c==null?void 0:c())!=null?_:Re==null?void 0:Re.currentTime)!=null?M:0},so=hi([nt,Zi,Sr,yn],([c,_,M,ie])=>{var je;let Se=D.info.isLive$.getValue();if(Se&&dt.prev!==M){let Lt=M.find(({id:Gt})=>Gt===_.value),Ft=dt.prev.find(({id:Gt})=>Gt===_.value);if(Lt){let Gt=Qt(ke({},Lt),{subtitles:[...(je=Ft==null?void 0:Ft.subtitles)!=null?je:[],...Lt.subtitles]});dt.available=[Gt],dt.prev=M}}if(_&&_.value!==Rn){let Lt=Se?St():c,Ft=Se?dt.available:M;return ob(Lt,_,Ft,Se)}}),Oo=hi([so],([c])=>c!=null&&c.texts?c.texts:[]);Te.add(Zi.subscribe(c=>{var _,M;if(c.value===Rn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let ie=Object.entries(ju).find(([Se,je])=>je===c.displayValue);(M=s==null?void 0:s.onSubtitleOn)==null||M.call(s,ie?ie[0]:"",c.value)}}));let yo=de(!0),on=hi([mn,Jo,On,bo],([c,_,M,ie])=>{var Ft;let Se=(Ft=c==null?void 0:c.end)!=null?Ft:0;if(!ie)return Se/_;let Lt=-M+ie-_;return(Se-Lt)/_}),ao=ri(D.info.availableSources$),xo=hi([ao],([c])=>Object.keys((c==null?void 0:c[oc.MPEG])||{}).length>0),Ei=()=>{var M,ie,Se;let c=Object.keys(((ie=(M=D.info.availableSources$)==null?void 0:M.getValue())==null?void 0:ie[oc.MPEG])||{}),_=Yx(c)||n2.Q_144P;return(Se=Ne.sources[oc.MPEG])==null?void 0:Se[_]},Wr=()=>{var _;let c=Ei();if(c)U.log("download video",{url:c}),jh(c,((_=Ne==null?void 0:Ne.meta)==null?void 0:_.title)||"video");else{let M="There is no URL for download video";U.log("download video",{message:M}),ce({message:M})}},Un=()=>{ce({message:"toggle muted"});let c=D.info.muted$.getValue();D.info.volume$.getValue()===0&&!c?Kr(Tr(),!1):nn(!c,!1)},ws=()=>{var c;if(qt.ui.settingsMenu.visible$.set(!1),!$e(qt.ui.settingsSubMenu.visible$)){let _=$e(qt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let ie=zl(_),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ie,position:Se,name:"settings"})}}U.log("close settings menu")},zi=(c,_=()=>Promise.resolve())=>mt(null,null,function*(){var Se;qt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),qt.ui.settingsMenu.visible$.set(!0),yield _();let M=$e(qt.ui.settingsMenu.ref$),ie=ya();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&M&&ie){let Lt=zl(M),Ft=Hs(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Lt,position:Ft,name:"settings"})}U.log("open settings menu",{wasOpenedByKeyboard:c})}),Ss=(c,_=!1)=>{var je;qt.ui.settingsSubMenu.visible$.set(!1);let M=$e(qt.ui.settingsMenu.ref$),ie=ya(),Se=$e(qt.ui.settingsMenu.visible$);if((je=s==null?void 0:s.uiInfo)!=null&&je.onSettingsMenu&&M&&ie)if(Se&&!_){let Ft=zl(M),Gt=Hs(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Ft,position:Gt,name:"settings"})}else{let Ft=zl(c),Gt={top:0,left:0,bottom:0,right:0},js=$e(qt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ft,position:Gt,name:js})}U.log("close settings sub menu")},ls=(c,_)=>{var ie;qt.ui.settingsSubMenu.visible$.set(!0),qt.ui.settingsSubMenu.ref$.set(_),qt.ui.settingsSubMenu.name$.set(c);let M=ya();if((ie=s==null?void 0:s.uiInfo)!=null&&ie.onSettingsMenu&&_&&M){let je=zl(_),Lt=Hs(_,M);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:je,position:Lt})}U.log("open settings sub menu",{name:c})},Tr=()=>{var _;let c=Math.max(pe.volumeMinRestore,(_=wu())!=null?_:0);return c===0?pe.volumeDefault:c},Do=c=>{let _=pe.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},Kr=(c,_)=>{let M=c===0?Tr():c,ie=D.info.muted$.getValue();ce({message:`set volume, volume: ${c}, preferredVolume: ${M}`});let Se=!l||We.is("ads");ie&&c>0&&Se&&(ie=!1,Do(_)&&Mf(!1)),D.setVolume(c,ie),K.setVolume(c),Do(_)&&Pf(M)},nn=(c,_)=>{let M=D.info.volume$.getValue();ce({message:`set muted, currentVolume: ${M}, mute: ${c}`});let ie=We.is("ads");if(D.setMuted(c,ie),K.setVolume(c?0:M),Do(_)&&(!ie||!c)&&Mf(c),!c&&M===0){let Se=Tr();D.setVolume(Se),Do(_)&&Pf(Se),K.setVolume(Se)}},rn=de(!1),Ue=c=>{var _,M;U.log("set looped",{isLooped:c}),rn.set(c),D.setLooped(c),(M=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||M.call(_,c)};Ue(oe);let Ct=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},fi=(c,_=!1)=>{var M;ce({message:`set autoplayNextEnabled, value: ${c}`}),U.log("set autoplay next enabled",{autoplayNextEnabled:c}),qt.ui.autoplayNextEnabled$.set(c),m_(c),_&&((M=s==null?void 0:s.onSetAutoplayNextEnabled)==null||M.call(s,c))},Bo=c=>{ce({message:`set timerNextVideoRunning, value: ${c}`}),U.log("set timer next video running",{timerNextVideoRunning:c}),qt.ui.timerNextVideoRunning$.set(c)},wo=(c=!0)=>{var M;let _=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{_=(M=s==null?void 0:s.onPrevVideoClick)==null?void 0:M.call(s)}catch(ie){ce({message:"onPrevVideoClick callback failed to execute"})}Z(!0),_&&X()},Ho=(c=!0)=>{var M;let _=!0;if(c&&(s!=null&&s.onNextVideoClick))try{_=(M=s==null?void 0:s.onNextVideoClick)==null?void 0:M.call(s)}catch(ie){ce({message:"onNextVideoClick callback failed to execute"})}Z(!1),_&&se()},Wi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},So=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},zn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Ir=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Co=()=>{D.prepare()},lo=()=>{gr(qt);let c=$e(qt.ui.controls.disabledControls$),_=$e(qt.playerPhase),M={playerPhase:_,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(ce({message:"toggle play"}),_==="ads"){M.action="play",U.log("toggle adman play",M),K.togglePlay();return}let ie=()=>{var je;ce({message:"toggle play, call player.play"}),M.action="play",D.play(),(je=s==null?void 0:s.onPlay)==null||je.call(s)},Se=()=>{var je;ce({message:"toggle play, call player.pause"}),M.action="pause",D.pause(),(je=s==null?void 0:s.onPause)==null||je.call(s)};if(D.info.isEnded$.getValue()){if(ce({message:"toggle play, video ended, seek to 0"}),Di.next(),xi.next(Fs.REWIND),w){N==null||N();return}D.seekTime(0),ie()}else D.info.playbackState$.getValue()!==Kl.PLAYING?ie():Se();U.log("toggle play",M)},xn=(c,{changeReason:_="default",appliesTo:M="to-video",byUser:ie=!1}={},Se)=>{ce({message:`set quality, quality: ${c}`}),U.log("set quality",{quality:c}),ie&&go.next(c),D.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:je}=pe.features;Su(),c!=="auto"?(je?(Cu({type:"exact_quality",quality:c,videoId:i},M),D.setPredefinedQualityLimits($s.UNKNOWN)):kf(i,c),nr.set(c),D.setQuality(c)):je&&_==="default"&&(Qr("auto_quality",M,Se),$e(Vo)&&Fo(!1,void 0,Se),$e(Ro)&&Wn(!1,void 0,Se))},Fo=(c,_="as-default",M)=>{ce({message:`set trafficSavingEnabled, value: ${c}`}),U.log("set traffic saving enabled",{trafficSavingEnabled:c});let ie=c?$s.TRAFFIC_SAVING:$s.UNKNOWN;pe.features.qualityDetailsSubMenuEnabled?(qr(ie,_,M),Md(!1)):(D.setPredefinedQualityLimits(ie),Do(M)&&Md(c))},Wn=(c,_="as-default",M)=>{ce({message:`set highQualityEnabled, value: ${c}`}),U.log("set high quality enabled",{highQualityEnabled:c}),qr(c?$s.HIGH_QUALITY:$s.UNKNOWN,_,M)},qr=(c,_,M)=>{c!==$s.UNKNOWN&&($e(vn)&&!$e($o)&&xn("auto",{appliesTo:_,changeReason:"limit-changed"},M),Qr(c,_,M)),D.setPredefinedQualityLimits(c)},Qr=(c,_,M)=>{Do(M)&&(Cu({type:c,videoId:i},_),_==="as-default"&&Cu({type:c,videoId:i},"to-video"))},Kn=(c,_=!0)=>{U.log("set playback rate",{playbackRate:c}),D.setPlaybackRate(c),pe.features.saveRate&&Ce&&!D.info.isLive$.getValue()&&_&&p_(c)},Je=()=>{let c=$e(Nn),_=$e($n),M=_.findIndex(({selected:Se})=>Se);if(M===_.length-1||!c)return _[M];let ie=_[M+1];return Kn(ie.value),ie},Zt=()=>{let c=$e(Nn),_=$e($n),M=_.findIndex(({selected:Se})=>Se);if(M===0||!c)return _[M];let ie=_[M-1];return Kn(ie.value),ie},wi=(c=Qt(ke({},en()),{selected:!1}),_)=>{U.log("set subtitles",ke({},c)),c.value!==Rn&&oi.next(c.isAuto?c.value+"_auto":c.value),gi.next({enabled:c.value!==Rn,lang:c.language,auto:!!c.isAuto}),Ui.set(c),Do(_)&&(Of(c.value===Rn?void 0:c.language),pe.features.userVideoPrefs&&i&&Df(pe.userSalt,String(i),{subtitleTrackId:c.value===Rn?void 0:c.value}))},To=c=>{U.log("toggle subtitles");let _=$e(Zi);(_==null?void 0:_.value)===Rn?qn(c):Uo(c)},wn=(c,_)=>{U.log("change subtitle",{enabled:c}),c?qn(!0,_):Uo(!0)},qn=(c,_)=>{U.log("subtitle on");let M=$e(Cr),ie=$e(Me),Se=Fe!=null?Fe:ie,je;_&&(je=M.find(Lt=>Lt.value===_)),je!=null||(je=M.filter(Lt=>Lt.value!==Rn).find(Lt=>Lt.language===Se)),wi(je!=null?je:M[1],c)},Uo=c=>{U.log("subtitle off"),wi(void 0,c)};Te.add(D.info.availableTextTracks$.subscribe(c=>{var M;function _(){let ie=[];for(let{language:Se,isAuto:je,id:Lt}of c){let Ft=Se&&ic(Se);Se&&Ft&&ie.push({id:Lt,language:Se,title:je?fe("subtitles_auto",{language:Ft}):Ft})}return ie}(M=s==null?void 0:s.onAvailableSubtitlesChanged)==null||M.call(s,_())}));let ar=de(!0),ds=c=>{ar.set(c)},Er=(c,_,M=!0)=>{var ie;if(ce({message:`seek to time, time: ${c}`}),U.log("seek to time",{time:c,action:_,forcePrecise:M}),xi.next(_),D.info.isLive$.getValue()){let Se=D.info.duration$.getValue(),je=Math.min(0,Se+c);D.seekTime(je,M)}else{if(C!=null&&C.getValue())return;D.info.isEnded$.getValue()&&(ce({message:"seek after ended, call callbacks.onPlay"}),(ie=s==null?void 0:s.onPlay)==null||ie.call(s)),D.seekTime(sn(c),M)}},Cs=c=>{ce({message:`seek to episode start time: ${c}`}),U.log("seek to episode start time",{time:c}),Er(c,Fs.EPISODE,!0)},qs=(c,_,M=!1)=>{ce({message:`seek to percent, percent: ${c}`}),U.log("seek to percent",{percent:c,action:_});let ie=$e(Jo)*c;Er(ie,_,M)},va=c=>{ce({message:`seek external, time: ${c}`}),U.log("seek external",{time:c}),xi.next(Fs.UNKNOWN),D.seekTime(D.info.isLive$.getValue()?-c:c)},st=c=>{var ie,Se;let _=(ie=c.max)!=null?ie:"none",M=(Se=c.min)!=null?Se:"none";ce({message:`set auto quality limitation. Max: ${_}. Min: ${M}`}),U.log("set auto quality limits",{max:_,min:M}),D.setAutoQualityLimits(c)},di=c=>{ce({message:`seek external to episode start time: ${c}`}),U.log("seek external to episode start time",{time:c}),Er(c,Fs.EPISODE,!0)},Io=c=>{ce({message:`set playback rate to: ${c}`}),U.log("set playback rate external",{playbackRate:c}),D.setPlaybackRate(c)},Ci=de(!1),Sn=de(!1),Cn=hi([Jo],([c])=>!!p&&c>=pe.suitableDurationForUsingRichSeek&&pe.features.useRichSeek&&!w),Ts=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Is=hi([Pt],([c])=>{let _=Wl(c);return Ts?!_:_});Te.add(We.subscribe(c=>{c!=="video"&&Ci.set(!1)}));let Ki=de(void 0),Pi=de(!1),he=c=>{ce({message:`start scrubbing, progress: ${c}`}),U.log("start scrubbing",{progress:c}),Pi.set(!0),_t(c)},_t=c=>{Ki.set(c)},ii,jt,Eo=()=>{Ki.set(void 0),Pi.set(!1)},co=()=>{clearTimeout(jt),clearTimeout(ii),ii=window.setTimeout(()=>{Eo()},500),Re==null||Re.removeEventListener("seeked",co)},zo=(c,_=!1)=>{ce({message:`complete scrubbing, progress: ${c}`}),U.log("complete scrubbing",{progress:c}),qs(c,Fs.SLIDER,_),$e(qt.ui.isMobile)&&$e(qt.state.currentFormat$)===oc.HLS?(Re==null||Re.addEventListener("seeked",co),jt=window.setTimeout(()=>{co()},300)):Eo()},Es=hi([nt,Jo,Ki],([c,_,M],ie)=>{ie(Zx(M)?M*_:c)}),Gr=de(!1),Pr=()=>{Gr.set(!0)},ga=()=>{Gr.set(!1)},Qs=hi([mi],([{width:c}],_)=>{let M=j_(c);_(M)}),ha=Q.filter(c=>Xh(c)),Yr=hi([Qs,It],([c,_])=>_?ha.filter(M=>!M.hideOnMobile):ha.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(c))})),Tn=de(Q.filter(c=>Zh(c))),rl=hi([Tn,Qs],([c,_])=>c.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(_))})),_a=hi([rl,Yr],([c,_])=>[...pe.features.additionalButtonsDesktopControlPanelRight?c.filter(M=>M.type==="desktop-control-panel-right"):[],...pe.features.additionalButtons?_.map((M,ie)=>{var Se;return{id:ie,weight:ie,type:"desktop-control-panel-right",testId:M.testId,icon:M.iconUrl,onClick:M.onClick,ariaLabel:(Se=M.ariaLabel)!=null?Se:M.tooltip,tooltipText:M.tooltip}}):[]].filter(M=>!v.disabledAdditionalButtonIds.includes(M.id))),jr=de(F),sl=hi([jr],([c])=>pe.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?Qt(ke({},_),{onClick:_.onChangeEnabled}):_):[]),ed=(c,_)=>{let M=$e(Tn).map(ie=>ie.id!==c?ie:ke(ke({},ie),_));Tn.set(M)},ba=c=>{let _=$e(Tn);if(_.some(M=>M.id===c.id)){ce({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),Tn.set(_)},td=c=>{let _=$e(Tn);if(!_.some(M=>M.id===c)){ce({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}_=_.filter(M=>M.id!==c),Tn.set(_)},al=c=>{xi.next(Fs.LIVE),ce({message:"live switch to low latency "+c}),U.log("live switch to low latency "+c),D.setLiveLowLatency(c)},ll=(c,_)=>{let M=$e(jr).map(ie=>ie.id!==c?ie:ke(ke({},ie),_));jr.set(M)},$a=c=>{let _=$e(jr);if(_.some(M=>M.id===c.id)){ce({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),jr.set(_)},ct=c=>{let _=$e(jr);if(!_.some(M=>M.id===c)){ce({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(M=>M.id!==c),jr.set(_)},ot=de(z),Ji=hi([ot],([c])=>pe.features.additionalContextMenuItems?c:[]),Po=(c,_)=>{let M=$e(ot).map(ie=>ie.id!==c?ie:ke(ke({},ie),_));ot.set(M)},eo=c=>{let _=$e(ot);if(_.some(M=>M.id===c.id)){ce({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}_.push(c),ot.set(_)},_i=c=>{let _=$e(ot);if(!_.some(M=>M.id===c)){ce({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}_=_.filter(M=>M.id!==c),ot.set(_)},qi=hi([It,le],([c,_],M)=>{M(c&&_)}),Gs=()=>{xi.next(Fs.LIVE),ce({message:"switch to active live"}),U.log("switch to active live"),D.seekTime(0),D.info.playbackState$.getValue()!==Kl.PLAYING&&qt.actions.internal.togglePlay()},id=()=>{U.log("skip adman"),K.skip()},Mc=(c=!0)=>{var ie;gr(qt),ce({message:`switch from ads to video, callPlay: ${c}`}),U.log("switch from ads to video",{callPlay:c}),Be.set("video"),c&&D.play(),l&&nn(!0,!0);let _=(ie=$e(yt))==null?void 0:ie.muted,M=!D.info.muted$.getValue();_!==void 0&&!M&&nn(_,!0),yt.set(void 0)},yp=()=>{gr(qt),ce({message:"switch from video to ads"}),U.log("switch from video to ads"),qt.actions.internal.pause(),Zo(),Be.set("ads")},Vc=c=>{gr(qt);let _=c?"LiveWaitingStart":"thumb";U.log("set live waiting start",{state:c,playerPhase:_}),Be.set(_)},xp=c=>{gr(qt);let _=c?"LiveWaitingRecover":"thumb";U.log("set live waiting recover",{state:c,playerPhase:_}),Be.set(_)},Rc=c=>{gr(qt);let _=c?"LiveWaitingRecord":"thumb";U.log("set live waiting record",{state:c,playerPhase:_}),Be.set(_)},wp=()=>(gr(qt),U.log("get debug text data"),Gh(D,Ne,qt,qe.getTraceId(),we)),Nc=()=>(gr(qt),JSON.stringify(qe.getFinishedSpans())),Sp=()=>(gr(qt),Yh(D,Ne,qt)),ya=()=>Re,Oc=()=>{ce({message:"toggle chromecast"}),U.log("toggle chromecast"),D.toggleChromecast()},Ys=c=>{var M;if(gr(qt),D.info.isEnded$.getValue())return;let _=!c;if($e(qt.playerPhase)==="ads"){ce({message:`pause ads, internalCall: ${_}`}),U.log("pause ads",{internalCall:_}),K.pause();return}ce({message:`pause video, internalCall: ${_}`}),U.log("pause video",{internalCall:_}),_&&((M=s==null?void 0:s.onPause)==null||M.call(s)),D.pause()},dl=c=>{var M;gr(qt);let _=!c;if($e(qt.playerPhase)==="ads"){ce({message:`play ads, internalCall: ${_}`}),U.log("play ads",{internalCall:_}),K.play();return}ce({message:`play video, internalCall: ${_}`}),U.log("play video",{internalCall:_}),_&&((M=s==null?void 0:s.onPlay)==null||M.call(s)),D.play()},Dc=c=>{gr(qt);let _=!c;if($e(qt.playerPhase)==="ads"){ce({message:"player cannot be stopped during ads via external method"});return}ce({message:`player will be stopped, internalCall: ${_}`}),A==null||A()},Bc=(c,_)=>{gr(qt),ce({message:`first start, show ads: ${c}, internalCall: ${!_}`}),U.log("first start",{showAds:c,external:_}),c?Be.set("ads"):(Be.set("video"),_?D.play():qt.actions.internal.togglePlay())},cl=()=>(ce({message:"getting time codes"}),m),Hc=()=>{let c=cl();if(!c||[0,1].includes(c.length))return;let _=D.info.position$.getValue();return c.find(M=>M.time>_)},Fc=c=>{let _=c;_||(_=Hc());let M=D.info.position$.getValue();U.log("seek to next episode",ke({currentTime:M},_)),_&&(ce({message:"seek to next episode"}),Er(_.time,Fs.EPISODE,!0))},Uc=()=>{let c=cl();if(!c||[0,1].includes(c.length))return;let _=D.info.position$.getValue(),M=c.findIndex(Se=>Se.time>_),ie=M===-1?c.length-2:M-2;if(!(ie<0))return c[ie]},Cp=c=>{let _=c;_||(_=Uc());let M=D.info.position$.getValue();U.log("seek to prev episode",ke({currentTime:M},_)),_&&(ce({message:"seek to prev episode"}),Er(_.time,Fs.EPISODE,!0))},Tp=()=>(ce({message:"getting preview thumbs data"}),U.log("get preview thumbs data",ke({},p)),p),ze=()=>mt(null,null,function*(){let c=xe==null?void 0:xe.isActive(),_="none";xe!=null&&xe.isActive()?(_="exit",yield xe==null?void 0:xe.exit()):(_="request",yield xe==null?void 0:xe.request()),U.log("toggle picture in picture",{isActive:c,action:_})}),bi=(c=-90)=>{U.log("rotate video",{alphaDiff:c}),Pt.update(_=>_+c)},uo=de([]);I==null||I.subscribe(c=>{let _=[];for(let M=0;M<c.length;M++){let{range:[ie,Se],subjects:je}=c[M];M===0&&ie!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:ie/1e3,text:"",interactive:!0,completed:pe.features.interactiveTimeOpenUri?!je.length||je.every(Lt=>Lt.isRemoved):!je.length}),Se!==1/0&&_.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}uo.set(_)});let kr=de(!1);C==null||C.subscribe(c=>{c&&$e(Pi)&&Eo()});let sn=c=>{if(!w)return c;let _=$e(uo),M=$e(Jo),Se=$e(On)/M,je=_.find(Lt=>Lt.interactive&&!Lt.completed&&Lt.time>Se);return typeof(je==null?void 0:je.time)=="number"?Math.min(c,je.time-.05):c},Jb=()=>{qt.ui.episodes.panelOpened$.set(!1)},e$=()=>{U.log("destroy store"),clearTimeout(jt),clearTimeout(ii),Te.unsubscribe(),xt.unsubscribe(),D.destroy(),K.destroy(),J==null||J.destroy(),ae==null||ae.destroy(),Pe.unsubscribe(),gt==null||gt.disconnect(),gt=null,Ee.destroy()},t$=hi([$r,We,Nn],([c,_,M])=>v.features.doubleForwardAvailable&&!c&&_==="video"&&M),Ip=de(!1),Gv=2,zc=null,Yv=c=>{if(!$e(br)&&c)return;let _=D.info.currentPlaybackRate$.getValue();c?_!==Gv&&(zc=_,Kn(Gv,!1),Ip.set(!0)):(zc&&Kn(zc,!1),Ip.set(!1),zc=null)};We.subscribe(c=>{c!=="video"&&Yv(!1)});let i$=()=>{Ys(!1),Ci.set(!0)},o$=()=>{dl(!1),Ci.set(!1)},Ep=!1,n$=()=>{Sn.set(!0),Ep=D.info.playbackState$.getValue()===Kl.PLAYING,Ys(!1)},r$=()=>{Sn.set(!1),!$e(Ci)&&Ep&&dl(!1),Ep=!1};D.events.playing$.subscribe(()=>{$e(Ci)&&Ys(!1)});let qt={interfaceLanguage$:Me,isCyrillicRelatedInterface$:kt,initVideo:$i,videoId:i,isClip:o,playerPhase:We,vsid:wt,state:{positionExact$:nt,positionWithScrubbing$:Es,duration$:Jo,playbackState$:Bi,playbackStateRealistic$:fn,isPlaying$:br,isLoaderVisible:Vt,bufferedProgress$:on,isLive$:Hi,canChangePlaybackSpeed$:Nn,isActiveLive$:$r,isOldestAvailableLive$:or,isRewindableLive$:as,isEnded$:Mi,muted$:ki,volume$:ro,trafficSavingEnabled$:Vo,highQualityEnabled$:Ro,autoQualityLimitingAvailable$:vn,availableVideoStreams$:yr,availableAudioStreams$:Fi,videoStream$:xr,audioStream$:Dn,currentQuality$:rr,isAutoQualityEnabled$:$o,availableQualities$:_n,currentPlaybackRate$:bn,availablePlaybackRates$:$n,currentSubtitle$:Zi,availableTextTracks$:tn,availableSubtitlesList$:Cr,currentSubtitleCaptions$:Oo,isAutoSubtitleCaptionVisible$:yo,chromecastState$:Br,chromecastDeviceName$:xs,chromecastConnected$:No,currentFormat$:Hr,throughputEstimation$:ir,videoBitrate$:Fr,videoSize$:gn,errorLog$:Y,crashed$:le,isAudioAvailable$:hr,isAudioDisabled:!!l,canDownload:pe.features.download&&!!d,availableSources$:ao,hasMpegSources$:xo,isInteractive:w,showInteractiveGraph:pe.features.interactiveGraph,showSeekToInteractive:pe.features.seekToInteractive,showPlayPrevChapter:pe.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:pe.features.interactiveTimeIndicator&&!!$e(uo).length,interactiveEpisodes$:uo,isInteractiveTime$:C?ri(C):de(!1),isInteractiveExpectation$:kr,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,looped$:rn,loadedMetadata$:Bt,isAutoQualityAvailable$:Fn,previewTrackActive:Ci,previewTrackDragInProgress:Sn},ui:{t:fe,controlsVisible:de(!1),touched:de(!1),controls:{prevButton:de(void 0),playButton:de(void 0),replayButton:de(void 0),nextButton:de(void 0),playPrevChapterButton:de(void 0),seekToInteractiveButton:de(void 0),interactiveGraphButton:de(void 0),liveButton:de(void 0),time:de(void 0),episodes:de(void 0),volume:de(void 0),subtitles:de(void 0),settings:de(void 0),context:de(void 0),chromecast:de(void 0),pip:de(void 0),fullscreen:de(void 0),vkLogo:de(void 0),interactiveTimeIndicator:de(void 0),timeline:de(void 0),autoplayNextToggle:de(void 0),additionalButtons:Q.length?Q.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:At},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:Mt,isFullscreenOpenedByKeyboard:lt,rotateAlpha:Pt,isAutoplay:de(!1),debugPanelVisible:de(!1),episodes:{panelOpened$:de(!1),openedByKeyboard$:de(!1)},contextMenu:{visible$:de(!1),btnRef$:de(void 0),openedByBtnKeyboard$:de(!1),openedByHotKey$:de(!1),lastActiveElem$:de(void 0),showContextMenuBtn$:de(!1),position$:de({top:0,left:0})},playerSize:mi,isMobile:It,mobileNotReportControlHidden$:qi,icon3DVideoVisible:de(!1),scrubbingInProgress:Pi,volumeChangingInProgress:Gr,is3DVideo:Wt,currentGridType$:Qs,additionalButtonsDeprecated$:Yr,additionalDesktopControlPanelRightButtons$:_a,additionalSettingsMenuItems$:sl,additionalContextMenuItems$:Ji,interactiveHideMobileControls:de(!1),overlayContainer$:de(void 0),startedByKeyboard$:de(!1),autoplayNextEnabled$:de(!1),timerNextVideoRunning$:de(!0),settingsMenu:{visible$:de(!1),ref$:de(void 0),openedByBtnKeyboard$:de(!1)},settingsSubMenu:{visible$:de(!1),ref$:de(void 0),name$:de(void 0)},userActionsDisabled:de(!1),hiddenControls:{volume:de(!1),vkLogo:de(!1),pip:de(!1),chromecast:de(!1),settings:de(!1)},isControlsAvailable:ar,controlBlocks:{topLeft:de(void 0),topRight:de(void 0),middle:de(void 0),bottom:de(void 0),bottomLeft:de(void 0),bottomRight:de(void 0)},videoTitleInfo:de(void 0),doubleForwardOn$:Ip,doubleForwardAvailable$:t$,previewTrackNotificationVisible:de(!1),previewTrackActive:Ci,previewTrackDragInProgress:Sn,previewTrackAvailable:Cn,isPreviewTrackHorizontallyAligned:Is},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:xe,annotationsApi:He,slotsApi:it,focusManager:re},actions:{internal:{preload:Co,firstStart:c=>Bc(c,!1),play:()=>dl(!1),pause:()=>Ys(!1),togglePlay:lo,toggleMuted:Un,openSettingsMenu:zi,closeSettingsMenu:ws,openSettingsSubMenu:ls,closeSettingsSubMenu:Ss,setVolume:c=>Kr(c,!1),setMuted:c=>nn(c,!1),startVolumeChanging:Pr,stopVolumeChanging:ga,setVideoStream:ut,setAudioStream:c=>ti(c,!1),setQuality:(c,_)=>xn(c,_,!1),setTrafficSavingEnabled:(c,_)=>Fo(c,_,!1),setHighQualityEnabled:(c,_)=>Wn(c,_,!1),setPlaybackRate:Kn,incrementPlaybackRate:Je,decrementPlaybackRate:Zt,setSubtitle:c=>wi(c,!1),toggleSubtitle:()=>To(!1),togglePictureInPicture:ze,startScrubbing:he,progressScrubbing:_t,completeScrubbing:zo,toggleChromecast:Oc,switchToActiveLive:Gs,switchFromAdsToVideo:Mc,switchFromVideoToAds:yp,skipAd:id,setLiveWaitingStart:Vc,setLiveWaitingRecover:xp,setLiveWaitingRecord:Rc,getDebugTextData:wp,getTraceTextData:Nc,getDebugPanelData:Sp,getVideoElement:ya,seekTime:(c,_,M)=>Er(c,_,M),clearDelayedBufferingCheckTimeout:_r,seekEpisodeStartTime:Cs,seekToPercent:qs,getNextEpisode:Hc,seekToNextEpisode:Fc,getPrevEpisode:Uc,seekToPrevEpisode:Cp,startLogging:Ht,stopLogging:W,startCameraManualRotation:Rt,stopCameraManualRotation:li,moveCameraFocusPX:ft,holdCamera:ei,releaseCamera:ht,getVideoEpisodes:cl,getPreviewThumbsData:Tp,downloadVideo:Wr,addLanguage:Bf,setLanguage:ye,nextMovie:Xt,videoRotate:bi,correctSeekTimeToInteractive:sn,replayInteractive:N,setLooped:Ue,reportProblem:Ct,setAutoplayNextEnabled:fi,setTimerNextVideoRunning:Bo,prevVideoClick:wo,nextVideoClick:Ho,nextVideoAnnouncementShow:Wi,nextVideoAnnouncementClick:So,nextVideoAnnouncementAuto:zn,nextVideoAnnouncementCancel:Ir,checkFullscreenSupport:Et,changeDoubleForwardOn:Yv,closePreviewTrack:o$,previewTrackOpened:i$,previewTrackDragStarted:n$,previewTrackDragFinished:r$},external:{firstStart:c=>Bc(c,!0),play:()=>dl(!0),pause:()=>Ys(!0),stop:()=>Dc(!0),seekTime:c=>va(c),seekEpisodeStartTime:c=>di(c),setPlaybackRate:c=>Io(c),setAutoQualityLimits:c=>st(c),setMuted:c=>nn(c,!0),toggleSubtitle:()=>To(!0),changeSubtitle:wn,setVolume:c=>Kr(c,!0),returnFocusToEpisodes:Jb,updateAdditionalSettingsItem:ll,addAdditionalSettingsItem:$a,removeAdditionalSettingsItem:ct,updateAdditionalContextItem:Po,addAdditionalContextItem:eo,removeAdditionalContextItem:_i,updateAdditionalButton:ed,addAdditionalButton:ba,removeAdditionalButton:td,setLiveLowLatency:al,hideControls:()=>ds(!1),showControls:()=>ds(!0),setQuality:c=>xn(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Fo(c,"to-video",!0),setHighQualityEnabled:c=>Wn(c,"to-video",!0),changeAudioStream:Ur}},callbacks:s,setUiCallbacks:c=>{et=ke({},c)},getAdmanWrapper:()=>K,getLogger:()=>Qe,getPlayer:()=>D,destroy:e$};return qt};function er(t,e,i,o){var m;let r=(m=e[i])==null?void 0:m.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Hs(e[i],t||void 0);return{left:a?d:0,right:a?u:0,top:a?l:0,bottom:a?s:0,isDisplayed:a}}var d2=["disabledControls$","additionalButtons"],c2=["interactiveTimeIndicator"],Gl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!d2.includes(r)){let l=o||c2.includes(r);a.set(er(t,i,r,l))}}};var ep=(t,e,i)=>mt(null,null,function*(){yield vo(),e&&i&&(i.focus(),t.set(!1))});var u2=Ie('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function Pm(t){Ze(t,{children:(e,i)=>{var o=u2();$(e,o)},$$slots:{default:!0}})}function km(t,e){B(e,!0);let[i,o]=Oe(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=_e(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,b=q(void 0);De(()=>{n(b)&&Tt(()=>{v.set(n(b))})});let y=C=>{let N=ca(C),A=z_(n(b));p.set(A),u.set(N),s.set(!r())},g=()=>{m.set(!0)},w=()=>{m.set(!1)},I=f(()=>r()?"opened":"");zt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:g,blur:w,get ariaExpanded(){return r()},get ref(){return n(b)},set ref(C){R(b,C,!0)},children:(C,N)=>{Pm(C,{})},$$slots:{default:!0}}),H(),o()}var p2=t=>{t.stopPropagation()},f2=L("<div><!> <div></div> <div></div></div>"),m2={hash:"s-27",code:'.interactive-episode-icon-animated.s-27{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-27{height:28px;width:28px}.invisible.s-27{opacity:0;visibility:hidden}.fullscreen.s-27:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-27{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-27{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-27{right:16px;top:40px}}@keyframes s-27-pulse{0%{border-width:1px;opacity:0;transform:scale(1)}10%{opacity:1}50%{border-width:1px;opacity:.5;transform:scale(1.5)}to{border-width:.5px;opacity:0;transform:scale(1.5)}}.pulse.s-27{animation:s-27-pulse 1s infinite;border:1px solid #fff;border-radius:100%;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;transform:scale(1.8);transition:.3s}.pulse.paused.s-27{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-27{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-27{display:none}'};function nc(t,e){var K;B(e,!0),G(t,m2);let[i,o]=Oe(),r=()=>x(w,"$isMobile",i),a=()=>x(A,"$areControlsVisible",i),l=()=>x(P,"$currentGridType$",i),d=()=>x(C,"$isInteractiveTime$",i),s=()=>x(g,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>x(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=q(void 0),b=_e(),y=_o(),{interactiveControlsOpacity$:g}=y,w=b.ui.isMobile,I=b.ui.isFullscreen,C=b.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,A=b.ui.controlsVisible,E=(K=b.callbacks)==null?void 0:K.onInteractiveTimeIndicatorClick,P=b.ui.currentGridType$,Q=f(()=>!r()&&a()),F=f(()=>Bs(l(),"s")),z=f(()=>!d()||!!s()||n(Q)),X=q(!1);De(()=>{R(X,n(z),!0)});let se=()=>{R(X,!0)},Z=()=>{var ae;oe(),(ae=n(v))==null||ae.addEventListener("animationiteration",se,{once:!0})},oe=()=>{var ae;R(X,!1),(ae=n(v))==null||ae.removeEventListener("animationiteration",se)},J=ae=>{N.set(ae)},Ce=f(()=>u()&&!n(z));De(()=>{u()?Z():oe()});let me=()=>{n(z)||(N.set(!0),E==null||E())};dn(()=>{N.clearTimeout(),oe()});let ee=()=>{N.set(!1)},be=j("tooltip_interactive_interaction_time_indicator");var we=f2();let ge;we.__mousemove=[p2],we.__click=me;var pe=T(we);Mo(pe,{get tooltipContent(){return be},get tooltipVisible(){return n(Ce)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:J,get ref(){return p()},set ref(ae){p(ae)},children:(ae,xe)=>{jd(ae,{completed:!0})},$$slots:{default:!0}});var qe=k(pe,2);let U;Xe(qe,ae=>p(ae),()=>p());var D=k(qe,2);let Qe;Xe(D,ae=>R(v,ae),()=>n(v)),S(we),O((ae,xe,He)=>{ge=ne(we,1,"interactive-episode-icon-animated s-27",null,ge,ae),U=ne(qe,1,"ref-block s-27",null,U,xe),Qe=ne(D,1,"pulse s-27",null,Qe,He)},[()=>({mobile:r(),fullscreen:m(),invisible:n(z),"icon-small":n(F)}),()=>({hidden:n(z)}),()=>({paused:n(X)})]),at("mouseleave",we,ee),$(t,we),H(),o()}Ge(["mousemove","click"]);function tp(t,e){B(e,!0);let i=h(e,"tooltipEnabled",3,!0),o=h(e,"disabled",3,!1),r=h(e,"className",3,void 0),a=h(e,"ref",15),l=h(e,"tooltipVisible",3,!1);Mo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Le();let m=f(()=>e.buttonComponent);var p=ue(u);Ni(p,()=>n(m),(v,b)=>{b(v,ns(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),$(d,u)},$$slots:{default:!0}}),H()}var Us={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var g2=Ie('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ma(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=f(()=>`${cn(e.size)}${n(o)}`),a=f(()=>i()?"prev-icon":"next-icon");Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=g2();$(l,s)},$$slots:{default:!0}}),H()}var h2=L('<div class="icon-background-mobile s-22"><!></div>'),_2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ga(t,e){B(e,!0),G(t,_2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=_e().ui.t,d=f(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=f(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=f(()=>`btn-${o()?"m":"d"}--${e.type}`);zt(t,{get className(){return n(u)},get testId(){var m;return`btn-${(m=e.type)!=null?m:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{var v=Le(),b=ue(v);{var y=w=>{var I=h2(),C=T(I);let N=f(()=>e.type==="prev");ma(C,{get size(){return"32"},get reversed(){return n(N)}}),S(I),$(w,I)},g=w=>{let I=f(()=>e.type==="prev");ma(w,{get size(){return"24"},get reversed(){return n(I)}})};V(b,w=>{o()?w(y):w(g,!1)})}$(m,v)},$$slots:{default:!0}}),H()}var b2=Ie('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function rc(t,e){B(e,!0);let i=f(()=>cn(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=b2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as $2}from"@vkontakte/videoplayer-shared/es2015";var y2=L('<div class="icon-background-mobile s-23"></div>'),x2=L("<!> <div><!></div>",1),w2={hash:"s-23",code:".mobile.s-23{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-23{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Yl(t,e){B(e,!0),G(t,w2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),a=h(e,"className",3,""),l=h(e,"click",3,$2),d=j("tooltip_restart"),s=f(()=>`${o()?"btn-m--play":""} ${a()}`);zt(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return gs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,m)=>{var p=x2(),v=ue(p);{var b=C=>{var N=y2();$(C,N)};V(v,C=>{o()&&C(b)})}var y=k(v,2);let g;var w=T(y);let I=f(()=>o()?"48":"24");rc(w,{get size(){return n(I)}}),S(y),O(C=>g=ne(y,1,"s-23",null,g,C),[()=>({mobile:o()})]),$(u,p)},$$slots:{default:!0}}),H()}var S2=Ie('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function zs(t,e){B(e,!0);let i=f(()=>cn(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=S2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as C2}from"@vkontakte/videoplayer-shared/es2015";var T2=L('<div class="icon-background-mobile s-25"><!></div>'),I2={hash:"s-25",code:".icon-background-mobile.s-25{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function jl(t,e){B(e,!0),G(t,I2);let[i,o]=Oe(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=_o(),l=h(e,"ref",15,void 0),d=h(e,"isMobile",3,!1),s=h(e,"isPlaying",3,!1),u=h(e,"disabled",3,!1),m=h(e,"className",3,""),p=h(e,"click",3,C2),b=_e().ui.t,{toggle:y}=a,g=f(()=>y),w=f(()=>r()!==null),I=f(()=>n(w)?r():s()),C=f(()=>n(I)?b("tooltip_pause"):b("tooltip_play")),N=f(()=>n(I)?zs:Vn),A=f(()=>`${d()?"btn-m--play":""} ${m()}`),E=f(()=>n(w)?n(g):p());zt(t,{get className(){return n(A)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(C)},get ariaKeyShortCut(){return gs.KeyK},get ref(){return l()},set ref(P){l(P)},children:(P,Q)=>{var F=Le();let z=f(()=>n(N));var X=ue(F);{var se=oe=>{var J=T2(),Ce=T(J);Ni(Ce,()=>n(z),(me,ee)=>{ee(me,{get size(){return"48"}})}),S(J),$(oe,J)},Z=oe=>{var J=Le(),Ce=ue(J);Ni(Ce,()=>n(z),(me,ee)=>{ee(me,{get size(){return"24"}})}),$(oe,J)};V(X,oe=>{d()?oe(se):oe(Z,!1)})}$(P,F)},$$slots:{default:!0}}),H(),o()}var E2=Ie('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Am(t){Ze(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=E2();$(e,o)},$$slots:{default:!0}})}function sc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=j("tooltip_interactive_go_back"),l=f(()=>o()?"hidden":"");zt(t,{get className(){return n(l)},testId:"play-prev-chapter-btn",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Am(d,{})},$$slots:{default:!0}}),H()}var P2=L('<span class="gutter s-24"><span><!></span></span>'),k2={hash:"s-24",code:".gutter.s-24{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-24{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-24{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function ac(t,e){B(e,!0),G(t,k2);let[i,o]=Oe(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=_e(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",b="#000",y=f(()=>r()?"true":"false");zt(t,{click:m,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(g){a(g)},children:(g,w)=>{var I=P2(),C=T(I);let N;var A=T(C);{var E=Q=>{Vn(Q,{get size(){return v},fill:b})},P=Q=>{zs(Q,{get size(){return v},fill:b})};V(A,Q=>{r()?Q(E):Q(P,!1)})}S(C),S(I),O(Q=>N=ne(C,1,"toggler s-24",null,N,Q),[()=>({enabled:r()})]),$(g,I)},$$slots:{default:!0}}),H(),o()}var A2=Ie('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Lm(t){Ze(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=A2();ui(),$(e,o)},$$slots:{default:!0}})}function lc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=j("tooltip_interactive_seek"),l=f(()=>o()?"hidden":"");zt(t,{get className(){return n(l)},testId:"btn-seek-to-interactive",get ariaLabel(){return a},get disabled(){return r()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,s)=>{Lm(d,{})},$$slots:{default:!0}}),H()}var L2=Ie('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),M2=Ie('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Mm(t,e){let i=h(e,"isOpened",3,!1),o=f(()=>i()?"graph-close-icon":"graph-open-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=M2(),d=k(ue(l));{var s=u=>{var m=L2();$(u,m)};V(d,u=>{i()&&u(s)})}$(r,l)},$$slots:{default:!0}})}function dc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=h(e,"graphIsOpened",3,!1),d=_e().ui.t,s=f(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=f(()=>o()?"hidden":"");zt(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(m){i(m)},children:(m,p)=>{let v=f(()=>!!a());Mm(m,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as ab}from"@vkontakte/videoplayer-core/es2015";function cc(t,e){B(e,!0);let[i,o]=Oe(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=_e(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=f(()=>()=>{if(!l()){m();return}r()===ab.PAUSED&&p()}),b=f(()=>a()?"":"btn--live btn-full-opacity"),y=f(()=>l()?"btn-live":"btn-live-offset"),g=f(()=>l()&&r()===ab.PLAYING);zt(t,{get className(){return n(b)},get testId(){return n(y)},get disabled(){return n(g)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{Dd(w,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as lb}from"@vkontakte/videoplayer-shared/es2015";var V2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),R2=L('<img class="icon" aria-hidden="true"/>');function Ya(t,e){"use strict";let i=q(!1),o=()=>{R(i,!0)};var r=Le(),a=ue(r);{var l=s=>{var u=V2();$(s,u)},d=s=>{var u=R2();O(()=>Ve(u,"src",e.icon)),at("error",u,o),Ma(u),$(s,u)};V(a,s=>{n(i)?s(l):s(d,!1)})}$(t,r)}function Vm(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,lb),r=h(e,"ref",15),a=f(()=>o()===lb),l=f(()=>n(a)||i()),d=f(()=>n(a)?"btn-full-opacity":"");Mo(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let m=f(()=>{var p;return(p=e.testId)!=null?p:e.id});zt(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(m)},children:(p,v)=>{Ya(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var db=t=>!!t.buttonComponent;var Ws={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var ip=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(er(t,i,r,o))};import{interpolate as Rm}from"@vkontakte/videoplayer-shared/es2015";var cb=10,ub=40,Nm=.2,O2=.5,D2=65,B2=114,H2=4,pb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=f(()=>i?D2:B2),r=q(!1),a=q(0),l=q(0),d=f(()=>n(o)+cb-ub-H2),s=f(()=>Rm(n(a),[Nm,1],[0,-n(d)])),u=f(()=>Rm(n(a),[Nm,1],[0,ub])),m=f(()=>Rm(n(a),[Nm,1],[0,n(o)+cb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:g=>{var w;R(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),R(r,!0)},onPointerMove:g=>{if(!n(r))return;let w=Math.max(Math.min(g.clientY-n(l),0),-n(d));R(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{R(r,!1),R(a,n(a)>=O2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{R(a,0)}}};var F2=t=>t;function ys(t,{delay:e=0,duration:i=400,easing:o=F2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var U2=L('<span class="root s-2b"> </span>'),z2={hash:"s-2b",code:".root.s-2b{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function Om(t,e){G(t,z2);var i=U2(),o=T(i,!0);S(i),O(()=>ve(o,e.time)),$(t,i)}var W2=L('<div class="tooltip-wrapper s-u"><div><!></div></div>'),K2={hash:"s-u",code:'.tooltip-wrapper.s-u{display:block;position:relative}.tooltip.s-u{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-u:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-u{opacity:1;visibility:visible}'};function Dm(t,e){G(t,K2);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=q(void 0),u=q(void 0);function m(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),C=I/2;return w<C?C+l():w>e.containerWidth-C?e.containerWidth-C-d():w}let p=f(()=>m(r()));var v=W2(),b=T(v);let y;var g=T(b);ni(g,()=>{var w;return(w=e.children)!=null?w:vt}),S(b),Xe(b,w=>R(u,w),()=>n(u)),S(v),Xe(v,w=>R(s,w),()=>n(s)),O(w=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),y=ne(b,1,"tooltip s-u",null,y,w),Ke(b,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),$(t,v)}var fb=t=>Math.abs(t)/90%4===1;var q2=L('<div class="preview s-v"></div>'),Q2=L('<div class="time s-v"> </div>'),G2=L('<div><!> <div class="episode s-v"><!></div> <!></div>'),Y2={hash:"s-v",code:".timeline-preview.s-v{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-v{bottom:72px}.preview.s-v{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow)}.episode.s-v{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-v,.time.s-v{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-v{color:var(--white)}"};function Bm(t,e){B(e,!0),G(t,Y2);let[i,o]=Oe(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(g,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),m=h(e,"progress",3,0),p=h(e,"duration",3,0),v=h(e,"isInteractive",3,!1),b=_e(),y=b.ui.rotateAlpha,g=b.ui.playerSize,w=q(0),I=q(0),C=q(""),N=q(0),A=q(0),E=q(0),P=q(0),Q=f(()=>qu(m(),p(),u())),F=f(()=>Wl(r())),z=f(()=>fb(r())),X=f(oe),se=f(()=>(n(z)?1:-1)*(n(w)/2-n(I)/2)),Z=f(()=>n(se)*-1);De(()=>{(K=>{R(w,K.width,!0),R(I,K.height,!0)})(Ce())}),De(()=>{(K=>{R(C,K.imgSrc,!0),R(N,K.imgWidth,!0),R(A,K.imgHeight,!0),R(E,K.imgOffsetX,!0),R(P,K.imgOffsetY,!0)})(me(m()))});function oe(){var He;let K=s()?l.MOBILE:l.DESKTOP,{isVertical:ae}=J(),xe=30;return(He=n(Q))!=null&&He.text&&(xe+=16),(ae||n(F))&&(xe+=18,xe+=50),Math.min(Math.max(a().height-xe,0),K)}function J(){let K=e.previewThumbsData.frameWidth,ae=e.previewThumbsData.frameHeight,xe=ae>K;return{width:K,height:ae,isHorizontal:!xe,isVertical:xe}}function Ce(){let{height:K,isHorizontal:ae,isVertical:xe,width:He}=J();return ae&&(K=K/He*n(X),He=n(X)),xe&&(He=He/K*n(X),K=n(X)),{width:He,height:K}}function me(K){let ae;e.previewThumbsData.isUV?ae=Math.floor(p()*K/e.previewThumbsData.frequency):ae=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*K)));let xe=Math.floor(ae/e.previewThumbsData.countPerImage),He=Math.floor(ae%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),it=ae%e.previewThumbsData.countPerRow,re=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&xe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(re=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&re++);let ce=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&xe===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(ce=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Ne=n(w)*ce,Re=n(I)*re,et=-it*n(w),Ee=-He*n(I);return{imgSrc:e.previewThumbsData.links[xe],imgWidth:Ne,imgHeight:Re,imgOffsetX:et,imgOffsetY:Ee}}var ee=G2();let be;var we=T(ee);{var ge=K=>{var ae=q2();O(()=>Ke(ae,`width: ${n(w)}px; height: ${n(I)}px; background-image: url(${n(C)}); background-size: ${n(N)}px ${n(A)}px; background-position: ${n(E)}px ${n(P)}px;
61
+ transform: rotate(${r()}deg) ${n(F)?`translate(${n(se)}px, ${n(Z)}px)`:""};
62
+ `)),$(K,ae)};V(we,K=>{n(C)&&K(ge)})}var pe=k(we,2),qe=T(pe);{var U=K=>{var ae=Le(),xe=ue(ae);{var He=re=>{var ce=vs();O(Ne=>ve(ce,Ne),[()=>j("tooltip_episode_unfinished")]),$(re,ce)},it=re=>{var ce=vs();O(()=>ve(ce,n(Q).text||"")),$(re,ce)};V(xe,re=>{v()&&n(Q).completed===!1?re(He):re(it,!1)})}$(K,ae)};V(qe,K=>{n(Q)&&K(U)})}S(pe);var D=k(pe,2);{var Qe=K=>{var ae=Q2(),xe=T(ae,!0);S(ae),O(()=>ve(xe,d())),$(K,ae)};V(D,K=>{v()||K(Qe)})}S(ee),O(K=>{be=ne(ee,1,"timeline-preview s-v",null,be,K),Ke(ee,`width: ${n(F)?n(I):n(w)}px;`)},[()=>({mobile:s()})]),$(t,ee),H(),o()}var j2=L('<span class="time s-g"> </span>'),X2=L("<!> <!>",1),Z2={hash:"s-g",code:".time.s-g{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.timeline-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function Hm(t,e){var le,ye,Me,rt,kt;B(e,!0),G(t,Z2);let[i,o]=Oe(),r=()=>x(Z,"$interactiveEpisodes$",i),a=()=>x(P,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(Ce,"$isInteractiveExpectation$",i),s=()=>x(J,"$isInteractiveTime$",i),u=()=>x(we,"$previewTrackActive",i),m=()=>x(Q,"$isLive$",i),p=()=>x(be,"$disabledControls$",i),v=()=>x(z,"$isMobile",i),b=()=>x(F,"$isActiveLive$",i),y=()=>x(A,"$bufferedProgress$",i),g=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),C=_e(),N=Ot(),A=C.state.bufferedProgress$,E=C.state.positionWithScrubbing$,P=C.state.duration$,Q=C.state.isLive$,F=C.state.isActiveLive$,z=C.ui.isMobile,X=N.features.episodes&&w()?C.actions.internal.getVideoEpisodes():void 0,se=C.actions.internal.getPreviewThumbsData(),Z=C.state.interactiveEpisodes$,oe=C.state.isInteractive,J=C.state.isInteractiveTime$,Ce=C.state.isInteractiveExpectation$,me=C.actions.internal.correctSeekTimeToInteractive,ee=(le=C.callbacks)==null?void 0:le.onDisabledTimelineClick,be=C.ui.controls.disabledControls$,we=C.ui.previewTrackActive,ge=(Me=(ye=C.callbacks)==null?void 0:ye.uiInfo)==null?void 0:Me.onTimelineMouseEnter,pe=(kt=(rt=C.callbacks)==null?void 0:rt.uiInfo)==null?void 0:kt.onTimelineMouseLeave,qe=C.ui.t,U=N.features.interactiveResponsiveUi,D=f(()=>oe?r():X),Qe=f(()=>jo(a())),K=f(()=>jo(l())),ae=f(()=>l()/a()),xe=f(()=>d()||s()),He=q(!1),it=q(""),re=q(0),ce=q(0),Ne=q(0),Re=f(()=>({containerWidth:n(ce),translateXPx:n(re),translateYPx:oe&&se?-36:-16,active:n(He)&&g()&&!n(xe)&&!U&&!u(),pointer:!N.features.timelinePreview||!se||m()})),et=qe("aria_timeline"),Ee=f(()=>qe("aria_timeline_value",{position:n(K),duration:n(Qe)}));function Te(fe){return!me||!oe?fe:me(fe*a())/a()}function Fe(fe,Be){var We;(We=e.onSliderPointerDown)==null||We.call(e,Be),C.actions.internal.startScrubbing(Te(fe))}function It(fe){s()||C.actions.internal.progressScrubbing(Te(fe))}function wt(fe){var Be;C.actions.internal.completeScrubbing(Te(fe)),R(He,!1),(Be=e.onSliderPointerUp)==null||Be.call(e)}function Mt(fe,Be,We){var yt;(yt=e.onSliderPointerEnter)==null||yt.call(e,fe),Jt(fe,Be,We),R(He,!0)}function lt(fe,Be,We,yt){var Kt;(Kt=e.onSliderMove)==null||Kt.call(e,yt,fe),Jt(fe,Be,We),R(He,!0)}function Et(){var fe;R(He,!1),(fe=e.onSliderLeave)==null||fe.call(e)}function Jt(fe,Be,We){R(Ne,Te(fe),!0),R(re,Be,!0),We&&R(ce,We,!0),R(it,Pt(fe),!0)}function Pt(fe){let Be=jo((m()?1-fe:fe)*a());return m()?`-${Be}`:Be}let Bt=f(()=>p().has("TIMELINE"));var Wt=X2(),Y=ue(Wt);Dm(Y,ns(()=>n(Re),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(fe,Be)=>{var We=Le(),yt=ue(We);{var Kt=mi=>{Bm(mi,{get time(){return n(it)},get isMobile(){return v()},get videoEpisodes(){return n(D)},get previewThumbsData(){return se},get progress(){return n(Ne)},get duration(){return a()},get isInteractive(){return oe}})},At=mi=>{var pi=j2(),Oi=T(pi,!0);S(pi),O(()=>ve(Oi,n(it))),$(mi,pi)};V(yt,mi=>{N.features.timelinePreview&&se&&!m()?mi(Kt):mi(At,!1)})}$(fe,We)},$$slots:{default:!0}}));var Pe=k(Y,2);qa(Pe,{className:"timeline-slider",get isActiveLive(){return b()},get isMobile(){return v()},get ariaLabel(){return et},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ee)},get loadedProgress(){return y()},get filledProgress(){return n(ae)},get handleProgress(){return n(ae)},get videoEpisodes(){return n(D)},onPointerDown:Fe,onHandleMove:It,onPointerMove:lt,onPointerUp:wt,onPointerEnter:Mt,onPointerLeave:Et,get onMouseEnter(){return ge},get onMouseLeave(){return pe},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Bt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:wt,get ref(){return I()},set ref(fe){I(fe)}}),$(t,Wt),H(),o()}var J2={hash:"s-f",code:".timeline-ads-slider{--slider-bg:var(--timeline-slider-bg);--slider-filled-bg:var(--timeline-slider-filled-bg);--slider-handle-bg:var(--timeline-slider-handle-bg);--slider-loaded-bg:var(--timeline-slider-loaded-bg)}"};function uc(t,e){B(e,!0),G(t,J2);let[i,o]=Oe(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=_e(),s=d.ui.isMobile,u=d.ui.t,m=f(()=>jo(l())),p=f(()=>jo(a())),v=f(()=>a()/l()),b=f(()=>u("aria_timeline_value",{position:n(p),duration:n(m)})),y=f(()=>Math.round(n(v)*100));qa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(b)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var ew=L("<div><!></div>"),tw=L("<div></div>"),iw={hash:"s-c",code:".timeline.s-c{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-c{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-c{padding:0}.timeline-stub.s-c{min-width:20px;width:100%}.timeline-stub.mobile.s-c{height:8px}"};function ja(t,e){B(e,!0),G(t,iw);let[i,o]=Oe(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(A,"$disabled",i),d=()=>x(C,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=h(e,"isAds",3,!1),m=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),b=h(e,"ref",15,void 0),y=_e(),g=Ot(),w=y.state.isLive$,I=y.ads.duration,C=y.ads.position,N=y.ui.isMobile,A=de(!1),E=f(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var P=Le(),Q=ue(P);{var F=X=>{var se=ew();let Z;var oe=T(se);{var J=me=>{uc(me,{get position(){return d()},get duration(){return s()}})},Ce=me=>{Hm(me,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return b()},set ref(ee){b(ee)}})};V(oe,me=>{u()?me(J):me(Ce,!1)})}S(se),Ns(se,()=>Nl(m()&&g.features.usePerformanceFix,A,g.disableInvisibleComponentsTimeout)),O(me=>Z=ne(se,1,"timeline s-c",null,Z,me),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),$(X,se)},z=X=>{var se=tw();let Z;O(oe=>Z=ne(se,1,"timeline-stub s-c",null,Z,oe),[()=>({mobile:a()})]),$(X,se)};V(Q,X=>{n(E)?X(F):X(z,!1)})}$(t,P),H(),o()}import{getRangeAroundIndex as ow}from"@vkontakte/videoplayer-shared/es2015";var nw=(t,e,i,o,r,a,l)=>{R(e,!0),R(i,t.clientX,!0),R(o,n(r),!0),a(l())},rw=L("<div></div>"),sw=L('<div><div class="track s-2c"></div></div>'),aw={hash:"s-2c",code:'.root.s-2c{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2c,.root.vertically-rotated.s-2c{height:var(--preview-track-frame-height-vertical)}.root.s-2c:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2c{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2c,.track.s-2c{position:absolute}.frame.s-2c{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2c .frame:where(.s-2c){transform-origin:0 0}.rotate-1.s-2c{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2c{transform:rotate(-180deg)}.rotate-3.s-2c{transform:rotate(-270deg) translateY(-100%)}'};function Um(t,e){B(e,!0),G(t,aw);let[i,o]=Oe(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(g,"$position$",i),l=()=>x(y,"$duration$",i),d=_e(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:p=[],frameHeight:v=0,frameWidth:b=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:g}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:C}=d.actions.internal,N=d.ui.rotateAlpha,A=q(void 0),E=q(!1),P=q(0),Q=q(0),F=q(0),z=q(0),X=f(()=>v<=b),se=f(()=>Wl(r())),Z=f(()=>n(X)?!n(se):n(se)),oe=114,J=65,Ce=3,me=f(()=>n(Z)?oe:J),ee=f(()=>n(X)?oe:J),be=f(()=>n(X)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),we=f(()=>m*n(me)),ge=q(0);De(()=>{R(z,Math.ceil(-n(F)/n(me))-1),R(F,-n(we)*a()/l())});let pe=()=>{C(qe(),!0)},qe=()=>l()*-n(F)/n(we)/l(),U=!1,D=Ee=>{if(!n(E))return!1;let Te=Ee.clientX-n(P);R(F,n(Q)+Te),R(F,Math.max(Math.min(n(F),0),-n(we)),!0),Math.abs(Te)>1&&(U=!0),I(qe())},Qe=Ee=>{n(E)&&(R(E,!1),!U&&Ee&&R(F,-(Ee.offsetX-n(ge)/2)),U=!1,pe())},K=()=>{n(E)&&Qe()},ae=f(()=>s/u),xe=(Ee,Te)=>{if(Ee!==p.length-1)return u;let Fe=0,It=Te*u;for(let wt=1;wt<=u;wt++)Ee*s+Fe+It<m&&Fe++;return Fe},He=f(()=>Math.floor(n(z)/s)),it=f(()=>ow(3,n(He),p.length-1)),re=(Ee,Te,Fe)=>{let It=s*n(me);return Ee*It+Te*n(me)*u+n(ge)/2-Ce/2+Fe*n(me)},ce=f(()=>[`--row-numbers: ${n(ae)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n(be)}`].join(";"));var Ne=sw();let Re;var et=T(Ne);et.__pointerdown=[nw,E,P,Q,F,w,qe],et.__pointermove=D,et.__pointerup=Qe,yi(et,20,()=>n(it),Ee=>Ee,(Ee,Te)=>{var Fe=Le(),It=ue(Fe);yi(It,16,()=>Array.from({length:n(ae)},(wt,Mt)=>Mt),wt=>wt,(wt,Mt)=>{var lt=Le(),Et=ue(lt);yi(Et,16,()=>Array.from({length:xe(Te,Mt)},(Jt,Pt)=>Pt),Jt=>Jt,(Jt,Pt)=>{var Bt=rw();O((Wt,Y)=>{Ke(Bt,Wt),ne(Bt,1,Y,"s-2c")},[()=>`--row-index: ${Mt}; --column-index: ${Pt}; left: ${re(Te,Mt,Pt)}px; background-image: url(${p[Te]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),$(Jt,Bt)}),$(wt,lt)}),$(Ee,Fe)}),S(et),S(Ne),Xe(Ne,Ee=>R(A,Ee),()=>n(A)),O(Ee=>{Re=ne(Ne,1,"root s-2c",null,Re,Ee),Ke(Ne,n(ce)),Ke(et,`transform: translateX(${n(F)}px); width: ${n(we)}px;`)},[()=>({"is-vertical-video":!n(X),"vertically-rotated":n(se)})]),at("mouseleave",et,K),Ln(Ne,"clientWidth",Ee=>R(ge,Ee)),$(t,Ne),H(),o()}Ge(["pointerdown","pointermove","pointerup"]);var lw=L('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),dw={hash:"s-2d",code:".notification.s-2d{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2d{font-size:14px;line-height:18px}"};function zm(t,e){B(e,!1),G(t,dw);let i=340,{ui:{t:o}}=_e();ho();var r=lw(),a=T(r),l=T(a,!0);S(a),S(r),O(d=>ve(l,d),[()=>o("preview_track_close_tooltip")],In),os(3,r,()=>ys,()=>({duration:i})),$(t,r),H()}import{getRangeAroundIndex as cw}from"@vkontakte/videoplayer-shared/es2015";var uw=L('<div class="preview-track-close tooltip s-29"><!></div>'),pw=L('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),fw=L('<div class="wrapper-preview-track s-29"><!></div>'),mw=L('<div class="enriched-timeline s-29"><!> <!> <!></div>'),vw={hash:"s-29",code:".enriched-timeline.s-29{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-29{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-29{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-29{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-29:hover+.tooltip:where(.s-29){opacity:1}.wrapper-preview-track.s-29{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Wm(t,e){B(e,!0),G(t,vw);let[i,o]=Oe(),r=()=>x(g,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),s=()=>x(b,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),m=_e(),p=200,{positionWithScrubbing$:v,isRewindableLive$:b,duration$:y}=m.state,{playerSize:g,previewTrackActive:w}=m.ui,{countPerImage:I=0,links:C=[],frequency:N=0}=m.actions.internal.getPreviewThumbsData()||{},A=f(()=>r().width>100),E=q(!$_()),P=()=>{n(E)&&(b_(),R(E,!1))},Q=me=>{let ee=Math.floor(a()*me/N),be=Math.floor(ee/I),we=cw(3,be,C.length-1);for(let ge of we){let pe=new Image;pe.src=C[ge]}},F=(me,ee)=>{Q(ee),!l()&&e.onTimelineMove(me)};var z=mw(),X=T(z);{var se=me=>{var ee=pw(),be=T(ee);let we=f(()=>jo(d()));Om(be,{get time(){return n(we)}});var ge=k(be,2),pe=T(ge);Ds(pe,{onClick:()=>m.actions.internal.closePreviewTrack()}),S(ge);var qe=k(ge,2);{var U=D=>{var Qe=uw(),K=T(Qe);zm(K,{}),S(Qe),$(D,Qe)};V(qe,D=>{n(E)&&D(U)})}S(ee),at("mouseleave",ge,P),os(3,ee,()=>ys,()=>({duration:p})),$(me,ee)};V(X,me=>{l()&&me(se)})}var Z=k(X,2);let oe=f(()=>!n(A));ja(Z,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:Q,get ref(){return u()},set ref(me){u(me)}});var J=k(Z,2);{var Ce=me=>{var ee=fw(),be=T(ee);Um(be,{}),S(ee),O(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),$(me,ee)};V(J,me=>{e.previewTrackAvailable&&me(Ce)})}S(z),O(()=>Ke(z,`transform: translateY(${e.animatedOffsetY}px);`)),$(t,z),H(),o()}var hw=L('<div><!> <div class="controls s-11" data-testid="player_controls"><div class="controls-left s-11"><!> <!> <!></div> <div class="controls-right s-11"></div></div></div> <!>',1),_w={hash:"s-11",code:'.wrapper-bottom.s-11{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-11:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-11>:where(.s-11){pointer-events:auto}.controls.s-11{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls-left.s-11,.controls-right.s-11{align-content:center;display:flex}.controls-left.s-11{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-11 >:not(:first-child),.controls-right.s-11 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-11{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-11{transition:none}'};function qm(t,e){var ll,$a;B(e,!0),G(t,_w);let[i,o]=Oe(),r=()=>x(Xo,"$disabledControls$",i),a=()=>x(nt,"$adPlaybackState",i),l=()=>x(At,"$playbackState$",i),d=()=>x(go,"$currentSubtitle$",i),s=()=>x(Oi,"$isEnded$",i),u=()=>x(fn,"$currentGridType$",i),m=()=>x(Vt,"$isLive$",i),p=()=>x(Ye,"$chromecastState$",i),v=()=>x(pt,"$isPictureInPictureActive",i),b=()=>x(Xt,"$pictureInPictureType$",i),y=()=>x(gi,"$availableSubtitlesList$",i),g=()=>x(Ht,"$contextMenuOpenedByKeyboard$",i),w=()=>x(xt,"$showContextMenuBtn$",i),I=()=>x($i,"$isRewindableLive$",i),C=()=>x(vi,"$isActiveLive$",i),N=()=>x(Hr,"$graphIsOpened$",i),A=()=>x(Zo,"$contextMenuVisible$",i),E=()=>x(Bi,"$isFullscreen",i),P=()=>x(Mi,"$autoplayNextEnabled",i),Q=()=>x(n(Oo),"$prevButton",i),F=()=>x(n(yo),"$replayButton",i),z=()=>x(n(on),"$playButton",i),X=()=>x(n(ao),"$nextButton",i),se=()=>x(n(xo),"$playPrevChapterButton",i),Z=()=>x(n(Ei),"$seekToInteractiveButton",i),oe=()=>x(n(Wr),"$interactiveGraphButton",i),J=()=>x(n(Un),"$liveButton",i),Ce=()=>x(n(ws),"$time",i),me=()=>x(n(zi),"$episodes",i),ee=()=>x(n(Ss),"$vkLogo",i),be=()=>x(n(ls),"$volume",i),we=()=>x(n(Tr),"$subtitles",i),ge=()=>x(n(Do),"$settings",i),pe=()=>x(n(Kr),"$context",i),qe=()=>x(n(nn),"$fullscreen",i),U=()=>x(n(rn),"$chromecast",i),D=()=>x(mn,"$additionalDesktopControlPanelRightButtons$",i),Qe=()=>x(Li,"$playerSize",i),K=()=>x(Vo,"$isInteractiveTime$",i),ae=()=>x(di,"$previewTrackActive",i),xe=()=>x(Di,"$settingsMenuVisible",i),He=()=>x(Wi,"$settingButtonRef$",i),it=()=>x(W,"$startedByKeyboard$",i),re=()=>x(mi,"$isAudioAvailable$",i),ce=()=>x(Wt,"$fakeIsPlaying$",i),Ne=()=>x(xs,"$seekToInteractiveDisabledTooltip$",i),Re=()=>x(Sn,"$isPreviewTrackHorizontallyAligned$",i),et=()=>x(Ci,"$previewTrackAvailable",i),Ee=()=>x(Io,"$previewTrackDragInProgress",i),Te=()=>x(ht,"$adPosition",i),Fe=()=>x(Kt,"$position$",i),It=()=>x(ei,"$adDuration",i),wt=()=>x(yt,"$duration$",i),Mt=h(e,"playerControlsWrapperRef",15,void 0),lt=h(e,"playerControlsRef",15,void 0),Et=h(e,"isAds",3,!1),Jt=h(e,"logoTargetUrl",3,""),Pt=h(e,"isOneVideoPlaylist",3,!1),Bt=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Wt}=_o(),Y=_e(),Pe=_o(),le=Ot(),ye=Y.actions.internal.toggleMuted,Me=Y.actions.internal.togglePlay,rt=Y.actions.internal.pause,kt=Y.actions.internal.toggleSubtitle,fe=Y.actions.internal.checkFullscreenSupport,Be=(ll=Y.callbacks)==null?void 0:ll.onAudioDoesNotExistHint,We=($a=Y.callbacks)==null?void 0:$a.onAudioDisabledHint,yt=Y.state.duration$,Kt=Y.state.positionWithScrubbing$,At=Y.state.playbackState$,mi=Y.state.isAudioAvailable$,pi=Y.state.isAudioDisabled,Oi=Y.state.isEnded$,Vt=Y.state.isLive$,vi=Y.state.isActiveLive$,$i=Y.state.isRewindableLive$,{isActive$:pt,type$:Xt}=Pe.pictureInPicture$,Di=Y.ui.settingsMenu.visible$,xi=Y.ui.settingsMenu.openedByBtnKeyboard$,oi=Y.ui.controls,gt=Y.actions.internal.getVideoEpisodes(),Ye=Y.state.chromecastState$,gi=Y.state.availableSubtitlesList$,go=Y.state.currentSubtitle$,Xo=oi.disabledControls$,Zo=Y.ui.contextMenu.visible$,xt=Y.ui.contextMenu.showContextMenuBtn$,Ht=Y.ui.contextMenu.openedByBtnKeyboard$,W=Y.ui.startedByKeyboard$,Rt=Y.ui.controlBlocks,li=Y.ui.previewTrackNotificationVisible,ft=Y.ui.t,ei=Y.ads.duration,ht=Y.ads.position,nt=Y.ads.playbackState,Bi=Y.ui.isFullscreen,Li=Y.ui.playerSize,fn=Y.ui.currentGridType$,mn=Y.ui.additionalDesktopControlPanelRightButtons$,Mi=Y.ui.autoplayNextEnabled$,Hi=Y.actions.internal.getVideoElement,Nn=Y.actions.internal.replayInteractive,bo=Y.actions.internal.prevVideoClick,ro=Y.actions.internal.nextVideoClick,ki=Y.state.isInteractive,Vo=Y.state.isInteractiveTime$,Ro=Y.state.showInteractiveGraph,vn=Y.state.showSeekToInteractive,Or=Y.state.showPlayPrevChapter,Dr=Y.state.showInteractiveTimeIndicator,Br=Y.state.playPrevChapterDisabledTooltip,xs=Pe.seekToInteractiveDisabledTooltip$,Hr=Pe.graphIsOpened$,ir=le.features.interactiveResponsiveUi,Fr=f(()=>r().has("EPISODE_BUTTON")),gn=f(()=>r().has("GRAPH_BUTTON")),hn=f(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),hr=f(()=>r().has("PLAY_BUTTON")),_r=f(()=>r().has("REPLAY_BUTTON")),Jo=f(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),br=()=>Y.actions.internal.toggleChromecast(),$r=f(()=>Et()?a()==="playing":l()===Km.PLAYING),or=f(()=>d().value!=="off"),On=f(()=>s()&&!Et()||ki),as=f(()=>ir?n(On)&&oo(u(),"m"):n(On)),No=f(()=>!s()||ki||Et()),yr=f(()=>oo(u(),"m")),Fi=f(()=>e.showNextPrevButtons&&oo(u(),"m")&&!Et()&&e.nextButtonActive),xr=f(()=>e.showNextPrevButtons&&oo(u(),"m")&&!Et()&&e.prevButtonActive),Dn=f(()=>!Et()&&!!m()),ut=f(()=>p()!==mb.NOT_AVAILABLE&&!(v()&&b()===1)&&oo(u(),"m")&&!ki),ti=f(()=>e.showAutoplayNext&&!Pt()&&oo(u(),"s")),wr=f(()=>y().length>0&&oo(u(),"m")),Ur=f(()=>g()||w()),zr=f(()=>oo(u(),"s")&&!Et()),Bn=f(()=>!e.logoHidden&&!Et()),nr=f(()=>le.features.fullscreen&&fe()&&(e.logoHidden||oo(u(),ir?"xs":"s"))&&!(v()&&b()===1)&&(ki?Bt():!0)),$o=f(()=>(!m()||Et())&&!(le.features.interactiveHideTime&&ki)),Hn=f(()=>Ro&&oo(u(),"m")),rr=f(()=>ir?vn&&oo(u(),"s"):vn),Fn=f(()=>ir?Or&&oo(u(),"s"):Or),_n=f(()=>!Et()&&!m()&&!!(gt!=null&&gt.length)&&n(yr)&&!n(Fr)),bn=f(()=>!I()||!!C()),$n=f(()=>N()?ft("tooltip_interactive_graph_on"):ft("tooltip_interactive_graph_off")),en=f(()=>A()?ft("tooltip_context_menu_close"):ft("tooltip_context_menu_open")),Ui=(ct,ot)=>ct?ot&&ot===Km.PAUSED?ft("tooltip_play"):"":ft("tooltip_live"),Zi=f(()=>Ui(n(bn),l())),tn=f(()=>le.logoType==="vk_video"?ft("tooltip_vk_video_logo"):ft("tooltip_vk_logo")),sr=f(()=>n(or)?ft("tooltip_subtitles_on"):ft("tooltip_subtitles_off")),Sr=f(()=>E()?ft("tooltip_fullscreen_on"):ft("tooltip_fullscreen_off")),yn=f(()=>p()===mb.CONNECTED?ft("tooltip_chromecast_on"):ft("tooltip_chromecast_off")),Cr=f(()=>P()?ft("tooltip_autoplay_on"):ft("tooltip_autoplay_off")),dt=q(0),St=ci({}),so=ci({}),Oo=f(()=>oi.prevButton),yo=f(()=>oi.replayButton),on=f(()=>oi.playButton),ao=f(()=>oi.nextButton),xo=f(()=>oi.playPrevChapterButton),Ei=f(()=>oi.seekToInteractiveButton),Wr=f(()=>oi.interactiveGraphButton),Un=f(()=>oi.liveButton),ws=f(()=>oi.time),zi=f(()=>oi.episodes),Ss=f(()=>oi.vkLogo),ls=f(()=>oi.volume),Tr=f(()=>oi.subtitles),Do=f(()=>oi.settings),Kr=f(()=>oi.context),nn=f(()=>oi.fullscreen),rn=f(()=>oi.chromecast),Ue=f(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:F()?F().right-F().left:0,playButton:z()?z().right-z().left:0,nextButton:X()?X().right-X().left:0,playPrevChapterButton:se()?se().right-se().left:0,seekToInteractiveButton:Z()?Z().right-Z().left:0,interactiveGraphButton:oe()?oe().right-oe().left:0,liveButton:J()?J().right-J().left:0,time:Ce()?Ce().right-Ce().left:0,episodes:me()?me().right-me().left:0,vkLogo:ee()?ee().right-ee().left:0,volume:be()?be().right-be().left:0,subtitles:we()?we().right-we().left:0,settings:ge()?ge().right-ge().left:0,context:pe()?pe().right-pe().left:0,fullscreen:qe()?qe().right-qe().left:0,chromecast:U()?U().right-U().left:0,additionalButtons:D().length?D().reduce(ct=>[...ct,40],[]):[]})),Ct=q(0);De(()=>{(!n(Ct)||n(Ct)<n(Ue).time)&&Tt(()=>R(Ct,n(Ue).time,!0))});let fi=q(!1);De(()=>{let ct=0;n(_n)&&(oo(u(),"xl")?ct=n(Ue).time:ct=60);let ot=n(Ue).prevButton+n(Ue).playButton+n(Ue).nextButton+n(Ue).seekToInteractiveButton+n(Ue).interactiveGraphButton+n(Ue).liveButton+n(Ct)+ct;R(fi,n($o)&&n(dt)>=ot,!0)});let Bo=f(()=>n(fi)&&oo(u(),"m")),wo=vb(Gl,260),Ho=vb(ip,260);De(()=>{Qe(),K(),ae(),wo(Hi(),oi,St,e.showControls),Ho(Hi(),Rt,so,e.showControls)}),De(()=>{so.bottom=Mt()});let Wi=de();De(()=>{xe(),He()&&Tt(()=>Dl(He(),xe(),xi))});let So;De(()=>{it(),Tt(()=>ep(W,it(),So))});function zn(){ua({isAudioDisabled:pi,isAudioAvailable:re(),isAds:Et(),audioIsNotExistHintCallback:Be,audioDisabledHintCallback:We})&&ye()}let Ir=ki?Nn:Me,Co=f(()=>ce()!==null),lo=f(()=>n(Co)?ce():n($r)),xn=f(()=>n(lo)?ft("tooltip_pause"):ft("tooltip_play")),Fo=ft("tooltip_episodes"),Wn=f(()=>{var ct,ot,Ji,Po;return n(xr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Us.prevButton,buttonComponent:Ga,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:bo.bind(null,!0)},tooltipEnabled:!((ot=(ct=Y.callbacks)==null?void 0:ct.uiInfo)!=null&&ot.onPrevButtonMouseEnter)&&!((Po=(Ji=Y.callbacks)==null?void 0:Ji.uiInfo)!=null&&Po.onPrevButtonMouseLeave),mouseEnter:()=>{var eo,_i,qi;(qi=(_i=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:_i.onPrevButtonMouseEnter)==null||qi.call(_i,er(Hi(),St,"prevButton",e.showControls))},mouseLeave:()=>{var eo,_i,qi;(qi=(_i=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:_i.onPrevButtonMouseLeave)==null||qi.call(_i,er(Hi(),St,"prevButton",e.showControls))},tooltipText:ft("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),qr=f(()=>n(as)?{id:"replayButton",type:"desktop-control-panel-left",weight:Us.replayButton,buttonComponent:Yl,buttonComponentProps:{disabled:n(_r),click:Ir},tooltipText:ft("tooltip_restart"),disabled:n(_r)}:void 0),Qr=f(()=>n(No)?{id:"playButton",type:"desktop-control-panel-left",weight:Us.playButton,buttonComponent:jl,buttonComponentProps:{disabled:n(hr),isPlaying:n($r),click:Me},tooltipText:n(xn),disabled:n(hr)}:void 0),Kn=f(()=>{var ct,ot,Ji,Po;return n(Fi)?{id:"nextButton",type:"desktop-control-panel-left",weight:Us.nextButton,buttonComponent:Ga,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:ro.bind(null,!0)},tooltipEnabled:!((ot=(ct=Y.callbacks)==null?void 0:ct.uiInfo)!=null&&ot.onNextButtonMouseEnter)&&!((Po=(Ji=Y.callbacks)==null?void 0:Ji.uiInfo)!=null&&Po.onNextButtonMouseLeave),mouseEnter:()=>{var eo,_i,qi;(qi=(_i=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:_i.onNextButtonMouseEnter)==null||qi.call(_i,er(Hi(),St,"nextButton",e.showControls))},mouseLeave:()=>{var eo,_i,qi;(qi=(_i=(eo=Y.callbacks)==null?void 0:eo.uiInfo)==null?void 0:_i.onNextButtonMouseLeave)==null||qi.call(_i,er(Hi(),St,"nextButton",e.showControls))},tooltipText:ft("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Je=f(()=>ki&&n(Fn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Us.playPrevChapterButton,buttonComponent:sc,buttonComponentProps:{disabled:n(Jo),click:e.playPrevChapter},tooltipText:ft("tooltip_interactive_go_back"),disabledTooltipContent:ft(Br),disabled:n(Jo)}:void 0),Zt=f(()=>ki&&n(rr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Us.seekToInteractiveButton,buttonComponent:lc,buttonComponentProps:{disabled:n(hn),click:e.seekToInteractive},tooltipText:ft("tooltip_interactive_seek"),disabled:n(hn),disabledTooltipContent:ft(Ne())}:void 0),wi=f(()=>ki&&n(Hn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Us.interactiveGraphButton,buttonComponent:dc,buttonComponentProps:{disabled:n(gn),click:Hr.toggle,graphIsOpened:N()},tooltipText:n($n)}:void 0),To=f(()=>n(Dn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Us.liveButton,buttonComponent:cc,buttonComponentProps:{isLiveActive:n(bn),ariaLabel:n(Zi)},tooltipText:n(Zi),disabled:n(bn)&&l()===Km.PLAYING}:void 0),wn=f(()=>[n(Wn),n(qr),n(Qr),n(Kn),n(Je),n(Zt),n(wi),n(To)].filter(ct=>!!ct).sort(Ua)),qn=f(()=>n(Bn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Ws.vkLogo,buttonComponent:Zd,buttonComponentProps:{targetUrl:Jt(),logoClickable:e.logoClickable,click:rt},tooltipText:n(tn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Uo=f(()=>n(ti)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Ws.autoplayNext,buttonComponent:ac,tooltipText:n(Cr)}:void 0),ar=f(()=>({id:"volume",type:"desktop-control-panel-right",weight:Ws.volume,buttonComponent:hm,buttonComponentProps:{click:zn,isAds:Et()}})),ds=f(()=>n(wr)?{id:"subtitles",type:"desktop-control-panel-right",weight:Ws.subtitles,buttonComponent:pm,buttonComponentProps:{isSubtitlesEnabled:n(or),click:kt},tooltipText:n(sr)}:void 0),Er=f(()=>n(zr)?{id:"settings",type:"desktop-control-panel-right",weight:Ws.settings,buttonComponent:Ul,buttonComponentProps:{ref$:Wi},tooltipText:xe()?void 0:ft("tooltip_settings_off")}:void 0),Cs=f(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Ws.context,buttonComponent:km,buttonComponentProps:{ariaLabel:ft("aria_label_context_menu")},className:n(Ur)?"":"out-of-view",tooltipText:n(en)}:void 0),qs=f(()=>n(nr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Ws.fullscreen,buttonComponent:Xd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Sr)}:void 0),va=f(()=>n(ut)?{id:"chromecast",type:"desktop-control-panel-right",weight:Ws.chromecast,buttonComponent:ec,buttonComponentProps:{state:p(),click:br},tooltipText:n(yn)}:void 0),st=f(()=>[n(qn),n(Uo),n(ar),n(ds),n(Er),n(Cs),n(qs),n(va),...D()].filter(ct=>!!ct).sort(Ua)),di=Y.ui.previewTrackActive,Io=Y.ui.previewTrackDragInProgress,Ci=Y.ui.previewTrackAvailable,Sn=Y.ui.isPreviewTrackHorizontallyAligned,Cn=f(()=>pb({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>St.timeline,isHorizontal:Re()})),Ts=f(()=>n(Cn).progressBarY),Is=f(()=>n(Cn).controlsY),Ki=f(()=>n(Cn).onPointerDown),Pi=f(()=>n(Cn).onPointerMove),he=f(()=>n(Cn).onPointerUp),_t=f(()=>n(Cn).calculatedHeight),ii=f(()=>n(Cn).closePreviewTrack);De(()=>{ae()?li.set(!1):n(ii)()});let jt;Nt(()=>()=>jt&&clearTimeout(jt));let Eo=ct=>{ae()||!et()||(n(Ki)(ct),jt=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},co=()=>{ae()||n(he)(),jt&&clearTimeout(jt),Ee()&&Y.actions.internal.previewTrackDragFinished()},zo=ct=>{n(Pi)(ct),!ae()&&et()&&!ae()&&li.set(!0)},Es=()=>{li.set(!1)};var Gr=hw(),Pr=ue(Gr);let ga;var Qs=T(Pr);{var ha=ct=>{let ot=f(()=>n(Ts)()),Ji=f(()=>n(_t)());Wm(ct,{get animatedOffsetY(){return n(ot)},get animatedPreviewTrackHeight(){return n(Ji)},get canRewindLive(){return e.canRewindLive},get isAds(){return Et()},onTimelineMove:zo,onTimelinePointerDown:Eo,onTimelinePointerUp:co,onTimelinePointerLeave:Es,get previewTrackAvailable(){return et()},get timelineRef(){return St.timeline},set timelineRef(Po){St.timeline=Po}})};V(Qs,ct=>{e.showControls&&ct(ha)})}var Yr=k(Qs,2),Tn=T(Yr),rl=T(Tn);yi(rl,17,()=>n(wn),ct=>ct.id,(ct,ot)=>{tp(ct,{get buttonComponent(){return n(ot).buttonComponent},get buttonComponentProps(){return n(ot).buttonComponentProps},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(ot).disabled},get className(){return n(ot).className},get tooltipEnabled(){return n(ot).tooltipEnabled},get mouseEnter(){return n(ot).mouseEnter},get mouseLeave(){return n(ot).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return St[n(ot).id]},set ref(Ji){St[n(ot).id]=Ji}})});var _a=k(rl,2);{var jr=ct=>{let ot=f(()=>!e.showControls),Ji=f(()=>Et()?Te():Fe()),Po=f(()=>Et()?It():wt());Yd(ct,{get isHidden(){return n(ot)},isMobile:!1,get showDuration(){return n(Bo)},get position(){return n(Ji)},get duration(){return n(Po)},get ref(){return St.time},set ref(eo){St.time=eo}})};V(_a,ct=>{n($o)&&ct(jr)})}var sl=k(_a,2);let ed=f(()=>!n(_n));Mo(sl,{className:"w-max",get disabled(){return n(ed)},get tooltipContent(){return Fo},get tooltipVisible(){return e.showControls},get ref(){return St.episodes},set ref(ct){St.episodes=ct},children:(ct,ot)=>{var Ji=Le(),Po=ue(Ji);{var eo=_i=>{tc(_i,{get position(){return Fe()},get duration(){return wt()},get timeCodes(){return gt}})};V(Po,_i=>{n(_n)&&_i(eo)})}$(ct,Ji)},$$slots:{default:!0}}),S(Tn);var ba=k(Tn,2);yi(ba,21,()=>n(st),ct=>ct.id,(ct,ot)=>{var Ji=Le(),Po=ue(Ji);{var eo=qi=>{tp(qi,{get buttonComponent(){return n(ot).buttonComponent},get buttonComponentProps(){return n(ot).buttonComponentProps},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(ot).disabled},get className(){return n(ot).className},get tooltipVisible(){return e.showControls},get ref(){return St[n(ot).id]},set ref(Gs){St[n(ot).id]=Gs}})},_i=qi=>{let Gs=f(()=>!!n(ot).disabled);Vm(qi,{get id(){return n(ot).id},get testId(){return n(ot).testId},get icon(){return n(ot).icon},get ariaLabel(){return n(ot).ariaLabel},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(Gs)},get onClick(){return n(ot).onClick},get disableMouseupTooltipShow(){return n(ot).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return St[n(ot).id]},set ref(id){St[n(ot).id]=id}})};V(Po,qi=>{db(n(ot))?qi(eo):qi(_i,!1)})}$(ct,Ji)}),S(ba),S(Yr),Xe(Yr,ct=>lt(ct),()=>lt()),S(Pr),Xe(Pr,ct=>Mt(ct),()=>Mt());var td=k(Pr,2);{var al=ct=>{nc(ct,{get ref(){return St.interactiveTimeIndicator},set ref(ot){St.interactiveTimeIndicator=ot}})};V(td,ct=>{Dr&&ct(al)})}O((ct,ot)=>{ga=ne(Pr,1,"wrapper-bottom s-11",null,ga,ct),Ke(Yr,ot),Yr.inert=ae()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Ee()}),()=>`transform: translateY(${n(Is)()}px);`]),Ln(Tn,"clientWidth",ct=>R(dt,ct)),$(t,Gr),H(),o()}import{ChromecastState as hb,PlaybackState as _b}from"@vkontakte/videoplayer-core/es2015";import{noop as gb}from"@vkontakte/videoplayer-shared/es2015";var bw=L('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),$w=L('<img class="icon s-20" aria-hidden="true"/>'),yw={hash:"s-20",code:".icon.s-20{height:24px!important;width:24px!important}.inner.s-20{background-color:var(--white);height:16px;width:16px}"};function Qm(t,e){G(t,yw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,gb),r=f(()=>o()===gb),a=f(()=>n(r)||i()),l=q(!1),d=()=>{R(l,!0)},s=f(()=>n(r)?"btn-full-opacity":"");zt(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,m)=>{var p=Le(),v=ue(p);{var b=g=>{var w=bw();$(g,w)},y=g=>{var w=$w();O(()=>Ve(w,"src",e.iconUrl)),at("error",w,d),Ma(w),$(g,w)};V(v,g=>{n(l)?g(b):g(y,!1)})}$(u,p)},$$slots:{default:!0}})}var xw=Ie('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Gm(t){Ze(t,{testId:"muted-icon",children:(e,i)=>{var o=xw();$(e,o)},$$slots:{default:!0}})}import{noop as ww}from"@vkontakte/videoplayer-shared/es2015";function op(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,ww),r=h(e,"ref",15,void 0),l=_e().ui.t,d=f(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=f(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");zt(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,m)=>{var p=Le(),v=ue(p);{var b=g=>{Gm(g,{})},y=g=>{fa(g,{get size(){return"24"}})};V(v,g=>{i()?g(b):g(y,!1)})}$(u,p)},$$slots:{default:!0}}),H()}var Sw=Ie('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),Cw=Ie('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),Tw=Ie('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function Ym(t,e){let i=h(e,"isActive",3,!1),o=f(()=>i()?"pip-icon--active":"pip-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=Tw(),d=k(ue(l));{var s=m=>{var p=Sw();$(m,p)},u=m=>{var p=Cw();$(m,p)};V(d,m=>{i()?m(s):m(u,!1)})}$(r,l)},$$slots:{default:!0}})}import{noop as Iw}from"@vkontakte/videoplayer-shared/es2015";function jm(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,Iw),a=j("menu_pip");zt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Ym(l,{get isActive(){return o()}})},$$slots:{default:!0}}),H()}import{debounceFn as bb}from"@vkontakte/videoplayer-shared/es2015";var Ew=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},Pw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},kw=L("<div><!></div>"),Aw=L("<div><!></div>"),Lw=L("<div><!></div>"),Mw=L("<!> <!> <!>",1),Vw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Rw=L('<div class="wrapper-middle s-10"><!></div>'),Nw=L("<div><!></div> <!> <div><!></div>",1),Ow=L('<div aria-hidden="true">·</div> <!>',1),Dw=L('<!> <!> <div><div><div class="controls mobile s-10" data-testid="bottom-controls"><div class="controls-group contain s-10"><!> <!> <!> <!></div> <div class="controls-group s-10"><!> <!> <!></div></div> <!></div></div> <!>',1),Bw={hash:"s-10",code:".wrapper-bottom.s-10{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-10>:where(.s-10){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-10{height:9px;padding:0 4px 4px}.wrapper-middle.s-10{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-10,.wrapper-top-right.s-10{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-10{right:8px;top:4px}.wrapper-top-left.s-10{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-10,.wrapper-middle-left-second.s-10,.wrapper-middle-right.s-10{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-10{left:12px}.wrapper-middle-left-second.s-10{left:64px}.wrapper-middle-right.s-10{right:12px}.controls.s-10{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-10,.controls-group.s-10{display:flex}.controls-group.contain.s-10{min-width:0}.controls-group.s-10 >:not(:first-child){margin-left:8px}.hidden.s-10{opacity:0;visibility:hidden}.controls-hidden.s-10{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-10{transition:none}.overlay-mobile.s-10{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-10,.wrapper-top-right.fullscreen.s-10{top:16px}.controls-wrapper.fullscreen.s-10{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-10{left:44px;top:12px}.wrapper-top-right.fullscreen.s-10{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-10{left:44px}.wrapper-middle-left-second.fullscreen.s-10{left:96px}.wrapper-middle-right.fullscreen.s-10{right:44px}.controls-wrapper.fullscreen.s-10{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Xm(t,e){var nn,rn;B(e,!0),G(t,Bw);let[i,o]=Oe(),r=()=>x(Li,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(oi,"$disabledControls$",i),l=()=>x(Pt,"$playbackState$",i),d=()=>x(Xo,"$adPlaybackState",i),s=()=>x(Y,"$isEnded$",i),u=()=>x(xt,"$playerSize",i),m=()=>x(kt,"$scrubbingInProgress",i),p=()=>x(Di,"$chromecastState$",i),v=()=>x(Be,"$isPictureInPictureActive",i),b=()=>x(We,"$pictureInPictureType$",i),y=()=>x(fe,"$mobileNotReportControlHidden$",i),g=()=>x($i,"$chromecastHidden",i),w=()=>x(lt,"$playerPhase",i),I=()=>x(Vt,"$pipHidden",i),C=()=>x(Ye,"$currentGridType$",i),N=()=>x(pi,"$vkLogoHidden",i),A=()=>x(mi,"$volumeHidden",i),E=()=>x(Pe,"$isLive$",i),P=()=>x(yt,"$settingsMenuVisible",i),Q=()=>x(rt,"$isRewindableLive$",i),F=()=>x(Me,"$isActiveLive$",i),z=()=>x(Bt,"$isAudioAvailable$",i),X=()=>x(ye,"$muted$",i),se=()=>x(le,"$volume$",i),Z=()=>x(ft,"$isInteractiveTime$",i),oe=()=>x(rr,"$settingButtonRef$",i),J=()=>x(gt,"$startedByKeyboard$",i),Ce=()=>x(Zo,"$isFullscreen",i),me=()=>x(Ht,"$additionalButtons$",i),ee=()=>x(Oi,"$autoplayNextToggleHidden",i),be=()=>x(xi,"$crashed$",i),we=()=>x(vi,"$settingsHidden",i),ge=()=>x(fn,"$graphIsOpened$",i),pe=()=>x(go,"$adPosition",i),qe=()=>x(gi,"$adDuration",i),U=()=>x(Jt,"$position$",i),D=()=>x(Et,"$duration$",i),Qe=h(e,"playerControlsWrapperRef",15,void 0),K=h(e,"playerControlsRef",15,void 0),ae=h(e,"isAds",3,!1),xe=h(e,"logoTargetUrl",3,""),He=h(e,"isOneVideoPlaylist",3,!1),it=h(e,"customFullscreenSupported",3,!0),re=_e(),ce=_o(),Ne=Ot(),Re=re.actions.internal.toggleMuted,et=re.actions.internal.togglePlay,Ee=re.actions.internal.pause,Te=re.actions.internal.prevVideoClick,Fe=re.actions.internal.nextVideoClick,It=re.actions.internal.checkFullscreenSupport,wt=(nn=re.callbacks)==null?void 0:nn.onAudioDoesNotExistHint,Mt=(rn=re.callbacks)==null?void 0:rn.onAudioDisabledHint,lt=re.playerPhase,Et=re.state.duration$,Jt=re.state.positionWithScrubbing$,Pt=re.state.playbackState$,Bt=re.state.isAudioAvailable$,Wt=re.state.isAudioDisabled,Y=re.state.isEnded$,Pe=re.state.isLive$,le=re.state.volume$,ye=re.state.muted$,Me=re.state.isActiveLive$,rt=re.state.isRewindableLive$,kt=re.ui.scrubbingInProgress,fe=re.ui.mobileNotReportControlHidden$,{isActive$:Be,type$:We}=ce.pictureInPicture$,yt=re.ui.settingsMenu.visible$,Kt=re.ui.settingsMenu.openedByBtnKeyboard$,At=re.ui.controls,{volume:mi,vkLogo:pi,autoplayNextToggle:Oi,pip:Vt,settings:vi,chromecast:$i}=re.ui.hiddenControls,pt=re.actions.internal.getVideoEpisodes(),Xt=re.webApi.pictureInPictureApi,Di=re.state.chromecastState$,xi=re.state.crashed$,oi=At.disabledControls$,gt=re.ui.startedByKeyboard$,Ye=re.ui.currentGridType$,gi=re.ads.duration,go=re.ads.position,Xo=re.ads.playbackState,Zo=re.ui.isFullscreen,xt=re.ui.playerSize,Ht=re.ui.additionalButtonsDeprecated$,W=re.actions.internal.getVideoElement,Rt=re.actions.internal.replayInteractive,li=re.state.isInteractive,ft=re.state.isInteractiveTime$,ei=re.state.showInteractiveGraph,ht=re.state.showSeekToInteractive,nt=re.state.showPlayPrevChapter,Bi=re.state.showInteractiveTimeIndicator,Li=ce.seekToInteractiveDisabledTooltip$,fn=ce.graphIsOpened$,mn=re.ui.controlBlocks,Mi=f(()=>j(re.state.playPrevChapterDisabledTooltip)),Hi=f(()=>j(r())),Nn=f(()=>a().has("EPISODE_BUTTON")),bo=f(()=>a().has("GRAPH_BUTTON")),ro=f(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),ki=f(()=>a().has("PLAY_BUTTON")),Vo=f(()=>a().has("REPLAY_BUTTON")),Ro=f(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),vn=f(()=>l()===_b.PLAYING),Or=f(()=>d()==="paused"),Dr=f(()=>s()&&!ae()&&!li),Br=f(()=>!s()||ae()),xs=f(()=>e.showNextPrevButtons&&!ae()&&e.prevButtonActive),Hr=f(()=>e.showNextPrevButtons&&!ae()&&e.nextButtonActive),ir=f(()=>u().width>300),Fr=f(()=>u().width>400),gn=f(m),hn=f(()=>p()!==hb.NOT_AVAILABLE&&!(v()&&b()===1)&&!y()&&!li&&!g()),hr=f(()=>w()==="LiveWaitingStart"),_r=f(()=>!!Xt&&p()!==hb.CONNECTED&&!y()&&(b()===1&&n(hr)||!n(hr))&&!n(gn)&&!li&&!I()),Jo=q(!1);Nt(()=>{let Ue=Xt==null?void 0:Xt.info.isActive$.subscribe(Ct=>R(Jo,Ct,!0));return()=>Ue==null?void 0:Ue.unsubscribe()});let br=f(()=>!n(gn)&&oo(C(),"s")),$r=f(()=>!e.logoHidden&&u().width>350&&!N()),or=f(()=>Ne.features.fullscreen&&It()&&!(v()&&b()===1)&&(li?it():!0)&&!n(gn)&&!n(Jo)),On=f(()=>!A()&&!n(gn)),as=f(()=>(!E()||ae())&&u().width>260&&!n(gn)&&!(Ne.features.interactiveHideTime&&li)),No=f(()=>P()||e.showControls),yr=f(()=>!ae()&&!E()&&!!(pt!=null&&pt.length)&&n(ir)&&!n(Nn)&&!n(gn)),Fi=f(()=>!Q()||!!F()),xr=f(()=>ei&&oo(C(),"m")),Dn=f(()=>!z()||X()||se()===0),ut=ci({}),ti=ci({}),wr=bb(Gl,260),Ur=bb(ip,260);De(()=>{u(),Z(),wr(W(),At,ut,e.showControls),Ur(W(),mn,ti,e.showControls)});let zr=()=>re.actions.internal.toggleChromecast();function Bn(){return mt(this,null,function*(){Xt!=null&&Xt.isActive()?yield Xt==null?void 0:Xt.exit():yield Xt==null?void 0:Xt.request()})}function nr(){ua({isAudioDisabled:Wt,audioDisabledHintCallback:Mt,isAudioAvailable:z(),audioIsNotExistHintCallback:wt,isAds:ae()})&&Re()}let $o=q(""),Hn=(Ue,Ct)=>{if(!Ue){R($o,j("tooltip_live"),!0);return}Ct&&Ct===_b.PAUSED&&R($o,j("tooltip_play"),!0)};De(()=>{Hn(n(Fi),l())});let rr=de();De(()=>{oe()&&Dl(oe(),P(),Kt)}),De(()=>{ep(gt,J(),ut.playButton)});var Fn=Dw(),_n=ue(Fn);{var bn=Ue=>{var Ct=Vw(),fi=ue(Ct);let Bo;var wo=k(fi,2);let Ho;Xe(wo,st=>ti.topLeft=st,()=>ti==null?void 0:ti.topLeft);var Wi=k(wo,2);let So;var zn=T(Wi);yi(zn,1,me,({iconUrl:st,ariaLabel:di,testId:Io,onClick:Ci,tooltip:Sn})=>st,(st,di)=>{let Io=()=>n(di).iconUrl,Ci=()=>n(di).ariaLabel,Sn=()=>n(di).testId,Cn=()=>n(di).onClick,Ts=()=>n(di).tooltip,Is=f(()=>{var Ki;return(Ki=Ci())!=null?Ki:Ts()});Qm(st,{get iconUrl(){return Io()},get ariaLabel(){return n(Is)},get testId(){return Sn()},get onClick(){return Cn()}})});var Ir=k(zn,2);{var Co=st=>{ac(st,{get ref(){return ut.autoplayNextToggle},set ref(di){ut.autoplayNextToggle=di}})};V(Ir,st=>{e.showAutoplayNext&&!He()&&!ee()&&st(Co)})}var lo=k(Ir,2);{var xn=st=>{ec(st,{isMobile:!0,click:zr,get state(){return p()},get ref(){return ut.chromecast},set ref(di){ut.chromecast=di}})};V(lo,st=>{n(hn)&&st(xn)})}var Fo=k(lo,2);{var Wn=st=>{jm(st,{click:Bn,get isPictureInPictureActive(){return v()},get ref(){return ut.pip},set ref(di){ut.pip=di}})};V(Fo,st=>{n(_r)&&st(Wn)})}var qr=k(Fo,2);{var Qr=st=>{Ul(st,{get ref$(){return rr}})};V(qr,st=>{be()&&!we()&&st(Qr)})}var Kn=k(qr,2);{var Je=st=>{Zd(st,{get click(){return Ee},get targetUrl(){return xe()},get logoClickable(){return e.logoClickable},get ref(){return ut.vkLogo},set ref(di){ut.vkLogo=di}})};V(Kn,st=>{n($r)&&st(Je)})}S(Wi),Xe(Wi,st=>ti.topRight=st,()=>ti==null?void 0:ti.topRight);var Zt=k(Wi,2);let wi;var To=T(Zt);{var wn=st=>{let di=f(()=>Te.bind(null,!0));Ga(st,{get click(){return n(di)},type:"prev",isMobile:!0,get ref(){return ut.prevButton},set ref(Io){ut.prevButton=Io}})};V(To,st=>{n(xs)&&st(wn)})}var qn=k(To,2);{var Uo=st=>{jl(st,{get disabled(){return n(ki)},get click(){return et},isMobile:!0,get isPlaying(){return n(vn)},get ref(){return ut.playButton},set ref(di){ut.playButton=di}})};V(qn,st=>{n(Br)&&st(Uo)})}var ar=k(qn,2);{var ds=st=>{Yl(st,{get disabled(){return n(Vo)},get click(){return et},isMobile:!0,get ref(){return ut.replayButton},set ref(di){ut.replayButton=di}})};V(ar,st=>{n(Dr)&&st(ds)})}var Er=k(ar,2);{var Cs=st=>{let di=f(()=>Fe.bind(null,!0));Ga(st,{get click(){return n(di)},type:"next",isMobile:!0,get ref(){return ut.nextButton},set ref(Io){ut.nextButton=Io}})};V(Er,st=>{n(Hr)&&st(Cs)})}S(Zt),Xe(Zt,st=>ti.middle=st,()=>ti==null?void 0:ti.middle);var qs=k(Zt,2);{var va=st=>{var di=Mw(),Io=ue(di);{var Ci=Ki=>{var Pi=kw();let he;Pi.__click=[Ew,Ro,e,Mi];var _t=T(Pi);let ii=f(()=>!e.showControls);sc(_t,{get hidden(){return n(ii)},get disabled(){return n(Ro)},get click(){return e.playPrevChapter},get ref(){return ut.playPrevChapterButton},set ref(jt){ut.playPrevChapterButton=jt}}),S(Pi),O(jt=>he=ne(Pi,1,"wrapper-middle-left s-10",null,he,jt),[()=>({fullscreen:Ce(),hidden:!e.showControls})]),$(Ki,Pi)};V(Io,Ki=>{nt&&Ki(Ci)})}var Sn=k(Io,2);{var Cn=Ki=>{var Pi=Aw();let he;var _t=T(Pi);let ii=f(()=>!e.showControls&&!ge());dc(_t,{get hidden(){return n(ii)},get disabled(){return n(bo)},get click(){return fn.toggle},get graphIsOpened(){return ge()},get ref(){return ut.interactiveGraphButton},set ref(jt){ut.interactiveGraphButton=jt}}),S(Pi),O(jt=>he=ne(Pi,1,Cd(nt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-10",he,jt),[()=>({fullscreen:Ce(),hidden:!e.showControls&&!ge()})]),$(Ki,Pi)};V(Sn,Ki=>{n(xr)&&Ki(Cn)})}var Ts=k(Sn,2);{var Is=Ki=>{var Pi=Lw();let he;Pi.__click=[Pw,ro,e,Hi];var _t=T(Pi);let ii=f(()=>!e.showControls);lc(_t,{get hidden(){return n(ii)},get disabled(){return n(ro)},get click(){return e.seekToInteractive},get ref(){return ut.seekToInteractiveButton},set ref(jt){ut.seekToInteractiveButton=jt}}),S(Pi),O(jt=>he=ne(Pi,1,"wrapper-middle-right s-10",null,he,jt),[()=>({fullscreen:Ce(),hidden:!e.showControls})]),$(Ki,Pi)};V(Ts,Ki=>{ht&&Ki(Is)})}$(st,di)};V(qs,st=>{li&&!m()&&st(va)})}O((st,di,Io,Ci)=>{Bo=ne(fi,1,"overlay-mobile s-10",null,Bo,st),Ho=ne(wo,1,"wrapper-top-left s-10",null,Ho,di),So=ne(Wi,1,"wrapper-top-right s-10",null,So,Io),wi=ne(Zt,1,"wrapper-middle s-10",null,wi,Ci)},[()=>({hidden:!n(No)}),()=>({hidden:!e.showControls,fullscreen:Ce()}),()=>({hidden:!e.showControls&&!y(),fullscreen:Ce()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),$(Ue,Ct)};V(_n,Ue=>{ae()||Ue(bn)})}var $n=k(_n,2);{var en=Ue=>{var Ct=Nw(),fi=ue(Ct);let Bo;var wo=T(fi);op(wo,{get muted(){return X()},click:nr,get ref(){return ut.volume},set ref(Co){ut.volume=Co}}),S(fi);var Ho=k(fi,2);{var Wi=Co=>{var lo=Rw(),xn=T(lo);let Fo=f(()=>!n(Or));jl(xn,{get disabled(){return n(ki)},get click(){return et},isMobile:!0,get isPlaying(){return n(Fo)},get ref(){return ut.playButton},set ref(Wn){ut.playButton=Wn}}),S(lo),$(Co,lo)};V(Ho,Co=>{n(Or)&&Co(Wi)})}var So=k(Ho,2);let zn;var Ir=T(So);uc(Ir,{get position(){return pe()},get duration(){return qe()}}),S(So),O((Co,lo)=>{Bo=ne(fi,1,"wrapper-top-right s-10",null,Bo,Co),zn=ne(So,1,"wrapper-bottom ads-timeline-mobile s-10",null,zn,lo)},[()=>({fullscreen:Ce()}),()=>({fullscreen:Ce()})]),$(Ue,Ct)};V($n,Ue=>{ae()&&d()!=="inactive"&&Ue(en)})}var Ui=k($n,2);let Zi;var tn=T(Ui);let sr;var Sr=T(tn),yn=T(Sr),Cr=T(yn);{var dt=Ue=>{Mo(Ue,{get disabled(){return n(Vo)},get ref(){return ut.replayButton},set ref(Ct){ut.replayButton=Ct},children:(Ct,fi)=>{Yl(Ct,{get disabled(){return n(Vo)},get click(){return Rt}})},$$slots:{default:!0}})};V(Cr,Ue=>{li&&Ue(dt)})}var St=k(Cr,2);{var so=Ue=>{Mo(Ue,{get ref(){return ut.liveButton},set ref(Ct){ut.liveButton=Ct},children:(Ct,fi)=>{cc(Ct,{get isLiveActive(){return n(Fi)},isMobile:!0,get ariaLabel(){return n($o)}})},$$slots:{default:!0}})};V(St,Ue=>{!ae()&&E()&&Ue(so)})}var Oo=k(St,2);{var yo=Ue=>{let Ct=f(()=>ae()?pe():U()),fi=f(()=>ae()?qe():D()),Bo=f(()=>!e.showControls);Yd(Ue,{get showDuration(){return n(Fr)},get position(){return n(Ct)},get duration(){return n(fi)},isMobile:!0,get isHidden(){return n(Bo)},get ref(){return ut.time},set ref(wo){ut.time=wo}})};V(Oo,Ue=>{n(as)&&Ue(yo)})}var on=k(Oo,2);let ao=f(()=>!n(yr));Mo(on,{className:"w-max",get disabled(){return n(ao)},get ref(){return ut.episodes},set ref(Ue){ut.episodes=Ue},children:(Ue,Ct)=>{var fi=Le(),Bo=ue(fi);{var wo=Ho=>{var Wi=Ow(),So=k(ue(Wi),2);tc(So,{get position(){return U()},get duration(){return D()},get timeCodes(){return pt}}),$(Ho,Wi)};V(Bo,Ho=>{n(yr)&&Ho(wo)})}$(Ue,fi)},$$slots:{default:!0}}),S(yn),Xe(yn,Ue=>ti.bottomLeft=Ue,()=>ti==null?void 0:ti.bottomLeft);var xo=k(yn,2),Ei=T(xo);{var Wr=Ue=>{Mo(Ue,{get ref(){return ut.volume},set ref(Ct){ut.volume=Ct},children:(Ct,fi)=>{op(Ct,{get muted(){return n(Dn)},click:nr})},$$slots:{default:!0}})};V(Ei,Ue=>{n(On)&&Ue(Wr)})}var Un=k(Ei,2);{var ws=Ue=>{Mo(Ue,{get ref(){return ut.settings},set ref(Ct){ut.settings=Ct},children:(Ct,fi)=>{Ul(Ct,{get ref$(){return rr}})},$$slots:{default:!0}})};V(Un,Ue=>{n(br)&&Ue(ws)})}var zi=k(Un,2);{var Ss=Ue=>{Mo(Ue,{get ref(){return ut.fullscreen},set ref(Ct){ut.fullscreen=Ct},children:(Ct,fi)=>{Xd(Ct,{get click(){return e.toggleFullscreen},get isFullscreen(){return Ce()}})},$$slots:{default:!0}})};V(zi,Ue=>{n(or)&&Ue(Ss)})}S(xo),Xe(xo,Ue=>ti.bottomRight=Ue,()=>ti==null?void 0:ti.bottomRight),S(Sr),Xe(Sr,Ue=>K(Ue),()=>K());var ls=k(Sr,2);let Tr=f(()=>!e.showControls);ja(ls,{get isHidden(){return n(Tr)},get isAds(){return ae()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return Q()},get ref(){return ut.timeline},set ref(Ue){ut.timeline=Ue}}),S(tn),Xe(tn,Ue=>ti.bottom=Ue,()=>ti==null?void 0:ti.bottom),S(Ui),Xe(Ui,Ue=>Qe(Ue),()=>Qe());var Do=k(Ui,2);{var Kr=Ue=>{nc(Ue,{get ref(){return ut.interactiveTimeIndicator},set ref(Ct){ut.interactiveTimeIndicator=Ct}})};V(Do,Ue=>{Bi&&Ue(Kr)})}O((Ue,Ct)=>{Zi=ne(Ui,1,"wrapper-bottom mobile s-10",null,Zi,Ue),sr=ne(tn,1,"controls-wrapper s-10",null,sr,Ct)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:Ce()})]),$(t,Fn),H(),o()}Ge(["click"]);function pc(t,e){B(e,!0);let[i,o]=Oe(),r=()=>x(I,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),m=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),b=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,$b),g=h(e,"onDisabledSeekToInteractiveClick",3,$b),I=_e().ui.isMobile,C=q(!1);Nt(()=>{let P=setTimeout(()=>R(C,!0),0);return()=>clearTimeout(P)});var N=Le(),A=ue(N);{var E=P=>{var Q=Le(),F=ue(Q);{var z=se=>{Xm(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return b()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return g()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})},X=se=>{qm(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})};V(F,se=>{r()?se(z):se(X,!1)})}$(P,Q)};V(A,P=>{n(C)&&P(E)})}$(t,N),H(),o()}var Hw=Ie('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function fc(t,e){B(e,!0);let i=f(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=f(()=>`${cn(e.size)}${n(i)}`);Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Hw();$(r,l)},$$slots:{default:!0}}),H()}var Fw=Ie('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function Zm(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=f(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=f(()=>`seek-icon-${i()?"backward":"forward"}`);Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Fw();$(a,d)},$$slots:{default:!0}}),H()}var Uw=L('<span class="hot-key-helpers-text s-1f"> </span>'),zw=L('<div data-testid="hotkey-helper-icon" class="s-1f"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Ww=L("<div><!></div>"),Kw={hash:"s-1f",code:'.hot-key-helpers-container.s-1f{align-items:center;animation:s-1f-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-1f{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1f{left:calc(75% - 100px)}.hot-key-helpers-text.s-1f{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-1f{animation:s-1f-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1f-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1f-fadeOut{0%{opacity:1}to{opacity:0}}'};function Jm(t,e){B(e,!0),G(t,Kw);let[i,o]=Oe(),r=()=>x(e.data,"$data",i),a=_e(),{features:l}=Ot(),d=a.ui.t,s=f(()=>!r()),u=f(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=f(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=f(()=>{var I;return(I=r())==null?void 0:I.type}),v=f(()=>{var I,C;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(C=r())==null?void 0:C.text});var b=Ww();let y;var g=T(b);{var w=I=>{var C=zw(),N=ue(C),A=T(N);{var E=K=>{let ae=f(()=>n(p)==="BACKWARD_SEEK");Zm(K,{get reversed(){return n(ae)},shadow:!0})};V(A,K=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&K(E)})}var P=k(A,2);{var Q=K=>{zs(K,{get size(){return"48"},shadow:!0})};V(P,K=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&K(Q)})}var F=k(P,2);{var z=K=>{Vn(K,{get size(){return"48"},shadow:!0})};V(F,K=>{n(p)==="PLAY"&&!l.playbackStatusShow&&K(z)})}var X=k(F,2);{var se=K=>{rc(K,{get size(){return"48"},shadow:!0})};V(X,K=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&K(se)})}var Z=k(X,2);{var oe=K=>{pa(K,{get size(){return"48"},type:"off",shadow:!0})};V(Z,K=>{n(p)==="SUBTITLES_OFF"&&K(oe)})}var J=k(Z,2);{var Ce=K=>{pa(K,{get size(){return"48"},shadow:!0})};V(J,K=>{n(p)==="SUBTITLES_ON"&&K(Ce)})}var me=k(J,2);{var ee=K=>{let ae=f(()=>n(p)==="RATE_DOWN");fc(K,{get size(){return"48"},get reversed(){return n(ae)},testId:"rate-change-icon",shadow:!0})};V(me,K=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&K(ee)})}var be=k(me,2);{var we=K=>{let ae=f(()=>n(p)==="EPISODE_PREV");ma(K,{get size(){return"48"},get reversed(){return n(ae)},shadow:!0})};V(be,K=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&K(we)})}var ge=k(be,2);{var pe=K=>{fa(K,{get size(){return"48"},volume:0,shadow:!0})};V(ge,K=>{n(p)==="MUTE"&&K(pe)})}var qe=k(ge,2);{var U=K=>{fa(K,{get size(){return"48"},volume:1,shadow:!0})};V(qe,K=>{n(p)==="VOLUME"&&K(U)})}S(N);var D=k(N,2);{var Qe=K=>{var ae=Uw(),xe=T(ae,!0);S(ae),O(()=>ve(xe,n(v))),$(K,ae)};V(D,K=>{n(v)&&K(Qe)})}O(()=>Ve(N,"data-type",n(p))),$(I,C)};V(g,I=>{!n(s)&&n(p)&&I(w)})}S(b),O(I=>y=ne(b,1,"hot-key-helpers-container s-1f",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),$(t,b),H(),o()}var qw=(t,e,i,o,r,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":r();break;case"ArrowRight":a();break}},Qw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Gw=L('<div tabindex="0" role="button"><div class="button-block s-i" aria-hidden="true"><div class="button-row s-i"><div class="button button-up s-i"><!></div> <div class="button button-right s-i"><!></div></div> <div class="button-row s-i"><div class="button button-left s-i"><!></div> <div class="button button-down s-i"><!></div></div></div></div>'),Yw={hash:"s-i",code:".immersive-controls.s-i{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-i{left:20px;top:50px}.button-block.s-i{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-i{display:flex;flex-direction:row;position:relative}.button.s-i{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-i svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-i svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-i svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-i svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-i svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-i:hover svg{opacity:1}"};function mc(t,e){B(e,!0),G(t,Yw);let i=h(e,"isShifted",3,!1),o=_e(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),m=j("aria_label_spherical_control");var p=Gw();let v;p.__keydown=[qw,r,a,l,s,d],p.__keyup=[Qw,r,u];var b=T(p),y=T(b),g=T(y);g.__mousedown=a,g.__mouseup=u;var w=T(g);Rr(w,{direction:"up",useBtnColor:!0}),S(g);var I=k(g,2);I.__mousedown=d,I.__mouseup=u;var C=T(I);Rr(C,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=k(y,2),A=T(N);A.__mousedown=s,A.__mouseup=u;var E=T(A);Rr(E,{direction:"up",useBtnColor:!0}),S(A);var P=k(A,2);P.__mousedown=l,P.__mouseup=u;var Q=T(P);Rr(Q,{direction:"up",useBtnColor:!0}),S(P),S(N),S(b),S(p),O(F=>{v=ne(p,1,"immersive-controls s-i",null,v,F),Ve(p,"aria-label",m)},[()=>({"m-shifted":i()})]),at("mouseleave",g,u),at("mouseleave",I,u),at("mouseleave",A,u),at("mouseleave",P,u),$(t,p),H()}Ge(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as xb,Subscription as jw,filterChanged as Xw,filter as Zw}from"@vkontakte/videoplayer-shared/es2015";var yb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var np=class{constructor(){this.flickeringTimeout=yb(1e3);this.subscriptions=new jw;this.isAuto=!1;this.isLive=!1;this.captions$=new xb([]);this.captionsPrepared$=new xb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Zw(()=>this.isEnabled()),Xw()).subscribe(e=>{this.processCaptions(e)})),this}setIsAuto(e){this.isAuto=e}setIsLive(e){this.isLive=e}setCaptions(e){this.captions$.next(e)}destroy(){this.subscriptions.unsubscribe(),this.flickeringTimeout.clear()}isEnabled(){return this.isAuto&&!this.isLive}processCaptions(e){if(!e.length){this.flickeringTimeout.add(()=>{this.captionsPrepared$.next([])});return}this.flickeringTimeout.clear();let i=[],o=e.length>1&&e[0].type!=="timestamp"&&e[1].type!=="timestamp";o&&i.push([{value:String(e[0].value),timeAppeared:null}]),i.push(e.reduce((r,{type:a,value:l},d)=>(o&&!d||(a==="timestamp"?r.push({timeAppeared:Number(l),value:""}):r.length===0?r.push({value:String(l)}):r[r.length-1].value=String(l)),r),[])),this.captionsPrepared$.next(i)}};var Jw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),eS=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),tS=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),iS=L('<div><span class="caption s-a"><!></span></div>'),oS=L("<div><!></div>"),nS={hash:"s-a",code:".subtitles-container.s-a{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-a{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-a{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-a .subtitles-caption:where(.s-a){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-a{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-a{bottom:8%}.subtitles-container.auto.s-a .subtitles-caption:where(.s-a){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-a{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-a .caption:where(.s-a){width:100%}.caption-line.s-a{display:block;text-align:center}.subtitles-container.auto.s-a .caption-line:where(.s-a){text-align:left}.caption-segment.s-a{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Za(t,e){B(e,!0),G(t,nS);let[i,o]=Oe(),r=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(g,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x(b,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),m=_e(),p=Ot(),v=m.state.currentSubtitle$,b=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,g=m.ui.isFullscreen,w=m.ui.previewTrackActive,I=f(()=>!!r().isAuto),C=f(()=>!!a()),N=f(()=>e.playerSize.width*.02),A=f(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=q(null);De(()=>{var Z,oe,J;(Z=n(E))==null||Z.setIsAuto(n(I)),(oe=n(E))==null||oe.setIsLive(n(C)),(J=n(E))==null||J.setCaptions(e.captions)});let P=q(ci([[]]));Nt(()=>{R(E,new np().subscribe(),!0);let Z=n(E).captionsPrepared$.subscribe(oe=>{R(P,oe,!0)});return()=>{var oe;(oe=n(E))==null||oe.destroy(),Z.unsubscribe()}}),Nt(()=>{if(n(I)){let Z=window.setTimeout(()=>{b.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(Z)}}else b.set(!1)});let Q=f(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=oS();let z;var X=T(F);{var se=Z=>{var oe=iS();let J;var Ce=T(oe),me=T(Ce);{var ee=we=>{var ge=Jw(),pe=T(ge),qe=T(pe,!0);S(pe),S(ge),O(U=>{var D;Ke(pe,`font-size: ${(D=n(A))!=null?D:""}px`),ve(qe,U)},[()=>j("subtitles_auto_caption")]),$(we,ge)},be=(we,ge)=>{{var pe=U=>{var D=Le(),Qe=ue(D);yi(Qe,17,()=>n(P),wd,(K,ae)=>{var xe=eS(),He=T(xe);yi(He,21,()=>n(ae),({value:it,timeAppeared:re})=>re,(it,re)=>{let ce=()=>n(re).value,Ne=()=>n(re).timeAppeared;var Re=Le(),et=ue(Re);{var Ee=Te=>{var Fe=vs();O(()=>ve(Fe,ce())),$(Te,Fe)};V(et,Te=>{(!Ne()||Ne()<=e.position)&&Te(Ee)})}$(it,Re)}),S(He),S(xe),O(()=>{var it;return Ke(He,`font-size: ${(it=n(A))!=null?it:""}px`)}),$(K,xe)}),$(U,D)},qe=U=>{var D=Le(),Qe=ue(D);yi(Qe,17,()=>e.captions,({value:K})=>K,(K,ae)=>{let xe=()=>n(ae).value;var He=tS(),it=T(He),re=T(it,!0);S(it),S(He),O(()=>{var ce;Ke(it,`font-size: ${(ce=n(A))!=null?ce:""}px`),ve(re,xe())}),$(K,He)}),$(U,D)};V(we,U=>{var D;n(I)&&((D=n(P))!=null&&D.length)?U(pe):U(qe,!1)},ge)}};V(me,we=>{n(I)&&s()?we(ee):we(be,!1)})}S(Ce),S(oe),O(we=>{var ge;J=ne(oe,1,"subtitles-caption s-a",null,J,we),Ke(oe,`--subtitles-caption-margin: ${(ge=n(Q))!=null?ge:""}%`)},[()=>({mobile:u()})]),$(Z,oe)};V(X,Z=>{var oe;(e.captions.length||(oe=n(P))!=null&&oe.length)&&Z(se)})}S(F),O(Z=>z=ne(F,1,"subtitles-container s-a",null,z,Z),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(C)&&!s()})]),$(t,F),H(),o()}import{ChromecastState as rS}from"@vkontakte/videoplayer-core/es2015";var sS=L('<div class="text s-o"> </div>'),aS=L('<div><div class="icon_wrapper s-o"><!></div> <!></div>'),lS={hash:"s-o",code:".wrapper.s-o{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-o{background-size:cover}.icon_wrapper.s-o{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-o{margin-top:20px}"};function vc(t,e){B(e,!0),G(t,lS);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Ot();var r=aS();let a;r.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},r.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)},r.__dblclick=function(...m){var p;(p=e.onDblClick)==null||p.apply(this,m)};var l=T(r),d=T(l);Jd(d,{get size(){return"48"},get iconState(){return rS.CONNECTED}}),S(l);var s=k(l,2);{var u=m=>{var p=sS(),v=T(p);S(p),O(()=>{var b;return ve(v,`Видео воспроизводится на ${(b=i())!=null?b:""}`)}),$(m,p)};V(s,m=>{i()&&m(u)})}S(r),O(m=>{a=ne(r,1,"wrapper s-o",null,a,m),Ke(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),$(t,r),H()}Ge(["contextmenu","click","dblclick"]);var dS=Ie('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ev(t){Ze(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=dS();$(e,o)},$$slots:{default:!0}})}var cS=L('<div class="container s-4"><!></div>'),uS={hash:"s-4",code:".container.s-4{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Ja(t){G(t,uS);var e=cS(),i=T(e);ev(i,{}),S(e),$(t,e)}var pS=L('<div class="playButton s-e" tabindex="0" role="button"><div class="playButtonBackground s-e"></div> <!></div>'),fS=L('<div data-testid="unstarted-thumb"><!></div>'),mS={hash:"s-e",code:".container.s-e{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-e{opacity:0;visibility:hidden}.container.bgCover.s-e{background-size:cover}.playButton.s-e{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-e,.playButtonBackground.s-e{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-e{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-e:hover .playButtonBackground:where(.s-e){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-e svg{position:relative}"};function el(t,e){B(e,!0),G(t,mS);let i=h(e,"iconVisible",3,!0),o=_e(),r=Ot(),a=o.ui.startedByKeyboard$,l=j("tooltip_play"),d=b=>{var g;let y=b.code;["Enter","Space"].includes(y)&&(b.stopPropagation(),b.preventDefault(),a.set(!0),(g=e.startVideo)==null||g.call(e))},s=b=>{var y,g;b.stopPropagation(),(y=e.startVideo)==null||y.call(e),(g=e.onClick)==null||g.call(e,b)};var u=fS();let m;u.__click=s,u.__contextmenu=function(...b){var y;(y=e.onContextMenu)==null||y.apply(this,b)};var p=T(u);{var v=b=>{var y=pS();y.__keydown=d;var g=k(T(y),2);Vn(g,{get size(){return"48"}}),S(y),O(()=>Ve(y,"aria-label",l)),$(b,y)};V(p,b=>{i()&&b(v)})}return S(u),O(b=>{m=ne(u,1,"container s-e",null,m,b),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),$(t,u),H({handlePressKey:d,handleClick:s})}Ge(["click","contextmenu","keydown"]);var vS=L('<span class="text s-1d"> </span>'),gS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},hS=L('<a target="_blank" class="link s-1d"><!></a>'),_S=(t,e)=>e.onTitleClicked(),bS=L("<button><!></button>"),$S=L('<div data-testid="video_title"><!></div>'),yS={hash:"s-1d",code:".title.s-1d{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-1d,.title.s-1d{color:var(--white)}.link.s-1d{pointer-events:auto;text-decoration:none}.link.s-1d:hover{text-decoration:underline}.text.s-1d{pointer-events:auto}.size-sm.s-1d{font-size:14px;font-weight:500;line-height:18px}.hidden.s-1d{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function tv(t,e){B(e,!0),G(t,yS);let i=b=>{var y=vS(),g=T(y,!0);S(y),Xe(y,w=>l(w),()=>l()),O(()=>ve(g,o())),at("mouseenter",y,function(...w){var I;(I=e.onMouseEnter)==null||I.apply(this,w)}),at("mouseleave",y,function(...w){var I;(I=e.onMouseLeave)==null||I.apply(this,w)}),$(b,y)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=q(void 0);Nt(()=>{var y;requestAnimationFrame(()=>{var g;(g=e.onVisibilityChanged)==null||g.call(e,!0)});function b(g){var w;g.propertyName==="transform"&&((w=e.onVisibilityChanged)==null||w.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",b),()=>{var g;return(g=n(d))==null?void 0:g.removeEventListener("transitionend",b)}});var s=$S();let u;var m=T(s);{var p=b=>{var y=hS();y.__click=[gS,e];var g=T(y);i(g),S(y),O(()=>Ve(y,"href",e.titleLinkHref)),$(b,y)},v=(b,y)=>{{var g=I=>{var C=bS();C.__click=[_S,e];var N=T(C);i(N),S(C),$(I,C)},w=I=>{i(I)};V(b,I=>{e.onTitleClicked?I(g):I(w,!1)},y)}};V(m,b=>{e.titleLinkHref?b(p):b(v,!1)})}S(s),Xe(s,b=>R(d,b),()=>n(d)),O(b=>u=ne(s,1,`title size-${a()}`,"s-1d",u,b),[()=>({hidden:r()})]),$(t,s),H()}Ge(["click"]);import{throttleFn as ES}from"@vkontakte/videoplayer-shared/es2015";var xS=L('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div> <span class="timer__points s-z"> </span>',1),wS=L('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div> <span class="timer__points s-z"> </span>',1),SS=L('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div> <span class="timer__points s-z"> </span>',1),CS=L('<div class="timer__cell cell s-z"><span class="cell__value s-z"> </span> <span class="cell__unit s-z"> </span></div>'),TS=L("<div><!> <!> <!> <!></div>"),IS={hash:"s-z",code:".timer__container.s-z{align-items:flex-start;display:flex;justify-content:center}.cell.s-z{align-items:center;display:flex;flex-direction:column}.cell__value.s-z{font-size:48px;font-weight:600;line-height:1.2}.small.s-z .cell__value:where(.s-z){font-size:24px}.cell__unit.s-z{font-size:14px;font-weight:400;line-height:1.2}.small.s-z .cell__unit:where(.s-z){font-size:12px}.timer__points.s-z{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-z .timer__points:where(.s-z){font-size:20px}"};function iv(t,e){B(e,!0),G(t,IS);let i=q(""),o=q(""),r=q(""),a=q(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),m=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*m(F)}px`,v=F=>{let z=Math.floor(F/86400);z&&(F-=z*86400,R(i,u(z),!0));let X=Math.floor(F/3600);R(o,u(X),!0);let se=Math.floor(F/60)%60;R(r,u(se),!0);let Z=F%60;R(a,u(Z),!0)},b=()=>{let F=Math.floor(Date.now()/1e3),z=e.startTime-F;v(z),z>=1?l=requestAnimationFrame(b):e.onTimerOver()};Nt(()=>{l=requestAnimationFrame(b)}),dn(()=>{cancelAnimationFrame(l)});var y=TS();let g;var w=T(y);{var I=F=>{var z=xS(),X=ue(z);let se;var Z=T(X),oe=T(Z,!0);S(Z);var J=k(Z,2),Ce=T(J,!0);S(J),S(X);var me=k(X,2),ee=T(me,!0);S(me),O((be,we,ge)=>{se=Ke(X,"",se,{width:be}),ve(oe,n(i)),ve(Ce,we),ve(ee,ge)},[()=>p(n(i)),()=>j("waiting_live_day_value"),()=>j("waiting_live_colon")]),$(F,z)};V(w,F=>{n(i)&&F(I)})}var C=k(w,2);{var N=F=>{var z=wS(),X=ue(z);let se;var Z=T(X),oe=T(Z,!0);S(Z);var J=k(Z,2),Ce=T(J,!0);S(J),S(X);var me=k(X,2),ee=T(me,!0);S(me),O((be,we,ge)=>{se=Ke(X,"",se,{width:be}),ve(oe,n(o)),ve(Ce,we),ve(ee,ge)},[()=>p(n(o)),()=>j("waiting_live_hour_value"),()=>j("waiting_live_colon")]),$(F,z)};V(C,F=>{n(o)&&F(N)})}var A=k(C,2);{var E=F=>{var z=SS(),X=ue(z);let se;var Z=T(X),oe=T(Z,!0);S(Z);var J=k(Z,2),Ce=T(J,!0);S(J),S(X);var me=k(X,2),ee=T(me,!0);S(me),O((be,we,ge)=>{se=Ke(X,"",se,{width:be}),ve(oe,n(r)),ve(Ce,we),ve(ee,ge)},[()=>p(n(r)),()=>j("waiting_live_minute_value"),()=>j("waiting_live_colon")]),$(F,z)};V(A,F=>{n(r)&&F(E)})}var P=k(A,2);{var Q=F=>{var z=CS();let X;var se=T(z),Z=T(se,!0);S(se);var oe=k(se,2),J=T(oe,!0);S(oe),S(z),O((Ce,me)=>{X=Ke(z,"",X,{width:Ce}),ve(Z,n(a)),ve(J,me)},[()=>p(n(a)),()=>j("waiting_live_second_value")]),$(F,z)};V(P,F=>{n(a)&&F(Q)})}S(y),O(F=>g=ne(y,1,"timer__container s-z",null,g,F),[()=>({small:e.isSmallSize})]),$(t,y),H()}var PS=L('<div class="waiting s-k"><span> </span></div>'),kS=L('<div class="upcoming-timer timer s-k"><span> </span> <!></div>'),AS=L('<div class="waiting-container s-k"><!></div>'),LS={hash:"s-k",code:'.waiting-container.s-k{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-k,.waiting-container.s-k:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-k:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-k{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-k{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-k{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-k{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-k{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-k{font-size:15px}.medium.s-k{font-size:17px}'};function gc(t,e){B(e,!0),G(t,LS);let i=h(e,"startTime",3,0),o=f(()=>i()<Math.floor(Date.now()/1e3)),r=q(void 0),a=q(void 0),l=0,d=q(void 0),s=q(void 0),u=f(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=f(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?ES(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,I)})},300):void 0;De(()=>{n(s),n(d),n(o),p==null||p()}),dn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var v=AS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var b=T(v);{var y=w=>{var I=PS(),C=T(I);let N;var A=T(C,!0);S(C),S(I),Xe(I,E=>R(r,E),()=>n(r)),O((E,P)=>{N=ne(C,1,"waiting__title s-k",null,N,E),ve(A,P)},[()=>({medium:n(m),small:n(u)}),()=>j("waiting_live_upcoming_title")]),$(w,I)},g=w=>{var I=kS(),C=T(I);let N;var A=T(C,!0);S(C);var E=k(C,2);let P=f(()=>n(u)||n(m)),Q=f(()=>i()||0);iv(E,{get isSmallSize(){return n(P)},get startTime(){return n(Q)},onTimerOver:()=>R(o,!0)}),S(I),Xe(I,F=>R(a,F),()=>n(a)),O((F,z)=>{N=ne(C,1,"timer__title s-k",null,N,F),ve(A,z)},[()=>({medium:n(m),small:n(u)}),()=>j("waiting_live_timer_title")]),$(w,I)};V(b,w=>{n(o)?w(y):w(g,!1)})}S(v),O(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),Ln(v,"clientWidth",w=>R(d,w)),Ln(v,"clientHeight",w=>R(s,w)),$(t,v),H()}Ge(["contextmenu","click"]);var MS=L('<div class="waiting-container s-p"><div class="waiting-caption s-p"><!> <p class="waiting-title s-p"> </p></div></div>'),VS={hash:"s-p",code:'.waiting-container.s-p{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-p,.waiting-container.s-p:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-p:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-p{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-p{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function tl(t,e){B(e,!0),G(t,VS);let i=h(e,"thumbUrl",3,""),o={recover:j("waiting_live_recover_title"),record:j("waiting_record_title")},r=f(()=>o[e.kind]||"");var a=MS();a.__contextmenu=function(...m){var p;(p=e.onContextMenu)==null||p.apply(this,m)},a.__click=function(...m){var p;(p=e.onClick)==null||p.apply(this,m)};var l=T(a),d=T(l);Wa(d,{style:"position: static; transform: translate(0, 0)"});var s=k(d,2),u=T(s,!0);S(s),S(l),S(a),O(()=>{Ke(a,`background-image: url('${i()}')`),ve(u,n(r))}),$(t,a),H()}Ge(["contextmenu","click"]);var RS=Ie('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function ov(t){Ze(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=RS();$(e,o)},$$slots:{default:!0}})}var NS=L('<div class="select-icon s-1x"><!></div>'),OS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function hc(t){G(t,OS);var e=NS(),i=T(e);ov(i,{}),S(e),$(t,e)}var DS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},BS=(t,e)=>{Bl(t,()=>e.item.selectItem(e.item.value))},HS=L("<p> </p>"),FS=L('<p class="sublabel s-1u"> </p>'),US=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),zS={hash:"s-1u",code:".menu-item-value.s-1u{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1u{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1u,.sublabel.s-1u{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1u{opacity:.5}"};function nv(t,e){B(e,!0),G(t,zS);let i=h(e,"isMobile",3,!1);var o=US();let r;o.__click=[DS,e],o.__keydown=[BS,e];var a=T(o);{var l=y=>{hc(y,{})};V(a,y=>{e.item.selected&&y(l)})}var d=k(a,2);let s;var u=T(d);{var m=y=>{var g=Le(),w=ue(g);Ni(w,()=>e.item.valueComponent,(I,C)=>{C(I,ns(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),$(y,g)},p=y=>{var g=HS();let w;var I=T(g,!0);S(g),O(C=>{var N;w=ne(g,1,"label s-1u",null,w,C),ve(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),$(y,g)};V(u,y=>{e.item.valueComponent?y(m):y(p,!1)})}var v=k(u,2);{var b=y=>{var g=FS(),w=T(g,!0);S(g),O(()=>ve(w,e.item.sublabel)),$(y,g)};V(v,y=>{e.item.sublabel&&y(b)})}S(d),S(o),O((y,g,w)=>{var I;r=ne(o,1,"item",null,r,y),Ve(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Ve(o,"aria-label",g),Ve(o,"data-testid",e.item.dataTestid),s=ne(d,1,"menu-item-value s-1u",null,s,w),Ve(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,g;return(g=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?g:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),$(t,o),H()}Ge(["click","keydown"]);var WS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function rv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=f(()=>()=>e.openSubMenuList(e.item.children)),a=f(()=>g=>Du(g,n(r)));var l=WS();let d;l.__click=function(...g){var w;(w=n(r))==null||w.apply(this,g)},l.__keydown=function(...g){var w;(w=n(a))==null||w.apply(this,g)};var s=T(l);{var u=g=>{hc(g,{})};V(s,g=>{e.item.selected&&g(u)})}var m=k(s,2);let p;var v=T(m);{var b=g=>{var w=Le();let I=f(()=>e.item.valueComponent);var C=ue(w);Ni(C,()=>n(I),(N,A)=>{A(N,ns(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),$(g,w)},y=g=>{var w=vs();O(()=>ve(w,e.item.label)),$(g,w)};V(v,g=>{e.item.valueComponent?g(b):g(y,!1)})}S(m),S(l),Xe(l,g=>o(o()[e.item.id]=g,!0),()=>{var g;return(g=o())==null?void 0:g[e.item.id]}),O((g,w)=>{var I;d=ne(l,1,"item",null,d,g),Ve(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Ve(l,"data-testid",e.item.id),p=ne(m,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),$(t,l),H()}Ge(["click","keydown"]);var ss={"quality-settings":100,"audio-language-settings":200,"playback-rate-settings":300,"subtitles-settings":400,"traffic-saving-settings":500,download:600,report:700,"copy-data":800,"save-trace-info":900,"debug-info":1e3};var qS=(t,e)=>{F_(t,e.returnFromSubMenu,e.closeSettingsMenu)},QS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},GS=(t,e)=>{Fd(t)&&(Nr(t),e.returnFromSubMenu())},YS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1l"> </p></li> <!></ul></div>'),jS={hash:"s-1l",code:".sub-menu.s-1l{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1l .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1l{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1l{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1l .items:where(.s-1l) .item.header:where(.s-1l){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1l .title:where(.s-1l){margin-left:8px}.sub-menu.s-1l .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1l .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1l .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1l .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1l .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1l .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1l .item .sublabel{font-size:12px;line-height:14px}.item.s-1l:not(.mobile) p:where(.s-1l),.sub-menu.s-1l .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function av(t,e){B(e,!0),G(t,jS);let[i,o]=Oe(),r=()=>x(p,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>j("aria_label_submenu_back")),u=h(e,"listRef",15);Nt(()=>{let Z=e.items.findIndex(oe=>oe.selected);u().children[Z+1].focus()});let m=_e(),p=m.ui.isFullscreen,v=m.ui.playerSize,b=q(void 0),y=q(0),g=q(0),w=f(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(g)-d()}px; overflow: auto;`),I=f(()=>Math.max(e.minWidth,n(y)));var C=YS();let N;var A=T(C);let E;A.__keydown=[qS,e];var P=T(A);let Q;P.__click=[QS,e],P.__keydown=[GS,e];var F=T(P);Rr(F,{direction:"left"});var z=k(F,2),X=T(z,!0);S(z),S(P),Xe(P,Z=>R(b,Z),()=>n(b));var se=k(P,2);yi(se,17,()=>e.items,wd,(Z,oe)=>{var J=Le(),Ce=ue(J);{var me=be=>{nv(be,{get item(){return n(oe)},get isMobile(){return l()}})},ee=(be,we)=>{{var ge=pe=>{rv(pe,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(be,pe=>{n(oe).type==="OPEN_SUB_MENU"&&pe(ge)},we)}};V(Ce,be=>{n(oe).type==="SELECT_VALUE"?be(me):be(ee,!1)})}$(Z,J)}),S(A),Xe(A,Z=>u(Z),()=>u()),S(C),O((Z,oe,J)=>{N=ne(C,1,"sub-menu menu s-1l",null,N,Z),Ve(C,"data-testid",`${e.id}-sub-menu`),Ke(C,`min-width: ${n(I)}px`),E=ne(A,1,"items s-1l",null,E,oe),Ke(A,n(w)),Q=ne(P,1,"item header back s-1l",null,Q,J),Ve(P,"aria-label",s()),ve(X,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Ln(P,"clientWidth",Z=>R(y,Z)),Ln(P,"clientHeight",Z=>R(g,Z)),$(t,C),H(),o()}Ge(["keydown","click"]);import{noop as XS}from"@vkontakte/videoplayer-shared/es2015";var ZS=(t,e)=>Du(t,e()),JS=(t,e)=>{t.stopPropagation(),e()()},eC=L('<div class="value s-1i"> </div>'),tC=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),iC={hash:"s-1i",code:".value.s-1i{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function lv(t,e){B(e,!0),G(t,iC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,XS),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=tC();let s;d.__click=[JS,o],d.__keydown=[ZS,o];var u=T(d),m=T(u);{var p=C=>{Ya(C,{get icon(){return e.icon}})},v=C=>{var N=Le();let A=f(()=>e.icon);var E=ue(N);Ni(E,()=>n(A),(P,Q)=>{Q(P,ns(a))}),$(C,N)};V(m,C=>{typeof e.icon=="string"?C(p):C(v,!1)})}S(u);var b=k(u,2),y=T(b,!0);S(b);var g=k(b,2);{var w=C=>{var N=Le();let A=f(r);var E=ue(N);Ni(E,()=>n(A),(P,Q)=>{Q(P,{})}),$(C,N)},I=C=>{var N=eC(),A=T(N,!0);S(N),O(()=>ve(A,e.value)),$(C,N)};V(g,C=>{r()?C(w):C(I,!1)})}S(d),Xe(d,C=>l(C),()=>l()),O(C=>{s=ne(d,1,"item",null,s,C),Ve(d,"aria-label",e.ariaLabel),Ve(d,"data-testid",e.id),ve(y,e.label)},[()=>({mobile:i()})]),$(t,d),H()}Ge(["click","keydown"]);import{noop as Sb}from"@vkontakte/videoplayer-shared/es2015";var oC=(t,e)=>{Bl(t,()=>e())},nC=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),rC=L('<img class="icon" aria-hidden="true"/>'),sC=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1k"> </div></li>'),aC={hash:"s-1k",code:".label.s-1k{overflow:hidden;text-overflow:ellipsis}"};function dv(t,e){B(e,!0),G(t,aC);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,Sb),r=h(e,"closeSettings",3,Sb),a=q(!1),l=()=>{R(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=sC();let u;s.__click=d,s.__keydown=[oC,d];var m=T(s),p=T(m);{var v=w=>{var I=Le(),C=ue(I);{var N=E=>{var P=nC();$(E,P)},A=E=>{var P=rC();O(()=>Ve(P,"src",e.icon)),at("error",P,l),Ma(P),$(E,P)};V(C,E=>{n(a)?E(N):E(A,!1)})}$(w,I)},b=w=>{var I=Le();let C=f(()=>e.icon);var N=ue(I);Ni(N,()=>n(C),(A,E)=>{E(A,{})}),$(w,I)};V(p,w=>{typeof e.icon=="string"?w(v):w(b,!1)})}S(m);var y=k(m,2),g=T(y,!0);S(y),S(s),O(w=>{var I;u=ne(s,1,"item",null,u,w),Ve(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Ve(s,"data-testid",e.id),ve(g,e.label)},[()=>({mobile:i()})]),$(t,s),H()}Ge(["click","keydown"]);import{noop as cC}from"@vkontakte/videoplayer-shared/es2015";var lC=L('<div class="toggle_wrap s-1p"><div></div> <div class="toggle-label s-1p"></div></div>'),dC={hash:"s-1p",code:'.toggle_wrap.s-1p{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1p{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1p:after{background-color:var(--toggle-color-off);border-radius:50%;content:"";float:left;height:15px;left:0;position:relative;top:-3px;transition:left .1s ease;width:15px}.toggle.on.s-1p:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1p{overflow:hidden}'};function cv(t,e){G(t,dC);let i=h(e,"enabled",3,!1);var o=lC(),r=T(o);let a;ui(2),S(o),O(l=>a=ne(r,1,"toggle s-1p",null,a,l),[()=>({on:i()})]),$(t,o)}var uC=(t,e,i)=>{U_(t,e(),o=>i()(o))},pC=(t,e,i)=>{t.stopPropagation(),e()(!i())},fC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),mC=L('<li role="menuitem" tabindex="0"><!></li>');function uv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,cC),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=mC();let s;d.__click=[pC,o,r],d.__keydown=[uC,r,o];var u=T(d);Ka(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,p)=>{var v=fC();let b;var y=T(v),g=T(y);{var w=E=>{Ya(E,{get icon(){return e.icon}})},I=E=>{var P=Le();let Q=f(()=>e.icon);var F=ue(P);Ni(F,()=>n(Q),(z,X)=>{X(z,{})}),$(E,P)};V(g,E=>{typeof e.icon=="string"?E(w):E(I,!1)})}S(y);var C=k(y,2),N=T(C,!0);S(C);var A=k(C,2);cv(A,{get enabled(){return r()}}),S(v),O(E=>{b=ne(v,1,"switch-wrapper",null,b,E),ve(N,e.label)},[()=>({mobile:i()})]),$(m,v)},$$slots:{default:!0}}),S(d),O(m=>{var p;s=ne(d,1,"item switch-item",null,s,m),Ve(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),$(t,d),H()}Ge(["click","keydown"]);import{isValidURL as BC,VideoQuality as Rb}from"@vkontakte/videoplayer-shared/es2015";var Cb=()=>{let t=q(ci([])),e=f(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{R(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{R(t,[],!0)}}};import{getVideoQualityLabel as vC}from"@vkontakte/videoplayer-shared/es2015";var gC=L('<div class="quality-icon s-1n"><!></div>'),hC=L('<div class="quality-label s-1n"><span> </span> <!></div>'),_C={hash:"s-1n",code:".quality-label.s-1n{position:relative}.quality.s-1n{font-size:13px;line-height:18px}.quality.sub.s-1n{opacity:.7}.quality-icon.s-1n{display:flex;padding-left:2px;position:absolute;right:0;top:0;transform:translateX(100%)}.quality-icon.s-1n svg{color:var(--blue-light)}"};function il(t,e){B(e,!0),G(t,_C);let i=h(e,"isSubCase",3,!1),o=f(()=>e.quality?vC(e.quality):""),r=f(()=>Wu(e.quality));var a=hC(),l=T(a);let d;var s=T(l,!0);S(l);var u=k(l,2);{var m=p=>{var v=gC();let b=f(()=>n(r));var y=T(v);Ni(y,()=>n(b),(g,w)=>{w(g,{})}),S(v),O(()=>Ve(v,"data-testid",`${n(o)}-icon`)),$(p,v)};V(u,p=>{n(r)&&!e.isMobile&&p(m)})}S(a),O(p=>{d=ne(l,1,"s-1n",null,d,p),ve(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),$(t,a),H()}import{VideoQuality as bC}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Tb}from"@vkontakte/videoplayer-core/es2015";var Ib=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Eb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Ib({quality:t,availableQualities:e});return i?t===Tb.INVARIANT?j("auto_quality_invariant"):j("auto_quality",{actual:o}):o},Pb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Tb.INVARIANT?i:`${i}${Ib({quality:t,availableQualities:e})}`:"...";var $C=L('<div class="menu-item-value-wrapper s-1s"><!></div>'),yC={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Xl(t,e){B(e,!0),G(t,yC);let[i,o]=Oe(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(m,"$isMobile$",i),d=_e(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,p=" · ",v=f(()=>e.prefix+(e.selected&&r()!==bC.INVARIANT?p:"")),b=f(()=>Pb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=$C(),g=T(y);let w=f(()=>e.selected?r():void 0);il(g,{get quality(){return n(w)},get label(){return n(b)},get isMobile(){return l()},isSubCase:!0}),S(y),$(t,y),H(),o()}var xC=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,r="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${r}|${a}`,"g")},wC={br:!0,span:!0},pv=(t,e={})=>{var d,s,u,m,p,v,b;if(!t)return t;let i=ke(ke({},wC),e),o=Object.keys(i);if(!o.length)return t;let r=xC(o),a=[],l=0;for(let y of t.matchAll(r)){let g=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((m=y.groups)==null?void 0:m.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+g.length;continue}let C=(p=y.groups)!=null&&p.childrenhtml?pv(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?g.replace(new RegExp((b=y.groups)==null?void 0:b.childrenhtml),()=>C||""):g;a.push(t.slice(l,I),N),l=I+g.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function _c(t,e){B(e,!1);let i=h(e,"message",8),o=pv(i());ho();var r=Le(),a=ue(r);{var l=d=>{var s=Le(),u=ue(s);Sd(u,()=>o),$(d,s)};V(a,d=>{o&&d(l)})}$(t,r),H()}var SC=L('<p class="quality-applies sublabel s-1r"><!></p>'),CC={hash:"s-1r",code:".quality-applies.s-1r{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function fv(t,e){B(e,!1),G(t,CC),ho();var i=SC(),o=T(i);let r=In(()=>j("quality_applience",{action:`<span>${j("quality_applience_action")}</span>`}));_c(o,{get message(){return n(r)}}),S(i),$(t,i),H()}var Ab=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:j("other_quality"),selected:o,valueComponent:Xl,valueComponentParams:{prefix:j("other_quality"),selected:o},children:"quality-other-settings"}},mv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:j("auto_quality_limit"),valueComponent:e?Xl:void 0,valueComponentParams:{prefix:j("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Lb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:fv,bottomBordered:!0,children:"quality-appliance"}),vv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"quality-high",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:j("high_quality"),valueComponent:t?Xl:void 0,valueComponentParams:{prefix:j("high_quality"),selected:i},sublabel:j("high_quality_description")}),gv=({labelWithQuality:t,appliesTo:e,selected:i},{toggleTrafficSaving:o})=>({id:"quality-traffic-saving",type:"SELECT_VALUE",value:"save_traffic",selectItem:()=>o(!0,e),selected:i,label:j("traffic_saving_quality"),valueComponent:t?Xl:void 0,valueComponentParams:{prefix:j("traffic_saving_quality"),selected:i},sublabel:j("traffic_saving_quality_description")});var rp=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),sp=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=ic(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return j("audio_stream_display_language_label",{language:r,label:o});{let s=rp(t,d);return j("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=rp(t,d);return j("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=rp(t,d);return j("audio_stream_display_language_index",{language:r,index:s})}}let a=rp(t,e);return j("audio_stream_display_unknown",{index:a})};var TC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:mv,selected:e&&!o&&!r||!1}),a.push({handler:gv,selected:o},{handler:vv,selected:r}),{title:j("submenu_quality"),id:"quality-settings",items:[Lb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Ab(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:j("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:il,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:j("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:mv,selected:((i=Tu())==null?void 0:i.type)==="auto_quality"},{handler:gv,selected:((o=Tu())==null?void 0:o.type)==="traffic_saving"},{handler:vv,selected:((r=Tu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:j("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:sp(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:j("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:j("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Rn?"sub_off":void 0}))})},Mb=({subMenuId:t,context:e})=>t?[TC[t](e)]:[];var IC=Ie('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function hv(t){Ze(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=IC();$(e,o)},$$slots:{default:!0}})}var EC=Ie('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function _v(t){Ze(t,{width:"18",height:"15",children:(e,i)=>{var o=EC();$(e,o)},$$slots:{default:!0}})}var PC=Ie('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function bv(t){Ze(t,{testId:"play-speed-icon",children:(e,i)=>{var o=PC();$(e,o)},$$slots:{default:!0}})}var kC=Ie('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function $v(t){Ze(t,{testId:"download-icon",children:(e,i)=>{var o=kC();$(e,o)},$$slots:{default:!0}})}var AC=Ie('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function yv(t){Ze(t,{testId:"report-icon",children:(e,i)=>{var o=AC();$(e,o)},$$slots:{default:!0}})}var LC=Ie('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function ap(t){Ze(t,{children:(e,i)=>{var o=LC();$(e,o)},$$slots:{default:!0}})}var MC=Ie('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function xv(t){Ze(t,{testId:"info-icon",children:(e,i)=>{var o=MC();$(e,o)},$$slots:{default:!0}})}var VC=L('<div class="menu-item-value-wrapper s-1t"><!></div>'),RC={hash:"s-1t",code:".menu-item-value-wrapper.s-1t{line-height:normal}"};function wv(t,e){B(e,!0),G(t,RC);let[i,o]=Oe(),r=()=>x(u,"$currentQuality$",i),a=()=>x(m,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),s=_e(),u=s.state.currentQuality$,m=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,b=f(()=>Eb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=VC(),g=T(y);il(g,{get quality(){return r()},get label(){return n(b)},get isMobile(){return d()}}),S(y),$(t,y),H(),o()}var OC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?j("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_quality",{actual:o}),icon:Gd,label:j("menu_quality"),value:e,valueComponent:wv,weight:ss["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ss["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:j("aria_label_submenu_traffic_saving"),icon:hv,label:j("menu_traffic_saving"),enabled:t,tooltipText:j("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=sp(t,e);return{id:"audio-tracks-settings",weight:ss["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_audio_languages",{actual:i}),icon:_v,label:j("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:ss["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_rate",{actual:i}),icon:bv,label:j("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ss["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_subtitle",{actual:t.displayValue}),icon:pa,iconProps:{type:"outline"},label:j("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ss.download,type:"CLICK",onClick:t,label:j("download_video_caption"),ariaLabel:j("aria_label_menu_download"),icon:$v}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ss.report,type:"CLICK",onClick:t,label:j("menu_report"),ariaLabel:`${j("menu_report")}. ${j("aria_label_new_tab_alert")}`,icon:yv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ss["copy-data"],type:"CLICK",onClick:t,label:j("menu_copy_debug"),ariaLabel:j("menu_copy_debug"),icon:ap,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ss["save-trace-info"],type:"CLICK",onClick:t,label:j("menu_save_debug"),ariaLabel:j("menu_save_debug"),icon:ap,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ss["debug-info"],type:"CLICK",onClick:t,ariaLabel:j("aria_label_menu_debug_overlay"),label:j("menu_debug_overlay"),icon:xv,isHiddenFor:["desktop"]})},Vb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>OC[r](e)),...i.map(r=>Qt(ke({},r),{isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Ua)};var HC=(t,e)=>{Ou(t,e)},FC=L('<div><div> </div> <div class="close s-s"></div></div>'),UC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),zC=L("<div><!> <!></div>"),WC={hash:"s-s",code:'.settings-menu-container.mobile.s-s{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-s ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-s .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-s .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-s .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-s .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-s .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-s .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-s{line-height:40px}.settings-menu.desktop.s-s{min-width:300px}.settings-menu-container.s-s .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-s .menu.mobile.hidden{display:none}.settings-menu-container.s-s .menu .item:not(.switch-item),.settings-menu-container.s-s .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-s .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-s .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-s .item:not(.switch-item),.settings-menu.s-s .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-s .item.mobile:not(.switch-item),.settings-menu.s-s .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-s .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-s .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-s .item.header.mobile:where(.s-s){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-s .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-s .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-s .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-s .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-s .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-s{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-s:after,.close.s-s:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-s:before{transform:rotate(45deg)}.close.s-s:after{transform:rotate(-45deg)}'};function bc(t,e){B(e,!0),G(t,WC);let[i,o]=Oe(),r=()=>x(He,"$settingsMenuVisible",i),a=()=>x(it,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Fe,"$debugPanelVisible",i),d=()=>x(ce,"$isMobile",i),s=()=>x(Te,"$playerSize",i),u=()=>x(xe,"$hasMpegSources$",i),m=()=>x(Ne,"$mobileNotReportControlHidden$",i),p=()=>x(ge,"$autoQualityLimitingAvailable$",i),v=()=>x(K,"$availableSubtitlesList$",i),b=()=>x(Re,"$isLiveWithPlaybackSpeed",i),y=()=>x(ee,"$availableAudioStreams$",i),g=()=>x(D,"$availablePlaybackRates$",i),w=()=>x(me,"$currentAudioStream$",i),I=()=>x(U,"$currentPlaybackRate$",i),C=()=>x(et,"$trafficSavingEnabled",i),N=()=>x(be,"$currentQuality$",i),A=()=>x(pe,"$isAutoQualityEnabled$",i),E=()=>x(Qe,"$currentSubtitle$",i),P=()=>x(wt,"$additionalSettingsMenuItems$",i),Q=()=>x(qe,"$isAutoQualityAvailable$",i),F=()=>x(we,"$availableQualities$",i),z=()=>x(Ee,"$highQualityEnabled",i),X=h(e,"ref",15,void 0),se=h(e,"playerControlsHeight",3,0),Z=ci({}),oe=ci({}),J=_e(),Ce=Ot(),me=J.state.audioStream$,ee=J.state.availableAudioStreams$,be=J.state.currentQuality$,we=J.state.availableQualities$,ge=J.state.autoQualityLimitingAvailable$,pe=J.state.isAutoQualityEnabled$,qe=J.state.isAutoQualityAvailable$,U=J.state.currentPlaybackRate$,D=J.state.availablePlaybackRates$,Qe=J.state.currentSubtitle$,K=J.state.availableSubtitlesList$,ae=J.state.canDownload,xe=J.state.hasMpegSources$,He=J.ui.settingsMenu.visible$,it=J.ui.settingsMenu.openedByBtnKeyboard$,re=J.ui.settingsMenu.ref$,ce=J.ui.isMobile,Ne=J.ui.mobileNotReportControlHidden$,Re=J.state.canChangePlaybackSpeed$,et=J.state.trafficSavingEnabled$,Ee=J.state.highQualityEnabled$,Te=J.ui.playerSize,Fe=J.ui.debugPanelVisible,It=J.state.isInteractiveTime$,wt=J.ui.additionalSettingsMenuItems$,Mt=J.ui.t,lt=J.actions.internal.downloadVideo,Et=J.actions.internal.closeSettingsMenu,Jt=J.actions.internal.openSettingsSubMenu,Pt=J.actions.internal.closeSettingsSubMenu,Bt=q(!1),Wt=q(void 0),Y=Cb();De(()=>{!r()&&Y.current&&(Pt(oe[Y.current]),Y.popAllSubMenus())}),De(()=>{r()||R(Wt,void 0)}),De(()=>{!Y.current&&n(Wt)&&H_(Z,n(Wt))}),De(()=>{X()&&re.set(X())});function Pe(xt){return mt(this,null,function*(){var W;Y.pushSubMenu(xt),yield vo(),Jt(xt,oe[xt]);let Ht=(W=X())==null?void 0:W.firstElementChild;Ht&&Gf(Ht)})}function le(xt){var Ht;xt==null||xt.stopPropagation(),a()||(Ht=e.returnFocus)==null||Ht.call(e),Et(),R(Bt,!1)}function ye(xt,Ht){J.actions.internal.setQuality(xt,{appliesTo:Ht,byUser:!0}),le()}function Me(xt){J.actions.internal.setAudioStream(xt),le()}function rt(xt,Ht){J.actions.internal.setTrafficSavingEnabled(xt,Ht),Ce.features.qualityDetailsSubMenuEnabled&&le()}function kt(xt,Ht){J.actions.internal.setHighQualityEnabled(xt,Ht),le()}function fe(xt){J.actions.internal.setPlaybackRate(xt),le()}function Be(xt){J.actions.internal.setSubtitle(xt),le()}function We(){lt()}function yt(){BC(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function Kt(){Ol(J.actions.internal.getDebugTextData())}let At=()=>{let xt=J.actions.internal.getTraceTextData(),Ht=new Blob([...xt],{type:"application/json"}),W=window.URL.createObjectURL(Ht);Oa(W,"vk_player_trace_info","json")};function mi(){Fe.set(!l())}function pi(){R(Bt,!0)}function Oi(){R(Bt,!1)}function Vt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-se()}px; overflow: auto;`}let vi=f(()=>ae&&u()&&!m()),$i=f(()=>Ce.features.trafficSaving&&!m()&&p()&&!Ce.features.qualityDetailsSubMenuEnabled),pt=f(()=>v().length>0&&!m()),Xt=f(()=>!!b()&&!m()),Di=f(()=>Ce.features.audioLanguages&&y().length>=2&&!m()),xi=f(()=>!m());Nt(()=>It.subscribe(xt=>{xt&&!d()&&!n(Bt)&&!a()&&le()}));let oi=f(()=>{let xt=[n(xi)&&"quality-settings",n(Di)&&"audio-tracks-settings",n(Xt)&&"playback-rate-settings",n(pt)&&"subtitles-settings",n($i)&&"traffic-saving-switch",n(vi)&&"download",Ce.showSupport&&"show-support","copy-data",Ce.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ht=>!!Ht);return Vb({items:xt,context:{qualityDetailsSubMenuEnabled:Ce.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:g(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:fe,trafficSavingEnabled:C(),toggleTrafficSaving:rt,currentQuality:N()||Rb.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:We,onCopyDataClick:Kt,onReportProblemClick:yt,onSaveTraceDataClick:At,toggleShowDebugInfo:mi},additionalSettingsMenuItems:P()})}),gt=f(()=>Mb({subMenuId:Y.current,context:{availablePlaybackRates:g(),selectPlaybackRate:fe,trafficSavingEnabled:C(),toggleTrafficSaving:rt,currentQuality:N()||Rb.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:F(),highQualityEnabled:z(),toggleHighQuality:kt,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:Et,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:Me,selectQuality:ye,selectSubtitle:Be}}));var Ye=zC();let gi;var go=T(Ye);{var Xo=xt=>{var Ht=UC();let W;Ht.__keydown=[HC,Et];var Rt=T(Ht);{var li=ht=>{var nt=FC();let Bi;var Li=T(nt),fn=T(Li,!0);S(Li);var mn=k(Li,2);mn.__click=le,S(nt),O((Mi,Hi)=>{Bi=ne(nt,1,"item header s-s",null,Bi,Mi),ve(fn,Hi)},[()=>({mobile:d()}),()=>Mt("submenu_settings")]),$(ht,nt)};V(Rt,ht=>{d()&&ht(li)})}var ft=k(Rt,2);let ei;yi(ft,21,()=>n(oi),ht=>ht.id,(ht,nt)=>{var Bi=Le(),Li=ue(Bi);{var fn=Mi=>{lv(Mi,{get isMobile(){return d()},get id(){return n(nt).id},get icon(){return n(nt).icon},get iconProps(){return n(nt).iconProps},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get value(){return n(nt).value},get valueComponent(){return n(nt).valueComponent},onClick:()=>{Pe(n(nt).children),R(Wt,n(nt).id,!0)},get ref(){return Z[n(nt).id]},set ref(Hi){Z[n(nt).id]=Hi}})},mn=(Mi,Hi)=>{{var Nn=ro=>{let ki=f(()=>`${n(nt).id}-menu-item`);dv(ro,{get isMobile(){return d()},get id(){return n(ki)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},closeSettings:le})},bo=(ro,ki)=>{{var Vo=Ro=>{let vn=f(()=>`${n(nt).id}-menu-item`);uv(Ro,{get isMobile(){return d()},get id(){return n(vn)},get onClick(){return n(nt).onClick},get icon(){return n(nt).icon},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get enabled(){return n(nt).enabled},get tooltipText(){return n(nt).tooltipText},get maxTooltipWidth(){return n(nt).maxTooltipWidth}})};V(ro,Ro=>{n(nt).type==="SWITCH"&&Ro(Vo)},ki)}};V(Mi,ro=>{n(nt).type==="CLICK"?ro(Nn):ro(bo,!1)},Hi)}};V(Li,Mi=>{n(nt).type==="OPEN_SUB_MENU"?Mi(fn):Mi(mn,!1)})}$(ht,Bi)}),S(ft),Xe(ft,ht=>X(ht),()=>X()),S(Ht),O((ht,nt,Bi)=>{W=ne(Ht,1,"settings-menu menu s-s",null,W,ht),ei=ne(ft,1,"items",null,ei,nt),Ke(ft,Bi)},[()=>({desktop:!d(),mobile:d(),hidden:!!Y.current}),()=>({mobile:d()}),Vt]),at("mouseenter",Ht,pi),at("mouseleave",Ht,Oi),$(xt,Ht)};V(go,xt=>{r()&&xt(Xo)})}var Zo=k(go,2);yi(Zo,17,()=>n(gt),xt=>xt.id,(xt,Ht)=>{let W=f(()=>{var Rt;return(Rt=n(Ht).minWidth)!=null?Rt:137});av(xt,{get isMobile(){return d()},get playerControlsHeight(){return se()},get returnFromSubMenu(){return Y.popSubMenu},get id(){return n(Ht).id},get title(){return n(Ht).title},get closeSettingsMenu(){return Et},openSubMenuList:Pe,get items(){return n(Ht).items},get minWidth(){return n(W)},get refMenuItems(){return Z},get listRef(){return oe[n(Ht).id]},set listRef(Rt){oe[n(Ht).id]=Rt}})}),S(Ye),O(xt=>gi=ne(Ye,1,"settings-menu-container s-s",null,gi,xt),[()=>({mobile:d(),hidden:!r()})]),$(t,Ye),H(),o()}Ge(["keydown","click"]);var KC=L('<button class="btn s-12"> </button>'),qC={hash:"s-12",code:"button.btn.s-12{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function Sv(t,e){G(t,qC);var i=KC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);S(i),O(()=>ve(o,e.label)),$(t,i)}Ge(["click"]);var QC=L('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),GC={hash:"s-r",code:".container.s-r{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-r{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-r{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function $c(t,e){B(e,!0),G(t,GC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Ot(),{ui:{t:r}}=_e(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=QC(),d=T(l),s=T(d),u=T(s),m=T(u);_c(m,{get message(){return a}}),S(u);var p=k(u,2);{var v=y=>{let g=f(()=>r("slow_video_notification_button"));Sv(y,{get label(){return n(g)},get onClick(){return e.onSelectAutoQuality}})};V(p,y=>{o||y(v)})}S(s);var b=k(s,2);Ds(b,{get onClick(){return e.onClose}}),S(d),S(l),os(3,d,()=>ys,()=>({duration:i})),$(t,l),H()}import{isIntersecting as Nb,Subscription as YC}from"@vkontakte/videoplayer-shared/es2015";var ol="annotation",lp=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;return this.disabledIds.has(r)?{success:!1,message:"current slotId is disabled via config"}:(e.setAttribute("slot",ol),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1)),{success:!0})}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(r,a){return mt(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},m=new MutationObserver(b=>b.forEach(()=>{let y=Hs(d,this.shadowRootContainer);o.forEach(g=>{let w=s==null?void 0:s[g],I=w?$e(w):null,C=u==null?void 0:u[g];I&&(C==null||C.set(Nb(I,y)))})}));m.observe(d,{childList:!0,subtree:!0}),l.observer=m;let p=new YC;o.forEach(b=>{s&&p.add(s[b].subscribe(y=>{let g=u==null?void 0:u[b];y&&y.isDisplayed?g==null||g.set(Nb(y,Hs(d,this.shadowRootContainer))):g==null||g.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return mt(this,null,function*(){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,m;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(m=d==null?void 0:d.controlsToObserve)==null||m.forEach(p=>{var v,b;(b=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||b.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var jC=L('<div class="container s-5"><!></div>'),XC={hash:"s-5",code:".container.s-5{align-items:center;animation-fill-mode:forwards;animation-name:s-5-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-5-videoPlayerStatusIconPopup{0%{opacity:0;scale:.6}10%{animation-timing-function:ease-in;opacity:1;scale:1}75%{opacity:1;scale:1}90%{animation-timing-function:ease-out;opacity:0;scale:.4}to{opacity:0;scale:0}}"};function yc(t,e){B(e,!0),G(t,XC);let i=h(e,"reversed",3,!1);var o=Le(),r=ue(o);Vs(r,()=>e.Icon,a=>{var l=jC(),d=T(l);Ni(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>Ke(l,`animation-duration: ${e.duration}ms`)),$(a,l)}),$(t,o),H()}import{PlaybackState as Ob}from"@vkontakte/videoplayer-core/es2015";var ZC=L('<div class="container s-1a"><!></div>'),JC={hash:"s-1a",code:".container.s-1a{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function Cv(t,e){B(e,!0),G(t,JC);let[i,o]=Oe(),r=()=>x(s,"$playbackState$",i),a=()=>x(m,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:p}}=_e(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:b}=Ot(),y=0,g=q(null),w=q(!1);De(()=>{r()===Ob.PLAYING?R(g,Vn,!0):r()===Ob.PAUSED?R(g,zs,!0):R(g,null)}),De(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,R(g,null)},b),()=>{y&&(window.clearTimeout(y),y=0)}}),De(()=>{d()&&!n(w)&&(R(w,!0),R(g,null))});var I=Le(),C=ue(I);{var N=A=>{var E=ZC(),P=T(E);yc(P,{get duration(){return b},get Icon(){return n(g)}}),S(E),$(A,E)};V(C,A=>{n(g)&&v&&A(N)})}$(t,I),H(),o()}var eT=L('<div><div data-testid="video-container"></div></div>'),tT={hash:"s-d",code:".video-container.s-d,.video-wrapper.s-d{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-d{background:var(--black)}.video-container.s-d,.video-wrapper.s-d{z-index:var(--video-container-z-index)}.video-container.s-d{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-d{transition:none}.nocursor.s-d{cursor:none}"};function nl(t,e){B(e,!0),G(t,tT);let[i,o]=Oe(),r=()=>x(p,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(m,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),s=()=>x(b,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:m,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:b,chromecastConnected$:y}}=_e(),{isSmoothVideoRotate:g}=Ot(),w=f(()=>u()&&r()%180?a().height/a().width:1);var I=eT();let C;I.__contextmenu=function(...E){var P;(P=e.onContextMenu)==null||P.apply(this,E)},I.__mousedown=function(...E){var P;(P=e.onMouseDown)==null||P.apply(this,E)},I.__mouseup=function(...E){var P;(P=e.onMouseUp)==null||P.apply(this,E)},I.__click=function(...E){var P;(P=e.onClick)==null||P.apply(this,E)},I.__dblclick=function(...E){var P;(P=e.onDblClick)==null||P.apply(this,E)};var N=T(I);let A;Xe(N,E=>u(E),()=>u()),S(I),O((E,P)=>{C=ne(I,1,"video-wrapper s-d",null,C,E),A=ne(N,1,"video-container s-d",null,A,P),Ke(N,`transform: rotate(${r()}deg) scale(${n(w)})`),Ve(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!g})]),$(t,I),H(),o()}Ge(["contextmenu","mousedown","mouseup","click","dblclick"]);var iT=L('<div><span class="text s-1b"> </span> <!></div>'),oT={hash:"s-1b",code:".root.s-1b{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-1b,.root.visible.s-1b{transform:translateX(-50%)}.root.visible.s-1b{opacity:1;visibility:visible}.text.s-1b{font-size:13px;font-weight:600;line-height:16px}"};function Tv(t,e){B(e,!0),G(t,oT);let{ui:{t:i}}=_e();var o=iT();let r;var a=T(o),l=T(a,!0);S(a);var d=k(a,2);fc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((s,u)=>{r=ne(o,1,"root s-1b",null,r,s),ve(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),$(t,o),H()}var nT=L('<div class="container s-1e" role="button" data-testid="preview-track-overlay"><div class="icon s-1e"><!></div></div>'),rT={hash:"s-1e",code:".container.s-1e{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1e,.icon.s-1e{align-items:center;display:flex;justify-content:center}.icon.s-1e{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1e:hover .icon:where(.s-1e){transform:scale(1.15)}"};function Iv(t,e){B(e,!1),G(t,rT);let o=_e().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};ho();var l=nT();l.__click=a;var d=T(l),s=T(d);return Vn(s,{get size(){return"32"}}),S(d),S(l),os(3,l,()=>ys,()=>({duration:r})),$(t,l),_f(e,"handleClick",a),H({handleClick:a})}Ge(["click"]);var sT=L('<div class="container s-1h"><div class="notification s-1h"><span class="text s-1h"> </span></div></div>'),aT={hash:"s-1h",code:".container.s-1h{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-1h{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-1h{font-size:14px;font-weight:500;line-height:18px}"};function Ev(t,e){B(e,!1),G(t,aT);let{ui:{t:i}}=_e();ho();var o=sT(),r=T(o),a=T(r),l=T(a,!0);S(a),S(r),S(o),O(d=>ve(l,d),[()=>i("preview_track_notification_text")],In),os(3,r,()=>ys,()=>({duration:340})),$(t,o),H()}var lT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},dT=L("<div><!></div>"),cT=L('<div class="spherical-video-icon s-9"><!></div>'),uT=L("<div><!></div>"),pT=L('<div class="settings-menu s-9"><!></div>'),fT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),mT=L("<!> <!> <!>",1),vT=L('<div class="blocked s-9"></div>'),gT=L('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),hT={hash:"s-9",code:".blocked.s-9,.player-wrapper.s-9{height:100%;position:absolute;width:100%}.blocked.s-9{z-index:var(--overlay-container-z-index)}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-9{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function Pv(t,e){B(e,!0),G(t,hT);let[i,o]=Oe(),r=()=>x(Ur,"$notificationsToShow$",i),a=()=>x($i,"$playerPhase",i),l=()=>x(Xo,"$isLoaderVisible",i),d=()=>x(Oi,"$adPlaybackState",i),s=()=>x(ft,"$crashed",i),u=()=>x(Hi,"$isInteractiveTime$",i),m=()=>x(xi,"$settingsMenuVisible",i),p=()=>x(Nn,"$isInteractiveExpectation$",i),v=()=>x(Di,"$controlsVisible",i),b=()=>x(ro,"$touched",i),y=()=>x(as,"$graphIsOpened$",i),g=()=>x(pt,"$isFullscreen",i),w=()=>x(ir,"$autoplayNextEnabled$",i),I=()=>x(W,"$postrollPassed",i),C=()=>x(Zo,"$isEnded$",i),N=()=>x(bn,"$cursorInside",i),A=()=>x(gn,"$isControlsAvailable",i),E=()=>x(hr,"$doubleForwardOn$",i),P=()=>x(or,"$fakeIsPlaying$",i),Q=()=>x(Hn,"$bottomNoSmooth",i),F=()=>x(Or,"$interactiveTimeIndicator",i),z=()=>x(Li,"$playerSize",i),X=()=>x(fn,"$is3DVideo",i),se=()=>x(_r,"$doubleForwardAvailable$",i),Z=()=>x(gi,"$contextMenuVisible$",i),oe=()=>x(pi,"$playbackState$",i),J=()=>x(ki,"$hotKeyMapData",i),Ce=()=>x(gt,"$scrubbingInProgress",i),me=()=>x(Ye,"$volumeChangingInProgress",i),ee=()=>x(xt,"$chromecastConnected$",i),be=()=>x(Fn,"$controlsTimeoutActive",i),we=()=>x(oi,"$settingsMenuOpenedByKeyboard",i),ge=()=>x(To,"$contextMenuOpenedByKeyboard$",i),pe=()=>x(Uo,"$contextMenuOpenedByHotKey$",i),qe=()=>x(wn,"$contextMenuButtonRef$",i),U=()=>x(ar,"$contextMenuLastActiveElem$",i),D=()=>x(Xt,"$isFullscreenOpenedByKeyboard",i),Qe=()=>x(Ro,"$positionExact$",i),K=()=>x(mi,"$language$",i),ae=()=>x(Er,"$previewTrackActive$",i),xe=()=>x(mn,"$icon3DVideoVisible",i),He=()=>x(Ht,"$chromecastDeviceName$",i),it=()=>x(nt,"$currentSubtitle$",i),re=()=>x(Bi,"$currentSubtitleCaptions$",i),ce=()=>x(Vt,"$position$",i),Ne=()=>x(vi,"$duration$",i),Re=()=>x(Rt,"$isLive$",i),et=()=>x(li,"$isPlaying$",i),Ee=()=>x(Br,"$contextMenuPosition$",i),Te=()=>x(Jo,"$previewTrackNotificationVisible$",i),Fe=()=>x(Vo,"$showHotKeyMap",i),It=()=>x(go,"$debugPanelVisible",i),wt=()=>x(Fr,"$userActionsDisabled$",i),Mt=h(e,"videoContainer",15),lt=h(e,"adsSlotId",3,void 0),Et=h(e,"adsParams",3,void 0),Jt=h(e,"adsAutoplayParam",3,void 0),Pt=h(e,"duration",3,void 0),Bt=h(e,"logoTargetUrl",3,""),Wt=h(e,"showNextPrevButtons",3,!1),Y=h(e,"nextButtonActive",3,!1),Pe=h(e,"prevButtonActive",3,!1),le=h(e,"endScreenVideoTitle",3,void 0),ye=h(e,"endScreenVideoThumb",3,void 0),Me=h(e,"isOneVideoPlaylist",3,!1),rt=h(e,"shadowRootContainer",3,void 0),kt=h(e,"outerContainerRef",3,void 0),fe=h(e,"playerStarted",3,!1),Be=h(e,"fullScreenTarget",3,void 0),We=h(e,"showMiniTimer",3,!1),yt=h(e,"showEndScreen",3,!0),Kt=h(e,"keyboardControls",15),At=e.store.getLogger().createComponentLog("Root component"),mi=e.store.interfaceLanguage$,pi=e.store.state.playbackState$,Oi=e.store.ads.playbackState,Vt=e.store.state.positionWithScrubbing$,vi=e.store.state.duration$,$i=e.store.playerPhase,pt=e.store.ui.isFullscreen,Xt=e.store.ui.isFullscreenOpenedByKeyboard,Di=e.store.ui.controlsVisible,xi=e.store.ui.settingsMenu.visible$,oi=e.store.ui.settingsMenu.openedByBtnKeyboard$,gt=e.store.ui.scrubbingInProgress,Ye=e.store.ui.volumeChangingInProgress,gi=e.store.ui.contextMenu.visible$,go=e.store.ui.debugPanelVisible,Xo=e.store.state.isLoaderVisible,Zo=e.store.state.isEnded$,xt=e.store.state.chromecastConnected$,Ht=e.store.state.chromecastDeviceName$,W=e.store.ads.postrollPassed,Rt=e.store.state.isLive$,li=e.store.state.isPlaying$,ft=e.store.state.crashed$,ei=e.store.webApi.annotationsApi,ht=e.store.webApi.pictureInPictureApi,nt=e.store.state.currentSubtitle$,Bi=e.store.state.currentSubtitleCaptions$,Li=e.store.ui.playerSize,fn=e.store.ui.is3DVideo,mn=e.store.ui.icon3DVideoVisible,Mi=e.store.state.isInteractive,Hi=e.store.state.isInteractiveTime$,Nn=e.store.state.isInteractiveExpectation$,bo=e.store.state.hasInteractiveBranches,ro=e.store.ui.touched,ki=e.store.ui.modals.hotKeyMap.data,Vo=e.store.ui.modals.hotKeyMap.show,Ro=e.store.state.positionExact$,vn=e.store.ui.overlayContainer$,Or=e.store.ui.controls.interactiveTimeIndicator,Dr=e.store.state.showInteractiveTimeIndicator,Br=e.store.ui.contextMenu.position$,xs=e.store.actions.internal.setQuality,Hr=e.store.actions.internal.closeSettingsMenu,ir=e.store.ui.autoplayNextEnabled$,Fr=e.store.ui.userActionsDisabled,gn=e.store.ui.isControlsAvailable,hn=e.store.ui.videoTitleInfo,hr=e.store.ui.doubleForwardOn$,_r=e.store.ui.doubleForwardAvailable$,Jo=e.store.ui.previewTrackNotificationVisible,br=e.store.actions.internal.getVideoElement,$r=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:or,notifications$:On,graphIsOpened$:as}=_o(),No=q(void 0),yr=q(void 0),Fi=q(void 0),xr=q(void 0),Dn,ut,ti;ki.set(L_());let{closeNotification:wr,notificationsToShow$:Ur}=On,zr=f(()=>!!r().slow_video),Bn=()=>wr("slow_video"),nr=f(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),$o=q(void 0),Hn=de(!1),rr,Fn=de(!1),_n=de(),bn=de(!1),$n=q(!1),en=q(!1),Ui=q(!1),Zi=q(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),tn=f(()=>u()&&!m()&&!(n($n)||n(en))&&!(n(Ui)&&!p())),sr=!0,Sr=f(()=>e.uiConfig.features.thumbTimer&&We()&&a()==="video"&&!v()&&!s()&&!Mi&&(e.uiConfig.hideThumbTimerAfterTouch&&!b()||!e.uiConfig.hideThumbTimerAfterTouch)),yn=e.uiConfig.titleShowBehaviour,Cr=f(()=>!["video","thumb"].includes(a())||yn==="never"||y()?!1:yn==="fullscreen"?g():!0),dt=f(()=>yn==="always"||a()==="thumb"?!1:!v()),St=q(!1),so=f(()=>(yt()||e.showAutoplayNext&&w())&&!!le()&&!!ye()&&(e.showAds&&I()||!e.showAds)&&C()&&!s()&&!n(St)&&!bo),Oo=f(()=>N()&&!(v()||n(so))&&!u()&&A()&&!E()),yo=q(!1),on=f(()=>P()!==null),{toggle:ao}=or,xo=!1,Ei=null;ht==null||ht.setContext(ad());let Wr=()=>{e.autoplay&&!Mi&&e.uiConfig.controls.showOnStartupAtAutoplay&&zi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Wr});let Un=()=>{window.clearTimeout(Dn),Fn.set(!1)},ws=()=>{window.clearTimeout(ut),_n.set(null)},zi=he=>{Un(),Fn.set(!0),Dn=window.setTimeout(()=>Fn.set(!1),he);let _t=he-100;rr=window.setTimeout(()=>{Q()&&Hn.set(!1)},_t>0?_t:he)},Ss=(he,_t)=>{ws(),_n.set(_t),ut=window.setTimeout(()=>_n.set(null),he)},ls=fn.subscribe(he=>{mn.set(he),he&&(window.clearTimeout(ti),ti=window.setTimeout(()=>mn.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Tr=()=>mt(null,null,function*(){var _t,ii,jt,Eo;let he=aa();if(he){let co=Rd(),zo=nn();he=co===zo||co===rt()}if(he){zi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield ht==null?void 0:ht.exit()}catch(co){At({message:String(co)})}}pt.set(he),e.store.getAdmanWrapper().setFullscreen(he),g()?(ii=(_t=e.store.callbacks)==null?void 0:_t.onFullscreenEnter)==null||ii.call(_t):(Eo=(jt=e.store.callbacks)==null?void 0:jt.onFullscreenExit)==null||Eo.call(jt)}),Do=he=>{let{width:_t,height:ii}=he.target;Li.set({width:_t,height:ii})},Kr=()=>{let{width:he,height:_t}=n(No).getBoundingClientRect();Li.set({width:he,height:_t})};Nt(()=>{var _t;return Ru(Tr),e.uiConfig.features.annotationsInside&&(ei==null||ei.init(n(No))),Ha(ht)&&(ht==null||ht.assignPlayerContainer(n(No)),ht==null||ht.setExternalEventHandlers({resize:Do,leavepictureinpicture:Kr})),e.interactiveContainer&&((_t=Mt().parentElement)==null||_t.insertBefore(e.interactiveContainer,Mt().nextSibling)),()=>{window.clearTimeout(Dn),window.clearTimeout(rr),window.clearTimeout(ut),window.clearTimeout(ti),ls(),ht==null||ht.dispose().catch(ii=>{At({message:String(ii)})}),Nu(Tr)}});let nn=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!kt()?n(No):kt(),_t=he.getRootNode(),ii=_t instanceof ShadowRoot?_t.host:_t,jt=Be()instanceof HTMLElement&&Be().contains(ii);return e.uiConfig.allowChangingFullscreenTarget&&Be()&&jt?Be():he},rn=()=>{gi.set(!1)},Ue=()=>{Hr(),rn()},Ct=()=>mt(null,null,function*(){if(!$r()){At({message:"fullscreen disabled"});return}rn(),aa()?(yield Vu(document),At({message:"exit fullscreen"})):(At({message:"request fullscreen"}),yield Mu(nn()))}),fi=he=>{y()||(he.preventDefault(),gi.set(!0),Br.set({left:he.clientX,top:he.clientY}))};function Bo(){bn.set(!0),Mi||zi(e.uiConfig.controls.hideTimeoutCursor)}function wo(he){var Eo,co;let{relatedTarget:_t}=he,jt=!!(_t&&((Eo=n(Fi))!=null&&Eo.contains(_t)))&&((co=Kt())==null?void 0:co.isFocused());!Mi&&!jt&&(Hn.set(!0),zi(e.uiConfig.controls.hideTimeoutCursor))}function Ho(){bn.set(!1),R(en,!1),R($n,!1),xo=!1,e.store.actions.internal.releaseCamera(),zi(e.uiConfig.controls.hideTimeout),E()&&Fo()}function Wi(he){return he?he.offsetTop+Wi(he.offsetParent):0}function So(he){return he?he.offsetLeft+So(he.offsetParent):0}function zn(he){if(F()&&Dr){let _t=he.currentTarget,ii=Wi(_t),jt=So(_t),Eo=he.pageX-jt,co=he.pageY-ii,{left:zo,bottom:Es,right:Gr}=F(),Pr=Gr-zo;return Eo>=zo-Pr&&co<=Es+Pr}}function Ir(he){if(n(No)){let _t=Wi(he.currentTarget),ii=z().height,jt=he.pageY-_t;if(zn(he)){R(en,!1);return}jt<40?R(en,!0):jt>ii-40?R($n,!0):(R(en,!1),m()||R($n,!1))}}function Co(he){Ir(he),!n(tn)&&!E()&&zi(e.uiConfig.controls.hideTimeoutCursor),X()&&xo&&Ei&&e.store.actions.internal.moveCameraFocusPX(Ei.clientX-he.clientX,Ei.clientY-he.clientY,he.timeStamp-Ei.timeStamp),Ei=he}let lo=null,xn=()=>{lo=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Un()},e.uiConfig.doubleForwardActivationTime)},Fo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),lo&&clearTimeout(lo),lo=null},Wn=he=>{he.preventDefault(),he.button===0&&(xo=!0,e.store.actions.internal.holdCamera(),se()&&xn()),!xo&&zi(e.uiConfig.controls.hideTimeoutCursor)},qr=he=>{he.preventDefault(),he.button===0&&(Ei=he,xo=!1,e.store.actions.internal.releaseCamera()),!E()&&zi(e.uiConfig.controls.hideTimeoutCursor)},Qr=he=>{he.preventDefault(),sr&&(At({message:"double click on video"}),Ct(),zi(e.uiConfig.controls.hideTimeoutCursor))},Kn=he=>{var _t;if(he.preventDefault(),E()){Fo();return}if(lo&&Fo(),Z()||m()){Ue();return}if(!(C()&&!bo)){if(n(on))return ao();if((_t=Kt())==null||_t.focus(),!fe()){e.firstStart(),zi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||oe()!==Bb.PLAYING)&&e.store.actions.internal.togglePlay(),zi(e.uiConfig.controls.hideTimeoutCursor)}},Je=he=>{Ue(),ro.set(!0),zi(e.uiConfig.controls.hideTimeout),he&&Ss(e.uiConfig.controls.hideHotKeyHelpers,he)},Zt=()=>{var he,_t;Ue(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(_t=e.store.callbacks)==null||_t.onOpenHotKeyMap(J()):Vo.update(ii=>!ii)},wi=()=>{ro.set(!0)},To=e.store.ui.contextMenu.openedByBtnKeyboard$,wn=e.store.ui.contextMenu.btnRef$,qn=q(void 0),Uo=e.store.ui.contextMenu.openedByHotKey$,ar=e.store.ui.contextMenu.lastActiveElem$,ds=q(!1),Er=e.store.ui.previewTrackActive;De(()=>{vn.set(n($o))}),De(()=>{R(Ui,n(Zi)&&oe()!==Bb.PLAYING,!0),n(Zi)||Tt(()=>R(Zi,!0))}),De(()=>{var _t,ii;let he=(n(Ui)||C()||m()||Ce()||me()||ee()||be()||n(ds))&&!n(tn)&&(a()==="video"||a()==="ads")&&!s()&&A();Di.set(he),!he&&!be()&&((_t=n(Fi))!=null&&_t.contains(zu()))&&((ii=Kt())==null||ii.focus())}),De(()=>{!Ce()&&n(yo)&&!u()&&zi(e.uiConfig.controls.hideTimeoutCursor),Tt(()=>R(yo,Ce(),!0))}),De(()=>{n(xr),m(),we(),Tt(()=>Ud(n(xr),m(),we()))}),De(()=>{n(qn),Z(),ge(),pe(),Tt(()=>{let he=ge()||pe();Ud(n(qn),Z(),he)})}),De(()=>{let he=qe();he&&(Z(),Tt(()=>Dl(he,Z(),To)))}),De(()=>{let he=U();he&&(Z(),Tt(()=>B_(he,Z(),Uo)))}),De(()=>{var he;!D()&&g()&&(Tt(()=>Xt.set(!1)),(he=Kt())==null||he.focus())}),De(()=>{y()&&Ue()});let Cs=q(void 0),qs=he=>{hn.set(er(br(),{title:n(Cs)},"title",he))},va=(he,_t)=>{var co,zo;let ii=(zo=(co=e.store.callbacks)==null?void 0:co.uiInfo)==null?void 0:zo.onUpcomingLiveViewStateChanged;if(!ii)return;let jt=!!_t,Eo=ke(ke({},er(n(No),{upcomingLiveScreen:_t},"upcomingLiveScreen",jt)),he);ii(Eo)},st="",di=f(()=>{var he;return n(dt)?st:(he=e.getVideoDeeplink)==null?void 0:he.call(e,Qe())});De(()=>{st=n(di)});var Io=gT();at("blur",Pa,Ue);var Ci=ue(Io);Ci.__mousemove=Co;var Sn=T(Ci);let Cn=f(()=>a()==="ads"),Ts=f(()=>n(on)?ao:void 0);Xe(em(Sn,{startDoubleForwardActivationTimer:xn,stopDoubleForward:Fo,toggleFullscreen:Ct,hideContextMenu:Ue,showHotKeyHelpers:Je,showKeyMap:Zt,get isAds(){return n(Cn)},get fakePlayButtonHandler(){return n(Ts)},get nextButtonActive(){return Y()},get prevButtonActive(){return Pe()},children:(he,_t)=>{var ii=mT(),jt=ue(ii);nl(jt,{get hideCursor(){return n(Oo)},onClick:Kn,onContextMenu:fi,onMouseDown:Wn,onMouseUp:qr,onDblClick:Qr,get videoContainer(){return Mt()},set videoContainer(zo){Mt(zo)}});var Eo=k(jt,2);Ra(Eo,()=>"slot",!1,(zo,Es)=>{io(zo,()=>({name:ol}))});var co=k(Eo,2);Vs(co,K,zo=>{var Es=fT(),Gr=ue(Es);let Pr=f(()=>a()!=="thumb"||s()||Mi&&e.autoplay);el(Gr,{get hidden(){return n(Pr)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:fi,onClick:rn});var ga=k(Gr,2);{var Qs=ze=>{Iv(ze,{})};V(ga,ze=>{ae()&&ze(Qs)})}var ha=k(ga,2);Cv(ha,{});var Yr=k(ha,2);Tv(Yr,{get isVisible(){return E()}});var Tn=k(Yr,2);{var rl=ze=>{let bi=f(()=>{var uo;return(uo=e.live)==null?void 0:uo.startTime});gc(ze,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(bi)},onUpcomingLiveViewStateChanged:va,onContextMenu:fi,onClick:rn})};V(Tn,ze=>{a()==="LiveWaitingStart"&&ze(rl)})}var _a=k(Tn,2);{var jr=ze=>{tl(ze,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:fi,onClick:rn})};V(_a,ze=>{a()==="LiveWaitingRecover"&&ze(jr)})}var sl=k(_a,2);{var ed=ze=>{tl(ze,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:fi,onClick:rn})};V(sl,ze=>{a()==="LiveWaitingRecord"&&ze(ed)})}var ba=k(sl,2);{var td=ze=>{var bi=dT();let uo;var kr=T(bi);Od(kr,{get adsSlotId(){return lt()},get adsParams(){return Et()},get adsAutoplayParam(){return Jt()},get duration(){return Pt()},get adsExternalApi(){return e.adsExternalApi}}),S(bi),O(sn=>uo=ne(bi,1,"ads-container s-9",null,uo,sn),[()=>({hidden:a()!=="ads"})]),$(ze,bi)};V(ba,ze=>{e.showAds&&fe()&&ze(td)})}var al=k(ba,2);{var ll=ze=>{let bi=f(()=>!yt()&&e.showAutoplayNext&&w());Xf(ze,{get title(){return le()},get thumb(){return ye()},get isHide(){return n(bi)},clickCloseIcon:()=>R(St,!0)})};V(al,ze=>{n(so)&&le()&&ye()&&ze(ll)})}var $a=k(al,2);{var ct=ze=>{let bi=f(()=>g()?"md":"sm"),uo=f(()=>{var kr;return(kr=e.store.callbacks)==null?void 0:kr.onTitleClicked});tv(ze,{get title(){return e.title},get isHidden(){return n(dt)},onVisibilityChanged:qs,get titleLinkHref(){return n(di)},onMouseEnter:()=>{R(ds,!0)},onMouseLeave:()=>{R(ds,!1)},get size(){return n(bi)},get onTitleClicked(){return n(uo)},get ref(){return n(Cs)},set ref(kr){R(Cs,kr,!0)}})};V($a,ze=>{n(Cr)&&ze(ct)})}var ot=k($a,2);{var Ji=ze=>{let bi=f(()=>a()==="video"&&v());mc(ze,{get isShifted(){return n(bi)}})};V(ot,ze=>{X()&&ze(Ji)})}var Po=k(ot,2);{var eo=ze=>{var bi=cT(),uo=T(bi);Vd(uo,{}),S(bi),$(ze,bi)};V(Po,ze=>{xe()&&ze(eo)})}var _i=k(Po,2);{var qi=ze=>{vc(ze,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return He()},onClick:Kn,onContextMenu:fi,onDblClick:Qr})};V(_i,ze=>{ee()&&ze(qi)})}var Gs=k(_i,2);{var id=ze=>{Za(ze,{get shifted(){return v()},get captions(){return re()},get position(){return ce()},get playerSize(){return z()}})};V(Gs,ze=>{it().value!=="off"&&ze(id)})}var Mc=k(Gs,2);{var yp=ze=>{var bi=uT();bi.__contextmenu=fi,bi.__click=[lT,Z,gi,m,xi,Ue];var uo=T(bi);Ja(uo,{}),S(bi),$(ze,bi)};V(Mc,ze=>{s()&&ze(yp)})}var Vc=k(Mc,2);{var xp=ze=>{let bi=f(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),uo=f(()=>a()==="ads"),kr=f(()=>e.canRewindLive&&Ne()!==0);pc(ze,{get bottomHidden(){return n(bi)},get bottomNoSmooth(){return Q()},get showControls(){return v()},get isAds(){return n(uo)},get canRewindLive(){return n(kr)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Bt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Wt()},get nextButtonActive(){return Y()},get prevButtonActive(){return Pe()},get isOneVideoPlaylist(){return Me()},customFullscreenSupported:sr,toggleFullscreen:Ct,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(yr)},set playerControlsWrapperRef(sn){R(yr,sn,!0)},get playerControlsRef(){return n(Fi)},set playerControlsRef(sn){R(Fi,sn,!0)}})};V(Vc,ze=>{fe()&&ze(xp)})}var Rc=k(Vc,2);{var wp=ze=>{var bi=pT(),uo=T(bi);let kr=f(()=>{var sn;return(sn=n(Fi))==null?void 0:sn.clientHeight});bc(uo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(kr)},returnFocus:()=>{var sn;return(sn=Kt())==null?void 0:sn.focus()},get ref(){return n(xr)},set ref(sn){R(xr,sn,!0)}}),S(bi),$(ze,bi)};V(Rc,ze=>{!ee()&&a()!=="ads"&&ze(wp)})}var Nc=k(Rc,2);let Sp=f(()=>!n(Sr));Hd(Nc,{get isLive(){return Re()},get isHidden(){return n(Sp)},get isPlaying(){return et()},get position(){return ce()},get duration(){return Ne()}});var ya=k(Nc,2);Jm(ya,{get data(){return _n}});var Oc=k(ya,2);jf(Oc,{get supportLink(){return e.supportLink},returnFocus:()=>{var ze;return(ze=Kt())==null?void 0:ze.focus()},get visible(){return Z()},get playerContainerRef(){return n(No)},get position(){return Ee()},get menuElementRef(){return n(qn)},set menuElementRef(ze){R(qn,ze,!0)}});var Ys=k(Oc,2);{var dl=ze=>{$c(ze,{onClose:Bn,onSelectAutoQuality:()=>{xs("auto"),Bn()}})};V(Ys,ze=>{n(zr)&&ze(dl)})}var Dc=k(Ys,2);{var Bc=ze=>{Ev(ze,{})};V(Dc,ze=>{Te()&&ze(Bc)})}var cl=k(Dc,2);{var Hc=ze=>{Wa(ze,{})};V(cl,ze=>{n(nr)&&ze(Hc)})}var Fc=k(cl,2);{var Uc=ze=>{om(ze,{})};V(Fc,ze=>{Fe()&&ze(Uc)})}var Cp=k(Fc,2);{var Tp=ze=>{Kd(ze,{})};V(Cp,ze=>{It()&&ze(Tp)})}$(zo,Es)}),$(he,ii)},$$slots:{default:!0}}),he=>Kt(he),()=>Kt());var Is=k(Sn,2);Xe(Is,he=>R($o,he),()=>n($o)),S(Ci),Xe(Ci,he=>R(No,he),()=>n(No));var Ki=k(Ci,2);{var Pi=he=>{var _t=vT();$(he,_t)};V(Ki,he=>{wt()&&he(Pi)})}at("mouseenter",Ci,Bo),at("mouseleave",Ci,Ho),at("click",Ci,wi,!0),at("focusin",Ci,wo,!0),$(t,Io),H(),o()}Ge(["mousemove","contextmenu","click"]);import{clientChecker as xc,PlaybackState as IT}from"@vkontakte/videoplayer-core/es2015";import{noop as ET}from"@vkontakte/videoplayer-shared/es2015";var _T=L('<div></div> <div class="info s-q"><div class="triangles-wrapper s-q"><div></div> <div></div> <div></div></div> <p class="step-caption s-q"> </p></div>',1),bT=L("<div><!></div>"),$T={hash:"s-q",code:".double-click-area.s-q{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-q{left:0}.double-click-area.right.s-q{right:0}.semicircle.s-q{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-q{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-q{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-q{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-q,.triangles-wrapper.s-q{display:flex;justify-content:center}.triangles-wrapper.s-q{margin-bottom:10px;position:relative}.triangle.s-q{animation:s-q-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-q:nth-child(3),.triangle.right.s-q:first-child{animation-delay:0s}.triangle.left.s-q:nth-child(2),.triangle.right.s-q:nth-child(2){animation-delay:.1s}.triangle.left.s-q:first-child,.triangle.right.s-q:nth-child(3){animation-delay:.2s}@keyframes s-q-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-q{border-right:8px solid var(--white)}.triangle.right.s-q{border-left:8px solid var(--white)}.triangle.s-q:not(:last-child){margin-right:5px}.step-caption.s-q{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function dp(t,e){B(e,!0),G(t,$T);let i=h(e,"seekStep",3,0),o=q(!1),r=0,a=0,l=q(ci(i())),d=p=>{p.stopPropagation(),a+=1,R(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(R(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,R(o,!1)},300)};dn(()=>{window.clearTimeout(r)});var s=bT();s.__click=d;var u=T(s);{var m=p=>{var v=_T(),b=ue(v),y=k(b,2),g=T(y),w=T(g),I=k(w,2),C=k(I,2);S(g);var N=k(g,2),A=T(N,!0);S(N),S(y),O(E=>{var P,Q,F,z;ne(b,1,`semicircle ${(P=e.side)!=null?P:""}`,"s-q"),ne(w,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-q"),ne(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-q"),ne(C,1,`triangle ${(z=e.side)!=null?z:""}`,"s-q"),ve(A,E)},[()=>j("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),$(p,v)};V(u,p=>{n(o)&&p(m)})}S(s),O(()=>{var p;return ne(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-q")}),$(t,s),H()}Ge(["click"]);var yT=(t,e,i)=>{e(!1),i()},xT=L('<div class="overlay s-h"></div> <div class="next-video s-h"><div class="top s-h"><div class="caption s-h"> </div> <!></div> <div class="row s-h"><div class="column s-h"><div class="thumb s-h"><div></div> <!></div></div> <div class="column s-h"><div class="title s-h"> </div></div></div></div>',1),wT={hash:"s-h",code:".overlay.s-h{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-h{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-h{display:flex;justify-content:space-between}.caption.s-h{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-h{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-h{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-h{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-h,.thumb-overlay.s-h{height:100%;width:100%}.thumb-overlay.s-h{position:absolute}.thumb-overlay.withOpacity.s-h{background:var(--black);opacity:.3}.title.s-h{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function kv(t,e){B(e,!0),G(t,wT);let[i,o]=Oe(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=_e(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,m=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,b=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},g=()=>{e.clickCloseIcon(),b()};Nt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ue(w);{var C=N=>{var A=xT(),E=k(ue(A),2),P=T(E),Q=T(P),F=T(Q,!0);S(Q);var z=k(Q,2);Ds(z,{onClick:g}),S(P);var X=k(P,2);X.__click=[yT,u,p];var se=T(X),Z=T(se),oe=T(Z);let J;var Ce=k(oe,2);{var me=ge=>{qd(ge,{get isRunning(){return a()},onTimerEnded:y})};V(Ce,ge=>{r()&&ge(me)})}S(Z),S(se);var ee=k(se,2),be=T(ee),we=T(be,!0);S(be),S(ee),S(X),S(E),O((ge,pe)=>{ve(F,ge),Ke(Z,`background-image: url('${e.thumb}')`),J=ne(oe,1,"thumb-overlay s-h",null,J,pe),ve(we,e.title)},[()=>r()?j("end_screen_next_video"):j("end_screen_recommended_video"),()=>({withOpacity:r()})]),$(N,A)};V(I,N=>{e.isHide||N(C)})}$(t,w),H(),o()}Ge(["click"]);import{clientChecker as ST}from"@vkontakte/videoplayer-core/es2015";var Hb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Nt(()=>{ST.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let l=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",l),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",l),a.removeEventListener("webkitendfullscreen",d)}},0))}),dn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as CT}from"@vkontakte/videoplayer-core/es2015";var cp=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as TT}from"@vkontakte/videoplayer-core/es2015";var Fb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),m=()=>TT.device.isIOS&&$e(l)===CT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=b=>{if(p(),!m()||!b)return;let y=u();if(!y)return;let g=new cp(y),w=$e(d),I=$e(a),C=$e(r);for(let E of w)I.some(Q=>Q.value===E.id)&&g.attach(E,C.value===E.id);let N=d.subscribe(E=>{for(let P of E)g.updateSrc(P)}),A=()=>{let E=g.getCurrentShowingId();o($e(a).find(P=>P.value===E))};y.textTracks.addEventListener("change",A),s=()=>{N(),g.detachAll(),y.textTracks.removeEventListener("change",A)}};Nt(()=>i.subscribe(v)),dn(p)};var PT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},kT=L("<!> <!>",1),AT=L("<div><!></div>"),LT=L('<div class="spherical-video-icon s-8"><!></div>'),MT=L("<div><!></div>"),VT=L('<div class="settings-mobile s-8"><!></div>'),RT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),NT=L('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),OT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function Av(t,e){var yn,Cr;B(e,!0),G(t,OT);let[i,o]=Oe(),r=()=>x(Me,"$playerPhase",i),a=()=>x(pi,"$isLoaderVisible",i),l=()=>x(Pe,"$adPlaybackState",i),d=()=>x(oi,"$crashed",i),s=()=>x(xs,"$notificationsToShow$",i),u=()=>x(Y,"$playbackState$",i),m=()=>x(Pt,"$graphIsOpened$",i),p=()=>x(Be,"$interactiveHideMobileControls",i),v=()=>x(Oi,"$isEnded$",i),b=()=>x(ft,"$isInteractiveExpectation$",i),y=()=>x(kt,"$controlsVisible",i),g=()=>x(nt,"$touched",i),w=()=>x(Li,"$autoplayNextEnabled$",i),I=()=>x($i,"$postrollPassed",i),C=()=>x(Fr,"$bottomNoSmooth",i),N=()=>x(gi,"$videoSize",i),A=()=>x(xt,"$playerSize",i),E=()=>x(rt,"$isFullscreen",i),P=()=>x(le,"$position$",i),Q=()=>x(ye,"$duration$",i),F=()=>x(fn,"$loadedMetadata",i),z=()=>x(We,"$settingsMenuVisible",i),X=()=>x(Kt,"$scrubbingInProgress",i),se=()=>x(At,"$volumeChangingInProgress",i),Z=()=>x(Vt,"$chromecastConnected$",i),oe=()=>x(fe,"$isControlsAvailable",i),J=()=>x(li,"$isInteractiveTime$",i),Ce=()=>x(Di,"$isActiveLive",i),me=()=>x(yt,"$settingsMenuOpenedByKeyboard",i),ee=()=>x(Wt,"$language$",i),be=()=>x(ht,"$disabledControls$",i),we=()=>x(Ht,"$is3DVideo",i),ge=()=>x(W,"$icon3DVideoVisible",i),pe=()=>x(vi,"$chromecastDeviceName$",i),qe=()=>x(go,"$currentSubtitle$",i),U=()=>x(Xo,"$currentSubtitleCaptions$",i),D=()=>x(Zo,"$realDuration$",i),Qe=()=>x(pt,"$isLive$",i),K=()=>x(Xt,"$isPlaying$",i),ae=()=>x(mi,"$debugPanelVisible",i),xe=h(e,"videoContainer",15),He=h(e,"adsSlotId",3,void 0),it=h(e,"adsParams",3,void 0),re=h(e,"adsAutoplayParam",3,void 0),ce=h(e,"duration",3,void 0),Ne=h(e,"logoTargetUrl",3,""),Re=h(e,"showNextPrevButtons",3,!1),et=h(e,"nextButtonActive",3,!1),Ee=h(e,"prevButtonActive",3,!1),Te=h(e,"endScreenVideoTitle",3,void 0),Fe=h(e,"endScreenVideoThumb",3,void 0),It=h(e,"isOneVideoPlaylist",3,!1),wt=h(e,"showMiniTimer",3,!1),Mt=h(e,"fullScreenTarget",3,void 0),lt=h(e,"playerStarted",3,!1),Et=h(e,"showEndScreen",3,!0),{notifications$:Jt,graphIsOpened$:Pt}=_o(),Bt=e.store.getLogger().createComponentLog("Root component"),Wt=e.store.interfaceLanguage$,Y=e.store.state.playbackState$,Pe=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,ye=e.store.state.duration$,Me=e.store.playerPhase,rt=e.store.ui.isFullscreen,kt=e.store.ui.controlsVisible,fe=e.store.ui.isControlsAvailable,Be=e.store.ui.interactiveHideMobileControls,We=e.store.ui.settingsMenu.visible$,yt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Kt=e.store.ui.scrubbingInProgress,At=e.store.ui.volumeChangingInProgress,mi=e.store.ui.debugPanelVisible,pi=e.store.state.isLoaderVisible,Oi=e.store.state.isEnded$,Vt=e.store.state.chromecastConnected$,vi=e.store.state.chromecastDeviceName$,$i=e.store.ads.postrollPassed,pt=e.store.state.isLive$,Xt=e.store.state.isPlaying$,Di=e.store.state.isActiveLive$,xi=e.store.state.isRewindableLive$,oi=e.store.state.crashed$,gt=e.store.webApi.annotationsApi,Ye=e.store.webApi.pictureInPictureApi,gi=e.store.state.videoSize$,go=e.store.state.currentSubtitle$,Xo=e.store.state.currentSubtitleCaptions$,Zo=e.store.state.duration$,xt=e.store.ui.playerSize,Ht=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,Rt=e.store.state.isInteractive,li=e.store.state.isInteractiveTime$,ft=e.store.state.isInteractiveExpectation$,ei=e.store.state.hasInteractiveBranches,ht=e.store.ui.controls.disabledControls$,nt=e.store.ui.touched,Bi=e.store.ui.overlayContainer$,Li=e.store.ui.autoplayNextEnabled$,fn=e.store.state.loadedMetadata$,mn=e.store.actions.internal.closeSettingsMenu,Mi=(yn=e.store.callbacks)==null?void 0:yn.onDisabledPlayPrevChapterClick,Hi=(Cr=e.store.callbacks)==null?void 0:Cr.onDisabledSeekToInteractiveClick,Nn=e.store.actions.internal.setQuality,bo=q(void 0),ro=q(void 0),ki=q(void 0),Vo=q(void 0),Ro,vn,Or=f(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Dr=q(void 0),{closeNotification:Br,notificationsToShow$:xs}=Jt,Hr=f(()=>!!s().slow_video),ir=()=>Br("slow_video"),Fr=de(!1),gn,hn=q(!1),hr=f(()=>u()!==IT.PLAYING),_r=q(!1),Jo=f(()=>m()||p()||!n(hn)&&(v()&&!!ei||n(hr)&&b())),br=q(!0),$r=f(()=>e.uiConfig.features.thumbTimer&&wt()&&r()==="video"&&!y()&&!d()&&!Rt&&(e.uiConfig.hideThumbTimerAfterTouch&&!g()||!e.uiConfig.hideThumbTimerAfterTouch)),or=q(!1),On=f(()=>(Et()||e.showAutoplayNext&&w())&&!!Te()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(or)),as=q(!1);Ye==null||Ye.setContext(ad());let No=dt=>{dt&&!Rt&&Fi(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:No});let yr=()=>{clearTimeout(Ro),R(hn,!1),p()&&Be.set(!1)},Fi=dt=>{yr(),R(hn,!0),Ro=setTimeout(()=>R(hn,!1),dt);let St=dt-100;gn=setTimeout(()=>{C()&&Fr.set(!1)},St>0?St:dt)},xr=Ht.subscribe(dt=>{W.set(dt),dt&&(clearTimeout(vn),vn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Dn=(...St)=>mt(null,[...St],function*(dt=aa()){var so,Oo,yo,on,ao,xo;if(dt&&!xc.device.isIOS){let Ei=Rd(),Wr=Bn(),Un=xc.browser.isSamsungBrowser&&Ei===e.shadowRootContainer;dt=Ei===Wr||Un}if(dt){Fi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Ye==null?void 0:Ye.exit()}catch(Ei){Bt({message:String(Ei)})}try{let Ei=(so=N())!=null&&so.width&&((Oo=N())!=null&&Oo.height)?N():A();yield k_(Ei)}catch(Ei){Bt({message:String(Ei)})}}rt.set(dt),e.store.getAdmanWrapper().setFullscreen(dt),E()?(on=(yo=e.store.callbacks)==null?void 0:yo.onFullscreenEnter)==null||on.call(yo):(xo=(ao=e.store.callbacks)==null?void 0:ao.onFullscreenExit)==null||xo.call(ao)}),ut=dt=>{let St=dt,{width:so,height:Oo}=St.target;xt.set({width:so,height:Oo})},ti=()=>{let{width:dt,height:St}=n(bo).getBoundingClientRect();xt.set({width:dt,height:St})};Nt(()=>{var dt;return Ru(Dn),e.uiConfig.features.annotationsInside&&(gt==null||gt.init(n(bo))),Ha(Ye)&&(Ye==null||Ye.assignPlayerContainer(n(bo)),Ye==null||Ye.setExternalEventHandlers({resize:ut,leavepictureinpicture:ti})),R(br,!xc.device.isIphoneOrOldIpad),e.interactiveContainer&&((dt=xe().parentElement)==null||dt.insertBefore(e.interactiveContainer,xe().nextSibling)),()=>{clearTimeout(Ro),clearTimeout(gn),clearTimeout(vn),xr(),Ye==null||Ye.dispose().catch(St=>{Bt({message:String(St)})}),Nu(Dn)}});let wr=q(!0),Ur=q(!0),zr=dt=>{let St=P()+(dt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;St<0?(R(wr,!1),St=0):St>=Q()&&(R(Ur,!1),St=Q()),R(_r,!0),e.seekTime(St)},Bn=()=>xc.device.isIOS?n(bo):!e.uiConfig.allowChangingFullscreenTarget||!Mt()?e.outerContainerRef:Mt().contains(e.outerContainerRef)?Mt():e.outerContainerRef,nr=()=>mt(null,null,function*(){try{if(aa())yield Vu(document),Bt({message:"exit fullscreen"});else{if(Bt({message:"request fullscreen"}),xc.device.isIOS&&!F())return;yield Mu(Bn())}}catch(dt){Bt({message:String(dt)})}}),$o=()=>{mn()},Hn=dt=>{if(dt.preventDefault(),z()){$o();return}if(!lt()){e.firstStart(),Fi(e.uiConfig.controls.hideTimeoutCursor);return}R(_r,!1),y()?yr():Fi(e.uiConfig.controls.hideTimeoutMobile)},rr=()=>{nt.set(!0)},Fn=()=>{Rt||(Fr.set(!0),Fi(e.uiConfig.controls.hideTimeoutCursor))},_n=dt=>{Mi&&(Mi(dt),Fi(e.uiConfig.controls.hideTimeoutMobile))},bn=dt=>{Hi&&(Hi(dt),Fi(e.uiConfig.controls.hideTimeoutMobile))};De(()=>{Bi.set(n(Dr))}),De(()=>{kt.set((n(hr)||z()||X()||se()||Z()||!n(On)&&(v()||n(hn)&&!n(_r)))&&!n(Jo)&&r()==="video"&&!d()&&oe())}),De(()=>{!X()&&n(as)&&!J()&&Fi(e.uiConfig.controls.hideTimeoutMobile),R(as,X(),!0)}),De(()=>{R(wr,P()>0),R(Ur,!Ce()&&P()<Q(),!0)}),De(()=>{Ud(n(Vo),z(),me(),!0)});let $n=j("aria_label_video_player");Hb({fullScreenChangeHandler:Dn,getFullscreenTarget:Bn}),Fb({store:e.store,getFullscreenTarget:Bn});let en=(dt,St)=>{var on,ao;let so=(ao=(on=e.store.callbacks)==null?void 0:on.uiInfo)==null?void 0:ao.onUpcomingLiveViewStateChanged;if(!so)return;let Oo=!!St,yo=ke(ke({},er(n(bo),{upcomingLiveScreen:St},"upcomingLiveScreen",Oo)),dt);so(yo)};var Ui=NT();at("blur",Pa,$o);var Zi=T(Ui);nl(Zi,{onClick:Hn,get videoContainer(){return xe()},set videoContainer(dt){xe(dt)}});var tn=k(Zi,2);Ra(tn,()=>"slot",!1,(dt,St)=>{io(dt,()=>({name:ol}))});var sr=k(tn,2);Vs(sr,ee,dt=>{var St=RT(),so=ue(St);let Oo=f(()=>r()!=="thumb"||d()||Rt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);el(so,{get hidden(){return n(Oo)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var yo=k(so,2);{var on=Je=>{var Zt=kT(),wi=ue(Zt);{var To=Uo=>{let ar=f(()=>e.uiConfig.controls.seekStepMobile/1e3);dp(Uo,{side:"left",get seekStep(){return n(ar)},handleSingleFirstClick:Hn,handleSecondClick:()=>zr("backward")})};V(wi,Uo=>{n(wr)&&Uo(To)})}var wn=k(wi,2);{var qn=Uo=>{let ar=f(()=>e.uiConfig.controls.seekStepMobile/1e3);dp(Uo,{side:"right",get seekStep(){return n(ar)},handleSingleFirstClick:Hn,handleSecondClick:()=>zr("forward")})};V(wn,Uo=>{n(Ur)&&Uo(qn)})}$(Je,Zt)};V(yo,Je=>{e.canRewindLive&&xi&&!be().has("TIMELINE")&&Je(on)})}var ao=k(yo,2);{var xo=Je=>{let Zt=f(()=>{var wi;return(wi=e.live)==null?void 0:wi.startTime});gc(Je,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Zt)},onUpcomingLiveViewStateChanged:en})};V(ao,Je=>{r()==="LiveWaitingStart"&&Je(xo)})}var Ei=k(ao,2);{var Wr=Je=>{tl(Je,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V(Ei,Je=>{r()==="LiveWaitingRecover"&&Je(Wr)})}var Un=k(Ei,2);{var ws=Je=>{tl(Je,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(Un,Je=>{r()==="LiveWaitingRecord"&&Je(ws)})}var zi=k(Un,2);{var Ss=Je=>{var Zt=AT();let wi;var To=T(Zt);Od(To,{get adsSlotId(){return He()},get adsParams(){return it()},get adsAutoplayParam(){return re()},get duration(){return ce()},get adsExternalApi(){return e.adsExternalApi}}),S(Zt),O(wn=>wi=ne(Zt,1,"ads-container s-8",null,wi,wn),[()=>({hidden:r()!=="ads"})]),$(Je,Zt)};V(zi,Je=>{e.showAds&&lt()&&Je(Ss)})}var ls=k(zi,2);{var Tr=Je=>{let Zt=f(()=>!Et()&&e.showAutoplayNext&&w());kv(Je,{get title(){return Te()},get thumb(){return Fe()},get isHide(){return n(Zt)},clickCloseIcon:()=>R(or,!0)})};V(ls,Je=>{n(On)&&Te()&&Fe()&&Je(Tr)})}var Do=k(ls,2);{var Kr=Je=>{mc(Je,{})};V(Do,Je=>{we()&&Je(Kr)})}var nn=k(Do,2);{var rn=Je=>{var Zt=LT(),wi=T(Zt);Vd(wi,{}),S(Zt),$(Je,Zt)};V(nn,Je=>{ge()&&Je(rn)})}var Ue=k(nn,2);{var Ct=Je=>{vc(Je,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return pe()},onClick:Hn})};V(Ue,Je=>{Z()&&Je(Ct)})}var fi=k(Ue,2);{var Bo=Je=>{Za(Je,{get shifted(){return y()},get captions(){return U()},get position(){return P()},get playerSize(){return A()},isMobile:!0})};V(fi,Je=>{qe().value!=="off"&&Je(Bo)})}var wo=k(fi,2);{var Ho=Je=>{var Zt=MT();Zt.__click=[PT,z,We,$o];var wi=T(Zt);Ja(wi,{}),S(Zt),$(Je,Zt)};V(wo,Je=>{d()&&Je(Ho)})}var Wi=k(wo,2);{var So=Je=>{let Zt=f(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),wi=f(()=>r()==="ads"),To=f(()=>e.canRewindLive&&D()!==0);pc(Je,{get bottomHidden(){return n(Zt)},get showControls(){return y()},get bottomNoSmooth(){return C()},get isAds(){return n(wi)},get canRewindLive(){return n(To)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Ne()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Re()},get nextButtonActive(){return et()},get prevButtonActive(){return Ee()},get isOneVideoPlaylist(){return It()},get customFullscreenSupported(){return n(br)},get endScreenShown(){return n(On)},toggleFullscreen:nr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:_n,onDisabledSeekToInteractiveClick:bn,get playerControlsWrapperRef(){return n(ro)},set playerControlsWrapperRef(wn){R(ro,wn,!0)},get playerControlsRef(){return n(ki)},set playerControlsRef(wn){R(ki,wn,!0)}})};V(Wi,Je=>{lt()&&Je(So)})}var zn=k(Wi,2);{var Ir=Je=>{var Zt=VT(),wi=T(Zt);bc(wi,{get supportLink(){return e.supportLink},get returnFocus(){return ET},get ref(){return n(Vo)},set ref(To){R(Vo,To,!0)}}),S(Zt),$(Je,Zt)};V(zn,Je=>{z()&&Je(Ir)})}var Co=k(zn,2);let lo=f(()=>!n($r));Hd(Co,{get isLive(){return Qe()},get isHidden(){return n(lo)},get isPlaying(){return K()},get position(){return P()},get duration(){return Q()}});var xn=k(Co,2);{var Fo=Je=>{Wa(Je,{})};V(xn,Je=>{n(Or)&&Je(Fo)})}var Wn=k(xn,2);{var qr=Je=>{Kd(Je,{})};V(Wn,Je=>{ae()&&Je(qr)})}var Qr=k(Wn,2);{var Kn=Je=>{$c(Je,{onClose:ir,onSelectAutoQuality:()=>{Nn("auto"),ir()}})};V(Qr,Je=>{n(Hr)&&Je(Kn)})}$(dt,St)});var Sr=k(sr,2);Xe(Sr,dt=>R(Dr,dt),()=>n(Dr)),S(Ui),Xe(Ui,dt=>R(bo,dt),()=>n(bo)),O(()=>Ve(Ui,"aria-label",$n)),at("click",Ui,rr,!0),at("focusin",Ui,Fn,!0),$(t,Ui),H(),o()}Ge(["click"]);function up(t){let e="";return no(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),no(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),no(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),no(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),no(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),no(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),no(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),no(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),no(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),no(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),no(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),no(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),no(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),no(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),no(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),no(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),no(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),no(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),no(t.font)&&(e+=`--font:${t.font};`),no(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),no(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function no(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as DT}from"@vkontakte/videoplayer-shared/es2015";var BT=L('<div class="time-container s-7"><!></div>'),HT=L('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),FT={hash:"s-7",code:".player-wrapper.s-7{height:100%;position:absolute;width:100%}.player-wrapper.s-7 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-7{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-7{opacity:1}.time-container.s-7{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Lv(t,e){B(e,!0),G(t,FT);let[i,o]=Oe(),r=()=>x(J,"$scrubbingInProgress",i),a=()=>x(Z,"$playerSize",i),l=()=>x(P,"$isPlaying$",i),d=()=>x(A,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(C,"$playerPhase",i),m=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),v=()=>x(F,"$currentSubtitleCaptions$",i),b=()=>x(E,"$positionExact$",i),y=()=>x(X,"$isLive$",i),g=()=>x(se,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:C,state:{crashed$:N,duration$:A,positionExact$:E,isPlaying$:P,currentSubtitle$:Q,currentSubtitleCaptions$:F,positionWithScrubbing$:z,isLive$:X,isRewindableLive$:se},ui:{playerSize:Z,controls:oe,scrubbingInProgress:J},actions:{internal:{getVideoElement:Ce}}}=_e(),me=8,ee=q(!1),be=ci({}),we=q(!1),ge=f(()=>!r()&&!n(we)),pe=()=>{R(ee,!0)},qe=()=>{R(ee,!1)},U=DT(Gl,260);De(()=>{a(),U(Ce(),oe,be,n(ee))});let D=f(()=>l()?jo(d()-s()):jo(isFinite(d())?d():w()));var Qe=HT(),K=T(Qe);nl(K,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Te){I(Te)}});var ae=k(K,2);Ra(ae,()=>"slot",!1,(Te,Fe)=>{io(Te,()=>({name:ol}))});var xe=k(ae,2);let He=f(()=>u()!=="thumb"||m());el(xe,{get hidden(){return n(He)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=k(xe,2);{var re=Te=>{Za(Te,{shifted:!1,get captions(){return v()},get position(){return b()},get playerSize(){return a()}})};V(it,Te=>{p().value!=="off"&&n(ge)&&Te(re)})}var ce=k(it,2);{var Ne=Te=>{var Fe=BT(),It=T(Fe);Bd(It,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(D)}}),S(Fe),$(Te,Fe)};V(ce,Te=>{n(ge)&&Te(Ne)})}var Re=k(ce,2);let et;var Ee=T(Re);ja(Ee,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return g()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:me,tooltipRightOffset:me,get ref(){return be.timeline},set ref(Te){be.timeline=Te}}),S(Re),S(Qe),O(Te=>et=ne(Re,1,"timeline s-7",null,et,Te),[()=>({visible:n(ee)})]),at("mouseenter",Qe,pe),at("mouseleave",Qe,qe),at("mouseenter",Re,()=>R(we,!0)),at("mouseleave",Re,()=>R(we,!1)),$(t,Qe),H(),o()}var qT=L("<div><!></div>"),QT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Vv(t,e){B(e,!0),G(t,QT);let[i,o]=Oe(),r=()=>x(lt,"$isLive$",i),a=()=>x(gt,"$availableSubtitlesList$",i),l=()=>x(Ye,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),m=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),b=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),g=h(e,"interactiveController",7),w=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),C=h(e,"live",7),N=h(e,"preload",7),A=h(e,"autoplay",7),E=h(e,"volume",7,void 0),P=h(e,"muted",7,void 0),Q=h(e,"fromTime",7),F=h(e,"canRewindLive",7),z=h(e,"showAds",7),X=h(e,"adsSlotId",7,void 0),se=h(e,"adsParams",7,void 0),Z=h(e,"adsAutoplayParam",7,void 0),oe=h(e,"duration",7,void 0),J=h(e,"logoClickable",7),Ce=h(e,"logoHidden",7),me=h(e,"isMobile",7),ee=h(e,"showNextPrevButtons",7,!1),be=h(e,"nextButtonActive",7,!1),we=h(e,"prevButtonActive",7,!1),ge=h(e,"endScreenVideoTitle",7,void 0),pe=h(e,"endScreenVideoThumb",7,void 0),qe=h(e,"isOneVideoPlaylist",7,!1),U=h(e,"supportLink",7),D=h(e,"shadowRootContainer",7),Qe=h(e,"outerContainerRef",7),K=h(e,"fullScreenTarget",7,void 0),ae=h(e,"failoverHosts",7,void 0),xe=h(e,"showMiniTimer",7,!1),He=h(e,"saveRate",7),it=h(e,"seekToInteractive",7,Ub),re=h(e,"playPrevChapter",7,Ub),ce=h(e,"volumeMultiplier",7),Ne=h(e,"showAutoplayNext",7),Re=h(e,"showEndScreen",7,!0),et=h(e,"keyboardControls",15,void 0),{subscribers:Ee,stores:Te}=u();Oh(p());let Fe=Ot(),It=p().logoLink,wt=s().ui.debugPanelVisible,Mt=s().ui.playerSize,lt=s().state.isLive$,Jt=s().state.isInteractive&&Mv.device.isAndroid,Pt=q(void 0),Bt=null,Wt=q(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Qh(s(),Te),De(()=>{var W,Rt;s().ui.isMobile.set(me()),(Rt=(W=m().callbacks)==null?void 0:W.onDomReady)==null||Rt.call(W)});let Y=(W=!1)=>{R(Wt,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Pe=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let W=g_(s().videoId);if(W)switch(W.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,W.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,W.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(W.quality);break}}else{h_(s().videoId),Vf()&&s().actions.internal.setTrafficSavingEnabled(!0);let Rt=Af(s().videoId);Rt&&s().actions.internal.setQuality(Rt)}};function le(W){var ht,nt,Bi;let Rt=d()||W;Rt&&s().initVideo({container:n(Pt),sources:Rt,failoverHosts:ae(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:ce()});let li=zT.get(Pd)==="true";wt.set(li),Q()>0&&s().actions.external.seekTime(Q());let ft=me()?Fe.volumeDefault:(nt=(ht=E())!=null?ht:wu())!=null?nt:Fe.volumeDefault,ei=(Bi=P())!=null?Bi:c_();if(s().actions.external.setVolume(ft),s().actions.external.setMuted(ei),s().getAdmanWrapper().setInitialVolume(ei?0:ft),Pe(),Fe.features.saveRate&&He()){let Li=f_();Li&&!r()&&s().actions.internal.setPlaybackRate(Li)}if(Ne()){let Li=v_();Li&&s().actions.internal.setAutoplayNextEnabled(Li)}s().ui.isAutoplay.set(A()),A()&&Y(),N()&&Fe.features.preload&&s().actions.internal.preload()}let ye=W=>{if(window.ResizeObserver){let Rt,li;Bt=new ResizeObserver(WT(ft=>{let ei=ft[0];if(ei.contentBoxSize){let ht=Array.isArray(ei.contentBoxSize)?ei.contentBoxSize[0]:ei.contentBoxSize;Rt=ht.inlineSize,li=ht.blockSize}else ei.contentRect&&(Rt=ei.contentRect.width,li=ei.contentRect.height);Mt.set({width:Rt,height:li})},300)),Bt.observe(W)}W.clientWidth&&W.clientHeight&&Mt.set({width:W.clientWidth,height:W.clientHeight})},Me=()=>{document.hidden&&s().actions.external.stop()};Nt(()=>{var li,ft,ei,ht;Jt&&document.addEventListener("visibilitychange",Me),Fe.debugLog&&s().actions.internal.startLogging(),ye(n(Pt));let W=Ee.map(nt=>nt.init({store:s(),microStores:Te,config:m(),interactiveController:g(),uiConfig:p()})),Rt=()=>{Jt&&document.removeEventListener("visibilitychange",Me),Bt==null||Bt.disconnect(),W.forEach(nt=>nt.unsubscribe()),s().destroy()};return((li=C())==null?void 0:li.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Rt):((ft=C())==null?void 0:ft.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Rt):(((ei=C())==null?void 0:ei.status)==="finished"||((ht=C())==null?void 0:ht.status)==="postlive")&&!(d()&&UT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Rt):(le(),Rt)});function rt(){n(Wt)?s().actions.external.play():Y(!0)}function kt(){s().actions.external.pause()}function fe(W){s().actions.external.setMuted(W)}function Be(){s().actions.external.toggleSubtitle()}function We(W,Rt){s().actions.external.changeSubtitle(W,Rt)}function yt(W){s().actions.external.changeAudioStream(W)}function Kt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function At(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function mi(W){me()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function pi(W){s().actions.internal.seekTime(W,KT.UNKNOWN)}function Oi(W){s().actions.external.seekEpisodeStartTime(W)}function Vt(){s().actions.external.returnFocusToEpisodes()}function vi(W){s().actions.external.setPlaybackRate(W)}function $i(W){s().actions.external.setAutoQualityLimits(W)}function pt(){s().actions.external.setQuality("auto")}function Xt(W){s().actions.external.setTrafficSavingEnabled(W)}function Di(W){s().actions.external.setHighQualityEnabled(W)}let xi=up(Fe.view),oi=m().playerView==="preview",gt=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let W=!1;De(()=>{var Rt;if(!W&&a().length){W=!0;let li;if(Fe.features.userVideoPrefs&&s().videoId){let ei=Iu(Fe.userSalt,String(s().videoId));ei!=null&&ei.subtitleTrackId&&(li=a().find(ht=>ht.value===ei.subtitleTrackId))}let ft=(Rt=I())!=null?Rt:Nf();ft&&(li=a().find(ei=>ei.language===ft)),s().actions.internal.setSubtitle(li)}})}let Ye=s().ui.isPreviewTrackHorizontallyAligned;var gi=qT();let go;var Xo=T(gi);{var Zo=W=>{Av(W,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return z()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return Z()},get duration(){return oe()},get logoClickable(){return J()},get logoHidden(){return Ce()},get logoTargetUrl(){return It},get nextButtonActive(){return be()},get prevButtonActive(){return we()},get endScreenVideoTitle(){return ge()},get endScreenVideoThumb(){return pe()},get isOneVideoPlaylist(){return qe()},get supportLink(){return U()},get shadowRootContainer(){return D()},get outerContainerRef(){return Qe()},get fullScreenTarget(){return K()},get showMiniTimer(){return xe()},get playerStarted(){return n(Wt)},get seekToInteractive(){return it()},get playPrevChapter(){return re()},firstStart:Y,seekTime:pi,get showEndScreen(){return Re()},get showAutoplayNext(){return Ne()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Pt)},set videoContainer(Rt){R(Pt,Rt,!0)}})},xt=W=>{var Rt=Le(),li=ue(Rt);{var ft=ht=>{Lv(ht,{get thumbUrl(){return b()},get outsideDuration(){return oe()},get canRewindLive(){return F()},get videoContainer(){return n(Pt)},set videoContainer(nt){R(Pt,nt,!0)}})},ei=ht=>{Pv(ht,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return b()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return z()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return Z()},get duration(){return oe()},get logoClickable(){return J()},get logoHidden(){return Ce()},get logoTargetUrl(){return It},get nextButtonActive(){return be()},get prevButtonActive(){return we()},get endScreenVideoTitle(){return ge()},get endScreenVideoThumb(){return pe()},get isOneVideoPlaylist(){return qe()},get supportLink(){return U()},get shadowRootContainer(){return D()},get outerContainerRef(){return Qe()},get fullScreenTarget(){return K()},get showMiniTimer(){return xe()},get playerStarted(){return n(Wt)},get seekToInteractive(){return it()},get playPrevChapter(){return re()},firstStart:Y,get showEndScreen(){return Re()},get showAutoplayNext(){return Ne()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Pt)},set videoContainer(nt){R(Pt,nt,!0)},get keyboardControls(){return et()},set keyboardControls(nt){et(nt)}})};V(li,ht=>{oi?ht(ft):ht(ei,!1)})}$(W,Rt)};V(Xo,W=>{me()?W(Zo):W(xt,!1)})}S(gi),O(W=>{go=ne(gi,1,"vk-vp-root s-0",null,go,W),Ke(gi,xi)},[()=>({"root--miui-browser":Mv.device.isMobile&&Mv.browser.isMiuiBrowser,"visible-outside":oi,"preview-track-horizontally-alinged":l()})]),$(t,gi);var Ht=H({initVideo:le,play:rt,pause:kt,setMuted:fe,toggleSubtitle:Be,changeSubtitle:We,changeAudioStream:yt,hideControls:Kt,showControls:At,setVolume:mi,seekTime:pi,seekEpisodeStartTime:Oi,returnFocusToEpisodes:Vt,setPlaybackRate:vi,setAutoQualityLimits:$i,setAutoQuality:pt,toggleTrafficSaving:Xt,toggleHighQuality:Di,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return m()},set videoConfig(W){m(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return b()},set thumbUrl(W){b(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return g()},set interactiveController(W){g(W)},get subtitles(){return w()},set subtitles(W){w(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return C()},set live(W){C(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return A()},set autoplay(W){A(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return P()},set muted(W){P(W)},get fromTime(){return Q()},set fromTime(W){Q(W)},get canRewindLive(){return F()},set canRewindLive(W){F(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return X()},set adsSlotId(W){X(W)},get adsParams(){return se()},set adsParams(W){se(W)},get adsAutoplayParam(){return Z()},set adsAutoplayParam(W){Z(W)},get duration(){return oe()},set duration(W){oe(W)},get logoClickable(){return J()},set logoClickable(W){J(W)},get logoHidden(){return Ce()},set logoHidden(W){Ce(W)},get isMobile(){return me()},set isMobile(W){me(W)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(W){ee(W)},get nextButtonActive(){return be()},set nextButtonActive(W){be(W)},get prevButtonActive(){return we()},set prevButtonActive(W){we(W)},get endScreenVideoTitle(){return ge()},set endScreenVideoTitle(W){ge(W)},get endScreenVideoThumb(){return pe()},set endScreenVideoThumb(W){pe(W)},get isOneVideoPlaylist(){return qe()},set isOneVideoPlaylist(W){qe(W)},get supportLink(){return U()},set supportLink(W){U(W)},get shadowRootContainer(){return D()},set shadowRootContainer(W){D(W)},get outerContainerRef(){return Qe()},set outerContainerRef(W){Qe(W)},get fullScreenTarget(){return K()},set fullScreenTarget(W){K(W)},get failoverHosts(){return ae()},set failoverHosts(W){ae(W)},get showMiniTimer(){return xe()},set showMiniTimer(W){xe(W)},get saveRate(){return He()},set saveRate(W){He(W)},get showAutoplayNext(){return Ne()},set showAutoplayNext(W){Ne(W)},get seekToInteractive(){return it()},set seekToInteractive(W){it(W)},get playPrevChapter(){return re()},set playPrevChapter(W){re(W)},get volumeMultiplier(){return ce()},set volumeMultiplier(W){ce(W)},get showEndScreen(){return Re()},set showEndScreen(W){Re(W)},get keyboardControls(){return et()},set keyboardControls(W){et(W)}});return o(),Ht}var GT=Ie('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function Rv(t,e){let i=h(e,"isWhite",3,!1),o=f(()=>i()?"#fff":"#909499");Ze(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=GT();ui(9),$(r,l)},$$slots:{default:!0}})}var YT=L('<div class="title s-1"> </div>'),jT=L('<div class="playerStub s-1"><!> <!></div>'),XT={hash:"s-1",code:".playerStub.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Nv(t,e){G(t,XT);var i=jT(),o=T(i);{var r=d=>{var s=YT(),u=T(s,!0);S(s),O(()=>ve(u,e.title)),$(d,s)};V(o,d=>{e.title&&d(r)})}var a=k(o,2);{var l=d=>{let s=f(()=>!!e.thumbUrl);Rv(d,{get isWhite(){return n(s)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>Ke(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),$(t,i)}var ZT=L('<div class="playerError s-2"><!></div>'),JT={hash:"s-2",code:".playerError.s-2{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function Ov(t){G(t,JT);var e=ZT(),i=T(e);Ja(i,{}),S(e),$(t,e)}import{now as LI,ValueSubject as MI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as VI,InterfaceLanguage as RI,isNonNullable as Kv,Logger as NI,Observable as OI,Subscription as Xb,once as DI,InternalsExposure as BI,skip as HI,getPlayerId as FI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Zb,isMobile as UI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as zI,ThinOneStat as WI,MediascopePixel as KI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as eI,Subscription as tI}from"@vkontakte/videoplayer-shared/es2015";var pp=class{constructor(){this.subscription=new tI,this.logger=new eI,this.log=this.logger.createComponentLog("MediaSessionApi")}isSupported(){return"mediaSession"in navigator}setMetaData({title:e,artist:i="",thumbUrl:o=""}){this.isSupported()&&(navigator.mediaSession.metadata=new MediaMetadata({title:e,artist:i,artwork:[{src:o,sizes:"96x96",type:"image/png"},{src:o,sizes:"128x128",type:"image/png"},{src:o,sizes:"192x192",type:"image/png"},{src:o,sizes:"256x256",type:"image/png"},{src:o,sizes:"384x384",type:"image/png"},{src:o,sizes:"512x512",type:"image/png"}]}))}updateActionHandlers(e){this.resetActionHandlers(),this.setActionHandlers(e)}resetActionHandlers(){let e=[["play",null],["pause",null],["stop",null],["nexttrack",null],["previoustrack",null],["seekto",null],["seekbackward",null],["seekforward",null]];this.setActionHandlers(e)}setActionHandlers(e){var i,o;if(this.isSupported())for(let[r,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,r,a)}catch(l){throw new Error(`The media session action "${r}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,l;let o=$e(e.state.currentPlaybackRate$),r=$e(e.state.duration$);if(!(!isFinite(i)||!isFinite(r)))try{(l=(a=navigator.mediaSession).setPositionState)==null||l.call(a,{position:i,playbackRate:o,duration:r})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${r}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Hv,detectEmbed as aI}from"@vkontakte/videoplayer-shared/es2015";var iI=Ie('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),oI=L('<div><div><!></div> <span class="title s-6"> </span></div>'),nI={hash:"s-6",code:".player-pip-dummy.s-6{align-items:center;background-color:#19191a;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;width:100%}.player-pip-dummy.is-pip-api.s-6{position:relative}.dummy-image.s-6 svg{transform:scale(1.07143)}.dummy-image.desktop.s-6{transform:scale(1.07143) rotate(-90deg) rotateY(180deg)}.title.s-6{color:#fff;font-size:16px;padding:18px 20px 10px;text-align:center}"};function Dv(t,e){B(e,!0),G(t,nI);let[i,o]=Oe(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(m,"$isMobile$",i),l=_e(),d=Ot(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,p=l.ui.t,v=f(()=>r()&&p("pip_dummy_title")),b=up(d.view);var y=oI();let g;var w=T(y);let I;var C=T(w);Ze(C,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,P)=>{var Q=iI();ui(),$(E,Q)},$$slots:{default:!0}}),S(w);var N=k(w,2),A=T(N,!0);S(N),S(y),O((E,P)=>{g=ne(y,1,"player-pip-dummy s-6",null,g,E),Ke(y,b),I=ne(w,1,"dummy-image s-6",null,I,P),ve(A,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),$(t,y),H(),o()}var rI=Object.defineProperty,sI=(t,e,i)=>e in t?rI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Zl=(t,e,i)=>sI(t,typeof e!="symbol"?e+"":e,i),Bv=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),lI=460,dI=280,wc=class{constructor({enabled:e=!0}={enabled:!0}){Zl(this,"playerDomElement"),Zl(this,"playerParentShadowRoot"),Zl(this,"playerDummyElement"),Zl(this,"svelteContext"),Zl(this,"pipWindow"),Zl(this,"info",{isActive$:new Hv(!1),isEnabled$:new Hv(!1),type:1}),this.info.isEnabled$=new Hv(e)}isSupported(){let{isEmbed:e}=aI();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Bv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:lI,height:dI,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
63
+ `),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=ts(Dv,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Va(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Bv(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return Bv(this,null,function*(){yield this.exit()})}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function zb(t){return t instanceof wc}var fp=class{static getLatestSupportedVersion(e){let i=new Ba(e),o=new wc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Sc(t,e){var r,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let l of i)o[l]=(a=(r=e[l])!=null?r:t[l])!=null?a:void 0;return o}var Wb="Inner error. Unexpectedly root annotation container null reference exception",Kb="Annotation with such name already exists",qb="Annotation with such name does not exist";var Jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as cI,Subscription as uI,throttleFn as pI}from"@vkontakte/videoplayer-shared/es2015";var fI="1",mI=100,mp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new uI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=pI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},mI);this.subscriptions.add(cI(this.rootAnnotationsContainer).subscribe(({width:o,height:r})=>{this.playerSize={width:o,height:r},i()})),this.mutationObserver=new MutationObserver(i),this.mutationObserver.observe(this.rootAnnotationsContainer,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}add(e,i){var o;if(!this.rootAnnotationsContainer)throw new Jl(Wb);if(this.annotations.has(e))throw new Jl(Kb);i.style.zIndex=(o=i.style.zIndex)!=null?o:fI,i.style.position="absolute",this.rootAnnotationsContainer.append(i),this.annotations.set(e,i)}get(e){let i=this.annotations.get(e);if(!i)throw new Jl(qb);return i}remove(e){let i=this.get(e);this.annotations.delete(e)&&i.remove()}clear(){for(let e in this.annotations.keys())this.remove(e)}destroy(){var e;this.annotations.clear(),this.subscriptions.unsubscribe(),(e=this.mutationObserver)==null||e.disconnect(),this.rootAnnotationsContainer=null}isElementExceedsBoundaries(e,i,o){let r=e.offsetTop,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetHeight;return r<0||a<0||a+l>i||r+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as vp,Subscription as vI}from"@vkontakte/videoplayer-shared/es2015";var pn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return vp(e),vp(i),vp(r),r.interactiveData&&vp(o),this.subscription=new vI,this.subscription}};var Cc=class extends pn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Qt(ke({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Tc=class extends pn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Qt(ke({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:m}=a.ui,p=$e(m),v=()=>p&&$e(u);return o.add(u.subscribe(b=>{if(!p)return;let y=$e(l);$e(s)?this.state$.set(b):y!==null&&this.state$.set(!y||b)})),o.add(s.subscribe(b=>{this.state$.set(!b||v())})),o.add(l.subscribe(b=>{if(b===null)return;let y=$e(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!b)})),o}};var Ic=class extends pn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as gI}from"@vkontakte/videoplayer-shared/es2015";var Fv=de(!1),gp=null,Ec=class extends pn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Qt(ke({},Fv),{set:(i,o=!1)=>{i!==$e(Fv)&&(this.clearTimeout(),Fv.set(i),!i&&gp&&(gp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{$e(l)&&p&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(gI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:b})=>{var y,g;if(!(!p||!(b!=null&&b.isDisplayed))){if(!v)return this.state$.set(!1);m.tooltipHelpHintActive&&gp===null&&(gp=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(g=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||g.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as hI,noop as _I}from"@vkontakte/videoplayer-shared/es2015";var Pc=class extends pn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Qt(ke({},de(null)),{toggle:_I});this.checkIfShouldHide=i=>Bs(i,"s")}init(i){let o=super.init(i),{store:r,interactiveController:a}=i,l=r.ui.currentGridType$,d=r.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>mt(this,null,function*(){if(this.checkIfShouldHide($e(l)))return;let s=$e(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:p}=r.ui.controls,v=$e(u),b=$e(m);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(wf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=b==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(wf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(hI({graphIsOpened:this.state$,currentGridType:l}).subscribe(m=>mt(this,[m],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Qb}from"@vkontakte/videoplayer-shared/es2015";var kc=class extends pn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:de(!1),isEnabled$:de(!1),type$:de(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Qb(!1),isEnabled$:new Qb(!1)}};return o.add(a.subscribe(s=>{this.state$.isActive$.set(s)})),o.add(l.subscribe(s=>{this.state$.isEnabled$.set(s)})),this.state$.type$.set(d),o}};import{filter as yI,filterChanged as xI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Uv}from"@vkontakte/videoplayer-shared/es2015";var Gb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?bI({maxCount:t}):void 0,e!==0?$I({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},bI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Uv.set("videoplayer_notifications_manager_count",JSON.stringify((r=e[i])!=null?r:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},$I=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Uv.get(e)||"{}")}catch(a){return{}}},o=a=>Uv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Qt(ke({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Ac=class extends pn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:de({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Gb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(xI(),yI(m=>m)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Yb=()=>[Cc,Tc,Ic,Ec,Pc,kc,Ac].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Qt(ke({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Lc}from"@vkontakte/videoplayer-shared/es2015";var hp=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],o=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===i?(e.preventDefault(),o.focus()):!e.shiftKey&&r===o&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var _p=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new hp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var wI=L('<div class="root s-3"><!></div>'),SI={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function zv(t,e){B(e,!0),G(t,SI);let i=null,o=q(null);De(()=>(n(o)&&(i=window.setTimeout(()=>{R(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&R(o,s?"prev":"next",!0)}var a=Le(),l=ue(a);{var d=s=>{var u=Le(),m=ue(u);Vs(m,()=>n(o),p=>{var v=wI(),b=T(v);let y=f(()=>n(o)==="prev");yc(b,{get duration(){return e.animationDuration},get Icon(){return ma},get reversed(){return n(y)}}),S(v),$(p,v)}),$(s,u)};V(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return $(t,a),H({startVideoChangedAnimation:r})}import{getWindow as CI}from"@vkontakte/videoplayer-shared/es2015";var Wv=CI().HTMLElement||class{constructor(){this.isConnected=!1}};var TI=Object.defineProperty,II=Object.defineProperties,EI=Object.getOwnPropertyDescriptors,jb=Object.getOwnPropertySymbols,PI=Object.prototype.hasOwnProperty,kI=Object.prototype.propertyIsEnumerable,Qv=(t,e,i)=>e in t?TI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ks=(t,e)=>{for(var i in e||(e={}))PI.call(e,i)&&Qv(t,i,e[i]);if(jb)for(var i of jb(e))kI.call(e,i)&&Qv(t,i,e[i]);return t},AI=(t,e)=>II(t,EI(e)),Yt=(t,e,i)=>Qv(t,typeof e!="symbol"?e+"":e,i),bp=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),qI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:RI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:UI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},tr=q(void 0),qv=ci({animationDuration:0,playbackStatusShow:!1}),$p=class extends Wv{constructor(){super(),Yt(this,"svelteStubComponent"),Yt(this,"svelteRootComponent"),Yt(this,"sveltePersistentLayerComponent"),Yt(this,"svelteErrorComponent"),Yt(this,"store"),Yt(this,"microStoresRoot"),Yt(this,"statistics"),Yt(this,"sentry"),Yt(this,"_shadowRoot"),Yt(this,"playerContainer"),Yt(this,"rootContainer"),Yt(this,"stateContainer"),Yt(this,"shadowRootContainer"),Yt(this,"playerId"),Yt(this,"uiConfig"),Yt(this,"coreConfig"),Yt(this,"statisticsConfig"),Yt(this,"metaConfig"),Yt(this,"interactiveController"),Yt(this,"interactiveContainer"),Yt(this,"graphMadePause"),Yt(this,"currentPlayingVideoIndex",0),Yt(this,"needToRepeatPlaylist",!1),Yt(this,"videoConfig"),Yt(this,"pictureInPictureApi"),Yt(this,"mediaSessionApi"),Yt(this,"unsubscribePlayerPhaseSubscription"),Yt(this,"logger"),Yt(this,"log"),Yt(this,"subscription"),Yt(this,"interactiveSubscription"),Yt(this,"annotationsApi"),Yt(this,"slotsApi"),Yt(this,"focusManager"),Yt(this,"prevIsid"),Yt(this,"isInited",!1),Yt(this,"postponedInitParams",null),Yt(this,"internalsExposure",null),Yt(this,"shadowDOMCallbacksDisabled",!1),Yt(this,"fatalError$",new MI(null)),Yt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:p,refreshStatAuthToken:v,autoplay:b,isMobile:y,isTouch:g,refDomain:w,deviceId:I,interactiveData:C}=Sc(this.videoConfig,i),N=(o=C==null?void 0:C.projectInfo)==null?void 0:o.pid,A=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:P=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new zI(Ks({movieId:E,albumId:d,place:s,trackCode:m,vkAppId:p,autoplay:(l=b&&!this.interactiveController)!=null?l:!1,mobile:g!=null?g:y,clip:P,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||A)&&{projectId:Number(N)}),Ks({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(F){console.error(F),this.log({message:F.message})}}),Lc.create("ui"),this.logger=new NI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Xb,this.interactiveSubscription=new Xb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=ts(Ov,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ci({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=ts(Nv,l),this.sveltePersistentLayerComponent=ts(zv,{target:this.playerContainer,props:qv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;qv.animationDuration=e,qv.playbackStatusShow=i&&o}disconnectedCallback(){var e,i,o,r,a,l,d;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.slotsApi)==null||i.destroy(),(o=this.focusManager)==null||o.destroy(),(r=this.mediaSessionApi)==null||r.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.sveltePersistentLayerComponent),this.subscription.unsubscribe(),(a=this.unsubscribePlayerPhaseSubscription)==null||a.call(this),(l=this.interactiveController)==null||l.destroy(),this.interactiveSubscription.unsubscribe(),(d=this.internalsExposure)==null||d.destroy(),Lc.destroy("ui"))}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}needToShowNextPrevButtons(){return this.videoConfig?this.videoConfig.videos.length>1&&this.videoConfig.showNextPrevButtons:!1}isNextButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1||this.needToRepeatPlaylist):!1}isPrevButtonActive(){return this.videoConfig?this.needToShowNextPrevButtons()&&(this.currentPlayingVideoIndex>0||this.needToRepeatPlaylist):!1}isControlDisabled(e){var i;let o=(i=this.store)==null?void 0:i.ui.controls.disabledControls$;return(o==null?void 0:o.includes(e))||!1}getNextVideoInfo(){if(!this.videoConfig)return{nextVideoTitle:void 0,nextVideoThumb:void 0};let e=this.videoConfig.videos[this.currentPlayingVideoIndex+1]||{};return{nextVideoTitle:e.title,nextVideoThumb:e.thumbUrl}}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:o,preload:r,refreshStatAuthToken:a}=Sc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new WI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,m,p,v,b;if(!this.videoConfig)return;let{albumId:y,statPlace:g,statAuthToken:w,preload:I,autoplay:C,volume:N,muted:A,fromTime:E,canRewindLive:P,supportLink:Q,showAds:F,adsSlotId:z,adsParams:X={},adsAutoplayParam:se,interfaceLanguage:Z,isCyrillicRelatedInterface:oe,logoClickable:J,logoHidden:Ce,isMobile:me,isTouch:ee,isAudioDisabled:be,isLiveCatchUpMode:we,fullScreenTarget:ge,failoverHosts:pe,canDownload:qe,callbacks:U,interactiveData:D,showThumbTimer:Qe,additionalButtons:K=[],additionalSettingsMenuItems:ae=[],additionalContextMenuItems:xe=[],repeat:He,loop:it,saveRate:re,volumeMultiplier:ce,showEndScreen:Ne,showAutoplayNext:Re,mediascopePixels:et}=Sc(this.videoConfig,i),{sources:Ee,title:Te,thumbUrl:Fe,unitedVideoId:It,isClip:wt=!1,duration:Mt,adsParams:lt={},videoEpisodes:Et,previewThumbsData:Jt,subtitles:Pt,subtitlesForcedLanguage:Bt,live:Wt,adsExternalApi:Y}=e;if(!Ee&&!Wt){let vi=new Error("empty sources and live");this.fatalError$.next(vi),(r=U.onCrashed)==null||r.call(U,vi.message);return}let Pe=Ks(Ks({},X),lt),le=this.getNextVideoInfo(),ye={sources:Ee,title:Te,thumbUrl:Fe,subtitles:Pt,subtitlesForcedLanguage:Bt,unitedVideoId:It,isClip:wt,live:Wt,albumId:y,statPlace:g,autoplay:C,muted:A,volume:N,fromTime:E,canRewindLive:P,showAds:F,adsSlotId:z,adsParams:Pe,adsAutoplayParam:se,duration:Mt,logoClickable:J,logoHidden:Ce,isTouch:ee!=null?ee:me,repeat:He,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Me={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(ye)}`});let rt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),kt=(rt==null?void 0:rt.oneStat)||this.createOneStat(e,i),fe=this.createThinOneStat(e,i),Be;et&&(Be=new KI({pixels:et})),(kt||fe)&&(this.statistics=new Xu(kt,fe,Be,rt==null?void 0:rt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Da(this.uiConfig.sentry,{version:Vl,env:$u},{movieId:It,albumId:y,place:g,autoplay:(l=C&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:me,clip:wt}),this.interactiveController&&((u=this.prevIsid)!=null||(this.prevIsid=(s=(d=this.statistics)==null?void 0:d.oneStat)==null?void 0:s.isid$.getValue())),this.sentry=Ks(Ks({},this.sentry),Da.getInstance());let yt=!!D,Kt=[],At="tooltip_interactive_go_back_disabled_first";if(yt&&this.interactiveController){let vi=this.interactiveController.state.isInitialChapter$.getValue(),$i=this.interactiveController.getHistoryState();vi&&Kt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Kt.push("SEEK_TO_INTERACTIVE_BUTTON"),$i.hasPrevChapter$.getValue()||(Kt.push("PLAY_PREV_CHAPTER_BUTTON"),vi||($i.isGoBackLimited$.getValue()?At="tooltip_interactive_go_back_disabled_limit":At="tooltip_interactive_go_back_disabled"))}let mi=()=>{var vi;this.isInited=!1,this.prevIsid=void 0;let $i=(o==null?void 0:o.info.isEnded$.getValue())&&((vi=this.interactiveController)==null?void 0:vi.state.isEndChapter$.getValue());U.onReplayInteractiveVideo&&!$i?U.onReplayInteractiveVideo():this.replayInteractiveVideo()},pi=He&&this.videoConfig.videos.length===1;this.store=sb({player:o,interfaceLanguage:Z,isCyrillicRelatedInterface:oe,videoId:It,isClip:wt,isLiveCatchUpMode:we,isAudioDisabled:be,statAuthToken:w,callbacks:U,webApi:Me,videoEpisodes:Et,previewThumbsData:Jt,canDownload:qe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Kt,isInteractive:yt,saveRate:re,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:mi,playPrevChapterDisabledTooltip:At,hasInteractiveBranches:!!((b=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&b.length),additionalButtons:this.uiConfig.features.additionalButtons?K:[],additionalSettingsMenuItems:ae!=null?ae:[],additionalContextMenuItems:xe!=null?xe:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:vi=>{var $i;return($i=this.sveltePersistentLayerComponent)==null?void 0:$i.startVideoChangedAnimation(vi)},looped:this.uiConfig.features.useLoopSetting?it:pi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Oi}=this.microStoresRoot=Yb(),Vt=()=>{var vi,$i,pt,Xt,Di,xi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onCurrentFormatChanged)==null?void 0:Ye.call(U,gt)})),this.subscription.add(Oi.interactiveControlsOpacity$.subscribe(gt=>{var Ye;gt!==null&&((Ye=this==null?void 0:this.interactiveController)==null||Ye.setDisabledControls(gt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onThroughputEstimationChanged)==null?void 0:Ye.call(U,gt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onTrafficSavingEnabledChanged)==null?void 0:Ye.call(U,gt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onHighQualityEnabledChanged)==null?void 0:Ye.call(U,gt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onAutoQualityEnabledChanged)==null?void 0:Ye.call(U,!!gt)})),this.subscription.add(new OI(gt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ye=>gt.next(Ye)))}).pipe(HI(1)).subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onCurrentPlaybackRateChanged)==null?void 0:Ye.call(U,gt)})),this.subscription.add(this.store.state.volume$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onVolumeChange)==null?void 0:Ye.call(U,gt)})),this.subscription.add(this.store.state.muted$.subscribe(gt=>{var Ye,gi,go,Xo;if(gt)(Ye=U==null?void 0:U.onMute)==null||Ye.call(U);else{let Zo=(go=((gi=this.store)==null?void 0:gi.state.volume$)&&$e(this.store.state.volume$))!=null?go:0;(Xo=U==null?void 0:U.onUnmute)==null||Xo.call(U,Zo)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onVideoBitrateChanged)==null?void 0:Ye.call(U,gt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(gt=>{var Ye;let gi=(Ye=this.store)==null?void 0:Ye.ui.controls.disabledControls$;gi&&(gt&&!gi.includes(kd)&&gi.add(kd),gt||gi.remove(kd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(gt=>bp(this,null,function*(){var Ye;if(!Zb.browser.isSamsungBrowser||!gt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((Ye=this.videoConfig)==null?void 0:Ye.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(gt=>{var Ye;return(Ye=U==null?void 0:U.onVSIDChanged)==null?void 0:Ye.call(U,gt)})),this.initMediaSession(),R(tr,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ee,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Te,thumbUrl:Fe,subtitles:Pt,subtitlesForcedLanguage:Bt,live:Wt,preload:I,autoplay:C,muted:A,volume:N,fromTime:E,canRewindLive:P,supportLink:Q,showAds:F,adsSlotId:z,adsParams:Pe,adsAutoplayParam:se,duration:Mt,logoClickable:J,logoHidden:Ce,isMobile:ee!=null?ee:me,failoverHosts:pe,fullScreenTarget:ge,saveRate:re,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Qe,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:ce,showEndScreen:Ne,showAutoplayNext:Re,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let oi={target:this.playerContainer,props:n(tr)};this.svelteRootComponent=ts(Vv,oi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(pt=($i=(vi=this.videoConfig)==null?void 0:vi.callbacks)==null?void 0:$i.onInited)==null||pt.call($i)),(Xt=this.internalsExposure)==null||Xt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((xi=(Di=this.videoConfig)==null?void 0:Di.callbacks)!=null&&xi.onDevNullLog)?Lc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Lc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Zb.isInited$.subscribe(vi=>{vi&&(console.log("UI SDK async start"),Vt())}):Vt()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&Kv(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return bp(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?$e(s):this.videoConfig.interfaceLanguage,{projectInfo:m,initChapterId:p,historyApi:v,videoLoader:b}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:p,historyApi:v,vkVideoLoader:b,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:g}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(g.subscribe(I=>{if(!this.isInited)return;let C=this.store;I?C.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):C.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=AI(Ks({},I.config),{title:(m==null?void 0:m.title)||I.config.title});let C=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,C),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:C})=>{var N,A,E,P,Q,F;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&C==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Ad)),I==="action-choice-canceled"){let X=$e(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(A=this.videoConfig)!=null&&A.isMobile)&&X){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(P=this.videoConfig)==null?void 0:(Q=P.callbacks).onDisabledInteractiveClick)==null||F.call(Q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:C})=>{this.store&&I==="container-fake-removed"&&C&&this.store.ui.controls.disabledControls$.remove(Ad)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(C=>{var N,A,E;C.length&&((E=(A=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:A.onInteractiveHistoryChanged)==null||E.call(A,C))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var C,N,A;(A=(C=this.videoConfig)==null?void 0:(N=C.callbacks).onInteractiveChapterChanged)==null||A.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,C,N,A;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(A=(C=this.videoConfig)==null?void 0:(N=C.callbacks).onInteractiveTimeIndicatorClick)==null||A.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,m,p,v,b,y,g,w,I,C,N,A,E,P,Q,F,z,X,se;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let Z=new Error("empty videos");this.fatalError$.next(Z),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,Z.message);return}else this.fatalError$.next(null);if(this.videoConfig=Sc(qI,VI(e,Z=>Z instanceof Wv?Z:void 0)),this.playerId=FI(e.playerId),this.uiConfig=Nh((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new BI("ui",this.playerId))),Lc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((m=this.videoConfig)==null?void 0:m.showAds)],numbers:[LI()]}),Kv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Kv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=(b=this.uiConfig.features.pip)!=null?b:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(g=this.uiConfig.features.dpip)!=null?g:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride=Ks({preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(C=this.uiConfig.isMobile)!=null?C:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(A=this.videoConfig).autoplay&&(A.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(P=this.uiConfig.ads.slot)!=null?P:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((Q=this.uiConfig.showLogo)!=null?Q:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let Z={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=fp.getLatestSupportedVersion(Z):this.pictureInPictureApi=new Ba(Z)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new pp:void 0,this.slotsApi=this.uiConfig.features.slots?new lp(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new mp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new _p(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.interactiveController&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveSubscription.unsubscribe()),this.videoConfig.interactiveData?this.initInteractives():this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex]),zb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(se=this.slotsApi)==null||se.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(tr)&&(n(tr).showNextPrevButtons=this.needToShowNextPrevButtons(),n(tr).nextButtonActive=this.isNextButtonActive(),n(tr).prevButtonActive=this.isPrevButtonActive(),n(tr).endScreenVideoTitle=o.nextVideoTitle,n(tr).endScreenVideoThumb=o.nextVideoThumb,n(tr).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=Ks({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(tr)&&(n(tr).needToRepeatPlaylist=this.needToRepeatPlaylist,n(tr).showNextPrevButtons=this.needToShowNextPrevButtons(),n(tr).nextButtonActive=this.isNextButtonActive(),n(tr).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return bp(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return bp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=$e(this.store.state.positionExact$),l=$e(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(DI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Va(e)}};import{InterfaceLanguage as Mne,VKNumericLanguage as Vne,loadVKLangPack as Rne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as One,VideoFormat as Dne}from"@vkontakte/videoplayer-core/es2015";var Cne=()=>{window.customElements.define("vk-video-player",$p)};export{Zu as ControlButtonType,hs as GridTypes,Mne as InterfaceLanguage,zd as MenuItemType,_s as PlayerPhase,Vl as VERSION,Vne as VKNumericLanguage,Dne as VideoFormat,One as VideoQuality,Rne as loadVKLangPack,Cne as registerPlayerWebComponent};