@vkontakte/videoplayer 1.1.79-dev.f4244a7e.0 → 1.1.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +33 -33
- package/es2015.esm.js +33 -33
- package/es2018.cjs.js +35 -35
- package/es2018.esm.js +35 -35
- package/es2024.cjs.js +37 -37
- package/es2024.esm.js +37 -37
- package/esnext.cjs.js +37 -37
- package/esnext.esm.js +37 -37
- package/evergreen.esm.js +37 -37
- package/package.json +5 -5
- package/types/components/Menus/subMenuTabs/types.d.ts +0 -4
- package/types/components/Root/types.d.ts +1 -0
- package/types/config.d.ts +9 -0
- package/types/types/index.d.ts +2 -0
package/es2015.esm.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.79
|
|
3
|
-
* Thu,
|
|
2
|
+
* @vkontakte/videoplayer v1.1.79
|
|
3
|
+
* Thu, 04 Dec 2025 16:03:01 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-79/doc/
|
|
5
5
|
*/
|
|
6
|
-
var s$=Object.defineProperty,a$=Object.defineProperties;var l$=Object.getOwnPropertyDescriptors;var
|
|
6
|
+
var s$=Object.defineProperty,a$=Object.defineProperties;var l$=Object.getOwnPropertyDescriptors;var Yv=Object.getOwnPropertySymbols;var d$=Object.prototype.hasOwnProperty,c$=Object.prototype.propertyIsEnumerable;var jv=t=>{throw TypeError(t)};var Tp=(t,e,i)=>e in t?s$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ie=(t,e)=>{for(var i in e||(e={}))d$.call(e,i)&&Tp(t,i,e[i]);if(Yv)for(var i of Yv(e))c$.call(e,i)&&Tp(t,i,e[i]);return t},Gt=(t,e)=>a$(t,l$(e));var cr=(t,e,i)=>Tp(t,typeof e!="symbol"?e+"":e,i),Cp=(t,e,i)=>e.has(t)||jv("Cannot "+i);var Ri=(t,e,i)=>(Cp(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),dl=(t,e,i,o)=>(Cp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Xv=(t,e,i)=>(Cp(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 Zs="[",Js="[!",ya="]",rs={};var io=Symbol(),zn=Symbol("filename"),Zv=Symbol("hmr"),Jv="http://www.w3.org/1999/xhtml",Uc="http://www.w3.org/2000/svg";var Ip="@attach";var zc=!0;var tg,ig,eg=(ig=(tg=globalThis.process)==null?void 0:tg.env)==null?void 0:ig.NODE_ENV,Ee=eg&&!eg.toLowerCase().startsWith("prod");var ur=Array.isArray,og=Array.prototype.indexOf,id=Array.from,Ep=Object.keys,vo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Wc=Object.getOwnPropertyDescriptors,kp=Object.prototype,ng=Array.prototype,xa=Object.getPrototypeOf,Pp=Object.isExtensible;function ea(t){return typeof t=="function"}var gt=()=>{};function rg(t){return t()}function ta(t){for(var e=0;e<t.length;e++)t[e]()}var Yo=Symbol("$state"),cl=Symbol("legacy props"),sg=Symbol(""),Kc=Symbol("proxy path"),qc=1,ul=3,pr=8;function Qc(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 ag(t,e){return t!==e}function fl(t){return!pl(t,this.v)}function lg(){if(Ee){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
|
|
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 dg(t){if(Ee){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
|
|
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 cg(){if(Ee){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 ug(t){if(Ee){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
|
|
12
|
+
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function pg(){if(Ee){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
|
|
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 fg(){if(Ee){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
|
|
16
|
+
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function mg(){if(Ee){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 vg(t){if(Ee){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
|
|
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 gg(t){if(Ee){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
|
|
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 hg(t){if(Ee){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
|
|
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(Ee){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 bg(){if(Ee){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 $g(){if(Ee){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 ss=!1,as=!1;function yg(){ss=!0}var od=null;function Ss(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;vo(e,"stack",{value:r.join(`
|
|
25
|
-
`)}),vo(e,"name",{value:`${t}Error`})}return e}function
|
|
25
|
+
`)}),vo(e,"name",{value:`${t}Error`})}return e}function Qr(t,e){return t.label=e,Gc(t.v,e),t}function Gc(t,e){var i;return(i=t==null?void 0:t[Kc])==null||i.call(t,e),t}function ml(t){if(Ee){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
|
|
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 nd(t){Kt=t}var fr=null;function rd(t){fr=t}function vl(t){return Mp("getContext").get(t)}function gl(t,e){return Mp("setContext").set(t,e),e}function sd(){return Mp("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};ss&&!e&&(Kt.l={s:null,u:null,r1:[],r2:Mr(!1)}),Ro(()=>{o.d=!0}),Ee&&(Kt.function=i,fr=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=bt,o=Ot;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];go(a.effect),Wi(a.reaction),No(a.fn)}}finally{go(i),Wi(o)}}Kt=e.p,Ee&&(fr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function ls(){return!ss||Kt!==null&&Kt.l===null}function Mp(t){var e;return Kt===null&&ml(t),(e=Kt.c)!=null?e:Kt.c=new Map(p$(Kt)||void 0)}function p$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var f$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||Yo in t)return t;let e=xa(t);if(e!==kp&&e!==ng)return t;var i=new Map,o=ur(t),r=W(0),a=Ee&&as?Ss("CreatedAt"):null,l=Ot,d=v=>{var p=Ot;Wi(l);var f=v();return Wi(p),f};o&&i.set("length",W(t.length,a));var s="";function u(v){s=v,Qr(r,`${s} version`);for(let[p,f]of i)Qr(f,wa(s,p))}return new Proxy(t,{defineProperty(v,p,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&_g();var $=i.get(p);return $===void 0?$=d(()=>{var y=W(f.value,a);return i.set(p,y),Ee&&typeof p=="string"&&Qr(y,wa(s,p)),y}):O($,f.value,!0),!0},deleteProperty(v,p){var f=i.get(p);if(f===void 0){if(p in v){let g=d(()=>W(io,a));i.set(p,g),Vp(r),Ee&&Qr(g,wa(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(f,io),Vp(r)}return!0},get(v,p,f){var w;if(p===Yo)return t;if(Ee&&p===Kc)return u;var $=i.get(p),y=p in v;if($===void 0&&(!y||(w=Go(v,p))!=null&&w.writable)&&($=d(()=>{var T=ci(y?v[p]:io),I=W(T,a);return Ee&&Qr(I,wa(s,p)),I}),i.set(p,$)),$!==void 0){var g=n($);return g===io?void 0:g}return Reflect.get(v,p,f)},getOwnPropertyDescriptor(v,p){var f=Reflect.getOwnPropertyDescriptor(v,p);if(f&&"value"in f){var $=i.get(p);$&&(f.value=n($))}else if(f===void 0){var y=i.get(p),g=y==null?void 0:y.v;if(y!==void 0&&g!==io)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(v,p){var g;if(p===Yo)return!0;var f=i.get(p),$=f!==void 0&&f.v!==io||Reflect.has(v,p);if(f!==void 0||bt!==null&&(!$||(g=Go(v,p))!=null&&g.writable)){f===void 0&&(f=d(()=>{var w=$?ci(v[p]):io,T=W(w,a);return Ee&&Qr(T,wa(s,p)),T}),i.set(p,f));var y=n(f);if(y===io)return!1}return $},set(v,p,f,$){var A;var y=i.get(p),g=p in v;if(o&&p==="length")for(var w=f;w<y.v;w+=1){var T=i.get(w+"");T!==void 0?O(T,io):w in v&&(T=d(()=>W(io,a)),i.set(w+"",T),Ee&&Qr(T,wa(s,w)))}if(y===void 0)(!g||(A=Go(v,p))!=null&&A.writable)&&(y=d(()=>W(void 0,a)),O(y,ci(f)),i.set(p,y),Ee&&Qr(y,wa(s,p)));else{g=y.v!==io;var I=d(()=>ci(f));O(y,I)}var N=Reflect.getOwnPropertyDescriptor(v,p);if(N!=null&&N.set&&N.set.call($,f),!g){if(o&&typeof p=="string"){var k=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=k.v&&O(k,E+1)}Vp(r)}return!0},ownKeys(v){n(r);var p=Reflect.ownKeys(v).filter(y=>{var g=i.get(y);return g===void 0||g.v!==io});for(var[f,$]of i)$.v!==io&&!(f in v)&&p.push(f);return p},setPrototypeOf(){bg()}})}function wa(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:f$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Vp(t,e=1){O(t,t.v+e)}function hl(t){try{if(t!==null&&typeof t=="object"&&Yo in t)return t[Yo]}catch(e){}return t}function Rp(t,e){return Object.is(hl(t),hl(e))}function Gr(t){var e=2050,i=Ot!==null&&(Ot.f&2)!==0?Ot:null;bt===null||i!==null&&(i.f&256)!==0?e|=256:bt.f|=1048576;let o={ctx:Kt,deps:null,effects:null,equals:Qc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:bt};return Ee&&as&&(o.created=Ss("CreatedAt")),o}function m(t){let e=Gr(t);return Xc(e),e}function yn(t){let e=Gr(t);return e.equals=fl,e}function Yc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Ki(e[i])}}var Np=[];function m$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Bp(t){var e,i=bt;if(go(m$(t)),Ee){let o=Sa;Op(new Set);try{Np.includes(t)&&lg(),Np.push(t),Yc(t),e=jc(t)}finally{go(i),Op(o),Np.pop()}}else try{Yc(t),e=jc(t)}finally{go(i)}return e}function Fp(t){var e=Bp(t);if(t.equals(e)||(t.v=e,t.wv=ad()),!Ts){var i=(Cs||(t.f&256)!==0)&&t.deps!==null?4096:1024;xn(t,i)}}var Sa=new Set,_l=new Map;function Op(t){Sa=t}function Mr(t,e){var i={f:0,v:t,reactions:null,equals:Qc,rv:0,wv:0};return Ee&&as&&(i.created=e!=null?e:Ss("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function W(t,e){let i=Mr(t,e);return Xc(i),i}function ds(t,e=!1,i=!0){var r,a;let o=Mr(t);return e||(o.equals=fl),ss&&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;Ot!==null&&(!gr||(Ot.f&262144)!==0)&&ls()&&(Ot.f&262162)!==0&&!((r=Xo)!=null&&r[1].includes(t)&&Xo[0]===Ot)&&$g();let o=i?ci(e):e;return Ee&&Gc(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,Ee&&as&&(t.updated=Ss("UpdatedAt"),bt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Bp(t),xn(t,(t.f&256)===0?1024:4096)),t.wv=ad(),wg(t,2048),ls()&&bt!==null&&(bt.f&1024)!==0&&(bt.f&96)===0&&(vr===null?Sg([t]):vr.push(t)),Ee&&Sa.size>0){let o=Array.from(Sa);for(let r of o)(r.f&1024)!==0&&xn(r,4096),Ca(r)&&$l(r);Sa.clear()}}return e}function wg(t,e){var i=t.reactions;if(i!==null)for(var o=ls(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===bt)){if(Ee&&(d&262144)!==0){Sa.add(l);continue}xn(l,e),(d&1280)!==0&&((d&2)!==0?wg(l,4096):dd(l))}}}var yl="font-weight: bold",xl="font-weight: normal";function Tg(t,e,i){Ee?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`,xl
|
|
29
|
+
https://svelte.dev/e/hydration_attribute_changed`,yl,xl):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Cg(t){Ee?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`,xl
|
|
31
|
+
https://svelte.dev/e/hydration_html_changed`,yl,xl):console.warn("https://svelte.dev/e/hydration_html_changed")}function ia(t){Ee?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`,xl
|
|
33
|
+
https://svelte.dev/e/hydration_mismatch`,yl,xl):console.warn("https://svelte.dev/e/hydration_mismatch")}function Ig(){Ee?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`,xl
|
|
35
|
+
https://svelte.dev/e/lifecycle_double_unmount`,yl,xl):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function Eg(){Ee?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 Zc(t){Ee?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`,xl
|
|
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 ho(t){et=t}var $t;function Ti(t){if(t===null)throw ia(),rs;return $t=t}function qi(){return Ti(Zo($t))}function S(t){if(et){if(Zo($t)!==null)throw ia(),rs;$t=t}}function fi(t=1){if(et){for(var e=t,i=$t;e--;)i=Zo(i);$t=i}}function Ia(){for(var t=0,e=$t;;){if(e.nodeType===pr){var i=e.data;if(i===ya){if(t===0)return e;t-=1}else(i===Zs||i===Js)&&(t+=1)}var o=Zo(e);e.remove(),e=o}}function Jc(t){if(!t||t.nodeType!==pr)throw ia(),rs;return t.data}function kg(){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){Zc("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){Zc("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){Zc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ea,Pg,cd,Ag,Lg;function eu(){if(Ea===void 0){Ea=window,Pg=document,cd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Ag=Go(e,"firstChild").get,Lg=Go(e,"nextSibling").get,Pp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Pp(i)&&(i.__t=void 0),Ee&&(t.__svelte_meta=null,kg())}}function wn(t=""){return document.createTextNode(t)}function Ii(t){return Ag.call(t)}function Zo(t){return Lg.call(t)}function C(t,e){if(!et)return Ii(t);var i=Ii($t);if(i===null)i=$t.appendChild(wn());else if(e&&i.nodeType!==ul){var o=wn();return i==null||i.before(o),Ti(o),o}return Ti(i),i}function de(t,e){var r,a;if(!et){var i=Ii(t);return i.nodeType===8&&i.data===""?Zo(i):i}if(e&&((r=$t)==null?void 0:r.nodeType)!==ul){var o=wn();return(a=$t)==null||a.before(o),Ti(o),o}return $t}function L(t,e=1,i=!1){let o=et?$t:t;for(var r;e--;)r=o,o=Zo(o);if(!et)return o;if(i&&(o==null?void 0:o.nodeType)!==ul){var a=wn();return o===null?r==null||r.after(a):o.before(a),Ti(a),a}return Ti(o),o}function ud(t){t.textContent=""}function zp(t){bt===null&&Ot===null&&ug(t),Ot!==null&&(Ot.f&256)!==0&&bt===null&&cg(),Ts&&dg(t)}function v$(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(Ee)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(Ee&&(a.component_function=fr),i)try{$l(a),a.f|=32768}catch(u){throw Ki(a),u}else e!==null&&dd(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&&v$(a,r),Ot!==null&&(Ot.f&2)!==0)){var d=Ot;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Ro(t){let e=ka(8,null,!1);return xn(e,1024),e.teardown=t,e}function Oe(t){var r;zp("$effect");var e=bt!==null&&(bt.f&32)!==0&&Kt!==null&&!Kt.m;if(Ee&&vo(t,"name",{value:"$effect"}),e){var i=Kt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:bt,reaction:Ot})}else{var o=No(t);return o}}function md(t){return zp("$effect.pre"),Ee&&vo(t,"name",{value:"$effect.pre"}),Jo(t)}function ou(t){let e=ka(64,t,!0);return()=>{Ki(e)}}function Vg(t){let e=ka(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Qn(e,()=>{Ki(e),o(void 0)}):(Ki(e),o(void 0))})}function No(t){return ka(4,t,!1)}function Jo(t){return ka(8,t,!0)}function D(t,e=[],i=Gr){if(Ee)return Jo(()=>{var r=bt,a=()=>t(...l.map(n));vo(r.fn,"name",{value:"{expression}"}),vo(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 ka(24|e,t,!0)}function Ni(t,e=!0){return ka(40,t,!0,e)}function Wp(t){var e=t.teardown;if(e!==null){let i=Ts,o=Ot;Hp(!0),Wi(null);try{e.call(null)}finally{Hp(i),Wi(o)}}}function Kp(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 Rg(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),Kp(t,e&&!i),vd(t,0),xn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Wp(t);var r=t.parent;r!==null&&r.first!==null&&Qp(t),Ee&&(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:Zo(t);t.remove(),t=i}}function Qp(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 Qn(t,e){var i=[];nu(t,i,!0),Gp(i,()=>{Ki(t),e&&e()})}function Gp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function nu(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;nu(o,e,a?i:!1),o=r}}}function Es(t){Ng(t,!0)}function Ng(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;Ng(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var gd=[],Yp=[];function Og(){var t=gd;gd=[],ta(t)}function g$(){var t=Yp;Yp=[],ta(t)}function Sn(t){gd.length===0&&queueMicrotask(Og),gd.push(t)}function Dg(){gd.length>0&&Og(),Yp.length>0&&g$()}function Fg(t){var e=bt;if(Ee&&t instanceof Error&&h$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else hd(t,e)}function hd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Bg=new WeakSet;function h$(t,e){var l,d;if(Bg.has(t))return;Bg.add(t);let i=Go(t,"message");if(!(i&&!i.configurable)){for(var o=cd?" ":" ",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[
|
|
39
|
+
${o}in ${(d=a.function)==null?void 0:d[zn].split("/").pop()}`,a=a.p;vo(t,"message",{value:t.message+`
|
|
40
40
|
${r}
|
|
41
41
|
`}),t.stack&&vo(t,"stack",{value:t.stack.split(`
|
|
42
42
|
`).filter(s=>!s.includes("svelte/src/internal")).join(`
|
|
43
|
-
`)})}}var Ta=!1,Sl=null,Ia=!1,ws=!1;function Bp(t){ws=t}var _d=[],bd=[],Ot=null,_r=!1;function Ki(t){Ot=t}var _t=null;function go(t){_t=t}var Go=null;function jc(t){Ot!==null&&Ot.f&2097152&&(Go===null?Go=[Ot,[t]]:Go[1].push(t))}var In=null,br=0,hr=null;function xg(t){hr=t}var Hg=1,ru=0,Ss=!1,su=null;function ad(){return++Hg}function xa(t){var f,p;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&&!Ss,s=i.length;if(l||d){var u=t,m=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((f=a==null?void 0:a.reactions)!=null&&f.includes(u)))&&((p=a.reactions)!=null?p: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],xa(a)&&Dp(a),a.wv>t.wv)return!0}(!o||_t!==null&&!Ss)&&Sn(t,1024)}return!1}function Ug(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Go!=null&&Go[1].includes(t)&&Go[0]===Ot||((a.f&2)!==0?Ug(a,e,!1):e===a&&(i?Sn(a,2048):(a.f&1024)!==0&&Sn(a,4096),dd(a)))}}function Yc(t){var $,y;var e=In,i=br,o=hr,r=Ot,a=Ss,l=Go,d=Wt,s=_r,u=t.f;In=null,br=0,hr=null,Ss=(u&256)!==0&&(_r||!Ia||Ot===null),Ot=(u&96)===0?t:null,Go=null,nd(t.ctx),_r=!1,ru++,t.f|=2097152;try{var m=(0,t.fn)(),f=t.deps;if(In!==null){var p;if(vd(t,br),f!==null&&br>0)for(f.length=br+In.length,p=0;p<In.length;p++)f[br+p]=In[p];else t.deps=f=In;if(!Ss||(u&2)!==0&&t.reactions!==null)for(p=br;p<f.length;p++)((y=($=f[p]).reactions)!=null?y:$.reactions=[]).push(t)}else f!==null&&br<f.length&&(vd(t,br),f.length=br);if(us()&&hr!==null&&!_r&&f!==null&&(t.f&6146)===0)for(p=0;p<hr.length;p++)Ug(hr[p],t);return r!==null&&r!==t&&(ru++,hr!==null&&(o===null?o=hr:o.push(...hr))),m}catch(_){Dg(_)}finally{In=e,br=i,hr=o,Ot=r,Ss=a,Go=l,nd(d),_r=s,t.f^=2097152}}function _$(t,e){let i=e.reactions;if(i!==null){var o=tg.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&&(In===null||!In.includes(e))&&(Sn(e,4096),(e.f&768)===0&&(e.f^=512),Gc(e),vd(e,0))}function vd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)_$(t,i[o])}function yl(t){var e=t.f;if((e&16384)===0){Sn(t,1024);var i=_t,o=Ia;if(_t=t,Ia=!0,Ee){var r=vr;rd(t.component_function)}try{(e&16)!==0?Mg(t):zp(t),Up(t);var a=Yc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Hg,Ee&&cs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=ad(),l.set_during_effect=!1);Ee&&bd.push(t)}finally{Ia=o,_t=i,Ee&&rd(r)}}}function Bg(){console.error("Last ten effects were: ",bd.slice(-10).map(t=>t.fn)),bd=[]}function b$(){try{cg()}catch(t){if(Ee&&vo(t,"stack",{value:""}),Sl!==null)if(Ee)try{hd(t,Sl)}catch(e){throw Bg(),e}else hd(t,Sl);else throw Ee&&Bg(),t}}function Yp(){var t=Ia;try{var e=0;for(Ia=!0;_d.length>0;){e++>1e3&&b$();var i=_d,o=i.length;_d=[];for(var r=0;r<o;r++){var a=y$(i[r]);$$(a)}bl.clear()}}finally{Ta=!1,Ia=t,Sl=null,Ee&&(bd=[])}}function $$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&xa(o)&&(yl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Kp(o):o.fn=null))}}function dd(t){Ta||(Ta=!0,queueMicrotask(Yp));for(var e=Sl=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 y$(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:xa(i)&&yl(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 Cl(t){var e;for(t&&(Ta=!0,Yp(),Ta=!0,e=t());;){if(Ng(),_d.length===0)return Ta=!1,Sl=null,Ee&&(bd=[]),e;Ta=!0,Yp()}}function _o(){return mt(this,null,function*(){yield Promise.resolve(),Cl()})}function n(t){var e=t.f,i=(e&2)!==0;if(su!==null&&su.add(t),Ot!==null&&!_r){if(!(Go!=null&&Go[1].includes(t))||Go[0]!==Ot){var o=Ot.deps;t.rv<ru&&(t.rv=ru,In===null&&o!==null&&o[br]===t?br++:In===null?In=[t]:(!Ss||!In.includes(t))&&In.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,xa(r)&&Dp(r)),Ee&&cs&&!_r&&od!==null&&Ot!==null&&od.reaction===Ot)if(t.trace)t.trace();else{var l=xs("TracedAt");if(l){var d=od.entries.get(t);d===void 0&&(d={traces:[]},od.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 ws&&bl.has(t)?bl.get(t):t.v}function It(t){var e=_r;try{return _r=!0,t()}finally{_r=e}}var x$=-7169;function Sn(t,e){t.f=t.f&x$|e}function lu(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(qo in t)au(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&qo in i&&au(i)}}}function au(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{au(t[o],e)}catch(r){}let i=_a(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=zc(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,Tn(()=>{document.activeElement===i&&t.focus()})}}function $d(t){var e=Ot,i=_t;Ki(null),go(null);try{return t()}finally{Ki(e),go(i)}}var Xp=new Set,du=new Set;function Ea(t){if(!Je)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 Zp(t,e,i,o={}){function r(a){if(o.capture||Tl.call(e,a),!a.cancelBubble)return $d(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Tn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function gt(t,e,i,o,r){var a={capture:o,passive:r},l=Zp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Vo(()=>{e.removeEventListener(t,l,a)})}function tt(t){for(var e=0;e<t.length;e++)Xp.add(t[e]);for(var i of du)i(t)}function Tl(t){var T;var e=this,i=e.ownerDocument,o=t.type,r=((T=t.composedPath)==null?void 0:T.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){vo(t,"currentTarget",{configurable:!0,get(){return a||i}});var m=Ot,f=_t;Ki(null),go(null);try{for(var p,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var _=a["__"+o];if(_!=null&&(!a.disabled||t.target===a))if(fr(_)){var[S,...I]=_;S.apply(a,[t,...I])}else _.call(a,t)}catch(N){p?$.push(N):p=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(p){for(let N of $)queueMicrotask(()=>{throw N});throw p}}finally{t.__root=e,delete t.currentTarget,Ki(m),go(f)}}}var S$;function zg(){S$=void 0}function Il(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function No(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(Je)return No(bt,null),bt;r===void 0&&(r=Il(a?t:"<!>"+t),i||(r=Ei(r)));var l=o||cd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ei(l),s=l.lastChild;No(d,s)}else No(l,l);return l}}function I$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(Je)return No(bt,null),bt;if(!l){var d=Il(a),s=Ei(d);if(r)for(l=document.createDocumentFragment();Ei(s);)l.appendChild(Ei(s));else l=Ei(s)}var u=l.cloneNode(!0);if(r){var m=Ei(u),f=u.lastChild;No(m,f)}else No(u,u);return u}}function Ce(t,e){return I$(t,e,"svg")}function fs(t=""){if(!Je){var e=Cn(t+"");return No(e,e),e}var i=bt;return i.nodeType!==pl&&(i.before(i=Cn()),Ti(i)),No(i,i),i}function Le(){if(Je)return No(bt,null),bt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Cn();return t.append(e,i),No(e,i),t}function b(t,e){if(Je){_t.nodes_end=bt,Qi();return}t!==null&&t.before(e)}var E$=/\r/g;function Kg(t){t=t.replace(E$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function qg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var P$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Qg(t){return P$.includes(t)}var k$=["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 A$={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 Gg(t){var e;return t=t.toLowerCase(),(e=A$[t])!=null?e:t}var TP=[...k$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var L$=["touchstart","touchmove"];function Yg(t){return L$.includes(t)}var M$=["$state","$state.raw","$derived","$derived.by"],IP=[...M$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var V$=["textarea","script","style","title"];function jg(t){return V$.includes(t)}function cu(t){return t==null?void 0:t.replace(/\//g,"/")}var yd=!0;function uu(t){yd=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 Yr(t,e){return Xg(t,e)}function ef(t,e){var l;Jc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=Je,r=bt;try{for(var a=Ei(i);a&&(a.nodeType!==mr||a.data!==qs);)a=Yo(a);if(!a)throw ls;ho(!0),Ti(a),Qi();let d=Xg(t,Gt(Ie({},e),{anchor:a}));if(bt===null||bt.nodeType!==mr||bt.data!==ha)throw js(),ls;return ho(!1),d}catch(d){if(d===ls)return e.recover===!1&&ug(),Jc(),ud(i),ho(!1),Yr(t,e);throw d}finally{ho(o),Ti(r),zg()}}var El=new Map;function Xg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Jc();var d=new Set,s=f=>{for(var p=0;p<f.length;p++){var $=f[p];if(!d.has($)){d.add($);var y=Yg($);e.addEventListener($,Tl,{passive:y});var _=El.get($);_===void 0?(document.addEventListener($,Tl,{passive:y}),El.set($,1)):El.set($,_+1)}}};s(id(Xp)),du.add(s);var u=void 0,m=Lg(()=>{var f=i!=null?i:e.appendChild(Cn());return Oi(()=>{if(a){B({});var p=Wt;p.c=a}r&&(o.$$events=r),Je&&No(f,null),yd=l,u=t(f,o)||{},yd=!0,Je&&(_t.nodes_end=bt),a&&F()}),()=>{var y;for(var p of d){e.removeEventListener(p,Tl);var $=El.get(p);--$===0?(document.removeEventListener(p,Tl),El.delete(p)):El.set(p,$)}du.delete(s),f!==i&&((y=f.parentNode)==null||y.removeChild(f))}});return Jp.set(u,m),u}var Jp=new WeakMap;function Pa(t,e){let i=Jp.get(t);return i?(Jp.delete(t),i(e)):(Ee&&Cg(),Promise.resolve())}function ri(t,e,...i){var o=t,r=vt,a;Gi(()=>{r!==(r=e())&&(a&&(qi(a),a=null),Ee&&r==null&&pg(),a=Oi(()=>r(o,...i)))},65536),Je&&(o=bt)}if(Ee){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;vg(e)},set:o=>{i=o}})}};D$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var D$;function Mt(t){Wt===null&&vl("onMount"),ds&&Wt.l!==null?O$(Wt).m.push(t):Oe(()=>{let e=It(t);if(typeof e=="function")return e})}function pn(t){Wt===null&&vl("onDestroy"),Mt(()=>()=>It(t))}function O$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Zg=new Map;function Jg(t,e){var i=Zg.get(t);i||(i=new Set,Zg.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){Je&&i===0&&Qi();var r=t,a=null,l=null,d=to,s=i>0?65536:0,u=!1;let m=(p,$=!0)=>{u=!0,f($,p)},f=(p,$)=>{if(d===(d=p))return;let y=!1;if(Je&&o!==-1){if(i===0){let S=Zc(r);S===qs?o=0:S===Qs?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let _=o>i;!!d===_&&(r=wa(),Ti(r),ho(!1),y=!0,o=-1)}d?(a?Ts(a):$&&(a=Oi(()=>$(r))),l&&Yn(l,()=>{l=null})):(l?Ts(l):$&&(l=Oi(()=>$(r,[i+1,o]))),a&&Yn(a,()=>{a=null})),y&&ho(!0)};Gi(()=>{u=!1,e(m),u||f(null,null)},s),Je&&(r=bt)}function Is(t,e,i){Je&&Qi();var o=t,r=to,a,l=us()?rg:fl;Gi(()=>{l(r,r=e())&&(a&&Yn(a),a=Oi(()=>i(o)))}),Je&&(o=bt)}var Zs=null;function nf(t){Zs=t}function xd(t,e){return e}function H$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)ou(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;ud(s),s.append(i),o.clear(),Xs(t,e[0].prev,e[a-1].next)}qp(r,()=>{for(var u=0;u<a;u++){var m=e[u];d||(o.delete(m.k),Xs(t,m.prev,m.next)),qi(m.e,!d)}})}function wi(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=Je?Ti(Ei(u)):u.appendChild(Cn())}Je&&Qi();var m=null,f=!1,p=wn(()=>{var $=i();return fr($)?$:$==null?[]:id($)});Gi(()=>{var $=n(p),y=$.length;if(f&&y===0)return;f=y===0;let _=!1;if(Je){var S=Zc(l)===Qs;S!==(y===0)&&(l=wa(),Ti(l),ho(!1),_=!0)}if(Je){for(var I=null,T,N=0;N<y;N++){if(bt.nodeType===mr&&bt.data===ha){l=bt,_=!0,ho(!1);break}var P=$[N],E=o(P,N);T=ih(bt,d,I,null,P,E,N,r,e,i),d.items.set(E,T),I=T}y>0&&Ti(wa())}Je||U$($,d,l,r,e,o,i),a!==null&&(y===0?m?Ts(m):m=Oi(()=>a(l)):m!==null&&Yn(m,()=>{m=null})),_&&ho(!0),n(p)}),Je&&(l=bt)}function U$(t,e,i,o,r,a,l){var Z,we,ue,re;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,m=e.items,f=e.first,p=f,$,y=null,_,S=[],I=[],T,N,P,E;if(d)for(E=0;E<u;E+=1)T=t[E],N=a(T,E),P=m.get(N),P!==void 0&&((Z=P.a)==null||Z.measure(),(_!=null?_:_=new Set).add(P));for(E=0;E<u;E+=1){if(T=t[E],N=a(T,E),P=m.get(N),P===void 0){var A=p?p.e.nodes_start:i;y=ih(A,e,y,y===null?e.first:y.next,T,N,E,o,r,l),m.set(N,y),S=[],I=[],p=y.next;continue}if(s&&z$(P,T,E,r),(P.e.f&8192)!==0&&(Ts(P.e),d&&((we=P.a)==null||we.unfix(),(_!=null?_:_=new Set).delete(P))),P!==p){if($!==void 0&&$.has(P)){if(S.length<I.length){var W=I[0],H;y=W.prev;var z=S[0],Y=S[S.length-1];for(H=0;H<S.length;H+=1)eh(S[H],W,i);for(H=0;H<I.length;H+=1)$.delete(I[H]);Xs(e,z.prev,Y.next),Xs(e,y,z),Xs(e,Y,W),p=W,y=Y,E-=1,S=[],I=[]}else $.delete(P),eh(P,p,i),Xs(e,P.prev,P.next),Xs(e,P,y===null?e.first:y.next),Xs(e,y,P),y=P;continue}for(S=[],I=[];p!==null&&p.k!==N;)(p.e.f&8192)===0&&($!=null?$:$=new Set).add(p),I.push(p),p=p.next;if(p===null)continue;P=p}S.push(P),y=P,p=P.next}if(p!==null||$!==void 0){for(var ae=$===void 0?[]:id($);p!==null;)(p.e.f&8192)===0&&ae.push(p),p=p.next;var j=ae.length;if(j>0){var ne=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<j;E+=1)(ue=ae[E].a)==null||ue.measure();for(E=0;E<j;E+=1)(re=ae[E].a)==null||re.fix()}H$(e,ae,ne,m)}}d&&Tn(()=>{var _e;if(_!==void 0)for(P of _)(_e=P.a)==null||_e.apply()}),_t.first=e.first&&e.first.e,_t.last=y&&y.e}function z$(t,e,i,o){(o&1)!==0&&$l(t.v,e),(o&2)!==0?$l(t.i,i):t.i=i}function ih(t,e,i,o,r,a,l,d,s,u){var m=Zs,f=(s&1)!==0,p=(s&16)===0,$=f?p?ps(r,!1,!1):kr(r):r,y=(s&2)===0?l:kr(l);Ee&&f&&($.trace=()=>{var S=typeof y=="number"?l:y.v;u()[S]});var _={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};Zs=_;try{return _.e=Oi(()=>d(t,$,y,u),Je),_.e.prev=i&&i.e,_.e.next=o&&o.e,i===null?e.first=_:(i.next=_,i.e.next=_.e),o!==null&&(o.prev=_,o.e.prev=_.e),_}finally{Zs=m}}function eh(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=Yo(a);r.before(a),a=l}}function Xs(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 W$(t,e,i){var a,l;if(!e||e===Kg(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[Kn]&&(o=`in ${vr[Kn]}`),Sg(cu(o))}function wd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=_t;if(l===(l=($=e())!=null?$:"")){Je&&Qi();return}if(d.nodes_start!==null&&(Wp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(Je){for(var s=bt.data,u=Qi(),m=u;u!==null&&(u.nodeType!==mr||u.data!=="");)m=u,u=Yo(u);if(u===null)throw js(),ls;Ee&&!r&&W$(u.parentNode,s,l),No(bt,m),a=Ti(u);return}var f=l+"";i?f=`<svg>${f}</svg>`:o&&(f=`<math>${f}</math>`);var p=Il(f);if((i||o)&&(p=Ei(p)),No(Ei(p),p.lastChild),i||o)for(;Ei(p);)a.before(Ei(p));else a.before(p)}})}function Di(t,e,i){Je&&Qi();var o=t,r,a;Gi(()=>{r!==(r=e())&&(a&&(Yn(a),a=null),r&&(a=Oi(()=>i(o,r))))},65536),Je&&(o=bt)}function ka(t,e,i,o,r,a){var y;let l=Je;Je&&Qi();var d=Ee&&a&&((y=Wt)==null?void 0:y.function[Kn]),s,u,m=null;Je&&bt.nodeType===Kc&&(m=bt,Qi());var f=Je?bt:t,p,$=Zs;Gi(()=>{let _=e()||null;var S=r?r():i||_==="svg"?Hc:null;if(_!==s){var I=Zs;nf($),p&&(_===null?Yn(p,()=>{p=null,u=null}):_===u?Ts(p):(qi(p),uu(!1))),_&&_!==u&&(p=Oi(()=>{if(m=Je?m:S?document.createElementNS(S,_):document.createElement(_),Ee&&a&&(m.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),No(m,m),o){Je&&jg(_)&&m.append(document.createComment(""));var T=Je?Ei(m):m.appendChild(Cn());Je&&(T===null?ho(!1):Ti(T)),o(m,T)}_t.nodes_end=m,f.before(m)})),s=_,s&&(u=s),uu(!0),nf(I)}},65536),l&&(ho(!0),Ti(f))}var sf;function oh(t){return sf=t.target,new rf(t)}var Es,Ar,rf=class{constructor(e){Ks(this,Es);Ks(this,Ar);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(Ie({},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===ul?!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 O((m=i.get(s))!=null?m:o(s,u),u),Reflect.set(d,s,u)}});cl(this,Ar,(e.hydrate?ef:Yr)(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)&&Cl(),cl(this,Es,r.$$events);for(let d of Object.keys(Ni(this,Ar)))d==="$set"||d==="$destroy"||d==="$on"||vo(this,d,{get(){return Ni(this,Ar)[d]},set(s){Ni(this,Ar)[d]=s},enumerable:!0});Ni(this,Ar).$set=d=>{Object.assign(r,d)},Ni(this,Ar).$destroy=()=>{Pa(Ni(this,Ar))}}$set(e){Ni(this,Ar).$set(e)}$on(e,i){Ni(this,Es)[e]=Ni(this,Es)[e]||[];let o=(...r)=>i.call(this,...r);return Ni(this,Es)[e].push(o),()=>{Ni(this,Es)[e]=Ni(this,Es)[e].filter(r=>r!==o)}}$destroy(){Ni(this,Ar).$destroy()}};Es=new WeakMap,Ar=new WeakMap;function Q(t,e){Tn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=sf)==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),Ee&&Jg(e.hash,d)}})}function Ps(t,e){var i=void 0,o;Gi(()=>{i!==(i=e())&&(o&&(qi(o),o=null),i&&(o=Oi(()=>{Ro(()=>i(t))})))})}function nh(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=nh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function rh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=nh(t))&&(o&&(o+=" "),o+=e);return o}function Sd(t){return typeof t=="object"?rh(t):t!=null?t:""}var sh=[...`
|
|
44
|
-
\r\f \v\uFEFF`];function lh(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||sh.includes(o[l-1]))&&(d===o.length||sh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function ah(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 af(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function dh(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(af)),r&&s.push(...Object.keys(r).map(af));var u=0,m=-1;let _=t.length;for(var f=0;f<_;f++){var p=t[f];if(d?p==="/"&&t[f-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[f+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?l++:p===")"&&l--,!d&&a===!1&&l===0){if(p===":"&&m===-1)m=f;else if(p===";"||f===_-1){if(m!==-1){var $=af(t.substring(u,m).trim());if(!s.includes($)){p!==";"&&f++;var y=t.substring(u,f).trim();i+=" "+y+";"}}u=f+1,m=-1}}}}return o&&(i+=ah(o)),r&&(i+=ah(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(Je||l!==i||l===void 0){var d=lh(i,o,a);(!Je||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 lf(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(Je||r!==e){var a=dh(e,o);(!Je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(lf(t,i==null?void 0:i[0],o[0]),lf(t,i==null?void 0:i[1],o[1],"important")):lf(t,i,o));return o}function Cd(t,e,i){if(t.multiple){if(e==null)return;if(!fr(e))return Tg();for(var o of t.options)o.selected=e.includes(ch(o));return}for(o of t.options){var r=ch(o);if(Mp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function df(t){var e=new MutationObserver(()=>{Cd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Vo(()=>{e.disconnect()})}function ch(t){return"__value"in t?t.__value:t.value}var Pl=Symbol("class"),kl=Symbol("style"),fh=Symbol("is custom element"),mh=Symbol("is html");function vh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var r=hh(t);if(Je&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Z$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[ng]=i),i==null?t.removeAttribute(e):typeof i!="string"&&_h(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function gh(t,e,i,o,r=!1){var P;var a=hh(t),l=a[fh],d=!a[mh];let s=Je&&l;s&&ho(!1);var u=e||{},m=t.tagName==="OPTION";for(var f in e)f in i||(i[f]=null);i.class?i.class=Sd(i.class):(o||i[Pl])&&(i.class=null),i[kl]&&((P=i.style)!=null||(i.style=null));var p=_h(t);for(let E in i){let A=i[E];if(m&&E==="value"&&A==null){t.value=t.__value="",u[E]=A;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,A,o,e==null?void 0:e[Pl],i[Pl]),u[E]=A,u[Pl]=i[Pl];continue}if(E==="style"){Qe(t,A,e==null?void 0:e[kl],i[kl]),u[E]=A,u[kl]=i[kl];continue}var y=u[E];if(!(A===y&&!(A===void 0&&t.hasAttribute(E)))){u[E]=A;var _=E[0]+E[1];if(_!=="$$")if(_==="on"){let W={},H="$$"+E,z=E.slice(2);var S=Qg(z);if(qg(z)&&(z=z.slice(0,-7),W.capture=!0),!S&&y){if(A!=null)continue;t.removeEventListener(z,u[H],W),u[H]=null}if(A!=null)if(S)t[`__${z}`]=A,tt([z]);else{let Y=function(ae){u[E].call(this,ae)};var N=Y;u[H]=Zp(z,t,Y,W)}else S&&(t[`__${z}`]=void 0)}else if(E==="style")Ve(t,E,A);else if(E==="autofocus")jp(t,!!A);else if(!l&&(E==="__value"||E==="value"&&A!=null))t.value=t.__value=A;else if(E==="selected"&&m)vh(t,A);else{var I=E;d||(I=Gg(I));var T=I==="defaultValue"||I==="defaultChecked";if(A==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let W=t,H=e===void 0;if(I==="value"){let z=W.defaultValue;W.removeAttribute(I),W.defaultValue=z,W.value=W.__value=H?z:null}else{let z=W.defaultChecked;W.removeAttribute(I),W.defaultChecked=z,W.checked=H?z:!1}}else t.removeAttribute(E);else T||p.includes(I)&&(l||typeof A!="string")?t[I]=A:typeof A!="function"&&Ve(t,I,A,r)}}}return s&&ho(!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",m=!1;if(Gi(()=>{var p=e(...l.map(n)),$=gh(t,d,p,o,r);m&&u&&"value"in p&&Cd(t,p.value,!1);for(let _ of Object.getOwnPropertySymbols(s))p[_]||qi(s[_]);for(let _ of Object.getOwnPropertySymbols(p)){var y=p[_];_.description===Cp&&(!d||y!==d[_])&&(s[_]&&qi(s[_]),s[_]=Oi(()=>Ps(t,()=>y))),$[_]=y}d=$}),u){var f=t;Ro(()=>{Cd(f,d.value),df(f)})}m=!0}function hh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[fh]:t.nodeName.includes("-"),[mh]:t.namespaceURI===Xv}}var uh=new Map;function _h(t){var e=uh.get(t.nodeName);if(e)return e;uh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=zc(o);for(var a in i)i[a].set&&e.push(a);o=_a(o)}return e}function Z$(t,e,i){var o;Ee&&(e==="srcset"&&J$(t,i)||cf((o=t.getAttribute(e))!=null?o:"",i)||wg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function cf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ph(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function J$(t,e){var i=ph(t.srcset),o=ph(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(cf(i[l][0],r)||cf(r,i[l][0])))}var e1=Uc?()=>performance.now():()=>Date.now(),jr={tick:t=>(Uc?requestAnimationFrame:vt)(t),now:()=>e1(),tasks:new Set};function bh(){let t=jr.now();jr.tasks.forEach(e=>{e.c(t)||(jr.tasks.delete(e),e.f())}),jr.tasks.size!==0&&jr.tick(bh)}function $h(t){let e;return jr.tasks.size===0&&jr.tick(bh),{promise:new Promise(i=>{jr.tasks.add(e={c:t,f:i})}),abort(){jr.tasks.delete(e)}}}function pu(t,e){$d(()=>{t.dispatchEvent(new CustomEvent(e))})}function n1(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 yh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=n1(r.trim());e[l]=a.trim()}return e}var r1=t=>t;function Xr(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,f=e.style.overflow,p,$;function y(){var A;var P=Ot,E=_t;Ki(null),go(null);try{return u!=null?u:u=i()(e,(A=o==null?void 0:o())!=null?A:{},{direction:s})}finally{Ki(P),go(E)}}var _={is_global:d,in(){var P;if(e.inert=m,!r){$==null||$.abort(),(P=$==null?void 0:$.reset)==null||P.call($);return}a||p==null||p.abort(),pu(e,"introstart"),p=uf(e,y(),$,1,()=>{pu(e,"introend"),p==null||p.abort(),p=u=void 0,e.style.overflow=f})},out(P){if(!a){P==null||P(),u=void 0;return}e.inert=!0,pu(e,"outrostart"),$=uf(e,y(),p,0,()=>{pu(e,"outroend"),P==null||P()})},stop:()=>{p==null||p.abort(),$==null||$.abort()}},S=_t;if(((N=S.transitions)!=null?N:S.transitions=[]).push(_),r&&yd){var I=d;if(!I){for(var T=S.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Ro(()=>{It(()=>_.in())})}}function uf(t,e,i,o,r){var a=o===1;if(Gs(e)){var l,d=!1;return Tn(()=>{if(!d){var S=e({direction:a?"in":"out"});l=uf(t,S,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:f=r1}=e;var p=[];if(a&&i===void 0&&(m&&m(0,1),u)){var $=yh(u(0,1));p.push($,$)}var y=()=>1-o,_=t.animate(p,{duration:s,fill:"forwards"});return _.onfinish=()=>{var z;_.cancel();var S=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-S,T=e.duration*Math.abs(I),N=[];if(T>0){var P=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),A=0;A<=E;A+=1){var W=S+I*f(A/E),H=yh(u(W,1-W));N.push(H),P||(P=H.overflow==="hidden")}P&&(t.style.overflow="hidden"),y=()=>{var Y=_.currentTime;return S+I*f(Y/T)},m&&$h(()=>{if(_.playState!=="running")return!1;var Y=y();return m(Y,1-Y),!0})}_=t.animate(N,{duration:T,fill:"forwards"}),_.onfinish=()=>{y=()=>o,m==null||m(o,1-o),r()}},{abort:()=>{_&&(_.cancel(),_.effect=null,_.onfinish=vt)},deactivate:()=>{r=vt},reset:()=>{o===0&&(m==null||m(1,0))},t:()=>y()}}function pf(t,e,i){var o=Ko(t,e);o&&o.set&&(t[e]=i,Vo(()=>{t[e]=null}))}var Js,Al,Td,mu,xh,vu=class vu{constructor(e){Ks(this,mu);Ks(this,Js,new WeakMap);Ks(this,Al);Ks(this,Td);cl(this,Td,e)}observe(e,i){var o=Ni(this,Js).get(e)||new Set;return o.add(i),Ni(this,Js).set(e,o),Yv(this,mu,xh).call(this).observe(e,Ni(this,Td)),()=>{var r=Ni(this,Js).get(e);r.delete(i),r.size===0&&(Ni(this,Js).delete(e),Ni(this,Al).unobserve(e))}}};Js=new WeakMap,Al=new WeakMap,Td=new WeakMap,mu=new WeakSet,xh=function(){var e;return(e=Ni(this,Al))!=null?e:cl(this,Al,new ResizeObserver(i=>{for(var o of i){vu.entries.set(o.target,o);for(var r of Ni(this,Js).get(o.target)||[])r(o)}}))},pr(vu,"entries",new WeakMap);var ff=vu;var s1=new ff({box:"border-box"});function En(t,e,i){var o=s1.observe(t,()=>i(t[e]));Ro(()=>(It(()=>i(t[e])),o))}function wh(t,e){return t===e||(t==null?void 0:t[qo])===e}function je(t={},e,i,o){return Ro(()=>{var r,a;return jo(()=>{r=a,a=(o==null?void 0:o())||[],It(()=>{t!==i(...a)&&(e(t,...a),r&&wh(i(...r),t)&&e(null,...r))})}),()=>{Tn(()=>{a&&wh(i(...a),t)&&e(null,...a)})}}),t}function xo(t=!1){let e=Wt,i=e.l.u;if(!i)return;let o=()=>lu(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&&md(()=>{Sh(e,o),Ys(i.b)}),Oe(()=>{let r=It(()=>i.m.map(og));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{Sh(e,o),Ys(i.a)})}function Sh(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Id(t,e,i){if(t==null)return e(void 0),i&&i(void 0),vt;let o=It(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Ll=[];function Lr(t,e){return{subscribe:le(t,e).subscribe}}function le(t,e=vt){let i=null,o=new Set;function r(d){if(fl(t,d)&&(t=d,i)){let s=!Ll.length;for(let u of o)u[1](),Ll.push(u,t);if(s){for(let u=0;u<Ll.length;u+=2)Ll[u][0](Ll[u+1]);Ll.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 gi(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 Lr(i,(l,d)=>{let s=!1,u=[],m=0,f=vt,p=()=>{if(m)return;f();let y=e(o?u[0]:u,l,d);a?l(y):f=typeof y=="function"?y:vt},$=r.map((y,_)=>Id(y,S=>{u[_]=S,m&=~(1<<_),s&&p()},()=>{m|=1<<_}));return s=!0,p(),function(){Ys($),f(),s=!1}})}function ge(t){let e;return Id(t,i=>e=i)(),e}var gu=!1,mf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ps(void 0),unsubscribe:vt};if(o.store!==t&&!(mf 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=Id(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&mf in i?ge(t):n(o.source)}function Re(){let t={};function e(){Vo(()=>{for(var i in t)t[i].unsubscribe();vo(t,mf,{enumerable:!1,value:!0})})}return[t,e]}function vf(t){var e=gu;try{return gu=!1,[t(),gu]}finally{gu=e}}var f1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ee&&mg(`${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 Pn(t,e,i){return new Proxy(Ee?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},f1)}var m1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Gs(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];Gs(r)&&(r=r());let a=Ko(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(Gs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Ko(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===qo||e===ul)return!1;for(let i of t.props)if(Gs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Gs(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 Zr(...t){return new Proxy({props:t},m1)}function Ch(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(t,e,i,o){var W,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]=vf(()=>t[e]):u=t[e];var m=qo in t||ul in t,f=l&&((H=(W=Ko(t,e))==null?void 0:W.set)!=null?H:m&&e in t&&(z=>t[e]=z))||void 0,p=o,$=!0,y=!1,_=()=>(y=!0,$&&($=!1,d?p=It(o):p=o),p);u===void 0&&o!==void 0&&(f&&a&&fg(e),u=_(),f&&f(u));var S;if(a)S=()=>{var z=t[e];return z===void 0?_():($=!0,y=!1,z)};else{var I=(r?qr:wn)(()=>t[e]);I.f|=131072,S=()=>{var z=n(I);return z!==void 0&&(p=void 0),z===void 0?p:z}}if((i&4)===0&&a)return S;if(f){var T=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||T||s)&&f(Y?S():z),z):S()}}var N=!1,P=!1,E=ps(u),A=qr(()=>{var z=S(),Y=n(E);return N?(N=!1,P=!0,Y):(P=!1,E.v=z)});return l&&n(A),r||(A.equals=ml),function(z,Y){if(su!==null&&(N=P,S(),n(E)),arguments.length>0){let ae=Y?n(A):a&&l?ci(z):z;if(!A.equals(ae)){if(N=!0,O(E,ae),y&&p!==void 0&&(p=ae),Ch(A))return z;It(()=>n(A))}return z}return Ch(A)?A.v:n(A)}}var v1;typeof HTMLElement=="function"&&(v1=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 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),b(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=g1(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]=gf(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=oh({component:this.$$ctor,target:this.shadowRoot||this,props:Gt(Ie({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=iu(()=>{jo(()=>{var a;this.$$r=!0;for(let l of Tp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=gf(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]=gf(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 Tp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function gf(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 g1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Th="5";var Ih,Eh,Ph;typeof window!="undefined"&&((Ph=(Eh=(Ih=window.__svelte)!=null?Ih:window.__svelte={}).v)!=null?Ph:Eh.v=new Set).add(Th);import{areValidLiveRecordSources as VT,clientChecker as Iv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Ob,safeStorage as RT,throttleFn as NT}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as OT}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as h1,fillWithDefault as _1,VideoQuality as kh}from"@vkontakte/videoplayer-shared/es2015";var b1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:h1.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:kh.Q_480P,highQualityLimit:kh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!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},Ah=t=>_1(t,b1),Lh=t=>hl("ui-config",t),Vt=()=>gl("ui-config");var Ed="vk_player_debug_panel_opened";var Mh="videoplayer",Vh="videoplayer";var ms={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Rh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Nh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Oh=new Set(["ShiftRight","ShiftLeft"]);var Dh=["TIMELINE"],Pd=[...Dh,"GRAPH_BUTTON"],hf=[...Dh,"PLAY_BUTTON"],kd=[...Pd,"PLAY_BUTTON"];var vs=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(vs||{}),Ad={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Bh,VERSION as $1}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as y1}from"@vkontakte/videoplayer-core/es2015";import{VERSION as x1}from"@vkontakte/videoplayer-statistics/es2015";var hu="prod",Ml="1.1.79-dev.f4244a7e.0";var La=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Fh=Symbol("storeContext"),Hh=Symbol("microStoresContext"),Uh=(t,e)=>{hl(Fh,t),hl(Hh,e),hu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=gl(Fh);return Bh(t,"Store context is empty!"),t},wo=()=>{let t=gl(Hh);return Bh(t,"MicroStores context is empty!"),t},si=(t,e)=>bu(t,t.getValue(),e),bu=(t,e,i)=>Lr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),zh=(t,e,i,o)=>{var W,H,z,Y,ae,j,ne,Z,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(W=r.throughputEstimation$.getValue())==null?void 0:W.toFixed(0))!=null?H:0,s=(Y=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?Y:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",m=`${Ml} (core: ${y1}, stat: ${x1}, shared: ${$1})`,f=ge(i.state.errorLog$),p=f.length?`
|
|
45
|
-
`+
|
|
43
|
+
`)})}}var Pa=!1,wl=null,Aa=!1,Ts=!1;function Hp(t){Ts=t}var _d=[],bd=[],Ot=null,gr=!1;function Wi(t){Ot=t}var bt=null;function go(t){bt=t}var Xo=null;function Xc(t){Ot!==null&&Ot.f&2097152&&(Xo===null?Xo=[Ot,[t]]:Xo[1].push(t))}var Tn=null,hr=0,vr=null;function Sg(t){vr=t}var zg=1,su=0,Cs=!1,au=null;function ad(){return++zg}function Ca(t){var p,f;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&&!Cs,s=i.length;if(l||d){var u=t,v=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((f=a.reactions)!=null?f:a.reactions=[]).push(u);l&&(u.f^=512),d&&v!==null&&(v.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],Ca(a)&&Fp(a),a.wv>t.wv)return!0}(!o||bt!==null&&!Cs)&&xn(t,1024)}return!1}function Wg(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Xo!=null&&Xo[1].includes(t)&&Xo[0]===Ot||((a.f&2)!==0?Wg(a,e,!1):e===a&&(i?xn(a,2048):(a.f&1024)!==0&&xn(a,4096),dd(a)))}}function jc(t){var $,y;var e=Tn,i=hr,o=vr,r=Ot,a=Cs,l=Xo,d=Kt,s=gr,u=t.f;Tn=null,hr=0,vr=null,Cs=(u&256)!==0&&(gr||!Aa||Ot===null),Ot=(u&96)===0?t:null,Xo=null,nd(t.ctx),gr=!1,su++,t.f|=2097152;try{var v=(0,t.fn)(),p=t.deps;if(Tn!==null){var f;if(vd(t,hr),p!==null&&hr>0)for(p.length=hr+Tn.length,f=0;f<Tn.length;f++)p[hr+f]=Tn[f];else t.deps=p=Tn;if(!Cs||(u&2)!==0&&t.reactions!==null)for(f=hr;f<p.length;f++)((y=($=p[f]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&hr<p.length&&(vd(t,hr),p.length=hr);if(ls()&&vr!==null&&!gr&&p!==null&&(t.f&6146)===0)for(f=0;f<vr.length;f++)Wg(vr[f],t);return r!==null&&r!==t&&(su++,vr!==null&&(o===null?o=vr:o.push(...vr))),v}catch(g){Fg(g)}finally{Tn=e,hr=i,vr=o,Ot=r,Cs=a,Xo=l,nd(d),gr=s,t.f^=2097152}}function _$(t,e){let i=e.reactions;if(i!==null){var o=og.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&&(Tn===null||!Tn.includes(e))&&(xn(e,4096),(e.f&768)===0&&(e.f^=512),Yc(e),vd(e,0))}function vd(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){xn(t,1024);var i=bt,o=Aa;if(bt=t,Aa=!0,Ee){var r=fr;rd(t.component_function)}try{(e&16)!==0?Rg(t):Kp(t),Wp(t);var a=jc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=zg,Ee&&as&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=ad(),l.set_during_effect=!1);Ee&&bd.push(t)}finally{Aa=o,bt=i,Ee&&rd(r)}}}function Hg(){console.error("Last ten effects were: ",bd.slice(-10).map(t=>t.fn)),bd=[]}function b$(){try{pg()}catch(t){if(Ee&&vo(t,"stack",{value:""}),wl!==null)if(Ee)try{hd(t,wl)}catch(e){throw Hg(),e}else hd(t,wl);else throw Ee&&Hg(),t}}function Xp(){var t=Aa;try{var e=0;for(Aa=!0;_d.length>0;){e++>1e3&&b$();var i=_d,o=i.length;_d=[];for(var r=0;r<o;r++){var a=y$(i[r]);$$(a)}_l.clear()}}finally{Pa=!1,Aa=t,wl=null,Ee&&(bd=[])}}function $$(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?Qp(o):o.fn=null))}}function dd(t){Pa||(Pa=!0,queueMicrotask(Xp));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 y$(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,Xp(),Pa=!0,e=t());;){if(Dg(),_d.length===0)return Pa=!1,wl=null,Ee&&(bd=[]),e;Pa=!0,Xp()}}function _o(){return vt(this,null,function*(){yield Promise.resolve(),Sl()})}function n(t){var e=t.f,i=(e&2)!==0;if(au!==null&&au.add(t),Ot!==null&&!gr){if(!(Xo!=null&&Xo[1].includes(t))||Xo[0]!==Ot){var o=Ot.deps;t.rv<su&&(t.rv=su,Tn===null&&o!==null&&o[hr]===t?hr++:Tn===null?Tn=[t]:(!Cs||!Tn.includes(t))&&Tn.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)&&Fp(r)),Ee&&as&&!gr&&od!==null&&Ot!==null&&od.reaction===Ot)if(t.trace)t.trace();else{var l=Ss("TracedAt");if(l){var d=od.entries.get(t);d===void 0&&(d={traces:[]},od.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=gr;try{return gr=!0,t()}finally{gr=e}}var x$=-7169;function xn(t,e){t.f=t.f&x$|e}function du(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Yo in t)lu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Yo in i&&lu(i)}}}function lu(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{lu(t[o],e)}catch(r){}let i=xa(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Wc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Zp(t,e){if(e){let i=document.body;t.autofocus=!0,Sn(()=>{document.activeElement===i&&t.focus()})}}function $d(t){var e=Ot,i=bt;Wi(null),go(null);try{return t()}finally{Wi(e),go(i)}}var Jp=new Set,cu=new Set;function La(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 ef(t,e,i,o={}){function r(a){if(o.capture||Tl.call(e,a),!a.cancelBubble)return $d(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Sn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function st(t,e,i,o,r){var a={capture:o,passive:r},l=ef(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ro(()=>{e.removeEventListener(t,l,a)})}function Ze(t){for(var e=0;e<t.length;e++)Jp.add(t[e]);for(var i of cu)i(t)}function Tl(t){var I;var e=this,i=e.ownerDocument,o=t.type,r=((I=t.composedPath)==null?void 0:I.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){vo(t,"currentTarget",{configurable:!0,get(){return a||i}});var v=Ot,p=bt;Wi(null),go(null);try{for(var f,$=[];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(ur(g)){var[w,...T]=g;w.apply(a,[t,...T])}else g.call(a,t)}catch(N){f?$.push(N):f=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(f){for(let N of $)queueMicrotask(()=>{throw N});throw f}}finally{t.__root=e,delete t.currentTarget,Wi(v),go(p)}}}var S$;function Kg(){S$=void 0}function Cl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Oo(t,e){var i=bt;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 Oo($t,null),$t;r===void 0&&(r=Cl(a?t:"<!>"+t),i||(r=Ii(r)));var l=o||cd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ii(l),s=l.lastChild;Oo(d,s)}else Oo(l,l);return l}}function I$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(et)return Oo($t,null),$t;if(!l){var d=Cl(a),s=Ii(d);if(r)for(l=document.createDocumentFragment();Ii(s);)l.appendChild(Ii(s));else l=Ii(s)}var u=l.cloneNode(!0);if(r){var v=Ii(u),p=u.lastChild;Oo(v,p)}else Oo(u,u);return u}}function Ce(t,e){return I$(t,e,"svg")}function cs(t=""){if(!et){var e=wn(t+"");return Oo(e,e),e}var i=$t;return i.nodeType!==ul&&(i.before(i=wn()),Ti(i)),Oo(i,i),i}function Le(){if(et)return Oo($t,null),$t;var t=document.createDocumentFragment(),e=document.createComment(""),i=wn();return t.append(e,i),Oo(e,i),t}function b(t,e){if(et){bt.nodes_end=$t,qi();return}t!==null&&t.before(e)}var E$=/\r/g;function Qg(t){t=t.replace(E$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Gg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var k$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Yg(t){return k$.includes(t)}var P$=["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 A$={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=A$[t])!=null?e:t}var IP=[...P$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var L$=["touchstart","touchmove"];function Xg(t){return L$.includes(t)}var M$=["$state","$state.raw","$derived","$derived.by"],EP=[...M$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var V$=["textarea","script","style","title"];function Zg(t){return V$.includes(t)}function uu(t){return t==null?void 0:t.replace(/\//g,"/")}var yd=!0;function pu(t){yd=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 Xr(t,e){return Jg(t,e)}function of(t,e){var l;eu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=et,r=$t;try{for(var a=Ii(i);a&&(a.nodeType!==pr||a.data!==Zs);)a=Zo(a);if(!a)throw rs;ho(!0),Ti(a),qi();let d=Jg(t,Gt(Ie({},e),{anchor:a}));if($t===null||$t.nodeType!==pr||$t.data!==ya)throw ia(),rs;return ho(!1),d}catch(d){if(d===rs)return e.recover===!1&&fg(),eu(),ud(i),ho(!1),Xr(t,e);throw d}finally{ho(o),Ti(r),Kg()}}var Il=new Map;function Jg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){eu();var d=new Set,s=p=>{for(var f=0;f<p.length;f++){var $=p[f];if(!d.has($)){d.add($);var y=Xg($);e.addEventListener($,Tl,{passive:y});var g=Il.get($);g===void 0?(document.addEventListener($,Tl,{passive:y}),Il.set($,1)):Il.set($,g+1)}}};s(id(Jp)),cu.add(s);var u=void 0,v=Vg(()=>{var p=i!=null?i:e.appendChild(wn());return Ni(()=>{if(a){B({});var f=Kt;f.c=a}r&&(o.$$events=r),et&&Oo(p,null),yd=l,u=t(p,o)||{},yd=!0,et&&(bt.nodes_end=$t),a&&F()}),()=>{var y;for(var f of d){e.removeEventListener(f,Tl);var $=Il.get(f);--$===0?(document.removeEventListener(f,Tl),Il.delete(f)):Il.set(f,$)}cu.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return tf.set(u,v),u}var tf=new WeakMap;function Ma(t,e){let i=tf.get(t);return i?(tf.delete(t),i(e)):(Ee&&Ig(),Promise.resolve())}function ri(t,e,...i){var o=t,r=gt,a;Qi(()=>{r!==(r=e())&&(a&&(Ki(a),a=null),Ee&&r==null&&mg(),a=Ni(()=>r(o,...i)))},65536),et&&(o=$t)}if(Ee){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;hg(e)},set:o=>{i=o}})}};D$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var D$;function Mt(t){Kt===null&&ml("onMount"),ss&&Kt.l!==null?O$(Kt).m.push(t):Oe(()=>{let e=Ct(t);if(typeof e=="function")return e})}function cn(t){Kt===null&&ml("onDestroy"),Mt(()=>()=>Ct(t))}function O$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var eh=new Map;function th(t,e){var i=eh.get(t);i||(i=new Set,eh.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=io,s=i>0?65536:0,u=!1;let v=(f,$=!0)=>{u=!0,p($,f)},p=(f,$)=>{if(d===(d=f))return;let y=!1;if(et&&o!==-1){if(i===0){let w=Jc(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=Ia(),Ti(r),ho(!1),y=!0,o=-1)}d?(a?Es(a):$&&(a=Ni(()=>$(r))),l&&Qn(l,()=>{l=null})):(l?Es(l):$&&(l=Ni(()=>$(r,[i+1,o]))),a&&Qn(a,()=>{a=null})),y&&ho(!0)};Qi(()=>{u=!1,e(v),u||p(null,null)},s),et&&(r=$t)}function ks(t,e,i){et&&qi();var o=t,r=io,a,l=ls()?ag:pl;Qi(()=>{l(r,r=e())&&(a&&Qn(a),a=Ni(()=>i(o)))}),et&&(o=$t)}var na=null;function sf(t){na=t}function xd(t,e){return e}function H$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)nu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;ud(s),s.append(i),o.clear(),oa(t,e[0].prev,e[a-1].next)}Gp(r,()=>{for(var u=0;u<a;u++){var v=e[u];d||(o.delete(v.k),oa(t,v.prev,v.next)),Ki(v.e,!d)}})}function bi(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?Ti(Ii(u)):u.appendChild(wn())}et&&qi();var v=null,p=!1,f=yn(()=>{var $=i();return ur($)?$:$==null?[]:id($)});Qi(()=>{var $=n(f),y=$.length;if(p&&y===0)return;p=y===0;let g=!1;if(et){var w=Jc(l)===Js;w!==(y===0)&&(l=Ia(),Ti(l),ho(!1),g=!0)}if(et){for(var T=null,I,N=0;N<y;N++){if($t.nodeType===pr&&$t.data===ya){l=$t,g=!0,ho(!1);break}var k=$[N],E=o(k,N);I=nh($t,d,T,null,k,E,N,r,e,i),d.items.set(E,I),T=I}y>0&&Ti(Ia())}et||U$($,d,l,r,e,o,i),a!==null&&(y===0?v?Es(v):v=Ni(()=>a(l)):v!==null&&Qn(v,()=>{v=null})),g&&ho(!0),n(f)}),et&&(l=$t)}function U$(t,e,i,o,r,a,l){var Z,we,ue,ne;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,v=e.items,p=e.first,f=p,$,y=null,g,w=[],T=[],I,N,k,E;if(d)for(E=0;E<u;E+=1)I=t[E],N=a(I,E),k=v.get(N),k!==void 0&&((Z=k.a)==null||Z.measure(),(g!=null?g:g=new Set).add(k));for(E=0;E<u;E+=1){if(I=t[E],N=a(I,E),k=v.get(N),k===void 0){var A=f?f.e.nodes_start:i;y=nh(A,e,y,y===null?e.first:y.next,I,N,E,o,r,l),v.set(N,y),w=[],T=[],f=y.next;continue}if(s&&z$(k,I,E,r),(k.e.f&8192)!==0&&(Es(k.e),d&&((we=k.a)==null||we.unfix(),(g!=null?g:g=new Set).delete(k))),k!==f){if($!==void 0&&$.has(k)){if(w.length<T.length){var Q=T[0],H;y=Q.prev;var z=w[0],Y=w[w.length-1];for(H=0;H<w.length;H+=1)ih(w[H],Q,i);for(H=0;H<T.length;H+=1)$.delete(T[H]);oa(e,z.prev,Y.next),oa(e,y,z),oa(e,Y,Q),f=Q,y=Y,E-=1,w=[],T=[]}else $.delete(k),ih(k,f,i),oa(e,k.prev,k.next),oa(e,k,y===null?e.first:y.next),oa(e,y,k),y=k;continue}for(w=[],T=[];f!==null&&f.k!==N;)(f.e.f&8192)===0&&($!=null?$:$=new Set).add(f),T.push(f),f=f.next;if(f===null)continue;k=f}w.push(k),y=k,f=k.next}if(f!==null||$!==void 0){for(var le=$===void 0?[]:id($);f!==null;)(f.e.f&8192)===0&&le.push(f),f=f.next;var X=le.length;if(X>0){var re=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(ue=le[E].a)==null||ue.measure();for(E=0;E<X;E+=1)(ne=le[E].a)==null||ne.fix()}H$(e,le,re,v)}}d&&Sn(()=>{var _e;if(g!==void 0)for(k of g)(_e=k.a)==null||_e.apply()}),bt.first=e.first&&e.first.e,bt.last=y&&y.e}function z$(t,e,i,o){(o&1)!==0&&bl(t.v,e),(o&2)!==0?bl(t.i,i):t.i=i}function nh(t,e,i,o,r,a,l,d,s,u){var v=na,p=(s&1)!==0,f=(s&16)===0,$=p?f?ds(r,!1,!1):Mr(r):r,y=(s&2)===0?l:Mr(l);Ee&&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};na=g;try{return g.e=Ni(()=>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{na=v}}function ih(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=Zo(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 W$(t,e,i){var a,l;if(!e||e===Qg(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=fr)!=null&&l[zn]&&(o=`in ${fr[zn]}`),Cg(uu(o))}function wd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=bt;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=$t.data,u=qi(),v=u;u!==null&&(u.nodeType!==pr||u.data!=="");)v=u,u=Zo(u);if(u===null)throw ia(),rs;Ee&&!r&&W$(u.parentNode,s,l),Oo($t,v),a=Ti(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var f=Cl(p);if((i||o)&&(f=Ii(f)),Oo(Ii(f),f.lastChild),i||o)for(;Ii(f);)a.before(Ii(f));else a.before(f)}})}function Oi(t,e,i){et&&qi();var o=t,r,a;Qi(()=>{r!==(r=e())&&(a&&(Qn(a),a=null),r&&(a=Ni(()=>i(o,r))))},65536),et&&(o=$t)}function Va(t,e,i,o,r,a){var y;let l=et;et&&qi();var d=Ee&&a&&((y=Kt)==null?void 0:y.function[zn]),s,u,v=null;et&&$t.nodeType===qc&&(v=$t,qi());var p=et?$t:t,f,$=na;Qi(()=>{let g=e()||null;var w=r?r():i||g==="svg"?Uc:null;if(g!==s){var T=na;sf($),f&&(g===null?Qn(f,()=>{f=null,u=null}):g===u?Es(f):(Ki(f),pu(!1))),g&&g!==u&&(f=Ni(()=>{if(v=et?v:w?document.createElementNS(w,g):document.createElement(g),Ee&&a&&(v.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Oo(v,v),o){et&&Zg(g)&&v.append(document.createComment(""));var I=et?Ii(v):v.appendChild(wn());et&&(I===null?ho(!1):Ti(I)),o(v,I)}bt.nodes_end=v,p.before(v)})),s=g,s&&(u=s),pu(!0),sf(T)}},65536),l&&(ho(!0),Ti(p))}var lf;function rh(t){return lf=t.target,new af(t)}var Ps,Vr,af=class{constructor(e){Xs(this,Ps);Xs(this,Vr);var a,l;var i=new Map,o=(d,s)=>{var u=ds(s,!1,!1);return i.set(d,u),u};let r=new Proxy(Gt(Ie({},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 v;return O((v=i.get(s))!=null?v:o(s,u),u),Reflect.set(d,s,u)}});dl(this,Vr,(e.hydrate?of:Xr)(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,Ps,r.$$events);for(let d of Object.keys(Ri(this,Vr)))d==="$set"||d==="$destroy"||d==="$on"||vo(this,d,{get(){return Ri(this,Vr)[d]},set(s){Ri(this,Vr)[d]=s},enumerable:!0});Ri(this,Vr).$set=d=>{Object.assign(r,d)},Ri(this,Vr).$destroy=()=>{Ma(Ri(this,Vr))}}$set(e){Ri(this,Vr).$set(e)}$on(e,i){Ri(this,Ps)[e]=Ri(this,Ps)[e]||[];let o=(...r)=>i.call(this,...r);return Ri(this,Ps)[e].push(o),()=>{Ri(this,Ps)[e]=Ri(this,Ps)[e].filter(r=>r!==o)}}$destroy(){Ri(this,Vr).$destroy()}};Ps=new WeakMap,Vr=new WeakMap;function q(t,e){Sn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=lf)==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),Ee&&th(e.hash,d)}})}function As(t,e){var i=void 0,o;Qi(()=>{i!==(i=e())&&(o&&(Ki(o),o=null),i&&(o=Ni(()=>{No(()=>i(t))})))})}function sh(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=sh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function ah(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=sh(t))&&(o&&(o+=" "),o+=e);return o}function Sd(t){return typeof t=="object"?ah(t):t!=null?t:""}var lh=[...`
|
|
44
|
+
\r\f \v\uFEFF`];function ch(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||lh.includes(o[l-1]))&&(d===o.length||lh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function dh(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 df(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function uh(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(df)),r&&s.push(...Object.keys(r).map(df));var u=0,v=-1;let g=t.length;for(var p=0;p<g;p++){var f=t[p];if(d?f==="/"&&t[p-1]==="*"&&(d=!1):a?a===f&&(a=!1):f==="/"&&t[p+1]==="*"?d=!0:f==='"'||f==="'"?a=f:f==="("?l++:f===")"&&l--,!d&&a===!1&&l===0){if(f===":"&&v===-1)v=p;else if(f===";"||p===g-1){if(v!==-1){var $=df(t.substring(u,v).trim());if(!s.includes($)){f!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,v=-1}}}}return o&&(i+=dh(o)),r&&(i+=dh(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=ch(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 cf(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=uh(e,o);(!et||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(cf(t,i==null?void 0:i[0],o[0]),cf(t,i==null?void 0:i[1],o[1],"important")):cf(t,i,o));return o}function Td(t,e,i){if(t.multiple){if(e==null)return;if(!ur(e))return Eg();for(var o of t.options)o.selected=e.includes(ph(o));return}for(o of t.options){var r=ph(o);if(Rp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function uf(t){var e=new MutationObserver(()=>{Td(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ro(()=>{e.disconnect()})}function ph(t){return"__value"in t?t.__value:t.value}var El=Symbol("class"),kl=Symbol("style"),vh=Symbol("is custom element"),gh=Symbol("is html");function hh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var r=bh(t);if(et&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Z$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[sg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&$h(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function _h(t,e,i,o,r=!1){var k;var a=bh(t),l=a[vh],d=!a[gh];let s=et&&l;s&&ho(!1);var u=e||{},v=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Sd(i.class):(o||i[El])&&(i.class=null),i[kl]&&((k=i.style)!=null||(i.style=null));var f=$h(t);for(let E in i){let A=i[E];if(v&&E==="value"&&A==null){t.value=t.__value="",u[E]=A;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,A,o,e==null?void 0:e[El],i[El]),u[E]=A,u[El]=i[El];continue}if(E==="style"){Qe(t,A,e==null?void 0:e[kl],i[kl]),u[E]=A,u[kl]=i[kl];continue}var y=u[E];if(!(A===y&&!(A===void 0&&t.hasAttribute(E)))){u[E]=A;var g=E[0]+E[1];if(g!=="$$")if(g==="on"){let Q={},H="$$"+E,z=E.slice(2);var w=Yg(z);if(Gg(z)&&(z=z.slice(0,-7),Q.capture=!0),!w&&y){if(A!=null)continue;t.removeEventListener(z,u[H],Q),u[H]=null}if(A!=null)if(w)t[`__${z}`]=A,Ze([z]);else{let Y=function(le){u[E].call(this,le)};var N=Y;u[H]=ef(z,t,Y,Q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Ve(t,E,A);else if(E==="autofocus")Zp(t,!!A);else if(!l&&(E==="__value"||E==="value"&&A!=null))t.value=t.__value=A;else if(E==="selected"&&v)hh(t,A);else{var T=E;d||(T=jg(T));var I=T==="defaultValue"||T==="defaultChecked";if(A==null&&!l&&!I)if(a[E]=null,T==="value"||T==="checked"){let Q=t,H=e===void 0;if(T==="value"){let z=Q.defaultValue;Q.removeAttribute(T),Q.defaultValue=z,Q.value=Q.__value=H?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(T),Q.defaultChecked=z,Q.checked=H?z:!1}}else t.removeAttribute(E);else I||f.includes(T)&&(l||typeof A!="string")?t[T]=A:typeof A!="function"&&Ve(t,T,A,r)}}}return s&&ho(!0),u}function oo(t,e,i=[],o,r=!1,a=Gr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",v=!1;if(Qi(()=>{var f=e(...l.map(n)),$=_h(t,d,f,o,r);v&&u&&"value"in f&&Td(t,f.value,!1);for(let g of Object.getOwnPropertySymbols(s))f[g]||Ki(s[g]);for(let g of Object.getOwnPropertySymbols(f)){var y=f[g];g.description===Ip&&(!d||y!==d[g])&&(s[g]&&Ki(s[g]),s[g]=Ni(()=>As(t,()=>y))),$[g]=y}d=$}),u){var p=t;No(()=>{Td(p,d.value),uf(p)})}v=!0}function bh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[vh]:t.nodeName.includes("-"),[gh]:t.namespaceURI===Jv}}var fh=new Map;function $h(t){var e=fh.get(t.nodeName);if(e)return e;fh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Wc(o);for(var a in i)i[a].set&&e.push(a);o=xa(o)}return e}function Z$(t,e,i){var o;Ee&&(e==="srcset"&&J$(t,i)||pf((o=t.getAttribute(e))!=null?o:"",i)||Tg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function pf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function mh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function J$(t,e){var i=mh(t.srcset),o=mh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(pf(i[l][0],r)||pf(r,i[l][0])))}var ey=zc?()=>performance.now():()=>Date.now(),Zr={tick:t=>(zc?requestAnimationFrame:gt)(t),now:()=>ey(),tasks:new Set};function yh(){let t=Zr.now();Zr.tasks.forEach(e=>{e.c(t)||(Zr.tasks.delete(e),e.f())}),Zr.tasks.size!==0&&Zr.tick(yh)}function xh(t){let e;return Zr.tasks.size===0&&Zr.tick(yh),{promise:new Promise(i=>{Zr.tasks.add(e={c:t,f:i})}),abort(){Zr.tasks.delete(e)}}}function fu(t,e){$d(()=>{t.dispatchEvent(new CustomEvent(e))})}function ny(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 wh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=ny(r.trim());e[l]=a.trim()}return e}var ry=t=>t;function Jr(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,v=e.inert,p=e.style.overflow,f,$;function y(){var A;var k=Ot,E=bt;Wi(null),go(null);try{return u!=null?u:u=i()(e,(A=o==null?void 0:o())!=null?A:{},{direction:s})}finally{Wi(k),go(E)}}var g={is_global:d,in(){var k;if(e.inert=v,!r){$==null||$.abort(),(k=$==null?void 0:$.reset)==null||k.call($);return}a||f==null||f.abort(),fu(e,"introstart"),f=ff(e,y(),$,1,()=>{fu(e,"introend"),f==null||f.abort(),f=u=void 0,e.style.overflow=p})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,fu(e,"outrostart"),$=ff(e,y(),f,0,()=>{fu(e,"outroend"),k==null||k()})},stop:()=>{f==null||f.abort(),$==null||$.abort()}},w=bt;if(((N=w.transitions)!=null?N:w.transitions=[]).push(g),r&&yd){var T=d;if(!T){for(var I=w.parent;I&&(I.f&65536)!==0;)for(;(I=I.parent)&&(I.f&16)===0;);T=!I||(I.f&32768)!==0}T&&No(()=>{Ct(()=>g.in())})}}function ff(t,e,i,o,r){var a=o===1;if(ea(e)){var l,d=!1;return Sn(()=>{if(!d){var w=e({direction:a?"in":"out"});l=ff(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:v,easing:p=ry}=e;var f=[];if(a&&i===void 0&&(v&&v(0,1),u)){var $=wh(u(0,1));f.push($,$)}var y=()=>1-o,g=t.animate(f,{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 T=o-w,I=e.duration*Math.abs(T),N=[];if(I>0){var k=!1;if(u)for(var E=Math.ceil(I/16.666666666666668),A=0;A<=E;A+=1){var Q=w+T*p(A/E),H=wh(u(Q,1-Q));N.push(H),k||(k=H.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var Y=g.currentTime;return w+T*p(Y/I)},v&&xh(()=>{if(g.playState!=="running")return!1;var Y=y();return v(Y,1-Y),!0})}g=t.animate(N,{duration:I,fill:"forwards"}),g.onfinish=()=>{y=()=>o,v==null||v(o,1-o),r()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=gt)},deactivate:()=>{r=gt},reset:()=>{o===0&&(v==null||v(1,0))},t:()=>y()}}function mf(t,e,i){var o=Go(t,e);o&&o.set&&(t[e]=i,Ro(()=>{t[e]=null}))}var ra,Pl,Cd,vu,Sh,gu=class gu{constructor(e){Xs(this,vu);Xs(this,ra,new WeakMap);Xs(this,Pl);Xs(this,Cd);dl(this,Cd,e)}observe(e,i){var o=Ri(this,ra).get(e)||new Set;return o.add(i),Ri(this,ra).set(e,o),Xv(this,vu,Sh).call(this).observe(e,Ri(this,Cd)),()=>{var r=Ri(this,ra).get(e);r.delete(i),r.size===0&&(Ri(this,ra).delete(e),Ri(this,Pl).unobserve(e))}}};ra=new WeakMap,Pl=new WeakMap,Cd=new WeakMap,vu=new WeakSet,Sh=function(){var e;return(e=Ri(this,Pl))!=null?e:dl(this,Pl,new ResizeObserver(i=>{for(var o of i){gu.entries.set(o.target,o);for(var r of Ri(this,ra).get(o.target)||[])r(o)}}))},cr(gu,"entries",new WeakMap);var vf=gu;var sy=new vf({box:"border-box"});function Cn(t,e,i){var o=sy.observe(t,()=>i(t[e]));No(()=>(Ct(()=>i(t[e])),o))}function Th(t,e){return t===e||(t==null?void 0:t[Yo])===e}function je(t={},e,i,o){return No(()=>{var r,a;return Jo(()=>{r=a,a=(o==null?void 0:o())||[],Ct(()=>{t!==i(...a)&&(e(t,...a),r&&Th(i(...r),t)&&e(null,...r))})}),()=>{Sn(()=>{a&&Th(i(...a),t)&&e(null,...a)})}}),t}function wo(t=!1){let e=Kt,i=e.l.u;if(!i)return;let o=()=>du(e.s);if(t){let r=0,a={},l=Gr(()=>{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&&md(()=>{Ch(e,o),ta(i.b)}),Oe(()=>{let r=Ct(()=>i.m.map(rg));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{Ch(e,o),ta(i.a)})}function Ch(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Id(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 Rr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(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 Rr(i,(l,d)=>{let s=!1,u=[],v=0,p=gt,f=()=>{if(v)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:gt},$=r.map((y,g)=>Id(y,w=>{u[g]=w,v&=~(1<<g),s&&f()},()=>{v|=1<<g}));return s=!0,f(),function(){ta($),p(),s=!1}})}function ge(t){let e;return Id(t,i=>e=i)(),e}var hu=!1,gf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ds(void 0),unsubscribe:gt};if(o.store!==t&&!(gf 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=Id(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&gf in i?ge(t):n(o.source)}function Re(){let t={};function e(){Ro(()=>{for(var i in t)t[i].unsubscribe();vo(t,gf,{enumerable:!1,value:!0})})}return[t,e]}function hf(t){var e=hu;try{return hu=!1,[t(),hu]}finally{hu=e}}var fy={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ee&&gg(`${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 In(t,e,i){return new Proxy(Ee?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},fy)}var my={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=Go(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=Go(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Yo||e===cl)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 Ls(...t){return new Proxy({props:t},my)}function Ih(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=!ss||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=hf(()=>t[e]):u=t[e];var v=Yo in t||cl in t,p=l&&((H=(Q=Go(t,e))==null?void 0:Q.set)!=null?H:v&&e in t&&(z=>t[e]=z))||void 0,f=o,$=!0,y=!1,g=()=>(y=!0,$&&($=!1,d?f=Ct(o):f=o),f);u===void 0&&o!==void 0&&(p&&a&&vg(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 T=(r?Gr:yn)(()=>t[e]);T.f|=131072,w=()=>{var z=n(T);return z!==void 0&&(f=void 0),z===void 0?f:z}}if((i&4)===0&&a)return w;if(p){var I=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||I||s)&&p(Y?w():z),z):w()}}var N=!1,k=!1,E=ds(u),A=Gr(()=>{var z=w(),Y=n(E);return N?(N=!1,k=!0,Y):(k=!1,E.v=z)});return l&&n(A),r||(A.equals=fl),function(z,Y){if(au!==null&&(N=k,w(),n(E)),arguments.length>0){let le=Y?n(A):a&&l?ci(z):z;if(!A.equals(le)){if(N=!0,O(E,le),y&&f!==void 0&&(f=le),Ih(A))return z;Ct(()=>n(A))}return z}return Ih(A)?A.v:n(A)}}var vy;typeof HTMLElement=="function"&&(vy=class extends HTMLElement{constructor(e,i,o){super();cr(this,"$$ctor");cr(this,"$$s");cr(this,"$$c");cr(this,"$$cn",!1);cr(this,"$$d",{});cr(this,"$$r",!1);cr(this,"$$p_d",{});cr(this,"$$l",{});cr(this,"$$l_u",new Map);cr(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=gy(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]=_f(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=rh({component:this.$$ctor,target:this.shadowRoot||this,props:Gt(Ie({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=ou(()=>{Jo(()=>{var a;this.$$r=!0;for(let l of Ep(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=_f(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]=_f(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 Ep(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function _f(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 gy(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Eh="5";var kh,Ph,Ah;typeof window!="undefined"&&((Ah=(Ph=(kh=window.__svelte)!=null?kh:window.__svelte={}).v)!=null?Ah:Ph.v=new Set).add(Eh);import{areValidLiveRecordSources as RC,clientChecker as kv}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as Bb,safeStorage as NC,throttleFn as OC}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as DC}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as hy,fillWithDefault as _y,VideoQuality as Lh}from"@vkontakte/videoplayer-shared/es2015";var by={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:hy.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:Lh.Q_480P,highQualityLimit:Lh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!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"},Mh=t=>_y(t,by),Vh=t=>gl("ui-config",t),Vt=()=>vl("ui-config");var Ed="vk_player_debug_panel_opened";var Rh="videoplayer",Nh="videoplayer";var us={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Oh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Dh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Bh=new Set(["ShiftRight","ShiftLeft"]);var Fh=["TIMELINE"],kd=[...Fh,"GRAPH_BUTTON"],bf=[...Fh,"PLAY_BUTTON"],Pd=[...kd,"PLAY_BUTTON"];var ps=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ps||{}),Ad={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Hh,VERSION as $y}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as yy}from"@vkontakte/videoplayer-core/es2015";import{VERSION as xy}from"@vkontakte/videoplayer-statistics/es2015";var _u="prod",Ll="1.1.79";var Na=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Uh=Symbol("storeContext"),zh=Symbol("microStoresContext"),Wh=(t,e)=>{gl(Uh,t),gl(zh,e),_u==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=vl(Uh);return Hh(t,"Store context is empty!"),t},So=()=>{let t=vl(zh);return Hh(t,"MicroStores context is empty!"),t},si=(t,e)=>$u(t,t.getValue(),e),$u=(t,e,i)=>Rr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Kh=(t,e,i,o)=>{var Q,H,z,Y,le,X,re,Z,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=(Y=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?Y:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",v=`${Ll} (core: ${yy}, stat: ${xy}, shared: ${$y})`,p=ge(i.state.errorLog$),f=p.length?`
|
|
45
|
+
`+p.map((ue,ne)=>{var Ne;let _e=`${ne}) Type: ${ue.id}
|
|
46
46
|
`,xe=`Message: ${ue.message} (${ue.thrown})
|
|
47
47
|
`,J=`Trace: ${(Ne=ue.thrown)==null?void 0:Ne.stack}
|
|
48
48
|
`;return _e+xe+J}).join(`
|
|
49
|
-
`):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),
|
|
50
|
-
`)},Wh=(t,e,i)=>{var W,H,z,Y;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:Ml,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 m=o.currentBuffer$.getValue(),f=o.isLive$.getValue(),p=o.liveBufferTime$.getValue();m&&(f&&p?l.buffer=m.end-p:l.buffer=Math.max(m.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let _=o.liveLatency$.getValue();_&&(l.liveLatency=_);let S=o.currentVideoSegmentLength$.getValue();S&&(l.currentVideoSegmentLength=S);let I=o.currentAudioSegmentLength$.getValue();I&&(l.currentAudioSegmentLength=I);let T=ge(i.vsid);typeof T=="string"&&(l.vsid=T);let N=(W=t.info.currentVideoStream$.getValue())==null?void 0:W.codec;N&&(l.videoCodec=N);let P=(H=t.info.currentAudioStream$.getValue())==null?void 0:H.codec;P&&(l.audioCodec=P),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let A=(Y=t.info.currentAudioStream$.getValue())==null?void 0:Y.language;return A&&(l.audioLanguage=A),l},Kh=(t,e)=>La(t,e,"mp4"),qh=t=>!t.type,Qh=t=>!!t.type,Gh=()=>{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 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 yf,safeStorage as Pi}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var w1="vk_player_",Yh="vk_player_prefer_traffic_saving_enabled",jh="vk_player_preferred_volume",Xh="vk_player_prefer_volume_mute",xf="vk_player_preferred_quality",_f="vk_player_preferred_default_quality_settings",bf="vk_player_preferred_quality_settings_by_video",Zh="vk_player_preferred_stream_language",Jh="vk_player_preferred_rate",e_="vk_player_preferred_autoplay_next",$f="vk_player_preferred_subtitles_language",t_="vk_player_user_video_prefs",i_=`${w1}preview_track_close_tooltip`,o_=t=>t>1?1:t<0?0:t,wf=t=>Pi.set(jh,o_(t).toString(10)),$u=()=>{let t=Pi.get(jh);return yf(t)?void 0:o_(parseFloat(t))},Sf=(t,e)=>Pi.set(xf,JSON.stringify({videoId:t,value:e})),yu=()=>Pi.remove(xf),Cf=t=>{let e=Pi.get(xf);if(yf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){yu();return}return o},n_=(t,e)=>{e?Pi.set(t,"true"):Pi.remove(t)},Tf=t=>Pi.get(t)==="true",If=t=>n_(Xh,t),r_=()=>Tf(Xh),Ld=t=>n_(Yh,t),Ef=()=>Tf(Yh),s_=()=>Pi.get(Zh),Pf=t=>Pi.set(Zh,t),kf=()=>Pi.get($f),Af=t=>{t?Pi.set($f,t):Pi.remove($f)},a_=t=>Pi.set(Jh,JSON.stringify({rate:t})),l_=()=>{let t=Pi.get(Jh);if(yf(t))return;let{rate:e}=JSON.parse(t);return e},d_=t=>{Pi.set(e_,String(t))},c_=()=>Tf(e_),S1=()=>{let t=m=>{Pi.set(_f,JSON.stringify(m))},e=()=>{try{let m=Pi.get(_f);return m?JSON.parse(m):null}catch(m){return null}},i=()=>{try{let m=Pi.get(bf);return m?JSON.parse(m):null}catch(m){return null}},o=m=>{Pi.set(bf,JSON.stringify(m))},r=m=>{u(m);let f=m?i():null;if(f&&(f==null?void 0:f.videoId)===m)return Gt(Ie({},f),{appliesTo:"to-video"});f&&a();let p=e();return p?Gt(Ie({},p),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Pi.remove(bf)},l=()=>{Pi.remove(_f)},d=(m,f="as-default")=>{m.type==="exact_quality"||f==="to-video"?o(m):t(m)},s=m=>{let f=r(m);if(f){switch(f.type){case"traffic_saving":Ld(!0);break;case"exact_quality":Sf(m,f.quality)}a(),l()}},u=m=>{let f=Cf(m);if(f){o({type:"exact_quality",videoId:m,quality:f});return}Ef()&&t({type:"traffic_saving",videoId:m}),Ld(!1),yu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:kf,savePreferredSubtitlesLanguage:Af}},{getPreferredQualitySettings:u_,migrateSettingsToLegacyWay:p_,savePreferredQualitySettings:xu,savePreferredDefaultQualitySettings:JV,removePreferredQualitySettingsByVideo:eR,getPreferredDefaultQualitySettings:wu}=S1(),C1=3,T1=3,f_=()=>{let t=Pi.get(t_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Su=(t,e)=>{var r,a;let i=f_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Lf=(t,e,i)=>{var l,d,s;let o=(l=f_())!=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=I1(o);Pi.set(t_,JSON.stringify(a))};function I1(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(T1),e.reduce((o,[r])=>(o[r]=E1(t[r]),o),{})}function E1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(C1),Object.fromEntries(e)}function m_(){Pi.set(i_,JSON.stringify(!0))}function v_(){let t=Pi.get(i_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Vb}from"@vkontakte/videoplayer-core/es2015";bg();var ea="var(--btn-color, #fff)";var P1=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),k1=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 Xe(t,e){var m;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,ea),a=(m=e.viewBox)!=null?m:`0 0 ${i()} ${o()}`;var l=k1(),d=C(l);{var s=f=>{var p=P1(),$=de(p),y=C($);ri(y,()=>e.children),w($),ui(),b(f,p)},u=f=>{var p=Le(),$=de(p);ri($,()=>e.children),b(f,p)};R(d,f=>{e.shadow?f(s):f(u,!1)})}w(l),D(()=>{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()),Qe(l,e.style),Ve(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as __,InterfaceLanguage as b_}from"@vkontakte/videoplayer-shared/es2015";var A1={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:`Видео грузится слишком медленно,
|
|
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: ${(le=y==null?void 0:y.codec)!=null?le:""}`+(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 T=r.currentQuality$.getValue(),I="";if(T){let ue=r.availableQualitiesFps$.getValue()[T];I=ue?`${ue}fps`:""}let N=r.httpConnectionType$.getValue(),k=(Z=(re=r.currentBuffer$.getValue())==null?void 0:re.end)!=null?Z:0,E=Math.max(k-ge(i.state.positionExact$),0),A={Version:v,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} ${T!=null?T:""} ${I}`,"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:f};return Object.entries(A).filter(([ue,ne])=>ne!==void 0).map(([ue,ne])=>`${ue}: ${ne}`).join(`
|
|
50
|
+
`)},qh=(t,e,i)=>{var Q,H,z,Y;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 v=o.currentBuffer$.getValue(),p=o.isLive$.getValue(),f=o.liveBufferTime$.getValue();v&&(p&&f?l.buffer=v.end-f:l.buffer=Math.max(v.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let g=o.liveLatency$.getValue();g&&(l.liveLatency=g);let w=o.currentVideoSegmentLength$.getValue();w&&(l.currentVideoSegmentLength=w);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let I=ge(i.vsid);typeof I=="string"&&(l.vsid=I);let N=(Q=t.info.currentVideoStream$.getValue())==null?void 0:Q.codec;N&&(l.videoCodec=N);let k=(H=t.info.currentAudioStream$.getValue())==null?void 0:H.codec;k&&(l.audioCodec=k),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let A=(Y=t.info.currentAudioStream$.getValue())==null?void 0:Y.language;return A&&(l.audioLanguage=A),l},Qh=(t,e)=>Na(t,e,"mp4"),Gh=t=>!t.type,Yh=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)}},bu=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 wf,safeStorage as Ei}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-core/es2015";var wy="vk_player_",Xh="vk_player_prefer_traffic_saving_enabled",Zh="vk_player_preferred_volume",Jh="vk_player_prefer_volume_mute",Sf="vk_player_preferred_quality",$f="vk_player_preferred_default_quality_settings",yf="vk_player_preferred_quality_settings_by_video",e_="vk_player_preferred_stream_language",t_="vk_player_preferred_rate",i_="vk_player_preferred_autoplay_next",xf="vk_player_preferred_subtitles_language",o_="vk_player_user_video_prefs",n_=`${wy}preview_track_close_tooltip`,r_=t=>t>1?1:t<0?0:t,Tf=t=>Ei.set(Zh,r_(t).toString(10)),yu=()=>{let t=Ei.get(Zh);return wf(t)?void 0:r_(parseFloat(t))},Cf=(t,e)=>Ei.set(Sf,JSON.stringify({videoId:t,value:e})),xu=()=>Ei.remove(Sf),If=t=>{let e=Ei.get(Sf);if(wf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){xu();return}return o},s_=(t,e)=>{e?Ei.set(t,"true"):Ei.remove(t)},Ef=t=>Ei.get(t)==="true",kf=t=>s_(Jh,t),a_=()=>Ef(Jh),Ld=t=>s_(Xh,t),Pf=()=>Ef(Xh),l_=()=>Ei.get(e_),Af=t=>Ei.set(e_,t),Lf=()=>Ei.get(xf),Mf=t=>{t?Ei.set(xf,t):Ei.remove(xf)},d_=t=>Ei.set(t_,JSON.stringify({rate:t})),c_=()=>{let t=Ei.get(t_);if(wf(t))return;let{rate:e}=JSON.parse(t);return e},u_=t=>{Ei.set(i_,String(t))},p_=()=>Ef(i_),Sy=()=>{let t=v=>{Ei.set($f,JSON.stringify(v))},e=()=>{try{let v=Ei.get($f);return v?JSON.parse(v):null}catch(v){return null}},i=()=>{try{let v=Ei.get(yf);return v?JSON.parse(v):null}catch(v){return null}},o=v=>{Ei.set(yf,JSON.stringify(v))},r=v=>{u(v);let p=v?i():null;if(p&&(p==null?void 0:p.videoId)===v)return Gt(Ie({},p),{appliesTo:"to-video"});p&&a();let f=e();return f?Gt(Ie({},f),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ei.remove(yf)},l=()=>{Ei.remove($f)},d=(v,p="as-default")=>{v.type==="exact_quality"||p==="to-video"?o(v):t(v)},s=v=>{let p=r(v);if(p){switch(p.type){case"traffic_saving":Ld(!0);break;case"exact_quality":Cf(v,p.quality)}a(),l()}},u=v=>{let p=If(v);if(p){o({type:"exact_quality",videoId:v,quality:p});return}Pf()&&t({type:"traffic_saving",videoId:v}),Ld(!1),xu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Lf,savePreferredSubtitlesLanguage:Mf}},{getPreferredQualitySettings:f_,migrateSettingsToLegacyWay:m_,savePreferredQualitySettings:wu,savePreferredDefaultQualitySettings:eN,removePreferredQualitySettingsByVideo:tN,getPreferredDefaultQualitySettings:Su}=Sy(),Ty=3,Cy=3,v_=()=>{let t=Ei.get(o_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Tu=(t,e)=>{var r,a;let i=v_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},Vf=(t,e,i)=>{var l,d,s;let o=(l=v_())!=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=Iy(o);Ei.set(o_,JSON.stringify(a))};function Iy(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(Cy),e.reduce((o,[r])=>(o[r]=Ey(t[r]),o),{})}function Ey(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(Ty),Object.fromEntries(e)}function g_(){Ei.set(n_,JSON.stringify(!0))}function h_(){let t=Ei.get(n_);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Nb}from"@vkontakte/videoplayer-core/es2015";yg();var sa="var(--btn-color, #fff)";var ky=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),Py=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 Xe(t,e){var v;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,sa),a=(v=e.viewBox)!=null?v:`0 0 ${i()} ${o()}`;var l=Py(),d=C(l);{var s=p=>{var f=ky(),$=de(f),y=C($);ri(y,()=>e.children),S($),fi(),b(p,f)},u=p=>{var f=Le(),$=de(f);ri($,()=>e.children),b(p,f)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{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()),Qe(l,e.style),Ve(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as $_,InterfaceLanguage as y_}from"@vkontakte/videoplayer-shared/es2015";var Ay={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:"Выйти из режима точной перемотки"},
|
|
52
|
+
попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},__=Ay;var Ly={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"},
|
|
55
|
-
`),o,r;for(let a=0;a<i.length;++a){if(o=
|
|
56
|
-
`).filter(i=>!!i)[0]}function F1(t){try{let e=B1(t);if(e)return e}catch(e){}return{value:y_(t),type:t&&t.name,stacktrace:{frames:[]}}}function H1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Tu=class{constructor(e){if(e&&e.dsn){let i=D1.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(Ie({},this.getRequestBlank()),{exception:{values:[F1(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(O1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:H1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function x_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function U1(){return window}var Iu=class t extends Tu{constructor(e,i=U1()){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",Ie({},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",Ie({},e)),this}setUser(e){return this.setKeyState("user",Ie({},e)),this}clone(){let e=new t(Gt(Ie({},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:[Ie({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(Gt(Ie({},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=>x_(i,o))):!1}getRequestBlank(){return Ie(Gt(Ie({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(Ie({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=>x_(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(Ie({},i),{[o]:a||d?[...a||[],...d||[]]:Ie(Ie({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Eu,Subscription as z1}from"@vkontakte/videoplayer-shared/es2015";var Pu=null,Ma=class{constructor(e,i,o={}){!Pu&&e.dsn&&(this.sentryClient=new Iu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new z1,this.options=e,this.context=o,Pu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Pu=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:f}=l,{errorType:p,category:$}=i;if(Eu($)&&f.includes($)||Eu(p)&&m.includes(p))return;if(Math.random()<=d||Eu($)&&u.includes($)||Eu(p)&&s.includes(p)){Object.keys(i).length&&r.setTags(Ie({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ie(Ie({},a),o));try{p&&r.captureMessage(p,i.fatal?Vl.fatal:Vl.error),r.report(e)}catch(_){console.error(_)}}}static getInstance(){return Pu}};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 ku=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()},Au=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),w_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,S_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Vd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ta=()=>!!Vd(),Lu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Mu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},C_=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 T_}from"@vkontakte/videoplayer-core/es2015";var I_=()=>({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:T_.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:T_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as W1,ValueSubject as Nf}from"@vkontakte/videoplayer-shared/es2015";var Va=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:W1(this.onResize.bind(this),300)};this.info={isActive$:new Nf(!1),isEnabled$:new Nf(!1),type:0};this.info.isEnabled$=new Nf(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=Ie({},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 Ra(t){return t instanceof Va}import{devNull as E_,now as P_}from"@vkontakte/videoplayer-shared/es2015";function Df(t,e){B(e,!1);let i=ve();Mt(()=>{i.getAdmanWrapper().startPostroll()}),xo(),F()}import{noop as Q1}from"@vkontakte/videoplayer-shared/es2015";var K1=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>'),q1=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 Mr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=v(()=>["up","down"].includes(i())),a=v(()=>["right","down"].includes(i())),l=v(()=>`chevron-icon--${i()}`),d=v(()=>(()=>{let m="";return n(a)&&(m+="transform: rotate(180deg);"),m.length?m:void 0})()),s=v(()=>o()?ea:"currentColor"),u=v(()=>n(r)?"7":"16");Xe(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,f)=>{var p=Le(),$=de(p);{var y=S=>{var I=K1();b(S,I)},_=S=>{var I=q1();b(S,I)};R($,S=>{n(r)?S(y):S(_,!1)})}b(m,p)},$$slots:{default:!0}}),F()}var G1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},Y1=M('<div class="skip s-17"> <!></div>'),j1=M("<div><!></div>"),X1={hash:"s-17",code:".container.s-17{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-17{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-17{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-17{color:var(--white);cursor:pointer}.skippable.s-17:hover{color:hsla(0,0%,100%,.75)}"};function Bf(t,e){B(e,!0),Q(t,X1);let[i,o]=Re(),r=()=>x(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,Q1),u=ve().ui.isMobile,m=v(()=>a()>0&&a()>=l());var f=j1();let p;f.__click=[G1,m,d];var $=C(f);{var y=S=>{var I=Y1(),T=C(I),N=L(T);Mr(N,{direction:"right"}),w(I),D(P=>me(T,`${P!=null?P:""} `),[()=>G("skip_ads_now")]),b(S,I)},_=S=>{var I=fs();D(T=>me(I,T),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(S,I)};R($,S=>{n(m)?S(y):S(_,!1)})}w(f),D(S=>p=se(f,1,"container s-17",null,p,S),[()=>({"container-mobile":r(),skippable:n(m)})]),b(t,f),F(),o()}tt(["click"]);var Z1=M('<button class="go-to-site s-16"> </button>'),J1={hash:"s-16",code:"button.go-to-site.s-16{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 Ff(t,e){B(e,!1),Q(t,J1),xo();var i=Z1(),o=C(i,!0);w(i),D(r=>me(o,r),[()=>G("visit_advertiser")],wn),b(t,i),F()}var ey=M('<div class="top-gradient-mobile s-j"></div>'),ty=M('<div class="container s-j"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),iy={hash:"s-j",code:".container.s-j{height:100%;width:100%}.top-gradient-mobile.s-j{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 Nd(t,e){B(e,!0),Q(t,iy);let[i,o]=Re(),r=()=>x(H,"$canSkipAd",i),a=()=>x(W,"$adPlaybackState",i),l=()=>x(T,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(Y,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),m=g(e,"adsSlotId",3,void 0),f=g(e,"adsParams",3,void 0),p=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),_=ve(),S=Vt(),I=_.state.isEnded$,T=_.ui.isMobile,N=S.ads.isMobileGoToSiteButton,P=q(void 0),E=q(void 0),A=!1,W=_.ads.playbackState,H=_.ads.canSkip,z=_.ads.position,Y=_.ads.secondsToWatchBeforeSkip,ae=v(()=>r()&&a()!=="inactive"),j=v(()=>l()&&a()!=="inactive"&&N);Mt(()=>{let k=_.getAdmanWrapper();if(E_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[P_(),m()]}),!m()){k.onAdmanLoadingError();return}let We=()=>{var Pe;let{width:De,height:Be}=ge(_.ui.playerSize),it=ge(_.ui.isFullscreen),U=(Pe=p())!=null?Pe:ge(_.ui.isAutoplay),Ae=S.ads.paramsOverride;return{width:De,height:Be,isFullscreen:it,isAutoplay:U,adsContainer:n(P),adsVideoElement:n(E),slotId:m(),params:f(),paramsOverride:Ae,duration:$(),externalApi:y()}},Te=De=>mt(null,null,function*(){De&&(yield _o());let Be=We();yield k.initAdman(Be),A=!0}),X=new AbortController,ie=()=>{X.abort()};return window.AdmanHTML?Te(!0).catch(()=>{k.onAdmanLoadingError()}):k.loadAdman(X.signal).then(()=>Te(!1)).catch(()=>{k.onAdmanLoadingError()}),()=>{E_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[P_(),m()]}),!A&&ie()}});var ne=ty(),Z=C(ne);{var we=k=>{var We=ey();b(k,We)};R(Z,k=>{l()&&k(we)})}var ue=L(Z,2);je(ue,k=>O(E,k),()=>n(E));var re=L(ue,2);{var _e=k=>{Bf(k,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return _.actions.internal.skipAd}})};R(re,k=>{n(ae)&&k(_e)})}var xe=L(re,2);{var J=k=>{Df(k,{})};R(xe,k=>{u()&&k(J)})}var Ne=L(xe,2);{var pe=k=>{Ff(k,{})};R(Ne,k=>{n(j)&&k(pe)})}w(ne),je(ne,k=>O(P,k),()=>n(P)),b(t,ne),F(),o()}var Xo=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 oy=Ce('<path fill="#fff"></path>'),ny=Ce("<path></path><!>",1);function Od(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"live-active-icon":"live-icon"),r=v(()=>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";Xe(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=ny(),u=de(s),m=L(u);{var f=p=>{var $=oy();Ve($,"d",a),b(p,$)};R(m,p=>{i()&&p(f)})}D(()=>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`)),b(l,s)},$$slots:{default:!0}})}var ry=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>'),sy=M('<div class="live-icon s-d"><!></div>'),ay=M('<span class="text s-d"> </span>'),ly=M("<div><!> <!></div>"),dy={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 Dd(t,e){Q(t,dy);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=ly();let l;var d=C(a);{var s=p=>{var $=ry();b(p,$)};R(d,p=>{i()&&p(s)})}var u=L(d,2);{var m=p=>{var $=sy(),y=C($);Od(y,{isActive:!0}),w($),b(p,$)},f=p=>{var $=ay(),y=C($,!0);w($),D(()=>me(y,e.time)),b(p,$)};R(u,p=>{o()?p(m):p(f,!1)})}w(a),D(p=>l=se(a,1,"wrapper s-d",null,l,p),[()=>({live:o(),playing:r()})]),b(t,a)}var Rl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var cy=M('<div role="timer" data-testid="thumb-timer"><!></div>'),uy={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 Bd(t,e){B(e,!0),Q(t,uy);let[i,o]=Re(),r=()=>x(m,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=Vt(),u=v(()=>Xo(e.duration-e.position)),m=le(!1);var f=cy();let p;var $=C(f);Dd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),w(f),Ps(f,()=>Rl(a()&&s.features.usePerformanceFix,m,s.disableInvisibleComponentsTimeout)),D(y=>p=se(f,1,"thumb-timer s-i",null,p,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,f),F(),o()}var Nl=t=>{if(!navigator.clipboard){k_(t);return}navigator.clipboard.writeText(t).catch(()=>k_(t))};function k_(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 xy}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as A_}from"@vkontakte/videoplayer-core/es2015";var Hf="focus-hidden";var Vr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Hf)},fy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},my=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},vy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},gy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},L_=t=>t.code==="Escape",hy=t=>t.code==="ArrowLeft",Fd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},M_=t=>{vy(t)?(Vr(t),my(t.target)):gy(t)&&(Vr(t),fy(t.target))},na=t=>!A_.device.isAndroid&&(t==null?void 0:t.detail)===0||A_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ol=(t,e,i)=>mt(null,null,function*(){yield _o(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield _o(),i.set(!1),t.focus())}),V_=(t,e,i)=>mt(null,null,function*(){yield _o(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),Hd=(t,e,i,o=!1)=>mt(null,null,function*(){if(yield _o(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Hf,!i),a==null||a.focus()}}),R_=(t,e)=>mt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Vu=(t,e)=>{M_(t),Uf(t.target),L_(t)&&(Vr(t),e())},Ru=(t,e)=>mt(null,null,function*(){Fd(t,["ArrowRight"])&&(Vr(t),e())}),N_=(t,e,i)=>mt(null,null,function*(){if(M_(t),hy(t)){Vr(t),e();return}L_(t)&&(Vr(t),i())}),Dl=(t,e)=>{Fd(t)&&(Vr(t),e())},O_=(t,e,i)=>{if(Fd(t))Vr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Vr(t);return}o==="ArrowRight"&&!e&&(i(!0),Vr(t))}},D_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},B_=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 Nu,isValidURL as wy}from"@vkontakte/videoplayer-shared/es2015";var Jr={"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 F_}from"@vkontakte/videoplayer-shared/es2015";var by=(t,e)=>{Dl(t,()=>e())},$y=M('<li class="item s-1t" role="menuitem" tabindex="0"> </li>'),yy={hash:"s-1t",code:".item.s-1t{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-1t:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){B(e,!0),Q(t,yy);let i=g(e,"onClick",3,F_),o=g(e,"closeContextMenu",3,F_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=$y();a.__click=r,a.__keydown=[by,r];var l=C(a,!0);w(a),D(()=>{var d;Ve(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ve(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}tt(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Ud=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Ud||{});var Sy=(t,e)=>{Vu(t,e)},Cy=t=>{t.preventDefault()},Ty=M('<ul role="menu" class="s-1a"></ul>'),Iy={hash:"s-1a",code:"ul.s-1a{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 Wf(t,e){B(e,!0),Q(t,Iy);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(ae,"$isLive$",i),l=()=>x(ue,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),s=()=>x(re,"$pictureInPictureApiIsActive$",i),u=()=>x(Z,"$isLooped$",i),m=()=>x(j,"$positionExact$",i),f=()=>x(W,"$additionalContextMenuItems$",i),p=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),_=g(e,"menuElementRef",15,void 0),S=q(0),I=q(0),T=ve(),{pictureInPicture$:N}=wo(),P=Vt(),E=T.ui.contextMenu.visible$,A=T.ui.debugPanelVisible,W=T.ui.additionalContextMenuItems$,H=T.ui.t,z=T.actions.internal.togglePictureInPicture,Y=T.state.chromecastState$,ae=T.state.isLive$,j=T.state.positionExact$,ne=T.state.isInteractive,Z=T.state.looped$,we=T.playerPhase,{isEnabled$:ue,isActive$:re}=N,_e=v(()=>r()==="video"),xe=v(()=>!!a()&&n(_e)),J=v(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=v(()=>{var ce;return P.features.copyVideoLink&&((ce=T.callbacks)==null?void 0:ce.onCopyVideoLink)}),pe=v(()=>n(Ne)&&!n(J)&&!ne&&!n(xe)),k=v(()=>{var ce;return!!((ce=T.callbacks)!=null&&ce.onCopyEmbedCodeClicked)}),We=v(()=>l()&&d()!==xy.CONNECTED&&!ne&&n(_e)),Te=v(()=>!ne&&!n(J)&&!n(xe)),X=v(()=>P.features.videoRotate&&!ne&&!n(J)),ie=v(()=>P.showSupport&&!s()),De=v(()=>P.features.saveTraceInfoToFile),Be=()=>{var ce;E.set(!1),(ce=e.returnFocus)==null||ce.call(e)},it=(ce,ze)=>{if(!_()||!y())return;let Ge=_().getBoundingClientRect(),at=y().getBoundingClientRect();O(S,ce-at.left),O(I,ze-at.top),n(S)+Ge.width>at.width&&O(S,at.width-Ge.width),n(I)+Ge.height>at.height&&O(I,at.height-Ge.height),O(S,Math.max(n(S),0),!0),O(I,Math.max(n(I),0),!0)};Oe(()=>{mt(null,null,function*(){if(_()&&y()){yield _o();let{top:ze,left:Ge,bottom:at,right:Ft}=$(),Ht=Ge!=null?Ge:0,oi=ze!=null?ze:0,yi=_().getBoundingClientRect();Nu(Ge)&&!Nu(Ft)&&(Ht=Ft-yi.width),Nu(ze)&&!Nu(at)&&(oi=at-yi.height),Ht=Math.max(Ht,0),oi=Math.max(oi,0),it(Ht,oi)}})});let U=()=>{T.actions.internal.videoRotate()},Ae=()=>{wy(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Pe=()=>{let ce=T.actions.internal.getDebugTextData();if(P.features.saveDebugInfoToFile){let ze=new Blob([...ce],{type:"plain/text"}),Ge=window.URL.createObjectURL(ze);La(Ge,"vk_player_debug_info","txt")}else Nl(T.actions.internal.getDebugTextData())},Ue=()=>{let ce=T.actions.internal.getTraceTextData(),ze=new Blob([...ce],{type:"application/json"}),Ge=window.URL.createObjectURL(ze);La(Ge,"vk_player_trace_info","json")},Ze=()=>{A.set(!0)},ye=()=>mt(null,null,function*(){var ce;try{z()}finally{(ce=e.returnFocus)==null||ce.call(e)}}),ke=()=>{T.actions.internal.setLooped(!u())},Fe=()=>{var ce,ze;if(n(k)){let Ge=(ze=(ce=T.callbacks)==null?void 0:ce.onCopyEmbedCodeClicked)==null?void 0:ze.call(ce);Ge&&Nl(Ge)}},Dt=(ce=!1)=>{var ze,Ge;if((ze=T.callbacks)!=null&&ze.onCopyVideoLink){let at=(Ge=T.callbacks)==null?void 0:Ge.onCopyVideoLink(ce,m());at&&Nl(at)}},pt=v(()=>P.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Bt=v(()=>n(Ne)?{id:"copy-link",weight:Jr["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Dt()}:void 0),st=v(()=>n(pe)?{id:"copy-link-timestamp",weight:Jr["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Dt(!0)}:void 0),St=v(()=>n(k)?{id:"copy-embed-code",weight:Jr["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Fe}:void 0),ti=v(()=>n(We)?{id:"pip",weight:Jr.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Rt=v(()=>n(Te)?{id:"video-loop",weight:Jr["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:ke}:void 0),$e=v(()=>n(X)?{id:"rotate",weight:Jr.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),be=v(()=>n(ie)?{id:"report",weight:Jr.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Ae}:void 0),ee=v(()=>({id:"save-debug",weight:Jr["save-debug"],label:n(pt),onClick:Pe})),ot=v(()=>n(De)?{id:"save-trace",weight:Jr["save-trace"],label:H("menu_save_debug"),onClick:Ue}:void 0),fe=v(()=>({id:"debug-info",weight:Jr["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:Ze})),Me=v(()=>[n(Bt),n(st),n(St),n(ti),n(Rt),n($e),n(be),n(ee),n(ot),n(fe),...f()].filter(ce=>!!ce).sort(Oa));var $t=Le(),kt=de($t);{var ct=ce=>{var ze=Ty();ze.__contextmenu=[Cy],ze.__keydown=[Sy,Be],wi(ze,21,()=>n(Me),Ge=>Ge.id,(Ge,at)=>{zf(Ge,{get id(){return n(at).id},get label(){return n(at).label},get ariaLabel(){return n(at).ariaLabel},get onClick(){return n(at).onClick},closeContextMenu:Be})}),w(ze),je(ze,Ge=>_(Ge),()=>_()),D(()=>{var Ge,at;return Qe(ze,`top: ${(Ge=n(I))!=null?Ge:""}px; left: ${(at=n(S))!=null?at:""}px;`)}),b(ce,ze)};R(kt,ce=>{p()&&ce(ct)})}b(t,$t),F(),o()}tt(["contextmenu","keydown"]);var Ou=class{constructor(e){this.value=e,this.next=null}};var Bl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Ou(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 Ey=M('<div class="container s-15"><canvas class="s-15"></canvas></div>'),Py={hash:"s-15",code:".container.s-15{display:inline-block;height:16px;width:120px}canvas.s-15{margin-top:2px;transform:scaleY(-1)}"};function zd(t,e){B(e,!0),Q(t,Py);let i=g(e,"values",19,()=>[]),o=q(void 0),r=q(null),a=16,l=120,d=60,s=l/d;Mt(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(p,$,y,_,S){S===0&&(S=1),p.fillStyle="#fff",p.fillRect($,y,_,S)}Oe(()=>{let p="";if(n(r)){let $=i()[0];for(let _=1;_<i().length;_++)i()[_]>$&&($=i()[_]);n(r).clearRect(0,0,l,a);let y=d-1;for(let _=i().length-1;_>=0;_--){let S=y*s,I=$>0?a*(i()[_]/$):0;u(n(r),S,0,s,I),p=I+" "+p,y--}}});var m=Ey(),f=C(m);je(f,p=>O(o,p),()=>n(o)),w(m),b(t,m),F()}import{safeStorage as H_}from"@vkontakte/videoplayer-shared/es2015";var ky=(t,e)=>{t.stopPropagation(),H_.remove(Ed),e.set(!1)},Ay=M('<div class="s-r"><div class="s-r">Video id</div> <span> </span></div>'),Ly=M('<div class="s-r"><div class="s-r">VSID</div> <span> </span></div>'),My=M('<div class="s-r"><div class="s-r">Provider</div> <span> </span></div>'),Vy=M('<div class="s-r"><div class="s-r">Streams</div> <span> </span></div>'),Ry=M('<div class="s-r"><div class="s-r">Viewport</div> <span> </span></div>'),Ny=M('<div class="s-r"><div class="s-r">Video size</div> <span> </span></div>'),Oy=M('<div class="s-r"><div class="s-r">CDN host</div> <span> </span></div>'),Dy=M('<div class="s-r"><div class="s-r">Volume</div> <span> </span></div>'),By=M('<div class="s-r"><div class="s-r">Position</div> <span> </span></div>'),Fy=M('<div class="s-r"><div class="s-r">Buffer</div> <span> </span></div>'),Hy=M('<div class="s-r"><div class="s-r">Live latency</div> <span> </span></div>'),Uy=M('<div class="s-r"><div class="s-r">Segment</div> <span> </span></div>'),zy=M('<div class="s-r"><div class="s-r">Network</div> <!> <span> </span></div>'),Wy=M('<div class="s-r"><div class="s-r">V bitrate</div> <!> <span> </span></div>'),Ky=M('<div role="region"><button class="close s-r" title="закрыть">[x]</button> <div class="content s-r"><div class="s-r"><div class="s-r">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-r"><div class="s-r">Dropped</div> <span> </span></div> <!> <!> <div class="s-r"><div class="s-r">FPS</div> <!> <span> </span></div></div></div>'),qy={hash:"s-r",code:".container.s-r{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-r{left:16px;top:16px}button.close.s-r{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-r{padding:5px}.content.s-r>div:where(.s-r)>div:where(.s-r){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Wd(t,e){B(e,!0),Q(t,qy);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=q(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),m=q(0),f=q(0),p=q(0),$=new Bl(60),y=new Bl(60),_=new Bl(60),S=q(ci([])),I=q(ci([])),T=q(ci([])),N=G("aria_label_debug_panel");Mt(()=>{H_.set(Ed,"true"),a.actions.internal.startLogging(),u&&(O(f,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(m,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),be;return u&&(be=window.setInterval(()=>{if(u){O(f,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=u.getVideoPlaybackQuality().totalVideoFrames;O(p,ee-n(m)),O(m,ee,!0),$.push(n(p)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&_.push(n(s).bitrate),O(S,$.getValuesFromBottom(),!0),O(I,y.getValuesFromBottom(),!0),O(T,_.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),be&&clearInterval(be)}});var P=Ky();let E;var A=C(P);A.__click=[ky,l];var W=L(A,2),H=C(W),z=L(C(H),2),Y=C(z,!0);w(z),w(H);var ae=L(H,2);{var j=$e=>{var be=Ay(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).id)),b($e,be)};R(ae,$e=>{n(s).id&&$e(j)})}var ne=L(ae,2);{var Z=$e=>{var be=Ly(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).vsid)),b($e,be)};R(ne,$e=>{n(s).vsid&&$e(Z)})}var we=L(ne,2);{var ue=$e=>{var be=My(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).provider)),b($e,be)};R(we,$e=>{n(s).provider&&$e(ue)})}var re=L(we,2);{var _e=$e=>{var be=Vy(),ee=L(C(be),2),ot=C(ee);w(ee),w(be),D(()=>{var fe,Me;return me(ot,`Video: ${(fe=n(s).videoCodec||"")!=null?fe:""} ${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"},b_=Ly;var Ms=new Map;Ms.set(y_.EN,b_);Ms.set(y_.RU,__);var x_=new Map,Rf=({language:t,pack:e,fallback:i})=>{if(Ms.has(t)){let o=Ms.get(t);Ms.set(t,Ie(Ie({},o),e))}else Ms.set(t,e);x_.set(t,i)},Nf=t=>Ms.has(t),Of=(t,e,i,o)=>{var l;let r=Ms.get(t),a=r==null?void 0:r[e];if($_(a)){let d=(l=x_.get(t))!=null?l:o,s=d?Ms.get(d):void 0;a=s==null?void 0:s[e]}return $_(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=Vt();return Of(o,t,e,r.defaultLanguage)};var My=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 Md(t,e){B(e,!1);let i=G("video360");wo(),Xe(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=My();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 Vy=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ry=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Ny=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Cu="?",Oy="X-Sentry-Auth",Dy=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function By(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=Vy.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Cu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=Ny.exec(i[a]))r={filename:o[2],function:o[1]||Cu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=Ry.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Cu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Cu),e.push(r)}return e.length?{value:w_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function w_(t){return(t&&t.message||"No error message").split(`
|
|
56
|
+
`).filter(i=>!!i)[0]}function Fy(t){try{let e=By(t);if(e)return e}catch(e){}return{value:w_(t),type:t&&t.name,stacktrace:{frames:[]}}}function Hy(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Iu=class{constructor(e){if(e&&e.dsn){let i=Dy.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(Ie({},this.getRequestBlank()),{exception:{values:[Fy(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(Oy,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:Hy(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function S_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function Uy(){return window}var Eu=class t extends Iu{constructor(e,i=Uy()){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",Ie({},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",Ie({},e)),this}setUser(e){return this.setKeyState("user",Ie({},e)),this}clone(){let e=new t(Gt(Ie({},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:[Ie({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(Gt(Ie({},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=>S_(i,o))):!1}getRequestBlank(){return Ie(Gt(Ie({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(Ie({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=>S_(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(Ie({},i),{[o]:a||d?[...a||[],...d||[]]:Ie(Ie({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as ku,Subscription as zy}from"@vkontakte/videoplayer-shared/es2015";var Pu=null,Oa=class{constructor(e,i,o={}){!Pu&&e.dsn&&(this.sentryClient=new Eu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new zy,this.options=e,this.context=o,Pu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Pu=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:v,blackErrorCategoryList:p}=l,{errorType:f,category:$}=i;if(ku($)&&p.includes($)||ku(f)&&v.includes(f))return;if(Math.random()<=d||ku($)&&u.includes($)||ku(f)&&s.includes(f)){Object.keys(i).length&&r.setTags(Ie({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ie(Ie({},a),o));try{f&&r.captureMessage(f,i.fatal?Ml.fatal:Ml.error),r.report(e)}catch(g){console.error(g)}}}static getInstance(){return Pu}};var fs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(fs||{});var Au=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()},Lu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),T_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,C_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Vd=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},aa=()=>!!Vd(),Mu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Vu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},I_=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 E_}from"@vkontakte/videoplayer-core/es2015";var k_=()=>({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:E_.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:E_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as Wy,ValueSubject as Df}from"@vkontakte/videoplayer-shared/es2015";var Da=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:Wy(this.onResize.bind(this),300)};this.info={isActive$:new Df(!1),isEnabled$:new Df(!1),type:0};this.info.isEnabled$=new Df(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=Ie({},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 Ba(t){return t instanceof Da}import{devNull as P_,now as A_}from"@vkontakte/videoplayer-shared/es2015";function Ff(t,e){B(e,!1);let i=ve();Mt(()=>{i.getAdmanWrapper().startPostroll()}),wo(),F()}import{noop as Qy}from"@vkontakte/videoplayer-shared/es2015";var Ky=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>'),qy=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 Nr(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 v="";return n(a)&&(v+="transform: rotate(180deg);"),v.length?v:void 0})()),s=m(()=>o()?sa:"currentColor"),u=m(()=>n(r)?"7":"16");Xe(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(v,p)=>{var f=Le(),$=de(f);{var y=w=>{var T=Ky();b(w,T)},g=w=>{var T=qy();b(w,T)};R($,w=>{n(r)?w(y):w(g,!1)})}b(v,f)},$$slots:{default:!0}}),F()}var Gy=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},Yy=M('<div class="skip s-1i"> <!></div>'),jy=M("<div><!></div>"),Xy={hash:"s-1i",code:".container.s-1i{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-1i{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1i{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1i{color:var(--white);cursor:pointer}.skippable.s-1i:hover{color:hsla(0,0%,100%,.75)}"};function Hf(t,e){B(e,!0),q(t,Xy);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,Qy),u=ve().ui.isMobile,v=m(()=>a()>0&&a()>=l());var p=jy();let f;p.__click=[Gy,v,d];var $=C(p);{var y=w=>{var T=Yy(),I=C(T),N=L(I);Nr(N,{direction:"right"}),S(T),D(k=>me(I,`${k!=null?k:""} `),[()=>G("skip_ads_now")]),b(w,T)},g=w=>{var T=cs();D(I=>me(T,I),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(w,T)};R($,w=>{n(v)?w(y):w(g,!1)})}S(p),D(w=>f=se(p,1,"container s-1i",null,f,w),[()=>({"container-mobile":r(),skippable:n(v)})]),b(t,p),F(),o()}Ze(["click"]);var Zy=M('<button class="go-to-site s-1h"> </button>'),Jy={hash:"s-1h",code:"button.go-to-site.s-1h{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 Uf(t,e){B(e,!1),q(t,Jy),wo();var i=Zy(),o=C(i,!0);S(i),D(r=>me(o,r),[()=>G("visit_advertiser")],yn),b(t,i),F()}var e1=M('<div class="top-gradient-mobile s-l"></div>'),t1=M('<div class="container s-l"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),i1={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 Nd(t,e){B(e,!0),q(t,i1);let[i,o]=Re(),r=()=>x(H,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(I,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(Y,"$secondsToWatchBeforeSkipAd",i),u=()=>x(T,"$isVideoEnded",i),v=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),f=h(e,"adsAutoplayParam",3,void 0),$=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),g=ve(),w=Vt(),T=g.state.isEnded$,I=g.ui.isMobile,N=w.ads.isMobileGoToSiteButton,k=W(void 0),E=W(void 0),A=!1,Q=g.ads.playbackState,H=g.ads.canSkip,z=g.ads.position,Y=g.ads.secondsToWatchBeforeSkip,le=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);Mt(()=>{let P=g.getAdmanWrapper();if(P_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[A_(),v()]}),!v()){P.onAdmanLoadingError();return}let Ke=()=>{var ke;let{width:De,height:Be}=ge(g.ui.playerSize),it=ge(g.ui.isFullscreen),U=(ke=f())!=null?ke:ge(g.ui.isAutoplay),Ae=w.ads.paramsOverride;return{width:De,height:Be,isFullscreen:it,isAutoplay:U,adsContainer:n(k),adsVideoElement:n(E),slotId:v(),params:p(),paramsOverride:Ae,duration:$(),externalApi:y()}},Te=De=>vt(null,null,function*(){De&&(yield _o());let Be=Ke();yield P.initAdman(Be),A=!0}),j=new AbortController,ie=()=>{j.abort()};return window.AdmanHTML?Te(!0).catch(()=>{P.onAdmanLoadingError()}):P.loadAdman(j.signal).then(()=>Te(!1)).catch(()=>{P.onAdmanLoadingError()}),()=>{P_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[A_(),v()]}),!A&&ie()}});var re=t1(),Z=C(re);{var we=P=>{var Ke=e1();b(P,Ke)};R(Z,P=>{l()&&P(we)})}var ue=L(Z,2);je(ue,P=>O(E,P),()=>n(E));var ne=L(ue,2);{var _e=P=>{Hf(P,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return g.actions.internal.skipAd}})};R(ne,P=>{n(le)&&P(_e)})}var xe=L(ne,2);{var J=P=>{Ff(P,{})};R(xe,P=>{u()&&P(J)})}var Ne=L(xe,2);{var pe=P=>{Uf(P,{})};R(Ne,P=>{n(X)&&P(pe)})}S(re),je(re,P=>O(k,P),()=>n(k)),b(t,re),F(),o()}var en=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 o1=Ce('<path fill="#fff"></path>'),n1=Ce("<path></path><!>",1);function Od(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";Xe(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=n1(),u=de(s),v=L(u);{var p=f=>{var $=o1();Ve($,"d",a),b(f,$)};R(v,f=>{i()&&f(p)})}D(()=>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`)),b(l,s)},$$slots:{default:!0}})}var r1=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>'),s1=M('<div class="live-icon s-d"><!></div>'),a1=M('<span class="text s-d"> </span>'),l1=M("<div><!> <!></div>"),d1={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 Dd(t,e){q(t,d1);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=l1();let l;var d=C(a);{var s=f=>{var $=r1();b(f,$)};R(d,f=>{i()&&f(s)})}var u=L(d,2);{var v=f=>{var $=s1(),y=C($);Od(y,{isActive:!0}),S($),b(f,$)},p=f=>{var $=a1(),y=C($,!0);S($),D(()=>me(y,e.time)),b(f,$)};R(u,f=>{o()?f(v):f(p,!1)})}S(a),D(f=>l=se(a,1,"wrapper s-d",null,l,f),[()=>({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 c1=M('<div role="timer" data-testid="thumb-timer"><!></div>'),u1={hash:"s-o",code:".thumb-timer.s-o{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 Bd(t,e){B(e,!0),q(t,u1);let[i,o]=Re(),r=()=>x(v,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Vt(),u=m(()=>en(e.duration-e.position)),v=ae(!1);var p=c1();let f;var $=C(p);Dd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),As(p,()=>Vl(a()&&s.features.usePerformanceFix,v,s.disableInvisibleComponentsTimeout)),D(y=>f=se(p,1,"thumb-timer s-o",null,f,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Rl=t=>{if(!navigator.clipboard){L_(t);return}navigator.clipboard.writeText(t).catch(()=>L_(t))};function L_(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 x1}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as M_}from"@vkontakte/videoplayer-core/es2015";var zf="focus-hidden";var Or=t=>{t.stopPropagation(),t.preventDefault()},Wf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(zf)},f1=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},m1=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},v1=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},g1=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},V_=t=>t.code==="Escape",h1=t=>t.code==="ArrowLeft",Fd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},R_=t=>{v1(t)?(Or(t),m1(t.target)):g1(t)&&(Or(t),f1(t.target))},ca=t=>!M_.device.isAndroid&&(t==null?void 0:t.detail)===0||M_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Nl=(t,e,i)=>vt(null,null,function*(){yield _o(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield _o(),i.set(!1),t.focus())}),N_=(t,e,i)=>vt(null,null,function*(){yield _o(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),Hd=(t,e,i,o=!1)=>vt(null,null,function*(){if(yield _o(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(zf,!i),a==null||a.focus()}}),O_=(t,e)=>vt(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Ru=(t,e)=>{R_(t),Wf(t.target),V_(t)&&(Or(t),e())},Nu=(t,e)=>vt(null,null,function*(){Fd(t,["ArrowRight"])&&(Or(t),e())}),D_=(t,e,i)=>vt(null,null,function*(){if(R_(t),h1(t)){Or(t),e();return}V_(t)&&(Or(t),i())}),Ol=(t,e)=>{Fd(t)&&(Or(t),e())},B_=(t,e,i)=>{if(Fd(t))Or(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Or(t);return}o==="ArrowRight"&&!e&&(i(!0),Or(t))}},F_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},H_=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 Ou,isValidURL as w1}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 U_}from"@vkontakte/videoplayer-shared/es2015";var b1=(t,e)=>{Ol(t,()=>e())},$1=M('<li class="item s-1l" role="menuitem" tabindex="0"> </li>'),y1={hash:"s-1l",code:".item.s-1l{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-1l:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Kf(t,e){B(e,!0),q(t,y1);let i=h(e,"onClick",3,U_),o=h(e,"closeContextMenu",3,U_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=$1();a.__click=r,a.__keydown=[b1,r];var l=C(a,!0);S(a),D(()=>{var d;Ve(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ve(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}Ze(["click","keydown"]);var Ha=(t,e)=>t.weight-e.weight;var Ud=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Ud||{});var S1=(t,e)=>{Ru(t,e)},T1=t=>{t.preventDefault()},C1=M('<ul role="menu" class="s-q"></ul>'),I1={hash:"s-q",code:"ul.s-q{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,I1);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(le,"$isLive$",i),l=()=>x(ue,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),s=()=>x(ne,"$pictureInPictureApiIsActive$",i),u=()=>x(Z,"$isLooped$",i),v=()=>x(X,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),f=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=W(0),T=W(0),I=ve(),{pictureInPicture$:N}=So(),k=Vt(),E=I.ui.contextMenu.visible$,A=I.ui.debugPanelVisible,Q=I.ui.additionalContextMenuItems$,H=I.ui.t,z=I.actions.internal.togglePictureInPicture,Y=I.state.chromecastState$,le=I.state.isLive$,X=I.state.positionExact$,re=I.state.isInteractive,Z=I.state.looped$,we=I.playerPhase,{isEnabled$:ue,isActive$:ne}=N,_e=m(()=>r()==="video"),xe=m(()=>!!a()&&n(_e)),J=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=m(()=>{var ce;return k.features.copyVideoLink&&((ce=I.callbacks)==null?void 0:ce.onCopyVideoLink)}),pe=m(()=>n(Ne)&&!n(J)&&!re&&!n(xe)),P=m(()=>{var ce;return!!((ce=I.callbacks)!=null&&ce.onCopyEmbedCodeClicked)}),Ke=m(()=>l()&&d()!==x1.CONNECTED&&!re&&n(_e)),Te=m(()=>!re&&!n(J)&&!n(xe)),j=m(()=>k.features.videoRotate&&!re&&!n(J)),ie=m(()=>k.showSupport&&!s()),De=m(()=>k.features.saveTraceInfoToFile),Be=()=>{var ce;E.set(!1),(ce=e.returnFocus)==null||ce.call(e)},it=(ce,We)=>{if(!g()||!y())return;let Ge=g().getBoundingClientRect(),lt=y().getBoundingClientRect();O(w,ce-lt.left),O(T,We-lt.top),n(w)+Ge.width>lt.width&&O(w,lt.width-Ge.width),n(T)+Ge.height>lt.height&&O(T,lt.height-Ge.height),O(w,Math.max(n(w),0),!0),O(T,Math.max(n(T),0),!0)};Oe(()=>{vt(null,null,function*(){if(g()&&y()){yield _o();let{top:We,left:Ge,bottom:lt,right:Ft}=$(),Ht=Ge!=null?Ge:0,ni=We!=null?We:0,_i=g().getBoundingClientRect();Ou(Ge)&&!Ou(Ft)&&(Ht=Ft-_i.width),Ou(We)&&!Ou(lt)&&(ni=lt-_i.height),Ht=Math.max(Ht,0),ni=Math.max(ni,0),it(Ht,ni)}})});let U=()=>{I.actions.internal.videoRotate()},Ae=()=>{w1(e.supportLink)&&window.open(e.supportLink,"_blank"),I.actions.internal.reportProblem(),I.actions.internal.pause()},ke=()=>{let ce=I.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let We=new Blob([...ce],{type:"plain/text"}),Ge=window.URL.createObjectURL(We);Na(Ge,"vk_player_debug_info","txt")}else Rl(I.actions.internal.getDebugTextData())},ze=()=>{let ce=I.actions.internal.getTraceTextData(),We=new Blob([...ce],{type:"application/json"}),Ge=window.URL.createObjectURL(We);Na(Ge,"vk_player_trace_info","json")},Je=()=>{A.set(!0)},ye=()=>vt(null,null,function*(){var ce;try{z()}finally{(ce=e.returnFocus)==null||ce.call(e)}}),Pe=()=>{I.actions.internal.setLooped(!u())},Fe=()=>{var ce,We;if(n(P)){let Ge=(We=(ce=I.callbacks)==null?void 0:ce.onCopyEmbedCodeClicked)==null?void 0:We.call(ce);Ge&&Rl(Ge)}},Dt=(ce=!1)=>{var We,Ge;if((We=I.callbacks)!=null&&We.onCopyVideoLink){let lt=(Ge=I.callbacks)==null?void 0:Ge.onCopyVideoLink(ce,v());lt&&Rl(lt)}},ft=m(()=>k.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:()=>Dt()}:void 0),at=m(()=>n(pe)?{id:"copy-link-timestamp",weight:es["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Dt(!0)}:void 0),St=m(()=>n(P)?{id:"copy-embed-code",weight:es["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Fe}:void 0),oi=m(()=>n(Ke)?{id:"pip",weight:es.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Rt=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:Pe}:void 0),$e=m(()=>n(j)?{id:"rotate",weight:es.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),be=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),ee=m(()=>({id:"save-debug",weight:es["save-debug"],label:n(ft),onClick:ke})),ot=m(()=>n(De)?{id:"save-trace",weight:es["save-trace"],label:H("menu_save_debug"),onClick:ze}:void 0),fe=m(()=>({id:"debug-info",weight:es["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:Je})),Me=m(()=>[n(Bt),n(at),n(St),n(oi),n(Rt),n($e),n(be),n(ee),n(ot),n(fe),...p()].filter(ce=>!!ce).sort(Ha));var yt=Le(),Pt=de(yt);{var pt=ce=>{var We=C1();We.__contextmenu=[T1],We.__keydown=[S1,Be],bi(We,21,()=>n(Me),Ge=>Ge.id,(Ge,lt)=>{Kf(Ge,{get id(){return n(lt).id},get label(){return n(lt).label},get ariaLabel(){return n(lt).ariaLabel},get onClick(){return n(lt).onClick},closeContextMenu:Be})}),S(We),je(We,Ge=>g(Ge),()=>g()),D(()=>{var Ge,lt;return Qe(We,`top: ${(Ge=n(T))!=null?Ge:""}px; left: ${(lt=n(w))!=null?lt:""}px;`)}),b(ce,We)};R(Pt,ce=>{f()&&ce(pt)})}b(t,yt),F(),o()}Ze(["contextmenu","keydown"]);var Du=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 Du(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 E1=M('<div class="container s-1g"><canvas class="s-1g"></canvas></div>'),k1={hash:"s-1g",code:".container.s-1g{display:inline-block;height:16px;width:120px}canvas.s-1g{margin-top:2px;transform:scaleY(-1)}"};function zd(t,e){B(e,!0),q(t,k1);let i=h(e,"values",19,()=>[]),o=W(void 0),r=W(null),a=16,l=120,d=60,s=l/d;Mt(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(f,$,y,g,w){w===0&&(w=1),f.fillStyle="#fff",f.fillRect($,y,g,w)}Oe(()=>{let f="";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,T=$>0?a*(i()[g]/$):0;u(n(r),w,0,s,T),f=T+" "+f,y--}}});var v=E1(),p=C(v);je(p,f=>O(o,f),()=>n(o)),S(v),b(t,v),F()}import{safeStorage as z_}from"@vkontakte/videoplayer-shared/es2015";var P1=(t,e)=>{t.stopPropagation(),z_.remove(Ed),e.set(!1)},A1=M('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),L1=M('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),M1=M('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),V1=M('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),R1=M('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),N1=M('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),O1=M('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),D1=M('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),B1=M('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),F1=M('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),H1=M('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),U1=M('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),z1=M('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),W1=M('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),K1=M('<div role="region"><button class="close s-k" title="закрыть">[x]</button> <div class="content s-k"><div class="s-k"><div class="s-k">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-k"><div class="s-k">Dropped</div> <span> </span></div> <!> <!> <div class="s-k"><div class="s-k">FPS</div> <!> <span> </span></div></div></div>'),q1={hash:"s-k",code:".container.s-k{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-k{left:16px;top:16px}button.close.s-k{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-k{padding:5px}.content.s-k>div:where(.s-k)>div:where(.s-k){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Wd(t,e){B(e,!0),q(t,q1);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=W(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),v=W(0),p=W(0),f=W(0),$=new Dl(60),y=new Dl(60),g=new Dl(60),w=W(ci([])),T=W(ci([])),I=W(ci([])),N=G("aria_label_debug_panel");Mt(()=>{z_.set(Ed,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(v,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),be;return u&&(be=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=u.getVideoPlaybackQuality().totalVideoFrames;O(f,ee-n(v)),O(v,ee,!0),$.push(n(f)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&g.push(n(s).bitrate),O(w,$.getValuesFromBottom(),!0),O(T,y.getValuesFromBottom(),!0),O(I,g.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),be&&clearInterval(be)}});var k=K1();let E;var A=C(k);A.__click=[P1,l];var Q=L(A,2),H=C(Q),z=L(C(H),2),Y=C(z,!0);S(z),S(H);var le=L(H,2);{var X=$e=>{var be=A1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(()=>me(ot,n(s).id)),b($e,be)};R(le,$e=>{n(s).id&&$e(X)})}var re=L(le,2);{var Z=$e=>{var be=L1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(()=>me(ot,n(s).vsid)),b($e,be)};R(re,$e=>{n(s).vsid&&$e(Z)})}var we=L(re,2);{var ue=$e=>{var be=M1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(()=>me(ot,n(s).provider)),b($e,be)};R(we,$e=>{n(s).provider&&$e(ue)})}var ne=L(we,2);{var _e=$e=>{var be=V1(),ee=L(C(be),2),ot=C(ee);S(ee),S(be),D(()=>{var fe,Me;return me(ot,`Video: ${(fe=n(s).videoCodec||"")!=null?fe:""} ${n(s).hdr?"(HDR)":""}
|
|
57
57
|
&
|
|
58
|
-
Audio: ${(Me=n(s).audioCodec||"")!=null?Me:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b($e,be)};R(re,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(_e)})}var xe=L(re,2);{var J=$e=>{var be=Ry(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).viewport)),b($e,be)};R(xe,$e=>{n(s).viewport&&$e(J)})}var Ne=L(xe,2);{var pe=$e=>{var be=Ny(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).videoSize)),b($e,be)};R(Ne,$e=>{n(s).videoSize&&$e(pe)})}var k=L(Ne,2);{var We=$e=>{var be=Oy(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(()=>me(ot,n(s).cdn)),b($e,be)};R(k,$e=>{n(s).cdn&&$e(We)})}var Te=L(k,2);{var X=$e=>{var be=Dy(),ee=L(C(be),2),ot=C(ee);w(ee),w(be),D(()=>{var fe;return me(ot,`${(fe=n(s).volume)!=null?fe:""} %`)}),b($e,be)};R(Te,$e=>{n(s).volume&&$e(X)})}var ie=L(Te,2);{var De=$e=>{var be=By(),ee=L(C(be),2),ot=C(ee);w(ee),w(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).position.toFixed(2)]),b($e,be)};R(ie,$e=>{n(s).position&&$e(De)})}var Be=L(ie,2);{var it=$e=>{var be=Fy(),ee=L(C(be),2),ot=C(ee);w(ee),w(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b($e,be)};R(Be,$e=>{n(s).buffer&&$e(it)})}var U=L(Be,2);{var Ae=$e=>{var be=Hy(),ee=L(C(be),2),ot=C(ee);w(ee),w(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b($e,be)};R(U,$e=>{n(s).liveLatency&&$e(Ae)})}var Pe=L(U,2);{var Ue=$e=>{var be=Uy(),ee=L(C(be),2),ot=C(ee,!0);w(ee),w(be),D(fe=>me(ot,fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:fe})=>fe).map(({value:fe,title:Me})=>`${Me} ${((fe!=null?fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b($e,be)};R(Pe,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(Ue)})}var Ze=L(Pe,2),ye=L(C(Ze),2),ke=C(ye);w(ye),w(Ze);var Fe=L(Ze,2);{var Dt=$e=>{var be=zy(),ee=L(C(be),2);zd(ee,{get values(){return n(I)}});var ot=L(ee,2),fe=C(ot);w(ot),w(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b($e,be)};R(Fe,$e=>{n(s).speed&&$e(Dt)})}var pt=L(Fe,2);{var Bt=$e=>{var be=Wy(),ee=L(C(be),2);zd(ee,{get values(){return n(T)}});var ot=L(ee,2),fe=C(ot);w(ot),w(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b($e,be)};R(pt,$e=>{n(s).bitrate&&$e(Bt)})}var st=L(pt,2),St=L(C(st),2);zd(St,{get values(){return n(S)}});var ti=L(St,2),Rt=C(ti,!0);w(ti),w(st),w(W),w(P),D($e=>{var be,ee;E=se(P,1,"container s-r",null,E,$e),Ve(P,"aria-label",N),me(Y,n(s).version),me(ke,`${(be=n(f))!=null?be:""} / ${(ee=n(m))!=null?ee:""} frames`),me(Rt,n(p))},[()=>({"container-mobile":r()})]),b(t,P),F(),o()}tt(["click"]);import{noop as Qy}from"@vkontakte/videoplayer-shared/es2015";var Gy=(t,e)=>{t.stopPropagation(),e()()},Yy=M('<div class="close s-z"></div>'),jy={hash:"s-z",code:'.close.s-z{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-z:hover{opacity:1}.close.s-z:after,.close.s-z:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-z:before{transform:rotate(45deg)}.close.s-z:after{transform:rotate(-45deg)}'};function As(t,e){B(e,!0),Q(t,jy);let i=g(e,"onClick",3,Qy);var o=Yy();o.__click=[Gy,i],b(t,o),F()}tt(["click"]);import{noop as Zy}from"@vkontakte/videoplayer-shared/es2015";var fn=t=>`width:${t}px;height:${t}px;`;var Xy=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 kn(t,e){B(e,!0);let i=v(()=>fn(e.size));Xe(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=Xy();b(o,a)},$$slots:{default:!0}}),F()}var Jy=M('<div class="timer s-10"><canvas class="timer-canvas s-10" width="100" height="100"></canvas> <!></div>'),e0={hash:"s-10",code:".timer.s-10{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-10:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-10{height:50px;position:absolute;width:50px}"};function Kd(t,e){B(e,!0),Q(t,e0);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,Zy),r=5e3,a=q(void 0),l,d,s=0,u;Oe(()=>{i()&&It(()=>{d=Date.now(),s=requestAnimationFrame(f)})});let m=()=>{s&&(cancelAnimationFrame(s),s=0)},f=()=>{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(f)):o()())};Mt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),pn(()=>{m()});var p=Jy(),$=C(p);je($,_=>O(a,_),()=>n(a));var y=L($,2);kn(y,{get size(){return"24"}}),w(p),b(t,p),F()}var t0=(t,e,i)=>{e(!1),i()},i0=M('<div class="overlay s-1c"></div> <div class="next-video s-1c"><div class="top s-1c"><div class="caption s-1c"> </div> <!></div> <div class="row s-1c"><div class="column s-1c"><div class="thumb s-1c"><div></div> <!></div></div> <div class="column s-1c"><div class="title s-1c"> </div></div></div></div>',1),o0={hash:"s-1c",code:".overlay.s-1c{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-1c{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-1c{display:flex;justify-content:space-between}.caption.s-1c{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-1c{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-1c{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-1c{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-1c,.thumb-overlay.s-1c{height:100%;width:100%}.thumb-overlay.s-1c{position:absolute}.thumb-overlay.withOpacity.s-1c{background:var(--black);opacity:.3}.title.s-1c{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Kf(t,e){B(e,!0),Q(t,o0);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,m=l.actions.internal.nextVideoAnnouncementShow,f=l.actions.internal.nextVideoAnnouncementClick,p=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),p())},_=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),p())});var S=Le(),I=de(S);{var T=N=>{var P=i0(),E=L(de(P),2),A=C(E),W=C(A),H=C(W,!0);w(W);var z=L(W,2);As(z,{onClick:_}),w(A);var Y=L(A,2);Y.__click=[t0,u,f];var ae=C(Y),j=C(ae),ne=C(j);let Z;var we=L(ne,2);{var ue=J=>{let Ne=v(()=>a()&&r());Kd(J,{get isRunning(){return n(Ne)},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}w(j),w(ae);var re=L(ae,2),_e=C(re),xe=C(_e,!0);w(_e),w(re),w(Y),w(E),D((J,Ne)=>{me(H,J),Qe(j,`background-image: url('${e.thumb}')`),Z=se(ne,1,"thumb-overlay s-1c",null,Z,Ne),me(xe,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,P)};R(I,N=>{e.isHide||N(T)})}b(t,S),F(),o()}tt(["click"]);import{PlaybackState as Da}from"@vkontakte/videoplayer-core/es2015";import{checkNever as r0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as jn}from"@vkontakte/videoplayer-statistics/es2015";var qf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Qf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Du=(t,e,i)=>{let o=qf(e,i);e<1&&t.actions.internal.setVolume(o)},Bu=(t,e,i)=>{let o=Qf(e,i);e>0&&t.actions.internal.setVolume(o)};var ra=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Fu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var s0=(t,e)=>{e(t)},a0=M('<div class="keyboard-controls s-1e" tabindex="-1" role="region"><!></div>'),l0={hash:"s-1e",code:".keyboard-controls.s-1e{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var ee,ot;B(e,!0),Q(t,l0);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(We,"$isEnded$",i),u=()=>x(pe,"$doubleForwardAvailable$",i),m=()=>x(Ne,"$doubleForwardOn$",i),f=()=>x(Te,"$overlayContainer$",i),p=()=>x(ae,"$adPlaybackState",i),$=()=>x(j,"$positionExact$",i),y=()=>x(ne,"$duration$",i),_=()=>x(De,"$isAudioAvailable$",i),S=()=>x(Z,"$volume$",i),I=()=>x(Y,"$canChangePlaybackSpeed$",i),T=()=>x(ue,"$muted$",i),N=()=>x(re,"$currentSubtitle$",i),P=g(e,"nextButtonActive",3,!1),E=g(e,"prevButtonActive",3,!1),A=ve(),W=Vt(),H=A.getLogger().createComponentLog("KeyboardControls component"),z=A.state.playbackState$,Y=A.state.canChangePlaybackSpeed$,ae=A.ads.playbackState,j=A.state.positionExact$,ne=A.state.duration$,Z=A.state.volume$,we=A.ui.controls.disabledControls$,ue=A.state.muted$,re=A.state.currentSubtitle$,_e=A.ui.contextMenu.openedByHotKey$,xe=A.ui.contextMenu.lastActiveElem$,J=A.ui.contextMenu.visible$,Ne=A.ui.doubleForwardOn$,pe=A.ui.doubleForwardAvailable$,k=A.ui.contextMenu.position$,We=A.state.isEnded$,Te=A.ui.overlayContainer$,X=(ee=A.callbacks)==null?void 0:ee.onAudioDoesNotExistHint,ie=(ot=A.callbacks)==null?void 0:ot.onAudioDisabledHint,De=A.state.isAudioAvailable$,Be=A.state.isAudioDisabled,it=A.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=wo(),Ae=0,Pe=!0,Ue=q(void 0),Ze=fe=>(fe!==Pe&&(Pe=fe,Ae=0),Ae+=1,(W.controls.seekStepKeyboard+W.controls.seekStepKeyboard*Ae)/1e3),ye=!0,ke=({type:fe,repeat:Me,disableDoubleForward:$t})=>{let kt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{A.actions.internal.togglePlay();let ce="PLAY";d()===Da.PAUSED?ce="PAUSE":s()&&(ce="REPLAY"),e.showHotKeyHelpers({type:ce})}},ct=fe==="down";if(!u()||$t){ct&&kt(),ye=!0;return}if(ct)ye=!1;else if(ye)return;if(ct){!Me&&e.startDoubleForwardActivationTimer();return}m()||kt(),e.stopDoubleForward(),ye=!0},Fe=fe=>{let Me=B_(f());k.set(Me),xe.set(fe.target),_e.set(!0),J.set(!0)},Dt=(fe,Me=!1)=>{var mi,hi;let $t=fe.target,kt=(mi=$t==null?void 0:$t.getAttribute("role"))==null?void 0:mi.includes("menuitem"),ct=$t.classList.contains("btn"),ce=fe.code;if(ct&&ce==="Space")return!1;let ze=Nh.has(ce);if(kt&&ze)return!1;let Ge=!Rh.has(ce);if(fe.ctrlKey&&Ge||fe.altKey&&Ge||fe.metaKey)return!1;let at=kt&&ce==="Escape";Oh.has(ce)||at||e.hideContextMenu();let Ft=d()===Da.PLAYING||d()===Da.PAUSED,Ht=e.isAds&&(p()==="paused"||p()==="playing"),oi=!Ht&&!r().has("TIMELINE"),yi=fe.shiftKey&&["Digit1","Numpad1"].includes(ce);if(!yi&&!(Ft||Ht))return!1;H({message:`key down, code: ${ce}, isExternal = ${Me}`});let ji=!1,Nt=()=>{ji=!0,Me||fe.preventDefault()};if(yi)return Fe(fe),Nt(),!0;switch(ce){case"KeyJ":case"ArrowLeft":{if(!oi)break;if(fe.ctrlKey||fe.altKey){let ht=A.actions.internal.getPrevEpisode();A.actions.internal.seekToPrevEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ht.text}),Nt()}else{let ht=fe.shiftKey?Ze(!1):W.controls.seekStepKeyboard/1e3,Xt=Math.max($()-ht,0);$()>0&&(A.actions.internal.seekTime(Xt,jn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ht.toString()}),Nt())}break}case"KeyL":case"ArrowRight":{if(!oi)break;if(fe.ctrlKey||fe.altKey){let ht=A.actions.internal.getNextEpisode();A.actions.internal.seekToNextEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ht.text}),Nt()}else{let ht=fe.shiftKey?Ze(!0):W.controls.seekStepKeyboard/1e3,Xt=Math.min($()+ht,y());Math.round($())<Math.round(y())&&(A.actions.internal.seekTime(Xt,jn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ht.toString()}),Nt())}break}case"ArrowUp":{if(ra({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:X,isAds:e.isAds})){let ht=S(),Xt=W.controls.volumeStepKeyboard,Si=ht<=1;if(Du(A,ht,Xt),Si){let Xi=Math.round(qf(ht,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Xi}})}}Nt();break}case"ArrowDown":{if(ra({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:X,isAds:e.isAds})){let ht=S(),Xt=W.controls.volumeStepKeyboard,Si=ht>=0;if(Bu(A,ht,Xt),Si){let Xi=Math.round(Qf(ht,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Xi}})}}Nt();break}case"Comma":{if(fe.shiftKey){if(!m()&&I()){let ht=A.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ht==null?void 0:ht.displayValue}),Nt()}}else{if(Ht||d()!==Da.PAUSED)break;let ht=Math.max($()-W.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(ht,jn.DOUBLE_TAP),Nt())}break}case"Period":{if(fe.shiftKey){if(!m()&&I()){let ht=A.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ht==null?void 0:ht.displayValue}),Nt()}}else{if(Ht||d()!==Da.PAUSED)break;let ht=Math.min($()+W.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(ht,jn.DOUBLE_TAP),Nt())}break}case"KeyK":case"Space":ke({type:"down",repeat:fe.repeat,disableDoubleForward:"KeyK"===ce}),Nt();break;case"KeyM":{ra({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:_(),audioIsNotExistHintCallback:X,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),A.actions.internal.toggleMuted()),Nt();break}case"KeyF":e.toggleFullscreen(),Nt();break;case"KeyC":A.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(hi=N())==null?void 0:hi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Nt();break;case"KeyI":A.actions.internal.togglePictureInPicture(),Nt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.1,jn.DOUBLE_TAP),Nt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.2,jn.DOUBLE_TAP),Nt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.3,jn.DOUBLE_TAP),Nt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.4,jn.DOUBLE_TAP),Nt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.5,jn.DOUBLE_TAP),Nt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.6,jn.DOUBLE_TAP),Nt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.7,jn.DOUBLE_TAP),Nt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.8,jn.DOUBLE_TAP),Nt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.9,jn.DOUBLE_TAP),Nt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(0,jn.DOUBLE_TAP),Nt();break;case"Slash":{fe.shiftKey&&W.features.hotKeyMapModal&&(e.showKeyMap(),Nt());break}case"KeyN":fe.shiftKey&&P()&&(A.actions.internal.nextVideoClick(),Nt());break;case"KeyP":fe.shiftKey&&E()&&(A.actions.internal.prevVideoClick(),Nt());break;case"ShiftLeft":case"ShiftRight":Nt();break;case"Tab":case"Escape":case"Enter":break;default:r0(ce);break}return ji},pt=fe=>{let Me=fe.code;if(fe.ctrlKey||fe.altKey||fe.metaKey)return;let $t=d()===Da.PLAYING||d()===Da.PAUSED,kt=e.isAds&&(p()==="paused"||p()==="playing");if($t||kt)switch(Me){case"ShiftLeft":case"ShiftRight":Ae=0;break;case"Space":ke({type:"up"});break}},Bt=G("aria_label_video_player"),st=()=>{var fe;return(fe=n(Ue))==null?void 0:fe.focus()},St=()=>n(Ue)===Fu(),ti=fe=>fe.type==="keydown"?Dt(fe,!0):(fe.type==="keyup"&&pt(fe),!1);var Rt=a0();Rt.__keyup=pt,Rt.__keydown=[s0,Dt];var $e=C(Rt);ri($e,()=>{var fe;return(fe=e.children)!=null?fe:vt}),w(Rt),je(Rt,fe=>O(Ue,fe),()=>n(Ue)),D(()=>Ve(Rt,"aria-label",Bt)),b(t,Rt);var be=F({focus:st,isFocused:St,handleExternalKeyboardEvent:ti});return o(),be}tt(["keyup","keydown"]);var d0=M('<div class="container s-p"><div class="dot s-p"></div> <div class="dot s-p"></div> <div class="dot s-p"></div></div>'),c0={hash:"s-p",code:".container.s-p{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-p:first-child{animation-delay:0s}.dot.s-p:nth-child(2){animation-delay:.18s}.dot.s-p:nth-child(3){animation-delay:.36s}@keyframes s-p-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-p{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-p-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-p+.dot:where(.s-p){margin-left:4px}"};function Ba(t,e){Q(t,c0);let i=g(e,"style",3,"");var o=d0();D(()=>Qe(o,i())),b(t,o)}var u0=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 Yf(t,e){Xe(t,{get fill(){return e.fill},children:(i,o)=>{var r=u0();b(i,r)},$$slots:{default:!0}})}import{noop as Fl}from"@vkontakte/videoplayer-shared/es2015";var p0=t=>{t.stopPropagation()},f0=M("<button><!></button>"),m0={hash:"s-1x",code:"button.btn.s-1x{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-1x{width:100%}button.btn--live.s-1x{padding:10px 4px}button.btn-jc-l.s-1x{justify-content:left}button.btn-m.s-1x{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-1x,button.btn-m--play.s-1x{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1x{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1x,button.btn-m--prev.s-1x{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1x{right:calc(100% + 35px)}button.btn-m--next.s-1x{left:calc(100% + 35px)}button.btn.s-1x:disabled{cursor:default;pointer-events:none}button.btn.s-1x:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1x:not(:disabled):hover{opacity:.8}button.pr-0.s-1x{padding-right:0}button.pl-0.s-1x{padding-left:0}"};function Kt(t,e){B(e,!0),Q(t,m0);let i=g(e,"className",3,""),o=g(e,"style",3,""),r=g(e,"disabled",3,void 0),a=g(e,"testId",3,void 0),l=g(e,"ariaHidden",3,void 0),d=g(e,"ariaLabel",3,void 0),s=g(e,"ref",15,void 0),u=g(e,"ariaKeyShortCut",3,void 0),m=g(e,"ariaExpanded",3,void 0),f=g(e,"tabIndex",3,0),p=g(e,"click",3,Fl),$=g(e,"focus",3,Fl),y=g(e,"blur",3,Fl),_=v(()=>p()===Fl?null:P=>{P.stopPropagation(),p()(P)}),S=v(()=>$()===Fl?null:P=>{P.preventDefault(),$()()}),I=v(()=>y()===Fl?null:P=>{P.preventDefault(),y()()});var T=f0();T.__pointerdown=[p0],T.__click=function(...P){var E;(E=n(_))==null||E.apply(this,P)};var N=C(T);ri(N,()=>{var P;return(P=e.children)!=null?P:vt}),w(T),je(T,P=>s(P),()=>s()),D(()=>{var P,E,A,W,H,z,Y,ae;se(T,1,`btn ${(P=i())!=null?P:""}`,"s-1x"),Qe(T,o()||null),T.disabled=(E=r())!=null?E:null,Ve(T,"aria-hidden",(A=l())!=null?A:null),Ve(T,"aria-label",(W=d())!=null?W:null),Ve(T,"aria-keyshortcuts",(H=u())!=null?H:null),Ve(T,"aria-expanded",(z=m())!=null?z:null),Ve(T,"data-testid",(Y=a())!=null?Y:null),Ve(T,"tabindex",f()),Ve(T,"role",e.role),Ve(T,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),gt("focus",T,function(...P){var E;(E=n(S))==null||E.apply(this,P)}),gt("blur",T,function(...P){var E;(E=n(I))==null||E.apply(this,P)}),b(t,T),F()}tt(["pointerdown","click"]);var v0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},g0=M('<div class="modal-header s-1m"><h3 class="modal-title s-1m"> </h3> <!></div>'),h0=M('<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>'),_0={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 jf(t,e){B(e,!0),Q(t,_0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=q(void 0),a=q(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Mt(()=>{var _;return(_=n(r))==null||_.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=h0();s.__keydown=[v0,e];var u=C(s),m=C(u);{var f=_=>{var S=g0(),I=C(S),T=C(I,!0);w(I);var N=L(I,2);{var P=E=>{Kt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(A,W)=>{Yf(A,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(P)})}w(S),D(()=>me(T,e.title)),b(_,S)};R(m,_=>{i()&&_(f)})}var p=L(m,2),$=C(p),y=C($);ri(y,()=>{var _;return(_=e.children)!=null?_:vt}),w($),w(p),je(p,_=>O(r,_),()=>n(r)),w(u),je(u,_=>O(a,_),()=>n(a)),w(s),b(t,s),F()}tt(["keydown"]);var b0=new Set(["BR"]),U_=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;b0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var $0=M('<li class="hot-key-map-item s-1f"><span class="hot-key-map-item-description s-1f"><!></span> <span class="hot-key-map-item-value s-1f"> </span></li>'),y0=M('<div class="hot-key-map-group s-1f"><h5 class="hot-key-map-group-title s-1f"> </h5> <ul class="hot-key-map-group-items s-1f"></ul></div>'),x0=M('<div class="hot-key-map s-1f"></div>'),w0={hash:"s-1f",code:'.hot-key-map.s-1f{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-1f{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-1f:last-child{border-bottom:none}.hot-key-map-group-title.s-1f{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-1f,.hot-key-map-item.s-1f{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-1f{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-1f{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-1f{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-1f{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-1f,.hot-key-map-item-value.s-1f{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Xf(t,e){B(e,!1),Q(t,w0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};xo(),jf(t,{get title(){return r().title},onClose:s,children:(u,m)=>{var f=x0();wi(f,5,()=>r().groups,({title:p,items:$})=>p,(p,$)=>{let y=()=>n($).title,_=()=>n($).items;var S=y0(),I=C(S),T=C(I,!0);w(I);var N=L(I,2);wi(N,5,_,({description:P,value:E})=>E,(P,E)=>{let A=()=>n(E).description,W=()=>n(E).value;var H=$0(),z=C(H),Y=C(z);wd(Y,()=>U_(A())),w(z);var ae=L(z,2),j=C(ae,!0);w(ae),w(H),D(()=>me(j,W())),b(P,H)}),w(N),w(S),D(()=>me(T,y())),b(p,S)}),w(f),b(u,f)},$$slots:{default:!0}}),F(),o()}import{noop as vb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as db,PlaybackState as Bm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as M0}from"@vkontakte/videoplayer-shared/es2015";var S0=M('<div class="pillow s-1y"><!></div>'),C0={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 Zf(t,e){Q(t,C0);var i=S0(),o=C(i);ri(o,()=>{var r;return(r=e.children)!=null?r:vt}),w(i),D(()=>Ve(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as qd}from"@vkontakte/videoplayer-shared/es2015";var T0=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 Jf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=T0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),w(o),b(t,o)}var I0=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 em(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=I0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),w(o),b(t,o)}var E0=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 tm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=E0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),w(o),b(t,o)}var P0=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 im(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=P0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),w(o),b(t,o)}var k0=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 om(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=k0();io(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),w(o),b(t,o)}var Hu=t=>{switch(t){case qd.Q_720P:return tm;case qd.Q_1080P:return im;case qd.Q_1440P:return om;case qd.Q_2160P:return Jf;case qd.Q_4320P:return em}};var A0=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 nm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=A0();b(i,r)},$$slots:{default:!0}})}var L0=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 rm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=L0();b(i,r)},$$slots:{default:!0}})}var V0=M('<div aria-hidden="true"><!> <!></div>'),R0={hash:"s-1q",code:".icon.s-1q{display:flex;height:24px;position:relative;width:24px}.icon.s-1q .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1q .pillow{right:-13px}.icon.s-1q svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Qd(t,e){B(e,!0),Q(t,R0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=v(()=>o()?M0(o()):""),a=v(()=>Hu(o())),l=v(()=>n(r).length>2);var d=Le(),s=de(d);{var u=f=>{nm(f,{testId:"settings-mobile-icon"})},m=f=>{var p=V0();let $;var y=C(p);{var _=T=>{let N=v(()=>`${n(r)}-pill-icon`);Zf(T,{get testId(){return n(N)},children:(P,E)=>{var A=Le(),W=de(A);Di(W,()=>n(a),(H,z)=>{z(H,{})}),b(P,A)},$$slots:{default:!0}})};R(y,T=>{n(a)&&T(_)})}var S=L(y,2);let I=v(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(S,{get testId(){return n(I)}}),w(p),D(T=>$=se(p,1,"icon s-1q",null,$,T),[()=>({triple:n(l)})]),b(f,p)};R(s,f=>{i()?f(u):f(m,!1)})}b(t,d),F()}var N0=M('<span class="settings-icon-wrapper s-1z"><!></span>'),O0={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function Hl(t,e){B(e,!0),Q(t,O0);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(p,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,m=d.actions.internal.openSettingsMenu,f=d.actions.internal.closeSettingsMenu,p=d.ui.isMobile,$=d.ui.t,y=q(void 0);Oe(()=>{n(y)&&It(()=>{e.ref$.set(n(y))})});let _=$("aria_label_settings");function S(T){return mt(this,null,function*(){let N=na(T);r()?f():m(N,_o)})}let I=v(()=>r()?"opened":"");Kt(t,{get className(){return n(I)},testId:"settings-btn",click:S,get ariaLabel(){return _},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){O(y,T,!0)},children:(T,N)=>{var P=N0(),E=C(P);Qd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),w(P),b(T,P)},$$slots:{default:!0}}),F(),o()}var D0=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),B0=Ce("<path></path>");function sa(t,e){B(e,!0);let i=v(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=v(()=>fn(e.size));Xe(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=de(l);{var s=m=>{var f=D0();ui(),b(m,f)},u=m=>{var f=B0();D(()=>Ve(f,"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: ${(Me=n(s).audioCodec||"")!=null?Me:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b($e,be)};R(ne,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(_e)})}var xe=L(ne,2);{var J=$e=>{var be=R1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(()=>me(ot,n(s).viewport)),b($e,be)};R(xe,$e=>{n(s).viewport&&$e(J)})}var Ne=L(xe,2);{var pe=$e=>{var be=N1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(()=>me(ot,n(s).videoSize)),b($e,be)};R(Ne,$e=>{n(s).videoSize&&$e(pe)})}var P=L(Ne,2);{var Ke=$e=>{var be=O1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(()=>me(ot,n(s).cdn)),b($e,be)};R(P,$e=>{n(s).cdn&&$e(Ke)})}var Te=L(P,2);{var j=$e=>{var be=D1(),ee=L(C(be),2),ot=C(ee);S(ee),S(be),D(()=>{var fe;return me(ot,`${(fe=n(s).volume)!=null?fe:""} %`)}),b($e,be)};R(Te,$e=>{n(s).volume&&$e(j)})}var ie=L(Te,2);{var De=$e=>{var be=B1(),ee=L(C(be),2),ot=C(ee);S(ee),S(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).position.toFixed(2)]),b($e,be)};R(ie,$e=>{n(s).position&&$e(De)})}var Be=L(ie,2);{var it=$e=>{var be=F1(),ee=L(C(be),2),ot=C(ee);S(ee),S(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b($e,be)};R(Be,$e=>{n(s).buffer&&$e(it)})}var U=L(Be,2);{var Ae=$e=>{var be=H1(),ee=L(C(be),2),ot=C(ee);S(ee),S(be),D(fe=>me(ot,`${fe!=null?fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b($e,be)};R(U,$e=>{n(s).liveLatency&&$e(Ae)})}var ke=L(U,2);{var ze=$e=>{var be=U1(),ee=L(C(be),2),ot=C(ee,!0);S(ee),S(be),D(fe=>me(ot,fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:fe})=>fe).map(({value:fe,title:Me})=>`${Me} ${((fe!=null?fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b($e,be)};R(ke,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(ze)})}var Je=L(ke,2),ye=L(C(Je),2),Pe=C(ye);S(ye),S(Je);var Fe=L(Je,2);{var Dt=$e=>{var be=z1(),ee=L(C(be),2);zd(ee,{get values(){return n(T)}});var ot=L(ee,2),fe=C(ot);S(ot),S(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b($e,be)};R(Fe,$e=>{n(s).speed&&$e(Dt)})}var ft=L(Fe,2);{var Bt=$e=>{var be=W1(),ee=L(C(be),2);zd(ee,{get values(){return n(I)}});var ot=L(ee,2),fe=C(ot);S(ot),S(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b($e,be)};R(ft,$e=>{n(s).bitrate&&$e(Bt)})}var at=L(ft,2),St=L(C(at),2);zd(St,{get values(){return n(w)}});var oi=L(St,2),Rt=C(oi,!0);S(oi),S(at),S(Q),S(k),D($e=>{var be,ee;E=se(k,1,"container s-k",null,E,$e),Ve(k,"aria-label",N),me(Y,n(s).version),me(Pe,`${(be=n(p))!=null?be:""} / ${(ee=n(v))!=null?ee:""} frames`),me(Rt,n(f))},[()=>({"container-mobile":r()})]),b(t,k),F(),o()}Ze(["click"]);import{noop as Q1}from"@vkontakte/videoplayer-shared/es2015";var G1=(t,e)=>{t.stopPropagation(),e()()},Y1=M('<div class="close s-1e"></div>'),j1={hash:"s-1e",code:'.close.s-1e{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1e:hover{opacity:1}.close.s-1e:after,.close.s-1e:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1e:before{transform:rotate(45deg)}.close.s-1e:after{transform:rotate(-45deg)}'};function Vs(t,e){B(e,!0),q(t,j1);let i=h(e,"onClick",3,Q1);var o=Y1();o.__click=[G1,i],b(t,o),F()}Ze(["click"]);import{noop as Z1}from"@vkontakte/videoplayer-shared/es2015";var un=t=>`width:${t}px;height:${t}px;`;var X1=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 En(t,e){B(e,!0);let i=m(()=>un(e.size));Xe(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=X1();b(o,a)},$$slots:{default:!0}}),F()}var J1=M('<div class="timer s-1d"><canvas class="timer-canvas s-1d" width="100" height="100"></canvas> <!></div>'),e0={hash:"s-1d",code:".timer.s-1d{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-1d:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1d{height:50px;position:absolute;width:50px}"};function Kd(t,e){B(e,!0),q(t,e0);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,Z1),r=5e3,a=W(void 0),l,d,s=0,u;Oe(()=>{i()&&Ct(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let v=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{v(),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()())};Mt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),cn(()=>{v()});var f=J1(),$=C(f);je($,g=>O(a,g),()=>n(a));var y=L($,2);En(y,{get size(){return"24"}}),S(f),b(t,f),F()}var t0=(t,e,i)=>{e(!1),i()},i0=M('<div class="overlay s-p"></div> <div class="next-video s-p"><div class="top s-p"><div class="caption s-p"> </div> <!></div> <div class="row s-p"><div class="column s-p"><div class="thumb s-p"><div></div> <!></div></div> <div class="column s-p"><div class="title s-p"> </div></div></div></div>',1),o0={hash:"s-p",code:".overlay.s-p{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-p{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-p{display:flex;justify-content:space-between}.caption.s-p{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-p{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-p{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-p{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-p,.thumb-overlay.s-p{height:100%;width:100%}.thumb-overlay.s-p{position:absolute}.thumb-overlay.withOpacity.s-p{background:var(--black);opacity:.3}.title.s-p{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Qf(t,e){B(e,!0),q(t,o0);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,v=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),f())},g=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||v(),e.isHide&&r()&&(u(!1),f())});var w=Le(),T=de(w);{var I=N=>{var k=i0(),E=L(de(k),2),A=C(E),Q=C(A),H=C(Q,!0);S(Q);var z=L(Q,2);Vs(z,{onClick:g}),S(A);var Y=L(A,2);Y.__click=[t0,u,p];var le=C(Y),X=C(le),re=C(X);let Z;var we=L(re,2);{var ue=J=>{let Ne=m(()=>a()&&r());Kd(J,{get isRunning(){return n(Ne)},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}S(X),S(le);var ne=L(le,2),_e=C(ne),xe=C(_e,!0);S(_e),S(ne),S(Y),S(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-p",null,Z,Ne),me(xe,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,k)};R(T,N=>{e.isHide||N(I)})}b(t,w),F(),o()}Ze(["click"]);import{PlaybackState as Ua}from"@vkontakte/videoplayer-core/es2015";import{checkNever as r0}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Gn}from"@vkontakte/videoplayer-statistics/es2015";var Gf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Yf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Bu=(t,e,i)=>{let o=Gf(e,i);e<1&&t.actions.internal.setVolume(o)},Fu=(t,e,i)=>{let o=Yf(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 Hu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var s0=(t,e)=>{e(t)},a0=M('<div class="keyboard-controls s-m" tabindex="-1" role="region"><!></div>'),l0={hash:"s-m",code:".keyboard-controls.s-m{bottom:0;left:0;position:absolute;right:0;top:0}"};function jf(t,e){var ee,ot;B(e,!0),q(t,l0);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(pe,"$doubleForwardAvailable$",i),v=()=>x(Ne,"$doubleForwardOn$",i),p=()=>x(Te,"$overlayContainer$",i),f=()=>x(le,"$adPlaybackState",i),$=()=>x(X,"$positionExact$",i),y=()=>x(re,"$duration$",i),g=()=>x(De,"$isAudioAvailable$",i),w=()=>x(Z,"$volume$",i),T=()=>x(Y,"$canChangePlaybackSpeed$",i),I=()=>x(ue,"$muted$",i),N=()=>x(ne,"$currentSubtitle$",i),k=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),A=ve(),Q=Vt(),H=A.getLogger().createComponentLog("KeyboardControls component"),z=A.state.playbackState$,Y=A.state.canChangePlaybackSpeed$,le=A.ads.playbackState,X=A.state.positionExact$,re=A.state.duration$,Z=A.state.volume$,we=A.ui.controls.disabledControls$,ue=A.state.muted$,ne=A.state.currentSubtitle$,_e=A.ui.contextMenu.openedByHotKey$,xe=A.ui.contextMenu.lastActiveElem$,J=A.ui.contextMenu.visible$,Ne=A.ui.doubleForwardOn$,pe=A.ui.doubleForwardAvailable$,P=A.ui.contextMenu.position$,Ke=A.state.isEnded$,Te=A.ui.overlayContainer$,j=(ee=A.callbacks)==null?void 0:ee.onAudioDoesNotExistHint,ie=(ot=A.callbacks)==null?void 0:ot.onAudioDisabledHint,De=A.state.isAudioAvailable$,Be=A.state.isAudioDisabled,it=A.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=So(),Ae=0,ke=!0,ze=W(void 0),Je=fe=>(fe!==ke&&(ke=fe,Ae=0),Ae+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*Ae)/1e3),ye=!0,Pe=({type:fe,repeat:Me,disableDoubleForward:yt})=>{let Pt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{A.actions.internal.togglePlay();let ce="PLAY";d()===Ua.PAUSED?ce="PAUSE":s()&&(ce="REPLAY"),e.showHotKeyHelpers({type:ce})}},pt=fe==="down";if(!u()||yt){pt&&Pt(),ye=!0;return}if(pt)ye=!1;else if(ye)return;if(pt){!Me&&e.startDoubleForwardActivationTimer();return}v()||Pt(),e.stopDoubleForward(),ye=!0},Fe=fe=>{let Me=H_(p());P.set(Me),xe.set(fe.target),_e.set(!0),J.set(!0)},Dt=(fe,Me=!1)=>{var pi,vi;let yt=fe.target,Pt=(pi=yt==null?void 0:yt.getAttribute("role"))==null?void 0:pi.includes("menuitem"),pt=yt.classList.contains("btn"),ce=fe.code;if(pt&&ce==="Space")return!1;let We=Dh.has(ce);if(Pt&&We)return!1;let Ge=!Oh.has(ce);if(fe.ctrlKey&&Ge||fe.altKey&&Ge||fe.metaKey)return!1;let lt=Pt&&ce==="Escape";Bh.has(ce)||lt||e.hideContextMenu();let Ft=d()===Ua.PLAYING||d()===Ua.PAUSED,Ht=e.isAds&&(f()==="paused"||f()==="playing"),ni=!Ht&&!r().has("TIMELINE"),_i=fe.shiftKey&&["Digit1","Numpad1"].includes(ce);if(!_i&&!(Ft||Ht))return!1;H({message:`key down, code: ${ce}, isExternal = ${Me}`});let Gi=!1,Nt=()=>{Gi=!0,Me||fe.preventDefault()};if(_i)return Fe(fe),Nt(),!0;switch(ce){case"KeyJ":case"ArrowLeft":{if(!ni)break;if(fe.ctrlKey||fe.altKey){let ht=A.actions.internal.getPrevEpisode();A.actions.internal.seekToPrevEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ht.text}),Nt()}else{let ht=fe.shiftKey?Je(!1):Q.controls.seekStepKeyboard/1e3,Xt=Math.max($()-ht,0);$()>0&&(A.actions.internal.seekTime(Xt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ht.toString()}),Nt())}break}case"KeyL":case"ArrowRight":{if(!ni)break;if(fe.ctrlKey||fe.altKey){let ht=A.actions.internal.getNextEpisode();A.actions.internal.seekToNextEpisode(ht),ht&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ht.text}),Nt()}else{let ht=fe.shiftKey?Je(!0):Q.controls.seekStepKeyboard/1e3,Xt=Math.min($()+ht,y());Math.round($())<Math.round(y())&&(A.actions.internal.seekTime(Xt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ht.toString()}),Nt())}break}case"ArrowUp":{if(ua({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let ht=w(),Xt=Q.controls.volumeStepKeyboard,$i=ht<=1;if(Bu(A,ht,Xt),$i){let Yi=Math.round(Gf(ht,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Yi}})}}Nt();break}case"ArrowDown":{if(ua({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let ht=w(),Xt=Q.controls.volumeStepKeyboard,$i=ht>=0;if(Fu(A,ht,Xt),$i){let Yi=Math.round(Yf(ht,Xt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Yi}})}}Nt();break}case"Comma":{if(fe.shiftKey){if(!v()&&T()){let ht=A.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ht==null?void 0:ht.displayValue}),Nt()}}else{if(Ht||d()!==Ua.PAUSED)break;let ht=Math.max($()-Q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(ht,Gn.DOUBLE_TAP),Nt())}break}case"Period":{if(fe.shiftKey){if(!v()&&T()){let ht=A.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ht==null?void 0:ht.displayValue}),Nt()}}else{if(Ht||d()!==Ua.PAUSED)break;let ht=Math.min($()+Q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(ht,Gn.DOUBLE_TAP),Nt())}break}case"KeyK":case"Space":Pe({type:"down",repeat:fe.repeat,disableDoubleForward:"KeyK"===ce}),Nt();break;case"KeyM":{ua({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})&&(e.showHotKeyHelpers({type:I()?"VOLUME":"MUTE"}),A.actions.internal.toggleMuted()),Nt();break}case"KeyF":e.toggleFullscreen(),Nt();break;case"KeyC":A.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(vi=N())==null?void 0:vi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Nt();break;case"KeyI":A.actions.internal.togglePictureInPicture(),Nt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.1,Gn.DOUBLE_TAP),Nt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.2,Gn.DOUBLE_TAP),Nt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.3,Gn.DOUBLE_TAP),Nt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.4,Gn.DOUBLE_TAP),Nt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.5,Gn.DOUBLE_TAP),Nt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.6,Gn.DOUBLE_TAP),Nt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.7,Gn.DOUBLE_TAP),Nt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.8,Gn.DOUBLE_TAP),Nt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.9,Gn.DOUBLE_TAP),Nt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(0,Gn.DOUBLE_TAP),Nt();break;case"Slash":{fe.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),Nt());break}case"KeyN":fe.shiftKey&&k()&&(A.actions.internal.nextVideoClick(),Nt());break;case"KeyP":fe.shiftKey&&E()&&(A.actions.internal.prevVideoClick(),Nt());break;case"ShiftLeft":case"ShiftRight":Nt();break;case"Tab":case"Escape":case"Enter":break;default:r0(ce);break}return Gi},ft=fe=>{let Me=fe.code;if(fe.ctrlKey||fe.altKey||fe.metaKey)return;let yt=d()===Ua.PLAYING||d()===Ua.PAUSED,Pt=e.isAds&&(f()==="paused"||f()==="playing");if(yt||Pt)switch(Me){case"ShiftLeft":case"ShiftRight":Ae=0;break;case"Space":Pe({type:"up"});break}},Bt=G("aria_label_video_player"),at=()=>{var fe;return(fe=n(ze))==null?void 0:fe.focus()},St=()=>n(ze)===Hu(),oi=fe=>fe.type==="keydown"?Dt(fe,!0):(fe.type==="keyup"&&ft(fe),!1);var Rt=a0();Rt.__keyup=ft,Rt.__keydown=[s0,Dt];var $e=C(Rt);ri($e,()=>{var fe;return(fe=e.children)!=null?fe:gt}),S(Rt),je(Rt,fe=>O(ze,fe),()=>n(ze)),D(()=>Ve(Rt,"aria-label",Bt)),b(t,Rt);var be=F({focus:at,isFocused:St,handleExternalKeyboardEvent:oi});return o(),be}Ze(["keyup","keydown"]);var d0=M('<div class="container s-x"><div class="dot s-x"></div> <div class="dot s-x"></div> <div class="dot s-x"></div></div>'),c0={hash:"s-x",code:".container.s-x{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-x:first-child{animation-delay:0s}.dot.s-x:nth-child(2){animation-delay:.18s}.dot.s-x:nth-child(3){animation-delay:.36s}@keyframes s-x-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-x{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-x-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-x+.dot:where(.s-x){margin-left:4px}"};function za(t,e){q(t,c0);let i=h(e,"style",3,"");var o=d0();D(()=>Qe(o,i())),b(t,o)}var u0=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 Xf(t,e){Xe(t,{get fill(){return e.fill},children:(i,o)=>{var r=u0();b(i,r)},$$slots:{default:!0}})}import{noop as Bl}from"@vkontakte/videoplayer-shared/es2015";var p0=t=>{t.stopPropagation()},f0=M("<button><!></button>"),m0={hash:"s-1k",code:"button.btn.s-1k{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-1k{width:100%}button.btn--live.s-1k{padding:10px 4px}button.btn-jc-l.s-1k{justify-content:left}button.btn-m.s-1k{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-1k,button.btn-m--play.s-1k{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1k{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1k,button.btn-m--prev.s-1k{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1k{right:calc(100% + 35px)}button.btn-m--next.s-1k{left:calc(100% + 35px)}button.btn.s-1k:disabled{cursor:default;pointer-events:none}button.btn.s-1k:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1k:not(:disabled):hover{opacity:.8}button.pr-0.s-1k{padding-right:0}button.pl-0.s-1k{padding-left:0}"};function qt(t,e){B(e,!0),q(t,m0);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),v=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),f=h(e,"click",3,Bl),$=h(e,"focus",3,Bl),y=h(e,"blur",3,Bl),g=m(()=>f()===Bl?null:k=>{k.stopPropagation(),f()(k)}),w=m(()=>$()===Bl?null:k=>{k.preventDefault(),$()()}),T=m(()=>y()===Bl?null:k=>{k.preventDefault(),y()()});var I=f0();I.__pointerdown=[p0],I.__click=function(...k){var E;(E=n(g))==null||E.apply(this,k)};var N=C(I);ri(N,()=>{var k;return(k=e.children)!=null?k:gt}),S(I),je(I,k=>s(k),()=>s()),D(()=>{var k,E,A,Q,H,z,Y,le;se(I,1,`btn ${(k=i())!=null?k:""}`,"s-1k"),Qe(I,o()||null),I.disabled=(E=r())!=null?E:null,Ve(I,"aria-hidden",(A=l())!=null?A:null),Ve(I,"aria-label",(Q=d())!=null?Q:null),Ve(I,"aria-keyshortcuts",(H=u())!=null?H:null),Ve(I,"aria-expanded",(z=v())!=null?z:null),Ve(I,"data-testid",(Y=a())!=null?Y:null),Ve(I,"tabindex",p()),Ve(I,"role",e.role),Ve(I,"aria-checked",(le=e.areaChecked)!=null?le:null)}),st("focus",I,function(...k){var E;(E=n(w))==null||E.apply(this,k)}),st("blur",I,function(...k){var E;(E=n(T))==null||E.apply(this,k)}),b(t,I),F()}Ze(["pointerdown","click"]);var v0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},g0=M('<div class="modal-header s-18"><h3 class="modal-title s-18"> </h3> <!></div>'),h0=M('<div class="modal-overlay s-18"><div class="modal-container s-18" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-18" tabindex="0" role="scrollbar"><div class="modal-main s-18"><!></div></div></div></div>'),_0={hash:"s-18",code:'.modal-overlay.s-18{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-18{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-18{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-18{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-18{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-18::-webkit-scrollbar{width:8px}.modal-scroll.s-18::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-18::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-18::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-18{margin:-8px -4px 0 0}'};function Zf(t,e){B(e,!0),q(t,_0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=W(void 0),a=W(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Mt(()=>{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=h0();s.__keydown=[v0,e];var u=C(s),v=C(u);{var p=g=>{var w=g0(),T=C(w),I=C(T,!0);S(T);var N=L(T,2);{var k=E=>{qt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(A,Q)=>{Xf(A,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(k)})}S(w),D(()=>me(I,e.title)),b(g,w)};R(v,g=>{i()&&g(p)})}var f=L(v,2),$=C(f),y=C($);ri(y,()=>{var g;return(g=e.children)!=null?g:gt}),S($),S(f),je(f,g=>O(r,g),()=>n(r)),S(u),je(u,g=>O(a,g),()=>n(a)),S(s),b(t,s),F()}Ze(["keydown"]);var b0=new Set(["BR"]),W_=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;b0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var $0=M('<li class="hot-key-map-item s-n"><span class="hot-key-map-item-description s-n"><!></span> <span class="hot-key-map-item-value s-n"> </span></li>'),y0=M('<div class="hot-key-map-group s-n"><h5 class="hot-key-map-group-title s-n"> </h5> <ul class="hot-key-map-group-items s-n"></ul></div>'),x0=M('<div class="hot-key-map s-n"></div>'),w0={hash:"s-n",code:'.hot-key-map.s-n{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-n{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-n:last-child{border-bottom:none}.hot-key-map-group-title.s-n{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-n,.hot-key-map-item.s-n{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-n{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-n{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-n{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-n{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-n,.hot-key-map-item-value.s-n{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Jf(t,e){B(e,!1),q(t,w0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};wo(),Zf(t,{get title(){return r().title},onClose:s,children:(u,v)=>{var p=x0();bi(p,5,()=>r().groups,({title:f,items:$})=>f,(f,$)=>{let y=()=>n($).title,g=()=>n($).items;var w=y0(),T=C(w),I=C(T,!0);S(T);var N=L(T,2);bi(N,5,g,({description:k,value:E})=>E,(k,E)=>{let A=()=>n(E).description,Q=()=>n(E).value;var H=$0(),z=C(H),Y=C(z);wd(Y,()=>W_(A())),S(z);var le=L(z,2),X=C(le,!0);S(le),S(H),D(()=>me(X,Q())),b(k,H)}),S(N),S(w),D(()=>me(I,y())),b(f,w)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as hb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as ub,PlaybackState as Hm}from"@vkontakte/videoplayer-core/es2015";import{getVideoQualityLabel as M0}from"@vkontakte/videoplayer-shared/es2015";var S0=M('<div class="pillow s-1y"><!></div>'),T0={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 em(t,e){q(t,T0);var i=S0(),o=C(i);ri(o,()=>{var r;return(r=e.children)!=null?r:gt}),S(i),D(()=>Ve(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as qd}from"@vkontakte/videoplayer-shared/es2015";var C0=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 tm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=C0();oo(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(),S(o),b(t,o)}var I0=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 im(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=I0();oo(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(),S(o),b(t,o)}var E0=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 om(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=E0();oo(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(),S(o),b(t,o)}var k0=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 nm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=k0();oo(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(),S(o),b(t,o)}var P0=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 rm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=P0();oo(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(),S(o),b(t,o)}var Uu=t=>{switch(t){case qd.Q_720P:return om;case qd.Q_1080P:return nm;case qd.Q_1440P:return rm;case qd.Q_2160P:return tm;case qd.Q_4320P:return im}};var A0=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 sm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=A0();b(i,r)},$$slots:{default:!0}})}var L0=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 am(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=L0();b(i,r)},$$slots:{default:!0}})}var V0=M('<div aria-hidden="true"><!> <!></div>'),R0={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 Qd(t,e){B(e,!0),q(t,R0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=m(()=>o()?M0(o()):""),a=m(()=>Uu(o())),l=m(()=>n(r).length>2);var d=Le(),s=de(d);{var u=p=>{sm(p,{testId:"settings-mobile-icon"})},v=p=>{var f=V0();let $;var y=C(f);{var g=I=>{let N=m(()=>`${n(r)}-pill-icon`);em(I,{get testId(){return n(N)},children:(k,E)=>{var A=Le(),Q=de(A);Oi(Q,()=>n(a),(H,z)=>{z(H,{})}),b(k,A)},$$slots:{default:!0}})};R(y,I=>{n(a)&&I(g)})}var w=L(y,2);let T=m(()=>n(a)?"settings-icon--labeled":"settings-icon");am(w,{get testId(){return n(T)}}),S(f),D(I=>$=se(f,1,"icon s-1v",null,$,I),[()=>({triple:n(l)})]),b(p,f)};R(s,p=>{i()?p(u):p(v,!1)})}b(t,d),F()}var N0=M('<span class="settings-icon-wrapper s-1z"><!></span>'),O0={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function Fl(t,e){B(e,!0),q(t,O0);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(f,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,v=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,f=d.ui.isMobile,$=d.ui.t,y=W(void 0);Oe(()=>{n(y)&&Ct(()=>{e.ref$.set(n(y))})});let g=$("aria_label_settings");function w(I){return vt(this,null,function*(){let N=ca(I);r()?p():v(N,_o)})}let T=m(()=>r()?"opened":"");qt(t,{get className(){return n(T)},testId:"settings-btn",click:w,get ariaLabel(){return g},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(I){O(y,I,!0)},children:(I,N)=>{var k=N0(),E=C(k);Qd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),b(I,k)},$$slots:{default:!0}}),F(),o()}var D0=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),B0=Ce("<path></path>");function pa(t,e){B(e,!0);let i=m(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=m(()=>un(e.size));Xe(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=de(l);{var s=v=>{var p=D0();fi(),b(v,p)},u=v=>{var p=B0();D(()=>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(m,f)};R(d,m=>{e.type==="off"?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function sm(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=v(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Kt(t,{testId:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return ms.KeyC},role:"button",children:(l,d)=>{let s=v(()=>i()?void 0:"outline");sa(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var F0=M('<span class="duration s-21" data-testid="video_duration"> </span>'),H0=M('<div><span class="current s-21" data-testid="current_time"> </span> <!></div>'),U0={hash:"s-21",code:'.time.s-21{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-21{padding:0 0 0 8px}.current.s-21{position:relative}.duration.s-21{opacity:.7}.duration.s-21:before{content:" / ";white-space:pre}'};function Gd(t,e){B(e,!0),Q(t,U0);let i=g(e,"isMobile",3,!1),o=g(e,"isHidden",3,!1),r=g(e,"showDuration",3,!0),a=g(e,"ref",15),l=Vt(),d=le(!1),s=v(()=>Xo(e.duration)),u=v(()=>Xo(e.position));var m=H0();let f;var p=C(m),$=C(p,!0);w(p);var y=L(p,2);{var _=S=>{var I=F0(),T=C(I,!0);w(I),D(()=>me(T,n(s))),b(S,I)};R(y,S=>{r()&&S(_)})}w(m),Ps(m,()=>Rl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),je(m,S=>a(S),()=>a()),D(S=>{f=se(m,1,"time s-21",null,f,S),me($,n(u))},[()=>({mobile:i()})]),b(t,m),F()}import{noop as Uu}from"@vkontakte/videoplayer-shared/es2015";var z0=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),W0=Ce("<path></path>"),K0=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 aa(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(u,m)=>m?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=v(()=>r(i(),o())),l=v(()=>fn(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";Xe(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 f=K0(),p=L(de(f));{var $=_=>{var S=z0();ui(),b(_,S)},y=_=>{var S=W0();D(()=>Ve(S,"d",`${d}${n(a)==="max"?s:""}`)),b(_,S)};R(p,_=>{n(a)==="off"?_($):_(y,!1)})}b(u,f)},$$slots:{default:!0}}),F()}import{isNonNullable as W_,noop as Xn}from"@vkontakte/videoplayer-shared/es2015";import{noop as lm}from"@vkontakte/videoplayer-shared/es2015";import{noop as Q0}from"@vkontakte/videoplayer-shared/es2015";var q0=M('<div class="overlay"><!></div>');function am(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=q(void 0),s=p=>{!p||!n(d)||!p.contains(n(d))||p.removeChild(n(d))},u=p=>{!p||!n(d)||p.contains(n(d))||p.appendChild(n(d))};Oe(()=>{u(r())}),Mt(()=>(u(r()),()=>s(r())));var m=q0(),f=C(m);ri(f,()=>{var p;return(p=e.children)!=null?p:vt}),w(m),je(m,p=>O(d,p),()=>n(d)),b(t,m),F(),o()}var G0=M('<div class="tooltip s-1o"><div class="content s-1o"> </div> <div class="tooltip-pointer s-1o"></div></div>'),Y0=M("<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 Fa(t,e){B(e,!0),Q(t,j0);let[i,o]=Re(),r=()=>x(Y,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"content",3,""),s=g(e,"active",15,!1),u=g(e,"translateX",3,0),m=g(e,"translateY",3,0),f=g(e,"isFullWidthWrapper",3,!1),p=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,Q0),_=5,S=q(void 0),I=q(void 0),T,N=q(0),P=q(0),E=q(0),A=q(0),W=Vt(),H=ve(),z=H.ui.playerSize,Y=H.ui.overlayContainer$;Oe(()=>{It(()=>{y()(s())})});let ae=H.getLogger().createComponentLog("Tooltip component"),j=()=>{if(!r()||!n(I)||!n(S))return;O(P,_);let U=r().getBoundingClientRect(),Ae=n(S).getBoundingClientRect(),Pe=Ae.width,Ue=n(I).clientWidth,Ze=a().width,ye=(Pe-Ue)/2,ke=Ae.left+u()-U.left,Fe=ke+ye,Dt=Ae.top+m()-U.top,pt=Ue/2-_,Bt=Fe<8,st=Fe+Ue>Ze-8;Bt&&(Fe=8,pt=ke+Ae.width/2-2.5*_),st&&(Fe=Ze-8-Ue,pt=Ae.left-U.left+Ae.width/2-Fe-_),O(E,Fe,!0),O(A,Dt),O(N,pt,!0)},ne=()=>{!r()||!n(I)||!n(S)||O(P,-_)},Z=()=>{if(!r()||!n(I)||!n(S))return;O(N,_);let U=r().getBoundingClientRect(),Ae=n(S).getBoundingClientRect(),Pe=Ae.height,Ue=n(I).clientHeight,Ze=(Pe-Ue)/2+Ue,ye=Ae.left+u()-U.left-n(I).clientWidth,ke=2,Fe=ye-_;Fe<8&&(Fe=8);let pt=Ae.top+m()-U.top+Ze,Bt=ke-Ze/2,st=ke-_;O(E,Fe,!0),O(A,pt),O(P,Bt),O(N,st)},we=()=>{!r()||!n(I)||!n(S)||O(N,-_)},ue=()=>{switch($()){case"top":j();break;case"bottom":ne();break;case"left":Z();break;default:we()}},re=()=>{try{if(!r()||!n(S))return;ue(),s(!0)}catch(U){ae({message:String(U)})}},_e=()=>{s(!1)},xe=()=>{n(I)&&(T||(T=window.setTimeout(re,W.controls.hideTimeoutTooltips)),s()&&re())},J=()=>{_e(),window.clearTimeout(T),T=void 0},Ne=(U,Ae,Pe)=>{let Ue="";switch($()){case"top":Ue=`transform: translate(${U}px, ${Ae}px);`;break;case"bottom":Ue=`transform: translate(${U}px, ${Ae}px); top: auto; bottom: 100%;`;break;case"left":Ue=`transform: translate(${U}px, ${Ae}px); left: 0; right: auto;`;break;default:Ue=`transform: translate(${U}px, ${Ae}px);`}return Ue+=` max-width: ${p()===void 0?"auto":`${p()}px`};`,Ue+=` opacity: ${Pe?1:0}; visibility: ${Pe?"visible":"hidden"}`,Ue},pe=(U,Ae)=>{let Pe="";switch($()){case"top":Pe=`transform: translate(${U}px, ${Ae}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Pe=`transform: translate(${U}px, ${Ae}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Pe=`transform: translate(${U}px, ${Ae}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Pe=`transform: translate(${U}px, ${Ae}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Pe},k=v(()=>Ne(n(E),n(A),s())),We=v(()=>pe(n(N),n(P)));Mt(ue),pn(()=>window.clearTimeout(T));var Te=Y0(),X=de(Te);let ie;X.__pointermove=xe,X.__pointerdown=J,X.__pointerup=function(...U){var Ae;(Ae=e.disableMouseupTooltipShow?void 0:xe)==null||Ae.apply(this,U)};var De=C(X);ri(De,()=>{var U;return(U=e.children)!=null?U:vt}),w(X),je(X,U=>O(S,U),()=>n(S));var Be=L(X,2);{var it=U=>{am(U,{children:(Ae,Pe)=>{var Ue=G0(),Ze=C(Ue),ye=C(Ze,!0);w(Ze);var ke=L(Ze,2);w(Ue),je(Ue,Fe=>O(I,Fe),()=>n(I)),D(()=>{Qe(Ue,n(k)),me(ye,d()),Qe(ke,n(We))}),b(Ae,Ue)},$$slots:{default:!0}})};R(Be,U=>{d()&&!l()&&U(it)})}D(U=>ie=se(X,1,"tooltip-wrapper s-1o",null,ie,U),[()=>({"full-width":f()})]),gt("pointerenter",X,xe),gt("pointerleave",X,J),b(t,Te),F(),o()}tt(["pointermove","pointerdown","pointerup"]);var z_=t=>{t.stopPropagation()},X0=M("<div><!></div>"),Z0={hash:"s-18",code:".btn-container.s-18{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-18{min-width:0;width:100%}"};function Oo(t,e){B(e,!0),Q(t,Z0);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=wo(),s=l.ui.isMobile,u=d.graphIsOpened$,m=l.ui.t,f=g(e,"className",3,""),p=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),_=g(e,"width",15,void 0),S=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),N=g(e,"tooltipPlacement",3,"top"),P=g(e,"disabledTooltipContent",19,()=>m("tooltip_button_disabled")),E=g(e,"isAriaHidden",3,!1),A=g(e,"onTooltipVisibilityChange",3,lm),W=g(e,"initialTranslateXPx",3,0),H=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,lm),Y=g(e,"mouseLeave",3,lm),ae=v(()=>p()?r()?m("tooltip_disabled_when_graph_on"):P():I()),j=q(!1);Oe(()=>{T()||O(j,!1)});var ne=X0();ne.__pointerdown=[z_],ne.__click=[z_];var Z=C(ne);{var we=re=>{Fa(re,{get content(){return n(ae)},get translateX(){return W()},get translateY(){return H()},get isFullWidthWrapper(){return S()},get placement(){return N()},get onVisibilityChange(){return A()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(j)},set active(_e){O(j,_e,!0)},children:(_e,xe)=>{var J=Le(),Ne=de(J);ri(Ne,()=>{var pe;return(pe=e.children)!=null?pe:vt}),b(_e,J)},$$slots:{default:!0}})},ue=re=>{var _e=Le(),xe=de(_e);ri(xe,()=>{var J;return(J=e.children)!=null?J:vt}),b(re,_e)};R(Z,re=>{$()&&n(ae)&&!a()?re(we):re(ue,!1)})}w(ne),je(ne,re=>y(re),()=>y()),D(()=>{var re;se(ne,1,`btn-container ${(re=f())!=null?re:""}`,"s-18"),Ve(ne,"aria-hidden",E()||null)}),gt("mouseenter",ne,function(...re){var _e;(_e=z())==null||_e.apply(this,re)}),gt("mouseleave",ne,function(...re){var _e;(_e=Y())==null||_e.apply(this,re)}),En(ne,"clientWidth",_),b(t,ne),F(),o()}tt(["pointerdown","click"]);var J0=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 Yd(t,e){let i=v(()=>(e.completed,"interactive-episode-completed-icon"));Xe(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=J0(),l=de(a),d=L(l);D(()=>{Ve(l,"fill",ea),Ve(l,"fill-opacity",e.completed?1:.24),Ve(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var ex=M("<div><!></div>"),tx={hash:"s-x",code:".interactive-episode-icon.s-x{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-x{opacity:.4;pointer-events:none}"};function dm(t,e){B(e,!0),Q(t,tx);let o=ve().ui.t,r=q(0),a=v(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Oo(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=ex();let u;var m=C(s);let f=v(()=>!!e.videoEpisode.completed);Yd(m,{get completed(){return n(f)}}),w(s),D(p=>{u=se(s,1,"interactive-episode-icon s-x",null,u,p),Qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),En(s,"clientWidth",p=>O(r,p)),b(l,s)},$$slots:{default:!0}}),F()}var ix=M('<div><div class="video-episode-inner s-y"><div class="video-episode-loaded s-y"></div> <div></div></div></div>'),ox=M('<div class="video-episodes-wrap s-y"></div>'),nx={hash:"s-y",code:".video-episodes-wrap.s-y{height:100%;position:absolute;width:100%}.video-episode.s-y{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-y:first-child{padding-left:0}.video-episode.s-y:last-child{padding-right:0}.video-episode.s-y:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-y,.video-episode-inner.s-y,.video-episode-loaded.s-y{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-y{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-y:first-child .video-episode-inner:where(.s-y),.video-episode.s-y:last-child .video-episode-inner:where(.s-y){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-y{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-y,.video-episode-loaded.s-y{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-y{background-color:var(--slider-filled-bg)}"};function cm(t,e){Q(t,nx);let i=g(e,"videoEpisodes",19,()=>[]);var o=ox();wi(o,21,i,r=>r.from,(r,a)=>{var l=ix();let d;var s=C(l),u=C(s),m=L(u,2);let f;w(s),w(l),D((p,$)=>{d=se(l,1,"video-episode s-y",null,d,p),Qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),f=se(m,1,"video-episode-filled s-y",null,f,$),Qe(m,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),w(o),b(t,o)}function rx(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 sx(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 ax(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 lx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function dx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var cx=M("<div></div>"),ux=M('<div class="bars s-n"><div class="loaded s-n"></div> <div></div></div>'),px=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),fx={hash:"s-n",code:'.interactive-icons.s-n{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-n{top:-10px}.slider.s-n{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-n{cursor:default}.slider.s-n: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-n{background:var(--slider-bg);overflow:hidden}.bars.s-n,.loaded.s-n{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-n{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-n{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-n,.slider.square.s-n .filled:where(.s-n),.slider.square.s-n .loaded:where(.s-n),.slider.square.s-n>.bars:where(.s-n){border-radius:unset}.filled.active-live.s-n{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-n{background-color:var(--slider-filled-ads)}.handleWrap.s-n{left:-100%;position:absolute;width:100%}.handle.s-n{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-n{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-n .handle:where(.s-n),.slider-dragging.s-n .handle:where(.s-n),.slider.s-n:hover .handle:where(.s-n){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-n .handle:where(.s-n){transform:scale(1.3)}.slider-vertical.s-n{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-n{cursor:default;opacity:.4}'};function Ha(t,e){B(e,!0),Q(t,fx);let i=g(e,"ref",15,void 0),o=g(e,"className",3,""),r=g(e,"testId",3,void 0),a=g(e,"isHidden",3,!1),l=g(e,"isVertical",3,!1),d=g(e,"isActiveLive",3,!1),s=g(e,"isMobile",3,!1),u=g(e,"squareBorders",3,!1),m=g(e,"videoEpisodes",19,()=>[]),f=g(e,"withWheelHandler",3,!1),p=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),_=g(e,"onPointerDown",3,Xn),S=g(e,"onHandleMove",3,Xn),I=g(e,"onPointerUp",3,Xn),T=g(e,"onPointerEnter",3,Xn),N=g(e,"onPointerMove",3,Xn),P=g(e,"onPointerLeave",3,Xn),E=g(e,"onMouseEnter",3,Xn),A=g(e,"onMouseLeave",3,Xn),W=g(e,"onWheelUp",3,Xn),H=g(e,"onWheelDown",3,Xn),z=g(e,"onWheelLeft",3,Xn),Y=g(e,"onWheelRight",3,Xn),ae=g(e,"onDisabledClick",3,Xn),j=g(e,"loadedProgress",3,0),ne=g(e,"filledProgress",3,0),Z=g(e,"handleProgress",3,0),we=g(e,"ariaLabel",3,""),ue=g(e,"ariaValueMin",3,void 0),re=g(e,"ariaValueMax",3,void 0),_e=g(e,"ariaValueNow",3,void 0),xe=g(e,"ariaValueText",3,""),J=g(e,"onContextMenu",3,Xn),Ne=g(e,"handleAlwaysVisible",3,!1),pe=Vt(),k=q(void 0),We=q(!1),Te=v(()=>{var Me;return(Me=re())!=null?Me:0}),X=v(()=>{var Me;return W_(m())&&((Me=m()[m().length-1])==null?void 0:Me.time)<n(Te)}),ie=v(()=>W_(m())&&m().length&&n(X)&&n(Te)?Ze(j()*100,ne()*100):[]);function De(Me){if(Me.preventDefault(),i()&&O(k,i().getBoundingClientRect(),!0),$())return;let $t=Pe(Me.clientX,Me.clientY),kt=Ue(Me.clientX);T()($t,kt,n(k).width)}function Be(Me){Me.preventDefault(),!$()&&P()()}function it(){E()()}function U(){A()()}function Ae(Me){$()||f()&&(Me.preventDefault(),Me.deltaY<0?W()():Me.deltaY>0?H()():Me.deltaX>0?Y()():z()())}function Pe(Me,$t){return l()?Math.max(0,Math.min(1,(n(k).height-($t-n(k).top))/n(k).height)):Math.min(Math.max(Me-n(k).x,0),n(k).width)/n(k).width}function Ue(Me){return Math.min(Math.max(Me-n(k).x,0),n(k).width)}function Ze(Me,$t){let kt=pe.features.episodesClustering&&!p()?pe.episodeMinWidthPc:0,ct=[],ce=m()[0].time/n(Te)*100,ze=0,Ge=0;for(let Ht=1;Ht<m().length;Ht++)ze=m()[Ht].time/n(Te)*100,ze-ce>kt&&(ct.push({from:ce,width:Math.max(0,ze-ce),loadedWidth:Math.max(0,Math.min(ze,Me)-ce),filledWidth:Math.max(0,Math.min(ze,$t)-ce),interactive:m()[Ht-1].interactive,completed:m()[Ht-1].completed}),ce=m()[Ht].time/n(Te)*100,Ge++);let at={from:ce,width:Math.max(0,100-ce),loadedWidth:Math.max(0,Math.min(Me,100)-ce),filledWidth:Math.max(0,Math.min($t,100)-ce),interactive:m()[Ge].interactive,completed:m()[Ge].completed};100-ce<kt?(Ge-=1,ct[Ge].width+=100-ce,ct[Ge].loadedWidth+=Math.max(0,Math.min(Me,100)-ce),ct[Ge].filledWidth+=Math.max(0,Math.min($t,100)-ce)):ct[Ge]=at;let Ft=m()[0].time;if(Ft!==0){let Ht=Ft/n(Te)*100;ct.unshift({from:0,width:Ht,loadedWidth:Math.min(Ht,Me),filledWidth:Math.min(Ht,$t)})}return ct}function ye(Me){return Math.max(0,Math.min(100,Me*100))}let ke=v(()=>ye(j())),Fe=v(()=>ye(ne()));var Dt=px(),pt=de(Dt);{var Bt=Me=>{var $t=cx();let kt;wi($t,21,()=>n(ie),ct=>ct.from,(ct,ce)=>{var ze=Le(),Ge=de(ze);{var at=Ft=>{dm(Ft,{get videoEpisode(){return n(ce)},get disabled(){return $()}})};R(Ge,Ft=>{n(ce).interactive&&Ft(at)})}b(ct,ze)}),w($t),D(ct=>kt=se($t,1,"interactive-icons s-n",null,kt,ct),[()=>({mobile:s(),hidden:s()&&!n(We)})]),b(Me,$t)};R(pt,Me=>{p()&&Me(Bt)})}var st=L(pt,2);let St;st.__pointerdown=[rx,i,k,$,We,Pe,_],st.__pointermove=[sx,$,Pe,Ue,N,k,We,S],st.__pointerup=[ax,$,We,Pe,I],st.__click=[lx,$,ae,Pe],st.__contextmenu=[dx,Pe,$,ae,We,J];var ti=C(st);{var Rt=Me=>{cm(Me,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},$e=Me=>{var $t=ux(),kt=C($t),ct=L(kt,2);let ce;w($t),D(ze=>{Ve(kt,"data-value",n(ke)),Qe(kt,`transform: translateX(${n(ke)}%);`),ce=se(ct,1,"filled s-n",null,ce,ze),Ve(ct,"data-value",n(Fe)),Qe(ct,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(Me,$t)};R(ti,Me=>{n(ie).length?Me(Rt):Me($e,!1)})}var be=L(ti,2);let ee;var ot=C(be);let fe;w(be),w(st),je(st,Me=>i(Me),()=>i()),D((Me,$t,kt,ct)=>{var ce,ze;St=se(st,1,`slider ${(ce=o())!=null?ce:""}`,"s-n",St,Me),Ve(st,"aria-label",we()),Ve(st,"aria-valuemin",ue()),Ve(st,"aria-valuemax",re()),Ve(st,"aria-valuenow",_e()),Ve(st,"aria-valuetext",xe()),Ve(st,"data-testid",(ze=r())!=null?ze:null),ee=se(be,1,"handleWrap s-n",null,ee,$t),Qe(be,kt),fe=se(ot,1,"handle s-n",null,fe,ct)},[()=>({disabled:$(),"slider-dragging":n(We),hidden:a(),"handle-always-visible":Ne(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(Z())}%);`,()=>({"active-live":d()})]),gt("pointerenter",st,De),gt("pointerleave",st,Be),gt("mouseenter",st,it),gt("mouseleave",st,U),gt("wheel",st,Ae),b(t,Dt),F()}tt(["pointerdown","pointermove","pointerup","click","contextmenu"]);var oo=(t,e)=>Ad[t]>=Ad[e];var Ls=(t,e)=>Ad[t]<=Ad[e],K_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var vx=M("<div><!></div>"),gx=M("<div><!> <!></div>"),hx={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 um(t,e){var Ue,Ze;B(e,!0),Q(t,hx);let[i,o]=Re(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(p,"$muted$",i),l=()=>x(f,"$volume$",i),d=()=>x(S,"$currentGridType$",i),s=()=>x(De,"$controlsVisible",i),u=ve(),m=Vt(),f=u.state.volume$,p=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:_}=u.actions.internal,S=u.ui.currentGridType$,I=(Ue=u.callbacks)==null?void 0:Ue.onAudioDoesNotExistHint,T=(Ze=u.callbacks)==null?void 0:Ze.onAudioDisabledHint,N=u.state.isAudioAvailable$,P=u.state.isAudioDisabled,E=u.ui.t,A=q(!1),W,H=v(()=>e.isAds||r()),z=v(()=>!n(H)||a()||l()===0),Y=v(()=>Ls(d(),"l")),ae=v(()=>n(Y)?"":n(z)?!r()||P?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),j=v(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),ne=v(()=>n(z)?0:l()),Z=!1,we=v(()=>e.isAds?!1:P?!T:r()?!1:!I);function ue(ye){y(),$(ye)}function re(){Du(u,l(),m.controls.volumeStepWheel)}function _e(){Bu(u,l(),m.controls.volumeStepWheel)}function xe(ye){$(ye)}function J(ye){$(ye),_()}function Ne(){Z=!0}function pe(){Z=!1,Te()}function k(){clearTimeout(W),O(A,!0)}function We(){Te()}function Te(){W=window.setTimeout(()=>{Z||O(A,!1)},m.controls.volumeBarTimeout)}function X(ye){ye.preventDefault(),ye.deltaY<0?re():ye.deltaY>0&&_e()}let ie=q(!1),De=u.ui.controlsVisible;Oe(()=>{s()||O(ie,!1)});var Be=gx();let it;var U=C(Be);Fa(U,{get content(){return n(ae)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,ke)=>{let Fe=v(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Kt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Fe)},get ariaLabel(){return n(j)},get click(){return e.click},get ariaKeyShortCut(){return ms.KeyM},role:"button",children:(Dt,pt)=>{aa(Dt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=L(U,2);{var Pe=ye=>{var ke=vx();let Fe;var Dt=C(ke);let pt=v(()=>n(Y)?"volumeBar-slider-vertical":""),Bt=v(()=>n(Y)&&!n(A)),st=v(()=>n(Y)?Ne:Uu),St=v(()=>n(Y)?pe:Uu),ti=v(()=>Math.round(n(ne)*100)),Rt=v(()=>`${Math.round(n(ne)*100)}%`),$e=v(()=>n(Y)?"volume-slider-vertical":"volume-slider");Ha(Dt,{get className(){return n(pt)},get isHidden(){return n(Bt)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:re,onWheelDown:_e,onPointerDown:ue,onHandleMove:xe,onPointerUp:J,get onPointerEnter(){return n(st)},get onPointerLeave(){return n(St)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(ti)},get ariaValueText(){return n(Rt)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n($e)}}),w(ke),D(be=>Fe=se(ke,1,"volumeBar s-28",null,Fe,be),[()=>({"volumeBar-vertical":n(Y)})]),b(ye,ke)};R(Ae,ye=>{n(H)&&ye(Pe)})}w(Be),D(ye=>it=se(Be,1,"volumeBar-container s-28",null,it,ye),[()=>({vertical:n(Y)})]),gt("mouseenter",Be,function(...ye){var ke;(ke=n(Y)?k:Uu)==null||ke.apply(this,ye)}),gt("mouseleave",Be,function(...ye){var ke;(ke=n(Y)?We:Uu)==null||ke.apply(this,ye)}),gt("wheel",Be,X),b(t,Be),F(),o()}import{noop as $x}from"@vkontakte/videoplayer-shared/es2015";var _x=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>'),bx=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 pm(t,e){let i=g(e,"isFullscreen",8,!1),o=wn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=de(l);{var s=m=>{var f=_x();b(m,f)},u=m=>{var f=bx();b(m,f)};R(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}function jd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,$x),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=v(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Kt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let m=na(u);a.set(m),o()()},get ariaKeyShortCut(){return ms.KeyF},role:"button",children:(u,m)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var yx=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 fm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=yx();io(o,()=>Ie({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=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(),w(o),b(t,o)}var xx=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 mm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=xx();io(o,()=>Ie({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=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:vt}),ui(6),w(o),b(t,o)}var wx={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 vm(t,e){B(e,!0),Q(t,wx);let i=g(e,"short",3,!1),o=g(e,"isCyrillic",3,!0),r=g(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=v(()=>!o()&&!i()?91:i()?l:95),s=v(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=v(()=>`0 0 ${n(d)} 24`);mm(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 Xd(t,e){B(e,!0);let[i,o]=Re(),r=()=>x($,"$isMobile",i),a=()=>x(p,"$currentGridType$",i),l=()=>x(_,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),m=Vt(),f=ve(),p=f.ui.currentGridType$,$=f.ui.isMobile,y=f.ui.t,_=f.isCyrillicRelatedInterface$,S=v(()=>m.logoType!=="vk"),I=v(()=>n(S)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=v(()=>(r()&&Ls(a(),"m")||Ls(a(),"l"))&&n(S)),N=()=>{var A,W;e.click(),(A=f.callbacks)!=null&&A.onLogoClicked?(W=f.callbacks)==null||W.onLogoClicked():u()&&window.open(u(),"_blank")},P=v(()=>!s()),E=v(()=>n(S)?"btn-vk-video-logo":"btn-vk-logo");Kt(t,{className:"btn-full-opacity",get disabled(){return n(P)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(A){d(A)},children:(A,W)=>{var H=Le(),z=de(H);{var Y=j=>{vm(j,{get logo(){return m.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ae=j=>{fm(j,{})};R(z,j=>{n(S)?j(Y):j(ae,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as Ix}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Q_}from"@vkontakte/videoplayer-core/es2015";var Sx=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-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),Cx=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),Tx={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 Zd(t,e){B(e,!0),Q(t,Tx);let i=g(e,"isMobile",3,!1),o=v(()=>e.iconState===Q_.CONNECTED),r=v(()=>e.iconState===Q_.CONNECTING),a=v(()=>n(o)?"#2688EB":ea),l=v(()=>e.size?fn(e.size):void 0);var d=Le(),s=de(d);{var u=f=>{Xe(f,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(p,$)=>{var y=Sx();ui(2),b(p,y)},$$slots:{default:!0}})},m=f=>{Xe(f,{get style(){return n(l)},testId:"chromecast-icon",children:(p,$)=>{var y=Cx(),_=de(y);let S;var I=L(_);let T;var N=L(I);let P;var E=L(N);let A;var W=L(E);let H;D((z,Y,ae,j,ne)=>{S=se(_,0,"wave2 s-w",null,S,z),T=se(I,0,"wave3 s-w",null,T,Y),P=se(N,0,"wave1 s-w",null,P,ae),A=se(E,0,"s-w",null,A,j),H=se(W,0,"s-w",null,H,ne)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(p,y)},$$slots:{default:!0}})};R(s,f=>{i()?f(u):f(m,!1)})}b(t,d),F()}import{noop as Ex}from"@vkontakte/videoplayer-shared/es2015";function Jd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,Ex),l=ve().ui.t,d=v(()=>e.state===Ix.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Kt(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)=>{Zd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as kx}from"@vkontakte/videoplayer-shared/es2015";var Px=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 gm(t){Xe(t,{testId:"episodes-icon",children:(e,i)=>{var o=Px();ui(2),b(e,o)},$$slots:{default:!0}})}var zu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Ax=M('<span class="text mobile s-24"> </span> <div class="chevron-episodes s-24" data-testid="btn-episodes_icon"><!></div>',1),Lx=M('<span class="text s-24"> </span>'),Mx=M('<span class="text count s-24"> </span>'),Vx=M('<span class="icon s-24"><!></span> <!>',1),Rx={hash:"s-24",code:".icon.s-24{flex-shrink:0}.text.s-24{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-24{overflow:visible}.text.mobile.s-24{padding:0 3px 0 4px}.chevron-episodes.s-24{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function ec(t,e){var Z,we,ue;B(e,!0),Q(t,Rx);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x(_,"$openedByKeyboard$",i),l=()=>x(S,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),m=g(e,"timeCodes",19,()=>[]),f=ve(),p=(we=(Z=f.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?we:kx,$=!!((ue=f.callbacks)!=null&&ue.onEpisodeClicked),y=f.ui.currentGridType$,_=f.ui.episodes.openedByKeyboard$,S=f.ui.episodes.panelOpened$,I=f.ui.isMobile,T=f.ui.t,N=q(void 0),P=re=>{var xe,J,Ne;if(!!((xe=f.callbacks)!=null&&xe.onEpisodeClicked)){let pe=na(re);_.set(pe),S.set(!0),(Ne=(J=f.callbacks)==null?void 0:J.onEpisodeClicked)==null||Ne.call(J,pe)}},E=q(null),A=v(()=>s()/u());Oe(()=>{var _e;let re=zu(n(A),u(),m());re?((_e=n(E))==null?void 0:_e.time)!==re.time&&(p(re),O(E,re,!0)):O(E,null)});let W=v(()=>{var re;return((re=n(E))==null?void 0:re.text)||""}),H=v(()=>oo(r(),"xl")?"FULL":oo(r(),"m")?"COUNT":"SHORT"),z=v(()=>`${T("tooltip_episodes")}: ${n(W)}`),Y=(re,_e,xe)=>mt(null,null,function*(){yield _o(),(re==null?void 0:re.getAttribute("aria-expanded"))==="false"&&_e&&!xe&&It(()=>{_.set(!1),re.focus()})});Oe(()=>{Y(n(N),a(),l())});var ae=Le(),j=de(ae);{var ne=re=>{let _e=v(()=>d()?"px-0":""),xe=v(()=>!$);Kt(re,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:P,get disabled(){return n(xe)},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 pe=Le(),k=de(pe);{var We=X=>{var ie=Ax(),De=de(ie),Be=C(De,!0);w(De);var it=L(De,2),U=C(it);Mr(U,{direction:"right"}),w(it),D(()=>me(Be,n(W))),b(X,ie)},Te=X=>{var ie=Vx(),De=de(ie),Be=C(De);gm(Be,{}),w(De);var it=L(De,2);{var U=Pe=>{var Ue=Lx(),Ze=C(Ue,!0);w(Ue),D(()=>me(Ze,n(W))),b(Pe,Ue)},Ae=(Pe,Ue)=>{{var Ze=ye=>{var ke=Mx(),Fe=C(ke,!0);w(ke),D(()=>me(Fe,m().length)),b(ye,ke)};R(Pe,ye=>{n(H)==="COUNT"&&ye(Ze)},Ue)}};R(it,Pe=>{n(H)==="FULL"?Pe(U):Pe(Ae,!1)})}b(X,ie)};R(k,X=>{d()?X(We):X(Te,!1)})}b(J,pe)},$$slots:{default:!0}})};R(j,re=>{n(E)&&re(ne)})}b(t,ae),F(),o()}import{debounceFn as cb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Wx,PlaybackState as Wl,Player as Kx,PredefinedQualityLimits as _s,VideoFormat as ic,clientChecker as J_}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as $r,getHighestQuality as qx,InterfaceLanguage as Qx,isInvariantQuality as Gx,isNonNullable as Yx,loadVKLangPack as jx,Logger as Xx,map as eb,merge as Zx,Observable as ju,Subject as oc,Subscription as xm,TracerFactory as Jx,ValueSubject as e2,VideoQuality as t2,devNull as i2,now as o2,filter as n2,once as r2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Vs}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Nx,devNull as ai,isNonNullable as Ox,now as li}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Dx,Subject as mn,clearVideoElement as Bx}from"@vkontakte/videoplayer-shared/es2015";var Fx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Wu=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 mn,loadStarted$:new mn,loadEnded$:new mn,loadError$:new mn,ready$:new mn,slotRequested$:new mn,started$:new mn,timeRemained$:new mn,paused$:new mn,resumed$:new mn,ended$:new mn,empty$:new mn,skipped$:new mn,clicked$:new mn,closed$:new mn,error$:new mn};this.loadAdman=e=>(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[li()]}),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?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[li()]}),o())};Dx(Fx,e,this.loadTimeout).then(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[li()]}),window.AdmanHTML?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[li()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[li()]}),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?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[li()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[li()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[li()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[li()]}),!d&&(window.AdmanHTML?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[li()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[li()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[li(),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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")=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[li()]}),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"),ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[li()]}),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,P;if(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[li(),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:f}=e;this.externalApi=f;let p,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?p=$:p=parseInt($,36));let{isEmbed:y,immediateOrigin:_}=Nx(),S=(N=y?_:window.location.href)!=null?N:window.location.href,I=Ie(Gt(Ie(Gt(Ie({},s),{dl:encodeURIComponent(S),autoplay:r?1:0,player_width:i,player_height:o}),p?{request_id:p}:{}),{duration:m}),u);I=Object.fromEntries(Object.entries(I).filter(([E,A])=>Ox(A)));let T={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),(P=this.externalApi)!=null&&P.videoGetAds){let A=yield this.safeExternalCall(this.externalApi.videoGetAds,I);A&&(delete T.slot,delete T.params,Object.assign(T,{json:A}))}E.init(T),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(T)}`})}catch(E){ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[li()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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,f,p;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[li()]}),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),(f=this.adman)==null||f.onError(void 0),(p=this.adman)==null||p.destroy(),this.videoElement&&Bx(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 G_=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 hm=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 Ku,{startTime:m,endTime:f}=u.parse(s);l.startTime=m,l.endTime=f}else if(s.trim()!==""){let u=new _m,{texts:m}=u.parse(s);l.texts=[...l.texts,...m]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Ku=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}},_m=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,f)=>{let p=l.indexOf(f,d);return m===-1||m>p?p:m},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Ku;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}},Y_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2015";var Ua,Li,$m=0,ym=!1,j_="",X_=(t,e=0,i=0)=>t<e&&t<i,qu=(t,e=0,i=0)=>t>=e&&t<=i,Hx=(t,e=0,i=0)=>t>e&&t>i,Z_=(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})=>qu(t,u,m));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(Ua)&&qu(t,Ua.startTime,Ua.endTime)&&j_===e.value)return Ua;if(!bm(Li)&&(r!=null&&r.length)&&!ym){Li=r.find(({startTime:u,endTime:m})=>qu(t,u,m)||a&&X_(t,u,m)),Ua=void 0,!bm(Li)&&r[r.length-1].endTime<t&&(ym=!0);return}else{if(qu(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime))return Ua=Li,Li=void 0,j_=e.value,Ua;(a&&Hx(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime)||l&&X_(t,Li==null?void 0:Li.startTime,Li==null?void 0:Li.endTime))&&(Li=void 0)}};var Qu={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"},Ux={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"},tc=t=>{var e,i;return(i=(e=Qu[t])!=null?e:Qu[Ux[t]])!=null?i:void 0};import{Subscription as zx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Gu=class{constructor(e,i,o,r=new zx){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 Yu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yu||{});var hs=t=>t!=null?t:0,Ms=(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))}},Ul=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 An="off";var zl=t=>!!(Math.round(Math.abs(t)/90)%2);var tb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:m,previewThumbsData:f,uiConfig:p,coreConfig:$,player:y,disabledControls:_,isInteractive:S,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:N,stopPlayer:P,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,additionalButtons:W,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:ae,onVideoChanged:j,looped:ne=!1,statistics:Z,saveRate:we,internalsExposure:ue,playerView:re,playerId:_e})=>{var Wv,Kv,qv;let xe=Gt(Ie({},$),{configName:[...(Wv=$.configName)!=null?Wv:[],"ui"],isAudioDisabled:l,live:Gt(Ie({},(Kv=$.live)!=null?Kv:{}),{isLiveCatchUpMode:!!r})}),J=p,Ne=Jx.createRootTracer(J.features.tracer),pe=Ne.createComponentTracer("Store"),k=y||new Kx(xe,Ne,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});ue==null||ue.expose({corePlayer:k});let We=new Xx,Te=new Wu(We,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),X=Ma.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=We.createComponentLog("Store"),Ae,Pe,Ue={},Ze=new _u,ye=new xm,ke="",Fe=le(!1),Dt=Z&&Z.oneStat?si(Z.oneStat.vsid$):Lr(void 0),pt=le(ta()),Bt=le(!1),st=()=>w_(document,J_.device.isIOS),St=(qv=ie==null?void 0:ie.info.isActive$)!=null?qv:new e2(!1),ti=le(0),Rt=le(!1),$e=le(!1),be=le([]),ee=Zx(k.events.fatalError$,k.events.managedError$).subscribe(c=>be.update(h=>[...h,c])),ot=Lr(!1,c=>{let h=k.events.fatalError$.subscribe(()=>c(!0));return()=>h.unsubscribe()}),fe=c=>mt(null,null,function*(){var oe;let h=Object.values(Qx).includes(c);if(J.downloadVKLanguages&&(h&&J.updateBuiltinLanguages||!Vf(c))){let Se;try{Se=yield jx(c,Mh,Vh)}catch(et){(oe=Z==null?void 0:Z.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),X==null||X.report(et,{errorType:"VKLangPack",fatal:!1})}Se&&(Mf({language:c,pack:Se,fallback:J.defaultLanguage}),Me.set(c),$t.update(et=>et+1))}Vf(c)&&Me.set(c)}),Me=le(t),$t=le(0),kt=le(e);fe(t);let ct=(c,h)=>{let V=ge(Me);return Rf(V,c,h,J.defaultLanguage)},ce=le("thumb");ce.subscribe(c=>{c==="ads"&&k.info.playbackState$.getValue()&&at()});let ze=(()=>{let c=gi([ot,ce],([h,V])=>h?"crashed":V);return Gt(Ie({},c),{is:h=>ge(c)===h})})(),Ge=le(),at=()=>{Ge.set({muted:k.info.muted$.getValue()})},Ft=(()=>{let c=le(new Set(_));return Gt(Ie({},c),{add:h=>{c.update(V=>new Set([...V].concat(h)))},remove:h=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(h)?oe.filter(Se=>!h.includes(Se)):oe.filter(Se=>Se!==h))})},includes:h=>{let V=ge(c);return Array.isArray(h)?h.every(oe=>V.has(oe)):V.has(h)}})})(),Ht=le({width:0,height:0}),oi=null,yi=k.info.isBuffering$,ji=Lr(yi.getValue(),c=>{let h=yi.subscribe(V=>{V&&oi===null?oi=window.setTimeout(()=>{c(yi.getValue()),oi=null},J.loaderDelay):c(V)});return()=>{h.unsubscribe(),oi&&clearTimeout(oi)}});pe.log("create store"),U({message:"create store"});let Nt=c=>{let h=c.container,V=()=>{Jt=new MutationObserver(Se=>{let{removedNodes:et}=Se[0];et.length&&h.append(k.experimental.element$.getValue())}),Jt.observe(h,{childList:!0})},oe=k.experimental.element$.getValue();if(oe)h.append(oe),V();else{let Se=k.experimental.element$.pipe(n2(et=>!!et),r2()).subscribe(et=>{h.append(et),V()});ye.add(Se)}},mi=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),S?Nt(c):(i2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[o2()]}),k.initVideo(c)),pe.log("init video",{isInteractive:S}),c.subtitles&&k.setExternalTextTracks(c.subtitles),Ae=c,ke=c.subtitlesForcedLanguage||""},hi=new oc,ht=c=>hi.next(c),Xt=new oc,Si=new oc,Xi=new oc,Jt=null,Et={actionRewind$:Xt,actionSeek$:Si,inPiP$:St,inFullscreen$:new ju(c=>pt.subscribe(h=>c.next(h))),actionSetSubtitle$:Xi,nextMovie$:hi},Ke=new oc,Ci={actionSeek$:Si,actionSubtitlesSwitched$:Ke,playerSize$:new ju(c=>Ht.subscribe(h=>c.next(h))),inPiP$:St,inFullscreen$:new ju(c=>pt.subscribe(h=>c.next(h))),isLoaderVisible$:new ju(c=>ji.subscribe(h=>c.next(h)))};if(Z){let{oneStat:c,thinOneStat:h,mediascopePixel:V,statSubscription:oe}=Z;c&&(S||oe.add(c.attachTo(k)),oe.add(c.attachToUi(Et)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(Se=>{U({message:`onestat auth error ${String(Se)}`})}),V&&V.attachTo(k)),h&&(oe.add(h.attachTo(k,Te.events)),oe.add(h.attachToUi(Ci)),oe.add(h.attachToAds(Te.events)),h.updateContext({isMobile:ge(Fe)}),h.authorize(a))}if(X){let c=new xm,h=(V,oe)=>c.add(V.subscribe(oe));if(h(k.events.managedError$,V=>{X.logIError(V)}),h(k.events.fatalError$,V=>{X.logIError(V,!0)}),Z){let{oneStat:V}=Z;V&&h(V.experimental.error$,oe=>{X.logIError(oe)})}X.sentrySubscription.add(c)}let bo=()=>{if(J_.device.isIOS&&Pe)try{S_(Pe)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(k.experimental.element$.subscribe(c=>{c&&(Pe=c,c.classList.add("player-media"),Ra(ie)&&ie.updateVideoElement(),S&&c.setAttribute("pip","false"),re==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(k.events.ended$.subscribe(()=>{var c;bo(),(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(()=>mt(null,null,function*(){var h,V;Ra(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=k.info.muted$.getValue();(h=s==null?void 0:s.onStarted)==null||h.call(s),(V=Ue.onStarted)==null||V.call(Ue,c)}))).add(k.events.willSeek$.subscribe(({from:c,to:h})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,h)})).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 h=k.info.duration$.getValue();isFinite(h)&&h>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,h,c),Te.setPosition(c,h))})).add(k.events.fatalError$.subscribe(c=>{var h;(h=s==null?void 0:s.onCrashed)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(k.events.fetcherRecoverableError$.subscribe(c=>{var h;(h=s==null?void 0:s.onRecoverableError)==null||h.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(k.events.loadedMetadata$.subscribe(()=>{Rt.set(!0)})).add(k.info.is3DVideo$.subscribe(c=>{$e.set(c)})).add(k.info.isEnded$.subscribe(c=>{S&&(c?(T!=null&&T.getValue()&&Ft.add(kd),Ft.add("PLAY_BUTTON")):Ft.remove("PLAY_BUTTON"))})).add(k.info.liveTime$.subscribe(c=>{var h;(h=s==null?void 0:s.onLiveTime)==null||h.call(s,c)})).add(k.info.isStalled$.subscribe(c=>{var h;(h=s==null?void 0:s.onStalledChanged)==null||h.call(s,c)})).add(k.info.isLiveEnded$.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onLiveEnded)==null?void 0:h.call(s))})).add(Te.events.loadStarted$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:h.call(c)})).add(Te.events.loadEnded$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:h.call(c)})).add(Te.events.loadError$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:h.call(c)})).add(Te.events.init$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:h.call(c)})).add(Te.events.ready$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:h.call(c)})).add(Te.events.started$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onStarted)==null?void 0:V.call(h,c)})).add(Te.events.timeRemained$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onTimeRemained)==null?void 0:V.call(h,c)})).add(Te.events.ended$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onCompleted)==null?void 0:V.call(h,c)})).add(Te.events.empty$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:h.call(c)})).add(Te.events.clicked$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClicked)==null?void 0:V.call(h,c)})).add(Te.events.closed$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onClosed)==null?void 0:V.call(h,c)})).add(Te.events.error$.subscribe(c=>{var h,V;return(V=(h=s==null?void 0:s.adsInfo)==null?void 0:h.onError)==null?void 0:V.call(h,c)})).add(Te.events.paused$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:h.call(c)})).add(Te.events.resumed$.subscribe(()=>{var c,h;return(h=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:h.call(c)}));let So=new xm,gn=()=>{var et,Pt,zt;let{debugLog:c}=J,h,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:jt}=c;h=c.tag,V=(et=jt==null?void 0:jt[0])!=null?et:V,oe=(zt=(Pt=jt==null?void 0:jt[1])!=null?Pt:jt==null?void 0:jt[0])!=null?zt:oe}let Se=h?`: ${h}`:"";So.add(k.events.log$.subscribe(jt=>{console.debug(`%c sdk${Se} `,`background:${V};`,`sdk component: ${jt.component}`,jt.message)})).add(We.log$.subscribe(jt=>{console.debug(`%c ui${Se} `,`background:${oe};`,`ui component: ${jt.component}.`,jt.message)}))},Ct=()=>{So.unsubscribe()},Ut=(c,h)=>{pe.log("start camera manual rotation",{mx:c,my:h}),k.startCameraManualRotation(c,h)},K=(c=!1)=>{pe.log("stop camera manual rotation",{immediate:c}),k.stopCameraManualRotation(c)},At=(c,h,V)=>{pe.log("move camera focus px",{xpx:c,ypx:h,dt:V}),k.moveCameraFocusPX(c,h,V)},di=()=>{k.holdCamera()},lt=()=>{k.releaseCamera()},wt=Lr(k.info.position$.getValue(),c=>{let h,V,oe=()=>{let Se=k.info.playbackState$.getValue(),et=k.info.isLive$.getValue(),Pt=k.info.duration$.getValue(),zt=k.info.position$.getValue();if(Se&&[Wl.PLAYING,Wl.PAUSED].includes(Se)){let jt=et?zt-Pt:k.getExactTime();jt!==V&&c(jt),V=jt}h=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(h)}),Yt=si(k.info.playbackState$),nt=si(k.info.isBuffering$),Bi=gi([Yt,nt],([c,h])=>h?"buffering":c),Fi=si(k.info.currentBuffer$),Zo=si(k.info.isEnded$),Co=si(k.info.isLive$),Hi=J.features.playbackRate?si(k.info.canChangePlaybackSpeed$):Lr(!1),Zi=si(k.info.liveBufferTime$),Rr=si(k.info.volume$),$o=si(k.info.muted$),ro=bu(k.info.predefinedQualityLimitType$.pipe(eb(c=>c===_s.TRAFFIC_SAVING)),k.info.predefinedQualityLimitType$.getValue()===_s.TRAFFIC_SAVING),ki=bu(k.info.predefinedQualityLimitType$.pipe(eb(c=>c===_s.HIGH_QUALITY)),k.info.predefinedQualityLimitType$.getValue()===_s.HIGH_QUALITY),Jo=si(k.info.autoQualityLimitingAvailable$),en=si(k.info.availableQualities$),Ln=si(k.info.availableQualitiesFps$),er=si(k.info.chromecastState$),Nr=si(k.info.chromecastDeviceName$),ts=si(k.info.currentFormat$),$s=si(k.info.throughputEstimation$),is=si(k.info.videoBitrate$),tr=si(k.info.intrinsicVideoSize$),yr=si(k.info.duration$),hn=si(k.info.isAudioAvailable$),Mn=()=>{oi&&clearTimeout(oi),oi=null},Do=gi([yr,Co],([c,h])=>h?-c:c),Vn=gi([Yt],([c])=>c===Wl.PLAYING),ir=si(k.info.atLiveEdge$),xr=si(k.info.atLiveDurationEdge$),wr=si(k.info.position$),Or=gi([wr,yr],([c,h])=>isFinite(c)&&isFinite(h)&&!!h),so=gi([er],([c])=>c===Wx.CONNECTED),Dr=si(k.info.availableVideoStreams$),Rn=J.features.audioLanguages?si(k.info.availableAudioStreams$):Lr([]),Nn=si(k.info.currentVideoStream$),ao=si(k.info.currentAudioStream$),Br=c=>{c.language&&Pf(c.language),k.setVideoStream(c)},On=(c,h)=>{k.setAudioStream(c),Po(h)&&(c.language&&Pf(c.language),J.features.userVideoPrefs&&i&&Lf(J.userSalt,String(i),{audioTrackId:c.id}))},ft=c=>{let h;if(c.length===1&&(h=c.at(0)),h!=null||(h=c.find(oe=>"isDefault"in oe&&oe.isDefault)),J.features.userVideoPrefs&&i){let oe=Su(J.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let Se=c.find(et=>et.id===oe.audioTrackId);h=Se!=null?Se:h}}let V=s_();return V&&(h!=null||(h=c.find(({language:oe})=>V===oe))),h!=null||(h=c.at(0)),h},pi=c=>{pe.log("change audio stream",{id:c});let h=k.info.availableAudioStreams$.getValue().find(V=>V.id===c);h&&On(h,!0)},Sr=!1;ye.add(k.info.availableAudioStreams$.subscribe(c=>{if(!Sr&&c.length){let h=ft(c);h&&(k.setAudioStream(h),Sr=!0)}})),Rn.subscribe(c=>{var h;(h=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||h.call(s,c.map(({label:V="",id:oe="",language:Se=""})=>({label:V,language:Se,id:oe})))}),ao.subscribe(c=>{var h;return c&&((h=s==null?void 0:s.onAudioStreamChanged)==null?void 0:h.call(s,c.id))});let or=!1;ye.add(k.info.availableVideoStreams$.subscribe(c=>{if(!or&&c.length){let h=ft(c);h&&(k.setVideoStream(h),or=!0)}}));let nr=le(void 0),tn=si(k.info.isAutoQualityEnabled$,c=>c&&nr.set(void 0)),Cr=si(k.info.currentQuality$,()=>nr.set(void 0)),on=gi([nr,Cr],([c,h])=>c!=null?c:h),_n=gi(ts,c=>c!==ic.MPEG),Dn=gi([en,Ln,tn,on,_n],([c,h,V,oe,Se])=>{let et=[];Se&&et.push({value:"auto",displayValue:ct("auto_quality_option"),selected:V});let Pt=c.filter(zt=>!Gx(zt));for(let zt of Pt){let jt=h[zt];et.push({value:zt,displayValue:`${zt}${jt?G_(jt):""}`,selected:V?!1:zt===oe})}return et}),Bn=si(k.info.currentPlaybackRate$),Bo=gi([Bn,ir,xr],([c,h,V])=>{let oe=V||S?1:J.controls.playbackRateMin,Se=h?1:J.controls.playbackRateMax,et=J.controls.playbackRateStep,Pt=[];for(let zt=oe;zt<=Se;zt+=et)Pt.push({value:zt,displayValue:zt===1?ct("playback_rate_1"):ct("playback_rate",{multiplier:zt.toString(10)}),selected:c===zt});return Pt}),To=()=>({displayValue:ct("subtitles_off"),value:An,language:""}),rr=le(To()),Io=gi([rr,$t],([c],h)=>{c.value===An?h(To()):h(c)}),Ui=J.features.subtitles?si(k.info.availableTextTracks$):Lr([]),Fn=Gh(),sr=gi([Ui,Io],([c,h],V)=>{var et;let oe=[],Se=c.find(({id:Pt})=>Pt===h.value);if(Se!=null&&Se.url){let[,Pt]=(et=Fn.find(Se.url))!=null?et:[];if(Pt){V(Pt);return}Ze.download(Se.url).then(zt=>{if(!zt||Ze.isDestroyed())return;let jt=new Y_,Ws=Se.language;if(Ws){let n$=!!Se.isAuto,r$=jt.parse(zt,Ws);oe.push({lang:Ws,subtitles:r$,isAuto:n$,id:Se.id})}Fn.add(Se.url,oe),ge(Io).value===h.value&&V(oe)}).catch(zt=>{var jt;(jt=Z==null?void 0:Z.oneStat)==null||jt.logError({errorType:"Subtitles download",fatal:!1}),X==null||X.report(zt,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),Fr=gi([Bn,Vn,Io],([c,h,V],oe)=>{let Pt;if(k.info.isLive$.getValue()&&h&&V.value!==An){let jt=()=>{let Ws=1e3/(3*c);Pt=setTimeout(jt,Ws),oe(Date.now())};return jt(),()=>clearTimeout(Pt)}}),Hn=gi([Ui,Io],([c,h])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:Se,id:et}of c){let Pt=oe&&tc(oe);oe&&Pt&&V.push({displayValue:Se?ct("subtitles_auto",{language:Pt}):Pt,value:et,selected:(h==null?void 0:h.value)===et,isAuto:Se,language:oe})}return V.length?(V.unshift(Gt(Ie({},To()),{selected:(h==null?void 0:h.value)===An})),V):[]}),Eo={available:[],prev:[]},Hr=()=>{var h,V;let c=k.experimental.getCurrentTime$.getValue();return(V=(h=c==null?void 0:c())!=null?h:Pe==null?void 0:Pe.currentTime)!=null?V:0},yt=gi([wt,Io,sr,Fr],([c,h,V,oe])=>{var et;let Se=k.info.isLive$.getValue();if(Se&&Eo.prev!==V){let Pt=V.find(({id:jt})=>jt===h.value),zt=Eo.prev.find(({id:jt})=>jt===h.value);if(Pt){let jt=Gt(Ie({},Pt),{subtitles:[...(et=zt==null?void 0:zt.subtitles)!=null?et:[],...Pt.subtitles]});Eo.available=[jt],Eo.prev=V}}if(h&&h.value!==An){let Pt=Se?Hr():c,zt=Se?Eo.available:V;return Z_(Pt,h,zt,Se)}}),Tt=gi([yt],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(Io.subscribe(c=>{var h,V;if(c.value===An)(h=s==null?void 0:s.onSubtitleOff)==null||h.call(s);else{let oe=Object.entries(Qu).find(([Se,et])=>et===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let lo=le(!0),Ji=gi([Fi,Do,wr,Zi],([c,h,V,oe])=>{var zt;let Se=(zt=c==null?void 0:c.end)!=null?zt:0;if(!oe)return Se/h;let Pt=-V+oe-h;return(Se-Pt)/h}),Mi=si(k.info.availableSources$),bn=gi([Mi],([c])=>Object.keys((c==null?void 0:c[ic.MPEG])||{}).length>0),yo=()=>{var V,oe,Se;let c=Object.keys(((oe=(V=k.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[ic.MPEG])||{}),h=qx(c)||t2.Q_144P;return(Se=Ae.sources[ic.MPEG])==null?void 0:Se[h]},Un=()=>{var h;let c=yo();if(c)pe.log("download video",{url:c}),Kh(c,((h=Ae==null?void 0:Ae.meta)==null?void 0:h.title)||"video");else{let V="There is no URL for download video";pe.log("download video",{message:V}),U({message:V})}},vi=()=>{U({message:"toggle muted"});let c=k.info.muted$.getValue();k.info.volume$.getValue()===0&&!c?nn(zr(),!1):co(!c,!1)},Ur=()=>{var c;if(Qt.ui.settingsMenu.visible$.set(!1),!ge(Qt.ui.settingsSubMenu.visible$)){let h=ge(Qt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&h){let oe=Ul(h),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Se,name:"settings"})}}pe.log("close settings menu")},ar=(c,h=()=>Promise.resolve())=>mt(null,null,function*(){var Se;Qt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Qt.ui.settingsMenu.visible$.set(!0),yield h();let V=ge(Qt.ui.settingsMenu.ref$),oe=dl();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&V&&oe){let Pt=Ul(V),zt=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Pt,position:zt,name:"settings"})}pe.log("open settings menu",{wasOpenedByKeyboard:c})}),os=(c,h=!1)=>{var et;Qt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Qt.ui.settingsMenu.ref$),oe=dl(),Se=ge(Qt.ui.settingsMenu.visible$);if((et=s==null?void 0:s.uiInfo)!=null&&et.onSettingsMenu&&V&&oe)if(Se&&!h){let zt=Ul(V),jt=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:zt,position:jt,name:"settings"})}else{let zt=Ul(c),jt={top:0,left:0,bottom:0,right:0},Ws=ge(Qt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:zt,position:jt,name:Ws})}pe.log("close settings sub menu")},ns=(c,h)=>{var oe;Qt.ui.settingsSubMenu.visible$.set(!0),Qt.ui.settingsSubMenu.ref$.set(h),Qt.ui.settingsSubMenu.name$.set(c);let V=dl();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&h&&V){let et=Ul(h),Pt=Ms(h,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:et,position:Pt})}pe.log("open settings sub menu",{name:c})},zr=()=>{var h;let c=Math.max(J.volumeMinRestore,(h=$u())!=null?h:0);return c===0?J.volumeDefault:c},Po=c=>{let h=J.features.savePreferredStatesOnUserActionOnly;return!h||h&&!c},nn=(c,h)=>{let V=c===0?zr():c,oe=k.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Se=!l||ze.is("ads");oe&&c>0&&Se&&(oe=!1,Po(h)&&If(!1)),k.setVolume(c,oe),Te.setVolume(c),Po(h)&&wf(V)},co=(c,h)=>{let V=k.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=ze.is("ads");if(k.setMuted(c,oe),Te.setVolume(c?0:V),Po(h)&&(!oe||!c)&&If(c),!c&&V===0){let Se=zr();k.setVolume(Se),Po(h)&&wf(Se),Te.setVolume(Se)}},Tr=le(!1),Fo=c=>{var h,V;pe.log("set looped",{isLooped:c}),Tr.set(c),k.setLooped(c),(V=(h=s==null?void 0:s.uiInfo)==null?void 0:h.onLoopedChanged)==null||V.call(h,c)};Fo(ne);let rs=()=>{var c,h;(h=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||h.call(c)},qe=(c,h=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),pe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Qt.ui.autoplayNextEnabled$.set(c),d_(c),h&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Lt=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),pe.log("set timer next video running",{timerNextVideoRunning:c}),Qt.ui.timerNextVideoRunning$.set(c)},bi=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{h=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}j(!0),h&&Y()},ko=(c=!0)=>{var V;let h=!0;if(c&&(s!=null&&s.onNextVideoClick))try{h=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}j(!1),h&&ae()},Ao=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Ho=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},uo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},eo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},$n=()=>{k.prepare()},yn=()=>{$r(Qt);let c=ge(Qt.ui.controls.disabledControls$),h=ge(Qt.playerPhase),V={playerPhase:h,isInteractive:S,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),h==="ads"){V.action="play",pe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var et;U({message:"toggle play, call player.play"}),V.action="play",k.play(),(et=s==null?void 0:s.onPlay)==null||et.call(s)},Se=()=>{var et;U({message:"toggle play, call player.pause"}),V.action="pause",k.pause(),(et=s==null?void 0:s.onPause)==null||et.call(s)};if(k.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Xt.next(),Si.next(Vs.REWIND),S){N==null||N();return}k.seekTime(0),oe()}else k.info.playbackState$.getValue()!==Wl.PLAYING?oe():Se();pe.log("toggle play",V)},po=(c,{changeReason:h="default",appliesTo:V="to-video"}={},oe)=>{U({message:`set quality, quality: ${c}`}),pe.log("set quality",{quality:c}),k.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Se}=J.features;yu(),c!=="auto"?(Se?(xu({type:"exact_quality",quality:c,videoId:i},V),k.setPredefinedQualityLimits(_s.UNKNOWN)):Sf(i,c),nr.set(c),k.setQuality(c)):Se&&h==="default"&&(dr("auto_quality",V,oe),ge(ro)&&Lo(!1,void 0,oe),ge(ki)&&zn(!1,void 0,oe))},Lo=(c,h="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),pe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?_s.TRAFFIC_SAVING:_s.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(lr(oe,h,V),Ld(!1)):(k.setPredefinedQualityLimits(oe),Po(V)&&Ld(c))},zn=(c,h="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),pe.log("set high quality enabled",{highQualityEnabled:c}),lr(c?_s.HIGH_QUALITY:_s.UNKNOWN,h,V)},lr=(c,h,V)=>{c!==_s.UNKNOWN&&(ge(Jo)&&!ge(tn)&&po("auto",{appliesTo:h,changeReason:"limit-changed"},V),dr(c,h,V)),k.setPredefinedQualityLimits(c)},dr=(c,h,V)=>{Po(V)&&(xu({type:c,videoId:i},h),h==="as-default"&&xu({type:c,videoId:i},"to-video"))},Wn=(c,h=!0)=>{pe.log("set playback rate",{playbackRate:c}),k.setPlaybackRate(c),J.features.saveRate&&we&&!k.info.isLive$.getValue()&&h&&a_(c)},ys=()=>{let c=ge(Hi),h=ge(Bo),V=h.findIndex(({selected:Se})=>Se);if(V===h.length-1||!c)return h[V];let oe=h[V+1];return Wn(oe.value),oe},ss=()=>{let c=ge(Hi),h=ge(Bo),V=h.findIndex(({selected:Se})=>Se);if(V===0||!c)return h[V];let oe=h[V-1];return Wn(oe.value),oe},Ye=(c=Gt(Ie({},To()),{selected:!1}),h)=>{pe.log("set subtitles",Ie({},c)),c.value!==An&&Xi.next(c.isAuto?c.value+"_auto":c.value),Ke.next({enabled:c.value!==An,lang:c.language,auto:!!c.isAuto}),rr.set(c),Po(h)&&(Af(c.value===An?void 0:c.language),J.features.userVideoPrefs&&i&&Lf(J.userSalt,String(i),{subtitleTrackId:c.value===An?void 0:c.value}))},qt=c=>{pe.log("toggle subtitles");let h=ge(Io);(h==null?void 0:h.value)===An?Uo(c):rn(c)},Ii=(c,h)=>{pe.log("change subtitle",{enabled:c}),c?Uo(!0,h):rn(!0)},Uo=(c,h)=>{pe.log("subtitle on");let V=ge(Hn),oe=ge(Me),Se=ke!=null?ke:oe,et;h&&(et=V.find(Pt=>Pt.value===h)),et!=null||(et=V.filter(Pt=>Pt.value!==An).find(Pt=>Pt.language===Se)),Ye(et!=null?et:V[1],c)},rn=c=>{pe.log("subtitle off"),Ye(void 0,c)};ye.add(k.info.availableTextTracks$.subscribe(c=>{var V;function h(){let oe=[];for(let{language:Se,isAuto:et,id:Pt}of c){let zt=Se&&tc(Se);Se&&zt&&oe.push({id:Pt,language:Se,title:et?ct("subtitles_auto",{language:zt}):zt})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,h())}));let cr=le(!0),sn=c=>{cr.set(c)},zo=(c,h,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),pe.log("seek to time",{time:c,action:h,forcePrecise:V}),Si.next(h),k.info.isLive$.getValue()){let Se=k.info.duration$.getValue(),et=Math.min(0,Se+c);k.seekTime(et,V)}else{if(T!=null&&T.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(Hv(c),V)}},Bs=c=>{U({message:`seek to episode start time: ${c}`}),pe.log("seek to episode start time",{time:c}),zo(c,Vs.EPISODE,!0)},an=(c,h,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),pe.log("seek to percent",{percent:c,action:h});let oe=ge(Do)*c;zo(oe,h,V)},Fs=c=>{U({message:`seek external, time: ${c}`}),pe.log("seek external",{time:c}),Si.next(Vs.UNKNOWN),k.seekTime(k.info.isLive$.getValue()?-c:c)},da=c=>{var oe,Se;let h=(oe=c.max)!=null?oe:"none",V=(Se=c.min)!=null?Se:"none";U({message:`set auto quality limitation. Max: ${h}. Min: ${V}`}),pe.log("set auto quality limits",{max:h,min:V}),k.setAutoQualityLimits(c)},ca=c=>{U({message:`seek external to episode start time: ${c}`}),pe.log("seek external to episode start time",{time:c}),zo(c,Vs.EPISODE,!0)},dt=c=>{U({message:`set playback rate to: ${c}`}),pe.log("set playback rate external",{playbackRate:c}),k.setPlaybackRate(c)},ei=le(!1),fo=le(!1),he=gi([Do],([c])=>!!f&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!S),xt=((f==null?void 0:f.frameWidth)||0)>=((f==null?void 0:f.frameHeight)||0),ii=gi([ti],([c])=>{let h=zl(c);return xt?!h:h});ye.add(ze.subscribe(c=>{c!=="video"&&ei.set(!1)}));let xi=le(void 0),Vi=le(!1),fi=c=>{U({message:`start scrubbing, progress: ${c}`}),pe.log("start scrubbing",{progress:c}),Vi.set(!0),ni(c)},ni=c=>{xi.set(c)},mo,ln,dn=()=>{xi.set(void 0),Vi.set(!1)},Ai=()=>{clearTimeout(ln),clearTimeout(mo),mo=window.setTimeout(()=>{dn()},500),Pe==null||Pe.removeEventListener("seeked",Ai)},Zl=(c,h=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),pe.log("complete scrubbing",{progress:c}),an(c,Vs.SLIDER,h),ge(Qt.ui.isMobile)&&ge(Qt.state.currentFormat$)===ic.HLS?(Pe==null||Pe.addEventListener("seeked",Ai),ln=window.setTimeout(()=>{Ai()},300)):dn()},el=gi([wt,Do,xi],([c,h,V],oe)=>{oe(Yx(V)?V*h:c)}),Hs=le(!1),tl=()=>{Hs.set(!0)},il=()=>{Hs.set(!1)},Ir=gi([Ht],([{width:c}],h)=>{let V=K_(c);h(V)}),ua=W.filter(c=>qh(c)),Us=gi([Ir,Fe],([c,h])=>h?ua.filter(V=>!V.hideOnMobile):ua.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),Wr=le(W.filter(c=>Qh(c))),as=gi([Wr,Ir],([c,h])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(h))})),zs=gi([as,Us],([c,h])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?h.map((V,oe)=>{var Se;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Se=V.ariaLabel)!=null?Se:V.tooltip,tooltipText:V.tooltip}}):[]]),ur=le(H),ol=gi([ur],([c])=>J.features.additionalSettingsMenuItems?c.map(h=>h.type==="SWITCH"?Gt(Ie({},h),{onClick:h.onChangeEnabled}):h):[]),nl=(c,h)=>{let V=ge(Wr).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),h));Wr.set(V)},Jl=c=>{let h=ge(Wr);if(h.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}h.push(c),Wr.set(h)},rl=c=>{let h=ge(Wr);if(!h.some(V=>V.id===c)){U({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Wr.set(h)},sl=c=>{Si.next(Vs.LIVE),U({message:"live switch to low latency "+c}),pe.log("live switch to low latency "+c),k.setLiveLowLatency(c)},al=(c,h)=>{let V=ge(ur).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),h));ur.set(V)},ed=c=>{let h=ge(ur);if(h.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}h.push(c),ur.set(h)},pa=c=>{let h=ge(ur);if(!h.some(V=>V.id===c)){U({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),ur.set(h)},Er=le(z),rt=gi([Er],([c])=>J.features.additionalContextMenuItems?c:[]),ut=(c,h)=>{let V=ge(Er).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),h));Er.set(V)},zi=c=>{let h=ge(Er);if(h.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}h.push(c),Er.set(h)},Wo=c=>{let h=ge(Er);if(!h.some(V=>V.id===c)){U({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}h=h.filter(V=>V.id!==c),Er.set(h)},Wi=gi([Fe,ot],([c,h],V)=>{V(c&&h)}),$i=()=>{Si.next(Vs.LIVE),U({message:"switch to active live"}),pe.log("switch to active live"),k.seekTime(0),k.info.playbackState$.getValue()!==Wl.PLAYING&&Qt.actions.internal.togglePlay()},Ri=()=>{pe.log("skip adman"),Te.skip()},fa=(c=!0)=>{var oe;$r(Qt),U({message:`switch from ads to video, callPlay: ${c}`}),pe.log("switch from ads to video",{callPlay:c}),ce.set("video"),c&&k.play(),l&&co(!0,!0);let h=(oe=ge(Ge))==null?void 0:oe.muted,V=!k.info.muted$.getValue();h!==void 0&&!V&&co(h,!0),Ge.set(void 0)},ll=()=>{$r(Qt),U({message:"switch from video to ads"}),pe.log("switch from video to ads"),Qt.actions.internal.pause(),bo(),ce.set("ads")},_p=c=>{$r(Qt);let h=c?"LiveWaitingStart":"thumb";pe.log("set live waiting start",{state:c,playerPhase:h}),ce.set(h)},Mc=c=>{$r(Qt);let h=c?"LiveWaitingRecover":"thumb";pe.log("set live waiting recover",{state:c,playerPhase:h}),ce.set(h)},Vc=c=>{$r(Qt);let h=c?"LiveWaitingRecord":"thumb";pe.log("set live waiting record",{state:c,playerPhase:h}),ce.set(h)},Rc=()=>($r(Qt),pe.log("get debug text data"),zh(k,Ae,Qt,Ne.getTraceId())),bp=()=>($r(Qt),JSON.stringify(Ne.getFinishedSpans())),Nc=()=>($r(Qt),Wh(k,Ae,Qt)),dl=()=>Pe,Oc=()=>{U({message:"toggle chromecast"}),pe.log("toggle chromecast"),k.toggleChromecast()},ma=c=>{var V;if($r(Qt),k.info.isEnded$.getValue())return;let h=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${h}`}),pe.log("pause ads",{internalCall:h}),Te.pause();return}U({message:`pause video, internalCall: ${h}`}),pe.log("pause video",{internalCall:h}),h&&((V=s==null?void 0:s.onPause)==null||V.call(s)),k.pause()},va=c=>{var V;$r(Qt);let h=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${h}`}),pe.log("play ads",{internalCall:h}),Te.play();return}U({message:`play video, internalCall: ${h}`}),pe.log("play video",{internalCall:h}),h&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),k.play()},$p=c=>{$r(Qt);let h=!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: ${h}`}),P==null||P()},Dc=(c,h)=>{$r(Qt),U({message:`first start, show ads: ${c}, internalCall: ${!h}`}),pe.log("first start",{showAds:c,external:h}),c?ce.set("ads"):(ce.set("video"),h?k.play():Qt.actions.internal.togglePlay())},td=()=>(U({message:"getting time codes"}),m),He=()=>{let c=td();if(!c||[0,1].includes(c.length))return;let h=k.info.position$.getValue();return c.find(V=>V.time>h)},_i=c=>{let h=c;h||(h=He());let V=k.info.position$.getValue();pe.log("seek to next episode",Ie({currentTime:V},h)),h&&(U({message:"seek to next episode"}),zo(h.time,Vs.EPISODE,!0))},Mo=()=>{let c=td();if(!c||[0,1].includes(c.length))return;let h=k.info.position$.getValue(),V=c.findIndex(Se=>Se.time>h),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},ga=c=>{let h=c;h||(h=Mo());let V=k.info.position$.getValue();pe.log("seek to prev episode",Ie({currentTime:V},h)),h&&(U({message:"seek to prev episode"}),zo(h.time,Vs.EPISODE,!0))},xn=()=>(U({message:"getting preview thumbs data"}),pe.log("get preview thumbs data",Ie({},f)),f),Gb=()=>mt(null,null,function*(){let c=ie==null?void 0:ie.isActive(),h="none";ie!=null&&ie.isActive()?(h="exit",yield ie==null?void 0:ie.exit()):(h="request",yield ie==null?void 0:ie.request()),pe.log("toggle picture in picture",{isActive:c,action:h})}),Yb=(c=-90)=>{pe.log("rotate video",{alphaDiff:c}),ti.update(h=>h+c)},Bc=le([]);I==null||I.subscribe(c=>{let h=[];for(let V=0;V<c.length;V++){let{range:[oe,Se],subjects:et}=c[V];V===0&&oe!==0&&h.push({time:0,text:"",interactive:!1,completed:!0}),h.push({time:oe/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!et.length||et.every(Pt=>Pt.isRemoved):!et.length}),Se!==1/0&&h.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}Bc.set(h)});let jb=le(!1);T==null||T.subscribe(c=>{c&&ge(Vi)&&dn()});let Hv=c=>{if(!S)return c;let h=ge(Bc),V=ge(Do),Se=ge(wr)/V,et=h.find(Pt=>Pt.interactive&&!Pt.completed&&Pt.time>Se);return typeof(et==null?void 0:et.time)=="number"?Math.min(c,et.time-.05):c},Xb=()=>{Qt.ui.episodes.panelOpened$.set(!1)},Zb=()=>{pe.log("destroy store"),clearTimeout(ln),clearTimeout(mo),ye.unsubscribe(),So.unsubscribe(),k.destroy(),Te.destroy(),Z==null||Z.destroy(),X==null||X.destroy(),ee.unsubscribe(),Jt==null||Jt.disconnect(),Jt=null,Ze.destroy()},Jb=gi([ir,ze,Hi],([c,h,V])=>p.features.doubleForwardAvailable&&!c&&h==="video"&&V),yp=le(!1),Uv=2,Fc=null,zv=c=>{if(!ge(Vn)&&c)return;let h=k.info.currentPlaybackRate$.getValue();c?h!==Uv&&(Fc=h,Wn(Uv,!1),yp.set(!0)):(Fc&&Wn(Fc,!1),yp.set(!1),Fc=null)};ze.subscribe(c=>{c!=="video"&&zv(!1)});let e$=()=>{ma(!1),ei.set(!0)},t$=()=>{va(!1),ei.set(!1)},xp=!1,i$=()=>{fo.set(!0),xp=k.info.playbackState$.getValue()===Wl.PLAYING,ma(!1)},o$=()=>{fo.set(!1),!ge(ei)&&xp&&va(!1),xp=!1};k.events.playing$.subscribe(()=>{ge(ei)&&ma(!1)});let Qt={interfaceLanguage$:Me,isCyrillicRelatedInterface$:kt,initVideo:mi,videoId:i,isClip:o,playerPhase:ze,vsid:Dt,state:{positionExact$:wt,positionWithScrubbing$:el,duration$:Do,playbackState$:Yt,playbackStateRealistic$:Bi,isPlaying$:Vn,isLoaderVisible:ji,bufferedProgress$:Ji,isLive$:Co,canChangePlaybackSpeed$:Hi,isActiveLive$:ir,isOldestAvailableLive$:xr,isRewindableLive$:Or,isEnded$:Zo,muted$:$o,volume$:Rr,trafficSavingEnabled$:ro,highQualityEnabled$:ki,autoQualityLimitingAvailable$:Jo,availableVideoStreams$:Dr,availableAudioStreams$:Rn,videoStream$:Nn,audioStream$:ao,currentQuality$:on,isAutoQualityEnabled$:tn,availableQualities$:Dn,currentPlaybackRate$:Bn,availablePlaybackRates$:Bo,currentSubtitle$:Io,availableTextTracks$:Ui,availableSubtitlesList$:Hn,currentSubtitleCaptions$:Tt,isAutoSubtitleCaptionVisible$:lo,chromecastState$:er,chromecastDeviceName$:Nr,chromecastConnected$:so,currentFormat$:ts,throughputEstimation$:$s,videoBitrate$:is,videoSize$:tr,errorLog$:be,crashed$:ot,isAudioAvailable$:hn,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:Mi,hasMpegSources$:bn,isInteractive:S,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Bc).length,interactiveEpisodes$:Bc,isInteractiveTime$:T?si(T):le(!1),isInteractiveExpectation$:jb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,looped$:Tr,loadedMetadata$:Rt,isAutoQualityAvailable$:_n,previewTrackActive:ei,previewTrackDragInProgress:fo},ui:{t:ct,controlsVisible:le(!1),touched:le(!1),controls:{prevButton:le(void 0),playButton:le(void 0),replayButton:le(void 0),nextButton:le(void 0),playPrevChapterButton:le(void 0),seekToInteractiveButton:le(void 0),interactiveGraphButton:le(void 0),liveButton:le(void 0),time:le(void 0),episodes:le(void 0),volume:le(void 0),subtitles:le(void 0),settings:le(void 0),context:le(void 0),chromecast:le(void 0),pip:le(void 0),fullscreen:le(void 0),vkLogo:le(void 0),interactiveTimeIndicator:le(void 0),timeline:le(void 0),autoplayNextToggle:le(void 0),additionalButtons:W.length?W.reduce(c=>[...c,le(void 0)],[]):[],disabledControls$:Ft},modals:{hotKeyMap:{show:le(!1),data:le({title:"",closeBtnText:"",groups:[]})}},isFullscreen:pt,isFullscreenOpenedByKeyboard:Bt,rotateAlpha:ti,isAutoplay:le(!1),debugPanelVisible:le(!1),episodes:{panelOpened$:le(!1),openedByKeyboard$:le(!1)},contextMenu:{visible$:le(!1),btnRef$:le(void 0),openedByBtnKeyboard$:le(!1),openedByHotKey$:le(!1),lastActiveElem$:le(void 0),showContextMenuBtn$:le(!1),position$:le({top:0,left:0})},playerSize:Ht,isMobile:Fe,mobileNotReportControlHidden$:Wi,icon3DVideoVisible:le(!1),scrubbingInProgress:Vi,volumeChangingInProgress:Hs,is3DVideo:$e,currentGridType$:Ir,additionalButtonsDeprecated$:Us,additionalDesktopControlPanelRightButtons$:zs,additionalSettingsMenuItems$:ol,additionalContextMenuItems$:rt,interactiveHideMobileControls:le(!1),overlayContainer$:le(void 0),startedByKeyboard$:le(!1),autoplayNextEnabled$:le(!1),timerNextVideoRunning$:le(!0),settingsMenu:{visible$:le(!1),ref$:le(void 0),openedByBtnKeyboard$:le(!1)},settingsSubMenu:{visible$:le(!1),ref$:le(void 0),name$:le(void 0)},userActionsDisabled:le(!1),hiddenControls:{volume:le(!1),vkLogo:le(!1),pip:le(!1),chromecast:le(!1),settings:le(!1)},isControlsAvailable:cr,controlBlocks:{topLeft:le(void 0),topRight:le(void 0),middle:le(void 0),bottom:le(void 0),bottomLeft:le(void 0),bottomRight:le(void 0)},videoTitleInfo:le(void 0),doubleForwardOn$:yp,doubleForwardAvailable$:Jb,previewTrackNotificationVisible:le(!1),previewTrackActive:ei,previewTrackDragInProgress:fo,previewTrackAvailable:he,isPreviewTrackHorizontallyAligned:ii},ads:{position:le(0),duration:le(0),playbackState:le("inactive"),canSkip:le(!1),secondsToWatchBeforeSkip:le(0),postrollPassed:le(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Be,focusManager:it},actions:{internal:{preload:$n,firstStart:c=>Dc(c,!1),play:()=>va(!1),pause:()=>ma(!1),togglePlay:yn,toggleMuted:vi,openSettingsMenu:ar,closeSettingsMenu:Ur,openSettingsSubMenu:ns,closeSettingsSubMenu:os,setVolume:c=>nn(c,!1),setMuted:c=>co(c,!1),startVolumeChanging:tl,stopVolumeChanging:il,setVideoStream:Br,setAudioStream:c=>On(c,!1),setQuality:(c,h)=>po(c,h,!1),setTrafficSavingEnabled:(c,h)=>Lo(c,h,!1),setHighQualityEnabled:(c,h)=>zn(c,h,!1),setPlaybackRate:Wn,incrementPlaybackRate:ys,decrementPlaybackRate:ss,setSubtitle:c=>Ye(c,!1),toggleSubtitle:()=>qt(!1),togglePictureInPicture:Gb,startScrubbing:fi,progressScrubbing:ni,completeScrubbing:Zl,toggleChromecast:Oc,switchToActiveLive:$i,switchFromAdsToVideo:fa,switchFromVideoToAds:ll,skipAd:Ri,setLiveWaitingStart:_p,setLiveWaitingRecover:Mc,setLiveWaitingRecord:Vc,getDebugTextData:Rc,getTraceTextData:bp,getDebugPanelData:Nc,getVideoElement:dl,seekTime:(c,h,V)=>zo(c,h,V),clearDelayedBufferingCheckTimeout:Mn,seekEpisodeStartTime:Bs,seekToPercent:an,getNextEpisode:He,seekToNextEpisode:_i,getPrevEpisode:Mo,seekToPrevEpisode:ga,startLogging:gn,stopLogging:Ct,startCameraManualRotation:Ut,stopCameraManualRotation:K,moveCameraFocusPX:At,holdCamera:di,releaseCamera:lt,getVideoEpisodes:td,getPreviewThumbsData:xn,downloadVideo:Un,addLanguage:Mf,setLanguage:fe,nextMovie:ht,videoRotate:Yb,correctSeekTimeToInteractive:Hv,replayInteractive:N,setLooped:Fo,reportProblem:rs,setAutoplayNextEnabled:qe,setTimerNextVideoRunning:Lt,prevVideoClick:bi,nextVideoClick:ko,nextVideoAnnouncementShow:Ao,nextVideoAnnouncementClick:Ho,nextVideoAnnouncementAuto:uo,nextVideoAnnouncementCancel:eo,checkFullscreenSupport:st,changeDoubleForwardOn:zv,closePreviewTrack:t$,previewTrackOpened:e$,previewTrackDragStarted:i$,previewTrackDragFinished:o$},external:{firstStart:c=>Dc(c,!0),play:()=>va(!0),pause:()=>ma(!0),stop:()=>$p(!0),seekTime:c=>Fs(c),seekEpisodeStartTime:c=>ca(c),setPlaybackRate:c=>dt(c),setAutoQualityLimits:c=>da(c),setMuted:c=>co(c,!0),toggleSubtitle:()=>qt(!0),changeSubtitle:Ii,setVolume:c=>nn(c,!0),returnFocusToEpisodes:Xb,updateAdditionalSettingsItem:al,addAdditionalSettingsItem:ed,removeAdditionalSettingsItem:pa,updateAdditionalContextItem:ut,addAdditionalContextItem:zi,removeAdditionalContextItem:Wo,updateAdditionalButton:nl,addAdditionalButton:Jl,removeAdditionalButton:rl,setLiveLowLatency:sl,hideControls:()=>sn(!1),showControls:()=>sn(!0),setQuality:c=>po(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Lo(c,"to-video",!0),setHighQualityEnabled:c=>zn(c,"to-video",!0),changeAudioStream:pi}},callbacks:s,setUiCallbacks:c=>{Ue=Ie({},c)},getAdmanWrapper:()=>Te,getLogger:()=>We,getPlayer:()=>k,destroy:Zb};return Qt};function Zn(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}=Ms(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 s2=["disabledControls$","additionalButtons"],a2=["interactiveTimeIndicator"],ql=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!s2.includes(r)){let l=o||a2.includes(r);a.set(Zn(t,i,r,l))}}};var Xu=(t,e,i)=>mt(null,null,function*(){yield _o(),e&&i&&(i.focus(),t.set(!1))});var l2=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 wm(t){Xe(t,{children:(e,i)=>{var o=l2();b(e,o)},$$slots:{default:!0}})}function Sm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(s,"$contextMenuVisible$",i),a=g(e,"disabled",3,!1),l=g(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,m=d.ui.contextMenu.showContextMenuBtn$,f=d.ui.contextMenu.position$,p=d.ui.contextMenu.btnRef$,$=q(void 0);Oe(()=>{n($)&&It(()=>{p.set(n($))})});let y=T=>{let N=na(T),P=D_(n($));f.set(P),u.set(N),s.set(!r())},_=()=>{m.set(!0)},S=()=>{m.set(!1)},I=v(()=>r()?"opened":"");Kt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:_,blur:S,get ariaExpanded(){return r()},get ref(){return n($)},set ref(T){O($,T,!0)},children:(T,N)=>{wm(T,{})},$$slots:{default:!0}}),F(),o()}var d2=t=>{t.stopPropagation()},c2=M("<div><!> <div></div> <div></div></div>"),u2={hash:"s-26",code:'.interactive-episode-icon-animated.s-26{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-26{height:28px;width:28px}.invisible.s-26{opacity:0;visibility:hidden}.fullscreen.s-26:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-26{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-26{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-26{right:16px;top:40px}}@keyframes s-26-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-26{animation:s-26-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-26{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-26{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-26{display:none}'};function nc(t,e){var X;B(e,!0),Q(t,u2);let[i,o]=Re(),r=()=>x(S,"$isMobile",i),a=()=>x(P,"$areControlsVisible",i),l=()=>x(A,"$currentGridType$",i),d=()=>x(T,"$isInteractiveTime$",i),s=()=>x(_,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),m=()=>x(I,"$isFullscreen",i),f=g(e,"ref",15,void 0),p=q(void 0),$=ve(),y=wo(),{interactiveControlsOpacity$:_}=y,S=$.ui.isMobile,I=$.ui.isFullscreen,T=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,P=$.ui.controlsVisible,E=(X=$.callbacks)==null?void 0:X.onInteractiveTimeIndicatorClick,A=$.ui.currentGridType$,W=v(()=>!r()&&a()),H=v(()=>Ls(l(),"s")),z=v(()=>!d()||!!s()||n(W)),Y=q(!1);Oe(()=>{O(Y,n(z),!0)});let ae=()=>{O(Y,!0)},j=()=>{var ie;ne(),(ie=n(p))==null||ie.addEventListener("animationiteration",ae,{once:!0})},ne=()=>{var ie;O(Y,!1),(ie=n(p))==null||ie.removeEventListener("animationiteration",ae)},Z=ie=>{N.set(ie)},we=v(()=>u()&&!n(z));Oe(()=>{u()?j():ne()});let ue=()=>{n(z)||(N.set(!0),E==null||E())};pn(()=>{N.clearTimeout(),ne()});let re=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var xe=c2();let J;xe.__mousemove=[d2],xe.__click=ue;var Ne=C(xe);Oo(Ne,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return f()},set ref(ie){f(ie)},children:(ie,De)=>{Yd(ie,{completed:!0})},$$slots:{default:!0}});var pe=L(Ne,2);let k;je(pe,ie=>f(ie),()=>f());var We=L(pe,2);let Te;je(We,ie=>O(p,ie),()=>n(p)),w(xe),D((ie,De,Be)=>{J=se(xe,1,"interactive-episode-icon-animated s-26",null,J,ie),k=se(pe,1,"ref-block s-26",null,k,De),Te=se(We,1,"pulse s-26",null,Te,Be)},[()=>({mobile:r(),fullscreen:m(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),gt("mouseleave",xe,re),b(t,xe),F(),o()}tt(["mousemove","click"]);function Zu(t,e){B(e,!0);let i=g(e,"tooltipEnabled",3,!0),o=g(e,"disabled",3,!1),r=g(e,"className",3,void 0),a=g(e,"ref",15),l=g(e,"tooltipVisible",3,!1);Oo(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=v(()=>e.buttonComponent);var f=de(u);Di(f,()=>n(m),(p,$)=>{$(p,Zr(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Rs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var f2=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 la(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=v(()=>`${fn(e.size)}${n(o)}`),a=v(()=>i()?"prev-icon":"next-icon");Xe(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=f2();b(l,s)},$$slots:{default:!0}}),F()}var m2=M('<div class="icon-background-mobile s-23"><!></div>'),v2={hash:"s-23",code:".icon-background-mobile.s-23{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 za(t,e){B(e,!0),Q(t,v2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),l=ve().ui.t,d=v(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=v(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=v(()=>`btn-${o()?"m":"d"}--${e.type}`);Kt(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,f)=>{var p=Le(),$=de(p);{var y=S=>{var I=m2(),T=C(I);let N=v(()=>e.type==="prev");la(T,{get size(){return"32"},get reversed(){return n(N)}}),w(I),b(S,I)},_=S=>{let I=v(()=>e.type==="prev");la(S,{get size(){return"24"},get reversed(){return n(I)}})};R($,S=>{o()?S(y):S(_,!1)})}b(m,p)},$$slots:{default:!0}}),F()}var g2=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 rc(t,e){B(e,!0);let i=v(()=>fn(e.size));Xe(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=g2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as h2}from"@vkontakte/videoplayer-shared/es2015";var _2=M('<div class="icon-background-mobile s-27"></div>'),b2=M("<!> <div><!></div>",1),$2={hash:"s-27",code:".mobile.s-27{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-27{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,$2);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"disabled",3,!1),a=g(e,"className",3,""),l=g(e,"click",3,h2),d=G("tooltip_restart"),s=v(()=>`${o()?"btn-m--play":""} ${a()}`);Kt(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,m)=>{var f=b2(),p=de(f);{var $=T=>{var N=_2();b(T,N)};R(p,T=>{o()&&T($)})}var y=L(p,2);let _;var S=C(y);let I=v(()=>o()?"48":"24");rc(S,{get size(){return n(I)}}),w(y),D(T=>_=se(y,1,"s-27",null,_,T),[()=>({mobile:o()})]),b(u,f)},$$slots:{default:!0}}),F()}var y2=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 Ns(t,e){B(e,!0);let i=v(()=>fn(e.size));Xe(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=y2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as x2}from"@vkontakte/videoplayer-shared/es2015";var w2=M('<div class="icon-background-mobile s-22"><!></div>'),S2={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: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,S2);let[i,o]=Re(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=wo(),l=g(e,"ref",15,void 0),d=g(e,"isMobile",3,!1),s=g(e,"isPlaying",3,!1),u=g(e,"disabled",3,!1),m=g(e,"className",3,""),f=g(e,"click",3,x2),$=ve().ui.t,{toggle:y}=a,_=v(()=>y),S=v(()=>r()!==null),I=v(()=>n(S)?r():s()),T=v(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),N=v(()=>n(I)?Ns:kn),P=v(()=>`${d()?"btn-m--play":""} ${m()}`),E=v(()=>n(S)?n(_):f());Kt(t,{get className(){return n(P)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return ms.KeyK},get ref(){return l()},set ref(A){l(A)},children:(A,W)=>{var H=Le();let z=v(()=>n(N));var Y=de(H);{var ae=ne=>{var Z=w2(),we=C(Z);Di(we,()=>n(z),(ue,re)=>{re(ue,{get size(){return"48"}})}),w(Z),b(ne,Z)},j=ne=>{var Z=Le(),we=de(Z);Di(we,()=>n(z),(ue,re)=>{re(ue,{get size(){return"24"}})}),b(ne,Z)};R(Y,ne=>{d()?ne(ae):ne(j,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}var C2=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 Cm(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=C2();b(e,o)},$$slots:{default:!0}})}function sc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=G("tooltip_interactive_go_back"),l=v(()=>o()?"hidden":"");Kt(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)=>{Cm(d,{})},$$slots:{default:!0}}),F()}var T2=M('<span class="gutter s-25"><span><!></span></span>'),I2={hash:"s-25",code:".gutter.s-25{--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-25{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-25{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function ac(t,e){B(e,!0),Q(t,I2);let[i,o]=Re(),r=()=>x(s,"$autoplayNextEnabled$",i),a=g(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,m=()=>{u(!r(),!0)},f=d("aria_label_autoplay"),p="12",$="#000",y=v(()=>r()?"true":"false");Kt(t,{click:m,get ariaLabel(){return f},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(_){a(_)},children:(_,S)=>{var I=T2(),T=C(I);let N;var P=C(T);{var E=W=>{kn(W,{get size(){return p},fill:$})},A=W=>{Ns(W,{get size(){return p},fill:$})};R(P,W=>{r()?W(E):W(A,!1)})}w(T),w(I),D(W=>N=se(T,1,"toggler s-25",null,N,W),[()=>({enabled:r()})]),b(_,I)},$$slots:{default:!0}}),F(),o()}var E2=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 Tm(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=E2();ui(),b(e,o)},$$slots:{default:!0}})}function lc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=G("tooltip_interactive_seek"),l=v(()=>o()?"hidden":"");Kt(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)=>{Tm(d,{})},$$slots:{default:!0}}),F()}var P2=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>'),k2=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 Im(t,e){let i=g(e,"isOpened",3,!1),o=v(()=>i()?"graph-close-icon":"graph-open-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=k2(),d=L(de(l));{var s=u=>{var m=P2();b(u,m)};R(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function dc(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"hidden",3,!1),r=g(e,"disabled",3,!1),a=g(e,"graphIsOpened",3,!1),d=ve().ui.t,s=v(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=v(()=>o()?"hidden":"");Kt(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,f)=>{let p=v(()=>!!a());Im(m,{get isOpened(){return n(p)}})},$$slots:{default:!0}}),F()}import{PlaybackState as ib}from"@vkontakte/videoplayer-core/es2015";function cc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(u,"$playbackState$",i),a=g(e,"isMobile",3,!1),l=g(e,"isLiveActive",3,!1),d=g(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,m=s.actions.internal.switchToActiveLive,f=s.actions.internal.togglePlay,p=v(()=>()=>{if(!l()){m();return}r()===ib.PAUSED&&f()}),$=v(()=>a()?"":"btn--live btn-full-opacity"),y=v(()=>l()?"btn-live":"btn-live-offset"),_=v(()=>l()&&r()===ib.PLAYING);Kt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(_)},get ariaLabel(){return d()},get click(){return n(p)},children:(S,I)=>{Od(S,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as ob}from"@vkontakte/videoplayer-shared/es2015";var A2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),L2=M('<img class="icon" aria-hidden="true"/>');function Wa(t,e){"use strict";let i=q(!1),o=()=>{O(i,!0)};var r=Le(),a=de(r);{var l=s=>{var u=A2();b(s,u)},d=s=>{var u=L2();D(()=>Ve(u,"src",e.icon)),gt("error",u,o),Ea(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Em(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ob),r=g(e,"ref",15),a=v(()=>o()===ob),l=v(()=>n(a)||i()),d=v(()=>n(a)?"btn-full-opacity":"");Oo(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=v(()=>{var f;return(f=e.testId)!=null?f:e.id});Kt(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:(f,p)=>{Wa(f,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var nb=t=>!!t.buttonComponent;var Os={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Ju=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Zn(t,i,r,o))};import{interpolate as Pm}from"@vkontakte/videoplayer-shared/es2015";var rb=10,sb=40,km=.2,V2=.5,R2=65,N2=114,O2=4,ab=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=v(()=>i?R2:N2),r=q(!1),a=q(0),l=q(0),d=v(()=>n(o)+rb-sb-O2),s=v(()=>Pm(n(a),[km,1],[0,-n(d)])),u=v(()=>Pm(n(a),[km,1],[0,sb])),m=v(()=>Pm(n(a),[km,1],[0,n(o)+rb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(m),onPointerDown:_=>{var S;O(l,((S=e())==null?void 0:S.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:_=>{if(!n(r))return;let S=Math.max(Math.min(_.clientY-n(l),0),-n(d));O(a,Math.abs(S/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=V2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var D2=t=>t;function bs(t,{delay:e=0,duration:i=400,easing:o=D2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var B2=M('<span class="root s-2d"> </span>'),F2={hash:"s-2d",code:".root.s-2d{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 Am(t,e){Q(t,F2);var i=B2(),o=C(i,!0);w(i),D(()=>me(o,e.time)),b(t,i)}var H2=M('<div class="tooltip-wrapper s-v"><div><!></div></div>'),U2={hash:"s-v",code:'.tooltip-wrapper.s-v{display:block;position:relative}.tooltip.s-v{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-v: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-v{opacity:1;visibility:visible}'};function Lm(t,e){Q(t,U2);let i=g(e,"active",3,!1),o=g(e,"pointer",3,!1),r=g(e,"translateXPx",3,0),a=g(e,"translateYPx",3,0),l=g(e,"leftOffset",3,0),d=g(e,"rightOffset",3,0),s=q(void 0),u=q(void 0);function m(S){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return S<T?T+l():S>e.containerWidth-T?e.containerWidth-T-d():S}let f=v(()=>m(r()));var p=H2(),$=C(p);let y;var _=C($);ri(_,()=>{var S;return(S=e.children)!=null?S:vt}),w($),je($,S=>O(u,S),()=>n(u)),w(p),je(p,S=>O(s,S),()=>n(s)),D(S=>{Qe(p,`transform: translate(${n(f)}px, ${a()}px);`),y=se($,1,"tooltip s-v",null,y,S),Qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,p)}var lb=t=>Math.abs(t)/90%4===1;var z2=M('<div class="preview s-u"></div>'),W2=M('<div class="time s-u"> </div>'),K2=M('<div><!> <div class="episode s-u"><!></div> <!></div>'),q2={hash:"s-u",code:".timeline-preview.s-u{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-u{bottom:72px}.preview.s-u{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-u{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-u,.time.s-u{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-u{color:var(--white)}"};function Mm(t,e){B(e,!0),Q(t,q2);let[i,o]=Re(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(_,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=g(e,"time",3,""),s=g(e,"isMobile",3,!1),u=g(e,"videoEpisodes",19,()=>[]),m=g(e,"progress",3,0),f=g(e,"duration",3,0),p=g(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,_=$.ui.playerSize,S=q(0),I=q(0),T=q(""),N=q(0),P=q(0),E=q(0),A=q(0),W=v(()=>zu(m(),f(),u())),H=v(()=>zl(r())),z=v(()=>lb(r())),Y=v(ne),ae=v(()=>(n(z)?1:-1)*(n(S)/2-n(I)/2)),j=v(()=>n(ae)*-1);Oe(()=>{(X=>{O(S,X.width,!0),O(I,X.height,!0)})(we())}),Oe(()=>{(X=>{O(T,X.imgSrc,!0),O(N,X.imgWidth,!0),O(P,X.imgHeight,!0),O(E,X.imgOffsetX,!0),O(A,X.imgOffsetY,!0)})(ue(m()))});function ne(){var Be;let X=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=Z(),De=30;return(Be=n(W))!=null&&Be.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),X)}function Z(){let X=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>X;return{width:X,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:X,isHorizontal:ie,isVertical:De,width:Be}=Z();return ie&&(X=X/Be*n(Y),Be=n(Y)),De&&(Be=Be/X*n(Y),X=n(Y)),{width:Be,height:X}}function ue(X){let ie;e.previewThumbsData.isUV?ie=Math.floor(f()*X/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*X)));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 Pe=n(S)*Ae,Ue=n(I)*U,Ze=-it*n(S),ye=-Be*n(I);return{imgSrc:e.previewThumbsData.links[De],imgWidth:Pe,imgHeight:Ue,imgOffsetX:Ze,imgOffsetY:ye}}var re=K2();let _e;var xe=C(re);{var J=X=>{var ie=z2();D(()=>Qe(ie,`width: ${n(S)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(N)}px ${n(P)}px; background-position: ${n(E)}px ${n(A)}px;
|
|
61
|
-
transform: rotate(${r()}deg) ${n(H)?`translate(${n(
|
|
62
|
-
`)),b(X,ie)};R(xe,X=>{n(T)&&X(J)})}var Ne=L(xe,2),pe=C(Ne);{var k=X=>{var ie=Le(),De=de(ie);{var Be=U=>{var Ae=fs();D(Pe=>me(Ae,Pe),[()=>G("tooltip_episode_unfinished")]),b(U,Ae)},it=U=>{var Ae=fs();D(()=>me(Ae,n(W).text||"")),b(U,Ae)};R(De,U=>{p()&&n(W).completed===!1?U(Be):U(it,!1)})}b(X,ie)};R(pe,X=>{n(W)&&X(k)})}w(Ne);var We=L(Ne,2);{var Te=X=>{var ie=W2(),De=C(ie,!0);w(ie),D(()=>me(De,d())),b(X,ie)};R(We,X=>{p()||X(Te)})}w(re),D(X=>{_e=se(re,1,"timeline-preview s-u",null,_e,X),Qe(re,`width: ${n(H)?n(I):n(S)}px;`)},[()=>({mobile:s()})]),b(t,re),F(),o()}var Q2=M('<span class="time s-f"> </span>'),G2=M("<!> <!>",1),Y2={hash:"s-f",code:".time.s-f{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 Vm(t,e){var fe,Me,$t,kt,ct;B(e,!0),Q(t,Y2);let[i,o]=Re(),r=()=>x(j,"$interactiveEpisodes$",i),a=()=>x(A,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(Z,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),m=()=>x(W,"$isLive$",i),f=()=>x(_e,"$disabledControls$",i),p=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(P,"$bufferedProgress$",i),_=g(e,"showTimeline",3,!1),S=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=ve(),N=Vt(),P=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,A=T.state.duration$,W=T.state.isLive$,H=T.state.isActiveLive$,z=T.ui.isMobile,Y=N.features.episodes&&S()?T.actions.internal.getVideoEpisodes():void 0,ae=T.actions.internal.getPreviewThumbsData(),j=T.state.interactiveEpisodes$,ne=T.state.isInteractive,Z=T.state.isInteractiveTime$,we=T.state.isInteractiveExpectation$,ue=T.actions.internal.correctSeekTimeToInteractive,re=(fe=T.callbacks)==null?void 0:fe.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,xe=T.ui.previewTrackActive,J=($t=(Me=T.callbacks)==null?void 0:Me.uiInfo)==null?void 0:$t.onTimelineMouseEnter,Ne=(ct=(kt=T.callbacks)==null?void 0:kt.uiInfo)==null?void 0:ct.onTimelineMouseLeave,pe=T.ui.t,k=N.features.interactiveResponsiveUi,We=v(()=>ne?r():Y),Te=v(()=>Xo(a())),X=v(()=>Xo(l())),ie=v(()=>l()/a()),De=v(()=>d()||s()),Be=q(!1),it=q(""),U=q(0),Ae=q(0),Pe=q(0),Ue=v(()=>({containerWidth:n(Ae),translateXPx:n(U),translateYPx:ne&&ae?-36:-16,active:n(Be)&&_()&&!n(De)&&!k&&!u(),pointer:!N.features.timelinePreview||!ae||m()})),Ze=pe("aria_timeline"),ye=v(()=>pe("aria_timeline_value",{position:n(X),duration:n(Te)}));function ke(ce){return!ue||!ne?ce:ue(ce*a())/a()}function Fe(ce,ze){var Ge;(Ge=e.onSliderPointerDown)==null||Ge.call(e,ze),T.actions.internal.startScrubbing(ke(ce))}function Dt(ce){s()||T.actions.internal.progressScrubbing(ke(ce))}function pt(ce){var ze;T.actions.internal.completeScrubbing(ke(ce)),O(Be,!1),(ze=e.onSliderPointerUp)==null||ze.call(e)}function Bt(ce,ze,Ge){var at;(at=e.onSliderPointerEnter)==null||at.call(e,ce),ti(ce,ze,Ge),O(Be,!0)}function st(ce,ze,Ge,at){var Ft;(Ft=e.onSliderMove)==null||Ft.call(e,at,ce),ti(ce,ze,Ge),O(Be,!0)}function St(){var ce;O(Be,!1),(ce=e.onSliderLeave)==null||ce.call(e)}function ti(ce,ze,Ge){O(Pe,ke(ce),!0),O(U,ze,!0),Ge&&O(Ae,Ge,!0),O(it,Rt(ce),!0)}function Rt(ce){let ze=Xo((m()?1-ce:ce)*a());return m()?`-${ze}`:ze}let $e=v(()=>f().has("TIMELINE"));var be=G2(),ee=de(be);Lm(ee,Zr(()=>n(Ue),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ce,ze)=>{var Ge=Le(),at=de(Ge);{var Ft=oi=>{Mm(oi,{get time(){return n(it)},get isMobile(){return p()},get videoEpisodes(){return n(We)},get previewThumbsData(){return ae},get progress(){return n(Pe)},get duration(){return a()},get isInteractive(){return ne}})},Ht=oi=>{var yi=Q2(),ji=C(yi,!0);w(yi),D(()=>me(ji,n(it))),b(oi,yi)};R(at,oi=>{N.features.timelinePreview&&ae&&!m()?oi(Ft):oi(Ht,!1)})}b(ce,Ge)},$$slots:{default:!0}}));var ot=L(ee,2);Ha(ot,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return p()},get ariaLabel(){return Ze},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(We)},onPointerDown:Fe,onHandleMove:Dt,onPointerMove:st,onPointerUp:pt,onPointerEnter:Bt,onPointerLeave:St,get onMouseEnter(){return J},get onMouseLeave(){return Ne},get onDisabledClick(){return re},get isInteractive(){return ne},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:pt,get ref(){return I()},set ref(ce){I(ce)}}),b(t,be),F(),o()}var j2={hash:"s-g",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),Q(t,j2);let[i,o]=Re(),r=()=>x(s,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,m=v(()=>Xo(l())),f=v(()=>Xo(a())),p=v(()=>a()/l()),$=v(()=>u("aria_timeline_value",{position:n(f),duration:n(m)})),y=v(()=>Math.round(n(p)*100));Ha(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(p)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var X2=M("<div><!></div>"),Z2=M("<div></div>"),J2={hash:"s-a",code:".timeline.s-a{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-a{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-a{padding:0}.timeline-stub.s-a{min-width:20px;width:100%}.timeline-stub.mobile.s-a{height:8px}"};function Ka(t,e){B(e,!0),Q(t,J2);let[i,o]=Re(),r=()=>x(S,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(P,"$disabled",i),d=()=>x(T,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=g(e,"isAds",3,!1),m=g(e,"isHidden",3,!1),f=g(e,"timelineNotAvailable",3,!1),p=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ve(),_=Vt(),S=y.state.isLive$,I=y.ads.duration,T=y.ads.position,N=y.ui.isMobile,P=le(!1),E=v(()=>!f()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var A=Le(),W=de(A);{var H=Y=>{var ae=X2();let j;var ne=C(ae);{var Z=ue=>{uc(ue,{get position(){return d()},get duration(){return s()}})},we=ue=>{Vm(ue,{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,ue=>{u()?ue(Z):ue(we,!1)})}w(ae),Ps(ae,()=>Rl(m()&&_.features.usePerformanceFix,P,_.disableInvisibleComponentsTimeout)),D(ue=>j=se(ae,1,"timeline s-a",null,j,ue),[()=>({withoutPadding:!p(),mobile:a(),"out-of-flow":l()})]),b(Y,ae)},z=Y=>{var ae=Z2();let j;D(ne=>j=se(ae,1,"timeline-stub s-a",null,j,ne),[()=>({mobile:a()})]),b(Y,ae)};R(W,Y=>{n(E)?Y(H):Y(z,!1)})}b(t,A),F(),o()}import{getRangeAroundIndex as ew}from"@vkontakte/videoplayer-shared/es2015";var tw=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},iw=M("<div></div>"),ow=M('<div><div class="track s-2c"></div></div>'),nw={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 Nm(t,e){B(e,!0),Q(t,nw);let[i,o]=Re(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(_,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:m=0,links:f=[],frameHeight:p=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:_}=d.state,{startScrubbing:S,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,N=d.ui.rotateAlpha,P=q(void 0),E=q(!1),A=q(0),W=q(0),H=q(0),z=q(0),Y=v(()=>p<=$),ae=v(()=>zl(r())),j=v(()=>n(Y)?!n(ae):n(ae)),ne=114,Z=65,we=3,ue=v(()=>n(j)?ne:Z),re=v(()=>n(Y)?ne:Z),_e=v(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=v(()=>m*n(ue)),J=q(0);Oe(()=>{O(z,Math.ceil(-n(H)/n(ue))-1),O(H,-n(xe)*a()/l())});let Ne=()=>{T(pe(),!0)},pe=()=>l()*-n(H)/n(xe)/l(),k=!1,We=ye=>{if(!n(E))return!1;let ke=ye.clientX-n(A);O(H,n(W)+ke),O(H,Math.max(Math.min(n(H),0),-n(xe)),!0),Math.abs(ke)>1&&(k=!0),I(pe())},Te=ye=>{n(E)&&(O(E,!1),!k&&ye&&O(H,-(ye.offsetX-n(J)/2)),k=!1,Ne())},X=()=>{n(E)&&Te()},ie=v(()=>s/u),De=(ye,ke)=>{if(ye!==f.length-1)return u;let Fe=0,Dt=ke*u;for(let pt=1;pt<=u;pt++)ye*s+Fe+Dt<m&&Fe++;return Fe},Be=v(()=>Math.floor(n(z)/s)),it=v(()=>ew(3,n(Be),f.length-1)),U=(ye,ke,Fe)=>{let Dt=s*n(ue);return ye*Dt+ke*n(ue)*u+n(J)/2-we/2+Fe*n(ue)},Ae=v(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(re)}px`,`--frame-height: ${n(_e)}`].join(";"));var Pe=ow();let Ue;var Ze=C(Pe);Ze.__pointerdown=[tw,E,A,W,H,S,pe],Ze.__pointermove=We,Ze.__pointerup=Te,wi(Ze,20,()=>n(it),ye=>ye,(ye,ke)=>{var Fe=Le(),Dt=de(Fe);wi(Dt,16,()=>Array.from({length:n(ie)},(pt,Bt)=>Bt),pt=>pt,(pt,Bt)=>{var st=Le(),St=de(st);wi(St,16,()=>Array.from({length:De(ke,Bt)},(ti,Rt)=>Rt),ti=>ti,(ti,Rt)=>{var $e=iw();D((be,ee)=>{Qe($e,be),se($e,1,ee,"s-2c")},[()=>`--row-index: ${Bt}; --column-index: ${Rt}; left: ${U(ke,Bt,Rt)}px; background-image: url(${f[ke]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(ti,$e)}),b(pt,st)}),b(ye,Fe)}),w(Ze),w(Pe),je(Pe,ye=>O(P,ye),()=>n(P)),D(ye=>{Ue=se(Pe,1,"root s-2c",null,Ue,ye),Qe(Pe,n(Ae)),Qe(Ze,`transform: translateX(${n(H)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(ae)})]),gt("mouseleave",Ze,X),En(Pe,"clientWidth",ye=>O(J,ye)),b(t,Pe),F(),o()}tt(["pointerdown","pointermove","pointerup"]);var rw=M('<div class="notification s-2b"><span class="description s-2b"> </span></div>'),sw={hash:"s-2b",code:".notification.s-2b{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2b{font-size:14px;line-height:18px}"};function Om(t,e){B(e,!1),Q(t,sw);let i=340,{ui:{t:o}}=ve();xo();var r=rw(),a=C(r),l=C(a,!0);w(a),w(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],wn),Xr(3,r,()=>bs,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as aw}from"@vkontakte/videoplayer-shared/es2015";var lw=M('<div class="preview-track-close tooltip s-29"><!></div>'),dw=M('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),cw=M('<div class="wrapper-preview-track s-29"><!></div>'),uw=M('<div class="enriched-timeline s-29"><!> <!> <!></div>'),pw={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 Dm(t,e){B(e,!0),Q(t,pw);let[i,o]=Re(),r=()=>x(_,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(S,"$previewTrackActive",i),d=()=>x(p,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),m=ve(),f=200,{positionWithScrubbing$:p,isRewindableLive$:$,duration$:y}=m.state,{playerSize:_,previewTrackActive:S}=m.ui,{countPerImage:I=0,links:T=[],frequency:N=0}=m.actions.internal.getPreviewThumbsData()||{},P=v(()=>r().width>100),E=q(!v_()),A=()=>{n(E)&&(m_(),O(E,!1))},W=ue=>{let re=Math.floor(a()*ue/N),_e=Math.floor(re/I),xe=aw(3,_e,T.length-1);for(let J of xe){let Ne=new Image;Ne.src=T[J]}},H=(ue,re)=>{W(re),!l()&&e.onTimelineMove(ue)};var z=uw(),Y=C(z);{var ae=ue=>{var re=dw(),_e=C(re);let xe=v(()=>Xo(d()));Am(_e,{get time(){return n(xe)}});var J=L(_e,2),Ne=C(J);As(Ne,{onClick:()=>m.actions.internal.closePreviewTrack()}),w(J);var pe=L(J,2);{var k=We=>{var Te=lw(),X=C(Te);Om(X,{}),w(Te),b(We,Te)};R(pe,We=>{n(E)&&We(k)})}w(re),gt("mouseleave",J,A),Xr(3,re,()=>bs,()=>({duration:f})),b(ue,re)};R(Y,ue=>{l()&&ue(ae)})}var j=L(Y,2);let ne=v(()=>!n(P));Ka(j,{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:W,get ref(){return u()},set ref(ue){u(ue)}});var Z=L(j,2);{var we=ue=>{var re=cw(),_e=C(re);Nm(_e,{}),w(re),D(()=>Qe(re,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ue,re)};R(Z,ue=>{e.previewTrackAvailable&&ue(we)})}w(z),D(()=>Qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var mw=M('<div><!> <div class="controls s-12" data-testid="player_controls"><div class="controls-left s-12"><!> <!> <!></div> <div class="controls-right s-12"></div></div></div> <!>',1),vw={hash:"s-12",code:'.wrapper-bottom.s-12{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-12:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-12>:where(.s-12){pointer-events:auto}.controls.s-12{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-12,.controls-right.s-12{align-content:center;display:flex}.controls-left.s-12{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-12 >:not(:first-child),.controls-right.s-12 >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-12{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-12{transition:none}'};function Fm(t,e){var pa,Er;B(e,!0),Q(t,vw);let[i,o]=Re(),r=()=>x(So,"$disabledControls$",i),a=()=>x(nt,"$adPlaybackState",i),l=()=>x(Ht,"$playbackState$",i),d=()=>x(bo,"$currentSubtitle$",i),s=()=>x(ji,"$isEnded$",i),u=()=>x(Zo,"$currentGridType$",i),m=()=>x(Nt,"$isLive$",i),f=()=>x(Ke,"$chromecastState$",i),p=()=>x(ht,"$isPictureInPictureActive",i),$=()=>x(Xt,"$pictureInPictureType$",i),y=()=>x(Ci,"$availableSubtitlesList$",i),_=()=>x(Ut,"$contextMenuOpenedByKeyboard$",i),S=()=>x(Ct,"$showContextMenuBtn$",i),I=()=>x(hi,"$isRewindableLive$",i),T=()=>x(mi,"$isActiveLive$",i),N=()=>x(is,"$graphIsOpened$",i),P=()=>x(gn,"$contextMenuVisible$",i),E=()=>x(Bi,"$isFullscreen",i),A=()=>x(Hi,"$autoplayNextEnabled",i),W=()=>x(n(Ji),"$prevButton",i),H=()=>x(n(Mi),"$replayButton",i),z=()=>x(n(bn),"$playButton",i),Y=()=>x(n(yo),"$nextButton",i),ae=()=>x(n(Un),"$playPrevChapterButton",i),j=()=>x(n(vi),"$seekToInteractiveButton",i),ne=()=>x(n(Ur),"$interactiveGraphButton",i),Z=()=>x(n(ar),"$liveButton",i),we=()=>x(n(os),"$time",i),ue=()=>x(n(ns),"$episodes",i),re=()=>x(n(zr),"$vkLogo",i),_e=()=>x(n(Po),"$volume",i),xe=()=>x(n(nn),"$subtitles",i),J=()=>x(n(co),"$settings",i),Ne=()=>x(n(Tr),"$context",i),pe=()=>x(n(Fo),"$fullscreen",i),k=()=>x(n(rs),"$chromecast",i),We=()=>x(Co,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Fi,"$playerSize",i),X=()=>x(Jo,"$isInteractiveTime$",i),ie=()=>x(ei,"$previewTrackActive",i),De=()=>x(Si,"$settingsMenuVisible",i),Be=()=>x(uo,"$settingButtonRef$",i),it=()=>x(K,"$startedByKeyboard$",i),U=()=>x(oi,"$isAudioAvailable$",i),Ae=()=>x(be,"$fakeIsPlaying$",i),Pe=()=>x($s,"$seekToInteractiveDisabledTooltip$",i),Ue=()=>x(xt,"$isPreviewTrackHorizontallyAligned$",i),Ze=()=>x(he,"$previewTrackAvailable",i),ye=()=>x(fo,"$previewTrackDragInProgress",i),ke=()=>x(Yt,"$adPosition",i),Fe=()=>x(Ft,"$position$",i),Dt=()=>x(wt,"$adDuration",i),pt=()=>x(at,"$duration$",i),Bt=g(e,"playerControlsWrapperRef",15,void 0),st=g(e,"playerControlsRef",15,void 0),St=g(e,"isAds",3,!1),ti=g(e,"logoTargetUrl",3,""),Rt=g(e,"isOneVideoPlaylist",3,!1),$e=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:be}=wo(),ee=ve(),ot=wo(),fe=Vt(),Me=ee.actions.internal.toggleMuted,$t=ee.actions.internal.togglePlay,kt=ee.actions.internal.pause,ct=ee.actions.internal.toggleSubtitle,ce=ee.actions.internal.checkFullscreenSupport,ze=(pa=ee.callbacks)==null?void 0:pa.onAudioDoesNotExistHint,Ge=(Er=ee.callbacks)==null?void 0:Er.onAudioDisabledHint,at=ee.state.duration$,Ft=ee.state.positionWithScrubbing$,Ht=ee.state.playbackState$,oi=ee.state.isAudioAvailable$,yi=ee.state.isAudioDisabled,ji=ee.state.isEnded$,Nt=ee.state.isLive$,mi=ee.state.isActiveLive$,hi=ee.state.isRewindableLive$,{isActive$:ht,type$:Xt}=ot.pictureInPicture$,Si=ee.ui.settingsMenu.visible$,Xi=ee.ui.settingsMenu.openedByBtnKeyboard$,Jt=ee.ui.controls,Et=ee.actions.internal.getVideoEpisodes(),Ke=ee.state.chromecastState$,Ci=ee.state.availableSubtitlesList$,bo=ee.state.currentSubtitle$,So=Jt.disabledControls$,gn=ee.ui.contextMenu.visible$,Ct=ee.ui.contextMenu.showContextMenuBtn$,Ut=ee.ui.contextMenu.openedByBtnKeyboard$,K=ee.ui.startedByKeyboard$,At=ee.ui.controlBlocks,di=ee.ui.previewTrackNotificationVisible,lt=ee.ui.t,wt=ee.ads.duration,Yt=ee.ads.position,nt=ee.ads.playbackState,Bi=ee.ui.isFullscreen,Fi=ee.ui.playerSize,Zo=ee.ui.currentGridType$,Co=ee.ui.additionalDesktopControlPanelRightButtons$,Hi=ee.ui.autoplayNextEnabled$,Zi=ee.actions.internal.getVideoElement,Rr=ee.actions.internal.replayInteractive,$o=ee.actions.internal.prevVideoClick,ro=ee.actions.internal.nextVideoClick,ki=ee.state.isInteractive,Jo=ee.state.isInteractiveTime$,en=ee.state.showInteractiveGraph,Ln=ee.state.showSeekToInteractive,er=ee.state.showPlayPrevChapter,Nr=ee.state.showInteractiveTimeIndicator,ts=ee.state.playPrevChapterDisabledTooltip,$s=ot.seekToInteractiveDisabledTooltip$,is=ot.graphIsOpened$,tr=fe.features.interactiveResponsiveUi,yr=v(()=>r().has("EPISODE_BUTTON")),hn=v(()=>r().has("GRAPH_BUTTON")),Mn=v(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Do=v(()=>r().has("PLAY_BUTTON")),Vn=v(()=>r().has("REPLAY_BUTTON")),ir=v(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),xr=()=>ee.actions.internal.toggleChromecast(),wr=v(()=>St()?a()==="playing":l()===Bm.PLAYING),Or=v(()=>d().value!=="off"),so=v(()=>s()&&!St()||ki),Dr=v(()=>tr?n(so)&&oo(u(),"m"):n(so)),Rn=v(()=>!s()||ki||St()),Nn=v(()=>oo(u(),"m")),ao=v(()=>e.showNextPrevButtons&&oo(u(),"m")&&!St()&&e.nextButtonActive),Br=v(()=>e.showNextPrevButtons&&oo(u(),"m")&&!St()&&e.prevButtonActive),On=v(()=>!St()&&!!m()),ft=v(()=>f()!==db.NOT_AVAILABLE&&!(p()&&$()===1)&&oo(u(),"m")&&!ki),pi=v(()=>e.showAutoplayNext&&!Rt()&&oo(u(),"s")),Sr=v(()=>y().length>0&&oo(u(),"m")),or=v(()=>_()||S()),nr=v(()=>oo(u(),"s")&&!St()),tn=v(()=>!e.logoHidden&&!St()),Cr=v(()=>fe.features.fullscreen&&ce()&&(e.logoHidden||oo(u(),tr?"xs":"s"))&&!(p()&&$()===1)&&(ki?$e():!0)),on=v(()=>(!m()||St())&&!(fe.features.interactiveHideTime&&ki)),_n=v(()=>en&&oo(u(),"m")),Dn=v(()=>tr?Ln&&oo(u(),"s"):Ln),Bn=v(()=>tr?er&&oo(u(),"s"):er),Bo=v(()=>!St()&&!m()&&!!(Et!=null&&Et.length)&&n(Nn)&&!n(yr)),To=v(()=>!I()||!!T()),rr=v(()=>N()?lt("tooltip_interactive_graph_on"):lt("tooltip_interactive_graph_off")),Io=v(()=>P()?lt("tooltip_context_menu_close"):lt("tooltip_context_menu_open")),Ui=(rt,ut)=>rt?ut&&ut===Bm.PAUSED?lt("tooltip_play"):"":lt("tooltip_live"),Fn=v(()=>Ui(n(To),l())),sr=v(()=>fe.logoType==="vk_video"?lt("tooltip_vk_video_logo"):lt("tooltip_vk_logo")),Fr=v(()=>n(Or)?lt("tooltip_subtitles_on"):lt("tooltip_subtitles_off")),Hn=v(()=>E()?lt("tooltip_fullscreen_on"):lt("tooltip_fullscreen_off")),Eo=v(()=>f()===db.CONNECTED?lt("tooltip_chromecast_on"):lt("tooltip_chromecast_off")),Hr=v(()=>A()?lt("tooltip_autoplay_on"):lt("tooltip_autoplay_off")),yt=q(0),Tt=ci({}),lo=ci({}),Ji=v(()=>Jt.prevButton),Mi=v(()=>Jt.replayButton),bn=v(()=>Jt.playButton),yo=v(()=>Jt.nextButton),Un=v(()=>Jt.playPrevChapterButton),vi=v(()=>Jt.seekToInteractiveButton),Ur=v(()=>Jt.interactiveGraphButton),ar=v(()=>Jt.liveButton),os=v(()=>Jt.time),ns=v(()=>Jt.episodes),zr=v(()=>Jt.vkLogo),Po=v(()=>Jt.volume),nn=v(()=>Jt.subtitles),co=v(()=>Jt.settings),Tr=v(()=>Jt.context),Fo=v(()=>Jt.fullscreen),rs=v(()=>Jt.chromecast),qe=v(()=>({prevButton:W()?W().right-W().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:Y()?Y().right-Y().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:j()?j().right-j().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton:Z()?Z().right-Z().left:0,time:we()?we().right-we().left:0,episodes:ue()?ue().right-ue().left:0,vkLogo:re()?re().right-re().left:0,volume:_e()?_e().right-_e().left:0,subtitles:xe()?xe().right-xe().left:0,settings:J()?J().right-J().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:k()?k().right-k().left:0,additionalButtons:We().length?We().reduce(rt=>[...rt,40],[]):[]})),Lt=q(0);Oe(()=>{(!n(Lt)||n(Lt)<n(qe).time)&&It(()=>O(Lt,n(qe).time,!0))});let bi=q(!1);Oe(()=>{let rt=0;n(Bo)&&(oo(u(),"xl")?rt=n(qe).time:rt=60);let ut=n(qe).prevButton+n(qe).playButton+n(qe).nextButton+n(qe).seekToInteractiveButton+n(qe).interactiveGraphButton+n(qe).liveButton+n(Lt)+rt;O(bi,n(on)&&n(yt)>=ut,!0)});let ko=v(()=>n(bi)&&oo(u(),"m")),Ao=cb(ql,260),Ho=cb(Ju,260);Oe(()=>{Te(),X(),ie(),Ao(Zi(),Jt,Tt,e.showControls),Ho(Zi(),At,lo,e.showControls)}),Oe(()=>{lo.bottom=Bt()});let uo=le();Oe(()=>{De(),Be()&&It(()=>Ol(Be(),De(),Xi))});let eo;Oe(()=>{it(),It(()=>Xu(K,it(),eo))});function $n(){ra({isAudioDisabled:yi,isAudioAvailable:U(),isAds:St(),audioIsNotExistHintCallback:ze,audioDisabledHintCallback:Ge})&&Me()}let yn=ki?Rr:$t,po=v(()=>Ae()!==null),Lo=v(()=>n(po)?Ae():n(wr)),zn=v(()=>n(Lo)?lt("tooltip_pause"):lt("tooltip_play")),lr=lt("tooltip_episodes"),dr=v(()=>{var rt,ut,zi,Wo;return n(Br)?{id:"prevButton",type:"desktop-control-panel-left",weight:Rs.prevButton,buttonComponent:za,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:$o.bind(null,!0)},tooltipEnabled:!((ut=(rt=ee.callbacks)==null?void 0:rt.uiInfo)!=null&&ut.onPrevButtonMouseEnter)&&!((Wo=(zi=ee.callbacks)==null?void 0:zi.uiInfo)!=null&&Wo.onPrevButtonMouseLeave),mouseEnter:()=>{var Wi,$i,Ri;(Ri=($i=(Wi=ee.callbacks)==null?void 0:Wi.uiInfo)==null?void 0:$i.onPrevButtonMouseEnter)==null||Ri.call($i,Zn(Zi(),Tt,"prevButton",e.showControls))},mouseLeave:()=>{var Wi,$i,Ri;(Ri=($i=(Wi=ee.callbacks)==null?void 0:Wi.uiInfo)==null?void 0:$i.onPrevButtonMouseLeave)==null||Ri.call($i,Zn(Zi(),Tt,"prevButton",e.showControls))},tooltipText:lt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Wn=v(()=>n(Dr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Rs.replayButton,buttonComponent:Ql,buttonComponentProps:{disabled:n(Vn),click:yn},tooltipText:lt("tooltip_restart"),disabled:n(Vn)}:void 0),ys=v(()=>n(Rn)?{id:"playButton",type:"desktop-control-panel-left",weight:Rs.playButton,buttonComponent:Gl,buttonComponentProps:{disabled:n(Do),isPlaying:n(wr),click:$t},tooltipText:n(zn),disabled:n(Do)}:void 0),ss=v(()=>{var rt,ut,zi,Wo;return n(ao)?{id:"nextButton",type:"desktop-control-panel-left",weight:Rs.nextButton,buttonComponent:za,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:ro.bind(null,!0)},tooltipEnabled:!((ut=(rt=ee.callbacks)==null?void 0:rt.uiInfo)!=null&&ut.onNextButtonMouseEnter)&&!((Wo=(zi=ee.callbacks)==null?void 0:zi.uiInfo)!=null&&Wo.onNextButtonMouseLeave),mouseEnter:()=>{var Wi,$i,Ri;(Ri=($i=(Wi=ee.callbacks)==null?void 0:Wi.uiInfo)==null?void 0:$i.onNextButtonMouseEnter)==null||Ri.call($i,Zn(Zi(),Tt,"nextButton",e.showControls))},mouseLeave:()=>{var Wi,$i,Ri;(Ri=($i=(Wi=ee.callbacks)==null?void 0:Wi.uiInfo)==null?void 0:$i.onNextButtonMouseLeave)==null||Ri.call($i,Zn(Zi(),Tt,"nextButton",e.showControls))},tooltipText:lt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ye=v(()=>ki&&n(Bn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Rs.playPrevChapterButton,buttonComponent:sc,buttonComponentProps:{disabled:n(ir),click:e.playPrevChapter},tooltipText:lt("tooltip_interactive_go_back"),disabledTooltipContent:lt(ts),disabled:n(ir)}:void 0),qt=v(()=>ki&&n(Dn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Rs.seekToInteractiveButton,buttonComponent:lc,buttonComponentProps:{disabled:n(Mn),click:e.seekToInteractive},tooltipText:lt("tooltip_interactive_seek"),disabled:n(Mn),disabledTooltipContent:lt(Pe())}:void 0),Ii=v(()=>ki&&n(_n)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Rs.interactiveGraphButton,buttonComponent:dc,buttonComponentProps:{disabled:n(hn),click:is.toggle,graphIsOpened:N()},tooltipText:n(rr)}:void 0),Uo=v(()=>n(On)?{id:"liveButton",type:"desktop-control-panel-left",weight:Rs.liveButton,buttonComponent:cc,buttonComponentProps:{isLiveActive:n(To),ariaLabel:n(Fn)},tooltipText:n(Fn),disabled:n(To)&&l()===Bm.PLAYING}:void 0),rn=v(()=>[n(dr),n(Wn),n(ys),n(ss),n(Ye),n(qt),n(Ii),n(Uo)].filter(rt=>!!rt).sort(Oa)),cr=v(()=>n(tn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Os.vkLogo,buttonComponent:Xd,buttonComponentProps:{targetUrl:ti(),logoClickable:e.logoClickable,click:kt},tooltipText:n(sr),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),sn=v(()=>n(pi)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Os.autoplayNext,buttonComponent:ac,tooltipText:n(Hr)}:void 0),zo=v(()=>({id:"volume",type:"desktop-control-panel-right",weight:Os.volume,buttonComponent:um,buttonComponentProps:{click:$n,isAds:St()}})),Bs=v(()=>n(Sr)?{id:"subtitles",type:"desktop-control-panel-right",weight:Os.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Or),click:ct},tooltipText:n(Fr)}:void 0),an=v(()=>n(nr)?{id:"settings",type:"desktop-control-panel-right",weight:Os.settings,buttonComponent:Hl,buttonComponentProps:{ref$:uo},tooltipText:De()?void 0:lt("tooltip_settings_off")}:void 0),Fs=v(()=>fe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Os.context,buttonComponent:Sm,buttonComponentProps:{ariaLabel:lt("aria_label_context_menu")},className:n(or)?"":"out-of-view",tooltipText:n(Io)}:void 0),da=v(()=>n(Cr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Os.fullscreen,buttonComponent:jd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Hn)}:void 0),ca=v(()=>n(ft)?{id:"chromecast",type:"desktop-control-panel-right",weight:Os.chromecast,buttonComponent:Jd,buttonComponentProps:{state:f(),click:xr},tooltipText:n(Eo)}:void 0),dt=v(()=>[n(cr),n(sn),n(zo),n(Bs),n(an),n(Fs),n(da),n(ca),...We()].filter(rt=>!!rt).sort(Oa)),ei=ee.ui.previewTrackActive,fo=ee.ui.previewTrackDragInProgress,he=ee.ui.previewTrackAvailable,xt=ee.ui.isPreviewTrackHorizontallyAligned,ii=v(()=>ab({onPreviewTrackOpened:ee.actions.internal.previewTrackOpened,getTimelineRef:()=>Tt.timeline,isHorizontal:Ue()})),xi=v(()=>n(ii).progressBarY),Vi=v(()=>n(ii).controlsY),fi=v(()=>n(ii).onPointerDown),ni=v(()=>n(ii).onPointerMove),mo=v(()=>n(ii).onPointerUp),ln=v(()=>n(ii).calculatedHeight),dn=v(()=>n(ii).closePreviewTrack);Oe(()=>{ie()?di.set(!1):n(dn)()});let Ai;Mt(()=>()=>Ai&&clearTimeout(Ai));let Zl=rt=>{ie()||!Ze()||(n(fi)(rt),Ai=setTimeout(()=>{ee.actions.internal.previewTrackDragStarted()},200))},el=()=>{ie()||n(mo)(),Ai&&clearTimeout(Ai),ye()&&ee.actions.internal.previewTrackDragFinished()},Hs=rt=>{n(ni)(rt),!ie()&&Ze()&&!ie()&&di.set(!0)},tl=()=>{di.set(!1)};var il=mw(),Ir=de(il);let ua;var Us=C(Ir);{var Wr=rt=>{let ut=v(()=>n(xi)()),zi=v(()=>n(ln)());Dm(rt,{get animatedOffsetY(){return n(ut)},get animatedPreviewTrackHeight(){return n(zi)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:Hs,onTimelinePointerDown:Zl,onTimelinePointerUp:el,onTimelinePointerLeave:tl,get previewTrackAvailable(){return Ze()},get timelineRef(){return Tt.timeline},set timelineRef(Wo){Tt.timeline=Wo}})};R(Us,rt=>{e.showControls&&rt(Wr)})}var as=L(Us,2),zs=C(as),ur=C(zs);wi(ur,17,()=>n(rn),rt=>rt.id,(rt,ut)=>{Zu(rt,{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 Tt[n(ut).id]},set ref(zi){Tt[n(ut).id]=zi}})});var ol=L(ur,2);{var nl=rt=>{let ut=v(()=>!e.showControls),zi=v(()=>St()?ke():Fe()),Wo=v(()=>St()?Dt():pt());Gd(rt,{get isHidden(){return n(ut)},isMobile:!1,get showDuration(){return n(ko)},get position(){return n(zi)},get duration(){return n(Wo)},get ref(){return Tt.time},set ref(Wi){Tt.time=Wi}})};R(ol,rt=>{n(on)&&rt(nl)})}var Jl=L(ol,2);let rl=v(()=>!n(Bo));Oo(Jl,{className:"w-max",get disabled(){return n(rl)},get tooltipContent(){return lr},get tooltipVisible(){return e.showControls},get ref(){return Tt.episodes},set ref(rt){Tt.episodes=rt},children:(rt,ut)=>{var zi=Le(),Wo=de(zi);{var Wi=$i=>{ec($i,{get position(){return Fe()},get duration(){return pt()},get timeCodes(){return Et}})};R(Wo,$i=>{n(Bo)&&$i(Wi)})}b(rt,zi)},$$slots:{default:!0}}),w(zs);var sl=L(zs,2);wi(sl,21,()=>n(dt),rt=>rt.id,(rt,ut)=>{var zi=Le(),Wo=de(zi);{var Wi=Ri=>{Zu(Ri,{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 Tt[n(ut).id]},set ref(fa){Tt[n(ut).id]=fa}})},$i=Ri=>{let fa=v(()=>!!n(ut).disabled);Em(Ri,{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(fa)},get onClick(){return n(ut).onClick},get disableMouseupTooltipShow(){return n(ut).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Tt[n(ut).id]},set ref(ll){Tt[n(ut).id]=ll}})};R(Wo,Ri=>{nb(n(ut))?Ri(Wi):Ri($i,!1)})}b(rt,zi)}),w(sl),w(as),je(as,rt=>st(rt),()=>st()),w(Ir),je(Ir,rt=>Bt(rt),()=>Bt());var al=L(Ir,2);{var ed=rt=>{nc(rt,{get ref(){return Tt.interactiveTimeIndicator},set ref(ut){Tt.interactiveTimeIndicator=ut}})};R(al,rt=>{Nr&&rt(ed)})}D((rt,ut)=>{ua=se(Ir,1,"wrapper-bottom s-12",null,ua,rt),Qe(as,ut),as.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(Vi)()}px);`]),En(zs,"clientWidth",rt=>O(yt,rt)),b(t,il),F(),o()}import{ChromecastState as pb,PlaybackState as fb}from"@vkontakte/videoplayer-core/es2015";import{noop as ub}from"@vkontakte/videoplayer-shared/es2015";var gw=M('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),hw=M('<img class="icon s-20" aria-hidden="true"/>'),_w={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 Hm(t,e){Q(t,_w);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,ub),r=v(()=>o()===ub),a=v(()=>n(r)||i()),l=q(!1),d=()=>{O(l,!0)},s=v(()=>n(r)?"btn-full-opacity":"");Kt(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 f=Le(),p=de(f);{var $=_=>{var S=gw();b(_,S)},y=_=>{var S=hw();D(()=>Ve(S,"src",e.iconUrl)),gt("error",S,d),Ea(S),b(_,S)};R(p,_=>{n(l)?_($):_(y,!1)})}b(u,f)},$$slots:{default:!0}})}var bw=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 Um(t){Xe(t,{testId:"muted-icon",children:(e,i)=>{var o=bw();b(e,o)},$$slots:{default:!0}})}import{noop as $w}from"@vkontakte/videoplayer-shared/es2015";function ep(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,$w),r=g(e,"ref",15,void 0),l=ve().ui.t,d=v(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=v(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Kt(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 f=Le(),p=de(f);{var $=_=>{Um(_,{})},y=_=>{aa(_,{get size(){return"24"}})};R(p,_=>{i()?_($):_(y,!1)})}b(u,f)},$$slots:{default:!0}}),F()}var yw=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>'),xw=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>'),ww=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 zm(t,e){let i=g(e,"isActive",3,!1),o=v(()=>i()?"pip-icon--active":"pip-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=ww(),d=L(de(l));{var s=m=>{var f=yw();b(m,f)},u=m=>{var f=xw();b(m,f)};R(d,m=>{i()?m(s):m(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as Sw}from"@vkontakte/videoplayer-shared/es2015";function Wm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,Sw),a=G("menu_pip");Kt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{zm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as mb}from"@vkontakte/videoplayer-shared/es2015";var Cw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},Tw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},Iw=M("<div><!></div>"),Ew=M("<div><!></div>"),Pw=M("<div><!></div>"),kw=M("<!> <!> <!>",1),Aw=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Lw=M('<div class="wrapper-middle s-13"><!></div>'),Mw=M("<div><!></div> <!> <div><!></div>",1),Vw=M('<div aria-hidden="true">·</div> <!>',1),Rw=M('<!> <!> <div><div><div class="controls mobile s-13" data-testid="bottom-controls"><div class="controls-group contain s-13"><!> <!> <!> <!></div> <div class="controls-group s-13"><!> <!> <!></div></div> <!></div></div> <!>',1),Nw={hash:"s-13",code:".wrapper-bottom.s-13{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-13>:where(.s-13){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-13{height:9px;padding:0 4px 4px}.wrapper-middle.s-13{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-13,.wrapper-top-right.s-13{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-13{right:8px;top:4px}.wrapper-top-left.s-13{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-13,.wrapper-middle-left-second.s-13,.wrapper-middle-right.s-13{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-13{left:12px}.wrapper-middle-left-second.s-13{left:64px}.wrapper-middle-right.s-13{right:12px}.controls.s-13{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-13,.controls-group.s-13{display:flex}.controls-group.contain.s-13{min-width:0}.controls-group.s-13 >:not(:first-child){margin-left:8px}.hidden.s-13{opacity:0;visibility:hidden}.controls-hidden.s-13{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-13{transition:none}.overlay-mobile.s-13{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-13,.wrapper-top-right.fullscreen.s-13{top:16px}.controls-wrapper.fullscreen.s-13{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-13{left:44px;top:12px}.wrapper-top-right.fullscreen.s-13{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-13{left:44px}.wrapper-middle-left-second.fullscreen.s-13{left:96px}.wrapper-middle-right.fullscreen.s-13{right:44px}.controls-wrapper.fullscreen.s-13{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Km(t,e){var Fo,rs;B(e,!0),Q(t,Nw);let[i,o]=Re(),r=()=>x(Fi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(Jt,"$disabledControls$",i),l=()=>x(Rt,"$playbackState$",i),d=()=>x(So,"$adPlaybackState",i),s=()=>x(ee,"$isEnded$",i),u=()=>x(Ct,"$playerSize",i),m=()=>x(ct,"$scrubbingInProgress",i),f=()=>x(Si,"$chromecastState$",i),p=()=>x(ze,"$isPictureInPictureActive",i),$=()=>x(Ge,"$pictureInPictureType$",i),y=()=>x(ce,"$mobileNotReportControlHidden$",i),_=()=>x(hi,"$chromecastHidden",i),S=()=>x(st,"$playerPhase",i),I=()=>x(Nt,"$pipHidden",i),T=()=>x(Ke,"$currentGridType$",i),N=()=>x(yi,"$vkLogoHidden",i),P=()=>x(oi,"$volumeHidden",i),E=()=>x(ot,"$isLive$",i),A=()=>x(at,"$settingsMenuVisible",i),W=()=>x(kt,"$isRewindableLive$",i),H=()=>x($t,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),Y=()=>x(Me,"$muted$",i),ae=()=>x(fe,"$volume$",i),j=()=>x(lt,"$isInteractiveTime$",i),ne=()=>x(Dn,"$settingButtonRef$",i),Z=()=>x(Et,"$startedByKeyboard$",i),we=()=>x(gn,"$isFullscreen",i),ue=()=>x(Ut,"$additionalButtons$",i),re=()=>x(ji,"$autoplayNextToggleHidden",i),_e=()=>x(Xi,"$crashed$",i),xe=()=>x(mi,"$settingsHidden",i),J=()=>x(Zo,"$graphIsOpened$",i),Ne=()=>x(bo,"$adPosition",i),pe=()=>x(Ci,"$adDuration",i),k=()=>x(ti,"$position$",i),We=()=>x(St,"$duration$",i),Te=g(e,"playerControlsWrapperRef",15,void 0),X=g(e,"playerControlsRef",15,void 0),ie=g(e,"isAds",3,!1),De=g(e,"logoTargetUrl",3,""),Be=g(e,"isOneVideoPlaylist",3,!1),it=g(e,"customFullscreenSupported",3,!0),U=ve(),Ae=wo(),Pe=Vt(),Ue=U.actions.internal.toggleMuted,Ze=U.actions.internal.togglePlay,ye=U.actions.internal.pause,ke=U.actions.internal.prevVideoClick,Fe=U.actions.internal.nextVideoClick,Dt=U.actions.internal.checkFullscreenSupport,pt=(Fo=U.callbacks)==null?void 0:Fo.onAudioDoesNotExistHint,Bt=(rs=U.callbacks)==null?void 0:rs.onAudioDisabledHint,st=U.playerPhase,St=U.state.duration$,ti=U.state.positionWithScrubbing$,Rt=U.state.playbackState$,$e=U.state.isAudioAvailable$,be=U.state.isAudioDisabled,ee=U.state.isEnded$,ot=U.state.isLive$,fe=U.state.volume$,Me=U.state.muted$,$t=U.state.isActiveLive$,kt=U.state.isRewindableLive$,ct=U.ui.scrubbingInProgress,ce=U.ui.mobileNotReportControlHidden$,{isActive$:ze,type$:Ge}=Ae.pictureInPicture$,at=U.ui.settingsMenu.visible$,Ft=U.ui.settingsMenu.openedByBtnKeyboard$,Ht=U.ui.controls,{volume:oi,vkLogo:yi,autoplayNextToggle:ji,pip:Nt,settings:mi,chromecast:hi}=U.ui.hiddenControls,ht=U.actions.internal.getVideoEpisodes(),Xt=U.webApi.pictureInPictureApi,Si=U.state.chromecastState$,Xi=U.state.crashed$,Jt=Ht.disabledControls$,Et=U.ui.startedByKeyboard$,Ke=U.ui.currentGridType$,Ci=U.ads.duration,bo=U.ads.position,So=U.ads.playbackState,gn=U.ui.isFullscreen,Ct=U.ui.playerSize,Ut=U.ui.additionalButtonsDeprecated$,K=U.actions.internal.getVideoElement,At=U.actions.internal.replayInteractive,di=U.state.isInteractive,lt=U.state.isInteractiveTime$,wt=U.state.showInteractiveGraph,Yt=U.state.showSeekToInteractive,nt=U.state.showPlayPrevChapter,Bi=U.state.showInteractiveTimeIndicator,Fi=Ae.seekToInteractiveDisabledTooltip$,Zo=Ae.graphIsOpened$,Co=U.ui.controlBlocks,Hi=v(()=>G(U.state.playPrevChapterDisabledTooltip)),Zi=v(()=>G(r())),Rr=v(()=>a().has("EPISODE_BUTTON")),$o=v(()=>a().has("GRAPH_BUTTON")),ro=v(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),ki=v(()=>a().has("PLAY_BUTTON")),Jo=v(()=>a().has("REPLAY_BUTTON")),en=v(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Ln=v(()=>l()===fb.PLAYING),er=v(()=>d()==="paused"),Nr=v(()=>s()&&!ie()&&!di),ts=v(()=>!s()||ie()),$s=v(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),is=v(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),tr=v(()=>u().width>300),yr=v(()=>u().width>400),hn=v(m),Mn=v(()=>f()!==pb.NOT_AVAILABLE&&!(p()&&$()===1)&&!y()&&!di&&!_()),Do=v(()=>S()==="LiveWaitingStart"),Vn=v(()=>!!Xt&&f()!==pb.CONNECTED&&!y()&&($()===1&&n(Do)||!n(Do))&&!n(hn)&&!di&&!I()),ir=q(!1);Mt(()=>{let qe=Xt==null?void 0:Xt.info.isActive$.subscribe(Lt=>O(ir,Lt,!0));return()=>qe==null?void 0:qe.unsubscribe()});let xr=v(()=>!n(hn)&&oo(T(),"s")),wr=v(()=>!e.logoHidden&&u().width>350&&!N()),Or=v(()=>Pe.features.fullscreen&&Dt()&&!(p()&&$()===1)&&(di?it():!0)&&!n(hn)&&!n(ir)),so=v(()=>!P()&&!n(hn)),Dr=v(()=>(!E()||ie())&&u().width>260&&!n(hn)&&!(Pe.features.interactiveHideTime&&di)),Rn=v(()=>A()||e.showControls),Nn=v(()=>!ie()&&!E()&&!!(ht!=null&&ht.length)&&n(tr)&&!n(Rr)&&!n(hn)),ao=v(()=>!W()||!!H()),Br=v(()=>wt&&oo(T(),"m")),On=v(()=>!z()||Y()||ae()===0),ft=ci({}),pi=ci({}),Sr=mb(ql,260),or=mb(Ju,260);Oe(()=>{u(),j(),Sr(K(),Ht,ft,e.showControls),or(K(),Co,pi,e.showControls)});let nr=()=>U.actions.internal.toggleChromecast();function tn(){return mt(this,null,function*(){Xt!=null&&Xt.isActive()?yield Xt==null?void 0:Xt.exit():yield Xt==null?void 0:Xt.request()})}function Cr(){ra({isAudioDisabled:be,audioDisabledHintCallback:Bt,isAudioAvailable:z(),audioIsNotExistHintCallback:pt,isAds:ie()})&&Ue()}let on=q(""),_n=(qe,Lt)=>{if(!qe){O(on,G("tooltip_live"),!0);return}Lt&&Lt===fb.PAUSED&&O(on,G("tooltip_play"),!0)};Oe(()=>{_n(n(ao),l())});let Dn=le();Oe(()=>{ne()&&Ol(ne(),A(),Ft)}),Oe(()=>{Xu(Et,Z(),ft.playButton)});var Bn=Rw(),Bo=de(Bn);{var To=qe=>{var Lt=Aw(),bi=de(Lt);let ko;var Ao=L(bi,2);let Ho;je(Ao,dt=>pi.topLeft=dt,()=>pi==null?void 0:pi.topLeft);var uo=L(Ao,2);let eo;var $n=C(uo);wi($n,1,ue,({iconUrl:dt,ariaLabel:ei,testId:fo,onClick:he,tooltip:xt})=>dt,(dt,ei)=>{let fo=()=>n(ei).iconUrl,he=()=>n(ei).ariaLabel,xt=()=>n(ei).testId,ii=()=>n(ei).onClick,xi=()=>n(ei).tooltip,Vi=v(()=>{var fi;return(fi=he())!=null?fi:xi()});Hm(dt,{get iconUrl(){return fo()},get ariaLabel(){return n(Vi)},get testId(){return xt()},get onClick(){return ii()}})});var yn=L($n,2);{var po=dt=>{ac(dt,{get ref(){return ft.autoplayNextToggle},set ref(ei){ft.autoplayNextToggle=ei}})};R(yn,dt=>{e.showAutoplayNext&&!Be()&&!re()&&dt(po)})}var Lo=L(yn,2);{var zn=dt=>{Jd(dt,{isMobile:!0,click:nr,get state(){return f()},get ref(){return ft.chromecast},set ref(ei){ft.chromecast=ei}})};R(Lo,dt=>{n(Mn)&&dt(zn)})}var lr=L(Lo,2);{var dr=dt=>{Wm(dt,{click:tn,get isPictureInPictureActive(){return p()},get ref(){return ft.pip},set ref(ei){ft.pip=ei}})};R(lr,dt=>{n(Vn)&&dt(dr)})}var Wn=L(lr,2);{var ys=dt=>{Hl(dt,{get ref$(){return Dn}})};R(Wn,dt=>{_e()&&!xe()&&dt(ys)})}var ss=L(Wn,2);{var Ye=dt=>{Xd(dt,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return ft.vkLogo},set ref(ei){ft.vkLogo=ei}})};R(ss,dt=>{n(wr)&&dt(Ye)})}w(uo),je(uo,dt=>pi.topRight=dt,()=>pi==null?void 0:pi.topRight);var qt=L(uo,2);let Ii;var Uo=C(qt);{var rn=dt=>{let ei=v(()=>ke.bind(null,!0));za(dt,{get click(){return n(ei)},type:"prev",isMobile:!0,get ref(){return ft.prevButton},set ref(fo){ft.prevButton=fo}})};R(Uo,dt=>{n($s)&&dt(rn)})}var cr=L(Uo,2);{var sn=dt=>{Gl(dt,{get disabled(){return n(ki)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(Ln)},get ref(){return ft.playButton},set ref(ei){ft.playButton=ei}})};R(cr,dt=>{n(ts)&&dt(sn)})}var zo=L(cr,2);{var Bs=dt=>{Ql(dt,{get disabled(){return n(Jo)},get click(){return Ze},isMobile:!0,get ref(){return ft.replayButton},set ref(ei){ft.replayButton=ei}})};R(zo,dt=>{n(Nr)&&dt(Bs)})}var an=L(zo,2);{var Fs=dt=>{let ei=v(()=>Fe.bind(null,!0));za(dt,{get click(){return n(ei)},type:"next",isMobile:!0,get ref(){return ft.nextButton},set ref(fo){ft.nextButton=fo}})};R(an,dt=>{n(is)&&dt(Fs)})}w(qt),je(qt,dt=>pi.middle=dt,()=>pi==null?void 0:pi.middle);var da=L(qt,2);{var ca=dt=>{var ei=kw(),fo=de(ei);{var he=fi=>{var ni=Iw();let mo;ni.__click=[Cw,en,e,Hi];var ln=C(ni);let dn=v(()=>!e.showControls);sc(ln,{get hidden(){return n(dn)},get disabled(){return n(en)},get click(){return e.playPrevChapter},get ref(){return ft.playPrevChapterButton},set ref(Ai){ft.playPrevChapterButton=Ai}}),w(ni),D(Ai=>mo=se(ni,1,"wrapper-middle-left s-13",null,mo,Ai),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(fi,ni)};R(fo,fi=>{nt&&fi(he)})}var xt=L(fo,2);{var ii=fi=>{var ni=Ew();let mo;var ln=C(ni);let dn=v(()=>!e.showControls&&!J());dc(ln,{get hidden(){return n(dn)},get disabled(){return n($o)},get click(){return Zo.toggle},get graphIsOpened(){return J()},get ref(){return ft.interactiveGraphButton},set ref(Ai){ft.interactiveGraphButton=Ai}}),w(ni),D(Ai=>mo=se(ni,1,Sd(nt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-13",mo,Ai),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(fi,ni)};R(xt,fi=>{n(Br)&&fi(ii)})}var xi=L(xt,2);{var Vi=fi=>{var ni=Pw();let mo;ni.__click=[Tw,ro,e,Zi];var ln=C(ni);let dn=v(()=>!e.showControls);lc(ln,{get hidden(){return n(dn)},get disabled(){return n(ro)},get click(){return e.seekToInteractive},get ref(){return ft.seekToInteractiveButton},set ref(Ai){ft.seekToInteractiveButton=Ai}}),w(ni),D(Ai=>mo=se(ni,1,"wrapper-middle-right s-13",null,mo,Ai),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(fi,ni)};R(xi,fi=>{Yt&&fi(Vi)})}b(dt,ei)};R(da,dt=>{di&&!m()&&dt(ca)})}D((dt,ei,fo,he)=>{ko=se(bi,1,"overlay-mobile s-13",null,ko,dt),Ho=se(Ao,1,"wrapper-top-left s-13",null,Ho,ei),eo=se(uo,1,"wrapper-top-right s-13",null,eo,fo),Ii=se(qt,1,"wrapper-middle s-13",null,Ii,he)},[()=>({hidden:!n(Rn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||m()||e.endScreenShown&&e.showNextPrevButtons})]),b(qe,Lt)};R(Bo,qe=>{ie()||qe(To)})}var rr=L(Bo,2);{var Io=qe=>{var Lt=Mw(),bi=de(Lt);let ko;var Ao=C(bi);ep(Ao,{get muted(){return Y()},click:Cr,get ref(){return ft.volume},set ref(po){ft.volume=po}}),w(bi);var Ho=L(bi,2);{var uo=po=>{var Lo=Lw(),zn=C(Lo);let lr=v(()=>!n(er));Gl(zn,{get disabled(){return n(ki)},get click(){return Ze},isMobile:!0,get isPlaying(){return n(lr)},get ref(){return ft.playButton},set ref(dr){ft.playButton=dr}}),w(Lo),b(po,Lo)};R(Ho,po=>{n(er)&&po(uo)})}var eo=L(Ho,2);let $n;var yn=C(eo);uc(yn,{get position(){return Ne()},get duration(){return pe()}}),w(eo),D((po,Lo)=>{ko=se(bi,1,"wrapper-top-right s-13",null,ko,po),$n=se(eo,1,"wrapper-bottom ads-timeline-mobile s-13",null,$n,Lo)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(qe,Lt)};R(rr,qe=>{ie()&&d()!=="inactive"&&qe(Io)})}var Ui=L(rr,2);let Fn;var sr=C(Ui);let Fr;var Hn=C(sr),Eo=C(Hn),Hr=C(Eo);{var yt=qe=>{Oo(qe,{get disabled(){return n(Jo)},get ref(){return ft.replayButton},set ref(Lt){ft.replayButton=Lt},children:(Lt,bi)=>{Ql(Lt,{get disabled(){return n(Jo)},get click(){return At}})},$$slots:{default:!0}})};R(Hr,qe=>{di&&qe(yt)})}var Tt=L(Hr,2);{var lo=qe=>{Oo(qe,{get ref(){return ft.liveButton},set ref(Lt){ft.liveButton=Lt},children:(Lt,bi)=>{cc(Lt,{get isLiveActive(){return n(ao)},isMobile:!0,get ariaLabel(){return n(on)}})},$$slots:{default:!0}})};R(Tt,qe=>{!ie()&&E()&&qe(lo)})}var Ji=L(Tt,2);{var Mi=qe=>{let Lt=v(()=>ie()?Ne():k()),bi=v(()=>ie()?pe():We()),ko=v(()=>!e.showControls);Gd(qe,{get showDuration(){return n(yr)},get position(){return n(Lt)},get duration(){return n(bi)},isMobile:!0,get isHidden(){return n(ko)},get ref(){return ft.time},set ref(Ao){ft.time=Ao}})};R(Ji,qe=>{n(Dr)&&qe(Mi)})}var bn=L(Ji,2);let yo=v(()=>!n(Nn));Oo(bn,{className:"w-max",get disabled(){return n(yo)},get ref(){return ft.episodes},set ref(qe){ft.episodes=qe},children:(qe,Lt)=>{var bi=Le(),ko=de(bi);{var Ao=Ho=>{var uo=Vw(),eo=L(de(uo),2);ec(eo,{get position(){return k()},get duration(){return We()},get timeCodes(){return ht}}),b(Ho,uo)};R(ko,Ho=>{n(Nn)&&Ho(Ao)})}b(qe,bi)},$$slots:{default:!0}}),w(Eo),je(Eo,qe=>pi.bottomLeft=qe,()=>pi==null?void 0:pi.bottomLeft);var Un=L(Eo,2),vi=C(Un);{var Ur=qe=>{Oo(qe,{get ref(){return ft.volume},set ref(Lt){ft.volume=Lt},children:(Lt,bi)=>{ep(Lt,{get muted(){return n(On)},click:Cr})},$$slots:{default:!0}})};R(vi,qe=>{n(so)&&qe(Ur)})}var ar=L(vi,2);{var os=qe=>{Oo(qe,{get ref(){return ft.settings},set ref(Lt){ft.settings=Lt},children:(Lt,bi)=>{Hl(Lt,{get ref$(){return Dn}})},$$slots:{default:!0}})};R(ar,qe=>{n(xr)&&qe(os)})}var ns=L(ar,2);{var zr=qe=>{Oo(qe,{get ref(){return ft.fullscreen},set ref(Lt){ft.fullscreen=Lt},children:(Lt,bi)=>{jd(Lt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(ns,qe=>{n(Or)&&qe(zr)})}w(Un),je(Un,qe=>pi.bottomRight=qe,()=>pi==null?void 0:pi.bottomRight),w(Hn),je(Hn,qe=>X(qe),()=>X());var Po=L(Hn,2);let nn=v(()=>!e.showControls);Ka(Po,{get isHidden(){return n(nn)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return W()},get ref(){return ft.timeline},set ref(qe){ft.timeline=qe}}),w(sr),je(sr,qe=>pi.bottom=qe,()=>pi==null?void 0:pi.bottom),w(Ui),je(Ui,qe=>Te(qe),()=>Te());var co=L(Ui,2);{var Tr=qe=>{nc(qe,{get ref(){return ft.interactiveTimeIndicator},set ref(Lt){ft.interactiveTimeIndicator=Lt}})};R(co,qe=>{Bi&&qe(Tr)})}D((qe,Lt)=>{Fn=se(Ui,1,"wrapper-bottom mobile s-13",null,Fn,qe),Fr=se(sr,1,"controls-wrapper s-13",null,Fr,Lt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,Bn),F(),o()}tt(["click"]);function pc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(I,"$isMobile",i),a=g(e,"bottomNoSmooth",3,!1),l=g(e,"playerControlsWrapperRef",15,void 0),d=g(e,"playerControlsRef",15,void 0),s=g(e,"isAds",3,!1),u=g(e,"logoTargetUrl",3,""),m=g(e,"showAutoplayNext",3,!1),f=g(e,"isOneVideoPlaylist",3,!1),p=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,vb),_=g(e,"onDisabledSeekToInteractiveClick",3,vb),I=ve().ui.isMobile,T=q(!1);Mt(()=>{let A=setTimeout(()=>O(T,!0),0);return()=>clearTimeout(A)});var N=Le(),P=de(N);{var E=A=>{var W=Le(),H=de(W);{var z=ae=>{Km(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 m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return f()},get customFullscreenSupported(){return p()},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 _()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(j){l(j)},get playerControlsRef(){return d()},set playerControlsRef(j){d(j)}})},Y=ae=>{Fm(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 f()},get showAutoplayNext(){return m()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return p()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(j){l(j)},get playerControlsRef(){return d()},set playerControlsRef(j){d(j)}})};R(H,ae=>{r()?ae(z):ae(Y,!1)})}b(A,W)};R(P,A=>{n(T)&&A(E)})}b(t,N),F(),o()}var Ow=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 fc(t,e){B(e,!0);let i=v(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=v(()=>`${fn(e.size)}${n(i)}`);Xe(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=Ow();b(r,l)},$$slots:{default:!0}}),F()}var Dw=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 qm(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=v(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=v(()=>`seek-icon-${i()?"backward":"forward"}`);Xe(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=Dw();b(a,d)},$$slots:{default:!0}}),F()}var Bw=M('<span class="hot-key-helpers-text s-1g"> </span>'),Fw=M('<div data-testid="hotkey-helper-icon" class="s-1g"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Hw=M("<div><!></div>"),Uw={hash:"s-1g",code:'.hot-key-helpers-container.s-1g{align-items:center;animation:s-1g-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-1g{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1g{left:calc(75% - 100px)}.hot-key-helpers-text.s-1g{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-1g{animation:s-1g-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1g-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1g-fadeOut{0%{opacity:1}to{opacity:0}}'};function Qm(t,e){B(e,!0),Q(t,Uw);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Vt(),d=a.ui.t,s=v(()=>!r()),u=v(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),m=v(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),f=v(()=>{var I;return(I=r())==null?void 0:I.type}),p=v(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var $=Hw();let y;var _=C($);{var S=I=>{var T=Fw(),N=de(T),P=C(N);{var E=X=>{let ie=v(()=>n(f)==="BACKWARD_SEEK");qm(X,{get reversed(){return n(ie)},shadow:!0})};R(P,X=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(f))&&X(E)})}var A=L(P,2);{var W=X=>{Ns(X,{get size(){return"48"},shadow:!0})};R(A,X=>{n(f)==="PAUSE"&&!l.playbackStatusShow&&X(W)})}var H=L(A,2);{var z=X=>{kn(X,{get size(){return"48"},shadow:!0})};R(H,X=>{n(f)==="PLAY"&&!l.playbackStatusShow&&X(z)})}var Y=L(H,2);{var ae=X=>{rc(X,{get size(){return"48"},shadow:!0})};R(Y,X=>{n(f)==="REPLAY"&&!l.playbackStatusShow&&X(ae)})}var j=L(Y,2);{var ne=X=>{sa(X,{get size(){return"48"},type:"off",shadow:!0})};R(j,X=>{n(f)==="SUBTITLES_OFF"&&X(ne)})}var Z=L(j,2);{var we=X=>{sa(X,{get size(){return"48"},shadow:!0})};R(Z,X=>{n(f)==="SUBTITLES_ON"&&X(we)})}var ue=L(Z,2);{var re=X=>{let ie=v(()=>n(f)==="RATE_DOWN");fc(X,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(ue,X=>{["RATE_DOWN","RATE_UP"].includes(n(f))&&X(re)})}var _e=L(ue,2);{var xe=X=>{let ie=v(()=>n(f)==="EPISODE_PREV");la(X,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,X=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(f))&&X(xe)})}var J=L(_e,2);{var Ne=X=>{aa(X,{get size(){return"48"},volume:0,shadow:!0})};R(J,X=>{n(f)==="MUTE"&&X(Ne)})}var pe=L(J,2);{var k=X=>{aa(X,{get size(){return"48"},volume:1,shadow:!0})};R(pe,X=>{n(f)==="VOLUME"&&X(k)})}w(N);var We=L(N,2);{var Te=X=>{var ie=Bw(),De=C(ie,!0);w(ie),D(()=>me(De,n(p))),b(X,ie)};R(We,X=>{n(p)&&X(Te)})}D(()=>Ve(N,"data-type",n(f))),b(I,T)};R(_,I=>{!n(s)&&n(f)&&I(S)})}w($),D(I=>y=se($,1,"hot-key-helpers-container s-1g",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(m)})]),b(t,$),F(),o()}var zw=(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}},Ww=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Kw=M('<div tabindex="0" role="button"><div class="button-block s-q" aria-hidden="true"><div class="button-row s-q"><div class="button button-up s-q"><!></div> <div class="button button-right s-q"><!></div></div> <div class="button-row s-q"><div class="button button-left s-q"><!></div> <div class="button button-down s-q"><!></div></div></div></div>'),qw={hash:"s-q",code:".immersive-controls.s-q{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-q{left:20px;top:50px}.button-block.s-q{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-q{display:flex;flex-direction:row;position:relative}.button.s-q{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-q svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-q svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-q svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-q svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-q svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-q:hover svg{opacity:1}"};function mc(t,e){B(e,!0),Q(t,qw);let i=g(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),m=G("aria_label_spherical_control");var f=Kw();let p;f.__keydown=[zw,r,a,l,s,d],f.__keyup=[Ww,r,u];var $=C(f),y=C($),_=C(y);_.__mousedown=a,_.__mouseup=u;var S=C(_);Mr(S,{direction:"up",useBtnColor:!0}),w(_);var I=L(_,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Mr(T,{direction:"up",useBtnColor:!0}),w(I),w(y);var N=L(y,2),P=C(N);P.__mousedown=s,P.__mouseup=u;var E=C(P);Mr(E,{direction:"up",useBtnColor:!0}),w(P);var A=L(P,2);A.__mousedown=l,A.__mouseup=u;var W=C(A);Mr(W,{direction:"up",useBtnColor:!0}),w(A),w(N),w($),w(f),D(H=>{p=se(f,1,"immersive-controls s-q",null,p,H),Ve(f,"aria-label",m)},[()=>({"m-shifted":i()})]),gt("mouseleave",_,u),gt("mouseleave",I,u),gt("mouseleave",P,u),gt("mouseleave",A,u),b(t,f),F()}tt(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as hb,Subscription as Qw,filterChanged as Gw,filter as Yw}from"@vkontakte/videoplayer-shared/es2015";var gb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var tp=class{constructor(){this.flickeringTimeout=gb(1e3);this.subscriptions=new Qw;this.isAuto=!1;this.isLive=!1;this.captions$=new hb([]);this.captionsPrepared$=new hb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Yw(()=>this.isEnabled()),Gw()).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=M('<span class="caption-line s-c"><span class="caption-segment s-c"> </span></span>'),Xw=M('<span class="caption-line s-c"><span class="caption-segment s-c"></span></span>'),Zw=M('<span class="caption-line s-c"><span class="caption-segment s-c"> </span></span>'),Jw=M('<div><span class="caption s-c"><!></span></div>'),eS=M("<div><!></div>"),tS={hash:"s-c",code:".subtitles-container.s-c{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-c{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-c{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-c .subtitles-caption:where(.s-c){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-c{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-c{bottom:8%}.subtitles-container.auto.s-c .subtitles-caption:where(.s-c){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-c{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-c .caption:where(.s-c){width:100%}.caption-line.s-c{display:block;text-align:center}.subtitles-container.auto.s-c .caption-line:where(.s-c){text-align:left}.caption-segment.s-c{color:var(--white);display:inline-block;font-size:13px;line-height:1.2;white-space:pre-wrap}"};function Qa(t,e){B(e,!0),Q(t,tS);let[i,o]=Re(),r=()=>x(p,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(_,"$isFullscreen",i),d=()=>x(S,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),m=ve(),f=Vt(),p=m.state.currentSubtitle$,$=m.state.isAutoSubtitleCaptionVisible$,y=m.state.isLive$,_=m.ui.isFullscreen,S=m.ui.previewTrackActive,I=v(()=>!!r().isAuto),T=v(()=>!!a()),N=v(()=>e.playerSize.width*.02),P=v(()=>u()&&!l()||n(N)<=f.minSubtitlesFontSize?f.minSubtitlesFontSize:n(N)),E=q(null);Oe(()=>{var j,ne,Z;(j=n(E))==null||j.setIsAuto(n(I)),(ne=n(E))==null||ne.setIsLive(n(T)),(Z=n(E))==null||Z.setCaptions(e.captions)});let A=q(ci([[]]));Mt(()=>{O(E,new tp().subscribe(),!0);let j=n(E).captionsPrepared$.subscribe(ne=>{O(A,ne,!0)});return()=>{var ne;(ne=n(E))==null||ne.destroy(),j.unsubscribe()}}),Mt(()=>{if(n(I)){let j=window.setTimeout(()=>{$.set(!1)},f.autoSubtitlesTimeout);return()=>{window.clearTimeout(j)}}else $.set(!1)});let W=v(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=eS();let z;var Y=C(H);{var ae=j=>{var ne=Jw();let Z;var we=C(ne),ue=C(we);{var re=xe=>{var J=jw(),Ne=C(J),pe=C(Ne,!0);w(Ne),w(J),D(k=>{var We;Qe(Ne,`font-size: ${(We=n(P))!=null?We:""}px`),me(pe,k)},[()=>G("subtitles_auto_caption")]),b(xe,J)},_e=(xe,J)=>{{var Ne=k=>{var We=Le(),Te=de(We);wi(Te,17,()=>n(A),xd,(X,ie)=>{var De=Xw(),Be=C(De);wi(Be,21,()=>n(ie),({value:it,timeAppeared:U})=>U,(it,U)=>{let Ae=()=>n(U).value,Pe=()=>n(U).timeAppeared;var Ue=Le(),Ze=de(Ue);{var ye=ke=>{var Fe=fs();D(()=>me(Fe,Ae())),b(ke,Fe)};R(Ze,ke=>{(!Pe()||Pe()<=e.position)&&ke(ye)})}b(it,Ue)}),w(Be),w(De),D(()=>{var it;return Qe(Be,`font-size: ${(it=n(P))!=null?it:""}px`)}),b(X,De)}),b(k,We)},pe=k=>{var We=Le(),Te=de(We);wi(Te,17,()=>e.captions,({value:X})=>X,(X,ie)=>{let De=()=>n(ie).value;var Be=Zw(),it=C(Be),U=C(it,!0);w(it),w(Be),D(()=>{var Ae;Qe(it,`font-size: ${(Ae=n(P))!=null?Ae:""}px`),me(U,De())}),b(X,Be)}),b(k,We)};R(xe,k=>{var We;n(I)&&((We=n(A))!=null&&We.length)?k(Ne):k(pe,!1)},J)}};R(ue,xe=>{n(I)&&s()?xe(re):xe(_e,!1)})}w(we),w(ne),D(xe=>{var J;Z=se(ne,1,"subtitles-caption s-c",null,Z,xe),Qe(ne,`--subtitles-caption-margin: ${(J=n(W))!=null?J:""}%`)},[()=>({mobile:u()})]),b(j,ne)};R(Y,j=>{var ne;(e.captions.length||(ne=n(A))!=null&&ne.length)&&j(ae)})}w(H),D(j=>z=se(H,1,"subtitles-container s-c",null,z,j),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as iS}from"@vkontakte/videoplayer-core/es2015";var oS=M('<div class="text s-l"> </div>'),nS=M('<div><div class="icon_wrapper s-l"><!></div> <!></div>'),rS={hash:"s-l",code:".wrapper.s-l{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-l{background-size:cover}.icon_wrapper.s-l{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-l{margin-top:20px}"};function vc(t,e){B(e,!0),Q(t,rS);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Vt();var r=nS();let a;var l=C(r),d=C(l);Zd(d,{get size(){return"48"},get iconState(){return iS.CONNECTED}}),w(l);var s=L(l,2);{var u=m=>{var f=oS(),p=C(f);w(f),D(()=>{var $;return me(p,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(m,f)};R(s,m=>{i()&&m(u)})}w(r),D(m=>{a=se(r,1,"wrapper s-l",null,a,m),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()}var sS=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 Gm(t){Xe(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=sS();b(e,o)},$$slots:{default:!0}})}var aS=M('<div class="container s-4"><!></div>'),lS={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 Ga(t){Q(t,lS);var e=aS(),i=C(e);Gm(i,{}),w(e),b(t,e)}var dS=M('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),cS=M('<div data-testid="unstarted-thumb"><!></div>'),uS={hash:"s-b",code:".container.s-b{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-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{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-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function Ya(t,e){B(e,!0),Q(t,uS);let i=g(e,"iconVisible",3,!0),o=ve(),r=Vt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var _;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(_=e.startVideo)==null||_.call(e))},s=$=>{var y,_;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(_=e.onClick)==null||_.call(e,$)};var u=cS();let m;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var f=C(u);{var p=$=>{var y=dS();y.__keydown=d;var _=L(C(y),2);kn(_,{get size(){return"48"}}),w(y),D(()=>Ve(y,"aria-label",l)),b($,y)};R(f,$=>{i()&&$(p)})}return w(u),D($=>{m=se(u,1,"container s-b",null,m,$),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})}tt(["click","contextmenu","keydown"]);var pS=M('<div data-testid="video_title"><span> </span></div>'),fS={hash:"s-1i",code:".title.s-1i{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;color:var(--white);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}.hidden.s-1i{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Ym(t,e){B(e,!0),Q(t,fS);let i=g(e,"title",3,""),o=g(e,"isHidden",3,!1),r=g(e,"ref",15),a=q(void 0);Mt(()=>{var f;requestAnimationFrame(()=>{var p;(p=e.onVisibilityChanged)==null||p.call(e,!0)});function m(p){var $;p.propertyName==="transform"&&(($=e.onVisibilityChanged)==null||$.call(e,!o()))}return(f=n(a))==null||f.addEventListener("transitionend",m),()=>{var p;return(p=n(a))==null?void 0:p.removeEventListener("transitionend",m)}});var l=pS();let d;var s=C(l),u=C(s,!0);w(s),je(s,m=>r(m),()=>r()),w(l),je(l,m=>O(a,m),()=>n(a)),D(m=>{d=se(l,1,"title s-1i",null,d,m),me(u,i())},[()=>({hidden:o()})]),b(t,l),F()}import{throttleFn as $S}from"@vkontakte/videoplayer-shared/es2015";var mS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div> <span class="timer__points s-14"> </span>',1),vS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div> <span class="timer__points s-14"> </span>',1),gS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div> <span class="timer__points s-14"> </span>',1),hS=M('<div class="timer__cell cell s-14"><span class="cell__value s-14"> </span> <span class="cell__unit s-14"> </span></div>'),_S=M("<div><!> <!> <!> <!></div>"),bS={hash:"s-14",code:".timer__container.s-14{align-items:flex-start;display:flex;justify-content:center}.cell.s-14{align-items:center;display:flex;flex-direction:column}.cell__value.s-14{font-size:48px;font-weight:600;line-height:1.2}.small.s-14 .cell__value:where(.s-14){font-size:24px}.cell__unit.s-14{font-size:14px;font-weight:400;line-height:1.2}.small.s-14 .cell__unit:where(.s-14){font-size:12px}.timer__points.s-14{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-14 .timer__points:where(.s-14){font-size:20px}"};function jm(t,e){B(e,!0),Q(t,bS);let i=q(""),o=q(""),r=q(""),a=q(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),m=H=>Math.max(H.length,1),f=H=>`${(e.isSmallSize?s:d)*m(H)}px`,p=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let Y=Math.floor(H/3600);O(o,u(Y),!0);let ae=Math.floor(H/60)%60;O(r,u(ae),!0);let j=H%60;O(a,u(j),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;p(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Mt(()=>{l=requestAnimationFrame($)}),pn(()=>{cancelAnimationFrame(l)});var y=_S();let _;var S=C(y);{var I=H=>{var z=mS(),Y=de(z);let ae;var j=C(Y),ne=C(j,!0);w(j);var Z=L(j,2),we=C(Z,!0);w(Z),w(Y);var ue=L(Y,2),re=C(ue,!0);w(ue),D((_e,xe,J)=>{ae=Qe(Y,"",ae,{width:_e}),me(ne,n(i)),me(we,xe),me(re,J)},[()=>f(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(S,H=>{n(i)&&H(I)})}var T=L(S,2);{var N=H=>{var z=vS(),Y=de(z);let ae;var j=C(Y),ne=C(j,!0);w(j);var Z=L(j,2),we=C(Z,!0);w(Z),w(Y);var ue=L(Y,2),re=C(ue,!0);w(ue),D((_e,xe,J)=>{ae=Qe(Y,"",ae,{width:_e}),me(ne,n(o)),me(we,xe),me(re,J)},[()=>f(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(T,H=>{n(o)&&H(N)})}var P=L(T,2);{var E=H=>{var z=gS(),Y=de(z);let ae;var j=C(Y),ne=C(j,!0);w(j);var Z=L(j,2),we=C(Z,!0);w(Z),w(Y);var ue=L(Y,2),re=C(ue,!0);w(ue),D((_e,xe,J)=>{ae=Qe(Y,"",ae,{width:_e}),me(ne,n(r)),me(we,xe),me(re,J)},[()=>f(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(P,H=>{n(r)&&H(E)})}var A=L(P,2);{var W=H=>{var z=hS();let Y;var ae=C(z),j=C(ae,!0);w(ae);var ne=L(ae,2),Z=C(ne,!0);w(ne),w(z),D((we,ue)=>{Y=Qe(z,"",Y,{width:we}),me(j,n(a)),me(Z,ue)},[()=>f(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(A,H=>{n(a)&&H(W)})}w(y),D(H=>_=se(y,1,"timer__container s-14",null,_,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var yS=M('<div class="waiting s-s"><span> </span></div>'),xS=M('<div class="upcoming-timer timer s-s"><span> </span> <!></div>'),wS=M('<div class="waiting-container s-s"><!></div>'),SS={hash:"s-s",code:'.waiting-container.s-s{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-s,.waiting-container.s-s:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-s:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-s{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-s{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-s{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-s{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-s{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-s{font-size:15px}.medium.s-s{font-size:17px}'};function gc(t,e){B(e,!0),Q(t,SS);let i=g(e,"startTime",3,0),o=v(()=>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=v(()=>{var S,I;return((S=n(d))!=null?S:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),m=v(()=>{var S,I;return!n(u)&&(((S=n(d))!=null?S:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),f=e.onUpcomingLiveViewStateChanged?$S(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let S={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(S,I)})},300):void 0;Oe(()=>{n(s),n(d),n(o),f==null||f()}),pn(()=>{if(cancelAnimationFrame(l),f==null||f.cancel(),e.onUpcomingLiveViewStateChanged){let S={type:n(o)?"expired":"default",size:n(u)?"s":n(m)?"m":"l"};e.onUpcomingLiveViewStateChanged(S)}});var p=wS();p.__contextmenu=function(...S){var I;(I=e.onContextMenu)==null||I.apply(this,S)},p.__click=function(...S){var I;(I=e.onClick)==null||I.apply(this,S)};var $=C(p);{var y=S=>{var I=yS(),T=C(I);let N;var P=C(T,!0);w(T),w(I),je(I,E=>O(r,E),()=>n(r)),D((E,A)=>{N=se(T,1,"waiting__title s-s",null,N,E),me(P,A)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(S,I)},_=S=>{var I=xS(),T=C(I);let N;var P=C(T,!0);w(T);var E=L(T,2);let A=v(()=>n(u)||n(m)),W=v(()=>i()||0);jm(E,{get isSmallSize(){return n(A)},get startTime(){return n(W)},onTimerOver:()=>O(o,!0)}),w(I),je(I,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(T,1,"timer__title s-s",null,N,H),me(P,z)},[()=>({medium:n(m),small:n(u)}),()=>G("waiting_live_timer_title")]),b(S,I)};R($,S=>{n(o)?S(y):S(_,!1)})}w(p),D(()=>Qe(p,`background-image: url(${e.thumbUrl})`)),En(p,"clientWidth",S=>O(d,S)),En(p,"clientHeight",S=>O(s,S)),b(t,p),F()}tt(["contextmenu","click"]);var CS=M('<div class="waiting-container s-o"><div class="waiting-caption s-o"><!> <p class="waiting-title s-o"> </p></div></div>'),TS={hash:"s-o",code:'.waiting-container.s-o{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-o,.waiting-container.s-o:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-o:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-o{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-o{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,TS);let i=g(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=v(()=>o[e.kind]||"");var a=CS();a.__contextmenu=function(...m){var f;(f=e.onContextMenu)==null||f.apply(this,m)},a.__click=function(...m){var f;(f=e.onClick)==null||f.apply(this,m)};var l=C(a),d=C(l);Ba(d,{style:"position: static; transform: translate(0, 0)"});var s=L(d,2),u=C(s,!0);w(s),w(l),w(a),D(()=>{Qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}tt(["contextmenu","click"]);var IS=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 Xm(t){Xe(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=IS();b(e,o)},$$slots:{default:!0}})}var ES=M('<div class="select-icon s-1w"><!></div>'),PS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function hc(t){Q(t,PS);var e=ES(),i=C(e);Xm(i,{}),w(e),b(t,e)}var kS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},AS=(t,e)=>{Dl(t,()=>e.item.selectItem(e.item.value))},LS=M("<p> </p>"),MS=M('<p class="sublabel s-1r"> </p>'),VS=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),RS={hash:"s-1r",code:".menu-item-value.s-1r{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1r{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1r,.sublabel.s-1r{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1r{opacity:.5}"};function Zm(t,e){B(e,!0),Q(t,RS);let i=g(e,"isMobile",3,!1);var o=VS();let r;o.__click=[kS,e],o.__keydown=[AS,e];var a=C(o);{var l=y=>{hc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=L(a,2);let s;var u=C(d);{var m=y=>{var _=Le(),S=de(_);Di(S,()=>e.item.valueComponent,(I,T)=>{T(I,Zr(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,_)},f=y=>{var _=LS();let S;var I=C(_,!0);w(_),D(T=>{var N;S=se(_,1,"label s-1r",null,S,T),me(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,_)};R(u,y=>{e.item.valueComponent?y(m):y(f,!1)})}var p=L(u,2);{var $=y=>{var _=MS(),S=C(_,!0);w(_),D(()=>me(S,e.item.sublabel)),b(y,_)};R(p,y=>{e.item.sublabel&&y($)})}w(d),w(o),D((y,_,S)=>{r=se(o,1,"item",null,r,y),Ve(o,"data-value",e.item.value),Ve(o,"aria-label",_),Ve(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1r",null,s,S),Ve(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,_;return(_=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?_:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}tt(["click","keydown"]);var NS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Jm(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"refMenuItems",15),r=v(()=>()=>e.openSubMenuList(e.item.children)),a=v(()=>_=>Ru(_,n(r)));var l=NS();let d;l.__click=function(..._){var S;(S=n(r))==null||S.apply(this,_)},l.__keydown=function(..._){var S;(S=n(a))==null||S.apply(this,_)};var s=C(l);{var u=_=>{hc(_,{})};R(s,_=>{e.item.selected&&_(u)})}var m=L(s,2);let f;var p=C(m);{var $=_=>{var S=Le();let I=v(()=>e.item.valueComponent);var T=de(S);Di(T,()=>n(I),(N,P)=>{P(N,Zr(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(_,S)},y=_=>{var S=fs();D(()=>me(S,e.item.label)),b(_,S)};R(p,_=>{e.item.valueComponent?_($):_(y,!1)})}w(m),w(l),je(l,_=>o(o()[e.item.id]=_,!0),()=>{var _;return(_=o())==null?void 0:_[e.item.id]}),D((_,S)=>{var I;d=se(l,1,"item",null,d,_),Ve(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Ve(l,"data-testid",e.item.id),f=se(m,1,"menu-item-value",null,f,S)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}tt(["click","keydown"]);var es={"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 DS=(t,e)=>{N_(t,e.returnFromSubMenu,e.closeSettingsMenu)},BS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},FS=(t,e)=>{Fd(t)&&(Vr(t),e.returnFromSubMenu())},HS=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1k"> </p></li> <!></ul></div>'),US={hash:"s-1k",code:".sub-menu.s-1k{--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-1k .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1k{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1k{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1k .items:where(.s-1k) .item.header:where(.s-1k){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-1k .title:where(.s-1k){margin-left:8px}.sub-menu.s-1k .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1k .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1k .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1k .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1k .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1k .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1k .item .sublabel{font-size:12px;line-height:14px}.item.s-1k:not(.mobile) p:where(.s-1k),.sub-menu.s-1k .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function tv(t,e){B(e,!0),Q(t,US);let[i,o]=Re(),r=()=>x(f,"$isFullscreen",i),a=()=>x(p,"$playerSize",i),l=g(e,"isMobile",3,!1),d=g(e,"playerControlsHeight",3,0),s=g(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=g(e,"listRef",15);Mt(()=>{let j=e.items.findIndex(ne=>ne.selected);u().children[j+1].focus()});let m=ve(),f=m.ui.isFullscreen,p=m.ui.playerSize,$=q(void 0),y=q(0),_=q(0),S=v(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(_)-d()}px; overflow: auto;`),I=v(()=>Math.max(e.minWidth,n(y)));var T=HS();let N;var P=C(T);let E;P.__keydown=[DS,e];var A=C(P);let W;A.__click=[BS,e],A.__keydown=[FS,e];var H=C(A);Mr(H,{direction:"left"});var z=L(H,2),Y=C(z,!0);w(z),w(A),je(A,j=>O($,j),()=>n($));var ae=L(A,2);wi(ae,17,()=>e.items,xd,(j,ne)=>{var Z=Le(),we=de(Z);{var ue=_e=>{Zm(_e,{get item(){return n(ne)},get isMobile(){return l()}})},re=(_e,xe)=>{{var J=Ne=>{Jm(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)},xe)}};R(we,_e=>{n(ne).type==="SELECT_VALUE"?_e(ue):_e(re,!1)})}b(j,Z)}),w(P),je(P,j=>u(j),()=>u()),w(T),D((j,ne,Z)=>{N=se(T,1,"sub-menu menu s-1k",null,N,j),Ve(T,"data-testid",`${e.id}-sub-menu`),Qe(T,`min-width: ${n(I)}px`),E=se(P,1,"items s-1k",null,E,ne),Qe(P,n(S)),W=se(A,1,"item header back s-1k",null,W,Z),Ve(A,"aria-label",s()),me(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),En(A,"clientWidth",j=>O(y,j)),En(A,"clientHeight",j=>O(_,j)),b(t,T),F(),o()}tt(["keydown","click"]);import{noop as zS}from"@vkontakte/videoplayer-shared/es2015";var WS=(t,e)=>Ru(t,e()),KS=(t,e)=>{t.stopPropagation(),e()()},qS=M('<div class="value s-1j"> </div>'),QS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),GS={hash:"s-1j",code:".value.s-1j{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function iv(t,e){B(e,!0),Q(t,GS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,zS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=QS();let s;d.__click=[KS,o],d.__keydown=[WS,o];var u=C(d),m=C(u);{var f=T=>{Wa(T,{get icon(){return e.icon}})},p=T=>{var N=Le();let P=v(()=>e.icon);var E=de(N);Di(E,()=>n(P),(A,W)=>{W(A,Zr(a))}),b(T,N)};R(m,T=>{typeof e.icon=="string"?T(f):T(p,!1)})}w(u);var $=L(u,2),y=C($,!0);w($);var _=L($,2);{var S=T=>{var N=Le();let P=v(r);var E=de(N);Di(E,()=>n(P),(A,W)=>{W(A,{})}),b(T,N)},I=T=>{var N=qS(),P=C(N,!0);w(N),D(()=>me(P,e.value)),b(T,N)};R(_,T=>{r()?T(S):T(I,!1)})}w(d),je(d,T=>l(T),()=>l()),D(T=>{s=se(d,1,"item",null,s,T),Ve(d,"aria-label",e.ariaLabel),Ve(d,"data-testid",e.id),me(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}tt(["click","keydown"]);import{noop as bb}from"@vkontakte/videoplayer-shared/es2015";var YS=(t,e)=>{Dl(t,()=>e())},jS=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),XS=M('<img class="icon" aria-hidden="true"/>'),ZS=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1l"> </div></li>'),JS={hash:"s-1l",code:".label.s-1l{overflow:hidden;text-overflow:ellipsis}"};function ov(t,e){B(e,!0),Q(t,JS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,bb),r=g(e,"closeSettings",3,bb),a=q(!1),l=()=>{O(a,!0)},d=S=>{S==null||S.stopPropagation(),o()(),r()()};var s=ZS();let u;s.__click=d,s.__keydown=[YS,d];var m=C(s),f=C(m);{var p=S=>{var I=Le(),T=de(I);{var N=E=>{var A=jS();b(E,A)},P=E=>{var A=XS();D(()=>Ve(A,"src",e.icon)),gt("error",A,l),Ea(A),b(E,A)};R(T,E=>{n(a)?E(N):E(P,!1)})}b(S,I)},$=S=>{var I=Le();let T=v(()=>e.icon);var N=de(I);Di(N,()=>n(T),(P,E)=>{E(P,{})}),b(S,I)};R(f,S=>{typeof e.icon=="string"?S(p):S($,!1)})}w(m);var y=L(m,2),_=C(y,!0);w(y),w(s),D(S=>{var I;u=se(s,1,"item",null,u,S),Ve(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Ve(s,"data-testid",e.id),me(_,e.label)},[()=>({mobile:i()})]),b(t,s),F()}tt(["click","keydown"]);import{noop as iC}from"@vkontakte/videoplayer-shared/es2015";var eC=M('<div class="toggle_wrap s-1p"><div></div> <div class="toggle-label s-1p"></div></div>'),tC={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 nv(t,e){Q(t,tC);let i=g(e,"enabled",3,!1);var o=eC(),r=C(o);let a;ui(2),w(o),D(l=>a=se(r,1,"toggle s-1p",null,a,l),[()=>({on:i()})]),b(t,o)}var oC=(t,e,i)=>{O_(t,e(),o=>i()(o))},nC=(t,e,i)=>{t.stopPropagation(),e()(!i())},rC=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),sC=M('<li role="menuitem" tabindex="0"><!></li>');function rv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,iC),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=sC();let s;d.__click=[nC,o,r],d.__keydown=[oC,r,o];var u=C(d);Fa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(m,f)=>{var p=rC();let $;var y=C(p),_=C(y);{var S=E=>{Wa(E,{get icon(){return e.icon}})},I=E=>{var A=Le();let W=v(()=>e.icon);var H=de(A);Di(H,()=>n(W),(z,Y)=>{Y(z,{})}),b(E,A)};R(_,E=>{typeof e.icon=="string"?E(S):E(I,!1)})}w(y);var T=L(y,2),N=C(T,!0);w(T);var P=L(T,2);nv(P,{get enabled(){return r()}}),w(p),D(E=>{$=se(p,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(m,p)},$$slots:{default:!0}}),w(d),D(m=>{var f;s=se(d,1,"item switch-item",null,s,m),Ve(d,"aria-label",(f=e.ariaLabel)!=null?f:e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}tt(["click","keydown"]);import{isValidURL as AC,VideoQuality as kb}from"@vkontakte/videoplayer-shared/es2015";var $b=()=>{let t=q(ci([])),e=v(()=>(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 aC}from"@vkontakte/videoplayer-shared/es2015";var lC=M('<div class="quality-icon s-1n"><!></div>'),dC=M('<div class="quality-label s-1n"><span> </span> <!></div>'),cC={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 Xa(t,e){B(e,!0),Q(t,cC);let i=g(e,"isSubCase",3,!1),o=v(()=>e.quality?aC(e.quality):""),r=v(()=>Hu(e.quality));var a=dC(),l=C(a);let d;var s=C(l,!0);w(l);var u=L(l,2);{var m=f=>{var p=lC();let $=v(()=>n(r));var y=C(p);Di(y,()=>n($),(_,S)=>{S(_,{})}),w(p),D(()=>Ve(p,"data-testid",`${n(o)}-icon`)),b(f,p)};R(u,f=>{n(r)&&!e.isMobile&&f(m)})}w(a),D(f=>{d=se(l,1,"s-1n",null,d,f),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as uC}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as yb}from"@vkontakte/videoplayer-core/es2015";var xb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},wb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=xb({quality:t,availableQualities:e});return i?t===yb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},Sb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===yb.INVARIANT?i:`${i}${xb({quality:t,availableQualities:e})}`:"...";var pC=M('<div class="menu-item-value-wrapper s-1u"><!></div>'),fC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function Yl(t,e){B(e,!0),Q(t,fC);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(m,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,m=d.ui.isMobile,f=" · ",p=v(()=>e.prefix+(e.selected&&r()!==uC.INVARIANT?f:"")),$=v(()=>Sb({prefix:n(p),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=pC(),_=C(y);let S=v(()=>e.selected?r():void 0);Xa(_,{get quality(){return n(S)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),w(y),b(t,y),F(),o()}var mC=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")},vC={br:!0,span:!0},sv=(t,e={})=>{var d,s,u,m,f,p,$;if(!t)return t;let i=Ie(Ie({},vC),e),o=Object.keys(i);if(!o.length)return t;let r=mC(o),a=[],l=0;for(let y of t.matchAll(r)){let _=y[0],S=((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[S]){a.push(t.slice(l,I)),l=I+_.length;continue}let T=(f=y.groups)!=null&&f.childrenhtml?sv(y.groups.childrenhtml,i):"",N=(p=y.groups)!=null&&p.childrenhtml?_.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>T||""):_;a.push(t.slice(l,I),N),l=I+_.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function _c(t,e){B(e,!1);let i=g(e,"message",8),o=sv(i());xo();var r=Le(),a=de(r);{var l=d=>{var s=Le(),u=de(s);wd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var gC=M('<p class="quality-applies sublabel s-1v"><!></p>'),hC={hash:"s-1v",code:".quality-applies.s-1v{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function av(t,e){B(e,!1),Q(t,hC),xo();var i=gC(),o=C(i);let r=wn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));_c(o,{get message(){return n(r)}}),w(i),b(t,i),F()}var Tb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",selected:o,valueComponent:Yl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},lv=({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}),Ib=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:av,bottomBordered:!0,children:"quality-appliance"}),dv=({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")}),cv=({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 ip=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),op=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=tc(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=ip(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=ip(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=ip(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=ip(t,e);return G("audio_stream_display_unknown",{index:a})};var _C={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:lv,selected:e&&!o&&!r||!1}),a.push({handler:cv,selected:o},{handler:dv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[Ib(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Tb(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:Xa,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:lv,selected:((i=wu())==null?void 0:i.type)==="auto_quality"},{handler:cv,selected:((o=wu())==null?void 0:o.type)==="traffic_saving"},{handler:dv,selected:((r=wu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-languages":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-languages",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:op(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===An?"sub_off":void 0}))})},Eb=({subMenuId:t,context:e})=>t?[_C[t](e)]:[];var bC=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 uv(t){Xe(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=bC();b(e,o)},$$slots:{default:!0}})}var $C=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 pv(t){Xe(t,{width:"18",height:"15",children:(e,i)=>{var o=$C();b(e,o)},$$slots:{default:!0}})}var yC=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 fv(t){Xe(t,{testId:"play-speed-icon",children:(e,i)=>{var o=yC();b(e,o)},$$slots:{default:!0}})}var xC=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 mv(t){Xe(t,{testId:"download-icon",children:(e,i)=>{var o=xC();b(e,o)},$$slots:{default:!0}})}var wC=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 vv(t){Xe(t,{testId:"report-icon",children:(e,i)=>{var o=wC();b(e,o)},$$slots:{default:!0}})}var SC=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 np(t){Xe(t,{children:(e,i)=>{var o=SC();b(e,o)},$$slots:{default:!0}})}var CC=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 gv(t){Xe(t,{testId:"info-icon",children:(e,i)=>{var o=CC();b(e,o)},$$slots:{default:!0}})}var TC=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),IC={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function hv(t,e){B(e,!0),Q(t,IC);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(m,"$availableQualities$",i),l=()=>x(f,"$isAutoQualityEnabled$",i),d=()=>x(p,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,m=s.state.availableQualities$,f=s.state.isAutoQualityEnabled$,p=s.ui.isMobile,$=v(()=>wb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=TC(),_=C(y);Xa(_,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),w(y),b(t,y),F(),o()}var PC={"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:Qd,label:G("menu_quality"),value:e,valueComponent:hv,weight:es["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:es["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:uv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-languages-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=op(t,e);return{id:"audio-languages-settings",weight:es["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:pv,label:G("menu_audio_languages"),value:i,children:"audio-languages"}},"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:es["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:fv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:es["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:sa,iconProps:{type:"outline"},label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:es.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:mv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:es.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:vv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:es["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:np,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:es["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:np,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:es["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:gv,isHiddenFor:["desktop"]})},Pb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>PC[r](e)),...i.map(r=>Gt(Ie({},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(Oa)};var LC=(t,e)=>{Vu(t,e)},MC=M('<div><div> </div> <div class="close s-k"></div></div>'),VC=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),RC=M("<div><!> <!></div>"),NC={hash:"s-k",code:'.settings-menu-container.mobile.s-k{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-k ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-k .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-k .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-k .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-k .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-k .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-k .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-k{line-height:40px}.settings-menu.desktop.s-k{min-width:300px}.settings-menu-container.s-k .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-k .menu.mobile.hidden{display:none}.settings-menu-container.s-k .menu .item:not(.switch-item),.settings-menu-container.s-k .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-k .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-k .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-k .item:not(.switch-item),.settings-menu.s-k .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-k .item.mobile:not(.switch-item),.settings-menu.s-k .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-k .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-k .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-k .item.header.mobile:where(.s-k){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-k .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-k .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-k .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-k .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-k .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-k{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-k:after,.close.s-k:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-k:before{transform:rotate(45deg)}.close.s-k:after{transform:rotate(-45deg)}'};function bc(t,e){B(e,!0),Q(t,NC);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(ke,"$playerSize",i),u=()=>x(De,"$hasMpegSources$",i),m=()=>x(Pe,"$mobileNotReportControlHidden$",i),f=()=>x(J,"$autoQualityLimitingAvailable$",i),p=()=>x(X,"$availableSubtitlesList$",i),$=()=>x(Ue,"$isLiveWithPlaybackSpeed",i),y=()=>x(re,"$availableAudioStreams$",i),_=()=>x(We,"$availablePlaybackRates$",i),S=()=>x(ue,"$currentAudioStream$",i),I=()=>x(k,"$currentPlaybackRate$",i),T=()=>x(Ze,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),P=()=>x(Ne,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),A=()=>x(pt,"$additionalSettingsMenuItems$",i),W=()=>x(pe,"$isAutoQualityAvailable$",i),H=()=>x(xe,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),Y=g(e,"ref",15,void 0),ae=g(e,"playerControlsHeight",3,0),j=ci({}),ne=ci({}),Z=ve(),we=Vt(),ue=Z.state.audioStream$,re=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,xe=Z.state.availableQualities$,J=Z.state.autoQualityLimitingAvailable$,Ne=Z.state.isAutoQualityEnabled$,pe=Z.state.isAutoQualityAvailable$,k=Z.state.currentPlaybackRate$,We=Z.state.availablePlaybackRates$,Te=Z.state.currentSubtitle$,X=Z.state.availableSubtitlesList$,ie=Z.state.canDownload,De=Z.state.hasMpegSources$,Be=Z.ui.settingsMenu.visible$,it=Z.ui.settingsMenu.openedByBtnKeyboard$,U=Z.ui.settingsMenu.ref$,Ae=Z.ui.isMobile,Pe=Z.ui.mobileNotReportControlHidden$,Ue=Z.state.canChangePlaybackSpeed$,Ze=Z.state.trafficSavingEnabled$,ye=Z.state.highQualityEnabled$,ke=Z.ui.playerSize,Fe=Z.ui.debugPanelVisible,Dt=Z.state.isInteractiveTime$,pt=Z.ui.additionalSettingsMenuItems$,Bt=Z.ui.t,st=Z.actions.internal.downloadVideo,St=Z.actions.internal.closeSettingsMenu,ti=Z.actions.internal.openSettingsSubMenu,Rt=Z.actions.internal.closeSettingsSubMenu,$e=q(!1),be=q(void 0),ee=$b();Oe(()=>{!r()&&ee.current&&(Rt(ne[ee.current]),ee.popAllSubMenus())}),Oe(()=>{r()||O(be,void 0)}),Oe(()=>{!ee.current&&n(be)&&R_(j,n(be))}),Oe(()=>{Y()&&U.set(Y())});function ot(Ct){return mt(this,null,function*(){var K;ee.pushSubMenu(Ct),yield _o(),ti(Ct,ne[Ct]);let Ut=(K=Y())==null?void 0:K.firstElementChild;Ut&&Uf(Ut)})}function fe(Ct){var Ut;Ct==null||Ct.stopPropagation(),a()||(Ut=e.returnFocus)==null||Ut.call(e),St(),O($e,!1)}function Me(Ct,Ut){Z.actions.internal.setQuality(Ct,{appliesTo:Ut}),fe()}function $t(Ct){Z.actions.internal.setAudioStream(Ct),fe()}function kt(Ct,Ut){Z.actions.internal.setTrafficSavingEnabled(Ct,Ut),we.features.qualityDetailsSubMenuEnabled&&fe()}function ct(Ct,Ut){Z.actions.internal.setHighQualityEnabled(Ct,Ut),fe()}function ce(Ct){Z.actions.internal.setPlaybackRate(Ct),fe()}function ze(Ct){Z.actions.internal.setSubtitle(Ct),fe()}function Ge(){st()}function at(){AC(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function Ft(){Nl(Z.actions.internal.getDebugTextData())}let Ht=()=>{let Ct=Z.actions.internal.getTraceTextData(),Ut=new Blob([...Ct],{type:"application/json"}),K=window.URL.createObjectURL(Ut);La(K,"vk_player_trace_info","json")};function oi(){Fe.set(!l())}function yi(){O($e,!0)}function ji(){O($e,!1)}function Nt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let mi=v(()=>ie&&u()&&!m()),hi=v(()=>we.features.trafficSaving&&!m()&&f()&&!we.features.qualityDetailsSubMenuEnabled),ht=v(()=>p().length>0&&!m()),Xt=v(()=>!!$()&&!m()),Si=v(()=>we.features.audioLanguages&&y().length>=2&&!m()),Xi=v(()=>!m());Mt(()=>Dt.subscribe(Ct=>{Ct&&!d()&&!n($e)&&!a()&&fe()}));let Jt=v(()=>{let Ct=[n(Xi)&&"quality-settings",n(Si)&&"audio-languages-settings",n(Xt)&&"playback-rate-settings",n(ht)&&"subtitles-settings",n(hi)&&"traffic-saving-switch",n(mi)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ut=>!!Ut);return Pb({items:Ct,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:_(),currentAudioStream:S(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ce,trafficSavingEnabled:T(),toggleTrafficSaving:kt,currentQuality:N()||kb.INVARIANT,isAutoQualityEnabled:P()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Ge,onCopyDataClick:Ft,onReportProblemClick:at,onSaveTraceDataClick:Ht,toggleShowDebugInfo:oi},additionalSettingsMenuItems:A()})}),Et=v(()=>Eb({subMenuId:ee.current,context:{availablePlaybackRates:_(),selectPlaybackRate:ce,trafficSavingEnabled:T(),toggleTrafficSaving:kt,currentQuality:N()||kb.INVARIANT,isAutoQualityEnabled:P()||!1,isAutoQualityAvailable:W()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:ct,availableAudioStreams:y(),availableSubtitlesList:p(),closeSettingsMenu:St,currentAudioStream:S(),isMobile:d(),selectAudioLanguage:$t,selectQuality:Me,selectSubtitle:ze}}));var Ke=RC();let Ci;var bo=C(Ke);{var So=Ct=>{var Ut=VC();let K;Ut.__keydown=[LC,St];var At=C(Ut);{var di=Yt=>{var nt=MC();let Bi;var Fi=C(nt),Zo=C(Fi,!0);w(Fi);var Co=L(Fi,2);Co.__click=fe,w(nt),D((Hi,Zi)=>{Bi=se(nt,1,"item header s-k",null,Bi,Hi),me(Zo,Zi)},[()=>({mobile:d()}),()=>Bt("submenu_settings")]),b(Yt,nt)};R(At,Yt=>{d()&&Yt(di)})}var lt=L(At,2);let wt;wi(lt,21,()=>n(Jt),Yt=>Yt.id,(Yt,nt)=>{var Bi=Le(),Fi=de(Bi);{var Zo=Hi=>{iv(Hi,{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:()=>{ot(n(nt).children),O(be,n(nt).id,!0)},get ref(){return j[n(nt).id]},set ref(Zi){j[n(nt).id]=Zi}})},Co=(Hi,Zi)=>{{var Rr=ro=>{let ki=v(()=>`${n(nt).id}-menu-item`);ov(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:fe})},$o=(ro,ki)=>{{var Jo=en=>{let Ln=v(()=>`${n(nt).id}-menu-item`);rv(en,{get isMobile(){return d()},get id(){return n(Ln)},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(ro,en=>{n(nt).type==="SWITCH"&&en(Jo)},ki)}};R(Hi,ro=>{n(nt).type==="CLICK"?ro(Rr):ro($o,!1)},Zi)}};R(Fi,Hi=>{n(nt).type==="OPEN_SUB_MENU"?Hi(Zo):Hi(Co,!1)})}b(Yt,Bi)}),w(lt),je(lt,Yt=>Y(Yt),()=>Y()),w(Ut),D((Yt,nt,Bi)=>{K=se(Ut,1,"settings-menu menu s-k",null,K,Yt),wt=se(lt,1,"items",null,wt,nt),Qe(lt,Bi)},[()=>({desktop:!d(),mobile:d(),hidden:!!ee.current}),()=>({mobile:d()}),Nt]),gt("mouseenter",Ut,yi),gt("mouseleave",Ut,ji),b(Ct,Ut)};R(bo,Ct=>{r()&&Ct(So)})}var gn=L(bo,2);wi(gn,17,()=>n(Et),Ct=>Ct.id,(Ct,Ut)=>{let K=v(()=>{var At;return(At=n(Ut).minWidth)!=null?At:137});tv(Ct,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return ee.popSubMenu},get id(){return n(Ut).id},get title(){return n(Ut).title},get closeSettingsMenu(){return St},openSubMenuList:ot,get items(){return n(Ut).items},get minWidth(){return n(K)},get refMenuItems(){return j},get listRef(){return ne[n(Ut).id]},set listRef(At){ne[n(Ut).id]=At}})}),w(Ke),D(Ct=>Ci=se(Ke,1,"settings-menu-container s-k",null,Ci,Ct),[()=>({mobile:d(),hidden:!r()})]),b(t,Ke),F(),o()}tt(["keydown","click"]);var OC=M('<button class="btn s-11"> </button>'),DC={hash:"s-11",code:"button.btn.s-11{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function _v(t,e){Q(t,DC);var i=OC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);w(i),D(()=>me(o,e.label)),b(t,i)}tt(["click"]);var BC=M('<div class="container s-t"><div class="notification s-t"><div><p class="description s-t"><!></p> <!></div> <!></div></div>'),FC={hash:"s-t",code:".container.s-t{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-t{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-t{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function $c(t,e){B(e,!0),Q(t,FC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Vt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=BC(),d=C(l),s=C(d),u=C(s),m=C(u);_c(m,{get message(){return a}}),w(u);var f=L(u,2);{var p=y=>{let _=v(()=>r("slow_video_notification_button"));_v(y,{get label(){return n(_)},get onClick(){return e.onSelectAutoQuality}})};R(f,y=>{o||y(p)})}w(s);var $=L(s,2);As($,{get onClick(){return e.onClose}}),w(d),w(l),Xr(3,d,()=>bs,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Ab,Subscription as HC}from"@vkontakte/videoplayer-shared/es2015";var Za="annotation",rp=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",Za),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))}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 p;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((p=this.store)==null?void 0:p.ui)||{},m=new MutationObserver($=>$.forEach(()=>{let y=Ms(d,this.shadowRootContainer);o.forEach(_=>{let S=s==null?void 0:s[_],I=S?ge(S):null,T=u==null?void 0:u[_];I&&(T==null||T.set(Ab(I,y)))})}));m.observe(d,{childList:!0,subtree:!0}),l.observer=m;let f=new HC;o.forEach($=>{s&&f.add(s[$].subscribe(y=>{let _=u==null?void 0:u[$];y&&y.isDisplayed?_==null||_.set(Ab(y,Ms(d,this.shadowRootContainer))):_==null||_.set(!1)}))}),l.subs=f})}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(f=>f==null?void 0:f.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(f=>{var p,$;($=(p=this.store)==null?void 0:p.ui.hiddenControls[f])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var UC=M('<div class="container s-5"><!></div>'),zC={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),Q(t,zC);let i=g(e,"reversed",3,!1);var o=Le(),r=de(o);Is(r,()=>e.Icon,a=>{var l=UC(),d=C(l);Di(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),w(l),D(()=>Qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as Lb}from"@vkontakte/videoplayer-core/es2015";var WC=M('<div class="container s-1b"><!></div>'),KC={hash:"s-1b",code:".container.s-1b{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function bv(t,e){B(e,!0),Q(t,KC);let[i,o]=Re(),r=()=>x(s,"$playbackState$",i),a=()=>x(m,"$previewTrackActive",i),l=()=>x(f,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:m,previewTrackDragInProgress:f}}=ve(),{features:{playbackStatusShow:p},playbackStatusAnimationDuration:$}=Vt(),y=0,_=q(null),S=q(!1);Oe(()=>{r()===Lb.PLAYING?O(_,kn,!0):r()===Lb.PAUSED?O(_,Ns,!0):O(_,null)}),Oe(()=>{if(!(!p||a()||l()))return y=window.setTimeout(()=>{y=0,O(_,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Oe(()=>{d()&&!n(S)&&(O(S,!0),O(_,null))});var I=Le(),T=de(I);{var N=P=>{var E=WC(),A=C(E);yc(A,{get duration(){return $},get Icon(){return n(_)}}),w(E),b(P,E)};R(T,P=>{n(_)&&p&&P(N)})}b(t,I),F(),o()}var qC=M('<div><div data-testid="video-container"></div></div>'),QC={hash:"s-e",code:".video-container.s-e,.video-wrapper.s-e{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-e{background:var(--black)}.video-container.s-e,.video-wrapper.s-e{z-index:var(--video-container-z-index)}.video-container.s-e{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-e{transition:none}.nocursor.s-e{cursor:none}"};function Ja(t,e){B(e,!0),Q(t,QC);let[i,o]=Re(),r=()=>x(m,"$rotateAlpha",i),a=()=>x(f,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(p,"$isPlaying$",i),s=g(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:m,playerSize:f},state:{isPlaying$:p}}=ve(),{isSmoothVideoRotate:$}=Vt(),y=v(()=>s()&&r()%180?a().height/a().width:1);var _=qC();let S;_.__contextmenu=function(...N){var P;(P=e.onContextMenu)==null||P.apply(this,N)},_.__mousedown=function(...N){var P;(P=e.onMouseDown)==null||P.apply(this,N)},_.__mouseup=function(...N){var P;(P=e.onMouseUp)==null||P.apply(this,N)},_.__click=function(...N){var P;(P=e.onClick)==null||P.apply(this,N)},_.__dblclick=function(...N){var P;(P=e.onDblClick)==null||P.apply(this,N)};var I=C(_);let T;je(I,N=>s(N),()=>s()),w(_),D((N,P)=>{S=se(_,1,"video-wrapper s-e",null,S,N),T=se(I,1,"video-container s-e",null,T,P),Qe(I,`transform: rotate(${r()}deg) scale(${n(y)})`),Ve(I,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,_),F(),o()}tt(["contextmenu","mousedown","mouseup","click","dblclick"]);var GC=M('<div><span class="text s-1h"> </span> <!></div>'),YC={hash:"s-1h",code:".root.s-1h{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-1h,.root.visible.s-1h{transform:translateX(-50%)}.root.visible.s-1h{opacity:1;visibility:visible}.text.s-1h{font-size:13px;font-weight:600;line-height:16px}"};function $v(t,e){B(e,!0),Q(t,YC);let{ui:{t:i}}=ve();var o=GC();let r;var a=C(o),l=C(a,!0);w(a);var d=L(a,2);fc(d,{get size(){return"16"},fill:"currentColor"}),w(o),D((s,u)=>{r=se(o,1,"root s-1h",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var jC=M('<div class="container s-1d" role="button" data-testid="preview-track-overlay"><div class="icon s-1d"><!></div></div>'),XC={hash:"s-1d",code:".container.s-1d{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1d,.icon.s-1d{align-items:center;display:flex;justify-content:center}.icon.s-1d{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1d:hover .icon:where(.s-1d){transform:scale(1.15)}"};function yv(t,e){B(e,!1),Q(t,XC);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};xo();var l=jC();l.__click=a;var d=C(l),s=C(d);return kn(s,{get size(){return"32"}}),w(d),w(l),Xr(3,l,()=>bs,()=>({duration:r})),b(t,l),pf(e,"handleClick",a),F({handleClick:a})}tt(["click"]);var ZC=M('<div class="container s-19"><div class="notification s-19"><span class="text s-19"> </span></div></div>'),JC={hash:"s-19",code:".container.s-19{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-19{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-19{font-size:14px;font-weight:500;line-height:18px}"};function xv(t,e){B(e,!1),Q(t,JC);let{ui:{t:i}}=ve();xo();var o=ZC(),r=C(o),a=C(r),l=C(a,!0);w(a),w(r),w(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],wn),Xr(3,r,()=>bs,()=>({duration:340})),b(t,o),F()}var eT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},tT=M("<div><!></div>"),iT=M('<div class="spherical-video-icon s-9"><!></div>'),oT=M("<div><!></div>"),nT=M('<div class="settings-menu s-9"><!></div>'),rT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),sT=M("<!> <!> <!>",1),aT=M('<div class="blocked s-9"></div>'),lT=M('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),dT={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 wv(t,e){B(e,!0),Q(t,dT);let[i,o]=Re(),r=()=>x(pi,"$notificationsToShow$",i),a=()=>x(mi,"$playerPhase",i),l=()=>x(bo,"$isLoaderVisible",i),d=()=>x(yi,"$adPlaybackState",i),s=()=>x(di,"$crashed",i),u=()=>x(Hi,"$isInteractiveTime$",i),m=()=>x(Si,"$settingsMenuVisible",i),f=()=>x(Zi,"$isInteractiveExpectation$",i),p=()=>x(Xt,"$controlsVisible",i),$=()=>x($o,"$touched",i),y=()=>x(Or,"$graphIsOpened$",i),_=()=>x(hi,"$isFullscreen",i),S=()=>x($s,"$autoplayNextEnabled$",i),I=()=>x(Ut,"$postrollPassed",i),T=()=>x(So,"$isEnded$",i),N=()=>x(Bn,"$cursorInside",i),P=()=>x(tr,"$isControlsAvailable",i),E=()=>x(hn,"$doubleForwardOn$",i),A=()=>x(xr,"$fakeIsPlaying$",i),W=()=>x(Cr,"$bottomNoSmooth",i),H=()=>x(en,"$interactiveTimeIndicator",i),z=()=>x(Bi,"$playerSize",i),Y=()=>x(Fi,"$is3DVideo",i),ae=()=>x(Mn,"$doubleForwardAvailable$",i),j=()=>x(Ke,"$contextMenuVisible$",i),ne=()=>x(oi,"$playbackState$",i),Z=()=>x(ro,"$hotKeyMapData",i),we=()=>x(Jt,"$scrubbingInProgress",i),ue=()=>x(Et,"$volumeChangingInProgress",i),re=()=>x(gn,"$chromecastConnected$",i),_e=()=>x(_n,"$controlsTimeoutActive",i),xe=()=>x(Xi,"$settingsMenuOpenedByKeyboard",i),J=()=>x(ss,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Ii,"$contextMenuOpenedByHotKey$",i),pe=()=>x(Ye,"$contextMenuButtonRef$",i),k=()=>x(Uo,"$contextMenuLastActiveElem$",i),We=()=>x(ht,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Ht,"$language$",i),X=()=>x(rn,"$previewTrackActive$",i),ie=()=>x(Zo,"$icon3DVideoVisible",i),De=()=>x(Ct,"$chromecastDeviceName$",i),Be=()=>x(Yt,"$currentSubtitle$",i),it=()=>x(nt,"$currentSubtitleCaptions$",i),U=()=>x(ji,"$position$",i),Ae=()=>x(Nt,"$duration$",i),Pe=()=>x(K,"$isLive$",i),Ue=()=>x(At,"$isPlaying$",i),Ze=()=>x(er,"$contextMenuPosition$",i),ye=()=>x(Do,"$previewTrackNotificationVisible$",i),ke=()=>x(ki,"$showHotKeyMap",i),Fe=()=>x(Ci,"$debugPanelVisible",i),Dt=()=>x(is,"$userActionsDisabled$",i),pt=g(e,"videoContainer",15),Bt=g(e,"adsSlotId",3,void 0),st=g(e,"adsParams",3,void 0),St=g(e,"adsAutoplayParam",3,void 0),ti=g(e,"duration",3,void 0),Rt=g(e,"logoTargetUrl",3,""),$e=g(e,"showNextPrevButtons",3,!1),be=g(e,"nextButtonActive",3,!1),ee=g(e,"prevButtonActive",3,!1),ot=g(e,"endScreenVideoTitle",3,void 0),fe=g(e,"endScreenVideoThumb",3,void 0),Me=g(e,"isOneVideoPlaylist",3,!1),$t=g(e,"shadowRootContainer",3,void 0),kt=g(e,"outerContainerRef",3,void 0),ct=g(e,"playerStarted",3,!1),ce=g(e,"fullScreenTarget",3,void 0),ze=g(e,"showMiniTimer",3,!1),Ge=g(e,"showEndScreen",3,!0),at=g(e,"keyboardControls",15),Ft=e.store.getLogger().createComponentLog("Root component"),Ht=e.store.interfaceLanguage$,oi=e.store.state.playbackState$,yi=e.store.ads.playbackState,ji=e.store.state.positionWithScrubbing$,Nt=e.store.state.duration$,mi=e.store.playerPhase,hi=e.store.ui.isFullscreen,ht=e.store.ui.isFullscreenOpenedByKeyboard,Xt=e.store.ui.controlsVisible,Si=e.store.ui.settingsMenu.visible$,Xi=e.store.ui.settingsMenu.openedByBtnKeyboard$,Jt=e.store.ui.scrubbingInProgress,Et=e.store.ui.volumeChangingInProgress,Ke=e.store.ui.contextMenu.visible$,Ci=e.store.ui.debugPanelVisible,bo=e.store.state.isLoaderVisible,So=e.store.state.isEnded$,gn=e.store.state.chromecastConnected$,Ct=e.store.state.chromecastDeviceName$,Ut=e.store.ads.postrollPassed,K=e.store.state.isLive$,At=e.store.state.isPlaying$,di=e.store.state.crashed$,lt=e.store.webApi.annotationsApi,wt=e.store.webApi.pictureInPictureApi,Yt=e.store.state.currentSubtitle$,nt=e.store.state.currentSubtitleCaptions$,Bi=e.store.ui.playerSize,Fi=e.store.ui.is3DVideo,Zo=e.store.ui.icon3DVideoVisible,Co=e.store.state.isInteractive,Hi=e.store.state.isInteractiveTime$,Zi=e.store.state.isInteractiveExpectation$,Rr=e.store.state.hasInteractiveBranches,$o=e.store.ui.touched,ro=e.store.ui.modals.hotKeyMap.data,ki=e.store.ui.modals.hotKeyMap.show,Jo=e.store.ui.overlayContainer$,en=e.store.ui.controls.interactiveTimeIndicator,Ln=e.store.state.showInteractiveTimeIndicator,er=e.store.ui.contextMenu.position$,Nr=e.store.actions.internal.setQuality,ts=e.store.actions.internal.closeSettingsMenu,$s=e.store.ui.autoplayNextEnabled$,is=e.store.ui.userActionsDisabled,tr=e.store.ui.isControlsAvailable,yr=e.store.ui.videoTitleInfo,hn=e.store.ui.doubleForwardOn$,Mn=e.store.ui.doubleForwardAvailable$,Do=e.store.ui.previewTrackNotificationVisible,Vn=e.store.actions.internal.getVideoElement,ir=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:xr,notifications$:wr,graphIsOpened$:Or}=wo(),so=q(void 0),Dr=q(void 0),Rn=q(void 0),Nn=q(void 0),ao,Br,On;ro.set(I_());let{closeNotification:ft,notificationsToShow$:pi}=wr,Sr=v(()=>!!r().slow_video),or=()=>ft("slow_video"),nr=v(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),tn=q(void 0),Cr=le(!1),on,_n=le(!1),Dn=le(),Bn=le(!1),Bo=q(!1),To=q(!1),rr=q(!1),Io=q(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Ui=v(()=>u()&&!m()&&!(n(Bo)||n(To))&&!(n(rr)&&!f())),Fn=!0,sr=v(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!p()&&!s()&&!Co&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),Fr=v(()=>a()==="video"&&!y()&&_()),Hn=q(!1),Eo=v(()=>(Ge()||e.showAutoplayNext&&S())&&!!ot()&&!!fe()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(Hn)),Hr=v(()=>N()&&!(p()||n(Eo))&&!u()&&P()&&!E()),yt=q(!1),Tt=v(()=>A()!==null),{toggle:lo}=xr,Ji=!1,Mi=null;wt==null||wt.setContext(sd());let bn=()=>{e.autoplay&&!Co&&e.uiConfig.controls.showOnStartupAtAutoplay&&vi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:bn});let yo=()=>{window.clearTimeout(ao),_n.set(!1)},Un=()=>{window.clearTimeout(Br),Dn.set(null)},vi=he=>{yo(),_n.set(!0),ao=window.setTimeout(()=>_n.set(!1),he);let xt=he-100;on=window.setTimeout(()=>{W()&&Cr.set(!1)},xt>0?xt:he)},Ur=(he,xt)=>{Un(),Dn.set(xt),Br=window.setTimeout(()=>Dn.set(null),he)},ar=Fi.subscribe(he=>{Zo.set(he),he&&(window.clearTimeout(On),On=window.setTimeout(()=>Zo.set(!1),e.uiConfig.controls.hide360IconTimeout))}),os=()=>mt(null,null,function*(){var xt,ii,xi,Vi;let he=ta();if(he){let fi=Vd(),ni=Po();he=fi===ni||fi===$t()}if(he){vi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield wt==null?void 0:wt.exit()}catch(fi){Ft({message:String(fi)})}}hi.set(he),e.store.getAdmanWrapper().setFullscreen(he),_()?(ii=(xt=e.store.callbacks)==null?void 0:xt.onFullscreenEnter)==null||ii.call(xt):(Vi=(xi=e.store.callbacks)==null?void 0:xi.onFullscreenExit)==null||Vi.call(xi)}),ns=he=>{let{width:xt,height:ii}=he.target;Bi.set({width:xt,height:ii})},zr=()=>{let{width:he,height:xt}=n(so).getBoundingClientRect();Bi.set({width:he,height:xt})};Mt(()=>{var xt;return Lu(os),e.uiConfig.features.annotationsInside&&(lt==null||lt.init(n(so))),Ra(wt)&&(wt==null||wt.assignPlayerContainer(n(so)),wt==null||wt.setExternalEventHandlers({resize:ns,leavepictureinpicture:zr})),e.interactiveContainer&&((xt=pt().parentElement)==null||xt.insertBefore(e.interactiveContainer,pt().nextSibling)),()=>{window.clearTimeout(ao),window.clearTimeout(on),window.clearTimeout(Br),window.clearTimeout(On),ar(),wt==null||wt.dispose().catch(ii=>{Ft({message:String(ii)})}),Mu(os)}});let Po=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!kt()?n(so):kt(),xt=he.getRootNode(),ii=xt instanceof ShadowRoot?xt.host:xt,xi=ce()instanceof HTMLElement&&ce().contains(ii);return e.uiConfig.allowChangingFullscreenTarget&&ce()&&xi?ce():he},nn=()=>{Ke.set(!1)},co=()=>{ts(),nn()},Tr=()=>mt(null,null,function*(){if(!ir()){Ft({message:"fullscreen disabled"});return}nn(),ta()?(yield Au(document),Ft({message:"exit fullscreen"})):(Ft({message:"request fullscreen"}),yield ku(Po()))}),Fo=he=>{y()||(he.preventDefault(),Ke.set(!0),er.set({left:he.clientX,top:he.clientY}))};function rs(){Bn.set(!0),Co||vi(e.uiConfig.controls.hideTimeoutCursor)}function qe(he){var Vi,fi;let{relatedTarget:xt}=he,xi=!!(xt&&((Vi=n(Rn))!=null&&Vi.contains(xt)))&&((fi=at())==null?void 0:fi.isFocused());!Co&&!xi&&(Cr.set(!0),vi(e.uiConfig.controls.hideTimeoutCursor))}function Lt(){Bn.set(!1),O(To,!1),O(Bo,!1),Ji=!1,e.store.actions.internal.releaseCamera(),vi(e.uiConfig.controls.hideTimeout),E()&&yn()}function bi(he){return he?he.offsetTop+bi(he.offsetParent):0}function ko(he){return he?he.offsetLeft+ko(he.offsetParent):0}function Ao(he){if(H()&&Ln){let xt=he.currentTarget,ii=bi(xt),xi=ko(xt),Vi=he.pageX-xi,fi=he.pageY-ii,{left:ni,bottom:mo,right:ln}=H(),dn=ln-ni;return Vi>=ni-dn&&fi<=mo+dn}}function Ho(he){if(n(so)){let xt=bi(he.currentTarget),ii=z().height,xi=he.pageY-xt;if(Ao(he)){O(To,!1);return}xi<40?O(To,!0):xi>ii-40?O(Bo,!0):(O(To,!1),m()||O(Bo,!1))}}function uo(he){Ho(he),!n(Ui)&&!E()&&vi(e.uiConfig.controls.hideTimeoutCursor),Y()&&Ji&&Mi&&e.store.actions.internal.moveCameraFocusPX(Mi.clientX-he.clientX,Mi.clientY-he.clientY,he.timeStamp-Mi.timeStamp),Mi=he}let eo=null,$n=()=>{eo=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),yo()},e.uiConfig.doubleForwardActivationTime)},yn=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),eo&&clearTimeout(eo),eo=null},po=he=>{he.preventDefault(),he.button===0&&(Ji=!0,e.store.actions.internal.holdCamera(),ae()&&$n()),!Ji&&vi(e.uiConfig.controls.hideTimeoutCursor)},Lo=he=>{he.preventDefault(),he.button===0&&(Mi=he,Ji=!1,e.store.actions.internal.releaseCamera()),!E()&&vi(e.uiConfig.controls.hideTimeoutCursor)},zn=he=>{he.preventDefault(),Fn&&(Ft({message:"double click on video"}),Tr(),vi(e.uiConfig.controls.hideTimeoutCursor))},lr=he=>{var xt;if(he.preventDefault(),E()){yn();return}if(eo&&yn(),j()||m()){co();return}if(!(T()&&!Rr)){if(n(Tt))return lo();if((xt=at())==null||xt.focus(),!ct()){e.firstStart(),vi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==Vb.PLAYING)&&e.store.actions.internal.togglePlay(),vi(e.uiConfig.controls.hideTimeoutCursor)}},dr=he=>{co(),$o.set(!0),vi(e.uiConfig.controls.hideTimeout),he&&Ur(e.uiConfig.controls.hideHotKeyHelpers,he)},Wn=()=>{var he,xt;co(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(xt=e.store.callbacks)==null||xt.onOpenHotKeyMap(Z()):ki.update(ii=>!ii)},ys=()=>{$o.set(!0)},ss=e.store.ui.contextMenu.openedByBtnKeyboard$,Ye=e.store.ui.contextMenu.btnRef$,qt=q(void 0),Ii=e.store.ui.contextMenu.openedByHotKey$,Uo=e.store.ui.contextMenu.lastActiveElem$,rn=e.store.ui.previewTrackActive;Oe(()=>{Jo.set(n(tn))}),Oe(()=>{O(rr,n(Io)&&ne()!==Vb.PLAYING,!0),n(Io)||It(()=>O(Io,!0))}),Oe(()=>{var xt,ii;let he=(n(rr)||T()||m()||we()||ue()||re()||_e())&&!n(Ui)&&(a()==="video"||a()==="ads")&&!s()&&P();Xt.set(he),!he&&!_e()&&e.uiConfig.returnFocusOnControlsHide&&((xt=n(Rn))!=null&&xt.contains(Fu()))&&((ii=at())==null||ii.focus())}),Oe(()=>{!we()&&n(yt)&&!u()&&vi(e.uiConfig.controls.hideTimeoutCursor),It(()=>O(yt,we(),!0))}),Oe(()=>{n(Nn),m(),xe(),It(()=>Hd(n(Nn),m(),xe()))}),Oe(()=>{n(qt),j(),J(),Ne(),It(()=>{let he=J()||Ne();Hd(n(qt),j(),he)})}),Oe(()=>{let he=pe();he&&(j(),It(()=>Ol(he,j(),ss)))}),Oe(()=>{let he=k();he&&(j(),It(()=>V_(he,j(),Ii)))}),Oe(()=>{var he;!We()&&_()&&(It(()=>ht.set(!1)),(he=at())==null||he.focus())}),Oe(()=>{y()&&co()});let cr=q(void 0),sn=he=>{yr.set(Zn(Vn(),{title:n(cr)},"title",he))},zo=(he,xt)=>{var fi,ni;let ii=(ni=(fi=e.store.callbacks)==null?void 0:fi.uiInfo)==null?void 0:ni.onUpcomingLiveViewStateChanged;if(!ii)return;let xi=!!xt,Vi=Ie(Ie({},Zn(n(so),{upcomingLiveScreen:xt},"upcomingLiveScreen",xi)),he);ii(Vi)};var Bs=lT();gt("blur",Sa,co);var an=de(Bs);an.__mousemove=uo;var Fs=C(an);let da=v(()=>a()==="ads"),ca=v(()=>n(Tt)?lo:void 0);je(Gf(Fs,{startDoubleForwardActivationTimer:$n,stopDoubleForward:yn,toggleFullscreen:Tr,hideContextMenu:co,showHotKeyHelpers:dr,showKeyMap:Wn,get isAds(){return n(da)},get fakePlayButtonHandler(){return n(ca)},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},children:(he,xt)=>{var ii=sT(),xi=de(ii);Ja(xi,{get hideCursor(){return n(Hr)},onClick:lr,onContextMenu:Fo,onMouseDown:po,onMouseUp:Lo,onDblClick:zn,get videoContainer(){return pt()},set videoContainer(ni){pt(ni)}});var Vi=L(xi,2);ka(Vi,()=>"slot",!1,(ni,mo)=>{io(ni,()=>({name:Za}))});var fi=L(Vi,2);Is(fi,Te,ni=>{var mo=rT(),ln=de(mo);let dn=v(()=>a()!=="thumb"||s()||Co&&e.autoplay);Ya(ln,{get hidden(){return n(dn)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Fo,onClick:nn});var Ai=L(ln,2);{var Zl=He=>{yv(He,{})};R(Ai,He=>{X()&&He(Zl)})}var el=L(Ai,2);bv(el,{});var Hs=L(el,2);$v(Hs,{get isVisible(){return E()}});var tl=L(Hs,2);{var il=He=>{let _i=v(()=>{var Mo;return(Mo=e.live)==null?void 0:Mo.startTime});gc(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(_i)},onUpcomingLiveViewStateChanged:zo,onContextMenu:Fo,onClick:nn})};R(tl,He=>{a()==="LiveWaitingStart"&&He(il)})}var Ir=L(tl,2);{var ua=He=>{ja(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Fo,onClick:nn})};R(Ir,He=>{a()==="LiveWaitingRecover"&&He(ua)})}var Us=L(Ir,2);{var Wr=He=>{ja(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Fo,onClick:nn})};R(Us,He=>{a()==="LiveWaitingRecord"&&He(Wr)})}var as=L(Us,2);{var zs=He=>{var _i=tT();let Mo;var ga=C(_i);Nd(ga,{get adsSlotId(){return Bt()},get adsParams(){return st()},get adsAutoplayParam(){return St()},get duration(){return ti()},get adsExternalApi(){return e.adsExternalApi}}),w(_i),D(xn=>Mo=se(_i,1,"ads-container s-9",null,Mo,xn),[()=>({hidden:a()!=="ads"})]),b(He,_i)};R(as,He=>{e.showAds&&ct()&&He(zs)})}var ur=L(as,2);{var ol=He=>{let _i=v(()=>!Ge()&&e.showAutoplayNext&&S());Kf(He,{get title(){return ot()},get thumb(){return fe()},get isHide(){return n(_i)},clickCloseIcon:()=>O(Hn,!0)})};R(ur,He=>{n(Eo)&&ot()&&fe()&&He(ol)})}var nl=L(ur,2);{var Jl=He=>{let _i=v(()=>!p());Ym(He,{get title(){return e.title},get isHidden(){return n(_i)},onVisibilityChanged:sn,get ref(){return n(cr)},set ref(Mo){O(cr,Mo,!0)}})};R(nl,He=>{n(Fr)&&He(Jl)})}var rl=L(nl,2);{var sl=He=>{let _i=v(()=>a()==="video"&&p());mc(He,{get isShifted(){return n(_i)}})};R(rl,He=>{Y()&&He(sl)})}var al=L(rl,2);{var ed=He=>{var _i=iT(),Mo=C(_i);Md(Mo,{}),w(_i),b(He,_i)};R(al,He=>{ie()&&He(ed)})}var pa=L(al,2);{var Er=He=>{vc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()}})};R(pa,He=>{re()&&He(Er)})}var rt=L(pa,2);{var ut=He=>{Qa(He,{get shifted(){return p()},get captions(){return it()},get position(){return U()},get playerSize(){return z()}})};R(rt,He=>{Be().value!=="off"&&He(ut)})}var zi=L(rt,2);{var Wo=He=>{var _i=oT();_i.__contextmenu=Fo,_i.__click=[eT,j,Ke,m,Si,co];var Mo=C(_i);Ga(Mo,{}),w(_i),b(He,_i)};R(zi,He=>{s()&&He(Wo)})}var Wi=L(zi,2);{var $i=He=>{let _i=v(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Mo=v(()=>a()==="ads"),ga=v(()=>e.canRewindLive&&Ae()!==0);pc(He,{get bottomHidden(){return n(_i)},get bottomNoSmooth(){return W()},get showControls(){return p()},get isAds(){return n(Mo)},get canRewindLive(){return n(ga)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Rt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},get isOneVideoPlaylist(){return Me()},customFullscreenSupported:Fn,toggleFullscreen:Tr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Dr)},set playerControlsWrapperRef(xn){O(Dr,xn,!0)},get playerControlsRef(){return n(Rn)},set playerControlsRef(xn){O(Rn,xn,!0)}})};R(Wi,He=>{ct()&&He($i)})}var Ri=L(Wi,2);{var fa=He=>{var _i=nT(),Mo=C(_i);let ga=v(()=>{var xn;return(xn=n(Rn))==null?void 0:xn.clientHeight});bc(Mo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(ga)},returnFocus:()=>{var xn;return(xn=at())==null?void 0:xn.focus()},get ref(){return n(Nn)},set ref(xn){O(Nn,xn,!0)}}),w(_i),b(He,_i)};R(Ri,He=>{!re()&&a()!=="ads"&&He(fa)})}var ll=L(Ri,2);let _p=v(()=>!n(sr));Bd(ll,{get isLive(){return Pe()},get isHidden(){return n(_p)},get isPlaying(){return Ue()},get position(){return U()},get duration(){return Ae()}});var Mc=L(ll,2);Qm(Mc,{get data(){return Dn}});var Vc=L(Mc,2);Wf(Vc,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=at())==null?void 0:He.focus()},get visible(){return j()},get playerContainerRef(){return n(so)},get position(){return Ze()},get menuElementRef(){return n(qt)},set menuElementRef(He){O(qt,He,!0)}});var Rc=L(Vc,2);{var bp=He=>{$c(He,{onClose:or,onSelectAutoQuality:()=>{Nr("auto"),or()}})};R(Rc,He=>{n(Sr)&&He(bp)})}var Nc=L(Rc,2);{var dl=He=>{xv(He,{})};R(Nc,He=>{ye()&&He(dl)})}var Oc=L(Nc,2);{var ma=He=>{Ba(He,{})};R(Oc,He=>{n(nr)&&He(ma)})}var va=L(Oc,2);{var $p=He=>{Xf(He,{})};R(va,He=>{ke()&&He($p)})}var Dc=L(va,2);{var td=He=>{Wd(He,{})};R(Dc,He=>{Fe()&&He(td)})}b(ni,mo)}),b(he,ii)},$$slots:{default:!0}}),he=>at(he),()=>at());var dt=L(Fs,2);je(dt,he=>O(tn,he),()=>n(tn)),w(an),je(an,he=>O(so,he),()=>n(so));var ei=L(an,2);{var fo=he=>{var xt=aT();b(he,xt)};R(ei,he=>{Dt()&&he(fo)})}gt("mouseenter",an,rs),gt("mouseleave",an,Lt),gt("click",an,ys,!0),gt("focusin",an,qe,!0),b(t,Bs),F(),o()}tt(["mousemove","contextmenu","click"]);import{clientChecker as xc,PlaybackState as bT}from"@vkontakte/videoplayer-core/es2015";import{noop as $T}from"@vkontakte/videoplayer-shared/es2015";var cT=M('<div></div> <div class="info s-m"><div class="triangles-wrapper s-m"><div></div> <div></div> <div></div></div> <p class="step-caption s-m"> </p></div>',1),uT=M("<div><!></div>"),pT={hash:"s-m",code:".double-click-area.s-m{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-m{left:0}.double-click-area.right.s-m{right:0}.semicircle.s-m{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-m{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-m{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-m{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-m,.triangles-wrapper.s-m{display:flex;justify-content:center}.triangles-wrapper.s-m{margin-bottom:10px;position:relative}.triangle.s-m{animation:s-m-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-m:nth-child(3),.triangle.right.s-m:first-child{animation-delay:0s}.triangle.left.s-m:nth-child(2),.triangle.right.s-m:nth-child(2){animation-delay:.1s}.triangle.left.s-m:first-child,.triangle.right.s-m:nth-child(3){animation-delay:.2s}@keyframes s-m-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-m{border-right:8px solid var(--white)}.triangle.right.s-m{border-left:8px solid var(--white)}.triangle.s-m:not(:last-child){margin-right:5px}.step-caption.s-m{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function sp(t,e){B(e,!0),Q(t,pT);let i=g(e,"seekStep",3,0),o=q(!1),r=0,a=0,l=q(ci(i())),d=f=>{f.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(f):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};pn(()=>{window.clearTimeout(r)});var s=uT();s.__click=d;var u=C(s);{var m=f=>{var p=cT(),$=de(p),y=L($,2),_=C(y),S=C(_),I=L(S,2),T=L(I,2);w(_);var N=L(_,2),P=C(N,!0);w(N),w(y),D(E=>{var A,W,H,z;se($,1,`semicircle ${(A=e.side)!=null?A:""}`,"s-m"),se(S,1,`triangle ${(W=e.side)!=null?W:""}`,"s-m"),se(I,1,`triangle ${(H=e.side)!=null?H:""}`,"s-m"),se(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-m"),me(P,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(f,p)};R(u,f=>{n(o)&&f(m)})}w(s),D(()=>{var f;return se(s,1,`double-click-area ${(f=e.side)!=null?f:""}`,"s-m")}),b(t,s),F()}tt(["click"]);var fT=(t,e,i)=>{e(!1),i()},mT=M('<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),vT={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 Sv(t,e){B(e,!0),Q(t,vT);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,m=l.actions.internal.nextVideoAnnouncementShow,f=l.actions.internal.nextVideoAnnouncementClick,p=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),p()},_=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||m(),e.isHide&&r()&&(u(!1),p())});var S=Le(),I=de(S);{var T=N=>{var P=mT(),E=L(de(P),2),A=C(E),W=C(A),H=C(W,!0);w(W);var z=L(W,2);As(z,{onClick:_}),w(A);var Y=L(A,2);Y.__click=[fT,u,f];var ae=C(Y),j=C(ae),ne=C(j);let Z;var we=L(ne,2);{var ue=J=>{Kd(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}w(j),w(ae);var re=L(ae,2),_e=C(re),xe=C(_e,!0);w(_e),w(re),w(Y),w(E),D((J,Ne)=>{me(H,J),Qe(j,`background-image: url('${e.thumb}')`),Z=se(ne,1,"thumb-overlay s-h",null,Z,Ne),me(xe,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,P)};R(I,N=>{e.isHide||N(T)})}b(t,S),F(),o()}tt(["click"]);import{clientChecker as gT}from"@vkontakte/videoplayer-core/es2015";var Rb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Mt(()=>{gT.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))}),pn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as hT}from"@vkontakte/videoplayer-core/es2015";var ap=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 _T}from"@vkontakte/videoplayer-core/es2015";var Nb=({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=()=>_T.device.isIOS&&ge(l)===hT.DASH_LIVE_CMAF,f=()=>{s==null||s(),s=null},p=$=>{if(f(),!m()||!$)return;let y=u();if(!y)return;let _=new ap(y),S=ge(d),I=ge(a),T=ge(r);for(let E of S)I.some(W=>W.value===E.id)&&_.attach(E,T.value===E.id);let N=d.subscribe(E=>{for(let A of E)_.updateSrc(A)}),P=()=>{let E=_.getCurrentShowingId();o(ge(a).find(A=>A.value===E))};y.textTracks.addEventListener("change",P),s=()=>{N(),_.detachAll(),y.textTracks.removeEventListener("change",P)}};Mt(()=>i.subscribe(p)),pn(f)};var yT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},xT=M("<!> <!>",1),wT=M("<div><!></div>"),ST=M('<div class="spherical-video-icon s-7"><!></div>'),CT=M("<div><!></div>"),TT=M('<div class="settings-mobile s-7"><!></div>'),IT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ET=M('<div class="player-wrapper s-7" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),PT={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%}.spherical-video-icon.s-7{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-7{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-7{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 Cv(t,e){var Eo,Hr;B(e,!0),Q(t,PT);let[i,o]=Re(),r=()=>x($t,"$playerPhase",i),a=()=>x(yi,"$isLoaderVisible",i),l=()=>x(ot,"$adPlaybackState",i),d=()=>x(Jt,"$crashed",i),s=()=>x($s,"$notificationsToShow$",i),u=()=>x(ee,"$playbackState$",i),m=()=>x(Rt,"$graphIsOpened$",i),f=()=>x(ze,"$interactiveHideMobileControls",i),p=()=>x(ji,"$isEnded$",i),$=()=>x(lt,"$isInteractiveExpectation$",i),y=()=>x(ct,"$controlsVisible",i),_=()=>x(nt,"$touched",i),S=()=>x(Fi,"$autoplayNextEnabled$",i),I=()=>x(hi,"$postrollPassed",i),T=()=>x(yr,"$bottomNoSmooth",i),N=()=>x(Ci,"$videoSize",i),P=()=>x(Ct,"$playerSize",i),E=()=>x(kt,"$isFullscreen",i),A=()=>x(fe,"$position$",i),W=()=>x(Me,"$duration$",i),H=()=>x(Zo,"$loadedMetadata",i),z=()=>x(Ge,"$settingsMenuVisible",i),Y=()=>x(Ft,"$scrubbingInProgress",i),ae=()=>x(Ht,"$volumeChangingInProgress",i),j=()=>x(Nt,"$chromecastConnected$",i),ne=()=>x(ce,"$isControlsAvailable",i),Z=()=>x(di,"$isInteractiveTime$",i),we=()=>x(Si,"$isActiveLive",i),ue=()=>x(at,"$settingsMenuOpenedByKeyboard",i),re=()=>x(be,"$language$",i),_e=()=>x(Yt,"$disabledControls$",i),xe=()=>x(Ut,"$is3DVideo",i),J=()=>x(K,"$icon3DVideoVisible",i),Ne=()=>x(mi,"$chromecastDeviceName$",i),pe=()=>x(bo,"$currentSubtitle$",i),k=()=>x(So,"$currentSubtitleCaptions$",i),We=()=>x(gn,"$realDuration$",i),Te=()=>x(ht,"$isLive$",i),X=()=>x(Xt,"$isPlaying$",i),ie=()=>x(oi,"$debugPanelVisible",i),De=g(e,"videoContainer",15),Be=g(e,"adsSlotId",3,void 0),it=g(e,"adsParams",3,void 0),U=g(e,"adsAutoplayParam",3,void 0),Ae=g(e,"duration",3,void 0),Pe=g(e,"logoTargetUrl",3,""),Ue=g(e,"showNextPrevButtons",3,!1),Ze=g(e,"nextButtonActive",3,!1),ye=g(e,"prevButtonActive",3,!1),ke=g(e,"endScreenVideoTitle",3,void 0),Fe=g(e,"endScreenVideoThumb",3,void 0),Dt=g(e,"isOneVideoPlaylist",3,!1),pt=g(e,"showMiniTimer",3,!1),Bt=g(e,"fullScreenTarget",3,void 0),st=g(e,"playerStarted",3,!1),St=g(e,"showEndScreen",3,!0),{notifications$:ti,graphIsOpened$:Rt}=wo(),$e=e.store.getLogger().createComponentLog("Root component"),be=e.store.interfaceLanguage$,ee=e.store.state.playbackState$,ot=e.store.ads.playbackState,fe=e.store.state.positionWithScrubbing$,Me=e.store.state.duration$,$t=e.store.playerPhase,kt=e.store.ui.isFullscreen,ct=e.store.ui.controlsVisible,ce=e.store.ui.isControlsAvailable,ze=e.store.ui.interactiveHideMobileControls,Ge=e.store.ui.settingsMenu.visible$,at=e.store.ui.settingsMenu.openedByBtnKeyboard$,Ft=e.store.ui.scrubbingInProgress,Ht=e.store.ui.volumeChangingInProgress,oi=e.store.ui.debugPanelVisible,yi=e.store.state.isLoaderVisible,ji=e.store.state.isEnded$,Nt=e.store.state.chromecastConnected$,mi=e.store.state.chromecastDeviceName$,hi=e.store.ads.postrollPassed,ht=e.store.state.isLive$,Xt=e.store.state.isPlaying$,Si=e.store.state.isActiveLive$,Xi=e.store.state.isRewindableLive$,Jt=e.store.state.crashed$,Et=e.store.webApi.annotationsApi,Ke=e.store.webApi.pictureInPictureApi,Ci=e.store.state.videoSize$,bo=e.store.state.currentSubtitle$,So=e.store.state.currentSubtitleCaptions$,gn=e.store.state.duration$,Ct=e.store.ui.playerSize,Ut=e.store.ui.is3DVideo,K=e.store.ui.icon3DVideoVisible,At=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,lt=e.store.state.isInteractiveExpectation$,wt=e.store.state.hasInteractiveBranches,Yt=e.store.ui.controls.disabledControls$,nt=e.store.ui.touched,Bi=e.store.ui.overlayContainer$,Fi=e.store.ui.autoplayNextEnabled$,Zo=e.store.state.loadedMetadata$,Co=e.store.actions.internal.closeSettingsMenu,Hi=(Eo=e.store.callbacks)==null?void 0:Eo.onDisabledPlayPrevChapterClick,Zi=(Hr=e.store.callbacks)==null?void 0:Hr.onDisabledSeekToInteractiveClick,Rr=e.store.actions.internal.setQuality,$o=q(void 0),ro=q(void 0),ki=q(void 0),Jo=q(void 0),en,Ln,er=v(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Nr=q(void 0),{closeNotification:ts,notificationsToShow$:$s}=ti,is=v(()=>!!s().slow_video),tr=()=>ts("slow_video"),yr=le(!1),hn,Mn=q(!1),Do=v(()=>u()!==bT.PLAYING),Vn=q(!1),ir=v(()=>m()||f()||!n(Mn)&&(p()&&!!wt||n(Do)&&$())),xr=q(!0),wr=v(()=>e.uiConfig.features.thumbTimer&&pt()&&r()==="video"&&!y()&&!d()&&!At&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),Or=q(!1),so=v(()=>(St()||e.showAutoplayNext&&S())&&!!ke()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&p()&&!d()&&!n(Or)),Dr=q(!1);Ke==null||Ke.setContext(sd());let Rn=yt=>{yt&&!At&&ao(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Rn});let Nn=()=>{clearTimeout(en),O(Mn,!1),f()&&ze.set(!1)},ao=yt=>{Nn(),O(Mn,!0),en=setTimeout(()=>O(Mn,!1),yt);let Tt=yt-100;hn=setTimeout(()=>{T()&&yr.set(!1)},Tt>0?Tt:yt)},Br=Ut.subscribe(yt=>{K.set(yt),yt&&(clearTimeout(Ln),Ln=setTimeout(()=>K.set(!1),e.uiConfig.controls.hide360IconTimeout))}),On=(...Tt)=>mt(null,[...Tt],function*(yt=ta()){var lo,Ji,Mi,bn,yo,Un;if(yt&&!xc.device.isIOS){let vi=Vd(),Ur=tn(),ar=xc.browser.isSamsungBrowser&&vi===e.shadowRootContainer;yt=vi===Ur||ar}if(yt){ao(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Ke==null?void 0:Ke.exit()}catch(vi){$e({message:String(vi)})}try{let vi=(lo=N())!=null&&lo.width&&((Ji=N())!=null&&Ji.height)?N():P();yield C_(vi)}catch(vi){$e({message:String(vi)})}}kt.set(yt),e.store.getAdmanWrapper().setFullscreen(yt),E()?(bn=(Mi=e.store.callbacks)==null?void 0:Mi.onFullscreenEnter)==null||bn.call(Mi):(Un=(yo=e.store.callbacks)==null?void 0:yo.onFullscreenExit)==null||Un.call(yo)}),ft=yt=>{let Tt=yt,{width:lo,height:Ji}=Tt.target;Ct.set({width:lo,height:Ji})},pi=()=>{let{width:yt,height:Tt}=n($o).getBoundingClientRect();Ct.set({width:yt,height:Tt})};Mt(()=>{var yt;return Lu(On),e.uiConfig.features.annotationsInside&&(Et==null||Et.init(n($o))),Ra(Ke)&&(Ke==null||Ke.assignPlayerContainer(n($o)),Ke==null||Ke.setExternalEventHandlers({resize:ft,leavepictureinpicture:pi})),O(xr,!xc.device.isIphoneOrOldIpad),e.interactiveContainer&&((yt=De().parentElement)==null||yt.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(en),clearTimeout(hn),clearTimeout(Ln),Br(),Ke==null||Ke.dispose().catch(Tt=>{$e({message:String(Tt)})}),Mu(On)}});let Sr=q(!0),or=q(!0),nr=yt=>{let Tt=A()+(yt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Tt<0?(O(Sr,!1),Tt=0):Tt>=W()&&(O(or,!1),Tt=W()),O(Vn,!0),e.seekTime(Tt)},tn=()=>xc.device.isIOS?n($o):!e.uiConfig.allowChangingFullscreenTarget||!Bt()?e.outerContainerRef:Bt().contains(e.outerContainerRef)?Bt():e.outerContainerRef,Cr=()=>mt(null,null,function*(){try{if(ta())yield Au(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),xc.device.isIOS&&!H())return;yield ku(tn())}}catch(yt){$e({message:String(yt)})}}),on=()=>{Co()},_n=yt=>{if(yt.preventDefault(),z()){on();return}if(!st()){e.firstStart(),ao(e.uiConfig.controls.hideTimeoutCursor);return}O(Vn,!1),y()?Nn():ao(e.uiConfig.controls.hideTimeoutMobile)},Dn=()=>{nt.set(!0)},Bn=()=>{At||(yr.set(!0),ao(e.uiConfig.controls.hideTimeoutCursor))},Bo=yt=>{Hi&&(Hi(yt),ao(e.uiConfig.controls.hideTimeoutMobile))},To=yt=>{Zi&&(Zi(yt),ao(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{Bi.set(n(Nr))}),Oe(()=>{ct.set((n(Do)||z()||Y()||ae()||j()||!n(so)&&(p()||n(Mn)&&!n(Vn)))&&!n(ir)&&r()==="video"&&!d()&&ne())}),Oe(()=>{!Y()&&n(Dr)&&!Z()&&ao(e.uiConfig.controls.hideTimeoutMobile),O(Dr,Y(),!0)}),Oe(()=>{O(Sr,A()>0),O(or,!we()&&A()<W(),!0)}),Oe(()=>{Hd(n(Jo),z(),ue(),!0)});let rr=G("aria_label_video_player");Rb({fullScreenChangeHandler:On,getFullscreenTarget:tn}),Nb({store:e.store,getFullscreenTarget:tn});let Io=(yt,Tt)=>{var bn,yo;let lo=(yo=(bn=e.store.callbacks)==null?void 0:bn.uiInfo)==null?void 0:yo.onUpcomingLiveViewStateChanged;if(!lo)return;let Ji=!!Tt,Mi=Ie(Ie({},Zn(n($o),{upcomingLiveScreen:Tt},"upcomingLiveScreen",Ji)),yt);lo(Mi)};var Ui=ET();gt("blur",Sa,on);var Fn=C(Ui);Ja(Fn,{onClick:_n,get videoContainer(){return De()},set videoContainer(yt){De(yt)}});var sr=L(Fn,2);ka(sr,()=>"slot",!1,(yt,Tt)=>{io(yt,()=>({name:Za}))});var Fr=L(sr,2);Is(Fr,re,yt=>{var Tt=IT(),lo=de(Tt);let Ji=v(()=>r()!=="thumb"||d()||At&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ya(lo,{get hidden(){return n(Ji)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Mi=L(lo,2);{var bn=Ye=>{var qt=xT(),Ii=de(qt);{var Uo=sn=>{let zo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(sn,{side:"left",get seekStep(){return n(zo)},handleSingleFirstClick:_n,handleSecondClick:()=>nr("backward")})};R(Ii,sn=>{n(Sr)&&sn(Uo)})}var rn=L(Ii,2);{var cr=sn=>{let zo=v(()=>e.uiConfig.controls.seekStepMobile/1e3);sp(sn,{side:"right",get seekStep(){return n(zo)},handleSingleFirstClick:_n,handleSecondClick:()=>nr("forward")})};R(rn,sn=>{n(or)&&sn(cr)})}b(Ye,qt)};R(Mi,Ye=>{e.canRewindLive&&Xi&&!_e().has("TIMELINE")&&Ye(bn)})}var yo=L(Mi,2);{var Un=Ye=>{let qt=v(()=>{var Ii;return(Ii=e.live)==null?void 0:Ii.startTime});gc(Ye,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(qt)},onUpcomingLiveViewStateChanged:Io})};R(yo,Ye=>{r()==="LiveWaitingStart"&&Ye(Un)})}var vi=L(yo,2);{var Ur=Ye=>{ja(Ye,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(vi,Ye=>{r()==="LiveWaitingRecover"&&Ye(Ur)})}var ar=L(vi,2);{var os=Ye=>{ja(Ye,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(ar,Ye=>{r()==="LiveWaitingRecord"&&Ye(os)})}var ns=L(ar,2);{var zr=Ye=>{var qt=wT();let Ii;var Uo=C(qt);Nd(Uo,{get adsSlotId(){return Be()},get adsParams(){return it()},get adsAutoplayParam(){return U()},get duration(){return Ae()},get adsExternalApi(){return e.adsExternalApi}}),w(qt),D(rn=>Ii=se(qt,1,"ads-container s-7",null,Ii,rn),[()=>({hidden:r()!=="ads"})]),b(Ye,qt)};R(ns,Ye=>{e.showAds&&st()&&Ye(zr)})}var Po=L(ns,2);{var nn=Ye=>{let qt=v(()=>!St()&&e.showAutoplayNext&&S());Sv(Ye,{get title(){return ke()},get thumb(){return Fe()},get isHide(){return n(qt)},clickCloseIcon:()=>O(Or,!0)})};R(Po,Ye=>{n(so)&&ke()&&Fe()&&Ye(nn)})}var co=L(Po,2);{var Tr=Ye=>{mc(Ye,{})};R(co,Ye=>{xe()&&Ye(Tr)})}var Fo=L(co,2);{var rs=Ye=>{var qt=ST(),Ii=C(qt);Md(Ii,{}),w(qt),b(Ye,qt)};R(Fo,Ye=>{J()&&Ye(rs)})}var qe=L(Fo,2);{var Lt=Ye=>{vc(Ye,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()}})};R(qe,Ye=>{j()&&Ye(Lt)})}var bi=L(qe,2);{var ko=Ye=>{Qa(Ye,{get shifted(){return y()},get captions(){return k()},get position(){return A()},get playerSize(){return P()},isMobile:!0})};R(bi,Ye=>{pe().value!=="off"&&Ye(ko)})}var Ao=L(bi,2);{var Ho=Ye=>{var qt=CT();qt.__click=[yT,z,Ge,on];var Ii=C(qt);Ga(Ii,{}),w(qt),b(Ye,qt)};R(Ao,Ye=>{d()&&Ye(Ho)})}var uo=L(Ao,2);{var eo=Ye=>{let qt=v(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ii=v(()=>r()==="ads"),Uo=v(()=>e.canRewindLive&&We()!==0);pc(Ye,{get bottomHidden(){return n(qt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(Ii)},get canRewindLive(){return n(Uo)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Pe()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ue()},get nextButtonActive(){return Ze()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Dt()},get customFullscreenSupported(){return n(xr)},get endScreenShown(){return n(so)},toggleFullscreen:Cr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Bo,onDisabledSeekToInteractiveClick:To,get playerControlsWrapperRef(){return n(ro)},set playerControlsWrapperRef(rn){O(ro,rn,!0)},get playerControlsRef(){return n(ki)},set playerControlsRef(rn){O(ki,rn,!0)}})};R(uo,Ye=>{st()&&Ye(eo)})}var $n=L(uo,2);{var yn=Ye=>{var qt=TT(),Ii=C(qt);bc(Ii,{get supportLink(){return e.supportLink},get returnFocus(){return $T},get ref(){return n(Jo)},set ref(Uo){O(Jo,Uo,!0)}}),w(qt),b(Ye,qt)};R($n,Ye=>{z()&&Ye(yn)})}var po=L($n,2);let Lo=v(()=>!n(wr));Bd(po,{get isLive(){return Te()},get isHidden(){return n(Lo)},get isPlaying(){return X()},get position(){return A()},get duration(){return W()}});var zn=L(po,2);{var lr=Ye=>{Ba(Ye,{})};R(zn,Ye=>{n(er)&&Ye(lr)})}var dr=L(zn,2);{var Wn=Ye=>{Wd(Ye,{})};R(dr,Ye=>{ie()&&Ye(Wn)})}var ys=L(dr,2);{var ss=Ye=>{$c(Ye,{onClose:tr,onSelectAutoQuality:()=>{Rr("auto"),tr()}})};R(ys,Ye=>{n(is)&&Ye(ss)})}b(yt,Tt)});var Hn=L(Fr,2);je(Hn,yt=>O(Nr,yt),()=>n(Nr)),w(Ui),je(Ui,yt=>O($o,yt),()=>n($o)),D(()=>Ve(Ui,"aria-label",rr)),gt("click",Ui,Dn,!0),gt("focusin",Ui,Bn,!0),b(t,Ui),F(),o()}tt(["click"]);function lp(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 kT}from"@vkontakte/videoplayer-shared/es2015";var AT=M('<div class="time-container s-8"><!></div>'),LT=M('<div class="player-wrapper s-8" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),MT={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%}.timeline.s-8{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-8{opacity:1}.time-container.s-8{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Tv(t,e){B(e,!0),Q(t,MT);let[i,o]=Re(),r=()=>x(Z,"$scrubbingInProgress",i),a=()=>x(j,"$playerSize",i),l=()=>x(A,"$isPlaying$",i),d=()=>x(P,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(T,"$playerPhase",i),m=()=>x(N,"$crashed$",i),f=()=>x(W,"$currentSubtitle$",i),p=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),_=()=>x(ae,"$isRewindableLive$",i),S=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:N,duration$:P,positionExact$:E,isPlaying$:A,currentSubtitle$:W,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:ae},ui:{playerSize:j,controls:ne,scrubbingInProgress:Z},actions:{internal:{getVideoElement:we}}}=ve(),ue=8,re=q(!1),_e=ci({}),xe=q(!1),J=v(()=>!r()&&!n(xe)),Ne=()=>{O(re,!0)},pe=()=>{O(re,!1)},k=kT(ql,260);Oe(()=>{a(),k(we(),ne,_e,n(re))});let We=v(()=>l()?Xo(d()-s()):Xo(isFinite(d())?d():S()));var Te=LT(),X=C(Te);Ja(X,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(ke){I(ke)}});var ie=L(X,2);ka(ie,()=>"slot",!1,(ke,Fe)=>{io(ke,()=>({name:Za}))});var De=L(ie,2);let Be=v(()=>u()!=="thumb"||m());Ya(De,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=L(De,2);{var U=ke=>{Qa(ke,{shifted:!1,get captions(){return p()},get position(){return $()},get playerSize(){return a()}})};R(it,ke=>{f().value!=="off"&&n(J)&&ke(U)})}var Ae=L(it,2);{var Pe=ke=>{var Fe=AT(),Dt=C(Fe);Dd(Dt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(We)}}),w(Fe),b(ke,Fe)};R(Ae,ke=>{n(J)&&ke(Pe)})}var Ue=L(Ae,2);let Ze;var ye=C(Ue);Ka(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return _()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ue,tooltipRightOffset:ue,get ref(){return _e.timeline},set ref(ke){_e.timeline=ke}}),w(Ue),w(Te),D(ke=>Ze=se(Ue,1,"timeline s-8",null,Ze,ke),[()=>({visible:n(re)})]),gt("mouseenter",Te,Ne),gt("mouseleave",Te,pe),gt("mouseenter",Ue,()=>O(xe,!0)),gt("mouseleave",Ue,()=>O(xe,!1)),b(t,Te),F(),o()}var DT=M("<div><!></div>"),BT={hash:"s-3",code:'.vk-vp-root.s-3{--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-3{overflow:visible}.vk-vp-root.s-3 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-3 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-3 p{margin:0}.vk-vp-root.s-3 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-3 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-3 :focus,.vk-vp-root.s-3 :focus-visible{outline:none}.vk-vp-root.s-3 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-3 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-3 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-3 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-3 .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-3 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-3 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Ev(t,e){B(e,!0),Q(t,BT);let[i,o]=Re(),r=()=>x(st,"$isLive$",i),a=()=>x(Et,"$availableSubtitlesList$",i),l=()=>x(Ke,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),m=g(e,"videoConfig",7),f=g(e,"uiConfig",7),p=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),_=g(e,"interactiveController",7),S=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),N=g(e,"preload",7),P=g(e,"autoplay",7),E=g(e,"volume",7,void 0),A=g(e,"muted",7,void 0),W=g(e,"fromTime",7),H=g(e,"canRewindLive",7),z=g(e,"showAds",7),Y=g(e,"adsSlotId",7,void 0),ae=g(e,"adsParams",7,void 0),j=g(e,"adsAutoplayParam",7,void 0),ne=g(e,"duration",7,void 0),Z=g(e,"logoClickable",7),we=g(e,"logoHidden",7),ue=g(e,"isMobile",7),re=g(e,"showNextPrevButtons",7,!1),_e=g(e,"nextButtonActive",7,!1),xe=g(e,"prevButtonActive",7,!1),J=g(e,"endScreenVideoTitle",7,void 0),Ne=g(e,"endScreenVideoThumb",7,void 0),pe=g(e,"isOneVideoPlaylist",7,!1),k=g(e,"supportLink",7),We=g(e,"shadowRootContainer",7),Te=g(e,"outerContainerRef",7),X=g(e,"fullScreenTarget",7,void 0),ie=g(e,"failoverHosts",7,void 0),De=g(e,"showMiniTimer",7,!1),Be=g(e,"saveRate",7),it=g(e,"seekToInteractive",7,Ob),U=g(e,"playPrevChapter",7,Ob),Ae=g(e,"volumeMultiplier",7),Pe=g(e,"showAutoplayNext",7),Ue=g(e,"showEndScreen",7,!0),Ze=g(e,"keyboardControls",15,void 0),{subscribers:ye,stores:ke}=u();Lh(f());let Fe=Vt(),Dt=f().logoLink,pt=s().ui.debugPanelVisible,Bt=s().ui.playerSize,st=s().state.isLive$,ti=s().state.isInteractive&&Iv.device.isAndroid,Rt=q(void 0),$e=null,be=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}),Uh(s(),ke),Oe(()=>{var K,At;s().ui.isMobile.set(ue()),(At=(K=m().callbacks)==null?void 0:K.onDomReady)==null||At.call(K)});let ee=(K=!1)=>{O(be,!0),K?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},ot=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let K=u_(s().videoId);if(K)switch(K.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,K.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,K.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(K.quality);break}}else{p_(s().videoId),Ef()&&s().actions.internal.setTrafficSavingEnabled(!0);let At=Cf(s().videoId);At&&s().actions.internal.setQuality(At)}};function fe(K){var Yt,nt,Bi;let At=d()||K;At&&s().initVideo({container:n(Rt),sources:At,failoverHosts:ie(),subtitles:S(),subtitlesForcedLanguage:I(),volumeMultiplier:Ae()});let di=RT.get(Ed)==="true";pt.set(di),W()>0&&s().actions.external.seekTime(W());let lt=ue()?Fe.volumeDefault:(nt=(Yt=E())!=null?Yt:$u())!=null?nt:Fe.volumeDefault,wt=(Bi=A())!=null?Bi:r_();if(s().actions.external.setVolume(lt),s().actions.external.setMuted(wt),s().getAdmanWrapper().setInitialVolume(wt?0:lt),ot(),Fe.features.saveRate&&Be()){let Fi=l_();Fi&&!r()&&s().actions.internal.setPlaybackRate(Fi)}if(Pe()){let Fi=c_();Fi&&s().actions.internal.setAutoplayNextEnabled(Fi)}s().ui.isAutoplay.set(P()),P()&&ee(),N()&&Fe.features.preload&&s().actions.internal.preload()}let Me=K=>{if(window.ResizeObserver){let At,di;$e=new ResizeObserver(NT(lt=>{let wt=lt[0];if(wt.contentBoxSize){let Yt=Array.isArray(wt.contentBoxSize)?wt.contentBoxSize[0]:wt.contentBoxSize;At=Yt.inlineSize,di=Yt.blockSize}else wt.contentRect&&(At=wt.contentRect.width,di=wt.contentRect.height);Bt.set({width:At,height:di})},300)),$e.observe(K)}Bt.set({width:K.clientWidth,height:K.clientHeight})},$t=()=>{document.hidden&&s().actions.external.stop()};Mt(()=>{var di,lt,wt,Yt;ti&&document.addEventListener("visibilitychange",$t),Fe.debugLog&&s().actions.internal.startLogging(),Me(n(Rt));let K=ye.map(nt=>nt.init({store:s(),microStores:ke,config:m(),interactiveController:_(),uiConfig:f()})),At=()=>{ti&&document.removeEventListener("visibilitychange",$t),$e==null||$e.disconnect(),K.forEach(nt=>nt.unsubscribe()),s().destroy()};return((di=T())==null?void 0:di.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),At):((lt=T())==null?void 0:lt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),At):(((wt=T())==null?void 0:wt.status)==="finished"||((Yt=T())==null?void 0:Yt.status)==="postlive")&&!(d()&&VT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),At):(fe(),At)});function kt(){n(be)?s().actions.external.play():ee(!0)}function ct(){s().actions.external.pause()}function ce(K){s().actions.external.setMuted(K)}function ze(){s().actions.external.toggleSubtitle()}function Ge(K,At){s().actions.external.changeSubtitle(K,At)}function at(K){s().actions.external.changeAudioStream(K)}function Ft(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.hideControls()}function Ht(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.showControls()}function oi(K){ue()||K>=0&&K<=1&&s().actions.external.setVolume(K)}function yi(K){s().actions.internal.seekTime(K,OT.UNKNOWN)}function ji(K){s().actions.external.seekEpisodeStartTime(K)}function Nt(){s().actions.external.returnFocusToEpisodes()}function mi(K){s().actions.external.setPlaybackRate(K)}function hi(K){s().actions.external.setAutoQualityLimits(K)}function ht(){s().actions.external.setQuality("auto")}function Xt(K){s().actions.external.setTrafficSavingEnabled(K)}function Si(K){s().actions.external.setHighQualityEnabled(K)}let Xi=lp(Fe.view),Jt=m().playerView==="preview",Et=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let K=!1;Oe(()=>{var At;if(!K&&a().length){K=!0;let di;if(Fe.features.userVideoPrefs&&s().videoId){let wt=Su(Fe.userSalt,String(s().videoId));wt!=null&&wt.subtitleTrackId&&(di=a().find(Yt=>Yt.value===wt.subtitleTrackId))}let lt=(At=I())!=null?At:kf();lt&&(di=a().find(wt=>wt.language===lt)),s().actions.internal.setSubtitle(di)}})}let Ke=s().ui.isPreviewTrackHorizontallyAligned;var Ci=DT();let bo;var So=C(Ci);{var gn=K=>{Cv(K,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return P()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ae()},get adsAutoplayParam(){return j()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return k()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return X()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:ee,seekTime:yi,get showEndScreen(){return Ue()},get showAutoplayNext(){return Pe()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Rt)},set videoContainer(At){O(Rt,At,!0)}})},Ct=K=>{var At=Le(),di=de(At);{var lt=Yt=>{Tv(Yt,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return H()},get videoContainer(){return n(Rt)},set videoContainer(nt){O(Rt,nt,!0)}})},wt=Yt=>{wv(Yt,{get store(){return s()},get uiConfig(){return Fe},get title(){return p()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return P()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return ae()},get adsAutoplayParam(){return j()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return k()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return X()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:ee,get showEndScreen(){return Ue()},get showAutoplayNext(){return Pe()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Rt)},set videoContainer(nt){O(Rt,nt,!0)},get keyboardControls(){return Ze()},set keyboardControls(nt){Ze(nt)}})};R(di,Yt=>{Jt?Yt(lt):Yt(wt,!1)})}b(K,At)};R(So,K=>{ue()?K(gn):K(Ct,!1)})}w(Ci),D(K=>{bo=se(Ci,1,"vk-vp-root s-3",null,bo,K),Qe(Ci,Xi)},[()=>({"root--miui-browser":Iv.device.isMobile&&Iv.browser.isMiuiBrowser,"visible-outside":Jt,"preview-track-horizontally-alinged":l()})]),b(t,Ci);var Ut=F({initVideo:fe,play:kt,pause:ct,setMuted:ce,toggleSubtitle:ze,changeSubtitle:Ge,changeAudioStream:at,hideControls:Ft,showControls:Ht,setVolume:oi,seekTime:yi,seekEpisodeStartTime:ji,returnFocusToEpisodes:Nt,setPlaybackRate:mi,setAutoQualityLimits:hi,setAutoQuality:ht,toggleTrafficSaving:Xt,toggleHighQuality:Si,get sources(){return d()},set sources(K){d(K)},get store(){return s()},set store(K){s(K)},get microStoresRoot(){return u()},set microStoresRoot(K){u(K)},get videoConfig(){return m()},set videoConfig(K){m(K)},get uiConfig(){return f()},set uiConfig(K){f(K)},get title(){return p()},set title(K){p(K)},get thumbUrl(){return $()},set thumbUrl(K){$(K)},get interactiveContainer(){return y()},set interactiveContainer(K){y(K)},get interactiveController(){return _()},set interactiveController(K){_(K)},get subtitles(){return S()},set subtitles(K){S(K)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(K){I(K)},get live(){return T()},set live(K){T(K)},get preload(){return N()},set preload(K){N(K)},get autoplay(){return P()},set autoplay(K){P(K)},get volume(){return E()},set volume(K){E(K)},get muted(){return A()},set muted(K){A(K)},get fromTime(){return W()},set fromTime(K){W(K)},get canRewindLive(){return H()},set canRewindLive(K){H(K)},get showAds(){return z()},set showAds(K){z(K)},get adsSlotId(){return Y()},set adsSlotId(K){Y(K)},get adsParams(){return ae()},set adsParams(K){ae(K)},get adsAutoplayParam(){return j()},set adsAutoplayParam(K){j(K)},get duration(){return ne()},set duration(K){ne(K)},get logoClickable(){return Z()},set logoClickable(K){Z(K)},get logoHidden(){return we()},set logoHidden(K){we(K)},get isMobile(){return ue()},set isMobile(K){ue(K)},get showNextPrevButtons(){return re()},set showNextPrevButtons(K){re(K)},get nextButtonActive(){return _e()},set nextButtonActive(K){_e(K)},get prevButtonActive(){return xe()},set prevButtonActive(K){xe(K)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(K){J(K)},get endScreenVideoThumb(){return Ne()},set endScreenVideoThumb(K){Ne(K)},get isOneVideoPlaylist(){return pe()},set isOneVideoPlaylist(K){pe(K)},get supportLink(){return k()},set supportLink(K){k(K)},get shadowRootContainer(){return We()},set shadowRootContainer(K){We(K)},get outerContainerRef(){return Te()},set outerContainerRef(K){Te(K)},get fullScreenTarget(){return X()},set fullScreenTarget(K){X(K)},get failoverHosts(){return ie()},set failoverHosts(K){ie(K)},get showMiniTimer(){return De()},set showMiniTimer(K){De(K)},get saveRate(){return Be()},set saveRate(K){Be(K)},get showAutoplayNext(){return Pe()},set showAutoplayNext(K){Pe(K)},get seekToInteractive(){return it()},set seekToInteractive(K){it(K)},get playPrevChapter(){return U()},set playPrevChapter(K){U(K)},get volumeMultiplier(){return Ae()},set volumeMultiplier(K){Ae(K)},get showEndScreen(){return Ue()},set showEndScreen(K){Ue(K)},get keyboardControls(){return Ze()},set keyboardControls(K){Ze(K)}});return o(),Ut}var FT=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 Pv(t,e){let i=g(e,"isWhite",3,!1),o=v(()=>i()?"#fff":"#909499");Xe(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=FT();ui(9),b(r,l)},$$slots:{default:!0}})}var HT=M('<div class="title s-0"> </div>'),UT=M('<div class="playerStub s-0"><!> <!></div>'),zT={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 kv(t,e){Q(t,zT);var i=UT(),o=C(i);{var r=d=>{var s=HT(),u=C(s,!0);w(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=L(o,2);{var l=d=>{let s=v(()=>!!e.thumbUrl);Pv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}w(i),D(()=>Qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var WT=M('<div class="playerError s-1"><!></div>'),KT={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 Av(t){Q(t,KT);var e=WT(),i=C(e);Ga(i,{}),w(e),b(t,e)}import{now as wI,ValueSubject as SI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as CI,InterfaceLanguage as TI,isNonNullable as Dv,Logger as II,Observable as EI,Subscription as qb,once as PI,InternalsExposure as kI,skip as AI,getPlayerId as LI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Qb,isMobile as MI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as VI,ThinOneStat as RI,MediascopePixel as NI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as qT,Subscription as QT}from"@vkontakte/videoplayer-shared/es2015";var dp=class{constructor(){this.subscription=new QT,this.logger=new qT,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 Vv,detectEmbed as JT}from"@vkontakte/videoplayer-shared/es2015";var GT=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),YT=M('<div><div><!></div> <span class="title s-6"> </span></div>'),jT={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 Lv(t,e){B(e,!0),Q(t,jT);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(m,"$isMobile$",i),l=ve(),d=Vt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,m=l.ui.isMobile,f=l.ui.t,p=v(()=>r()&&f("pip_dummy_title")),$=lp(d.view);var y=YT();let _;var S=C(y);let I;var T=C(S);Xe(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,A)=>{var W=GT();ui(),b(E,W)},$$slots:{default:!0}}),w(S);var N=L(S,2),P=C(N,!0);w(N),w(y),D((E,A)=>{_=se(y,1,"player-pip-dummy s-6",null,_,E),Qe(y,$),I=se(S,1,"dummy-image s-6",null,I,A),me(P,n(p))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var XT=Object.defineProperty,ZT=(t,e,i)=>e in t?XT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,jl=(t,e,i)=>ZT(t,typeof e!="symbol"?e+"":e,i),Mv=(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())}),eI=460,tI=280,wc=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 Vv(!1),isEnabled$:new Vv(!1),type:1}),this.info.isEnabled$=new Vv(e)}isSupported(){let{isEmbed:e}=JT();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 Mv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:eI,height:tI,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=Yr(Lv,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||(Pa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Mv(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return Mv(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 Db(t){return t instanceof wc}var cp=class{static getLatestSupportedVersion(e){let i=new Va(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 Bb="Inner error. Unexpectedly root annotation container null reference exception",Fb="Annotation with such name already exists",Hb="Annotation with such name does not exist";var Xl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as iI,Subscription as oI,throttleFn as nI}from"@vkontakte/videoplayer-shared/es2015";var rI="1",sI=100,up=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new oI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=nI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},sI);this.subscriptions.add(iI(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(Bb);if(this.annotations.has(e))throw new Xl(Fb);i.style.zIndex=(o=i.style.zIndex)!=null?o:rI,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(Hb);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 pp,Subscription as aI}from"@vkontakte/videoplayer-shared/es2015";var vn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return pp(e),pp(i),pp(r),r.interactiveData&&pp(o),this.subscription=new aI,this.subscription}};var Cc=class extends vn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Gt(Ie({},le(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 vn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Gt(Ie({},le(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,f=ge(m),p=()=>f&&ge(u);return o.add(u.subscribe($=>{if(!f)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||p())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(p()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Ic=class extends vn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=le("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 lI}from"@vkontakte/videoplayer-shared/es2015";var Rv=le(!1),fp=null,Ec=class extends vn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Gt(Ie({},Rv),{set:(i,o=!1)=>{i!==ge(Rv)&&(this.clearTimeout(),Rv.set(i),!i&&fp&&(fp=!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(f=>{ge(l)&&f&&this.state$.set(!1)}));let m=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(lI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:f,isInteractiveTime$:p,interactiveTimeIndicator:$})=>{var y,_;if(!(!f||!($!=null&&$.isDisplayed))){if(!p)return this.state$.set(!1);m.tooltipHelpHintActive&&fp===null&&(fp=!0,m.tooltipHelpHintActive=!1,this.state$.set(!0),(_=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||_.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as dI,noop as cI}from"@vkontakte/videoplayer-shared/es2015";var Pc=class extends vn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Gt(Ie({},le(null)),{toggle:cI});this.checkIfShouldHide=i=>Ls(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(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:m}=r.state,{disabledControls$:f}=r.ui.controls,p=ge(u),$=ge(m);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),f.remove(hf),!p&&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),f.add(hf),!p&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(dI({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(p){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Ub}from"@vkontakte/videoplayer-shared/es2015";var kc=class extends vn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:le(!1),isEnabled$:le(!1),type$:le(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 Ub(!1),isEnabled$:new Ub(!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 fI,filterChanged as mI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Nv}from"@vkontakte/videoplayer-shared/es2015";var zb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?uI({maxCount:t}):void 0,e!==0?pI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},uI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Nv.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}}},pI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Nv.get(e)||"{}")}catch(a){return{}}},o=a=>Nv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Gt(Ie({},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 vn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:le({}),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=zb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(mI(),fI(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 Wb=()=>[Cc,Tc,Ic,Ec,Pc,kc,Ac].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Gt(Ie({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Lc}from"@vkontakte/videoplayer-shared/es2015";var mp=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 vp=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 mp(()=>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 vI=M('<div class="root s-2"><!></div>'),gI={hash:"s-2",code:".root.s-2{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Ov(t,e){B(e,!0),Q(t,gI);let i=null,o=q(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=de(a);{var d=s=>{var u=Le(),m=de(u);Is(m,()=>n(o),f=>{var p=vI(),$=C(p);let y=v(()=>n(o)==="prev");yc($,{get duration(){return e.animationDuration},get Icon(){return la},get reversed(){return n(y)}}),w(p),b(f,p)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var hI=Object.defineProperty,_I=Object.defineProperties,bI=Object.getOwnPropertyDescriptors,Kb=Object.getOwnPropertySymbols,$I=Object.prototype.hasOwnProperty,yI=Object.prototype.propertyIsEnumerable,Fv=(t,e,i)=>e in t?hI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ds=(t,e)=>{for(var i in e||(e={}))$I.call(e,i)&&Fv(t,i,e[i]);if(Kb)for(var i of Kb(e))yI.call(e,i)&&Fv(t,i,e[i]);return t},xI=(t,e)=>_I(t,bI(e)),Zt=(t,e,i)=>Fv(t,typeof e!="symbol"?e+"":e,i),gp=(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())}),OI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:TI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:MI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Jn=q(void 0),Bv=ci({animationDuration:0,playbackStatusShow:!1}),hp=class extends HTMLElement{constructor(){super(),Zt(this,"svelteStubComponent"),Zt(this,"svelteRootComponent"),Zt(this,"sveltePersistentLayerComponent"),Zt(this,"svelteErrorComponent"),Zt(this,"store"),Zt(this,"microStoresRoot"),Zt(this,"statistics"),Zt(this,"sentry"),Zt(this,"_shadowRoot"),Zt(this,"playerContainer"),Zt(this,"rootContainer"),Zt(this,"stateContainer"),Zt(this,"shadowRootContainer"),Zt(this,"playerId"),Zt(this,"uiConfig"),Zt(this,"coreConfig"),Zt(this,"statisticsConfig"),Zt(this,"interactiveController"),Zt(this,"interactiveContainer"),Zt(this,"graphMadePause"),Zt(this,"currentPlayingVideoIndex",0),Zt(this,"needToRepeatPlaylist",!1),Zt(this,"videoConfig"),Zt(this,"pictureInPictureApi"),Zt(this,"mediaSessionApi"),Zt(this,"unsubscribePlayerPhaseSubscription"),Zt(this,"logger"),Zt(this,"log"),Zt(this,"subscription"),Zt(this,"interactiveSubscription"),Zt(this,"annotationsApi"),Zt(this,"slotsApi"),Zt(this,"focusManager"),Zt(this,"prevIsid"),Zt(this,"isInited",!1),Zt(this,"postponedInitParams",null),Zt(this,"internalsExposure",null),Zt(this,"shadowDOMCallbacksDisabled",!1),Zt(this,"fatalError$",new SI(null)),Zt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:m,statVKAppId:f,refreshStatAuthToken:p,autoplay:$,isMobile:y,isTouch:_,refDomain:S,deviceId:I,interactiveData:T}=Sc(this.videoConfig,i),N=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,P=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;P&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:A=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new VI(Ds({movieId:E,albumId:d,place:s,trackCode:m,vkAppId:f,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:_!=null?_:y,clip:A,refDomain:S,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||P)&&{projectId:Number(N)}),Ds({refreshAuthToken:p,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(H){console.error(H),this.log({message:H.message})}}),Lc.create("ui"),this.logger=new II,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new qb,this.interactiveSubscription=new qb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Yr(Av,{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=Yr(kv,l),this.sveltePersistentLayerComponent=Yr(Ov,{target:this.playerContainer,props:Bv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Bv.animationDuration=e,Bv.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 RI.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,f,p,$;if(!this.videoConfig)return;let{albumId:y,statPlace:_,statAuthToken:S,preload:I,autoplay:T,volume:N,muted:P,fromTime:E,canRewindLive:A,supportLink:W,showAds:H,adsSlotId:z,adsParams:Y={},adsAutoplayParam:ae,interfaceLanguage:j,isCyrillicRelatedInterface:ne,logoClickable:Z,logoHidden:we,isMobile:ue,isTouch:re,isAudioDisabled:_e,isLiveCatchUpMode:xe,fullScreenTarget:J,failoverHosts:Ne,canDownload:pe,callbacks:k,interactiveData:We,showThumbTimer:Te,additionalButtons:X=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Be,loop:it,saveRate:U,volumeMultiplier:Ae,showEndScreen:Pe,showAutoplayNext:Ue,mediascopePixels:Ze}=Sc(this.videoConfig,i),{sources:ye,title:ke,thumbUrl:Fe,unitedVideoId:Dt,isClip:pt=!1,duration:Bt,adsParams:st={},videoEpisodes:St,previewThumbsData:ti,subtitles:Rt,subtitlesForcedLanguage:$e,live:be,adsExternalApi:ee}=e;if(!ye&&!be){let mi=new Error("empty sources and live");this.fatalError$.next(mi),(r=k.onCrashed)==null||r.call(k,mi.message);return}let ot=Ds(Ds({},Y),st),fe=this.getNextVideoInfo(),Me={sources:ye,title:ke,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:$e,unitedVideoId:Dt,isClip:pt,live:be,albumId:y,statPlace:_,autoplay:T,muted:P,volume:N,fromTime:E,canRewindLive:A,showAds:H,adsSlotId:z,adsParams:ot,adsAutoplayParam:ae,duration:Bt,logoClickable:Z,logoHidden:we,isTouch:re!=null?re:ue,repeat:Be,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},$t={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Me)}`});let kt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ct=(kt==null?void 0:kt.oneStat)||this.createOneStat(e,i),ce=this.createThinOneStat(e,i),ze;Ze&&(ze=new NI({pixels:Ze})),(ct||ce)&&(this.statistics=new Gu(ct,ce,ze,kt==null?void 0:kt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Ma(this.uiConfig.sentry,{version:Ml,env:hu},{movieId:Dt,albumId:y,place:_,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:re!=null?re:ue,clip:pt}),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=Ds(Ds({},this.sentry),Ma.getInstance());let at=!!We,Ft=[],Ht="tooltip_interactive_go_back_disabled_first";if(at&&this.interactiveController){let mi=this.interactiveController.state.isInitialChapter$.getValue(),hi=this.interactiveController.getHistoryState();mi&&Ft.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ft.push("SEEK_TO_INTERACTIVE_BUTTON"),hi.hasPrevChapter$.getValue()||(Ft.push("PLAY_PREV_CHAPTER_BUTTON"),mi||(hi.isGoBackLimited$.getValue()?Ht="tooltip_interactive_go_back_disabled_limit":Ht="tooltip_interactive_go_back_disabled"))}let oi=()=>{var mi;this.isInited=!1,this.prevIsid=void 0;let hi=(o==null?void 0:o.info.isEnded$.getValue())&&((mi=this.interactiveController)==null?void 0:mi.state.isEndChapter$.getValue());k.onReplayInteractiveVideo&&!hi?k.onReplayInteractiveVideo():this.replayInteractiveVideo()},yi=Be&&this.videoConfig.videos.length===1;this.store=tb({player:o,interfaceLanguage:j,isCyrillicRelatedInterface:ne,videoId:Dt,isClip:pt,isLiveCatchUpMode:xe,isAudioDisabled:_e,statAuthToken:S,callbacks:k,webApi:$t,videoEpisodes:St,previewThumbsData:ti,canDownload:pe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ft,isInteractive:at,saveRate:U,interactiveRanges$:(m=this.interactiveController)==null?void 0:m.state.interactiveRanges$,isInteractiveTime$:(f=this.interactiveController)==null?void 0:f.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:oi,playPrevChapterDisabledTooltip:Ht,hasInteractiveBranches:!!(($=(p=this.interactiveController)==null?void 0:p.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?X:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:mi=>{var hi;return(hi=this.sveltePersistentLayerComponent)==null?void 0:hi.startVideoChangedAnimation(mi)},looped:this.uiConfig.features.useLoopSetting?it:yi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:ji}=this.microStoresRoot=Wb(),Nt=()=>{var mi,hi,ht,Xt,Si,Xi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onCurrentFormatChanged)==null?void 0:Ke.call(k,Et)})),this.subscription.add(ji.interactiveControlsOpacity$.subscribe(Et=>{var Ke;Et!==null&&((Ke=this==null?void 0:this.interactiveController)==null||Ke.setDisabledControls(Et))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onThroughputEstimationChanged)==null?void 0:Ke.call(k,Et)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onTrafficSavingEnabledChanged)==null?void 0:Ke.call(k,Et)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onHighQualityEnabledChanged)==null?void 0:Ke.call(k,Et)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onAutoQualityEnabledChanged)==null?void 0:Ke.call(k,!!Et)})),this.subscription.add(new EI(Et=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ke=>Et.next(Ke)))}).pipe(AI(1)).subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onCurrentPlaybackRateChanged)==null?void 0:Ke.call(k,Et)})),this.subscription.add(this.store.state.volume$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onVolumeChange)==null?void 0:Ke.call(k,Et)})),this.subscription.add(this.store.state.muted$.subscribe(Et=>{var Ke,Ci,bo,So;if(Et)(Ke=k==null?void 0:k.onMute)==null||Ke.call(k);else{let gn=(bo=((Ci=this.store)==null?void 0:Ci.state.volume$)&&ge(this.store.state.volume$))!=null?bo:0;(So=k==null?void 0:k.onUnmute)==null||So.call(k,gn)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onVideoBitrateChanged)==null?void 0:Ke.call(k,Et)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Et=>{var Ke;let Ci=(Ke=this.store)==null?void 0:Ke.ui.controls.disabledControls$;Ci&&(Et&&!Ci.includes(Pd)&&Ci.add(Pd),Et||Ci.remove(Pd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(Et=>gp(this,null,function*(){var Ke;if(!Qb.browser.isSamsungBrowser||!Et||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((Ke=this.videoConfig)==null?void 0:Ke.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Et=>{var Ke;return(Ke=k==null?void 0:k.onVSIDChanged)==null?void 0:Ke.call(k,Et)})),this.initMediaSession(),O(Jn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:ke,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:$e,live:be,preload:I,autoplay:T,muted:P,volume:N,fromTime:E,canRewindLive:A,supportLink:W,showAds:H,adsSlotId:z,adsParams:ot,adsAutoplayParam:ae,duration:Bt,logoClickable:Z,logoHidden:we,isMobile:re!=null?re:ue,failoverHosts:Ne,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Ae,showEndScreen:Pe,showAutoplayNext:Ue,adsExternalApi:ee},!0);let Jt={target:this.playerContainer,props:n(Jn)};this.svelteRootComponent=Yr(Ev,Jt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ht=(hi=(mi=this.videoConfig)==null?void 0:mi.callbacks)==null?void 0:hi.onInited)==null||ht.call(hi)),(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=(Si=this.videoConfig)==null?void 0:Si.callbacks)!=null&&Xi.onDevNullLog)?Lc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Lc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Qb.isInited$.subscribe(mi=>{mi&&(console.log("UI SDK async start"),Nt())}):Nt()}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&&Dv(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 gp(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:m,initChapterId:f,historyApi:p,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:m,initChapterId:f,historyApi:p,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$:_}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(_.subscribe(I=>{if(!this.isInited)return;let T=this.store;I?T.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):T.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let S=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=xI(Ds({},I.config),{title:(m==null?void 0:m.title)||I.config.title});let T=S?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),S&&(S=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var N,P,E,A,W,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&T==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(kd)),I==="action-choice-canceled"){let Y=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(P=this.videoConfig)!=null&&P.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(A=this.videoConfig)==null?void 0:(W=A.callbacks).onDisabledInteractiveClick)==null||H.call(W)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:T})=>{this.store&&I==="container-fake-removed"&&T&&this.store.ui.controls.disabledControls$.remove(kd)})),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(T=>{var N,P,E;T.length&&((E=(P=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:P.onInteractiveHistoryChanged)==null||E.call(P,T))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var T,N,P;(P=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveChapterChanged)==null||P.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,N,P;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(P=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveTimeIndicatorClick)==null||P.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,f,p,$,y,_,S,I,T,N,P,E,A,W,H,z,Y,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let j=new Error("empty videos");this.fatalError$.next(j),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,j.message);return}else this.fatalError$.next(null);if(this.videoConfig=Sc(OI,CI(e,j=>j instanceof HTMLElement?j:void 0)),this.playerId=LI(e.playerId),this.uiConfig=Ah((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 kI("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:[wI()]}),Dv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(p=(f=this.uiConfig.features.mediaSession)!=null?f:this.videoConfig.isMediaSessionEnabled)!=null?p:!0),Dv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(S=(_=this.uiConfig.features.dpip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?S:!0),this.uiConfig.ads.paramsOverride=Ds({preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(T=this.uiConfig.isMobile)!=null?T:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(P=this.videoConfig).autoplay&&(P.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((W=this.uiConfig.showLogo)!=null?W:!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&&((Y=this.videoConfig.videos)!=null&&Y[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let j={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=cp.getLatestSupportedVersion(j):this.pictureInPictureApi=new Va(j)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new dp:void 0,this.slotsApi=this.uiConfig.features.slots?new rp:void 0,this.annotationsApi=this.uiConfig.features.annotations?new up(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new vp(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]),Db(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(Jn)&&(n(Jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Jn).nextButtonActive=this.isNextButtonActive(),n(Jn).prevButtonActive=this.isPrevButtonActive(),n(Jn).endScreenVideoTitle=o.nextVideoTitle,n(Jn).endScreenVideoThumb=o.nextVideoThumb,n(Jn).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}=Ds({},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(Jn)&&(n(Jn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Jn).nextButtonActive=this.isNextButtonActive(),n(Jn).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 gp(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 gp(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(PI()).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&&Pa(e)}};import{InterfaceLanguage as $ne,VKNumericLanguage as yne,loadVKLangPack as xne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Sne,VideoFormat as Cne}from"@vkontakte/videoplayer-core/es2015";var pne=()=>{window.customElements.define("vk-video-player",hp)};export{Yu as ControlButtonType,vs as GridTypes,$ne as InterfaceLanguage,Ud as MenuItemType,gs as PlayerPhase,Ml as VERSION,yne as VKNumericLanguage,Cne as VideoFormat,Sne as VideoQuality,xne as loadVKLangPack,pne 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`)),b(v,p)};R(d,v=>{e.type==="off"?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function lm(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:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return us.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");pa(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var F0=M('<span class="duration s-22" data-testid="video_duration"> </span>'),H0=M('<div><span class="current s-22" data-testid="current_time"> </span> <!></div>'),U0={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 Gd(t,e){B(e,!0),q(t,U0);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=Vt(),d=ae(!1),s=m(()=>en(e.duration)),u=m(()=>en(e.position));var v=H0();let p;var f=C(v),$=C(f,!0);S(f);var y=L(f,2);{var g=w=>{var T=F0(),I=C(T,!0);S(T),D(()=>me(I,n(s))),b(w,T)};R(y,w=>{r()&&w(g)})}S(v),As(v,()=>Vl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),je(v,w=>a(w),()=>a()),D(w=>{p=se(v,1,"time s-22",null,p,w),me($,n(u))},[()=>({mobile:i()})]),b(t,v),F()}import{noop as zu}from"@vkontakte/videoplayer-shared/es2015";var z0=Ce("<path></path>");function fa(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(p,f)=>f?"off":p>.5?"max":p>.2?"mid":p>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>un(e.size)),d="M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z",s="M44.92 16.52a1.8 1.8 90 012.56 2.56L42.54 24l4.94 4.92a1.8 1.8 90 11-2.56 2.56L40 26.54l-4.92 4.94a1.8 1.8 90 01-2.56-2.56L37.46 24l-4.94-4.92a1.8 1.8 90 112.56-2.56L40 21.46z",u="M31.5 17.8a1.8 1.8 90 012.54-.14A8.6 8.6 90 0136.8 24c0 2.52-1.06 4.8-2.76 6.34a1.8 1.8 90 11-2.4-2.68c.92-.84 1.56-2.16 1.56-3.66s-.64-2.8-1.58-3.66a1.8 1.8 90 01-.12-2.54",v="M37.62 13.34a1.8 1.8 90 012.54.2 16 16 90 010 20.9 1.8 1.8 90 01-2.74-2.32 12.4 12.4 90 000-16.24 1.8 1.8 90 01.2-2.54";Xe(t,{get width(){return"48"},get height(){return"48"},get style(){return n(l)},get testId(){var p;return`volume-${(p=n(a))!=null?p:""}-icon`},get shadow(){return e.shadow},children:(p,f)=>{var $=z0();D(()=>Ve($,"d",`M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z${n(a)==="off"?s:`${u}${n(a)==="max"?v:""}`}`)),b(p,$)},$$slots:{default:!0}}),F()}import{isNonNullable as q_,noop as Yn}from"@vkontakte/videoplayer-shared/es2015";import{noop as cm}from"@vkontakte/videoplayer-shared/es2015";import{noop as K0}from"@vkontakte/videoplayer-shared/es2015";var W0=M('<div class="overlay"><!></div>');function dm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=W(void 0),s=f=>{!f||!n(d)||!f.contains(n(d))||f.removeChild(n(d))},u=f=>{!f||!n(d)||f.contains(n(d))||f.appendChild(n(d))};Oe(()=>{u(r())}),Mt(()=>(u(r()),()=>s(r())));var v=W0(),p=C(v);ri(p,()=>{var f;return(f=e.children)!=null?f:gt}),S(v),je(v,f=>O(d,f),()=>n(d)),b(t,v),F(),o()}var q0=M('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),Q0=M("<div><!></div> <!>",1),G0={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 Wa(t,e){B(e,!0),q(t,G0);let[i,o]=Re(),r=()=>x(Y,"$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),v=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),f=h(e,"maxTooltipWidth",3,void 0),$=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,K0),g=5,w=W(void 0),T=W(void 0),I,N=W(0),k=W(0),E=W(0),A=W(0),Q=Vt(),H=ve(),z=H.ui.playerSize,Y=H.ui.overlayContainer$;Oe(()=>{Ct(()=>{y()(s())})});let le=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(T)||!n(w))return;O(k,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.width,ze=n(T).clientWidth,Je=a().width,ye=(ke-ze)/2,Pe=Ae.left+u()-U.left,Fe=Pe+ye,Dt=Ae.top+v()-U.top,ft=ze/2-g,Bt=Fe<8,at=Fe+ze>Je-8;Bt&&(Fe=8,ft=Pe+Ae.width/2-2.5*g),at&&(Fe=Je-8-ze,ft=Ae.left-U.left+Ae.width/2-Fe-g),O(E,Fe,!0),O(A,Dt),O(N,ft,!0)},re=()=>{!r()||!n(T)||!n(w)||O(k,-g)},Z=()=>{if(!r()||!n(T)||!n(w))return;O(N,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.height,ze=n(T).clientHeight,Je=(ke-ze)/2+ze,ye=Ae.left+u()-U.left-n(T).clientWidth,Pe=2,Fe=ye-g;Fe<8&&(Fe=8);let ft=Ae.top+v()-U.top+Je,Bt=Pe-Je/2,at=Pe-g;O(E,Fe,!0),O(A,ft),O(k,Bt),O(N,at)},we=()=>{!r()||!n(T)||!n(w)||O(N,-g)},ue=()=>{switch($()){case"top":X();break;case"bottom":re();break;case"left":Z();break;default:we()}},ne=()=>{try{if(!r()||!n(w))return;ue(),s(!0)}catch(U){le({message:String(U)})}},_e=()=>{s(!1)},xe=()=>{n(T)&&(I||(I=window.setTimeout(ne,Q.controls.hideTimeoutTooltips)),s()&&ne())},J=()=>{_e(),window.clearTimeout(I),I=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: ${f()===void 0?"auto":`${f()}px`};`,ze+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,ze},pe=(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},P=m(()=>Ne(n(E),n(A),s())),Ke=m(()=>pe(n(N),n(k)));Mt(ue),cn(()=>window.clearTimeout(I));var Te=Q0(),j=de(Te);let ie;j.__pointermove=xe,j.__pointerdown=J,j.__pointerup=function(...U){var Ae;(Ae=e.disableMouseupTooltipShow?void 0:xe)==null||Ae.apply(this,U)};var De=C(j);ri(De,()=>{var U;return(U=e.children)!=null?U:gt}),S(j),je(j,U=>O(w,U),()=>n(w));var Be=L(j,2);{var it=U=>{dm(U,{children:(Ae,ke)=>{var ze=q0(),Je=C(ze),ye=C(Je,!0);S(Je);var Pe=L(Je,2);S(ze),je(ze,Fe=>O(T,Fe),()=>n(T)),D(()=>{Qe(ze,n(P)),me(ye,d()),Qe(Pe,n(Ke))}),b(Ae,ze)},$$slots:{default:!0}})};R(Be,U=>{d()&&!l()&&U(it)})}D(U=>ie=se(j,1,"tooltip-wrapper s-1p",null,ie,U),[()=>({"full-width":p()})]),st("pointerenter",j,xe),st("pointerleave",j,J),b(t,Te),F(),o()}Ze(["pointermove","pointerdown","pointerup"]);var K_=t=>{t.stopPropagation()},Y0=M("<div><!></div>"),j0={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 Do(t,e){B(e,!0),q(t,j0);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=So(),s=l.ui.isMobile,u=d.graphIsOpened$,v=l.ui.t,p=h(e,"className",3,""),f=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),T=h(e,"tooltipContent",3,""),I=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),k=h(e,"disabledTooltipContent",19,()=>v("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),A=h(e,"onTooltipVisibilityChange",3,cm),Q=h(e,"initialTranslateXPx",3,0),H=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,cm),Y=h(e,"mouseLeave",3,cm),le=m(()=>f()?r()?v("tooltip_disabled_when_graph_on"):k():T()),X=W(!1);Oe(()=>{I()||O(X,!1)});var re=Y0();re.__pointerdown=[K_],re.__click=[K_];var Z=C(re);{var we=ne=>{Wa(ne,{get content(){return n(le)},get translateX(){return Q()},get translateY(){return H()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return A()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){O(X,_e,!0)},children:(_e,xe)=>{var J=Le(),Ne=de(J);ri(Ne,()=>{var pe;return(pe=e.children)!=null?pe:gt}),b(_e,J)},$$slots:{default:!0}})},ue=ne=>{var _e=Le(),xe=de(_e);ri(xe,()=>{var J;return(J=e.children)!=null?J:gt}),b(ne,_e)};R(Z,ne=>{$()&&n(le)&&!a()?ne(we):ne(ue,!1)})}S(re),je(re,ne=>y(ne),()=>y()),D(()=>{var ne;se(re,1,`btn-container ${(ne=p())!=null?ne:""}`,"s-1j"),Ve(re,"aria-hidden",E()||null)}),st("mouseenter",re,function(...ne){var _e;(_e=z())==null||_e.apply(this,ne)}),st("mouseleave",re,function(...ne){var _e;(_e=Y())==null||_e.apply(this,ne)}),Cn(re,"clientWidth",g),b(t,re),F(),o()}Ze(["pointerdown","click"]);var X0=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 Yd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));Xe(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=X0(),l=de(a),d=L(l);D(()=>{Ve(l,"fill",sa),Ve(l,"fill-opacity",e.completed?1:.24),Ve(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var Z0=M("<div><!></div>"),J0={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 um(t,e){B(e,!0),q(t,J0);let o=ve().ui.t,r=W(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Do(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=Z0();let u;var v=C(s);let p=m(()=>!!e.videoEpisode.completed);Yd(v,{get completed(){return n(p)}}),S(s),D(f=>{u=se(s,1,"interactive-episode-icon s-15",null,u,f),Qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Cn(s,"clientWidth",f=>O(r,f)),b(l,s)},$$slots:{default:!0}}),F()}var ex=M('<div><div class="video-episode-inner s-14"><div class="video-episode-loaded s-14"></div> <div></div></div></div>'),tx=M('<div class="video-episodes-wrap s-14"></div>'),ix={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 pm(t,e){q(t,ix);let i=h(e,"videoEpisodes",19,()=>[]);var o=tx();bi(o,21,i,r=>r.from,(r,a)=>{var l=ex();let d;var s=C(l),u=C(s),v=L(u,2);let p;S(s),S(l),D((f,$)=>{d=se(l,1,"video-episode s-14",null,d,f),Qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(v,1,"video-episode-filled s-14",null,p,$),Qe(v,`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 ox(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 nx(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 rx(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 sx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function ax(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var lx=M("<div></div>"),dx=M('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),cx=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),ux={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 Ka(t,e){B(e,!0),q(t,ux);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),v=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),f=h(e,"isInteractive",3,!1),$=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),g=h(e,"onPointerDown",3,Yn),w=h(e,"onHandleMove",3,Yn),T=h(e,"onPointerUp",3,Yn),I=h(e,"onPointerEnter",3,Yn),N=h(e,"onPointerMove",3,Yn),k=h(e,"onPointerLeave",3,Yn),E=h(e,"onMouseEnter",3,Yn),A=h(e,"onMouseLeave",3,Yn),Q=h(e,"onWheelUp",3,Yn),H=h(e,"onWheelDown",3,Yn),z=h(e,"onWheelLeft",3,Yn),Y=h(e,"onWheelRight",3,Yn),le=h(e,"onDisabledClick",3,Yn),X=h(e,"loadedProgress",3,0),re=h(e,"filledProgress",3,0),Z=h(e,"handleProgress",3,0),we=h(e,"ariaLabel",3,""),ue=h(e,"ariaValueMin",3,void 0),ne=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),xe=h(e,"ariaValueText",3,""),J=h(e,"onContextMenu",3,Yn),Ne=h(e,"handleAlwaysVisible",3,!1),pe=Vt(),P=W(void 0),Ke=W(!1),Te=m(()=>{var Me;return(Me=ne())!=null?Me:0}),j=m(()=>{var Me;return q_(v())&&((Me=v()[v().length-1])==null?void 0:Me.time)<n(Te)}),ie=m(()=>q_(v())&&v().length&&n(j)&&n(Te)?Je(X()*100,re()*100):[]);function De(Me){if(Me.preventDefault(),i()&&O(P,i().getBoundingClientRect(),!0),$())return;let yt=ke(Me.clientX,Me.clientY),Pt=ze(Me.clientX);I()(yt,Pt,n(P).width)}function Be(Me){Me.preventDefault(),!$()&&k()()}function it(){E()()}function U(){A()()}function Ae(Me){$()||p()&&(Me.preventDefault(),Me.deltaY<0?Q()():Me.deltaY>0?H()():Me.deltaX>0?Y()():z()())}function ke(Me,yt){return l()?Math.max(0,Math.min(1,(n(P).height-(yt-n(P).top))/n(P).height)):Math.min(Math.max(Me-n(P).x,0),n(P).width)/n(P).width}function ze(Me){return Math.min(Math.max(Me-n(P).x,0),n(P).width)}function Je(Me,yt){let Pt=pe.features.episodesClustering&&!f()?pe.episodeMinWidthPc:0,pt=[],ce=v()[0].time/n(Te)*100,We=0,Ge=0;for(let Ht=1;Ht<v().length;Ht++)We=v()[Ht].time/n(Te)*100,We-ce>Pt&&(pt.push({from:ce,width:Math.max(0,We-ce),loadedWidth:Math.max(0,Math.min(We,Me)-ce),filledWidth:Math.max(0,Math.min(We,yt)-ce),interactive:v()[Ht-1].interactive,completed:v()[Ht-1].completed}),ce=v()[Ht].time/n(Te)*100,Ge++);let lt={from:ce,width:Math.max(0,100-ce),loadedWidth:Math.max(0,Math.min(Me,100)-ce),filledWidth:Math.max(0,Math.min(yt,100)-ce),interactive:v()[Ge].interactive,completed:v()[Ge].completed};100-ce<Pt?(Ge-=1,pt[Ge].width+=100-ce,pt[Ge].loadedWidth+=Math.max(0,Math.min(Me,100)-ce),pt[Ge].filledWidth+=Math.max(0,Math.min(yt,100)-ce)):pt[Ge]=lt;let Ft=v()[0].time;if(Ft!==0){let Ht=Ft/n(Te)*100;pt.unshift({from:0,width:Ht,loadedWidth:Math.min(Ht,Me),filledWidth:Math.min(Ht,yt)})}return pt}function ye(Me){return Math.max(0,Math.min(100,Me*100))}let Pe=m(()=>ye(X())),Fe=m(()=>ye(re()));var Dt=cx(),ft=de(Dt);{var Bt=Me=>{var yt=lx();let Pt;bi(yt,21,()=>n(ie),pt=>pt.from,(pt,ce)=>{var We=Le(),Ge=de(We);{var lt=Ft=>{um(Ft,{get videoEpisode(){return n(ce)},get disabled(){return $()}})};R(Ge,Ft=>{n(ce).interactive&&Ft(lt)})}b(pt,We)}),S(yt),D(pt=>Pt=se(yt,1,"interactive-icons s-h",null,Pt,pt),[()=>({mobile:s(),hidden:s()&&!n(Ke)})]),b(Me,yt)};R(ft,Me=>{f()&&Me(Bt)})}var at=L(ft,2);let St;at.__pointerdown=[ox,i,P,$,Ke,ke,g],at.__pointermove=[nx,$,ke,ze,N,P,Ke,w],at.__pointerup=[rx,$,Ke,ke,T],at.__click=[sx,$,le,ke],at.__contextmenu=[ax,ke,$,le,Ke,J];var oi=C(at);{var Rt=Me=>{pm(Me,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},$e=Me=>{var yt=dx(),Pt=C(yt),pt=L(Pt,2);let ce;S(yt),D(We=>{Ve(Pt,"data-value",n(Pe)),Qe(Pt,`transform: translateX(${n(Pe)}%);`),ce=se(pt,1,"filled s-h",null,ce,We),Ve(pt,"data-value",n(Fe)),Qe(pt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(Me,yt)};R(oi,Me=>{n(ie).length?Me(Rt):Me($e,!1)})}var be=L(oi,2);let ee;var ot=C(be);let fe;S(be),S(at),je(at,Me=>i(Me),()=>i()),D((Me,yt,Pt,pt)=>{var ce,We;St=se(at,1,`slider ${(ce=o())!=null?ce:""}`,"s-h",St,Me),Ve(at,"aria-label",we()),Ve(at,"aria-valuemin",ue()),Ve(at,"aria-valuemax",ne()),Ve(at,"aria-valuenow",_e()),Ve(at,"aria-valuetext",xe()),Ve(at,"data-testid",(We=r())!=null?We:null),ee=se(be,1,"handleWrap s-h",null,ee,yt),Qe(be,Pt),fe=se(ot,1,"handle s-h",null,fe,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(Z())}%);`,()=>({"active-live":d()})]),st("pointerenter",at,De),st("pointerleave",at,Be),st("mouseenter",at,it),st("mouseleave",at,U),st("wheel",at,Ae),b(t,Dt),F()}Ze(["pointerdown","pointermove","pointerup","click","contextmenu"]);var no=(t,e)=>Ad[t]>=Ad[e];var Rs=(t,e)=>Ad[t]<=Ad[e],Q_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var fx=M("<div><!></div>"),mx=M("<div><!> <!></div>"),vx={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 fm(t,e){var ze,Je;B(e,!0),q(t,vx);let[i,o]=Re(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(f,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(De,"$controlsVisible",i),u=ve(),v=Vt(),p=u.state.volume$,f=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:g}=u.actions.internal,w=u.ui.currentGridType$,T=(ze=u.callbacks)==null?void 0:ze.onAudioDoesNotExistHint,I=(Je=u.callbacks)==null?void 0:Je.onAudioDisabledHint,N=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,E=u.ui.t,A=W(!1),Q,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),Y=m(()=>Rs(d(),"l")),le=m(()=>n(Y)?"":n(z)?!r()||k?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),re=m(()=>n(z)?0:l()),Z=!1,we=m(()=>e.isAds?!1:k?!I:r()?!1:!T);function ue(ye){y(),$(ye)}function ne(){Bu(u,l(),v.controls.volumeStepWheel)}function _e(){Fu(u,l(),v.controls.volumeStepWheel)}function xe(ye){$(ye)}function J(ye){$(ye),g()}function Ne(){Z=!0}function pe(){Z=!1,Te()}function P(){clearTimeout(Q),O(A,!0)}function Ke(){Te()}function Te(){Q=window.setTimeout(()=>{Z||O(A,!1)},v.controls.volumeBarTimeout)}function j(ye){ye.preventDefault(),ye.deltaY<0?ne():ye.deltaY>0&&_e()}let ie=W(!1),De=u.ui.controlsVisible;Oe(()=>{s()||O(ie,!1)});var Be=mx();let it;var U=C(Be);Wa(U,{get content(){return n(le)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,Pe)=>{let Fe=m(()=>n(Y)?"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 us.KeyM},role:"button",children:(Dt,ft)=>{fa(Dt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=L(U,2);{var ke=ye=>{var Pe=fx();let Fe;var Dt=C(Pe);let ft=m(()=>n(Y)?"volumeBar-slider-vertical":""),Bt=m(()=>n(Y)&&!n(A)),at=m(()=>n(Y)?Ne:zu),St=m(()=>n(Y)?pe:zu),oi=m(()=>Math.round(n(re)*100)),Rt=m(()=>`${Math.round(n(re)*100)}%`),$e=m(()=>n(Y)?"volume-slider-vertical":"volume-slider");Ka(Dt,{get className(){return n(ft)},get isHidden(){return n(Bt)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ne,onWheelDown:_e,onPointerDown:ue,onHandleMove:xe,onPointerUp:J,get onPointerEnter(){return n(at)},get onPointerLeave(){return n(St)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(oi)},get ariaValueText(){return n(Rt)},get filledProgress(){return n(re)},get handleProgress(){return n(re)},get testId(){return n($e)}}),S(Pe),D(be=>Fe=se(Pe,1,"volumeBar s-29",null,Fe,be),[()=>({"volumeBar-vertical":n(Y)})]),b(ye,Pe)};R(Ae,ye=>{n(H)&&ye(ke)})}S(Be),D(ye=>it=se(Be,1,"volumeBar-container s-29",null,it,ye),[()=>({vertical:n(Y)})]),st("mouseenter",Be,function(...ye){var Pe;(Pe=n(Y)?P:zu)==null||Pe.apply(this,ye)}),st("mouseleave",Be,function(...ye){var Pe;(Pe=n(Y)?Ke:zu)==null||Pe.apply(this,ye)}),st("wheel",Be,j),b(t,Be),F(),o()}import{noop as _x}from"@vkontakte/videoplayer-shared/es2015";var gx=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>'),hx=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 mm(t,e){let i=h(e,"isFullscreen",8,!1),o=yn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=de(l);{var s=v=>{var p=gx();b(v,p)},u=v=>{var p=hx();b(v,p)};R(d,v=>{i()?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}})}function jd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,_x),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 v=ca(u);a.set(v),o()()},get ariaKeyShortCut(){return us.KeyF},role:"button",children:(u,v)=>{mm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var bx=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 vm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=bx();oo(o,()=>Ie({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=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(),S(o),b(t,o)}var $x=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 gm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=$x();oo(o,()=>Ie({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=C(o);ri(r,()=>{var a;return(a=e.children)!=null?a:gt}),fi(6),S(o),b(t,o)}var yx={hash:"s-28",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 hm(t,e){B(e,!0),q(t,yx);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`);gm(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 Xd(t,e){B(e,!0);let[i,o]=Re(),r=()=>x($,"$isMobile",i),a=()=>x(f,"$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,""),v=Vt(),p=ve(),f=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,g=p.isCyrillicRelatedInterface$,w=m(()=>v.logoType!=="vk"),T=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),I=m(()=>(r()&&Rs(a(),"m")||Rs(a(),"l"))&&n(w)),N=()=>{var A,Q;e.click(),(A=p.callbacks)!=null&&A.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},k=m(()=>!s()),E=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");qt(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:N,get testId(){return n(E)},get ariaLabel(){return n(T)},get ref(){return d()},set ref(A){d(A)},children:(A,Q)=>{var H=Le(),z=de(H);{var Y=X=>{hm(X,{get logo(){return v.logoType},get short(){return n(I)},get isCyrillic(){return l()}})},le=X=>{vm(X,{})};R(z,X=>{n(w)?X(Y):X(le,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as Tx}from"@vkontakte/videoplayer-core/es2015";import{ChromecastState as Y_}from"@vkontakte/videoplayer-core/es2015";var xx=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-19"></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-19"></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-19"></path>',1),wx=Ce('<path d="M1 18v3h3c0-1.66-1.34-3-3-3z"></path><path d="M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"></path><path d="M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"></path><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" class="s-19"></path><path d="M5.667 7.44H18.5v9.167h-5.161a11.947 11.947 0 0 0-7.673-7.672V7.44Z"></path>',1),Sx={hash:"s-19",code:".animated.s-19{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-19{animation-name:s-19-wave1}.wave2.animated.s-19{animation-name:s-19-wave2}.wave3.animated.s-19{animation-name:s-19-wave3}@keyframes s-19-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-19-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-19-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Zd(t,e){B(e,!0),q(t,Sx);let i=h(e,"isMobile",3,!1),o=m(()=>e.iconState===Y_.CONNECTED),r=m(()=>e.iconState===Y_.CONNECTING),a=m(()=>n(o)?"#2688EB":sa),l=m(()=>e.size?un(e.size):void 0);var d=Le(),s=de(d);{var u=p=>{Xe(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(f,$)=>{var y=xx();fi(2),b(f,y)},$$slots:{default:!0}})},v=p=>{Xe(p,{get style(){return n(l)},testId:"chromecast-icon",children:(f,$)=>{var y=wx(),g=de(y);let w;var T=L(g);let I;var N=L(T);let k;var E=L(N,2);let A;D((Q,H,z,Y)=>{w=se(g,0,"wave1 s-19",null,w,Q),I=se(T,0,"wave2 s-19",null,I,H),k=se(N,0,"wave3 s-19",null,k,z),A=se(E,0,"s-19",null,A,Y)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:!n(o)})]),b(f,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(v,!1)})}b(t,d),F()}import{noop as Cx}from"@vkontakte/videoplayer-shared/es2015";function Jd(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Cx),l=ve().ui.t,d=m(()=>e.state===Tx.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)=>{Zd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as Ex}from"@vkontakte/videoplayer-shared/es2015";var Ix=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 _m(t){Xe(t,{testId:"episodes-icon",children:(e,i)=>{var o=Ix();fi(2),b(e,o)},$$slots:{default:!0}})}var Wu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var kx=M('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),Px=M('<span class="text s-23"> </span>'),Ax=M('<span class="text count s-23"> </span>'),Lx=M('<span class="icon s-23"><!></span> <!>',1),Mx={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 ec(t,e){var Z,we,ue;B(e,!0),q(t,Mx);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x(g,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(T,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),v=h(e,"timeCodes",19,()=>[]),p=ve(),f=(we=(Z=p.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?we:Ex,$=!!((ue=p.callbacks)!=null&&ue.onEpisodeClicked),y=p.ui.currentGridType$,g=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,T=p.ui.isMobile,I=p.ui.t,N=W(void 0),k=ne=>{var xe,J,Ne;if(!!((xe=p.callbacks)!=null&&xe.onEpisodeClicked)){let pe=ca(ne);g.set(pe),w.set(!0),(Ne=(J=p.callbacks)==null?void 0:J.onEpisodeClicked)==null||Ne.call(J,pe)}},E=W(null),A=m(()=>s()/u());Oe(()=>{var _e;let ne=Wu(n(A),u(),v());ne?((_e=n(E))==null?void 0:_e.time)!==ne.time&&(f(ne),O(E,ne,!0)):O(E,null)});let Q=m(()=>{var ne;return((ne=n(E))==null?void 0:ne.text)||""}),H=m(()=>no(r(),"xl")?"FULL":no(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${I("tooltip_episodes")}: ${n(Q)}`),Y=(ne,_e,xe)=>vt(null,null,function*(){yield _o(),(ne==null?void 0:ne.getAttribute("aria-expanded"))==="false"&&_e&&!xe&&Ct(()=>{g.set(!1),ne.focus()})});Oe(()=>{Y(n(N),a(),l())});var le=Le(),X=de(le);{var re=ne=>{let _e=m(()=>d()?"px-0":""),xe=m(()=>!$);qt(ne,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:k,get disabled(){return n(xe)},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 pe=Le(),P=de(pe);{var Ke=j=>{var ie=kx(),De=de(ie),Be=C(De,!0);S(De);var it=L(De,2),U=C(it);Nr(U,{direction:"right"}),S(it),D(()=>me(Be,n(Q))),b(j,ie)},Te=j=>{var ie=Lx(),De=de(ie),Be=C(De);_m(Be,{}),S(De);var it=L(De,2);{var U=ke=>{var ze=Px(),Je=C(ze,!0);S(ze),D(()=>me(Je,n(Q))),b(ke,ze)},Ae=(ke,ze)=>{{var Je=ye=>{var Pe=Ax(),Fe=C(Pe,!0);S(Pe),D(()=>me(Fe,v().length)),b(ye,Pe)};R(ke,ye=>{n(H)==="COUNT"&&ye(Je)},ze)}};R(it,ke=>{n(H)==="FULL"?ke(U):ke(Ae,!1)})}b(j,ie)};R(P,j=>{d()?j(Ke):j(Te,!1)})}b(J,pe)},$$slots:{default:!0}})};R(X,ne=>{n(E)&&ne(re)})}b(t,le),F(),o()}import{debounceFn as pb}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as Ux,PlaybackState as zl,Player as zx,PredefinedQualityLimits as vs,VideoFormat as ic,clientChecker as tb}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as _r,getHighestQuality as Wx,InterfaceLanguage as Kx,isInvariantQuality as qx,isNonNullable as Qx,loadVKLangPack as Gx,Logger as Yx,map as ib,merge as jx,Observable as Xu,Subject as oc,Subscription as Sm,TracerFactory as Xx,ValueSubject as Zx,VideoQuality as Jx,devNull as ew,now as tw,filter as iw,once as ow}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Os}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Vx,devNull as ai,isNonNullable as Rx,now as li}from"@vkontakte/videoplayer-shared/es2015";import{addScript as Nx,Subject as pn,clearVideoElement as Ox}from"@vkontakte/videoplayer-shared/es2015";var Dx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Ku=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=>(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[li()]}),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?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[li()]}),o())};Nx(Dx,e,this.loadTimeout).then(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[li()]}),window.AdmanHTML?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[li()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[li()]}),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?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[li()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[li()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[li()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[li()]}),!d&&(window.AdmanHTML?(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[li()]}),i(),this.events.loadEnded$.next()):(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[li()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[li()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[li(),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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")=>{ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[li()]}),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"),ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[li()]}),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,k;if(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[li(),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:v,externalApi:p}=e;this.externalApi=p;let f,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?f=$:f=parseInt($,36));let{isEmbed:y,immediateOrigin:g}=Vx(),w=(N=y?g:window.location.href)!=null?N:window.location.href,T=Ie(Gt(Ie(Gt(Ie({},s),{dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o}),f?{request_id:f}:{}),{duration:v}),u);T=Object.fromEntries(Object.entries(T).filter(([E,A])=>Rx(A)));let I={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:T,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),(k=this.externalApi)!=null&&k.videoGetAds){let A=yield this.safeExternalCall(this.externalApi.videoGetAds,T);A&&(delete I.slot,delete I.params,Object.assign(I,{json:A}))}E.init(I),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(I)}`})}catch(E){ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[li()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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(ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[li()]}),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,v,p,f;ai.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[li()]}),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),(v=this.adman)==null||v.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(f=this.adman)==null||f.destroy(),this.videoElement&&Ox(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 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 bm=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:v,endTime:p}=u.parse(s);l.startTime=v,l.endTime=p}else if(s.trim()!==""){let u=new $m,{texts:v}=u.parse(s);l.texts=[...l.texts,...v]}(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}},$m=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((v,p)=>{let f=l.indexOf(p,d);return v===-1||v>f?f:v},-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}},X_=bm;import{isNonNullable as ym}from"@vkontakte/videoplayer-shared/es2015";var qa,Mi,xm=0,wm=!1,Z_="",J_=(t,e=0,i=0)=>t<e&&t<i,Qu=(t,e=0,i=0)=>t>=e&&t<=i,Bx=(t,e=0,i=0)=>t>e&&t>i,eb=(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:v})=>Qu(t,u,v));let a=t>=xm,l=t<xm;if(xm=t,l&&(wm=!1),ym(qa)&&Qu(t,qa.startTime,qa.endTime)&&Z_===e.value)return qa;if(!ym(Mi)&&(r!=null&&r.length)&&!wm){Mi=r.find(({startTime:u,endTime:v})=>Qu(t,u,v)||a&&J_(t,u,v)),qa=void 0,!ym(Mi)&&r[r.length-1].endTime<t&&(wm=!0);return}else{if(Qu(t,Mi==null?void 0:Mi.startTime,Mi==null?void 0:Mi.endTime))return qa=Mi,Mi=void 0,Z_=e.value,qa;(a&&Bx(t,Mi==null?void 0:Mi.startTime,Mi==null?void 0:Mi.endTime)||l&&J_(t,Mi==null?void 0:Mi.startTime,Mi==null?void 0:Mi.endTime))&&(Mi=void 0)}};var Gu={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"},Fx={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"},tc=t=>{var e,i;return(i=(e=Gu[t])!=null?e:Gu[Fx[t]])!=null?i:void 0};import{Subscription as Hx}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Yu=class{constructor(e,i,o,r=new Hx){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 ju=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(ju||{});var ms=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(ms(i==null?void 0:i.top)-ms(o==null?void 0:o.top)),left:Math.round(ms(i==null?void 0:i.left)-ms(o==null?void 0:o.left)),bottom:Math.round(ms(i==null?void 0:i.bottom)-ms(o==null?void 0:o.top)),right:Math.round(ms(i==null?void 0:i.right)-ms(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:ms(e==null?void 0:e.width),height:ms(e==null?void 0:e.height)}};var kn="off";var Ul=t=>!!(Math.round(Math.abs(t)/90)%2);var ob=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:v,previewThumbsData:p,uiConfig:f,coreConfig:$,player:y,disabledControls:g,isInteractive:w,interactiveRanges$:T,isInteractiveTime$:I,replayInteractive:N,stopPlayer:k,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,additionalButtons:Q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:le,onVideoChanged:X,looped:re=!1,statistics:Z,saveRate:we,internalsExposure:ue,playerView:ne,playerId:_e})=>{var qv,Qv,Gv;let xe=Gt(Ie({},$),{configName:[...(qv=$.configName)!=null?qv:[],"ui"],isAudioDisabled:l,live:Gt(Ie({},(Qv=$.live)!=null?Qv:{}),{isLiveCatchUpMode:!!r})}),J=f,Ne=Xx.createRootTracer(J.features.tracer),pe=Ne.createComponentTracer("Store"),P=y||new zx(xe,Ne,{playerId:_e});ue==null||ue.expose({corePlayer:P});let Ke=new Yx,Te=new Ku(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}),j=Oa.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={},Je=new bu,ye=new Sm,Pe="",Fe=ae(!1),Dt=Z&&Z.oneStat?si(Z.oneStat.vsid$):Rr(void 0),ft=ae(aa()),Bt=ae(!1),at=()=>T_(document,tb.device.isIOS),St=(Gv=ie==null?void 0:ie.info.isActive$)!=null?Gv:new Zx(!1),oi=ae(0),Rt=ae(!1),$e=ae(!1),be=ae([]),ee=jx(P.events.fatalError$,P.events.managedError$).subscribe(c=>be.update(_=>[..._,c])),ot=Rr(!1,c=>{let _=P.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),fe=c=>vt(null,null,function*(){var oe;let _=Object.values(Kx).includes(c);if(J.downloadVKLanguages&&(_&&J.updateBuiltinLanguages||!Nf(c))){let Se;try{Se=yield Gx(c,Rh,Nh)}catch(tt){(oe=Z==null?void 0:Z.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),j==null||j.report(tt,{errorType:"VKLangPack",fatal:!1})}Se&&(Rf({language:c,pack:Se,fallback:J.defaultLanguage}),Me.set(c),yt.update(tt=>tt+1))}Nf(c)&&Me.set(c)}),Me=ae(t),yt=ae(0),Pt=ae(e);fe(t);let pt=(c,_)=>{let V=ge(Me);return Of(V,c,_,J.defaultLanguage)},ce=ae("thumb");ce.subscribe(c=>{c==="ads"&&P.info.playbackState$.getValue()&<()});let We=(()=>{let c=mi([ot,ce],([_,V])=>_?"crashed":V);return Gt(Ie({},c),{is:_=>ge(c)===_})})(),Ge=ae(),lt=()=>{Ge.set({muted:P.info.muted$.getValue()})},Ft=(()=>{let c=ae(new Set(g));return Gt(Ie({},c),{add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(Se=>!_.includes(Se)):oe.filter(Se=>Se!==_))})},includes:_=>{let V=ge(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}})})(),Ht=ae({width:0,height:0}),ni=null,_i=P.info.isBuffering$,Gi=Rr(_i.getValue(),c=>{let _=_i.subscribe(V=>{V&&ni===null?ni=window.setTimeout(()=>{c(_i.getValue()),ni=null},J.loaderDelay):c(V)});return()=>{_.unsubscribe(),ni&&clearTimeout(ni)}});pe.log("create store"),U({message:"create store"});let Nt=c=>{let _=c.container,V=()=>{ti=new MutationObserver(Se=>{let{removedNodes:tt}=Se[0];tt.length&&_.append(P.experimental.element$.getValue())}),ti.observe(_,{childList:!0})},oe=P.experimental.element$.getValue();if(oe)_.append(oe),V();else{let Se=P.experimental.element$.pipe(iw(tt=>!!tt),ow()).subscribe(tt=>{_.append(tt),V()});ye.add(Se)}},pi=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),w?Nt(c):(ew.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[tw()]}),P.initVideo(c)),pe.log("init video",{isInteractive:w}),c.subtitles&&P.setExternalTextTracks(c.subtitles),Ae=c,Pe=c.subtitlesForcedLanguage||""},vi=new oc,ht=c=>vi.next(c),Xt=new oc,$i=new oc,Yi=new oc,ti=null,It={actionRewind$:Xt,actionSeek$:$i,inPiP$:St,inFullscreen$:new Xu(c=>ft.subscribe(_=>c.next(_))),actionSetSubtitle$:Yi,nextMovie$:vi},qe=new oc,yi={actionSeek$:$i,actionSubtitlesSwitched$:qe,playerSize$:new Xu(c=>Ht.subscribe(_=>c.next(_))),inPiP$:St,inFullscreen$:new Xu(c=>ft.subscribe(_=>c.next(_))),isLoaderVisible$:new Xu(c=>Gi.subscribe(_=>c.next(_)))};if(Z){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=Z;c&&(w||oe.add(c.attachTo(P)),oe.add(c.attachToUi(It)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(Se=>{U({message:`onestat auth error ${String(Se)}`})}),V&&V.attachTo(P)),_&&(oe.add(_.attachTo(P,Te.events)),oe.add(_.attachToUi(yi)),oe.add(_.attachToAds(Te.events)),_.updateContext({isMobile:ge(Fe)}),_.authorize(a))}if(j){let c=new Sm,_=(V,oe)=>c.add(V.subscribe(oe));if(_(P.events.managedError$,V=>{j.logIError(V)}),_(P.events.fatalError$,V=>{j.logIError(V,!0)}),Z){let{oneStat:V}=Z;V&&_(V.experimental.error$,oe=>{j.logIError(oe)})}j.sentrySubscription.add(c)}let bo=()=>{if(tb.device.isIOS&&ke)try{C_(ke)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(P.experimental.element$.subscribe(c=>{c&&(ke=c,c.classList.add("player-media"),Ba(ie)&&ie.updateVideoElement(),w&&c.setAttribute("pip","false"),ne==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(P.events.ended$.subscribe(()=>{var c;bo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(P.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(P.events.started$.subscribe(()=>vt(null,null,function*(){var _,V;Ba(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=P.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=ze.onStarted)==null||V.call(ze,c)}))).add(P.events.willSeek$.subscribe(({from:c,to:_})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,_)})).add(P.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(P.info.position$.subscribe(c=>{var V;let _=P.info.duration$.getValue();isFinite(_)&&_>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,_,c),Te.setPosition(c,_))})).add(P.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.loadedMetadata$.subscribe(()=>{Rt.set(!0)})).add(P.info.is3DVideo$.subscribe(c=>{$e.set(c)})).add(P.info.isEnded$.subscribe(c=>{w&&(c?(I!=null&&I.getValue()&&Ft.add(Pd),Ft.add("PLAY_BUTTON")):Ft.remove("PLAY_BUTTON"))})).add(P.info.liveTime$.subscribe(c=>{var _;(_=s==null?void 0:s.onLiveTime)==null||_.call(s,c)})).add(P.info.isStalled$.subscribe(c=>{var _;(_=s==null?void 0:s.onStalledChanged)==null||_.call(s,c)})).add(P.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 To=new Sm,mn=()=>{var tt,kt,Wt;let{debugLog:c}=J,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:jt}=c;_=c.tag,V=(tt=jt==null?void 0:jt[0])!=null?tt:V,oe=(Wt=(kt=jt==null?void 0:jt[1])!=null?kt:jt==null?void 0:jt[0])!=null?Wt:oe}let Se=_?`: ${_}`:"";To.add(P.events.log$.subscribe(jt=>{console.debug(`%c sdk${Se} `,`background:${V};`,`sdk component: ${jt.component}`,jt.message)})).add(Ke.log$.subscribe(jt=>{console.debug(`%c ui${Se} `,`background:${oe};`,`ui component: ${jt.component}.`,jt.message)}))},Tt=()=>{To.unsubscribe()},Ut=(c,_)=>{pe.log("start camera manual rotation",{mx:c,my:_}),P.startCameraManualRotation(c,_)},K=(c=!1)=>{pe.log("stop camera manual rotation",{immediate:c}),P.stopCameraManualRotation(c)},At=(c,_,V)=>{pe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),P.moveCameraFocusPX(c,_,V)},di=()=>{P.holdCamera()},dt=()=>{P.releaseCamera()},wt=Rr(P.info.position$.getValue(),c=>{let _,V,oe=()=>{let Se=P.info.playbackState$.getValue(),tt=P.info.isLive$.getValue(),kt=P.info.duration$.getValue(),Wt=P.info.position$.getValue();if(Se&&[zl.PLAYING,zl.PAUSED].includes(Se)){let jt=tt?Wt-kt:P.getExactTime();jt!==V&&c(jt),V=jt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),Yt=si(P.info.playbackState$),nt=si(P.info.isBuffering$),Bi=mi([Yt,nt],([c,_])=>_?"buffering":c),Fi=si(P.info.currentBuffer$),tn=si(P.info.isEnded$),Co=si(P.info.isLive$),Hi=J.features.playbackRate?si(P.info.canChangePlaybackSpeed$):Rr(!1),ji=si(P.info.liveBufferTime$),Dr=si(P.info.volume$),$o=si(P.info.muted$),so=$u(P.info.predefinedQualityLimitType$.pipe(ib(c=>c===vs.TRAFFIC_SAVING)),P.info.predefinedQualityLimitType$.getValue()===vs.TRAFFIC_SAVING),ki=$u(P.info.predefinedQualityLimitType$.pipe(ib(c=>c===vs.HIGH_QUALITY)),P.info.predefinedQualityLimitType$.getValue()===vs.HIGH_QUALITY),on=si(P.info.autoQualityLimitingAvailable$),nn=si(P.info.availableQualities$),Pn=si(P.info.availableQualitiesFps$),Zn=si(P.info.chromecastState$),Br=si(P.info.chromecastDeviceName$),is=si(P.info.currentFormat$),hs=si(P.info.throughputEstimation$),os=si(P.info.videoBitrate$),Jn=si(P.info.intrinsicVideoSize$),br=si(P.info.duration$),vn=si(P.info.isAudioAvailable$),An=()=>{ni&&clearTimeout(ni),ni=null},Bo=mi([br,Co],([c,_])=>_?-c:c),Ln=mi([Yt],([c])=>c===zl.PLAYING),er=si(P.info.atLiveEdge$),$r=si(P.info.atLiveDurationEdge$),yr=si(P.info.position$),Fr=mi([yr,br],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),ao=mi([Zn],([c])=>c===Ux.CONNECTED),Hr=si(P.info.availableVideoStreams$),Mn=J.features.audioLanguages?si(P.info.availableAudioStreams$):Rr([]),Vn=si(P.info.currentVideoStream$),lo=si(P.info.currentAudioStream$),Ur=c=>{c.language&&Af(c.language),P.setVideoStream(c)},Rn=(c,_)=>{P.setAudioStream(c),Uo(_)&&(c.language&&Af(c.language),J.features.userVideoPrefs&&i&&Vf(J.userSalt,String(i),{audioTrackId:c.id}))},mt=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 Se=c.find(tt=>tt.id===oe.audioTrackId);_=Se!=null?Se:_}}let V=l_();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},ui=c=>{pe.log("change audio stream",{id:c});let _=P.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&Rn(_,!0)},xr=!1;ye.add(P.info.availableAudioStreams$.subscribe(c=>{if(!xr&&c.length){let _=mt(c);_&&(P.setAudioStream(_),xr=!0)}})),Mn.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:V="",id:oe="",language:Se=""})=>({label:V,language:Se,id:oe})))}),lo.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let tr=!1;ye.add(P.info.availableVideoStreams$.subscribe(c=>{if(!tr&&c.length){let _=mt(c);_&&(P.setVideoStream(_),tr=!0)}}));let ir=ae(void 0),rn=si(P.info.isAutoQualityEnabled$,c=>c&&ir.set(void 0)),wr=si(P.info.currentQuality$,()=>ir.set(void 0)),sn=mi([ir,wr],([c,_])=>c!=null?c:_),gn=mi(is,c=>c!==ic.MPEG),Nn=mi([nn,Pn,rn,sn,gn],([c,_,V,oe,Se])=>{let tt=[];Se&&tt.push({value:"auto",displayValue:pt("auto_quality_option"),selected:V});let kt=c.filter(Wt=>!qx(Wt));for(let Wt of kt){let jt=_[Wt];tt.push({value:Wt,displayValue:`${Wt}${jt?j_(jt):""}`,selected:V?!1:Wt===oe})}return tt}),On=si(P.info.currentPlaybackRate$),Fo=mi([On,er,$r],([c,_,V])=>{let oe=V||w?1:J.controls.playbackRateMin,Se=_?1:J.controls.playbackRateMax,tt=J.controls.playbackRateStep,kt=[];for(let Wt=oe;Wt<=Se;Wt+=tt)kt.push({value:Wt,displayValue:Wt===1?pt("playback_rate_1"):pt("playback_rate",{multiplier:Wt.toString(10)}),selected:c===Wt});return kt}),Io=()=>({displayValue:pt("subtitles_off"),value:kn,language:""}),or=ae(Io()),Eo=mi([or,yt],([c],_)=>{c.value===kn?_(Io()):_(c)}),Ui=J.features.subtitles?si(P.info.availableTextTracks$):Rr([]),Dn=jh(),nr=mi([Ui,Eo],([c,_],V)=>{var tt;let oe=[],Se=c.find(({id:kt})=>kt===_.value);if(Se!=null&&Se.url){let[,kt]=(tt=Dn.find(Se.url))!=null?tt:[];if(kt){V(kt);return}Je.download(Se.url).then(Wt=>{if(!Wt||Je.isDestroyed())return;let jt=new X_,js=Se.language;if(js){let n$=!!Se.isAuto,r$=jt.parse(Wt,js);oe.push({lang:js,subtitles:r$,isAuto:n$,id:Se.id})}Dn.add(Se.url,oe),ge(Eo).value===_.value&&V(oe)}).catch(Wt=>{var jt;(jt=Z==null?void 0:Z.oneStat)==null||jt.logError({errorType:"Subtitles download",fatal:!1}),j==null||j.report(Wt,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),rr=mi([On,Ln,Eo],([c,_,V],oe)=>{let kt;if(P.info.isLive$.getValue()&&_&&V.value!==kn){let jt=()=>{let js=1e3/(3*c);kt=setTimeout(jt,js),oe(Date.now())};return jt(),()=>clearTimeout(kt)}}),sr=mi([Ui,Eo],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:Se,id:tt}of c){let kt=oe&&tc(oe);oe&&kt&&V.push({displayValue:Se?pt("subtitles_auto",{language:kt}):kt,value:tt,selected:(_==null?void 0:_.value)===tt,isAuto:Se,language:oe})}return V.length?(V.unshift(Gt(Ie({},Io()),{selected:(_==null?void 0:_.value)===kn})),V):[]}),Ho={available:[],prev:[]},Sr=()=>{var _,V;let c=P.experimental.getCurrentTime$.getValue();return(V=(_=c==null?void 0:c())!=null?_:ke==null?void 0:ke.currentTime)!=null?V:0},xt=mi([wt,Eo,nr,rr],([c,_,V,oe])=>{var tt;let Se=P.info.isLive$.getValue();if(Se&&Ho.prev!==V){let kt=V.find(({id:jt})=>jt===_.value),Wt=Ho.prev.find(({id:jt})=>jt===_.value);if(kt){let jt=Gt(Ie({},kt),{subtitles:[...(tt=Wt==null?void 0:Wt.subtitles)!=null?tt:[],...kt.subtitles]});Ho.available=[jt],Ho.prev=V}}if(_&&_.value!==kn){let kt=Se?Sr():c,Wt=Se?Ho.available:V;return eb(kt,_,Wt,Se)}}),Et=mi([xt],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(Eo.subscribe(c=>{var _,V;if(c.value===kn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(Gu).find(([Se,tt])=>tt===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let co=ae(!0),ko=mi([Fi,Bo,yr,ji],([c,_,V,oe])=>{var Wt;let Se=(Wt=c==null?void 0:c.end)!=null?Wt:0;if(!oe)return Se/_;let kt=-V+oe-_;return(Se-kt)/_}),yo=si(P.info.availableSources$),xo=mi([yo],([c])=>Object.keys((c==null?void 0:c[ic.MPEG])||{}).length>0),Vi=()=>{var V,oe,Se;let c=Object.keys(((oe=(V=P.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[ic.MPEG])||{}),_=Wx(c)||Jx.Q_144P;return(Se=Ae.sources[ic.MPEG])==null?void 0:Se[_]},Bn=()=>{var _;let c=Vi();if(c)pe.log("download video",{url:c}),Qh(c,((_=Ae==null?void 0:Ae.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";pe.log("download video",{message:V}),U({message:V})}},Xi=()=>{U({message:"toggle muted"});let c=P.info.muted$.getValue();P.info.volume$.getValue()===0&&!c?Wr(Tr(),!1):hn(!c,!1)},zr=()=>{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(_),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Se,name:"settings"})}}pe.log("close settings menu")},Pi=(c,_=()=>Promise.resolve())=>vt(null,null,function*(){var Se;Qt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Qt.ui.settingsMenu.visible$.set(!0),yield _();let V=ge(Qt.ui.settingsMenu.ref$),oe=$a();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&V&&oe){let kt=Hl(V),Wt=Ns(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:kt,position:Wt,name:"settings"})}pe.log("open settings menu",{wasOpenedByKeyboard:c})}),_s=(c,_=!1)=>{var tt;Qt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Qt.ui.settingsMenu.ref$),oe=$a(),Se=ge(Qt.ui.settingsMenu.visible$);if((tt=s==null?void 0:s.uiInfo)!=null&&tt.onSettingsMenu&&V&&oe)if(Se&&!_){let Wt=Hl(V),jt=Ns(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Wt,position:jt,name:"settings"})}else{let Wt=Hl(c),jt={top:0,left:0,bottom:0,right:0},js=ge(Qt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Wt,position:jt,name:js})}pe.log("close settings sub menu")},ns=(c,_)=>{var oe;Qt.ui.settingsSubMenu.visible$.set(!0),Qt.ui.settingsSubMenu.ref$.set(_),Qt.ui.settingsSubMenu.name$.set(c);let V=$a();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let tt=Hl(_),kt=Ns(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:tt,position:kt})}pe.log("open settings sub menu",{name:c})},Tr=()=>{var _;let c=Math.max(J.volumeMinRestore,(_=yu())!=null?_:0);return c===0?J.volumeDefault:c},Uo=c=>{let _=J.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},Wr=(c,_)=>{let V=c===0?Tr():c,oe=P.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Se=!l||We.is("ads");oe&&c>0&&Se&&(oe=!1,Uo(_)&&kf(!1)),P.setVolume(c,oe),Te.setVolume(c),Uo(_)&&Tf(V)},hn=(c,_)=>{let V=P.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=We.is("ads");if(P.setMuted(c,oe),Te.setVolume(c?0:V),Uo(_)&&(!oe||!c)&&kf(c),!c&&V===0){let Se=Tr();P.setVolume(Se),Uo(_)&&Tf(Se),Te.setVolume(Se)}},_n=ae(!1),Po=c=>{var _,V;pe.log("set looped",{isLooped:c}),_n.set(c),P.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};Po(re);let Cr=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},Ue=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),pe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Qt.ui.autoplayNextEnabled$.set(c),u_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Lt=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),pe.log("set timer next video running",{timerNextVideoRunning:c}),Qt.ui.timerNextVideoRunning$.set(c)},xi=(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),_&&Y()},zo=(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),_&&le()},uo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Ao=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},po=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Wo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Fn=()=>{P.prepare()},an=()=>{_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",pe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var tt;U({message:"toggle play, call player.play"}),V.action="play",P.play(),(tt=s==null?void 0:s.onPlay)==null||tt.call(s)},Se=()=>{var tt;U({message:"toggle play, call player.pause"}),V.action="pause",P.pause(),(tt=s==null?void 0:s.onPause)==null||tt.call(s)};if(P.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Xt.next(),$i.next(Os.REWIND),w){N==null||N();return}P.seekTime(0),oe()}else P.info.playbackState$.getValue()!==zl.PLAYING?oe():Se();pe.log("toggle play",V)},Zi=(c,{changeReason:_="default",appliesTo:V="to-video"}={},oe)=>{U({message:`set quality, quality: ${c}`}),pe.log("set quality",{quality:c}),P.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Se}=J.features;xu(),c!=="auto"?(Se?(wu({type:"exact_quality",quality:c,videoId:i},V),P.setPredefinedQualityLimits(vs.UNKNOWN)):Cf(i,c),ir.set(c),P.setQuality(c)):Se&&_==="default"&&(lr("auto_quality",V,oe),ge(so)&&Ji(!1,void 0,oe),ge(ki)&&Hn(!1,void 0,oe))},Ji=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),pe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?vs.TRAFFIC_SAVING:vs.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(ar(oe,_,V),Ld(!1)):(P.setPredefinedQualityLimits(oe),Uo(V)&&Ld(c))},Hn=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),pe.log("set high quality enabled",{highQualityEnabled:c}),ar(c?vs.HIGH_QUALITY:vs.UNKNOWN,_,V)},ar=(c,_,V)=>{c!==vs.UNKNOWN&&(ge(on)&&!ge(rn)&&Zi("auto",{appliesTo:_,changeReason:"limit-changed"},V),lr(c,_,V)),P.setPredefinedQualityLimits(c)},lr=(c,_,V)=>{Uo(V)&&(wu({type:c,videoId:i},_),_==="as-default"&&wu({type:c,videoId:i},"to-video"))},Un=(c,_=!0)=>{pe.log("set playback rate",{playbackRate:c}),P.setPlaybackRate(c),J.features.saveRate&&we&&!P.info.isLive$.getValue()&&_&&d_(c)},bs=()=>{let c=ge(Hi),_=ge(Fo),V=_.findIndex(({selected:Se})=>Se);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return Un(oe.value),oe},$s=()=>{let c=ge(Hi),_=ge(Fo),V=_.findIndex(({selected:Se})=>Se);if(V===0||!c)return _[V];let oe=_[V-1];return Un(oe.value),oe},Ye=(c=Gt(Ie({},Io()),{selected:!1}),_)=>{pe.log("set subtitles",Ie({},c)),c.value!==kn&&Yi.next(c.isAuto?c.value+"_auto":c.value),qe.next({enabled:c.value!==kn,lang:c.language,auto:!!c.isAuto}),or.set(c),Uo(_)&&(Mf(c.value===kn?void 0:c.language),J.features.userVideoPrefs&&i&&Vf(J.userSalt,String(i),{subtitleTrackId:c.value===kn?void 0:c.value}))},Zt=c=>{pe.log("toggle subtitles");let _=ge(Eo);(_==null?void 0:_.value)===kn?fo(c):Ko(c)},Ai=(c,_)=>{pe.log("change subtitle",{enabled:c}),c?fo(!0,_):Ko(!0)},fo=(c,_)=>{pe.log("subtitle on");let V=ge(sr),oe=ge(Me),Se=Pe!=null?Pe:oe,tt;_&&(tt=V.find(kt=>kt.value===_)),tt!=null||(tt=V.filter(kt=>kt.value!==kn).find(kt=>kt.language===Se)),Ye(tt!=null?tt:V[1],c)},Ko=c=>{pe.log("subtitle off"),Ye(void 0,c)};ye.add(P.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:Se,isAuto:tt,id:kt}of c){let Wt=Se&&tc(Se);Se&&Wt&&oe.push({id:kt,language:Se,title:tt?pt("subtitles_auto",{language:Wt}):Wt})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let Kr=ae(!0),Lo=c=>{Kr.set(c)},qo=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),pe.log("seek to time",{time:c,action:_,forcePrecise:V}),$i.next(_),P.info.isLive$.getValue()){let Se=P.info.duration$.getValue(),tt=Math.min(0,Se+c);P.seekTime(tt,V)}else{if(I!=null&&I.getValue())return;P.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),P.seekTime(zv(c),V)}},ys=c=>{U({message:`seek to episode start time: ${c}`}),pe.log("seek to episode start time",{time:c}),qo(c,Os.EPISODE,!0)},Us=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),pe.log("seek to percent",{percent:c,action:_});let oe=ge(Bo)*c;qo(oe,_,V)},va=c=>{U({message:`seek external, time: ${c}`}),pe.log("seek external",{time:c}),$i.next(Os.UNKNOWN),P.seekTime(P.info.isLive$.getValue()?-c:c)},zs=c=>{var oe,Se;let _=(oe=c.max)!=null?oe:"none",V=(Se=c.min)!=null?Se:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),pe.log("set auto quality limits",{max:_,min:V}),P.setAutoQualityLimits(c)},bn=c=>{U({message:`seek external to episode start time: ${c}`}),pe.log("seek external to episode start time",{time:c}),qo(c,Os.EPISODE,!0)},rt=c=>{U({message:`set playback rate to: ${c}`}),pe.log("set playback rate external",{playbackRate:c}),P.setPlaybackRate(c)},ii=ae(!1),mo=ae(!1),Ir=mi([Bo],([c])=>!!p&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!w),qr=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),$n=mi([oi],([c])=>{let _=Ul(c);return qr?!_:_});ye.add(We.subscribe(c=>{c!=="video"&&ii.set(!1)}));let he=ae(void 0),_t=ae(!1),zt=c=>{U({message:`start scrubbing, progress: ${c}`}),pe.log("start scrubbing",{progress:c}),_t.set(!0),Jt(c)},Jt=c=>{he.set(c)},wi,Ci,Li=()=>{he.set(void 0),_t.set(!1)},Si=()=>{clearTimeout(Ci),clearTimeout(wi),wi=window.setTimeout(()=>{Li()},500),ke==null||ke.removeEventListener("seeked",Si)},Ws=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),pe.log("complete scrubbing",{progress:c}),Us(c,Os.SLIDER,_),ge(Qt.ui.isMobile)&&ge(Qt.state.currentFormat$)===ic.HLS?(ke==null||ke.addEventListener("seeked",Si),Ci=window.setTimeout(()=>{Si()},300)):Li()},Ks=mi([wt,Bo,he],([c,_,V],oe)=>{oe(Qx(V)?V*_:c)}),qs=ae(!1),Xl=()=>{qs.set(!0)},ga=()=>{qs.set(!1)},Er=mi([Ht],([{width:c}],_)=>{let V=Q_(c);_(V)}),Qs=Q.filter(c=>Gh(c)),ha=mi([Er,Fe],([c,_])=>_?Qs.filter(V=>!V.hideOnMobile):Qs.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),kr=ae(Q.filter(c=>Yh(c))),xs=mi([kr,Er],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),ws=mi([xs,ha],([c,_])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?_.map((V,oe)=>{var Se;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Se=V.ariaLabel)!=null?Se:V.tooltip,tooltipText:V.tooltip}}):[]]),Pr=ae(H),_a=mi([Pr],([c])=>J.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?Gt(Ie({},_),{onClick:_.onChangeEnabled}):_):[]),Zl=(c,_)=>{let V=ge(kr).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),_));kr.set(V)},nl=c=>{let _=ge(kr);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),kr.set(_)},Jl=c=>{let _=ge(kr);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),kr.set(_)},ba=c=>{$i.next(Os.LIVE),U({message:"live switch to low latency "+c}),pe.log("live switch to low latency "+c),P.setLiveLowLatency(c)},ed=(c,_)=>{let V=ge(Pr).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),_));Pr.set(V)},rl=c=>{let _=ge(Pr);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),Pr.set(_)},sl=c=>{let _=ge(Pr);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),Pr.set(_)},dr=ae(z),ct=mi([dr],([c])=>J.features.additionalContextMenuItems?c:[]),ut=(c,_)=>{let V=ge(dr).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),_));dr.set(V)},eo=c=>{let _=ge(dr);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),dr.set(_)},Mo=c=>{let _=ge(dr);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),dr.set(_)},to=mi([Fe,ot],([c,_],V)=>{V(c&&_)}),gi=()=>{$i.next(Os.LIVE),U({message:"switch to active live"}),pe.log("switch to active live"),P.seekTime(0),P.info.playbackState$.getValue()!==zl.PLAYING&&Qt.actions.internal.togglePlay()},zi=()=>{pe.log("skip adman"),Te.skip()},Gs=(c=!0)=>{var oe;_r(Qt),U({message:`switch from ads to video, callPlay: ${c}`}),pe.log("switch from ads to video",{callPlay:c}),ce.set("video"),c&&P.play(),l&&hn(!0,!0);let _=(oe=ge(Ge))==null?void 0:oe.muted,V=!P.info.muted$.getValue();_!==void 0&&!V&&hn(_,!0),Ge.set(void 0)},td=()=>{_r(Qt),U({message:"switch from video to ads"}),pe.log("switch from video to ads"),Qt.actions.internal.pause(),bo(),ce.set("ads")},Mc=c=>{_r(Qt);let _=c?"LiveWaitingStart":"thumb";pe.log("set live waiting start",{state:c,playerPhase:_}),ce.set(_)},bp=c=>{_r(Qt);let _=c?"LiveWaitingRecover":"thumb";pe.log("set live waiting recover",{state:c,playerPhase:_}),ce.set(_)},Vc=c=>{_r(Qt);let _=c?"LiveWaitingRecord":"thumb";pe.log("set live waiting record",{state:c,playerPhase:_}),ce.set(_)},$p=()=>(_r(Qt),pe.log("get debug text data"),Kh(P,Ae,Qt,Ne.getTraceId())),Rc=()=>(_r(Qt),JSON.stringify(Ne.getFinishedSpans())),Nc=()=>(_r(Qt),qh(P,Ae,Qt)),$a=()=>ke,yp=()=>{U({message:"toggle chromecast"}),pe.log("toggle chromecast"),P.toggleChromecast()},Ys=c=>{var V;if(_r(Qt),P.info.isEnded$.getValue())return;let _=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),pe.log("pause ads",{internalCall:_}),Te.pause();return}U({message:`pause video, internalCall: ${_}`}),pe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),P.pause()},al=c=>{var V;_r(Qt);let _=!c;if(ge(Qt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),pe.log("play ads",{internalCall:_}),Te.play();return}U({message:`play video, internalCall: ${_}`}),pe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),P.play()},Oc=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: ${_}`}),k==null||k()},Dc=(c,_)=>{_r(Qt),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),pe.log("first start",{showAds:c,external:_}),c?ce.set("ads"):(ce.set("video"),_?P.play():Qt.actions.internal.togglePlay())},ll=()=>(U({message:"getting time codes"}),v),Bc=()=>{let c=ll();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue();return c.find(V=>V.time>_)},xp=c=>{let _=c;_||(_=Bc());let V=P.info.position$.getValue();pe.log("seek to next episode",Ie({currentTime:V},_)),_&&(U({message:"seek to next episode"}),qo(_.time,Os.EPISODE,!0))},Fc=()=>{let c=ll();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue(),V=c.findIndex(Se=>Se.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},He=c=>{let _=c;_||(_=Fc());let V=P.info.position$.getValue();pe.log("seek to prev episode",Ie({currentTime:V},_)),_&&(U({message:"seek to prev episode"}),qo(_.time,Os.EPISODE,!0))},hi=()=>(U({message:"getting preview thumbs data"}),pe.log("get preview thumbs data",Ie({},p)),p),Qo=()=>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()),pe.log("toggle picture in picture",{isActive:c,action:_})}),Ar=(c=-90)=>{pe.log("rotate video",{alphaDiff:c}),oi.update(_=>_+c)},Vo=ae([]);T==null||T.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,Se],subjects:tt}=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?!tt.length||tt.every(kt=>kt.isRemoved):!tt.length}),Se!==1/0&&_.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}Vo.set(_)});let jb=ae(!1);I==null||I.subscribe(c=>{c&&ge(_t)&&Li()});let zv=c=>{if(!w)return c;let _=ge(Vo),V=ge(Bo),Se=ge(yr)/V,tt=_.find(kt=>kt.interactive&&!kt.completed&&kt.time>Se);return typeof(tt==null?void 0:tt.time)=="number"?Math.min(c,tt.time-.05):c},Xb=()=>{Qt.ui.episodes.panelOpened$.set(!1)},Zb=()=>{pe.log("destroy store"),clearTimeout(Ci),clearTimeout(wi),ye.unsubscribe(),To.unsubscribe(),P.destroy(),Te.destroy(),Z==null||Z.destroy(),j==null||j.destroy(),ee.unsubscribe(),ti==null||ti.disconnect(),ti=null,Je.destroy()},Jb=mi([er,We,Hi],([c,_,V])=>f.features.doubleForwardAvailable&&!c&&_==="video"&&V),wp=ae(!1),Wv=2,Hc=null,Kv=c=>{if(!ge(Ln)&&c)return;let _=P.info.currentPlaybackRate$.getValue();c?_!==Wv&&(Hc=_,Un(Wv,!1),wp.set(!0)):(Hc&&Un(Hc,!1),wp.set(!1),Hc=null)};We.subscribe(c=>{c!=="video"&&Kv(!1)});let e$=()=>{Ys(!1),ii.set(!0)},t$=()=>{al(!1),ii.set(!1)},Sp=!1,i$=()=>{mo.set(!0),Sp=P.info.playbackState$.getValue()===zl.PLAYING,Ys(!1)},o$=()=>{mo.set(!1),!ge(ii)&&Sp&&al(!1),Sp=!1};P.events.playing$.subscribe(()=>{ge(ii)&&Ys(!1)});let Qt={interfaceLanguage$:Me,isCyrillicRelatedInterface$:Pt,initVideo:pi,videoId:i,isClip:o,playerPhase:We,vsid:Dt,state:{positionExact$:wt,positionWithScrubbing$:Ks,duration$:Bo,playbackState$:Yt,playbackStateRealistic$:Bi,isPlaying$:Ln,isLoaderVisible:Gi,bufferedProgress$:ko,isLive$:Co,canChangePlaybackSpeed$:Hi,isActiveLive$:er,isOldestAvailableLive$:$r,isRewindableLive$:Fr,isEnded$:tn,muted$:$o,volume$:Dr,trafficSavingEnabled$:so,highQualityEnabled$:ki,autoQualityLimitingAvailable$:on,availableVideoStreams$:Hr,availableAudioStreams$:Mn,videoStream$:Vn,audioStream$:lo,currentQuality$:sn,isAutoQualityEnabled$:rn,availableQualities$:Nn,currentPlaybackRate$:On,availablePlaybackRates$:Fo,currentSubtitle$:Eo,availableTextTracks$:Ui,availableSubtitlesList$:sr,currentSubtitleCaptions$:Et,isAutoSubtitleCaptionVisible$:co,chromecastState$:Zn,chromecastDeviceName$:Br,chromecastConnected$:ao,currentFormat$:is,throughputEstimation$:hs,videoBitrate$:os,videoSize$:Jn,errorLog$:be,crashed$:ot,isAudioAvailable$:vn,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:yo,hasMpegSources$:xo,isInteractive:w,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Vo).length,interactiveEpisodes$:Vo,isInteractiveTime$:I?si(I):ae(!1),isInteractiveExpectation$:jb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,looped$:_n,loadedMetadata$:Rt,isAutoQualityAvailable$:gn,previewTrackActive:ii,previewTrackDragInProgress:mo},ui:{t:pt,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:Q.length?Q.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:Ft},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:ft,isFullscreenOpenedByKeyboard:Bt,rotateAlpha:oi,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:Ht,isMobile:Fe,mobileNotReportControlHidden$:to,icon3DVideoVisible:ae(!1),scrubbingInProgress:_t,volumeChangingInProgress:qs,is3DVideo:$e,currentGridType$:Er,additionalButtonsDeprecated$:ha,additionalDesktopControlPanelRightButtons$:ws,additionalSettingsMenuItems$:_a,additionalContextMenuItems$:ct,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},userActionsDisabled:ae(!1),hiddenControls:{volume:ae(!1),vkLogo:ae(!1),pip:ae(!1),chromecast:ae(!1),settings:ae(!1)},isControlsAvailable:Kr,controlBlocks:{topLeft:ae(void 0),topRight:ae(void 0),middle:ae(void 0),bottom:ae(void 0),bottomLeft:ae(void 0),bottomRight:ae(void 0)},videoTitleInfo:ae(void 0),doubleForwardOn$:wp,doubleForwardAvailable$:Jb,previewTrackNotificationVisible:ae(!1),previewTrackActive:ii,previewTrackDragInProgress:mo,previewTrackAvailable:Ir,isPreviewTrackHorizontallyAligned:$n},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Be,focusManager:it},actions:{internal:{preload:Fn,firstStart:c=>Dc(c,!1),play:()=>al(!1),pause:()=>Ys(!1),togglePlay:an,toggleMuted:Xi,openSettingsMenu:Pi,closeSettingsMenu:zr,openSettingsSubMenu:ns,closeSettingsSubMenu:_s,setVolume:c=>Wr(c,!1),setMuted:c=>hn(c,!1),startVolumeChanging:Xl,stopVolumeChanging:ga,setVideoStream:Ur,setAudioStream:c=>Rn(c,!1),setQuality:(c,_)=>Zi(c,_,!1),setTrafficSavingEnabled:(c,_)=>Ji(c,_,!1),setHighQualityEnabled:(c,_)=>Hn(c,_,!1),setPlaybackRate:Un,incrementPlaybackRate:bs,decrementPlaybackRate:$s,setSubtitle:c=>Ye(c,!1),toggleSubtitle:()=>Zt(!1),togglePictureInPicture:Qo,startScrubbing:zt,progressScrubbing:Jt,completeScrubbing:Ws,toggleChromecast:yp,switchToActiveLive:gi,switchFromAdsToVideo:Gs,switchFromVideoToAds:td,skipAd:zi,setLiveWaitingStart:Mc,setLiveWaitingRecover:bp,setLiveWaitingRecord:Vc,getDebugTextData:$p,getTraceTextData:Rc,getDebugPanelData:Nc,getVideoElement:$a,seekTime:(c,_,V)=>qo(c,_,V),clearDelayedBufferingCheckTimeout:An,seekEpisodeStartTime:ys,seekToPercent:Us,getNextEpisode:Bc,seekToNextEpisode:xp,getPrevEpisode:Fc,seekToPrevEpisode:He,startLogging:mn,stopLogging:Tt,startCameraManualRotation:Ut,stopCameraManualRotation:K,moveCameraFocusPX:At,holdCamera:di,releaseCamera:dt,getVideoEpisodes:ll,getPreviewThumbsData:hi,downloadVideo:Bn,addLanguage:Rf,setLanguage:fe,nextMovie:ht,videoRotate:Ar,correctSeekTimeToInteractive:zv,replayInteractive:N,setLooped:Po,reportProblem:Cr,setAutoplayNextEnabled:Ue,setTimerNextVideoRunning:Lt,prevVideoClick:xi,nextVideoClick:zo,nextVideoAnnouncementShow:uo,nextVideoAnnouncementClick:Ao,nextVideoAnnouncementAuto:po,nextVideoAnnouncementCancel:Wo,checkFullscreenSupport:at,changeDoubleForwardOn:Kv,closePreviewTrack:t$,previewTrackOpened:e$,previewTrackDragStarted:i$,previewTrackDragFinished:o$},external:{firstStart:c=>Dc(c,!0),play:()=>al(!0),pause:()=>Ys(!0),stop:()=>Oc(!0),seekTime:c=>va(c),seekEpisodeStartTime:c=>bn(c),setPlaybackRate:c=>rt(c),setAutoQualityLimits:c=>zs(c),setMuted:c=>hn(c,!0),toggleSubtitle:()=>Zt(!0),changeSubtitle:Ai,setVolume:c=>Wr(c,!0),returnFocusToEpisodes:Xb,updateAdditionalSettingsItem:ed,addAdditionalSettingsItem:rl,removeAdditionalSettingsItem:sl,updateAdditionalContextItem:ut,addAdditionalContextItem:eo,removeAdditionalContextItem:Mo,updateAdditionalButton:Zl,addAdditionalButton:nl,removeAdditionalButton:Jl,setLiveLowLatency:ba,hideControls:()=>Lo(!1),showControls:()=>Lo(!0),setQuality:c=>Zi(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Ji(c,"to-video",!0),setHighQualityEnabled:c=>Hn(c,"to-video",!0),changeAudioStream:ui}},callbacks:s,setUiCallbacks:c=>{ze=Ie({},c)},getAdmanWrapper:()=>Te,getLogger:()=>Ke,getPlayer:()=>P,destroy:Zb};return Qt};function jn(t,e,i,o){var v;let r=(v=e[i])==null?void 0:v.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 nw=["disabledControls$","additionalButtons"],rw=["interactiveTimeIndicator"],Kl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!nw.includes(r)){let l=o||rw.includes(r);a.set(jn(t,i,r,l))}}};var Zu=(t,e,i)=>vt(null,null,function*(){yield _o(),e&&i&&(i.focus(),t.set(!1))});var sw=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){Xe(t,{children:(e,i)=>{var o=sw();b(e,o)},$$slots:{default:!0}})}function Cm(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$,v=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,f=d.ui.contextMenu.btnRef$,$=W(void 0);Oe(()=>{n($)&&Ct(()=>{f.set(n($))})});let y=I=>{let N=ca(I),k=F_(n($));p.set(k),u.set(N),s.set(!r())},g=()=>{v.set(!0)},w=()=>{v.set(!1)},T=m(()=>r()?"opened":"");qt(t,{get className(){return n(T)},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(I){O($,I,!0)},children:(I,N)=>{Tm(I,{})},$$slots:{default:!0}}),F(),o()}var aw=t=>{t.stopPropagation()},lw=M("<div><!> <div></div> <div></div></div>"),dw={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 j;B(e,!0),q(t,dw);let[i,o]=Re(),r=()=>x(w,"$isMobile",i),a=()=>x(k,"$areControlsVisible",i),l=()=>x(A,"$currentGridType$",i),d=()=>x(I,"$isInteractiveTime$",i),s=()=>x(g,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),v=()=>x(T,"$isFullscreen",i),p=h(e,"ref",15,void 0),f=W(void 0),$=ve(),y=So(),{interactiveControlsOpacity$:g}=y,w=$.ui.isMobile,T=$.ui.isFullscreen,I=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,k=$.ui.controlsVisible,E=(j=$.callbacks)==null?void 0:j.onInteractiveTimeIndicatorClick,A=$.ui.currentGridType$,Q=m(()=>!r()&&a()),H=m(()=>Rs(l(),"s")),z=m(()=>!d()||!!s()||n(Q)),Y=W(!1);Oe(()=>{O(Y,n(z),!0)});let le=()=>{O(Y,!0)},X=()=>{var ie;re(),(ie=n(f))==null||ie.addEventListener("animationiteration",le,{once:!0})},re=()=>{var ie;O(Y,!1),(ie=n(f))==null||ie.removeEventListener("animationiteration",le)},Z=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Oe(()=>{u()?X():re()});let ue=()=>{n(z)||(N.set(!0),E==null||E())};cn(()=>{N.clearTimeout(),re()});let ne=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var xe=lw();let J;xe.__mousemove=[aw],xe.__click=ue;var Ne=C(xe);Do(Ne,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return p()},set ref(ie){p(ie)},children:(ie,De)=>{Yd(ie,{completed:!0})},$$slots:{default:!0}});var pe=L(Ne,2);let P;je(pe,ie=>p(ie),()=>p());var Ke=L(pe,2);let Te;je(Ke,ie=>O(f,ie),()=>n(f)),S(xe),D((ie,De,Be)=>{J=se(xe,1,"interactive-episode-icon-animated s-27",null,J,ie),P=se(pe,1,"ref-block s-27",null,P,De),Te=se(Ke,1,"pulse s-27",null,Te,Be)},[()=>({mobile:r(),fullscreen:v(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),st("mouseleave",xe,ne),b(t,xe),F(),o()}Ze(["mousemove","click"]);function Ju(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);Do(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 v=m(()=>e.buttonComponent);var p=de(u);Oi(p,()=>n(v),(f,$)=>{$(f,Ls(()=>{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 uw=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 ma(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");Xe(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=uw();b(l,s)},$$slots:{default:!0}}),F()}var pw=M('<div class="icon-background-mobile s-21"><!></div>'),fw={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:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Qa(t,e){B(e,!0),q(t,fw);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 v;return`btn-${(v=e.type)!=null?v:""}`},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(v){i(v)},children:(v,p)=>{var f=Le(),$=de(f);{var y=w=>{var T=pw(),I=C(T);let N=m(()=>e.type==="prev");ma(I,{get size(){return"32"},get reversed(){return n(N)}}),S(T),b(w,T)},g=w=>{let T=m(()=>e.type==="prev");ma(w,{get size(){return"24"},get reversed(){return n(T)}})};R($,w=>{o()?w(y):w(g,!1)})}b(v,f)},$$slots:{default:!0}}),F()}var mw=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 rc(t,e){B(e,!0);let i=m(()=>un(e.size));Xe(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=mw();b(o,a)},$$slots:{default:!0}}),F()}import{noop as vw}from"@vkontakte/videoplayer-shared/es2015";var gw=M('<div class="icon-background-mobile s-25"></div>'),hw=M("<!> <div><!></div>",1),_w={hash:"s-25",code:".mobile.s-25{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-25{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,_w);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,vw),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 us.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,v)=>{var p=hw(),f=de(p);{var $=I=>{var N=gw();b(I,N)};R(f,I=>{o()&&I($)})}var y=L(f,2);let g;var w=C(y);let T=m(()=>o()?"48":"24");rc(w,{get size(){return n(T)}}),S(y),D(I=>g=se(y,1,"s-25",null,g,I),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var bw=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));Xe(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=bw();b(o,a)},$$slots:{default:!0}}),F()}import{noop as $w}from"@vkontakte/videoplayer-shared/es2015";var yw=M('<div class="icon-background-mobile s-24"><!></div>'),xw={hash:"s-24",code:".icon-background-mobile.s-24{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 Ql(t,e){B(e,!0),q(t,xw);let[i,o]=Re(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=So(),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),v=h(e,"className",3,""),p=h(e,"click",3,$w),$=ve().ui.t,{toggle:y}=a,g=m(()=>y),w=m(()=>r()!==null),T=m(()=>n(w)?r():s()),I=m(()=>n(T)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(T)?Bs:En),k=m(()=>`${d()?"btn-m--play":""} ${v()}`),E=m(()=>n(w)?n(g):p());qt(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(I)},get ariaKeyShortCut(){return us.KeyK},get ref(){return l()},set ref(A){l(A)},children:(A,Q)=>{var H=Le();let z=m(()=>n(N));var Y=de(H);{var le=re=>{var Z=yw(),we=C(Z);Oi(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"48"}})}),S(Z),b(re,Z)},X=re=>{var Z=Le(),we=de(Z);Oi(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"24"}})}),b(re,Z)};R(Y,re=>{d()?re(le):re(X,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}var ww=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 Im(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=ww();b(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=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)=>{Im(d,{})},$$slots:{default:!0}}),F()}var Sw=M('<span class="gutter s-26"><span><!></span></span>'),Tw={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 ac(t,e){B(e,!0),q(t,Tw);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,v=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),f="12",$="#000",y=m(()=>r()?"true":"false");qt(t,{click:v,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(g){a(g)},children:(g,w)=>{var T=Sw(),I=C(T);let N;var k=C(I);{var E=Q=>{En(Q,{get size(){return f},fill:$})},A=Q=>{Bs(Q,{get size(){return f},fill:$})};R(k,Q=>{r()?Q(E):Q(A,!1)})}S(I),S(T),D(Q=>N=se(I,1,"toggler s-26",null,N,Q),[()=>({enabled:r()})]),b(g,T)},$$slots:{default:!0}}),F(),o()}var Cw=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 Em(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=Cw();fi(),b(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=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)=>{Em(d,{})},$$slots:{default:!0}}),F()}var Iw=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>'),Ew=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");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=Ew(),d=L(de(l));{var s=u=>{var v=Iw();b(u,v)};R(d,u=>{i()&&u(s)})}b(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=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(v){i(v)},children:(v,p)=>{let f=m(()=>!!a());km(v,{get isOpened(){return n(f)}})},$$slots:{default:!0}}),F()}import{PlaybackState as nb}from"@vkontakte/videoplayer-core/es2015";function cc(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$,v=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,f=m(()=>()=>{if(!l()){v();return}r()===nb.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),g=m(()=>l()&&r()===nb.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(f)},children:(w,T)=>{Od(w,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as rb}from"@vkontakte/videoplayer-shared/es2015";var kw=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),Pw=M('<img class="icon" aria-hidden="true"/>');function Ga(t,e){"use strict";let i=W(!1),o=()=>{O(i,!0)};var r=Le(),a=de(r);{var l=s=>{var u=kw();b(s,u)},d=s=>{var u=Pw();D(()=>Ve(u,"src",e.icon)),st("error",u,o),La(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Pm(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,rb),r=h(e,"ref",15),a=m(()=>o()===rb),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Do(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 v=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(v)},children:(p,f)=>{Ga(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var sb=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var ep=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(jn(t,i,r,o))};import{interpolate as Am}from"@vkontakte/videoplayer-shared/es2015";var ab=10,lb=40,Lm=.2,Lw=.5,Mw=65,Vw=114,Rw=4,db=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?Mw:Vw),r=W(!1),a=W(0),l=W(0),d=m(()=>n(o)+ab-lb-Rw),s=m(()=>Am(n(a),[Lm,1],[0,-n(d)])),u=m(()=>Am(n(a),[Lm,1],[0,lb])),v=m(()=>Am(n(a),[Lm,1],[0,n(o)+ab]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(v),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)>=Lw?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var Nw=t=>t;function gs(t,{delay:e=0,duration:i=400,easing:o=Nw}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var Ow=M('<span class="root s-2c"> </span>'),Dw={hash:"s-2c",code:".root.s-2c{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 Mm(t,e){q(t,Dw);var i=Ow(),o=C(i,!0);S(i),D(()=>me(o,e.time)),b(t,i)}var Bw=M('<div class="tooltip-wrapper s-j"><div><!></div></div>'),Fw={hash:"s-j",code:'.tooltip-wrapper.s-j{display:block;position:relative}.tooltip.s-j{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-j: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-j{opacity:1;visibility:visible}'};function Vm(t,e){q(t,Fw);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=W(void 0),u=W(void 0);function v(w){if(!n(u))return 0;let{width:T}=n(u).getBoundingClientRect(),I=T/2;return w<I?I+l():w>e.containerWidth-I?e.containerWidth-I-d():w}let p=m(()=>v(r()));var f=Bw(),$=C(f);let y;var g=C($);ri(g,()=>{var w;return(w=e.children)!=null?w:gt}),S($),je($,w=>O(u,w),()=>n(u)),S(f),je(f,w=>O(s,w),()=>n(s)),D(w=>{Qe(f,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-j",null,y,w),Qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,f)}var cb=t=>Math.abs(t)/90%4===1;var Hw=M('<div class="preview s-i"></div>'),Uw=M('<div class="time s-i"> </div>'),zw=M('<div><!> <div class="episode s-i"><!></div> <!></div>'),Ww={hash:"s-i",code:".timeline-preview.s-i{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-i{bottom:72px}.preview.s-i{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-i{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-i,.time.s-i{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-i{color:var(--white)}"};function Rm(t,e){B(e,!0),q(t,Ww);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,()=>[]),v=h(e,"progress",3,0),p=h(e,"duration",3,0),f=h(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,g=$.ui.playerSize,w=W(0),T=W(0),I=W(""),N=W(0),k=W(0),E=W(0),A=W(0),Q=m(()=>Wu(v(),p(),u())),H=m(()=>Ul(r())),z=m(()=>cb(r())),Y=m(re),le=m(()=>(n(z)?1:-1)*(n(w)/2-n(T)/2)),X=m(()=>n(le)*-1);Oe(()=>{(j=>{O(w,j.width,!0),O(T,j.height,!0)})(we())}),Oe(()=>{(j=>{O(I,j.imgSrc,!0),O(N,j.imgWidth,!0),O(k,j.imgHeight,!0),O(E,j.imgOffsetX,!0),O(A,j.imgOffsetY,!0)})(ue(v()))});function re(){var Be;let j=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=Z(),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),j)}function Z(){let j=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>j;return{width:j,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:j,isHorizontal:ie,isVertical:De,width:Be}=Z();return ie&&(j=j/Be*n(Y),Be=n(Y)),De&&(Be=Be/j*n(Y),j=n(Y)),{width:Be,height:j}}function ue(j){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*j/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*j)));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(T)*U,Je=-it*n(w),ye=-Be*n(T);return{imgSrc:e.previewThumbsData.links[De],imgWidth:ke,imgHeight:ze,imgOffsetX:Je,imgOffsetY:ye}}var ne=zw();let _e;var xe=C(ne);{var J=j=>{var ie=Hw();D(()=>Qe(ie,`width: ${n(w)}px; height: ${n(T)}px; background-image: url(${n(I)}); background-size: ${n(N)}px ${n(k)}px; background-position: ${n(E)}px ${n(A)}px;
|
|
61
|
+
transform: rotate(${r()}deg) ${n(H)?`translate(${n(le)}px, ${n(X)}px)`:""};
|
|
62
|
+
`)),b(j,ie)};R(xe,j=>{n(I)&&j(J)})}var Ne=L(xe,2),pe=C(Ne);{var P=j=>{var ie=Le(),De=de(ie);{var Be=U=>{var Ae=cs();D(ke=>me(Ae,ke),[()=>G("tooltip_episode_unfinished")]),b(U,Ae)},it=U=>{var Ae=cs();D(()=>me(Ae,n(Q).text||"")),b(U,Ae)};R(De,U=>{f()&&n(Q).completed===!1?U(Be):U(it,!1)})}b(j,ie)};R(pe,j=>{n(Q)&&j(P)})}S(Ne);var Ke=L(Ne,2);{var Te=j=>{var ie=Uw(),De=C(ie,!0);S(ie),D(()=>me(De,d())),b(j,ie)};R(Ke,j=>{f()||j(Te)})}S(ne),D(j=>{_e=se(ne,1,"timeline-preview s-i",null,_e,j),Qe(ne,`width: ${n(H)?n(T):n(w)}px;`)},[()=>({mobile:s()})]),b(t,ne),F(),o()}var Kw=M('<span class="time s-f"> </span>'),qw=M("<!> <!>",1),Qw={hash:"s-f",code:".time.s-f{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 Nm(t,e){var fe,Me,yt,Pt,pt;B(e,!0),q(t,Qw);let[i,o]=Re(),r=()=>x(X,"$interactiveEpisodes$",i),a=()=>x(A,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(Z,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),v=()=>x(Q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),f=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(k,"$bufferedProgress$",i),g=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),T=h(e,"ref",15,void 0),I=ve(),N=Vt(),k=I.state.bufferedProgress$,E=I.state.positionWithScrubbing$,A=I.state.duration$,Q=I.state.isLive$,H=I.state.isActiveLive$,z=I.ui.isMobile,Y=N.features.episodes&&w()?I.actions.internal.getVideoEpisodes():void 0,le=I.actions.internal.getPreviewThumbsData(),X=I.state.interactiveEpisodes$,re=I.state.isInteractive,Z=I.state.isInteractiveTime$,we=I.state.isInteractiveExpectation$,ue=I.actions.internal.correctSeekTimeToInteractive,ne=(fe=I.callbacks)==null?void 0:fe.onDisabledTimelineClick,_e=I.ui.controls.disabledControls$,xe=I.ui.previewTrackActive,J=(yt=(Me=I.callbacks)==null?void 0:Me.uiInfo)==null?void 0:yt.onTimelineMouseEnter,Ne=(pt=(Pt=I.callbacks)==null?void 0:Pt.uiInfo)==null?void 0:pt.onTimelineMouseLeave,pe=I.ui.t,P=N.features.interactiveResponsiveUi,Ke=m(()=>re?r():Y),Te=m(()=>en(a())),j=m(()=>en(l())),ie=m(()=>l()/a()),De=m(()=>d()||s()),Be=W(!1),it=W(""),U=W(0),Ae=W(0),ke=W(0),ze=m(()=>({containerWidth:n(Ae),translateXPx:n(U),translateYPx:re&&le?-36:-16,active:n(Be)&&g()&&!n(De)&&!P&&!u(),pointer:!N.features.timelinePreview||!le||v()})),Je=pe("aria_timeline"),ye=m(()=>pe("aria_timeline_value",{position:n(j),duration:n(Te)}));function Pe(ce){return!ue||!re?ce:ue(ce*a())/a()}function Fe(ce,We){var Ge;(Ge=e.onSliderPointerDown)==null||Ge.call(e,We),I.actions.internal.startScrubbing(Pe(ce))}function Dt(ce){s()||I.actions.internal.progressScrubbing(Pe(ce))}function ft(ce){var We;I.actions.internal.completeScrubbing(Pe(ce)),O(Be,!1),(We=e.onSliderPointerUp)==null||We.call(e)}function Bt(ce,We,Ge){var lt;(lt=e.onSliderPointerEnter)==null||lt.call(e,ce),oi(ce,We,Ge),O(Be,!0)}function at(ce,We,Ge,lt){var Ft;(Ft=e.onSliderMove)==null||Ft.call(e,lt,ce),oi(ce,We,Ge),O(Be,!0)}function St(){var ce;O(Be,!1),(ce=e.onSliderLeave)==null||ce.call(e)}function oi(ce,We,Ge){O(ke,Pe(ce),!0),O(U,We,!0),Ge&&O(Ae,Ge,!0),O(it,Rt(ce),!0)}function Rt(ce){let We=en((v()?1-ce:ce)*a());return v()?`-${We}`:We}let $e=m(()=>p().has("TIMELINE"));var be=qw(),ee=de(be);Vm(ee,Ls(()=>n(ze),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ce,We)=>{var Ge=Le(),lt=de(Ge);{var Ft=ni=>{Rm(ni,{get time(){return n(it)},get isMobile(){return f()},get videoEpisodes(){return n(Ke)},get previewThumbsData(){return le},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return re}})},Ht=ni=>{var _i=Kw(),Gi=C(_i,!0);S(_i),D(()=>me(Gi,n(it))),b(ni,_i)};R(lt,ni=>{N.features.timelinePreview&&le&&!v()?ni(Ft):ni(Ht,!1)})}b(ce,Ge)},$$slots:{default:!0}}));var ot=L(ee,2);Ka(ot,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return f()},get ariaLabel(){return Je},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:Dt,onPointerMove:at,onPointerUp:ft,onPointerEnter:Bt,onPointerLeave:St,get onMouseEnter(){return J},get onMouseLeave(){return Ne},get onDisabledClick(){return ne},get isInteractive(){return re},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:ft,get ref(){return T()},set ref(ce){T(ce)}}),b(t,be),F(),o()}var Gw={hash:"s-g",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),q(t,Gw);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,v=m(()=>en(l())),p=m(()=>en(a())),f=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(v)})),y=m(()=>Math.round(n(f)*100));Ka(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(f)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var Yw=M("<div><!></div>"),jw=M("<div></div>"),Xw={hash:"s-e",code:".timeline.s-e{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-e{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-e{padding:0}.timeline-stub.s-e{min-width:20px;width:100%}.timeline-stub.mobile.s-e{height:8px}"};function Ya(t,e){B(e,!0),q(t,Xw);let[i,o]=Re(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(k,"$disabled",i),d=()=>x(I,"$adPosition",i),s=()=>x(T,"$adDuration",i),u=h(e,"isAds",3,!1),v=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),f=h(e,"needPadding",3,!0),$=h(e,"ref",15,void 0),y=ve(),g=Vt(),w=y.state.isLive$,T=y.ads.duration,I=y.ads.position,N=y.ui.isMobile,k=ae(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var A=Le(),Q=de(A);{var H=Y=>{var le=Yw();let X;var re=C(le);{var Z=ue=>{uc(ue,{get position(){return d()},get duration(){return s()}})},we=ue=>{Nm(ue,{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(ne){$(ne)}})};R(re,ue=>{u()?ue(Z):ue(we,!1)})}S(le),As(le,()=>Vl(v()&&g.features.usePerformanceFix,k,g.disableInvisibleComponentsTimeout)),D(ue=>X=se(le,1,"timeline s-e",null,X,ue),[()=>({withoutPadding:!f(),mobile:a(),"out-of-flow":l()})]),b(Y,le)},z=Y=>{var le=jw();let X;D(re=>X=se(le,1,"timeline-stub s-e",null,X,re),[()=>({mobile:a()})]),b(Y,le)};R(Q,Y=>{n(E)?Y(H):Y(z,!1)})}b(t,A),F(),o()}import{getRangeAroundIndex as Zw}from"@vkontakte/videoplayer-shared/es2015";var Jw=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},eS=M("<div></div>"),tS=M('<div><div class="track s-2b"></div></div>'),iS={hash:"s-2b",code:'.root.s-2b{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2b,.root.vertically-rotated.s-2b{height:var(--preview-track-frame-height-vertical)}.root.s-2b: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-2b{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2b,.track.s-2b{position:absolute}.frame.s-2b{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-2b .frame:where(.s-2b){transform-origin:0 0}.rotate-1.s-2b{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2b{transform:rotate(-180deg)}.rotate-3.s-2b{transform:rotate(-270deg) translateY(-100%)}'};function Dm(t,e){B(e,!0),q(t,iS);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:v=0,links:p=[],frameHeight:f=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:g}=d.state,{startScrubbing:w,progressScrubbing:T,completeScrubbing:I}=d.actions.internal,N=d.ui.rotateAlpha,k=W(void 0),E=W(!1),A=W(0),Q=W(0),H=W(0),z=W(0),Y=m(()=>f<=$),le=m(()=>Ul(r())),X=m(()=>n(Y)?!n(le):n(le)),re=114,Z=65,we=3,ue=m(()=>n(X)?re:Z),ne=m(()=>n(Y)?re:Z),_e=m(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=m(()=>v*n(ue)),J=W(0);Oe(()=>{O(z,Math.ceil(-n(H)/n(ue))-1),O(H,-n(xe)*a()/l())});let Ne=()=>{I(pe(),!0)},pe=()=>l()*-n(H)/n(xe)/l(),P=!1,Ke=ye=>{if(!n(E))return!1;let Pe=ye.clientX-n(A);O(H,n(Q)+Pe),O(H,Math.max(Math.min(n(H),0),-n(xe)),!0),Math.abs(Pe)>1&&(P=!0),T(pe())},Te=ye=>{n(E)&&(O(E,!1),!P&&ye&&O(H,-(ye.offsetX-n(J)/2)),P=!1,Ne())},j=()=>{n(E)&&Te()},ie=m(()=>s/u),De=(ye,Pe)=>{if(ye!==p.length-1)return u;let Fe=0,Dt=Pe*u;for(let ft=1;ft<=u;ft++)ye*s+Fe+Dt<v&&Fe++;return Fe},Be=m(()=>Math.floor(n(z)/s)),it=m(()=>Zw(3,n(Be),p.length-1)),U=(ye,Pe,Fe)=>{let Dt=s*n(ue);return ye*Dt+Pe*n(ue)*u+n(J)/2-we/2+Fe*n(ue)},Ae=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ne)}px`,`--frame-height: ${n(_e)}`].join(";"));var ke=tS();let ze;var Je=C(ke);Je.__pointerdown=[Jw,E,A,Q,H,w,pe],Je.__pointermove=Ke,Je.__pointerup=Te,bi(Je,20,()=>n(it),ye=>ye,(ye,Pe)=>{var Fe=Le(),Dt=de(Fe);bi(Dt,16,()=>Array.from({length:n(ie)},(ft,Bt)=>Bt),ft=>ft,(ft,Bt)=>{var at=Le(),St=de(at);bi(St,16,()=>Array.from({length:De(Pe,Bt)},(oi,Rt)=>Rt),oi=>oi,(oi,Rt)=>{var $e=eS();D((be,ee)=>{Qe($e,be),se($e,1,ee,"s-2b")},[()=>`--row-index: ${Bt}; --column-index: ${Rt}; left: ${U(Pe,Bt,Rt)}px; background-image: url(${p[Pe]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(oi,$e)}),b(ft,at)}),b(ye,Fe)}),S(Je),S(ke),je(ke,ye=>O(k,ye),()=>n(k)),D(ye=>{ze=se(ke,1,"root s-2b",null,ze,ye),Qe(ke,n(Ae)),Qe(Je,`transform: translateX(${n(H)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(le)})]),st("mouseleave",Je,j),Cn(ke,"clientWidth",ye=>O(J,ye)),b(t,ke),F(),o()}Ze(["pointerdown","pointermove","pointerup"]);var oS=M('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),nS={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 Bm(t,e){B(e,!1),q(t,nS);let i=340,{ui:{t:o}}=ve();wo();var r=oS(),a=C(r),l=C(a,!0);S(a),S(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],yn),Jr(3,r,()=>gs,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as rS}from"@vkontakte/videoplayer-shared/es2015";var sS=M('<div class="preview-track-close tooltip s-2a"><!></div>'),aS=M('<div class="preview-track-control s-2a"><!> <div class="preview-track-close s-2a"><!></div> <!></div>'),lS=M('<div class="wrapper-preview-track s-2a"><!></div>'),dS=M('<div class="enriched-timeline s-2a"><!> <!> <!></div>'),cS={hash:"s-2a",code:".enriched-timeline.s-2a{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-2a{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-2a{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-2a{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-2a:hover+.tooltip:where(.s-2a){opacity:1}.wrapper-preview-track.s-2a{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Fm(t,e){B(e,!0),q(t,cS);let[i,o]=Re(),r=()=>x(g,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(f,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),v=ve(),p=200,{positionWithScrubbing$:f,isRewindableLive$:$,duration$:y}=v.state,{playerSize:g,previewTrackActive:w}=v.ui,{countPerImage:T=0,links:I=[],frequency:N=0}=v.actions.internal.getPreviewThumbsData()||{},k=m(()=>r().width>100),E=W(!h_()),A=()=>{n(E)&&(g_(),O(E,!1))},Q=ue=>{let ne=Math.floor(a()*ue/N),_e=Math.floor(ne/T),xe=rS(3,_e,I.length-1);for(let J of xe){let Ne=new Image;Ne.src=I[J]}},H=(ue,ne)=>{Q(ne),!l()&&e.onTimelineMove(ue)};var z=dS(),Y=C(z);{var le=ue=>{var ne=aS(),_e=C(ne);let xe=m(()=>en(d()));Mm(_e,{get time(){return n(xe)}});var J=L(_e,2),Ne=C(J);Vs(Ne,{onClick:()=>v.actions.internal.closePreviewTrack()}),S(J);var pe=L(J,2);{var P=Ke=>{var Te=sS(),j=C(Te);Bm(j,{}),S(Te),b(Ke,Te)};R(pe,Ke=>{n(E)&&Ke(P)})}S(ne),st("mouseleave",J,A),Jr(3,ne,()=>gs,()=>({duration:p})),b(ue,ne)};R(Y,ue=>{l()&&ue(le)})}var X=L(Y,2);let re=m(()=>!n(k));Ya(X,{get isHidden(){return n(re)},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(ue){u(ue)}});var Z=L(X,2);{var we=ue=>{var ne=lS(),_e=C(ne);Dm(_e,{}),S(ne),D(()=>Qe(ne,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ue,ne)};R(Z,ue=>{e.previewTrackAvailable&&ue(we)})}S(z),D(()=>Qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var pS=M('<div><!> <div class="controls s-1c" data-testid="player_controls"><div class="controls-left s-1c"><!> <!> <!></div> <div class="controls-right s-1c"></div></div></div> <!>',1),fS={hash:"s-1c",code:'.wrapper-bottom.s-1c{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-1c:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1c>:where(.s-1c){pointer-events:auto}.controls.s-1c{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-1c,.controls-right.s-1c{align-content:center;display:flex}.controls-left.s-1c{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1c >:not(:first-child),.controls-right.s-1c >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1c{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1c{transition:none}'};function Um(t,e){var sl,dr;B(e,!0),q(t,fS);let[i,o]=Re(),r=()=>x(To,"$disabledControls$",i),a=()=>x(nt,"$adPlaybackState",i),l=()=>x(Ht,"$playbackState$",i),d=()=>x(bo,"$currentSubtitle$",i),s=()=>x(Gi,"$isEnded$",i),u=()=>x(tn,"$currentGridType$",i),v=()=>x(Nt,"$isLive$",i),p=()=>x(qe,"$chromecastState$",i),f=()=>x(ht,"$isPictureInPictureActive",i),$=()=>x(Xt,"$pictureInPictureType$",i),y=()=>x(yi,"$availableSubtitlesList$",i),g=()=>x(Ut,"$contextMenuOpenedByKeyboard$",i),w=()=>x(Tt,"$showContextMenuBtn$",i),T=()=>x(vi,"$isRewindableLive$",i),I=()=>x(pi,"$isActiveLive$",i),N=()=>x(os,"$graphIsOpened$",i),k=()=>x(mn,"$contextMenuVisible$",i),E=()=>x(Bi,"$isFullscreen",i),A=()=>x(Hi,"$autoplayNextEnabled",i),Q=()=>x(n(ko),"$prevButton",i),H=()=>x(n(yo),"$replayButton",i),z=()=>x(n(xo),"$playButton",i),Y=()=>x(n(Vi),"$nextButton",i),le=()=>x(n(Bn),"$playPrevChapterButton",i),X=()=>x(n(Xi),"$seekToInteractiveButton",i),re=()=>x(n(zr),"$interactiveGraphButton",i),Z=()=>x(n(Pi),"$liveButton",i),we=()=>x(n(_s),"$time",i),ue=()=>x(n(ns),"$episodes",i),ne=()=>x(n(Tr),"$vkLogo",i),_e=()=>x(n(Uo),"$volume",i),xe=()=>x(n(Wr),"$subtitles",i),J=()=>x(n(hn),"$settings",i),Ne=()=>x(n(_n),"$context",i),pe=()=>x(n(Po),"$fullscreen",i),P=()=>x(n(Cr),"$chromecast",i),Ke=()=>x(Co,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Fi,"$playerSize",i),j=()=>x(on,"$isInteractiveTime$",i),ie=()=>x(ii,"$previewTrackActive",i),De=()=>x($i,"$settingsMenuVisible",i),Be=()=>x(po,"$settingButtonRef$",i),it=()=>x(K,"$startedByKeyboard$",i),U=()=>x(ni,"$isAudioAvailable$",i),Ae=()=>x(be,"$fakeIsPlaying$",i),ke=()=>x(hs,"$seekToInteractiveDisabledTooltip$",i),ze=()=>x(qr,"$isPreviewTrackHorizontallyAligned$",i),Je=()=>x(Ir,"$previewTrackAvailable",i),ye=()=>x(mo,"$previewTrackDragInProgress",i),Pe=()=>x(Yt,"$adPosition",i),Fe=()=>x(Ft,"$position$",i),Dt=()=>x(wt,"$adDuration",i),ft=()=>x(lt,"$duration$",i),Bt=h(e,"playerControlsWrapperRef",15,void 0),at=h(e,"playerControlsRef",15,void 0),St=h(e,"isAds",3,!1),oi=h(e,"logoTargetUrl",3,""),Rt=h(e,"isOneVideoPlaylist",3,!1),$e=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:be}=So(),ee=ve(),ot=So(),fe=Vt(),Me=ee.actions.internal.toggleMuted,yt=ee.actions.internal.togglePlay,Pt=ee.actions.internal.pause,pt=ee.actions.internal.toggleSubtitle,ce=ee.actions.internal.checkFullscreenSupport,We=(sl=ee.callbacks)==null?void 0:sl.onAudioDoesNotExistHint,Ge=(dr=ee.callbacks)==null?void 0:dr.onAudioDisabledHint,lt=ee.state.duration$,Ft=ee.state.positionWithScrubbing$,Ht=ee.state.playbackState$,ni=ee.state.isAudioAvailable$,_i=ee.state.isAudioDisabled,Gi=ee.state.isEnded$,Nt=ee.state.isLive$,pi=ee.state.isActiveLive$,vi=ee.state.isRewindableLive$,{isActive$:ht,type$:Xt}=ot.pictureInPicture$,$i=ee.ui.settingsMenu.visible$,Yi=ee.ui.settingsMenu.openedByBtnKeyboard$,ti=ee.ui.controls,It=ee.actions.internal.getVideoEpisodes(),qe=ee.state.chromecastState$,yi=ee.state.availableSubtitlesList$,bo=ee.state.currentSubtitle$,To=ti.disabledControls$,mn=ee.ui.contextMenu.visible$,Tt=ee.ui.contextMenu.showContextMenuBtn$,Ut=ee.ui.contextMenu.openedByBtnKeyboard$,K=ee.ui.startedByKeyboard$,At=ee.ui.controlBlocks,di=ee.ui.previewTrackNotificationVisible,dt=ee.ui.t,wt=ee.ads.duration,Yt=ee.ads.position,nt=ee.ads.playbackState,Bi=ee.ui.isFullscreen,Fi=ee.ui.playerSize,tn=ee.ui.currentGridType$,Co=ee.ui.additionalDesktopControlPanelRightButtons$,Hi=ee.ui.autoplayNextEnabled$,ji=ee.actions.internal.getVideoElement,Dr=ee.actions.internal.replayInteractive,$o=ee.actions.internal.prevVideoClick,so=ee.actions.internal.nextVideoClick,ki=ee.state.isInteractive,on=ee.state.isInteractiveTime$,nn=ee.state.showInteractiveGraph,Pn=ee.state.showSeekToInteractive,Zn=ee.state.showPlayPrevChapter,Br=ee.state.showInteractiveTimeIndicator,is=ee.state.playPrevChapterDisabledTooltip,hs=ot.seekToInteractiveDisabledTooltip$,os=ot.graphIsOpened$,Jn=fe.features.interactiveResponsiveUi,br=m(()=>r().has("EPISODE_BUTTON")),vn=m(()=>r().has("GRAPH_BUTTON")),An=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Bo=m(()=>r().has("PLAY_BUTTON")),Ln=m(()=>r().has("REPLAY_BUTTON")),er=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),$r=()=>ee.actions.internal.toggleChromecast(),yr=m(()=>St()?a()==="playing":l()===Hm.PLAYING),Fr=m(()=>d().value!=="off"),ao=m(()=>s()&&!St()||ki),Hr=m(()=>Jn?n(ao)&&no(u(),"m"):n(ao)),Mn=m(()=>!s()||ki||St()),Vn=m(()=>no(u(),"m")),lo=m(()=>e.showNextPrevButtons&&no(u(),"m")&&!St()&&e.nextButtonActive),Ur=m(()=>e.showNextPrevButtons&&no(u(),"m")&&!St()&&e.prevButtonActive),Rn=m(()=>!St()&&!!v()),mt=m(()=>p()!==ub.NOT_AVAILABLE&&!(f()&&$()===1)&&no(u(),"m")&&!ki),ui=m(()=>e.showAutoplayNext&&!Rt()&&no(u(),"s")),xr=m(()=>y().length>0&&no(u(),"m")),tr=m(()=>g()||w()),ir=m(()=>no(u(),"s")&&!St()),rn=m(()=>!e.logoHidden&&!St()),wr=m(()=>fe.features.fullscreen&&ce()&&(e.logoHidden||no(u(),Jn?"xs":"s"))&&!(f()&&$()===1)&&(ki?$e():!0)),sn=m(()=>(!v()||St())&&!(fe.features.interactiveHideTime&&ki)),gn=m(()=>nn&&no(u(),"m")),Nn=m(()=>Jn?Pn&&no(u(),"s"):Pn),On=m(()=>Jn?Zn&&no(u(),"s"):Zn),Fo=m(()=>!St()&&!v()&&!!(It!=null&&It.length)&&n(Vn)&&!n(br)),Io=m(()=>!T()||!!I()),or=m(()=>N()?dt("tooltip_interactive_graph_on"):dt("tooltip_interactive_graph_off")),Eo=m(()=>k()?dt("tooltip_context_menu_close"):dt("tooltip_context_menu_open")),Ui=(ct,ut)=>ct?ut&&ut===Hm.PAUSED?dt("tooltip_play"):"":dt("tooltip_live"),Dn=m(()=>Ui(n(Io),l())),nr=m(()=>fe.logoType==="vk_video"?dt("tooltip_vk_video_logo"):dt("tooltip_vk_logo")),rr=m(()=>n(Fr)?dt("tooltip_subtitles_on"):dt("tooltip_subtitles_off")),sr=m(()=>E()?dt("tooltip_fullscreen_on"):dt("tooltip_fullscreen_off")),Ho=m(()=>p()===ub.CONNECTED?dt("tooltip_chromecast_on"):dt("tooltip_chromecast_off")),Sr=m(()=>A()?dt("tooltip_autoplay_on"):dt("tooltip_autoplay_off")),xt=W(0),Et=ci({}),co=ci({}),ko=m(()=>ti.prevButton),yo=m(()=>ti.replayButton),xo=m(()=>ti.playButton),Vi=m(()=>ti.nextButton),Bn=m(()=>ti.playPrevChapterButton),Xi=m(()=>ti.seekToInteractiveButton),zr=m(()=>ti.interactiveGraphButton),Pi=m(()=>ti.liveButton),_s=m(()=>ti.time),ns=m(()=>ti.episodes),Tr=m(()=>ti.vkLogo),Uo=m(()=>ti.volume),Wr=m(()=>ti.subtitles),hn=m(()=>ti.settings),_n=m(()=>ti.context),Po=m(()=>ti.fullscreen),Cr=m(()=>ti.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:Y()?Y().right-Y().left:0,playPrevChapterButton:le()?le().right-le().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:re()?re().right-re().left:0,liveButton:Z()?Z().right-Z().left:0,time:we()?we().right-we().left:0,episodes:ue()?ue().right-ue().left:0,vkLogo:ne()?ne().right-ne().left:0,volume:_e()?_e().right-_e().left:0,subtitles:xe()?xe().right-xe().left:0,settings:J()?J().right-J().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:P()?P().right-P().left:0,additionalButtons:Ke().length?Ke().reduce(ct=>[...ct,40],[]):[]})),Lt=W(0);Oe(()=>{(!n(Lt)||n(Lt)<n(Ue).time)&&Ct(()=>O(Lt,n(Ue).time,!0))});let xi=W(!1);Oe(()=>{let ct=0;n(Fo)&&(no(u(),"xl")?ct=n(Ue).time:ct=60);let ut=n(Ue).prevButton+n(Ue).playButton+n(Ue).nextButton+n(Ue).seekToInteractiveButton+n(Ue).interactiveGraphButton+n(Ue).liveButton+n(Lt)+ct;O(xi,n(sn)&&n(xt)>=ut,!0)});let zo=m(()=>n(xi)&&no(u(),"m")),uo=pb(Kl,260),Ao=pb(ep,260);Oe(()=>{Te(),j(),ie(),uo(ji(),ti,Et,e.showControls),Ao(ji(),At,co,e.showControls)}),Oe(()=>{co.bottom=Bt()});let po=ae();Oe(()=>{De(),Be()&&Ct(()=>Nl(Be(),De(),Yi))});let Wo;Oe(()=>{it(),Ct(()=>Zu(K,it(),Wo))});function Fn(){ua({isAudioDisabled:_i,isAudioAvailable:U(),isAds:St(),audioIsNotExistHintCallback:We,audioDisabledHintCallback:Ge})&&Me()}let an=ki?Dr:yt,Zi=m(()=>Ae()!==null),Ji=m(()=>n(Zi)?Ae():n(yr)),Hn=m(()=>n(Ji)?dt("tooltip_pause"):dt("tooltip_play")),ar=dt("tooltip_episodes"),lr=m(()=>{var ct,ut,eo,Mo;return n(Ur)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ds.prevButton,buttonComponent:Qa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:$o.bind(null,!0)},tooltipEnabled:!((ut=(ct=ee.callbacks)==null?void 0:ct.uiInfo)!=null&&ut.onPrevButtonMouseEnter)&&!((Mo=(eo=ee.callbacks)==null?void 0:eo.uiInfo)!=null&&Mo.onPrevButtonMouseLeave),mouseEnter:()=>{var to,gi,zi;(zi=(gi=(to=ee.callbacks)==null?void 0:to.uiInfo)==null?void 0:gi.onPrevButtonMouseEnter)==null||zi.call(gi,jn(ji(),Et,"prevButton",e.showControls))},mouseLeave:()=>{var to,gi,zi;(zi=(gi=(to=ee.callbacks)==null?void 0:to.uiInfo)==null?void 0:gi.onPrevButtonMouseLeave)==null||zi.call(gi,jn(ji(),Et,"prevButton",e.showControls))},tooltipText:dt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Un=m(()=>n(Hr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ds.replayButton,buttonComponent:ql,buttonComponentProps:{disabled:n(Ln),click:an},tooltipText:dt("tooltip_restart"),disabled:n(Ln)}:void 0),bs=m(()=>n(Mn)?{id:"playButton",type:"desktop-control-panel-left",weight:Ds.playButton,buttonComponent:Ql,buttonComponentProps:{disabled:n(Bo),isPlaying:n(yr),click:yt},tooltipText:n(Hn),disabled:n(Bo)}:void 0),$s=m(()=>{var ct,ut,eo,Mo;return n(lo)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ds.nextButton,buttonComponent:Qa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:so.bind(null,!0)},tooltipEnabled:!((ut=(ct=ee.callbacks)==null?void 0:ct.uiInfo)!=null&&ut.onNextButtonMouseEnter)&&!((Mo=(eo=ee.callbacks)==null?void 0:eo.uiInfo)!=null&&Mo.onNextButtonMouseLeave),mouseEnter:()=>{var to,gi,zi;(zi=(gi=(to=ee.callbacks)==null?void 0:to.uiInfo)==null?void 0:gi.onNextButtonMouseEnter)==null||zi.call(gi,jn(ji(),Et,"nextButton",e.showControls))},mouseLeave:()=>{var to,gi,zi;(zi=(gi=(to=ee.callbacks)==null?void 0:to.uiInfo)==null?void 0:gi.onNextButtonMouseLeave)==null||zi.call(gi,jn(ji(),Et,"nextButton",e.showControls))},tooltipText:dt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ye=m(()=>ki&&n(On)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ds.playPrevChapterButton,buttonComponent:sc,buttonComponentProps:{disabled:n(er),click:e.playPrevChapter},tooltipText:dt("tooltip_interactive_go_back"),disabledTooltipContent:dt(is),disabled:n(er)}:void 0),Zt=m(()=>ki&&n(Nn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ds.seekToInteractiveButton,buttonComponent:lc,buttonComponentProps:{disabled:n(An),click:e.seekToInteractive},tooltipText:dt("tooltip_interactive_seek"),disabled:n(An),disabledTooltipContent:dt(ke())}:void 0),Ai=m(()=>ki&&n(gn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ds.interactiveGraphButton,buttonComponent:dc,buttonComponentProps:{disabled:n(vn),click:os.toggle,graphIsOpened:N()},tooltipText:n(or)}:void 0),fo=m(()=>n(Rn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ds.liveButton,buttonComponent:cc,buttonComponentProps:{isLiveActive:n(Io),ariaLabel:n(Dn)},tooltipText:n(Dn),disabled:n(Io)&&l()===Hm.PLAYING}:void 0),Ko=m(()=>[n(lr),n(Un),n(bs),n($s),n(Ye),n(Zt),n(Ai),n(fo)].filter(ct=>!!ct).sort(Ha)),Kr=m(()=>n(rn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:Xd,buttonComponentProps:{targetUrl:oi(),logoClickable:e.logoClickable,click:Pt},tooltipText:n(nr),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Lo=m(()=>n(ui)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:ac,tooltipText:n(Sr)}:void 0),qo=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:fm,buttonComponentProps:{click:Fn,isAds:St()}})),ys=m(()=>n(xr)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:lm,buttonComponentProps:{isSubtitlesEnabled:n(Fr),click:pt},tooltipText:n(rr)}:void 0),Us=m(()=>n(ir)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Fl,buttonComponentProps:{ref$:po},tooltipText:De()?void 0:dt("tooltip_settings_off")}:void 0),va=m(()=>fe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:Cm,buttonComponentProps:{ariaLabel:dt("aria_label_context_menu")},className:n(tr)?"":"out-of-view",tooltipText:n(Eo)}:void 0),zs=m(()=>n(wr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:jd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(sr)}:void 0),bn=m(()=>n(mt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:Jd,buttonComponentProps:{state:p(),click:$r},tooltipText:n(Ho)}:void 0),rt=m(()=>[n(Kr),n(Lo),n(qo),n(ys),n(Us),n(va),n(zs),n(bn),...Ke()].filter(ct=>!!ct).sort(Ha)),ii=ee.ui.previewTrackActive,mo=ee.ui.previewTrackDragInProgress,Ir=ee.ui.previewTrackAvailable,qr=ee.ui.isPreviewTrackHorizontallyAligned,$n=m(()=>db({onPreviewTrackOpened:ee.actions.internal.previewTrackOpened,getTimelineRef:()=>Et.timeline,isHorizontal:ze()})),he=m(()=>n($n).progressBarY),_t=m(()=>n($n).controlsY),zt=m(()=>n($n).onPointerDown),Jt=m(()=>n($n).onPointerMove),wi=m(()=>n($n).onPointerUp),Ci=m(()=>n($n).calculatedHeight),Li=m(()=>n($n).closePreviewTrack);Oe(()=>{ie()?di.set(!1):n(Li)()});let Si;Mt(()=>()=>Si&&clearTimeout(Si));let Ws=ct=>{ie()||!Je()||(n(zt)(ct),Si=setTimeout(()=>{ee.actions.internal.previewTrackDragStarted()},200))},Ks=()=>{ie()||n(wi)(),Si&&clearTimeout(Si),ye()&&ee.actions.internal.previewTrackDragFinished()},qs=ct=>{n(Jt)(ct),!ie()&&Je()&&!ie()&&di.set(!0)},Xl=()=>{di.set(!1)};var ga=pS(),Er=de(ga);let Qs;var ha=C(Er);{var kr=ct=>{let ut=m(()=>n(he)()),eo=m(()=>n(Ci)());Fm(ct,{get animatedOffsetY(){return n(ut)},get animatedPreviewTrackHeight(){return n(eo)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:qs,onTimelinePointerDown:Ws,onTimelinePointerUp:Ks,onTimelinePointerLeave:Xl,get previewTrackAvailable(){return Je()},get timelineRef(){return Et.timeline},set timelineRef(Mo){Et.timeline=Mo}})};R(ha,ct=>{e.showControls&&ct(kr)})}var xs=L(ha,2),ws=C(xs),Pr=C(ws);bi(Pr,17,()=>n(Ko),ct=>ct.id,(ct,ut)=>{Ju(ct,{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 Et[n(ut).id]},set ref(eo){Et[n(ut).id]=eo}})});var _a=L(Pr,2);{var Zl=ct=>{let ut=m(()=>!e.showControls),eo=m(()=>St()?Pe():Fe()),Mo=m(()=>St()?Dt():ft());Gd(ct,{get isHidden(){return n(ut)},isMobile:!1,get showDuration(){return n(zo)},get position(){return n(eo)},get duration(){return n(Mo)},get ref(){return Et.time},set ref(to){Et.time=to}})};R(_a,ct=>{n(sn)&&ct(Zl)})}var nl=L(_a,2);let Jl=m(()=>!n(Fo));Do(nl,{className:"w-max",get disabled(){return n(Jl)},get tooltipContent(){return ar},get tooltipVisible(){return e.showControls},get ref(){return Et.episodes},set ref(ct){Et.episodes=ct},children:(ct,ut)=>{var eo=Le(),Mo=de(eo);{var to=gi=>{ec(gi,{get position(){return Fe()},get duration(){return ft()},get timeCodes(){return It}})};R(Mo,gi=>{n(Fo)&&gi(to)})}b(ct,eo)},$$slots:{default:!0}}),S(ws);var ba=L(ws,2);bi(ba,21,()=>n(rt),ct=>ct.id,(ct,ut)=>{var eo=Le(),Mo=de(eo);{var to=zi=>{Ju(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 Et[n(ut).id]},set ref(Gs){Et[n(ut).id]=Gs}})},gi=zi=>{let Gs=m(()=>!!n(ut).disabled);Pm(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(Gs)},get onClick(){return n(ut).onClick},get disableMouseupTooltipShow(){return n(ut).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Et[n(ut).id]},set ref(td){Et[n(ut).id]=td}})};R(Mo,zi=>{sb(n(ut))?zi(to):zi(gi,!1)})}b(ct,eo)}),S(ba),S(xs),je(xs,ct=>at(ct),()=>at()),S(Er),je(Er,ct=>Bt(ct),()=>Bt());var ed=L(Er,2);{var rl=ct=>{nc(ct,{get ref(){return Et.interactiveTimeIndicator},set ref(ut){Et.interactiveTimeIndicator=ut}})};R(ed,ct=>{Br&&ct(rl)})}D((ct,ut)=>{Qs=se(Er,1,"wrapper-bottom s-1c",null,Qs,ct),Qe(xs,ut),xs.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(_t)()}px);`]),Cn(ws,"clientWidth",ct=>O(xt,ct)),b(t,ga),F(),o()}import{ChromecastState as mb,PlaybackState as vb}from"@vkontakte/videoplayer-core/es2015";import{noop as fb}from"@vkontakte/videoplayer-shared/es2015";var mS=M('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),vS=M('<img class="icon s-20" aria-hidden="true"/>'),gS={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 zm(t,e){q(t,gS);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,fb),r=m(()=>o()===fb),a=m(()=>n(r)||i()),l=W(!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,v)=>{var p=Le(),f=de(p);{var $=g=>{var w=mS();b(g,w)},y=g=>{var w=vS();D(()=>Ve(w,"src",e.iconUrl)),st("error",w,d),La(w),b(g,w)};R(f,g=>{n(l)?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}})}var hS=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 Wm(t){Xe(t,{testId:"muted-icon",children:(e,i)=>{var o=hS();b(e,o)},$$slots:{default:!0}})}import{noop as _S}from"@vkontakte/videoplayer-shared/es2015";function tp(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,_S),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,v)=>{var p=Le(),f=de(p);{var $=g=>{Wm(g,{})},y=g=>{fa(g,{get size(){return"24"}})};R(f,g=>{i()?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var bS=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>'),$S=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>'),yS=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 Km(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=yS(),d=L(de(l));{var s=v=>{var p=bS();b(v,p)},u=v=>{var p=$S();b(v,p)};R(d,v=>{i()?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as xS}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,xS),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)=>{Km(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as gb}from"@vkontakte/videoplayer-shared/es2015";var wS=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},SS=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},TS=M("<div><!></div>"),CS=M("<div><!></div>"),IS=M("<div><!></div>"),ES=M("<!> <!> <!>",1),kS=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),PS=M('<div class="wrapper-middle s-1b"><!></div>'),AS=M("<div><!></div> <!> <div><!></div>",1),LS=M('<div aria-hidden="true">·</div> <!>',1),MS=M('<!> <!> <div><div><div class="controls mobile s-1b" data-testid="bottom-controls"><div class="controls-group contain s-1b"><!> <!> <!> <!></div> <div class="controls-group s-1b"><!> <!> <!></div></div> <!></div></div> <!>',1),VS={hash:"s-1b",code:".wrapper-bottom.s-1b{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-1b>:where(.s-1b){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1b{height:9px;padding:0 4px 4px}.wrapper-middle.s-1b{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1b,.wrapper-top-right.s-1b{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1b{right:8px;top:4px}.wrapper-top-left.s-1b{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1b,.wrapper-middle-left-second.s-1b,.wrapper-middle-right.s-1b{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-1b{left:12px}.wrapper-middle-left-second.s-1b{left:64px}.wrapper-middle-right.s-1b{right:12px}.controls.s-1b{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-1b,.controls-group.s-1b{display:flex}.controls-group.contain.s-1b{min-width:0}.controls-group.s-1b >:not(:first-child){margin-left:8px}.hidden.s-1b{opacity:0;visibility:hidden}.controls-hidden.s-1b{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1b{transition:none}.overlay-mobile.s-1b{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-1b,.wrapper-top-right.fullscreen.s-1b{top:16px}.controls-wrapper.fullscreen.s-1b{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1b{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1b{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1b{left:44px}.wrapper-middle-left-second.fullscreen.s-1b{left:96px}.wrapper-middle-right.fullscreen.s-1b{right:44px}.controls-wrapper.fullscreen.s-1b{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Qm(t,e){var Po,Cr;B(e,!0),q(t,VS);let[i,o]=Re(),r=()=>x(Fi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(ti,"$disabledControls$",i),l=()=>x(Rt,"$playbackState$",i),d=()=>x(To,"$adPlaybackState",i),s=()=>x(ee,"$isEnded$",i),u=()=>x(Tt,"$playerSize",i),v=()=>x(pt,"$scrubbingInProgress",i),p=()=>x($i,"$chromecastState$",i),f=()=>x(We,"$isPictureInPictureActive",i),$=()=>x(Ge,"$pictureInPictureType$",i),y=()=>x(ce,"$mobileNotReportControlHidden$",i),g=()=>x(vi,"$chromecastHidden",i),w=()=>x(at,"$playerPhase",i),T=()=>x(Nt,"$pipHidden",i),I=()=>x(qe,"$currentGridType$",i),N=()=>x(_i,"$vkLogoHidden",i),k=()=>x(ni,"$volumeHidden",i),E=()=>x(ot,"$isLive$",i),A=()=>x(lt,"$settingsMenuVisible",i),Q=()=>x(Pt,"$isRewindableLive$",i),H=()=>x(yt,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),Y=()=>x(Me,"$muted$",i),le=()=>x(fe,"$volume$",i),X=()=>x(dt,"$isInteractiveTime$",i),re=()=>x(Nn,"$settingButtonRef$",i),Z=()=>x(It,"$startedByKeyboard$",i),we=()=>x(mn,"$isFullscreen",i),ue=()=>x(Ut,"$additionalButtons$",i),ne=()=>x(Gi,"$autoplayNextToggleHidden",i),_e=()=>x(Yi,"$crashed$",i),xe=()=>x(pi,"$settingsHidden",i),J=()=>x(tn,"$graphIsOpened$",i),Ne=()=>x(bo,"$adPosition",i),pe=()=>x(yi,"$adDuration",i),P=()=>x(oi,"$position$",i),Ke=()=>x(St,"$duration$",i),Te=h(e,"playerControlsWrapperRef",15,void 0),j=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=So(),ke=Vt(),ze=U.actions.internal.toggleMuted,Je=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Pe=U.actions.internal.prevVideoClick,Fe=U.actions.internal.nextVideoClick,Dt=U.actions.internal.checkFullscreenSupport,ft=(Po=U.callbacks)==null?void 0:Po.onAudioDoesNotExistHint,Bt=(Cr=U.callbacks)==null?void 0:Cr.onAudioDisabledHint,at=U.playerPhase,St=U.state.duration$,oi=U.state.positionWithScrubbing$,Rt=U.state.playbackState$,$e=U.state.isAudioAvailable$,be=U.state.isAudioDisabled,ee=U.state.isEnded$,ot=U.state.isLive$,fe=U.state.volume$,Me=U.state.muted$,yt=U.state.isActiveLive$,Pt=U.state.isRewindableLive$,pt=U.ui.scrubbingInProgress,ce=U.ui.mobileNotReportControlHidden$,{isActive$:We,type$:Ge}=Ae.pictureInPicture$,lt=U.ui.settingsMenu.visible$,Ft=U.ui.settingsMenu.openedByBtnKeyboard$,Ht=U.ui.controls,{volume:ni,vkLogo:_i,autoplayNextToggle:Gi,pip:Nt,settings:pi,chromecast:vi}=U.ui.hiddenControls,ht=U.actions.internal.getVideoEpisodes(),Xt=U.webApi.pictureInPictureApi,$i=U.state.chromecastState$,Yi=U.state.crashed$,ti=Ht.disabledControls$,It=U.ui.startedByKeyboard$,qe=U.ui.currentGridType$,yi=U.ads.duration,bo=U.ads.position,To=U.ads.playbackState,mn=U.ui.isFullscreen,Tt=U.ui.playerSize,Ut=U.ui.additionalButtonsDeprecated$,K=U.actions.internal.getVideoElement,At=U.actions.internal.replayInteractive,di=U.state.isInteractive,dt=U.state.isInteractiveTime$,wt=U.state.showInteractiveGraph,Yt=U.state.showSeekToInteractive,nt=U.state.showPlayPrevChapter,Bi=U.state.showInteractiveTimeIndicator,Fi=Ae.seekToInteractiveDisabledTooltip$,tn=Ae.graphIsOpened$,Co=U.ui.controlBlocks,Hi=m(()=>G(U.state.playPrevChapterDisabledTooltip)),ji=m(()=>G(r())),Dr=m(()=>a().has("EPISODE_BUTTON")),$o=m(()=>a().has("GRAPH_BUTTON")),so=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),ki=m(()=>a().has("PLAY_BUTTON")),on=m(()=>a().has("REPLAY_BUTTON")),nn=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Pn=m(()=>l()===vb.PLAYING),Zn=m(()=>d()==="paused"),Br=m(()=>s()&&!ie()&&!di),is=m(()=>!s()||ie()),hs=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),os=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),Jn=m(()=>u().width>300),br=m(()=>u().width>400),vn=m(v),An=m(()=>p()!==mb.NOT_AVAILABLE&&!(f()&&$()===1)&&!y()&&!di&&!g()),Bo=m(()=>w()==="LiveWaitingStart"),Ln=m(()=>!!Xt&&p()!==mb.CONNECTED&&!y()&&($()===1&&n(Bo)||!n(Bo))&&!n(vn)&&!di&&!T()),er=W(!1);Mt(()=>{let Ue=Xt==null?void 0:Xt.info.isActive$.subscribe(Lt=>O(er,Lt,!0));return()=>Ue==null?void 0:Ue.unsubscribe()});let $r=m(()=>!n(vn)&&no(I(),"s")),yr=m(()=>!e.logoHidden&&u().width>350&&!N()),Fr=m(()=>ke.features.fullscreen&&Dt()&&!(f()&&$()===1)&&(di?it():!0)&&!n(vn)&&!n(er)),ao=m(()=>!k()&&!n(vn)),Hr=m(()=>(!E()||ie())&&u().width>260&&!n(vn)&&!(ke.features.interactiveHideTime&&di)),Mn=m(()=>A()||e.showControls),Vn=m(()=>!ie()&&!E()&&!!(ht!=null&&ht.length)&&n(Jn)&&!n(Dr)&&!n(vn)),lo=m(()=>!Q()||!!H()),Ur=m(()=>wt&&no(I(),"m")),Rn=m(()=>!z()||Y()||le()===0),mt=ci({}),ui=ci({}),xr=gb(Kl,260),tr=gb(ep,260);Oe(()=>{u(),X(),xr(K(),Ht,mt,e.showControls),tr(K(),Co,ui,e.showControls)});let ir=()=>U.actions.internal.toggleChromecast();function rn(){return vt(this,null,function*(){Xt!=null&&Xt.isActive()?yield Xt==null?void 0:Xt.exit():yield Xt==null?void 0:Xt.request()})}function wr(){ua({isAudioDisabled:be,audioDisabledHintCallback:Bt,isAudioAvailable:z(),audioIsNotExistHintCallback:ft,isAds:ie()})&&ze()}let sn=W(""),gn=(Ue,Lt)=>{if(!Ue){O(sn,G("tooltip_live"),!0);return}Lt&&Lt===vb.PAUSED&&O(sn,G("tooltip_play"),!0)};Oe(()=>{gn(n(lo),l())});let Nn=ae();Oe(()=>{re()&&Nl(re(),A(),Ft)}),Oe(()=>{Zu(It,Z(),mt.playButton)});var On=MS(),Fo=de(On);{var Io=Ue=>{var Lt=kS(),xi=de(Lt);let zo;var uo=L(xi,2);let Ao;je(uo,rt=>ui.topLeft=rt,()=>ui==null?void 0:ui.topLeft);var po=L(uo,2);let Wo;var Fn=C(po);bi(Fn,1,ue,({iconUrl:rt,ariaLabel:ii,testId:mo,onClick:Ir,tooltip:qr})=>rt,(rt,ii)=>{let mo=()=>n(ii).iconUrl,Ir=()=>n(ii).ariaLabel,qr=()=>n(ii).testId,$n=()=>n(ii).onClick,he=()=>n(ii).tooltip,_t=m(()=>{var zt;return(zt=Ir())!=null?zt:he()});zm(rt,{get iconUrl(){return mo()},get ariaLabel(){return n(_t)},get testId(){return qr()},get onClick(){return $n()}})});var an=L(Fn,2);{var Zi=rt=>{ac(rt,{get ref(){return mt.autoplayNextToggle},set ref(ii){mt.autoplayNextToggle=ii}})};R(an,rt=>{e.showAutoplayNext&&!Be()&&!ne()&&rt(Zi)})}var Ji=L(an,2);{var Hn=rt=>{Jd(rt,{isMobile:!0,click:ir,get state(){return p()},get ref(){return mt.chromecast},set ref(ii){mt.chromecast=ii}})};R(Ji,rt=>{n(An)&&rt(Hn)})}var ar=L(Ji,2);{var lr=rt=>{qm(rt,{click:rn,get isPictureInPictureActive(){return f()},get ref(){return mt.pip},set ref(ii){mt.pip=ii}})};R(ar,rt=>{n(Ln)&&rt(lr)})}var Un=L(ar,2);{var bs=rt=>{Fl(rt,{get ref$(){return Nn}})};R(Un,rt=>{_e()&&!xe()&&rt(bs)})}var $s=L(Un,2);{var Ye=rt=>{Xd(rt,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return mt.vkLogo},set ref(ii){mt.vkLogo=ii}})};R($s,rt=>{n(yr)&&rt(Ye)})}S(po),je(po,rt=>ui.topRight=rt,()=>ui==null?void 0:ui.topRight);var Zt=L(po,2);let Ai;var fo=C(Zt);{var Ko=rt=>{let ii=m(()=>Pe.bind(null,!0));Qa(rt,{get click(){return n(ii)},type:"prev",isMobile:!0,get ref(){return mt.prevButton},set ref(mo){mt.prevButton=mo}})};R(fo,rt=>{n(hs)&&rt(Ko)})}var Kr=L(fo,2);{var Lo=rt=>{Ql(rt,{get disabled(){return n(ki)},get click(){return Je},isMobile:!0,get isPlaying(){return n(Pn)},get ref(){return mt.playButton},set ref(ii){mt.playButton=ii}})};R(Kr,rt=>{n(is)&&rt(Lo)})}var qo=L(Kr,2);{var ys=rt=>{ql(rt,{get disabled(){return n(on)},get click(){return Je},isMobile:!0,get ref(){return mt.replayButton},set ref(ii){mt.replayButton=ii}})};R(qo,rt=>{n(Br)&&rt(ys)})}var Us=L(qo,2);{var va=rt=>{let ii=m(()=>Fe.bind(null,!0));Qa(rt,{get click(){return n(ii)},type:"next",isMobile:!0,get ref(){return mt.nextButton},set ref(mo){mt.nextButton=mo}})};R(Us,rt=>{n(os)&&rt(va)})}S(Zt),je(Zt,rt=>ui.middle=rt,()=>ui==null?void 0:ui.middle);var zs=L(Zt,2);{var bn=rt=>{var ii=ES(),mo=de(ii);{var Ir=zt=>{var Jt=TS();let wi;Jt.__click=[wS,nn,e,Hi];var Ci=C(Jt);let Li=m(()=>!e.showControls);sc(Ci,{get hidden(){return n(Li)},get disabled(){return n(nn)},get click(){return e.playPrevChapter},get ref(){return mt.playPrevChapterButton},set ref(Si){mt.playPrevChapterButton=Si}}),S(Jt),D(Si=>wi=se(Jt,1,"wrapper-middle-left s-1b",null,wi,Si),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(zt,Jt)};R(mo,zt=>{nt&&zt(Ir)})}var qr=L(mo,2);{var $n=zt=>{var Jt=CS();let wi;var Ci=C(Jt);let Li=m(()=>!e.showControls&&!J());dc(Ci,{get hidden(){return n(Li)},get disabled(){return n($o)},get click(){return tn.toggle},get graphIsOpened(){return J()},get ref(){return mt.interactiveGraphButton},set ref(Si){mt.interactiveGraphButton=Si}}),S(Jt),D(Si=>wi=se(Jt,1,Sd(nt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1b",wi,Si),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(zt,Jt)};R(qr,zt=>{n(Ur)&&zt($n)})}var he=L(qr,2);{var _t=zt=>{var Jt=IS();let wi;Jt.__click=[SS,so,e,ji];var Ci=C(Jt);let Li=m(()=>!e.showControls);lc(Ci,{get hidden(){return n(Li)},get disabled(){return n(so)},get click(){return e.seekToInteractive},get ref(){return mt.seekToInteractiveButton},set ref(Si){mt.seekToInteractiveButton=Si}}),S(Jt),D(Si=>wi=se(Jt,1,"wrapper-middle-right s-1b",null,wi,Si),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(zt,Jt)};R(he,zt=>{Yt&&zt(_t)})}b(rt,ii)};R(zs,rt=>{di&&!v()&&rt(bn)})}D((rt,ii,mo,Ir)=>{zo=se(xi,1,"overlay-mobile s-1b",null,zo,rt),Ao=se(uo,1,"wrapper-top-left s-1b",null,Ao,ii),Wo=se(po,1,"wrapper-top-right s-1b",null,Wo,mo),Ai=se(Zt,1,"wrapper-middle s-1b",null,Ai,Ir)},[()=>({hidden:!n(Mn)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||v()||e.endScreenShown&&e.showNextPrevButtons})]),b(Ue,Lt)};R(Fo,Ue=>{ie()||Ue(Io)})}var or=L(Fo,2);{var Eo=Ue=>{var Lt=AS(),xi=de(Lt);let zo;var uo=C(xi);tp(uo,{get muted(){return Y()},click:wr,get ref(){return mt.volume},set ref(Zi){mt.volume=Zi}}),S(xi);var Ao=L(xi,2);{var po=Zi=>{var Ji=PS(),Hn=C(Ji);let ar=m(()=>!n(Zn));Ql(Hn,{get disabled(){return n(ki)},get click(){return Je},isMobile:!0,get isPlaying(){return n(ar)},get ref(){return mt.playButton},set ref(lr){mt.playButton=lr}}),S(Ji),b(Zi,Ji)};R(Ao,Zi=>{n(Zn)&&Zi(po)})}var Wo=L(Ao,2);let Fn;var an=C(Wo);uc(an,{get position(){return Ne()},get duration(){return pe()}}),S(Wo),D((Zi,Ji)=>{zo=se(xi,1,"wrapper-top-right s-1b",null,zo,Zi),Fn=se(Wo,1,"wrapper-bottom ads-timeline-mobile s-1b",null,Fn,Ji)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(Ue,Lt)};R(or,Ue=>{ie()&&d()!=="inactive"&&Ue(Eo)})}var Ui=L(or,2);let Dn;var nr=C(Ui);let rr;var sr=C(nr),Ho=C(sr),Sr=C(Ho);{var xt=Ue=>{Do(Ue,{get disabled(){return n(on)},get ref(){return mt.replayButton},set ref(Lt){mt.replayButton=Lt},children:(Lt,xi)=>{ql(Lt,{get disabled(){return n(on)},get click(){return At}})},$$slots:{default:!0}})};R(Sr,Ue=>{di&&Ue(xt)})}var Et=L(Sr,2);{var co=Ue=>{Do(Ue,{get ref(){return mt.liveButton},set ref(Lt){mt.liveButton=Lt},children:(Lt,xi)=>{cc(Lt,{get isLiveActive(){return n(lo)},isMobile:!0,get ariaLabel(){return n(sn)}})},$$slots:{default:!0}})};R(Et,Ue=>{!ie()&&E()&&Ue(co)})}var ko=L(Et,2);{var yo=Ue=>{let Lt=m(()=>ie()?Ne():P()),xi=m(()=>ie()?pe():Ke()),zo=m(()=>!e.showControls);Gd(Ue,{get showDuration(){return n(br)},get position(){return n(Lt)},get duration(){return n(xi)},isMobile:!0,get isHidden(){return n(zo)},get ref(){return mt.time},set ref(uo){mt.time=uo}})};R(ko,Ue=>{n(Hr)&&Ue(yo)})}var xo=L(ko,2);let Vi=m(()=>!n(Vn));Do(xo,{className:"w-max",get disabled(){return n(Vi)},get ref(){return mt.episodes},set ref(Ue){mt.episodes=Ue},children:(Ue,Lt)=>{var xi=Le(),zo=de(xi);{var uo=Ao=>{var po=LS(),Wo=L(de(po),2);ec(Wo,{get position(){return P()},get duration(){return Ke()},get timeCodes(){return ht}}),b(Ao,po)};R(zo,Ao=>{n(Vn)&&Ao(uo)})}b(Ue,xi)},$$slots:{default:!0}}),S(Ho),je(Ho,Ue=>ui.bottomLeft=Ue,()=>ui==null?void 0:ui.bottomLeft);var Bn=L(Ho,2),Xi=C(Bn);{var zr=Ue=>{Do(Ue,{get ref(){return mt.volume},set ref(Lt){mt.volume=Lt},children:(Lt,xi)=>{tp(Lt,{get muted(){return n(Rn)},click:wr})},$$slots:{default:!0}})};R(Xi,Ue=>{n(ao)&&Ue(zr)})}var Pi=L(Xi,2);{var _s=Ue=>{Do(Ue,{get ref(){return mt.settings},set ref(Lt){mt.settings=Lt},children:(Lt,xi)=>{Fl(Lt,{get ref$(){return Nn}})},$$slots:{default:!0}})};R(Pi,Ue=>{n($r)&&Ue(_s)})}var ns=L(Pi,2);{var Tr=Ue=>{Do(Ue,{get ref(){return mt.fullscreen},set ref(Lt){mt.fullscreen=Lt},children:(Lt,xi)=>{jd(Lt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(ns,Ue=>{n(Fr)&&Ue(Tr)})}S(Bn),je(Bn,Ue=>ui.bottomRight=Ue,()=>ui==null?void 0:ui.bottomRight),S(sr),je(sr,Ue=>j(Ue),()=>j());var Uo=L(sr,2);let Wr=m(()=>!e.showControls);Ya(Uo,{get isHidden(){return n(Wr)},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(nr),je(nr,Ue=>ui.bottom=Ue,()=>ui==null?void 0:ui.bottom),S(Ui),je(Ui,Ue=>Te(Ue),()=>Te());var hn=L(Ui,2);{var _n=Ue=>{nc(Ue,{get ref(){return mt.interactiveTimeIndicator},set ref(Lt){mt.interactiveTimeIndicator=Lt}})};R(hn,Ue=>{Bi&&Ue(_n)})}D((Ue,Lt)=>{Dn=se(Ui,1,"wrapper-bottom mobile s-1b",null,Dn,Ue),rr=se(nr,1,"controls-wrapper s-1b",null,rr,Lt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,On),F(),o()}Ze(["click"]);function pc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(T,"$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,""),v=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),f=h(e,"customFullscreenSupported",3,!0),$=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,hb),g=h(e,"onDisabledSeekToInteractiveClick",3,hb),T=ve().ui.isMobile,I=W(!1);Mt(()=>{let A=setTimeout(()=>O(I,!0),0);return()=>clearTimeout(A)});var N=Le(),k=de(N);{var E=A=>{var Q=Le(),H=de(Q);{var z=le=>{Qm(le,{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 v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return f()},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)}})},Y=le=>{Um(le,{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 v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return f()},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,le=>{r()?le(z):le(Y,!1)})}b(A,Q)};R(k,A=>{n(I)&&A(E)})}b(t,N),F(),o()}var RS=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 fc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${un(e.size)}${n(i)}`);Xe(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=RS();b(r,l)},$$slots:{default:!0}}),F()}var NS=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 Gm(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"}`);Xe(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=NS();b(a,d)},$$slots:{default:!0}}),F()}var OS=M('<span class="hot-key-helpers-text s-u"> </span>'),DS=M('<div data-testid="hotkey-helper-icon" class="s-u"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),BS=M("<div><!></div>"),FS={hash:"s-u",code:'.hot-key-helpers-container.s-u{align-items:center;animation:s-u-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-u{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-u{left:calc(75% - 100px)}.hot-key-helpers-text.s-u{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-u{animation:s-u-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-u-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-u-fadeOut{0%{opacity:1}to{opacity:0}}'};function Ym(t,e){B(e,!0),q(t,FS);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Vt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var T;return((T=r())==null?void 0:T.type)==="BACKWARD_SEEK"}),v=m(()=>{var T;return((T=r())==null?void 0:T.type)==="FORWARD_SEEK"}),p=m(()=>{var T;return(T=r())==null?void 0:T.type}),f=m(()=>{var T,I;return(T=r())!=null&&T.t?d(r().t.key,{value:r().t.value||""}):(I=r())==null?void 0:I.text});var $=BS();let y;var g=C($);{var w=T=>{var I=DS(),N=de(I),k=C(N);{var E=j=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");Gm(j,{get reversed(){return n(ie)},shadow:!0})};R(k,j=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&j(E)})}var A=L(k,2);{var Q=j=>{Bs(j,{get size(){return"48"},shadow:!0})};R(A,j=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&j(Q)})}var H=L(A,2);{var z=j=>{En(j,{get size(){return"48"},shadow:!0})};R(H,j=>{n(p)==="PLAY"&&!l.playbackStatusShow&&j(z)})}var Y=L(H,2);{var le=j=>{rc(j,{get size(){return"48"},shadow:!0})};R(Y,j=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&j(le)})}var X=L(Y,2);{var re=j=>{pa(j,{get size(){return"48"},type:"off",shadow:!0})};R(X,j=>{n(p)==="SUBTITLES_OFF"&&j(re)})}var Z=L(X,2);{var we=j=>{pa(j,{get size(){return"48"},shadow:!0})};R(Z,j=>{n(p)==="SUBTITLES_ON"&&j(we)})}var ue=L(Z,2);{var ne=j=>{let ie=m(()=>n(p)==="RATE_DOWN");fc(j,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(ue,j=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&j(ne)})}var _e=L(ue,2);{var xe=j=>{let ie=m(()=>n(p)==="EPISODE_PREV");ma(j,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,j=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&j(xe)})}var J=L(_e,2);{var Ne=j=>{fa(j,{get size(){return"48"},volume:0,shadow:!0})};R(J,j=>{n(p)==="MUTE"&&j(Ne)})}var pe=L(J,2);{var P=j=>{fa(j,{get size(){return"48"},volume:1,shadow:!0})};R(pe,j=>{n(p)==="VOLUME"&&j(P)})}S(N);var Ke=L(N,2);{var Te=j=>{var ie=OS(),De=C(ie,!0);S(ie),D(()=>me(De,n(f))),b(j,ie)};R(Ke,j=>{n(f)&&j(Te)})}D(()=>Ve(N,"data-type",n(p))),b(T,I)};R(g,T=>{!n(s)&&n(p)&&T(w)})}S($),D(T=>y=se($,1,"hot-key-helpers-container s-u",null,y,T),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(v)})]),b(t,$),F(),o()}var HS=(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}},US=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},zS=M('<div tabindex="0" role="button"><div class="button-block s-z" aria-hidden="true"><div class="button-row s-z"><div class="button button-up s-z"><!></div> <div class="button button-right s-z"><!></div></div> <div class="button-row s-z"><div class="button button-left s-z"><!></div> <div class="button button-down s-z"><!></div></div></div></div>'),WS={hash:"s-z",code:".immersive-controls.s-z{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-z{left:20px;top:50px}.button-block.s-z{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-z{display:flex;flex-direction:row;position:relative}.button.s-z{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-z svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-z svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-z svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-z svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-z svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-z:hover svg{opacity:1}"};function mc(t,e){B(e,!0),q(t,WS);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),v=G("aria_label_spherical_control");var p=zS();let f;p.__keydown=[HS,r,a,l,s,d],p.__keyup=[US,r,u];var $=C(p),y=C($),g=C(y);g.__mousedown=a,g.__mouseup=u;var w=C(g);Nr(w,{direction:"up",useBtnColor:!0}),S(g);var T=L(g,2);T.__mousedown=d,T.__mouseup=u;var I=C(T);Nr(I,{direction:"up",useBtnColor:!0}),S(T),S(y);var N=L(y,2),k=C(N);k.__mousedown=s,k.__mouseup=u;var E=C(k);Nr(E,{direction:"up",useBtnColor:!0}),S(k);var A=L(k,2);A.__mousedown=l,A.__mouseup=u;var Q=C(A);Nr(Q,{direction:"up",useBtnColor:!0}),S(A),S(N),S($),S(p),D(H=>{f=se(p,1,"immersive-controls s-z",null,f,H),Ve(p,"aria-label",v)},[()=>({"m-shifted":i()})]),st("mouseleave",g,u),st("mouseleave",T,u),st("mouseleave",k,u),st("mouseleave",A,u),b(t,p),F()}Ze(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as bb,Subscription as KS,filterChanged as qS,filter as QS}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 ip=class{constructor(){this.flickeringTimeout=_b(1e3);this.subscriptions=new KS;this.isAuto=!1;this.isLive=!1;this.captions$=new bb([]);this.captionsPrepared$=new bb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(QS(()=>this.isEnabled()),qS()).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 GS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),YS=M('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),jS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),XS=M('<div><span class="caption s-a"><!></span></div>'),ZS=M("<div><!></div>"),JS={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 Xa(t,e){B(e,!0),q(t,JS);let[i,o]=Re(),r=()=>x(f,"$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),v=ve(),p=Vt(),f=v.state.currentSubtitle$,$=v.state.isAutoSubtitleCaptionVisible$,y=v.state.isLive$,g=v.ui.isFullscreen,w=v.ui.previewTrackActive,T=m(()=>!!r().isAuto),I=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),k=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=W(null);Oe(()=>{var X,re,Z;(X=n(E))==null||X.setIsAuto(n(T)),(re=n(E))==null||re.setIsLive(n(I)),(Z=n(E))==null||Z.setCaptions(e.captions)});let A=W(ci([[]]));Mt(()=>{O(E,new ip().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(re=>{O(A,re,!0)});return()=>{var re;(re=n(E))==null||re.destroy(),X.unsubscribe()}}),Mt(()=>{if(n(T)){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=ZS();let z;var Y=C(H);{var le=X=>{var re=XS();let Z;var we=C(re),ue=C(we);{var ne=xe=>{var J=GS(),Ne=C(J),pe=C(Ne,!0);S(Ne),S(J),D(P=>{var Ke;Qe(Ne,`font-size: ${(Ke=n(k))!=null?Ke:""}px`),me(pe,P)},[()=>G("subtitles_auto_caption")]),b(xe,J)},_e=(xe,J)=>{{var Ne=P=>{var Ke=Le(),Te=de(Ke);bi(Te,17,()=>n(A),xd,(j,ie)=>{var De=YS(),Be=C(De);bi(Be,21,()=>n(ie),({value:it,timeAppeared:U})=>U,(it,U)=>{let Ae=()=>n(U).value,ke=()=>n(U).timeAppeared;var ze=Le(),Je=de(ze);{var ye=Pe=>{var Fe=cs();D(()=>me(Fe,Ae())),b(Pe,Fe)};R(Je,Pe=>{(!ke()||ke()<=e.position)&&Pe(ye)})}b(it,ze)}),S(Be),S(De),D(()=>{var it;return Qe(Be,`font-size: ${(it=n(k))!=null?it:""}px`)}),b(j,De)}),b(P,Ke)},pe=P=>{var Ke=Le(),Te=de(Ke);bi(Te,17,()=>e.captions,({value:j})=>j,(j,ie)=>{let De=()=>n(ie).value;var Be=jS(),it=C(Be),U=C(it,!0);S(it),S(Be),D(()=>{var Ae;Qe(it,`font-size: ${(Ae=n(k))!=null?Ae:""}px`),me(U,De())}),b(j,Be)}),b(P,Ke)};R(xe,P=>{var Ke;n(T)&&((Ke=n(A))!=null&&Ke.length)?P(Ne):P(pe,!1)},J)}};R(ue,xe=>{n(T)&&s()?xe(ne):xe(_e,!1)})}S(we),S(re),D(xe=>{var J;Z=se(re,1,"subtitles-caption s-a",null,Z,xe),Qe(re,`--subtitles-caption-margin: ${(J=n(Q))!=null?J:""}%`)},[()=>({mobile:u()})]),b(X,re)};R(Y,X=>{var re;(e.captions.length||(re=n(A))!=null&&re.length)&&X(le)})}S(H),D(X=>z=se(H,1,"subtitles-container s-a",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(T)&&!n(I)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as e2}from"@vkontakte/videoplayer-core/es2015";var t2=M('<div class="text s-11"> </div>'),i2=M('<div><div class="icon_wrapper s-11"><!></div> <!></div>'),o2={hash:"s-11",code:".wrapper.s-11{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-11{background-size:cover}.icon_wrapper.s-11{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-11{margin-top:20px}"};function vc(t,e){B(e,!0),q(t,o2);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Vt();var r=i2();let a;var l=C(r),d=C(l);Zd(d,{get size(){return"48"},get iconState(){return e2.CONNECTED}}),S(l);var s=L(l,2);{var u=v=>{var p=t2(),f=C(p);S(p),D(()=>{var $;return me(f,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(v,p)};R(s,v=>{i()&&v(u)})}S(r),D(v=>{a=se(r,1,"wrapper s-11",null,a,v),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()}var n2=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 jm(t){Xe(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=n2();b(e,o)},$$slots:{default:!0}})}var r2=M('<div class="container s-5"><!></div>'),s2={hash:"s-5",code:".container.s-5{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function Za(t){q(t,s2);var e=r2(),i=C(e);jm(i,{}),S(e),b(t,e)}var a2=M('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),l2=M('<div data-testid="unstarted-thumb"><!></div>'),d2={hash:"s-b",code:".container.s-b{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-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{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-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function Ja(t,e){B(e,!0),q(t,d2);let i=h(e,"iconVisible",3,!0),o=ve(),r=Vt(),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=l2();let v;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=C(u);{var f=$=>{var y=a2();y.__keydown=d;var g=L(C(y),2);En(g,{get size(){return"48"}}),S(y),D(()=>Ve(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(f)})}return S(u),D($=>{v=se(u,1,"container s-b",null,v,$),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})}Ze(["click","contextmenu","keydown"]);var c2=M('<span class="text s-t"> </span>'),u2=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},p2=M('<a target="_blank" class="link s-t"><!></a>'),f2=M('<div data-testid="video_title"><!></div>'),m2={hash:"s-t",code:".title.s-t{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-t,.title.s-t{color:var(--white)}.link.s-t{pointer-events:auto;text-decoration:none}.link.s-t:hover{text-decoration:underline}.text.s-t{pointer-events:auto}.size-sm.s-t{font-size:14px;font-weight:500;line-height:18px}.hidden.s-t{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Xm(t,e){var y;B(e,!0),q(t,m2);let i=g=>{var w=c2(),T=C(w,!0);S(w),je(w,I=>l(I),()=>l()),D(()=>me(T,o())),st("mouseenter",w,function(...I){var N;(N=e.onMouseEnter)==null||N.apply(this,I)}),st("mouseleave",w,function(...I){var N;(N=e.onMouseLeave)==null||N.apply(this,I)}),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=W(void 0);Mt(()=>{var w;requestAnimationFrame(()=>{var T;(T=e.onVisibilityChanged)==null||T.call(e,!0)});function g(T){var I;T.propertyName==="transform"&&((I=e.onVisibilityChanged)==null||I.call(e,!r()))}return(w=n(d))==null||w.addEventListener("transitionend",g),()=>{var T;return(T=n(d))==null?void 0:T.removeEventListener("transitionend",g)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=f2();let v;var p=C(u);{var f=g=>{var w=p2();w.__click=[u2,e];var T=C(w);i(T),S(w),D(()=>Ve(w,"href",s||"")),b(g,w)},$=g=>{i(g)};R(p,g=>{s||e.onTitleClicked?g(f):g($,!1)})}S(u),je(u,g=>O(d,g),()=>n(d)),D(g=>v=se(u,1,`title size-${a()}`,"s-t",v,g),[()=>({hidden:r()})]),b(t,u),F()}Ze(["click"]);import{throttleFn as y2}from"@vkontakte/videoplayer-shared/es2015";var v2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),g2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),h2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),_2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div>'),b2=M("<div><!> <!> <!> <!></div>"),$2={hash:"s-1a",code:".timer__container.s-1a{align-items:flex-start;display:flex;justify-content:center}.cell.s-1a{align-items:center;display:flex;flex-direction:column}.cell__value.s-1a{font-size:48px;font-weight:600;line-height:1.2}.small.s-1a .cell__value:where(.s-1a){font-size:24px}.cell__unit.s-1a{font-size:14px;font-weight:400;line-height:1.2}.small.s-1a .cell__unit:where(.s-1a){font-size:12px}.timer__points.s-1a{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1a .timer__points:where(.s-1a){font-size:20px}"};function Zm(t,e){B(e,!0),q(t,$2);let i=W(""),o=W(""),r=W(""),a=W(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),v=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*v(H)}px`,f=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let Y=Math.floor(H/3600);O(o,u(Y),!0);let le=Math.floor(H/60)%60;O(r,u(le),!0);let X=H%60;O(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;f(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Mt(()=>{l=requestAnimationFrame($)}),cn(()=>{cancelAnimationFrame(l)});var y=b2();let g;var w=C(y);{var T=H=>{var z=v2(),Y=de(z);let le;var X=C(Y),re=C(X,!0);S(X);var Z=L(X,2),we=C(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=C(ue,!0);S(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(i)),me(we,xe),me(ne,J)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(w,H=>{n(i)&&H(T)})}var I=L(w,2);{var N=H=>{var z=g2(),Y=de(z);let le;var X=C(Y),re=C(X,!0);S(X);var Z=L(X,2),we=C(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=C(ue,!0);S(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(o)),me(we,xe),me(ne,J)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(I,H=>{n(o)&&H(N)})}var k=L(I,2);{var E=H=>{var z=h2(),Y=de(z);let le;var X=C(Y),re=C(X,!0);S(X);var Z=L(X,2),we=C(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=C(ue,!0);S(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(r)),me(we,xe),me(ne,J)},[()=>p(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(k,H=>{n(r)&&H(E)})}var A=L(k,2);{var Q=H=>{var z=_2();let Y;var le=C(z),X=C(le,!0);S(le);var re=L(le,2),Z=C(re,!0);S(re),S(z),D((we,ue)=>{Y=Qe(z,"",Y,{width:we}),me(X,n(a)),me(Z,ue)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(A,H=>{n(a)&&H(Q)})}S(y),D(H=>g=se(y,1,"timer__container s-1a",null,g,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var x2=M('<div class="waiting s-w"><span> </span></div>'),w2=M('<div class="upcoming-timer timer s-w"><span> </span> <!></div>'),S2=M('<div class="waiting-container s-w"><!></div>'),T2={hash:"s-w",code:'.waiting-container.s-w{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-w,.waiting-container.s-w:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-w:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-w{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-w{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-w{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-w{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-w{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-w{font-size:15px}.medium.s-w{font-size:17px}'};function gc(t,e){B(e,!0),q(t,T2);let i=h(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=W(void 0),a=W(void 0),l=0,d=W(void 0),s=W(void 0),u=m(()=>{var w,T;return((w=n(d))!=null?w:1/0)<=509||((T=n(s))!=null?T:1/0)<=320}),v=m(()=>{var w,T;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((T=n(s))!=null?T:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?y2(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(v)?"m":"l"},T=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,T)})},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(v)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var f=S2();f.__contextmenu=function(...w){var T;(T=e.onContextMenu)==null||T.apply(this,w)},f.__click=function(...w){var T;(T=e.onClick)==null||T.apply(this,w)};var $=C(f);{var y=w=>{var T=x2(),I=C(T);let N;var k=C(I,!0);S(I),S(T),je(T,E=>O(r,E),()=>n(r)),D((E,A)=>{N=se(I,1,"waiting__title s-w",null,N,E),me(k,A)},[()=>({medium:n(v),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(w,T)},g=w=>{var T=w2(),I=C(T);let N;var k=C(I,!0);S(I);var E=L(I,2);let A=m(()=>n(u)||n(v)),Q=m(()=>i()||0);Zm(E,{get isSmallSize(){return n(A)},get startTime(){return n(Q)},onTimerOver:()=>O(o,!0)}),S(T),je(T,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(I,1,"timer__title s-w",null,N,H),me(k,z)},[()=>({medium:n(v),small:n(u)}),()=>G("waiting_live_timer_title")]),b(w,T)};R($,w=>{n(o)?w(y):w(g,!1)})}S(f),D(()=>Qe(f,`background-image: url(${e.thumbUrl})`)),Cn(f,"clientWidth",w=>O(d,w)),Cn(f,"clientHeight",w=>O(s,w)),b(t,f),F()}Ze(["contextmenu","click"]);var C2=M('<div class="waiting-container s-v"><div class="waiting-caption s-v"><!> <p class="waiting-title s-v"> </p></div></div>'),I2={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 el(t,e){B(e,!0),q(t,I2);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=C2();a.__contextmenu=function(...v){var p;(p=e.onContextMenu)==null||p.apply(this,v)},a.__click=function(...v){var p;(p=e.onClick)==null||p.apply(this,v)};var l=C(a),d=C(l);za(d,{style:"position: static; transform: translate(0, 0)"});var s=L(d,2),u=C(s,!0);S(s),S(l),S(a),D(()=>{Qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}Ze(["contextmenu","click"]);var E2=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 Jm(t){Xe(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=E2();b(e,o)},$$slots:{default:!0}})}var k2=M('<div class="select-icon s-1x"><!></div>'),P2={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function hc(t){q(t,P2);var e=k2(),i=C(e);Jm(i,{}),S(e),b(t,e)}var A2=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},L2=(t,e)=>{Ol(t,()=>e.item.selectItem(e.item.value))},M2=M("<p> </p>"),V2=M('<p class="sublabel s-1u"> </p>'),R2=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),N2={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 ev(t,e){B(e,!0),q(t,N2);let i=h(e,"isMobile",3,!1);var o=R2();let r;o.__click=[A2,e],o.__keydown=[L2,e];var a=C(o);{var l=y=>{hc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=L(a,2);let s;var u=C(d);{var v=y=>{var g=Le(),w=de(g);Oi(w,()=>e.item.valueComponent,(T,I)=>{I(T,Ls(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,g)},p=y=>{var g=M2();let w;var T=C(g,!0);S(g),D(I=>{var N;w=se(g,1,"label s-1u",null,w,I),me(T,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,g)};R(u,y=>{e.item.valueComponent?y(v):y(p,!1)})}var f=L(u,2);{var $=y=>{var g=V2(),w=C(g,!0);S(g),D(()=>me(w,e.item.sublabel)),b(y,g)};R(f,y=>{e.item.sublabel&&y($)})}S(d),S(o),D((y,g,w)=>{r=se(o,1,"item",null,r,y),Ve(o,"data-value",e.item.value),Ve(o,"aria-label",g),Ve(o,"data-testid",e.item.dataTestid),s=se(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()})]),b(t,o),F()}Ze(["click","keydown"]);var O2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function tv(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=>Nu(g,n(r)));var l=O2();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=C(l);{var u=g=>{hc(g,{})};R(s,g=>{e.item.selected&&g(u)})}var v=L(s,2);let p;var f=C(v);{var $=g=>{var w=Le();let T=m(()=>e.item.valueComponent);var I=de(w);Oi(I,()=>n(T),(N,k)=>{k(N,Ls(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(g,w)},y=g=>{var w=cs();D(()=>me(w,e.item.label)),b(g,w)};R(f,g=>{e.item.valueComponent?g($):g(y,!1)})}S(v),S(l),je(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 T;d=se(l,1,"item",null,d,g),Ve(l,"aria-label",(T=e.item.ariaLabel)!=null?T:e.item.label),Ve(l,"data-testid",e.item.id),p=se(v,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}Ze(["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 B2=(t,e)=>{D_(t,e.returnFromSubMenu,e.closeSettingsMenu)},F2=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},H2=(t,e)=>{Fd(t)&&(Or(t),e.returnFromSubMenu())},U2=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1m"> </p></li> <!></ul></div>'),z2={hash:"s-1m",code:".sub-menu.s-1m{--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-1m .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1m{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1m{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1m .items:where(.s-1m) .item.header:where(.s-1m){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-1m .title:where(.s-1m){margin-left:8px}.sub-menu.s-1m .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1m .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1m .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1m .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1m .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1m .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1m .item .sublabel{font-size:12px;line-height:14px}.item.s-1m:not(.mobile) p:where(.s-1m),.sub-menu.s-1m .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function ov(t,e){B(e,!0),q(t,z2);let[i,o]=Re(),r=()=>x(p,"$isFullscreen",i),a=()=>x(f,"$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);Mt(()=>{let X=e.items.findIndex(re=>re.selected);u().children[X+1].focus()});let v=ve(),p=v.ui.isFullscreen,f=v.ui.playerSize,$=W(void 0),y=W(0),g=W(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;`),T=m(()=>Math.max(e.minWidth,n(y)));var I=U2();let N;var k=C(I);let E;k.__keydown=[B2,e];var A=C(k);let Q;A.__click=[F2,e],A.__keydown=[H2,e];var H=C(A);Nr(H,{direction:"left"});var z=L(H,2),Y=C(z,!0);S(z),S(A),je(A,X=>O($,X),()=>n($));var le=L(A,2);bi(le,17,()=>e.items,xd,(X,re)=>{var Z=Le(),we=de(Z);{var ue=_e=>{ev(_e,{get item(){return n(re)},get isMobile(){return l()}})},ne=(_e,xe)=>{{var J=Ne=>{tv(Ne,{get isMobile(){return l()},get item(){return n(re)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Ne=>{n(re).type==="OPEN_SUB_MENU"&&Ne(J)},xe)}};R(we,_e=>{n(re).type==="SELECT_VALUE"?_e(ue):_e(ne,!1)})}b(X,Z)}),S(k),je(k,X=>u(X),()=>u()),S(I),D((X,re,Z)=>{N=se(I,1,"sub-menu menu s-1m",null,N,X),Ve(I,"data-testid",`${e.id}-sub-menu`),Qe(I,`min-width: ${n(T)}px`),E=se(k,1,"items s-1m",null,E,re),Qe(k,n(w)),Q=se(A,1,"item header back s-1m",null,Q,Z),Ve(A,"aria-label",s()),me(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Cn(A,"clientWidth",X=>O(y,X)),Cn(A,"clientHeight",X=>O(g,X)),b(t,I),F(),o()}Ze(["keydown","click"]);import{noop as W2}from"@vkontakte/videoplayer-shared/es2015";var K2=(t,e)=>Nu(t,e()),q2=(t,e)=>{t.stopPropagation(),e()()},Q2=M('<div class="value s-1o"> </div>'),G2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),Y2={hash:"s-1o",code:".value.s-1o{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function nv(t,e){B(e,!0),q(t,Y2);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,W2),r=h(e,"valueComponent",3,void 0),a=h(e,"ref",15);var l=G2();let d;l.__click=[q2,o],l.__keydown=[K2,o];var s=C(l),u=C(s);{var v=T=>{Ga(T,{get icon(){return e.icon}})},p=T=>{var I=Le();let N=m(()=>e.icon);var k=de(I);Oi(k,()=>n(N),(E,A)=>{A(E,{})}),b(T,I)};R(u,T=>{typeof e.icon=="string"?T(v):T(p,!1)})}S(s);var f=L(s,2),$=C(f,!0);S(f);var y=L(f,2);{var g=T=>{var I=Le();let N=m(r);var k=de(I);Oi(k,()=>n(N),(E,A)=>{A(E,{})}),b(T,I)},w=T=>{var I=Q2(),N=C(I,!0);S(I),D(()=>me(N,e.value)),b(T,I)};R(y,T=>{r()?T(g):T(w,!1)})}S(l),je(l,T=>a(T),()=>a()),D(T=>{d=se(l,1,"item",null,d,T),Ve(l,"aria-label",e.ariaLabel),Ve(l,"data-testid",e.id),me($,e.label)},[()=>({mobile:i()})]),b(t,l),F()}Ze(["click","keydown"]);import{noop as yb}from"@vkontakte/videoplayer-shared/es2015";var j2=(t,e)=>{Ol(t,()=>e())},X2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),Z2=M('<img class="icon" aria-hidden="true"/>'),J2=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),eT={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function rv(t,e){B(e,!0),q(t,eT);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,yb),r=h(e,"closeSettings",3,yb),a=W(!1),l=()=>{O(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=J2();let u;s.__click=d,s.__keydown=[j2,d];var v=C(s),p=C(v);{var f=w=>{var T=Le(),I=de(T);{var N=E=>{var A=X2();b(E,A)},k=E=>{var A=Z2();D(()=>Ve(A,"src",e.icon)),st("error",A,l),La(A),b(E,A)};R(I,E=>{n(a)?E(N):E(k,!1)})}b(w,T)},$=w=>{var T=Le();let I=m(()=>e.icon);var N=de(T);Oi(N,()=>n(I),(k,E)=>{E(k,{})}),b(w,T)};R(p,w=>{typeof e.icon=="string"?w(f):w($,!1)})}S(v);var y=L(v,2),g=C(y,!0);S(y),S(s),D(w=>{var T;u=se(s,1,"item",null,u,w),Ve(s,"aria-label",(T=e.ariaLabel)!=null?T:e.label),Ve(s,"data-testid",e.id),me(g,e.label)},[()=>({mobile:i()})]),b(t,s),F()}Ze(["click","keydown"]);import{noop as oT}from"@vkontakte/videoplayer-shared/es2015";var tT=M('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),iT={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 sv(t,e){q(t,iT);let i=h(e,"enabled",3,!1);var o=tT(),r=C(o);let a;fi(2),S(o),D(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),b(t,o)}var nT=(t,e,i)=>{B_(t,e(),o=>i()(o))},rT=(t,e,i)=>{t.stopPropagation(),e()(!i())},sT=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),aT=M('<li role="menuitem" tabindex="0"><!></li>');function av(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,oT),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=aT();let s;d.__click=[rT,o,r],d.__keydown=[nT,r,o];var u=C(d);Wa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(v,p)=>{var f=sT();let $;var y=C(f),g=C(y);{var w=E=>{Ga(E,{get icon(){return e.icon}})},T=E=>{var A=Le();let Q=m(()=>e.icon);var H=de(A);Oi(H,()=>n(Q),(z,Y)=>{Y(z,{})}),b(E,A)};R(g,E=>{typeof e.icon=="string"?E(w):E(T,!1)})}S(y);var I=L(y,2),N=C(I,!0);S(I);var k=L(I,2);sv(k,{get enabled(){return r()}}),S(f),D(E=>{$=se(f,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(v,f)},$$slots:{default:!0}}),S(d),D(v=>{var p;s=se(d,1,"item switch-item",null,s,v),Ve(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}Ze(["click","keydown"]);import{isValidURL as LT,VideoQuality as Lb}from"@vkontakte/videoplayer-shared/es2015";var xb=()=>{let t=W(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 lT}from"@vkontakte/videoplayer-shared/es2015";var dT=M('<div class="quality-icon s-1q"><!></div>'),cT=M('<div class="quality-label s-1q"><span> </span> <!></div>'),uT={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 tl(t,e){B(e,!0),q(t,uT);let i=h(e,"isSubCase",3,!1),o=m(()=>e.quality?lT(e.quality):""),r=m(()=>Uu(e.quality));var a=cT(),l=C(a);let d;var s=C(l,!0);S(l);var u=L(l,2);{var v=p=>{var f=dT();let $=m(()=>n(r));var y=C(f);Oi(y,()=>n($),(g,w)=>{w(g,{})}),S(f),D(()=>Ve(f,"data-testid",`${n(o)}-icon`)),b(p,f)};R(u,p=>{n(r)&&!e.isMobile&&p(v)})}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 pT}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as wb}from"@vkontakte/videoplayer-core/es2015";var Sb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},Tb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=Sb({quality:t,availableQualities:e});return i?t===wb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},Cb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===wb.INVARIANT?i:`${i}${Sb({quality:t,availableQualities:e})}`:"...";var fT=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),mT={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Gl(t,e){B(e,!0),q(t,mT);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(v,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,v=d.ui.isMobile,p=" · ",f=m(()=>e.prefix+(e.selected&&r()!==pT.INVARIANT?p:"")),$=m(()=>Cb({prefix:n(f),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=fT(),g=C(y);let w=m(()=>e.selected?r():void 0);tl(g,{get quality(){return n(w)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var vT=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")},gT={br:!0,span:!0},lv=(t,e={})=>{var d,s,u,v,p,f,$;if(!t)return t;let i=Ie(Ie({},gT),e),o=Object.keys(i);if(!o.length)return t;let r=vT(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)||((v=y.groups)==null?void 0:v.keyi18nself)||"",{index:T}=y;if(!i[w]){a.push(t.slice(l,T)),l=T+g.length;continue}let I=(p=y.groups)!=null&&p.childrenhtml?lv(y.groups.childrenhtml,i):"",N=(f=y.groups)!=null&&f.childrenhtml?g.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>I||""):g;a.push(t.slice(l,T),N),l=T+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=lv(i());wo();var r=Le(),a=de(r);{var l=d=>{var s=Le(),u=de(s);wd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var hT=M('<p class="quality-applies sublabel s-1t"><!></p>'),_T={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 dv(t,e){B(e,!1),q(t,_T),wo();var i=hT(),o=C(i);let r=yn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));_c(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var Eb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",selected:o,valueComponent:Gl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},cv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?Gl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),kb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:dv,bottomBordered:!0,children:"quality-appliance"}),uv=({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?Gl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),pv=({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?Gl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var op=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),np=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=tc(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=op(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=op(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=op(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=op(t,e);return G("audio_stream_display_unknown",{index:a})};var bT={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:cv,selected:e&&!o&&!r||!1}),a.push({handler:pv,selected:o},{handler:uv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[kb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),Eb(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:tl,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:cv,selected:((i=Su())==null?void 0:i.type)==="auto_quality"},{handler:pv,selected:((o=Su())==null?void 0:o.type)==="traffic_saving"},{handler:uv,selected:((r=Su())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-languages":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-languages",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:np(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===kn?"sub_off":void 0}))})},Pb=({subMenuId:t,context:e})=>t?[bT[t](e)]:[];var $T=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 fv(t){Xe(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=$T();b(e,o)},$$slots:{default:!0}})}var yT=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 mv(t){Xe(t,{width:"18",height:"15",children:(e,i)=>{var o=yT();b(e,o)},$$slots:{default:!0}})}var xT=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 vv(t){Xe(t,{testId:"play-speed-icon",children:(e,i)=>{var o=xT();b(e,o)},$$slots:{default:!0}})}var wT=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 gv(t){Xe(t,{testId:"download-icon",children:(e,i)=>{var o=wT();b(e,o)},$$slots:{default:!0}})}var ST=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 hv(t){Xe(t,{testId:"report-icon",children:(e,i)=>{var o=ST();b(e,o)},$$slots:{default:!0}})}var TT=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 rp(t){Xe(t,{children:(e,i)=>{var o=TT();b(e,o)},$$slots:{default:!0}})}var CT=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 _v(t){Xe(t,{testId:"info-icon",children:(e,i)=>{var o=CT();b(e,o)},$$slots:{default:!0}})}var IT=M('<div class="menu-item-value-wrapper s-1w"><!></div>'),ET={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function bv(t,e){B(e,!0),q(t,ET);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(v,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(f,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,v=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,f=s.ui.isMobile,$=m(()=>Tb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=IT(),g=C(y);tl(g,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var PT={"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:Qd,label:G("menu_quality"),value:e,valueComponent:bv,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:fv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-languages-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=np(t,e);return{id:"audio-languages-settings",weight:ts["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:mv,label:G("menu_audio_languages"),value:i,children:"audio-languages"}},"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:vv,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:pa,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:gv}),"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:hv,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:rp,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:rp,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:_v,isHiddenFor:["desktop"]})},Ab=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>PT[r](e)),...i.map(r=>Gt(Ie({},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(Ha)};var MT=(t,e)=>{Ru(t,e)},VT=M('<div><div> </div> <div class="close s-y"></div></div>'),RT=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),NT=M("<div><!> <!></div>"),OT={hash:"s-y",code:'.settings-menu-container.mobile.s-y{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-y ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-y .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-y .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-y .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-y .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-y .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-y .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-y{line-height:40px}.settings-menu.desktop.s-y{min-width:300px}.settings-menu-container.s-y .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-y .menu.mobile.hidden{display:none}.settings-menu-container.s-y .menu .item:not(.switch-item),.settings-menu-container.s-y .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-y .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-y .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-y .item:not(.switch-item),.settings-menu.s-y .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-y .item.mobile:not(.switch-item),.settings-menu.s-y .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-y .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-y .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-y .item.header.mobile:where(.s-y){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-y .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-y .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-y .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-y .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-y .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-y{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function bc(t,e){B(e,!0),q(t,OT);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(Pe,"$playerSize",i),u=()=>x(De,"$hasMpegSources$",i),v=()=>x(ke,"$mobileNotReportControlHidden$",i),p=()=>x(J,"$autoQualityLimitingAvailable$",i),f=()=>x(j,"$availableSubtitlesList$",i),$=()=>x(ze,"$isLiveWithPlaybackSpeed",i),y=()=>x(ne,"$availableAudioStreams$",i),g=()=>x(Ke,"$availablePlaybackRates$",i),w=()=>x(ue,"$currentAudioStream$",i),T=()=>x(P,"$currentPlaybackRate$",i),I=()=>x(Je,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),k=()=>x(Ne,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),A=()=>x(ft,"$additionalSettingsMenuItems$",i),Q=()=>x(pe,"$isAutoQualityAvailable$",i),H=()=>x(xe,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),Y=h(e,"ref",15,void 0),le=h(e,"playerControlsHeight",3,0),X=ci({}),re=ci({}),Z=ve(),we=Vt(),ue=Z.state.audioStream$,ne=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,xe=Z.state.availableQualities$,J=Z.state.autoQualityLimitingAvailable$,Ne=Z.state.isAutoQualityEnabled$,pe=Z.state.isAutoQualityAvailable$,P=Z.state.currentPlaybackRate$,Ke=Z.state.availablePlaybackRates$,Te=Z.state.currentSubtitle$,j=Z.state.availableSubtitlesList$,ie=Z.state.canDownload,De=Z.state.hasMpegSources$,Be=Z.ui.settingsMenu.visible$,it=Z.ui.settingsMenu.openedByBtnKeyboard$,U=Z.ui.settingsMenu.ref$,Ae=Z.ui.isMobile,ke=Z.ui.mobileNotReportControlHidden$,ze=Z.state.canChangePlaybackSpeed$,Je=Z.state.trafficSavingEnabled$,ye=Z.state.highQualityEnabled$,Pe=Z.ui.playerSize,Fe=Z.ui.debugPanelVisible,Dt=Z.state.isInteractiveTime$,ft=Z.ui.additionalSettingsMenuItems$,Bt=Z.ui.t,at=Z.actions.internal.downloadVideo,St=Z.actions.internal.closeSettingsMenu,oi=Z.actions.internal.openSettingsSubMenu,Rt=Z.actions.internal.closeSettingsSubMenu,$e=W(!1),be=W(void 0),ee=xb();Oe(()=>{!r()&&ee.current&&(Rt(re[ee.current]),ee.popAllSubMenus())}),Oe(()=>{r()||O(be,void 0)}),Oe(()=>{!ee.current&&n(be)&&O_(X,n(be))}),Oe(()=>{Y()&&U.set(Y())});function ot(Tt){return vt(this,null,function*(){var K;ee.pushSubMenu(Tt),yield _o(),oi(Tt,re[Tt]);let Ut=(K=Y())==null?void 0:K.firstElementChild;Ut&&Wf(Ut)})}function fe(Tt){var Ut;Tt==null||Tt.stopPropagation(),a()||(Ut=e.returnFocus)==null||Ut.call(e),St(),O($e,!1)}function Me(Tt,Ut){Z.actions.internal.setQuality(Tt,{appliesTo:Ut}),fe()}function yt(Tt){Z.actions.internal.setAudioStream(Tt),fe()}function Pt(Tt,Ut){Z.actions.internal.setTrafficSavingEnabled(Tt,Ut),we.features.qualityDetailsSubMenuEnabled&&fe()}function pt(Tt,Ut){Z.actions.internal.setHighQualityEnabled(Tt,Ut),fe()}function ce(Tt){Z.actions.internal.setPlaybackRate(Tt),fe()}function We(Tt){Z.actions.internal.setSubtitle(Tt),fe()}function Ge(){at()}function lt(){LT(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function Ft(){Rl(Z.actions.internal.getDebugTextData())}let Ht=()=>{let Tt=Z.actions.internal.getTraceTextData(),Ut=new Blob([...Tt],{type:"application/json"}),K=window.URL.createObjectURL(Ut);Na(K,"vk_player_trace_info","json")};function ni(){Fe.set(!l())}function _i(){O($e,!0)}function Gi(){O($e,!1)}function Nt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-le()}px; overflow: auto;`}let pi=m(()=>ie&&u()&&!v()),vi=m(()=>we.features.trafficSaving&&!v()&&p()&&!we.features.qualityDetailsSubMenuEnabled),ht=m(()=>f().length>0&&!v()),Xt=m(()=>!!$()&&!v()),$i=m(()=>we.features.audioLanguages&&y().length>=2&&!v()),Yi=m(()=>!v());Mt(()=>Dt.subscribe(Tt=>{Tt&&!d()&&!n($e)&&!a()&&fe()}));let ti=m(()=>{let Tt=[n(Yi)&&"quality-settings",n($i)&&"audio-languages-settings",n(Xt)&&"playback-rate-settings",n(ht)&&"subtitles-settings",n(vi)&&"traffic-saving-switch",n(pi)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ut=>!!Ut);return Ab({items:Tt,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:g(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:T(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:Pt,currentQuality:N()||Lb.INVARIANT,isAutoQualityEnabled:k()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Ge,onCopyDataClick:Ft,onReportProblemClick:lt,onSaveTraceDataClick:Ht,toggleShowDebugInfo:ni},additionalSettingsMenuItems:A()})}),It=m(()=>Pb({subMenuId:ee.current,context:{availablePlaybackRates:g(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:Pt,currentQuality:N()||Lb.INVARIANT,isAutoQualityEnabled:k()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:pt,availableAudioStreams:y(),availableSubtitlesList:f(),closeSettingsMenu:St,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:yt,selectQuality:Me,selectSubtitle:We}}));var qe=NT();let yi;var bo=C(qe);{var To=Tt=>{var Ut=RT();let K;Ut.__keydown=[MT,St];var At=C(Ut);{var di=Yt=>{var nt=VT();let Bi;var Fi=C(nt),tn=C(Fi,!0);S(Fi);var Co=L(Fi,2);Co.__click=fe,S(nt),D((Hi,ji)=>{Bi=se(nt,1,"item header s-y",null,Bi,Hi),me(tn,ji)},[()=>({mobile:d()}),()=>Bt("submenu_settings")]),b(Yt,nt)};R(At,Yt=>{d()&&Yt(di)})}var dt=L(At,2);let wt;bi(dt,21,()=>n(ti),Yt=>Yt.id,(Yt,nt)=>{var Bi=Le(),Fi=de(Bi);{var tn=Hi=>{nv(Hi,{get isMobile(){return d()},get id(){return n(nt).id},get icon(){return n(nt).icon},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:()=>{ot(n(nt).children),O(be,n(nt).id,!0)},get ref(){return X[n(nt).id]},set ref(ji){X[n(nt).id]=ji}})},Co=(Hi,ji)=>{{var Dr=so=>{let ki=m(()=>`${n(nt).id}-menu-item`);rv(so,{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:fe})},$o=(so,ki)=>{{var on=nn=>{let Pn=m(()=>`${n(nt).id}-menu-item`);av(nn,{get isMobile(){return d()},get id(){return n(Pn)},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(so,nn=>{n(nt).type==="SWITCH"&&nn(on)},ki)}};R(Hi,so=>{n(nt).type==="CLICK"?so(Dr):so($o,!1)},ji)}};R(Fi,Hi=>{n(nt).type==="OPEN_SUB_MENU"?Hi(tn):Hi(Co,!1)})}b(Yt,Bi)}),S(dt),je(dt,Yt=>Y(Yt),()=>Y()),S(Ut),D((Yt,nt,Bi)=>{K=se(Ut,1,"settings-menu menu s-y",null,K,Yt),wt=se(dt,1,"items",null,wt,nt),Qe(dt,Bi)},[()=>({desktop:!d(),mobile:d(),hidden:!!ee.current}),()=>({mobile:d()}),Nt]),st("mouseenter",Ut,_i),st("mouseleave",Ut,Gi),b(Tt,Ut)};R(bo,Tt=>{r()&&Tt(To)})}var mn=L(bo,2);bi(mn,17,()=>n(It),Tt=>Tt.id,(Tt,Ut)=>{let K=m(()=>{var At;return(At=n(Ut).minWidth)!=null?At:137});ov(Tt,{get isMobile(){return d()},get playerControlsHeight(){return le()},get returnFromSubMenu(){return ee.popSubMenu},get id(){return n(Ut).id},get title(){return n(Ut).title},get closeSettingsMenu(){return St},openSubMenuList:ot,get items(){return n(Ut).items},get minWidth(){return n(K)},get refMenuItems(){return X},get listRef(){return re[n(Ut).id]},set listRef(At){re[n(Ut).id]=At}})}),S(qe),D(Tt=>yi=se(qe,1,"settings-menu-container s-y",null,yi,Tt),[()=>({mobile:d(),hidden:!r()})]),b(t,qe),F(),o()}Ze(["keydown","click"]);var DT=M('<button class="btn s-1f"> </button>'),BT={hash:"s-1f",code:"button.btn.s-1f{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function $v(t,e){q(t,BT);var i=DT();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),D(()=>me(o,e.label)),b(t,i)}Ze(["click"]);var FT=M('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),HT={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),q(t,HT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Vt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=FT(),d=C(l),s=C(d),u=C(s),v=C(u);_c(v,{get message(){return a}}),S(u);var p=L(u,2);{var f=y=>{let g=m(()=>r("slow_video_notification_button"));$v(y,{get label(){return n(g)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(f)})}S(s);var $=L(s,2);Vs($,{get onClick(){return e.onClose}}),S(d),S(l),Jr(3,d,()=>gs,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Mb,Subscription as UT}from"@vkontakte/videoplayer-shared/es2015";var il="annotation",sp=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",il),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))}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 f;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((f=this.store)==null?void 0:f.ui)||{},v=new MutationObserver($=>$.forEach(()=>{let y=Ns(d,this.shadowRootContainer);o.forEach(g=>{let w=s==null?void 0:s[g],T=w?ge(w):null,I=u==null?void 0:u[g];T&&(I==null||I.set(Mb(T,y)))})}));v.observe(d,{childList:!0,subtree:!0}),l.observer=v;let p=new UT;o.forEach($=>{s&&p.add(s[$].subscribe(y=>{let g=u==null?void 0:u[$];y&&y.isDisplayed?g==null||g.set(Mb(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,v;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)),(v=d==null?void 0:d.controlsToObserve)==null||v.forEach(p=>{var f,$;($=(f=this.store)==null?void 0:f.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 zT=M('<div class="container s-4"><!></div>'),WT={hash:"s-4",code:".container.s-4{align-items:center;animation-fill-mode:forwards;animation-name:s-4-videoPlayerStatusIconPopup;background-color:#00000073;border-radius:100%;display:flex;height:64px;justify-content:center;width:64px;will-change:opacity,scale}@keyframes s-4-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),q(t,WT);let i=h(e,"reversed",3,!1);var o=Le(),r=de(o);ks(r,()=>e.Icon,a=>{var l=zT(),d=C(l);Oi(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 Vb}from"@vkontakte/videoplayer-core/es2015";var KT=M('<div class="container s-s"><!></div>'),qT={hash:"s-s",code:".container.s-s{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function yv(t,e){B(e,!0),q(t,qT);let[i,o]=Re(),r=()=>x(s,"$playbackState$",i),a=()=>x(v,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:v,previewTrackDragInProgress:p}}=ve(),{features:{playbackStatusShow:f},playbackStatusAnimationDuration:$}=Vt(),y=0,g=W(null),w=W(!1);Oe(()=>{r()===Vb.PLAYING?O(g,En,!0):r()===Vb.PAUSED?O(g,Bs,!0):O(g,null)}),Oe(()=>{if(!(!f||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 T=Le(),I=de(T);{var N=k=>{var E=KT(),A=C(E);yc(A,{get duration(){return $},get Icon(){return n(g)}}),S(E),b(k,E)};R(I,k=>{n(g)&&f&&k(N)})}b(t,T),F(),o()}var QT=M('<div><div data-testid="video-container"></div></div>'),GT={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 ol(t,e){B(e,!0),q(t,GT);let[i,o]=Re(),r=()=>x(v,"$rotateAlpha",i),a=()=>x(p,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(f,"$isPlaying$",i),s=h(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:v,playerSize:p},state:{isPlaying$:f}}=ve(),{isSmoothVideoRotate:$}=Vt(),y=m(()=>s()&&r()%180?a().height/a().width:1);var g=QT();let w;g.__contextmenu=function(...N){var k;(k=e.onContextMenu)==null||k.apply(this,N)},g.__mousedown=function(...N){var k;(k=e.onMouseDown)==null||k.apply(this,N)},g.__mouseup=function(...N){var k;(k=e.onMouseUp)==null||k.apply(this,N)},g.__click=function(...N){var k;(k=e.onClick)==null||k.apply(this,N)},g.__dblclick=function(...N){var k;(k=e.onDblClick)==null||k.apply(this,N)};var T=C(g);let I;je(T,N=>s(N),()=>s()),S(g),D((N,k)=>{w=se(g,1,"video-wrapper s-c",null,w,N),I=se(T,1,"video-container s-c",null,I,k),Qe(T,`transform: rotate(${r()}deg) scale(${n(y)})`),Ve(T,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,g),F(),o()}Ze(["contextmenu","mousedown","mouseup","click","dblclick"]);var YT=M('<div><span class="text s-10"> </span> <!></div>'),jT={hash:"s-10",code:".root.s-10{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-10,.root.visible.s-10{transform:translateX(-50%)}.root.visible.s-10{opacity:1;visibility:visible}.text.s-10{font-size:13px;font-weight:600;line-height:16px}"};function xv(t,e){B(e,!0),q(t,jT);let{ui:{t:i}}=ve();var o=YT();let r;var a=C(o),l=C(a,!0);S(a);var d=L(a,2);fc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=se(o,1,"root s-10",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var XT=M('<div class="container s-12" role="button" data-testid="preview-track-overlay"><div class="icon s-12"><!></div></div>'),ZT={hash:"s-12",code:".container.s-12{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-12,.icon.s-12{align-items:center;display:flex;justify-content:center}.icon.s-12{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-12:hover .icon:where(.s-12){transform:scale(1.15)}"};function wv(t,e){B(e,!1),q(t,ZT);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};wo();var l=XT();l.__click=a;var d=C(l),s=C(d);return En(s,{get size(){return"32"}}),S(d),S(l),Jr(3,l,()=>gs,()=>({duration:r})),b(t,l),mf(e,"handleClick",a),F({handleClick:a})}Ze(["click"]);var JT=M('<div class="container s-13"><div class="notification s-13"><span class="text s-13"> </span></div></div>'),eC={hash:"s-13",code:".container.s-13{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-13{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-13{font-size:14px;font-weight:500;line-height:18px}"};function Sv(t,e){B(e,!1),q(t,eC);let{ui:{t:i}}=ve();wo();var o=JT(),r=C(o),a=C(r),l=C(a,!0);S(a),S(r),S(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],yn),Jr(3,r,()=>gs,()=>({duration:340})),b(t,o),F()}var tC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},iC=M("<div><!></div>"),oC=M('<div class="spherical-video-icon s-8"><!></div>'),nC=M("<div><!></div>"),rC=M('<div class="settings-menu s-8"><!></div>'),sC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),aC=M("<!> <!> <!>",1),lC=M('<div class="blocked s-8"></div>'),dC=M('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),cC={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,cC);let[i,o]=Re(),r=()=>x(ui,"$notificationsToShow$",i),a=()=>x(pi,"$playerPhase",i),l=()=>x(bo,"$isLoaderVisible",i),d=()=>x(_i,"$adPlaybackState",i),s=()=>x(di,"$crashed",i),u=()=>x(Hi,"$isInteractiveTime$",i),v=()=>x($i,"$settingsMenuVisible",i),p=()=>x(ji,"$isInteractiveExpectation$",i),f=()=>x(Xt,"$controlsVisible",i),$=()=>x($o,"$touched",i),y=()=>x(Fr,"$graphIsOpened$",i),g=()=>x(vi,"$isFullscreen",i),w=()=>x(hs,"$autoplayNextEnabled$",i),T=()=>x(Ut,"$postrollPassed",i),I=()=>x(To,"$isEnded$",i),N=()=>x(On,"$cursorInside",i),k=()=>x(Jn,"$isControlsAvailable",i),E=()=>x(vn,"$doubleForwardOn$",i),A=()=>x($r,"$fakeIsPlaying$",i),Q=()=>x(wr,"$bottomNoSmooth",i),H=()=>x(nn,"$interactiveTimeIndicator",i),z=()=>x(Bi,"$playerSize",i),Y=()=>x(Fi,"$is3DVideo",i),le=()=>x(An,"$doubleForwardAvailable$",i),X=()=>x(qe,"$contextMenuVisible$",i),re=()=>x(ni,"$playbackState$",i),Z=()=>x(so,"$hotKeyMapData",i),we=()=>x(ti,"$scrubbingInProgress",i),ue=()=>x(It,"$volumeChangingInProgress",i),ne=()=>x(mn,"$chromecastConnected$",i),_e=()=>x(gn,"$controlsTimeoutActive",i),xe=()=>x(Yi,"$settingsMenuOpenedByKeyboard",i),J=()=>x(Zt,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Ko,"$contextMenuOpenedByHotKey$",i),pe=()=>x(Ai,"$contextMenuButtonRef$",i),P=()=>x(Kr,"$contextMenuLastActiveElem$",i),Ke=()=>x(ht,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Ht,"$language$",i),j=()=>x(qo,"$previewTrackActive$",i),ie=()=>x(tn,"$icon3DVideoVisible",i),De=()=>x(Tt,"$chromecastDeviceName$",i),Be=()=>x(Yt,"$currentSubtitle$",i),it=()=>x(nt,"$currentSubtitleCaptions$",i),U=()=>x(Gi,"$position$",i),Ae=()=>x(Nt,"$duration$",i),ke=()=>x(K,"$isLive$",i),ze=()=>x(At,"$isPlaying$",i),Je=()=>x(Zn,"$contextMenuPosition$",i),ye=()=>x(Bo,"$previewTrackNotificationVisible$",i),Pe=()=>x(ki,"$showHotKeyMap",i),Fe=()=>x(yi,"$debugPanelVisible",i),Dt=()=>x(os,"$userActionsDisabled$",i),ft=h(e,"videoContainer",15),Bt=h(e,"adsSlotId",3,void 0),at=h(e,"adsParams",3,void 0),St=h(e,"adsAutoplayParam",3,void 0),oi=h(e,"duration",3,void 0),Rt=h(e,"logoTargetUrl",3,""),$e=h(e,"showNextPrevButtons",3,!1),be=h(e,"nextButtonActive",3,!1),ee=h(e,"prevButtonActive",3,!1),ot=h(e,"endScreenVideoTitle",3,void 0),fe=h(e,"endScreenVideoThumb",3,void 0),Me=h(e,"isOneVideoPlaylist",3,!1),yt=h(e,"shadowRootContainer",3,void 0),Pt=h(e,"outerContainerRef",3,void 0),pt=h(e,"playerStarted",3,!1),ce=h(e,"fullScreenTarget",3,void 0),We=h(e,"showMiniTimer",3,!1),Ge=h(e,"showEndScreen",3,!0),lt=h(e,"keyboardControls",15),Ft=e.store.getLogger().createComponentLog("Root component"),Ht=e.store.interfaceLanguage$,ni=e.store.state.playbackState$,_i=e.store.ads.playbackState,Gi=e.store.state.positionWithScrubbing$,Nt=e.store.state.duration$,pi=e.store.playerPhase,vi=e.store.ui.isFullscreen,ht=e.store.ui.isFullscreenOpenedByKeyboard,Xt=e.store.ui.controlsVisible,$i=e.store.ui.settingsMenu.visible$,Yi=e.store.ui.settingsMenu.openedByBtnKeyboard$,ti=e.store.ui.scrubbingInProgress,It=e.store.ui.volumeChangingInProgress,qe=e.store.ui.contextMenu.visible$,yi=e.store.ui.debugPanelVisible,bo=e.store.state.isLoaderVisible,To=e.store.state.isEnded$,mn=e.store.state.chromecastConnected$,Tt=e.store.state.chromecastDeviceName$,Ut=e.store.ads.postrollPassed,K=e.store.state.isLive$,At=e.store.state.isPlaying$,di=e.store.state.crashed$,dt=e.store.webApi.annotationsApi,wt=e.store.webApi.pictureInPictureApi,Yt=e.store.state.currentSubtitle$,nt=e.store.state.currentSubtitleCaptions$,Bi=e.store.ui.playerSize,Fi=e.store.ui.is3DVideo,tn=e.store.ui.icon3DVideoVisible,Co=e.store.state.isInteractive,Hi=e.store.state.isInteractiveTime$,ji=e.store.state.isInteractiveExpectation$,Dr=e.store.state.hasInteractiveBranches,$o=e.store.ui.touched,so=e.store.ui.modals.hotKeyMap.data,ki=e.store.ui.modals.hotKeyMap.show,on=e.store.ui.overlayContainer$,nn=e.store.ui.controls.interactiveTimeIndicator,Pn=e.store.state.showInteractiveTimeIndicator,Zn=e.store.ui.contextMenu.position$,Br=e.store.actions.internal.setQuality,is=e.store.actions.internal.closeSettingsMenu,hs=e.store.ui.autoplayNextEnabled$,os=e.store.ui.userActionsDisabled,Jn=e.store.ui.isControlsAvailable,br=e.store.ui.videoTitleInfo,vn=e.store.ui.doubleForwardOn$,An=e.store.ui.doubleForwardAvailable$,Bo=e.store.ui.previewTrackNotificationVisible,Ln=e.store.actions.internal.getVideoElement,er=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:$r,notifications$:yr,graphIsOpened$:Fr}=So(),ao=W(void 0),Hr=W(void 0),Mn=W(void 0),Vn=W(void 0),lo,Ur,Rn;so.set(k_());let{closeNotification:mt,notificationsToShow$:ui}=yr,xr=m(()=>!!r().slow_video),tr=()=>mt("slow_video"),ir=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),rn=W(void 0),wr=ae(!1),sn,gn=ae(!1),Nn=ae(),On=ae(!1),Fo=W(!1),Io=W(!1),or=W(!1),Eo=W(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Ui=m(()=>u()&&!v()&&!(n(Fo)||n(Io))&&!(n(or)&&!p())),Dn=!0,nr=m(()=>e.uiConfig.features.thumbTimer&&We()&&a()==="video"&&!f()&&!s()&&!Co&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),rr=e.uiConfig.titleShowBehaviour,sr=m(()=>!["video","thumb"].includes(a())||rr==="never"||y()?!1:rr==="fullscreen"?g():!0),Ho=m(()=>rr==="always"||a()==="thumb"?!1:!f()),Sr=W(!1),xt=m(()=>(Ge()||e.showAutoplayNext&&w())&&!!ot()&&!!fe()&&(e.showAds&&T()||!e.showAds)&&I()&&!s()&&!n(Sr)),Et=m(()=>N()&&!(f()||n(xt))&&!u()&&k()&&!E()),co=W(!1),ko=m(()=>A()!==null),{toggle:yo}=$r,xo=!1,Vi=null;wt==null||wt.setContext(sd());let Bn=()=>{e.autoplay&&!Co&&e.uiConfig.controls.showOnStartupAtAutoplay&&Pi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Bn});let Xi=()=>{window.clearTimeout(lo),gn.set(!1)},zr=()=>{window.clearTimeout(Ur),Nn.set(null)},Pi=he=>{Xi(),gn.set(!0),lo=window.setTimeout(()=>gn.set(!1),he);let _t=he-100;sn=window.setTimeout(()=>{Q()&&wr.set(!1)},_t>0?_t:he)},_s=(he,_t)=>{zr(),Nn.set(_t),Ur=window.setTimeout(()=>Nn.set(null),he)},ns=Fi.subscribe(he=>{tn.set(he),he&&(window.clearTimeout(Rn),Rn=window.setTimeout(()=>tn.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Tr=()=>vt(null,null,function*(){var _t,zt,Jt,wi;let he=aa();if(he){let Ci=Vd(),Li=hn();he=Ci===Li||Ci===yt()}if(he){Pi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield wt==null?void 0:wt.exit()}catch(Ci){Ft({message:String(Ci)})}}vi.set(he),e.store.getAdmanWrapper().setFullscreen(he),g()?(zt=(_t=e.store.callbacks)==null?void 0:_t.onFullscreenEnter)==null||zt.call(_t):(wi=(Jt=e.store.callbacks)==null?void 0:Jt.onFullscreenExit)==null||wi.call(Jt)}),Uo=he=>{let{width:_t,height:zt}=he.target;Bi.set({width:_t,height:zt})},Wr=()=>{let{width:he,height:_t}=n(ao).getBoundingClientRect();Bi.set({width:he,height:_t})};Mt(()=>{var _t;return Mu(Tr),e.uiConfig.features.annotationsInside&&(dt==null||dt.init(n(ao))),Ba(wt)&&(wt==null||wt.assignPlayerContainer(n(ao)),wt==null||wt.setExternalEventHandlers({resize:Uo,leavepictureinpicture:Wr})),e.interactiveContainer&&((_t=ft().parentElement)==null||_t.insertBefore(e.interactiveContainer,ft().nextSibling)),()=>{window.clearTimeout(lo),window.clearTimeout(sn),window.clearTimeout(Ur),window.clearTimeout(Rn),ns(),wt==null||wt.dispose().catch(zt=>{Ft({message:String(zt)})}),Vu(Tr)}});let hn=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Pt()?n(ao):Pt(),_t=he.getRootNode(),zt=_t instanceof ShadowRoot?_t.host:_t,Jt=ce()instanceof HTMLElement&&ce().contains(zt);return e.uiConfig.allowChangingFullscreenTarget&&ce()&&Jt?ce():he},_n=()=>{qe.set(!1)},Po=()=>{is(),_n()},Cr=()=>vt(null,null,function*(){if(!er()){Ft({message:"fullscreen disabled"});return}_n(),aa()?(yield Lu(document),Ft({message:"exit fullscreen"})):(Ft({message:"request fullscreen"}),yield Au(hn()))}),Ue=he=>{y()||(he.preventDefault(),qe.set(!0),Zn.set({left:he.clientX,top:he.clientY}))};function Lt(){On.set(!0),Co||Pi(e.uiConfig.controls.hideTimeoutCursor)}function xi(he){var wi,Ci;let{relatedTarget:_t}=he,Jt=!!(_t&&((wi=n(Mn))!=null&&wi.contains(_t)))&&((Ci=lt())==null?void 0:Ci.isFocused());!Co&&!Jt&&(wr.set(!0),Pi(e.uiConfig.controls.hideTimeoutCursor))}function zo(){On.set(!1),O(Io,!1),O(Fo,!1),xo=!1,e.store.actions.internal.releaseCamera(),Pi(e.uiConfig.controls.hideTimeout),E()&&Ji()}function uo(he){return he?he.offsetTop+uo(he.offsetParent):0}function Ao(he){return he?he.offsetLeft+Ao(he.offsetParent):0}function po(he){if(H()&&Pn){let _t=he.currentTarget,zt=uo(_t),Jt=Ao(_t),wi=he.pageX-Jt,Ci=he.pageY-zt,{left:Li,bottom:Si,right:Ws}=H(),Ks=Ws-Li;return wi>=Li-Ks&&Ci<=Si+Ks}}function Wo(he){if(n(ao)){let _t=uo(he.currentTarget),zt=z().height,Jt=he.pageY-_t;if(po(he)){O(Io,!1);return}Jt<40?O(Io,!0):Jt>zt-40?O(Fo,!0):(O(Io,!1),v()||O(Fo,!1))}}function Fn(he){Wo(he),!n(Ui)&&!E()&&Pi(e.uiConfig.controls.hideTimeoutCursor),Y()&&xo&&Vi&&e.store.actions.internal.moveCameraFocusPX(Vi.clientX-he.clientX,Vi.clientY-he.clientY,he.timeStamp-Vi.timeStamp),Vi=he}let an=null,Zi=()=>{an=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Xi()},e.uiConfig.doubleForwardActivationTime)},Ji=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),an&&clearTimeout(an),an=null},Hn=he=>{he.preventDefault(),he.button===0&&(xo=!0,e.store.actions.internal.holdCamera(),le()&&Zi()),!xo&&Pi(e.uiConfig.controls.hideTimeoutCursor)},ar=he=>{he.preventDefault(),he.button===0&&(Vi=he,xo=!1,e.store.actions.internal.releaseCamera()),!E()&&Pi(e.uiConfig.controls.hideTimeoutCursor)},lr=he=>{he.preventDefault(),Dn&&(Ft({message:"double click on video"}),Cr(),Pi(e.uiConfig.controls.hideTimeoutCursor))},Un=he=>{var _t;if(he.preventDefault(),E()){Ji();return}if(an&&Ji(),X()||v()){Po();return}if(!(I()&&!Dr)){if(n(ko))return yo();if((_t=lt())==null||_t.focus(),!pt()){e.firstStart(),Pi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==Nb.PLAYING)&&e.store.actions.internal.togglePlay(),Pi(e.uiConfig.controls.hideTimeoutCursor)}},bs=he=>{Po(),$o.set(!0),Pi(e.uiConfig.controls.hideTimeout),he&&_s(e.uiConfig.controls.hideHotKeyHelpers,he)},$s=()=>{var he,_t;Po(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?(_t=e.store.callbacks)==null||_t.onOpenHotKeyMap(Z()):ki.update(zt=>!zt)},Ye=()=>{$o.set(!0)},Zt=e.store.ui.contextMenu.openedByBtnKeyboard$,Ai=e.store.ui.contextMenu.btnRef$,fo=W(void 0),Ko=e.store.ui.contextMenu.openedByHotKey$,Kr=e.store.ui.contextMenu.lastActiveElem$,Lo=W(!1),qo=e.store.ui.previewTrackActive;Oe(()=>{on.set(n(rn))}),Oe(()=>{O(or,n(Eo)&&re()!==Nb.PLAYING,!0),n(Eo)||Ct(()=>O(Eo,!0))}),Oe(()=>{var _t,zt;let he=(n(or)||I()||v()||we()||ue()||ne()||_e()||n(Lo))&&!n(Ui)&&(a()==="video"||a()==="ads")&&!s()&&k();Xt.set(he),!he&&!_e()&&e.uiConfig.returnFocusOnControlsHide&&((_t=n(Mn))!=null&&_t.contains(Hu()))&&((zt=lt())==null||zt.focus())}),Oe(()=>{!we()&&n(co)&&!u()&&Pi(e.uiConfig.controls.hideTimeoutCursor),Ct(()=>O(co,we(),!0))}),Oe(()=>{n(Vn),v(),xe(),Ct(()=>Hd(n(Vn),v(),xe()))}),Oe(()=>{n(fo),X(),J(),Ne(),Ct(()=>{let he=J()||Ne();Hd(n(fo),X(),he)})}),Oe(()=>{let he=pe();he&&(X(),Ct(()=>Nl(he,X(),Zt)))}),Oe(()=>{let he=P();he&&(X(),Ct(()=>N_(he,X(),Ko)))}),Oe(()=>{var he;!Ke()&&g()&&(Ct(()=>ht.set(!1)),(he=lt())==null||he.focus())}),Oe(()=>{y()&&Po()});let ys=W(void 0),Us=he=>{br.set(jn(Ln(),{title:n(ys)},"title",he))},va=(he,_t)=>{var Ci,Li;let zt=(Li=(Ci=e.store.callbacks)==null?void 0:Ci.uiInfo)==null?void 0:Li.onUpcomingLiveViewStateChanged;if(!zt)return;let Jt=!!_t,wi=Ie(Ie({},jn(n(ao),{upcomingLiveScreen:_t},"upcomingLiveScreen",Jt)),he);zt(wi)};var zs=dC();st("blur",Ea,Po);var bn=de(zs);bn.__mousemove=Fn;var rt=C(bn);let ii=m(()=>a()==="ads"),mo=m(()=>n(ko)?yo:void 0);je(jf(rt,{startDoubleForwardActivationTimer:Zi,stopDoubleForward:Ji,toggleFullscreen:Cr,hideContextMenu:Po,showHotKeyHelpers:bs,showKeyMap:$s,get isAds(){return n(ii)},get fakePlayButtonHandler(){return n(mo)},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},children:(he,_t)=>{var zt=aC(),Jt=de(zt);ol(Jt,{get hideCursor(){return n(Et)},onClick:Un,onContextMenu:Ue,onMouseDown:Hn,onMouseUp:ar,onDblClick:lr,get videoContainer(){return ft()},set videoContainer(Li){ft(Li)}});var wi=L(Jt,2);Va(wi,()=>"slot",!1,(Li,Si)=>{oo(Li,()=>({name:il}))});var Ci=L(wi,2);ks(Ci,Te,Li=>{var Si=sC(),Ws=de(Si);let Ks=m(()=>a()!=="thumb"||s()||Co&&e.autoplay);Ja(Ws,{get hidden(){return n(Ks)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ue,onClick:_n});var qs=L(Ws,2);{var Xl=He=>{wv(He,{})};R(qs,He=>{j()&&He(Xl)})}var ga=L(qs,2);yv(ga,{});var Er=L(ga,2);xv(Er,{get isVisible(){return E()}});var Qs=L(Er,2);{var ha=He=>{let hi=m(()=>{var Qo;return(Qo=e.live)==null?void 0:Qo.startTime});gc(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(hi)},onUpcomingLiveViewStateChanged:va,onContextMenu:Ue,onClick:_n})};R(Qs,He=>{a()==="LiveWaitingStart"&&He(ha)})}var kr=L(Qs,2);{var xs=He=>{el(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:_n})};R(kr,He=>{a()==="LiveWaitingRecover"&&He(xs)})}var ws=L(kr,2);{var Pr=He=>{el(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:_n})};R(ws,He=>{a()==="LiveWaitingRecord"&&He(Pr)})}var _a=L(ws,2);{var Zl=He=>{var hi=iC();let Qo;var Ar=C(hi);Nd(Ar,{get adsSlotId(){return Bt()},get adsParams(){return at()},get adsAutoplayParam(){return St()},get duration(){return oi()},get adsExternalApi(){return e.adsExternalApi}}),S(hi),D(Vo=>Qo=se(hi,1,"ads-container s-8",null,Qo,Vo),[()=>({hidden:a()!=="ads"})]),b(He,hi)};R(_a,He=>{e.showAds&&pt()&&He(Zl)})}var nl=L(_a,2);{var Jl=He=>{let hi=m(()=>!Ge()&&e.showAutoplayNext&&w());Qf(He,{get title(){return ot()},get thumb(){return fe()},get isHide(){return n(hi)},clickCloseIcon:()=>O(Sr,!0)})};R(nl,He=>{n(xt)&&ot()&&fe()&&He(Jl)})}var ba=L(nl,2);{var ed=He=>{let hi=m(()=>g()?"md":"sm"),Qo=m(()=>{var Ar;return(Ar=e.store.callbacks)==null?void 0:Ar.onTitleClicked});Xm(He,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(Ho)},onVisibilityChanged:Us,onMouseEnter:()=>{O(Lo,!0)},onMouseLeave:()=>{O(Lo,!1)},get size(){return n(hi)},get onTitleClicked(){return n(Qo)},get ref(){return n(ys)},set ref(Ar){O(ys,Ar,!0)}})};R(ba,He=>{n(sr)&&He(ed)})}var rl=L(ba,2);{var sl=He=>{let hi=m(()=>a()==="video"&&f());mc(He,{get isShifted(){return n(hi)}})};R(rl,He=>{Y()&&He(sl)})}var dr=L(rl,2);{var ct=He=>{var hi=oC(),Qo=C(hi);Md(Qo,{}),S(hi),b(He,hi)};R(dr,He=>{ie()&&He(ct)})}var ut=L(dr,2);{var eo=He=>{vc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()}})};R(ut,He=>{ne()&&He(eo)})}var Mo=L(ut,2);{var to=He=>{Xa(He,{get shifted(){return f()},get captions(){return it()},get position(){return U()},get playerSize(){return z()}})};R(Mo,He=>{Be().value!=="off"&&He(to)})}var gi=L(Mo,2);{var zi=He=>{var hi=nC();hi.__contextmenu=Ue,hi.__click=[tC,X,qe,v,$i,Po];var Qo=C(hi);Za(Qo,{}),S(hi),b(He,hi)};R(gi,He=>{s()&&He(zi)})}var Gs=L(gi,2);{var td=He=>{let hi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Qo=m(()=>a()==="ads"),Ar=m(()=>e.canRewindLive&&Ae()!==0);pc(He,{get bottomHidden(){return n(hi)},get bottomNoSmooth(){return Q()},get showControls(){return f()},get isAds(){return n(Qo)},get canRewindLive(){return n(Ar)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Rt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},get isOneVideoPlaylist(){return Me()},customFullscreenSupported:Dn,toggleFullscreen:Cr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Hr)},set playerControlsWrapperRef(Vo){O(Hr,Vo,!0)},get playerControlsRef(){return n(Mn)},set playerControlsRef(Vo){O(Mn,Vo,!0)}})};R(Gs,He=>{pt()&&He(td)})}var Mc=L(Gs,2);{var bp=He=>{var hi=rC(),Qo=C(hi);let Ar=m(()=>{var Vo;return(Vo=n(Mn))==null?void 0:Vo.clientHeight});bc(Qo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ar)},returnFocus:()=>{var Vo;return(Vo=lt())==null?void 0:Vo.focus()},get ref(){return n(Vn)},set ref(Vo){O(Vn,Vo,!0)}}),S(hi),b(He,hi)};R(Mc,He=>{!ne()&&a()!=="ads"&&He(bp)})}var Vc=L(Mc,2);let $p=m(()=>!n(nr));Bd(Vc,{get isLive(){return ke()},get isHidden(){return n($p)},get isPlaying(){return ze()},get position(){return U()},get duration(){return Ae()}});var Rc=L(Vc,2);Ym(Rc,{get data(){return Nn}});var Nc=L(Rc,2);qf(Nc,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=lt())==null?void 0:He.focus()},get visible(){return X()},get playerContainerRef(){return n(ao)},get position(){return Je()},get menuElementRef(){return n(fo)},set menuElementRef(He){O(fo,He,!0)}});var $a=L(Nc,2);{var yp=He=>{$c(He,{onClose:tr,onSelectAutoQuality:()=>{Br("auto"),tr()}})};R($a,He=>{n(xr)&&He(yp)})}var Ys=L($a,2);{var al=He=>{Sv(He,{})};R(Ys,He=>{ye()&&He(al)})}var Oc=L(Ys,2);{var Dc=He=>{za(He,{})};R(Oc,He=>{n(ir)&&He(Dc)})}var ll=L(Oc,2);{var Bc=He=>{Jf(He,{})};R(ll,He=>{Pe()&&He(Bc)})}var xp=L(ll,2);{var Fc=He=>{Wd(He,{})};R(xp,He=>{Fe()&&He(Fc)})}b(Li,Si)}),b(he,zt)},$$slots:{default:!0}}),he=>lt(he),()=>lt());var Ir=L(rt,2);je(Ir,he=>O(rn,he),()=>n(rn)),S(bn),je(bn,he=>O(ao,he),()=>n(ao));var qr=L(bn,2);{var $n=he=>{var _t=lC();b(he,_t)};R(qr,he=>{Dt()&&he($n)})}st("mouseenter",bn,Lt),st("mouseleave",bn,zo),st("click",bn,Ye,!0),st("focusin",bn,xi,!0),b(t,zs),F(),o()}Ze(["mousemove","contextmenu","click"]);import{clientChecker as xc,PlaybackState as $C}from"@vkontakte/videoplayer-core/es2015";import{noop as yC}from"@vkontakte/videoplayer-shared/es2015";var uC=M('<div></div> <div class="info s-17"><div class="triangles-wrapper s-17"><div></div> <div></div> <div></div></div> <p class="step-caption s-17"> </p></div>',1),pC=M("<div><!></div>"),fC={hash:"s-17",code:".double-click-area.s-17{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-17{left:0}.double-click-area.right.s-17{right:0}.semicircle.s-17{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-17{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-17{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-17{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-17,.triangles-wrapper.s-17{display:flex;justify-content:center}.triangles-wrapper.s-17{margin-bottom:10px;position:relative}.triangle.s-17{animation:s-17-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-17:nth-child(3),.triangle.right.s-17:first-child{animation-delay:0s}.triangle.left.s-17:nth-child(2),.triangle.right.s-17:nth-child(2){animation-delay:.1s}.triangle.left.s-17:first-child,.triangle.right.s-17:nth-child(3){animation-delay:.2s}@keyframes s-17-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-17{border-right:8px solid var(--white)}.triangle.right.s-17{border-left:8px solid var(--white)}.triangle.s-17:not(:last-child){margin-right:5px}.step-caption.s-17{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function ap(t,e){B(e,!0),q(t,fC);let i=h(e,"seekStep",3,0),o=W(!1),r=0,a=0,l=W(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=pC();s.__click=d;var u=C(s);{var v=p=>{var f=uC(),$=de(f),y=L($,2),g=C(y),w=C(g),T=L(w,2),I=L(T,2);S(g);var N=L(g,2),k=C(N,!0);S(N),S(y),D(E=>{var A,Q,H,z;se($,1,`semicircle ${(A=e.side)!=null?A:""}`,"s-17"),se(w,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-17"),se(T,1,`triangle ${(H=e.side)!=null?H:""}`,"s-17"),se(I,1,`triangle ${(z=e.side)!=null?z:""}`,"s-17"),me(k,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,f)};R(u,p=>{n(o)&&p(v)})}S(s),D(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-17")}),b(t,s),F()}Ze(["click"]);var mC=(t,e,i)=>{e(!1),i()},vC=M('<div class="overlay s-16"></div> <div class="next-video s-16"><div class="top s-16"><div class="caption s-16"> </div> <!></div> <div class="row s-16"><div class="column s-16"><div class="thumb s-16"><div></div> <!></div></div> <div class="column s-16"><div class="title s-16"> </div></div></div></div>',1),gC={hash:"s-16",code:".overlay.s-16{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-16{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-16{display:flex;justify-content:space-between}.caption.s-16{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-16{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-16{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-16{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-16,.thumb-overlay.s-16{height:100%;width:100%}.thumb-overlay.s-16{position:absolute}.thumb-overlay.withOpacity.s-16{background:var(--black);opacity:.3}.title.s-16{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Cv(t,e){B(e,!0),q(t,gC);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,v=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),f()},g=()=>{e.clickCloseIcon(),$()};Mt(()=>{e.isHide||v(),e.isHide&&r()&&(u(!1),f())});var w=Le(),T=de(w);{var I=N=>{var k=vC(),E=L(de(k),2),A=C(E),Q=C(A),H=C(Q,!0);S(Q);var z=L(Q,2);Vs(z,{onClick:g}),S(A);var Y=L(A,2);Y.__click=[mC,u,p];var le=C(Y),X=C(le),re=C(X);let Z;var we=L(re,2);{var ue=J=>{Kd(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}S(X),S(le);var ne=L(le,2),_e=C(ne),xe=C(_e,!0);S(_e),S(ne),S(Y),S(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-16",null,Z,Ne),me(xe,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,k)};R(T,N=>{e.isHide||N(I)})}b(t,w),F(),o()}Ze(["click"]);import{clientChecker as hC}from"@vkontakte/videoplayer-core/es2015";var Ob=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Mt(()=>{hC.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 _C}from"@vkontakte/videoplayer-core/es2015";var lp=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 bC}from"@vkontakte/videoplayer-core/es2015";var Db=({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"),v=()=>bC.device.isIOS&&ge(l)===_C.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},f=$=>{if(p(),!v()||!$)return;let y=u();if(!y)return;let g=new lp(y),w=ge(d),T=ge(a),I=ge(r);for(let E of w)T.some(Q=>Q.value===E.id)&&g.attach(E,I.value===E.id);let N=d.subscribe(E=>{for(let A of E)g.updateSrc(A)}),k=()=>{let E=g.getCurrentShowingId();o(ge(a).find(A=>A.value===E))};y.textTracks.addEventListener("change",k),s=()=>{N(),g.detachAll(),y.textTracks.removeEventListener("change",k)}};Mt(()=>i.subscribe(f)),cn(p)};var xC=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},wC=M("<!> <!>",1),SC=M("<div><!></div>"),TC=M('<div class="spherical-video-icon s-9"><!></div>'),CC=M("<div><!></div>"),IC=M('<div class="settings-mobile s-9"><!></div>'),EC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),kC=M('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),PC={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 Iv(t,e){var Ho,Sr;B(e,!0),q(t,PC);let[i,o]=Re(),r=()=>x(yt,"$playerPhase",i),a=()=>x(_i,"$isLoaderVisible",i),l=()=>x(ot,"$adPlaybackState",i),d=()=>x(ti,"$crashed",i),s=()=>x(hs,"$notificationsToShow$",i),u=()=>x(ee,"$playbackState$",i),v=()=>x(Rt,"$graphIsOpened$",i),p=()=>x(We,"$interactiveHideMobileControls",i),f=()=>x(Gi,"$isEnded$",i),$=()=>x(dt,"$isInteractiveExpectation$",i),y=()=>x(pt,"$controlsVisible",i),g=()=>x(nt,"$touched",i),w=()=>x(Fi,"$autoplayNextEnabled$",i),T=()=>x(vi,"$postrollPassed",i),I=()=>x(br,"$bottomNoSmooth",i),N=()=>x(yi,"$videoSize",i),k=()=>x(Tt,"$playerSize",i),E=()=>x(Pt,"$isFullscreen",i),A=()=>x(fe,"$position$",i),Q=()=>x(Me,"$duration$",i),H=()=>x(tn,"$loadedMetadata",i),z=()=>x(Ge,"$settingsMenuVisible",i),Y=()=>x(Ft,"$scrubbingInProgress",i),le=()=>x(Ht,"$volumeChangingInProgress",i),X=()=>x(Nt,"$chromecastConnected$",i),re=()=>x(ce,"$isControlsAvailable",i),Z=()=>x(di,"$isInteractiveTime$",i),we=()=>x($i,"$isActiveLive",i),ue=()=>x(lt,"$settingsMenuOpenedByKeyboard",i),ne=()=>x(be,"$language$",i),_e=()=>x(Yt,"$disabledControls$",i),xe=()=>x(Ut,"$is3DVideo",i),J=()=>x(K,"$icon3DVideoVisible",i),Ne=()=>x(pi,"$chromecastDeviceName$",i),pe=()=>x(bo,"$currentSubtitle$",i),P=()=>x(To,"$currentSubtitleCaptions$",i),Ke=()=>x(mn,"$realDuration$",i),Te=()=>x(ht,"$isLive$",i),j=()=>x(Xt,"$isPlaying$",i),ie=()=>x(ni,"$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),Je=h(e,"nextButtonActive",3,!1),ye=h(e,"prevButtonActive",3,!1),Pe=h(e,"endScreenVideoTitle",3,void 0),Fe=h(e,"endScreenVideoThumb",3,void 0),Dt=h(e,"isOneVideoPlaylist",3,!1),ft=h(e,"showMiniTimer",3,!1),Bt=h(e,"fullScreenTarget",3,void 0),at=h(e,"playerStarted",3,!1),St=h(e,"showEndScreen",3,!0),{notifications$:oi,graphIsOpened$:Rt}=So(),$e=e.store.getLogger().createComponentLog("Root component"),be=e.store.interfaceLanguage$,ee=e.store.state.playbackState$,ot=e.store.ads.playbackState,fe=e.store.state.positionWithScrubbing$,Me=e.store.state.duration$,yt=e.store.playerPhase,Pt=e.store.ui.isFullscreen,pt=e.store.ui.controlsVisible,ce=e.store.ui.isControlsAvailable,We=e.store.ui.interactiveHideMobileControls,Ge=e.store.ui.settingsMenu.visible$,lt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Ft=e.store.ui.scrubbingInProgress,Ht=e.store.ui.volumeChangingInProgress,ni=e.store.ui.debugPanelVisible,_i=e.store.state.isLoaderVisible,Gi=e.store.state.isEnded$,Nt=e.store.state.chromecastConnected$,pi=e.store.state.chromecastDeviceName$,vi=e.store.ads.postrollPassed,ht=e.store.state.isLive$,Xt=e.store.state.isPlaying$,$i=e.store.state.isActiveLive$,Yi=e.store.state.isRewindableLive$,ti=e.store.state.crashed$,It=e.store.webApi.annotationsApi,qe=e.store.webApi.pictureInPictureApi,yi=e.store.state.videoSize$,bo=e.store.state.currentSubtitle$,To=e.store.state.currentSubtitleCaptions$,mn=e.store.state.duration$,Tt=e.store.ui.playerSize,Ut=e.store.ui.is3DVideo,K=e.store.ui.icon3DVideoVisible,At=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,dt=e.store.state.isInteractiveExpectation$,wt=e.store.state.hasInteractiveBranches,Yt=e.store.ui.controls.disabledControls$,nt=e.store.ui.touched,Bi=e.store.ui.overlayContainer$,Fi=e.store.ui.autoplayNextEnabled$,tn=e.store.state.loadedMetadata$,Co=e.store.actions.internal.closeSettingsMenu,Hi=(Ho=e.store.callbacks)==null?void 0:Ho.onDisabledPlayPrevChapterClick,ji=(Sr=e.store.callbacks)==null?void 0:Sr.onDisabledSeekToInteractiveClick,Dr=e.store.actions.internal.setQuality,$o=W(void 0),so=W(void 0),ki=W(void 0),on=W(void 0),nn,Pn,Zn=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Br=W(void 0),{closeNotification:is,notificationsToShow$:hs}=oi,os=m(()=>!!s().slow_video),Jn=()=>is("slow_video"),br=ae(!1),vn,An=W(!1),Bo=m(()=>u()!==$C.PLAYING),Ln=W(!1),er=m(()=>v()||p()||!n(An)&&(f()&&!!wt||n(Bo)&&$())),$r=W(!0),yr=m(()=>e.uiConfig.features.thumbTimer&&ft()&&r()==="video"&&!y()&&!d()&&!At&&(e.uiConfig.hideThumbTimerAfterTouch&&!g()||!e.uiConfig.hideThumbTimerAfterTouch)),Fr=W(!1),ao=m(()=>(St()||e.showAutoplayNext&&w())&&!!Pe()&&!!Fe()&&(e.showAds&&T()||!e.showAds)&&f()&&!d()&&!n(Fr)),Hr=W(!1);qe==null||qe.setContext(sd());let Mn=xt=>{xt&&!At&&lo(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Mn});let Vn=()=>{clearTimeout(nn),O(An,!1),p()&&We.set(!1)},lo=xt=>{Vn(),O(An,!0),nn=setTimeout(()=>O(An,!1),xt);let Et=xt-100;vn=setTimeout(()=>{I()&&br.set(!1)},Et>0?Et:xt)},Ur=Ut.subscribe(xt=>{K.set(xt),xt&&(clearTimeout(Pn),Pn=setTimeout(()=>K.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=(...Et)=>vt(null,[...Et],function*(xt=aa()){var co,ko,yo,xo,Vi,Bn;if(xt&&!xc.device.isIOS){let Xi=Vd(),zr=rn(),Pi=xc.browser.isSamsungBrowser&&Xi===e.shadowRootContainer;xt=Xi===zr||Pi}if(xt){lo(e.uiConfig.controls.hideTimeoutFullscreen);try{yield qe==null?void 0:qe.exit()}catch(Xi){$e({message:String(Xi)})}try{let Xi=(co=N())!=null&&co.width&&((ko=N())!=null&&ko.height)?N():k();yield I_(Xi)}catch(Xi){$e({message:String(Xi)})}}Pt.set(xt),e.store.getAdmanWrapper().setFullscreen(xt),E()?(xo=(yo=e.store.callbacks)==null?void 0:yo.onFullscreenEnter)==null||xo.call(yo):(Bn=(Vi=e.store.callbacks)==null?void 0:Vi.onFullscreenExit)==null||Bn.call(Vi)}),mt=xt=>{let Et=xt,{width:co,height:ko}=Et.target;Tt.set({width:co,height:ko})},ui=()=>{let{width:xt,height:Et}=n($o).getBoundingClientRect();Tt.set({width:xt,height:Et})};Mt(()=>{var xt;return Mu(Rn),e.uiConfig.features.annotationsInside&&(It==null||It.init(n($o))),Ba(qe)&&(qe==null||qe.assignPlayerContainer(n($o)),qe==null||qe.setExternalEventHandlers({resize:mt,leavepictureinpicture:ui})),O($r,!xc.device.isIphoneOrOldIpad),e.interactiveContainer&&((xt=De().parentElement)==null||xt.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(nn),clearTimeout(vn),clearTimeout(Pn),Ur(),qe==null||qe.dispose().catch(Et=>{$e({message:String(Et)})}),Vu(Rn)}});let xr=W(!0),tr=W(!0),ir=xt=>{let Et=A()+(xt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Et<0?(O(xr,!1),Et=0):Et>=Q()&&(O(tr,!1),Et=Q()),O(Ln,!0),e.seekTime(Et)},rn=()=>xc.device.isIOS?n($o):!e.uiConfig.allowChangingFullscreenTarget||!Bt()?e.outerContainerRef:Bt().contains(e.outerContainerRef)?Bt():e.outerContainerRef,wr=()=>vt(null,null,function*(){try{if(aa())yield Lu(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),xc.device.isIOS&&!H())return;yield Au(rn())}}catch(xt){$e({message:String(xt)})}}),sn=()=>{Co()},gn=xt=>{if(xt.preventDefault(),z()){sn();return}if(!at()){e.firstStart(),lo(e.uiConfig.controls.hideTimeoutCursor);return}O(Ln,!1),y()?Vn():lo(e.uiConfig.controls.hideTimeoutMobile)},Nn=()=>{nt.set(!0)},On=()=>{At||(br.set(!0),lo(e.uiConfig.controls.hideTimeoutCursor))},Fo=xt=>{Hi&&(Hi(xt),lo(e.uiConfig.controls.hideTimeoutMobile))},Io=xt=>{ji&&(ji(xt),lo(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{Bi.set(n(Br))}),Oe(()=>{pt.set((n(Bo)||z()||Y()||le()||X()||!n(ao)&&(f()||n(An)&&!n(Ln)))&&!n(er)&&r()==="video"&&!d()&&re())}),Oe(()=>{!Y()&&n(Hr)&&!Z()&&lo(e.uiConfig.controls.hideTimeoutMobile),O(Hr,Y(),!0)}),Oe(()=>{O(xr,A()>0),O(tr,!we()&&A()<Q(),!0)}),Oe(()=>{Hd(n(on),z(),ue(),!0)});let or=G("aria_label_video_player");Ob({fullScreenChangeHandler:Rn,getFullscreenTarget:rn}),Db({store:e.store,getFullscreenTarget:rn});let Eo=(xt,Et)=>{var xo,Vi;let co=(Vi=(xo=e.store.callbacks)==null?void 0:xo.uiInfo)==null?void 0:Vi.onUpcomingLiveViewStateChanged;if(!co)return;let ko=!!Et,yo=Ie(Ie({},jn(n($o),{upcomingLiveScreen:Et},"upcomingLiveScreen",ko)),xt);co(yo)};var Ui=kC();st("blur",Ea,sn);var Dn=C(Ui);ol(Dn,{onClick:gn,get videoContainer(){return De()},set videoContainer(xt){De(xt)}});var nr=L(Dn,2);Va(nr,()=>"slot",!1,(xt,Et)=>{oo(xt,()=>({name:il}))});var rr=L(nr,2);ks(rr,ne,xt=>{var Et=EC(),co=de(Et);let ko=m(()=>r()!=="thumb"||d()||At&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ja(co,{get hidden(){return n(ko)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var yo=L(co,2);{var xo=Ye=>{var Zt=wC(),Ai=de(Zt);{var fo=Lo=>{let qo=m(()=>e.uiConfig.controls.seekStepMobile/1e3);ap(Lo,{side:"left",get seekStep(){return n(qo)},handleSingleFirstClick:gn,handleSecondClick:()=>ir("backward")})};R(Ai,Lo=>{n(xr)&&Lo(fo)})}var Ko=L(Ai,2);{var Kr=Lo=>{let qo=m(()=>e.uiConfig.controls.seekStepMobile/1e3);ap(Lo,{side:"right",get seekStep(){return n(qo)},handleSingleFirstClick:gn,handleSecondClick:()=>ir("forward")})};R(Ko,Lo=>{n(tr)&&Lo(Kr)})}b(Ye,Zt)};R(yo,Ye=>{e.canRewindLive&&Yi&&!_e().has("TIMELINE")&&Ye(xo)})}var Vi=L(yo,2);{var Bn=Ye=>{let Zt=m(()=>{var Ai;return(Ai=e.live)==null?void 0:Ai.startTime});gc(Ye,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Zt)},onUpcomingLiveViewStateChanged:Eo})};R(Vi,Ye=>{r()==="LiveWaitingStart"&&Ye(Bn)})}var Xi=L(Vi,2);{var zr=Ye=>{el(Ye,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Xi,Ye=>{r()==="LiveWaitingRecover"&&Ye(zr)})}var Pi=L(Xi,2);{var _s=Ye=>{el(Ye,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Pi,Ye=>{r()==="LiveWaitingRecord"&&Ye(_s)})}var ns=L(Pi,2);{var Tr=Ye=>{var Zt=SC();let Ai;var fo=C(Zt);Nd(fo,{get adsSlotId(){return Be()},get adsParams(){return it()},get adsAutoplayParam(){return U()},get duration(){return Ae()},get adsExternalApi(){return e.adsExternalApi}}),S(Zt),D(Ko=>Ai=se(Zt,1,"ads-container s-9",null,Ai,Ko),[()=>({hidden:r()!=="ads"})]),b(Ye,Zt)};R(ns,Ye=>{e.showAds&&at()&&Ye(Tr)})}var Uo=L(ns,2);{var Wr=Ye=>{let Zt=m(()=>!St()&&e.showAutoplayNext&&w());Cv(Ye,{get title(){return Pe()},get thumb(){return Fe()},get isHide(){return n(Zt)},clickCloseIcon:()=>O(Fr,!0)})};R(Uo,Ye=>{n(ao)&&Pe()&&Fe()&&Ye(Wr)})}var hn=L(Uo,2);{var _n=Ye=>{mc(Ye,{})};R(hn,Ye=>{xe()&&Ye(_n)})}var Po=L(hn,2);{var Cr=Ye=>{var Zt=TC(),Ai=C(Zt);Md(Ai,{}),S(Zt),b(Ye,Zt)};R(Po,Ye=>{J()&&Ye(Cr)})}var Ue=L(Po,2);{var Lt=Ye=>{vc(Ye,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()}})};R(Ue,Ye=>{X()&&Ye(Lt)})}var xi=L(Ue,2);{var zo=Ye=>{Xa(Ye,{get shifted(){return y()},get captions(){return P()},get position(){return A()},get playerSize(){return k()},isMobile:!0})};R(xi,Ye=>{pe().value!=="off"&&Ye(zo)})}var uo=L(xi,2);{var Ao=Ye=>{var Zt=CC();Zt.__click=[xC,z,Ge,sn];var Ai=C(Zt);Za(Ai,{}),S(Zt),b(Ye,Zt)};R(uo,Ye=>{d()&&Ye(Ao)})}var po=L(uo,2);{var Wo=Ye=>{let Zt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ai=m(()=>r()==="ads"),fo=m(()=>e.canRewindLive&&Ke()!==0);pc(Ye,{get bottomHidden(){return n(Zt)},get showControls(){return y()},get bottomNoSmooth(){return I()},get isAds(){return n(Ai)},get canRewindLive(){return n(fo)},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 Je()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Dt()},get customFullscreenSupported(){return n($r)},get endScreenShown(){return n(ao)},toggleFullscreen:wr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Fo,onDisabledSeekToInteractiveClick:Io,get playerControlsWrapperRef(){return n(so)},set playerControlsWrapperRef(Ko){O(so,Ko,!0)},get playerControlsRef(){return n(ki)},set playerControlsRef(Ko){O(ki,Ko,!0)}})};R(po,Ye=>{at()&&Ye(Wo)})}var Fn=L(po,2);{var an=Ye=>{var Zt=IC(),Ai=C(Zt);bc(Ai,{get supportLink(){return e.supportLink},get returnFocus(){return yC},get ref(){return n(on)},set ref(fo){O(on,fo,!0)}}),S(Zt),b(Ye,Zt)};R(Fn,Ye=>{z()&&Ye(an)})}var Zi=L(Fn,2);let Ji=m(()=>!n(yr));Bd(Zi,{get isLive(){return Te()},get isHidden(){return n(Ji)},get isPlaying(){return j()},get position(){return A()},get duration(){return Q()}});var Hn=L(Zi,2);{var ar=Ye=>{za(Ye,{})};R(Hn,Ye=>{n(Zn)&&Ye(ar)})}var lr=L(Hn,2);{var Un=Ye=>{Wd(Ye,{})};R(lr,Ye=>{ie()&&Ye(Un)})}var bs=L(lr,2);{var $s=Ye=>{$c(Ye,{onClose:Jn,onSelectAutoQuality:()=>{Dr("auto"),Jn()}})};R(bs,Ye=>{n(os)&&Ye($s)})}b(xt,Et)});var sr=L(rr,2);je(sr,xt=>O(Br,xt),()=>n(Br)),S(Ui),je(Ui,xt=>O($o,xt),()=>n($o)),D(()=>Ve(Ui,"aria-label",or)),st("click",Ui,Nn,!0),st("focusin",Ui,On,!0),b(t,Ui),F(),o()}Ze(["click"]);function dp(t){let e="";return ro(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),ro(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),ro(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),ro(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),ro(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),ro(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),ro(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),ro(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),ro(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),ro(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),ro(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),ro(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),ro(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),ro(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),ro(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),ro(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),ro(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),ro(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),ro(t.font)&&(e+=`--font:${t.font};`),ro(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),ro(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function ro(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as AC}from"@vkontakte/videoplayer-shared/es2015";var LC=M('<div class="time-container s-7"><!></div>'),MC=M('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),VC={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 Ev(t,e){B(e,!0),q(t,VC);let[i,o]=Re(),r=()=>x(Z,"$scrubbingInProgress",i),a=()=>x(X,"$playerSize",i),l=()=>x(A,"$isPlaying$",i),d=()=>x(k,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(I,"$playerPhase",i),v=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),f=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),g=()=>x(le,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),T=h(e,"videoContainer",15),{playerPhase:I,state:{crashed$:N,duration$:k,positionExact$:E,isPlaying$:A,currentSubtitle$:Q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:le},ui:{playerSize:X,controls:re,scrubbingInProgress:Z},actions:{internal:{getVideoElement:we}}}=ve(),ue=8,ne=W(!1),_e=ci({}),xe=W(!1),J=m(()=>!r()&&!n(xe)),Ne=()=>{O(ne,!0)},pe=()=>{O(ne,!1)},P=AC(Kl,260);Oe(()=>{a(),P(we(),re,_e,n(ne))});let Ke=m(()=>l()?en(d()-s()):en(isFinite(d())?d():w()));var Te=MC(),j=C(Te);ol(j,{hideCursor:!1,get videoContainer(){return T()},set videoContainer(Pe){T(Pe)}});var ie=L(j,2);Va(ie,()=>"slot",!1,(Pe,Fe)=>{oo(Pe,()=>({name:il}))});var De=L(ie,2);let Be=m(()=>u()!=="thumb"||v());Ja(De,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=L(De,2);{var U=Pe=>{Xa(Pe,{shifted:!1,get captions(){return f()},get position(){return $()},get playerSize(){return a()}})};R(it,Pe=>{p().value!=="off"&&n(J)&&Pe(U)})}var Ae=L(it,2);{var ke=Pe=>{var Fe=LC(),Dt=C(Fe);Dd(Dt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Ke)}}),S(Fe),b(Pe,Fe)};R(Ae,Pe=>{n(J)&&Pe(ke)})}var ze=L(Ae,2);let Je;var ye=C(ze);Ya(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return g()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ue,tooltipRightOffset:ue,get ref(){return _e.timeline},set ref(Pe){_e.timeline=Pe}}),S(ze),S(Te),D(Pe=>Je=se(ze,1,"timeline s-7",null,Je,Pe),[()=>({visible:n(ne)})]),st("mouseenter",Te,Ne),st("mouseleave",Te,pe),st("mouseenter",ze,()=>O(xe,!0)),st("mouseleave",ze,()=>O(xe,!1)),b(t,Te),F(),o()}var BC=M("<div><!></div>"),FC={hash:"s-3",code:'.vk-vp-root.s-3{--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-3{overflow:visible}.vk-vp-root.s-3 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-3 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-3 p{margin:0}.vk-vp-root.s-3 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-3 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-3 :focus,.vk-vp-root.s-3 :focus-visible{outline:none}.vk-vp-root.s-3 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-3 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-3 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-3 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-3 .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-3 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-3 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Pv(t,e){B(e,!0),q(t,FC);let[i,o]=Re(),r=()=>x(at,"$isLive$",i),a=()=>x(It,"$availableSubtitlesList$",i),l=()=>x(qe,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),v=h(e,"videoConfig",7),p=h(e,"uiConfig",7),f=h(e,"title",7),$=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),g=h(e,"interactiveController",7),w=h(e,"subtitles",7),T=h(e,"subtitlesForcedLanguage",7),I=h(e,"live",7),N=h(e,"preload",7),k=h(e,"autoplay",7),E=h(e,"volume",7,void 0),A=h(e,"muted",7,void 0),Q=h(e,"fromTime",7),H=h(e,"canRewindLive",7),z=h(e,"showAds",7),Y=h(e,"adsSlotId",7,void 0),le=h(e,"adsParams",7,void 0),X=h(e,"adsAutoplayParam",7,void 0),re=h(e,"duration",7,void 0),Z=h(e,"logoClickable",7),we=h(e,"logoHidden",7),ue=h(e,"isMobile",7),ne=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),xe=h(e,"prevButtonActive",7,!1),J=h(e,"endScreenVideoTitle",7,void 0),Ne=h(e,"endScreenVideoThumb",7,void 0),pe=h(e,"isOneVideoPlaylist",7,!1),P=h(e,"supportLink",7),Ke=h(e,"shadowRootContainer",7),Te=h(e,"outerContainerRef",7),j=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,Bb),U=h(e,"playPrevChapter",7,Bb),Ae=h(e,"volumeMultiplier",7),ke=h(e,"showAutoplayNext",7),ze=h(e,"showEndScreen",7,!0),Je=h(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Pe}=u();Vh(p());let Fe=Vt(),Dt=p().logoLink,ft=s().ui.debugPanelVisible,Bt=s().ui.playerSize,at=s().state.isLive$,oi=s().state.isInteractive&&kv.device.isAndroid,Rt=W(void 0),$e=null,be=W(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Wh(s(),Pe),Oe(()=>{var K,At;s().ui.isMobile.set(ue()),(At=(K=v().callbacks)==null?void 0:K.onDomReady)==null||At.call(K)});let ee=(K=!1)=>{O(be,!0),K?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},ot=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let K=f_(s().videoId);if(K)switch(K.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,K.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,K.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(K.quality);break}}else{m_(s().videoId),Pf()&&s().actions.internal.setTrafficSavingEnabled(!0);let At=If(s().videoId);At&&s().actions.internal.setQuality(At)}};function fe(K){var Yt,nt,Bi;let At=d()||K;At&&s().initVideo({container:n(Rt),sources:At,failoverHosts:ie(),subtitles:w(),subtitlesForcedLanguage:T(),volumeMultiplier:Ae()});let di=NC.get(Ed)==="true";ft.set(di),Q()>0&&s().actions.external.seekTime(Q());let dt=ue()?Fe.volumeDefault:(nt=(Yt=E())!=null?Yt:yu())!=null?nt:Fe.volumeDefault,wt=(Bi=A())!=null?Bi:a_();if(s().actions.external.setVolume(dt),s().actions.external.setMuted(wt),s().getAdmanWrapper().setInitialVolume(wt?0:dt),ot(),Fe.features.saveRate&&Be()){let Fi=c_();Fi&&!r()&&s().actions.internal.setPlaybackRate(Fi)}if(ke()){let Fi=p_();Fi&&s().actions.internal.setAutoplayNextEnabled(Fi)}s().ui.isAutoplay.set(k()),k()&&ee(),N()&&Fe.features.preload&&s().actions.internal.preload()}let Me=K=>{if(window.ResizeObserver){let At,di;$e=new ResizeObserver(OC(dt=>{let wt=dt[0];if(wt.contentBoxSize){let Yt=Array.isArray(wt.contentBoxSize)?wt.contentBoxSize[0]:wt.contentBoxSize;At=Yt.inlineSize,di=Yt.blockSize}else wt.contentRect&&(At=wt.contentRect.width,di=wt.contentRect.height);Bt.set({width:At,height:di})},300)),$e.observe(K)}Bt.set({width:K.clientWidth,height:K.clientHeight})},yt=()=>{document.hidden&&s().actions.external.stop()};Mt(()=>{var di,dt,wt,Yt;oi&&document.addEventListener("visibilitychange",yt),Fe.debugLog&&s().actions.internal.startLogging(),Me(n(Rt));let K=ye.map(nt=>nt.init({store:s(),microStores:Pe,config:v(),interactiveController:g(),uiConfig:p()})),At=()=>{oi&&document.removeEventListener("visibilitychange",yt),$e==null||$e.disconnect(),K.forEach(nt=>nt.unsubscribe()),s().destroy()};return((di=I())==null?void 0:di.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),At):((dt=I())==null?void 0:dt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),At):(((wt=I())==null?void 0:wt.status)==="finished"||((Yt=I())==null?void 0:Yt.status)==="postlive")&&!(d()&&RC(d()))?(s().actions.internal.setLiveWaitingRecord(!0),At):(fe(),At)});function Pt(){n(be)?s().actions.external.play():ee(!0)}function pt(){s().actions.external.pause()}function ce(K){s().actions.external.setMuted(K)}function We(){s().actions.external.toggleSubtitle()}function Ge(K,At){s().actions.external.changeSubtitle(K,At)}function lt(K){s().actions.external.changeAudioStream(K)}function Ft(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.hideControls()}function Ht(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.showControls()}function ni(K){ue()||K>=0&&K<=1&&s().actions.external.setVolume(K)}function _i(K){s().actions.internal.seekTime(K,DC.UNKNOWN)}function Gi(K){s().actions.external.seekEpisodeStartTime(K)}function Nt(){s().actions.external.returnFocusToEpisodes()}function pi(K){s().actions.external.setPlaybackRate(K)}function vi(K){s().actions.external.setAutoQualityLimits(K)}function ht(){s().actions.external.setQuality("auto")}function Xt(K){s().actions.external.setTrafficSavingEnabled(K)}function $i(K){s().actions.external.setHighQualityEnabled(K)}let Yi=dp(Fe.view),ti=v().playerView==="preview",It=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let K=!1;Oe(()=>{var At;if(!K&&a().length){K=!0;let di;if(Fe.features.userVideoPrefs&&s().videoId){let wt=Tu(Fe.userSalt,String(s().videoId));wt!=null&&wt.subtitleTrackId&&(di=a().find(Yt=>Yt.value===wt.subtitleTrackId))}let dt=(At=T())!=null?At:Lf();dt&&(di=a().find(wt=>wt.language===dt)),s().actions.internal.setSubtitle(di)}})}let qe=s().ui.isPreviewTrackHorizontallyAligned;var yi=BC();let bo;var To=C(yi);{var mn=K=>{Iv(K,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:ee,seekTime:_i,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Rt)},set videoContainer(At){O(Rt,At,!0)}})},Tt=K=>{var At=Le(),di=de(At);{var dt=Yt=>{Ev(Yt,{get thumbUrl(){return $()},get outsideDuration(){return re()},get canRewindLive(){return H()},get videoContainer(){return n(Rt)},set videoContainer(nt){O(Rt,nt,!0)}})},wt=Yt=>{Tv(Yt,{get store(){return s()},get uiConfig(){return Fe},get title(){return f()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return it()},get playPrevChapter(){return U()},firstStart:ee,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Rt)},set videoContainer(nt){O(Rt,nt,!0)},get keyboardControls(){return Je()},set keyboardControls(nt){Je(nt)}})};R(di,Yt=>{ti?Yt(dt):Yt(wt,!1)})}b(K,At)};R(To,K=>{ue()?K(mn):K(Tt,!1)})}S(yi),D(K=>{bo=se(yi,1,"vk-vp-root s-3",null,bo,K),Qe(yi,Yi)},[()=>({"root--miui-browser":kv.device.isMobile&&kv.browser.isMiuiBrowser,"visible-outside":ti,"preview-track-horizontally-alinged":l()})]),b(t,yi);var Ut=F({initVideo:fe,play:Pt,pause:pt,setMuted:ce,toggleSubtitle:We,changeSubtitle:Ge,changeAudioStream:lt,hideControls:Ft,showControls:Ht,setVolume:ni,seekTime:_i,seekEpisodeStartTime:Gi,returnFocusToEpisodes:Nt,setPlaybackRate:pi,setAutoQualityLimits:vi,setAutoQuality:ht,toggleTrafficSaving:Xt,toggleHighQuality:$i,get sources(){return d()},set sources(K){d(K)},get store(){return s()},set store(K){s(K)},get microStoresRoot(){return u()},set microStoresRoot(K){u(K)},get videoConfig(){return v()},set videoConfig(K){v(K)},get uiConfig(){return p()},set uiConfig(K){p(K)},get title(){return f()},set title(K){f(K)},get thumbUrl(){return $()},set thumbUrl(K){$(K)},get interactiveContainer(){return y()},set interactiveContainer(K){y(K)},get interactiveController(){return g()},set interactiveController(K){g(K)},get subtitles(){return w()},set subtitles(K){w(K)},get subtitlesForcedLanguage(){return T()},set subtitlesForcedLanguage(K){T(K)},get live(){return I()},set live(K){I(K)},get preload(){return N()},set preload(K){N(K)},get autoplay(){return k()},set autoplay(K){k(K)},get volume(){return E()},set volume(K){E(K)},get muted(){return A()},set muted(K){A(K)},get fromTime(){return Q()},set fromTime(K){Q(K)},get canRewindLive(){return H()},set canRewindLive(K){H(K)},get showAds(){return z()},set showAds(K){z(K)},get adsSlotId(){return Y()},set adsSlotId(K){Y(K)},get adsParams(){return le()},set adsParams(K){le(K)},get adsAutoplayParam(){return X()},set adsAutoplayParam(K){X(K)},get duration(){return re()},set duration(K){re(K)},get logoClickable(){return Z()},set logoClickable(K){Z(K)},get logoHidden(){return we()},set logoHidden(K){we(K)},get isMobile(){return ue()},set isMobile(K){ue(K)},get showNextPrevButtons(){return ne()},set showNextPrevButtons(K){ne(K)},get nextButtonActive(){return _e()},set nextButtonActive(K){_e(K)},get prevButtonActive(){return xe()},set prevButtonActive(K){xe(K)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(K){J(K)},get endScreenVideoThumb(){return Ne()},set endScreenVideoThumb(K){Ne(K)},get isOneVideoPlaylist(){return pe()},set isOneVideoPlaylist(K){pe(K)},get supportLink(){return P()},set supportLink(K){P(K)},get shadowRootContainer(){return Ke()},set shadowRootContainer(K){Ke(K)},get outerContainerRef(){return Te()},set outerContainerRef(K){Te(K)},get fullScreenTarget(){return j()},set fullScreenTarget(K){j(K)},get failoverHosts(){return ie()},set failoverHosts(K){ie(K)},get showMiniTimer(){return De()},set showMiniTimer(K){De(K)},get saveRate(){return Be()},set saveRate(K){Be(K)},get showAutoplayNext(){return ke()},set showAutoplayNext(K){ke(K)},get seekToInteractive(){return it()},set seekToInteractive(K){it(K)},get playPrevChapter(){return U()},set playPrevChapter(K){U(K)},get volumeMultiplier(){return Ae()},set volumeMultiplier(K){Ae(K)},get showEndScreen(){return ze()},set showEndScreen(K){ze(K)},get keyboardControls(){return Je()},set keyboardControls(K){Je(K)}});return o(),Ut}var HC=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 Av(t,e){let i=h(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");Xe(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=HC();fi(9),b(r,l)},$$slots:{default:!0}})}var UC=M('<div class="title s-2"> </div>'),zC=M('<div class="playerStub s-2"><!> <!></div>'),WC={hash:"s-2",code:".playerStub.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%}.title.s-2{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 Lv(t,e){q(t,WC);var i=zC(),o=C(i);{var r=d=>{var s=UC(),u=C(s,!0);S(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=L(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);Av(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 KC=M('<div class="playerError s-1"><!></div>'),qC={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 Mv(t){q(t,qC);var e=KC(),i=C(e);Za(i,{}),S(e),b(t,e)}import{now as SI,ValueSubject as TI}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as CI,InterfaceLanguage as II,isNonNullable as Fv,Logger as EI,Observable as kI,Subscription as Gb,once as PI,InternalsExposure as AI,skip as LI,getPlayerId as MI}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Yb,isMobile as VI}from"@vkontakte/videoplayer-core/es2015";import{OneStat as RI,ThinOneStat as NI,MediascopePixel as OI}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as QC,Subscription as GC}from"@vkontakte/videoplayer-shared/es2015";var cp=class{constructor(){this.subscription=new GC,this.logger=new QC,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 Nv,detectEmbed as eI}from"@vkontakte/videoplayer-shared/es2015";var YC=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),jC=M('<div><div><!></div> <span class="title s-6"> </span></div>'),XC={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 Vv(t,e){B(e,!0),q(t,XC);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(v,"$isMobile$",i),l=ve(),d=Vt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,v=l.ui.isMobile,p=l.ui.t,f=m(()=>r()&&p("pip_dummy_title")),$=dp(d.view);var y=jC();let g;var w=C(y);let T;var I=C(w);Xe(I,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,A)=>{var Q=YC();fi(),b(E,Q)},$$slots:{default:!0}}),S(w);var N=L(w,2),k=C(N,!0);S(N),S(y),D((E,A)=>{g=se(y,1,"player-pip-dummy s-6",null,g,E),Qe(y,$),T=se(w,1,"dummy-image s-6",null,T,A),me(k,n(f))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var ZC=Object.defineProperty,JC=(t,e,i)=>e in t?ZC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Yl=(t,e,i)=>JC(t,typeof e!="symbol"?e+"":e,i),Rv=(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())}),tI=460,iI=280,wc=class{constructor({enabled:e=!0}={enabled:!0}){Yl(this,"playerDomElement"),Yl(this,"playerParentShadowRoot"),Yl(this,"playerDummyElement"),Yl(this,"svelteContext"),Yl(this,"pipWindow"),Yl(this,"info",{isActive$:new Nv(!1),isEnabled$:new Nv(!1),type:1}),this.info.isEnabled$=new Nv(e)}isSupported(){let{isEmbed:e}=eI();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 Rv(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:tI,height:iI,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=Xr(Vv,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||(Ma(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return Rv(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return Rv(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 Fb(t){return t instanceof wc}var up=class{static getLatestSupportedVersion(e){let i=new Da(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 Hb="Inner error. Unexpectedly root annotation container null reference exception",Ub="Annotation with such name already exists",zb="Annotation with such name does not exist";var jl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as oI,Subscription as nI,throttleFn as rI}from"@vkontakte/videoplayer-shared/es2015";var sI="1",aI=100,pp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new nI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=rI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},aI);this.subscriptions.add(oI(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(Hb);if(this.annotations.has(e))throw new jl(Ub);i.style.zIndex=(o=i.style.zIndex)!=null?o:sI,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(zb);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 fp,Subscription as lI}from"@vkontakte/videoplayer-shared/es2015";var fn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return fp(e),fp(i),fp(r),r.interactiveData&&fp(o),this.subscription=new lI,this.subscription}};var Tc=class extends fn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Gt(Ie({},ae(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 Cc=class extends fn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Gt(Ie({},ae(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:v}=a.ui,p=ge(v),f=()=>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(!$||f())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(f()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Ic=class extends fn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 dI}from"@vkontakte/videoplayer-shared/es2015";var Ov=ae(!1),mp=null,Ec=class extends fn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Gt(Ie({},Ov),{set:(i,o=!1)=>{i!==ge(Ov)&&(this.clearTimeout(),Ov.set(i),!i&&mp&&(mp=!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 v=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(dI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:f,interactiveTimeIndicator:$})=>{var y,g;if(!(!p||!($!=null&&$.isDisplayed))){if(!f)return this.state$.set(!1);v.tooltipHelpHintActive&&mp===null&&(mp=!0,v.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 cI,noop as uI}from"@vkontakte/videoplayer-shared/es2015";var kc=class extends fn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Gt(Ie({},ae(null)),{toggle:uI});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$:v}=r.state,{disabledControls$:p}=r.ui.controls,f=ge(u),$=ge(v);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(bf),!f&&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(bf),!f&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add(cI({graphIsOpened:this.state$,currentGridType:l}).subscribe(v=>vt(this,[v],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(f){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as Wb}from"@vkontakte/videoplayer-shared/es2015";var Pc=class extends fn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(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 Wb(!1),isEnabled$:new Wb(!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 mI,filterChanged as vI}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Dv}from"@vkontakte/videoplayer-shared/es2015";var Kb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?pI({maxCount:t}):void 0,e!==0?fI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},pI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Dv.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}}},fI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Dv.get(e)||"{}")}catch(a){return{}}},o=a=>Dv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(Gt(Ie({},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 fn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),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=Kb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(vI(),mI(v=>v)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var qb=()=>[Tc,Cc,Ic,Ec,kc,Pc,Ac].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Gt(Ie({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Lc}from"@vkontakte/videoplayer-shared/es2015";var vp=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 gp=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 vp(()=>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 gI=M('<div class="root s-0"><!></div>'),hI={hash:"s-0",code:".root.s-0{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Bv(t,e){B(e,!0),q(t,hI);let i=null,o=W(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=de(a);{var d=s=>{var u=Le(),v=de(u);ks(v,()=>n(o),p=>{var f=gI(),$=C(f);let y=m(()=>n(o)==="prev");yc($,{get duration(){return e.animationDuration},get Icon(){return ma},get reversed(){return n(y)}}),S(f),b(p,f)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var _I=Object.defineProperty,bI=Object.defineProperties,$I=Object.getOwnPropertyDescriptors,Qb=Object.getOwnPropertySymbols,yI=Object.prototype.hasOwnProperty,xI=Object.prototype.propertyIsEnumerable,Uv=(t,e,i)=>e in t?_I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Hs=(t,e)=>{for(var i in e||(e={}))yI.call(e,i)&&Uv(t,i,e[i]);if(Qb)for(var i of Qb(e))xI.call(e,i)&&Uv(t,i,e[i]);return t},wI=(t,e)=>bI(t,$I(e)),ei=(t,e,i)=>Uv(t,typeof e!="symbol"?e+"":e,i),hp=(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())}),DI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:II.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:VI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Xn=W(void 0),Hv=ci({animationDuration:0,playbackStatusShow:!1}),_p=class extends HTMLElement{constructor(){super(),ei(this,"svelteStubComponent"),ei(this,"svelteRootComponent"),ei(this,"sveltePersistentLayerComponent"),ei(this,"svelteErrorComponent"),ei(this,"store"),ei(this,"microStoresRoot"),ei(this,"statistics"),ei(this,"sentry"),ei(this,"_shadowRoot"),ei(this,"playerContainer"),ei(this,"rootContainer"),ei(this,"stateContainer"),ei(this,"shadowRootContainer"),ei(this,"playerId"),ei(this,"uiConfig"),ei(this,"coreConfig"),ei(this,"statisticsConfig"),ei(this,"interactiveController"),ei(this,"interactiveContainer"),ei(this,"graphMadePause"),ei(this,"currentPlayingVideoIndex",0),ei(this,"needToRepeatPlaylist",!1),ei(this,"videoConfig"),ei(this,"pictureInPictureApi"),ei(this,"mediaSessionApi"),ei(this,"unsubscribePlayerPhaseSubscription"),ei(this,"logger"),ei(this,"log"),ei(this,"subscription"),ei(this,"interactiveSubscription"),ei(this,"annotationsApi"),ei(this,"slotsApi"),ei(this,"focusManager"),ei(this,"prevIsid"),ei(this,"isInited",!1),ei(this,"postponedInitParams",null),ei(this,"internalsExposure",null),ei(this,"shadowDOMCallbacksDisabled",!1),ei(this,"fatalError$",new TI(null)),ei(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:v,statVKAppId:p,refreshStatAuthToken:f,autoplay:$,isMobile:y,isTouch:g,refDomain:w,deviceId:T,interactiveData:I}=Sc(this.videoConfig,i),N=(o=I==null?void 0:I.projectInfo)==null?void 0:o.pid,k=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:A=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new RI(Hs({movieId:E,albumId:d,place:s,trackCode:v,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:g!=null?g:y,clip:A,refDomain:w,deviceId:T,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||k)&&{projectId:Number(N)}),Hs({refreshAuthToken:f,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(H){console.error(H),this.log({message:H.message})}}),Lc.create("ui"),this.logger=new EI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Gb,this.interactiveSubscription=new Gb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Xr(Mv,{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=Xr(Lv,l),this.sveltePersistentLayerComponent=Xr(Bv,{target:this.playerContainer,props:Hv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Hv.animationDuration=e,Hv.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 NI.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,v,p,f,$;if(!this.videoConfig)return;let{albumId:y,statPlace:g,statAuthToken:w,preload:T,autoplay:I,volume:N,muted:k,fromTime:E,canRewindLive:A,supportLink:Q,showAds:H,adsSlotId:z,adsParams:Y={},adsAutoplayParam:le,interfaceLanguage:X,isCyrillicRelatedInterface:re,logoClickable:Z,logoHidden:we,isMobile:ue,isTouch:ne,isAudioDisabled:_e,isLiveCatchUpMode:xe,fullScreenTarget:J,failoverHosts:Ne,canDownload:pe,callbacks:P,interactiveData:Ke,showThumbTimer:Te,additionalButtons:j=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Be,loop:it,saveRate:U,volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,mediascopePixels:Je}=Sc(this.videoConfig,i),{sources:ye,title:Pe,thumbUrl:Fe,unitedVideoId:Dt,isClip:ft=!1,duration:Bt,adsParams:at={},videoEpisodes:St,previewThumbsData:oi,subtitles:Rt,subtitlesForcedLanguage:$e,live:be,adsExternalApi:ee}=e;if(!ye&&!be){let pi=new Error("empty sources and live");this.fatalError$.next(pi),(r=P.onCrashed)==null||r.call(P,pi.message);return}let ot=Hs(Hs({},Y),at),fe=this.getNextVideoInfo(),Me={sources:ye,title:Pe,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:$e,unitedVideoId:Dt,isClip:ft,live:be,albumId:y,statPlace:g,autoplay:I,muted:k,volume:N,fromTime:E,canRewindLive:A,showAds:H,adsSlotId:z,adsParams:ot,adsAutoplayParam:le,duration:Bt,logoClickable:Z,logoHidden:we,isTouch:ne!=null?ne:ue,repeat:Be,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},yt={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Me)}`});let Pt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),pt=(Pt==null?void 0:Pt.oneStat)||this.createOneStat(e,i),ce=this.createThinOneStat(e,i),We;Je&&(We=new OI({pixels:Je})),(pt||ce)&&(this.statistics=new Yu(pt,ce,We,Pt==null?void 0:Pt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Oa(this.uiConfig.sentry,{version:Ll,env:_u},{movieId:Dt,albumId:y,place:g,autoplay:(l=I&&!this.interactiveController)!=null?l:!1,mobile:ne!=null?ne:ue,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),Oa.getInstance());let lt=!!Ke,Ft=[],Ht="tooltip_interactive_go_back_disabled_first";if(lt&&this.interactiveController){let pi=this.interactiveController.state.isInitialChapter$.getValue(),vi=this.interactiveController.getHistoryState();pi&&Ft.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ft.push("SEEK_TO_INTERACTIVE_BUTTON"),vi.hasPrevChapter$.getValue()||(Ft.push("PLAY_PREV_CHAPTER_BUTTON"),pi||(vi.isGoBackLimited$.getValue()?Ht="tooltip_interactive_go_back_disabled_limit":Ht="tooltip_interactive_go_back_disabled"))}let ni=()=>{var pi;this.isInited=!1,this.prevIsid=void 0;let vi=(o==null?void 0:o.info.isEnded$.getValue())&&((pi=this.interactiveController)==null?void 0:pi.state.isEndChapter$.getValue());P.onReplayInteractiveVideo&&!vi?P.onReplayInteractiveVideo():this.replayInteractiveVideo()},_i=Be&&this.videoConfig.videos.length===1;this.store=ob({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:re,videoId:Dt,isClip:ft,isLiveCatchUpMode:xe,isAudioDisabled:_e,statAuthToken:w,callbacks:P,webApi:yt,videoEpisodes:St,previewThumbsData:oi,canDownload:pe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ft,isInteractive:lt,saveRate:U,interactiveRanges$:(v=this.interactiveController)==null?void 0:v.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ni,playPrevChapterDisabledTooltip:Ht,hasInteractiveBranches:!!(($=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?j:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:pi=>{var vi;return(vi=this.sveltePersistentLayerComponent)==null?void 0:vi.startVideoChangedAnimation(pi)},looped:this.uiConfig.features.useLoopSetting?it:_i,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Gi}=this.microStoresRoot=qb(),Nt=()=>{var pi,vi,ht,Xt,$i,Yi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onCurrentFormatChanged)==null?void 0:qe.call(P,It)})),this.subscription.add(Gi.interactiveControlsOpacity$.subscribe(It=>{var qe;It!==null&&((qe=this==null?void 0:this.interactiveController)==null||qe.setDisabledControls(It))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onThroughputEstimationChanged)==null?void 0:qe.call(P,It)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onTrafficSavingEnabledChanged)==null?void 0:qe.call(P,It)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onHighQualityEnabledChanged)==null?void 0:qe.call(P,It)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onAutoQualityEnabledChanged)==null?void 0:qe.call(P,!!It)})),this.subscription.add(new kI(It=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(qe=>It.next(qe)))}).pipe(LI(1)).subscribe(It=>{var qe;return(qe=P==null?void 0:P.onCurrentPlaybackRateChanged)==null?void 0:qe.call(P,It)})),this.subscription.add(this.store.state.volume$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onVolumeChange)==null?void 0:qe.call(P,It)})),this.subscription.add(this.store.state.muted$.subscribe(It=>{var qe,yi,bo,To;if(It)(qe=P==null?void 0:P.onMute)==null||qe.call(P);else{let mn=(bo=((yi=this.store)==null?void 0:yi.state.volume$)&&ge(this.store.state.volume$))!=null?bo:0;(To=P==null?void 0:P.onUnmute)==null||To.call(P,mn)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(It=>{var qe;return(qe=P==null?void 0:P.onVideoBitrateChanged)==null?void 0:qe.call(P,It)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(It=>{var qe;let yi=(qe=this.store)==null?void 0:qe.ui.controls.disabledControls$;yi&&(It&&!yi.includes(kd)&&yi.add(kd),It||yi.remove(kd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(It=>hp(this,null,function*(){var qe;if(!Yb.browser.isSamsungBrowser||!It||!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(It=>{var qe;return(qe=P==null?void 0:P.onVSIDChanged)==null?void 0:qe.call(P,It)})),this.initMediaSession(),O(Xn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Pe,thumbUrl:Fe,subtitles:Rt,subtitlesForcedLanguage:$e,live:be,preload:T,autoplay:I,muted:k,volume:N,fromTime:E,canRewindLive:A,supportLink:Q,showAds:H,adsSlotId:z,adsParams:ot,adsAutoplayParam:le,duration:Bt,logoClickable:Z,logoHidden:we,isMobile:ne!=null?ne:ue,failoverHosts:Ne,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,adsExternalApi:ee,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let ti={target:this.playerContainer,props:n(Xn)};this.svelteRootComponent=Xr(Pv,ti),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(ht=(vi=(pi=this.videoConfig)==null?void 0:pi.callbacks)==null?void 0:vi.onInited)==null||ht.call(vi)),(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&&((Yi=($i=this.videoConfig)==null?void 0:$i.callbacks)!=null&&Yi.onDevNullLog)?Lc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Lc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Yb.isInited$.subscribe(pi=>{pi&&(console.log("UI SDK async start"),Nt())}):Nt()}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&&Fv(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 hp(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:v,initChapterId:p,historyApi:f,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:v,initChapterId:p,historyApi:f,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(T=>{if(!this.isInited)return;let I=this.store;T?I.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):I.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(T=>{this.store&&this.store.state.isInteractiveExpectation$.set(T)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(T=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=wI(Hs({},T.config),{title:(v==null?void 0:v.title)||T.config.title});let I=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(T.player,I),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:T,actionType:I})=>{var N,k,E,A,Q,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(T==="action-choice"&&I==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Pd)),T==="action-choice-canceled"){let Y=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(k=this.videoConfig)!=null&&k.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(A=this.videoConfig)==null?void 0:(Q=A.callbacks).onDisabledInteractiveClick)==null||H.call(Q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:T,removeAllOpenURI:I})=>{this.store&&T==="container-fake-removed"&&I&&this.store.ui.controls.disabledControls$.remove(Pd)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let T=this.interactiveController.getHistoryState();this.subscription.add(T.history$.subscribe(I=>{var N,k,E;I.length&&((E=(k=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||E.call(k,I))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(T=>{var I,N,k;(k=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveChapterChanged)==null||k.call(N,T.chapter,T.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var T,I,N,k;(T=this.microStoresRoot)==null||T.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(T=>{this.log({message:T.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,v,p,f,$,y,g,w,T,I,N,k,E,A,Q,H,z,Y,le;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=Sc(DI,CI(e,X=>X instanceof HTMLElement?X:void 0)),this.playerId=MI(e.playerId),this.uiConfig=Mh((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 AI("ui",this.playerId))),Lc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((v=this.videoConfig)==null?void 0:v.showAds)],numbers:[SI()]}),Fv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),Fv(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:(T=this.uiConfig.ads.preview)!=null?T:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(I=this.uiConfig.isMobile)!=null?I:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A: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&&((Y=this.videoConfig.videos)!=null&&Y[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=up.getLatestSupportedVersion(X):this.pictureInPictureApi=new Da(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new cp:void 0,this.slotsApi=this.uiConfig.features.slots?new sp:void 0,this.annotationsApi=this.uiConfig.features.annotations?new pp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new gp(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]),Fb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(le=this.slotsApi)==null||le.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(Xn)&&(n(Xn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Xn).nextButtonActive=this.isNextButtonActive(),n(Xn).prevButtonActive=this.isPrevButtonActive(),n(Xn).endScreenVideoTitle=o.nextVideoTitle,n(Xn).endScreenVideoThumb=o.nextVideoThumb,n(Xn).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(Xn)&&(n(Xn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Xn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Xn).nextButtonActive=this.isNextButtonActive(),n(Xn).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 hp(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 hp(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(PI()).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&&Ma(e)}};import{InterfaceLanguage as $ne,VKNumericLanguage as yne,loadVKLangPack as xne}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as Sne,VideoFormat as Tne}from"@vkontakte/videoplayer-core/es2015";var pne=()=>{window.customElements.define("vk-video-player",_p)};export{ju as ControlButtonType,ps as GridTypes,$ne as InterfaceLanguage,Ud as MenuItemType,fs as PlayerPhase,Ll as VERSION,yne as VKNumericLanguage,Tne as VideoFormat,Sne as VideoQuality,xne as loadVKLangPack,pne as registerPlayerWebComponent};
|