@vkontakte/videoplayer 1.1.80 → 1.1.81-dev.0b96aed5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2018.esm.js CHANGED
@@ -1,63 +1,63 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.80
3
- * Tue, 16 Dec 2025 09:28:55 GMT
4
- * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-80/doc/
2
+ * @vkontakte/videoplayer v1.1.81-dev.0b96aed5.0
3
+ * Tue, 27 Jan 2026 06:13:58 GMT
4
+ * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-81/doc/
5
5
  */
6
- var Xb=Object.defineProperty;var Uv=t=>{throw TypeError(t)};var Zb=(t,e,i)=>e in t?Xb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var dr=(t,e,i)=>Zb(t,typeof e!="symbol"?e+"":e,i),yp=(t,e,i)=>e.has(t)||Uv("Cannot "+i);var Vi=(t,e,i)=>(yp(t,e,"read from private field"),i?i.call(t):e.get(t)),zs=(t,e,i)=>e.has(t)?Uv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),rl=(t,e,i,o)=>(yp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),zv=(t,e,i)=>(yp(t,e,"access private method"),i);var Ws="[",Ks="[!",ga="]",rs={};var Zi=Symbol(),Hn=Symbol("filename"),Wv=Symbol("hmr"),Kv="http://www.w3.org/1999/xhtml",Bc="http://www.w3.org/2000/svg";var xp="@attach";var Fc=!0;var Qv,Gv,qv=(Gv=(Qv=globalThis.process)==null?void 0:Qv.env)==null?void 0:Gv.NODE_ENV,Ee=qv&&!qv.toLowerCase().startsWith("prod");var cr=Array.isArray,Yv=Array.prototype.indexOf,ed=Array.from,wp=Object.keys,co=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,Hc=Object.getOwnPropertyDescriptors,Sp=Object.prototype,jv=Array.prototype,ha=Object.getPrototypeOf,Cp=Object.isExtensible;function qs(t){return typeof t=="function"}var mt=()=>{};function Xv(t){return t()}function Qs(t){for(var e=0;e<t.length;e++)t[e]()}var Wo=Symbol("$state"),sl=Symbol("legacy props"),Zv=Symbol(""),Uc=Symbol("proxy path"),zc=1,al=3,ur=8;function Wc(t){return t===this.v}function ll(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Jv(t,e){return t!==e}function dl(t){return!ll(t,this.v)}function eg(){if(Ee){let t=new Error(`derived_references_self
6
+ var Jb=Object.defineProperty;var Wv=t=>{throw TypeError(t)};var e$=(t,e,i)=>e in t?Jb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var nr=(t,e,i)=>e$(t,typeof e!="symbol"?e+"":e,i),Sp=(t,e,i)=>e.has(t)||Wv("Cannot "+i);var Ai=(t,e,i)=>(Sp(t,e,"read from private field"),i?i.call(t):e.get(t)),Qs=(t,e,i)=>e.has(t)?Wv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),al=(t,e,i,o)=>(Sp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Kv=(t,e,i)=>(Sp(t,e,"access private method"),i);var Gs="[",Ys="[!",_a="]",as={};var Xi=Symbol(),zn=Symbol("filename"),qv=Symbol("hmr"),Qv="http://www.w3.org/1999/xhtml",Hc="http://www.w3.org/2000/svg";var Cp="@attach";var Fc=!0;var Yv,jv,Gv=(jv=(Yv=globalThis.process)==null?void 0:Yv.env)==null?void 0:jv.NODE_ENV,Ae=Gv&&!Gv.toLowerCase().startsWith("prod");var rr=Array.isArray,Xv=Array.prototype.indexOf,Jl=Array.from,Tp=Object.keys,ao=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,Uc=Object.getOwnPropertyDescriptors,Ip=Object.prototype,Zv=Array.prototype,ba=Object.getPrototypeOf,Ep=Object.isExtensible;function js(t){return typeof t=="function"}var vt=()=>{};function Jv(t){return t()}function Xs(t){for(var e=0;e<t.length;e++)t[e]()}var Uo=Symbol("$state"),ll=Symbol("legacy props"),eg=Symbol(""),zc=Symbol("proxy path"),Wc=1,dl=3,sr=8;function Kc(t){return t===this.v}function cl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function tg(t,e){return t!==e}function ul(t){return!cl(t,this.v)}function ig(){if(Ae){let t=new Error(`derived_references_self
7
7
  A derived value cannot reference itself recursively
8
- https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function tg(t){if(Ee){let e=new Error(`effect_in_teardown
8
+ https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function og(t){if(Ae){let e=new Error(`effect_in_teardown
9
9
  \`${t}\` cannot be used inside an effect cleanup function
10
- https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function ig(){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 og(t){if(Ee){let e=new Error(`effect_orphan
10
+ https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function ng(){if(Ae){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function rg(t){if(Ae){let e=new Error(`effect_orphan
11
11
  \`${t}\` can only be used inside an effect (e.g. during component initialisation)
12
- https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function ng(){if(Ee){let t=new Error(`effect_update_depth_exceeded
12
+ https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function sg(){if(Ae){let t=new Error(`effect_update_depth_exceeded
13
13
  Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
14
- https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function rg(){if(Ee){let t=new Error(`hydration_failed
14
+ https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ag(){if(Ae){let t=new Error(`hydration_failed
15
15
  Failed to hydrate the application
16
- https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function sg(){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 ag(t){if(Ee){let e=new Error(`props_invalid_value
16
+ https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function lg(){if(Ae){let t=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function dg(t){if(Ae){let e=new Error(`props_invalid_value
17
17
  Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
18
- https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function lg(t){if(Ee){let e=new Error(`props_rest_readonly
18
+ https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function cg(t){if(Ae){let e=new Error(`props_rest_readonly
19
19
  Rest element properties of \`$props()\` such as \`${t}\` are readonly
20
- https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function dg(t){if(Ee){let e=new Error(`rune_outside_svelte
20
+ https://svelte.dev/e/props_rest_readonly`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_rest_readonly")}function ug(t){if(Ae){let e=new Error(`rune_outside_svelte
21
21
  The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
22
- https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function cg(){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 ug(){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 pg(){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 fg(){ss=!0}var td=null;function xs(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
22
+ https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function pg(){if(Ae){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function fg(){if(Ae){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function mg(){if(Ae){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var ls=!1,ds=!1;function vg(){ls=!0}var ed=null;function Ts(t){let e=Error(),i=e.stack;if(i){let o=i.split(`
23
23
  `),r=[`
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;co(e,"stack",{value:r.join(`
25
- `)}),co(e,"name",{value:`${t}Error`})}return e}function zr(t,e){return t.label=e,Kc(t.v,e),t}function Kc(t,e){var i;return(i=t==null?void 0:t[Uc])==null||i.call(t,e),t}function cl(t){if(Ee){let e=new Error(`lifecycle_outside_component
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;ao(e,"stack",{value:r.join(`
25
+ `)}),ao(e,"name",{value:`${t}Error`})}return e}function Gr(t,e){return t.label=e,qc(t.v,e),t}function qc(t,e){var i;return(i=t==null?void 0:t[zc])==null||i.call(t,e),t}function pl(t){if(Ae){let e=new Error(`lifecycle_outside_component
26
26
  \`${t}(...)\` can only be used during component initialisation
27
- https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var zt=null;function id(t){zt=t}var pr=null;function od(t){pr=t}function ul(t){return Ep("getContext").get(t)}function pl(t,e){return Ep("setContext").set(t,e),e}function nd(){return Ep("getAllContexts")}function B(t,e=!1,i){var o=zt={p:zt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ss&&!e&&(zt.l={s:null,u:null,r1:[],r2:kr(!1)}),Io(()=>{o.d=!0}),Ee&&(zt.function=i,pr=i)}function F(t){var l,d;let e=zt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=gt,o=Mt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];uo(a.effect),Hi(a.reaction),Eo(a.fn)}}finally{uo(i),Hi(o)}}zt=e.p,Ee&&(pr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function ls(){return!ss||zt!==null&&zt.l===null}function Ep(t){var e;return zt===null&&cl(t),(e=zt.c)!=null?e:zt.c=new Map(e$(zt)||void 0)}function e$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var t$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ai(t){if(typeof t!="object"||t===null||Wo in t)return t;let e=ha(t);if(e!==Sp&&e!==jv)return t;var i=new Map,o=cr(t),r=K(0),a=Ee&&as?xs("CreatedAt"):null,l=Mt,d=f=>{var p=Mt;Hi(l);var v=f();return Hi(p),v};o&&i.set("length",K(t.length,a));var s="";function u(f){s=f,zr(r,`${s} version`);for(let[p,v]of i)zr(v,_a(s,p))}return new Proxy(t,{defineProperty(f,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&cg();var $=i.get(p);return $===void 0?$=d(()=>{var y=K(v.value,a);return i.set(p,y),Ee&&typeof p=="string"&&zr(y,_a(s,p)),y}):D($,v.value,!0),!0},deleteProperty(f,p){var v=i.get(p);if(v===void 0){if(p in f){let h=d(()=>K(Zi,a));i.set(p,h),kp(r),Ee&&zr(h,_a(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&D($,y)}D(v,Zi),kp(r)}return!0},get(f,p,v){var x;if(p===Wo)return t;if(Ee&&p===Uc)return u;var $=i.get(p),y=p in f;if($===void 0&&(!y||(x=zo(f,p))!=null&&x.writable)&&($=d(()=>{var I=ai(y?f[p]:Zi),T=K(I,a);return Ee&&zr(T,_a(s,p)),T}),i.set(p,$)),$!==void 0){var h=n($);return h===Zi?void 0:h}return Reflect.get(f,p,v)},getOwnPropertyDescriptor(f,p){var v=Reflect.getOwnPropertyDescriptor(f,p);if(v&&"value"in v){var $=i.get(p);$&&(v.value=n($))}else if(v===void 0){var y=i.get(p),h=y==null?void 0:y.v;if(y!==void 0&&h!==Zi)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return v},has(f,p){var h;if(p===Wo)return!0;var v=i.get(p),$=v!==void 0&&v.v!==Zi||Reflect.has(f,p);if(v!==void 0||gt!==null&&(!$||(h=zo(f,p))!=null&&h.writable)){v===void 0&&(v=d(()=>{var x=$?ai(f[p]):Zi,I=K(x,a);return Ee&&zr(I,_a(s,p)),I}),i.set(p,v));var y=n(v);if(y===Zi)return!1}return $},set(f,p,v,$){var k;var y=i.get(p),h=p in f;if(o&&p==="length")for(var x=v;x<y.v;x+=1){var I=i.get(x+"");I!==void 0?D(I,Zi):x in f&&(I=d(()=>K(Zi,a)),i.set(x+"",I),Ee&&zr(I,_a(s,x)))}if(y===void 0)(!h||(k=zo(f,p))!=null&&k.writable)&&(y=d(()=>K(void 0,a)),D(y,ai(v)),i.set(p,y),Ee&&zr(y,_a(s,p)));else{h=y.v!==Zi;var T=d(()=>ai(v));D(y,T)}var N=Reflect.getOwnPropertyDescriptor(f,p);if(N!=null&&N.set&&N.set.call($,v),!h){if(o&&typeof p=="string"){var L=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=L.v&&D(L,E+1)}kp(r)}return!0},ownKeys(f){n(r);var p=Reflect.ownKeys(f).filter(y=>{var h=i.get(y);return h===void 0||h.v!==Zi});for(var[v,$]of i)$.v!==Zi&&!(v in f)&&p.push(v);return p},setPrototypeOf(){ug()}})}function _a(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:t$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function kp(t,e=1){D(t,t.v+e)}function fl(t){try{if(t!==null&&typeof t=="object"&&Wo in t)return t[Wo]}catch(e){}return t}function Pp(t,e){return Object.is(fl(t),fl(e))}function Wr(t){var e=2050,i=Mt!==null&&(Mt.f&2)!==0?Mt:null;gt===null||i!==null&&(i.f&256)!==0?e|=256:gt.f|=1048576;let o={ctx:zt,deps:null,effects:null,equals:Wc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:gt};return Ee&&as&&(o.created=xs("CreatedAt")),o}function m(t){let e=Wr(t);return Gc(e),e}function yn(t){let e=Wr(t);return e.equals=dl,e}function qc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Ui(e[i])}}var Ap=[];function i$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Vp(t){var e,i=gt;if(uo(i$(t)),Ee){let o=ba;Lp(new Set);try{Ap.includes(t)&&eg(),Ap.push(t),qc(t),e=Qc(t)}finally{uo(i),Lp(o),Ap.pop()}}else try{qc(t),e=Qc(t)}finally{uo(i)}return e}function Rp(t){var e=Vp(t);if(t.equals(e)||(t.v=e,t.wv=rd()),!ws){var i=(Ss||(t.f&256)!==0)&&t.deps!==null?4096:1024;xn(t,i)}}var ba=new Set,ml=new Map;function Lp(t){ba=t}function kr(t,e){var i={f:0,v:t,reactions:null,equals:Wc,rv:0,wv:0};return Ee&&as&&(i.created=e!=null?e:xs("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=kr(t,e);return Gc(i),i}function ds(t,e=!1,i=!0){var r,a;let o=kr(t);return e||(o.equals=dl),ss&&i&&zt!==null&&zt.l!==null&&((a=(r=zt.l).s)!=null?a:r.s=[]).push(o),o}function D(t,e,i=!1){var r;Mt!==null&&(!vr||(Mt.f&262144)!==0)&&ls()&&(Mt.f&262162)!==0&&!((r=qo)!=null&&r[1].includes(t)&&qo[0]===Mt)&&pg();let o=i?ai(e):e;return Ee&&Kc(o,t.label),vl(t,o)}function vl(t,e){if(!t.equals(e)){var i=t.v;if(ws?ml.set(t,e):ml.set(t,i),t.v=e,Ee&&as&&(t.updated=xs("UpdatedAt"),gt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Vp(t),xn(t,(t.f&256)===0?1024:4096)),t.wv=rd(),vg(t,2048),ls()&&gt!==null&&(gt.f&1024)!==0&&(gt.f&96)===0&&(mr===null?gg([t]):mr.push(t)),Ee&&ba.size>0){let o=Array.from(ba);for(let r of o)(r.f&1024)!==0&&xn(r,4096),ya(r)&&gl(r);ba.clear()}}return e}function vg(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===gt)){if(Ee&&(d&262144)!==0){ba.add(l);continue}xn(l,e),(d&1280)!==0&&((d&2)!==0?vg(l,4096):ad(l))}}}var hl="font-weight: bold",_l="font-weight: normal";function hg(t,e,i){Ee?console.warn(`%c[svelte] hydration_attribute_changed
27
+ https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Ft=null;function td(t){Ft=t}var ar=null;function id(t){ar=t}function fl(t){return Ap("getContext").get(t)}function ml(t,e){return Ap("setContext").set(t,e),e}function od(){return Ap("getAllContexts")}function B(t,e=!1,i){var o=Ft={p:Ft,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ls&&!e&&(Ft.l={s:null,u:null,r1:[],r2:kr(!1)}),Eo(()=>{o.d=!0}),Ae&&(Ft.function=i,ar=i)}function H(t){var l,d;let e=Ft;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=_t,o=Rt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];lo(a.effect),Ui(a.reaction),ko(a.fn)}}finally{lo(i),Ui(o)}}Ft=e.p,Ae&&(ar=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function cs(){return!ls||Ft!==null&&Ft.l===null}function Ap(t){var e;return Ft===null&&pl(t),(e=Ft.c)!=null?e:Ft.c=new Map(i$(Ft)||void 0)}function i$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var o$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function si(t){if(typeof t!="object"||t===null||Uo in t)return t;let e=ba(t);if(e!==Ip&&e!==Zv)return t;var i=new Map,o=rr(t),r=q(0),a=Ae&&ds?Ts("CreatedAt"):null,l=Rt,d=f=>{var p=Rt;Ui(l);var v=f();return Ui(p),v};o&&i.set("length",q(t.length,a));var s="";function u(f){s=f,Gr(r,`${s} version`);for(let[p,v]of i)Gr(v,$a(s,p))}return new Proxy(t,{defineProperty(f,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&pg();var _=i.get(p);return _===void 0?_=d(()=>{var y=q(v.value,a);return i.set(p,y),Ae&&typeof p=="string"&&Gr(y,$a(s,p)),y}):R(_,v.value,!0),!0},deleteProperty(f,p){var v=i.get(p);if(v===void 0){if(p in f){let b=d(()=>q(Xi,a));i.set(p,b),Lp(r),Ae&&Gr(b,$a(s,p))}}else{if(o&&typeof p=="string"){var _=i.get("length"),y=Number(p);Number.isInteger(y)&&y<_.v&&R(_,y)}R(v,Xi),Lp(r)}return!0},get(f,p,v){var w;if(p===Uo)return t;if(Ae&&p===zc)return u;var _=i.get(p),y=p in f;if(_===void 0&&(!y||(w=Fo(f,p))!=null&&w.writable)&&(_=d(()=>{var I=si(y?f[p]:Xi),T=q(I,a);return Ae&&Gr(T,$a(s,p)),T}),i.set(p,_)),_!==void 0){var b=n(_);return b===Xi?void 0:b}return Reflect.get(f,p,v)},getOwnPropertyDescriptor(f,p){var v=Reflect.getOwnPropertyDescriptor(f,p);if(v&&"value"in v){var _=i.get(p);_&&(v.value=n(_))}else if(v===void 0){var y=i.get(p),b=y==null?void 0:y.v;if(y!==void 0&&b!==Xi)return{enumerable:!0,configurable:!0,value:b,writable:!0}}return v},has(f,p){var b;if(p===Uo)return!0;var v=i.get(p),_=v!==void 0&&v.v!==Xi||Reflect.has(f,p);if(v!==void 0||_t!==null&&(!_||(b=Fo(f,p))!=null&&b.writable)){v===void 0&&(v=d(()=>{var w=_?si(f[p]):Xi,I=q(w,a);return Ae&&Gr(I,$a(s,p)),I}),i.set(p,v));var y=n(v);if(y===Xi)return!1}return _},set(f,p,v,_){var k;var y=i.get(p),b=p in f;if(o&&p==="length")for(var w=v;w<y.v;w+=1){var I=i.get(w+"");I!==void 0?R(I,Xi):w in f&&(I=d(()=>q(Xi,a)),i.set(w+"",I),Ae&&Gr(I,$a(s,w)))}if(y===void 0)(!b||(k=Fo(f,p))!=null&&k.writable)&&(y=d(()=>q(void 0,a)),R(y,si(v)),i.set(p,y),Ae&&Gr(y,$a(s,p)));else{b=y.v!==Xi;var T=d(()=>si(v));R(y,T)}var N=Reflect.getOwnPropertyDescriptor(f,p);if(N!=null&&N.set&&N.set.call(_,v),!b){if(o&&typeof p=="string"){var A=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=A.v&&R(A,E+1)}Lp(r)}return!0},ownKeys(f){n(r);var p=Reflect.ownKeys(f).filter(y=>{var b=i.get(y);return b===void 0||b.v!==Xi});for(var[v,_]of i)_.v!==Xi&&!(v in f)&&p.push(v);return p},setPrototypeOf(){fg()}})}function $a(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:o$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function Lp(t,e=1){R(t,t.v+e)}function vl(t){try{if(t!==null&&typeof t=="object"&&Uo in t)return t[Uo]}catch(e){}return t}function Mp(t,e){return Object.is(vl(t),vl(e))}function Yr(t){var e=2050,i=Rt!==null&&(Rt.f&2)!==0?Rt:null;_t===null||i!==null&&(i.f&256)!==0?e|=256:_t.f|=1048576;let o={ctx:Ft,deps:null,effects:null,equals:Kc,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:_t};return Ae&&ds&&(o.created=Ts("CreatedAt")),o}function m(t){let e=Yr(t);return Yc(e),e}function Sn(t){let e=Yr(t);return e.equals=ul,e}function Qc(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)zi(e[i])}}var Vp=[];function n$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function Dp(t){var e,i=_t;if(lo(n$(t)),Ae){let o=ya;Rp(new Set);try{Vp.includes(t)&&ig(),Vp.push(t),Qc(t),e=Gc(t)}finally{lo(i),Rp(o),Vp.pop()}}else try{Qc(t),e=Gc(t)}finally{lo(i)}return e}function Op(t){var e=Dp(t);if(t.equals(e)||(t.v=e,t.wv=nd()),!Is){var i=(Es||(t.f&256)!==0)&&t.deps!==null?4096:1024;Cn(t,i)}}var ya=new Set,gl=new Map;function Rp(t){ya=t}function kr(t,e){var i={f:0,v:t,reactions:null,equals:Kc,rv:0,wv:0};return Ae&&ds&&(i.created=e!=null?e:Ts("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function q(t,e){let i=kr(t,e);return Yc(i),i}function us(t,e=!1,i=!0){var r,a;let o=kr(t);return e||(o.equals=ul),ls&&i&&Ft!==null&&Ft.l!==null&&((a=(r=Ft.l).s)!=null?a:r.s=[]).push(o),o}function R(t,e,i=!1){var r;Rt!==null&&(!cr||(Rt.f&262144)!==0)&&cs()&&(Rt.f&262162)!==0&&!((r=Wo)!=null&&r[1].includes(t)&&Wo[0]===Rt)&&mg();let o=i?si(e):e;return Ae&&qc(o,t.label),hl(t,o)}function hl(t,e){if(!t.equals(e)){var i=t.v;if(Is?gl.set(t,e):gl.set(t,i),t.v=e,Ae&&ds&&(t.updated=Ts("UpdatedAt"),_t!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&Dp(t),Cn(t,(t.f&256)===0?1024:4096)),t.wv=nd(),hg(t,2048),cs()&&_t!==null&&(_t.f&1024)!==0&&(_t.f&96)===0&&(dr===null?_g([t]):dr.push(t)),Ae&&ya.size>0){let o=Array.from(ya);for(let r of o)(r.f&1024)!==0&&Cn(r,4096),wa(r)&&_l(r);ya.clear()}}return e}function hg(t,e){var i=t.reactions;if(i!==null)for(var o=cs(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===_t)){if(Ae&&(d&262144)!==0){ya.add(l);continue}Cn(l,e),(d&1280)!==0&&((d&2)!==0?hg(l,4096):sd(l))}}}var bl="font-weight: bold",$l="font-weight: normal";function bg(t,e,i){Ae?console.warn(`%c[svelte] hydration_attribute_changed
28
28
  %cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
29
- https://svelte.dev/e/hydration_attribute_changed`,hl,_l):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function _g(t){Ee?console.warn(`%c[svelte] hydration_html_changed
29
+ https://svelte.dev/e/hydration_attribute_changed`,bl,$l):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function $g(t){Ae?console.warn(`%c[svelte] hydration_html_changed
30
30
  %c${t?`The value of an \`{@html ...}\` block ${t} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
31
- https://svelte.dev/e/hydration_html_changed`,hl,_l):console.warn("https://svelte.dev/e/hydration_html_changed")}function Gs(t){Ee?console.warn(`%c[svelte] hydration_mismatch
31
+ https://svelte.dev/e/hydration_html_changed`,bl,$l):console.warn("https://svelte.dev/e/hydration_html_changed")}function Zs(t){Ae?console.warn(`%c[svelte] hydration_mismatch
32
32
  %c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
33
- https://svelte.dev/e/hydration_mismatch`,hl,_l):console.warn("https://svelte.dev/e/hydration_mismatch")}function bg(){Ee?console.warn(`%c[svelte] lifecycle_double_unmount
33
+ https://svelte.dev/e/hydration_mismatch`,bl,$l):console.warn("https://svelte.dev/e/hydration_mismatch")}function yg(){Ae?console.warn(`%c[svelte] lifecycle_double_unmount
34
34
  %cTried to unmount a component that was not mounted
35
- https://svelte.dev/e/lifecycle_double_unmount`,hl,_l):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function $g(){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",hl,_l):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Yc(t){Ee?console.warn(`%c[svelte] state_proxy_equality_mismatch
35
+ https://svelte.dev/e/lifecycle_double_unmount`,bl,$l):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function xg(){Ae?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",bl,$l):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function jc(t){Ae?console.warn(`%c[svelte] state_proxy_equality_mismatch
36
36
  %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
37
- https://svelte.dev/e/state_proxy_equality_mismatch`,hl,_l):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var Je=!1;function po(t){Je=t}var ht;function xi(t){if(t===null)throw Gs(),rs;return ht=t}function zi(){return xi(Qo(ht))}function S(t){if(Je){if(Qo(ht)!==null)throw Gs(),rs;ht=t}}function li(t=1){if(Je){for(var e=t,i=ht;e--;)i=Qo(i);ht=i}}function xa(){for(var t=0,e=ht;;){if(e.nodeType===ur){var i=e.data;if(i===ga){if(t===0)return e;t-=1}else(i===Ws||i===Ks)&&(t+=1)}var o=Qo(e);e.remove(),e=o}}function jc(t){if(!t||t.nodeType!==ur)throw Gs(),rs;return t.data}function yg(){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(fl(this[s])===a){Yc("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(fl(this[s])===a){Yc("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(fl(this[s])===a){Yc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var wa,xg,ld,wg,Sg;function Xc(){if(wa===void 0){wa=window,xg=document,ld=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;wg=zo(e,"firstChild").get,Sg=zo(e,"nextSibling").get,Cp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Cp(i)&&(i.__t=void 0),Ee&&(t.__svelte_meta=null,yg())}}function wn(t=""){return document.createTextNode(t)}function Ti(t){return wg.call(t)}function Qo(t){return Sg.call(t)}function C(t,e){if(!Je)return Ti(t);var i=Ti(ht);if(i===null)i=ht.appendChild(wn());else if(e&&i.nodeType!==al){var o=wn();return i==null||i.before(o),xi(o),o}return xi(i),i}function ce(t,e){var r,a;if(!Je){var i=Ti(t);return i.nodeType===8&&i.data===""?Qo(i):i}if(e&&((r=ht)==null?void 0:r.nodeType)!==al){var o=wn();return(a=ht)==null||a.before(o),xi(o),o}return ht}function A(t,e=1,i=!1){let o=Je?ht:t;for(var r;e--;)r=o,o=Qo(o);if(!Je)return o;if(i&&(o==null?void 0:o.nodeType)!==al){var a=wn();return o===null?r==null||r.after(a):o.before(a),xi(a),a}return xi(o),o}function dd(t){t.textContent=""}function Op(t){gt===null&&Mt===null&&og(t),Mt!==null&&(Mt.f&256)!==0&&gt===null&&ig(),ws&&tg(t)}function o$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Sa(t,e,i,o=!0){var s;var r=gt;if(Ee)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:zt,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=pr),i)try{gl(a),a.f|=32768}catch(u){throw Ui(a),u}else e!==null&&ad(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&&o$(a,r),Mt!==null&&(Mt.f&2)!==0)){var d=Mt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Io(t){let e=Sa(8,null,!1);return xn(e,1024),e.teardown=t,e}function Ne(t){var r;Op("$effect");var e=gt!==null&&(gt.f&32)!==0&&zt!==null&&!zt.m;if(Ee&&co(t,"name",{value:"$effect"}),e){var i=zt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:gt,reaction:Mt})}else{var o=Eo(t);return o}}function pd(t){return Op("$effect.pre"),Ee&&co(t,"name",{value:"$effect.pre"}),Go(t)}function eu(t){let e=Sa(64,t,!0);return()=>{Ui(e)}}function Tg(t){let e=Sa(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Kn(e,()=>{Ui(e),o(void 0)}):(Ui(e),o(void 0))})}function Eo(t){return Sa(4,t,!1)}function Go(t){return Sa(8,t,!0)}function O(t,e=[],i=Wr){if(Ee)return Go(()=>{var r=gt,a=()=>t(...l.map(n));co(r.fn,"name",{value:"{expression}"}),co(a,"name",{value:"{expression}"});let l=e.map(i);Wi(a)});let o=e.map(i);return Wi(()=>t(...o.map(n)))}function Wi(t,e=0){return Sa(24|e,t,!0)}function Ri(t,e=!0){return Sa(40,t,!0,e)}function Bp(t){var e=t.teardown;if(e!==null){let i=ws,o=Mt;Np(!0),Hi(null);try{e.call(null)}finally{Np(i),Hi(o)}}}function Fp(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:Ui(i,e),i=o}}function Ig(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Ui(e),e=i}}function Ui(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Hp(t.nodes_start,t.nodes_end),i=!0),Fp(t,e&&!i),fd(t,0),xn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Bp(t);var r=t.parent;r!==null&&r.first!==null&&Up(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 Hp(t,e){for(;t!==null;){var i=t===e?null:Qo(t);t.remove(),t=i}}function Up(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 Kn(t,e){var i=[];tu(t,i,!0),zp(i,()=>{Ui(t),e&&e()})}function zp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function tu(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;tu(o,e,a?i:!1),o=r}}}function Ts(t){Eg(t,!0)}function Eg(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;Eg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var md=[],Wp=[];function kg(){var t=md;md=[],Qs(t)}function n$(){var t=Wp;Wp=[],Qs(t)}function Sn(t){md.length===0&&queueMicrotask(kg),md.push(t)}function Pg(){md.length>0&&kg(),Wp.length>0&&n$()}function Lg(t){var e=gt;if(Ee&&t instanceof Error&&r$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else vd(t,e)}function vd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Ag=new WeakSet;function r$(t,e){var l,d;if(Ag.has(t))return;Ag.add(t);let i=zo(t,"message");if(!(i&&!i.configurable)){for(var o=ld?" ":" ",r=`
37
+ https://svelte.dev/e/state_proxy_equality_mismatch`,bl,$l):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var tt=!1;function co(t){tt=t}var bt;function yi(t){if(t===null)throw Zs(),as;return bt=t}function Wi(){return yi(Ko(bt))}function S(t){if(tt){if(Ko(bt)!==null)throw Zs(),as;bt=t}}function ai(t=1){if(tt){for(var e=t,i=bt;e--;)i=Ko(i);bt=i}}function Sa(){for(var t=0,e=bt;;){if(e.nodeType===sr){var i=e.data;if(i===_a){if(t===0)return e;t-=1}else(i===Gs||i===Ys)&&(t+=1)}var o=Ko(e);e.remove(),e=o}}function Xc(t){if(!t||t.nodeType!==sr)throw Zs(),as;return t.data}function wg(){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(vl(this[s])===a){jc("array.indexOf(...)");break}}return d},t.lastIndexOf=function(a,l){let d=o.call(this,a,l!=null?l:this.length-1);if(d===-1){for(let s=0;s<=(l!=null?l:this.length-1);s+=1)if(vl(this[s])===a){jc("array.lastIndexOf(...)");break}}return d},t.includes=function(a,l){let d=r.call(this,a,l);if(!d){for(let s=0;s<this.length;s+=1)if(vl(this[s])===a){jc("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Ca,Sg,ad,Cg,Tg;function Zc(){if(Ca===void 0){Ca=window,Sg=document,ad=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Cg=Fo(e,"firstChild").get,Tg=Fo(e,"nextSibling").get,Ep(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Ep(i)&&(i.__t=void 0),Ae&&(t.__svelte_meta=null,wg())}}function Tn(t=""){return document.createTextNode(t)}function xi(t){return Cg.call(t)}function Ko(t){return Tg.call(t)}function C(t,e){if(!tt)return xi(t);var i=xi(bt);if(i===null)i=bt.appendChild(Tn());else if(e&&i.nodeType!==dl){var o=Tn();return i==null||i.before(o),yi(o),o}return yi(i),i}function ce(t,e){var r,a;if(!tt){var i=xi(t);return i.nodeType===8&&i.data===""?Ko(i):i}if(e&&((r=bt)==null?void 0:r.nodeType)!==dl){var o=Tn();return(a=bt)==null||a.before(o),yi(o),o}return bt}function P(t,e=1,i=!1){let o=tt?bt:t;for(var r;e--;)r=o,o=Ko(o);if(!tt)return o;if(i&&(o==null?void 0:o.nodeType)!==dl){var a=Tn();return o===null?r==null||r.after(a):o.before(a),yi(a),a}return yi(o),o}function ld(t){t.textContent=""}function Fp(t){_t===null&&Rt===null&&rg(t),Rt!==null&&(Rt.f&256)!==0&&_t===null&&ng(),Is&&og(t)}function r$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ta(t,e,i,o=!0){var s;var r=_t;if(Ae)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Ft,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Ae&&(a.component_function=ar),i)try{_l(a),a.f|=32768}catch(u){throw zi(a),u}else e!==null&&sd(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&&r$(a,r),Rt!==null&&(Rt.f&2)!==0)){var d=Rt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Eo(t){let e=Ta(8,null,!1);return Cn(e,1024),e.teardown=t,e}function Oe(t){var r;Fp("$effect");var e=_t!==null&&(_t.f&32)!==0&&Ft!==null&&!Ft.m;if(Ae&&ao(t,"name",{value:"$effect"}),e){var i=Ft;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:_t,reaction:Rt})}else{var o=ko(t);return o}}function ud(t){return Fp("$effect.pre"),Ae&&ao(t,"name",{value:"$effect.pre"}),qo(t)}function tu(t){let e=Ta(64,t,!0);return()=>{zi(e)}}function Eg(t){let e=Ta(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Qn(e,()=>{zi(e),o(void 0)}):(zi(e),o(void 0))})}function ko(t){return Ta(4,t,!1)}function qo(t){return Ta(8,t,!0)}function D(t,e=[],i=Yr){if(Ae)return qo(()=>{var r=_t,a=()=>t(...l.map(n));ao(r.fn,"name",{value:"{expression}"}),ao(a,"name",{value:"{expression}"});let l=e.map(i);Ki(a)});let o=e.map(i);return Ki(()=>t(...o.map(n)))}function Ki(t,e=0){return Ta(24|e,t,!0)}function Li(t,e=!0){return Ta(40,t,!0,e)}function Up(t){var e=t.teardown;if(e!==null){let i=Is,o=Rt;Bp(!0),Ui(null);try{e.call(null)}finally{Bp(i),Ui(o)}}}function zp(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:zi(i,e),i=o}}function kg(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&zi(e),e=i}}function zi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(Wp(t.nodes_start,t.nodes_end),i=!0),zp(t,e&&!i),pd(t,0),Cn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();Up(t);var r=t.parent;r!==null&&r.first!==null&&Kp(t),Ae&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Wp(t,e){for(;t!==null;){var i=t===e?null:Ko(t);t.remove(),t=i}}function Kp(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=[];iu(t,i,!0),qp(i,()=>{zi(t),e&&e()})}function qp(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function iu(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;iu(o,e,a?i:!1),o=r}}}function Ps(t){Pg(t,!0)}function Pg(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;Pg(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var fd=[],Qp=[];function Ag(){var t=fd;fd=[],Xs(t)}function s$(){var t=Qp;Qp=[],Xs(t)}function In(t){fd.length===0&&queueMicrotask(Ag),fd.push(t)}function Lg(){fd.length>0&&Ag(),Qp.length>0&&s$()}function Vg(t){var e=_t;if(Ae&&t instanceof Error&&a$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else md(t,e)}function md(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var Mg=new WeakSet;function a$(t,e){var l,d;if(Mg.has(t))return;Mg.add(t);let i=Fo(t,"message");if(!(i&&!i.configurable)){for(var o=ad?" ":" ",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[Hn].split("/").pop()}`,a=a.p;co(t,"message",{value:t.message+`
39
+ ${o}in ${(d=a.function)==null?void 0:d[zn].split("/").pop()}`,a=a.p;ao(t,"message",{value:t.message+`
40
40
  ${r}
41
- `}),t.stack&&co(t,"stack",{value:t.stack.split(`
41
+ `}),t.stack&&ao(t,"stack",{value:t.stack.split(`
42
42
  `).filter(s=>!s.includes("svelte/src/internal")).join(`
43
- `)})}}var Ca=!1,bl=null,Ta=!1,ws=!1;function Np(t){ws=t}var gd=[],hd=[],Mt=null,vr=!1;function Hi(t){Mt=t}var gt=null;function uo(t){gt=t}var qo=null;function Gc(t){Mt!==null&&Mt.f&2097152&&(qo===null?qo=[Mt,[t]]:qo[1].push(t))}var Cn=null,gr=0,mr=null;function gg(t){mr=t}var Rg=1,ou=0,Ss=!1,nu=null;function rd(){return++Rg}function ya(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&gt!==null&&!Ss,s=i.length;if(l||d){var u=t,f=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&f!==null&&(f.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],ya(a)&&Rp(a),a.wv>t.wv)return!0}(!o||gt!==null&&!Ss)&&xn(t,1024)}return!1}function Ng(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];qo!=null&&qo[1].includes(t)&&qo[0]===Mt||((a.f&2)!==0?Ng(a,e,!1):e===a&&(i?xn(a,2048):(a.f&1024)!==0&&xn(a,4096),ad(a)))}}function Qc(t){var $,y;var e=Cn,i=gr,o=mr,r=Mt,a=Ss,l=qo,d=zt,s=vr,u=t.f;Cn=null,gr=0,mr=null,Ss=(u&256)!==0&&(vr||!Ta||Mt===null),Mt=(u&96)===0?t:null,qo=null,id(t.ctx),vr=!1,ou++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(Cn!==null){var v;if(fd(t,gr),p!==null&&gr>0)for(p.length=gr+Cn.length,v=0;v<Cn.length;v++)p[gr+v]=Cn[v];else t.deps=p=Cn;if(!Ss||(u&2)!==0&&t.reactions!==null)for(v=gr;v<p.length;v++)((y=($=p[v]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&gr<p.length&&(fd(t,gr),p.length=gr);if(ls()&&mr!==null&&!vr&&p!==null&&(t.f&6146)===0)for(v=0;v<mr.length;v++)Ng(mr[v],t);return r!==null&&r!==t&&(ou++,mr!==null&&(o===null?o=mr:o.push(...mr))),f}catch(h){Lg(h)}finally{Cn=e,gr=i,mr=o,Mt=r,Ss=a,qo=l,id(d),vr=s,t.f^=2097152}}function s$(t,e){let i=e.reactions;if(i!==null){var o=Yv.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&&(Cn===null||!Cn.includes(e))&&(xn(e,4096),(e.f&768)===0&&(e.f^=512),qc(e),fd(e,0))}function fd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)s$(t,i[o])}function gl(t){var e=t.f;if((e&16384)===0){xn(t,1024);var i=gt,o=Ta;if(gt=t,Ta=!0,Ee){var r=pr;od(t.component_function)}try{(e&16)!==0?Ig(t):Fp(t),Bp(t);var a=Qc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Rg,Ee&&as&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=rd(),l.set_during_effect=!1);Ee&&hd.push(t)}finally{Ta=o,gt=i,Ee&&od(r)}}}function Mg(){console.error("Last ten effects were: ",hd.slice(-10).map(t=>t.fn)),hd=[]}function a$(){try{ng()}catch(t){if(Ee&&co(t,"stack",{value:""}),bl!==null)if(Ee)try{vd(t,bl)}catch(e){throw Mg(),e}else vd(t,bl);else throw Ee&&Mg(),t}}function qp(){var t=Ta;try{var e=0;for(Ta=!0;gd.length>0;){e++>1e3&&a$();var i=gd,o=i.length;gd=[];for(var r=0;r<o;r++){var a=d$(i[r]);l$(a)}ml.clear()}}finally{Ca=!1,Ta=t,bl=null,Ee&&(hd=[])}}function l$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&ya(o)&&(gl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Up(o):o.fn=null))}}function ad(t){Ca||(Ca=!0,queueMicrotask(qp));for(var e=bl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}gd.push(e)}function d$(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:ya(i)&&gl(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 $l(t){var e;for(t&&(Ca=!0,qp(),Ca=!0,e=t());;){if(Pg(),gd.length===0)return Ca=!1,bl=null,Ee&&(hd=[]),e;Ca=!0,qp()}}async function fo(){await Promise.resolve(),$l()}function n(t){var e=t.f,i=(e&2)!==0;if(nu!==null&&nu.add(t),Mt!==null&&!vr){if(!(qo!=null&&qo[1].includes(t))||qo[0]!==Mt){var o=Mt.deps;t.rv<ou&&(t.rv=ou,Cn===null&&o!==null&&o[gr]===t?gr++:Cn===null?Cn=[t]:(!Ss||!Cn.includes(t))&&Cn.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,ya(r)&&Rp(r)),Ee&&as&&!vr&&td!==null&&Mt!==null&&td.reaction===Mt)if(t.trace)t.trace();else{var l=xs("TracedAt");if(l){var d=td.entries.get(t);d===void 0&&(d={traces:[]},td.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&&ml.has(t)?ml.get(t):t.v}function St(t){var e=vr;try{return vr=!0,t()}finally{vr=e}}var c$=-7169;function xn(t,e){t.f=t.f&c$|e}function su(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Wo in t)ru(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Wo in i&&ru(i)}}}function ru(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{ru(t[o],e)}catch(r){}let i=ha(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Hc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function Qp(t,e){if(e){let i=document.body;t.autofocus=!0,Sn(()=>{document.activeElement===i&&t.focus()})}}function _d(t){var e=Mt,i=gt;Hi(null),uo(null);try{return t()}finally{Hi(e),uo(i)}}var Gp=new Set,au=new Set;function Ia(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 Yp(t,e,i,o={}){function r(a){if(o.capture||yl.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=Yp(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Io(()=>{e.removeEventListener(t,l,a)})}function Ge(t){for(var e=0;e<t.length;e++)Gp.add(t[e]);for(var i of au)i(t)}function yl(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){co(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Mt,p=gt;Hi(null),uo(null);try{for(var v,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+o];if(h!=null&&(!a.disabled||t.target===a))if(cr(h)){var[x,...I]=h;x.apply(a,[t,...I])}else h.call(a,t)}catch(N){v?$.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of $)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,Hi(f),uo(p)}}}var p$;function Dg(){p$=void 0}function xl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function ko(t,e){var i=gt;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 ko(ht,null),ht;r===void 0&&(r=xl(a?t:"<!>"+t),i||(r=Ti(r)));var l=o||ld?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ti(l),s=l.lastChild;ko(d,s)}else ko(l,l);return l}}function v$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(Je)return ko(ht,null),ht;if(!l){var d=xl(a),s=Ti(d);if(r)for(l=document.createDocumentFragment();Ti(s);)l.appendChild(Ti(s));else l=Ti(s)}var u=l.cloneNode(!0);if(r){var f=Ti(u),p=u.lastChild;ko(f,p)}else ko(u,u);return u}}function Ce(t,e){return v$(t,e,"svg")}function cs(t=""){if(!Je){var e=wn(t+"");return ko(e,e),e}var i=ht;return i.nodeType!==al&&(i.before(i=wn()),xi(i)),ko(i,i),i}function Ae(){if(Je)return ko(ht,null),ht;var t=document.createDocumentFragment(),e=document.createComment(""),i=wn();return t.append(e,i),ko(e,i),t}function b(t,e){if(Je){gt.nodes_end=ht,zi();return}t!==null&&t.before(e)}var g$=/\r/g;function Bg(t){t=t.replace(g$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Fg(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var h$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Hg(t){return h$.includes(t)}var _$=["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 b$={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 Ug(t){var e;return t=t.toLowerCase(),(e=b$[t])!=null?e:t}var fP=[..._$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var $$=["touchstart","touchmove"];function zg(t){return $$.includes(t)}var y$=["$state","$state.raw","$derived","$derived.by"],mP=[...y$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var x$=["textarea","script","style","title"];function Wg(t){return x$.includes(t)}function lu(t){return t==null?void 0:t.replace(/\//g,"/​")}var bd=!0;function du(t){bd=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 Qr(t,e){return Kg(t,e)}function Xp(t,e){var l;Xc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=Je,r=ht;try{for(var a=Ti(i);a&&(a.nodeType!==ur||a.data!==Ws);)a=Qo(a);if(!a)throw rs;po(!0),xi(a),zi();let d=Kg(t,{...e,anchor:a});if(ht===null||ht.nodeType!==ur||ht.data!==ga)throw Gs(),rs;return po(!1),d}catch(d){if(d===rs)return e.recover===!1&&rg(),Xc(),dd(i),po(!1),Qr(t,e);throw d}finally{po(o),xi(r),Dg()}}var wl=new Map;function Kg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Xc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var $=p[v];if(!d.has($)){d.add($);var y=zg($);e.addEventListener($,yl,{passive:y});var h=wl.get($);h===void 0?(document.addEventListener($,yl,{passive:y}),wl.set($,1)):wl.set($,h+1)}}};s(ed(Gp)),au.add(s);var u=void 0,f=Tg(()=>{var p=i!=null?i:e.appendChild(wn());return Ri(()=>{if(a){B({});var v=zt;v.c=a}r&&(o.$$events=r),Je&&ko(p,null),bd=l,u=t(p,o)||{},bd=!0,Je&&(gt.nodes_end=ht),a&&F()}),()=>{var y;for(var v of d){e.removeEventListener(v,yl);var $=wl.get(v);--$===0?(document.removeEventListener(v,yl),wl.delete(v)):wl.set(v,$)}au.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return jp.set(u,f),u}var jp=new WeakMap;function Ea(t,e){let i=jp.get(t);return i?(jp.delete(t),i(e)):(Ee&&bg(),Promise.resolve())}function ti(t,e,...i){var o=t,r=mt,a;Wi(()=>{r!==(r=e())&&(a&&(Ui(a),a=null),Ee&&r==null&&sg(),a=Ri(()=>r(o,...i)))},65536),Je&&(o=ht)}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;dg(e)},set:o=>{i=o}})}};T$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var T$;function Pt(t){zt===null&&cl("onMount"),ss&&zt.l!==null?C$(zt).m.push(t):Ne(()=>{let e=St(t);if(typeof e=="function")return e})}function an(t){zt===null&&cl("onDestroy"),Pt(()=>()=>St(t))}function C$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var qg=new Map;function Qg(t,e){var i=qg.get(t);i||(i=new Set,qg.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){Je&&i===0&&zi();var r=t,a=null,l=null,d=Zi,s=i>0?65536:0,u=!1;let f=(v,$=!0)=>{u=!0,p($,v)},p=(v,$)=>{if(d===(d=v))return;let y=!1;if(Je&&o!==-1){if(i===0){let x=jc(r);x===Ws?o=0:x===Ks?o=1/0:(o=parseInt(x.substring(1)),o!==o&&(o=d?1/0:-1))}let h=o>i;!!d===h&&(r=xa(),xi(r),po(!1),y=!0,o=-1)}d?(a?Ts(a):$&&(a=Ri(()=>$(r))),l&&Kn(l,()=>{l=null})):(l?Ts(l):$&&(l=Ri(()=>$(r,[i+1,o]))),a&&Kn(a,()=>{a=null})),y&&po(!0)};Wi(()=>{u=!1,e(f),u||p(null,null)},s),Je&&(r=ht)}function Is(t,e,i){Je&&zi();var o=t,r=Zi,a,l=ls()?Jv:ll;Wi(()=>{l(r,r=e())&&(a&&Kn(a),a=Ri(()=>i(o)))}),Je&&(o=ht)}var js=null;function ef(t){js=t}function $d(t,e){return e}function k$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)tu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;dd(s),s.append(i),o.clear(),Ys(t,e[0].prev,e[a-1].next)}zp(r,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),Ys(t,f.prev,f.next)),Ui(f.e,!d)}})}function hi(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?xi(Ti(u)):u.appendChild(wn())}Je&&zi();var f=null,p=!1,v=yn(()=>{var $=i();return cr($)?$:$==null?[]:ed($)});Wi(()=>{var $=n(v),y=$.length;if(p&&y===0)return;p=y===0;let h=!1;if(Je){var x=jc(l)===Ks;x!==(y===0)&&(l=xa(),xi(l),po(!1),h=!0)}if(Je){for(var I=null,T,N=0;N<y;N++){if(ht.nodeType===ur&&ht.data===ga){l=ht,h=!0,po(!1);break}var L=$[N],E=o(L,N);T=jg(ht,d,I,null,L,E,N,r,e,i),d.items.set(E,T),I=T}y>0&&xi(xa())}Je||P$($,d,l,r,e,o,i),a!==null&&(y===0?f?Ts(f):f=Ri(()=>a(l)):f!==null&&Kn(f,()=>{f=null})),h&&po(!0),n(v)}),Je&&(l=ht)}function P$(t,e,i,o,r,a,l){var J,we,pe,re;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,f=e.items,p=e.first,v=p,$,y=null,h,x=[],I=[],T,N,L,E;if(d)for(E=0;E<u;E+=1)T=t[E],N=a(T,E),L=f.get(N),L!==void 0&&((J=L.a)==null||J.measure(),(h!=null?h:h=new Set).add(L));for(E=0;E<u;E+=1){if(T=t[E],N=a(T,E),L=f.get(N),L===void 0){var k=v?v.e.nodes_start:i;y=jg(k,e,y,y===null?e.first:y.next,T,N,E,o,r,l),f.set(N,y),x=[],I=[],v=y.next;continue}if(s&&A$(L,T,E,r),(L.e.f&8192)!==0&&(Ts(L.e),d&&((we=L.a)==null||we.unfix(),(h!=null?h:h=new Set).delete(L))),L!==v){if($!==void 0&&$.has(L)){if(x.length<I.length){var q=I[0],H;y=q.prev;var z=x[0],j=x[x.length-1];for(H=0;H<x.length;H+=1)Gg(x[H],q,i);for(H=0;H<I.length;H+=1)$.delete(I[H]);Ys(e,z.prev,j.next),Ys(e,y,z),Ys(e,j,q),v=q,y=j,E-=1,x=[],I=[]}else $.delete(L),Gg(L,v,i),Ys(e,L.prev,L.next),Ys(e,L,y===null?e.first:y.next),Ys(e,y,L),y=L;continue}for(x=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&($!=null?$:$=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;L=v}x.push(L),y=L,v=L.next}if(v!==null||$!==void 0){for(var ae=$===void 0?[]:ed($);v!==null;)(v.e.f&8192)===0&&ae.push(v),v=v.next;var X=ae.length;if(X>0){var ne=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(pe=ae[E].a)==null||pe.measure();for(E=0;E<X;E+=1)(re=ae[E].a)==null||re.fix()}k$(e,ae,ne,f)}}d&&Sn(()=>{var _e;if(h!==void 0)for(L of h)(_e=L.a)==null||_e.apply()}),gt.first=e.first&&e.first.e,gt.last=y&&y.e}function A$(t,e,i,o){(o&1)!==0&&vl(t.v,e),(o&2)!==0?vl(t.i,i):t.i=i}function jg(t,e,i,o,r,a,l,d,s,u){var f=js,p=(s&1)!==0,v=(s&16)===0,$=p?v?ds(r,!1,!1):kr(r):r,y=(s&2)===0?l:kr(l);Ee&&p&&($.trace=()=>{var x=typeof y=="number"?l:y.v;u()[x]});var h={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};js=h;try{return h.e=Ri(()=>d(t,$,y,u),Je),h.e.prev=i&&i.e,h.e.next=o&&o.e,i===null?e.first=h:(i.next=h,i.e.next=h.e),o!==null&&(o.prev=h,o.e.prev=h.e),h}finally{js=f}}function Gg(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=Qo(a);r.before(a),a=l}}function Ys(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 L$(t,e,i){var a,l;if(!e||e===Bg(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=pr)!=null&&l[Hn]&&(o=`in ${pr[Hn]}`),_g(lu(o))}function yd(t,e,i=!1,o=!1,r=!1){var a=t,l="";O(()=>{var $;var d=gt;if(l===(l=($=e())!=null?$:"")){Je&&zi();return}if(d.nodes_start!==null&&(Hp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(Je){for(var s=ht.data,u=zi(),f=u;u!==null&&(u.nodeType!==ur||u.data!=="");)f=u,u=Qo(u);if(u===null)throw Gs(),rs;Ee&&!r&&L$(u.parentNode,s,l),ko(ht,f),a=xi(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=xl(p);if((i||o)&&(v=Ti(v)),ko(Ti(v),v.lastChild),i||o)for(;Ti(v);)a.before(Ti(v));else a.before(v)}})}function Ni(t,e,i){Je&&zi();var o=t,r,a;Wi(()=>{r!==(r=e())&&(a&&(Kn(a),a=null),r&&(a=Ri(()=>i(o,r))))},65536),Je&&(o=ht)}function ka(t,e,i,o,r,a){var y;let l=Je;Je&&zi();var d=Ee&&a&&((y=zt)==null?void 0:y.function[Hn]),s,u,f=null;Je&&ht.nodeType===zc&&(f=ht,zi());var p=Je?ht:t,v,$=js;Wi(()=>{let h=e()||null;var x=r?r():i||h==="svg"?Bc:null;if(h!==s){var I=js;ef($),v&&(h===null?Kn(v,()=>{v=null,u=null}):h===u?Ts(v):(Ui(v),du(!1))),h&&h!==u&&(v=Ri(()=>{if(f=Je?f:x?document.createElementNS(x,h):document.createElement(h),Ee&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),ko(f,f),o){Je&&Wg(h)&&f.append(document.createComment(""));var T=Je?Ti(f):f.appendChild(wn());Je&&(T===null?po(!1):xi(T)),o(f,T)}gt.nodes_end=f,p.before(f)})),s=h,s&&(u=s),du(!0),ef(I)}},65536),l&&(po(!0),xi(p))}var of;function Xg(t){return of=t.target,new tf(t)}var Es,Pr,tf=class{constructor(e){zs(this,Es);zs(this,Pr);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({...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===sl?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var f;return D((f=i.get(s))!=null?f:o(s,u),u),Reflect.set(d,s,u)}});rl(this,Pr,(e.hydrate?Xp:Qr)(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)&&$l(),rl(this,Es,r.$$events);for(let d of Object.keys(Vi(this,Pr)))d==="$set"||d==="$destroy"||d==="$on"||co(this,d,{get(){return Vi(this,Pr)[d]},set(s){Vi(this,Pr)[d]=s},enumerable:!0});Vi(this,Pr).$set=d=>{Object.assign(r,d)},Vi(this,Pr).$destroy=()=>{Ea(Vi(this,Pr))}}$set(e){Vi(this,Pr).$set(e)}$on(e,i){Vi(this,Es)[e]=Vi(this,Es)[e]||[];let o=(...r)=>i.call(this,...r);return Vi(this,Es)[e].push(o),()=>{Vi(this,Es)[e]=Vi(this,Es)[e].filter(r=>r!==o)}}$destroy(){Vi(this,Pr).$destroy()}};Es=new WeakMap,Pr=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=of)==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&&Qg(e.hash,d)}})}function ks(t,e){var i=void 0,o;Wi(()=>{i!==(i=e())&&(o&&(Ui(o),o=null),i&&(o=Ri(()=>{Eo(()=>i(t))})))})}function Zg(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=Zg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Jg(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Zg(t))&&(o&&(o+=" "),o+=e);return o}function xd(t){return typeof t=="object"?Jg(t):t!=null?t:""}var eh=[...`
44
- \r\f \v\uFEFF`];function ih(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||eh.includes(o[l-1]))&&(d===o.length||eh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function th(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 nf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function oh(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(nf)),r&&s.push(...Object.keys(r).map(nf));var u=0,f=-1;let h=t.length;for(var p=0;p<h;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&f===-1)f=p;else if(v===";"||p===h-1){if(f!==-1){var $=nf(t.substring(u,f).trim());if(!s.includes($)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,f=-1}}}}return o&&(i+=th(o)),r&&(i+=th(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=ih(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 rf(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=oh(e,o);(!Je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(rf(t,i==null?void 0:i[0],o[0]),rf(t,i==null?void 0:i[1],o[1],"important")):rf(t,i,o));return o}function wd(t,e,i){if(t.multiple){if(e==null)return;if(!cr(e))return $g();for(var o of t.options)o.selected=e.includes(nh(o));return}for(o of t.options){var r=nh(o);if(Pp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function sf(t){var e=new MutationObserver(()=>{wd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Io(()=>{e.disconnect()})}function nh(t){return"__value"in t?t.__value:t.value}var Sl=Symbol("class"),Cl=Symbol("style"),ah=Symbol("is custom element"),lh=Symbol("is html");function dh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Le(t,e,i,o){var r=uh(t);if(Je&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||F$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Zv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&ph(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ch(t,e,i,o,r=!1){var L;var a=uh(t),l=a[ah],d=!a[lh];let s=Je&&l;s&&po(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=xd(i.class):(o||i[Sl])&&(i.class=null),i[Cl]&&((L=i.style)!=null||(i.style=null));var v=ph(t);for(let E in i){let k=i[E];if(f&&E==="value"&&k==null){t.value=t.__value="",u[E]=k;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,k,o,e==null?void 0:e[Sl],i[Sl]),u[E]=k,u[Sl]=i[Sl];continue}if(E==="style"){qe(t,k,e==null?void 0:e[Cl],i[Cl]),u[E]=k,u[Cl]=i[Cl];continue}var y=u[E];if(!(k===y&&!(k===void 0&&t.hasAttribute(E)))){u[E]=k;var h=E[0]+E[1];if(h!=="$$")if(h==="on"){let q={},H="$$"+E,z=E.slice(2);var x=Hg(z);if(Fg(z)&&(z=z.slice(0,-7),q.capture=!0),!x&&y){if(k!=null)continue;t.removeEventListener(z,u[H],q),u[H]=null}if(k!=null)if(x)t[`__${z}`]=k,Ge([z]);else{let j=function(ae){u[E].call(this,ae)};var N=j;u[H]=Yp(z,t,j,q)}else x&&(t[`__${z}`]=void 0)}else if(E==="style")Le(t,E,k);else if(E==="autofocus")Qp(t,!!k);else if(!l&&(E==="__value"||E==="value"&&k!=null))t.value=t.__value=k;else if(E==="selected"&&f)dh(t,k);else{var I=E;d||(I=Ug(I));var T=I==="defaultValue"||I==="defaultChecked";if(k==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let q=t,H=e===void 0;if(I==="value"){let z=q.defaultValue;q.removeAttribute(I),q.defaultValue=z,q.value=q.__value=H?z:null}else{let z=q.defaultChecked;q.removeAttribute(I),q.defaultChecked=z,q.checked=H?z:!1}}else t.removeAttribute(E);else T||v.includes(I)&&(l||typeof k!="string")?t[I]=k:typeof k!="function"&&Le(t,I,k,r)}}}return s&&po(!0),u}function Ji(t,e,i=[],o,r=!1,a=Wr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",f=!1;if(Wi(()=>{var v=e(...l.map(n)),$=ch(t,d,v,o,r);f&&u&&"value"in v&&wd(t,v.value,!1);for(let h of Object.getOwnPropertySymbols(s))v[h]||Ui(s[h]);for(let h of Object.getOwnPropertySymbols(v)){var y=v[h];h.description===xp&&(!d||y!==d[h])&&(s[h]&&Ui(s[h]),s[h]=Ri(()=>ks(t,()=>y))),$[h]=y}d=$}),u){var p=t;Eo(()=>{wd(p,d.value),sf(p)})}f=!0}function uh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[ah]:t.nodeName.includes("-"),[lh]:t.namespaceURI===Kv}}var rh=new Map;function ph(t){var e=rh.get(t.nodeName);if(e)return e;rh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Hc(o);for(var a in i)i[a].set&&e.push(a);o=ha(o)}return e}function F$(t,e,i){var o;Ee&&(e==="srcset"&&H$(t,i)||af((o=t.getAttribute(e))!=null?o:"",i)||hg(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function af(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function sh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function H$(t,e){var i=sh(t.srcset),o=sh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(af(i[l][0],r)||af(r,i[l][0])))}var U$=Fc?()=>performance.now():()=>Date.now(),Gr={tick:t=>(Fc?requestAnimationFrame:mt)(t),now:()=>U$(),tasks:new Set};function fh(){let t=Gr.now();Gr.tasks.forEach(e=>{e.c(t)||(Gr.tasks.delete(e),e.f())}),Gr.tasks.size!==0&&Gr.tick(fh)}function mh(t){let e;return Gr.tasks.size===0&&Gr.tick(fh),{promise:new Promise(i=>{Gr.tasks.add(e={c:t,f:i})}),abort(){Gr.tasks.delete(e)}}}function cu(t,e){_d(()=>{t.dispatchEvent(new CustomEvent(e))})}function q$(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 vh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=q$(r.trim());e[l]=a.trim()}return e}var Q$=t=>t;function Yr(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,f=e.inert,p=e.style.overflow,v,$;function y(){var k;var L=Mt,E=gt;Hi(null),uo(null);try{return u!=null?u:u=i()(e,(k=o==null?void 0:o())!=null?k:{},{direction:s})}finally{Hi(L),uo(E)}}var h={is_global:d,in(){var L;if(e.inert=f,!r){$==null||$.abort(),(L=$==null?void 0:$.reset)==null||L.call($);return}a||v==null||v.abort(),cu(e,"introstart"),v=lf(e,y(),$,1,()=>{cu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(L){if(!a){L==null||L(),u=void 0;return}e.inert=!0,cu(e,"outrostart"),$=lf(e,y(),v,0,()=>{cu(e,"outroend"),L==null||L()})},stop:()=>{v==null||v.abort(),$==null||$.abort()}},x=gt;if(((N=x.transitions)!=null?N:x.transitions=[]).push(h),r&&bd){var I=d;if(!I){for(var T=x.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&Eo(()=>{St(()=>h.in())})}}function lf(t,e,i,o,r){var a=o===1;if(qs(e)){var l,d=!1;return Sn(()=>{if(!d){var x=e({direction:a?"in":"out"});l=lf(t,x,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:mt,deactivate:mt,reset:mt,t:()=>o};let{delay:s=0,css:u,tick:f,easing:p=Q$}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var $=vh(u(0,1));v.push($,$)}var y=()=>1-o,h=t.animate(v,{duration:s,fill:"forwards"});return h.onfinish=()=>{var z;h.cancel();var x=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-x,T=e.duration*Math.abs(I),N=[];if(T>0){var L=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),k=0;k<=E;k+=1){var q=x+I*p(k/E),H=vh(u(q,1-q));N.push(H),L||(L=H.overflow==="hidden")}L&&(t.style.overflow="hidden"),y=()=>{var j=h.currentTime;return x+I*p(j/T)},f&&mh(()=>{if(h.playState!=="running")return!1;var j=y();return f(j,1-j),!0})}h=t.animate(N,{duration:T,fill:"forwards"}),h.onfinish=()=>{y=()=>o,f==null||f(o,1-o),r()}},{abort:()=>{h&&(h.cancel(),h.effect=null,h.onfinish=mt)},deactivate:()=>{r=mt},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function df(t,e,i){var o=zo(t,e);o&&o.set&&(t[e]=i,Io(()=>{t[e]=null}))}var Xs,Tl,Sd,pu,gh,fu=class fu{constructor(e){zs(this,pu);zs(this,Xs,new WeakMap);zs(this,Tl);zs(this,Sd);rl(this,Sd,e)}observe(e,i){var o=Vi(this,Xs).get(e)||new Set;return o.add(i),Vi(this,Xs).set(e,o),zv(this,pu,gh).call(this).observe(e,Vi(this,Sd)),()=>{var r=Vi(this,Xs).get(e);r.delete(i),r.size===0&&(Vi(this,Xs).delete(e),Vi(this,Tl).unobserve(e))}}};Xs=new WeakMap,Tl=new WeakMap,Sd=new WeakMap,pu=new WeakSet,gh=function(){var e;return(e=Vi(this,Tl))!=null?e:rl(this,Tl,new ResizeObserver(i=>{for(var o of i){fu.entries.set(o.target,o);for(var r of Vi(this,Xs).get(o.target)||[])r(o)}}))},dr(fu,"entries",new WeakMap);var cf=fu;var G$=new cf({box:"border-box"});function Tn(t,e,i){var o=G$.observe(t,()=>i(t[e]));Eo(()=>(St(()=>i(t[e])),o))}function hh(t,e){return t===e||(t==null?void 0:t[Wo])===e}function je(t={},e,i,o){return Eo(()=>{var r,a;return Go(()=>{r=a,a=(o==null?void 0:o())||[],St(()=>{t!==i(...a)&&(e(t,...a),r&&hh(i(...r),t)&&e(null,...r))})}),()=>{Sn(()=>{a&&hh(i(...a),t)&&e(null,...a)})}}),t}function bo(t=!1){let e=zt,i=e.l.u;if(!i)return;let o=()=>su(e.s);if(t){let r=0,a={},l=Wr(()=>{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&&pd(()=>{_h(e,o),Qs(i.b)}),Ne(()=>{let r=St(()=>i.m.map(Xv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Ne(()=>{_h(e,o),Qs(i.a)})}function _h(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Cd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),mt;let o=St(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Il=[];function Ar(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=mt){let i=null,o=new Set;function r(d){if(ll(t,d)&&(t=d,i)){let s=!Il.length;for(let u of o)u[1](),Il.push(u,t);if(s){for(let u=0;u<Il.length;u+=2)Il[u][0](Il[u+1]);Il.length=0}}}function a(d){r(d(t))}function l(d,s=mt){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||mt),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function ui(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 Ar(i,(l,d)=>{let s=!1,u=[],f=0,p=mt,v=()=>{if(f)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:mt},$=r.map((y,h)=>Cd(y,x=>{u[h]=x,f&=~(1<<h),s&&v()},()=>{f|=1<<h}));return s=!0,v(),function(){Qs($),p(),s=!1}})}function ge(t){let e;return Cd(t,i=>e=i)(),e}var mu=!1,uf=Symbol();function w(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ds(void 0),unsubscribe:mt};if(o.store!==t&&!(uf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=mt;else{var r=!0;o.unsubscribe=Cd(t,l=>{r?o.source.v=l:D(o.source,l)}),r=!1}return t&&uf in i?ge(t):n(o.source)}function Ve(){let t={};function e(){Io(()=>{for(var i in t)t[i].unsubscribe();co(t,uf,{enumerable:!1,value:!0})})}return[t,e]}function pf(t){var e=mu;try{return mu=!1,[t(),mu]}finally{mu=e}}var t1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ee&&lg(`${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},t1)}var i1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(qs(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];qs(r)&&(r=r());let a=zo(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(qs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=zo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Wo||e===sl)return!1;for(let i of t.props)if(qs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(qs(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function jr(...t){return new Proxy({props:t},i1)}function bh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function g(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]=pf(()=>t[e]):u=t[e];var f=Wo in t||sl in t,p=l&&((H=(q=zo(t,e))==null?void 0:q.set)!=null?H:f&&e in t&&(z=>t[e]=z))||void 0,v=o,$=!0,y=!1,h=()=>(y=!0,$&&($=!1,d?v=St(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&ag(e),u=h(),p&&p(u));var x;if(a)x=()=>{var z=t[e];return z===void 0?h():($=!0,y=!1,z)};else{var I=(r?Wr:yn)(()=>t[e]);I.f|=131072,x=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return x;if(p){var T=t.$$legacy;return function(z,j){return arguments.length>0?((!a||!j||T||s)&&p(j?x():z),z):x()}}var N=!1,L=!1,E=ds(u),k=Wr(()=>{var z=x(),j=n(E);return N?(N=!1,L=!0,j):(L=!1,E.v=z)});return l&&n(k),r||(k.equals=dl),function(z,j){if(nu!==null&&(N=L,x(),n(E)),arguments.length>0){let ae=j?n(k):a&&l?ai(z):z;if(!k.equals(ae)){if(N=!0,D(E,ae),y&&v!==void 0&&(v=ae),bh(k))return z;St(()=>n(k))}return z}return bh(k)?k.v:n(k)}}var o1;typeof HTMLElement=="function"&&(o1=class extends HTMLElement{constructor(e,i,o){super();dr(this,"$$ctor");dr(this,"$$s");dr(this,"$$c");dr(this,"$$cn",!1);dr(this,"$$d",{});dr(this,"$$r",!1);dr(this,"$$p_d",{});dr(this,"$$l",{});dr(this,"$$l_u",new Map);dr(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))}}async connectedCallback(){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(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=n1(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]=ff(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=Xg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=eu(()=>{Go(()=>{var a;this.$$r=!0;for(let l of wp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=ff(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]=ff(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 wp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function ff(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 n1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var $h="5";var yh,xh,wh;typeof window!="undefined"&&((wh=(xh=(yh=window.__svelte)!=null?yh:window.__svelte={}).v)!=null?wh:xh.v=new Set).add($h);import{areValidLiveRecordSources as TT,clientChecker as Sv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Ab,safeStorage as IT,throttleFn as ET}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as kT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as r1,fillWithDefault as s1,VideoQuality as Sh}from"@vkontakte/videoplayer-shared/es2018";var a1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:r1.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:Sh.Q_480P,highQualityLimit:Sh.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen"},Ch=t=>s1(t,a1),Th=t=>pl("ui-config",t),At=()=>ul("ui-config");var Td="vk_player_debug_panel_opened";var Ih="videoplayer",Eh="videoplayer";var us={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},kh=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Ph=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Ah=new Set(["ShiftRight","ShiftLeft"]);var Lh=["TIMELINE"],Id=[...Lh,"GRAPH_BUTTON"],mf=[...Lh,"PLAY_BUTTON"],Ed=[...Id,"PLAY_BUTTON"];var ps=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ps||{}),kd={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Mh,VERSION as l1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as d1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as c1}from"@vkontakte/videoplayer-statistics/es2018";var vu="prod",El="1.1.80";var Aa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Vh=Symbol("storeContext"),Rh=Symbol("microStoresContext"),Nh=(t,e)=>{pl(Vh,t),pl(Rh,e),vu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=ul(Vh);return Mh(t,"Store context is empty!"),t},$o=()=>{let t=ul(Rh);return Mh(t,"MicroStores context is empty!"),t},ii=(t,e)=>hu(t,t.getValue(),e),hu=(t,e,i)=>Ar(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Dh=(t,e,i,o)=>{var q,H,z,j,ae,X,ne,J,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(q=r.throughputEstimation$.getValue())==null?void 0:q.toFixed(0))!=null?H:0,s=(j=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?j:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",f=`${El} (core: ${d1}, stat: ${c1}, shared: ${l1})`,p=ge(i.state.errorLog$),v=p.length?`
45
- `+p.map((pe,re)=>{var Re;let _e=`${re}) Type: ${pe.id}
46
- `,$e=`Message: ${pe.message} (${pe.thrown})
47
- `,ee=`Trace: ${(Re=pe.thrown)==null?void 0:Re.stack}
48
- `;return _e+$e+ee}).join(`
49
- `):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),h=t.info.currentAudioStream$.getValue(),x=[];y&&x.push(`Video: ${(ae=y==null?void 0:y.codec)!=null?ae:""}`+(y!=null&&y.hdr?" (HDR)":"")),h&&x.push(`Audio: ${(X=h==null?void 0:h.codec)!=null?X:""}`+(h!=null&&h.language?` (${h.language})`:""));let I=r.currentQuality$.getValue(),T="";if(I){let pe=r.availableQualitiesFps$.getValue()[I];T=pe?`${pe}fps`:""}let N=r.httpConnectionType$.getValue(),L=(J=(ne=r.currentBuffer$.getValue())==null?void 0:ne.end)!=null?J:0,E=Math.max(L-ge(i.state.positionExact$),0),k={Version:f,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":N?N+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:x.join(", "),Quality:`${u} ${I!=null?I:""} ${T}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:$,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:v};return Object.entries(k).filter(([pe,re])=>re!==void 0).map(([pe,re])=>`${pe}: ${re}`).join(`
50
- `)},Oh=(t,e,i)=>{var H,z,j,ae;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:El,viewport:`${r}x${a}`,volume:Math.round(ge(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),$=o.liveBufferTime$.getValue();f&&p&&(v&&$?(l.buffer=f.end-$,l.nativeBuffer=p.end-$):(l.buffer=Math.max(f.end-ge(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-ge(i.state.positionExact$),0))),l.position=ge(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let h=o.videoBitrate$.getValue();h&&(l.bitrate=h);let x=o.liveLatency$.getValue();x&&(l.liveLatency=x);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let N=ge(i.vsid);typeof N=="string"&&(l.vsid=N);let L=(H=t.info.currentVideoStream$.getValue())==null?void 0:H.codec;L&&(l.videoCodec=L);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let q=(ae=t.info.currentAudioStream$.getValue())==null?void 0:ae.language;return q&&(l.audioLanguage=q),l},Bh=(t,e)=>Aa(t,e,"mp4"),Fh=t=>!t.type,Hh=t=>!!t.type,Uh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},gu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await 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 _f,safeStorage as Ii}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var u1="vk_player_",zh="vk_player_prefer_traffic_saving_enabled",Wh="vk_player_preferred_volume",Kh="vk_player_prefer_volume_mute",bf="vk_player_preferred_quality",vf="vk_player_preferred_default_quality_settings",gf="vk_player_preferred_quality_settings_by_video",qh="vk_player_preferred_stream_language",Qh="vk_player_preferred_rate",Gh="vk_player_preferred_autoplay_next",hf="vk_player_preferred_subtitles_language",Yh="vk_player_user_video_prefs",jh=`${u1}preview_track_close_tooltip`,Xh=t=>t>1?1:t<0?0:t,$f=t=>Ii.set(Wh,Xh(t).toString(10)),_u=()=>{let t=Ii.get(Wh);return _f(t)?void 0:Xh(parseFloat(t))},yf=(t,e)=>Ii.set(bf,JSON.stringify({videoId:t,value:e})),bu=()=>Ii.remove(bf),xf=t=>{let e=Ii.get(bf);if(_f(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){bu();return}return o},Zh=(t,e)=>{e?Ii.set(t,"true"):Ii.remove(t)},wf=t=>Ii.get(t)==="true",Sf=t=>Zh(Kh,t),Jh=()=>wf(Kh),Pd=t=>Zh(zh,t),Cf=()=>wf(zh),e_=()=>Ii.get(qh),Tf=t=>Ii.set(qh,t),If=()=>Ii.get(hf),Ef=t=>{t?Ii.set(hf,t):Ii.remove(hf)},t_=t=>Ii.set(Qh,JSON.stringify({rate:t})),i_=()=>{let t=Ii.get(Qh);if(_f(t))return;let{rate:e}=JSON.parse(t);return e},o_=t=>{Ii.set(Gh,String(t))},n_=()=>wf(Gh),p1=()=>{let t=f=>{Ii.set(vf,JSON.stringify(f))},e=()=>{try{let f=Ii.get(vf);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=Ii.get(gf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{Ii.set(gf,JSON.stringify(f))},r=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{Ii.remove(gf)},l=()=>{Ii.remove(vf)},d=(f,p="as-default")=>{f.type==="exact_quality"||p==="to-video"?o(f):t(f)},s=f=>{let p=r(f);if(p){switch(p.type){case"traffic_saving":Pd(!0);break;case"exact_quality":yf(f,p.quality)}a(),l()}},u=f=>{let p=xf(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}Cf()&&t({type:"traffic_saving",videoId:f}),Pd(!1),bu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:If,savePreferredSubtitlesLanguage:Ef}},{getPreferredQualitySettings:r_,migrateSettingsToLegacyWay:s_,savePreferredQualitySettings:$u,savePreferredDefaultQualitySettings:OV,removePreferredQualitySettingsByVideo:BV,getPreferredDefaultQualitySettings:yu}=p1(),f1=3,m1=3,a_=()=>{let t=Ii.get(Yh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},xu=(t,e)=>{var r,a;let i=a_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},kf=(t,e,i)=>{var l,d,s;let o=(l=a_())!=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=v1(o);Ii.set(Yh,JSON.stringify(a))};function v1(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(m1),e.reduce((o,[r])=>(o[r]=g1(t[r]),o),{})}function g1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(f1),Object.fromEntries(e)}function l_(){Ii.set(jh,JSON.stringify(!0))}function d_(){let t=Ii.get(jh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Eb}from"@vkontakte/videoplayer-core/es2018";fg();var Zs="var(--btn-color, #fff)";var h1=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),_1=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 f;B(e,!0);let i=g(e,"width",19,()=>"24"),o=g(e,"height",19,()=>"24"),r=g(e,"fill",3,Zs),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=_1(),d=C(l);{var s=p=>{var v=h1(),$=ce(v),y=C($);ti(y,()=>e.children),S($),li(),b(p,v)},u=p=>{var v=Ae(),$=ce(v);ti($,()=>e.children),b(p,v)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),O(()=>{Le(l,"aria-label",e.ariaLabel),Le(l,"aria-hidden",!e.ariaLabel),Le(l,"width",i()),Le(l,"height",o()),Le(l,"viewBox",a),Le(l,"fill",r()),qe(l,e.style),Le(l,"data-testid",e.testId)}),b(t,l),F()}import{isNullable as p_,InterfaceLanguage as f_}from"@vkontakte/videoplayer-shared/es2018";var b1={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
43
+ `)})}}var Ia=!1,yl=null,Ea=!1,Is=!1;function Bp(t){Is=t}var vd=[],gd=[],Rt=null,cr=!1;function Ui(t){Rt=t}var _t=null;function lo(t){_t=t}var Wo=null;function Yc(t){Rt!==null&&Rt.f&2097152&&(Wo===null?Wo=[Rt,[t]]:Wo[1].push(t))}var En=null,ur=0,dr=null;function _g(t){dr=t}var Dg=1,nu=0,Es=!1,ru=null;function nd(){return++Dg}function wa(t){var p,v;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&_t!==null&&!Es,s=i.length;if(l||d){var u=t,f=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((v=a.reactions)!=null?v:a.reactions=[]).push(u);l&&(u.f^=512),d&&f!==null&&(f.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],wa(a)&&Op(a),a.wv>t.wv)return!0}(!o||_t!==null&&!Es)&&Cn(t,1024)}return!1}function Og(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];Wo!=null&&Wo[1].includes(t)&&Wo[0]===Rt||((a.f&2)!==0?Og(a,e,!1):e===a&&(i?Cn(a,2048):(a.f&1024)!==0&&Cn(a,4096),sd(a)))}}function Gc(t){var _,y;var e=En,i=ur,o=dr,r=Rt,a=Es,l=Wo,d=Ft,s=cr,u=t.f;En=null,ur=0,dr=null,Es=(u&256)!==0&&(cr||!Ea||Rt===null),Rt=(u&96)===0?t:null,Wo=null,td(t.ctx),cr=!1,nu++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(En!==null){var v;if(pd(t,ur),p!==null&&ur>0)for(p.length=ur+En.length,v=0;v<En.length;v++)p[ur+v]=En[v];else t.deps=p=En;if(!Es||(u&2)!==0&&t.reactions!==null)for(v=ur;v<p.length;v++)((y=(_=p[v]).reactions)!=null?y:_.reactions=[]).push(t)}else p!==null&&ur<p.length&&(pd(t,ur),p.length=ur);if(cs()&&dr!==null&&!cr&&p!==null&&(t.f&6146)===0)for(v=0;v<dr.length;v++)Og(dr[v],t);return r!==null&&r!==t&&(nu++,dr!==null&&(o===null?o=dr:o.push(...dr))),f}catch(b){Vg(b)}finally{En=e,ur=i,dr=o,Rt=r,Es=a,Wo=l,td(d),cr=s,t.f^=2097152}}function l$(t,e){let i=e.reactions;if(i!==null){var o=Xv.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(En===null||!En.includes(e))&&(Cn(e,4096),(e.f&768)===0&&(e.f^=512),Qc(e),pd(e,0))}function pd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)l$(t,i[o])}function _l(t){var e=t.f;if((e&16384)===0){Cn(t,1024);var i=_t,o=Ea;if(_t=t,Ea=!0,Ae){var r=ar;id(t.component_function)}try{(e&16)!==0?kg(t):zp(t),Up(t);var a=Gc(t);if(t.teardown=typeof a=="function"?a:null,t.wv=Dg,Ae&&ds&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=nd(),l.set_during_effect=!1);Ae&&gd.push(t)}finally{Ea=o,_t=i,Ae&&id(r)}}}function Rg(){console.error("Last ten effects were: ",gd.slice(-10).map(t=>t.fn)),gd=[]}function d$(){try{sg()}catch(t){if(Ae&&ao(t,"stack",{value:""}),yl!==null)if(Ae)try{md(t,yl)}catch(e){throw Rg(),e}else md(t,yl);else throw Ae&&Rg(),t}}function Yp(){var t=Ea;try{var e=0;for(Ea=!0;vd.length>0;){e++>1e3&&d$();var i=vd,o=i.length;vd=[];for(var r=0;r<o;r++){var a=u$(i[r]);c$(a)}gl.clear()}}finally{Ia=!1,Ea=t,yl=null,Ae&&(gd=[])}}function c$(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&wa(o)&&(_l(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?Kp(o):o.fn=null))}}function sd(t){Ia||(Ia=!0,queueMicrotask(Yp));for(var e=yl=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}vd.push(e)}function u$(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:wa(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 xl(t){var e;for(t&&(Ia=!0,Yp(),Ia=!0,e=t());;){if(Lg(),vd.length===0)return Ia=!1,yl=null,Ae&&(gd=[]),e;Ia=!0,Yp()}}async function uo(){await Promise.resolve(),xl()}function n(t){var e=t.f,i=(e&2)!==0;if(ru!==null&&ru.add(t),Rt!==null&&!cr){if(!(Wo!=null&&Wo[1].includes(t))||Wo[0]!==Rt){var o=Rt.deps;t.rv<nu&&(t.rv=nu,En===null&&o!==null&&o[ur]===t?ur++:En===null?En=[t]:(!Es||!En.includes(t))&&En.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,wa(r)&&Op(r)),Ae&&ds&&!cr&&ed!==null&&Rt!==null&&ed.reaction===Rt)if(t.trace)t.trace();else{var l=Ts("TracedAt");if(l){var d=ed.entries.get(t);d===void 0&&(d={traces:[]},ed.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 Is&&gl.has(t)?gl.get(t):t.v}function Tt(t){var e=cr;try{return cr=!0,t()}finally{cr=e}}var p$=-7169;function Cn(t,e){t.f=t.f&p$|e}function au(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Uo in t)su(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Uo in i&&su(i)}}}function su(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{su(t[o],e)}catch(r){}let i=ba(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=Uc(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function jp(t,e){if(e){let i=document.body;t.autofocus=!0,In(()=>{document.activeElement===i&&t.focus()})}}function hd(t){var e=Rt,i=_t;Ui(null),lo(null);try{return t()}finally{Ui(e),lo(i)}}var Xp=new Set,lu=new Set;function ka(t){if(!tt)return;t.removeAttribute("onload"),t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Zp(t,e,i,o={}){function r(a){if(o.capture||wl.call(e,a),!a.cancelBubble)return hd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?In(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function dt(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)&&Eo(()=>{e.removeEventListener(t,l,a)})}function Ye(t){for(var e=0;e<t.length;e++)Xp.add(t[e]);for(var i of lu)i(t)}function wl(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){ao(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Rt,p=_t;Ui(null),lo(null);try{for(var v,_=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var b=a["__"+o];if(b!=null&&(!a.disabled||t.target===a))if(rr(b)){var[w,...I]=b;w.apply(a,[t,...I])}else b.call(a,t)}catch(N){v?_.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of _)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,Ui(f),lo(p)}}}var m$;function Bg(){m$=void 0}function Sl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Po(t,e){var i=_t;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(tt)return Po(bt,null),bt;r===void 0&&(r=Sl(a?t:"<!>"+t),i||(r=xi(r)));var l=o||ad?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=xi(l),s=l.lastChild;Po(d,s)}else Po(l,l);return l}}function h$(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(tt)return Po(bt,null),bt;if(!l){var d=Sl(a),s=xi(d);if(r)for(l=document.createDocumentFragment();xi(s);)l.appendChild(xi(s));else l=xi(s)}var u=l.cloneNode(!0);if(r){var f=xi(u),p=u.lastChild;Po(f,p)}else Po(u,u);return u}}function Ie(t,e){return h$(t,e,"svg")}function ps(t=""){if(!tt){var e=Tn(t+"");return Po(e,e),e}var i=bt;return i.nodeType!==dl&&(i.before(i=Tn()),yi(i)),Po(i,i),i}function Le(){if(tt)return Po(bt,null),bt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Tn();return t.append(e,i),Po(e,i),t}function $(t,e){if(tt){_t.nodes_end=bt,Wi();return}t!==null&&t.before(e)}var _$=/\r/g;function Fg(t){t=t.replace(_$,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Ug(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var b$=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function zg(t){return b$.includes(t)}var $$=["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 y$={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 Wg(t){var e;return t=t.toLowerCase(),(e=y$[t])!=null?e:t}var $3=[...$$,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var x$=["touchstart","touchmove"];function Kg(t){return x$.includes(t)}var w$=["$state","$state.raw","$derived","$derived.by"],y3=[...w$,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var S$=["textarea","script","style","title"];function qg(t){return S$.includes(t)}function du(t){return t==null?void 0:t.replace(/\//g,"/​")}var _d=!0;function cu(t){_d=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 Zr(t,e){return Qg(t,e)}function ef(t,e){var l;Zc(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=tt,r=bt;try{for(var a=xi(i);a&&(a.nodeType!==sr||a.data!==Gs);)a=Ko(a);if(!a)throw as;co(!0),yi(a),Wi();let d=Qg(t,{...e,anchor:a});if(bt===null||bt.nodeType!==sr||bt.data!==_a)throw Zs(),as;return co(!1),d}catch(d){if(d===as)return e.recover===!1&&ag(),Zc(),ld(i),co(!1),Zr(t,e);throw d}finally{co(o),yi(r),Bg()}}var Cl=new Map;function Qg(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){Zc();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var _=p[v];if(!d.has(_)){d.add(_);var y=Kg(_);e.addEventListener(_,wl,{passive:y});var b=Cl.get(_);b===void 0?(document.addEventListener(_,wl,{passive:y}),Cl.set(_,1)):Cl.set(_,b+1)}}};s(Jl(Xp)),lu.add(s);var u=void 0,f=Eg(()=>{var p=i!=null?i:e.appendChild(Tn());return Li(()=>{if(a){B({});var v=Ft;v.c=a}r&&(o.$$events=r),tt&&Po(p,null),_d=l,u=t(p,o)||{},_d=!0,tt&&(_t.nodes_end=bt),a&&H()}),()=>{var y;for(var v of d){e.removeEventListener(v,wl);var _=Cl.get(v);--_===0?(document.removeEventListener(v,wl),Cl.delete(v)):Cl.set(v,_)}lu.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Jp.set(u,f),u}var Jp=new WeakMap;function Pa(t,e){let i=Jp.get(t);return i?(Jp.delete(t),i(e)):(Ae&&yg(),Promise.resolve())}function ei(t,e,...i){var o=t,r=vt,a;Ki(()=>{r!==(r=e())&&(a&&(zi(a),a=null),Ae&&r==null&&lg(),a=Li(()=>r(o,...i)))},65536),tt&&(o=bt)}if(Ae){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;ug(e)},set:o=>{i=o}})}};E$=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var E$;function Lt(t){Ft===null&&pl("onMount"),ls&&Ft.l!==null?I$(Ft).m.push(t):Oe(()=>{let e=Tt(t);if(typeof e=="function")return e})}function sn(t){Ft===null&&pl("onDestroy"),Lt(()=>()=>Tt(t))}function I$(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Gg=new Map;function Yg(t,e){var i=Gg.get(t);i||(i=new Set,Gg.set(t,i)),i.add(e)}function V(t,e,[i,o]=[0,0]){tt&&i===0&&Wi();var r=t,a=null,l=null,d=Xi,s=i>0?65536:0,u=!1;let f=(v,_=!0)=>{u=!0,p(_,v)},p=(v,_)=>{if(d===(d=v))return;let y=!1;if(tt&&o!==-1){if(i===0){let w=Xc(r);w===Gs?o=0:w===Ys?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let b=o>i;!!d===b&&(r=Sa(),yi(r),co(!1),y=!0,o=-1)}d?(a?Ps(a):_&&(a=Li(()=>_(r))),l&&Qn(l,()=>{l=null})):(l?Ps(l):_&&(l=Li(()=>_(r,[i+1,o]))),a&&Qn(a,()=>{a=null})),y&&co(!0)};Ki(()=>{u=!1,e(f),u||p(null,null)},s),tt&&(r=bt)}function As(t,e,i){tt&&Wi();var o=t,r=Xi,a,l=cs()?tg:cl;Ki(()=>{l(r,r=e())&&(a&&Qn(a),a=Li(()=>i(o)))}),tt&&(o=bt)}var ea=null;function nf(t){ea=t}function bd(t,e){return e}function A$(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)iu(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;ld(s),s.append(i),o.clear(),Js(t,e[0].prev,e[a-1].next)}qp(r,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),Js(t,f.prev,f.next)),zi(f.e,!d)}})}function _i(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=tt?yi(xi(u)):u.appendChild(Tn())}tt&&Wi();var f=null,p=!1,v=Sn(()=>{var _=i();return rr(_)?_:_==null?[]:Jl(_)});Ki(()=>{var _=n(v),y=_.length;if(p&&y===0)return;p=y===0;let b=!1;if(tt){var w=Xc(l)===Ys;w!==(y===0)&&(l=Sa(),yi(l),co(!1),b=!0)}if(tt){for(var I=null,T,N=0;N<y;N++){if(bt.nodeType===sr&&bt.data===_a){l=bt,b=!0,co(!1);break}var A=_[N],E=o(A,N);T=Zg(bt,d,I,null,A,E,N,r,e,i),d.items.set(E,T),I=T}y>0&&yi(Sa())}tt||L$(_,d,l,r,e,o,i),a!==null&&(y===0?f?Ps(f):f=Li(()=>a(l)):f!==null&&Qn(f,()=>{f=null})),b&&co(!0),n(v)}),tt&&(l=bt)}function L$(t,e,i,o,r,a,l){var J,Ce,pe,ee;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,f=e.items,p=e.first,v=p,_,y=null,b,w=[],I=[],T,N,A,E;if(d)for(E=0;E<u;E+=1)T=t[E],N=a(T,E),A=f.get(N),A!==void 0&&((J=A.a)==null||J.measure(),(b!=null?b:b=new Set).add(A));for(E=0;E<u;E+=1){if(T=t[E],N=a(T,E),A=f.get(N),A===void 0){var k=v?v.e.nodes_start:i;y=Zg(k,e,y,y===null?e.first:y.next,T,N,E,o,r,l),f.set(N,y),w=[],I=[],v=y.next;continue}if(s&&M$(A,T,E,r),(A.e.f&8192)!==0&&(Ps(A.e),d&&((Ce=A.a)==null||Ce.unfix(),(b!=null?b:b=new Set).delete(A))),A!==v){if(_!==void 0&&_.has(A)){if(w.length<I.length){var Q=I[0],F;y=Q.prev;var z=w[0],X=w[w.length-1];for(F=0;F<w.length;F+=1)jg(w[F],Q,i);for(F=0;F<I.length;F+=1)_.delete(I[F]);Js(e,z.prev,X.next),Js(e,y,z),Js(e,X,Q),v=Q,y=X,E-=1,w=[],I=[]}else _.delete(A),jg(A,v,i),Js(e,A.prev,A.next),Js(e,A,y===null?e.first:y.next),Js(e,y,A),y=A;continue}for(w=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&(_!=null?_:_=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;A=v}w.push(A),y=A,v=A.next}if(v!==null||_!==void 0){for(var se=_===void 0?[]:Jl(_);v!==null;)(v.e.f&8192)===0&&se.push(v),v=v.next;var Z=se.length;if(Z>0){var oe=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<Z;E+=1)(pe=se[E].a)==null||pe.measure();for(E=0;E<Z;E+=1)(ee=se[E].a)==null||ee.fix()}A$(e,se,oe,f)}}d&&In(()=>{var _e;if(b!==void 0)for(A of b)(_e=A.a)==null||_e.apply()}),_t.first=e.first&&e.first.e,_t.last=y&&y.e}function M$(t,e,i,o){(o&1)!==0&&hl(t.v,e),(o&2)!==0?hl(t.i,i):t.i=i}function Zg(t,e,i,o,r,a,l,d,s,u){var f=ea,p=(s&1)!==0,v=(s&16)===0,_=p?v?us(r,!1,!1):kr(r):r,y=(s&2)===0?l:kr(l);Ae&&p&&(_.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var b={i:y,v:_,k:a,a:null,e:null,prev:i,next:o};ea=b;try{return b.e=Li(()=>d(t,_,y,u),tt),b.e.prev=i&&i.e,b.e.next=o&&o.e,i===null?e.first=b:(i.next=b,i.e.next=b.e),o!==null&&(o.prev=b,o.e.prev=b.e),b}finally{ea=f}}function jg(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=Ko(a);r.before(a),a=l}}function Js(t,e,i){e===null?t.first=i:(e.next=i,e.e.next=i&&i.e),i!==null&&(i.prev=e,i.e.prev=e&&e.e)}function V$(t,e,i){var a,l;if(!e||e===Fg(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=ar)!=null&&l[zn]&&(o=`in ${ar[zn]}`),$g(du(o))}function $d(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var _;var d=_t;if(l===(l=(_=e())!=null?_:"")){tt&&Wi();return}if(d.nodes_start!==null&&(Wp(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(tt){for(var s=bt.data,u=Wi(),f=u;u!==null&&(u.nodeType!==sr||u.data!=="");)f=u,u=Ko(u);if(u===null)throw Zs(),as;Ae&&!r&&V$(u.parentNode,s,l),Po(bt,f),a=yi(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Sl(p);if((i||o)&&(v=xi(v)),Po(xi(v),v.lastChild),i||o)for(;xi(v);)a.before(xi(v));else a.before(v)}})}function Mi(t,e,i){tt&&Wi();var o=t,r,a;Ki(()=>{r!==(r=e())&&(a&&(Qn(a),a=null),r&&(a=Li(()=>i(o,r))))},65536),tt&&(o=bt)}function Aa(t,e,i,o,r,a){var y;let l=tt;tt&&Wi();var d=Ae&&a&&((y=Ft)==null?void 0:y.function[zn]),s,u,f=null;tt&&bt.nodeType===Wc&&(f=bt,Wi());var p=tt?bt:t,v,_=ea;Ki(()=>{let b=e()||null;var w=r?r():i||b==="svg"?Hc:null;if(b!==s){var I=ea;nf(_),v&&(b===null?Qn(v,()=>{v=null,u=null}):b===u?Ps(v):(zi(v),cu(!1))),b&&b!==u&&(v=Li(()=>{if(f=tt?f:w?document.createElementNS(w,b):document.createElement(b),Ae&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Po(f,f),o){tt&&qg(b)&&f.append(document.createComment(""));var T=tt?xi(f):f.appendChild(Tn());tt&&(T===null?co(!1):yi(T)),o(f,T)}_t.nodes_end=f,p.before(f)})),s=b,s&&(u=s),cu(!0),nf(I)}},65536),l&&(co(!0),yi(p))}var sf;function Jg(t){return sf=t.target,new rf(t)}var Ls,Pr,rf=class{constructor(e){Qs(this,Ls);Qs(this,Pr);var a,l;var i=new Map,o=(d,s)=>{var u=us(s,!1,!1);return i.set(d,u),u};let r=new Proxy({...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===ll?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var f;return R((f=i.get(s))!=null?f:o(s,u),u),Reflect.set(d,s,u)}});al(this,Pr,(e.hydrate?ef:Zr)(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)&&xl(),al(this,Ls,r.$$events);for(let d of Object.keys(Ai(this,Pr)))d==="$set"||d==="$destroy"||d==="$on"||ao(this,d,{get(){return Ai(this,Pr)[d]},set(s){Ai(this,Pr)[d]=s},enumerable:!0});Ai(this,Pr).$set=d=>{Object.assign(r,d)},Ai(this,Pr).$destroy=()=>{Pa(Ai(this,Pr))}}$set(e){Ai(this,Pr).$set(e)}$on(e,i){Ai(this,Ls)[e]=Ai(this,Ls)[e]||[];let o=(...r)=>i.call(this,...r);return Ai(this,Ls)[e].push(o),()=>{Ai(this,Ls)[e]=Ai(this,Ls)[e].filter(r=>r!==o)}}$destroy(){Ai(this,Pr).$destroy()}};Ls=new WeakMap,Pr=new WeakMap;function Y(t,e){In(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=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),Ae&&Yg(e.hash,d)}})}function Ms(t,e){var i=void 0,o;Ki(()=>{i!==(i=e())&&(o&&(zi(o),o=null),i&&(o=Li(()=>{ko(()=>i(t))})))})}function eh(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=eh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function th(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=eh(t))&&(o&&(o+=" "),o+=e);return o}function yd(t){return typeof t=="object"?th(t):t!=null?t:""}var ih=[...`
44
+ \r\f \v\uFEFF`];function nh(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||ih.includes(o[l-1]))&&(d===o.length||ih.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function oh(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 rh(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,f=-1;let b=t.length;for(var p=0;p<b;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&f===-1)f=p;else if(v===";"||p===b-1){if(f!==-1){var _=af(t.substring(u,f).trim());if(!s.includes(_)){v!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,f=-1}}}}return o&&(i+=oh(o)),r&&(i+=oh(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function ne(t,e,i,o,r,a){var l=t.__className;if(tt||l!==i||l===void 0){var d=nh(i,o,a);(!tt||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function 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 Ke(t,e,i,o){var r=t.__style;if(tt||r!==e){var a=rh(e,o);(!tt||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 xd(t,e,i){if(t.multiple){if(e==null)return;if(!rr(e))return xg();for(var o of t.options)o.selected=e.includes(sh(o));return}for(o of t.options){var r=sh(o);if(Mp(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function df(t){var e=new MutationObserver(()=>{xd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Eo(()=>{e.disconnect()})}function sh(t){return"__value"in t?t.__value:t.value}var Tl=Symbol("class"),Il=Symbol("style"),dh=Symbol("is custom element"),ch=Symbol("is html");function uh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var r=fh(t);if(tt&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||U$(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[eg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&mh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ph(t,e,i,o,r=!1){var A;var a=fh(t),l=a[dh],d=!a[ch];let s=tt&&l;s&&co(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=yd(i.class):(o||i[Tl])&&(i.class=null),i[Il]&&((A=i.style)!=null||(i.style=null));var v=mh(t);for(let E in i){let k=i[E];if(f&&E==="value"&&k==null){t.value=t.__value="",u[E]=k;continue}if(E==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";ne(t,_,k,o,e==null?void 0:e[Tl],i[Tl]),u[E]=k,u[Tl]=i[Tl];continue}if(E==="style"){Ke(t,k,e==null?void 0:e[Il],i[Il]),u[E]=k,u[Il]=i[Il];continue}var y=u[E];if(!(k===y&&!(k===void 0&&t.hasAttribute(E)))){u[E]=k;var b=E[0]+E[1];if(b!=="$$")if(b==="on"){let Q={},F="$$"+E,z=E.slice(2);var w=zg(z);if(Ug(z)&&(z=z.slice(0,-7),Q.capture=!0),!w&&y){if(k!=null)continue;t.removeEventListener(z,u[F],Q),u[F]=null}if(k!=null)if(w)t[`__${z}`]=k,Ye([z]);else{let X=function(se){u[E].call(this,se)};var N=X;u[F]=Zp(z,t,X,Q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Me(t,E,k);else if(E==="autofocus")jp(t,!!k);else if(!l&&(E==="__value"||E==="value"&&k!=null))t.value=t.__value=k;else if(E==="selected"&&f)uh(t,k);else{var I=E;d||(I=Wg(I));var T=I==="defaultValue"||I==="defaultChecked";if(k==null&&!l&&!T)if(a[E]=null,I==="value"||I==="checked"){let Q=t,F=e===void 0;if(I==="value"){let z=Q.defaultValue;Q.removeAttribute(I),Q.defaultValue=z,Q.value=Q.__value=F?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(I),Q.defaultChecked=z,Q.checked=F?z:!1}}else t.removeAttribute(E);else T||v.includes(I)&&(l||typeof k!="string")?t[I]=k:typeof k!="function"&&Me(t,I,k,r)}}}return s&&co(!0),u}function Zi(t,e,i=[],o,r=!1,a=Yr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",f=!1;if(Ki(()=>{var v=e(...l.map(n)),_=ph(t,d,v,o,r);f&&u&&"value"in v&&xd(t,v.value,!1);for(let b of Object.getOwnPropertySymbols(s))v[b]||zi(s[b]);for(let b of Object.getOwnPropertySymbols(v)){var y=v[b];b.description===Cp&&(!d||y!==d[b])&&(s[b]&&zi(s[b]),s[b]=Li(()=>Ms(t,()=>y))),_[b]=y}d=_}),u){var p=t;ko(()=>{xd(p,d.value),df(p)})}f=!0}function fh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[dh]:t.nodeName.includes("-"),[ch]:t.namespaceURI===Qv}}var ah=new Map;function mh(t){var e=ah.get(t.nodeName);if(e)return e;ah.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=Uc(o);for(var a in i)i[a].set&&e.push(a);o=ba(o)}return e}function U$(t,e,i){var o;Ae&&(e==="srcset"&&z$(t,i)||cf((o=t.getAttribute(e))!=null?o:"",i)||bg(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 lh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function z$(t,e){var i=lh(t.srcset),o=lh(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 W$=Fc?()=>performance.now():()=>Date.now(),Jr={tick:t=>(Fc?requestAnimationFrame:vt)(t),now:()=>W$(),tasks:new Set};function vh(){let t=Jr.now();Jr.tasks.forEach(e=>{e.c(t)||(Jr.tasks.delete(e),e.f())}),Jr.tasks.size!==0&&Jr.tick(vh)}function gh(t){let e;return Jr.tasks.size===0&&Jr.tick(vh),{promise:new Promise(i=>{Jr.tasks.add(e={c:t,f:i})}),abort(){Jr.tasks.delete(e)}}}function uu(t,e){hd(()=>{t.dispatchEvent(new CustomEvent(e))})}function G$(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 hh(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=G$(r.trim());e[l]=a.trim()}return e}var Y$=t=>t;function es(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,f=e.inert,p=e.style.overflow,v,_;function y(){var k;var A=Rt,E=_t;Ui(null),lo(null);try{return u!=null?u:u=i()(e,(k=o==null?void 0:o())!=null?k:{},{direction:s})}finally{Ui(A),lo(E)}}var b={is_global:d,in(){var A;if(e.inert=f,!r){_==null||_.abort(),(A=_==null?void 0:_.reset)==null||A.call(_);return}a||v==null||v.abort(),uu(e,"introstart"),v=uf(e,y(),_,1,()=>{uu(e,"introend"),v==null||v.abort(),v=u=void 0,e.style.overflow=p})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,uu(e,"outrostart"),_=uf(e,y(),v,0,()=>{uu(e,"outroend"),A==null||A()})},stop:()=>{v==null||v.abort(),_==null||_.abort()}},w=_t;if(((N=w.transitions)!=null?N:w.transitions=[]).push(b),r&&_d){var I=d;if(!I){for(var T=w.parent;T&&(T.f&65536)!==0;)for(;(T=T.parent)&&(T.f&16)===0;);I=!T||(T.f&32768)!==0}I&&ko(()=>{Tt(()=>b.in())})}}function uf(t,e,i,o,r){var a=o===1;if(js(e)){var l,d=!1;return In(()=>{if(!d){var w=e({direction:a?"in":"out"});l=uf(t,w,i,o,r)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return r(),{abort:vt,deactivate:vt,reset:vt,t:()=>o};let{delay:s=0,css:u,tick:f,easing:p=Y$}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var _=hh(u(0,1));v.push(_,_)}var y=()=>1-o,b=t.animate(v,{duration:s,fill:"forwards"});return b.onfinish=()=>{var z;b.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-w,T=e.duration*Math.abs(I),N=[];if(T>0){var A=!1;if(u)for(var E=Math.ceil(T/16.666666666666668),k=0;k<=E;k+=1){var Q=w+I*p(k/E),F=hh(u(Q,1-Q));N.push(F),A||(A=F.overflow==="hidden")}A&&(t.style.overflow="hidden"),y=()=>{var X=b.currentTime;return w+I*p(X/T)},f&&gh(()=>{if(b.playState!=="running")return!1;var X=y();return f(X,1-X),!0})}b=t.animate(N,{duration:T,fill:"forwards"}),b.onfinish=()=>{y=()=>o,f==null||f(o,1-o),r()}},{abort:()=>{b&&(b.cancel(),b.effect=null,b.onfinish=vt)},deactivate:()=>{r=vt},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function pf(t,e,i){var o=Fo(t,e);o&&o.set&&(t[e]=i,Eo(()=>{t[e]=null}))}var ta,El,wd,fu,_h,mu=class mu{constructor(e){Qs(this,fu);Qs(this,ta,new WeakMap);Qs(this,El);Qs(this,wd);al(this,wd,e)}observe(e,i){var o=Ai(this,ta).get(e)||new Set;return o.add(i),Ai(this,ta).set(e,o),Kv(this,fu,_h).call(this).observe(e,Ai(this,wd)),()=>{var r=Ai(this,ta).get(e);r.delete(i),r.size===0&&(Ai(this,ta).delete(e),Ai(this,El).unobserve(e))}}};ta=new WeakMap,El=new WeakMap,wd=new WeakMap,fu=new WeakSet,_h=function(){var e;return(e=Ai(this,El))!=null?e:al(this,El,new ResizeObserver(i=>{for(var o of i){mu.entries.set(o.target,o);for(var r of Ai(this,ta).get(o.target)||[])r(o)}}))},nr(mu,"entries",new WeakMap);var ff=mu;var j$=new ff({box:"border-box"});function kn(t,e,i){var o=j$.observe(t,()=>i(t[e]));ko(()=>(Tt(()=>i(t[e])),o))}function bh(t,e){return t===e||(t==null?void 0:t[Uo])===e}function Xe(t={},e,i,o){return ko(()=>{var r,a;return qo(()=>{r=a,a=(o==null?void 0:o())||[],Tt(()=>{t!==i(...a)&&(e(t,...a),r&&bh(i(...r),t)&&e(null,...r))})}),()=>{In(()=>{a&&bh(i(...a),t)&&e(null,...a)})}}),t}function mo(t=!1){let e=Ft,i=e.l.u;if(!i)return;let o=()=>au(e.s);if(t){let r=0,a={},l=Yr(()=>{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&&ud(()=>{$h(e,o),Xs(i.b)}),Oe(()=>{let r=Tt(()=>i.m.map(Jv));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{$h(e,o),Xs(i.a)})}function $h(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Sd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),vt;let o=Tt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var kl=[];function Ar(t,e){return{subscribe:le(t,e).subscribe}}function le(t,e=vt){let i=null,o=new Set;function r(d){if(cl(t,d)&&(t=d,i)){let s=!kl.length;for(let u of o)u[1](),kl.push(u,t);if(s){for(let u=0;u<kl.length;u+=2)kl[u][0](kl[u+1]);kl.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 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 Ar(i,(l,d)=>{let s=!1,u=[],f=0,p=vt,v=()=>{if(f)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:vt},_=r.map((y,b)=>Sd(y,w=>{u[b]=w,f&=~(1<<b),s&&v()},()=>{f|=1<<b}));return s=!0,v(),function(){Xs(_),p(),s=!1}})}function be(t){let e;return Sd(t,i=>e=i)(),e}var vu=!1,mf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:us(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=Sd(t,l=>{r?o.source.v=l:R(o.source,l)}),r=!1}return t&&mf in i?be(t):n(o.source)}function De(){let t={};function e(){Eo(()=>{for(var i in t)t[i].unsubscribe();ao(t,mf,{enumerable:!1,value:!0})})}return[t,e]}function vf(t){var e=vu;try{return vu=!1,[t(),vu]}finally{vu=e}}var o1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ae&&cg(`${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(Ae?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},o1)}var n1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o)return o[e]}},set(t,e,i){let o=t.props.length;for(;o--;){let r=t.props[o];js(r)&&(r=r());let a=Fo(r,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(js(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Fo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Uo||e===ll)return!1;for(let i of t.props)if(js(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(js(i)&&(i=i()),!!i){for(let o in i)e.includes(o)||e.push(o);for(let o of Object.getOwnPropertySymbols(i))e.includes(o)||e.push(o)}return e}};function ts(...t){return new Proxy({props:t},n1)}function yh(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var Q,F;var r=(i&1)!==0,a=!ls||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=vf(()=>t[e]):u=t[e];var f=Uo in t||ll in t,p=l&&((F=(Q=Fo(t,e))==null?void 0:Q.set)!=null?F:f&&e in t&&(z=>t[e]=z))||void 0,v=o,_=!0,y=!1,b=()=>(y=!0,_&&(_=!1,d?v=Tt(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&dg(e),u=b(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?b():(_=!0,y=!1,z)};else{var I=(r?Yr:Sn)(()=>t[e]);I.f|=131072,w=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return w;if(p){var T=t.$$legacy;return function(z,X){return arguments.length>0?((!a||!X||T||s)&&p(X?w():z),z):w()}}var N=!1,A=!1,E=us(u),k=Yr(()=>{var z=w(),X=n(E);return N?(N=!1,A=!0,X):(A=!1,E.v=z)});return l&&n(k),r||(k.equals=ul),function(z,X){if(ru!==null&&(N=A,w(),n(E)),arguments.length>0){let se=X?n(k):a&&l?si(z):z;if(!k.equals(se)){if(N=!0,R(E,se),y&&v!==void 0&&(v=se),yh(k))return z;Tt(()=>n(k))}return z}return yh(k)?k.v:n(k)}}var r1;typeof HTMLElement=="function"&&(r1=class extends HTMLElement{constructor(e,i,o){super();nr(this,"$$ctor");nr(this,"$$s");nr(this,"$$c");nr(this,"$$cn",!1);nr(this,"$$d",{});nr(this,"$$r",!1);nr(this,"$$p_d",{});nr(this,"$$l",{});nr(this,"$$l_u",new Map);nr(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))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),$(l,d)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=s1(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=Jg({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:o,$$host:this}}),this.$$me=tu(()=>{qo(()=>{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 s1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var xh="5";var wh,Sh,Ch;typeof window!="undefined"&&((Ch=(Sh=(wh=window.__svelte)!=null?wh:window.__svelte={}).v)!=null?Ch:Sh.v=new Set).add(xh);import{areValidLiveRecordSources as LT,clientChecker as Iv}from"@vkontakte/videoplayer-core/es2018";import"@vkontakte/videoplayer-core/es2018";import{noop as Vb,safeStorage as MT,throttleFn as VT}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as RT}from"@vkontakte/videoplayer-statistics/es2018";import{InterfaceLanguage as a1,fillWithDefault as l1,VideoQuality as Th}from"@vkontakte/videoplayer-shared/es2018";var d1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:a1.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:Th.Q_480P,highQualityLimit:Th.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen",disabledSlotIds:[],disabledAdditionalButtonIds:[]},Ih=t=>l1(t,d1),Eh=t=>ml("ui-config",t),Mt=()=>fl("ui-config");var Cd="vk_player_debug_panel_opened";var kh="videoplayer",Ph="videoplayer";var fs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Ah=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Lh=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Mh=new Set(["ShiftRight","ShiftLeft"]);var Vh=["TIMELINE"],Td=[...Vh,"GRAPH_BUTTON"],hf=[...Vh,"PLAY_BUTTON"],Id=[...Td,"PLAY_BUTTON"];var ms=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ms||{}),Ed={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Rh,VERSION as c1}from"@vkontakte/videoplayer-shared/es2018";import{VERSION as u1}from"@vkontakte/videoplayer-core/es2018";import{VERSION as p1}from"@vkontakte/videoplayer-statistics/es2018";var gu="prod",Pl="1.1.81-dev.0b96aed5.0";var Ma=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var Nh=Symbol("storeContext"),Dh=Symbol("microStoresContext"),Oh=(t,e)=>{ml(Nh,t),ml(Dh,e),gu==="dev"&&(window.app={store:t,microStores:e})},he=()=>{let t=fl(Nh);return Rh(t,"Store context is empty!"),t},vo=()=>{let t=fl(Dh);return Rh(t,"MicroStores context is empty!"),t},ti=(t,e)=>_u(t,t.getValue(),e),_u=(t,e,i)=>Ar(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),Bh=(t,e,i,o,r=["meta config not provided"])=>{var F,z,X,se,Z,oe,J,Ce,pe;let a=t.info,{width:l,height:d}=be(i.ui.playerSize),s=(z=(F=a.throughputEstimation$.getValue())==null?void 0:F.toFixed(0))!=null?z:0,u=(se=(X=a.rttEstimation$.getValue())==null?void 0:X.toFixed(0))!=null?se:0,f=a.isAutoQualityEnabled$.getValue()?"auto":"manual",p=`${Pl} (core: ${u1}, stat: ${p1}, shared: ${c1})`,v=be(i.state.errorLog$),_=v.length?`
45
+ `+v.map((ee,_e)=>{var Qe;let we=`${_e}) Type: ${ee.id}
46
+ `,ve=`Message: ${ee.message} (${ee.thrown})
47
+ `,ue=`Trace: ${(Qe=ee.thrown)==null?void 0:Qe.stack}
48
+ `;return we+ve+ue}).join(`
49
+ `):void 0,y=i.state.isAudioDisabled?"disabled":be(i.state.isAudioAvailable$)?void 0:"unavailable",b=t.info.currentVideoStream$.getValue(),w=t.info.currentAudioStream$.getValue(),I=[];b&&I.push(`Video: ${(Z=b==null?void 0:b.codec)!=null?Z:""}`+(b!=null&&b.hdr?" (HDR)":"")),w&&I.push(`Audio: ${(oe=w==null?void 0:w.codec)!=null?oe:""}`+(w!=null&&w.language?` (${w.language})`:""));let T=a.currentQuality$.getValue(),N="";if(T){let ee=a.availableQualitiesFps$.getValue()[T];N=ee?`${ee}fps`:""}let A=a.httpConnectionType$.getValue(),E=(Ce=(J=a.currentBuffer$.getValue())==null?void 0:J.end)!=null?Ce:0,k=Math.max(E-be(i.state.positionExact$),0),Q={Version:p,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:o,VSID:be(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":A?A+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${s}Kbps @ ${u}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:I.join(", "),Quality:`${f} ${T!=null?T:""} ${N}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:y,Position:`${be(i.state.positionExact$)}s`,Buffer:`${k}s`,State:`${be(i.playerPhase)} ${(pe=a.playbackState$.getValue())!=null?pe:""}`,"Player size":`${l}x${d}`,URL:window.location.href,Errors:_};return Object.entries(Q).filter(([ee,_e])=>_e!==void 0).map(([ee,_e])=>`${ee}: ${_e}`).join(`
50
+ `)},Hh=(t,e,i)=>{var F,z,X,se;let o=t.info,{width:r,height:a}=be(i.ui.playerSize),l={version:Pl,viewport:`${r}x${a}`,volume:Math.round(be(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),_=o.liveBufferTime$.getValue();f&&p&&(v&&_?(l.buffer=f.end-_,l.nativeBuffer=p.end-_):(l.buffer=Math.max(f.end-be(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-be(i.state.positionExact$),0))),l.position=be(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let b=o.videoBitrate$.getValue();b&&(l.bitrate=b);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let N=be(i.vsid);typeof N=="string"&&(l.vsid=N);let A=(F=t.info.currentVideoStream$.getValue())==null?void 0:F.codec;A&&(l.videoCodec=A);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((X=t.info.currentVideoStream$.getValue())==null?void 0:X.hdr)&&(l.hdr=!0);let Q=(se=t.info.currentAudioStream$.getValue())==null?void 0:se.language;return Q&&(l.audioLanguage=Q),l},Fh=(t,e)=>Ma(t,e,"mp4"),Uh=t=>!t.type,zh=t=>!!t.type,Wh=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},hu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await 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 wi}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-core/es2018";var f1="vk_player_",Kh="vk_player_prefer_traffic_saving_enabled",qh="vk_player_preferred_volume",Qh="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",Gh="vk_player_preferred_stream_language",Yh="vk_player_preferred_rate",jh="vk_player_preferred_autoplay_next",$f="vk_player_preferred_subtitles_language",Xh="vk_player_user_video_prefs",Zh=`${f1}preview_track_close_tooltip`,Jh=t=>t>1?1:t<0?0:t,wf=t=>wi.set(qh,Jh(t).toString(10)),bu=()=>{let t=wi.get(qh);return yf(t)?void 0:Jh(parseFloat(t))},Sf=(t,e)=>wi.set(xf,JSON.stringify({videoId:t,value:e})),$u=()=>wi.remove(xf),Cf=t=>{let e=wi.get(xf);if(yf(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){$u();return}return o},e_=(t,e)=>{e?wi.set(t,"true"):wi.remove(t)},Tf=t=>wi.get(t)==="true",If=t=>e_(Qh,t),t_=()=>Tf(Qh),kd=t=>e_(Kh,t),Ef=()=>Tf(Kh),i_=()=>wi.get(Gh),kf=t=>wi.set(Gh,t),Pf=()=>wi.get($f),Af=t=>{t?wi.set($f,t):wi.remove($f)},o_=t=>wi.set(Yh,JSON.stringify({rate:t})),n_=()=>{let t=wi.get(Yh);if(yf(t))return;let{rate:e}=JSON.parse(t);return e},r_=t=>{wi.set(jh,String(t))},s_=()=>Tf(jh),m1=()=>{let t=f=>{wi.set(_f,JSON.stringify(f))},e=()=>{try{let f=wi.get(_f);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=wi.get(bf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{wi.set(bf,JSON.stringify(f))},r=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return{...p,appliesTo:"to-video"};p&&a();let v=e();return v?{...v,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{wi.remove(bf)},l=()=>{wi.remove(_f)},d=(f,p="as-default")=>{f.type==="exact_quality"||p==="to-video"?o(f):t(f)},s=f=>{let p=r(f);if(p){switch(p.type){case"traffic_saving":kd(!0);break;case"exact_quality":Sf(f,p.quality)}a(),l()}},u=f=>{let p=Cf(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}Ef()&&t({type:"traffic_saving",videoId:f}),kd(!1),$u()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Pf,savePreferredSubtitlesLanguage:Af}},{getPreferredQualitySettings:a_,migrateSettingsToLegacyWay:l_,savePreferredQualitySettings:yu,savePreferredDefaultQualitySettings:K9,removePreferredQualitySettingsByVideo:q9,getPreferredDefaultQualitySettings:xu}=m1(),v1=3,g1=3,d_=()=>{let t=wi.get(Xh);if(t)try{return JSON.parse(t)}catch(e){return null}return null},wu=(t,e)=>{var r,a;let i=d_();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=d_())!=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=h1(o);wi.set(Xh,JSON.stringify(a))};function h1(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(g1),e.reduce((o,[r])=>(o[r]=_1(t[r]),o),{})}function _1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(v1),Object.fromEntries(e)}function c_(){wi.set(Zh,JSON.stringify(!0))}function u_(){let t=wi.get(Zh);try{return t?JSON.parse(t):!1}catch(e){return!1}}import{PlaybackState as Ab}from"@vkontakte/videoplayer-core/es2018";vg();var ia="var(--btn-color, #fff)";var b1=Ie('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),$1=Ie('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ze(t,e){var f;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,ia),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=$1(),d=C(l);{var s=p=>{var v=b1(),_=ce(v),y=C(_);ei(y,()=>e.children),S(_),ai(),$(p,v)},u=p=>{var v=Le(),_=ce(v);ei(_,()=>e.children),$(p,v)};V(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{Me(l,"aria-label",e.ariaLabel),Me(l,"aria-hidden",!e.ariaLabel),Me(l,"width",i()),Me(l,"height",o()),Me(l,"viewBox",a),Me(l,"fill",r()),Ke(l,e.style),Me(l,"data-testid",e.testId)}),$(t,l),H()}import{isNullable as m_,InterfaceLanguage as v_}from"@vkontakte/videoplayer-shared/es2018";var y1={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:"Выйти из режима точной перемотки"},c_=b1;var $1={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
52
+ попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},p_=y1;var x1={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"},u_=$1;var Ps=new Map;Ps.set(f_.EN,u_);Ps.set(f_.RU,c_);var m_=new Map,Pf=({language:t,pack:e,fallback:i})=>{if(Ps.has(t)){let o=Ps.get(t);Ps.set(t,{...o,...e})}else Ps.set(t,e);m_.set(t,i)},Af=t=>Ps.has(t),Lf=(t,e,i,o)=>{var l;let r=Ps.get(t),a=r==null?void 0:r[e];if(p_(a)){let d=(l=m_.get(t))!=null?l:o,s=d?Ps.get(d):void 0;a=s==null?void 0:s[e]}return p_(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=At();return Lf(o,t,e,r.defaultLanguage)};var y1=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 Ad(t,e){B(e,!1);let i=G("video360");bo(),Xe(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=y1();b(o,a)},$$slots:{default:!0}}),F()}import"@vkontakte/videoplayer-core/es2018";var kl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(kl||(kl={}));var x1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,w1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,S1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,wu="?",C1="X-Sentry-Auth",T1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function I1(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=x1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||wu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=S1.exec(i[a]))r={filename:o[2],function:o[1]||wu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=w1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||wu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=wu),e.push(r)}return e.length?{value:v_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function v_(t){return(t&&t.message||"No error message").split(`
56
- `).filter(i=>!!i)[0]}function E1(t){try{let e=I1(t);if(e)return e}catch(e){}return{value:v_(t),type:t&&t.name,stacktrace:{frames:[]}}}function k1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Su=class{constructor(e){if(e&&e.dsn){let i=T1.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{...this.getRequestBlank(),exception:{values:[E1(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(C1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:k1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function g_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function P1(){return window}var Cu=class t extends Su{constructor(e,i=P1()){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",{...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",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new t({...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:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send({...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=>g_(i,o))):!1}getRequestBlank(){return{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({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=>g_(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{...i,[o]:a||d?[...a||[],...d||[]]:{...typeof r!="string"?r:{},...typeof l!="string"?l:{}}}},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Tu,Subscription as A1}from"@vkontakte/videoplayer-shared/es2018";var Iu=null,La=class{constructor(e,i,o={}){!Iu&&e.dsn&&(this.sentryClient=new Cu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new A1,this.options=e,this.context=o,Iu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Iu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:f,blackErrorCategoryList:p}=l,{errorType:v,category:$}=i;if(Tu($)&&p.includes($)||Tu(v)&&f.includes(v))return;if(Math.random()<=d||Tu($)&&u.includes($)||Tu(v)&&s.includes(v)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{v&&r.captureMessage(v,i.fatal?kl.fatal:kl.error),r.report(e)}catch(h){console.error(h)}}}static getInstance(){return Iu}};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 Eu=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()},ku=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),h_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,__=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Ld=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},Js=()=>!!Ld(),Pu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Au=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},b_=t=>{let e=window.screen;return(async r=>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 $_}from"@vkontakte/videoplayer-core/es2018";var y_=()=>({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:$_.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:$_.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as L1,ValueSubject as Mf}from"@vkontakte/videoplayer-shared/es2018";var Ma=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:L1(this.onResize.bind(this),300)};this.info={isActive$:new Mf(!1),isEnabled$:new Mf(!1),type:0};this.info.isEnabled$=new Mf(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){!this.isSupported()||!this.isActive()||await 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={...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)}async dispose(){this.removeEventHandlers(),await 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 Va(t){return t instanceof Ma}import{devNull as x_,now as w_}from"@vkontakte/videoplayer-shared/es2018";function Rf(t,e){B(e,!1);let i=ve();Pt(()=>{i.getAdmanWrapper().startPostroll()}),bo(),F()}import{noop as R1}from"@vkontakte/videoplayer-shared/es2018";var M1=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>'),V1=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 Lr(t,e){B(e,!0);let i=g(e,"direction",3,"left"),o=g(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let f="";return n(a)&&(f+="transform: rotate(180deg);"),f.length?f:void 0})()),s=m(()=>o()?Zs:"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:(f,p)=>{var v=Ae(),$=ce(v);{var y=x=>{var I=M1();b(x,I)},h=x=>{var I=V1();b(x,I)};R($,x=>{n(r)?x(y):x(h,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var N1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},D1=M('<div class="skip s-17"> <!></div>'),O1=M("<div><!></div>"),B1={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 Nf(t,e){B(e,!0),Q(t,B1);let[i,o]=Ve(),r=()=>w(u,"$isMobile",i),a=g(e,"position",3,0),l=g(e,"secondsToWatchBeforeSkip",3,0),d=g(e,"skipAd",3,R1),u=ve().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=O1();let v;p.__click=[N1,f,d];var $=C(p);{var y=x=>{var I=D1(),T=C(I),N=A(T);Lr(N,{direction:"right"}),S(I),O(L=>me(T,`${L!=null?L:""} `),[()=>G("skip_ads_now")]),b(x,I)},h=x=>{var I=cs();O(T=>me(I,T),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(x,I)};R($,x=>{n(f)?x(y):x(h,!1)})}S(p),O(x=>v=se(p,1,"container s-17",null,v,x),[()=>({"container-mobile":r(),skippable:n(f)})]),b(t,p),F(),o()}Ge(["click"]);var F1=M('<button class="go-to-site s-16"> </button>'),H1={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 Df(t,e){B(e,!1),Q(t,H1),bo();var i=F1(),o=C(i,!0);S(i),O(r=>me(o,r),[()=>G("visit_advertiser")],yn),b(t,i),F()}var U1=M('<div class="top-gradient-mobile s-n"></div>'),z1=M('<div class="container s-n"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),W1={hash:"s-n",code:".container.s-n{height:100%;width:100%}.top-gradient-mobile.s-n{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function Vd(t,e){B(e,!0),Q(t,W1);let[i,o]=Ve(),r=()=>w(H,"$canSkipAd",i),a=()=>w(q,"$adPlaybackState",i),l=()=>w(T,"$isMobile",i),d=()=>w(z,"$adPosition",i),s=()=>w(j,"$secondsToWatchBeforeSkipAd",i),u=()=>w(I,"$isVideoEnded",i),f=g(e,"adsSlotId",3,void 0),p=g(e,"adsParams",3,void 0),v=g(e,"adsAutoplayParam",3,void 0),$=g(e,"duration",3,0),y=g(e,"adsExternalApi",3,void 0),h=ve(),x=At(),I=h.state.isEnded$,T=h.ui.isMobile,N=x.ads.isMobileGoToSiteButton,L=K(void 0),E=K(void 0),k=!1,q=h.ads.playbackState,H=h.ads.canSkip,z=h.ads.position,j=h.ads.secondsToWatchBeforeSkip,ae=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);Pt(()=>{let P=h.getAdmanWrapper();if(x_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[w_(),f()]}),!f()){P.onAdmanLoadingError();return}let We=()=>{var ke;let{width:De,height:Oe}=ge(h.ui.playerSize),tt=ge(h.ui.isFullscreen),U=(ke=v())!=null?ke:ge(h.ui.isAutoplay),Pe=x.ads.paramsOverride;return{width:De,height:Oe,isFullscreen:tt,isAutoplay:U,adsContainer:n(L),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:Pe,duration:$(),externalApi:y()}},Te=async De=>{De&&await fo();let Oe=We();await P.initAdman(Oe),k=!0},Z=new AbortController,ie=()=>{Z.abort()};return window.AdmanHTML?Te(!0).catch(()=>{P.onAdmanLoadingError()}):P.loadAdman(Z.signal).then(()=>Te(!1)).catch(()=>{P.onAdmanLoadingError()}),()=>{x_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[w_(),f()]}),!k&&ie()}});var ne=z1(),J=C(ne);{var we=P=>{var We=U1();b(P,We)};R(J,P=>{l()&&P(we)})}var pe=A(J,2);je(pe,P=>D(E,P),()=>n(E));var re=A(pe,2);{var _e=P=>{Nf(P,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return h.actions.internal.skipAd}})};R(re,P=>{n(ae)&&P(_e)})}var $e=A(re,2);{var ee=P=>{Rf(P,{})};R($e,P=>{u()&&P(ee)})}var Re=A($e,2);{var fe=P=>{Df(P,{})};R(Re,P=>{n(X)&&P(fe)})}S(ne),je(ne,P=>D(L,P),()=>n(L)),b(t,ne),F(),o()}var Yo=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 K1=Ce('<path fill="#fff"></path>'),q1=Ce("<path></path><!>",1);function Rd(t,e){let i=g(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=q1(),u=ce(s),f=A(u);{var p=v=>{var $=K1();Le($,"d",a),b(v,$)};R(f,v=>{i()&&v(p)})}O(()=>Le(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 Q1=M('<div class="equalizer s-e"><div class="col s-e"></div> <div class="col s-e"></div> <div class="col s-e"></div></div>'),G1=M('<div class="live-icon s-e"><!></div>'),Y1=M('<span class="text s-e"> </span>'),j1=M("<div><!> <!></div>"),X1={hash:"s-e",code:".wrapper.s-e{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-e{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-e{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-e .equalizer:where(.s-e){margin-top:-2px}.equalizer.s-e .col:where(.s-e){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-e .equalizer:where(.s-e) .col:where(.s-e){animation-play-state:running}.equalizer.s-e .col:where(.s-e):first-child{animation-name:s-e-thumb-timer-equalizer-col1;left:0}.equalizer.s-e .col:where(.s-e):nth-child(2){animation-name:s-e-thumb-timer-equalizer-col2;left:3px}.equalizer.s-e .col:where(.s-e):nth-child(3){animation-name:s-e-thumb-timer-equalizer-col3;left:6px}.live-icon.s-e{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-e-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-e-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-e-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-e{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Nd(t,e){Q(t,X1);let i=g(e,"withEqualizer",3,!1),o=g(e,"isLive",3,!1),r=g(e,"isPlaying",3,!1);var a=j1();let l;var d=C(a);{var s=v=>{var $=Q1();b(v,$)};R(d,v=>{i()&&v(s)})}var u=A(d,2);{var f=v=>{var $=G1(),y=C($);Rd(y,{isActive:!0}),S($),b(v,$)},p=v=>{var $=Y1(),y=C($,!0);S($),O(()=>me(y,e.time)),b(v,$)};R(u,v=>{o()?v(f):v(p,!1)})}S(a),O(v=>l=se(a,1,"wrapper s-e",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var Pl=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var Z1=M('<div role="timer" data-testid="thumb-timer"><!></div>'),J1={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 Dd(t,e){B(e,!0),Q(t,J1);let[i,o]=Ve(),r=()=>w(f,"$disabled",i),a=g(e,"isHidden",3,!1),l=g(e,"isLive",3,!1),d=g(e,"isPlaying",3,!1),s=At(),u=m(()=>Yo(e.duration-e.position)),f=de(!1);var p=Z1();let v;var $=C(p);Nd($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),ks(p,()=>Pl(a()&&s.features.usePerformanceFix,f,s.disableInvisibleComponentsTimeout)),O(y=>v=se(p,1,"thumb-timer s-i",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Al=t=>{if(!navigator.clipboard){S_(t);return}navigator.clipboard.writeText(t).catch(()=>S_(t))};function S_(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 cy}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as C_}from"@vkontakte/videoplayer-core/es2018";var Of="focus-hidden";var Mr=t=>{t.stopPropagation(),t.preventDefault()},Bf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Of)},ty=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},iy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},oy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},ny=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},T_=t=>t.code==="Escape",ry=t=>t.code==="ArrowLeft",Od=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},I_=t=>{oy(t)?(Mr(t),iy(t.target)):ny(t)&&(Mr(t),ty(t.target))},ia=t=>!C_.device.isAndroid&&(t==null?void 0:t.detail)===0||C_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ll=async(t,e,i)=>{await fo(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(await fo(),i.set(!1),t.focus())},E_=async(t,e,i)=>{await fo(),t&&!e&&ge(i)&&(i.set(!1),t.focus())},Bd=async(t,e,i,o=!1)=>{if(await fo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Of,!i),a==null||a.focus()}},k_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Lu=(t,e)=>{I_(t),Bf(t.target),T_(t)&&(Mr(t),e())},Mu=async(t,e)=>{Od(t,["ArrowRight"])&&(Mr(t),e())},P_=async(t,e,i)=>{if(I_(t),ry(t)){Mr(t),e();return}T_(t)&&(Mr(t),i())},Ml=(t,e)=>{Od(t)&&(Mr(t),e())},A_=(t,e,i)=>{if(Od(t))Mr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Mr(t);return}o==="ArrowRight"&&!e&&(i(!0),Mr(t))}},L_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},M_=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 Vu,isValidURL as uy}from"@vkontakte/videoplayer-shared/es2018";var Xr={"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 V_}from"@vkontakte/videoplayer-shared/es2018";var ay=(t,e)=>{Ml(t,()=>e())},ly=M('<li class="item s-1v" role="menuitem" tabindex="0"> </li>'),dy={hash:"s-1v",code:".item.s-1v{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-1v:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function Ff(t,e){B(e,!0),Q(t,dy);let i=g(e,"onClick",3,V_),o=g(e,"closeContextMenu",3,V_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=ly();a.__click=r,a.__keydown=[ay,r];var l=C(a,!0);S(a),O(()=>{var d;Le(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Le(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}Ge(["click","keydown"]);var Na=(t,e)=>t.weight-e.weight;var Fd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Fd||{});var py=(t,e)=>{Lu(t,e)},fy=t=>{t.preventDefault()},my=M('<ul role="menu" class="s-1c"></ul>'),vy={hash:"s-1c",code:"ul.s-1c{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function Hf(t,e){B(e,!0),Q(t,vy);let[i,o]=Ve(),r=()=>w(we,"$playerPhase",i),a=()=>w(ae,"$isLive$",i),l=()=>w(pe,"$isPiPEnabled$",i),d=()=>w(j,"$chromecastState$",i),s=()=>w(re,"$pictureInPictureApiIsActive$",i),u=()=>w(J,"$isLooped$",i),f=()=>w(X,"$positionExact$",i),p=()=>w(q,"$additionalContextMenuItems$",i),v=g(e,"visible",3,!1),$=g(e,"position",19,()=>({top:0,left:0})),y=g(e,"playerContainerRef",3,void 0),h=g(e,"menuElementRef",15,void 0),x=K(0),I=K(0),T=ve(),{pictureInPicture$:N}=$o(),L=At(),E=T.ui.contextMenu.visible$,k=T.ui.debugPanelVisible,q=T.ui.additionalContextMenuItems$,H=T.ui.t,z=T.actions.internal.togglePictureInPicture,j=T.state.chromecastState$,ae=T.state.isLive$,X=T.state.positionExact$,ne=T.state.isInteractive,J=T.state.looped$,we=T.playerPhase,{isEnabled$:pe,isActive$:re}=N,_e=m(()=>r()==="video"),$e=m(()=>!!a()&&n(_e)),ee=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Re=m(()=>{var ue;return L.features.copyVideoLink&&((ue=T.callbacks)==null?void 0:ue.onCopyVideoLink)}),fe=m(()=>n(Re)&&!n(ee)&&!ne&&!n($e)),P=m(()=>{var ue;return!!((ue=T.callbacks)!=null&&ue.onCopyEmbedCodeClicked)}),We=m(()=>l()&&d()!==cy.CONNECTED&&!ne&&n(_e)),Te=m(()=>!ne&&!n(ee)&&!n($e)),Z=m(()=>L.features.videoRotate&&!ne&&!n(ee)),ie=m(()=>L.showSupport&&!s()),De=m(()=>L.features.saveTraceInfoToFile),Oe=()=>{var ue;E.set(!1),(ue=e.returnFocus)==null||ue.call(e)},tt=(ue,ze)=>{if(!h()||!y())return;let Qe=h().getBoundingClientRect(),lt=y().getBoundingClientRect();D(x,ue-lt.left),D(I,ze-lt.top),n(x)+Qe.width>lt.width&&D(x,lt.width-Qe.width),n(I)+Qe.height>lt.height&&D(I,lt.height-Qe.height),D(x,Math.max(n(x),0),!0),D(I,Math.max(n(I),0),!0)};Ne(()=>{(async()=>{if(h()&&y()){await fo();let{top:ze,left:Qe,bottom:lt,right:Bt}=$(),Ft=Qe!=null?Qe:0,ei=ze!=null?ze:0,vi=h().getBoundingClientRect();Vu(Qe)&&!Vu(Bt)&&(Ft=Bt-vi.width),Vu(ze)&&!Vu(lt)&&(ei=lt-vi.height),Ft=Math.max(Ft,0),ei=Math.max(ei,0),tt(Ft,ei)}})()});let U=()=>{T.actions.internal.videoRotate()},Pe=()=>{uy(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},ke=()=>{let ue=T.actions.internal.getDebugTextData();if(L.features.saveDebugInfoToFile){let ze=new Blob([...ue],{type:"plain/text"}),Qe=window.URL.createObjectURL(ze);Aa(Qe,"vk_player_debug_info","txt")}else Al(T.actions.internal.getDebugTextData())},Ue=()=>{let ue=T.actions.internal.getTraceTextData(),ze=new Blob([...ue],{type:"application/json"}),Qe=window.URL.createObjectURL(ze);Aa(Qe,"vk_player_trace_info","json")},et=()=>{k.set(!0)},ye=async()=>{var ue;try{z()}finally{(ue=e.returnFocus)==null||ue.call(e)}},Ie=()=>{T.actions.internal.setLooped(!u())},Be=()=>{var ue,ze;if(n(P)){let Qe=(ze=(ue=T.callbacks)==null?void 0:ue.onCopyEmbedCodeClicked)==null?void 0:ze.call(ue);Qe&&Al(Qe)}},Vt=(ue=!1)=>{var ze,Qe;if((ze=T.callbacks)!=null&&ze.onCopyVideoLink){let lt=(Qe=T.callbacks)==null?void 0:Qe.onCopyVideoLink(ue,f());lt&&Al(lt)}},pt=m(()=>L.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Dt=m(()=>n(Re)?{id:"copy-link",weight:Xr["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Vt()}:void 0),at=m(()=>n(fe)?{id:"copy-link-timestamp",weight:Xr["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Vt(!0)}:void 0),yt=m(()=>n(P)?{id:"copy-embed-code",weight:Xr["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Be}:void 0),Jt=m(()=>n(We)?{id:"pip",weight:Xr.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),It=m(()=>n(Te)?{id:"video-loop",weight:Xr["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:Ie}:void 0),Rt=m(()=>n(Z)?{id:"rotate",weight:Xr.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),Ot=m(()=>n(ie)?{id:"report",weight:Xr.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Pe}:void 0),Y=m(()=>({id:"save-debug",weight:Xr["save-debug"],label:n(pt),onClick:ke})),Se=m(()=>n(De)?{id:"save-trace",weight:Xr["save-trace"],label:H("menu_save_debug"),onClick:Ue}:void 0),le=m(()=>({id:"debug-info",weight:Xr["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:et})),he=m(()=>[n(Dt),n(at),n(yt),n(Jt),n(It),n(Rt),n(Ot),n(Y),n(Se),n(le),...p()].filter(ue=>!!ue).sort(Na));var Me=Ae(),nt=ce(Me);{var ut=ue=>{var ze=my();ze.__contextmenu=[fy],ze.__keydown=[py,Oe],hi(ze,21,()=>n(he),Qe=>Qe.id,(Qe,lt)=>{Ff(Qe,{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:Oe})}),S(ze),je(ze,Qe=>h(Qe),()=>h()),O(()=>{var Qe,lt;return qe(ze,`top: ${(Qe=n(I))!=null?Qe:""}px; left: ${(lt=n(x))!=null?lt:""}px;`)}),b(ue,ze)};R(nt,ue=>{v()&&ue(ut)})}b(t,Me),F(),o()}Ge(["contextmenu","keydown"]);var Ru=class{constructor(e){this.value=e,this.next=null}};var Vl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Ru(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 gy=M('<div class="container s-15"><canvas class="s-15"></canvas></div>'),hy={hash:"s-15",code:".container.s-15{display:inline-block;height:16px;width:120px}canvas.s-15{margin-top:2px;transform:scaleY(-1)}"};function Hd(t,e){B(e,!0),Q(t,hy);let i=g(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Pt(()=>{n(o).width=l,n(o).height=a,D(r,n(o).getContext("2d"),!0)});function u(v,$,y,h,x){x===0&&(x=1),v.fillStyle="#fff",v.fillRect($,y,h,x)}Ne(()=>{let v="";if(n(r)){let $=i()[0];for(let h=1;h<i().length;h++)i()[h]>$&&($=i()[h]);n(r).clearRect(0,0,l,a);let y=d-1;for(let h=i().length-1;h>=0;h--){let x=y*s,I=$>0?a*(i()[h]/$):0;u(n(r),x,0,s,I),v=I+" "+v,y--}}});var f=gy(),p=C(f);je(p,v=>D(o,v),()=>n(o)),S(f),b(t,f),F()}import{safeStorage as R_}from"@vkontakte/videoplayer-shared/es2018";var _y=(t,e)=>{t.stopPropagation(),R_.remove(Td),e.set(!1)},by=M('<div class="s-l"><div class="s-l">Video id</div> <span> </span></div>'),$y=M('<div class="s-l"><div class="s-l">VSID</div> <span> </span></div>'),yy=M('<div class="s-l"><div class="s-l">Provider</div> <span> </span></div>'),xy=M('<div class="s-l"><div class="s-l">Streams</div> <span> </span></div>'),wy=M('<div class="s-l"><div class="s-l">Viewport</div> <span> </span></div>'),Sy=M('<div class="s-l"><div class="s-l">Video size</div> <span> </span></div>'),Cy=M('<div class="s-l"><div class="s-l">CDN host</div> <span> </span></div>'),Ty=M('<div class="s-l"><div class="s-l">Volume</div> <span> </span></div>'),Iy=M('<div class="s-l"><div class="s-l">Position</div> <span> </span></div>'),Ey=M('<div class="s-l"><div class="s-l">Buffer</div> <span> </span></div>'),ky=M('<div class="s-l"><div class="s-l">Nbuffer</div> <span> </span></div>'),Py=M('<div class="s-l"><div class="s-l">Live latency</div> <span> </span></div>'),Ay=M('<div class="s-l"><div class="s-l">Segment</div> <span> </span></div>'),Ly=M('<div class="s-l"><div class="s-l">Network</div> <!> <span> </span></div>'),My=M('<div class="s-l"><div class="s-l">V bitrate</div> <!> <span> </span></div>'),Vy=M('<div role="region"><button class="close s-l" title="закрыть">[x]</button> <div class="content s-l"><div class="s-l"><div class="s-l">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-l"><div class="s-l">Dropped</div> <span> </span></div> <!> <!> <div class="s-l"><div class="s-l">FPS</div> <!> <span> </span></div></div></div>'),Ry={hash:"s-l",code:".container.s-l{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-l{left:16px;top:16px}button.close.s-l{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-l{padding:5px}.content.s-l>div:where(.s-l)>div:where(.s-l){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Ud(t,e){B(e,!0),Q(t,Ry);let[i,o]=Ve(),r=()=>w(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ai(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=K(0),p=K(0),v=K(0),$=new Vl(60),y=new Vl(60),h=new Vl(60),x=K(ai([])),I=K(ai([])),T=K(ai([])),N=G("aria_label_debug_panel");Pt(()=>{R_.set(Td,"true"),a.actions.internal.startLogging(),u&&(D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),D(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Y=window.setInterval(()=>{D(s,a.actions.internal.getDebugPanelData(),!0)},500),Se;return u&&(Se=window.setInterval(()=>{if(u){D(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;D(v,le-n(f)),D(f,le,!0),$.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&h.push(n(s).bitrate),D(x,$.getValuesFromBottom(),!0),D(I,y.getValuesFromBottom(),!0),D(T,h.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Y),Se&&clearInterval(Se)}});var L=Vy();let E;var k=C(L);k.__click=[_y,l];var q=A(k,2),H=C(q),z=A(C(H),2),j=C(z,!0);S(z),S(H);var ae=A(H,2);{var X=Y=>{var Se=by(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(()=>me(he,n(s).id)),b(Y,Se)};R(ae,Y=>{n(s).id&&Y(X)})}var ne=A(ae,2);{var J=Y=>{var Se=$y(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(()=>me(he,n(s).vsid)),b(Y,Se)};R(ne,Y=>{n(s).vsid&&Y(J)})}var we=A(ne,2);{var pe=Y=>{var Se=yy(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(()=>me(he,n(s).provider)),b(Y,Se)};R(we,Y=>{n(s).provider&&Y(pe)})}var re=A(we,2);{var _e=Y=>{var Se=xy(),le=A(C(Se),2),he=C(le);S(le),S(Se),O(()=>{var Me,nt;return me(he,`Video: ${(Me=n(s).videoCodec||"")!=null?Me:""} ${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"},f_=x1;var Vs=new Map;Vs.set(v_.EN,f_);Vs.set(v_.RU,p_);var g_=new Map,Mf=({language:t,pack:e,fallback:i})=>{if(Vs.has(t)){let o=Vs.get(t);Vs.set(t,{...o,...e})}else Vs.set(t,e);g_.set(t,i)},Vf=t=>Vs.has(t),Rf=(t,e,i,o)=>{var l;let r=Vs.get(t),a=r==null?void 0:r[e];if(m_(a)){let d=(l=g_.get(t))!=null?l:o,s=d?Vs.get(d):void 0;a=s==null?void 0:s[e]}return m_(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(d,s)=>{var u;return(u=i[s])!=null?u:""}):a},j=(t,e)=>{let{interfaceLanguage$:i}=he(),o=be(i),r=Mt();return Rf(o,t,e,r.defaultLanguage)};var w1=Ie('<path d="M26.86 15.18a3.7 3.7 0 0 0 2.53-3.6C29.4 8.91 27.2 7 24.07 7c-1.96 0-3.57.78-4.67 2.29l-.1.15a1.33 1.33 0 0 0 .26 1.85c.54.4 1.3.35 1.74-.16l.2-.25a3 3 0 0 1 2.5-1.3c1.53 0 2.6.91 2.6 2.25 0 1.36-1.09 2.27-2.65 2.27h-.58a1.23 1.23 0 0 0 0 2.47h.58c1.75 0 2.91.98 2.91 2.39 0 1.45-1.19 2.46-2.88 2.46a3.2 3.2 0 0 1-2.89-1.6l-.2-.29a1.4 1.4 0 0 0-2.05-.25 1.3 1.3 0 0 0-.3 1.68l.21.33A6 6 0 0 0 24 24c3.28 0 5.63-2.04 5.63-4.92a4 4 0 0 0-2.77-3.9M37.73 12.68c-.46 0-1 .04-1.5.16L38.8 9.1a1.34 1.34 0 1 0-2.2-1.52l-3.76 5.47C31.43 15.18 31 16.87 31 18.33 31 21.8 33.56 24 37.19 24c3.6 0 6.16-2.4 6.16-5.77a5.4 5.4 0 0 0-5.63-5.56m-.53 8.74c-1.98 0-3.33-1.27-3.33-3.14 0-1.85 1.35-3.14 3.33-3.14 1.95 0 3.3 1.29 3.3 3.14 0 1.87-1.35 3.14-3.3 3.14m20.8-5.9c0 5.03-2.7 8.43-6.63 8.43s-6.62-3.4-6.62-8.44 2.7-8.44 6.62-8.44S58 10.47 58 15.51m-10.35 0c0 3.56 1.49 5.85 3.72 5.85s3.72-2.3 3.72-5.86-1.48-5.86-3.72-5.86c-2.23 0-3.72 2.3-3.72 5.86M67 9.49A3.5 3.5 0 0 1 63.51 13 3.5 3.5 0 0 1 60 9.49 3.5 3.5 0 0 1 63.51 6 3.5 3.5 0 0 1 67 9.49m-5 0c0 .83.68 1.51 1.51 1.51.81 0 1.5-.68 1.5-1.51 0-.81-.69-1.5-1.5-1.5-.83 0-1.51.69-1.51 1.5ZM67 23.5c0-1.32-1.2-3.1-4.2-4.67a1.5 1.5 0 1 1 1.4-2.66c3.25 1.72 5.8 4.26 5.8 7.33 0 3.13-2.56 5.55-6.09 7.27-3.63 1.77-8.82 3.06-15.26 3.72a1.5 1.5 0 0 1-.3-2.98c6.25-.64 11.05-1.88 14.25-3.44 3.3-1.6 4.4-3.27 4.4-4.57M38.88 35H38c-9.64 0-17.45-1.13-22.9-3.02-2.72-.94-4.94-2.1-6.5-3.47C7.01 27.14 6 25.44 6 23.5a6.2 6.2 0 0 1 1.9-4.25 16 16 0 0 1 4.43-3.1 1.5 1.5 0 1 1 1.34 2.7q-2.39 1.19-3.59 2.46C9.3 22.14 9 22.87 9 23.5c0 .8.4 1.74 1.57 2.76s3 2.01 5.51 2.89C21.11 30.89 28.55 32 38 32h.88l-1.44-1.44a1.5 1.5 0 0 1 2.12-2.12l4 4h.01a1.5 1.5 0 0 1 .32 1.63 2 2 0 0 1-.33.5l-4 4a1.5 1.5 0 0 1-2.12-2.13z"></path>');function Pd(t,e){B(e,!1);let i=j("video360");mo(),Ze(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=w1();$(o,a)},$$slots:{default:!0}}),H()}import"@vkontakte/videoplayer-core/es2018";var Al;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(Al||(Al={}));var S1=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,C1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,T1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Su="?",I1="X-Sentry-Auth",E1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function k1(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=S1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Su,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=T1.exec(i[a]))r={filename:o[2],function:o[1]||Su,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=C1.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Su,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Su),e.push(r)}return e.length?{value:h_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function h_(t){return(t&&t.message||"No error message").split(`
56
+ `).filter(i=>!!i)[0]}function P1(t){try{let e=k1(t);if(e)return e}catch(e){}return{value:h_(t),type:t&&t.name,stacktrace:{frames:[]}}}function A1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Cu=class{constructor(e){if(e&&e.dsn){let i=E1.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{...this.getRequestBlank(),exception:{values:[P1(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(I1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:A1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function __(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function L1(){return window}var Tu=class t extends Cu{constructor(e,i=L1()){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",{...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",{...e}),this}setUser(e){return this.setKeyState("user",{...e}),this}clone(){let e=new t({...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:[{timestamp:Date.now()/1e3,...this.beforeBreadcrumb(e)}]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send({...this.getRequestBlank(),message:e,level:i})}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>__(i,o))):!1}getRequestBlank(){return{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({release:this.release,...e})),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>__(i,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{...i,[o]:a||d?[...a||[],...d||[]]:{...typeof r!="string"?r:{},...typeof l!="string"?l:{}}}},this._state)}setKeyState(e,i){this._state[e]=i}};import{isNonNullable as Iu,Subscription as M1}from"@vkontakte/videoplayer-shared/es2018";var Eu=null,Va=class{constructor(e,i,o={}){!Eu&&e.dsn&&(this.sentryClient=new Tu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new M1,this.options=e,this.context=o,Eu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Eu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:f,blackErrorCategoryList:p}=l,{errorType:v,category:_}=i;if(Iu(_)&&p.includes(_)||Iu(v)&&f.includes(v))return;if(Math.random()<=d||Iu(_)&&u.includes(_)||Iu(v)&&s.includes(v)){Object.keys(i).length&&r.setTags({version:this.version,...i}),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras({...a,...o});try{v&&r.captureMessage(v,i.fatal?Al.fatal:Al.error),r.report(e)}catch(b){console.error(b)}}}static getInstance(){return Eu}};var vs=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(vs||{});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()},Pu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),b_=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,$_=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Ad=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},oa=()=>!!Ad(),Au=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Lu=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},y_=t=>{let e=window.screen;return(async r=>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 x_}from"@vkontakte/videoplayer-core/es2018";var w_=()=>({title:j("hotkey_map_modal_title"),closeBtnText:j("hotkey_map_modal_close_btn_text"),groups:[{title:j("hotkey_map_group_title_common"),items:[{description:j("hotkey_map_item_mute_description"),value:j("hotkey_map_item_mute_value")},{description:j("hotkey_map_item_volume_up_description"),value:j("hotkey_map_item_volume_up_value")},{description:j("hotkey_map_item_volume_down_description"),value:j("hotkey_map_item_volume_down_value")},{description:j("hotkey_map_item_pip_description"),value:j("hotkey_map_item_pip_value")},{description:j("hotkey_map_item_full_screen_description"),value:j("hotkey_map_item_full_screen_value")},{description:j("hotkey_map_item_show_context_menu_description"),value:j("hotkey_map_item_show_context_menu_value")},{description:j("hotkey_map_item_show_hotkey_map_description"),value:j("hotkey_map_item_show_hotkey_map_value")}]},{title:j("hotkey_map_group_title_playback"),items:[{description:j("hotkey_map_item_play_toggle_description"),value:j("hotkey_map_item_play_toggle_value")},{description:j("hotkey_map_item_seek_backward_description"),value:j("hotkey_map_item_seek_backward_value")},{description:j("hotkey_map_item_seek_forward_description"),value:j("hotkey_map_item_seek_forward_value")},{description:j("hotkey_map_item_fast_seek_backward_description"),value:j("hotkey_map_item_fast_seek_backward_value")},{description:j("hotkey_map_item_fast_seek_forward_description"),value:j("hotkey_map_item_fast_seek_forward_value")},{description:j("hotkey_map_item_rate_down_description"),value:j("hotkey_map_item_rate_down_value")},{description:j("hotkey_map_item_rate_up_description"),value:j("hotkey_map_item_rate_up_value")},{description:j("hotkey_map_item_prev_frame_description"),value:j("hotkey_map_item_prev_frame_value")},{description:j("hotkey_map_item_next_frame_description"),value:j("hotkey_map_item_next_frame_value")},{description:j("hotkey_map_item_jump_seek_description"),value:j("hotkey_map_item_jump_seek_value")},{description:j("hotkey_map_item_next_video_description"),value:j("hotkey_map_item_next_video_value")},{description:j("hotkey_map_item_prev_video_description"),value:j("hotkey_map_item_prev_video_value")}]},{title:j("hotkey_map_group_title_subtitles"),items:[{description:j("hotkey_map_item_subtitles_toggle_description"),value:j("hotkey_map_item_subtitles_toggle_value")}]},{title:j("hotkey_map_group_title_episodes"),items:[{description:j("hotkey_map_item_prev_episode_description"),value:x_.device.isApple?j("hotkey_map_item_prev_episode_mac_value"):j("hotkey_map_item_prev_episode_pc_value")},{description:j("hotkey_map_item_next_episode_description"),value:x_.device.isApple?j("hotkey_map_item_next_episode_mac_value"):j("hotkey_map_item_next_episode_pc_value")}]}]});import{debounceFn as V1,getWindow as S_,ValueSubject as Nf}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as R1}from"@vkontakte/videoplayer-core/es2018";var Ra=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:V1(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}async revealPictureInPicture(){this.isRequested&&(this.removeEventHandlers(),await this.request(),this.addEventHandlers())}async request(){var e;if(!(!this.isSupported()||this.isActive()))try{await((e=this.videoElement)==null?void 0:e.requestPictureInPicture())}catch(i){this.isRequested=!1}}async exit(){!this.isSupported()||!this.isActive()||await document.exitPictureInPicture()}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var i;this.removeEventHandlers();let e=this.videoElement;this.videoElement=(i=this.playerContainer)==null?void 0:i.querySelector("video"),this.waitForSafariLeavePictureInPicture(e,this.videoElement),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={...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)}async dispose(){this.removeEventHandlers(),await 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)}waitForSafariLeavePictureInPicture(e,i){if(R1.browser.isSafari&&e&&e!==i){let r=this.eventHandlers.leavepictureinpicture,a=0,l=()=>{S_().clearTimeout(a),e.removeEventListener("leavepictureinpicture",d)},d=s=>(r(s),l());e.addEventListener("leavepictureinpicture",d),a=S_().setTimeout(l,1e3)}}};function Na(t){return t instanceof Ra}import{devNull as C_,now as T_}from"@vkontakte/videoplayer-shared/es2018";function Of(t,e){B(e,!1);let i=he();Lt(()=>{i.getAdmanWrapper().startPostroll()}),mo(),H()}import{noop as O1}from"@vkontakte/videoplayer-shared/es2018";var N1=Ie('<path d="M11.74 6.74a.9.9 0 0 1-1.28 0L6 2.27 1.54 6.74A.9.9 0 1 1 .26 5.46l5.1-5.1a.9.9 0 0 1 1.28 0l5.1 5.1a.9.9 0 0 1 0 1.28Z"></path>'),D1=Ie('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Lr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let f="";return n(a)&&(f+="transform: rotate(180deg);"),f.length?f:void 0})()),s=m(()=>o()?ia:"currentColor"),u=m(()=>n(r)?"7":"16");Ze(t,{width:"12",get height(){return n(u)},get fill(){return n(s)},get testId(){return n(l)},get style(){return n(d)},children:(f,p)=>{var v=Le(),_=ce(v);{var y=w=>{var I=N1();$(w,I)},b=w=>{var I=D1();$(w,I)};V(_,w=>{n(r)?w(y):w(b,!1)})}$(f,v)},$$slots:{default:!0}}),H()}var B1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},H1=L('<div class="skip s-1h"> <!></div>'),F1=L("<div><!></div>"),U1={hash:"s-1h",code:".container.s-1h{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1h{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1h{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1h{color:var(--white);cursor:pointer}.skippable.s-1h:hover{color:hsla(0,0%,100%,.75)}"};function Bf(t,e){B(e,!0),Y(t,U1);let[i,o]=De(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,O1),u=he().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=F1();let v;p.__click=[B1,f,d];var _=C(p);{var y=w=>{var I=H1(),T=C(I),N=P(T);Lr(N,{direction:"right"}),S(I),D(A=>me(T,`${A!=null?A:""} `),[()=>j("skip_ads_now")]),$(w,I)},b=w=>{var I=ps();D(T=>me(I,T),[()=>j("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),$(w,I)};V(_,w=>{n(f)?w(y):w(b,!1)})}S(p),D(w=>v=ne(p,1,"container s-1h",null,v,w),[()=>({"container-mobile":r(),skippable:n(f)})]),$(t,p),H(),o()}Ye(["click"]);var z1=L('<button class="go-to-site s-1i"> </button>'),W1={hash:"s-1i",code:"button.go-to-site.s-1i{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function Hf(t,e){B(e,!1),Y(t,W1),mo();var i=z1(),o=C(i,!0);S(i),D(r=>me(o,r),[()=>j("visit_advertiser")],Sn),$(t,i),H()}var K1=L('<div class="top-gradient-mobile s-s"></div>'),q1=L('<div class="container s-s"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),Q1={hash:"s-s",code:".container.s-s{height:100%;width:100%}.top-gradient-mobile.s-s{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 Md(t,e){B(e,!0),Y(t,Q1);let[i,o]=De(),r=()=>x(F,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(T,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(X,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),f=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),_=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),b=he(),w=Mt(),I=b.state.isEnded$,T=b.ui.isMobile,N=w.ads.isMobileGoToSiteButton,A=q(void 0),E=q(void 0),k=!1,Q=b.ads.playbackState,F=b.ads.canSkip,z=b.ads.position,X=b.ads.secondsToWatchBeforeSkip,se=m(()=>r()&&a()!=="inactive"),Z=m(()=>l()&&a()!=="inactive"&&N);Lt(()=>{let U=b.getAdmanWrapper();if(C_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[T_(),f()]}),!f()){U.onAdmanLoadingError();return}let O=()=>{var Re;let{width:ye,height:He}=be(b.ui.playerSize),it=be(b.ui.isFullscreen),re=(Re=v())!=null?Re:be(b.ui.isAutoplay),de=w.ads.paramsOverride;return{width:ye,height:He,isFullscreen:it,isAutoplay:re,adsContainer:n(A),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:de,duration:_(),externalApi:y()}},Ge=async ye=>{ye&&await uo();let He=O();await U.initAdman(He),k=!0},K=new AbortController,ae=()=>{K.abort()};return window.AdmanHTML?Ge(!0).catch(()=>{U.onAdmanLoadingError()}):U.loadAdman(K.signal).then(()=>Ge(!1)).catch(()=>{U.onAdmanLoadingError()}),()=>{C_.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[T_(),f()]}),!k&&ae()}});var oe=q1(),J=C(oe);{var Ce=U=>{var O=K1();$(U,O)};V(J,U=>{l()&&U(Ce)})}var pe=P(J,2);Xe(pe,U=>R(E,U),()=>n(E));var ee=P(pe,2);{var _e=U=>{Bf(U,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return b.actions.internal.skipAd}})};V(ee,U=>{n(se)&&U(_e)})}var we=P(ee,2);{var ve=U=>{Of(U,{})};V(we,U=>{u()&&U(ve)})}var ue=P(we,2);{var Qe=U=>{Hf(U,{})};V(ue,U=>{n(Z)&&U(Qe)})}S(oe),Xe(oe,U=>R(A,U),()=>n(A)),$(t,oe),H(),o()}var Qo=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 G1=Ie('<path fill="#fff"></path>'),Y1=Ie("<path></path><!>",1);function Vd(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"live-active-icon":"live-icon"),r=m(()=>i()?"var(--timeline-slider-filled-active-live-bg, #FF3347)":void 0),a="M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69";Ze(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=Y1(),u=ce(s),f=P(u);{var p=v=>{var _=G1();Me(_,"d",a),$(v,_)};V(f,v=>{i()&&v(p)})}D(()=>Me(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),$(l,s)},$$slots:{default:!0}})}var j1=L('<div class="equalizer s-b"><div class="col s-b"></div> <div class="col s-b"></div> <div class="col s-b"></div></div>'),X1=L('<div class="live-icon s-b"><!></div>'),Z1=L('<span class="text s-b"> </span>'),J1=L("<div><!> <!></div>"),ey={hash:"s-b",code:".wrapper.s-b{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-b{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-b{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-b .equalizer:where(.s-b){margin-top:-2px}.equalizer.s-b .col:where(.s-b){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-b .equalizer:where(.s-b) .col:where(.s-b){animation-play-state:running}.equalizer.s-b .col:where(.s-b):first-child{animation-name:s-b-thumb-timer-equalizer-col1;left:0}.equalizer.s-b .col:where(.s-b):nth-child(2){animation-name:s-b-thumb-timer-equalizer-col2;left:3px}.equalizer.s-b .col:where(.s-b):nth-child(3){animation-name:s-b-thumb-timer-equalizer-col3;left:6px}.live-icon.s-b{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-b-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-b-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-b-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-b{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function Rd(t,e){Y(t,ey);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=J1();let l;var d=C(a);{var s=v=>{var _=j1();$(v,_)};V(d,v=>{i()&&v(s)})}var u=P(d,2);{var f=v=>{var _=X1(),y=C(_);Vd(y,{isActive:!0}),S(_),$(v,_)},p=v=>{var _=Z1(),y=C(_,!0);S(_),D(()=>me(y,e.time)),$(v,_)};V(u,v=>{o()?v(f):v(p,!1)})}S(a),D(v=>l=ne(a,1,"wrapper s-b",null,l,v),[()=>({live:o(),playing:r()})]),$(t,a)}var Ll=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var ty=L('<div role="timer" data-testid="thumb-timer"><!></div>'),iy={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 Nd(t,e){B(e,!0),Y(t,iy);let[i,o]=De(),r=()=>x(f,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Mt(),u=m(()=>Qo(e.duration-e.position)),f=le(!1);var p=ty();let v;var _=C(p);Rd(_,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ms(p,()=>Ll(a()&&s.features.usePerformanceFix,f,s.disableInvisibleComponentsTimeout)),D(y=>v=ne(p,1,"thumb-timer s-i",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),$(t,p),H(),o()}var Ml=t=>{if(!navigator.clipboard){I_(t);return}navigator.clipboard.writeText(t).catch(()=>I_(t))};function I_(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 fy,clientChecker as my}from"@vkontakte/videoplayer-core/es2018";import{clientChecker as E_}from"@vkontakte/videoplayer-core/es2018";var Ff="focus-hidden";var Mr=t=>{t.stopPropagation(),t.preventDefault()},Uf=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(Ff)},ny=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},ry=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},sy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},ay=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},k_=t=>t.code==="Escape",ly=t=>t.code==="ArrowLeft",Dd=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},P_=t=>{sy(t)?(Mr(t),ry(t.target)):ay(t)&&(Mr(t),ny(t.target))},sa=t=>!E_.device.isAndroid&&(t==null?void 0:t.detail)===0||E_.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Vl=async(t,e,i)=>{await uo(),t&&!t.classList.contains("opened")&&!e&&be(i)&&(await uo(),i.set(!1),t.focus())},A_=async(t,e,i)=>{await uo(),t&&!e&&be(i)&&(i.set(!1),t.focus())},Od=async(t,e,i,o=!1)=>{if(await uo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(Ff,!i),a==null||a.focus()}},L_=async(t,e)=>{setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)},Mu=(t,e)=>{P_(t),Uf(t.target),k_(t)&&(Mr(t),e())},Vu=async(t,e)=>{Dd(t,["ArrowRight"])&&(Mr(t),e())},M_=async(t,e,i)=>{if(P_(t),ly(t)){Mr(t),e();return}k_(t)&&(Mr(t),i())},Rl=(t,e)=>{Dd(t)&&(Mr(t),e())},V_=(t,e,i)=>{if(Dd(t))Mr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Mr(t);return}o==="ArrowRight"&&!e&&(i(!0),Mr(t))}},R_=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},N_=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 Ru,isValidURL as vy}from"@vkontakte/videoplayer-shared/es2018";var is={"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 D_}from"@vkontakte/videoplayer-shared/es2018";var cy=(t,e)=>{Rl(t,()=>e())},uy=L('<li class="item s-1n" role="menuitem" tabindex="0"> </li>'),py={hash:"s-1n",code:".item.s-1n{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-1n:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function zf(t,e){B(e,!0),Y(t,py);let i=h(e,"onClick",3,D_),o=h(e,"closeContextMenu",3,D_),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=uy();a.__click=r,a.__keydown=[cy,r];var l=C(a,!0);S(a),D(()=>{var d;Me(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Me(a,"data-testid",e.id),me(l,e.label)}),$(t,a),H()}Ye(["click","keydown"]);var Oa=(t,e)=>t.weight-e.weight;var Bd=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Bd||{});var gy=(t,e)=>{Mu(t,e)},hy=t=>{t.preventDefault()},_y=L('<ul role="menu" class="s-y"></ul>'),by={hash:"s-y",code:"ul.s-y{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),Y(t,by);let[i,o]=De(),r=()=>x(Ce,"$playerPhase",i),a=()=>x(se,"$isLive$",i),l=()=>x(pe,"$isPiPEnabled$",i),d=()=>x(X,"$chromecastState$",i),s=()=>x(ee,"$pictureInPictureApiIsActive$",i),u=()=>x(J,"$isLooped$",i),f=()=>x(Z,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),_=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),b=h(e,"menuElementRef",15,void 0),w=q(0),I=q(0),T=he(),{pictureInPicture$:N}=vo(),A=Mt(),E=T.ui.contextMenu.visible$,k=T.ui.debugPanelVisible,Q=T.ui.additionalContextMenuItems$,F=T.ui.t,z=T.actions.internal.togglePictureInPicture,X=T.state.chromecastState$,se=T.state.isLive$,Z=T.state.positionExact$,oe=T.state.isInteractive,J=T.state.looped$,Ce=T.playerPhase,{isEnabled$:pe,isActive$:ee}=N,_e=m(()=>r()==="video"),we=m(()=>!!a()&&n(_e)),ve=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),ue=m(()=>{var fe;return A.features.copyVideoLink&&((fe=T.callbacks)==null?void 0:fe.onCopyVideoLink)}),Qe=m(()=>n(ue)&&!n(ve)&&!oe&&!n(we)),U=m(()=>{var fe;return!!((fe=T.callbacks)!=null&&fe.onCopyEmbedCodeClicked)}),O=m(()=>l()&&d()!==fy.CONNECTED&&!oe&&n(_e)&&!my.browser.isFirefox),Ge=m(()=>!oe&&!n(ve)&&!n(we)),K=m(()=>A.features.videoRotate&&!oe&&!n(ve)),ae=m(()=>A.showSupport&&!s()),ye=m(()=>A.features.saveTraceInfoToFile),He=()=>{var fe;E.set(!1),(fe=e.returnFocus)==null||fe.call(e)},it=(fe,Ne)=>{if(!b()||!y())return;let qe=b().getBoundingClientRect(),nt=y().getBoundingClientRect();R(w,fe-nt.left),R(I,Ne-nt.top),n(w)+qe.width>nt.width&&R(w,nt.width-qe.width),n(I)+qe.height>nt.height&&R(I,nt.height-qe.height),R(w,Math.max(n(w),0),!0),R(I,Math.max(n(I),0),!0)};Oe(()=>{(async()=>{if(b()&&y()){await uo();let{top:Ne,left:qe,bottom:nt,right:Wt}=_(),Vt=qe!=null?qe:0,pi=Ne!=null?Ne:0,di=b().getBoundingClientRect();Ru(qe)&&!Ru(Wt)&&(Vt=Wt-di.width),Ru(Ne)&&!Ru(nt)&&(pi=nt-di.height),Vt=Math.max(Vt,0),pi=Math.max(pi,0),it(Vt,pi)}})()});let re=()=>{T.actions.internal.videoRotate()},de=()=>{vy(e.supportLink)&&window.open(e.supportLink,"_blank"),T.actions.internal.reportProblem(),T.actions.internal.pause()},Re=()=>{let fe=T.actions.internal.getDebugTextData();if(A.features.saveDebugInfoToFile){let Ne=new Blob([...fe],{type:"plain/text"}),qe=window.URL.createObjectURL(Ne);Ma(qe,"vk_player_debug_info","txt")}else Ml(T.actions.internal.getDebugTextData())},Ve=()=>{let fe=T.actions.internal.getTraceTextData(),Ne=new Blob([...fe],{type:"application/json"}),qe=window.URL.createObjectURL(Ne);Ma(qe,"vk_player_trace_info","json")},et=()=>{k.set(!0)},Ee=async()=>{var fe;try{z()}finally{(fe=e.returnFocus)==null||fe.call(e)}},Te=()=>{T.actions.internal.setLooped(!u())},Fe=()=>{var fe,Ne;if(n(U)){let qe=(Ne=(fe=T.callbacks)==null?void 0:fe.onCopyEmbedCodeClicked)==null?void 0:Ne.call(fe);qe&&Ml(qe)}},kt=(fe=!1)=>{var Ne,qe;if((Ne=T.callbacks)!=null&&Ne.onCopyVideoLink){let nt=(qe=T.callbacks)==null?void 0:qe.onCopyVideoLink(fe,f());nt&&Ml(nt)}},It=m(()=>A.features.saveDebugInfoToFile?F("menu_save_debug"):F("menu_copy_debug")),Pt=m(()=>n(ue)?{id:"copy-link",weight:is["copy-link"],label:F("menu_copy_video_link"),onClick:()=>kt()}:void 0),st=m(()=>n(Qe)?{id:"copy-link-timestamp",weight:is["copy-link-timestamp"],label:F("menu_copy_video_link_with_timestamp"),onClick:()=>kt(!0)}:void 0),wt=m(()=>n(U)?{id:"copy-embed-code",weight:is["copy-embed-code"],label:F("menu_copy_embed_code"),onClick:Fe}:void 0),jt=m(()=>n(O)?{id:"pip",weight:is.pip,label:s()?F("menu_pip_close"):F("menu_pip"),onClick:Ee}:void 0),Ot=m(()=>n(Ge)?{id:"video-loop",weight:is["video-loop"],label:u()?F("menu_video_loop_off"):F("menu_video_loop_on"),ariaLabel:F("aria_label_menu_loop"),onClick:Te}:void 0),Nt=m(()=>n(K)?{id:"rotate",weight:is.rotate,label:F("menu_video_rotate"),ariaLabel:F("aria_label_menu_rotate"),onClick:re}:void 0),zt=m(()=>n(ae)?{id:"report",weight:is.report,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,onClick:de}:void 0),G=m(()=>({id:"save-debug",weight:is["save-debug"],label:n(It),onClick:Re})),Pe=m(()=>n(ye)?{id:"save-trace",weight:is["save-trace"],label:F("menu_save_debug"),onClick:Ve}:void 0),ke=m(()=>({id:"debug-info",weight:is["debug-info"],label:F("menu_debug_overlay"),ariaLabel:F("aria_label_menu_debug_overlay"),onClick:et})),xe=m(()=>[n(Pt),n(st),n(wt),n(jt),n(Ot),n(Nt),n(zt),n(G),n(Pe),n(ke),...p()].filter(fe=>!!fe).sort(Oa));var Be=Le(),$e=ce(Be);{var St=fe=>{var Ne=_y();Ne.__contextmenu=[hy],Ne.__keydown=[gy,He],_i(Ne,21,()=>n(xe),qe=>qe.id,(qe,nt)=>{zf(qe,{get id(){return n(nt).id},get label(){return n(nt).label},get ariaLabel(){return n(nt).ariaLabel},get onClick(){return n(nt).onClick},closeContextMenu:He})}),S(Ne),Xe(Ne,qe=>b(qe),()=>b()),D(()=>{var qe,nt;return Ke(Ne,`top: ${(qe=n(I))!=null?qe:""}px; left: ${(nt=n(w))!=null?nt:""}px;`)}),$(fe,Ne)};V($e,fe=>{v()&&fe(St)})}$(t,Be),H(),o()}Ye(["contextmenu","keydown"]);var Nu=class{constructor(e){this.value=e,this.next=null}};var Nl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Nu(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 $y=L('<div class="container s-1f"><canvas class="s-1f"></canvas></div>'),yy={hash:"s-1f",code:".container.s-1f{display:inline-block;height:16px;width:120px}canvas.s-1f{margin-top:2px;transform:scaleY(-1)}"};function Hd(t,e){B(e,!0),Y(t,yy);let i=h(e,"values",19,()=>[]),o=q(void 0),r=q(null),a=16,l=120,d=60,s=l/d;Lt(()=>{n(o).width=l,n(o).height=a,R(r,n(o).getContext("2d"),!0)});function u(v,_,y,b,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect(_,y,b,w)}Oe(()=>{let v="";if(n(r)){let _=i()[0];for(let b=1;b<i().length;b++)i()[b]>_&&(_=i()[b]);n(r).clearRect(0,0,l,a);let y=d-1;for(let b=i().length-1;b>=0;b--){let w=y*s,I=_>0?a*(i()[b]/_):0;u(n(r),w,0,s,I),v=I+" "+v,y--}}});var f=$y(),p=C(f);Xe(p,v=>R(o,v),()=>n(o)),S(f),$(t,f),H()}import{safeStorage as O_}from"@vkontakte/videoplayer-shared/es2018";var xy=(t,e)=>{t.stopPropagation(),O_.remove(Cd),e.set(!1)},wy=L('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),Sy=L('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),Cy=L('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),Ty=L('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),Iy=L('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),Ey=L('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),ky=L('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),Py=L('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),Ay=L('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),Ly=L('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),My=L('<div class="s-k"><div class="s-k">Nbuffer</div> <span> </span></div>'),Vy=L('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),Ry=L('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),Ny=L('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),Dy=L('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),Oy=L('<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>'),By={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 Fd(t,e){B(e,!0),Y(t,By);let[i,o]=De(),r=()=>x(d,"$isMobile",i),a=he(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=q(si(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=q(0),p=q(0),v=q(0),_=new Nl(60),y=new Nl(60),b=new Nl(60),w=q(si([])),I=q(si([])),T=q(si([])),N=j("aria_label_debug_panel");Lt(()=>{O_.set(Cd,"true"),a.actions.internal.startLogging(),u&&(R(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),R(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let G=window.setInterval(()=>{R(s,a.actions.internal.getDebugPanelData(),!0)},500),Pe;return u&&(Pe=window.setInterval(()=>{if(u){R(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ke=u.getVideoPlaybackQuality().totalVideoFrames;R(v,ke-n(f)),R(f,ke,!0),_.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&b.push(n(s).bitrate),R(w,_.getValuesFromBottom(),!0),R(I,y.getValuesFromBottom(),!0),R(T,b.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(G),Pe&&clearInterval(Pe)}});var A=Oy();let E;var k=C(A);k.__click=[xy,l];var Q=P(k,2),F=C(Q),z=P(C(F),2),X=C(z,!0);S(z),S(F);var se=P(F,2);{var Z=G=>{var Pe=wy(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(()=>me(xe,n(s).id)),$(G,Pe)};V(se,G=>{n(s).id&&G(Z)})}var oe=P(se,2);{var J=G=>{var Pe=Sy(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(()=>me(xe,n(s).vsid)),$(G,Pe)};V(oe,G=>{n(s).vsid&&G(J)})}var Ce=P(oe,2);{var pe=G=>{var Pe=Cy(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(()=>me(xe,n(s).provider)),$(G,Pe)};V(Ce,G=>{n(s).provider&&G(pe)})}var ee=P(Ce,2);{var _e=G=>{var Pe=Ty(),ke=P(C(Pe),2),xe=C(ke);S(ke),S(Pe),D(()=>{var Be,$e;return me(xe,`Video: ${(Be=n(s).videoCodec||"")!=null?Be:""} ${n(s).hdr?"(HDR)":""}
57
57
  &
58
- Audio: ${(nt=n(s).audioCodec||"")!=null?nt:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b(Y,Se)};R(re,Y=>{(n(s).videoCodec||n(s).audioCodec)&&Y(_e)})}var $e=A(re,2);{var ee=Y=>{var Se=wy(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(()=>me(he,n(s).viewport)),b(Y,Se)};R($e,Y=>{n(s).viewport&&Y(ee)})}var Re=A($e,2);{var fe=Y=>{var Se=Sy(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(()=>me(he,n(s).videoSize)),b(Y,Se)};R(Re,Y=>{n(s).videoSize&&Y(fe)})}var P=A(Re,2);{var We=Y=>{var Se=Cy(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(()=>me(he,n(s).cdn)),b(Y,Se)};R(P,Y=>{n(s).cdn&&Y(We)})}var Te=A(P,2);{var Z=Y=>{var Se=Ty(),le=A(C(Se),2),he=C(le);S(le),S(Se),O(()=>{var Me;return me(he,`${(Me=n(s).volume)!=null?Me:""} %`)}),b(Y,Se)};R(Te,Y=>{n(s).volume&&Y(Z)})}var ie=A(Te,2);{var De=Y=>{var Se=Iy(),le=A(C(Se),2),he=C(le);S(le),S(Se),O(Me=>me(he,`${Me!=null?Me:""} s`),[()=>n(s).position.toFixed(2)]),b(Y,Se)};R(ie,Y=>{n(s).position&&Y(De)})}var Oe=A(ie,2);{var tt=Y=>{var Se=Ey(),le=A(C(Se),2),he=C(le);S(le),S(Se),O(Me=>me(he,`${Me!=null?Me:""} s`),[()=>n(s).buffer.toFixed(2)]),b(Y,Se)};R(Oe,Y=>{n(s).buffer&&Y(tt)})}var U=A(Oe,2);{var Pe=Y=>{var Se=ky(),le=A(C(Se),2),he=C(le);S(le),S(Se),O(Me=>me(he,`${Me!=null?Me:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(Y,Se)};R(U,Y=>{n(s).nativeBuffer&&Y(Pe)})}var ke=A(U,2);{var Ue=Y=>{var Se=Py(),le=A(C(Se),2),he=C(le);S(le),S(Se),O(Me=>me(he,`${Me!=null?Me:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(Y,Se)};R(ke,Y=>{n(s).liveLatency&&Y(Ue)})}var et=A(ke,2);{var ye=Y=>{var Se=Ay(),le=A(C(Se),2),he=C(le,!0);S(le),S(Se),O(Me=>me(he,Me),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Me})=>Me).map(({value:Me,title:nt})=>`${nt} ${((Me!=null?Me:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Y,Se)};R(et,Y=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Y(ye)})}var Ie=A(et,2),Be=A(C(Ie),2),Vt=C(Be);S(Be),S(Ie);var pt=A(Ie,2);{var Dt=Y=>{var Se=Ly(),le=A(C(Se),2);Hd(le,{get values(){return n(I)}});var he=A(le,2),Me=C(he);S(he),S(Se),O(nt=>me(Me,`${nt!=null?nt:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(Y,Se)};R(pt,Y=>{n(s).speed&&Y(Dt)})}var at=A(pt,2);{var yt=Y=>{var Se=My(),le=A(C(Se),2);Hd(le,{get values(){return n(T)}});var he=A(le,2),Me=C(he);S(he),S(Se),O(nt=>me(Me,`${nt!=null?nt:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(Y,Se)};R(at,Y=>{n(s).bitrate&&Y(yt)})}var Jt=A(at,2),It=A(C(Jt),2);Hd(It,{get values(){return n(x)}});var Rt=A(It,2),Ot=C(Rt,!0);S(Rt),S(Jt),S(q),S(L),O(Y=>{var Se,le;E=se(L,1,"container s-l",null,E,Y),Le(L,"aria-label",N),me(j,n(s).version),me(Vt,`${(Se=n(p))!=null?Se:""} / ${(le=n(f))!=null?le:""} frames`),me(Ot,n(v))},[()=>({"container-mobile":r()})]),b(t,L),F(),o()}Ge(["click"]);import{noop as Ny}from"@vkontakte/videoplayer-shared/es2018";var Dy=(t,e)=>{t.stopPropagation(),e()()},Oy=M('<div class="close s-10"></div>'),By={hash:"s-10",code:'.close.s-10{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-10:hover{opacity:1}.close.s-10:after,.close.s-10:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-10:before{transform:rotate(45deg)}.close.s-10:after{transform:rotate(-45deg)}'};function As(t,e){B(e,!0),Q(t,By);let i=g(e,"onClick",3,Ny);var o=Oy();o.__click=[Dy,i],b(t,o),F()}Ge(["click"]);import{noop as Hy}from"@vkontakte/videoplayer-shared/es2018";var ln=t=>`width:${t}px;height:${t}px;`;var Fy=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(()=>ln(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=Fy();b(o,a)},$$slots:{default:!0}}),F()}var Uy=M('<div class="timer s-13"><canvas class="timer-canvas s-13" width="100" height="100"></canvas> <!></div>'),zy={hash:"s-13",code:".timer.s-13{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-13:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-13{height:50px;position:absolute;width:50px}"};function zd(t,e){B(e,!0),Q(t,zy);let i=g(e,"isRunning",3,!0),o=g(e,"onTimerEnded",3,Hy),r=5e3,a=K(void 0),l,d,s=0,u;Ne(()=>{i()&&St(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let f=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{f(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Pt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),an(()=>{f()});var v=Uy(),$=C(v);je($,h=>D(a,h),()=>n(a));var y=A($,2);En(y,{get size(){return"24"}}),S(v),b(t,v),F()}var Wy=(t,e,i)=>{e(!1),i()},Ky=M('<div class="overlay s-1g"></div> <div class="next-video s-1g"><div class="top s-1g"><div class="caption s-1g"> </div> <!></div> <div class="row s-1g"><div class="column s-1g"><div class="thumb s-1g"><div></div> <!></div></div> <div class="column s-1g"><div class="title s-1g"> </div></div></div></div>',1),qy={hash:"s-1g",code:".overlay.s-1g{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-1g{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-1g{display:flex;justify-content:space-between}.caption.s-1g{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-1g{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-1g{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-1g{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-1g,.thumb-overlay.s-1g{height:100%;width:100%}.thumb-overlay.s-1g{position:absolute}.thumb-overlay.withOpacity.s-1g{background:var(--black);opacity:.3}.title.s-1g{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function Uf(t,e){B(e,!0),Q(t,qy);let[i,o]=Ve(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},h=()=>{e.clickCloseIcon(),$()};Pt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var x=Ae(),I=ce(x);{var T=N=>{var L=Ky(),E=A(ce(L),2),k=C(E),q=C(k),H=C(q,!0);S(q);var z=A(q,2);As(z,{onClick:h}),S(k);var j=A(k,2);j.__click=[Wy,u,p];var ae=C(j),X=C(ae),ne=C(X);let J;var we=A(ne,2);{var pe=ee=>{let Re=m(()=>a()&&r());zd(ee,{get isRunning(){return n(Re)},onTimerEnded:y})};R(we,ee=>{r()&&ee(pe)})}S(X),S(ae);var re=A(ae,2),_e=C(re),$e=C(_e,!0);S(_e),S(re),S(j),S(E),O((ee,Re)=>{me(H,ee),qe(X,`background-image: url('${e.thumb}')`),J=se(ne,1,"thumb-overlay s-1g",null,J,Re),me($e,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(T)})}b(t,x),F(),o()}Ge(["click"]);import{PlaybackState as Da}from"@vkontakte/videoplayer-core/es2018";import{checkNever as Gy}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as qn}from"@vkontakte/videoplayer-statistics/es2018";var zf=(t,e)=>Math.min(+(t+e).toFixed(2),1),Wf=(t,e)=>Math.max(+(t-e).toFixed(2),0),Nu=(t,e,i)=>{let o=zf(e,i);e<1&&t.actions.internal.setVolume(o)},Du=(t,e,i)=>{let o=Wf(e,i);e>0&&t.actions.internal.setVolume(o)};var oa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Ou(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var Yy=(t,e)=>{e(t)},jy=M('<div class="keyboard-controls s-1f" tabindex="-1" role="region"><!></div>'),Xy={hash:"s-1f",code:".keyboard-controls.s-1f{bottom:0;left:0;position:absolute;right:0;top:0}"};function Kf(t,e){var Y,Se;B(e,!0),Q(t,Xy);let[i,o]=Ve(),r=()=>w(we,"$disabledControls$",i),a=()=>w(tt,"$isInteractiveTime$",i),l=()=>w(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>w(z,"$playbackState$",i),s=()=>w(We,"$isEnded$",i),u=()=>w(fe,"$doubleForwardAvailable$",i),f=()=>w(Re,"$doubleForwardOn$",i),p=()=>w(Te,"$overlayContainer$",i),v=()=>w(ae,"$adPlaybackState",i),$=()=>w(X,"$positionExact$",i),y=()=>w(ne,"$duration$",i),h=()=>w(De,"$isAudioAvailable$",i),x=()=>w(J,"$volume$",i),I=()=>w(j,"$canChangePlaybackSpeed$",i),T=()=>w(pe,"$muted$",i),N=()=>w(re,"$currentSubtitle$",i),L=g(e,"nextButtonActive",3,!1),E=g(e,"prevButtonActive",3,!1),k=ve(),q=At(),H=k.getLogger().createComponentLog("KeyboardControls component"),z=k.state.playbackState$,j=k.state.canChangePlaybackSpeed$,ae=k.ads.playbackState,X=k.state.positionExact$,ne=k.state.duration$,J=k.state.volume$,we=k.ui.controls.disabledControls$,pe=k.state.muted$,re=k.state.currentSubtitle$,_e=k.ui.contextMenu.openedByHotKey$,$e=k.ui.contextMenu.lastActiveElem$,ee=k.ui.contextMenu.visible$,Re=k.ui.doubleForwardOn$,fe=k.ui.doubleForwardAvailable$,P=k.ui.contextMenu.position$,We=k.state.isEnded$,Te=k.ui.overlayContainer$,Z=(Y=k.callbacks)==null?void 0:Y.onAudioDoesNotExistHint,ie=(Se=k.callbacks)==null?void 0:Se.onAudioDisabledHint,De=k.state.isAudioAvailable$,Oe=k.state.isAudioDisabled,tt=k.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=$o(),Pe=0,ke=!0,Ue=K(void 0),et=le=>(le!==ke&&(ke=le,Pe=0),Pe+=1,(q.controls.seekStepKeyboard+q.controls.seekStepKeyboard*Pe)/1e3),ye=!0,Ie=({type:le,repeat:he,disableDoubleForward:Me})=>{let nt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{k.actions.internal.togglePlay();let ue="PLAY";d()===Da.PAUSED?ue="PAUSE":s()&&(ue="REPLAY"),e.showHotKeyHelpers({type:ue})}},ut=le==="down";if(!u()||Me){ut&&nt(),ye=!0;return}if(ut)ye=!1;else if(ye)return;if(ut){!he&&e.startDoubleForwardActivationTimer();return}f()||nt(),e.stopDoubleForward(),ye=!0},Be=le=>{let he=M_(p());P.set(he),$e.set(le.target),_e.set(!0),ee.set(!0)},Vt=(le,he=!1)=>{var ci,pi;let Me=le.target,nt=(ci=Me==null?void 0:Me.getAttribute("role"))==null?void 0:ci.includes("menuitem"),ut=Me.classList.contains("btn"),ue=le.code;if(ut&&ue==="Space")return!1;let ze=Ph.has(ue);if(nt&&ze)return!1;let Qe=!kh.has(ue);if(le.ctrlKey&&Qe||le.altKey&&Qe||le.metaKey)return!1;let lt=nt&&ue==="Escape";Ah.has(ue)||lt||e.hideContextMenu();let Bt=d()===Da.PLAYING||d()===Da.PAUSED,Ft=e.isAds&&(v()==="paused"||v()==="playing"),ei=!Ft&&!r().has("TIMELINE"),vi=le.shiftKey&&["Digit1","Numpad1"].includes(ue);if(!vi&&!(Bt||Ft))return!1;H({message:`key down, code: ${ue}, isExternal = ${he}`});let qi=!1,Lt=()=>{qi=!0,he||le.preventDefault()};if(vi)return Be(le),Lt(),!0;switch(ue){case"KeyJ":case"ArrowLeft":{if(!ei)break;if(le.ctrlKey||le.altKey){let vt=k.actions.internal.getPrevEpisode();k.actions.internal.seekToPrevEpisode(vt),vt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:vt.text}),Lt()}else{let vt=le.shiftKey?et(!1):q.controls.seekStepKeyboard/1e3,Yt=Math.max($()-vt,0);$()>0&&(k.actions.internal.seekTime(Yt,qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:vt.toString()}),Lt())}break}case"KeyL":case"ArrowRight":{if(!ei)break;if(le.ctrlKey||le.altKey){let vt=k.actions.internal.getNextEpisode();k.actions.internal.seekToNextEpisode(vt),vt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:vt.text}),Lt()}else{let vt=le.shiftKey?et(!0):q.controls.seekStepKeyboard/1e3,Yt=Math.min($()+vt,y());Math.round($())<Math.round(y())&&(k.actions.internal.seekTime(Yt,qn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:vt.toString()}),Lt())}break}case"ArrowUp":{if(oa({isAudioDisabled:Oe,audioDisabledHintCallback:ie,isAudioAvailable:h(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let vt=x(),Yt=q.controls.volumeStepKeyboard,_i=vt<=1;if(Nu(k,vt,Yt),_i){let Qi=Math.round(zf(vt,Yt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Qi}})}}Lt();break}case"ArrowDown":{if(oa({isAudioDisabled:Oe,audioDisabledHintCallback:ie,isAudioAvailable:h(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let vt=x(),Yt=q.controls.volumeStepKeyboard,_i=vt>=0;if(Du(k,vt,Yt),_i){let Qi=Math.round(Wf(vt,Yt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Qi}})}}Lt();break}case"Comma":{if(le.shiftKey){if(!f()&&I()){let vt=k.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:vt==null?void 0:vt.displayValue}),Lt()}}else{if(Ft||d()!==Da.PAUSED)break;let vt=Math.max($()-q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime(vt,qn.DOUBLE_TAP),Lt())}break}case"Period":{if(le.shiftKey){if(!f()&&I()){let vt=k.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:vt==null?void 0:vt.displayValue}),Lt()}}else{if(Ft||d()!==Da.PAUSED)break;let vt=Math.min($()+q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime(vt,qn.DOUBLE_TAP),Lt())}break}case"KeyK":case"Space":Ie({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===ue}),Lt();break;case"KeyM":{oa({isAudioDisabled:Oe,audioDisabledHintCallback:ie,isAudioAvailable:h(),audioIsNotExistHintCallback:Z,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),k.actions.internal.toggleMuted()),Lt();break}case"KeyF":e.toggleFullscreen(),Lt();break;case"KeyC":k.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(pi=N())==null?void 0:pi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Lt();break;case"KeyI":k.actions.internal.togglePictureInPicture(),Lt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.1,qn.DOUBLE_TAP),Lt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.2,qn.DOUBLE_TAP),Lt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.3,qn.DOUBLE_TAP),Lt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.4,qn.DOUBLE_TAP),Lt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.5,qn.DOUBLE_TAP),Lt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.6,qn.DOUBLE_TAP),Lt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.7,qn.DOUBLE_TAP),Lt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.8,qn.DOUBLE_TAP),Lt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.9,qn.DOUBLE_TAP),Lt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(0,qn.DOUBLE_TAP),Lt();break;case"Slash":{le.shiftKey&&q.features.hotKeyMapModal&&(e.showKeyMap(),Lt());break}case"KeyN":le.shiftKey&&L()&&(k.actions.internal.nextVideoClick(),Lt());break;case"KeyP":le.shiftKey&&E()&&(k.actions.internal.prevVideoClick(),Lt());break;case"ShiftLeft":case"ShiftRight":Lt();break;case"Tab":case"Escape":case"Enter":break;default:Gy(ue);break}return qi},pt=le=>{let he=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Me=d()===Da.PLAYING||d()===Da.PAUSED,nt=e.isAds&&(v()==="paused"||v()==="playing");if(Me||nt)switch(he){case"ShiftLeft":case"ShiftRight":Pe=0;break;case"Space":Ie({type:"up"});break}},Dt=G("aria_label_video_player"),at=()=>{var le;return(le=n(Ue))==null?void 0:le.focus()},yt=()=>n(Ue)===Ou(),Jt=le=>le.type==="keydown"?Vt(le,!0):(le.type==="keyup"&&pt(le),!1);var It=jy();It.__keyup=pt,It.__keydown=[Yy,Vt];var Rt=C(It);ti(Rt,()=>{var le;return(le=e.children)!=null?le:mt}),S(It),je(It,le=>D(Ue,le),()=>n(Ue)),O(()=>Le(It,"aria-label",Dt)),b(t,It);var Ot=F({focus:at,isFocused:yt,handleExternalKeyboardEvent:Jt});return o(),Ot}Ge(["keyup","keydown"]);var Zy=M('<div class="container s-m"><div class="dot s-m"></div> <div class="dot s-m"></div> <div class="dot s-m"></div></div>'),Jy={hash:"s-m",code:".container.s-m{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-m:first-child{animation-delay:0s}.dot.s-m:nth-child(2){animation-delay:.18s}.dot.s-m:nth-child(3){animation-delay:.36s}@keyframes s-m-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-m{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-m-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-m+.dot:where(.s-m){margin-left:4px}"};function Oa(t,e){Q(t,Jy);let i=g(e,"style",3,"");var o=Zy();O(()=>qe(o,i())),b(t,o)}var e0=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 qf(t,e){Xe(t,{get fill(){return e.fill},children:(i,o)=>{var r=e0();b(i,r)},$$slots:{default:!0}})}import{noop as Rl}from"@vkontakte/videoplayer-shared/es2018";var t0=t=>{t.stopPropagation()},i0=M("<button><!></button>"),o0={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 Wt(t,e){B(e,!0),Q(t,o0);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),f=g(e,"ariaExpanded",3,void 0),p=g(e,"tabIndex",3,0),v=g(e,"click",3,Rl),$=g(e,"focus",3,Rl),y=g(e,"blur",3,Rl),h=m(()=>v()===Rl?null:L=>{L.stopPropagation(),v()(L)}),x=m(()=>$()===Rl?null:L=>{L.preventDefault(),$()()}),I=m(()=>y()===Rl?null:L=>{L.preventDefault(),y()()});var T=i0();T.__pointerdown=[t0],T.__click=function(...L){var E;(E=n(h))==null||E.apply(this,L)};var N=C(T);ti(N,()=>{var L;return(L=e.children)!=null?L:mt}),S(T),je(T,L=>s(L),()=>s()),O(()=>{var L,E,k,q,H,z,j,ae;se(T,1,`btn ${(L=i())!=null?L:""}`,"s-1x"),qe(T,o()||null),T.disabled=(E=r())!=null?E:null,Le(T,"aria-hidden",(k=l())!=null?k:null),Le(T,"aria-label",(q=d())!=null?q:null),Le(T,"aria-keyshortcuts",(H=u())!=null?H:null),Le(T,"aria-expanded",(z=f())!=null?z:null),Le(T,"data-testid",(j=a())!=null?j:null),Le(T,"tabindex",p()),Le(T,"role",e.role),Le(T,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),st("focus",T,function(...L){var E;(E=n(x))==null||E.apply(this,L)}),st("blur",T,function(...L){var E;(E=n(I))==null||E.apply(this,L)}),b(t,T),F()}Ge(["pointerdown","click"]);var n0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},r0=M('<div class="modal-header s-1p"><h3 class="modal-title s-1p"> </h3> <!></div>'),s0=M('<div class="modal-overlay s-1p"><div class="modal-container s-1p" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1p" tabindex="0" role="scrollbar"><div class="modal-main s-1p"><!></div></div></div></div>'),a0={hash:"s-1p",code:'.modal-overlay.s-1p{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-1p{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-1p{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-1p{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-1p{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1p::-webkit-scrollbar{width:8px}.modal-scroll.s-1p::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1p::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1p::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1p{margin:-8px -4px 0 0}'};function Qf(t,e){B(e,!0),Q(t,a0);let i=g(e,"showHeader",3,!0),o=g(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Pt(()=>{var h;return(h=n(r))==null||h.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=s0();s.__keydown=[n0,e];var u=C(s),f=C(u);{var p=h=>{var x=r0(),I=C(x),T=C(I,!0);S(I);var N=A(I,2);{var L=E=>{Wt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(k,q)=>{qf(k,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(L)})}S(x),O(()=>me(T,e.title)),b(h,x)};R(f,h=>{i()&&h(p)})}var v=A(f,2),$=C(v),y=C($);ti(y,()=>{var h;return(h=e.children)!=null?h:mt}),S($),S(v),je(v,h=>D(r,h),()=>n(r)),S(u),je(u,h=>D(a,h),()=>n(a)),S(s),b(t,s),F()}Ge(["keydown"]);var l0=new Set(["BR"]),N_=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;l0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var d0=M('<li class="hot-key-map-item s-1d"><span class="hot-key-map-item-description s-1d"><!></span> &nbsp; <span class="hot-key-map-item-value s-1d"> </span></li>'),c0=M('<div class="hot-key-map-group s-1d"><h5 class="hot-key-map-group-title s-1d"> </h5> <ul class="hot-key-map-group-items s-1d"></ul></div>'),u0=M('<div class="hot-key-map s-1d"></div>'),p0={hash:"s-1d",code:'.hot-key-map.s-1d{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-1d{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-1d:last-child{border-bottom:none}.hot-key-map-group-title.s-1d{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-1d,.hot-key-map-item.s-1d{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-1d{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-1d{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-1d{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-1d{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-1d,.hot-key-map-item-value.s-1d{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Gf(t,e){B(e,!1),Q(t,p0);let[i,o]=Ve(),r=()=>w(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};bo(),Qf(t,{get title(){return r().title},onClose:s,children:(u,f)=>{var p=u0();hi(p,5,()=>r().groups,({title:v,items:$})=>v,(v,$)=>{let y=()=>n($).title,h=()=>n($).items;var x=c0(),I=C(x),T=C(I,!0);S(I);var N=A(I,2);hi(N,5,h,({description:L,value:E})=>E,(L,E)=>{let k=()=>n(E).description,q=()=>n(E).value;var H=d0(),z=C(H),j=C(z);yd(j,()=>N_(k())),S(z);var ae=A(z,2),X=C(ae,!0);S(ae),S(H),O(()=>me(X,q())),b(L,H)}),S(N),S(x),O(()=>me(T,y())),b(v,x)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}import{noop as db}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as ob,PlaybackState as Nm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as x0}from"@vkontakte/videoplayer-shared/es2018";var f0=M('<div class="pillow s-1y"><!></div>'),m0={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 Yf(t,e){Q(t,m0);var i=f0(),o=C(i);ti(o,()=>{var r;return(r=e.children)!=null?r:mt}),S(i),O(()=>Le(i,"data-testid",e.testId)),b(t,i)}import{VideoQuality as Wd}from"@vkontakte/videoplayer-shared/es2018";var v0=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=In(e,["$$slots","$$events","$$legacy","children"]);var o=v0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(),S(o),b(t,o)}var g0=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 Xf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=g0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(),S(o),b(t,o)}var h0=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 Zf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=h0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(),S(o),b(t,o)}var _0=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 Jf(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=_0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(),S(o),b(t,o)}var b0=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 em(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=b0();Ji(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(),S(o),b(t,o)}var Bu=t=>{switch(t){case Wd.Q_720P:return Zf;case Wd.Q_1080P:return Jf;case Wd.Q_1440P:return em;case Wd.Q_2160P:return jf;case Wd.Q_4320P:return Xf}};var $0=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 tm(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=$0();b(i,r)},$$slots:{default:!0}})}var y0=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 im(t,e){Xe(t,{get testId(){return e.testId},children:(i,o)=>{var r=y0();b(i,r)},$$slots:{default:!0}})}var w0=M('<div aria-hidden="true"><!> <!></div>'),S0={hash:"s-1t",code:".icon.s-1t{display:flex;height:24px;position:relative;width:24px}.icon.s-1t .pillow{position:absolute;right:-9px;top:1px}.icon.triple.s-1t .pillow{right:-13px}.icon.s-1t svg[data-testid=settings-icon--labeled] ._full{opacity:0;visibility:hidden}"};function Kd(t,e){B(e,!0),Q(t,S0);let i=g(e,"isMobile",3,!1),o=g(e,"currentQuality",3,void 0),r=m(()=>o()?x0(o()):""),a=m(()=>Bu(o())),l=m(()=>n(r).length>2);var d=Ae(),s=ce(d);{var u=p=>{tm(p,{testId:"settings-mobile-icon"})},f=p=>{var v=w0();let $;var y=C(v);{var h=T=>{let N=m(()=>`${n(r)}-pill-icon`);Yf(T,{get testId(){return n(N)},children:(L,E)=>{var k=Ae(),q=ce(k);Ni(q,()=>n(a),(H,z)=>{z(H,{})}),b(L,k)},$$slots:{default:!0}})};R(y,T=>{n(a)&&T(h)})}var x=A(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");im(x,{get testId(){return n(I)}}),S(v),O(T=>$=se(v,1,"icon s-1t",null,$,T),[()=>({triple:n(l)})]),b(p,v)};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}var C0=M('<span class="settings-icon-wrapper s-23"><!></span>'),T0={hash:"s-23",code:".settings-icon-wrapper.s-23{position:relative;width:24px}"};function Nl(t,e){B(e,!0),Q(t,T0);let[i,o]=Ve(),r=()=>w(u,"$settingsMenuVisible",i),a=()=>w(v,"$isMobile",i),l=()=>w(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,$=d.ui.t,y=K(void 0);Ne(()=>{n(y)&&St(()=>{e.ref$.set(n(y))})});let h=$("aria_label_settings");async function x(T){let N=ia(T);r()?p():f(N,fo)}let I=m(()=>r()?"opened":"");Wt(t,{get className(){return n(I)},testId:"settings-btn",click:x,get ariaLabel(){return h},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){D(y,T,!0)},children:(T,N)=>{var L=C0(),E=C(L);Kd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(L),b(T,L)},$$slots:{default:!0}}),F(),o()}var I0=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),E0=Ce("<path></path>");function na(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>ln(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=Ae(),d=ce(l);{var s=f=>{var p=I0();li(),b(f,p)},u=f=>{var p=E0();O(()=>Le(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
58
+ Audio: ${($e=n(s).audioCodec||"")!=null?$e:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),$(G,Pe)};V(ee,G=>{(n(s).videoCodec||n(s).audioCodec)&&G(_e)})}var we=P(ee,2);{var ve=G=>{var Pe=Iy(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(()=>me(xe,n(s).viewport)),$(G,Pe)};V(we,G=>{n(s).viewport&&G(ve)})}var ue=P(we,2);{var Qe=G=>{var Pe=Ey(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(()=>me(xe,n(s).videoSize)),$(G,Pe)};V(ue,G=>{n(s).videoSize&&G(Qe)})}var U=P(ue,2);{var O=G=>{var Pe=ky(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(()=>me(xe,n(s).cdn)),$(G,Pe)};V(U,G=>{n(s).cdn&&G(O)})}var Ge=P(U,2);{var K=G=>{var Pe=Py(),ke=P(C(Pe),2),xe=C(ke);S(ke),S(Pe),D(()=>{var Be;return me(xe,`${(Be=n(s).volume)!=null?Be:""} %`)}),$(G,Pe)};V(Ge,G=>{n(s).volume&&G(K)})}var ae=P(Ge,2);{var ye=G=>{var Pe=Ay(),ke=P(C(Pe),2),xe=C(ke);S(ke),S(Pe),D(Be=>me(xe,`${Be!=null?Be:""} s`),[()=>n(s).position.toFixed(2)]),$(G,Pe)};V(ae,G=>{n(s).position&&G(ye)})}var He=P(ae,2);{var it=G=>{var Pe=Ly(),ke=P(C(Pe),2),xe=C(ke);S(ke),S(Pe),D(Be=>me(xe,`${Be!=null?Be:""} s`),[()=>n(s).buffer.toFixed(2)]),$(G,Pe)};V(He,G=>{n(s).buffer&&G(it)})}var re=P(He,2);{var de=G=>{var Pe=My(),ke=P(C(Pe),2),xe=C(ke);S(ke),S(Pe),D(Be=>me(xe,`${Be!=null?Be:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),$(G,Pe)};V(re,G=>{n(s).nativeBuffer&&G(de)})}var Re=P(re,2);{var Ve=G=>{var Pe=Vy(),ke=P(C(Pe),2),xe=C(ke);S(ke),S(Pe),D(Be=>me(xe,`${Be!=null?Be:""} s`),[()=>n(s).liveLatency.toFixed(2)]),$(G,Pe)};V(Re,G=>{n(s).liveLatency&&G(Ve)})}var et=P(Re,2);{var Ee=G=>{var Pe=Ry(),ke=P(C(Pe),2),xe=C(ke,!0);S(ke),S(Pe),D(Be=>me(xe,Be),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Be})=>Be).map(({value:Be,title:$e})=>`${$e} ${((Be!=null?Be:0)/1e3).toFixed(2)} s`).join(" & ")]),$(G,Pe)};V(et,G=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&G(Ee)})}var Te=P(et,2),Fe=P(C(Te),2),kt=C(Fe);S(Fe),S(Te);var It=P(Te,2);{var Pt=G=>{var Pe=Ny(),ke=P(C(Pe),2);Hd(ke,{get values(){return n(I)}});var xe=P(ke,2),Be=C(xe);S(xe),S(Pe),D($e=>me(Be,`${$e!=null?$e:""} Kbps`),[()=>n(s).speed.toFixed(2)]),$(G,Pe)};V(It,G=>{n(s).speed&&G(Pt)})}var st=P(It,2);{var wt=G=>{var Pe=Dy(),ke=P(C(Pe),2);Hd(ke,{get values(){return n(T)}});var xe=P(ke,2),Be=C(xe);S(xe),S(Pe),D($e=>me(Be,`${$e!=null?$e:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),$(G,Pe)};V(st,G=>{n(s).bitrate&&G(wt)})}var jt=P(st,2),Ot=P(C(jt),2);Hd(Ot,{get values(){return n(w)}});var Nt=P(Ot,2),zt=C(Nt,!0);S(Nt),S(jt),S(Q),S(A),D(G=>{var Pe,ke;E=ne(A,1,"container s-k",null,E,G),Me(A,"aria-label",N),me(X,n(s).version),me(kt,`${(Pe=n(p))!=null?Pe:""} / ${(ke=n(f))!=null?ke:""} frames`),me(zt,n(v))},[()=>({"container-mobile":r()})]),$(t,A),H(),o()}Ye(["click"]);import{noop as Hy}from"@vkontakte/videoplayer-shared/es2018";var Fy=(t,e)=>{t.stopPropagation(),e()()},Uy=L('<div class="close s-1b"></div>'),zy={hash:"s-1b",code:'.close.s-1b{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1b:hover{opacity:1}.close.s-1b:after,.close.s-1b:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1b:before{transform:rotate(45deg)}.close.s-1b:after{transform:rotate(-45deg)}'};function Rs(t,e){B(e,!0),Y(t,zy);let i=h(e,"onClick",3,Hy);var o=Uy();o.__click=[Fy,i],$(t,o),H()}Ye(["click"]);import{noop as Ky}from"@vkontakte/videoplayer-shared/es2018";var an=t=>`width:${t}px;height:${t}px;`;var Wy=Ie('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function An(t,e){B(e,!0);let i=m(()=>an(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"play-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=Wy();$(o,a)},$$slots:{default:!0}}),H()}var qy=L('<div class="timer s-1a"><canvas class="timer-canvas s-1a" width="100" height="100"></canvas> <!></div>'),Qy={hash:"s-1a",code:".timer.s-1a{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-1a:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1a{height:50px;position:absolute;width:50px}"};function Ud(t,e){B(e,!0),Y(t,Qy);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,Ky),r=5e3,a=q(void 0),l,d,s=0,u;Oe(()=>{i()&&Tt(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let f=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{f(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Lt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),sn(()=>{f()});var v=qy(),_=C(v);Xe(_,b=>R(a,b),()=>n(a));var y=P(_,2);An(y,{get size(){return"24"}}),S(v),$(t,v),H()}var Gy=(t,e,i)=>{e(!1),i()},Yy=L('<div class="overlay s-z"></div> <div class="next-video s-z"><div class="top s-z"><div class="caption s-z"> </div> <!></div> <div class="row s-z"><div class="column s-z"><div class="thumb s-z"><div></div> <!></div></div> <div class="column s-z"><div class="title s-z"> </div></div></div></div>',1),jy={hash:"s-z",code:".overlay.s-z{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-z{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-z{display:flex;justify-content:space-between}.caption.s-z{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-z{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-z{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-z{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-z,.thumb-overlay.s-z{height:100%;width:100%}.thumb-overlay.s-z{position:absolute}.thumb-overlay.withOpacity.s-z{background:var(--black);opacity:.3}.title.s-z{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),Y(t,jy);let[i,o]=De(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=he(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},b=()=>{e.clickCloseIcon(),_()};Lt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ce(w);{var T=N=>{var A=Yy(),E=P(ce(A),2),k=C(E),Q=C(k),F=C(Q,!0);S(Q);var z=P(Q,2);Rs(z,{onClick:b}),S(k);var X=P(k,2);X.__click=[Gy,u,p];var se=C(X),Z=C(se),oe=C(Z);let J;var Ce=P(oe,2);{var pe=ve=>{let ue=m(()=>a()&&r());Ud(ve,{get isRunning(){return n(ue)},onTimerEnded:y})};V(Ce,ve=>{r()&&ve(pe)})}S(Z),S(se);var ee=P(se,2),_e=C(ee),we=C(_e,!0);S(_e),S(ee),S(X),S(E),D((ve,ue)=>{me(F,ve),Ke(Z,`background-image: url('${e.thumb}')`),J=ne(oe,1,"thumb-overlay s-z",null,J,ue),me(we,e.title)},[()=>j("end_screen_next_video"),()=>({withOpacity:r()})]),$(N,A)};V(I,N=>{e.isHide||N(T)})}$(t,w),H(),o()}Ye(["click"]);import{PlaybackState as Ba}from"@vkontakte/videoplayer-core/es2018";import{checkNever as Zy}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Gn}from"@vkontakte/videoplayer-statistics/es2018";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)},Ou=(t,e,i)=>{let o=Qf(e,i);e>0&&t.actions.internal.setVolume(o)};var aa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function Bu(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var Jy=(t,e)=>{e(t)},e0=L('<div class="keyboard-controls s-w" tabindex="-1" role="region"><!></div>'),t0={hash:"s-w",code:".keyboard-controls.s-w{bottom:0;left:0;position:absolute;right:0;top:0}"};function Gf(t,e){var xe,Be;B(e,!0),Y(t,t0);let[i,o]=De(),r=()=>x(Ce,"$disabledControls$",i),a=()=>x(it,"$isInteractiveTime$",i),l=()=>x(re,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(O,"$isEnded$",i),u=()=>x(Qe,"$doubleForwardAvailable$",i),f=()=>x(ue,"$doubleForwardOn$",i),p=()=>x(Ge,"$overlayContainer$",i),v=()=>x(se,"$adPlaybackState",i),_=()=>x(Z,"$positionExact$",i),y=()=>x(oe,"$duration$",i),b=()=>x(ye,"$isAudioAvailable$",i),w=()=>x(J,"$volume$",i),I=()=>x(X,"$canChangePlaybackSpeed$",i),T=()=>x(pe,"$muted$",i),N=()=>x(ee,"$currentSubtitle$",i),A=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),k=he(),Q=Mt(),F=k.getLogger().createComponentLog("KeyboardControls component"),z=k.state.playbackState$,X=k.state.canChangePlaybackSpeed$,se=k.ads.playbackState,Z=k.state.positionExact$,oe=k.state.duration$,J=k.state.volume$,Ce=k.ui.controls.disabledControls$,pe=k.state.muted$,ee=k.state.currentSubtitle$,_e=k.ui.contextMenu.openedByHotKey$,we=k.ui.contextMenu.lastActiveElem$,ve=k.ui.contextMenu.visible$,ue=k.ui.doubleForwardOn$,Qe=k.ui.doubleForwardAvailable$,U=k.ui.contextMenu.position$,O=k.state.isEnded$,Ge=k.ui.overlayContainer$,K=(xe=k.callbacks)==null?void 0:xe.onAudioDoesNotExistHint,ae=(Be=k.callbacks)==null?void 0:Be.onAudioDisabledHint,ye=k.state.isAudioAvailable$,He=k.state.isAudioDisabled,it=k.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:re}=vo(),de=0,Re=!0,Ve=q(void 0),et=$e=>($e!==Re&&(Re=$e,de=0),de+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*de)/1e3),Ee=!0,Te=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&re.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{k.actions.internal.togglePlay();let $e="PLAY";d()===Ba.PAUSED?$e="PAUSE":s()&&($e="REPLAY"),e.showHotKeyHelpers({type:$e})}},Fe=$e=>{if(!u()||!$e&&f()){Te(),e.stopDoubleForward(),Ee=!0;return}Ee=!1,!$e&&e.startDoubleForwardActivationTimer()},kt=()=>{Ee||(f()||Te(),e.stopDoubleForward(),Ee=!0)},It=$e=>{$e!=="Space"&&e.stopDoubleForward()},Pt=$e=>{let St=N_(p());U.set(St),we.set($e.target),_e.set(!0),ve.set(!0)},st=($e,St=!1)=>{var ui,Qi;let fe=$e.target,Ne=(ui=fe==null?void 0:fe.getAttribute("role"))==null?void 0:ui.includes("menuitem"),qe=fe.classList.contains("btn"),nt=$e.code;if(qe&&nt==="Space")return!1;let Wt=Lh.has(nt);if(Ne&&Wt)return!1;let Vt=!Ah.has(nt);if($e.ctrlKey&&Vt||$e.altKey&&Vt||$e.metaKey)return!1;let pi=Ne&&nt==="Escape";Mh.has(nt)||pi||e.hideContextMenu();let di=d()===Ba.PLAYING||d()===Ba.PAUSED,Ci=e.isAds&&(v()==="paused"||v()==="playing"),to=!Ci&&!r().has("TIMELINE"),ci=$e.shiftKey&&["Digit1","Numpad1"].includes(nt);if(!ci&&!(di||Ci))return!1;F({message:`key down, code: ${nt}, isExternal = ${St}`});let hi=!1,$t=()=>{hi=!0,St||$e.preventDefault()};if(It(nt),ci)return Pt($e),$t(),!0;switch(nt){case"KeyJ":case"ArrowLeft":{if(!to)break;if($e.ctrlKey||$e.altKey){let ct=k.actions.internal.getPrevEpisode();k.actions.internal.seekToPrevEpisode(ct),ct&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:ct.text}),$t()}else{let ct=$e.shiftKey?et(!1):Q.controls.seekStepKeyboard/1e3,Dt=Math.max(_()-ct,0);_()>0&&(k.actions.internal.seekTime(Dt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:ct.toString()}),$t())}break}case"KeyL":case"ArrowRight":{if(!to)break;if($e.ctrlKey||$e.altKey){let ct=k.actions.internal.getNextEpisode();k.actions.internal.seekToNextEpisode(ct),ct&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:ct.text}),$t()}else{let ct=$e.shiftKey?et(!0):Q.controls.seekStepKeyboard/1e3,Dt=Math.min(_()+ct,y());Math.round(_())<Math.round(y())&&(k.actions.internal.seekTime(Dt,Gn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:ct.toString()}),$t())}break}case"ArrowUp":{if(aa({isAudioDisabled:He,audioDisabledHintCallback:ae,isAudioAvailable:b(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let ct=w(),Dt=Q.controls.volumeStepKeyboard,at=ct<=1;if(Du(k,ct,Dt),at){let We=Math.round(qf(ct,Dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}$t();break}case"ArrowDown":{if(aa({isAudioDisabled:He,audioDisabledHintCallback:ae,isAudioAvailable:b(),audioIsNotExistHintCallback:K,isAds:e.isAds})){let ct=w(),Dt=Q.controls.volumeStepKeyboard,at=ct>=0;if(Ou(k,ct,Dt),at){let We=Math.round(Qf(ct,Dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:We}})}}$t();break}case"Comma":{if($e.shiftKey){if(!f()&&I()){let ct=k.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:ct==null?void 0:ct.displayValue}),$t()}}else{if(Ci||d()!==Ba.PAUSED)break;let ct=Math.max(_()-Q.controls.seekStepFrame/1e3,0);_()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime(ct,Gn.DOUBLE_TAP),$t())}break}case"Period":{if($e.shiftKey){if(!f()&&I()){let ct=k.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:ct==null?void 0:ct.displayValue}),$t()}}else{if(Ci||d()!==Ba.PAUSED)break;let ct=Math.min(_()+Q.controls.seekStepFrame/1e3,y());_()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),k.actions.internal.clearDelayedBufferingCheckTimeout(),k.actions.internal.seekTime(ct,Gn.DOUBLE_TAP),$t())}break}case"KeyK":Te(),$t();break;case"Space":Fe($e.repeat),$t();break;case"KeyM":{aa({isAudioDisabled:He,audioDisabledHintCallback:ae,isAudioAvailable:b(),audioIsNotExistHintCallback:K,isAds:e.isAds})&&(e.showHotKeyHelpers({type:T()?"VOLUME":"MUTE"}),k.actions.internal.toggleMuted()),$t();break}case"KeyF":e.toggleFullscreen(),$t();break;case"KeyC":k.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(Qi=N())==null?void 0:Qi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),$t();break;case"KeyI":k.actions.internal.togglePictureInPicture(),$t();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.1,Gn.DOUBLE_TAP),$t();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.2,Gn.DOUBLE_TAP),$t();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.3,Gn.DOUBLE_TAP),$t();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.4,Gn.DOUBLE_TAP),$t();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.5,Gn.DOUBLE_TAP),$t();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.6,Gn.DOUBLE_TAP),$t();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.7,Gn.DOUBLE_TAP),$t();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.8,Gn.DOUBLE_TAP),$t();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(.9,Gn.DOUBLE_TAP),$t();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),k.actions.internal.seekToPercent(0,Gn.DOUBLE_TAP),$t();break;case"Slash":{$e.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),$t());break}case"KeyN":$e.shiftKey&&A()&&(k.actions.internal.nextVideoClick(),$t());break;case"KeyP":$e.shiftKey&&E()&&(k.actions.internal.prevVideoClick(),$t());break;case"ShiftLeft":case"ShiftRight":$t();break;case"Tab":case"Escape":case"Enter":break;default:Zy(nt);break}return hi},wt=$e=>{let St=$e.code;if($e.ctrlKey||$e.altKey||$e.metaKey)return;let fe=d()===Ba.PLAYING||d()===Ba.PAUSED,Ne=e.isAds&&(v()==="paused"||v()==="playing");if(fe||Ne)switch(St){case"ShiftLeft":case"ShiftRight":de=0;break;case"Space":kt();break}},jt=j("aria_label_video_player"),Ot=()=>{var $e;return($e=n(Ve))==null?void 0:$e.focus()},Nt=()=>n(Ve)===Bu(),zt=$e=>$e.type==="keydown"?st($e,!0):($e.type==="keyup"&&wt($e),!1);var G=e0();G.__keyup=wt,G.__keydown=[Jy,st];var Pe=C(G);ei(Pe,()=>{var $e;return($e=e.children)!=null?$e:vt}),S(G),Xe(G,$e=>R(Ve,$e),()=>n(Ve)),D(()=>Me(G,"aria-label",jt)),$(t,G);var ke=H({focus:Ot,isFocused:Nt,handleExternalKeyboardEvent:zt});return o(),ke}Ye(["keyup","keydown"]);var i0=L('<div class="container s-j"><div class="dot s-j"></div> <div class="dot s-j"></div> <div class="dot s-j"></div></div>'),o0={hash:"s-j",code:".container.s-j{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-j:first-child{animation-delay:0s}.dot.s-j:nth-child(2){animation-delay:.18s}.dot.s-j:nth-child(3){animation-delay:.36s}@keyframes s-j-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-j{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-j-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-j+.dot:where(.s-j){margin-left:4px}"};function Ha(t,e){Y(t,o0);let i=h(e,"style",3,"");var o=i0();D(()=>Ke(o,i())),$(t,o)}var n0=Ie('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function Yf(t,e){Ze(t,{get fill(){return e.fill},children:(i,o)=>{var r=n0();$(i,r)},$$slots:{default:!0}})}import{noop as Dl}from"@vkontakte/videoplayer-shared/es2018";var r0=t=>{t.stopPropagation()},s0=L("<button><!></button>"),a0={hash:"s-1o",code:"button.btn.s-1o{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1o{width:100%}button.btn--live.s-1o{padding:10px 4px}button.btn-jc-l.s-1o{justify-content:left}button.btn-m.s-1o{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1o,button.btn-m--play.s-1o{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1o{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1o,button.btn-m--prev.s-1o{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1o{right:calc(100% + 35px)}button.btn-m--next.s-1o{left:calc(100% + 35px)}button.btn.s-1o:disabled{cursor:default;pointer-events:none}button.btn.s-1o:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1o:not(:disabled):hover{opacity:.8}button.pr-0.s-1o{padding-right:0}button.pl-0.s-1o{padding-left:0}"};function Ut(t,e){B(e,!0),Y(t,a0);let i=h(e,"className",3,""),o=h(e,"style",3,""),r=h(e,"disabled",3,void 0),a=h(e,"testId",3,void 0),l=h(e,"ariaHidden",3,void 0),d=h(e,"ariaLabel",3,void 0),s=h(e,"ref",15,void 0),u=h(e,"ariaKeyShortCut",3,void 0),f=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),v=h(e,"click",3,Dl),_=h(e,"focus",3,Dl),y=h(e,"blur",3,Dl),b=m(()=>v()===Dl?null:A=>{A.stopPropagation(),v()(A)}),w=m(()=>_()===Dl?null:A=>{A.preventDefault(),_()()}),I=m(()=>y()===Dl?null:A=>{A.preventDefault(),y()()});var T=s0();T.__pointerdown=[r0],T.__click=function(...A){var E;(E=n(b))==null||E.apply(this,A)};var N=C(T);ei(N,()=>{var A;return(A=e.children)!=null?A:vt}),S(T),Xe(T,A=>s(A),()=>s()),D(()=>{var A,E,k,Q,F,z,X,se;ne(T,1,`btn ${(A=i())!=null?A:""}`,"s-1o"),Ke(T,o()||null),T.disabled=(E=r())!=null?E:null,Me(T,"aria-hidden",(k=l())!=null?k:null),Me(T,"aria-label",(Q=d())!=null?Q:null),Me(T,"aria-keyshortcuts",(F=u())!=null?F:null),Me(T,"aria-expanded",(z=f())!=null?z:null),Me(T,"data-testid",(X=a())!=null?X:null),Me(T,"tabindex",p()),Me(T,"role",e.role),Me(T,"aria-checked",(se=e.areaChecked)!=null?se:null)}),dt("focus",T,function(...A){var E;(E=n(w))==null||E.apply(this,A)}),dt("blur",T,function(...A){var E;(E=n(I))==null||E.apply(this,A)}),$(t,T),H()}Ye(["pointerdown","click"]);var l0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},d0=L('<div class="modal-header s-1g"><h3 class="modal-title s-1g"> </h3> <!></div>'),c0=L('<div class="modal-overlay s-1g"><div class="modal-container s-1g" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-1g" tabindex="0" role="scrollbar"><div class="modal-main s-1g"><!></div></div></div></div>'),u0={hash:"s-1g",code:'.modal-overlay.s-1g{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-1g{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-1g{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-1g{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-1g{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-1g::-webkit-scrollbar{width:8px}.modal-scroll.s-1g::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-1g::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-1g::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-1g{margin:-8px -4px 0 0}'};function jf(t,e){B(e,!0),Y(t,u0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=q(void 0),a=q(void 0),{webApi:{focusManager:l}}=he(),d=j("hotkey_map_modal_close_btn_text");Lt(()=>{var b;return(b=n(r))==null||b.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=c0();s.__keydown=[l0,e];var u=C(s),f=C(u);{var p=b=>{var w=d0(),I=C(w),T=C(I,!0);S(I);var N=P(I,2);{var A=E=>{Ut(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(k,Q)=>{Yf(k,{fill:"currentColor"})},$$slots:{default:!0}})};V(N,E=>{o()&&E(A)})}S(w),D(()=>me(T,e.title)),$(b,w)};V(f,b=>{i()&&b(p)})}var v=P(f,2),_=C(v),y=C(_);ei(y,()=>{var b;return(b=e.children)!=null?b:vt}),S(_),S(v),Xe(v,b=>R(r,b),()=>n(r)),S(u),Xe(u,b=>R(a,b),()=>n(a)),S(s),$(t,s),H()}Ye(["keydown"]);var p0=new Set(["BR"]),B_=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;p0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var f0=L('<li class="hot-key-map-item s-13"><span class="hot-key-map-item-description s-13"><!></span> &nbsp; <span class="hot-key-map-item-value s-13"> </span></li>'),m0=L('<div class="hot-key-map-group s-13"><h5 class="hot-key-map-group-title s-13"> </h5> <ul class="hot-key-map-group-items s-13"></ul></div>'),v0=L('<div class="hot-key-map s-13"></div>'),g0={hash:"s-13",code:'.hot-key-map.s-13{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-13{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-13:last-child{border-bottom:none}.hot-key-map-group-title.s-13{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-13,.hot-key-map-item.s-13{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-13{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-13{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-13{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-13{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-13,.hot-key-map-item-value.s-13{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),Y(t,g0);let[i,o]=De(),r=()=>x(l,"$data",i),a=he(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};mo(),jf(t,{get title(){return r().title},onClose:s,children:(u,f)=>{var p=v0();_i(p,5,()=>r().groups,({title:v,items:_})=>v,(v,_)=>{let y=()=>n(_).title,b=()=>n(_).items;var w=m0(),I=C(w),T=C(I,!0);S(I);var N=P(I,2);_i(N,5,b,({description:A,value:E})=>E,(A,E)=>{let k=()=>n(E).description,Q=()=>n(E).value;var F=f0(),z=C(F),X=C(z);$d(X,()=>B_(k())),S(z);var se=P(z,2),Z=C(se,!0);S(se),S(F),D(()=>me(Z,Q())),$(A,F)}),S(N),S(w),D(()=>me(T,y())),$(v,w)}),S(p),$(u,p)},$$slots:{default:!0}}),H(),o()}import{noop as pb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as sb,PlaybackState as Bm}from"@vkontakte/videoplayer-core/es2018";import{getVideoQualityLabel as T0}from"@vkontakte/videoplayer-shared/es2018";var h0=L('<div class="pillow s-1y"><!></div>'),_0={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){Y(t,_0);var i=h0(),o=C(i);ei(o,()=>{var r;return(r=e.children)!=null?r:vt}),S(i),D(()=>Me(i,"data-testid",e.testId)),$(t,i)}import{VideoQuality as zd}from"@vkontakte/videoplayer-shared/es2018";var b0=Ie('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Jf(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=b0();Zi(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(),S(o),$(t,o)}var $0=Ie('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function em(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=$0();Zi(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(),S(o),$(t,o)}var y0=Ie('<svg><!><path d="M5.52 5h1.1C8.1 5 9 4.07 9 2.5S8.1 0 6.62 0h-1.1C5.19 0 5 .2 5 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47C7.41.85 8 1.47 8 2.5c0 1.07-.58 1.65-1.5 1.65zM.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S4 4.8 4 4.46V.54C4 .2 3.8 0 3.48 0s-.51.2-.51.54v1.53H1.03V.54C1.03.2.84 0 .52 0S0 .2 0 .54v3.99c0 .34.2.47.52.47"></path></svg>');function tm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=y0();Zi(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(),S(o),$(t,o)}var x0=Ie('<svg><!><path d="M9.52 5h1.1C12.1 5 13 4.07 13 2.5S12.1 0 10.62 0h-1.1C9.19 0 9 .2 9 .54v3.92c0 .34.2.54.52.54m.51-.85V.85h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zM4.52 5c.32 0 .51-.2.51-.54V2.92h1.94v1.54c0 .34.19.54.51.54S8 4.8 8 4.46V.54C8 .2 7.8 0 7.48 0s-.51.2-.51.54v1.53H5.03V.54C5.03.2 4.84 0 4.52 0S4 .2 4 .54v3.99c0 .34.2.47.52.47m-4 0c.32 0 .51-.2.51-.54V3h1.33c.27 0 .45-.15.45-.41 0-.25-.18-.4-.45-.4H1.03V.84h1.5C2.81.85 3 .7 3 .43S2.8 0 2.53 0H.52C.19 0 0 .2 0 .54v3.92C0 4.8.2 5 .52 5"></path></svg>');function im(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=x0();Zi(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(),S(o),$(t,o)}var w0=Ie('<svg><!><path d="M11.52 5.75h1.1c1.48 0 2.38-.94 2.38-2.5s-.9-2.5-2.38-2.5h-1.1c-.33 0-.52.2-.52.54V5.2c0 .34.2.54.52.54Zm.51-.85V1.6h.47c.91 0 1.5.62 1.5 1.65 0 1.07-.58 1.65-1.5 1.65zm-5.51.85c.32 0 .51-.2.51-.54V3.67h1.94v1.54c0 .34.19.54.51.54s.52-.2.52-.54V1.3c0-.34-.2-.54-.52-.54s-.51.2-.51.54v1.53H7.03V1.3c0-.34-.19-.54-.51-.54S6 .95 6 1.29v3.99c0 .34.2.47.52.47m-3.18-.09a4 4 0 0 1-.84.09C1.04 5.75 0 4.88 0 3.3 0 1.73 1.04.75 2.5.75S5 1.73 5 3.3c0 .87-.27 1.46-.78 1.88l.2.3a.5.5 0 0 1-.84.55zm-.52-.78-.24-.35a.5.5 0 1 1 .84-.56l.24.37c.18-.26.29-.62.29-1.04 0-1.03-.64-1.65-1.45-1.65s-1.45.62-1.45 1.65.64 1.6 1.45 1.6c.08 0 .2 0 .32-.02"></path></svg>');function om(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=w0();Zi(o,()=>({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img",...i}));var r=C(o);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(),S(o),$(t,o)}var Hu=t=>{switch(t){case zd.Q_720P:return tm;case zd.Q_1080P:return im;case zd.Q_1440P:return om;case zd.Q_2160P:return Jf;case zd.Q_4320P:return em}};var S0=Ie('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function nm(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=S0();$(i,r)},$$slots:{default:!0}})}var C0=Ie('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function rm(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=C0();$(i,r)},$$slots:{default:!0}})}var I0=L('<div aria-hidden="true"><!> <!></div>'),E0={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 Wd(t,e){B(e,!0),Y(t,E0);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=m(()=>o()?T0(o()):""),a=m(()=>Hu(o())),l=m(()=>n(r).length>2);var d=Le(),s=ce(d);{var u=p=>{nm(p,{testId:"settings-mobile-icon"})},f=p=>{var v=I0();let _;var y=C(v);{var b=T=>{let N=m(()=>`${n(r)}-pill-icon`);Zf(T,{get testId(){return n(N)},children:(A,E)=>{var k=Le(),Q=ce(k);Mi(Q,()=>n(a),(F,z)=>{z(F,{})}),$(A,k)},$$slots:{default:!0}})};V(y,T=>{n(a)&&T(b)})}var w=P(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");rm(w,{get testId(){return n(I)}}),S(v),D(T=>_=ne(v,1,"icon s-1v",null,_,T),[()=>({triple:n(l)})]),$(p,v)};V(s,p=>{i()?p(u):p(f,!1)})}$(t,d),H()}var k0=L('<span class="settings-icon-wrapper s-20"><!></span>'),P0={hash:"s-20",code:".settings-icon-wrapper.s-20{position:relative;width:24px}"};function Ol(t,e){B(e,!0),Y(t,P0);let[i,o]=De(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=he(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,_=d.ui.t,y=q(void 0);Oe(()=>{n(y)&&Tt(()=>{e.ref$.set(n(y))})});let b=_("aria_label_settings");async function w(T){let N=sa(T);r()?p():f(N,uo)}let I=m(()=>r()?"opened":"");Ut(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return b},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(T){R(y,T,!0)},children:(T,N)=>{var A=k0(),E=C(A);Wd(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(A),$(T,A)},$$slots:{default:!0}}),H(),o()}var A0=Ie('<path d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.09 3.09a11 11 0 0 0-2.39 3.08 11 11 0 0 0-1.01 4.14C4 18.43 4 20.37 4 22.83v2.34c0 2.46 0 4.4.13 5.96.13 1.6.4 2.93 1.01 4.14a10.5 10.5 0 0 0 4.6 4.59c1.2.61 2.53.88 4.13 1.01 1.56.13 3.5.13 5.96.13h8.34c2.46 0 4.4 0 5.96-.13 1.44-.12 2.66-.35 3.78-.84l3.53 3.53a1.5 1.5 0 0 0 2.12-2.12zM13.5 28a1.5 1.5 0 0 0 0 3h11a1.5 1.5 0 0 0 0-3zM12 22a1.5 1.5 0 0 1 1.5-1.5h4a1.5 1.5 0 0 1 0 3h-4A1.5 1.5 0 0 1 12 22"></path><path d="M34.5 23.5h-4.64l12.55 12.55q.23-.37.45-.78a11 11 0 0 0 1.01-4.14c.13-1.56.13-3.5.13-5.96v-2.34c0-2.46 0-4.4-.13-5.96a11 11 0 0 0-1.01-4.14 10.5 10.5 0 0 0-4.6-4.59 11 11 0 0 0-4.13-1.01C32.57 7 30.63 7 28.17 7h-8.34c-2.46 0-4.4 0-5.96.13l-.35.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path>',1),L0=Ie("<path></path>");function la(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>an(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(i)},get shadow(){return e.shadow},children:(r,a)=>{var l=Le(),d=ce(l);{var s=f=>{var p=A0();ai(),$(f,p)},u=f=>{var p=L0();D(()=>Me(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
59
59
  ${e.type==="outline"?"M12.54 11.68c-1.04.1-1.64.26-2.1.48a5.2 5.2 90 00-2.28 2.28c-.22.46-.4 1.06-.48 2.1-.08 1.08-.08 2.46-.08 4.46v6c0 2 0 3.38.08 4.46.1 1.04.26 1.64.48 2.1q.78 1.5 2.28 2.28c.46.22 1.06.4 2.1.48 1.08.08 2.48.08 4.46.08h14c2 0 3.38 0 4.46-.08 1.04-.1 1.64-.26 2.1-.48a5.2 5.2 90 002.28-2.28c.22-.46.4-1.06.48-2.1.08-1.08.08-2.48.08-4.46v-6c0-2 0-3.38-.08-4.46a6 6 90 00-.48-2.1 5.2 5.2 90 00-2.28-2.28c-.46-.22-1.06-.4-2.1-.48-1.08-.08-2.48-.08-4.46-.08h-14c-2 0-3.38 0-4.46.08":""}
60
- M12 29.8c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6H13.8a1.8 1.8 90 01-1.8-1.8m0-7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6H13.8a1.8 1.8 90 01-1.8-1.8m17 7.6c0-1 .8-1.8 1.8-1.8h3.4a1.8 1.8 90 110 3.6h-3.4a1.8 1.8 90 01-1.8-1.8M22 22.2c0-1 .8-1.8 1.8-1.8h10.4a1.8 1.8 90 010 3.6h-10.4a1.8 1.8 90 01-1.8-1.8`)),b(f,p)};R(d,f=>{e.type==="off"?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function om(t,e){B(e,!0);let i=g(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Wt(t,{testId:"subtitles-btn",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");na(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var k0=M('<span class="duration s-21" data-testid="video_duration"> </span>'),P0=M('<div><span class="current s-21" data-testid="current_time"> </span> <!></div>'),A0={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 qd(t,e){B(e,!0),Q(t,A0);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=At(),d=de(!1),s=m(()=>Yo(e.duration)),u=m(()=>Yo(e.position));var f=P0();let p;var v=C(f),$=C(v,!0);S(v);var y=A(v,2);{var h=x=>{var I=k0(),T=C(I,!0);S(I),O(()=>me(T,n(s))),b(x,I)};R(y,x=>{r()&&x(h)})}S(f),ks(f,()=>Pl(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),je(f,x=>a(x),()=>a()),O(x=>{p=se(f,1,"time s-21",null,p,x),me($,n(u))},[()=>({mobile:i()})]),b(t,f),F()}import{noop as Fu}from"@vkontakte/videoplayer-shared/es2018";var L0=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),M0=Ce("<path></path>"),V0=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 ra(t,e){B(e,!0);let i=g(e,"volume",3,1),o=g(e,"muted",3,!1),r=(u,f)=>f?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>ln(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,f)=>{var p=V0(),v=A(ce(p));{var $=h=>{var x=L0();li(),b(h,x)},y=h=>{var x=M0();O(()=>Le(x,"d",`${d}${n(a)==="max"?s:""}`)),b(h,x)};R(v,h=>{n(a)==="off"?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}import{isNonNullable as O_,noop as Qn}from"@vkontakte/videoplayer-shared/es2018";import{noop as rm}from"@vkontakte/videoplayer-shared/es2018";import{noop as N0}from"@vkontakte/videoplayer-shared/es2018";var R0=M('<div class="overlay"><!></div>');function nm(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Ne(()=>{u(r())}),Pt(()=>(u(r()),()=>s(r())));var f=R0(),p=C(f);ti(p,()=>{var v;return(v=e.children)!=null?v:mt}),S(f),je(f,v=>D(d,v),()=>n(d)),b(t,f),F(),o()}var D0=M('<div class="tooltip s-1m"><div class="content s-1m"> </div> <div class="tooltip-pointer s-1m"></div></div>'),O0=M("<div><!></div> <!>",1),B0={hash:"s-1m",code:'.tooltip-wrapper.s-1m{display:flex;flex-direction:column;min-width:0}.full-width.s-1m{width:100%}.tooltip.s-1m{bottom:100%;left:0;opacity:0;position:absolute;transition:opacity .2s,visibility .2s;visibility:hidden}.content.s-1m{background-color:rgba(41,41,41,.8);border-radius:3px;color:var(--white);display:inline-block;padding:6px 10px}.tooltip-pointer.s-1m{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 Ba(t,e){B(e,!0),Q(t,B0);let[i,o]=Ve(),r=()=>w(j,"$overlayContainer$",i),a=()=>w(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),f=g(e,"translateY",3,0),p=g(e,"isFullWidthWrapper",3,!1),v=g(e,"maxTooltipWidth",3,void 0),$=g(e,"placement",3,"top"),y=g(e,"onVisibilityChange",3,N0),h=5,x=K(void 0),I=K(void 0),T,N=K(0),L=K(0),E=K(0),k=K(0),q=At(),H=ve(),z=H.ui.playerSize,j=H.ui.overlayContainer$;Ne(()=>{St(()=>{y()(s())})});let ae=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(I)||!n(x))return;D(L,h);let U=r().getBoundingClientRect(),Pe=n(x).getBoundingClientRect(),ke=Pe.width,Ue=n(I).clientWidth,et=a().width,ye=(ke-Ue)/2,Ie=Pe.left+u()-U.left,Be=Ie+ye,Vt=Pe.top+f()-U.top,pt=Ue/2-h,Dt=Be<8,at=Be+Ue>et-8;Dt&&(Be=8,pt=Ie+Pe.width/2-2.5*h),at&&(Be=et-8-Ue,pt=Pe.left-U.left+Pe.width/2-Be-h),D(E,Be,!0),D(k,Vt),D(N,pt,!0)},ne=()=>{!r()||!n(I)||!n(x)||D(L,-h)},J=()=>{if(!r()||!n(I)||!n(x))return;D(N,h);let U=r().getBoundingClientRect(),Pe=n(x).getBoundingClientRect(),ke=Pe.height,Ue=n(I).clientHeight,et=(ke-Ue)/2+Ue,ye=Pe.left+u()-U.left-n(I).clientWidth,Ie=2,Be=ye-h;Be<8&&(Be=8);let pt=Pe.top+f()-U.top+et,Dt=Ie-et/2,at=Ie-h;D(E,Be,!0),D(k,pt),D(L,Dt),D(N,at)},we=()=>{!r()||!n(I)||!n(x)||D(N,-h)},pe=()=>{switch($()){case"top":X();break;case"bottom":ne();break;case"left":J();break;default:we()}},re=()=>{try{if(!r()||!n(x))return;pe(),s(!0)}catch(U){ae({message:String(U)})}},_e=()=>{s(!1)},$e=()=>{n(I)&&(T||(T=window.setTimeout(re,q.controls.hideTimeoutTooltips)),s()&&re())},ee=()=>{_e(),window.clearTimeout(T),T=void 0},Re=(U,Pe,ke)=>{let Ue="";switch($()){case"top":Ue=`transform: translate(${U}px, ${Pe}px);`;break;case"bottom":Ue=`transform: translate(${U}px, ${Pe}px); top: auto; bottom: 100%;`;break;case"left":Ue=`transform: translate(${U}px, ${Pe}px); left: 0; right: auto;`;break;default:Ue=`transform: translate(${U}px, ${Pe}px);`}return Ue+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ue+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,Ue},fe=(U,Pe)=>{let ke="";switch($()){case"top":ke=`transform: translate(${U}px, ${Pe}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":ke=`transform: translate(${U}px, ${Pe}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":ke=`transform: translate(${U}px, ${Pe}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:ke=`transform: translate(${U}px, ${Pe}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return ke},P=m(()=>Re(n(E),n(k),s())),We=m(()=>fe(n(N),n(L)));Pt(pe),an(()=>window.clearTimeout(T));var Te=O0(),Z=ce(Te);let ie;Z.__pointermove=$e,Z.__pointerdown=ee,Z.__pointerup=function(...U){var Pe;(Pe=e.disableMouseupTooltipShow?void 0:$e)==null||Pe.apply(this,U)};var De=C(Z);ti(De,()=>{var U;return(U=e.children)!=null?U:mt}),S(Z),je(Z,U=>D(x,U),()=>n(x));var Oe=A(Z,2);{var tt=U=>{nm(U,{children:(Pe,ke)=>{var Ue=D0(),et=C(Ue),ye=C(et,!0);S(et);var Ie=A(et,2);S(Ue),je(Ue,Be=>D(I,Be),()=>n(I)),O(()=>{qe(Ue,n(P)),me(ye,d()),qe(Ie,n(We))}),b(Pe,Ue)},$$slots:{default:!0}})};R(Oe,U=>{d()&&!l()&&U(tt)})}O(U=>ie=se(Z,1,"tooltip-wrapper s-1m",null,ie,U),[()=>({"full-width":p()})]),st("pointerenter",Z,$e),st("pointerleave",Z,ee),b(t,Te),F(),o()}Ge(["pointermove","pointerdown","pointerup"]);var D_=t=>{t.stopPropagation()},F0=M("<div><!></div>"),H0={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 Po(t,e){B(e,!0),Q(t,H0);let[i,o]=Ve(),r=()=>w(u,"$isGraphOpened$",i),a=()=>w(s,"$isMobile",i),l=ve(),d=$o(),s=l.ui.isMobile,u=d.graphIsOpened$,f=l.ui.t,p=g(e,"className",3,""),v=g(e,"disabled",3,!1),$=g(e,"hasTooltip",3,!0),y=g(e,"ref",15,void 0),h=g(e,"width",15,void 0),x=g(e,"isFullWidthTooltip",3,!0),I=g(e,"tooltipContent",3,""),T=g(e,"tooltipVisible",3,!1),N=g(e,"tooltipPlacement",3,"top"),L=g(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),E=g(e,"isAriaHidden",3,!1),k=g(e,"onTooltipVisibilityChange",3,rm),q=g(e,"initialTranslateXPx",3,0),H=g(e,"initialTranslateYPx",19,()=>-18),z=g(e,"mouseEnter",3,rm),j=g(e,"mouseLeave",3,rm),ae=m(()=>v()?r()?f("tooltip_disabled_when_graph_on"):L():I()),X=K(!1);Ne(()=>{T()||D(X,!1)});var ne=F0();ne.__pointerdown=[D_],ne.__click=[D_];var J=C(ne);{var we=re=>{Ba(re,{get content(){return n(ae)},get translateX(){return q()},get translateY(){return H()},get isFullWidthWrapper(){return x()},get placement(){return N()},get onVisibilityChange(){return k()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){D(X,_e,!0)},children:(_e,$e)=>{var ee=Ae(),Re=ce(ee);ti(Re,()=>{var fe;return(fe=e.children)!=null?fe:mt}),b(_e,ee)},$$slots:{default:!0}})},pe=re=>{var _e=Ae(),$e=ce(_e);ti($e,()=>{var ee;return(ee=e.children)!=null?ee:mt}),b(re,_e)};R(J,re=>{$()&&n(ae)&&!a()?re(we):re(pe,!1)})}S(ne),je(ne,re=>y(re),()=>y()),O(()=>{var re;se(ne,1,`btn-container ${(re=p())!=null?re:""}`,"s-18"),Le(ne,"aria-hidden",E()||null)}),st("mouseenter",ne,function(...re){var _e;(_e=z())==null||_e.apply(this,re)}),st("mouseleave",ne,function(...re){var _e;(_e=j())==null||_e.apply(this,re)}),Tn(ne,"clientWidth",h),b(t,ne),F(),o()}Ge(["pointerdown","click"]);var U0=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 Qd(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=U0(),l=ce(a),d=A(l);O(()=>{Le(l,"fill",Zs),Le(l,"fill-opacity",e.completed?1:.24),Le(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var z0=M("<div><!></div>"),W0={hash:"s-w",code:".interactive-episode-icon.s-w{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-w{opacity:.4;pointer-events:none}"};function sm(t,e){B(e,!0),Q(t,W0);let o=ve().ui.t,r=K(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Po(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 f=C(s);let p=m(()=>!!e.videoEpisode.completed);Qd(f,{get completed(){return n(p)}}),S(s),O(v=>{u=se(s,1,"interactive-episode-icon s-w",null,u,v),qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Tn(s,"clientWidth",v=>D(r,v)),b(l,s)},$$slots:{default:!0}}),F()}var K0=M('<div><div class="video-episode-inner s-x"><div class="video-episode-loaded s-x"></div> <div></div></div></div>'),q0=M('<div class="video-episodes-wrap s-x"></div>'),Q0={hash:"s-x",code:".video-episodes-wrap.s-x{height:100%;position:absolute;width:100%}.video-episode.s-x{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-x:first-child{padding-left:0}.video-episode.s-x:last-child{padding-right:0}.video-episode.s-x:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-x,.video-episode-inner.s-x,.video-episode-loaded.s-x{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-x{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-x:first-child .video-episode-inner:where(.s-x),.video-episode.s-x:last-child .video-episode-inner:where(.s-x){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-x{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-x,.video-episode-loaded.s-x{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-x{background-color:var(--slider-filled-bg)}"};function am(t,e){Q(t,Q0);let i=g(e,"videoEpisodes",19,()=>[]);var o=q0();hi(o,21,i,r=>r.from,(r,a)=>{var l=K0();let d;var s=C(l),u=C(s),f=A(u,2);let p;S(s),S(l),O((v,$)=>{d=se(l,1,"video-episode s-x",null,d,v),qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(f,1,"video-episode-filled s-x",null,p,$),qe(f,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function G0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&D(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;D(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function Y0(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 j0(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;D(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function X0(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function Z0(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),D(r,!1),a()(l)}var J0=M("<div></div>"),ex=M('<div class="bars s-s"><div class="loaded s-s"></div> <div></div></div>'),tx=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),ix={hash:"s-s",code:'.interactive-icons.s-s{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-s{top:-10px}.slider.s-s{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-s{cursor:default}.slider.s-s: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-s{background:var(--slider-bg);overflow:hidden}.bars.s-s,.loaded.s-s{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-s{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-s{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-s,.slider.square.s-s .filled:where(.s-s),.slider.square.s-s .loaded:where(.s-s),.slider.square.s-s>.bars:where(.s-s){border-radius:unset}.filled.active-live.s-s{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-s{background-color:var(--slider-filled-ads)}.handleWrap.s-s{left:-100%;position:absolute;width:100%}.handle.s-s{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-s{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-s .handle:where(.s-s),.slider-dragging.s-s .handle:where(.s-s),.slider.s-s:hover .handle:where(.s-s){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-s .handle:where(.s-s){transform:scale(1.3)}.slider-vertical.s-s{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-s{cursor:default;opacity:.4}'};function Fa(t,e){B(e,!0),Q(t,ix);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),f=g(e,"videoEpisodes",19,()=>[]),p=g(e,"withWheelHandler",3,!1),v=g(e,"isInteractive",3,!1),$=g(e,"disabled",3,!1),y=g(e,"hideHandel",3,!1),h=g(e,"onPointerDown",3,Qn),x=g(e,"onHandleMove",3,Qn),I=g(e,"onPointerUp",3,Qn),T=g(e,"onPointerEnter",3,Qn),N=g(e,"onPointerMove",3,Qn),L=g(e,"onPointerLeave",3,Qn),E=g(e,"onMouseEnter",3,Qn),k=g(e,"onMouseLeave",3,Qn),q=g(e,"onWheelUp",3,Qn),H=g(e,"onWheelDown",3,Qn),z=g(e,"onWheelLeft",3,Qn),j=g(e,"onWheelRight",3,Qn),ae=g(e,"onDisabledClick",3,Qn),X=g(e,"loadedProgress",3,0),ne=g(e,"filledProgress",3,0),J=g(e,"handleProgress",3,0),we=g(e,"ariaLabel",3,""),pe=g(e,"ariaValueMin",3,void 0),re=g(e,"ariaValueMax",3,void 0),_e=g(e,"ariaValueNow",3,void 0),$e=g(e,"ariaValueText",3,""),ee=g(e,"onContextMenu",3,Qn),Re=g(e,"handleAlwaysVisible",3,!1),fe=At(),P=K(void 0),We=K(!1),Te=m(()=>{var he;return(he=re())!=null?he:0}),Z=m(()=>{var he;return O_(f())&&((he=f()[f().length-1])==null?void 0:he.time)<n(Te)}),ie=m(()=>O_(f())&&f().length&&n(Z)&&n(Te)?et(X()*100,ne()*100):[]);function De(he){if(he.preventDefault(),i()&&D(P,i().getBoundingClientRect(),!0),$())return;let Me=ke(he.clientX,he.clientY),nt=Ue(he.clientX);T()(Me,nt,n(P).width)}function Oe(he){he.preventDefault(),!$()&&L()()}function tt(){E()()}function U(){k()()}function Pe(he){$()||p()&&(he.preventDefault(),he.deltaY<0?q()():he.deltaY>0?H()():he.deltaX>0?j()():z()())}function ke(he,Me){return l()?Math.max(0,Math.min(1,(n(P).height-(Me-n(P).top))/n(P).height)):Math.min(Math.max(he-n(P).x,0),n(P).width)/n(P).width}function Ue(he){return Math.min(Math.max(he-n(P).x,0),n(P).width)}function et(he,Me){let nt=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,ut=[],ue=f()[0].time/n(Te)*100,ze=0,Qe=0;for(let Ft=1;Ft<f().length;Ft++)ze=f()[Ft].time/n(Te)*100,ze-ue>nt&&(ut.push({from:ue,width:Math.max(0,ze-ue),loadedWidth:Math.max(0,Math.min(ze,he)-ue),filledWidth:Math.max(0,Math.min(ze,Me)-ue),interactive:f()[Ft-1].interactive,completed:f()[Ft-1].completed}),ue=f()[Ft].time/n(Te)*100,Qe++);let lt={from:ue,width:Math.max(0,100-ue),loadedWidth:Math.max(0,Math.min(he,100)-ue),filledWidth:Math.max(0,Math.min(Me,100)-ue),interactive:f()[Qe].interactive,completed:f()[Qe].completed};100-ue<nt?(Qe-=1,ut[Qe].width+=100-ue,ut[Qe].loadedWidth+=Math.max(0,Math.min(he,100)-ue),ut[Qe].filledWidth+=Math.max(0,Math.min(Me,100)-ue)):ut[Qe]=lt;let Bt=f()[0].time;if(Bt!==0){let Ft=Bt/n(Te)*100;ut.unshift({from:0,width:Ft,loadedWidth:Math.min(Ft,he),filledWidth:Math.min(Ft,Me)})}return ut}function ye(he){return Math.max(0,Math.min(100,he*100))}let Ie=m(()=>ye(X())),Be=m(()=>ye(ne()));var Vt=tx(),pt=ce(Vt);{var Dt=he=>{var Me=J0();let nt;hi(Me,21,()=>n(ie),ut=>ut.from,(ut,ue)=>{var ze=Ae(),Qe=ce(ze);{var lt=Bt=>{sm(Bt,{get videoEpisode(){return n(ue)},get disabled(){return $()}})};R(Qe,Bt=>{n(ue).interactive&&Bt(lt)})}b(ut,ze)}),S(Me),O(ut=>nt=se(Me,1,"interactive-icons s-s",null,nt,ut),[()=>({mobile:s(),hidden:s()&&!n(We)})]),b(he,Me)};R(pt,he=>{v()&&he(Dt)})}var at=A(pt,2);let yt;at.__pointerdown=[G0,i,P,$,We,ke,h],at.__pointermove=[Y0,$,ke,Ue,N,P,We,x],at.__pointerup=[j0,$,We,ke,I],at.__click=[X0,$,ae,ke],at.__contextmenu=[Z0,ke,$,ae,We,ee];var Jt=C(at);{var It=he=>{am(he,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},Rt=he=>{var Me=ex(),nt=C(Me),ut=A(nt,2);let ue;S(Me),O(ze=>{Le(nt,"data-value",n(Ie)),qe(nt,`transform: translateX(${n(Ie)}%);`),ue=se(ut,1,"filled s-s",null,ue,ze),Le(ut,"data-value",n(Be)),qe(ut,`transform: translateX(${n(Be)}%);`)},[()=>({"active-live":d()})]),b(he,Me)};R(Jt,he=>{n(ie).length?he(It):he(Rt,!1)})}var Ot=A(Jt,2);let Y;var Se=C(Ot);let le;S(Ot),S(at),je(at,he=>i(he),()=>i()),O((he,Me,nt,ut)=>{var ue,ze;yt=se(at,1,`slider ${(ue=o())!=null?ue:""}`,"s-s",yt,he),Le(at,"aria-label",we()),Le(at,"aria-valuemin",pe()),Le(at,"aria-valuemax",re()),Le(at,"aria-valuenow",_e()),Le(at,"aria-valuetext",$e()),Le(at,"data-testid",(ze=r())!=null?ze:null),Y=se(Ot,1,"handleWrap s-s",null,Y,Me),qe(Ot,nt),le=se(Se,1,"handle s-s",null,le,ut)},[()=>({disabled:$(),"slider-dragging":n(We),hidden:a(),"handle-always-visible":Re(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(J())}%);`,()=>({"active-live":d()})]),st("pointerenter",at,De),st("pointerleave",at,Oe),st("mouseenter",at,tt),st("mouseleave",at,U),st("wheel",at,Pe),b(t,Vt),F()}Ge(["pointerdown","pointermove","pointerup","click","contextmenu"]);var eo=(t,e)=>kd[t]>=kd[e];var Ls=(t,e)=>kd[t]<=kd[e],B_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var nx=M("<div><!></div>"),rx=M("<div><!> <!></div>"),sx={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 lm(t,e){var Ue,et;B(e,!0),Q(t,sx);let[i,o]=Ve(),r=()=>w(N,"$isAudioAvailable$",i),a=()=>w(v,"$muted$",i),l=()=>w(p,"$volume$",i),d=()=>w(x,"$currentGridType$",i),s=()=>w(De,"$controlsVisible",i),u=ve(),f=At(),p=u.state.volume$,v=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:h}=u.actions.internal,x=u.ui.currentGridType$,I=(Ue=u.callbacks)==null?void 0:Ue.onAudioDoesNotExistHint,T=(et=u.callbacks)==null?void 0:et.onAudioDisabledHint,N=u.state.isAudioAvailable$,L=u.state.isAudioDisabled,E=u.ui.t,k=K(!1),q,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),j=m(()=>Ls(d(),"l")),ae=m(()=>n(j)?"":n(z)?!r()||L?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),ne=m(()=>n(z)?0:l()),J=!1,we=m(()=>e.isAds?!1:L?!T:r()?!1:!I);function pe(ye){y(),$(ye)}function re(){Nu(u,l(),f.controls.volumeStepWheel)}function _e(){Du(u,l(),f.controls.volumeStepWheel)}function $e(ye){$(ye)}function ee(ye){$(ye),h()}function Re(){J=!0}function fe(){J=!1,Te()}function P(){clearTimeout(q),D(k,!0)}function We(){Te()}function Te(){q=window.setTimeout(()=>{J||D(k,!1)},f.controls.volumeBarTimeout)}function Z(ye){ye.preventDefault(),ye.deltaY<0?re():ye.deltaY>0&&_e()}let ie=K(!1),De=u.ui.controlsVisible;Ne(()=>{s()||D(ie,!1)});var Oe=rx();let tt;var U=C(Oe);Ba(U,{get content(){return n(ae)},translateY:-18,get active(){return n(ie)},set active(ye){D(ie,ye,!0)},children:(ye,Ie)=>{let Be=m(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");Wt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Be)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return us.KeyM},role:"button",children:(Vt,pt)=>{ra(Vt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Pe=A(U,2);{var ke=ye=>{var Ie=nx();let Be;var Vt=C(Ie);let pt=m(()=>n(j)?"volumeBar-slider-vertical":""),Dt=m(()=>n(j)&&!n(k)),at=m(()=>n(j)?Re:Fu),yt=m(()=>n(j)?fe:Fu),Jt=m(()=>Math.round(n(ne)*100)),It=m(()=>`${Math.round(n(ne)*100)}%`),Rt=m(()=>n(j)?"volume-slider-vertical":"volume-slider");Fa(Vt,{get className(){return n(pt)},get isHidden(){return n(Dt)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:re,onWheelDown:_e,onPointerDown:pe,onHandleMove:$e,onPointerUp:ee,get onPointerEnter(){return n(at)},get onPointerLeave(){return n(yt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(Jt)},get ariaValueText(){return n(It)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n(Rt)}}),S(Ie),O(Ot=>Be=se(Ie,1,"volumeBar s-29",null,Be,Ot),[()=>({"volumeBar-vertical":n(j)})]),b(ye,Ie)};R(Pe,ye=>{n(H)&&ye(ke)})}S(Oe),O(ye=>tt=se(Oe,1,"volumeBar-container s-29",null,tt,ye),[()=>({vertical:n(j)})]),st("mouseenter",Oe,function(...ye){var Ie;(Ie=n(j)?P:Fu)==null||Ie.apply(this,ye)}),st("mouseleave",Oe,function(...ye){var Ie;(Ie=n(j)?We:Fu)==null||Ie.apply(this,ye)}),st("wheel",Oe,Z),b(t,Oe),F(),o()}import{noop as dx}from"@vkontakte/videoplayer-shared/es2018";var ax=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>'),lx=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 dm(t,e){let i=g(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=Ae(),d=ce(l);{var s=f=>{var p=ax();b(f,p)},u=f=>{var p=lx();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}function Gd(t,e){B(e,!0);let i=g(e,"isFullscreen",3,!1),o=g(e,"click",3,dx),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Wt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=ia(u);a.set(f),o()()},get ariaKeyShortCut(){return us.KeyF},role:"button",children:(u,f)=>{dm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var cx=Ce('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function cm(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=cx();Ji(o,()=>({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);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(),S(o),b(t,o)}var ux=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 um(t,e){let i=In(e,["$$slots","$$events","$$legacy","children"]);var o=ux();Ji(o,()=>({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);ti(r,()=>{var a;return(a=e.children)!=null?a:mt}),li(6),S(o),b(t,o)}var px={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 pm(t,e){B(e,!0),Q(t,px);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=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`);um(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 Yd(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w($,"$isMobile",i),a=()=>w(v,"$currentGridType$",i),l=()=>w(h,"$isCyrillicRelatedInterface$",i),d=g(e,"ref",15,void 0),s=g(e,"logoClickable",3,!1),u=g(e,"targetUrl",3,""),f=At(),p=ve(),v=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,h=p.isCyrillicRelatedInterface$,x=m(()=>f.logoType!=="vk"),I=m(()=>n(x)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=m(()=>(r()&&Ls(a(),"m")||Ls(a(),"l"))&&n(x)),N=()=>{var k,q;e.click(),(k=p.callbacks)!=null&&k.onLogoClicked?(q=p.callbacks)==null||q.onLogoClicked():u()&&window.open(u(),"_blank")},L=m(()=>!s()),E=m(()=>n(x)?"btn-vk-video-logo":"btn-vk-logo");Wt(t,{className:"btn-full-opacity",get disabled(){return n(L)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(k){d(k)},children:(k,q)=>{var H=Ae(),z=ce(H);{var j=X=>{pm(X,{get logo(){return f.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},ae=X=>{cm(X,{})};R(z,X=>{n(x)?X(j):X(ae,!1)})}b(k,H)},$$slots:{default:!0}}),F(),o()}import{ChromecastState as gx}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as H_}from"@vkontakte/videoplayer-core/es2018";var fx=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-z"></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-z"></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-z"></path>',1),mx=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),vx={hash:"s-z",code:".animated.s-z{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-z{animation-name:s-z-wave1}.wave2.animated.s-z{animation-name:s-z-wave2}.wave3.animated.s-z{animation-name:s-z-wave3}@keyframes s-z-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-z-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-z-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function jd(t,e){B(e,!0),Q(t,vx);let i=g(e,"isMobile",3,!1),o=m(()=>e.iconState===H_.CONNECTED),r=m(()=>e.iconState===H_.CONNECTING),a=m(()=>n(o)?"#2688EB":Zs),l=m(()=>e.size?ln(e.size):void 0);var d=Ae(),s=ce(d);{var u=p=>{Xe(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,$)=>{var y=fx();li(2),b(v,y)},$$slots:{default:!0}})},f=p=>{Xe(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,$)=>{var y=mx(),h=ce(y);let x;var I=A(h);let T;var N=A(I);let L;var E=A(N);let k;var q=A(E);let H;O((z,j,ae,X,ne)=>{x=se(h,0,"wave2 s-z",null,x,z),T=se(I,0,"wave3 s-z",null,T,j),L=se(N,0,"wave1 s-z",null,L,ae),k=se(E,0,"s-z",null,k,X),H=se(q,0,"s-z",null,H,ne)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),b(v,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}import{noop as hx}from"@vkontakte/videoplayer-shared/es2018";function Xd(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isMobile",3,!1),r=g(e,"click",3,hx),l=ve().ui.t,d=m(()=>e.state===gx.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Wt(t,{get ariaLabel(){return n(d)},get click(){return r()},testId:"btn-chromecast",get ref(){return i()},set ref(s){i(s)},children:(s,u)=>{jd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}import{noop as bx}from"@vkontakte/videoplayer-shared/es2018";var _x=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 fm(t){Xe(t,{testId:"episodes-icon",children:(e,i)=>{var o=_x();li(2),b(e,o)},$$slots:{default:!0}})}var Hu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var $x=M('<span class="text mobile s-22"> </span> <div class="chevron-episodes s-22" data-testid="btn-episodes_icon"><!></div>',1),yx=M('<span class="text s-22"> </span>'),xx=M('<span class="text count s-22"> </span>'),wx=M('<span class="icon s-22"><!></span> <!>',1),Sx={hash:"s-22",code:".icon.s-22{flex-shrink:0}.text.s-22{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-22{overflow:visible}.text.mobile.s-22{padding:0 3px 0 4px}.chevron-episodes.s-22{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function Zd(t,e){var J,we,pe;B(e,!0),Q(t,Sx);let[i,o]=Ve(),r=()=>w(y,"$currentGridType$",i),a=()=>w(h,"$openedByKeyboard$",i),l=()=>w(x,"$panelOpened$",i),d=()=>w(I,"$isMobile",i),s=g(e,"position",3,0),u=g(e,"duration",3,0),f=g(e,"timeCodes",19,()=>[]),p=ve(),v=(we=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?we:bx,$=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,h=p.ui.episodes.openedByKeyboard$,x=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,N=K(void 0),L=re=>{var $e,ee,Re;if(!!(($e=p.callbacks)!=null&&$e.onEpisodeClicked)){let fe=ia(re);h.set(fe),x.set(!0),(Re=(ee=p.callbacks)==null?void 0:ee.onEpisodeClicked)==null||Re.call(ee,fe)}},E=K(null),k=m(()=>s()/u());Ne(()=>{var _e;let re=Hu(n(k),u(),f());re?((_e=n(E))==null?void 0:_e.time)!==re.time&&(v(re),D(E,re,!0)):D(E,null)});let q=m(()=>{var re;return((re=n(E))==null?void 0:re.text)||""}),H=m(()=>eo(r(),"xl")?"FULL":eo(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${T("tooltip_episodes")}: ${n(q)}`),j=async(re,_e,$e)=>{await fo(),(re==null?void 0:re.getAttribute("aria-expanded"))==="false"&&_e&&!$e&&St(()=>{h.set(!1),re.focus()})};Ne(()=>{j(n(N),a(),l())});var ae=Ae(),X=ce(ae);{var ne=re=>{let _e=m(()=>d()?"px-0":""),$e=m(()=>!$);Wt(re,{get className(){var ee;return`w-max btn-full-opacity btn-jc-l ${(ee=n(_e))!=null?ee:""}`},testId:"btn-episodes",click:L,get disabled(){return n($e)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(ee){D(N,ee,!0)},children:(ee,Re)=>{var fe=Ae(),P=ce(fe);{var We=Z=>{var ie=$x(),De=ce(ie),Oe=C(De,!0);S(De);var tt=A(De,2),U=C(tt);Lr(U,{direction:"right"}),S(tt),O(()=>me(Oe,n(q))),b(Z,ie)},Te=Z=>{var ie=wx(),De=ce(ie),Oe=C(De);fm(Oe,{}),S(De);var tt=A(De,2);{var U=ke=>{var Ue=yx(),et=C(Ue,!0);S(Ue),O(()=>me(et,n(q))),b(ke,Ue)},Pe=(ke,Ue)=>{{var et=ye=>{var Ie=xx(),Be=C(Ie,!0);S(Ie),O(()=>me(Be,f().length)),b(ye,Ie)};R(ke,ye=>{n(H)==="COUNT"&&ye(et)},Ue)}};R(tt,ke=>{n(H)==="FULL"?ke(U):ke(Pe,!1)})}b(Z,ie)};R(P,Z=>{d()?Z(We):Z(Te,!1)})}b(ee,fe)},$$slots:{default:!0}})};R(X,re=>{n(E)&&re(ne)})}b(t,ae),F(),o()}import{debounceFn as nb}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Mx,PlaybackState as Bl,Player as Vx,PredefinedQualityLimits as vs,VideoFormat as ec,clientChecker as Q_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as hr,getHighestQuality as Rx,InterfaceLanguage as Nx,isInvariantQuality as Dx,isNonNullable as Ox,loadVKLangPack as Bx,Logger as Fx,map as G_,merge as Hx,Observable as Gu,Subject as Fl,Subscription as bm,TracerFactory as Ux,ValueSubject as zx,VideoQuality as Wx,devNull as Kx,now as qx,filter as Qx,once as Gx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Vs}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as Cx,devNull as oi,isNonNullable as Tx,now as ni}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Ix,Subject as dn,clearVideoElement as Ex}from"@vkontakte/videoplayer-shared/es2018";var kx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Uu=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 dn,loadStarted$:new dn,loadEnded$:new dn,loadError$:new dn,ready$:new dn,slotRequested$:new dn,started$:new dn,timeRemained$:new dn,paused$:new dn,resumed$:new dn,ended$:new dn,empty$:new dn,skipped$:new dn,clicked$:new dn,closed$:new dn,error$:new dn};this.loadAdman=e=>(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[ni()]}),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?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[ni()]}),o())};Ix(kx,e,this.loadTimeout).then(()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[ni()]}),window.AdmanHTML?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[ni()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[ni()]}),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?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[ni()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[ni()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[ni()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[ni()]}),!d&&(window.AdmanHTML?(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[ni()]}),i(),this.events.loadEnded$.next()):(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[ni()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[ni()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[ni(),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;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[ni()]}),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;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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")=>{oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[ni()]}),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"),oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[ni()]}),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")}async initAdman(e){var N,L;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[ni(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:f,externalApi:p}=e;this.externalApi=p;let v,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?v=$:v=parseInt($,36));let{isEmbed:y,immediateOrigin:h}=Cx(),x=(N=y?h:window.location.href)!=null?N:window.location.href,I={...s,dl:encodeURIComponent(x),autoplay:r?1:0,player_width:i,player_height:o,...v?{request_id:v}:{},duration:f,...u};I=Object.fromEntries(Object.entries(I).filter(([E,k])=>Tx(k)));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),(L=this.externalApi)!=null&&L.videoGetAds){let k=await this.safeExternalCall(this.externalApi.videoGetAds,I);k&&(delete T.slot,delete T.params,Object.assign(T,{json:k}))}E.init(T),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(T)}`})}catch(E){oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[ni()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),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(oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[ni()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,f,p,v;oi.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[ni()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Ex(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var U_=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 mm=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 zu,{startTime:f,endTime:p}=u.parse(s);l.startTime=f,l.endTime=p}else if(s.trim()!==""){let u=new vm,{texts:f}=u.parse(s);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},zu=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}},vm=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((f,p)=>{let v=l.indexOf(p,d);return f===-1||f>v?v:f},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new zu;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}},z_=mm;import{isNonNullable as gm}from"@vkontakte/videoplayer-shared/es2018";var Ha,Ai,hm=0,_m=!1,W_="",K_=(t,e=0,i=0)=>t<e&&t<i,Wu=(t,e=0,i=0)=>t>=e&&t<=i,Px=(t,e=0,i=0)=>t>e&&t>i,q_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:f})=>Wu(t,u,f));let a=t>=hm,l=t<hm;if(hm=t,l&&(_m=!1),gm(Ha)&&Wu(t,Ha.startTime,Ha.endTime)&&W_===e.value)return Ha;if(!gm(Ai)&&(r!=null&&r.length)&&!_m){Ai=r.find(({startTime:u,endTime:f})=>Wu(t,u,f)||a&&K_(t,u,f)),Ha=void 0,!gm(Ai)&&r[r.length-1].endTime<t&&(_m=!0);return}else{if(Wu(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime))return Ha=Ai,Ai=void 0,W_=e.value,Ha;(a&&Px(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime)||l&&K_(t,Ai==null?void 0:Ai.startTime,Ai==null?void 0:Ai.endTime))&&(Ai=void 0)}};var Ku={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"},Ax={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"},Jd=t=>{var e,i;return(i=(e=Ku[t])!=null?e:Ku[Ax[t]])!=null?i:void 0};import{Subscription as Lx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var qu=class{constructor(e,i,o,r=new Lx){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 Qu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Qu||{});var ms=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(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))}},Dl=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 Ol=t=>!!(Math.round(Math.abs(t)/90)%2);var Y_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:$,player:y,disabledControls:h,isInteractive:x,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:N,stopPlayer:L,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,additionalButtons:q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:j,playNextVideo:ae,onVideoChanged:X,looped:ne=!1,statistics:J,saveRate:we,internalsExposure:pe,playerView:re,playerId:_e})=>{var Bv,Fv,Hv;let $e={...$,configName:[...(Bv=$.configName)!=null?Bv:[],"ui"],isAudioDisabled:l,live:{...(Fv=$.live)!=null?Fv:{},isLiveCatchUpMode:!!r}},ee=v,Re=Ux.createRootTracer(ee.features.tracer),fe=Re.createComponentTracer("Store"),P=y||new Vx($e,Re,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});pe==null||pe.expose({corePlayer:P});let We=new Fx,Te=new Uu(We,{loadTimeout:ee.ads.loadTimeout,initTimeout:ee.ads.initTimeout,runtimeTimeout:ee.ads.runtimeTimeout,useAdmanFromNPM:ee.ads.useAdmanFromNPM,volumeMultiplier:ee.ads.volumeMultiplier,isVsidOriginal:ee.ads.isVsidOriginal}),Z=La.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,De=u==null?void 0:u.annotationsApi,Oe=u==null?void 0:u.slotsApi,tt=u==null?void 0:u.focusManager,U=We.createComponentLog("Store"),Pe,ke,Ue={},et=new gu,ye=new bm,Ie="",Be=de(!1),Vt=J&&J.oneStat?ii(J.oneStat.vsid$):Ar(void 0),pt=de(Js()),Dt=de(!1),at=()=>h_(document,Q_.device.isIOS),yt=(Hv=ie==null?void 0:ie.info.isActive$)!=null?Hv:new zx(!1),Jt=de(0),It=de(!1),Rt=de(!1),Ot=de([]),Y=Hx(P.events.fatalError$,P.events.managedError$).subscribe(c=>Ot.update(_=>[..._,c])),Se=Ar(!1,c=>{let _=P.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),le=async c=>{var oe;let _=Object.values(Nx).includes(c);if(ee.downloadVKLanguages&&(_&&ee.updateBuiltinLanguages||!Af(c))){let xe;try{xe=await Bx(c,Ih,Eh)}catch(Ye){(oe=J==null?void 0:J.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),Z==null||Z.report(Ye,{errorType:"VKLangPack",fatal:!1})}xe&&(Pf({language:c,pack:xe,fallback:ee.defaultLanguage}),he.set(c),Me.update(Ye=>Ye+1))}Af(c)&&he.set(c)},he=de(t),Me=de(0),nt=de(e);le(t);let ut=(c,_)=>{let V=ge(he);return Lf(V,c,_,ee.defaultLanguage)},ue=de("thumb");ue.subscribe(c=>{c==="ads"&&P.info.playbackState$.getValue()&&lt()});let ze=(()=>{let c=ui([Se,ue],([_,V])=>_?"crashed":V);return{...c,is:_=>ge(c)===_}})(),Qe=de(),lt=()=>{Qe.set({muted:P.info.muted$.getValue()})},Bt=(()=>{let c=de(new Set(h));return{...c,add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(xe=>!_.includes(xe)):oe.filter(xe=>xe!==_))})},includes:_=>{let V=ge(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}}})(),Ft=de({width:0,height:0}),ei=null,vi=P.info.isBuffering$,qi=Ar(vi.getValue(),c=>{let _=vi.subscribe(V=>{V&&ei===null?ei=window.setTimeout(()=>{c(vi.getValue()),ei=null},ee.loaderDelay):c(V)});return()=>{_.unsubscribe(),ei&&clearTimeout(ei)}});fe.log("create store"),U({message:"create store"});let Lt=c=>{let _=c.container,V=()=>{Xt=new MutationObserver(xe=>{let{removedNodes:Ye}=xe[0];Ye.length&&_.append(P.experimental.element$.getValue())}),Xt.observe(_,{childList:!0})},oe=P.experimental.element$.getValue();if(oe)_.append(oe),V();else{let xe=P.experimental.element$.pipe(Qx(Ye=>!!Ye),Gx()).subscribe(Ye=>{_.append(Ye),V()});ye.add(xe)}},ci=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),x?Lt(c):(Kx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[qx()]}),P.initVideo(c)),fe.log("init video",{isInteractive:x}),c.subtitles&&P.setExternalTextTracks(c.subtitles),Pe=c,Ie=c.subtitlesForcedLanguage||""},pi=new Fl,vt=c=>pi.next(c),Yt=new Fl,_i=new Fl,Qi=new Fl,Xt=null,Ct={actionRewind$:Yt,actionSeek$:_i,inPiP$:yt,inFullscreen$:new Gu(c=>pt.subscribe(_=>c.next(_))),actionSetSubtitle$:Qi,nextMovie$:pi},Ke=new Fl,gi=new Fl,yo={actionSeek$:_i,actionSubtitlesSwitched$:Ke,actionQuality$:gi,playerSize$:new Gu(c=>Ft.subscribe(_=>c.next(_))),inPiP$:yt,inFullscreen$:new Gu(c=>pt.subscribe(_=>c.next(_))),isLoaderVisible$:new Gu(c=>qi.subscribe(_=>c.next(_)))};if(J){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=J;c&&(x||oe.add(c.attachTo(P)),oe.add(c.attachToUi(Ct)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(xe=>{U({message:`onestat auth error ${String(xe)}`})}),V&&V.attachTo(P)),_&&(oe.add(_.attachTo(P,Te.events)),oe.add(_.attachToUi(yo)),oe.add(_.attachToAds(Te.events)),_.updateContext({isMobile:ge(Be)}),_.authorize(a))}if(Z){let c=new bm,_=(V,oe)=>c.add(V.subscribe(oe));if(_(P.events.managedError$,V=>{Z.logIError(V)}),_(P.events.fatalError$,V=>{Z.logIError(V,!0)}),J){let{oneStat:V}=J;V&&_(V.experimental.error$,oe=>{Z.logIError(oe)})}Z.sentrySubscription.add(c)}let Ao=()=>{if(Q_.device.isIOS&&ke)try{__(ke)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(P.experimental.element$.subscribe(c=>{c&&(ke=c,c.classList.add("player-media"),Va(ie)&&ie.updateVideoElement(),x&&c.setAttribute("pip","false"),re==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(P.events.ended$.subscribe(()=>{var c;Ao(),(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(async()=>{var _,V;Va(ie)&&await(ie==null?void 0:ie.revealPictureInPicture());let c=P.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=Ue.onStarted)==null||V.call(Ue,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(()=>{It.set(!0)})).add(P.info.is3DVideo$.subscribe(c=>{Rt.set(c)})).add(P.info.isEnded$.subscribe(c=>{x&&(c?(T!=null&&T.getValue()&&Bt.add(Ed),Bt.add("PLAY_BUTTON")):Bt.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 Lo=new bm,xt=()=>{var Ye,Tt,Ut;let{debugLog:c}=ee,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Gt}=c;_=c.tag,V=(Ye=Gt==null?void 0:Gt[0])!=null?Ye:V,oe=(Ut=(Tt=Gt==null?void 0:Gt[1])!=null?Tt:Gt==null?void 0:Gt[0])!=null?Ut:oe}let xe=_?`: ${_}`:"";Lo.add(P.events.log$.subscribe(Gt=>{console.debug(`%c sdk${xe} `,`background:${V};`,`sdk component: ${Gt.component}`,Gt.message)})).add(We.log$.subscribe(Gt=>{console.debug(`%c ui${xe} `,`background:${oe};`,`ui component: ${Gt.component}.`,Gt.message)}))},Ht=()=>{Lo.unsubscribe()},W=(c,_)=>{fe.log("start camera manual rotation",{mx:c,my:_}),P.startCameraManualRotation(c,_)},Et=(c=!1)=>{fe.log("stop camera manual rotation",{immediate:c}),P.stopCameraManualRotation(c)},ri=(c,_,V)=>{fe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),P.moveCameraFocusPX(c,_,V)},dt=()=>{P.holdCamera()},wt=()=>{P.releaseCamera()},qt=Ar(P.info.position$.getValue(),c=>{let _,V,oe=()=>{let xe=P.info.playbackState$.getValue(),Ye=P.info.isLive$.getValue(),Tt=P.info.duration$.getValue(),Ut=P.info.position$.getValue();if(xe&&[Bl.PLAYING,Bl.PAUSED].includes(xe)){let Gt=Ye?Ut-Tt:P.getExactTime();Gt!==V&&c(Gt),V=Gt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),ot=ii(P.info.playbackState$),Di=ii(P.info.isBuffering$),Oi=ui([ot,Di],([c,_])=>_?"buffering":c),jo=ii(P.info.currentBuffer$),Mo=ii(P.info.isEnded$),io=ii(P.info.isLive$),Pi=ee.features.playbackRate?ii(P.info.canChangePlaybackSpeed$):Ar(!1),Vr=ii(P.info.liveBufferTime$),mo=ii(P.info.volume$),vo=ii(P.info.muted$),Ei=hu(P.info.predefinedQualityLimitType$.pipe(G_(c=>c===vs.TRAFFIC_SAVING)),P.info.predefinedQualityLimitType$.getValue()===vs.TRAFFIC_SAVING),Xo=hu(P.info.predefinedQualityLimitType$.pipe(G_(c=>c===vs.HIGH_QUALITY)),P.info.predefinedQualityLimitType$.getValue()===vs.HIGH_QUALITY),Vo=ii(P.info.autoQualityLimitingAvailable$),Pn=ii(P.info.availableQualities$),_r=ii(P.info.availableQualitiesFps$),br=ii(P.info.chromecastState$),hs=ii(P.info.chromecastDeviceName$),Jr=ii(P.info.currentFormat$),es=ii(P.info.throughputEstimation$),jn=ii(P.info.videoBitrate$),Rr=ii(P.info.intrinsicVideoSize$),Zo=ii(P.info.duration$),An=ii(P.info.isAudioAvailable$),$r=()=>{ei&&clearTimeout(ei),ei=null},Ro=ui([Zo,io],([c,_])=>_?-c:c),Xn=ui([ot],([c])=>c===Bl.PLAYING),Zn=ii(P.info.atLiveEdge$),Nr=ii(P.info.atLiveDurationEdge$),Jn=ii(P.info.position$),oo=ui([Jn,Zo],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),Dr=ui([br],([c])=>c===Mx.CONNECTED),er=ii(P.info.availableVideoStreams$),un=ee.features.audioLanguages?ii(P.info.availableAudioStreams$):Ar([]),go=ii(P.info.currentVideoStream$),yr=ii(P.info.currentAudioStream$),tr=c=>{c.language&&Tf(c.language),P.setVideoStream(c)},ft=(c,_)=>{P.setAudioStream(c),on(_)&&(c.language&&Tf(c.language),ee.features.userVideoPrefs&&i&&kf(ee.userSalt,String(i),{audioTrackId:c.id}))},si=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(oe=>"isDefault"in oe&&oe.isDefault)),ee.features.userVideoPrefs&&i){let oe=xu(ee.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let xe=c.find(Ye=>Ye.id===oe.audioTrackId);_=xe!=null?xe:_}}let V=e_();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},Or=c=>{fe.log("change audio stream",{id:c});let _=P.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&ft(_,!0)},ir=!1;ye.add(P.info.availableAudioStreams$.subscribe(c=>{if(!ir&&c.length){let _=si(c);_&&(P.setAudioStream(_),ir=!0)}})),un.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:V="",id:oe="",language:xe=""})=>({label:V,language:xe,id:oe})))}),yr.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let Br=!1;ye.add(P.info.availableVideoStreams$.subscribe(c=>{if(!Br&&c.length){let _=si(c);_&&(P.setVideoStream(_),Br=!0)}}));let No=de(void 0),Ln=ii(P.info.isAutoQualityEnabled$,c=>c&&No.set(void 0)),pn=ii(P.info.currentQuality$,()=>No.set(void 0)),Jo=ui([No,pn],([c,_])=>c!=null?c:_),fn=ui(Jr,c=>c!==ec.MPEG),xr=ui([Pn,_r,Ln,Jo,fn],([c,_,V,oe,xe])=>{let Ye=[];xe&&Ye.push({value:"auto",displayValue:ut("auto_quality_option"),selected:V});let Tt=c.filter(Ut=>!Dx(Ut));for(let Ut of Tt){let Gt=_[Ut];Ye.push({value:Ut,displayValue:`${Ut}${Gt?U_(Gt):""}`,selected:V?!1:Ut===oe})}return Ye}),Do=ii(P.info.currentPlaybackRate$),Oo=ui([Do,Zn,Nr],([c,_,V])=>{let oe=V||x?1:ee.controls.playbackRateMin,xe=_?1:ee.controls.playbackRateMax,Ye=ee.controls.playbackRateStep,Tt=[];for(let Ut=oe;Ut<=xe;Ut+=Ye)Tt.push({value:Ut,displayValue:Ut===1?ut("playback_rate_1"):ut("playback_rate",{multiplier:Ut.toString(10)}),selected:c===Ut});return Tt}),mn=()=>({displayValue:ut("subtitles_off"),value:kn,language:""}),wr=de(mn()),bi=ui([wr,Me],([c],_)=>{c.value===kn?_(mn()):_(c)}),vn=ee.features.subtitles?ii(P.info.availableTextTracks$):Ar([]),Mn=Uh(),or=ui([vn,bi],([c,_],V)=>{var Ye;let oe=[],xe=c.find(({id:Tt})=>Tt===_.value);if(xe!=null&&xe.url){let[,Tt]=(Ye=Mn.find(xe.url))!=null?Ye:[];if(Tt){V(Tt);return}et.download(xe.url).then(Ut=>{if(!Ut||et.isDestroyed())return;let Gt=new z_,Us=xe.language;if(Us){let Yb=!!xe.isAuto,jb=Gt.parse(Ut,Us);oe.push({lang:Us,subtitles:jb,isAuto:Yb,id:xe.id})}Mn.add(xe.url,oe),ge(bi).value===_.value&&V(oe)}).catch(Ut=>{var Gt;(Gt=J==null?void 0:J.oneStat)==null||Gt.logError({errorType:"Subtitles download",fatal:!1}),Z==null||Z.report(Ut,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),Sr=ui([Do,Xn,bi],([c,_,V],oe)=>{let Tt;if(P.info.isLive$.getValue()&&_&&V.value!==kn){let Gt=()=>{let Us=1e3/(3*c);Tt=setTimeout(Gt,Us),oe(Date.now())};return Gt(),()=>clearTimeout(Tt)}}),Vn=ui([vn,bi],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:xe,id:Ye}of c){let Tt=oe&&Jd(oe);oe&&Tt&&V.push({displayValue:xe?ut("subtitles_auto",{language:Tt}):Tt,value:Ye,selected:(_==null?void 0:_.value)===Ye,isAuto:xe,language:oe})}return V.length?(V.unshift({...mn(),selected:(_==null?void 0:_.value)===kn}),V):[]}),en={available:[],prev:[]},_t=()=>{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},$t=ui([qt,bi,or,Sr],([c,_,V,oe])=>{var Ye;let xe=P.info.isLive$.getValue();if(xe&&en.prev!==V){let Tt=V.find(({id:Gt})=>Gt===_.value),Ut=en.prev.find(({id:Gt})=>Gt===_.value);if(Tt){let Gt={...Tt,subtitles:[...(Ye=Ut==null?void 0:Ut.subtitles)!=null?Ye:[],...Tt.subtitles]};en.available=[Gt],en.prev=V}}if(_&&_.value!==kn){let Tt=xe?_t():c,Ut=xe?en.available:V;return q_(Tt,_,Ut,xe)}}),no=ui([$t],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(bi.subscribe(c=>{var _,V;if(c.value===kn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(Ku).find(([xe,Ye])=>Ye===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let ro=de(!0),tn=ui([jo,Ro,Jn,Vr],([c,_,V,oe])=>{var Ut;let xe=(Ut=c==null?void 0:c.end)!=null?Ut:0;if(!oe)return xe/_;let Tt=-V+oe-_;return(xe-Tt)/_}),Bi=ii(P.info.availableSources$),Gi=ui([Bi],([c])=>Object.keys((c==null?void 0:c[ec.MPEG])||{}).length>0),so=()=>{var V,oe,xe;let c=Object.keys(((oe=(V=P.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[ec.MPEG])||{}),_=Rx(c)||Wx.Q_144P;return(xe=Pe.sources[ec.MPEG])==null?void 0:xe[_]},Rn=()=>{var _;let c=so();if(c)fe.log("download video",{url:c}),Bh(c,((_=Pe==null?void 0:Pe.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";fe.log("download video",{message:V}),U({message:V})}},Fr=()=>{U({message:"toggle muted"});let c=P.info.muted$.getValue();P.info.volume$.getValue()===0&&!c?nr(Cr(),!1):xo(!c,!1)},Li=()=>{var c;if(Kt.ui.settingsMenu.visible$.set(!1),!ge(Kt.ui.settingsSubMenu.visible$)){let _=ge(Kt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let oe=Dl(_),xe={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:xe,name:"settings"})}}fe.log("close settings menu")},_s=async(c,_=()=>Promise.resolve())=>{var xe;Kt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Kt.ui.settingsMenu.visible$.set(!0),await _();let V=ge(Kt.ui.settingsMenu.ref$),oe=nl();if((xe=s==null?void 0:s.uiInfo)!=null&&xe.onSettingsMenu&&V&&oe){let Tt=Dl(V),Ut=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Tt,position:Ut,name:"settings"})}fe.log("open settings menu",{wasOpenedByKeyboard:c})},ts=(c,_=!1)=>{var Ye;Kt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Kt.ui.settingsMenu.ref$),oe=nl(),xe=ge(Kt.ui.settingsMenu.visible$);if((Ye=s==null?void 0:s.uiInfo)!=null&&Ye.onSettingsMenu&&V&&oe)if(xe&&!_){let Ut=Dl(V),Gt=Ms(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:Ut,position:Gt,name:"settings"})}else{let Ut=Dl(c),Gt={top:0,left:0,bottom:0,right:0},Us=ge(Kt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ut,position:Gt,name:Us})}fe.log("close settings sub menu")},is=(c,_)=>{var oe;Kt.ui.settingsSubMenu.visible$.set(!0),Kt.ui.settingsSubMenu.ref$.set(_),Kt.ui.settingsSubMenu.name$.set(c);let V=nl();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let Ye=Dl(_),Tt=Ms(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Ye,position:Tt})}fe.log("open settings sub menu",{name:c})},Cr=()=>{var _;let c=Math.max(ee.volumeMinRestore,(_=_u())!=null?_:0);return c===0?ee.volumeDefault:c},on=c=>{let _=ee.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},nr=(c,_)=>{let V=c===0?Cr():c,oe=P.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let xe=!l||ze.is("ads");oe&&c>0&&xe&&(oe=!1,on(_)&&Sf(!1)),P.setVolume(c,oe),Te.setVolume(c),on(_)&&$f(V)},xo=(c,_)=>{let V=P.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=ze.is("ads");if(P.setMuted(c,oe),Te.setVolume(c?0:V),on(_)&&(!oe||!c)&&Sf(c),!c&&V===0){let xe=Cr();P.setVolume(xe),on(_)&&$f(xe),Te.setVolume(xe)}},wo=de(!1),rr=c=>{var _,V;fe.log("set looped",{isLooped:c}),wo.set(c),P.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};rr(ne);let He=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},kt=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),fe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Kt.ui.autoplayNextEnabled$.set(c),o_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},$i=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),fe.log("set timer next video running",{timerNextVideoRunning:c}),Kt.ui.timerNextVideoRunning$.set(c)},Bo=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{_=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}X(!0),_&&j()},ao=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onNextVideoClick))try{_=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}X(!1),_&&ae()},So=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},lo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Fo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Nn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},nn=()=>{P.prepare()},ho=()=>{hr(Kt);let c=ge(Kt.ui.controls.disabledControls$),_=ge(Kt.playerPhase),V={playerPhase:_,isInteractive:x,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),_==="ads"){V.action="play",fe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var Ye;U({message:"toggle play, call player.play"}),V.action="play",P.play(),(Ye=s==null?void 0:s.onPlay)==null||Ye.call(s)},xe=()=>{var Ye;U({message:"toggle play, call player.pause"}),V.action="pause",P.pause(),(Ye=s==null?void 0:s.onPause)==null||Ye.call(s)};if(P.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Yt.next(),_i.next(Vs.REWIND),x){N==null||N();return}P.seekTime(0),oe()}else P.info.playbackState$.getValue()!==Bl.PLAYING?oe():xe();fe.log("toggle play",V)},Yi=(c,{changeReason:_="default",appliesTo:V="to-video",byUser:oe=!1}={},xe)=>{U({message:`set quality, quality: ${c}`}),fe.log("set quality",{quality:c}),oe&&gi.next(c),P.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Ye}=ee.features;bu(),c!=="auto"?(Ye?($u({type:"exact_quality",quality:c,videoId:i},V),P.setPredefinedQualityLimits(vs.UNKNOWN)):yf(i,c),No.set(c),P.setQuality(c)):Ye&&_==="default"&&(Tr("auto_quality",V,xe),ge(Ei)&&Dn(!1,void 0,xe),ge(Xo)&&On(!1,void 0,xe))},Dn=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),fe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?vs.TRAFFIC_SAVING:vs.UNKNOWN;ee.features.qualityDetailsSubMenuEnabled?(Bn(oe,_,V),Pd(!1)):(P.setPredefinedQualityLimits(oe),on(V)&&Pd(c))},On=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),fe.log("set high quality enabled",{highQualityEnabled:c}),Bn(c?vs.HIGH_QUALITY:vs.UNKNOWN,_,V)},Bn=(c,_,V)=>{c!==vs.UNKNOWN&&(ge(Vo)&&!ge(Ln)&&Yi("auto",{appliesTo:_,changeReason:"limit-changed"},V),Tr(c,_,V)),P.setPredefinedQualityLimits(c)},Tr=(c,_,V)=>{on(V)&&($u({type:c,videoId:i},_),_==="as-default"&&$u({type:c,videoId:i},"to-video"))},sr=(c,_=!0)=>{fe.log("set playback rate",{playbackRate:c}),P.setPlaybackRate(c),ee.features.saveRate&&we&&!P.info.isLive$.getValue()&&_&&t_(c)},bs=()=>{let c=ge(Pi),_=ge(Oo),V=_.findIndex(({selected:xe})=>xe);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return sr(oe.value),oe},Ze=()=>{let c=ge(Pi),_=ge(Oo),V=_.findIndex(({selected:xe})=>xe);if(V===0||!c)return _[V];let oe=_[V-1];return sr(oe.value),oe},Qt=(c={...mn(),selected:!1},_)=>{fe.log("set subtitles",{...c}),c.value!==kn&&Qi.next(c.isAuto?c.value+"_auto":c.value),Ke.next({enabled:c.value!==kn,lang:c.language,auto:!!c.isAuto}),wr.set(c),on(_)&&(Ef(c.value===kn?void 0:c.language),ee.features.userVideoPrefs&&i&&kf(ee.userSalt,String(i),{subtitleTrackId:c.value===kn?void 0:c.value}))},wi=c=>{fe.log("toggle subtitles");let _=ge(bi);(_==null?void 0:_.value)===kn?Ho(c):Hr(c)},_o=(c,_)=>{fe.log("change subtitle",{enabled:c}),c?Ho(!0,_):Hr(!0)},Ho=(c,_)=>{fe.log("subtitle on");let V=ge(Vn),oe=ge(he),xe=Ie!=null?Ie:oe,Ye;_&&(Ye=V.find(Tt=>Tt.value===_)),Ye!=null||(Ye=V.filter(Tt=>Tt.value!==kn).find(Tt=>Tt.language===xe)),Qt(Ye!=null?Ye:V[1],c)},Hr=c=>{fe.log("subtitle off"),Qt(void 0,c)};ye.add(P.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:xe,isAuto:Ye,id:Tt}of c){let Ut=xe&&Jd(xe);xe&&Ut&&oe.push({id:Tt,language:xe,title:Ye?ut("subtitles_auto",{language:Ut}):Ut})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let Co=de(!0),ar=c=>{Co.set(c)},Fn=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),fe.log("seek to time",{time:c,action:_,forcePrecise:V}),_i.next(_),P.info.isLive$.getValue()){let xe=P.info.duration$.getValue(),Ye=Math.min(0,xe+c);P.seekTime(Ye,V)}else{if(T!=null&&T.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(Nv(c),V)}},aa=c=>{U({message:`seek to episode start time: ${c}`}),fe.log("seek to episode start time",{time:c}),Fn(c,Vs.EPISODE,!0)},Os=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),fe.log("seek to percent",{percent:c,action:_});let oe=ge(Ro)*c;Fn(oe,_,V)},Bs=c=>{U({message:`seek external, time: ${c}`}),fe.log("seek external",{time:c}),_i.next(Vs.UNKNOWN),P.seekTime(P.info.isLive$.getValue()?-c:c)},gn=c=>{var oe,xe;let _=(oe=c.max)!=null?oe:"none",V=(xe=c.min)!=null?xe:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),fe.log("set auto quality limits",{max:_,min:V}),P.setAutoQualityLimits(c)},rt=c=>{U({message:`seek external to episode start time: ${c}`}),fe.log("seek external to episode start time",{time:c}),Fn(c,Vs.EPISODE,!0)},di=c=>{U({message:`set playback rate to: ${c}`}),fe.log("set playback rate external",{playbackRate:c}),P.setPlaybackRate(c)},Mi=de(!1),hn=de(!1),Ur=ui([Ro],([c])=>!!p&&c>=ee.suitableDurationForUsingRichSeek&&ee.features.useRichSeek&&!x),_n=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),be=ui([Jt],([c])=>{let _=Ol(c);return _n?!_:_});ye.add(ze.subscribe(c=>{c!=="video"&&Mi.set(!1)}));let bt=de(void 0),Nt=de(!1),Zt=c=>{U({message:`start scrubbing, progress: ${c}`}),fe.log("start scrubbing",{progress:c}),Nt.set(!0),Si(c)},Si=c=>{bt.set(c)},Ci,ki,yi=()=>{bt.set(void 0),Nt.set(!1)},os=()=>{clearTimeout(ki),clearTimeout(Ci),Ci=window.setTimeout(()=>{yi()},500),ke==null||ke.removeEventListener("seeked",os)},Fs=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),fe.log("complete scrubbing",{progress:c}),Os(c,Vs.SLIDER,_),ge(Kt.ui.isMobile)&&ge(Kt.state.currentFormat$)===ec.HLS?(ke==null||ke.addEventListener("seeked",os),ki=window.setTimeout(()=>{os()},300)):yi()},Ja=ui([qt,Ro,bt],([c,_,V],oe)=>{oe(Ox(V)?V*_:c)}),la=de(!1),da=()=>{la.set(!0)},ns=()=>{la.set(!1)},$s=ui([Ft],([{width:c}],_)=>{let V=B_(c);_(V)}),ca=q.filter(c=>Fh(c)),ua=ui([$s,Be],([c,_])=>_?ca.filter(V=>!V.hideOnMobile):ca.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),bn=de(q.filter(c=>Hh(c))),ys=ui([bn,$s],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),el=ui([ys,ua],([c,_])=>[...ee.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...ee.features.additionalButtons?_.map((V,oe)=>{var xe;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(xe=V.ariaLabel)!=null?xe:V.tooltip,tooltipText:V.tooltip}}):[]]),lr=de(H),Gl=ui([lr],([c])=>ee.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?{..._,onClick:_.onChangeEnabled}:_):[]),tl=(c,_)=>{let V=ge(bn).map(oe=>oe.id!==c?oe:{...oe,..._});bn.set(V)},Yl=c=>{let _=ge(bn);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),bn.set(_)},pa=c=>{let _=ge(bn);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),bn.set(_)},jl=c=>{_i.next(Vs.LIVE),U({message:"live switch to low latency "+c}),fe.log("live switch to low latency "+c),P.setLiveLowLatency(c)},il=(c,_)=>{let V=ge(lr).map(oe=>oe.id!==c?oe:{...oe,..._});lr.set(V)},ol=c=>{let _=ge(lr);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),lr.set(_)},fa=c=>{let _=ge(lr);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),lr.set(_)},it=de(z),ct=ui([it],([c])=>ee.features.additionalContextMenuItems?c:[]),ji=(c,_)=>{let V=ge(it).map(oe=>oe.id!==c?oe:{...oe,..._});it.set(V)},To=c=>{let _=ge(it);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),it.set(_)},Xi=c=>{let _=ge(it);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),it.set(_)},fi=ui([Be,Se],([c,_],V)=>{V(c&&_)}),Fi=()=>{_i.next(Vs.LIVE),U({message:"switch to active live"}),fe.log("switch to active live"),P.seekTime(0),P.info.playbackState$.getValue()!==Bl.PLAYING&&Kt.actions.internal.togglePlay()},Hs=()=>{fe.log("skip adman"),Te.skip()},Xl=(c=!0)=>{var oe;hr(Kt),U({message:`switch from ads to video, callPlay: ${c}`}),fe.log("switch from ads to video",{callPlay:c}),ue.set("video"),c&&P.play(),l&&xo(!0,!0);let _=(oe=ge(Qe))==null?void 0:oe.muted,V=!P.info.muted$.getValue();_!==void 0&&!V&&xo(_,!0),Qe.set(void 0)},Pc=()=>{hr(Kt),U({message:"switch from video to ads"}),fe.log("switch from video to ads"),Kt.actions.internal.pause(),Ao(),ue.set("ads")},vp=c=>{hr(Kt);let _=c?"LiveWaitingStart":"thumb";fe.log("set live waiting start",{state:c,playerPhase:_}),ue.set(_)},Ac=c=>{hr(Kt);let _=c?"LiveWaitingRecover":"thumb";fe.log("set live waiting recover",{state:c,playerPhase:_}),ue.set(_)},gp=c=>{hr(Kt);let _=c?"LiveWaitingRecord":"thumb";fe.log("set live waiting record",{state:c,playerPhase:_}),ue.set(_)},Lc=()=>(hr(Kt),fe.log("get debug text data"),Dh(P,Pe,Kt,Re.getTraceId())),Mc=()=>(hr(Kt),JSON.stringify(Re.getFinishedSpans())),Vc=()=>(hr(Kt),Oh(P,Pe,Kt)),nl=()=>ke,Rc=()=>{U({message:"toggle chromecast"}),fe.log("toggle chromecast"),P.toggleChromecast()},ma=c=>{var V;if(hr(Kt),P.info.isEnded$.getValue())return;let _=!c;if(ge(Kt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),fe.log("pause ads",{internalCall:_}),Te.pause();return}U({message:`pause video, internalCall: ${_}`}),fe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),P.pause()},va=c=>{var V;hr(Kt);let _=!c;if(ge(Kt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),fe.log("play ads",{internalCall:_}),Te.play();return}U({message:`play video, internalCall: ${_}`}),fe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),P.play()},hp=c=>{hr(Kt);let _=!c;if(ge(Kt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${_}`}),L==null||L()},Zl=(c,_)=>{hr(Kt),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),fe.log("first start",{showAds:c,external:_}),c?ue.set("ads"):(ue.set("video"),_?P.play():Kt.actions.internal.togglePlay())},Jl=()=>(U({message:"getting time codes"}),f),Nc=()=>{let c=Jl();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue();return c.find(V=>V.time>_)},_p=c=>{let _=c;_||(_=Nc());let V=P.info.position$.getValue();fe.log("seek to next episode",{currentTime:V,..._}),_&&(U({message:"seek to next episode"}),Fn(_.time,Vs.EPISODE,!0))},Fe=()=>{let c=Jl();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue(),V=c.findIndex(xe=>xe.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},mi=c=>{let _=c;_||(_=Fe());let V=P.info.position$.getValue();fe.log("seek to prev episode",{currentTime:V,..._}),_&&(U({message:"seek to prev episode"}),Fn(_.time,Vs.EPISODE,!0))},Uo=()=>(U({message:"getting preview thumbs data"}),fe.log("get preview thumbs data",{...p}),p),Ir=async()=>{let c=ie==null?void 0:ie.isActive(),_="none";ie!=null&&ie.isActive()?(_="exit",await(ie==null?void 0:ie.exit())):(_="request",await(ie==null?void 0:ie.request())),fe.log("toggle picture in picture",{isActive:c,action:_})},$n=(c=-90)=>{fe.log("rotate video",{alphaDiff:c}),Jt.update(_=>_+c)},Dc=de([]);I==null||I.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,xe],subjects:Ye}=c[V];V===0&&oe!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:oe/1e3,text:"",interactive:!0,completed:ee.features.interactiveTimeOpenUri?!Ye.length||Ye.every(Tt=>Tt.isRemoved):!Ye.length}),xe!==1/0&&_.push({time:xe/1e3,text:"",interactive:!1,completed:!0})}Dc.set(_)});let Hb=de(!1);T==null||T.subscribe(c=>{c&&ge(Nt)&&yi()});let Nv=c=>{if(!x)return c;let _=ge(Dc),V=ge(Ro),xe=ge(Jn)/V,Ye=_.find(Tt=>Tt.interactive&&!Tt.completed&&Tt.time>xe);return typeof(Ye==null?void 0:Ye.time)=="number"?Math.min(c,Ye.time-.05):c},Ub=()=>{Kt.ui.episodes.panelOpened$.set(!1)},zb=()=>{fe.log("destroy store"),clearTimeout(ki),clearTimeout(Ci),ye.unsubscribe(),Lo.unsubscribe(),P.destroy(),Te.destroy(),J==null||J.destroy(),Z==null||Z.destroy(),Y.unsubscribe(),Xt==null||Xt.disconnect(),Xt=null,et.destroy()},Wb=ui([Zn,ze,Pi],([c,_,V])=>v.features.doubleForwardAvailable&&!c&&_==="video"&&V),bp=de(!1),Dv=2,Oc=null,Ov=c=>{if(!ge(Xn)&&c)return;let _=P.info.currentPlaybackRate$.getValue();c?_!==Dv&&(Oc=_,sr(Dv,!1),bp.set(!0)):(Oc&&sr(Oc,!1),bp.set(!1),Oc=null)};ze.subscribe(c=>{c!=="video"&&Ov(!1)});let Kb=()=>{ma(!1),Mi.set(!0)},qb=()=>{va(!1),Mi.set(!1)},$p=!1,Qb=()=>{hn.set(!0),$p=P.info.playbackState$.getValue()===Bl.PLAYING,ma(!1)},Gb=()=>{hn.set(!1),!ge(Mi)&&$p&&va(!1),$p=!1};P.events.playing$.subscribe(()=>{ge(Mi)&&ma(!1)});let Kt={interfaceLanguage$:he,isCyrillicRelatedInterface$:nt,initVideo:ci,videoId:i,isClip:o,playerPhase:ze,vsid:Vt,state:{positionExact$:qt,positionWithScrubbing$:Ja,duration$:Ro,playbackState$:ot,playbackStateRealistic$:Oi,isPlaying$:Xn,isLoaderVisible:qi,bufferedProgress$:tn,isLive$:io,canChangePlaybackSpeed$:Pi,isActiveLive$:Zn,isOldestAvailableLive$:Nr,isRewindableLive$:oo,isEnded$:Mo,muted$:vo,volume$:mo,trafficSavingEnabled$:Ei,highQualityEnabled$:Xo,autoQualityLimitingAvailable$:Vo,availableVideoStreams$:er,availableAudioStreams$:un,videoStream$:go,audioStream$:yr,currentQuality$:Jo,isAutoQualityEnabled$:Ln,availableQualities$:xr,currentPlaybackRate$:Do,availablePlaybackRates$:Oo,currentSubtitle$:bi,availableTextTracks$:vn,availableSubtitlesList$:Vn,currentSubtitleCaptions$:no,isAutoSubtitleCaptionVisible$:ro,chromecastState$:br,chromecastDeviceName$:hs,chromecastConnected$:Dr,currentFormat$:Jr,throughputEstimation$:es,videoBitrate$:jn,videoSize$:Rr,errorLog$:Ot,crashed$:Se,isAudioAvailable$:An,isAudioDisabled:!!l,canDownload:ee.features.download&&!!d,availableSources$:Bi,hasMpegSources$:Gi,isInteractive:x,showInteractiveGraph:ee.features.interactiveGraph,showSeekToInteractive:ee.features.seekToInteractive,showPlayPrevChapter:ee.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ee.features.interactiveTimeIndicator&&!!ge(Dc).length,interactiveEpisodes$:Dc,isInteractiveTime$:T?ii(T):de(!1),isInteractiveExpectation$:Hb,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,looped$:wo,loadedMetadata$:It,isAutoQualityAvailable$:fn,previewTrackActive:Mi,previewTrackDragInProgress:hn},ui:{t:ut,controlsVisible:de(!1),touched:de(!1),controls:{prevButton:de(void 0),playButton:de(void 0),replayButton:de(void 0),nextButton:de(void 0),playPrevChapterButton:de(void 0),seekToInteractiveButton:de(void 0),interactiveGraphButton:de(void 0),liveButton:de(void 0),time:de(void 0),episodes:de(void 0),volume:de(void 0),subtitles:de(void 0),settings:de(void 0),context:de(void 0),chromecast:de(void 0),pip:de(void 0),fullscreen:de(void 0),vkLogo:de(void 0),interactiveTimeIndicator:de(void 0),timeline:de(void 0),autoplayNextToggle:de(void 0),additionalButtons:q.length?q.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:Bt},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:pt,isFullscreenOpenedByKeyboard:Dt,rotateAlpha:Jt,isAutoplay:de(!1),debugPanelVisible:de(!1),episodes:{panelOpened$:de(!1),openedByKeyboard$:de(!1)},contextMenu:{visible$:de(!1),btnRef$:de(void 0),openedByBtnKeyboard$:de(!1),openedByHotKey$:de(!1),lastActiveElem$:de(void 0),showContextMenuBtn$:de(!1),position$:de({top:0,left:0})},playerSize:Ft,isMobile:Be,mobileNotReportControlHidden$:fi,icon3DVideoVisible:de(!1),scrubbingInProgress:Nt,volumeChangingInProgress:la,is3DVideo:Rt,currentGridType$:$s,additionalButtonsDeprecated$:ua,additionalDesktopControlPanelRightButtons$:el,additionalSettingsMenuItems$:Gl,additionalContextMenuItems$:ct,interactiveHideMobileControls:de(!1),overlayContainer$:de(void 0),startedByKeyboard$:de(!1),autoplayNextEnabled$:de(!1),timerNextVideoRunning$:de(!0),settingsMenu:{visible$:de(!1),ref$:de(void 0),openedByBtnKeyboard$:de(!1)},settingsSubMenu:{visible$:de(!1),ref$:de(void 0),name$:de(void 0)},userActionsDisabled:de(!1),hiddenControls:{volume:de(!1),vkLogo:de(!1),pip:de(!1),chromecast:de(!1),settings:de(!1)},isControlsAvailable:Co,controlBlocks:{topLeft:de(void 0),topRight:de(void 0),middle:de(void 0),bottom:de(void 0),bottomLeft:de(void 0),bottomRight:de(void 0)},videoTitleInfo:de(void 0),doubleForwardOn$:bp,doubleForwardAvailable$:Wb,previewTrackNotificationVisible:de(!1),previewTrackActive:Mi,previewTrackDragInProgress:hn,previewTrackAvailable:Ur,isPreviewTrackHorizontallyAligned:be},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Oe,focusManager:tt},actions:{internal:{preload:nn,firstStart:c=>Zl(c,!1),play:()=>va(!1),pause:()=>ma(!1),togglePlay:ho,toggleMuted:Fr,openSettingsMenu:_s,closeSettingsMenu:Li,openSettingsSubMenu:is,closeSettingsSubMenu:ts,setVolume:c=>nr(c,!1),setMuted:c=>xo(c,!1),startVolumeChanging:da,stopVolumeChanging:ns,setVideoStream:tr,setAudioStream:c=>ft(c,!1),setQuality:(c,_)=>Yi(c,_,!1),setTrafficSavingEnabled:(c,_)=>Dn(c,_,!1),setHighQualityEnabled:(c,_)=>On(c,_,!1),setPlaybackRate:sr,incrementPlaybackRate:bs,decrementPlaybackRate:Ze,setSubtitle:c=>Qt(c,!1),toggleSubtitle:()=>wi(!1),togglePictureInPicture:Ir,startScrubbing:Zt,progressScrubbing:Si,completeScrubbing:Fs,toggleChromecast:Rc,switchToActiveLive:Fi,switchFromAdsToVideo:Xl,switchFromVideoToAds:Pc,skipAd:Hs,setLiveWaitingStart:vp,setLiveWaitingRecover:Ac,setLiveWaitingRecord:gp,getDebugTextData:Lc,getTraceTextData:Mc,getDebugPanelData:Vc,getVideoElement:nl,seekTime:(c,_,V)=>Fn(c,_,V),clearDelayedBufferingCheckTimeout:$r,seekEpisodeStartTime:aa,seekToPercent:Os,getNextEpisode:Nc,seekToNextEpisode:_p,getPrevEpisode:Fe,seekToPrevEpisode:mi,startLogging:xt,stopLogging:Ht,startCameraManualRotation:W,stopCameraManualRotation:Et,moveCameraFocusPX:ri,holdCamera:dt,releaseCamera:wt,getVideoEpisodes:Jl,getPreviewThumbsData:Uo,downloadVideo:Rn,addLanguage:Pf,setLanguage:le,nextMovie:vt,videoRotate:$n,correctSeekTimeToInteractive:Nv,replayInteractive:N,setLooped:rr,reportProblem:He,setAutoplayNextEnabled:kt,setTimerNextVideoRunning:$i,prevVideoClick:Bo,nextVideoClick:ao,nextVideoAnnouncementShow:So,nextVideoAnnouncementClick:lo,nextVideoAnnouncementAuto:Fo,nextVideoAnnouncementCancel:Nn,checkFullscreenSupport:at,changeDoubleForwardOn:Ov,closePreviewTrack:qb,previewTrackOpened:Kb,previewTrackDragStarted:Qb,previewTrackDragFinished:Gb},external:{firstStart:c=>Zl(c,!0),play:()=>va(!0),pause:()=>ma(!0),stop:()=>hp(!0),seekTime:c=>Bs(c),seekEpisodeStartTime:c=>rt(c),setPlaybackRate:c=>di(c),setAutoQualityLimits:c=>gn(c),setMuted:c=>xo(c,!0),toggleSubtitle:()=>wi(!0),changeSubtitle:_o,setVolume:c=>nr(c,!0),returnFocusToEpisodes:Ub,updateAdditionalSettingsItem:il,addAdditionalSettingsItem:ol,removeAdditionalSettingsItem:fa,updateAdditionalContextItem:ji,addAdditionalContextItem:To,removeAdditionalContextItem:Xi,updateAdditionalButton:tl,addAdditionalButton:Yl,removeAdditionalButton:pa,setLiveLowLatency:jl,hideControls:()=>ar(!1),showControls:()=>ar(!0),setQuality:c=>Yi(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Dn(c,"to-video",!0),setHighQualityEnabled:c=>On(c,"to-video",!0),changeAudioStream:Or}},callbacks:s,setUiCallbacks:c=>{Ue={...c}},getAdmanWrapper:()=>Te,getLogger:()=>We,getPlayer:()=>P,destroy:zb};return Kt};function Gn(t,e,i,o){var f;let r=(f=e[i])==null?void 0:f.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=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 Yx=["disabledControls$","additionalButtons"],jx=["interactiveTimeIndicator"],Ul=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Yx.includes(r)){let l=o||jx.includes(r);a.set(Gn(t,i,r,l))}}};var Yu=async(t,e,i)=>{await fo(),e&&i&&(i.focus(),t.set(!1))};var Xx=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 $m(t){Xe(t,{children:(e,i)=>{var o=Xx();b(e,o)},$$slots:{default:!0}})}function ym(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(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$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,$=K(void 0);Ne(()=>{n($)&&St(()=>{v.set(n($))})});let y=T=>{let N=ia(T),L=L_(n($));p.set(L),u.set(N),s.set(!r())},h=()=>{f.set(!0)},x=()=>{f.set(!1)},I=m(()=>r()?"opened":"");Wt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:h,blur:x,get ariaExpanded(){return r()},get ref(){return n($)},set ref(T){D($,T,!0)},children:(T,N)=>{$m(T,{})},$$slots:{default:!0}}),F(),o()}var Zx=t=>{t.stopPropagation()},Jx=M("<div><!> <div></div> <div></div></div>"),e2={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 tc(t,e){var Z;B(e,!0),Q(t,e2);let[i,o]=Ve(),r=()=>w(x,"$isMobile",i),a=()=>w(L,"$areControlsVisible",i),l=()=>w(k,"$currentGridType$",i),d=()=>w(T,"$isInteractiveTime$",i),s=()=>w(h,"$interactiveControlsOpacity$",i),u=()=>w(N,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>w(I,"$isFullscreen",i),p=g(e,"ref",15,void 0),v=K(void 0),$=ve(),y=$o(),{interactiveControlsOpacity$:h}=y,x=$.ui.isMobile,I=$.ui.isFullscreen,T=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,L=$.ui.controlsVisible,E=(Z=$.callbacks)==null?void 0:Z.onInteractiveTimeIndicatorClick,k=$.ui.currentGridType$,q=m(()=>!r()&&a()),H=m(()=>Ls(l(),"s")),z=m(()=>!d()||!!s()||n(q)),j=K(!1);Ne(()=>{D(j,n(z),!0)});let ae=()=>{D(j,!0)},X=()=>{var ie;ne(),(ie=n(v))==null||ie.addEventListener("animationiteration",ae,{once:!0})},ne=()=>{var ie;D(j,!1),(ie=n(v))==null||ie.removeEventListener("animationiteration",ae)},J=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Ne(()=>{u()?X():ne()});let pe=()=>{n(z)||(N.set(!0),E==null||E())};an(()=>{N.clearTimeout(),ne()});let re=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var $e=Jx();let ee;$e.__mousemove=[Zx],$e.__click=pe;var Re=C($e);Po(Re,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:J,get ref(){return p()},set ref(ie){p(ie)},children:(ie,De)=>{Qd(ie,{completed:!0})},$$slots:{default:!0}});var fe=A(Re,2);let P;je(fe,ie=>p(ie),()=>p());var We=A(fe,2);let Te;je(We,ie=>D(v,ie),()=>n(v)),S($e),O((ie,De,Oe)=>{ee=se($e,1,"interactive-episode-icon-animated s-26",null,ee,ie),P=se(fe,1,"ref-block s-26",null,P,De),Te=se(We,1,"pulse s-26",null,Te,Oe)},[()=>({mobile:r(),fullscreen:f(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(j)})]),st("mouseleave",$e,re),b(t,$e),F(),o()}Ge(["mousemove","click"]);function ju(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);Po(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=Ae();let f=m(()=>e.buttonComponent);var p=ce(u);Ni(p,()=>n(f),(v,$)=>{$(v,jr(()=>{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 i2=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 sa(t,e){B(e,!0);let i=g(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=m(()=>`${ln(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=i2();b(l,s)},$$slots:{default:!0}}),F()}var o2=M('<div class="icon-background-mobile s-24"><!></div>'),n2={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:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ua(t,e){B(e,!0),Q(t,n2);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=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}`);Wt(t,{get className(){return n(u)},get testId(){var f;return`btn-${(f=e.type)!=null?f:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{var v=Ae(),$=ce(v);{var y=x=>{var I=o2(),T=C(I);let N=m(()=>e.type==="prev");sa(T,{get size(){return"32"},get reversed(){return n(N)}}),S(I),b(x,I)},h=x=>{let I=m(()=>e.type==="prev");sa(x,{get size(){return"24"},get reversed(){return n(I)}})};R($,x=>{o()?x(y):x(h,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var r2=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 ic(t,e){B(e,!0);let i=m(()=>ln(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=r2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as s2}from"@vkontakte/videoplayer-shared/es2018";var a2=M('<div class="icon-background-mobile s-25"></div>'),l2=M("<!> <div><!></div>",1),d2={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 zl(t,e){B(e,!0),Q(t,d2);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,s2),d=G("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Wt(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,f)=>{var p=l2(),v=ce(p);{var $=T=>{var N=a2();b(T,N)};R(v,T=>{o()&&T($)})}var y=A(v,2);let h;var x=C(y);let I=m(()=>o()?"48":"24");ic(x,{get size(){return n(I)}}),S(y),O(T=>h=se(y,1,"s-25",null,h,T),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var c2=Ce('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Ns(t,e){B(e,!0);let i=m(()=>ln(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=c2();b(o,a)},$$slots:{default:!0}}),F()}import{noop as u2}from"@vkontakte/videoplayer-shared/es2018";var p2=M('<div class="icon-background-mobile s-1z"><!></div>'),f2={hash:"s-1z",code:".icon-background-mobile.s-1z{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 Wl(t,e){B(e,!0),Q(t,f2);let[i,o]=Ve(),r=()=>w(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=$o(),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),f=g(e,"className",3,""),p=g(e,"click",3,u2),$=ve().ui.t,{toggle:y}=a,h=m(()=>y),x=m(()=>r()!==null),I=m(()=>n(x)?r():s()),T=m(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(I)?Ns:En),L=m(()=>`${d()?"btn-m--play":""} ${f()}`),E=m(()=>n(x)?n(h):p());Wt(t,{get className(){return n(L)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return us.KeyK},get ref(){return l()},set ref(k){l(k)},children:(k,q)=>{var H=Ae();let z=m(()=>n(N));var j=ce(H);{var ae=ne=>{var J=p2(),we=C(J);Ni(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"48"}})}),S(J),b(ne,J)},X=ne=>{var J=Ae(),we=ce(J);Ni(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"24"}})}),b(ne,J)};R(j,ne=>{d()?ne(ae):ne(X,!1)})}b(k,H)},$$slots:{default:!0}}),F(),o()}var m2=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 xm(t){Xe(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=m2();b(e,o)},$$slots:{default:!0}})}function oc(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=m(()=>o()?"hidden":"");Wt(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)=>{xm(d,{})},$$slots:{default:!0}}),F()}var v2=M('<span class="gutter s-27"><span><!></span></span>'),g2={hash:"s-27",code:".gutter.s-27{--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-27{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-27{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function nc(t,e){B(e,!0),Q(t,g2);let[i,o]=Ve(),r=()=>w(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,f=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",$="#000",y=m(()=>r()?"true":"false");Wt(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(h){a(h)},children:(h,x)=>{var I=v2(),T=C(I);let N;var L=C(T);{var E=q=>{En(q,{get size(){return v},fill:$})},k=q=>{Ns(q,{get size(){return v},fill:$})};R(L,q=>{r()?q(E):q(k,!1)})}S(T),S(I),O(q=>N=se(T,1,"toggler s-27",null,N,q),[()=>({enabled:r()})]),b(h,I)},$$slots:{default:!0}}),F(),o()}var h2=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 wm(t){Xe(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=h2();li(),b(e,o)},$$slots:{default:!0}})}function rc(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=m(()=>o()?"hidden":"");Wt(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)=>{wm(d,{})},$$slots:{default:!0}}),F()}var _2=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>'),b2=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 Sm(t,e){let i=g(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=b2(),d=A(ce(l));{var s=u=>{var f=_2();b(u,f)};R(d,u=>{i()&&u(s)})}b(r,l)},$$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(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":"");Wt(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{let v=m(()=>!!a());Sm(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),F()}import{PlaybackState as j_}from"@vkontakte/videoplayer-core/es2018";function ac(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(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$,f=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}r()===j_.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),h=m(()=>l()&&r()===j_.PLAYING);Wt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(h)},get ariaLabel(){return d()},get click(){return n(v)},children:(x,I)=>{Rd(x,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}import{noop as X_}from"@vkontakte/videoplayer-shared/es2018";var $2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),y2=M('<img class="icon" aria-hidden="true"/>');function za(t,e){"use strict";let i=K(!1),o=()=>{D(i,!0)};var r=Ae(),a=ce(r);{var l=s=>{var u=$2();b(s,u)},d=s=>{var u=y2();O(()=>Le(u,"src",e.icon)),st("error",u,o),Ia(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function Cm(t,e){B(e,!0);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,X_),r=g(e,"ref",15),a=m(()=>o()===X_),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Po(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Wt(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(f)},children:(p,v)=>{za(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var Z_=t=>!!t.buttonComponent;var Ds={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Xu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Gn(t,i,r,o))};import{interpolate as Tm}from"@vkontakte/videoplayer-shared/es2018";var J_=10,eb=40,Im=.2,w2=.5,S2=65,C2=114,T2=4,tb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?S2:C2),r=K(!1),a=K(0),l=K(0),d=m(()=>n(o)+J_-eb-T2),s=m(()=>Tm(n(a),[Im,1],[0,-n(d)])),u=m(()=>Tm(n(a),[Im,1],[0,eb])),f=m(()=>Tm(n(a),[Im,1],[0,n(o)+J_]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:h=>{var x;D(l,((x=e())==null?void 0:x.getBoundingClientRect().bottom)||0,!0),D(r,!0)},onPointerMove:h=>{if(!n(r))return;let x=Math.max(Math.min(h.clientY-n(l),0),-n(d));D(a,Math.abs(x/n(d)),!0)},onPointerUp:()=>{D(r,!1),D(a,n(a)>=w2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{D(a,0)}}};var I2=t=>t;function gs(t,{delay:e=0,duration:i=400,easing:o=I2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var E2=M('<span class="root s-2d"> </span>'),k2={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 Em(t,e){Q(t,k2);var i=E2(),o=C(i,!0);S(i),O(()=>me(o,e.time)),b(t,i)}var P2=M('<div class="tooltip-wrapper s-v"><div><!></div></div>'),A2={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 km(t,e){Q(t,A2);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=K(void 0),u=K(void 0);function f(x){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return x<T?T+l():x>e.containerWidth-T?e.containerWidth-T-d():x}let p=m(()=>f(r()));var v=P2(),$=C(v);let y;var h=C($);ti(h,()=>{var x;return(x=e.children)!=null?x:mt}),S($),je($,x=>D(u,x),()=>n(u)),S(v),je(v,x=>D(s,x),()=>n(s)),O(x=>{qe(v,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-v",null,y,x),qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var ib=t=>Math.abs(t)/90%4===1;var L2=M('<div class="preview s-u"></div>'),M2=M('<div class="time s-u"> </div>'),V2=M('<div><!> <div class="episode s-u"><!></div> <!></div>'),R2={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 Pm(t,e){B(e,!0),Q(t,R2);let[i,o]=Ve(),r=()=>w(y,"$rotateAlpha",i),a=()=>w(h,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=g(e,"time",3,""),s=g(e,"isMobile",3,!1),u=g(e,"videoEpisodes",19,()=>[]),f=g(e,"progress",3,0),p=g(e,"duration",3,0),v=g(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,h=$.ui.playerSize,x=K(0),I=K(0),T=K(""),N=K(0),L=K(0),E=K(0),k=K(0),q=m(()=>Hu(f(),p(),u())),H=m(()=>Ol(r())),z=m(()=>ib(r())),j=m(ne),ae=m(()=>(n(z)?1:-1)*(n(x)/2-n(I)/2)),X=m(()=>n(ae)*-1);Ne(()=>{(Z=>{D(x,Z.width,!0),D(I,Z.height,!0)})(we())}),Ne(()=>{(Z=>{D(T,Z.imgSrc,!0),D(N,Z.imgWidth,!0),D(L,Z.imgHeight,!0),D(E,Z.imgOffsetX,!0),D(k,Z.imgOffsetY,!0)})(pe(f()))});function ne(){var Oe;let Z=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=J(),De=30;return(Oe=n(q))!=null&&Oe.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),Z)}function J(){let Z=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>Z;return{width:Z,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:Z,isHorizontal:ie,isVertical:De,width:Oe}=J();return ie&&(Z=Z/Oe*n(j),Oe=n(j)),De&&(Oe=Oe/Z*n(j),Z=n(j)),{width:Oe,height:Z}}function pe(Z){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*Z/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*Z)));let De=Math.floor(ie/e.previewThumbsData.countPerImage),Oe=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),tt=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 Pe=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Pe=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let ke=n(x)*Pe,Ue=n(I)*U,et=-tt*n(x),ye=-Oe*n(I);return{imgSrc:e.previewThumbsData.links[De],imgWidth:ke,imgHeight:Ue,imgOffsetX:et,imgOffsetY:ye}}var re=V2();let _e;var $e=C(re);{var ee=Z=>{var ie=L2();O(()=>qe(ie,`width: ${n(x)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(N)}px ${n(L)}px; background-position: ${n(E)}px ${n(k)}px;
61
- transform: rotate(${r()}deg) ${n(H)?`translate(${n(ae)}px, ${n(X)}px)`:""};
62
- `)),b(Z,ie)};R($e,Z=>{n(T)&&Z(ee)})}var Re=A($e,2),fe=C(Re);{var P=Z=>{var ie=Ae(),De=ce(ie);{var Oe=U=>{var Pe=cs();O(ke=>me(Pe,ke),[()=>G("tooltip_episode_unfinished")]),b(U,Pe)},tt=U=>{var Pe=cs();O(()=>me(Pe,n(q).text||"")),b(U,Pe)};R(De,U=>{v()&&n(q).completed===!1?U(Oe):U(tt,!1)})}b(Z,ie)};R(fe,Z=>{n(q)&&Z(P)})}S(Re);var We=A(Re,2);{var Te=Z=>{var ie=M2(),De=C(ie,!0);S(ie),O(()=>me(De,d())),b(Z,ie)};R(We,Z=>{v()||Z(Te)})}S(re),O(Z=>{_e=se(re,1,"timeline-preview s-u",null,_e,Z),qe(re,`width: ${n(H)?n(I):n(x)}px;`)},[()=>({mobile:s()})]),b(t,re),F(),o()}var N2=M('<span class="time s-f"> </span>'),D2=M("<!> <!>",1),O2={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 Am(t,e){var le,he,Me,nt,ut;B(e,!0),Q(t,O2);let[i,o]=Ve(),r=()=>w(X,"$interactiveEpisodes$",i),a=()=>w(k,"$duration$",i),l=()=>w(E,"$position$",i),d=()=>w(we,"$isInteractiveExpectation$",i),s=()=>w(J,"$isInteractiveTime$",i),u=()=>w($e,"$previewTrackActive",i),f=()=>w(q,"$isLive$",i),p=()=>w(_e,"$disabledControls$",i),v=()=>w(z,"$isMobile",i),$=()=>w(H,"$isActiveLive$",i),y=()=>w(L,"$bufferedProgress$",i),h=g(e,"showTimeline",3,!1),x=g(e,"withEpisodes",3,!0),I=g(e,"ref",15,void 0),T=ve(),N=At(),L=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,k=T.state.duration$,q=T.state.isLive$,H=T.state.isActiveLive$,z=T.ui.isMobile,j=N.features.episodes&&x()?T.actions.internal.getVideoEpisodes():void 0,ae=T.actions.internal.getPreviewThumbsData(),X=T.state.interactiveEpisodes$,ne=T.state.isInteractive,J=T.state.isInteractiveTime$,we=T.state.isInteractiveExpectation$,pe=T.actions.internal.correctSeekTimeToInteractive,re=(le=T.callbacks)==null?void 0:le.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,$e=T.ui.previewTrackActive,ee=(Me=(he=T.callbacks)==null?void 0:he.uiInfo)==null?void 0:Me.onTimelineMouseEnter,Re=(ut=(nt=T.callbacks)==null?void 0:nt.uiInfo)==null?void 0:ut.onTimelineMouseLeave,fe=T.ui.t,P=N.features.interactiveResponsiveUi,We=m(()=>ne?r():j),Te=m(()=>Yo(a())),Z=m(()=>Yo(l())),ie=m(()=>l()/a()),De=m(()=>d()||s()),Oe=K(!1),tt=K(""),U=K(0),Pe=K(0),ke=K(0),Ue=m(()=>({containerWidth:n(Pe),translateXPx:n(U),translateYPx:ne&&ae?-36:-16,active:n(Oe)&&h()&&!n(De)&&!P&&!u(),pointer:!N.features.timelinePreview||!ae||f()})),et=fe("aria_timeline"),ye=m(()=>fe("aria_timeline_value",{position:n(Z),duration:n(Te)}));function Ie(ue){return!pe||!ne?ue:pe(ue*a())/a()}function Be(ue,ze){var Qe;(Qe=e.onSliderPointerDown)==null||Qe.call(e,ze),T.actions.internal.startScrubbing(Ie(ue))}function Vt(ue){s()||T.actions.internal.progressScrubbing(Ie(ue))}function pt(ue){var ze;T.actions.internal.completeScrubbing(Ie(ue)),D(Oe,!1),(ze=e.onSliderPointerUp)==null||ze.call(e)}function Dt(ue,ze,Qe){var lt;(lt=e.onSliderPointerEnter)==null||lt.call(e,ue),Jt(ue,ze,Qe),D(Oe,!0)}function at(ue,ze,Qe,lt){var Bt;(Bt=e.onSliderMove)==null||Bt.call(e,lt,ue),Jt(ue,ze,Qe),D(Oe,!0)}function yt(){var ue;D(Oe,!1),(ue=e.onSliderLeave)==null||ue.call(e)}function Jt(ue,ze,Qe){D(ke,Ie(ue),!0),D(U,ze,!0),Qe&&D(Pe,Qe,!0),D(tt,It(ue),!0)}function It(ue){let ze=Yo((f()?1-ue:ue)*a());return f()?`-${ze}`:ze}let Rt=m(()=>p().has("TIMELINE"));var Ot=D2(),Y=ce(Ot);km(Y,jr(()=>n(Ue),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ue,ze)=>{var Qe=Ae(),lt=ce(Qe);{var Bt=ei=>{Pm(ei,{get time(){return n(tt)},get isMobile(){return v()},get videoEpisodes(){return n(We)},get previewThumbsData(){return ae},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return ne}})},Ft=ei=>{var vi=N2(),qi=C(vi,!0);S(vi),O(()=>me(qi,n(tt))),b(ei,vi)};R(lt,ei=>{N.features.timelinePreview&&ae&&!f()?ei(Bt):ei(Ft,!1)})}b(ue,Qe)},$$slots:{default:!0}}));var Se=A(Y,2);Fa(Se,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},get ariaLabel(){return et},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:Be,onHandleMove:Vt,onPointerMove:at,onPointerUp:pt,onPointerEnter:Dt,onPointerLeave:yt,get onMouseEnter(){return ee},get onMouseLeave(){return Re},get onDisabledClick(){return re},get isInteractive(){return ne},get disabled(){return n(Rt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:pt,get ref(){return I()},set ref(ue){I(ue)}}),b(t,Ot),F(),o()}var B2={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 lc(t,e){B(e,!0),Q(t,B2);let[i,o]=Ve(),r=()=>w(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,f=m(()=>Yo(l())),p=m(()=>Yo(a())),v=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Fa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var F2=M("<div><!></div>"),H2=M("<div></div>"),U2={hash:"s-c",code:".timeline.s-c{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-c{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-c{padding:0}.timeline-stub.s-c{min-width:20px;width:100%}.timeline-stub.mobile.s-c{height:8px}"};function Wa(t,e){B(e,!0),Q(t,U2);let[i,o]=Ve(),r=()=>w(x,"$isLive$",i),a=()=>w(N,"$isMobile",i),l=()=>w(L,"$disabled",i),d=()=>w(T,"$adPosition",i),s=()=>w(I,"$adDuration",i),u=g(e,"isAds",3,!1),f=g(e,"isHidden",3,!1),p=g(e,"timelineNotAvailable",3,!1),v=g(e,"needPadding",3,!0),$=g(e,"ref",15,void 0),y=ve(),h=At(),x=y.state.isLive$,I=y.ads.duration,T=y.ads.position,N=y.ui.isMobile,L=de(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var k=Ae(),q=ce(k);{var H=j=>{var ae=F2();let X;var ne=C(ae);{var J=pe=>{lc(pe,{get position(){return d()},get duration(){return s()}})},we=pe=>{Am(pe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return $()},set ref(re){$(re)}})};R(ne,pe=>{u()?pe(J):pe(we,!1)})}S(ae),ks(ae,()=>Pl(f()&&h.features.usePerformanceFix,L,h.disableInvisibleComponentsTimeout)),O(pe=>X=se(ae,1,"timeline s-c",null,X,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(j,ae)},z=j=>{var ae=H2();let X;O(ne=>X=se(ae,1,"timeline-stub s-c",null,X,ne),[()=>({mobile:a()})]),b(j,ae)};R(q,j=>{n(E)?j(H):j(z,!1)})}b(t,k),F(),o()}import{getRangeAroundIndex as z2}from"@vkontakte/videoplayer-shared/es2018";var W2=(t,e,i,o,r,a,l)=>{D(e,!0),D(i,t.clientX,!0),D(o,n(r),!0),a(l())},K2=M("<div></div>"),q2=M('<div><div class="track s-2b"></div></div>'),Q2={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 Mm(t,e){B(e,!0),Q(t,Q2);let[i,o]=Ve(),r=()=>w(N,"$rotateAlpha",i),a=()=>w(h,"$position$",i),l=()=>w(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:h}=d.state,{startScrubbing:x,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,N=d.ui.rotateAlpha,L=K(void 0),E=K(!1),k=K(0),q=K(0),H=K(0),z=K(0),j=m(()=>v<=$),ae=m(()=>Ol(r())),X=m(()=>n(j)?!n(ae):n(ae)),ne=114,J=65,we=3,pe=m(()=>n(X)?ne:J),re=m(()=>n(j)?ne:J),_e=m(()=>n(j)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),$e=m(()=>f*n(pe)),ee=K(0);Ne(()=>{D(z,Math.ceil(-n(H)/n(pe))-1),D(H,-n($e)*a()/l())});let Re=()=>{T(fe(),!0)},fe=()=>l()*-n(H)/n($e)/l(),P=!1,We=ye=>{if(!n(E))return!1;let Ie=ye.clientX-n(k);D(H,n(q)+Ie),D(H,Math.max(Math.min(n(H),0),-n($e)),!0),Math.abs(Ie)>1&&(P=!0),I(fe())},Te=ye=>{n(E)&&(D(E,!1),!P&&ye&&D(H,-(ye.offsetX-n(ee)/2)),P=!1,Re())},Z=()=>{n(E)&&Te()},ie=m(()=>s/u),De=(ye,Ie)=>{if(ye!==p.length-1)return u;let Be=0,Vt=Ie*u;for(let pt=1;pt<=u;pt++)ye*s+Be+Vt<f&&Be++;return Be},Oe=m(()=>Math.floor(n(z)/s)),tt=m(()=>z2(3,n(Oe),p.length-1)),U=(ye,Ie,Be)=>{let Vt=s*n(pe);return ye*Vt+Ie*n(pe)*u+n(ee)/2-we/2+Be*n(pe)},Pe=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(re)}px`,`--frame-height: ${n(_e)}`].join(";"));var ke=q2();let Ue;var et=C(ke);et.__pointerdown=[W2,E,k,q,H,x,fe],et.__pointermove=We,et.__pointerup=Te,hi(et,20,()=>n(tt),ye=>ye,(ye,Ie)=>{var Be=Ae(),Vt=ce(Be);hi(Vt,16,()=>Array.from({length:n(ie)},(pt,Dt)=>Dt),pt=>pt,(pt,Dt)=>{var at=Ae(),yt=ce(at);hi(yt,16,()=>Array.from({length:De(Ie,Dt)},(Jt,It)=>It),Jt=>Jt,(Jt,It)=>{var Rt=K2();O((Ot,Y)=>{qe(Rt,Ot),se(Rt,1,Y,"s-2b")},[()=>`--row-index: ${Dt}; --column-index: ${It}; left: ${U(Ie,Dt,It)}px; background-image: url(${p[Ie]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(Jt,Rt)}),b(pt,at)}),b(ye,Be)}),S(et),S(ke),je(ke,ye=>D(L,ye),()=>n(L)),O(ye=>{Ue=se(ke,1,"root s-2b",null,Ue,ye),qe(ke,n(Pe)),qe(et,`transform: translateX(${n(H)}px); width: ${n($e)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(ae)})]),st("mouseleave",et,Z),Tn(ke,"clientWidth",ye=>D(ee,ye)),b(t,ke),F(),o()}Ge(["pointerdown","pointermove","pointerup"]);var G2=M('<div class="notification s-2c"><span class="description s-2c"> </span></div>'),Y2={hash:"s-2c",code:".notification.s-2c{background:var(--notification-bg);border-radius:var(--notification-radius);padding:9px 14px 10px 12px}.description.s-2c{font-size:14px;line-height:18px}"};function Vm(t,e){B(e,!1),Q(t,Y2);let i=340,{ui:{t:o}}=ve();bo();var r=G2(),a=C(r),l=C(a,!0);S(a),S(r),O(d=>me(l,d),[()=>o("preview_track_close_tooltip")],yn),Yr(3,r,()=>gs,()=>({duration:i})),b(t,r),F()}import{getRangeAroundIndex as j2}from"@vkontakte/videoplayer-shared/es2018";var X2=M('<div class="preview-track-close tooltip s-28"><!></div>'),Z2=M('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),J2=M('<div class="wrapper-preview-track s-28"><!></div>'),ew=M('<div class="enriched-timeline s-28"><!> <!> <!></div>'),tw={hash:"s-28",code:".enriched-timeline.s-28{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-28{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-28{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-28{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-28:hover+.tooltip:where(.s-28){opacity:1}.wrapper-preview-track.s-28{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function Rm(t,e){B(e,!0),Q(t,tw);let[i,o]=Ve(),r=()=>w(h,"$playerSize",i),a=()=>w(y,"$duration$",i),l=()=>w(x,"$previewTrackActive",i),d=()=>w(v,"$position$",i),s=()=>w($,"$isRewindableLive$",i),u=g(e,"timelineRef",15,void 0),f=ve(),p=200,{positionWithScrubbing$:v,isRewindableLive$:$,duration$:y}=f.state,{playerSize:h,previewTrackActive:x}=f.ui,{countPerImage:I=0,links:T=[],frequency:N=0}=f.actions.internal.getPreviewThumbsData()||{},L=m(()=>r().width>100),E=K(!d_()),k=()=>{n(E)&&(l_(),D(E,!1))},q=pe=>{let re=Math.floor(a()*pe/N),_e=Math.floor(re/I),$e=j2(3,_e,T.length-1);for(let ee of $e){let Re=new Image;Re.src=T[ee]}},H=(pe,re)=>{q(re),!l()&&e.onTimelineMove(pe)};var z=ew(),j=C(z);{var ae=pe=>{var re=Z2(),_e=C(re);let $e=m(()=>Yo(d()));Em(_e,{get time(){return n($e)}});var ee=A(_e,2),Re=C(ee);As(Re,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(ee);var fe=A(ee,2);{var P=We=>{var Te=X2(),Z=C(Te);Vm(Z,{}),S(Te),b(We,Te)};R(fe,We=>{n(E)&&We(P)})}S(re),st("mouseleave",ee,k),Yr(3,re,()=>gs,()=>({duration:p})),b(pe,re)};R(j,pe=>{l()&&pe(ae)})}var X=A(j,2);let ne=m(()=>!n(L));Wa(X,{get isHidden(){return n(ne)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:H,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:q,get ref(){return u()},set ref(pe){u(pe)}});var J=A(X,2);{var we=pe=>{var re=J2(),_e=C(re);Mm(_e,{}),S(re),O(()=>qe(re,`height: ${e.animatedPreviewTrackHeight}px;`)),b(pe,re)};R(J,pe=>{e.previewTrackAvailable&&pe(we)})}S(z),O(()=>qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var ow=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),nw={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 Dm(t,e){var ol,fa;B(e,!0),Q(t,nw);let[i,o]=Ve(),r=()=>w(Ao,"$disabledControls$",i),a=()=>w(ot,"$adPlaybackState",i),l=()=>w(Ft,"$playbackState$",i),d=()=>w(yo,"$currentSubtitle$",i),s=()=>w(qi,"$isEnded$",i),u=()=>w(jo,"$currentGridType$",i),f=()=>w(Lt,"$isLive$",i),p=()=>w(Ke,"$chromecastState$",i),v=()=>w(vt,"$isPictureInPictureActive",i),$=()=>w(Yt,"$pictureInPictureType$",i),y=()=>w(gi,"$availableSubtitlesList$",i),h=()=>w(Ht,"$contextMenuOpenedByKeyboard$",i),x=()=>w(xt,"$showContextMenuBtn$",i),I=()=>w(pi,"$isRewindableLive$",i),T=()=>w(ci,"$isActiveLive$",i),N=()=>w(es,"$graphIsOpened$",i),L=()=>w(Lo,"$contextMenuVisible$",i),E=()=>w(Di,"$isFullscreen",i),k=()=>w(io,"$autoplayNextEnabled",i),q=()=>w(n(ro),"$prevButton",i),H=()=>w(n(tn),"$replayButton",i),z=()=>w(n(Bi),"$playButton",i),j=()=>w(n(Gi),"$nextButton",i),ae=()=>w(n(so),"$playPrevChapterButton",i),X=()=>w(n(Rn),"$seekToInteractiveButton",i),ne=()=>w(n(Fr),"$interactiveGraphButton",i),J=()=>w(n(Li),"$liveButton",i),we=()=>w(n(_s),"$time",i),pe=()=>w(n(ts),"$episodes",i),re=()=>w(n(is),"$vkLogo",i),_e=()=>w(n(Cr),"$volume",i),$e=()=>w(n(on),"$subtitles",i),ee=()=>w(n(nr),"$settings",i),Re=()=>w(n(xo),"$context",i),fe=()=>w(n(wo),"$fullscreen",i),P=()=>w(n(rr),"$chromecast",i),We=()=>w(Mo,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>w(Oi,"$playerSize",i),Z=()=>w(Xo,"$isInteractiveTime$",i),ie=()=>w(di,"$previewTrackActive",i),De=()=>w(_i,"$settingsMenuVisible",i),Oe=()=>w(lo,"$settingButtonRef$",i),tt=()=>w(W,"$startedByKeyboard$",i),U=()=>w(ei,"$isAudioAvailable$",i),Pe=()=>w(Ot,"$fakeIsPlaying$",i),ke=()=>w(Jr,"$seekToInteractiveDisabledTooltip$",i),Ue=()=>w(Ur,"$isPreviewTrackHorizontallyAligned$",i),et=()=>w(hn,"$previewTrackAvailable",i),ye=()=>w(Mi,"$previewTrackDragInProgress",i),Ie=()=>w(qt,"$adPosition",i),Be=()=>w(Bt,"$position$",i),Vt=()=>w(wt,"$adDuration",i),pt=()=>w(lt,"$duration$",i),Dt=g(e,"playerControlsWrapperRef",15,void 0),at=g(e,"playerControlsRef",15,void 0),yt=g(e,"isAds",3,!1),Jt=g(e,"logoTargetUrl",3,""),It=g(e,"isOneVideoPlaylist",3,!1),Rt=g(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ot}=$o(),Y=ve(),Se=$o(),le=At(),he=Y.actions.internal.toggleMuted,Me=Y.actions.internal.togglePlay,nt=Y.actions.internal.pause,ut=Y.actions.internal.toggleSubtitle,ue=Y.actions.internal.checkFullscreenSupport,ze=(ol=Y.callbacks)==null?void 0:ol.onAudioDoesNotExistHint,Qe=(fa=Y.callbacks)==null?void 0:fa.onAudioDisabledHint,lt=Y.state.duration$,Bt=Y.state.positionWithScrubbing$,Ft=Y.state.playbackState$,ei=Y.state.isAudioAvailable$,vi=Y.state.isAudioDisabled,qi=Y.state.isEnded$,Lt=Y.state.isLive$,ci=Y.state.isActiveLive$,pi=Y.state.isRewindableLive$,{isActive$:vt,type$:Yt}=Se.pictureInPicture$,_i=Y.ui.settingsMenu.visible$,Qi=Y.ui.settingsMenu.openedByBtnKeyboard$,Xt=Y.ui.controls,Ct=Y.actions.internal.getVideoEpisodes(),Ke=Y.state.chromecastState$,gi=Y.state.availableSubtitlesList$,yo=Y.state.currentSubtitle$,Ao=Xt.disabledControls$,Lo=Y.ui.contextMenu.visible$,xt=Y.ui.contextMenu.showContextMenuBtn$,Ht=Y.ui.contextMenu.openedByBtnKeyboard$,W=Y.ui.startedByKeyboard$,Et=Y.ui.controlBlocks,ri=Y.ui.previewTrackNotificationVisible,dt=Y.ui.t,wt=Y.ads.duration,qt=Y.ads.position,ot=Y.ads.playbackState,Di=Y.ui.isFullscreen,Oi=Y.ui.playerSize,jo=Y.ui.currentGridType$,Mo=Y.ui.additionalDesktopControlPanelRightButtons$,io=Y.ui.autoplayNextEnabled$,Pi=Y.actions.internal.getVideoElement,Vr=Y.actions.internal.replayInteractive,mo=Y.actions.internal.prevVideoClick,vo=Y.actions.internal.nextVideoClick,Ei=Y.state.isInteractive,Xo=Y.state.isInteractiveTime$,Vo=Y.state.showInteractiveGraph,Pn=Y.state.showSeekToInteractive,_r=Y.state.showPlayPrevChapter,br=Y.state.showInteractiveTimeIndicator,hs=Y.state.playPrevChapterDisabledTooltip,Jr=Se.seekToInteractiveDisabledTooltip$,es=Se.graphIsOpened$,jn=le.features.interactiveResponsiveUi,Rr=m(()=>r().has("EPISODE_BUTTON")),Zo=m(()=>r().has("GRAPH_BUTTON")),An=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),$r=m(()=>r().has("PLAY_BUTTON")),Ro=m(()=>r().has("REPLAY_BUTTON")),Xn=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),Zn=()=>Y.actions.internal.toggleChromecast(),Nr=m(()=>yt()?a()==="playing":l()===Nm.PLAYING),Jn=m(()=>d().value!=="off"),oo=m(()=>s()&&!yt()||Ei),Dr=m(()=>jn?n(oo)&&eo(u(),"m"):n(oo)),er=m(()=>!s()||Ei||yt()),un=m(()=>eo(u(),"m")),go=m(()=>e.showNextPrevButtons&&eo(u(),"m")&&!yt()&&e.nextButtonActive),yr=m(()=>e.showNextPrevButtons&&eo(u(),"m")&&!yt()&&e.prevButtonActive),tr=m(()=>!yt()&&!!f()),ft=m(()=>p()!==ob.NOT_AVAILABLE&&!(v()&&$()===1)&&eo(u(),"m")&&!Ei),si=m(()=>e.showAutoplayNext&&!It()&&eo(u(),"s")),Or=m(()=>y().length>0&&eo(u(),"m")),ir=m(()=>h()||x()),Br=m(()=>eo(u(),"s")&&!yt()),No=m(()=>!e.logoHidden&&!yt()),Ln=m(()=>le.features.fullscreen&&ue()&&(e.logoHidden||eo(u(),jn?"xs":"s"))&&!(v()&&$()===1)&&(Ei?Rt():!0)),pn=m(()=>(!f()||yt())&&!(le.features.interactiveHideTime&&Ei)),Jo=m(()=>Vo&&eo(u(),"m")),fn=m(()=>jn?Pn&&eo(u(),"s"):Pn),xr=m(()=>jn?_r&&eo(u(),"s"):_r),Do=m(()=>!yt()&&!f()&&!!(Ct!=null&&Ct.length)&&n(un)&&!n(Rr)),Oo=m(()=>!I()||!!T()),mn=m(()=>N()?dt("tooltip_interactive_graph_on"):dt("tooltip_interactive_graph_off")),wr=m(()=>L()?dt("tooltip_context_menu_close"):dt("tooltip_context_menu_open")),bi=(it,ct)=>it?ct&&ct===Nm.PAUSED?dt("tooltip_play"):"":dt("tooltip_live"),vn=m(()=>bi(n(Oo),l())),Mn=m(()=>le.logoType==="vk_video"?dt("tooltip_vk_video_logo"):dt("tooltip_vk_logo")),or=m(()=>n(Jn)?dt("tooltip_subtitles_on"):dt("tooltip_subtitles_off")),Sr=m(()=>E()?dt("tooltip_fullscreen_on"):dt("tooltip_fullscreen_off")),Vn=m(()=>p()===ob.CONNECTED?dt("tooltip_chromecast_on"):dt("tooltip_chromecast_off")),en=m(()=>k()?dt("tooltip_autoplay_on"):dt("tooltip_autoplay_off")),_t=K(0),$t=ai({}),no=ai({}),ro=m(()=>Xt.prevButton),tn=m(()=>Xt.replayButton),Bi=m(()=>Xt.playButton),Gi=m(()=>Xt.nextButton),so=m(()=>Xt.playPrevChapterButton),Rn=m(()=>Xt.seekToInteractiveButton),Fr=m(()=>Xt.interactiveGraphButton),Li=m(()=>Xt.liveButton),_s=m(()=>Xt.time),ts=m(()=>Xt.episodes),is=m(()=>Xt.vkLogo),Cr=m(()=>Xt.volume),on=m(()=>Xt.subtitles),nr=m(()=>Xt.settings),xo=m(()=>Xt.context),wo=m(()=>Xt.fullscreen),rr=m(()=>Xt.chromecast),He=m(()=>({prevButton:q()?q().right-q().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:j()?j().right-j().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton:J()?J().right-J().left:0,time:we()?we().right-we().left:0,episodes:pe()?pe().right-pe().left:0,vkLogo:re()?re().right-re().left:0,volume:_e()?_e().right-_e().left:0,subtitles:$e()?$e().right-$e().left:0,settings:ee()?ee().right-ee().left:0,context:Re()?Re().right-Re().left:0,fullscreen:fe()?fe().right-fe().left:0,chromecast:P()?P().right-P().left:0,additionalButtons:We().length?We().reduce(it=>[...it,40],[]):[]})),kt=K(0);Ne(()=>{(!n(kt)||n(kt)<n(He).time)&&St(()=>D(kt,n(He).time,!0))});let $i=K(!1);Ne(()=>{let it=0;n(Do)&&(eo(u(),"xl")?it=n(He).time:it=60);let ct=n(He).prevButton+n(He).playButton+n(He).nextButton+n(He).seekToInteractiveButton+n(He).interactiveGraphButton+n(He).liveButton+n(kt)+it;D($i,n(pn)&&n(_t)>=ct,!0)});let Bo=m(()=>n($i)&&eo(u(),"m")),ao=nb(Ul,260),So=nb(Xu,260);Ne(()=>{Te(),Z(),ie(),ao(Pi(),Xt,$t,e.showControls),So(Pi(),Et,no,e.showControls)}),Ne(()=>{no.bottom=Dt()});let lo=de();Ne(()=>{De(),Oe()&&St(()=>Ll(Oe(),De(),Qi))});let Fo;Ne(()=>{tt(),St(()=>Yu(W,tt(),Fo))});function Nn(){oa({isAudioDisabled:vi,isAudioAvailable:U(),isAds:yt(),audioIsNotExistHintCallback:ze,audioDisabledHintCallback:Qe})&&he()}let nn=Ei?Vr:Me,ho=m(()=>Pe()!==null),Yi=m(()=>n(ho)?Pe():n(Nr)),Dn=m(()=>n(Yi)?dt("tooltip_pause"):dt("tooltip_play")),On=dt("tooltip_episodes"),Bn=m(()=>{var it,ct,ji,To;return n(yr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Rs.prevButton,buttonComponent:Ua,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:mo.bind(null,!0)},tooltipEnabled:!((ct=(it=Y.callbacks)==null?void 0:it.uiInfo)!=null&&ct.onPrevButtonMouseEnter)&&!((To=(ji=Y.callbacks)==null?void 0:ji.uiInfo)!=null&&To.onPrevButtonMouseLeave),mouseEnter:()=>{var Xi,fi,Fi;(Fi=(fi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:fi.onPrevButtonMouseEnter)==null||Fi.call(fi,Gn(Pi(),$t,"prevButton",e.showControls))},mouseLeave:()=>{var Xi,fi,Fi;(Fi=(fi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:fi.onPrevButtonMouseLeave)==null||Fi.call(fi,Gn(Pi(),$t,"prevButton",e.showControls))},tooltipText:dt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),Tr=m(()=>n(Dr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Rs.replayButton,buttonComponent:zl,buttonComponentProps:{disabled:n(Ro),click:nn},tooltipText:dt("tooltip_restart"),disabled:n(Ro)}:void 0),sr=m(()=>n(er)?{id:"playButton",type:"desktop-control-panel-left",weight:Rs.playButton,buttonComponent:Wl,buttonComponentProps:{disabled:n($r),isPlaying:n(Nr),click:Me},tooltipText:n(Dn),disabled:n($r)}:void 0),bs=m(()=>{var it,ct,ji,To;return n(go)?{id:"nextButton",type:"desktop-control-panel-left",weight:Rs.nextButton,buttonComponent:Ua,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:vo.bind(null,!0)},tooltipEnabled:!((ct=(it=Y.callbacks)==null?void 0:it.uiInfo)!=null&&ct.onNextButtonMouseEnter)&&!((To=(ji=Y.callbacks)==null?void 0:ji.uiInfo)!=null&&To.onNextButtonMouseLeave),mouseEnter:()=>{var Xi,fi,Fi;(Fi=(fi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:fi.onNextButtonMouseEnter)==null||Fi.call(fi,Gn(Pi(),$t,"nextButton",e.showControls))},mouseLeave:()=>{var Xi,fi,Fi;(Fi=(fi=(Xi=Y.callbacks)==null?void 0:Xi.uiInfo)==null?void 0:fi.onNextButtonMouseLeave)==null||Fi.call(fi,Gn(Pi(),$t,"nextButton",e.showControls))},tooltipText:dt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Ze=m(()=>Ei&&n(xr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Rs.playPrevChapterButton,buttonComponent:oc,buttonComponentProps:{disabled:n(Xn),click:e.playPrevChapter},tooltipText:dt("tooltip_interactive_go_back"),disabledTooltipContent:dt(hs),disabled:n(Xn)}:void 0),Qt=m(()=>Ei&&n(fn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Rs.seekToInteractiveButton,buttonComponent:rc,buttonComponentProps:{disabled:n(An),click:e.seekToInteractive},tooltipText:dt("tooltip_interactive_seek"),disabled:n(An),disabledTooltipContent:dt(ke())}:void 0),wi=m(()=>Ei&&n(Jo)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Rs.interactiveGraphButton,buttonComponent:sc,buttonComponentProps:{disabled:n(Zo),click:es.toggle,graphIsOpened:N()},tooltipText:n(mn)}:void 0),_o=m(()=>n(tr)?{id:"liveButton",type:"desktop-control-panel-left",weight:Rs.liveButton,buttonComponent:ac,buttonComponentProps:{isLiveActive:n(Oo),ariaLabel:n(vn)},tooltipText:n(vn),disabled:n(Oo)&&l()===Nm.PLAYING}:void 0),Ho=m(()=>[n(Bn),n(Tr),n(sr),n(bs),n(Ze),n(Qt),n(wi),n(_o)].filter(it=>!!it).sort(Na)),Hr=m(()=>n(No)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Ds.vkLogo,buttonComponent:Yd,buttonComponentProps:{targetUrl:Jt(),logoClickable:e.logoClickable,click:nt},tooltipText:n(Mn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Co=m(()=>n(si)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Ds.autoplayNext,buttonComponent:nc,tooltipText:n(en)}:void 0),ar=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Ds.volume,buttonComponent:lm,buttonComponentProps:{click:Nn,isAds:yt()}})),Fn=m(()=>n(Or)?{id:"subtitles",type:"desktop-control-panel-right",weight:Ds.subtitles,buttonComponent:om,buttonComponentProps:{isSubtitlesEnabled:n(Jn),click:ut},tooltipText:n(or)}:void 0),aa=m(()=>n(Br)?{id:"settings",type:"desktop-control-panel-right",weight:Ds.settings,buttonComponent:Nl,buttonComponentProps:{ref$:lo},tooltipText:De()?void 0:dt("tooltip_settings_off")}:void 0),Os=m(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Ds.context,buttonComponent:ym,buttonComponentProps:{ariaLabel:dt("aria_label_context_menu")},className:n(ir)?"":"out-of-view",tooltipText:n(wr)}:void 0),Bs=m(()=>n(Ln)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Ds.fullscreen,buttonComponent:Gd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Sr)}:void 0),gn=m(()=>n(ft)?{id:"chromecast",type:"desktop-control-panel-right",weight:Ds.chromecast,buttonComponent:Xd,buttonComponentProps:{state:p(),click:Zn},tooltipText:n(Vn)}:void 0),rt=m(()=>[n(Hr),n(Co),n(ar),n(Fn),n(aa),n(Os),n(Bs),n(gn),...We()].filter(it=>!!it).sort(Na)),di=Y.ui.previewTrackActive,Mi=Y.ui.previewTrackDragInProgress,hn=Y.ui.previewTrackAvailable,Ur=Y.ui.isPreviewTrackHorizontallyAligned,_n=m(()=>tb({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>$t.timeline,isHorizontal:Ue()})),be=m(()=>n(_n).progressBarY),bt=m(()=>n(_n).controlsY),Nt=m(()=>n(_n).onPointerDown),Zt=m(()=>n(_n).onPointerMove),Si=m(()=>n(_n).onPointerUp),Ci=m(()=>n(_n).calculatedHeight),ki=m(()=>n(_n).closePreviewTrack);Ne(()=>{ie()?ri.set(!1):n(ki)()});let yi;Pt(()=>()=>yi&&clearTimeout(yi));let os=it=>{ie()||!et()||(n(Nt)(it),yi=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},Fs=()=>{ie()||n(Si)(),yi&&clearTimeout(yi),ye()&&Y.actions.internal.previewTrackDragFinished()},Ja=it=>{n(Zt)(it),!ie()&&et()&&!ie()&&ri.set(!0)},la=()=>{ri.set(!1)};var da=ow(),ns=ce(da);let $s;var ca=C(ns);{var ua=it=>{let ct=m(()=>n(be)()),ji=m(()=>n(Ci)());Rm(it,{get animatedOffsetY(){return n(ct)},get animatedPreviewTrackHeight(){return n(ji)},get canRewindLive(){return e.canRewindLive},get isAds(){return yt()},onTimelineMove:Ja,onTimelinePointerDown:os,onTimelinePointerUp:Fs,onTimelinePointerLeave:la,get previewTrackAvailable(){return et()},get timelineRef(){return $t.timeline},set timelineRef(To){$t.timeline=To}})};R(ca,it=>{e.showControls&&it(ua)})}var bn=A(ca,2),ys=C(bn),el=C(ys);hi(el,17,()=>n(Ho),it=>it.id,(it,ct)=>{ju(it,{get buttonComponent(){return n(ct).buttonComponent},get buttonComponentProps(){return n(ct).buttonComponentProps},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(ct).disabled},get className(){return n(ct).className},get tooltipEnabled(){return n(ct).tooltipEnabled},get mouseEnter(){return n(ct).mouseEnter},get mouseLeave(){return n(ct).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return $t[n(ct).id]},set ref(ji){$t[n(ct).id]=ji}})});var lr=A(el,2);{var Gl=it=>{let ct=m(()=>!e.showControls),ji=m(()=>yt()?Ie():Be()),To=m(()=>yt()?Vt():pt());qd(it,{get isHidden(){return n(ct)},isMobile:!1,get showDuration(){return n(Bo)},get position(){return n(ji)},get duration(){return n(To)},get ref(){return $t.time},set ref(Xi){$t.time=Xi}})};R(lr,it=>{n(pn)&&it(Gl)})}var tl=A(lr,2);let Yl=m(()=>!n(Do));Po(tl,{className:"w-max",get disabled(){return n(Yl)},get tooltipContent(){return On},get tooltipVisible(){return e.showControls},get ref(){return $t.episodes},set ref(it){$t.episodes=it},children:(it,ct)=>{var ji=Ae(),To=ce(ji);{var Xi=fi=>{Zd(fi,{get position(){return Be()},get duration(){return pt()},get timeCodes(){return Ct}})};R(To,fi=>{n(Do)&&fi(Xi)})}b(it,ji)},$$slots:{default:!0}}),S(ys);var pa=A(ys,2);hi(pa,21,()=>n(rt),it=>it.id,(it,ct)=>{var ji=Ae(),To=ce(ji);{var Xi=Fi=>{ju(Fi,{get buttonComponent(){return n(ct).buttonComponent},get buttonComponentProps(){return n(ct).buttonComponentProps},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(ct).disabled},get className(){return n(ct).className},get tooltipVisible(){return e.showControls},get ref(){return $t[n(ct).id]},set ref(Hs){$t[n(ct).id]=Hs}})},fi=Fi=>{let Hs=m(()=>!!n(ct).disabled);Cm(Fi,{get id(){return n(ct).id},get testId(){return n(ct).testId},get icon(){return n(ct).icon},get ariaLabel(){return n(ct).ariaLabel},get tooltipText(){return n(ct).tooltipText},get disabledTooltipContent(){return n(ct).disabledTooltipContent},get disabled(){return n(Hs)},get onClick(){return n(ct).onClick},get disableMouseupTooltipShow(){return n(ct).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return $t[n(ct).id]},set ref(Xl){$t[n(ct).id]=Xl}})};R(To,Fi=>{Z_(n(ct))?Fi(Xi):Fi(fi,!1)})}b(it,ji)}),S(pa),S(bn),je(bn,it=>at(it),()=>at()),S(ns),je(ns,it=>Dt(it),()=>Dt());var jl=A(ns,2);{var il=it=>{tc(it,{get ref(){return $t.interactiveTimeIndicator},set ref(ct){$t.interactiveTimeIndicator=ct}})};R(jl,it=>{br&&it(il)})}O((it,ct)=>{$s=se(ns,1,"wrapper-bottom s-12",null,$s,it),qe(bn,ct),bn.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(bt)()}px);`]),Tn(ys,"clientWidth",it=>D(_t,it)),b(t,da),F(),o()}import{ChromecastState as sb,PlaybackState as ab}from"@vkontakte/videoplayer-core/es2018";import{noop as rb}from"@vkontakte/videoplayer-shared/es2018";var rw=M('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),sw=M('<img class="icon s-20" aria-hidden="true"/>'),aw={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 Om(t,e){Q(t,aw);let i=g(e,"disabled",3,!1),o=g(e,"onClick",3,rb),r=m(()=>o()===rb),a=m(()=>n(r)||i()),l=K(!1),d=()=>{D(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Wt(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Ae(),v=ce(p);{var $=h=>{var x=rw();b(h,x)},y=h=>{var x=sw();O(()=>Le(x,"src",e.iconUrl)),st("error",x,d),Ia(x),b(h,x)};R(v,h=>{n(l)?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}})}var lw=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 Bm(t){Xe(t,{testId:"muted-icon",children:(e,i)=>{var o=lw();b(e,o)},$$slots:{default:!0}})}import{noop as dw}from"@vkontakte/videoplayer-shared/es2018";function Zu(t,e){B(e,!0);let i=g(e,"muted",3,!1),o=g(e,"click",3,dw),r=g(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");Wt(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,f)=>{var p=Ae(),v=ce(p);{var $=h=>{Bm(h,{})},y=h=>{ra(h,{get size(){return"24"}})};R(v,h=>{i()?h($):h(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var cw=Ce('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),uw=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>'),pw=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 Fm(t,e){let i=g(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Xe(t,{get testId(){return n(o)},children:(r,a)=>{var l=pw(),d=A(ce(l));{var s=f=>{var p=cw();b(f,p)},u=f=>{var p=uw();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}import{noop as fw}from"@vkontakte/videoplayer-shared/es2018";function Hm(t,e){B(e,!0);let i=g(e,"ref",15,void 0),o=g(e,"isPictureInPictureActive",3,!1),r=g(e,"click",3,fw),a=G("menu_pip");Wt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{Fm(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}import{debounceFn as lb}from"@vkontakte/videoplayer-shared/es2018";var mw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},vw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},gw=M("<div><!></div>"),hw=M("<div><!></div>"),_w=M("<div><!></div>"),bw=M("<!> <!> <!>",1),$w=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),yw=M('<div class="wrapper-middle s-11"><!></div>'),xw=M("<div><!></div> <!> <div><!></div>",1),ww=M('<div aria-hidden="true">·</div> <!>',1),Sw=M('<!> <!> <div><div><div class="controls mobile s-11" data-testid="bottom-controls"><div class="controls-group contain s-11"><!> <!> <!> <!></div> <div class="controls-group s-11"><!> <!> <!></div></div> <!></div></div> <!>',1),Cw={hash:"s-11",code:".wrapper-bottom.s-11{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-11>:where(.s-11){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-11{height:9px;padding:0 4px 4px}.wrapper-middle.s-11{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-11,.wrapper-top-right.s-11{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-11{right:8px;top:4px}.wrapper-top-left.s-11{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-11,.wrapper-middle-left-second.s-11,.wrapper-middle-right.s-11{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-11{left:12px}.wrapper-middle-left-second.s-11{left:64px}.wrapper-middle-right.s-11{right:12px}.controls.s-11{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-11,.controls-group.s-11{display:flex}.controls-group.contain.s-11{min-width:0}.controls-group.s-11 >:not(:first-child){margin-left:8px}.hidden.s-11{opacity:0;visibility:hidden}.controls-hidden.s-11{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-11{transition:none}.overlay-mobile.s-11{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-11,.wrapper-top-right.fullscreen.s-11{top:16px}.controls-wrapper.fullscreen.s-11{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-11{left:44px;top:12px}.wrapper-top-right.fullscreen.s-11{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-11{left:44px}.wrapper-middle-left-second.fullscreen.s-11{left:96px}.wrapper-middle-right.fullscreen.s-11{right:44px}.controls-wrapper.fullscreen.s-11{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Um(t,e){var wo,rr;B(e,!0),Q(t,Cw);let[i,o]=Ve(),r=()=>w(Oi,"$seekToInteractiveDisabledTooltip$",i),a=()=>w(Xt,"$disabledControls$",i),l=()=>w(It,"$playbackState$",i),d=()=>w(Ao,"$adPlaybackState",i),s=()=>w(Y,"$isEnded$",i),u=()=>w(xt,"$playerSize",i),f=()=>w(ut,"$scrubbingInProgress",i),p=()=>w(_i,"$chromecastState$",i),v=()=>w(ze,"$isPictureInPictureActive",i),$=()=>w(Qe,"$pictureInPictureType$",i),y=()=>w(ue,"$mobileNotReportControlHidden$",i),h=()=>w(pi,"$chromecastHidden",i),x=()=>w(at,"$playerPhase",i),I=()=>w(Lt,"$pipHidden",i),T=()=>w(Ke,"$currentGridType$",i),N=()=>w(vi,"$vkLogoHidden",i),L=()=>w(ei,"$volumeHidden",i),E=()=>w(Se,"$isLive$",i),k=()=>w(lt,"$settingsMenuVisible",i),q=()=>w(nt,"$isRewindableLive$",i),H=()=>w(Me,"$isActiveLive$",i),z=()=>w(Rt,"$isAudioAvailable$",i),j=()=>w(he,"$muted$",i),ae=()=>w(le,"$volume$",i),X=()=>w(dt,"$isInteractiveTime$",i),ne=()=>w(fn,"$settingButtonRef$",i),J=()=>w(Ct,"$startedByKeyboard$",i),we=()=>w(Lo,"$isFullscreen",i),pe=()=>w(Ht,"$additionalButtons$",i),re=()=>w(qi,"$autoplayNextToggleHidden",i),_e=()=>w(Qi,"$crashed$",i),$e=()=>w(ci,"$settingsHidden",i),ee=()=>w(jo,"$graphIsOpened$",i),Re=()=>w(yo,"$adPosition",i),fe=()=>w(gi,"$adDuration",i),P=()=>w(Jt,"$position$",i),We=()=>w(yt,"$duration$",i),Te=g(e,"playerControlsWrapperRef",15,void 0),Z=g(e,"playerControlsRef",15,void 0),ie=g(e,"isAds",3,!1),De=g(e,"logoTargetUrl",3,""),Oe=g(e,"isOneVideoPlaylist",3,!1),tt=g(e,"customFullscreenSupported",3,!0),U=ve(),Pe=$o(),ke=At(),Ue=U.actions.internal.toggleMuted,et=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Ie=U.actions.internal.prevVideoClick,Be=U.actions.internal.nextVideoClick,Vt=U.actions.internal.checkFullscreenSupport,pt=(wo=U.callbacks)==null?void 0:wo.onAudioDoesNotExistHint,Dt=(rr=U.callbacks)==null?void 0:rr.onAudioDisabledHint,at=U.playerPhase,yt=U.state.duration$,Jt=U.state.positionWithScrubbing$,It=U.state.playbackState$,Rt=U.state.isAudioAvailable$,Ot=U.state.isAudioDisabled,Y=U.state.isEnded$,Se=U.state.isLive$,le=U.state.volume$,he=U.state.muted$,Me=U.state.isActiveLive$,nt=U.state.isRewindableLive$,ut=U.ui.scrubbingInProgress,ue=U.ui.mobileNotReportControlHidden$,{isActive$:ze,type$:Qe}=Pe.pictureInPicture$,lt=U.ui.settingsMenu.visible$,Bt=U.ui.settingsMenu.openedByBtnKeyboard$,Ft=U.ui.controls,{volume:ei,vkLogo:vi,autoplayNextToggle:qi,pip:Lt,settings:ci,chromecast:pi}=U.ui.hiddenControls,vt=U.actions.internal.getVideoEpisodes(),Yt=U.webApi.pictureInPictureApi,_i=U.state.chromecastState$,Qi=U.state.crashed$,Xt=Ft.disabledControls$,Ct=U.ui.startedByKeyboard$,Ke=U.ui.currentGridType$,gi=U.ads.duration,yo=U.ads.position,Ao=U.ads.playbackState,Lo=U.ui.isFullscreen,xt=U.ui.playerSize,Ht=U.ui.additionalButtonsDeprecated$,W=U.actions.internal.getVideoElement,Et=U.actions.internal.replayInteractive,ri=U.state.isInteractive,dt=U.state.isInteractiveTime$,wt=U.state.showInteractiveGraph,qt=U.state.showSeekToInteractive,ot=U.state.showPlayPrevChapter,Di=U.state.showInteractiveTimeIndicator,Oi=Pe.seekToInteractiveDisabledTooltip$,jo=Pe.graphIsOpened$,Mo=U.ui.controlBlocks,io=m(()=>G(U.state.playPrevChapterDisabledTooltip)),Pi=m(()=>G(r())),Vr=m(()=>a().has("EPISODE_BUTTON")),mo=m(()=>a().has("GRAPH_BUTTON")),vo=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ei=m(()=>a().has("PLAY_BUTTON")),Xo=m(()=>a().has("REPLAY_BUTTON")),Vo=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Pn=m(()=>l()===ab.PLAYING),_r=m(()=>d()==="paused"),br=m(()=>s()&&!ie()&&!ri),hs=m(()=>!s()||ie()),Jr=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),es=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),jn=m(()=>u().width>300),Rr=m(()=>u().width>400),Zo=m(f),An=m(()=>p()!==sb.NOT_AVAILABLE&&!(v()&&$()===1)&&!y()&&!ri&&!h()),$r=m(()=>x()==="LiveWaitingStart"),Ro=m(()=>!!Yt&&p()!==sb.CONNECTED&&!y()&&($()===1&&n($r)||!n($r))&&!n(Zo)&&!ri&&!I()),Xn=K(!1);Pt(()=>{let He=Yt==null?void 0:Yt.info.isActive$.subscribe(kt=>D(Xn,kt,!0));return()=>He==null?void 0:He.unsubscribe()});let Zn=m(()=>!n(Zo)&&eo(T(),"s")),Nr=m(()=>!e.logoHidden&&u().width>350&&!N()),Jn=m(()=>ke.features.fullscreen&&Vt()&&!(v()&&$()===1)&&(ri?tt():!0)&&!n(Zo)&&!n(Xn)),oo=m(()=>!L()&&!n(Zo)),Dr=m(()=>(!E()||ie())&&u().width>260&&!n(Zo)&&!(ke.features.interactiveHideTime&&ri)),er=m(()=>k()||e.showControls),un=m(()=>!ie()&&!E()&&!!(vt!=null&&vt.length)&&n(jn)&&!n(Vr)&&!n(Zo)),go=m(()=>!q()||!!H()),yr=m(()=>wt&&eo(T(),"m")),tr=m(()=>!z()||j()||ae()===0),ft=ai({}),si=ai({}),Or=lb(Ul,260),ir=lb(Xu,260);Ne(()=>{u(),X(),Or(W(),Ft,ft,e.showControls),ir(W(),Mo,si,e.showControls)});let Br=()=>U.actions.internal.toggleChromecast();async function No(){Yt!=null&&Yt.isActive()?await(Yt==null?void 0:Yt.exit()):await(Yt==null?void 0:Yt.request())}function Ln(){oa({isAudioDisabled:Ot,audioDisabledHintCallback:Dt,isAudioAvailable:z(),audioIsNotExistHintCallback:pt,isAds:ie()})&&Ue()}let pn=K(""),Jo=(He,kt)=>{if(!He){D(pn,G("tooltip_live"),!0);return}kt&&kt===ab.PAUSED&&D(pn,G("tooltip_play"),!0)};Ne(()=>{Jo(n(go),l())});let fn=de();Ne(()=>{ne()&&Ll(ne(),k(),Bt)}),Ne(()=>{Yu(Ct,J(),ft.playButton)});var xr=Sw(),Do=ce(xr);{var Oo=He=>{var kt=$w(),$i=ce(kt);let Bo;var ao=A($i,2);let So;je(ao,rt=>si.topLeft=rt,()=>si==null?void 0:si.topLeft);var lo=A(ao,2);let Fo;var Nn=C(lo);hi(Nn,1,pe,({iconUrl:rt,ariaLabel:di,testId:Mi,onClick:hn,tooltip:Ur})=>rt,(rt,di)=>{let Mi=()=>n(di).iconUrl,hn=()=>n(di).ariaLabel,Ur=()=>n(di).testId,_n=()=>n(di).onClick,be=()=>n(di).tooltip,bt=m(()=>{var Nt;return(Nt=hn())!=null?Nt:be()});Om(rt,{get iconUrl(){return Mi()},get ariaLabel(){return n(bt)},get testId(){return Ur()},get onClick(){return _n()}})});var nn=A(Nn,2);{var ho=rt=>{nc(rt,{get ref(){return ft.autoplayNextToggle},set ref(di){ft.autoplayNextToggle=di}})};R(nn,rt=>{e.showAutoplayNext&&!Oe()&&!re()&&rt(ho)})}var Yi=A(nn,2);{var Dn=rt=>{Xd(rt,{isMobile:!0,click:Br,get state(){return p()},get ref(){return ft.chromecast},set ref(di){ft.chromecast=di}})};R(Yi,rt=>{n(An)&&rt(Dn)})}var On=A(Yi,2);{var Bn=rt=>{Hm(rt,{click:No,get isPictureInPictureActive(){return v()},get ref(){return ft.pip},set ref(di){ft.pip=di}})};R(On,rt=>{n(Ro)&&rt(Bn)})}var Tr=A(On,2);{var sr=rt=>{Nl(rt,{get ref$(){return fn}})};R(Tr,rt=>{_e()&&!$e()&&rt(sr)})}var bs=A(Tr,2);{var Ze=rt=>{Yd(rt,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return ft.vkLogo},set ref(di){ft.vkLogo=di}})};R(bs,rt=>{n(Nr)&&rt(Ze)})}S(lo),je(lo,rt=>si.topRight=rt,()=>si==null?void 0:si.topRight);var Qt=A(lo,2);let wi;var _o=C(Qt);{var Ho=rt=>{let di=m(()=>Ie.bind(null,!0));Ua(rt,{get click(){return n(di)},type:"prev",isMobile:!0,get ref(){return ft.prevButton},set ref(Mi){ft.prevButton=Mi}})};R(_o,rt=>{n(Jr)&&rt(Ho)})}var Hr=A(_o,2);{var Co=rt=>{Wl(rt,{get disabled(){return n(Ei)},get click(){return et},isMobile:!0,get isPlaying(){return n(Pn)},get ref(){return ft.playButton},set ref(di){ft.playButton=di}})};R(Hr,rt=>{n(hs)&&rt(Co)})}var ar=A(Hr,2);{var Fn=rt=>{zl(rt,{get disabled(){return n(Xo)},get click(){return et},isMobile:!0,get ref(){return ft.replayButton},set ref(di){ft.replayButton=di}})};R(ar,rt=>{n(br)&&rt(Fn)})}var aa=A(ar,2);{var Os=rt=>{let di=m(()=>Be.bind(null,!0));Ua(rt,{get click(){return n(di)},type:"next",isMobile:!0,get ref(){return ft.nextButton},set ref(Mi){ft.nextButton=Mi}})};R(aa,rt=>{n(es)&&rt(Os)})}S(Qt),je(Qt,rt=>si.middle=rt,()=>si==null?void 0:si.middle);var Bs=A(Qt,2);{var gn=rt=>{var di=bw(),Mi=ce(di);{var hn=Nt=>{var Zt=gw();let Si;Zt.__click=[mw,Vo,e,io];var Ci=C(Zt);let ki=m(()=>!e.showControls);oc(Ci,{get hidden(){return n(ki)},get disabled(){return n(Vo)},get click(){return e.playPrevChapter},get ref(){return ft.playPrevChapterButton},set ref(yi){ft.playPrevChapterButton=yi}}),S(Zt),O(yi=>Si=se(Zt,1,"wrapper-middle-left s-11",null,Si,yi),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Nt,Zt)};R(Mi,Nt=>{ot&&Nt(hn)})}var Ur=A(Mi,2);{var _n=Nt=>{var Zt=hw();let Si;var Ci=C(Zt);let ki=m(()=>!e.showControls&&!ee());sc(Ci,{get hidden(){return n(ki)},get disabled(){return n(mo)},get click(){return jo.toggle},get graphIsOpened(){return ee()},get ref(){return ft.interactiveGraphButton},set ref(yi){ft.interactiveGraphButton=yi}}),S(Zt),O(yi=>Si=se(Zt,1,xd(ot?"wrapper-middle-left-second":"wrapper-middle-left"),"s-11",Si,yi),[()=>({fullscreen:we(),hidden:!e.showControls&&!ee()})]),b(Nt,Zt)};R(Ur,Nt=>{n(yr)&&Nt(_n)})}var be=A(Ur,2);{var bt=Nt=>{var Zt=_w();let Si;Zt.__click=[vw,vo,e,Pi];var Ci=C(Zt);let ki=m(()=>!e.showControls);rc(Ci,{get hidden(){return n(ki)},get disabled(){return n(vo)},get click(){return e.seekToInteractive},get ref(){return ft.seekToInteractiveButton},set ref(yi){ft.seekToInteractiveButton=yi}}),S(Zt),O(yi=>Si=se(Zt,1,"wrapper-middle-right s-11",null,Si,yi),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Nt,Zt)};R(be,Nt=>{qt&&Nt(bt)})}b(rt,di)};R(Bs,rt=>{ri&&!f()&&rt(gn)})}O((rt,di,Mi,hn)=>{Bo=se($i,1,"overlay-mobile s-11",null,Bo,rt),So=se(ao,1,"wrapper-top-left s-11",null,So,di),Fo=se(lo,1,"wrapper-top-right s-11",null,Fo,Mi),wi=se(Qt,1,"wrapper-middle s-11",null,wi,hn)},[()=>({hidden:!n(er)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),b(He,kt)};R(Do,He=>{ie()||He(Oo)})}var mn=A(Do,2);{var wr=He=>{var kt=xw(),$i=ce(kt);let Bo;var ao=C($i);Zu(ao,{get muted(){return j()},click:Ln,get ref(){return ft.volume},set ref(ho){ft.volume=ho}}),S($i);var So=A($i,2);{var lo=ho=>{var Yi=yw(),Dn=C(Yi);let On=m(()=>!n(_r));Wl(Dn,{get disabled(){return n(Ei)},get click(){return et},isMobile:!0,get isPlaying(){return n(On)},get ref(){return ft.playButton},set ref(Bn){ft.playButton=Bn}}),S(Yi),b(ho,Yi)};R(So,ho=>{n(_r)&&ho(lo)})}var Fo=A(So,2);let Nn;var nn=C(Fo);lc(nn,{get position(){return Re()},get duration(){return fe()}}),S(Fo),O((ho,Yi)=>{Bo=se($i,1,"wrapper-top-right s-11",null,Bo,ho),Nn=se(Fo,1,"wrapper-bottom ads-timeline-mobile s-11",null,Nn,Yi)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(He,kt)};R(mn,He=>{ie()&&d()!=="inactive"&&He(wr)})}var bi=A(mn,2);let vn;var Mn=C(bi);let or;var Sr=C(Mn),Vn=C(Sr),en=C(Vn);{var _t=He=>{Po(He,{get disabled(){return n(Xo)},get ref(){return ft.replayButton},set ref(kt){ft.replayButton=kt},children:(kt,$i)=>{zl(kt,{get disabled(){return n(Xo)},get click(){return Et}})},$$slots:{default:!0}})};R(en,He=>{ri&&He(_t)})}var $t=A(en,2);{var no=He=>{Po(He,{get ref(){return ft.liveButton},set ref(kt){ft.liveButton=kt},children:(kt,$i)=>{ac(kt,{get isLiveActive(){return n(go)},isMobile:!0,get ariaLabel(){return n(pn)}})},$$slots:{default:!0}})};R($t,He=>{!ie()&&E()&&He(no)})}var ro=A($t,2);{var tn=He=>{let kt=m(()=>ie()?Re():P()),$i=m(()=>ie()?fe():We()),Bo=m(()=>!e.showControls);qd(He,{get showDuration(){return n(Rr)},get position(){return n(kt)},get duration(){return n($i)},isMobile:!0,get isHidden(){return n(Bo)},get ref(){return ft.time},set ref(ao){ft.time=ao}})};R(ro,He=>{n(Dr)&&He(tn)})}var Bi=A(ro,2);let Gi=m(()=>!n(un));Po(Bi,{className:"w-max",get disabled(){return n(Gi)},get ref(){return ft.episodes},set ref(He){ft.episodes=He},children:(He,kt)=>{var $i=Ae(),Bo=ce($i);{var ao=So=>{var lo=ww(),Fo=A(ce(lo),2);Zd(Fo,{get position(){return P()},get duration(){return We()},get timeCodes(){return vt}}),b(So,lo)};R(Bo,So=>{n(un)&&So(ao)})}b(He,$i)},$$slots:{default:!0}}),S(Vn),je(Vn,He=>si.bottomLeft=He,()=>si==null?void 0:si.bottomLeft);var so=A(Vn,2),Rn=C(so);{var Fr=He=>{Po(He,{get ref(){return ft.volume},set ref(kt){ft.volume=kt},children:(kt,$i)=>{Zu(kt,{get muted(){return n(tr)},click:Ln})},$$slots:{default:!0}})};R(Rn,He=>{n(oo)&&He(Fr)})}var Li=A(Rn,2);{var _s=He=>{Po(He,{get ref(){return ft.settings},set ref(kt){ft.settings=kt},children:(kt,$i)=>{Nl(kt,{get ref$(){return fn}})},$$slots:{default:!0}})};R(Li,He=>{n(Zn)&&He(_s)})}var ts=A(Li,2);{var is=He=>{Po(He,{get ref(){return ft.fullscreen},set ref(kt){ft.fullscreen=kt},children:(kt,$i)=>{Gd(kt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(ts,He=>{n(Jn)&&He(is)})}S(so),je(so,He=>si.bottomRight=He,()=>si==null?void 0:si.bottomRight),S(Sr),je(Sr,He=>Z(He),()=>Z());var Cr=A(Sr,2);let on=m(()=>!e.showControls);Wa(Cr,{get isHidden(){return n(on)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return q()},get ref(){return ft.timeline},set ref(He){ft.timeline=He}}),S(Mn),je(Mn,He=>si.bottom=He,()=>si==null?void 0:si.bottom),S(bi),je(bi,He=>Te(He),()=>Te());var nr=A(bi,2);{var xo=He=>{tc(He,{get ref(){return ft.interactiveTimeIndicator},set ref(kt){ft.interactiveTimeIndicator=kt}})};R(nr,He=>{Di&&He(xo)})}O((He,kt)=>{vn=se(bi,1,"wrapper-bottom mobile s-11",null,vn,He),or=se(Mn,1,"controls-wrapper s-11",null,or,kt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,xr),F(),o()}Ge(["click"]);function dc(t,e){B(e,!0);let[i,o]=Ve(),r=()=>w(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,""),f=g(e,"showAutoplayNext",3,!1),p=g(e,"isOneVideoPlaylist",3,!1),v=g(e,"customFullscreenSupported",3,!0),$=g(e,"endScreenShown",3,!1),y=g(e,"onDisabledPlayPrevChapterClick",3,db),h=g(e,"onDisabledSeekToInteractiveClick",3,db),I=ve().ui.isMobile,T=K(!1);Pt(()=>{let k=setTimeout(()=>D(T,!0),0);return()=>clearTimeout(k)});var N=Ae(),L=ce(N);{var E=k=>{var q=Ae(),H=ce(q);{var z=ae=>{Um(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return h()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},j=ae=>{Dm(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};R(H,ae=>{r()?ae(z):ae(j,!1)})}b(k,q)};R(L,k=>{n(T)&&k(E)})}b(t,N),F(),o()}var Tw=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 cc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${ln(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=Tw();b(r,l)},$$slots:{default:!0}}),F()}var Iw=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 zm(t,e){B(e,!0);let i=g(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=Iw();b(a,d)},$$slots:{default:!0}}),F()}var Ew=M('<span class="hot-key-helpers-text s-1e"> </span>'),kw=M('<div data-testid="hotkey-helper-icon" class="s-1e"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Pw=M("<div><!></div>"),Aw={hash:"s-1e",code:'.hot-key-helpers-container.s-1e{align-items:center;animation:s-1e-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-1e{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-1e{left:calc(75% - 100px)}.hot-key-helpers-text.s-1e{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-1e{animation:s-1e-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-1e-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-1e-fadeOut{0%{opacity:1}to{opacity:0}}'};function Wm(t,e){B(e,!0),Q(t,Aw);let[i,o]=Ve(),r=()=>w(e.data,"$data",i),a=ve(),{features:l}=At(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=r())==null?void 0:I.type}),v=m(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var $=Pw();let y;var h=C($);{var x=I=>{var T=kw(),N=ce(T),L=C(N);{var E=Z=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");zm(Z,{get reversed(){return n(ie)},shadow:!0})};R(L,Z=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&Z(E)})}var k=A(L,2);{var q=Z=>{Ns(Z,{get size(){return"48"},shadow:!0})};R(k,Z=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&Z(q)})}var H=A(k,2);{var z=Z=>{En(Z,{get size(){return"48"},shadow:!0})};R(H,Z=>{n(p)==="PLAY"&&!l.playbackStatusShow&&Z(z)})}var j=A(H,2);{var ae=Z=>{ic(Z,{get size(){return"48"},shadow:!0})};R(j,Z=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&Z(ae)})}var X=A(j,2);{var ne=Z=>{na(Z,{get size(){return"48"},type:"off",shadow:!0})};R(X,Z=>{n(p)==="SUBTITLES_OFF"&&Z(ne)})}var J=A(X,2);{var we=Z=>{na(Z,{get size(){return"48"},shadow:!0})};R(J,Z=>{n(p)==="SUBTITLES_ON"&&Z(we)})}var pe=A(J,2);{var re=Z=>{let ie=m(()=>n(p)==="RATE_DOWN");cc(Z,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(pe,Z=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&Z(re)})}var _e=A(pe,2);{var $e=Z=>{let ie=m(()=>n(p)==="EPISODE_PREV");sa(Z,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,Z=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&Z($e)})}var ee=A(_e,2);{var Re=Z=>{ra(Z,{get size(){return"48"},volume:0,shadow:!0})};R(ee,Z=>{n(p)==="MUTE"&&Z(Re)})}var fe=A(ee,2);{var P=Z=>{ra(Z,{get size(){return"48"},volume:1,shadow:!0})};R(fe,Z=>{n(p)==="VOLUME"&&Z(P)})}S(N);var We=A(N,2);{var Te=Z=>{var ie=Ew(),De=C(ie,!0);S(ie),O(()=>me(De,n(v))),b(Z,ie)};R(We,Z=>{n(v)&&Z(Te)})}O(()=>Le(N,"data-type",n(p))),b(I,T)};R(h,I=>{!n(s)&&n(p)&&I(x)})}S($),O(I=>y=se($,1,"hot-key-helpers-container s-1e",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(f)})]),b(t,$),F(),o()}var Lw=(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}},Mw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Vw=M('<div tabindex="0" role="button"><div class="button-block s-j" aria-hidden="true"><div class="button-row s-j"><div class="button button-up s-j"><!></div> <div class="button button-right s-j"><!></div></div> <div class="button-row s-j"><div class="button button-left s-j"><!></div> <div class="button button-down s-j"><!></div></div></div></div>'),Rw={hash:"s-j",code:".immersive-controls.s-j{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-j{left:20px;top:50px}.button-block.s-j{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-j{display:flex;flex-direction:row;position:relative}.button.s-j{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-j svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-j svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-j svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-j svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-j svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-j:hover svg{opacity:1}"};function uc(t,e){B(e,!0),Q(t,Rw);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),f=G("aria_label_spherical_control");var p=Vw();let v;p.__keydown=[Lw,r,a,l,s,d],p.__keyup=[Mw,r,u];var $=C(p),y=C($),h=C(y);h.__mousedown=a,h.__mouseup=u;var x=C(h);Lr(x,{direction:"up",useBtnColor:!0}),S(h);var I=A(h,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Lr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=A(y,2),L=C(N);L.__mousedown=s,L.__mouseup=u;var E=C(L);Lr(E,{direction:"up",useBtnColor:!0}),S(L);var k=A(L,2);k.__mousedown=l,k.__mouseup=u;var q=C(k);Lr(q,{direction:"up",useBtnColor:!0}),S(k),S(N),S($),S(p),O(H=>{v=se(p,1,"immersive-controls s-j",null,v,H),Le(p,"aria-label",f)},[()=>({"m-shifted":i()})]),st("mouseleave",h,u),st("mouseleave",I,u),st("mouseleave",L,u),st("mouseleave",k,u),b(t,p),F()}Ge(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as ub,Subscription as Nw,filterChanged as Dw,filter as Ow}from"@vkontakte/videoplayer-shared/es2018";var cb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var Ju=class{constructor(){this.flickeringTimeout=cb(1e3);this.subscriptions=new Nw;this.isAuto=!1;this.isLive=!1;this.captions$=new ub([]);this.captionsPrepared$=new ub([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Ow(()=>this.isEnabled()),Dw()).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 Bw=M('<span class="caption-line s-b"><span class="caption-segment s-b"> </span></span>'),Fw=M('<span class="caption-line s-b"><span class="caption-segment s-b"></span></span>'),Hw=M('<span class="caption-line s-b"><span class="caption-segment s-b"> </span></span>'),Uw=M('<div><span class="caption s-b"><!></span></div>'),zw=M("<div><!></div>"),Ww={hash:"s-b",code:".subtitles-container.s-b{height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:transform var(--controls-transition-duration);width:100%}.subtitles-container.shifted.s-b{transform:translateY(calc(var(--controls-height)*-1))}.subtitles-container.preview-track-active.s-b{transform:translateY(calc(var(--preview-track-height)*-1))}.preview-track-active.s-b .subtitles-caption:where(.s-b){bottom:var(--preview-track-controls-top-offset)}.subtitles-caption.s-b{bottom:4%;display:flex;justify-content:center;left:4%;position:absolute;right:4%}.subtitles-caption.mobile.s-b{bottom:8%}.subtitles-container.auto.s-b .subtitles-caption:where(.s-b){left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin)}.caption.s-b{background:rgba(0,0,0,.4);border-radius:4px;display:block;overflow-wrap:normal;padding:4px 8px}.subtitles-container.auto.s-b .caption:where(.s-b){width:100%}.caption-line.s-b{display:block;text-align:center}.subtitles-container.auto.s-b .caption-line:where(.s-b){text-align:left}.caption-segment.s-b{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,Ww);let[i,o]=Ve(),r=()=>w(v,"$currentSubtitle$",i),a=()=>w(y,"$isLive$",i),l=()=>w(h,"$isFullscreen",i),d=()=>w(x,"$previewTrackActive",i),s=()=>w($,"$isAutoSubtitleCaptionVisible$",i),u=g(e,"isMobile",3,!1),f=ve(),p=At(),v=f.state.currentSubtitle$,$=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,h=f.ui.isFullscreen,x=f.ui.previewTrackActive,I=m(()=>!!r().isAuto),T=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),L=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=K(null);Ne(()=>{var X,ne,J;(X=n(E))==null||X.setIsAuto(n(I)),(ne=n(E))==null||ne.setIsLive(n(T)),(J=n(E))==null||J.setCaptions(e.captions)});let k=K(ai([[]]));Pt(()=>{D(E,new Ju().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(ne=>{D(k,ne,!0)});return()=>{var ne;(ne=n(E))==null||ne.destroy(),X.unsubscribe()}}),Pt(()=>{if(n(I)){let X=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(X)}}else $.set(!1)});let q=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=zw();let z;var j=C(H);{var ae=X=>{var ne=Uw();let J;var we=C(ne),pe=C(we);{var re=$e=>{var ee=Bw(),Re=C(ee),fe=C(Re,!0);S(Re),S(ee),O(P=>{var We;qe(Re,`font-size: ${(We=n(L))!=null?We:""}px`),me(fe,P)},[()=>G("subtitles_auto_caption")]),b($e,ee)},_e=($e,ee)=>{{var Re=P=>{var We=Ae(),Te=ce(We);hi(Te,17,()=>n(k),$d,(Z,ie)=>{var De=Fw(),Oe=C(De);hi(Oe,21,()=>n(ie),({value:tt,timeAppeared:U})=>U,(tt,U)=>{let Pe=()=>n(U).value,ke=()=>n(U).timeAppeared;var Ue=Ae(),et=ce(Ue);{var ye=Ie=>{var Be=cs();O(()=>me(Be,Pe())),b(Ie,Be)};R(et,Ie=>{(!ke()||ke()<=e.position)&&Ie(ye)})}b(tt,Ue)}),S(Oe),S(De),O(()=>{var tt;return qe(Oe,`font-size: ${(tt=n(L))!=null?tt:""}px`)}),b(Z,De)}),b(P,We)},fe=P=>{var We=Ae(),Te=ce(We);hi(Te,17,()=>e.captions,({value:Z})=>Z,(Z,ie)=>{let De=()=>n(ie).value;var Oe=Hw(),tt=C(Oe),U=C(tt,!0);S(tt),S(Oe),O(()=>{var Pe;qe(tt,`font-size: ${(Pe=n(L))!=null?Pe:""}px`),me(U,De())}),b(Z,Oe)}),b(P,We)};R($e,P=>{var We;n(I)&&((We=n(k))!=null&&We.length)?P(Re):P(fe,!1)},ee)}};R(pe,$e=>{n(I)&&s()?$e(re):$e(_e,!1)})}S(we),S(ne),O($e=>{var ee;J=se(ne,1,"subtitles-caption s-b",null,J,$e),qe(ne,`--subtitles-caption-margin: ${(ee=n(q))!=null?ee:""}%`)},[()=>({mobile:u()})]),b(X,ne)};R(j,X=>{var ne;(e.captions.length||(ne=n(k))!=null&&ne.length)&&X(ae)})}S(H),O(X=>z=se(H,1,"subtitles-container s-b",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),b(t,H),F(),o()}import{ChromecastState as Kw}from"@vkontakte/videoplayer-core/es2018";var qw=M('<div class="text s-o"> </div>'),Qw=M('<div><div class="icon_wrapper s-o"><!></div> <!></div>'),Gw={hash:"s-o",code:".wrapper.s-o{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-o{background-size:cover}.icon_wrapper.s-o{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-o{margin-top:20px}"};function pc(t,e){B(e,!0),Q(t,Gw);let i=g(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=At();var r=Qw();let a;r.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},r.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},r.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=C(r),d=C(l);jd(d,{get size(){return"48"},get iconState(){return Kw.CONNECTED}}),S(l);var s=A(l,2);{var u=f=>{var p=qw(),v=C(p);S(p),O(()=>{var $;return me(v,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(f,p)};R(s,f=>{i()&&f(u)})}S(r),O(f=>{a=se(r,1,"wrapper s-o",null,a,f),qe(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,r),F()}Ge(["contextmenu","click","dblclick"]);var Yw=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 Km(t){Xe(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=Yw();b(e,o)},$$slots:{default:!0}})}var jw=M('<div class="container s-5"><!></div>'),Xw={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 Qa(t){Q(t,Xw);var e=jw(),i=C(e);Km(i,{}),S(e),b(t,e)}var Zw=M('<div class="playButton s-a" tabindex="0" role="button"><div class="playButtonBackground s-a"></div> <!></div>'),Jw=M('<div data-testid="unstarted-thumb"><!></div>'),eS={hash:"s-a",code:".container.s-a{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-a{opacity:0;visibility:hidden}.container.bgCover.s-a{background-size:cover}.playButton.s-a{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-a,.playButtonBackground.s-a{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-a{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-a:hover .playButtonBackground:where(.s-a){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-a svg{position:relative}"};function Ga(t,e){B(e,!0),Q(t,eS);let i=g(e,"iconVisible",3,!0),o=ve(),r=At(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var h;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(h=e.startVideo)==null||h.call(e))},s=$=>{var y,h;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(h=e.onClick)==null||h.call(e,$)};var u=Jw();let f;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=C(u);{var v=$=>{var y=Zw();y.__keydown=d;var h=A(C(y),2);En(h,{get size(){return"48"}}),S(y),O(()=>Le(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(v)})}return S(u),O($=>{f=se(u,1,"container s-a",null,f,$),qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:s})}Ge(["click","contextmenu","keydown"]);var tS=M('<span class="text s-1h"> </span>'),iS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},oS=M('<a target="_blank" class="link s-1h"><!></a>'),nS=M('<div data-testid="video_title"><!></div>'),rS={hash:"s-1h",code:".title.s-1h{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-1h,.title.s-1h{color:var(--white)}.link.s-1h{pointer-events:auto;text-decoration:none}.link.s-1h:hover{text-decoration:underline}.text.s-1h{pointer-events:auto}.size-sm.s-1h{font-size:14px;font-weight:500;line-height:18px}.hidden.s-1h{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function qm(t,e){var y;B(e,!0),Q(t,rS);let i=h=>{var x=tS(),I=C(x,!0);S(x),je(x,T=>l(T),()=>l()),O(()=>me(I,o())),st("mouseenter",x,function(...T){var N;(N=e.onMouseEnter)==null||N.apply(this,T)}),st("mouseleave",x,function(...T){var N;(N=e.onMouseLeave)==null||N.apply(this,T)}),b(h,x)},o=g(e,"title",3,""),r=g(e,"isHidden",3,!1),a=g(e,"size",3,"md"),l=g(e,"ref",15),d=K(void 0);Pt(()=>{var x;requestAnimationFrame(()=>{var I;(I=e.onVisibilityChanged)==null||I.call(e,!0)});function h(I){var T;I.propertyName==="transform"&&((T=e.onVisibilityChanged)==null||T.call(e,!r()))}return(x=n(d))==null||x.addEventListener("transitionend",h),()=>{var I;return(I=n(d))==null?void 0:I.removeEventListener("transitionend",h)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=nS();let f;var p=C(u);{var v=h=>{var x=oS();x.__click=[iS,e];var I=C(x);i(I),S(x),O(()=>Le(x,"href",s||"")),b(h,x)},$=h=>{i(h)};R(p,h=>{s||e.onTitleClicked?h(v):h($,!1)})}S(u),je(u,h=>D(d,h),()=>n(d)),O(h=>f=se(u,1,`title size-${a()}`,"s-1h",f,h),[()=>({hidden:r()})]),b(t,u),F()}Ge(["click"]);import{throttleFn as pS}from"@vkontakte/videoplayer-shared/es2018";var sS=M('<div class="timer__cell cell s-y"><span class="cell__value s-y"> </span> <span class="cell__unit s-y"> </span></div> <span class="timer__points s-y"> </span>',1),aS=M('<div class="timer__cell cell s-y"><span class="cell__value s-y"> </span> <span class="cell__unit s-y"> </span></div> <span class="timer__points s-y"> </span>',1),lS=M('<div class="timer__cell cell s-y"><span class="cell__value s-y"> </span> <span class="cell__unit s-y"> </span></div> <span class="timer__points s-y"> </span>',1),dS=M('<div class="timer__cell cell s-y"><span class="cell__value s-y"> </span> <span class="cell__unit s-y"> </span></div>'),cS=M("<div><!> <!> <!> <!></div>"),uS={hash:"s-y",code:".timer__container.s-y{align-items:flex-start;display:flex;justify-content:center}.cell.s-y{align-items:center;display:flex;flex-direction:column}.cell__value.s-y{font-size:48px;font-weight:600;line-height:1.2}.small.s-y .cell__value:where(.s-y){font-size:24px}.cell__unit.s-y{font-size:14px;font-weight:400;line-height:1.2}.small.s-y .cell__unit:where(.s-y){font-size:12px}.timer__points.s-y{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-y .timer__points:where(.s-y){font-size:20px}"};function Qm(t,e){B(e,!0),Q(t,uS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),f=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*f(H)}px`,v=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,D(i,u(z),!0));let j=Math.floor(H/3600);D(o,u(j),!0);let ae=Math.floor(H/60)%60;D(r,u(ae),!0);let X=H%60;D(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;v(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Pt(()=>{l=requestAnimationFrame($)}),an(()=>{cancelAnimationFrame(l)});var y=cS();let h;var x=C(y);{var I=H=>{var z=sS(),j=ce(z);let ae;var X=C(j),ne=C(X,!0);S(X);var J=A(X,2),we=C(J,!0);S(J),S(j);var pe=A(j,2),re=C(pe,!0);S(pe),O((_e,$e,ee)=>{ae=qe(j,"",ae,{width:_e}),me(ne,n(i)),me(we,$e),me(re,ee)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(x,H=>{n(i)&&H(I)})}var T=A(x,2);{var N=H=>{var z=aS(),j=ce(z);let ae;var X=C(j),ne=C(X,!0);S(X);var J=A(X,2),we=C(J,!0);S(J),S(j);var pe=A(j,2),re=C(pe,!0);S(pe),O((_e,$e,ee)=>{ae=qe(j,"",ae,{width:_e}),me(ne,n(o)),me(we,$e),me(re,ee)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(T,H=>{n(o)&&H(N)})}var L=A(T,2);{var E=H=>{var z=lS(),j=ce(z);let ae;var X=C(j),ne=C(X,!0);S(X);var J=A(X,2),we=C(J,!0);S(J),S(j);var pe=A(j,2),re=C(pe,!0);S(pe),O((_e,$e,ee)=>{ae=qe(j,"",ae,{width:_e}),me(ne,n(r)),me(we,$e),me(re,ee)},[()=>p(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(L,H=>{n(r)&&H(E)})}var k=A(L,2);{var q=H=>{var z=dS();let j;var ae=C(z),X=C(ae,!0);S(ae);var ne=A(ae,2),J=C(ne,!0);S(ne),S(z),O((we,pe)=>{j=qe(z,"",j,{width:we}),me(X,n(a)),me(J,pe)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(k,H=>{n(a)&&H(q)})}S(y),O(H=>h=se(y,1,"timer__container s-y",null,h,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var fS=M('<div class="waiting s-r"><span> </span></div>'),mS=M('<div class="upcoming-timer timer s-r"><span> </span> <!></div>'),vS=M('<div class="waiting-container s-r"><!></div>'),gS={hash:"s-r",code:'.waiting-container.s-r{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-r,.waiting-container.s-r:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-r:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-r{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-r{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-r{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-r{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-r{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-r{font-size:15px}.medium.s-r{font-size:17px}'};function fc(t,e){B(e,!0),Q(t,gS);let i=g(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=m(()=>{var x,I;return((x=n(d))!=null?x:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),f=m(()=>{var x,I;return!n(u)&&(((x=n(d))!=null?x:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?pS(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let x={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(x,I)})},300):void 0;Ne(()=>{n(s),n(d),n(o),p==null||p()}),an(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let x={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"};e.onUpcomingLiveViewStateChanged(x)}});var v=vS();v.__contextmenu=function(...x){var I;(I=e.onContextMenu)==null||I.apply(this,x)},v.__click=function(...x){var I;(I=e.onClick)==null||I.apply(this,x)};var $=C(v);{var y=x=>{var I=fS(),T=C(I);let N;var L=C(T,!0);S(T),S(I),je(I,E=>D(r,E),()=>n(r)),O((E,k)=>{N=se(T,1,"waiting__title s-r",null,N,E),me(L,k)},[()=>({medium:n(f),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(x,I)},h=x=>{var I=mS(),T=C(I);let N;var L=C(T,!0);S(T);var E=A(T,2);let k=m(()=>n(u)||n(f)),q=m(()=>i()||0);Qm(E,{get isSmallSize(){return n(k)},get startTime(){return n(q)},onTimerOver:()=>D(o,!0)}),S(I),je(I,H=>D(a,H),()=>n(a)),O((H,z)=>{N=se(T,1,"timer__title s-r",null,N,H),me(L,z)},[()=>({medium:n(f),small:n(u)}),()=>G("waiting_live_timer_title")]),b(x,I)};R($,x=>{n(o)?x(y):x(h,!1)})}S(v),O(()=>qe(v,`background-image: url(${e.thumbUrl})`)),Tn(v,"clientWidth",x=>D(d,x)),Tn(v,"clientHeight",x=>D(s,x)),b(t,v),F()}Ge(["contextmenu","click"]);var hS=M('<div class="waiting-container s-p"><div class="waiting-caption s-p"><!> <p class="waiting-title s-p"> </p></div></div>'),_S={hash:"s-p",code:'.waiting-container.s-p{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-p,.waiting-container.s-p:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-p:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-p{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-p{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Ya(t,e){B(e,!0),Q(t,_S);let i=g(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=hS();a.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},a.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)};var l=C(a),d=C(l);Oa(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=C(s,!0);S(s),S(l),S(a),O(()=>{qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}Ge(["contextmenu","click"]);var bS=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 Gm(t){Xe(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=bS();b(e,o)},$$slots:{default:!0}})}var $S=M('<div class="select-icon s-1w"><!></div>'),yS={hash:"s-1w",code:".select-icon.s-1w{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function mc(t){Q(t,yS);var e=$S(),i=C(e);Gm(i,{}),S(e),b(t,e)}var xS=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},wS=(t,e)=>{Ml(t,()=>e.item.selectItem(e.item.value))},SS=M("<p> </p>"),CS=M('<p class="sublabel s-1q"> </p>'),TS=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),IS={hash:"s-1q",code:".menu-item-value.s-1q{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1q{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1q,.sublabel.s-1q{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1q{opacity:.5}"};function Ym(t,e){B(e,!0),Q(t,IS);let i=g(e,"isMobile",3,!1);var o=TS();let r;o.__click=[xS,e],o.__keydown=[wS,e];var a=C(o);{var l=y=>{mc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let s;var u=C(d);{var f=y=>{var h=Ae(),x=ce(h);Ni(x,()=>e.item.valueComponent,(I,T)=>{T(I,jr(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,h)},p=y=>{var h=SS();let x;var I=C(h,!0);S(h),O(T=>{var N;x=se(h,1,"label s-1q",null,x,T),me(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,h)};R(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=A(u,2);{var $=y=>{var h=CS(),x=C(h,!0);S(h),O(()=>me(x,e.item.sublabel)),b(y,h)};R(v,y=>{e.item.sublabel&&y($)})}S(d),S(o),O((y,h,x)=>{var I;r=se(o,1,"item",null,r,y),Le(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Le(o,"aria-label",h),Le(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1q",null,s,x),Le(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,h;return(h=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?h:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}Ge(["click","keydown"]);var ES=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=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>h=>Mu(h,n(r)));var l=ES();let d;l.__click=function(...h){var x;(x=n(r))==null||x.apply(this,h)},l.__keydown=function(...h){var x;(x=n(a))==null||x.apply(this,h)};var s=C(l);{var u=h=>{mc(h,{})};R(s,h=>{e.item.selected&&h(u)})}var f=A(s,2);let p;var v=C(f);{var $=h=>{var x=Ae();let I=m(()=>e.item.valueComponent);var T=ce(x);Ni(T,()=>n(I),(N,L)=>{L(N,jr(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(h,x)},y=h=>{var x=cs();O(()=>me(x,e.item.label)),b(h,x)};R(v,h=>{e.item.valueComponent?h($):h(y,!1)})}S(f),S(l),je(l,h=>o(o()[e.item.id]=h,!0),()=>{var h;return(h=o())==null?void 0:h[e.item.id]}),O((h,x)=>{var I;d=se(l,1,"item",null,d,h),Le(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Le(l,"data-testid",e.item.id),p=se(f,1,"menu-item-value",null,p,x)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}Ge(["click","keydown"]);var Zr={"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 PS=(t,e)=>{P_(t,e.returnFromSubMenu,e.closeSettingsMenu)},AS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},LS=(t,e)=>{Od(t)&&(Mr(t),e.returnFromSubMenu())},MS=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-19"> </p></li> <!></ul></div>'),VS={hash:"s-19",code:".sub-menu.s-19{--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-19 .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-19{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-19{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-19 .items:where(.s-19) .item.header:where(.s-19){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-19 .title:where(.s-19){margin-left:8px}.sub-menu.s-19 .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-19 .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-19 .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-19 .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-19 .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-19 .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-19 .item .sublabel{font-size:12px;line-height:14px}.item.s-19:not(.mobile) p:where(.s-19),.sub-menu.s-19 .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Zm(t,e){B(e,!0),Q(t,VS);let[i,o]=Ve(),r=()=>w(p,"$isFullscreen",i),a=()=>w(v,"$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);Pt(()=>{let X=e.items.findIndex(ne=>ne.selected);u().children[X+1].focus()});let f=ve(),p=f.ui.isFullscreen,v=f.ui.playerSize,$=K(void 0),y=K(0),h=K(0),x=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(h)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var T=MS();let N;var L=C(T);let E;L.__keydown=[PS,e];var k=C(L);let q;k.__click=[AS,e],k.__keydown=[LS,e];var H=C(k);Lr(H,{direction:"left"});var z=A(H,2),j=C(z,!0);S(z),S(k),je(k,X=>D($,X),()=>n($));var ae=A(k,2);hi(ae,17,()=>e.items,$d,(X,ne)=>{var J=Ae(),we=ce(J);{var pe=_e=>{Ym(_e,{get item(){return n(ne)},get isMobile(){return l()}})},re=(_e,$e)=>{{var ee=Re=>{jm(Re,{get isMobile(){return l()},get item(){return n(ne)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Re=>{n(ne).type==="OPEN_SUB_MENU"&&Re(ee)},$e)}};R(we,_e=>{n(ne).type==="SELECT_VALUE"?_e(pe):_e(re,!1)})}b(X,J)}),S(L),je(L,X=>u(X),()=>u()),S(T),O((X,ne,J)=>{N=se(T,1,"sub-menu menu s-19",null,N,X),Le(T,"data-testid",`${e.id}-sub-menu`),qe(T,`min-width: ${n(I)}px`),E=se(L,1,"items s-19",null,E,ne),qe(L,n(x)),q=se(k,1,"item header back s-19",null,q,J),Le(k,"aria-label",s()),me(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Tn(k,"clientWidth",X=>D(y,X)),Tn(k,"clientHeight",X=>D(h,X)),b(t,T),F(),o()}Ge(["keydown","click"]);import{noop as RS}from"@vkontakte/videoplayer-shared/es2018";var NS=(t,e)=>Mu(t,e()),DS=(t,e)=>{t.stopPropagation(),e()()},OS=M('<div class="value s-1a"> </div>'),BS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),FS={hash:"s-1a",code:".value.s-1a{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function Jm(t,e){B(e,!0),Q(t,FS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,RS),r=g(e,"valueComponent",3,void 0),a=g(e,"iconProps",19,()=>({})),l=g(e,"ref",15);var d=BS();let s;d.__click=[DS,o],d.__keydown=[NS,o];var u=C(d),f=C(u);{var p=T=>{za(T,{get icon(){return e.icon}})},v=T=>{var N=Ae();let L=m(()=>e.icon);var E=ce(N);Ni(E,()=>n(L),(k,q)=>{q(k,jr(a))}),b(T,N)};R(f,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var $=A(u,2),y=C($,!0);S($);var h=A($,2);{var x=T=>{var N=Ae();let L=m(r);var E=ce(N);Ni(E,()=>n(L),(k,q)=>{q(k,{})}),b(T,N)},I=T=>{var N=OS(),L=C(N,!0);S(N),O(()=>me(L,e.value)),b(T,N)};R(h,T=>{r()?T(x):T(I,!1)})}S(d),je(d,T=>l(T),()=>l()),O(T=>{s=se(d,1,"item",null,s,T),Le(d,"aria-label",e.ariaLabel),Le(d,"data-testid",e.id),me(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}Ge(["click","keydown"]);import{noop as fb}from"@vkontakte/videoplayer-shared/es2018";var HS=(t,e)=>{Ml(t,()=>e())},US=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),zS=M('<img class="icon" aria-hidden="true"/>'),WS=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1b"> </div></li>'),KS={hash:"s-1b",code:".label.s-1b{overflow:hidden;text-overflow:ellipsis}"};function ev(t,e){B(e,!0),Q(t,KS);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,fb),r=g(e,"closeSettings",3,fb),a=K(!1),l=()=>{D(a,!0)},d=x=>{x==null||x.stopPropagation(),o()(),r()()};var s=WS();let u;s.__click=d,s.__keydown=[HS,d];var f=C(s),p=C(f);{var v=x=>{var I=Ae(),T=ce(I);{var N=E=>{var k=US();b(E,k)},L=E=>{var k=zS();O(()=>Le(k,"src",e.icon)),st("error",k,l),Ia(k),b(E,k)};R(T,E=>{n(a)?E(N):E(L,!1)})}b(x,I)},$=x=>{var I=Ae();let T=m(()=>e.icon);var N=ce(I);Ni(N,()=>n(T),(L,E)=>{E(L,{})}),b(x,I)};R(p,x=>{typeof e.icon=="string"?x(v):x($,!1)})}S(f);var y=A(f,2),h=C(y,!0);S(y),S(s),O(x=>{var I;u=se(s,1,"item",null,u,x),Le(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Le(s,"data-testid",e.id),me(h,e.label)},[()=>({mobile:i()})]),b(t,s),F()}Ge(["click","keydown"]);import{noop as GS}from"@vkontakte/videoplayer-shared/es2018";var qS=M('<div class="toggle_wrap s-1o"><div></div> <div class="toggle-label s-1o"></div></div>'),QS={hash:"s-1o",code:'.toggle_wrap.s-1o{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1o{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1o: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-1o:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1o{overflow:hidden}'};function tv(t,e){Q(t,QS);let i=g(e,"enabled",3,!1);var o=qS(),r=C(o);let a;li(2),S(o),O(l=>a=se(r,1,"toggle s-1o",null,a,l),[()=>({on:i()})]),b(t,o)}var YS=(t,e,i)=>{A_(t,e(),o=>i()(o))},jS=(t,e,i)=>{t.stopPropagation(),e()(!i())},XS=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),ZS=M('<li role="menuitem" tabindex="0"><!></li>');function iv(t,e){B(e,!0);let i=g(e,"isMobile",3,!1),o=g(e,"onClick",3,GS),r=g(e,"enabled",3,!1),a=g(e,"tooltipText",3,void 0),l=g(e,"maxTooltipWidth",3,void 0);var d=ZS();let s;d.__click=[jS,o,r],d.__keydown=[YS,r,o];var u=C(d);Ba(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(f,p)=>{var v=XS();let $;var y=C(v),h=C(y);{var x=E=>{za(E,{get icon(){return e.icon}})},I=E=>{var k=Ae();let q=m(()=>e.icon);var H=ce(k);Ni(H,()=>n(q),(z,j)=>{j(z,{})}),b(E,k)};R(h,E=>{typeof e.icon=="string"?E(x):E(I,!1)})}S(y);var T=A(y,2),N=C(T,!0);S(T);var L=A(T,2);tv(L,{get enabled(){return r()}}),S(v),O(E=>{$=se(v,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(f,v)},$$slots:{default:!0}}),S(d),O(f=>{var p;s=se(d,1,"item switch-item",null,s,f),Le(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Le(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}Ge(["click","keydown"]);import{isValidURL as wC,VideoQuality as Sb}from"@vkontakte/videoplayer-shared/es2018";var mb=()=>{let t=K(ai([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{D(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{D(t,[],!0)}}};import{getVideoQualityLabel as JS}from"@vkontakte/videoplayer-shared/es2018";var eC=M('<div class="quality-icon s-1n"><!></div>'),tC=M('<div class="quality-label s-1n"><span> </span> <!></div>'),iC={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 ja(t,e){B(e,!0),Q(t,iC);let i=g(e,"isSubCase",3,!1),o=m(()=>e.quality?JS(e.quality):""),r=m(()=>Bu(e.quality));var a=tC(),l=C(a);let d;var s=C(l,!0);S(l);var u=A(l,2);{var f=p=>{var v=eC();let $=m(()=>n(r));var y=C(v);Ni(y,()=>n($),(h,x)=>{x(h,{})}),S(v),O(()=>Le(v,"data-testid",`${n(o)}-icon`)),b(p,v)};R(u,p=>{n(r)&&!e.isMobile&&p(f)})}S(a),O(p=>{d=se(l,1,"s-1n",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}import{VideoQuality as oC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as vb}from"@vkontakte/videoplayer-core/es2018";var gb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},hb=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=gb({quality:t,availableQualities:e});return i?t===vb.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},_b=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===vb.INVARIANT?i:`${i}${gb({quality:t,availableQualities:e})}`:"...";var nC=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),rC={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function Kl(t,e){B(e,!0),Q(t,rC);let[i,o]=Ve(),r=()=>w(s,"$currentQuality$",i),a=()=>w(u,"$availableQualities$",i),l=()=>w(f,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&r()!==oC.INVARIANT?p:"")),$=m(()=>_b({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=nC(),h=C(y);let x=m(()=>e.selected?r():void 0);ja(h,{get quality(){return n(x)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var sC=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")},aC={br:!0,span:!0},ov=(t,e={})=>{var d,s,u,f,p,v,$;if(!t)return t;let i={...aC,...e},o=Object.keys(i);if(!o.length)return t;let r=sC(o),a=[],l=0;for(let y of t.matchAll(r)){let h=y[0],x=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[x]){a.push(t.slice(l,I)),l=I+h.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?ov(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?h.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>T||""):h;a.push(t.slice(l,I),N),l=I+h.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function vc(t,e){B(e,!1);let i=g(e,"message",8),o=ov(i());bo();var r=Ae(),a=ce(r);{var l=d=>{var s=Ae(),u=ce(s);yd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var lC=M('<p class="quality-applies sublabel s-1r"><!></p>'),dC={hash:"s-1r",code:".quality-applies.s-1r{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function nv(t,e){B(e,!1),Q(t,dC),bo();var i=lC(),o=C(i);let r=yn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));vc(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var $b=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:G("other_quality"),selected:o,valueComponent:Kl,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},rv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?Kl:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),yb=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:nv,bottomBordered:!0,children:"quality-appliance"}),sv=({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?Kl:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),av=({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?Kl:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var ep=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),tp=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Jd(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=ep(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=ep(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=ep(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=ep(t,e);return G("audio_stream_display_unknown",{index:a})};var cC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:rv,selected:e&&!o&&!r||!1}),a.push({handler:av,selected:o},{handler:sv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[yb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),$b(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:ja,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:rv,selected:((i=yu())==null?void 0:i.type)==="auto_quality"},{handler:av,selected:((o=yu())==null?void 0:o.type)==="traffic_saving"},{handler:sv,selected:((r=yu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:G("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:tp(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}))})},xb=({subMenuId:t,context:e})=>t?[cC[t](e)]:[];var uC=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 lv(t){Xe(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=uC();b(e,o)},$$slots:{default:!0}})}var pC=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 dv(t){Xe(t,{width:"18",height:"15",children:(e,i)=>{var o=pC();b(e,o)},$$slots:{default:!0}})}var fC=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 cv(t){Xe(t,{testId:"play-speed-icon",children:(e,i)=>{var o=fC();b(e,o)},$$slots:{default:!0}})}var mC=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 uv(t){Xe(t,{testId:"download-icon",children:(e,i)=>{var o=mC();b(e,o)},$$slots:{default:!0}})}var vC=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 pv(t){Xe(t,{testId:"report-icon",children:(e,i)=>{var o=vC();b(e,o)},$$slots:{default:!0}})}var gC=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 ip(t){Xe(t,{children:(e,i)=>{var o=gC();b(e,o)},$$slots:{default:!0}})}var hC=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 fv(t){Xe(t,{testId:"info-icon",children:(e,i)=>{var o=hC();b(e,o)},$$slots:{default:!0}})}var _C=M('<div class="menu-item-value-wrapper s-1u"><!></div>'),bC={hash:"s-1u",code:".menu-item-value-wrapper.s-1u{line-height:normal}"};function mv(t,e){B(e,!0),Q(t,bC);let[i,o]=Ve(),r=()=>w(u,"$currentQuality$",i),a=()=>w(f,"$availableQualities$",i),l=()=>w(p,"$isAutoQualityEnabled$",i),d=()=>w(v,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,f=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,$=m(()=>hb({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=_C(),h=C(y);ja(h,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var yC={"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:Kd,label:G("menu_quality"),value:e,valueComponent:mv,weight:Zr["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:Zr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:lv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=tp(t,e);return{id:"audio-tracks-settings",weight:Zr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:dv,label:G("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:Zr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:cv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:Zr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:na,iconProps:{type:"outline"},label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:Zr.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:uv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:Zr.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:pv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:Zr["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:ip,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:Zr["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:ip,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:Zr["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:fv,isHiddenFor:["desktop"]})},wb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>yC[r](e)),...i.map(r=>({...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(Na)};var SC=(t,e)=>{Lu(t,e)},CC=M('<div><div> </div> <div class="close s-q"></div></div>'),TC=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),IC=M("<div><!> <!></div>"),EC={hash:"s-q",code:'.settings-menu-container.mobile.s-q{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-q ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-q .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-q .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-q .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-q .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-q .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-q .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-q{line-height:40px}.settings-menu.desktop.s-q{min-width:300px}.settings-menu-container.s-q .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-q .menu.mobile.hidden{display:none}.settings-menu-container.s-q .menu .item:not(.switch-item),.settings-menu-container.s-q .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-q .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-q .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-q .item:not(.switch-item),.settings-menu.s-q .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-q .item.mobile:not(.switch-item),.settings-menu.s-q .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-q .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-q .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-q .item.header.mobile:where(.s-q){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-q .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-q .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-q .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-q .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-q .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-q{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-q:after,.close.s-q:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-q:before{transform:rotate(45deg)}.close.s-q:after{transform:rotate(-45deg)}'};function gc(t,e){B(e,!0),Q(t,EC);let[i,o]=Ve(),r=()=>w(Oe,"$settingsMenuVisible",i),a=()=>w(tt,"$settingsMenuOpenedByKeyboard",i),l=()=>w(Be,"$debugPanelVisible",i),d=()=>w(Pe,"$isMobile",i),s=()=>w(Ie,"$playerSize",i),u=()=>w(De,"$hasMpegSources$",i),f=()=>w(ke,"$mobileNotReportControlHidden$",i),p=()=>w(ee,"$autoQualityLimitingAvailable$",i),v=()=>w(Z,"$availableSubtitlesList$",i),$=()=>w(Ue,"$isLiveWithPlaybackSpeed",i),y=()=>w(re,"$availableAudioStreams$",i),h=()=>w(We,"$availablePlaybackRates$",i),x=()=>w(pe,"$currentAudioStream$",i),I=()=>w(P,"$currentPlaybackRate$",i),T=()=>w(et,"$trafficSavingEnabled",i),N=()=>w(_e,"$currentQuality$",i),L=()=>w(Re,"$isAutoQualityEnabled$",i),E=()=>w(Te,"$currentSubtitle$",i),k=()=>w(pt,"$additionalSettingsMenuItems$",i),q=()=>w(fe,"$isAutoQualityAvailable$",i),H=()=>w($e,"$availableQualities$",i),z=()=>w(ye,"$highQualityEnabled",i),j=g(e,"ref",15,void 0),ae=g(e,"playerControlsHeight",3,0),X=ai({}),ne=ai({}),J=ve(),we=At(),pe=J.state.audioStream$,re=J.state.availableAudioStreams$,_e=J.state.currentQuality$,$e=J.state.availableQualities$,ee=J.state.autoQualityLimitingAvailable$,Re=J.state.isAutoQualityEnabled$,fe=J.state.isAutoQualityAvailable$,P=J.state.currentPlaybackRate$,We=J.state.availablePlaybackRates$,Te=J.state.currentSubtitle$,Z=J.state.availableSubtitlesList$,ie=J.state.canDownload,De=J.state.hasMpegSources$,Oe=J.ui.settingsMenu.visible$,tt=J.ui.settingsMenu.openedByBtnKeyboard$,U=J.ui.settingsMenu.ref$,Pe=J.ui.isMobile,ke=J.ui.mobileNotReportControlHidden$,Ue=J.state.canChangePlaybackSpeed$,et=J.state.trafficSavingEnabled$,ye=J.state.highQualityEnabled$,Ie=J.ui.playerSize,Be=J.ui.debugPanelVisible,Vt=J.state.isInteractiveTime$,pt=J.ui.additionalSettingsMenuItems$,Dt=J.ui.t,at=J.actions.internal.downloadVideo,yt=J.actions.internal.closeSettingsMenu,Jt=J.actions.internal.openSettingsSubMenu,It=J.actions.internal.closeSettingsSubMenu,Rt=K(!1),Ot=K(void 0),Y=mb();Ne(()=>{!r()&&Y.current&&(It(ne[Y.current]),Y.popAllSubMenus())}),Ne(()=>{r()||D(Ot,void 0)}),Ne(()=>{!Y.current&&n(Ot)&&k_(X,n(Ot))}),Ne(()=>{j()&&U.set(j())});async function Se(xt){var W;Y.pushSubMenu(xt),await fo(),Jt(xt,ne[xt]);let Ht=(W=j())==null?void 0:W.firstElementChild;Ht&&Bf(Ht)}function le(xt){var Ht;xt==null||xt.stopPropagation(),a()||(Ht=e.returnFocus)==null||Ht.call(e),yt(),D(Rt,!1)}function he(xt,Ht){J.actions.internal.setQuality(xt,{appliesTo:Ht,byUser:!0}),le()}function Me(xt){J.actions.internal.setAudioStream(xt),le()}function nt(xt,Ht){J.actions.internal.setTrafficSavingEnabled(xt,Ht),we.features.qualityDetailsSubMenuEnabled&&le()}function ut(xt,Ht){J.actions.internal.setHighQualityEnabled(xt,Ht),le()}function ue(xt){J.actions.internal.setPlaybackRate(xt),le()}function ze(xt){J.actions.internal.setSubtitle(xt),le()}function Qe(){at()}function lt(){wC(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function Bt(){Al(J.actions.internal.getDebugTextData())}let Ft=()=>{let xt=J.actions.internal.getTraceTextData(),Ht=new Blob([...xt],{type:"application/json"}),W=window.URL.createObjectURL(Ht);Aa(W,"vk_player_trace_info","json")};function ei(){Be.set(!l())}function vi(){D(Rt,!0)}function qi(){D(Rt,!1)}function Lt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let ci=m(()=>ie&&u()&&!f()),pi=m(()=>we.features.trafficSaving&&!f()&&p()&&!we.features.qualityDetailsSubMenuEnabled),vt=m(()=>v().length>0&&!f()),Yt=m(()=>!!$()&&!f()),_i=m(()=>we.features.audioLanguages&&y().length>=2&&!f()),Qi=m(()=>!f());Pt(()=>Vt.subscribe(xt=>{xt&&!d()&&!n(Rt)&&!a()&&le()}));let Xt=m(()=>{let xt=[n(Qi)&&"quality-settings",n(_i)&&"audio-tracks-settings",n(Yt)&&"playback-rate-settings",n(vt)&&"subtitles-settings",n(pi)&&"traffic-saving-switch",n(ci)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Ht=>!!Ht);return wb({items:xt,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:h(),currentAudioStream:x(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ue,trafficSavingEnabled:T(),toggleTrafficSaving:nt,currentQuality:N()||Sb.INVARIANT,isAutoQualityEnabled:L()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Qe,onCopyDataClick:Bt,onReportProblemClick:lt,onSaveTraceDataClick:Ft,toggleShowDebugInfo:ei},additionalSettingsMenuItems:k()})}),Ct=m(()=>xb({subMenuId:Y.current,context:{availablePlaybackRates:h(),selectPlaybackRate:ue,trafficSavingEnabled:T(),toggleTrafficSaving:nt,currentQuality:N()||Sb.INVARIANT,isAutoQualityEnabled:L()||!1,isAutoQualityAvailable:q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:ut,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:yt,currentAudioStream:x(),isMobile:d(),selectAudioLanguage:Me,selectQuality:he,selectSubtitle:ze}}));var Ke=IC();let gi;var yo=C(Ke);{var Ao=xt=>{var Ht=TC();let W;Ht.__keydown=[SC,yt];var Et=C(Ht);{var ri=qt=>{var ot=CC();let Di;var Oi=C(ot),jo=C(Oi,!0);S(Oi);var Mo=A(Oi,2);Mo.__click=le,S(ot),O((io,Pi)=>{Di=se(ot,1,"item header s-q",null,Di,io),me(jo,Pi)},[()=>({mobile:d()}),()=>Dt("submenu_settings")]),b(qt,ot)};R(Et,qt=>{d()&&qt(ri)})}var dt=A(Et,2);let wt;hi(dt,21,()=>n(Xt),qt=>qt.id,(qt,ot)=>{var Di=Ae(),Oi=ce(Di);{var jo=io=>{Jm(io,{get isMobile(){return d()},get id(){return n(ot).id},get icon(){return n(ot).icon},get iconProps(){return n(ot).iconProps},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get value(){return n(ot).value},get valueComponent(){return n(ot).valueComponent},onClick:()=>{Se(n(ot).children),D(Ot,n(ot).id,!0)},get ref(){return X[n(ot).id]},set ref(Pi){X[n(ot).id]=Pi}})},Mo=(io,Pi)=>{{var Vr=vo=>{let Ei=m(()=>`${n(ot).id}-menu-item`);ev(vo,{get isMobile(){return d()},get id(){return n(Ei)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},closeSettings:le})},mo=(vo,Ei)=>{{var Xo=Vo=>{let Pn=m(()=>`${n(ot).id}-menu-item`);iv(Vo,{get isMobile(){return d()},get id(){return n(Pn)},get onClick(){return n(ot).onClick},get icon(){return n(ot).icon},get label(){return n(ot).label},get ariaLabel(){return n(ot).ariaLabel},get enabled(){return n(ot).enabled},get tooltipText(){return n(ot).tooltipText},get maxTooltipWidth(){return n(ot).maxTooltipWidth}})};R(vo,Vo=>{n(ot).type==="SWITCH"&&Vo(Xo)},Ei)}};R(io,vo=>{n(ot).type==="CLICK"?vo(Vr):vo(mo,!1)},Pi)}};R(Oi,io=>{n(ot).type==="OPEN_SUB_MENU"?io(jo):io(Mo,!1)})}b(qt,Di)}),S(dt),je(dt,qt=>j(qt),()=>j()),S(Ht),O((qt,ot,Di)=>{W=se(Ht,1,"settings-menu menu s-q",null,W,qt),wt=se(dt,1,"items",null,wt,ot),qe(dt,Di)},[()=>({desktop:!d(),mobile:d(),hidden:!!Y.current}),()=>({mobile:d()}),Lt]),st("mouseenter",Ht,vi),st("mouseleave",Ht,qi),b(xt,Ht)};R(yo,xt=>{r()&&xt(Ao)})}var Lo=A(yo,2);hi(Lo,17,()=>n(Ct),xt=>xt.id,(xt,Ht)=>{let W=m(()=>{var Et;return(Et=n(Ht).minWidth)!=null?Et:137});Zm(xt,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return Y.popSubMenu},get id(){return n(Ht).id},get title(){return n(Ht).title},get closeSettingsMenu(){return yt},openSubMenuList:Se,get items(){return n(Ht).items},get minWidth(){return n(W)},get refMenuItems(){return X},get listRef(){return ne[n(Ht).id]},set listRef(Et){ne[n(Ht).id]=Et}})}),S(Ke),O(xt=>gi=se(Ke,1,"settings-menu-container s-q",null,gi,xt),[()=>({mobile:d(),hidden:!r()})]),b(t,Ke),F(),o()}Ge(["keydown","click"]);var kC=M('<button class="btn s-14"> </button>'),PC={hash:"s-14",code:"button.btn.s-14{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function vv(t,e){Q(t,PC);var i=kC();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),O(()=>me(o,e.label)),b(t,i)}Ge(["click"]);var AC=M('<div class="container s-t"><div class="notification s-t"><div><p class="description s-t"><!></p> <!></div> <!></div></div>'),LC={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 hc(t,e){B(e,!0),Q(t,LC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=At(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=AC(),d=C(l),s=C(d),u=C(s),f=C(u);vc(f,{get message(){return a}}),S(u);var p=A(u,2);{var v=y=>{let h=m(()=>r("slow_video_notification_button"));vv(y,{get label(){return n(h)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(v)})}S(s);var $=A(s,2);As($,{get onClick(){return e.onClose}}),S(d),S(l),Yr(3,d,()=>gs,()=>({duration:i})),b(t,l),F()}import{isIntersecting as Cb,Subscription as MC}from"@vkontakte/videoplayer-shared/es2018";var Xa="annotation",op=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",Xa),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"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((f=this.store)==null?void 0:f.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let v=Ms(a,this.shadowRootContainer);o.forEach($=>{let y=l==null?void 0:l[$],h=y?ge(y):null,x=d==null?void 0:d[$];h&&(x==null||x.set(Cb(h,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new MC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let $=d==null?void 0:d[p];v&&v.isDisplayed?$==null||$.set(Cb(v,Ms(a,this.shadowRootContainer))):$==null||$.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,$;($=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var VC=M('<div class="container s-4"><!></div>'),RC={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 _c(t,e){B(e,!0),Q(t,RC);let i=g(e,"reversed",3,!1);var o=Ae(),r=ce(o);Is(r,()=>e.Icon,a=>{var l=VC(),d=C(l);Ni(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),O(()=>qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}import{PlaybackState as Tb}from"@vkontakte/videoplayer-core/es2018";var NC=M('<div class="container s-1i"><!></div>'),DC={hash:"s-1i",code:".container.s-1i{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function gv(t,e){B(e,!0),Q(t,DC);let[i,o]=Ve(),r=()=>w(s,"$playbackState$",i),a=()=>w(f,"$previewTrackActive",i),l=()=>w(p,"$previewTrackDragInProgress",i),d=()=>w(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=ve(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:$}=At(),y=0,h=K(null),x=K(!1);Ne(()=>{r()===Tb.PLAYING?D(h,En,!0):r()===Tb.PAUSED?D(h,Ns,!0):D(h,null)}),Ne(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,D(h,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Ne(()=>{d()&&!n(x)&&(D(x,!0),D(h,null))});var I=Ae(),T=ce(I);{var N=L=>{var E=NC(),k=C(E);_c(k,{get duration(){return $},get Icon(){return n(h)}}),S(E),b(L,E)};R(T,L=>{n(h)&&v&&L(N)})}b(t,I),F(),o()}var OC=M('<div><div data-testid="video-container"></div></div>'),BC={hash:"s-d",code:".video-container.s-d,.video-wrapper.s-d{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-d{background:var(--black)}.video-container.s-d,.video-wrapper.s-d{z-index:var(--video-container-z-index)}.video-container.s-d{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-d{transition:none}.nocursor.s-d{cursor:none}"};function Za(t,e){B(e,!0),Q(t,BC);let[i,o]=Ve(),r=()=>w(p,"$rotateAlpha",i),a=()=>w(v,"$playerSize",i),l=()=>w(f,"$playerPhase",i),d=()=>w(y,"$chromecastConnected$",i),s=()=>w($,"$isPlaying$",i),u=g(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:$,chromecastConnected$:y}}=ve(),{isSmoothVideoRotate:h}=At(),x=m(()=>u()&&r()%180?a().height/a().width:1);var I=OC();let T;I.__contextmenu=function(...E){var k;(k=e.onContextMenu)==null||k.apply(this,E)},I.__mousedown=function(...E){var k;(k=e.onMouseDown)==null||k.apply(this,E)},I.__mouseup=function(...E){var k;(k=e.onMouseUp)==null||k.apply(this,E)},I.__click=function(...E){var k;(k=e.onClick)==null||k.apply(this,E)},I.__dblclick=function(...E){var k;(k=e.onDblClick)==null||k.apply(this,E)};var N=C(I);let L;je(N,E=>u(E),()=>u()),S(I),O((E,k)=>{T=se(I,1,"video-wrapper s-d",null,T,E),L=se(N,1,"video-container s-d",null,L,k),qe(N,`transform: rotate(${r()}deg) scale(${n(x)})`),Le(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!h})]),b(t,I),F(),o()}Ge(["contextmenu","mousedown","mouseup","click","dblclick"]);var FC=M('<div><span class="text s-1k"> </span> <!></div>'),HC={hash:"s-1k",code:".root.s-1k{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-1k,.root.visible.s-1k{transform:translateX(-50%)}.root.visible.s-1k{opacity:1;visibility:visible}.text.s-1k{font-size:13px;font-weight:600;line-height:16px}"};function hv(t,e){B(e,!0),Q(t,HC);let{ui:{t:i}}=ve();var o=FC();let r;var a=C(o),l=C(a,!0);S(a);var d=A(a,2);cc(d,{get size(){return"16"},fill:"currentColor"}),S(o),O((s,u)=>{r=se(o,1,"root s-1k",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var UC=M('<div class="container s-1l" role="button" data-testid="preview-track-overlay"><div class="icon s-1l"><!></div></div>'),zC={hash:"s-1l",code:".container.s-1l{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-1l,.icon.s-1l{align-items:center;display:flex;justify-content:center}.icon.s-1l{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-1l:hover .icon:where(.s-1l){transform:scale(1.15)}"};function _v(t,e){B(e,!1),Q(t,zC);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};bo();var l=UC();l.__click=a;var d=C(l),s=C(d);return En(s,{get size(){return"32"}}),S(d),S(l),Yr(3,l,()=>gs,()=>({duration:r})),b(t,l),df(e,"handleClick",a),F({handleClick:a})}Ge(["click"]);var WC=M('<div class="container s-1j"><div class="notification s-1j"><span class="text s-1j"> </span></div></div>'),KC={hash:"s-1j",code:".container.s-1j{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-1j{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-1j{font-size:14px;font-weight:500;line-height:18px}"};function bv(t,e){B(e,!1),Q(t,KC);let{ui:{t:i}}=ve();bo();var o=WC(),r=C(o),a=C(r),l=C(a,!0);S(a),S(r),S(o),O(d=>me(l,d),[()=>i("preview_track_notification_text")],yn),Yr(3,r,()=>gs,()=>({duration:340})),b(t,o),F()}var qC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},QC=M("<div><!></div>"),GC=M('<div class="spherical-video-icon s-9"><!></div>'),YC=M("<div><!></div>"),jC=M('<div class="settings-menu s-9"><!></div>'),XC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ZC=M("<!> <!> <!>",1),JC=M('<div class="blocked s-9"></div>'),eT=M('<div class="player-wrapper s-9"><!> <div class="overlay-container"></div></div> <!>',1),tT={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 $v(t,e){B(e,!0),Q(t,tT);let[i,o]=Ve(),r=()=>w(si,"$notificationsToShow$",i),a=()=>w(ci,"$playerPhase",i),l=()=>w(yo,"$isLoaderVisible",i),d=()=>w(vi,"$adPlaybackState",i),s=()=>w(ri,"$crashed",i),u=()=>w(io,"$isInteractiveTime$",i),f=()=>w(_i,"$settingsMenuVisible",i),p=()=>w(Pi,"$isInteractiveExpectation$",i),v=()=>w(Yt,"$controlsVisible",i),$=()=>w(mo,"$touched",i),y=()=>w(Jn,"$graphIsOpened$",i),h=()=>w(pi,"$isFullscreen",i),x=()=>w(Jr,"$autoplayNextEnabled$",i),I=()=>w(Ht,"$postrollPassed",i),T=()=>w(Ao,"$isEnded$",i),N=()=>w(xr,"$cursorInside",i),L=()=>w(jn,"$isControlsAvailable",i),E=()=>w(Zo,"$doubleForwardOn$",i),k=()=>w(Zn,"$fakeIsPlaying$",i),q=()=>w(Ln,"$bottomNoSmooth",i),H=()=>w(Vo,"$interactiveTimeIndicator",i),z=()=>w(Di,"$playerSize",i),j=()=>w(Oi,"$is3DVideo",i),ae=()=>w(An,"$doubleForwardAvailable$",i),X=()=>w(Ke,"$contextMenuVisible$",i),ne=()=>w(ei,"$playbackState$",i),J=()=>w(vo,"$hotKeyMapData",i),we=()=>w(Xt,"$scrubbingInProgress",i),pe=()=>w(Ct,"$volumeChangingInProgress",i),re=()=>w(Lo,"$chromecastConnected$",i),_e=()=>w(Jo,"$controlsTimeoutActive",i),$e=()=>w(Qi,"$settingsMenuOpenedByKeyboard",i),ee=()=>w(Qt,"$contextMenuOpenedByKeyboard$",i),Re=()=>w(Ho,"$contextMenuOpenedByHotKey$",i),fe=()=>w(wi,"$contextMenuButtonRef$",i),P=()=>w(Hr,"$contextMenuLastActiveElem$",i),We=()=>w(vt,"$isFullscreenOpenedByKeyboard",i),Te=()=>w(Ft,"$language$",i),Z=()=>w(ar,"$previewTrackActive$",i),ie=()=>w(jo,"$icon3DVideoVisible",i),De=()=>w(xt,"$chromecastDeviceName$",i),Oe=()=>w(qt,"$currentSubtitle$",i),tt=()=>w(ot,"$currentSubtitleCaptions$",i),U=()=>w(qi,"$position$",i),Pe=()=>w(Lt,"$duration$",i),ke=()=>w(W,"$isLive$",i),Ue=()=>w(Et,"$isPlaying$",i),et=()=>w(_r,"$contextMenuPosition$",i),ye=()=>w($r,"$previewTrackNotificationVisible$",i),Ie=()=>w(Ei,"$showHotKeyMap",i),Be=()=>w(gi,"$debugPanelVisible",i),Vt=()=>w(es,"$userActionsDisabled$",i),pt=g(e,"videoContainer",15),Dt=g(e,"adsSlotId",3,void 0),at=g(e,"adsParams",3,void 0),yt=g(e,"adsAutoplayParam",3,void 0),Jt=g(e,"duration",3,void 0),It=g(e,"logoTargetUrl",3,""),Rt=g(e,"showNextPrevButtons",3,!1),Ot=g(e,"nextButtonActive",3,!1),Y=g(e,"prevButtonActive",3,!1),Se=g(e,"endScreenVideoTitle",3,void 0),le=g(e,"endScreenVideoThumb",3,void 0),he=g(e,"isOneVideoPlaylist",3,!1),Me=g(e,"shadowRootContainer",3,void 0),nt=g(e,"outerContainerRef",3,void 0),ut=g(e,"playerStarted",3,!1),ue=g(e,"fullScreenTarget",3,void 0),ze=g(e,"showMiniTimer",3,!1),Qe=g(e,"showEndScreen",3,!0),lt=g(e,"keyboardControls",15),Bt=e.store.getLogger().createComponentLog("Root component"),Ft=e.store.interfaceLanguage$,ei=e.store.state.playbackState$,vi=e.store.ads.playbackState,qi=e.store.state.positionWithScrubbing$,Lt=e.store.state.duration$,ci=e.store.playerPhase,pi=e.store.ui.isFullscreen,vt=e.store.ui.isFullscreenOpenedByKeyboard,Yt=e.store.ui.controlsVisible,_i=e.store.ui.settingsMenu.visible$,Qi=e.store.ui.settingsMenu.openedByBtnKeyboard$,Xt=e.store.ui.scrubbingInProgress,Ct=e.store.ui.volumeChangingInProgress,Ke=e.store.ui.contextMenu.visible$,gi=e.store.ui.debugPanelVisible,yo=e.store.state.isLoaderVisible,Ao=e.store.state.isEnded$,Lo=e.store.state.chromecastConnected$,xt=e.store.state.chromecastDeviceName$,Ht=e.store.ads.postrollPassed,W=e.store.state.isLive$,Et=e.store.state.isPlaying$,ri=e.store.state.crashed$,dt=e.store.webApi.annotationsApi,wt=e.store.webApi.pictureInPictureApi,qt=e.store.state.currentSubtitle$,ot=e.store.state.currentSubtitleCaptions$,Di=e.store.ui.playerSize,Oi=e.store.ui.is3DVideo,jo=e.store.ui.icon3DVideoVisible,Mo=e.store.state.isInteractive,io=e.store.state.isInteractiveTime$,Pi=e.store.state.isInteractiveExpectation$,Vr=e.store.state.hasInteractiveBranches,mo=e.store.ui.touched,vo=e.store.ui.modals.hotKeyMap.data,Ei=e.store.ui.modals.hotKeyMap.show,Xo=e.store.ui.overlayContainer$,Vo=e.store.ui.controls.interactiveTimeIndicator,Pn=e.store.state.showInteractiveTimeIndicator,_r=e.store.ui.contextMenu.position$,br=e.store.actions.internal.setQuality,hs=e.store.actions.internal.closeSettingsMenu,Jr=e.store.ui.autoplayNextEnabled$,es=e.store.ui.userActionsDisabled,jn=e.store.ui.isControlsAvailable,Rr=e.store.ui.videoTitleInfo,Zo=e.store.ui.doubleForwardOn$,An=e.store.ui.doubleForwardAvailable$,$r=e.store.ui.previewTrackNotificationVisible,Ro=e.store.actions.internal.getVideoElement,Xn=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Zn,notifications$:Nr,graphIsOpened$:Jn}=$o(),oo=K(void 0),Dr=K(void 0),er=K(void 0),un=K(void 0),go,yr,tr;vo.set(y_());let{closeNotification:ft,notificationsToShow$:si}=Nr,Or=m(()=>!!r().slow_video),ir=()=>ft("slow_video"),Br=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),No=K(void 0),Ln=de(!1),pn,Jo=de(!1),fn=de(),xr=de(!1),Do=K(!1),Oo=K(!1),mn=K(!1),wr=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),bi=m(()=>u()&&!f()&&!(n(Do)||n(Oo))&&!(n(mn)&&!p())),vn=!0,Mn=m(()=>e.uiConfig.features.thumbTimer&&ze()&&a()==="video"&&!v()&&!s()&&!Mo&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),or=e.uiConfig.titleShowBehaviour,Sr=m(()=>!["video","thumb"].includes(a())||or==="never"||y()?!1:or==="fullscreen"?h():!0),Vn=m(()=>or==="always"||a()==="thumb"?!1:!v()),en=K(!1),_t=m(()=>(Qe()||e.showAutoplayNext&&x())&&!!Se()&&!!le()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(en)),$t=m(()=>N()&&!(v()||n(_t))&&!u()&&L()&&!E()),no=K(!1),ro=m(()=>k()!==null),{toggle:tn}=Zn,Bi=!1,Gi=null;wt==null||wt.setContext(nd());let so=()=>{e.autoplay&&!Mo&&e.uiConfig.controls.showOnStartupAtAutoplay&&Li(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:so});let Rn=()=>{window.clearTimeout(go),Jo.set(!1)},Fr=()=>{window.clearTimeout(yr),fn.set(null)},Li=be=>{Rn(),Jo.set(!0),go=window.setTimeout(()=>Jo.set(!1),be);let bt=be-100;pn=window.setTimeout(()=>{q()&&Ln.set(!1)},bt>0?bt:be)},_s=(be,bt)=>{Fr(),fn.set(bt),yr=window.setTimeout(()=>fn.set(null),be)},ts=Oi.subscribe(be=>{jo.set(be),be&&(window.clearTimeout(tr),tr=window.setTimeout(()=>jo.set(!1),e.uiConfig.controls.hide360IconTimeout))}),is=async()=>{var bt,Nt,Zt,Si;let be=Js();if(be){let Ci=Ld(),ki=nr();be=Ci===ki||Ci===Me()}if(be){Li(e.uiConfig.controls.hideTimeoutFullscreen);try{await(wt==null?void 0:wt.exit())}catch(Ci){Bt({message:String(Ci)})}}pi.set(be),e.store.getAdmanWrapper().setFullscreen(be),h()?(Nt=(bt=e.store.callbacks)==null?void 0:bt.onFullscreenEnter)==null||Nt.call(bt):(Si=(Zt=e.store.callbacks)==null?void 0:Zt.onFullscreenExit)==null||Si.call(Zt)},Cr=be=>{let{width:bt,height:Nt}=be.target;Di.set({width:bt,height:Nt})},on=()=>{let{width:be,height:bt}=n(oo).getBoundingClientRect();Di.set({width:be,height:bt})};Pt(()=>{var bt;return Pu(is),e.uiConfig.features.annotationsInside&&(dt==null||dt.init(n(oo))),Va(wt)&&(wt==null||wt.assignPlayerContainer(n(oo)),wt==null||wt.setExternalEventHandlers({resize:Cr,leavepictureinpicture:on})),e.interactiveContainer&&((bt=pt().parentElement)==null||bt.insertBefore(e.interactiveContainer,pt().nextSibling)),()=>{window.clearTimeout(go),window.clearTimeout(pn),window.clearTimeout(yr),window.clearTimeout(tr),ts(),wt==null||wt.dispose().catch(Nt=>{Bt({message:String(Nt)})}),Au(is)}});let nr=()=>{let be=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!nt()?n(oo):nt(),bt=be.getRootNode(),Nt=bt instanceof ShadowRoot?bt.host:bt,Zt=ue()instanceof HTMLElement&&ue().contains(Nt);return e.uiConfig.allowChangingFullscreenTarget&&ue()&&Zt?ue():be},xo=()=>{Ke.set(!1)},wo=()=>{hs(),xo()},rr=async()=>{if(!Xn()){Bt({message:"fullscreen disabled"});return}xo(),Js()?(await ku(document),Bt({message:"exit fullscreen"})):(Bt({message:"request fullscreen"}),await Eu(nr()))},He=be=>{y()||(be.preventDefault(),Ke.set(!0),_r.set({left:be.clientX,top:be.clientY}))};function kt(){xr.set(!0),Mo||Li(e.uiConfig.controls.hideTimeoutCursor)}function $i(be){var Si,Ci;let{relatedTarget:bt}=be,Zt=!!(bt&&((Si=n(er))!=null&&Si.contains(bt)))&&((Ci=lt())==null?void 0:Ci.isFocused());!Mo&&!Zt&&(Ln.set(!0),Li(e.uiConfig.controls.hideTimeoutCursor))}function Bo(){xr.set(!1),D(Oo,!1),D(Do,!1),Bi=!1,e.store.actions.internal.releaseCamera(),Li(e.uiConfig.controls.hideTimeout),E()&&Yi()}function ao(be){return be?be.offsetTop+ao(be.offsetParent):0}function So(be){return be?be.offsetLeft+So(be.offsetParent):0}function lo(be){if(H()&&Pn){let bt=be.currentTarget,Nt=ao(bt),Zt=So(bt),Si=be.pageX-Zt,Ci=be.pageY-Nt,{left:ki,bottom:yi,right:os}=H(),Fs=os-ki;return Si>=ki-Fs&&Ci<=yi+Fs}}function Fo(be){if(n(oo)){let bt=ao(be.currentTarget),Nt=z().height,Zt=be.pageY-bt;if(lo(be)){D(Oo,!1);return}Zt<40?D(Oo,!0):Zt>Nt-40?D(Do,!0):(D(Oo,!1),f()||D(Do,!1))}}function Nn(be){Fo(be),!n(bi)&&!E()&&Li(e.uiConfig.controls.hideTimeoutCursor),j()&&Bi&&Gi&&e.store.actions.internal.moveCameraFocusPX(Gi.clientX-be.clientX,Gi.clientY-be.clientY,be.timeStamp-Gi.timeStamp),Gi=be}let nn=null,ho=()=>{nn=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Rn()},e.uiConfig.doubleForwardActivationTime)},Yi=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),nn&&clearTimeout(nn),nn=null},Dn=be=>{be.preventDefault(),be.button===0&&(Bi=!0,e.store.actions.internal.holdCamera(),ae()&&ho()),!Bi&&Li(e.uiConfig.controls.hideTimeoutCursor)},On=be=>{be.preventDefault(),be.button===0&&(Gi=be,Bi=!1,e.store.actions.internal.releaseCamera()),!E()&&Li(e.uiConfig.controls.hideTimeoutCursor)},Bn=be=>{be.preventDefault(),vn&&(Bt({message:"double click on video"}),rr(),Li(e.uiConfig.controls.hideTimeoutCursor))},Tr=be=>{var bt;if(be.preventDefault(),E()){Yi();return}if(nn&&Yi(),X()||f()){wo();return}if(!(T()&&!Vr)){if(n(ro))return tn();if((bt=lt())==null||bt.focus(),!ut()){e.firstStart(),Li(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==Eb.PLAYING)&&e.store.actions.internal.togglePlay(),Li(e.uiConfig.controls.hideTimeoutCursor)}},sr=be=>{wo(),mo.set(!0),Li(e.uiConfig.controls.hideTimeout),be&&_s(e.uiConfig.controls.hideHotKeyHelpers,be)},bs=()=>{var be,bt;wo(),(be=e.store.callbacks)!=null&&be.onOpenHotKeyMap?(bt=e.store.callbacks)==null||bt.onOpenHotKeyMap(J()):Ei.update(Nt=>!Nt)},Ze=()=>{mo.set(!0)},Qt=e.store.ui.contextMenu.openedByBtnKeyboard$,wi=e.store.ui.contextMenu.btnRef$,_o=K(void 0),Ho=e.store.ui.contextMenu.openedByHotKey$,Hr=e.store.ui.contextMenu.lastActiveElem$,Co=K(!1),ar=e.store.ui.previewTrackActive;Ne(()=>{Xo.set(n(No))}),Ne(()=>{D(mn,n(wr)&&ne()!==Eb.PLAYING,!0),n(wr)||St(()=>D(wr,!0))}),Ne(()=>{var bt,Nt;let be=(n(mn)||T()||f()||we()||pe()||re()||_e()||n(Co))&&!n(bi)&&(a()==="video"||a()==="ads")&&!s()&&L();Yt.set(be),!be&&!_e()&&((bt=n(er))!=null&&bt.contains(Ou()))&&((Nt=lt())==null||Nt.focus())}),Ne(()=>{!we()&&n(no)&&!u()&&Li(e.uiConfig.controls.hideTimeoutCursor),St(()=>D(no,we(),!0))}),Ne(()=>{n(un),f(),$e(),St(()=>Bd(n(un),f(),$e()))}),Ne(()=>{n(_o),X(),ee(),Re(),St(()=>{let be=ee()||Re();Bd(n(_o),X(),be)})}),Ne(()=>{let be=fe();be&&(X(),St(()=>Ll(be,X(),Qt)))}),Ne(()=>{let be=P();be&&(X(),St(()=>E_(be,X(),Ho)))}),Ne(()=>{var be;!We()&&h()&&(St(()=>vt.set(!1)),(be=lt())==null||be.focus())}),Ne(()=>{y()&&wo()});let Fn=K(void 0),aa=be=>{Rr.set(Gn(Ro(),{title:n(Fn)},"title",be))},Os=(be,bt)=>{var Ci,ki;let Nt=(ki=(Ci=e.store.callbacks)==null?void 0:Ci.uiInfo)==null?void 0:ki.onUpcomingLiveViewStateChanged;if(!Nt)return;let Zt=!!bt,Si={...Gn(n(oo),{upcomingLiveScreen:bt},"upcomingLiveScreen",Zt),...be};Nt(Si)};var Bs=eT();st("blur",wa,wo);var gn=ce(Bs);gn.__mousemove=Nn;var rt=C(gn);let di=m(()=>a()==="ads"),Mi=m(()=>n(ro)?tn:void 0);je(Kf(rt,{startDoubleForwardActivationTimer:ho,stopDoubleForward:Yi,toggleFullscreen:rr,hideContextMenu:wo,showHotKeyHelpers:sr,showKeyMap:bs,get isAds(){return n(di)},get fakePlayButtonHandler(){return n(Mi)},get nextButtonActive(){return Ot()},get prevButtonActive(){return Y()},children:(be,bt)=>{var Nt=ZC(),Zt=ce(Nt);Za(Zt,{get hideCursor(){return n($t)},onClick:Tr,onContextMenu:He,onMouseDown:Dn,onMouseUp:On,onDblClick:Bn,get videoContainer(){return pt()},set videoContainer(ki){pt(ki)}});var Si=A(Zt,2);ka(Si,()=>"slot",!1,(ki,yi)=>{Ji(ki,()=>({name:Xa}))});var Ci=A(Si,2);Is(Ci,Te,ki=>{var yi=XC(),os=ce(yi);let Fs=m(()=>a()!=="thumb"||s()||Mo&&e.autoplay);Ga(os,{get hidden(){return n(Fs)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:He,onClick:xo});var Ja=A(os,2);{var la=Fe=>{_v(Fe,{})};R(Ja,Fe=>{Z()&&Fe(la)})}var da=A(Ja,2);gv(da,{});var ns=A(da,2);hv(ns,{get isVisible(){return E()}});var $s=A(ns,2);{var ca=Fe=>{let mi=m(()=>{var Uo;return(Uo=e.live)==null?void 0:Uo.startTime});fc(Fe,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(mi)},onUpcomingLiveViewStateChanged:Os,onContextMenu:He,onClick:xo})};R($s,Fe=>{a()==="LiveWaitingStart"&&Fe(ca)})}var ua=A($s,2);{var bn=Fe=>{Ya(Fe,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:He,onClick:xo})};R(ua,Fe=>{a()==="LiveWaitingRecover"&&Fe(bn)})}var ys=A(ua,2);{var el=Fe=>{Ya(Fe,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:He,onClick:xo})};R(ys,Fe=>{a()==="LiveWaitingRecord"&&Fe(el)})}var lr=A(ys,2);{var Gl=Fe=>{var mi=QC();let Uo;var Ir=C(mi);Vd(Ir,{get adsSlotId(){return Dt()},get adsParams(){return at()},get adsAutoplayParam(){return yt()},get duration(){return Jt()},get adsExternalApi(){return e.adsExternalApi}}),S(mi),O($n=>Uo=se(mi,1,"ads-container s-9",null,Uo,$n),[()=>({hidden:a()!=="ads"})]),b(Fe,mi)};R(lr,Fe=>{e.showAds&&ut()&&Fe(Gl)})}var tl=A(lr,2);{var Yl=Fe=>{let mi=m(()=>!Qe()&&e.showAutoplayNext&&x());Uf(Fe,{get title(){return Se()},get thumb(){return le()},get isHide(){return n(mi)},clickCloseIcon:()=>D(en,!0)})};R(tl,Fe=>{n(_t)&&Se()&&le()&&Fe(Yl)})}var pa=A(tl,2);{var jl=Fe=>{let mi=m(()=>h()?"md":"sm"),Uo=m(()=>{var Ir;return(Ir=e.store.callbacks)==null?void 0:Ir.onTitleClicked});qm(Fe,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(Vn)},onVisibilityChanged:aa,onMouseEnter:()=>{D(Co,!0)},onMouseLeave:()=>{D(Co,!1)},get size(){return n(mi)},get onTitleClicked(){return n(Uo)},get ref(){return n(Fn)},set ref(Ir){D(Fn,Ir,!0)}})};R(pa,Fe=>{n(Sr)&&Fe(jl)})}var il=A(pa,2);{var ol=Fe=>{let mi=m(()=>a()==="video"&&v());uc(Fe,{get isShifted(){return n(mi)}})};R(il,Fe=>{j()&&Fe(ol)})}var fa=A(il,2);{var it=Fe=>{var mi=GC(),Uo=C(mi);Ad(Uo,{}),S(mi),b(Fe,mi)};R(fa,Fe=>{ie()&&Fe(it)})}var ct=A(fa,2);{var ji=Fe=>{pc(Fe,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()},onClick:Tr,onContextMenu:He,onDblClick:Bn})};R(ct,Fe=>{re()&&Fe(ji)})}var To=A(ct,2);{var Xi=Fe=>{qa(Fe,{get shifted(){return v()},get captions(){return tt()},get position(){return U()},get playerSize(){return z()}})};R(To,Fe=>{Oe().value!=="off"&&Fe(Xi)})}var fi=A(To,2);{var Fi=Fe=>{var mi=YC();mi.__contextmenu=He,mi.__click=[qC,X,Ke,f,_i,wo];var Uo=C(mi);Qa(Uo,{}),S(mi),b(Fe,mi)};R(fi,Fe=>{s()&&Fe(Fi)})}var Hs=A(fi,2);{var Xl=Fe=>{let mi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Uo=m(()=>a()==="ads"),Ir=m(()=>e.canRewindLive&&Pe()!==0);dc(Fe,{get bottomHidden(){return n(mi)},get bottomNoSmooth(){return q()},get showControls(){return v()},get isAds(){return n(Uo)},get canRewindLive(){return n(Ir)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return It()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Rt()},get nextButtonActive(){return Ot()},get prevButtonActive(){return Y()},get isOneVideoPlaylist(){return he()},customFullscreenSupported:vn,toggleFullscreen:rr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Dr)},set playerControlsWrapperRef($n){D(Dr,$n,!0)},get playerControlsRef(){return n(er)},set playerControlsRef($n){D(er,$n,!0)}})};R(Hs,Fe=>{ut()&&Fe(Xl)})}var Pc=A(Hs,2);{var vp=Fe=>{var mi=jC(),Uo=C(mi);let Ir=m(()=>{var $n;return($n=n(er))==null?void 0:$n.clientHeight});gc(Uo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ir)},returnFocus:()=>{var $n;return($n=lt())==null?void 0:$n.focus()},get ref(){return n(un)},set ref($n){D(un,$n,!0)}}),S(mi),b(Fe,mi)};R(Pc,Fe=>{!re()&&a()!=="ads"&&Fe(vp)})}var Ac=A(Pc,2);let gp=m(()=>!n(Mn));Dd(Ac,{get isLive(){return ke()},get isHidden(){return n(gp)},get isPlaying(){return Ue()},get position(){return U()},get duration(){return Pe()}});var Lc=A(Ac,2);Wm(Lc,{get data(){return fn}});var Mc=A(Lc,2);Hf(Mc,{get supportLink(){return e.supportLink},returnFocus:()=>{var Fe;return(Fe=lt())==null?void 0:Fe.focus()},get visible(){return X()},get playerContainerRef(){return n(oo)},get position(){return et()},get menuElementRef(){return n(_o)},set menuElementRef(Fe){D(_o,Fe,!0)}});var Vc=A(Mc,2);{var nl=Fe=>{hc(Fe,{onClose:ir,onSelectAutoQuality:()=>{br("auto"),ir()}})};R(Vc,Fe=>{n(Or)&&Fe(nl)})}var Rc=A(Vc,2);{var ma=Fe=>{bv(Fe,{})};R(Rc,Fe=>{ye()&&Fe(ma)})}var va=A(Rc,2);{var hp=Fe=>{Oa(Fe,{})};R(va,Fe=>{n(Br)&&Fe(hp)})}var Zl=A(va,2);{var Jl=Fe=>{Gf(Fe,{})};R(Zl,Fe=>{Ie()&&Fe(Jl)})}var Nc=A(Zl,2);{var _p=Fe=>{Ud(Fe,{})};R(Nc,Fe=>{Be()&&Fe(_p)})}b(ki,yi)}),b(be,Nt)},$$slots:{default:!0}}),be=>lt(be),()=>lt());var hn=A(rt,2);je(hn,be=>D(No,be),()=>n(No)),S(gn),je(gn,be=>D(oo,be),()=>n(oo));var Ur=A(gn,2);{var _n=be=>{var bt=JC();b(be,bt)};R(Ur,be=>{Vt()&&be(_n)})}st("mouseenter",gn,kt),st("mouseleave",gn,Bo),st("click",gn,Ze,!0),st("focusin",gn,$i,!0),b(t,Bs),F(),o()}Ge(["mousemove","contextmenu","click"]);import{clientChecker as bc,PlaybackState as uT}from"@vkontakte/videoplayer-core/es2018";import{noop as pT}from"@vkontakte/videoplayer-shared/es2018";var iT=M('<div></div> <div class="info s-h"><div class="triangles-wrapper s-h"><div></div> <div></div> <div></div></div> <p class="step-caption s-h"> </p></div>',1),oT=M("<div><!></div>"),nT={hash:"s-h",code:".double-click-area.s-h{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-h{left:0}.double-click-area.right.s-h{right:0}.semicircle.s-h{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-h{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-h{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-h{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-h,.triangles-wrapper.s-h{display:flex;justify-content:center}.triangles-wrapper.s-h{margin-bottom:10px;position:relative}.triangle.s-h{animation:s-h-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-h:nth-child(3),.triangle.right.s-h:first-child{animation-delay:0s}.triangle.left.s-h:nth-child(2),.triangle.right.s-h:nth-child(2){animation-delay:.1s}.triangle.left.s-h:first-child,.triangle.right.s-h:nth-child(3){animation-delay:.2s}@keyframes s-h-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-h{border-right:8px solid var(--white)}.triangle.right.s-h{border-left:8px solid var(--white)}.triangle.s-h:not(:last-child){margin-right:5px}.step-caption.s-h{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function np(t,e){B(e,!0),Q(t,nT);let i=g(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ai(i())),d=p=>{p.stopPropagation(),a+=1,D(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(D(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,D(o,!1)},300)};an(()=>{window.clearTimeout(r)});var s=oT();s.__click=d;var u=C(s);{var f=p=>{var v=iT(),$=ce(v),y=A($,2),h=C(y),x=C(h),I=A(x,2),T=A(I,2);S(h);var N=A(h,2),L=C(N,!0);S(N),S(y),O(E=>{var k,q,H,z;se($,1,`semicircle ${(k=e.side)!=null?k:""}`,"s-h"),se(x,1,`triangle ${(q=e.side)!=null?q:""}`,"s-h"),se(I,1,`triangle ${(H=e.side)!=null?H:""}`,"s-h"),se(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-h"),me(L,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};R(u,p=>{n(o)&&p(f)})}S(s),O(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-h")}),b(t,s),F()}Ge(["click"]);var rT=(t,e,i)=>{e(!1),i()},sT=M('<div class="overlay s-k"></div> <div class="next-video s-k"><div class="top s-k"><div class="caption s-k"> </div> <!></div> <div class="row s-k"><div class="column s-k"><div class="thumb s-k"><div></div> <!></div></div> <div class="column s-k"><div class="title s-k"> </div></div></div></div>',1),aT={hash:"s-k",code:".overlay.s-k{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-k{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-k{display:flex;justify-content:space-between}.caption.s-k{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-k{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-k{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-k{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-k,.thumb-overlay.s-k{height:100%;width:100%}.thumb-overlay.s-k{position:absolute}.thumb-overlay.withOpacity.s-k{background:var(--black);opacity:.3}.title.s-k{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function yv(t,e){B(e,!0),Q(t,aT);let[i,o]=Ve(),r=()=>w(d,"$autoplayNextEnabled$",i),a=()=>w(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},h=()=>{e.clickCloseIcon(),$()};Pt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var x=Ae(),I=ce(x);{var T=N=>{var L=sT(),E=A(ce(L),2),k=C(E),q=C(k),H=C(q,!0);S(q);var z=A(q,2);As(z,{onClick:h}),S(k);var j=A(k,2);j.__click=[rT,u,p];var ae=C(j),X=C(ae),ne=C(X);let J;var we=A(ne,2);{var pe=ee=>{zd(ee,{get isRunning(){return a()},onTimerEnded:y})};R(we,ee=>{r()&&ee(pe)})}S(X),S(ae);var re=A(ae,2),_e=C(re),$e=C(_e,!0);S(_e),S(re),S(j),S(E),O((ee,Re)=>{me(H,ee),qe(X,`background-image: url('${e.thumb}')`),J=se(ne,1,"thumb-overlay s-k",null,J,Re),me($e,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(T)})}b(t,x),F(),o()}Ge(["click"]);import{clientChecker as lT}from"@vkontakte/videoplayer-core/es2018";var kb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Pt(()=>{lT.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))}),an(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as dT}from"@vkontakte/videoplayer-core/es2018";var rp=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as cT}from"@vkontakte/videoplayer-core/es2018";var Pb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),f=()=>cT.device.isIOS&&ge(l)===dT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=$=>{if(p(),!f()||!$)return;let y=u();if(!y)return;let h=new rp(y),x=ge(d),I=ge(a),T=ge(r);for(let E of x)I.some(q=>q.value===E.id)&&h.attach(E,T.value===E.id);let N=d.subscribe(E=>{for(let k of E)h.updateSrc(k)}),L=()=>{let E=h.getCurrentShowingId();o(ge(a).find(k=>k.value===E))};y.textTracks.addEventListener("change",L),s=()=>{N(),h.detachAll(),y.textTracks.removeEventListener("change",L)}};Pt(()=>i.subscribe(v)),an(p)};var fT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},mT=M("<!> <!>",1),vT=M("<div><!></div>"),gT=M('<div class="spherical-video-icon s-8"><!></div>'),hT=M("<div><!></div>"),_T=M('<div class="settings-mobile s-8"><!></div>'),bT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),$T=M('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),yT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function xv(t,e){var Vn,en;B(e,!0),Q(t,yT);let[i,o]=Ve(),r=()=>w(Me,"$playerPhase",i),a=()=>w(vi,"$isLoaderVisible",i),l=()=>w(Se,"$adPlaybackState",i),d=()=>w(Xt,"$crashed",i),s=()=>w(Jr,"$notificationsToShow$",i),u=()=>w(Y,"$playbackState$",i),f=()=>w(It,"$graphIsOpened$",i),p=()=>w(ze,"$interactiveHideMobileControls",i),v=()=>w(qi,"$isEnded$",i),$=()=>w(dt,"$isInteractiveExpectation$",i),y=()=>w(ut,"$controlsVisible",i),h=()=>w(ot,"$touched",i),x=()=>w(Oi,"$autoplayNextEnabled$",i),I=()=>w(pi,"$postrollPassed",i),T=()=>w(Rr,"$bottomNoSmooth",i),N=()=>w(gi,"$videoSize",i),L=()=>w(xt,"$playerSize",i),E=()=>w(nt,"$isFullscreen",i),k=()=>w(le,"$position$",i),q=()=>w(he,"$duration$",i),H=()=>w(jo,"$loadedMetadata",i),z=()=>w(Qe,"$settingsMenuVisible",i),j=()=>w(Bt,"$scrubbingInProgress",i),ae=()=>w(Ft,"$volumeChangingInProgress",i),X=()=>w(Lt,"$chromecastConnected$",i),ne=()=>w(ue,"$isControlsAvailable",i),J=()=>w(ri,"$isInteractiveTime$",i),we=()=>w(_i,"$isActiveLive",i),pe=()=>w(lt,"$settingsMenuOpenedByKeyboard",i),re=()=>w(Ot,"$language$",i),_e=()=>w(qt,"$disabledControls$",i),$e=()=>w(Ht,"$is3DVideo",i),ee=()=>w(W,"$icon3DVideoVisible",i),Re=()=>w(ci,"$chromecastDeviceName$",i),fe=()=>w(yo,"$currentSubtitle$",i),P=()=>w(Ao,"$currentSubtitleCaptions$",i),We=()=>w(Lo,"$realDuration$",i),Te=()=>w(vt,"$isLive$",i),Z=()=>w(Yt,"$isPlaying$",i),ie=()=>w(ei,"$debugPanelVisible",i),De=g(e,"videoContainer",15),Oe=g(e,"adsSlotId",3,void 0),tt=g(e,"adsParams",3,void 0),U=g(e,"adsAutoplayParam",3,void 0),Pe=g(e,"duration",3,void 0),ke=g(e,"logoTargetUrl",3,""),Ue=g(e,"showNextPrevButtons",3,!1),et=g(e,"nextButtonActive",3,!1),ye=g(e,"prevButtonActive",3,!1),Ie=g(e,"endScreenVideoTitle",3,void 0),Be=g(e,"endScreenVideoThumb",3,void 0),Vt=g(e,"isOneVideoPlaylist",3,!1),pt=g(e,"showMiniTimer",3,!1),Dt=g(e,"fullScreenTarget",3,void 0),at=g(e,"playerStarted",3,!1),yt=g(e,"showEndScreen",3,!0),{notifications$:Jt,graphIsOpened$:It}=$o(),Rt=e.store.getLogger().createComponentLog("Root component"),Ot=e.store.interfaceLanguage$,Y=e.store.state.playbackState$,Se=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,he=e.store.state.duration$,Me=e.store.playerPhase,nt=e.store.ui.isFullscreen,ut=e.store.ui.controlsVisible,ue=e.store.ui.isControlsAvailable,ze=e.store.ui.interactiveHideMobileControls,Qe=e.store.ui.settingsMenu.visible$,lt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Bt=e.store.ui.scrubbingInProgress,Ft=e.store.ui.volumeChangingInProgress,ei=e.store.ui.debugPanelVisible,vi=e.store.state.isLoaderVisible,qi=e.store.state.isEnded$,Lt=e.store.state.chromecastConnected$,ci=e.store.state.chromecastDeviceName$,pi=e.store.ads.postrollPassed,vt=e.store.state.isLive$,Yt=e.store.state.isPlaying$,_i=e.store.state.isActiveLive$,Qi=e.store.state.isRewindableLive$,Xt=e.store.state.crashed$,Ct=e.store.webApi.annotationsApi,Ke=e.store.webApi.pictureInPictureApi,gi=e.store.state.videoSize$,yo=e.store.state.currentSubtitle$,Ao=e.store.state.currentSubtitleCaptions$,Lo=e.store.state.duration$,xt=e.store.ui.playerSize,Ht=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,Et=e.store.state.isInteractive,ri=e.store.state.isInteractiveTime$,dt=e.store.state.isInteractiveExpectation$,wt=e.store.state.hasInteractiveBranches,qt=e.store.ui.controls.disabledControls$,ot=e.store.ui.touched,Di=e.store.ui.overlayContainer$,Oi=e.store.ui.autoplayNextEnabled$,jo=e.store.state.loadedMetadata$,Mo=e.store.actions.internal.closeSettingsMenu,io=(Vn=e.store.callbacks)==null?void 0:Vn.onDisabledPlayPrevChapterClick,Pi=(en=e.store.callbacks)==null?void 0:en.onDisabledSeekToInteractiveClick,Vr=e.store.actions.internal.setQuality,mo=K(void 0),vo=K(void 0),Ei=K(void 0),Xo=K(void 0),Vo,Pn,_r=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),br=K(void 0),{closeNotification:hs,notificationsToShow$:Jr}=Jt,es=m(()=>!!s().slow_video),jn=()=>hs("slow_video"),Rr=de(!1),Zo,An=K(!1),$r=m(()=>u()!==uT.PLAYING),Ro=K(!1),Xn=m(()=>f()||p()||!n(An)&&(v()&&!!wt||n($r)&&$())),Zn=K(!0),Nr=m(()=>e.uiConfig.features.thumbTimer&&pt()&&r()==="video"&&!y()&&!d()&&!Et&&(e.uiConfig.hideThumbTimerAfterTouch&&!h()||!e.uiConfig.hideThumbTimerAfterTouch)),Jn=K(!1),oo=m(()=>(yt()||e.showAutoplayNext&&x())&&!!Ie()&&!!Be()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Jn)),Dr=K(!1);Ke==null||Ke.setContext(nd());let er=_t=>{_t&&!Et&&go(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:er});let un=()=>{clearTimeout(Vo),D(An,!1),p()&&ze.set(!1)},go=_t=>{un(),D(An,!0),Vo=setTimeout(()=>D(An,!1),_t);let $t=_t-100;Zo=setTimeout(()=>{T()&&Rr.set(!1)},$t>0?$t:_t)},yr=Ht.subscribe(_t=>{W.set(_t),_t&&(clearTimeout(Pn),Pn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),tr=async(_t=Js())=>{var $t,no,ro,tn,Bi,Gi;if(_t&&!bc.device.isIOS){let so=Ld(),Rn=No(),Fr=bc.browser.isSamsungBrowser&&so===e.shadowRootContainer;_t=so===Rn||Fr}if(_t){go(e.uiConfig.controls.hideTimeoutFullscreen);try{await(Ke==null?void 0:Ke.exit())}catch(so){Rt({message:String(so)})}try{let so=($t=N())!=null&&$t.width&&((no=N())!=null&&no.height)?N():L();await b_(so)}catch(so){Rt({message:String(so)})}}nt.set(_t),e.store.getAdmanWrapper().setFullscreen(_t),E()?(tn=(ro=e.store.callbacks)==null?void 0:ro.onFullscreenEnter)==null||tn.call(ro):(Gi=(Bi=e.store.callbacks)==null?void 0:Bi.onFullscreenExit)==null||Gi.call(Bi)},ft=_t=>{let $t=_t,{width:no,height:ro}=$t.target;xt.set({width:no,height:ro})},si=()=>{let{width:_t,height:$t}=n(mo).getBoundingClientRect();xt.set({width:_t,height:$t})};Pt(()=>{var _t;return Pu(tr),e.uiConfig.features.annotationsInside&&(Ct==null||Ct.init(n(mo))),Va(Ke)&&(Ke==null||Ke.assignPlayerContainer(n(mo)),Ke==null||Ke.setExternalEventHandlers({resize:ft,leavepictureinpicture:si})),D(Zn,!bc.device.isIphoneOrOldIpad),e.interactiveContainer&&((_t=De().parentElement)==null||_t.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(Vo),clearTimeout(Zo),clearTimeout(Pn),yr(),Ke==null||Ke.dispose().catch($t=>{Rt({message:String($t)})}),Au(tr)}});let Or=K(!0),ir=K(!0),Br=_t=>{let $t=k()+(_t==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;$t<0?(D(Or,!1),$t=0):$t>=q()&&(D(ir,!1),$t=q()),D(Ro,!0),e.seekTime($t)},No=()=>bc.device.isIOS?n(mo):!e.uiConfig.allowChangingFullscreenTarget||!Dt()?e.outerContainerRef:Dt().contains(e.outerContainerRef)?Dt():e.outerContainerRef,Ln=async()=>{try{if(Js())await ku(document),Rt({message:"exit fullscreen"});else{if(Rt({message:"request fullscreen"}),bc.device.isIOS&&!H())return;await Eu(No())}}catch(_t){Rt({message:String(_t)})}},pn=()=>{Mo()},Jo=_t=>{if(_t.preventDefault(),z()){pn();return}if(!at()){e.firstStart(),go(e.uiConfig.controls.hideTimeoutCursor);return}D(Ro,!1),y()?un():go(e.uiConfig.controls.hideTimeoutMobile)},fn=()=>{ot.set(!0)},xr=()=>{Et||(Rr.set(!0),go(e.uiConfig.controls.hideTimeoutCursor))},Do=_t=>{io&&(io(_t),go(e.uiConfig.controls.hideTimeoutMobile))},Oo=_t=>{Pi&&(Pi(_t),go(e.uiConfig.controls.hideTimeoutMobile))};Ne(()=>{Di.set(n(br))}),Ne(()=>{ut.set((n($r)||z()||j()||ae()||X()||!n(oo)&&(v()||n(An)&&!n(Ro)))&&!n(Xn)&&r()==="video"&&!d()&&ne())}),Ne(()=>{!j()&&n(Dr)&&!J()&&go(e.uiConfig.controls.hideTimeoutMobile),D(Dr,j(),!0)}),Ne(()=>{D(Or,k()>0),D(ir,!we()&&k()<q(),!0)}),Ne(()=>{Bd(n(Xo),z(),pe(),!0)});let mn=G("aria_label_video_player");kb({fullScreenChangeHandler:tr,getFullscreenTarget:No}),Pb({store:e.store,getFullscreenTarget:No});let wr=(_t,$t)=>{var Bi,Gi;let no=(Gi=(Bi=e.store.callbacks)==null?void 0:Bi.uiInfo)==null?void 0:Gi.onUpcomingLiveViewStateChanged;if(!no)return;let ro=!!$t,tn={...Gn(n(mo),{upcomingLiveScreen:$t},"upcomingLiveScreen",ro),..._t};no(tn)};var bi=$T();st("blur",wa,pn);var vn=C(bi);Za(vn,{onClick:Jo,get videoContainer(){return De()},set videoContainer(_t){De(_t)}});var Mn=A(vn,2);ka(Mn,()=>"slot",!1,(_t,$t)=>{Ji(_t,()=>({name:Xa}))});var or=A(Mn,2);Is(or,re,_t=>{var $t=bT(),no=ce($t);let ro=m(()=>r()!=="thumb"||d()||Et&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);Ga(no,{get hidden(){return n(ro)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var tn=A(no,2);{var Bi=Ze=>{var Qt=mT(),wi=ce(Qt);{var _o=Co=>{let ar=m(()=>e.uiConfig.controls.seekStepMobile/1e3);np(Co,{side:"left",get seekStep(){return n(ar)},handleSingleFirstClick:Jo,handleSecondClick:()=>Br("backward")})};R(wi,Co=>{n(Or)&&Co(_o)})}var Ho=A(wi,2);{var Hr=Co=>{let ar=m(()=>e.uiConfig.controls.seekStepMobile/1e3);np(Co,{side:"right",get seekStep(){return n(ar)},handleSingleFirstClick:Jo,handleSecondClick:()=>Br("forward")})};R(Ho,Co=>{n(ir)&&Co(Hr)})}b(Ze,Qt)};R(tn,Ze=>{e.canRewindLive&&Qi&&!_e().has("TIMELINE")&&Ze(Bi)})}var Gi=A(tn,2);{var so=Ze=>{let Qt=m(()=>{var wi;return(wi=e.live)==null?void 0:wi.startTime});fc(Ze,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Qt)},onUpcomingLiveViewStateChanged:wr})};R(Gi,Ze=>{r()==="LiveWaitingStart"&&Ze(so)})}var Rn=A(Gi,2);{var Fr=Ze=>{Ya(Ze,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Rn,Ze=>{r()==="LiveWaitingRecover"&&Ze(Fr)})}var Li=A(Rn,2);{var _s=Ze=>{Ya(Ze,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Li,Ze=>{r()==="LiveWaitingRecord"&&Ze(_s)})}var ts=A(Li,2);{var is=Ze=>{var Qt=vT();let wi;var _o=C(Qt);Vd(_o,{get adsSlotId(){return Oe()},get adsParams(){return tt()},get adsAutoplayParam(){return U()},get duration(){return Pe()},get adsExternalApi(){return e.adsExternalApi}}),S(Qt),O(Ho=>wi=se(Qt,1,"ads-container s-8",null,wi,Ho),[()=>({hidden:r()!=="ads"})]),b(Ze,Qt)};R(ts,Ze=>{e.showAds&&at()&&Ze(is)})}var Cr=A(ts,2);{var on=Ze=>{let Qt=m(()=>!yt()&&e.showAutoplayNext&&x());yv(Ze,{get title(){return Ie()},get thumb(){return Be()},get isHide(){return n(Qt)},clickCloseIcon:()=>D(Jn,!0)})};R(Cr,Ze=>{n(oo)&&Ie()&&Be()&&Ze(on)})}var nr=A(Cr,2);{var xo=Ze=>{uc(Ze,{})};R(nr,Ze=>{$e()&&Ze(xo)})}var wo=A(nr,2);{var rr=Ze=>{var Qt=gT(),wi=C(Qt);Ad(wi,{}),S(Qt),b(Ze,Qt)};R(wo,Ze=>{ee()&&Ze(rr)})}var He=A(wo,2);{var kt=Ze=>{pc(Ze,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Re()},onClick:Jo})};R(He,Ze=>{X()&&Ze(kt)})}var $i=A(He,2);{var Bo=Ze=>{qa(Ze,{get shifted(){return y()},get captions(){return P()},get position(){return k()},get playerSize(){return L()},isMobile:!0})};R($i,Ze=>{fe().value!=="off"&&Ze(Bo)})}var ao=A($i,2);{var So=Ze=>{var Qt=hT();Qt.__click=[fT,z,Qe,pn];var wi=C(Qt);Qa(wi,{}),S(Qt),b(Ze,Qt)};R(ao,Ze=>{d()&&Ze(So)})}var lo=A(ao,2);{var Fo=Ze=>{let Qt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),wi=m(()=>r()==="ads"),_o=m(()=>e.canRewindLive&&We()!==0);dc(Ze,{get bottomHidden(){return n(Qt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(wi)},get canRewindLive(){return n(_o)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return ke()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ue()},get nextButtonActive(){return et()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Vt()},get customFullscreenSupported(){return n(Zn)},get endScreenShown(){return n(oo)},toggleFullscreen:Ln,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Do,onDisabledSeekToInteractiveClick:Oo,get playerControlsWrapperRef(){return n(vo)},set playerControlsWrapperRef(Ho){D(vo,Ho,!0)},get playerControlsRef(){return n(Ei)},set playerControlsRef(Ho){D(Ei,Ho,!0)}})};R(lo,Ze=>{at()&&Ze(Fo)})}var Nn=A(lo,2);{var nn=Ze=>{var Qt=_T(),wi=C(Qt);gc(wi,{get supportLink(){return e.supportLink},get returnFocus(){return pT},get ref(){return n(Xo)},set ref(_o){D(Xo,_o,!0)}}),S(Qt),b(Ze,Qt)};R(Nn,Ze=>{z()&&Ze(nn)})}var ho=A(Nn,2);let Yi=m(()=>!n(Nr));Dd(ho,{get isLive(){return Te()},get isHidden(){return n(Yi)},get isPlaying(){return Z()},get position(){return k()},get duration(){return q()}});var Dn=A(ho,2);{var On=Ze=>{Oa(Ze,{})};R(Dn,Ze=>{n(_r)&&Ze(On)})}var Bn=A(Dn,2);{var Tr=Ze=>{Ud(Ze,{})};R(Bn,Ze=>{ie()&&Ze(Tr)})}var sr=A(Bn,2);{var bs=Ze=>{hc(Ze,{onClose:jn,onSelectAutoQuality:()=>{Vr("auto"),jn()}})};R(sr,Ze=>{n(es)&&Ze(bs)})}b(_t,$t)});var Sr=A(or,2);je(Sr,_t=>D(br,_t),()=>n(br)),S(bi),je(bi,_t=>D(mo,_t),()=>n(mo)),O(()=>Le(bi,"aria-label",mn)),st("click",bi,fn,!0),st("focusin",bi,xr,!0),b(t,bi),F(),o()}Ge(["click"]);function sp(t){let e="";return to(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),to(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),to(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),to(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),to(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),to(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),to(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),to(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),to(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),to(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),to(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),to(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),to(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),to(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),to(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),to(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),to(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),to(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),to(t.font)&&(e+=`--font:${t.font};`),to(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),to(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function to(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as xT}from"@vkontakte/videoplayer-shared/es2018";var wT=M('<div class="time-container s-7"><!></div>'),ST=M('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),CT={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 wv(t,e){B(e,!0),Q(t,CT);let[i,o]=Ve(),r=()=>w(J,"$scrubbingInProgress",i),a=()=>w(X,"$playerSize",i),l=()=>w(k,"$isPlaying$",i),d=()=>w(L,"$duration$",i),s=()=>w(z,"$positionWithScrubbing$",i),u=()=>w(T,"$playerPhase",i),f=()=>w(N,"$crashed$",i),p=()=>w(q,"$currentSubtitle$",i),v=()=>w(H,"$currentSubtitleCaptions$",i),$=()=>w(E,"$positionExact$",i),y=()=>w(j,"$isLive$",i),h=()=>w(ae,"$isRewindableLive$",i),x=g(e,"outsideDuration",3,0),I=g(e,"videoContainer",15),{playerPhase:T,state:{crashed$:N,duration$:L,positionExact$:E,isPlaying$:k,currentSubtitle$:q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:j,isRewindableLive$:ae},ui:{playerSize:X,controls:ne,scrubbingInProgress:J},actions:{internal:{getVideoElement:we}}}=ve(),pe=8,re=K(!1),_e=ai({}),$e=K(!1),ee=m(()=>!r()&&!n($e)),Re=()=>{D(re,!0)},fe=()=>{D(re,!1)},P=xT(Ul,260);Ne(()=>{a(),P(we(),ne,_e,n(re))});let We=m(()=>l()?Yo(d()-s()):Yo(isFinite(d())?d():x()));var Te=ST(),Z=C(Te);Za(Z,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Ie){I(Ie)}});var ie=A(Z,2);ka(ie,()=>"slot",!1,(Ie,Be)=>{Ji(Ie,()=>({name:Xa}))});var De=A(ie,2);let Oe=m(()=>u()!=="thumb"||f());Ga(De,{get hidden(){return n(Oe)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var tt=A(De,2);{var U=Ie=>{qa(Ie,{shifted:!1,get captions(){return v()},get position(){return $()},get playerSize(){return a()}})};R(tt,Ie=>{p().value!=="off"&&n(ee)&&Ie(U)})}var Pe=A(tt,2);{var ke=Ie=>{var Be=wT(),Vt=C(Be);Nd(Vt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(We)}}),S(Be),b(Ie,Be)};R(Pe,Ie=>{n(ee)&&Ie(ke)})}var Ue=A(Pe,2);let et;var ye=C(Ue);Wa(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return h()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return _e.timeline},set ref(Ie){_e.timeline=Ie}}),S(Ue),S(Te),O(Ie=>et=se(Ue,1,"timeline s-7",null,et,Ie),[()=>({visible:n(re)})]),st("mouseenter",Te,Re),st("mouseleave",Te,fe),st("mouseenter",Ue,()=>D($e,!0)),st("mouseleave",Ue,()=>D($e,!1)),b(t,Te),F(),o()}var PT=M("<div><!></div>"),AT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Cv(t,e){B(e,!0),Q(t,AT);let[i,o]=Ve(),r=()=>w(at,"$isLive$",i),a=()=>w(Ct,"$availableSubtitlesList$",i),l=()=>w(Ke,"$isPreviewTrackHorizontallyAligned$",i),d=g(e,"sources",7),s=g(e,"store",7),u=g(e,"microStoresRoot",7),f=g(e,"videoConfig",7),p=g(e,"uiConfig",7),v=g(e,"title",7),$=g(e,"thumbUrl",7),y=g(e,"interactiveContainer",7),h=g(e,"interactiveController",7),x=g(e,"subtitles",7),I=g(e,"subtitlesForcedLanguage",7),T=g(e,"live",7),N=g(e,"preload",7),L=g(e,"autoplay",7),E=g(e,"volume",7,void 0),k=g(e,"muted",7,void 0),q=g(e,"fromTime",7),H=g(e,"canRewindLive",7),z=g(e,"showAds",7),j=g(e,"adsSlotId",7,void 0),ae=g(e,"adsParams",7,void 0),X=g(e,"adsAutoplayParam",7,void 0),ne=g(e,"duration",7,void 0),J=g(e,"logoClickable",7),we=g(e,"logoHidden",7),pe=g(e,"isMobile",7),re=g(e,"showNextPrevButtons",7,!1),_e=g(e,"nextButtonActive",7,!1),$e=g(e,"prevButtonActive",7,!1),ee=g(e,"endScreenVideoTitle",7,void 0),Re=g(e,"endScreenVideoThumb",7,void 0),fe=g(e,"isOneVideoPlaylist",7,!1),P=g(e,"supportLink",7),We=g(e,"shadowRootContainer",7),Te=g(e,"outerContainerRef",7),Z=g(e,"fullScreenTarget",7,void 0),ie=g(e,"failoverHosts",7,void 0),De=g(e,"showMiniTimer",7,!1),Oe=g(e,"saveRate",7),tt=g(e,"seekToInteractive",7,Ab),U=g(e,"playPrevChapter",7,Ab),Pe=g(e,"volumeMultiplier",7),ke=g(e,"showAutoplayNext",7),Ue=g(e,"showEndScreen",7,!0),et=g(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Ie}=u();Th(p());let Be=At(),Vt=p().logoLink,pt=s().ui.debugPanelVisible,Dt=s().ui.playerSize,at=s().state.isLive$,Jt=s().state.isInteractive&&Sv.device.isAndroid,It=K(void 0),Rt=null,Ot=K(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Nh(s(),Ie),Ne(()=>{var W,Et;s().ui.isMobile.set(pe()),(Et=(W=f().callbacks)==null?void 0:W.onDomReady)==null||Et.call(W)});let Y=(W=!1)=>{D(Ot,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Se=()=>{if(Be.features.qualityDetailsSubMenuEnabled){let W=r_(s().videoId);if(W)switch(W.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,W.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,W.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(W.quality);break}}else{s_(s().videoId),Cf()&&s().actions.internal.setTrafficSavingEnabled(!0);let Et=xf(s().videoId);Et&&s().actions.internal.setQuality(Et)}};function le(W){var qt,ot,Di;let Et=d()||W;Et&&s().initVideo({container:n(It),sources:Et,failoverHosts:ie(),subtitles:x(),subtitlesForcedLanguage:I(),volumeMultiplier:Pe()});let ri=IT.get(Td)==="true";pt.set(ri),q()>0&&s().actions.external.seekTime(q());let dt=pe()?Be.volumeDefault:(ot=(qt=E())!=null?qt:_u())!=null?ot:Be.volumeDefault,wt=(Di=k())!=null?Di:Jh();if(s().actions.external.setVolume(dt),s().actions.external.setMuted(wt),s().getAdmanWrapper().setInitialVolume(wt?0:dt),Se(),Be.features.saveRate&&Oe()){let Oi=i_();Oi&&!r()&&s().actions.internal.setPlaybackRate(Oi)}if(ke()){let Oi=n_();Oi&&s().actions.internal.setAutoplayNextEnabled(Oi)}s().ui.isAutoplay.set(L()),L()&&Y(),N()&&Be.features.preload&&s().actions.internal.preload()}let he=W=>{if(window.ResizeObserver){let Et,ri;Rt=new ResizeObserver(ET(dt=>{let wt=dt[0];if(wt.contentBoxSize){let qt=Array.isArray(wt.contentBoxSize)?wt.contentBoxSize[0]:wt.contentBoxSize;Et=qt.inlineSize,ri=qt.blockSize}else wt.contentRect&&(Et=wt.contentRect.width,ri=wt.contentRect.height);Dt.set({width:Et,height:ri})},300)),Rt.observe(W)}W.clientWidth&&W.clientHeight&&Dt.set({width:W.clientWidth,height:W.clientHeight})},Me=()=>{document.hidden&&s().actions.external.stop()};Pt(()=>{var ri,dt,wt,qt;Jt&&document.addEventListener("visibilitychange",Me),Be.debugLog&&s().actions.internal.startLogging(),he(n(It));let W=ye.map(ot=>ot.init({store:s(),microStores:Ie,config:f(),interactiveController:h(),uiConfig:p()})),Et=()=>{Jt&&document.removeEventListener("visibilitychange",Me),Rt==null||Rt.disconnect(),W.forEach(ot=>ot.unsubscribe()),s().destroy()};return((ri=T())==null?void 0:ri.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Et):((dt=T())==null?void 0:dt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Et):(((wt=T())==null?void 0:wt.status)==="finished"||((qt=T())==null?void 0:qt.status)==="postlive")&&!(d()&&TT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Et):(le(),Et)});function nt(){n(Ot)?s().actions.external.play():Y(!0)}function ut(){s().actions.external.pause()}function ue(W){s().actions.external.setMuted(W)}function ze(){s().actions.external.toggleSubtitle()}function Qe(W,Et){s().actions.external.changeSubtitle(W,Et)}function lt(W){s().actions.external.changeAudioStream(W)}function Bt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function Ft(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function ei(W){pe()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function vi(W){s().actions.internal.seekTime(W,kT.UNKNOWN)}function qi(W){s().actions.external.seekEpisodeStartTime(W)}function Lt(){s().actions.external.returnFocusToEpisodes()}function ci(W){s().actions.external.setPlaybackRate(W)}function pi(W){s().actions.external.setAutoQualityLimits(W)}function vt(){s().actions.external.setQuality("auto")}function Yt(W){s().actions.external.setTrafficSavingEnabled(W)}function _i(W){s().actions.external.setHighQualityEnabled(W)}let Qi=sp(Be.view),Xt=f().playerView==="preview",Ct=s().state.availableSubtitlesList$;if(Be.features.initSubtitles){let W=!1;Ne(()=>{var Et;if(!W&&a().length){W=!0;let ri;if(Be.features.userVideoPrefs&&s().videoId){let wt=xu(Be.userSalt,String(s().videoId));wt!=null&&wt.subtitleTrackId&&(ri=a().find(qt=>qt.value===wt.subtitleTrackId))}let dt=(Et=I())!=null?Et:If();dt&&(ri=a().find(wt=>wt.language===dt)),s().actions.internal.setSubtitle(ri)}})}let Ke=s().ui.isPreviewTrackHorizontallyAligned;var gi=PT();let yo;var Ao=C(gi);{var Lo=W=>{xv(W,{get store(){return s()},get uiConfig(){return Be},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return Vt},get nextButtonActive(){return _e()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return ee()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return fe()},get supportLink(){return P()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Ot)},get seekToInteractive(){return tt()},get playPrevChapter(){return U()},firstStart:Y,seekTime:vi,get showEndScreen(){return Ue()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(It)},set videoContainer(Et){D(It,Et,!0)}})},xt=W=>{var Et=Ae(),ri=ce(Et);{var dt=qt=>{wv(qt,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return H()},get videoContainer(){return n(It)},set videoContainer(ot){D(It,ot,!0)}})},wt=qt=>{$v(qt,{get store(){return s()},get uiConfig(){return Be},get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return Vt},get nextButtonActive(){return _e()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return ee()},get endScreenVideoThumb(){return Re()},get isOneVideoPlaylist(){return fe()},get supportLink(){return P()},get shadowRootContainer(){return We()},get outerContainerRef(){return Te()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Ot)},get seekToInteractive(){return tt()},get playPrevChapter(){return U()},firstStart:Y,get showEndScreen(){return Ue()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(It)},set videoContainer(ot){D(It,ot,!0)},get keyboardControls(){return et()},set keyboardControls(ot){et(ot)}})};R(ri,qt=>{Xt?qt(dt):qt(wt,!1)})}b(W,Et)};R(Ao,W=>{pe()?W(Lo):W(xt,!1)})}S(gi),O(W=>{yo=se(gi,1,"vk-vp-root s-0",null,yo,W),qe(gi,Qi)},[()=>({"root--miui-browser":Sv.device.isMobile&&Sv.browser.isMiuiBrowser,"visible-outside":Xt,"preview-track-horizontally-alinged":l()})]),b(t,gi);var Ht=F({initVideo:le,play:nt,pause:ut,setMuted:ue,toggleSubtitle:ze,changeSubtitle:Qe,changeAudioStream:lt,hideControls:Bt,showControls:Ft,setVolume:ei,seekTime:vi,seekEpisodeStartTime:qi,returnFocusToEpisodes:Lt,setPlaybackRate:ci,setAutoQualityLimits:pi,setAutoQuality:vt,toggleTrafficSaving:Yt,toggleHighQuality:_i,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return f()},set videoConfig(W){f(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return $()},set thumbUrl(W){$(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return h()},set interactiveController(W){h(W)},get subtitles(){return x()},set subtitles(W){x(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return T()},set live(W){T(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return L()},set autoplay(W){L(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return k()},set muted(W){k(W)},get fromTime(){return q()},set fromTime(W){q(W)},get canRewindLive(){return H()},set canRewindLive(W){H(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return j()},set adsSlotId(W){j(W)},get adsParams(){return ae()},set adsParams(W){ae(W)},get adsAutoplayParam(){return X()},set adsAutoplayParam(W){X(W)},get duration(){return ne()},set duration(W){ne(W)},get logoClickable(){return J()},set logoClickable(W){J(W)},get logoHidden(){return we()},set logoHidden(W){we(W)},get isMobile(){return pe()},set isMobile(W){pe(W)},get showNextPrevButtons(){return re()},set showNextPrevButtons(W){re(W)},get nextButtonActive(){return _e()},set nextButtonActive(W){_e(W)},get prevButtonActive(){return $e()},set prevButtonActive(W){$e(W)},get endScreenVideoTitle(){return ee()},set endScreenVideoTitle(W){ee(W)},get endScreenVideoThumb(){return Re()},set endScreenVideoThumb(W){Re(W)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(W){fe(W)},get supportLink(){return P()},set supportLink(W){P(W)},get shadowRootContainer(){return We()},set shadowRootContainer(W){We(W)},get outerContainerRef(){return Te()},set outerContainerRef(W){Te(W)},get fullScreenTarget(){return Z()},set fullScreenTarget(W){Z(W)},get failoverHosts(){return ie()},set failoverHosts(W){ie(W)},get showMiniTimer(){return De()},set showMiniTimer(W){De(W)},get saveRate(){return Oe()},set saveRate(W){Oe(W)},get showAutoplayNext(){return ke()},set showAutoplayNext(W){ke(W)},get seekToInteractive(){return tt()},set seekToInteractive(W){tt(W)},get playPrevChapter(){return U()},set playPrevChapter(W){U(W)},get volumeMultiplier(){return Pe()},set volumeMultiplier(W){Pe(W)},get showEndScreen(){return Ue()},set showEndScreen(W){Ue(W)},get keyboardControls(){return et()},set keyboardControls(W){et(W)}});return o(),Ht}var LT=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 Tv(t,e){let i=g(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=LT();li(9),b(r,l)},$$slots:{default:!0}})}var MT=M('<div class="title s-1"> </div>'),VT=M('<div class="playerStub s-1"><!> <!></div>'),RT={hash:"s-1",code:".playerStub.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-1{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function Iv(t,e){Q(t,RT);var i=VT(),o=C(i);{var r=d=>{var s=MT(),u=C(s,!0);S(s),O(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);Tv(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),O(()=>qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var NT=M('<div class="playerError s-3"><!></div>'),DT={hash:"s-3",code:".playerError.s-3{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 Ev(t){Q(t,DT);var e=NT(),i=C(e);Qa(i,{}),S(e),b(t,e)}import{now as uI,ValueSubject as pI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as fI,InterfaceLanguage as mI,isNonNullable as Vv,Logger as vI,Observable as gI,Subscription as Bb,once as hI,InternalsExposure as _I,skip as bI,getPlayerId as $I}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as Fb,isMobile as yI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as xI,ThinOneStat as wI,MediascopePixel as SI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as OT,Subscription as BT}from"@vkontakte/videoplayer-shared/es2018";var ap=class{constructor(){this.subscription=new BT,this.logger=new OT,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 Pv,detectEmbed as KT}from"@vkontakte/videoplayer-shared/es2018";var FT=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),HT=M('<div><div><!></div> <span class="title s-6"> </span></div>'),UT={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 kv(t,e){B(e,!0),Q(t,UT);let[i,o]=Ve(),r=()=>w(u,"$interfaceLanguage$",i),a=()=>w(f,"$isMobile$",i),l=ve(),d=At(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>r()&&p("pip_dummy_title")),$=sp(d.view);var y=HT();let h;var x=C(y);let I;var T=C(x);Xe(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,k)=>{var q=FT();li(),b(E,q)},$$slots:{default:!0}}),S(x);var N=A(x,2),L=C(N,!0);S(N),S(y),O((E,k)=>{h=se(y,1,"player-pip-dummy s-6",null,h,E),qe(y,$),I=se(x,1,"dummy-image s-6",null,I,k),me(L,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var zT=Object.defineProperty,WT=(t,e,i)=>e in t?zT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ql=(t,e,i)=>WT(t,typeof e!="symbol"?e+"":e,i),qT=460,QT=280,$c=class{constructor({enabled:e=!0}={enabled:!0}){ql(this,"playerDomElement"),ql(this,"playerParentShadowRoot"),ql(this,"playerDummyElement"),ql(this,"svelteContext"),ql(this,"pipWindow"),ql(this,"info",{isActive$:new Pv(!1),isEnabled$:new Pv(!1),type:1}),this.info.isEnabled$=new Pv(e)}isSupported(){let{isEmbed:e}=KT();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}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:qT,height:QT,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=Qr(kv,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||(Ea(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})}async exit(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})}async dispose(){await 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 Lb(t){return t instanceof $c}var lp=class{static getLatestSupportedVersion(e){let i=new Ma(e),o=new $c(e);if(o.isSupported())return o;if(i.isSupported())return i}};function yc(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 Mb="Inner error. Unexpectedly root annotation container null reference exception",Vb="Annotation with such name already exists",Rb="Annotation with such name does not exist";var Ql=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as GT,Subscription as YT,throttleFn as jT}from"@vkontakte/videoplayer-shared/es2018";var XT="1",ZT=100,dp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new YT}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=jT(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},ZT);this.subscriptions.add(GT(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 Ql(Mb);if(this.annotations.has(e))throw new Ql(Vb);i.style.zIndex=(o=i.style.zIndex)!=null?o:XT,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 Ql(Rb);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 cp,Subscription as JT}from"@vkontakte/videoplayer-shared/es2018";var cn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return cp(e),cp(i),cp(r),r.interactiveData&&cp(o),this.subscription=new JT,this.subscription}};var xc=class extends cn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var wc=class extends cn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...de(null),toggle:()=>this.state$.update(i=>!i)}}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:f}=a.ui,p=ge(f),v=()=>p&&ge(u);return o.add(u.subscribe($=>{if(!p)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||v())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Sc=class extends cn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as eI}from"@vkontakte/videoplayer-shared/es2018";var Av=de(!1),up=null,Cc=class extends cn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Av,set:(i,o=!1)=>{i!==ge(Av)&&(this.clearTimeout(),Av.set(i),!i&&up&&(up=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()}}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{ge(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(eI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:$})=>{var y,h;if(!(!p||!($!=null&&$.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&up===null&&(up=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(h=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||h.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as tI,noop as iI}from"@vkontakte/videoplayer-shared/es2018";var Tc=class extends cn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...de(null),toggle:iI};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=async()=>{if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:f}=r.state,{disabledControls$:p}=r.ui.controls,v=ge(u),$=ge(f);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(mf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(mf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(tI({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Nb}from"@vkontakte/videoplayer-shared/es2018";var Ic=class extends cn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:de(!1),isEnabled$:de(!1),type$:de(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new Nb(!1),isEnabled$:new Nb(!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 rI,filterChanged as sI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Lv}from"@vkontakte/videoplayer-shared/es2018";var Db=({maxShowCount:t,timeout:e})=>{let i=[t!==0?oI({maxCount:t}):void 0,e!==0?nI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},oI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Lv.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}}},nI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Lv.get(e)||"{}")}catch(a){return{}}},o=a=>Lv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...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 Ec=class extends cn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:de({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=Db({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(sI(),rI(f=>f)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Ob=()=>[xc,wc,Sc,Cc,Tc,Ic,Ec].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as kc}from"@vkontakte/videoplayer-shared/es2018";var pp=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 fp=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 pp(()=>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 aI=M('<div class="root s-2"><!></div>'),lI={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 Mv(t,e){B(e,!0),Q(t,lI);let i=null,o=K(null);Ne(()=>(n(o)&&(i=window.setTimeout(()=>{D(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&D(o,s?"prev":"next",!0)}var a=Ae(),l=ce(a);{var d=s=>{var u=Ae(),f=ce(u);Is(f,()=>n(o),p=>{var v=aI(),$=C(v);let y=m(()=>n(o)==="prev");_c($,{get duration(){return e.animationDuration},get Icon(){return sa},get reversed(){return n(y)}}),S(v),b(p,v)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var dI=Object.defineProperty,cI=(t,e,i)=>e in t?dI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,jt=(t,e,i)=>cI(t,typeof e!="symbol"?e+"":e,i),CI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:mI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:yI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Yn=K(void 0),Rv=ai({animationDuration:0,playbackStatusShow:!1}),mp=class extends HTMLElement{constructor(){super(),jt(this,"svelteStubComponent"),jt(this,"svelteRootComponent"),jt(this,"sveltePersistentLayerComponent"),jt(this,"svelteErrorComponent"),jt(this,"store"),jt(this,"microStoresRoot"),jt(this,"statistics"),jt(this,"sentry"),jt(this,"_shadowRoot"),jt(this,"playerContainer"),jt(this,"rootContainer"),jt(this,"stateContainer"),jt(this,"shadowRootContainer"),jt(this,"playerId"),jt(this,"uiConfig"),jt(this,"coreConfig"),jt(this,"statisticsConfig"),jt(this,"interactiveController"),jt(this,"interactiveContainer"),jt(this,"graphMadePause"),jt(this,"currentPlayingVideoIndex",0),jt(this,"needToRepeatPlaylist",!1),jt(this,"videoConfig"),jt(this,"pictureInPictureApi"),jt(this,"mediaSessionApi"),jt(this,"unsubscribePlayerPhaseSubscription"),jt(this,"logger"),jt(this,"log"),jt(this,"subscription"),jt(this,"interactiveSubscription"),jt(this,"annotationsApi"),jt(this,"slotsApi"),jt(this,"focusManager"),jt(this,"prevIsid"),jt(this,"isInited",!1),jt(this,"postponedInitParams",null),jt(this,"internalsExposure",null),jt(this,"shadowDOMCallbacksDisabled",!1),jt(this,"fatalError$",new pI(null)),jt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:$,isMobile:y,isTouch:h,refDomain:x,deviceId:I,interactiveData:T}=yc(this.videoConfig,i),N=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,L=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;L&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:k=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new xI({movieId:E,albumId:d,place:s,trackCode:f,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:h!=null?h:y,clip:k,refDomain:x,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...N&&(!this.isInited||L)&&{projectId:Number(N)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(H){console.error(H),this.log({message:H.message})}}),kc.create("ui"),this.logger=new vI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Bb,this.interactiveSubscription=new Bb,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Qr(Ev,{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=ai({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Qr(Iv,l),this.sveltePersistentLayerComponent=Qr(Mv,{target:this.playerContainer,props:Rv}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;Rv.animationDuration=e,Rv.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(),kc.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}=yc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new wI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,f,p,v,$;if(!this.videoConfig)return;let{albumId:y,statPlace:h,statAuthToken:x,preload:I,autoplay:T,volume:N,muted:L,fromTime:E,canRewindLive:k,supportLink:q,showAds:H,adsSlotId:z,adsParams:j={},adsAutoplayParam:ae,interfaceLanguage:X,isCyrillicRelatedInterface:ne,logoClickable:J,logoHidden:we,isMobile:pe,isTouch:re,isAudioDisabled:_e,isLiveCatchUpMode:$e,fullScreenTarget:ee,failoverHosts:Re,canDownload:fe,callbacks:P,interactiveData:We,showThumbTimer:Te,additionalButtons:Z=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Oe,loop:tt,saveRate:U,volumeMultiplier:Pe,showEndScreen:ke,showAutoplayNext:Ue,mediascopePixels:et}=yc(this.videoConfig,i),{sources:ye,title:Ie,thumbUrl:Be,unitedVideoId:Vt,isClip:pt=!1,duration:Dt,adsParams:at={},videoEpisodes:yt,previewThumbsData:Jt,subtitles:It,subtitlesForcedLanguage:Rt,live:Ot,adsExternalApi:Y}=e;if(!ye&&!Ot){let ci=new Error("empty sources and live");this.fatalError$.next(ci),(r=P.onCrashed)==null||r.call(P,ci.message);return}let Se={...j,...at},le=this.getNextVideoInfo(),he={sources:ye,title:Ie,thumbUrl:Be,subtitles:It,subtitlesForcedLanguage:Rt,unitedVideoId:Vt,isClip:pt,live:Ot,albumId:y,statPlace:h,autoplay:T,muted:L,volume:N,fromTime:E,canRewindLive:k,showAds:H,adsSlotId:z,adsParams:Se,adsAutoplayParam:ae,duration:Dt,logoClickable:J,logoHidden:we,isTouch:re!=null?re:pe,repeat:Oe,loop:tt,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Me={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(he)}`});let nt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),ut=(nt==null?void 0:nt.oneStat)||this.createOneStat(e,i),ue=this.createThinOneStat(e,i),ze;et&&(ze=new SI({pixels:et})),(ut||ue)&&(this.statistics=new qu(ut,ue,ze,nt==null?void 0:nt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new La(this.uiConfig.sentry,{version:El,env:vu},{movieId:Vt,albumId:y,place:h,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:re!=null?re:pe,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={...this.sentry,...La.getInstance()};let lt=!!We,Bt=[],Ft="tooltip_interactive_go_back_disabled_first";if(lt&&this.interactiveController){let ci=this.interactiveController.state.isInitialChapter$.getValue(),pi=this.interactiveController.getHistoryState();ci&&Bt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Bt.push("SEEK_TO_INTERACTIVE_BUTTON"),pi.hasPrevChapter$.getValue()||(Bt.push("PLAY_PREV_CHAPTER_BUTTON"),ci||(pi.isGoBackLimited$.getValue()?Ft="tooltip_interactive_go_back_disabled_limit":Ft="tooltip_interactive_go_back_disabled"))}let ei=()=>{var ci;this.isInited=!1,this.prevIsid=void 0;let pi=(o==null?void 0:o.info.isEnded$.getValue())&&((ci=this.interactiveController)==null?void 0:ci.state.isEndChapter$.getValue());P.onReplayInteractiveVideo&&!pi?P.onReplayInteractiveVideo():this.replayInteractiveVideo()},vi=Oe&&this.videoConfig.videos.length===1;this.store=Y_({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:ne,videoId:Vt,isClip:pt,isLiveCatchUpMode:$e,isAudioDisabled:_e,statAuthToken:x,callbacks:P,webApi:Me,videoEpisodes:yt,previewThumbsData:Jt,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Bt,isInteractive:lt,saveRate:U,interactiveRanges$:(f=this.interactiveController)==null?void 0:f.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ei,playPrevChapterDisabledTooltip:Ft,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?Z:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:ci=>{var pi;return(pi=this.sveltePersistentLayerComponent)==null?void 0:pi.startVideoChangedAnimation(ci)},looped:this.uiConfig.features.useLoopSetting?tt:vi,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:qi}=this.microStoresRoot=Ob(),Lt=()=>{var ci,pi,vt,Yt,_i,Qi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onCurrentFormatChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(qi.interactiveControlsOpacity$.subscribe(Ct=>{var Ke;Ct!==null&&((Ke=this==null?void 0:this.interactiveController)==null||Ke.setDisabledControls(Ct))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onThroughputEstimationChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onTrafficSavingEnabledChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onHighQualityEnabledChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onAutoQualityEnabledChanged)==null?void 0:Ke.call(P,!!Ct)})),this.subscription.add(new gI(Ct=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ke=>Ct.next(Ke)))}).pipe(bI(1)).subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onCurrentPlaybackRateChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.volume$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onVolumeChange)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.muted$.subscribe(Ct=>{var Ke,gi,yo,Ao;if(Ct)(Ke=P==null?void 0:P.onMute)==null||Ke.call(P);else{let Lo=(yo=((gi=this.store)==null?void 0:gi.state.volume$)&&ge(this.store.state.volume$))!=null?yo:0;(Ao=P==null?void 0:P.onUnmute)==null||Ao.call(P,Lo)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onVideoBitrateChanged)==null?void 0:Ke.call(P,Ct)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Ct=>{var Ke;let gi=(Ke=this.store)==null?void 0:Ke.ui.controls.disabledControls$;gi&&(Ct&&!gi.includes(Id)&&gi.add(Id),Ct||gi.remove(Id))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Ct=>{var Ke;if(!Fb.browser.isSamsungBrowser||!Ct||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((Ke=this.videoConfig)==null?void 0:Ke.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Ct=>{var Ke;return(Ke=P==null?void 0:P.onVSIDChanged)==null?void 0:Ke.call(P,Ct)})),this.initMediaSession(),D(Yn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ie,thumbUrl:Be,subtitles:It,subtitlesForcedLanguage:Rt,live:Ot,preload:I,autoplay:T,muted:L,volume:N,fromTime:E,canRewindLive:k,supportLink:q,showAds:H,adsSlotId:z,adsParams:Se,adsAutoplayParam:ae,duration:Dt,logoClickable:J,logoHidden:we,isMobile:re!=null?re:pe,failoverHosts:Re,fullScreenTarget:ee,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Pe,showEndScreen:ke,showAutoplayNext:Ue,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let Xt={target:this.playerContainer,props:n(Yn)};this.svelteRootComponent=Qr(Cv,Xt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(vt=(pi=(ci=this.videoConfig)==null?void 0:ci.callbacks)==null?void 0:pi.onInited)==null||vt.call(pi)),(Yt=this.internalsExposure)==null||Yt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Qi=(_i=this.videoConfig)==null?void 0:_i.callbacks)!=null&&Qi.onDevNullLog)?kc.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):kc.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Fb.isInited$.subscribe(ci=>{ci&&(console.log("UI SDK async start"),Lt())}):Lt()}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&&Vv(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)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:f,initChapterId:p,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:f,initChapterId:p,historyApi:v,vkVideoLoader:$,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:h}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(h.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 x=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(f==null?void 0:f.title)||I.config.title};let T=x?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),x&&(x=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var N,L,E,k,q,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(Ed)),I==="action-choice-canceled"){let j=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(L=this.videoConfig)!=null&&L.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(k=this.videoConfig)==null?void 0:(q=k.callbacks).onDisabledInteractiveClick)==null||H.call(q)}})),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(Ed)})),await 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,L,E;T.length&&((E=(L=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:L.onInteractiveHistoryChanged)==null||E.call(L,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,L;(L=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveChapterChanged)==null||L.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,N,L;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(L=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveTimeIndicatorClick)==null||L.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,f,p,v,$,y,h,x,I,T,N,L,E,k,q,H,z,j,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let X=new Error("empty videos");this.fatalError$.next(X),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,X.message);return}else this.fatalError$.next(null);if(this.videoConfig=yc(CI,fI(e,X=>X instanceof HTMLElement?X:void 0)),this.playerId=$I(e.playerId),this.uiConfig=Ch((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 _I("ui",this.playerId))),kc.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((f=this.videoConfig)==null?void 0:f.showAds)],numbers:[uI()]}),Vv(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Vv(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(x=(h=this.uiConfig.features.dpip)!=null?h:this.videoConfig.isPictureInPictureEnabled)!=null?x:!0),this.uiConfig.ads.paramsOverride={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,(L=this.videoConfig).autoplay&&(L.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(k=this.uiConfig.ads.slot)!=null?k:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((q=this.uiConfig.showLogo)!=null?q:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((j=this.videoConfig.videos)!=null&&j[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let X={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=lp.getLatestSupportedVersion(X):this.pictureInPictureApi=new Ma(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new ap:void 0,this.slotsApi=this.uiConfig.features.slots?new op:void 0,this.annotationsApi=this.uiConfig.features.annotations?new dp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new fp(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]),Lb(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(Yn)&&(n(Yn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Yn).nextButtonActive=this.isNextButtonActive(),n(Yn).prevButtonActive=this.isPrevButtonActive(),n(Yn).endScreenVideoTitle=o.nextVideoTitle,n(Yn).endScreenVideoThumb=o.nextVideoThumb,n(Yn).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}={...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(Yn)&&(n(Yn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Yn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Yn).nextButtonActive=this.isNextButtonActive(),n(Yn).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)}async setLanguage(e){var i;await((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()}async replayInteractiveChapter(e){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(hI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await 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&&Ea(e)}};import{InterfaceLanguage as xoe,VKNumericLanguage as woe,loadVKLangPack as Soe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as Toe,VideoFormat as Ioe}from"@vkontakte/videoplayer-core/es2018";var moe=()=>{window.customElements.define("vk-video-player",mp)};export{Qu as ControlButtonType,ps as GridTypes,xoe as InterfaceLanguage,Fd as MenuItemType,fs as PlayerPhase,El as VERSION,woe as VKNumericLanguage,Ioe as VideoFormat,Toe as VideoQuality,Soe as loadVKLangPack,moe 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`)),$(f,p)};V(d,f=>{e.type==="off"?f(s):f(u,!1)})}$(r,l)},$$slots:{default:!0}}),H()}function sm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=he().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Ut(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");la(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),H()}var M0=L('<span class="duration s-23" data-testid="video_duration"> </span>'),V0=L('<div><span class="current s-23" data-testid="current_time"> </span> <!></div>'),R0={hash:"s-23",code:'.time.s-23{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-23{padding:0 0 0 8px}.current.s-23{position:relative}.duration.s-23{opacity:.7}.duration.s-23:before{content:" / ";white-space:pre}'};function Kd(t,e){B(e,!0),Y(t,R0);let i=h(e,"isMobile",3,!1),o=h(e,"isHidden",3,!1),r=h(e,"showDuration",3,!0),a=h(e,"ref",15),l=Mt(),d=le(!1),s=m(()=>Qo(e.duration)),u=m(()=>Qo(e.position));var f=V0();let p;var v=C(f),_=C(v,!0);S(v);var y=P(v,2);{var b=w=>{var I=M0(),T=C(I,!0);S(I),D(()=>me(T,n(s))),$(w,I)};V(y,w=>{r()&&w(b)})}S(f),Ms(f,()=>Ll(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Xe(f,w=>a(w),()=>a()),D(w=>{p=ne(f,1,"time s-23",null,p,w),me(_,n(u))},[()=>({mobile:i()})]),$(t,f),H()}import{noop as Fu}from"@vkontakte/videoplayer-shared/es2018";var N0=Ie('<path d="M21.8632 10.0832C22.2147 9.73171 22.7852 9.73171 23.1367 10.0832C23.4881 10.4347 23.4881 11.0051 23.1367 11.3566L18.6367 15.8566C18.2852 16.2081 17.7147 16.2081 17.3632 15.8566C17.0117 15.5051 17.0117 14.9347 17.3632 14.5832L21.8632 10.0832Z"></path><path d="M17.3632 11.3566C17.0117 11.0051 17.0117 10.4347 17.3632 10.0832C17.7147 9.73171 18.2852 9.73171 18.6367 10.0832L23.1367 14.5832C23.4881 14.9347 23.4881 15.5051 23.1367 15.8566C22.7852 16.2081 22.2147 16.2081 21.8632 15.8566L17.3632 11.3566Z"></path>',1),D0=Ie("<path></path>"),O0=Ie('<path d="M14 3.96997C14.5523 3.96997 15 4.41769 15 4.96997V20.97C15 21.5223 14.5523 21.97 14 21.97C13.3585 21.97 12.7422 21.7208 12.2808 21.2751L6.79013 15.97H4C2.89543 15.97 2 15.0745 2 13.97V11.97C2 10.8654 2.89543 9.96997 4 9.96997H6.765L12.2794 4.66337C12.7417 4.21849 13.3584 3.96997 14 3.96997Z"></path><!>',1);function da(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(u,f)=>f?"off":u>.5?"max":u>.2?"mid":u>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>an(e.size)),d="M16.8748 8.85259C17.2324 8.50731 17.8021 8.51726 18.1474 8.87481C18.5465 9.28803 18.8614 9.77691 19.0757 10.3128C19.2901 10.8486 19.4 11.4218 19.4 12C19.4 12.5782 19.2901 13.1514 19.0757 13.6872C18.8614 14.2231 18.5465 14.712 18.1474 15.1252C17.8021 15.4827 17.2324 15.4927 16.8748 15.1474C16.5173 14.8021 16.5073 14.2324 16.8526 13.8748C17.0876 13.6314 17.2757 13.3408 17.4045 13.0187C17.5333 12.6966 17.6 12.3504 17.6 12C17.6 11.6496 17.5333 11.3034 17.4045 10.9813C17.2757 10.6592 17.0876 10.3686 16.8526 10.1252C16.5073 9.76764 16.5173 9.19788 16.8748 8.85259Z",s="M19.2636 6.2636C19.6151 5.91213 20.1849 5.91213 20.5364 6.2636C21.2516 6.97878 21.9929 7.99659 22.3989 8.97678C22.7959 9.93525 23.0003 10.9625 23.0003 12C23.0003 13.0374 22.7959 14.0647 22.3989 15.0232C21.9929 16.0034 21.2516 17.0212 20.5364 17.7364C20.1849 18.0879 19.6151 18.0879 19.2636 17.7364C18.9121 17.3849 18.9121 16.8151 19.2636 16.4636C19.8484 15.8788 20.4384 15.0527 20.7359 14.3343C21.0425 13.5943 21.2003 12.801 21.2003 12C21.2003 11.1989 21.0425 10.4057 20.7359 9.66561C20.4384 8.94724 19.8484 8.12124 19.2636 7.5364C18.9121 7.18492 18.9121 6.61508 19.2636 6.2636Z";Ze(t,{get style(){return n(l)},get testId(){var u;return`volume-${(u=n(a))!=null?u:""}-icon`},get shadow(){return e.shadow},children:(u,f)=>{var p=O0(),v=P(ce(p));{var _=b=>{var w=N0();ai(),$(b,w)},y=b=>{var w=D0();D(()=>Me(w,"d",`${d}${n(a)==="max"?s:""}`)),$(b,w)};V(v,b=>{n(a)==="off"?b(_):b(y,!1)})}$(u,p)},$$slots:{default:!0}}),H()}import{isNonNullable as F_,noop as Yn}from"@vkontakte/videoplayer-shared/es2018";import{noop as lm}from"@vkontakte/videoplayer-shared/es2018";import{noop as H0}from"@vkontakte/videoplayer-shared/es2018";var B0=L('<div class="overlay"><!></div>');function am(t,e){B(e,!0);let[i,o]=De(),r=()=>x(l,"$overlayContainer$",i),l=he().ui.overlayContainer$,d=q(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Oe(()=>{u(r())}),Lt(()=>(u(r()),()=>s(r())));var f=B0(),p=C(f);ei(p,()=>{var v;return(v=e.children)!=null?v:vt}),S(f),Xe(f,v=>R(d,v),()=>n(d)),$(t,f),H(),o()}var F0=L('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),U0=L("<div><!></div> <!>",1),z0={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 Fa(t,e){B(e,!0),Y(t,z0);let[i,o]=De(),r=()=>x(X,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),f=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),_=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,H0),b=5,w=q(void 0),I=q(void 0),T,N=q(0),A=q(0),E=q(0),k=q(0),Q=Mt(),F=he(),z=F.ui.playerSize,X=F.ui.overlayContainer$;Oe(()=>{Tt(()=>{y()(s())})});let se=F.getLogger().createComponentLog("Tooltip component"),Z=()=>{if(!r()||!n(I)||!n(w))return;R(A,b);let re=r().getBoundingClientRect(),de=n(w).getBoundingClientRect(),Re=de.width,Ve=n(I).clientWidth,et=a().width,Ee=(Re-Ve)/2,Te=de.left+u()-re.left,Fe=Te+Ee,kt=de.top+f()-re.top,It=Ve/2-b,Pt=Fe<8,st=Fe+Ve>et-8;Pt&&(Fe=8,It=Te+de.width/2-2.5*b),st&&(Fe=et-8-Ve,It=de.left-re.left+de.width/2-Fe-b),R(E,Fe,!0),R(k,kt),R(N,It,!0)},oe=()=>{!r()||!n(I)||!n(w)||R(A,-b)},J=()=>{if(!r()||!n(I)||!n(w))return;R(N,b);let re=r().getBoundingClientRect(),de=n(w).getBoundingClientRect(),Re=de.height,Ve=n(I).clientHeight,et=(Re-Ve)/2+Ve,Ee=de.left+u()-re.left-n(I).clientWidth,Te=2,Fe=Ee-b;Fe<8&&(Fe=8);let It=de.top+f()-re.top+et,Pt=Te-et/2,st=Te-b;R(E,Fe,!0),R(k,It),R(A,Pt),R(N,st)},Ce=()=>{!r()||!n(I)||!n(w)||R(N,-b)},pe=()=>{switch(_()){case"top":Z();break;case"bottom":oe();break;case"left":J();break;default:Ce()}},ee=()=>{try{if(!r()||!n(w))return;pe(),s(!0)}catch(re){se({message:String(re)})}},_e=()=>{s(!1)},we=()=>{n(I)&&(T||(T=window.setTimeout(ee,Q.controls.hideTimeoutTooltips)),s()&&ee())},ve=()=>{_e(),window.clearTimeout(T),T=void 0},ue=(re,de,Re)=>{let Ve="";switch(_()){case"top":Ve=`transform: translate(${re}px, ${de}px);`;break;case"bottom":Ve=`transform: translate(${re}px, ${de}px); top: auto; bottom: 100%;`;break;case"left":Ve=`transform: translate(${re}px, ${de}px); left: 0; right: auto;`;break;default:Ve=`transform: translate(${re}px, ${de}px);`}return Ve+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,Ve+=` opacity: ${Re?1:0}; visibility: ${Re?"visible":"hidden"}`,Ve},Qe=(re,de)=>{let Re="";switch(_()){case"top":Re=`transform: translate(${re}px, ${de}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":Re=`transform: translate(${re}px, ${de}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":Re=`transform: translate(${re}px, ${de}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:Re=`transform: translate(${re}px, ${de}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return Re},U=m(()=>ue(n(E),n(k),s())),O=m(()=>Qe(n(N),n(A)));Lt(pe),sn(()=>window.clearTimeout(T));var Ge=U0(),K=ce(Ge);let ae;K.__pointermove=we,K.__pointerdown=ve,K.__pointerup=function(...re){var de;(de=e.disableMouseupTooltipShow?void 0:we)==null||de.apply(this,re)};var ye=C(K);ei(ye,()=>{var re;return(re=e.children)!=null?re:vt}),S(K),Xe(K,re=>R(w,re),()=>n(w));var He=P(K,2);{var it=re=>{am(re,{children:(de,Re)=>{var Ve=F0(),et=C(Ve),Ee=C(et,!0);S(et);var Te=P(et,2);S(Ve),Xe(Ve,Fe=>R(I,Fe),()=>n(I)),D(()=>{Ke(Ve,n(U)),me(Ee,d()),Ke(Te,n(O))}),$(de,Ve)},$$slots:{default:!0}})};V(He,re=>{d()&&!l()&&re(it)})}D(re=>ae=ne(K,1,"tooltip-wrapper s-1p",null,ae,re),[()=>({"full-width":p()})]),dt("pointerenter",K,we),dt("pointerleave",K,ve),$(t,Ge),H(),o()}Ye(["pointermove","pointerdown","pointerup"]);var H_=t=>{t.stopPropagation()},W0=L("<div><!></div>"),K0={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 Ao(t,e){B(e,!0),Y(t,K0);let[i,o]=De(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=he(),d=vo(),s=l.ui.isMobile,u=d.graphIsOpened$,f=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),_=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),b=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),T=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),A=h(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),k=h(e,"onTooltipVisibilityChange",3,lm),Q=h(e,"initialTranslateXPx",3,0),F=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,lm),X=h(e,"mouseLeave",3,lm),se=m(()=>v()?r()?f("tooltip_disabled_when_graph_on"):A():I()),Z=q(!1);Oe(()=>{T()||R(Z,!1)});var oe=W0();oe.__pointerdown=[H_],oe.__click=[H_];var J=C(oe);{var Ce=ee=>{Fa(ee,{get content(){return n(se)},get translateX(){return Q()},get translateY(){return F()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return k()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(Z)},set active(_e){R(Z,_e,!0)},children:(_e,we)=>{var ve=Le(),ue=ce(ve);ei(ue,()=>{var Qe;return(Qe=e.children)!=null?Qe:vt}),$(_e,ve)},$$slots:{default:!0}})},pe=ee=>{var _e=Le(),we=ce(_e);ei(we,()=>{var ve;return(ve=e.children)!=null?ve:vt}),$(ee,_e)};V(J,ee=>{_()&&n(se)&&!a()?ee(Ce):ee(pe,!1)})}S(oe),Xe(oe,ee=>y(ee),()=>y()),D(()=>{var ee;ne(oe,1,`btn-container ${(ee=p())!=null?ee:""}`,"s-1j"),Me(oe,"aria-hidden",E()||null)}),dt("mouseenter",oe,function(...ee){var _e;(_e=z())==null||_e.apply(this,ee)}),dt("mouseleave",oe,function(...ee){var _e;(_e=X())==null||_e.apply(this,ee)}),kn(oe,"clientWidth",b),$(t,oe),H(),o()}Ye(["pointerdown","click"]);var q0=Ie('<rect width="20" height="20" rx="10"></rect><path d="m12.53 8.69.06.19-.22-.64a.83.83 0 0 0-1.6.47l.13.48-.23-.85a.82.82 0 0 0-1.6.24l-.73-2.93a.85.85 0 0 0-1.65.4L8 11.34l-1.12-1.16a.8.8 0 0 0-1.21 1.03l2.23 2.94s1.23 1.83 4.3 1.23c2.43-.48 3.25-2.67 2.58-4.88l-.55-2.3a.88.88 0 1 0-1.7.49"></path>',1);function qd(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));Ze(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=q0(),l=ce(a),d=P(l);D(()=>{Me(l,"fill",ia),Me(l,"fill-opacity",e.completed?1:.24),Me(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),$(o,a)},$$slots:{default:!0}})}var Q0=L("<div><!></div>"),G0={hash:"s-19",code:".interactive-episode-icon.s-19{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-19{opacity:.4;pointer-events:none}"};function dm(t,e){B(e,!0),Y(t,G0);let o=he().ui.t,r=q(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Ao(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=Q0();let u;var f=C(s);let p=m(()=>!!e.videoEpisode.completed);qd(f,{get completed(){return n(p)}}),S(s),D(v=>{u=ne(s,1,"interactive-episode-icon s-19",null,u,v),Ke(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),kn(s,"clientWidth",v=>R(r,v)),$(l,s)},$$slots:{default:!0}}),H()}var Y0=L('<div><div class="video-episode-inner s-17"><div class="video-episode-loaded s-17"></div> <div></div></div></div>'),j0=L('<div class="video-episodes-wrap s-17"></div>'),X0={hash:"s-17",code:".video-episodes-wrap.s-17{height:100%;position:absolute;width:100%}.video-episode.s-17{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-17:first-child{padding-left:0}.video-episode.s-17:last-child{padding-right:0}.video-episode.s-17:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-17,.video-episode-inner.s-17,.video-episode-loaded.s-17{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-17{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-17:first-child .video-episode-inner:where(.s-17),.video-episode.s-17:last-child .video-episode-inner:where(.s-17){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-17{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-17,.video-episode-loaded.s-17{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-17{background-color:var(--slider-filled-bg)}"};function cm(t,e){Y(t,X0);let i=h(e,"videoEpisodes",19,()=>[]);var o=j0();_i(o,21,i,r=>r.from,(r,a)=>{var l=Y0();let d;var s=C(l),u=C(s),f=P(u,2);let p;S(s),S(l),D((v,_)=>{d=ne(l,1,"video-episode s-17",null,d,v),Ke(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Ke(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=ne(f,1,"video-episode-filled s-17",null,p,_),Ke(f,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),$(r,l)}),S(o),$(t,o)}function Z0(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&R(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;R(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function J0(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 ex(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;R(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function tx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function ix(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),R(r,!1),a()(l)}var ox=L("<div></div>"),nx=L('<div class="bars s-t"><div class="loaded s-t"></div> <div></div></div>'),rx=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),sx={hash:"s-t",code:'.interactive-icons.s-t{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-t{top:-10px}.slider.s-t{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-t{cursor:default}.slider.s-t:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-t{background:var(--slider-bg);overflow:hidden}.bars.s-t,.loaded.s-t{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-t{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-t{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-t,.slider.square.s-t .filled:where(.s-t),.slider.square.s-t .loaded:where(.s-t),.slider.square.s-t>.bars:where(.s-t){border-radius:unset}.filled.active-live.s-t{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-t{background-color:var(--slider-filled-ads)}.handleWrap.s-t{left:-100%;position:absolute;width:100%}.handle.s-t{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-t{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-t .handle:where(.s-t),.slider-dragging.s-t .handle:where(.s-t),.slider.s-t:hover .handle:where(.s-t){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-t .handle:where(.s-t){transform:scale(1.3)}.slider-vertical.s-t{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-t{cursor:default;opacity:.4}'};function Ua(t,e){B(e,!0),Y(t,sx);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),f=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),_=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),b=h(e,"onPointerDown",3,Yn),w=h(e,"onHandleMove",3,Yn),I=h(e,"onPointerUp",3,Yn),T=h(e,"onPointerEnter",3,Yn),N=h(e,"onPointerMove",3,Yn),A=h(e,"onPointerLeave",3,Yn),E=h(e,"onMouseEnter",3,Yn),k=h(e,"onMouseLeave",3,Yn),Q=h(e,"onWheelUp",3,Yn),F=h(e,"onWheelDown",3,Yn),z=h(e,"onWheelLeft",3,Yn),X=h(e,"onWheelRight",3,Yn),se=h(e,"onDisabledClick",3,Yn),Z=h(e,"loadedProgress",3,0),oe=h(e,"filledProgress",3,0),J=h(e,"handleProgress",3,0),Ce=h(e,"ariaLabel",3,""),pe=h(e,"ariaValueMin",3,void 0),ee=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),we=h(e,"ariaValueText",3,""),ve=h(e,"onContextMenu",3,Yn),ue=h(e,"handleAlwaysVisible",3,!1),Qe=Mt(),U=q(void 0),O=q(!1),Ge=m(()=>{var xe;return(xe=ee())!=null?xe:0}),K=m(()=>{var xe;return F_(f())&&((xe=f()[f().length-1])==null?void 0:xe.time)<n(Ge)}),ae=m(()=>F_(f())&&f().length&&n(K)&&n(Ge)?et(Z()*100,oe()*100):[]);function ye(xe){if(xe.preventDefault(),i()&&R(U,i().getBoundingClientRect(),!0),_())return;let Be=Re(xe.clientX,xe.clientY),$e=Ve(xe.clientX);T()(Be,$e,n(U).width)}function He(xe){xe.preventDefault(),!_()&&A()()}function it(){E()()}function re(){k()()}function de(xe){_()||p()&&(xe.preventDefault(),xe.deltaY<0?Q()():xe.deltaY>0?F()():xe.deltaX>0?X()():z()())}function Re(xe,Be){return l()?Math.max(0,Math.min(1,(n(U).height-(Be-n(U).top))/n(U).height)):Math.min(Math.max(xe-n(U).x,0),n(U).width)/n(U).width}function Ve(xe){return Math.min(Math.max(xe-n(U).x,0),n(U).width)}function et(xe,Be){let $e=Qe.features.episodesClustering&&!v()?Qe.episodeMinWidthPc:0,St=[],fe=f()[0].time/n(Ge)*100,Ne=0,qe=0;for(let Vt=1;Vt<f().length;Vt++)Ne=f()[Vt].time/n(Ge)*100,Ne-fe>$e&&(St.push({from:fe,width:Math.max(0,Ne-fe),loadedWidth:Math.max(0,Math.min(Ne,xe)-fe),filledWidth:Math.max(0,Math.min(Ne,Be)-fe),interactive:f()[Vt-1].interactive,completed:f()[Vt-1].completed}),fe=f()[Vt].time/n(Ge)*100,qe++);let nt={from:fe,width:Math.max(0,100-fe),loadedWidth:Math.max(0,Math.min(xe,100)-fe),filledWidth:Math.max(0,Math.min(Be,100)-fe),interactive:f()[qe].interactive,completed:f()[qe].completed};100-fe<$e?(qe-=1,St[qe].width+=100-fe,St[qe].loadedWidth+=Math.max(0,Math.min(xe,100)-fe),St[qe].filledWidth+=Math.max(0,Math.min(Be,100)-fe)):St[qe]=nt;let Wt=f()[0].time;if(Wt!==0){let Vt=Wt/n(Ge)*100;St.unshift({from:0,width:Vt,loadedWidth:Math.min(Vt,xe),filledWidth:Math.min(Vt,Be)})}return St}function Ee(xe){return Math.max(0,Math.min(100,xe*100))}let Te=m(()=>Ee(Z())),Fe=m(()=>Ee(oe()));var kt=rx(),It=ce(kt);{var Pt=xe=>{var Be=ox();let $e;_i(Be,21,()=>n(ae),St=>St.from,(St,fe)=>{var Ne=Le(),qe=ce(Ne);{var nt=Wt=>{dm(Wt,{get videoEpisode(){return n(fe)},get disabled(){return _()}})};V(qe,Wt=>{n(fe).interactive&&Wt(nt)})}$(St,Ne)}),S(Be),D(St=>$e=ne(Be,1,"interactive-icons s-t",null,$e,St),[()=>({mobile:s(),hidden:s()&&!n(O)})]),$(xe,Be)};V(It,xe=>{v()&&xe(Pt)})}var st=P(It,2);let wt;st.__pointerdown=[Z0,i,U,_,O,Re,b],st.__pointermove=[J0,_,Re,Ve,N,U,O,w],st.__pointerup=[ex,_,O,Re,I],st.__click=[tx,_,se,Re],st.__contextmenu=[ix,Re,_,se,O,ve];var jt=C(st);{var Ot=xe=>{cm(xe,{get videoEpisodes(){return n(ae)},get disabled(){return _()},get isMobile(){return s()}})},Nt=xe=>{var Be=nx(),$e=C(Be),St=P($e,2);let fe;S(Be),D(Ne=>{Me($e,"data-value",n(Te)),Ke($e,`transform: translateX(${n(Te)}%);`),fe=ne(St,1,"filled s-t",null,fe,Ne),Me(St,"data-value",n(Fe)),Ke(St,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),$(xe,Be)};V(jt,xe=>{n(ae).length?xe(Ot):xe(Nt,!1)})}var zt=P(jt,2);let G;var Pe=C(zt);let ke;S(zt),S(st),Xe(st,xe=>i(xe),()=>i()),D((xe,Be,$e,St)=>{var fe,Ne;wt=ne(st,1,`slider ${(fe=o())!=null?fe:""}`,"s-t",wt,xe),Me(st,"aria-label",Ce()),Me(st,"aria-valuemin",pe()),Me(st,"aria-valuemax",ee()),Me(st,"aria-valuenow",_e()),Me(st,"aria-valuetext",we()),Me(st,"data-testid",(Ne=r())!=null?Ne:null),G=ne(zt,1,"handleWrap s-t",null,G,Be),Ke(zt,$e),ke=ne(Pe,1,"handle s-t",null,ke,St)},[()=>({disabled:_(),"slider-dragging":n(O),hidden:a(),"handle-always-visible":ue(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${Ee(J())}%);`,()=>({"active-live":d()})]),dt("pointerenter",st,ye),dt("pointerleave",st,He),dt("mouseenter",st,it),dt("mouseleave",st,re),dt("wheel",st,de),$(t,kt),H()}Ye(["pointerdown","pointermove","pointerup","click","contextmenu"]);var Ji=(t,e)=>Ed[t]>=Ed[e];var Ns=(t,e)=>Ed[t]<=Ed[e],U_=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var lx=L("<div><!></div>"),dx=L("<div><!> <!></div>"),cx={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 Ve,et;B(e,!0),Y(t,cx);let[i,o]=De(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(ye,"$controlsVisible",i),u=he(),f=Mt(),p=u.state.volume$,v=u.state.muted$,{setVolume:_,startVolumeChanging:y,stopVolumeChanging:b}=u.actions.internal,w=u.ui.currentGridType$,I=(Ve=u.callbacks)==null?void 0:Ve.onAudioDoesNotExistHint,T=(et=u.callbacks)==null?void 0:et.onAudioDisabledHint,N=u.state.isAudioAvailable$,A=u.state.isAudioDisabled,E=u.ui.t,k=q(!1),Q,F=m(()=>e.isAds||r()),z=m(()=>!n(F)||a()||l()===0),X=m(()=>Ns(d(),"l")),se=m(()=>n(X)?"":n(z)?!r()||A?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),Z=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),oe=m(()=>n(z)?0:l()),J=!1,Ce=m(()=>e.isAds?!1:A?!T:r()?!1:!I);function pe(Ee){y(),_(Ee)}function ee(){Du(u,l(),f.controls.volumeStepWheel)}function _e(){Ou(u,l(),f.controls.volumeStepWheel)}function we(Ee){_(Ee)}function ve(Ee){_(Ee),b()}function ue(){J=!0}function Qe(){J=!1,Ge()}function U(){clearTimeout(Q),R(k,!0)}function O(){Ge()}function Ge(){Q=window.setTimeout(()=>{J||R(k,!1)},f.controls.volumeBarTimeout)}function K(Ee){Ee.preventDefault(),Ee.deltaY<0?ee():Ee.deltaY>0&&_e()}let ae=q(!1),ye=u.ui.controlsVisible;Oe(()=>{s()||R(ae,!1)});var He=dx();let it;var re=C(He);Fa(re,{get content(){return n(se)},translateY:-18,get active(){return n(ae)},set active(Ee){R(ae,Ee,!0)},children:(Ee,Te)=>{let Fe=m(()=>n(X)?"btn-volume-vertical":"btn-volume-horizontal");Ut(Ee,{className:"btn-full-opacity",get disabled(){return n(Ce)},get testId(){return n(Fe)},get ariaLabel(){return n(Z)},get click(){return e.click},get ariaKeyShortCut(){return fs.KeyM},role:"button",children:(kt,It)=>{da(kt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var de=P(re,2);{var Re=Ee=>{var Te=lx();let Fe;var kt=C(Te);let It=m(()=>n(X)?"volumeBar-slider-vertical":""),Pt=m(()=>n(X)&&!n(k)),st=m(()=>n(X)?ue:Fu),wt=m(()=>n(X)?Qe:Fu),jt=m(()=>Math.round(n(oe)*100)),Ot=m(()=>`${Math.round(n(oe)*100)}%`),Nt=m(()=>n(X)?"volume-slider-vertical":"volume-slider");Ua(kt,{get className(){return n(It)},get isHidden(){return n(Pt)},get isVertical(){return n(X)},withWheelHandler:!0,onWheelUp:ee,onWheelDown:_e,onPointerDown:pe,onHandleMove:we,onPointerUp:ve,get onPointerEnter(){return n(st)},get onPointerLeave(){return n(wt)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(jt)},get ariaValueText(){return n(Ot)},get filledProgress(){return n(oe)},get handleProgress(){return n(oe)},get testId(){return n(Nt)}}),S(Te),D(zt=>Fe=ne(Te,1,"volumeBar s-28",null,Fe,zt),[()=>({"volumeBar-vertical":n(X)})]),$(Ee,Te)};V(de,Ee=>{n(F)&&Ee(Re)})}S(He),D(Ee=>it=ne(He,1,"volumeBar-container s-28",null,it,Ee),[()=>({vertical:n(X)})]),dt("mouseenter",He,function(...Ee){var Te;(Te=n(X)?U:Fu)==null||Te.apply(this,Ee)}),dt("mouseleave",He,function(...Ee){var Te;(Te=n(X)?O:Fu)==null||Te.apply(this,Ee)}),dt("wheel",He,K),$(t,He),H(),o()}import{noop as fx}from"@vkontakte/videoplayer-shared/es2018";var ux=Ie('<path d="M4.58 13.98a1 1 0 0 1 .99-1h4.45a1 1 0 0 1 1 1v4.45a.99.99 0 0 1-1.99 0v-2.05L5.71 19.7a1 1 0 1 1-1.41-1.4l3.32-3.32H5.57a1 1 0 0 1-.99-1m10.39-6.36 3.32-3.32a1 1 0 1 1 1.41 1.4l-3.32 3.32h2.05a.99.99 0 0 1 0 1.98H14a1 1 0 0 1-1-1V5.57a.99.99 0 1 1 1.98 0z"></path>'),px=Ie('<path d="M10.5 19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-4.5a1 1 0 0 1 2 0v2.07l3.36-3.36a1 1 0 0 1 1.42 0l.01.01a1 1 0 0 1 0 1.42L7.43 18H9.5a1 1 0 0 1 1 1M18 7.43l-3.36 3.36a1 1 0 0 1-1.42 0l-.01-.01a1 1 0 0 1 0-1.42L16.57 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z"></path>');function pm(t,e){let i=h(e,"isFullscreen",8,!1),o=Sn(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=ce(l);{var s=f=>{var p=ux();$(f,p)},u=f=>{var p=px();$(f,p)};V(d,f=>{i()?f(s):f(u,!1)})}$(r,l)},$$slots:{default:!0}})}function Qd(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,fx),r=he(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Ut(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=sa(u);a.set(f),o()()},get ariaKeyShortCut(){return fs.KeyF},role:"button",children:(u,f)=>{pm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),H()}var mx=Ie('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function fm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=mx();Zi(o,()=>({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);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(),S(o),$(t,o)}var vx=Ie('<svg><!><svg data-logo="vk_video"><path d="M7 8.6c0-1.96 0-2.94.38-3.69a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.46 0 3.7 0 4.64.48a4.4 4.4 0 0 1 1.92 1.92c.48.94.48 2.18.48 4.64v3.92c0 2.46 0 3.7-.48 4.64a4.4 4.4 0 0 1-1.92 1.92c-.94.48-2.18.48-4.64.48H12.6c-1.96 0-2.94 0-3.69-.38a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.26 1.74c.9.54 1.36.81 1.51 1.16.13.3.13.65 0 .96-.15.34-.6.61-1.5 1.15l-2.4 1.43c-.93.56-1.4.84-1.8.8-.33-.03-.64-.2-.84-.48-.23-.31-.23-.86-.23-1.96v-2.85c0-1.1 0-1.64.23-1.96q.31-.42.85-.48c.38-.04.86.25 1.8.8zM5 9.04c0-2.46 0-3.7.48-4.64q.37-.71.95-1.25-.58.1-1.03.33A4.4 4.4 0 0 0 3.48 5.4C3 6.34 3 7.58 3 10.04v3.92c0 2.46 0 3.7.48 4.64a4.4 4.4 0 0 0 1.92 1.92q.45.23 1.03.33a4 4 0 0 1-.95-1.25C5 18.66 5 17.42 5 14.96z"></path></svg><svg x="4" y="3" data-logo="play_market"><path d="M0 1.26v15.47q0 .66.34 1L9.52 9 .33.28C.08.53 0 .92 0 1.26"></path><path d="M.33.28.38.23c.34-.3.89-.32 1.49 0l10.75 5.81-2.6 2.48zm10.29 8.75 2.88 2.45-.53.29-.34.18-2.58-2.44-9.71 8.22c.33.34.9.37 1.53.04l11.1-6 .53-.29 2.73-1.47c1.03-.56 1.03-1.47 0-2.02l-2.77-1.5-.84-.45.84.45.1.05z"></path></svg><svg x="3" data-logo="app_store"><path d="M17.62 16.37q-.48 1.09-1.15 2.03-.9 1.27-1.48 1.75-.88.8-1.9.83-.72 0-1.76-.42a5 5 0 0 0-1.89-.4q-.9 0-1.94.4a5 5 0 0 1-1.68.44q-.98.04-1.95-.85-.62-.53-1.55-1.82a13 13 0 0 1-1.63-3.2 12 12 0 0 1-.69-3.8q0-2.1.93-3.64A5.4 5.4 0 0 1 5.5 5.03q.77 0 2.03.46t1.62.47q.26 0 1.79-.55a6 6 0 0 1 2.43-.42 5.2 5.2 0 0 1 4.05 2.09q-2.4 1.44-2.4 4.02a4.4 4.4 0 0 0 1.49 3.34q.66.61 1.48.95-.18.5-.38.98M13.5.42q0 1.58-1.17 2.94c-.94 1.08-2.07 1.7-3.3 1.6L9 4.56c0-1 .45-2.08 1.24-2.96q.6-.67 1.5-1.12.93-.44 1.74-.48z"></path></svg><path d="M32.55 17.04h2.5L38.7 7h-1.8l-2.94 8.28h-.28L30.84 7H29zm15.52 0-4.61-5.2L47.72 7H45.6l-3.56 4.09h-.42V7h-1.7v10.04h1.7v-4.3h.43l3.76 4.3z"></path><path d="M57.89 11.89a2.2 2.2 0 0 0 1.44-2.16C59.33 8.14 58 7 56.06 7h-3.92v10.04h4.2c1.96 0 3.29-1.14 3.29-2.8 0-1.17-.66-2.04-1.74-2.35m-4.04-3.4h2.21c.92 0 1.54.56 1.54 1.39 0 .8-.62 1.36-1.54 1.36h-2.2zm2.5 7.06h-2.5v-2.81h2.5c.9 0 1.52.57 1.52 1.4 0 .84-.62 1.4-1.52 1.4m4.84 1.5h2.32l2.77-5.5h.22v5.5h1.57v-7.4h-2.32l-2.77 5.5h-.22v-5.5h-1.57zm7.96 2.21h1.64v-2.2h5.33v2.2h1.64v-3.7h-1.29V9.64h-5.43l-.37 3.78c-.13 1.34-.53 2.13-1.34 2.13h-.18zm2.49-3.7c.4-.39.57-1.04.68-2.15l.23-2.27h2.28v4.42zm14.38-2.3a3.7 3.7 0 0 0-3.84-3.76 3.7 3.7 0 0 0-3.85 3.85 3.7 3.7 0 0 0 3.85 3.84c1.54 0 2.99-.72 3.55-2.13l-1.54-.26c-.36.53-1.04.9-1.91.9-1.26 0-2.09-.77-2.24-1.91H86zm-3.84-2.33c1.02 0 1.8.65 2.06 1.58h-4.1a2.1 2.1 0 0 1 2.04-1.58m8.66 6.26c2.32 0 3.96-1.6 3.96-3.84 0-2.25-1.64-3.85-3.96-3.85s-3.97 1.6-3.97 3.85 1.64 3.84 3.97 3.84m0-1.5c-1.34 0-2.25-.95-2.25-2.34 0-1.4.9-2.35 2.25-2.35 1.34 0 2.25.95 2.25 2.35s-.91 2.35-2.25 2.35" class="_ru"></path><path d="M35.02 17.36h-2.48L29 7.42h1.83l2.83 8.2h.28l2.93-8.2h1.8zm8.41-5.15 4.6 5.15h-2.24l-3.75-4.26h-.43v4.26h-1.7V7.42h1.7v4.05h.41l3.55-4.05h2.1zm13.37 5.15h-2.48L50.8 7.42h1.83l2.82 8.2h.29l2.92-8.2h1.8zm6.46 0h-1.64v-7.33h1.64zm-.81-8.37q-.45 0-.74-.27a1 1 0 0 1-.28-.72q0-.44.28-.72.3-.28.74-.28t.72.28q.3.29.29.72 0 .44-.29.72t-.72.27m5.93 8.51q-1.03 0-1.86-.48a3.5 3.5 0 0 1-1.29-1.35 4 4 0 0 1-.45-1.98q0-1.1.45-1.95.46-.88 1.3-1.36.81-.5 1.85-.5.9 0 1.6.38.68.35 1.13.88V7.42h1.63v9.94h-1.22l-.34-1.18q-.46.54-1.17.94a3.4 3.4 0 0 1-1.63.38m.4-1.45q1.04 0 1.68-.65.65-.66.65-1.7t-.65-1.7a2.2 2.2 0 0 0-1.68-.66 2.2 2.2 0 0 0-1.66.66q-.64.66-.64 1.7t.64 1.7q.64.65 1.66.65m13.15-2.44-.03.52h-5.94q.12.86.71 1.38.6.51 1.52.51.63 0 1.13-.24.51-.24.78-.65l1.53.26q-.39 1.01-1.38 1.56-.96.55-2.16.55-1.1 0-1.98-.48a3.6 3.6 0 0 1-1.85-3.33q0-1.1.48-1.95.5-.88 1.37-1.36a4 4 0 0 1 1.98-.5q1.11 0 1.98.5.88.48 1.36 1.34.5.86.5 1.89m-3.84-2.31q-.73 0-1.29.42-.53.42-.74 1.14h4.1a2.2 2.2 0 0 0-2.07-1.56m8.66 6.2q-1.14 0-2.04-.48a3.7 3.7 0 0 1-1.4-1.35 4 4 0 0 1-.5-1.98q0-1.1.5-1.95.5-.88 1.4-1.36.9-.5 2.04-.5t2.03.5q.91.48 1.4 1.36.52.86.52 1.95 0 1.11-.51 1.98-.5.86-1.4 1.35-.9.48-2.04.48m0-1.48q.99 0 1.62-.63.63-.66.63-1.7t-.63-1.67a2.2 2.2 0 0 0-1.62-.65q-.99 0-1.62.65-.62.63-.62 1.67 0 1.05.62 1.7.63.63 1.62.63" class="_en"></path></svg>');function mm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=vx();Zi(o,()=>({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);ei(r,()=>{var a;return(a=e.children)!=null?a:vt}),ai(6),S(o),$(t,o)}var gx={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),Y(t,gx);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`);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()}}),H()}function Gd(t,e){B(e,!0);let[i,o]=De(),r=()=>x(_,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(b,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),f=Mt(),p=he(),v=p.ui.currentGridType$,_=p.ui.isMobile,y=p.ui.t,b=p.isCyrillicRelatedInterface$,w=m(()=>f.logoType!=="vk"),I=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),T=m(()=>(r()&&Ns(a(),"m")||Ns(a(),"l"))&&n(w)),N=()=>{var k,Q;e.click(),(k=p.callbacks)!=null&&k.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},A=m(()=>!s()),E=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");Ut(t,{className:"btn-full-opacity",get disabled(){return n(A)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(k){d(k)},children:(k,Q)=>{var F=Le(),z=ce(F);{var X=Z=>{vm(Z,{get logo(){return f.logoType},get short(){return n(T)},get isCyrillic(){return l()}})},se=Z=>{fm(Z,{})};V(z,Z=>{n(w)?Z(X):Z(se,!1)})}$(k,F)},$$slots:{default:!0}}),H(),o()}import{ChromecastState as $x}from"@vkontakte/videoplayer-core/es2018";import{ChromecastState as W_}from"@vkontakte/videoplayer-core/es2018";var hx=Ie('<path d="M3.6 13.3a5.1 5.1 0 0 1 5.05 5.83.9.9 0 0 1-1.78-.26 3.3 3.3 0 0 0-3.74-3.74.9.9 0 0 1-.26-1.78c.24-.03.49-.05.73-.05Z" class="s-16"></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-16"></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-16"></path>',1),_x=Ie('<path d="M3.60219 13.2993C6.41858 13.2995 8.70256 15.5835 8.70278 18.3999C8.70277 18.6469 8.68424 18.8909 8.65004 19.1294C8.57937 19.6212 8.12333 19.9625 7.63149 19.8921C7.13968 19.8213 6.79823 19.3654 6.86879 18.8735C6.89087 18.7195 6.90199 18.5611 6.902 18.3999C6.90178 16.5776 5.42447 15.1003 3.60219 15.1001C3.441 15.1001 3.28267 15.1112 3.12856 15.1333C2.63666 15.2039 2.18077 14.8624 2.11 14.3706C2.03966 13.8788 2.38091 13.4227 2.8727 13.3521C3.11125 13.3178 3.35516 13.2993 3.60219 13.2993Z"></path><path d="M3.60219 9.69971C8.40682 9.69977 12.3021 13.5953 12.3024 18.3999C12.3024 18.6248 12.2938 18.8489 12.277 19.0698C12.239 19.5651 11.8065 19.9365 11.3112 19.8989C10.8157 19.8611 10.4445 19.4286 10.4821 18.9331C10.4954 18.7576 10.5026 18.5791 10.5026 18.3999C10.5023 14.5894 7.41271 11.5005 3.60219 11.5005C3.42268 11.5005 3.24474 11.5066 3.06899 11.52C2.57352 11.5578 2.14115 11.1863 2.10317 10.6909C2.06587 10.1957 2.43694 9.76287 2.93227 9.7251C3.15348 9.70823 3.37699 9.69971 3.60219 9.69971Z"></path><path d="M3.60219 16.8999C4.43047 16.8999 5.10198 17.5717 5.10219 18.3999C5.10209 19.2282 4.43054 19.8999 3.60219 19.8999C2.77383 19.8999 2.10229 19.2282 2.10219 18.3999C2.10241 17.5717 2.7739 16.8999 3.60219 16.8999Z"></path><path d="M16.2379 4.1001C17.0459 4.10009 17.7067 4.10017 18.2438 4.14404C18.7997 4.18946 19.3022 4.28599 19.7711 4.5249C20.5049 4.89882 21.1014 5.49623 21.4752 6.22998C21.714 6.69873 21.8107 7.20063 21.8561 7.75635C21.9 8.29338 21.9001 8.95424 21.9 9.76221V14.2378C21.9001 15.0458 21.9 15.7066 21.8561 16.2437C21.8107 16.7996 21.7141 17.3021 21.4752 17.771C21.1014 18.5046 20.5048 19.1012 19.7711 19.4751C19.3022 19.714 18.7997 19.8105 18.2438 19.856C17.7067 19.8998 17.0459 19.8999 16.2379 19.8999H14.9997C14.503 19.8996 14.1005 19.4972 14.1002 19.0005C14.1002 18.5036 14.5028 18.1004 14.9997 18.1001H16.1998C17.0548 18.1001 17.6422 18.0992 18.0973 18.062C18.5419 18.0257 18.7809 17.9596 18.9538 17.8716C19.3489 17.6702 19.6704 17.3487 19.8717 16.9536C19.9598 16.7808 20.0258 16.5417 20.0622 16.0972C20.0993 15.6421 20.1002 15.0546 20.1002 14.1997V9.80029C20.1002 8.94536 20.0993 8.35794 20.0622 7.90283C20.0258 7.45834 19.9598 7.21921 19.8717 7.04639C19.6704 6.6514 19.3487 6.33073 18.9538 6.12939C18.7809 6.04133 18.5419 5.97431 18.0973 5.93799C17.6422 5.9008 17.0548 5.8999 16.1998 5.8999H6.00063L5.83071 5.90674C4.99191 5.97398 4.28981 6.53462 4.01918 7.30029C3.85342 7.76872 3.33928 8.01472 2.87075 7.84912C2.40214 7.68346 2.15628 7.16833 2.32192 6.69971C2.85696 5.18632 4.30125 4.1001 6.00063 4.1001H16.2379Z"></path><path d="M2.95114 7.11345C2.42394 7.1914 1.90399 6.78569 2.00995 6.2634C2.05777 6.0277 2.12517 5.82449 2.22018 5.63803C2.5078 5.07354 2.96674 4.6146 3.53123 4.32698C4.17296 4 5.01304 4 6.6932 4H17.2001C18.8803 4 19.7204 4 20.3621 4.32698C20.9266 4.6146 21.3855 5.07354 21.6731 5.63803C22.0001 6.27976 22.0001 7.11984 22.0001 8.8V15.2C22.0001 16.8802 22.0001 17.7202 21.6731 18.362C21.3855 18.9265 20.9266 19.3854 20.3621 19.673C19.7204 20 18.8803 20 17.2001 20H15.7196C15.2009 20 14.8203 19.5134 14.8938 19C14.9638 18.5101 15.0001 18.0093 15.0001 17.5C15.0001 11.701 10.2991 7 4.5001 7C3.97384 7 3.45662 7.03872 2.95114 7.11345Z"></path>',1),bx={hash:"s-16",code:".animated.s-16{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-16{animation-name:s-16-wave1}.wave2.animated.s-16{animation-name:s-16-wave2}.wave3.animated.s-16{animation-name:s-16-wave3}@keyframes s-16-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-16-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-16-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function Yd(t,e){B(e,!0),Y(t,bx);let i=h(e,"isMobile",3,!1),o=m(()=>e.iconState===W_.CONNECTED),r=m(()=>e.iconState===W_.CONNECTING),a=m(()=>n(o)?"#2688EB":ia),l=m(()=>e.size?an(e.size):void 0);var d=Le(),s=ce(d);{var u=p=>{Ze(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,_)=>{var y=hx();ai(2),$(v,y)},$$slots:{default:!0}})},f=p=>{Ze(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,_)=>{var y=_x(),b=ce(y);let w;var I=P(b);let T;var N=P(I);let A;var E=P(N);let k;var Q=P(E);let F;D((z,X,se,Z,oe)=>{w=ne(b,0,"wave2 s-16",null,w,z),T=ne(I,0,"wave3 s-16",null,T,X),A=ne(N,0,"wave1 s-16",null,A,se),k=ne(E,0,"s-16",null,k,Z),F=ne(Q,0,"s-16",null,F,oe)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:n(o)}),()=>({hidden:!n(o)})]),$(v,y)},$$slots:{default:!0}})};V(s,p=>{i()?p(u):p(f,!1)})}$(t,d),H()}import{noop as yx}from"@vkontakte/videoplayer-shared/es2018";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,yx),l=he().ui.t,d=m(()=>e.state===$x.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Ut(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)=>{Yd(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),H()}import{noop as wx}from"@vkontakte/videoplayer-shared/es2018";var xx=Ie('<path d="m21.62 16.5-.02.07q-.22 1.27-.42 2.09a5 5 0 0 1-.64 1.5 4.4 4.4 0 0 1-2.51 1.73q-.77.18-1.63.07t-2.11-.34l-4.34-.8q-1.27-.22-2.1-.42a5 5 0 0 1-1.5-.65 4.4 4.4 0 0 1-1.72-2.5 5 5 0 0 1-.07-1.63q.1-.84.34-2.11l.01-.07q.22-1.27.43-2.1a5 5 0 0 1 .64-1.5 4.4 4.4 0 0 1 2.5-1.73 5 5 0 0 1 1.64-.07q.83.1 2.1.35l4.34.8q1.28.21 2.1.42a5 5 0 0 1 1.5.64 4.4 4.4 0 0 1 1.73 2.5q.18.78.07 1.64-.1.83-.34 2.1m-1.45-2.3c.05-.49.03-.77-.02-1a2.6 2.6 0 0 0-1.02-1.48 3 3 0 0 0-.93-.37c-.48-.13-1.1-.24-2-.4l-4.26-.79c-.9-.16-1.52-.27-2.01-.33a3 3 0 0 0-1 .03 2.6 2.6 0 0 0-1.48 1.02 3 3 0 0 0-.37.92c-.13.48-.24 1.1-.4 2s-.28 1.51-.33 2c-.06.5-.04.78.02 1 .15.6.51 1.13 1.02 1.48.19.13.45.25.92.37.48.13 1.1.25 2 .4l4.27.79c.9.16 1.52.28 2.01.33s.77.03 1-.02a2.6 2.6 0 0 0 1.47-1.03c.14-.19.25-.45.38-.92.12-.48.24-1.1.4-2s.28-1.51.33-2"></path><path d="M18.19 7.49a.9.9 0 0 1-1.05-.73c-.14-.8-.2-1.08-.28-1.3A2.6 2.6 0 0 0 14.5 3.8c-.22 0-.5.04-1.31.17l-5.85.96a8 8 0 0 0-2.17.5 2.6 2.6 0 0 0-1.33 1.75c-.08.38-.04.85.11 2.23l.01.1a.9.9 0 1 1-1.78.2l-.01-.1-.02-.17a9 9 0 0 1-.07-2.64 4.4 4.4 0 0 1 2.25-2.97c.63-.33 1.42-.46 2.56-.65l.16-.03 5.85-.96.1-.01c.67-.11 1.13-.19 1.55-.18a4.4 4.4 0 0 1 4 2.82c.14.39.23.85.35 1.53l.01.1a.9.9 0 0 1-.72 1.04"></path><path d="M12.72 12.41a.42.42 0 0 0-.69.23l-.72 4.18a.4.4 0 0 0 .03.23c.08.2.33.3.54.22l3.67-1.47a.4.4 0 0 0 .12-.68z"></path>',1);function gm(t){Ze(t,{testId:"episodes-icon",children:(e,i)=>{var o=xx();ai(2),$(e,o)},$$slots:{default:!0}})}var Uu=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Sx=L('<span class="text mobile s-22"> </span> <div class="chevron-episodes s-22" data-testid="btn-episodes_icon"><!></div>',1),Cx=L('<span class="text s-22"> </span>'),Tx=L('<span class="text count s-22"> </span>'),Ix=L('<span class="icon s-22"><!></span> <!>',1),Ex={hash:"s-22",code:".icon.s-22{flex-shrink:0}.text.s-22{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-22{overflow:visible}.text.mobile.s-22{padding:0 3px 0 4px}.chevron-episodes.s-22{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function Xd(t,e){var J,Ce,pe;B(e,!0),Y(t,Ex);let[i,o]=De(),r=()=>x(y,"$currentGridType$",i),a=()=>x(b,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),f=h(e,"timeCodes",19,()=>[]),p=he(),v=(Ce=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?Ce:wx,_=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,b=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,I=p.ui.isMobile,T=p.ui.t,N=q(void 0),A=ee=>{var we,ve,ue;if(!!((we=p.callbacks)!=null&&we.onEpisodeClicked)){let Qe=sa(ee);b.set(Qe),w.set(!0),(ue=(ve=p.callbacks)==null?void 0:ve.onEpisodeClicked)==null||ue.call(ve,Qe)}},E=q(null),k=m(()=>s()/u());Oe(()=>{var _e;let ee=Uu(n(k),u(),f());ee?((_e=n(E))==null?void 0:_e.time)!==ee.time&&(v(ee),R(E,ee,!0)):R(E,null)});let Q=m(()=>{var ee;return((ee=n(E))==null?void 0:ee.text)||""}),F=m(()=>Ji(r(),"xl")?"FULL":Ji(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${T("tooltip_episodes")}: ${n(Q)}`),X=async(ee,_e,we)=>{await uo(),(ee==null?void 0:ee.getAttribute("aria-expanded"))==="false"&&_e&&!we&&Tt(()=>{b.set(!1),ee.focus()})};Oe(()=>{X(n(N),a(),l())});var se=Le(),Z=ce(se);{var oe=ee=>{let _e=m(()=>d()?"px-0":""),we=m(()=>!_);Ut(ee,{get className(){var ve;return`w-max btn-full-opacity btn-jc-l ${(ve=n(_e))!=null?ve:""}`},testId:"btn-episodes",click:A,get disabled(){return n(we)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(ve){R(N,ve,!0)},children:(ve,ue)=>{var Qe=Le(),U=ce(Qe);{var O=K=>{var ae=Sx(),ye=ce(ae),He=C(ye,!0);S(ye);var it=P(ye,2),re=C(it);Lr(re,{direction:"right"}),S(it),D(()=>me(He,n(Q))),$(K,ae)},Ge=K=>{var ae=Ix(),ye=ce(ae),He=C(ye);gm(He,{}),S(ye);var it=P(ye,2);{var re=Re=>{var Ve=Cx(),et=C(Ve,!0);S(Ve),D(()=>me(et,n(Q))),$(Re,Ve)},de=(Re,Ve)=>{{var et=Ee=>{var Te=Tx(),Fe=C(Te,!0);S(Te),D(()=>me(Fe,f().length)),$(Ee,Te)};V(Re,Ee=>{n(F)==="COUNT"&&Ee(et)},Ve)}};V(it,Re=>{n(F)==="FULL"?Re(re):Re(de,!1)})}$(K,ae)};V(U,K=>{d()?K(O):K(Ge,!1)})}$(ve,Qe)},$$slots:{default:!0}})};V(Z,ee=>{n(E)&&ee(oe)})}$(t,se),H(),o()}import{debounceFn as ab}from"@vkontakte/videoplayer-shared/es2018";import{ChromecastState as Dx,PlaybackState as Fl,Player as Ox,PredefinedQualityLimits as hs,VideoFormat as Jd,clientChecker as j_}from"@vkontakte/videoplayer-core/es2018";import{assertNonNullable as pr,getHighestQuality as Bx,InterfaceLanguage as Hx,isInvariantQuality as Fx,isNonNullable as Ux,loadVKLangPack as zx,Logger as Wx,map as X_,merge as Kx,Observable as Yu,Subject as Ul,Subscription as xm,TracerFactory as qx,ValueSubject as Qx,VideoQuality as Gx,devNull as Yx,now as jx,filter as Xx,once as Zx}from"@vkontakte/videoplayer-shared/es2018";import{SeekAction as Os}from"@vkontakte/videoplayer-statistics/es2018";import{detectEmbed as kx,devNull as ii,isNonNullable as Px,now as oi}from"@vkontakte/videoplayer-shared/es2018";import{addScript as Ax,Subject as ln,clearVideoElement as Lx}from"@vkontakte/videoplayer-shared/es2018";var Mx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",zu=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 ln,loadStarted$:new ln,loadEnded$:new ln,loadError$:new ln,ready$:new ln,slotRequested$:new ln,started$:new ln,timeRemained$:new ln,paused$:new ln,resumed$:new ln,ended$:new ln,empty$:new ln,skipped$:new ln,clicked$:new ln,closed$:new ln,error$:new ln};this.loadAdman=e=>(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[oi()]}),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?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[oi()]}),o())};Ax(Mx,e,this.loadTimeout).then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[oi()]}),window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[oi()]}),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?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[oi()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[oi()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[oi()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[oi()]}),!d&&(window.AdmanHTML?(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[oi()]}),i(),this.events.loadEnded$.next()):(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[oi()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[oi()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[oi(),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?be(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;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[oi()]}),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;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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")=>{ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[oi()]}),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"),ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[oi()]}),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")}async initAdman(e){var N,A;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[oi(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:f,externalApi:p}=e;this.externalApi=p;let v,_=this.playerState&&be(this.playerState.vsid);_&&(this.isVsidOriginal?v=_:v=parseInt(_,36));let{isEmbed:y,immediateOrigin:b}=kx(),w=(N=y?b:window.location.href)!=null?N:window.location.href,I={...s,dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o,...v?{request_id:v}:{},duration:f,...u};I=Object.fromEntries(Object.entries(I).filter(([E,k])=>Px(k)));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),(A=this.externalApi)!=null&&A.videoGetAds){let k=await this.safeExternalCall(this.externalApi.videoGetAds,I);k&&(delete T.slot,delete T.params,Object.assign(T,{json:k}))}E.init(T),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(T)}`})}catch(E){ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[oi()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,r,a;if(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[oi()]}),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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adsState){this.log({message:"toggle play"});let i=be(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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[oi()]}),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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),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(ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[oi()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,f,p,v;ii.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[oi()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(v=this.adman)==null||v.destroy(),this.videoElement&&Lx(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var o;try{return await e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}}};var K_=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 Wu,{startTime:f,endTime:p}=u.parse(s);l.startTime=f,l.endTime=p}else if(s.trim()!==""){let u=new _m,{texts:f}=u.parse(s);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},Wu=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((f,p)=>{let v=l.indexOf(p,d);return f===-1||f>v?v:f},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new Wu;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}},q_=hm;import{isNonNullable as bm}from"@vkontakte/videoplayer-shared/es2018";var za,Ei,$m=0,ym=!1,Q_="",G_=(t,e=0,i=0)=>t<e&&t<i,Ku=(t,e=0,i=0)=>t>=e&&t<=i,Vx=(t,e=0,i=0)=>t>e&&t>i,Y_=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:f})=>Ku(t,u,f));let a=t>=$m,l=t<$m;if($m=t,l&&(ym=!1),bm(za)&&Ku(t,za.startTime,za.endTime)&&Q_===e.value)return za;if(!bm(Ei)&&(r!=null&&r.length)&&!ym){Ei=r.find(({startTime:u,endTime:f})=>Ku(t,u,f)||a&&G_(t,u,f)),za=void 0,!bm(Ei)&&r[r.length-1].endTime<t&&(ym=!0);return}else{if(Ku(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))return za=Ei,Ei=void 0,Q_=e.value,za;(a&&Vx(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime)||l&&G_(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))&&(Ei=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"},Rx={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"},Zd=t=>{var e,i;return(i=(e=qu[t])!=null?e:qu[Rx[t]])!=null?i:void 0};import{Subscription as Nx}from"@vkontakte/videoplayer-shared/es2018";import"@vkontakte/videoplayer-statistics/es2018";var Qu=class{constructor(e,i,o,r=new Nx){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 Gu=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Gu||{});var gs=t=>t!=null?t:0,Ds=(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(gs(i==null?void 0:i.top)-gs(o==null?void 0:o.top)),left:Math.round(gs(i==null?void 0:i.left)-gs(o==null?void 0:o.left)),bottom:Math.round(gs(i==null?void 0:i.bottom)-gs(o==null?void 0:o.top)),right:Math.round(gs(i==null?void 0:i.right)-gs(o==null?void 0:o.left))}},Bl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:gs(e==null?void 0:e.width),height:gs(e==null?void 0:e.height)}};var Ln="off";var Hl=t=>!!(Math.round(Math.abs(t)/90)%2);var Z_=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:_,player:y,disabledControls:b,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:T,replayInteractive:N,stopPlayer:A,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,additionalButtons:Q,additionalSettingsMenuItems:F,additionalContextMenuItems:z,playPrevVideo:X,playNextVideo:se,onVideoChanged:Z,looped:oe=!1,statistics:J,saveRate:Ce,internalsExposure:pe,playerView:ee,playerId:_e,metaConfig:we})=>{var Uv,zv;let ve={..._,isAudioDisabled:l,live:{...(Uv=_.live)!=null?Uv:{},isLiveCatchUpMode:!!r}},ue=v,Qe=qx.createRootTracer(ue.features.tracer),U=Qe.createComponentTracer("Store"),O=y||new Ox(ve,Qe,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});pe==null||pe.expose({corePlayer:O});let Ge=new Wx,K=new zu(Ge,{loadTimeout:ue.ads.loadTimeout,initTimeout:ue.ads.initTimeout,runtimeTimeout:ue.ads.runtimeTimeout,useAdmanFromNPM:ue.ads.useAdmanFromNPM,volumeMultiplier:ue.ads.volumeMultiplier,isVsidOriginal:ue.ads.isVsidOriginal}),ae=Va.getInstance(),ye=u==null?void 0:u.pictureInPictureApi,He=u==null?void 0:u.annotationsApi,it=u==null?void 0:u.slotsApi,re=u==null?void 0:u.focusManager,de=Ge.createComponentLog("Store"),Re,Ve,et={},Ee=new hu,Te=new xm,Fe="",kt=le(!1),It=J&&J.oneStat?ti(J.oneStat.vsid$):Ar(void 0),Pt=le(oa()),st=le(!1),wt=()=>b_(document,j_.device.isIOS),jt=(zv=ye==null?void 0:ye.info.isActive$)!=null?zv:new Qx(!1),Ot=le(0),Nt=le(!1),zt=le(!1),G=le([]),Pe=Kx(O.events.fatalError$,O.events.managedError$).subscribe(c=>G.update(g=>[...g,c])),ke=Ar(!1,c=>{let g=O.events.fatalError$.subscribe(()=>c(!0));return()=>g.unsubscribe()}),xe=async c=>{var ie;let g=Object.values(Hx).includes(c);if(ue.downloadVKLanguages&&(g&&ue.updateBuiltinLanguages||!Vf(c))){let Se;try{Se=await zx(c,kh,Ph)}catch(je){(ie=J==null?void 0:J.oneStat)==null||ie.logError({errorType:"VKLangPack",fatal:!1}),ae==null||ae.report(je,{errorType:"VKLangPack",fatal:!1})}Se&&(Mf({language:c,pack:Se,fallback:ue.defaultLanguage}),Be.set(c),$e.update(je=>je+1))}Vf(c)&&Be.set(c)},Be=le(t),$e=le(0),St=le(e);xe(t);let fe=(c,g)=>{let M=be(Be);return Rf(M,c,g,ue.defaultLanguage)},Ne=le("thumb");Ne.subscribe(c=>{c==="ads"&&O.info.playbackState$.getValue()&&Wt()});let qe=(()=>{let c=mi([ke,Ne],([g,M])=>g?"crashed":M);return{...c,is:g=>be(c)===g}})(),nt=le(),Wt=()=>{nt.set({muted:O.info.muted$.getValue()})},Vt=(()=>{let c=le(new Set(b));return{...c,add:g=>{c.update(M=>new Set([...M].concat(g)))},remove:g=>{c.update(M=>{let ie=[...M];return new Set(Array.isArray(g)?ie.filter(Se=>!g.includes(Se)):ie.filter(Se=>Se!==g))})},includes:g=>{let M=be(c);return Array.isArray(g)?g.every(ie=>M.has(ie)):M.has(g)}}})(),pi=le({width:0,height:0}),di=null,Ci=O.info.isBuffering$,to=Ar(Ci.getValue(),c=>{let g=Ci.subscribe(M=>{M&&di===null?di=window.setTimeout(()=>{c(Ci.getValue()),di=null},ue.loaderDelay):c(M)});return()=>{g.unsubscribe(),di&&clearTimeout(di)}});U.log("create store"),de({message:"create store"});let ci=c=>{let g=c.container,M=()=>{at=new MutationObserver(Se=>{let{removedNodes:je}=Se[0];je.length&&g.append(O.experimental.element$.getValue())}),at.observe(g,{childList:!0})},ie=O.experimental.element$.getValue();if(ie)g.append(ie),M();else{let Se=O.experimental.element$.pipe(Xx(je=>!!je),Zx()).subscribe(je=>{g.append(je),M()});Te.add(Se)}},hi=c=>{de({message:`init video, config: ${JSON.stringify(c)}`}),w?ci(c):(Yx.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[jx()]}),O.initVideo(c)),U.log("init video",{isInteractive:w}),c.subtitles&&O.setExternalTextTracks(c.subtitles),Re=c,Fe=c.subtitlesForcedLanguage||""},$t=new Ul,ui=c=>$t.next(c),Qi=new Ul,ct=new Ul,Dt=new Ul,at=null,We={actionRewind$:Qi,actionSeek$:ct,inPiP$:jt,inFullscreen$:new Yu(c=>Pt.subscribe(g=>c.next(g))),actionSetSubtitle$:Dt,nextMovie$:$t},fi=new Ul,po=new Ul,Go={actionSeek$:ct,actionSubtitlesSwitched$:fi,actionQuality$:po,playerSize$:new Yu(c=>pi.subscribe(g=>c.next(g))),inPiP$:jt,inFullscreen$:new Yu(c=>Pt.subscribe(g=>c.next(g))),isLoaderVisible$:new Yu(c=>to.subscribe(g=>c.next(g)))};if(J){let{oneStat:c,thinOneStat:g,mediascopePixel:M,statSubscription:ie}=J;c&&(w||ie.add(c.attachTo(O)),ie.add(c.attachToUi(We)),ie.add(c.attachToAds(K.events)),c.authorize(a).catch(Se=>{de({message:`onestat auth error ${String(Se)}`})}),M&&M.attachTo(O)),g&&(ie.add(g.attachTo(O,K.events)),ie.add(g.attachToUi(Go)),ie.add(g.attachToAds(K.events)),g.updateContext({isMobile:be(kt)}),g.authorize(a))}if(ae){let c=new xm,g=(M,ie)=>c.add(M.subscribe(ie));if(g(O.events.managedError$,M=>{ae.logIError(M)}),g(O.events.fatalError$,M=>{ae.logIError(M,!0)}),J){let{oneStat:M}=J;M&&g(M.experimental.error$,ie=>{ae.logIError(ie)})}ae.sentrySubscription.add(c)}let Yo=()=>{if(j_.device.isIOS&&Ve)try{$_(Ve)}catch(c){de({message:`exitIosSafariFullscreen failed: ${c}`})}};Te.add(O.experimental.element$.subscribe(c=>{c&&(Ve=c,c.classList.add("player-media"),Na(ye)&&ye.updateVideoElement(),w&&c.setAttribute("pip","false"),(ee==="preview"||!ue.features.pip&&!ue.features.dpip)&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(O.events.ended$.subscribe(()=>{var c;Yo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(O.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(O.events.started$.subscribe(async()=>{var g,M;Na(ye)&&await(ye==null?void 0:ye.revealPictureInPicture());let c=O.info.muted$.getValue();(g=s==null?void 0:s.onStarted)==null||g.call(s),(M=et.onStarted)==null||M.call(et,c)})).add(O.events.willSeek$.subscribe(({from:c,to:g})=>{var M;(M=s==null?void 0:s.onSeek)==null||M.call(s,c,g)})).add(O.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(O.info.position$.subscribe(c=>{var M;let g=O.info.duration$.getValue();isFinite(g)&&g>0&&((M=s==null?void 0:s.onTimeupdate)==null||M.call(s,g,c),K.setPosition(c,g))})).add(O.events.fatalError$.subscribe(c=>{var g;(g=s==null?void 0:s.onCrashed)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.fetcherRecoverableError$.subscribe(c=>{var g;(g=s==null?void 0:s.onRecoverableError)==null||g.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(O.events.loadedMetadata$.subscribe(()=>{Nt.set(!0)})).add(O.info.is3DVideo$.subscribe(c=>{zt.set(c)})).add(O.info.isEnded$.subscribe(c=>{w&&(c?(T!=null&&T.getValue()&&Vt.add(Id),Vt.add("PLAY_BUTTON")):Vt.remove("PLAY_BUTTON"))})).add(O.info.liveTime$.subscribe(c=>{var g;(g=s==null?void 0:s.onLiveTime)==null||g.call(s,c)})).add(O.info.isStalled$.subscribe(c=>{var g;(g=s==null?void 0:s.onStalledChanged)==null||g.call(s,c)})).add(O.info.isLiveEnded$.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onLiveEnded)==null?void 0:g.call(s))})).add(K.events.loadStarted$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:g.call(c)})).add(K.events.loadEnded$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:g.call(c)})).add(K.events.loadError$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:g.call(c)})).add(K.events.init$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:g.call(c)})).add(K.events.ready$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:g.call(c)})).add(K.events.started$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onStarted)==null?void 0:M.call(g,c)})).add(K.events.timeRemained$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onTimeRemained)==null?void 0:M.call(g,c)})).add(K.events.ended$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onCompleted)==null?void 0:M.call(g,c)})).add(K.events.empty$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:g.call(c)})).add(K.events.clicked$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClicked)==null?void 0:M.call(g,c)})).add(K.events.closed$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onClosed)==null?void 0:M.call(g,c)})).add(K.events.error$.subscribe(c=>{var g,M;return(M=(g=s==null?void 0:s.adsInfo)==null?void 0:g.onError)==null?void 0:M.call(g,c)})).add(K.events.paused$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:g.call(c)})).add(K.events.resumed$.subscribe(()=>{var c,g;return(g=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:g.call(c)}));let xt=new xm,Bt=()=>{var je,Et,Ht;let{debugLog:c}=ue,g,M="#9df7b7",ie="#efd169";if(c&&c!==!0){let{colors:qt}=c;g=c.tag,M=(je=qt==null?void 0:qt[0])!=null?je:M,ie=(Ht=(Et=qt==null?void 0:qt[1])!=null?Et:qt==null?void 0:qt[0])!=null?Ht:ie}let Se=g?`: ${g}`:"";xt.add(O.events.log$.subscribe(qt=>{console.debug(`%c sdk${Se} `,`background:${M};`,`sdk component: ${qt.component}`,qt.message)})).add(Ge.log$.subscribe(qt=>{console.debug(`%c ui${Se} `,`background:${ie};`,`ui component: ${qt.component}.`,qt.message)}))},W=()=>{xt.unsubscribe()},At=(c,g)=>{U.log("start camera manual rotation",{mx:c,my:g}),O.startCameraManualRotation(c,g)},ni=(c=!1)=>{U.log("stop camera manual rotation",{immediate:c}),O.stopCameraManualRotation(c)},mt=(c,g,M)=>{U.log("move camera focus px",{xpx:c,ypx:g,dt:M}),O.moveCameraFocusPX(c,g,M)},Xt=()=>{O.holdCamera()},gt=()=>{O.releaseCamera()},rt=Ar(O.info.position$.getValue(),c=>{let g,M,ie=()=>{let Se=O.info.playbackState$.getValue(),je=O.info.isLive$.getValue(),Et=O.info.duration$.getValue(),Ht=O.info.position$.getValue();if(Se&&[Fl.PLAYING,Fl.PAUSED].includes(Se)){let qt=je?Ht-Et:O.getExactTime();qt!==M&&c(qt),M=qt}g=requestAnimationFrame(ie)};return ie(),()=>cancelAnimationFrame(g)}),Vi=ti(O.info.playbackState$),ki=ti(O.info.isBuffering$),cn=mi([Vi,ki],([c,g])=>g?"buffering":c),un=ti(O.info.currentBuffer$),Pi=ti(O.info.isEnded$),Ri=ti(O.info.isLive$),Mn=ue.features.playbackRate?ti(O.info.canChangePlaybackSpeed$):Ar(!1),go=ti(O.info.liveBufferTime$),io=ti(O.info.volume$),Ti=ti(O.info.muted$),Lo=_u(O.info.predefinedQualityLimitType$.pipe(X_(c=>c===hs.TRAFFIC_SAVING)),O.info.predefinedQualityLimitType$.getValue()===hs.TRAFFIC_SAVING),Mo=_u(O.info.predefinedQualityLimitType$.pipe(X_(c=>c===hs.HIGH_QUALITY)),O.info.predefinedQualityLimitType$.getValue()===hs.HIGH_QUALITY),pn=ti(O.info.autoQualityLimitingAvailable$),Vr=ti(O.info.availableQualities$),Rr=ti(O.info.availableQualitiesFps$),Nr=ti(O.info.chromecastState$),bs=ti(O.info.chromecastDeviceName$),Dr=ti(O.info.currentFormat$),Zn=ti(O.info.throughputEstimation$),Or=ti(O.info.videoBitrate$),fn=ti(O.info.intrinsicVideoSize$),mn=ti(O.info.duration$),fr=ti(O.info.isAudioAvailable$),mr=()=>{di&&clearTimeout(di),di=null},jo=mi([mn,Ri],([c,g])=>g?-c:c),vr=mi([Vi],([c])=>c===Fl.PLAYING),gr=ti(O.info.atLiveEdge$),Jn=ti(O.info.atLiveDurationEdge$),Vn=ti(O.info.position$),ns=mi([Vn,mn],([c,g])=>isFinite(c)&&isFinite(g)&&!!g),Vo=mi([Nr],([c])=>c===Dx.CONNECTED),hr=ti(O.info.availableVideoStreams$),Ni=ue.features.audioLanguages?ti(O.info.availableAudioStreams$):Ar([]),_r=ti(O.info.currentVideoStream$),Rn=ti(O.info.currentAudioStream$),ft=c=>{c.language&&kf(c.language),O.setVideoStream(c)},Zt=(c,g)=>{O.setAudioStream(c),Ro(g)&&(c.language&&kf(c.language),ue.features.userVideoPrefs&&i&&Lf(ue.userSalt,String(i),{audioTrackId:c.id}))},br=c=>{let g;if(c.length===1&&(g=c.at(0)),g!=null||(g=c.find(ie=>"isDefault"in ie&&ie.isDefault)),ue.features.userVideoPrefs&&i){let ie=wu(ue.userSalt,String(i));if(ie!=null&&ie.audioTrackId){let Se=c.find(je=>je.id===ie.audioTrackId);g=Se!=null?Se:g}}let M=i_();return M&&(g!=null||(g=c.find(({language:ie})=>M===ie))),g!=null||(g=c.at(0)),g},Br=c=>{U.log("change audio stream",{id:c});let g=O.info.availableAudioStreams$.getValue().find(M=>M.id===c);g&&Zt(g,!0)},Hr=!1;Te.add(O.info.availableAudioStreams$.subscribe(c=>{if(!Hr&&c.length){let g=br(c);g&&(O.setAudioStream(g),Hr=!0)}})),Ni.subscribe(c=>{var g;(g=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||g.call(s,c.map(({label:M="",id:ie="",language:Se=""})=>({label:M,language:Se,id:ie})))}),Rn.subscribe(c=>{var g;return c&&((g=s==null?void 0:s.onAudioStreamChanged)==null?void 0:g.call(s,c.id))});let Nn=!1;Te.add(O.info.availableVideoStreams$.subscribe(c=>{if(!Nn&&c.length){let g=br(c);g&&(O.setVideoStream(g),Nn=!0)}}));let er=le(void 0),ho=ti(O.info.isAutoQualityEnabled$,c=>c&&er.set(void 0)),Dn=ti(O.info.currentQuality$,()=>er.set(void 0)),tr=mi([er,Dn],([c,g])=>c!=null?c:g),On=mi(Dr,c=>c!==Jd.MPEG),vn=mi([Vr,Rr,ho,tr,On],([c,g,M,ie,Se])=>{let je=[];Se&&je.push({value:"auto",displayValue:fe("auto_quality_option"),selected:M});let Et=c.filter(Ht=>!Fx(Ht));for(let Ht of Et){let qt=g[Ht];je.push({value:Ht,displayValue:`${Ht}${qt?K_(qt):""}`,selected:M?!1:Ht===ie})}return je}),gn=ti(O.info.currentPlaybackRate$),hn=mi([gn,gr,Jn],([c,g,M])=>{let ie=M||w?1:ue.controls.playbackRateMin,Se=g?1:ue.controls.playbackRateMax,je=ue.controls.playbackRateStep,Et=[];for(let Ht=ie;Ht<=Se;Ht+=je)Et.push({value:Ht,displayValue:Ht===1?fe("playback_rate_1"):fe("playback_rate",{multiplier:Ht.toString(10)}),selected:c===Ht});return Et}),Xo=()=>({displayValue:fe("subtitles_off"),value:Ln,language:""}),Di=le(Xo()),Gi=mi([Di,$e],([c],g)=>{c.value===Ln?g(Xo()):g(c)}),Zo=ue.features.subtitles?ti(O.info.availableTextTracks$):Ar([]),ir=Wh(),$r=mi([Zo,Gi],([c,g],M)=>{var je;let ie=[],Se=c.find(({id:Et})=>Et===g.value);if(Se!=null&&Se.url){let[,Et]=(je=ir.find(Se.url))!=null?je:[];if(Et){M(Et);return}Ee.download(Se.url).then(Ht=>{if(!Ht||Ee.isDestroyed())return;let qt=new q_,qs=Se.language;if(qs){let Xb=!!Se.isAuto,Zb=qt.parse(Ht,qs);ie.push({lang:qs,subtitles:Zb,isAuto:Xb,id:Se.id})}ir.add(Se.url,ie),be(Gi).value===g.value&&M(ie)}).catch(Ht=>{var qt;(qt=J==null?void 0:J.oneStat)==null||qt.logError({errorType:"Subtitles download",fatal:!1}),ae==null||ae.report(Ht,{errorType:"Subtitles download",fatal:!1})})}M(ie)}),_n=mi([gn,vr,Gi],([c,g,M],ie)=>{let Et;if(O.info.isLive$.getValue()&&g&&M.value!==Ln){let qt=()=>{let qs=1e3/(3*c);Et=setTimeout(qt,qs),ie(Date.now())};return qt(),()=>clearTimeout(Et)}}),yr=mi([Zo,Gi],([c,g])=>{if(!c.length)return[];let M=[];for(let{language:ie,isAuto:Se,id:je}of c){let Et=ie&&Zd(ie);ie&&Et&&M.push({displayValue:Se?fe("subtitles_auto",{language:Et}):Et,value:je,selected:(g==null?void 0:g.value)===je,isAuto:Se,language:ie})}return M.length?(M.unshift({...Xo(),selected:(g==null?void 0:g.value)===Ln}),M):[]}),ut={available:[],prev:[]},yt=()=>{var g,M;let c=O.experimental.getCurrentTime$.getValue();return(M=(g=c==null?void 0:c())!=null?g:Ve==null?void 0:Ve.currentTime)!=null?M:0},oo=mi([rt,Gi,$r,_n],([c,g,M,ie])=>{var je;let Se=O.info.isLive$.getValue();if(Se&&ut.prev!==M){let Et=M.find(({id:qt})=>qt===g.value),Ht=ut.prev.find(({id:qt})=>qt===g.value);if(Et){let qt={...Et,subtitles:[...(je=Ht==null?void 0:Ht.subtitles)!=null?je:[],...Et.subtitles]};ut.available=[qt],ut.prev=M}}if(g&&g.value!==Ln){let Et=Se?yt():c,Ht=Se?ut.available:M;return Y_(Et,g,Ht,Se)}}),fo=mi([oo],([c])=>c!=null&&c.texts?c.texts:[]);Te.add(Gi.subscribe(c=>{var g,M;if(c.value===Ln)(g=s==null?void 0:s.onSubtitleOff)==null||g.call(s);else{let ie=Object.entries(qu).find(([Se,je])=>je===c.displayValue);(M=s==null?void 0:s.onSubtitleOn)==null||M.call(s,ie?ie[0]:"",c.value)}}));let Jo=le(!0),_o=mi([un,jo,Vn,go],([c,g,M,ie])=>{var Ht;let Se=(Ht=c==null?void 0:c.end)!=null?Ht:0;if(!ie)return Se/g;let Et=-M+ie-g;return(Se-Et)/g}),bo=ti(O.info.availableSources$),Ii=mi([bo],([c])=>Object.keys((c==null?void 0:c[Jd.MPEG])||{}).length>0),$o=()=>{var M,ie,Se;let c=Object.keys(((ie=(M=O.info.availableSources$)==null?void 0:M.getValue())==null?void 0:ie[Jd.MPEG])||{}),g=Bx(c)||Gx.Q_144P;return(Se=Re.sources[Jd.MPEG])==null?void 0:Se[g]},Fr=()=>{var g;let c=$o();if(c)U.log("download video",{url:c}),Fh(c,((g=Re==null?void 0:Re.meta)==null?void 0:g.title)||"video");else{let M="There is no URL for download video";U.log("download video",{message:M}),de({message:M})}},xr=()=>{de({message:"toggle muted"});let c=O.info.muted$.getValue();O.info.volume$.getValue()===0&&!c?Ur(wr(),!1):en(!c,!1)},$s=()=>{var c;if(Kt.ui.settingsMenu.visible$.set(!1),!be(Kt.ui.settingsSubMenu.visible$)){let g=be(Kt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&g){let ie=Bl(g),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:ie,position:Se,name:"settings"})}}U.log("close settings menu")},Oi=async(c,g=()=>Promise.resolve())=>{var Se;Kt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Kt.ui.settingsMenu.visible$.set(!0),await g();let M=be(Kt.ui.settingsMenu.ref$),ie=ha();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&M&&ie){let Et=Bl(M),Ht=Ds(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Et,position:Ht,name:"settings"})}U.log("open settings menu",{wasOpenedByKeyboard:c})},ys=(c,g=!1)=>{var je;Kt.ui.settingsSubMenu.visible$.set(!1);let M=be(Kt.ui.settingsMenu.ref$),ie=ha(),Se=be(Kt.ui.settingsMenu.visible$);if((je=s==null?void 0:s.uiInfo)!=null&&je.onSettingsMenu&&M&&ie)if(Se&&!g){let Ht=Bl(M),qt=Ds(M,ie);s.uiInfo.onSettingsMenu({visible:!0,size:Ht,position:qt,name:"settings"})}else{let Ht=Bl(c),qt={top:0,left:0,bottom:0,right:0},qs=be(Kt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:Ht,position:qt,name:qs})}U.log("close settings sub menu")},rs=(c,g)=>{var ie;Kt.ui.settingsSubMenu.visible$.set(!0),Kt.ui.settingsSubMenu.ref$.set(g),Kt.ui.settingsSubMenu.name$.set(c);let M=ha();if((ie=s==null?void 0:s.uiInfo)!=null&&ie.onSettingsMenu&&g&&M){let je=Bl(g),Et=Ds(g,M);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:je,position:Et})}U.log("open settings sub menu",{name:c})},wr=()=>{var g;let c=Math.max(ue.volumeMinRestore,(g=bu())!=null?g:0);return c===0?ue.volumeDefault:c},Ro=c=>{let g=ue.features.savePreferredStatesOnUserActionOnly;return!g||g&&!c},Ur=(c,g)=>{let M=c===0?wr():c,ie=O.info.muted$.getValue();de({message:`set volume, volume: ${c}, preferredVolume: ${M}`});let Se=!l||qe.is("ads");ie&&c>0&&Se&&(ie=!1,Ro(g)&&If(!1)),O.setVolume(c,ie),K.setVolume(c),Ro(g)&&wf(M)},en=(c,g)=>{let M=O.info.volume$.getValue();de({message:`set muted, currentVolume: ${M}, mute: ${c}`});let ie=qe.is("ads");if(O.setMuted(c,ie),K.setVolume(c?0:M),Ro(g)&&(!ie||!c)&&If(c),!c&&M===0){let Se=wr();O.setVolume(Se),Ro(g)&&wf(Se),K.setVolume(Se)}},tn=le(!1),Ue=c=>{var g,M;U.log("set looped",{isLooped:c}),tn.set(c),O.setLooped(c),(M=(g=s==null?void 0:s.uiInfo)==null?void 0:g.onLoopedChanged)==null||M.call(g,c)};Ue(oe);let Ct=()=>{var c,g;(g=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||g.call(c)},li=(c,g=!1)=>{var M;de({message:`set autoplayNextEnabled, value: ${c}`}),U.log("set autoplay next enabled",{autoplayNextEnabled:c}),Kt.ui.autoplayNextEnabled$.set(c),r_(c),g&&((M=s==null?void 0:s.onSetAutoplayNextEnabled)==null||M.call(s,c))},No=c=>{de({message:`set timerNextVideoRunning, value: ${c}`}),U.log("set timer next video running",{timerNextVideoRunning:c}),Kt.ui.timerNextVideoRunning$.set(c)},yo=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{g=(M=s==null?void 0:s.onPrevVideoClick)==null?void 0:M.call(s)}catch(ie){de({message:"onPrevVideoClick callback failed to execute"})}Z(!0),g&&X()},Do=(c=!0)=>{var M;let g=!0;if(c&&(s!=null&&s.onNextVideoClick))try{g=(M=s==null?void 0:s.onNextVideoClick)==null?void 0:M.call(s)}catch(ie){de({message:"onNextVideoClick callback failed to execute"})}Z(!1),g&&se()},Bi=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},xo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Bn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Sr=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},wo=()=>{O.prepare()},no=()=>{pr(Kt);let c=be(Kt.ui.controls.disabledControls$),g=be(Kt.playerPhase),M={playerPhase:g,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(de({message:"toggle play"}),g==="ads"){M.action="play",U.log("toggle adman play",M),K.togglePlay();return}let ie=()=>{var je;de({message:"toggle play, call player.play"}),M.action="play",O.play(),(je=s==null?void 0:s.onPlay)==null||je.call(s)},Se=()=>{var je;de({message:"toggle play, call player.pause"}),M.action="pause",O.pause(),(je=s==null?void 0:s.onPause)==null||je.call(s)};if(O.info.isEnded$.getValue()){if(de({message:"toggle play, video ended, seek to 0"}),Qi.next(),ct.next(Os.REWIND),w){N==null||N();return}O.seekTime(0),ie()}else O.info.playbackState$.getValue()!==Fl.PLAYING?ie():Se();U.log("toggle play",M)},bn=(c,{changeReason:g="default",appliesTo:M="to-video",byUser:ie=!1}={},Se)=>{de({message:`set quality, quality: ${c}`}),U.log("set quality",{quality:c}),ie&&po.next(c),O.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:je}=ue.features;$u(),c!=="auto"?(je?(yu({type:"exact_quality",quality:c,videoId:i},M),O.setPredefinedQualityLimits(hs.UNKNOWN)):Sf(i,c),er.set(c),O.setQuality(c)):je&&g==="default"&&(Wr("auto_quality",M,Se),be(Lo)&&Oo(!1,void 0,Se),be(Mo)&&Hn(!1,void 0,Se))},Oo=(c,g="as-default",M)=>{de({message:`set trafficSavingEnabled, value: ${c}`}),U.log("set traffic saving enabled",{trafficSavingEnabled:c});let ie=c?hs.TRAFFIC_SAVING:hs.UNKNOWN;ue.features.qualityDetailsSubMenuEnabled?(zr(ie,g,M),kd(!1)):(O.setPredefinedQualityLimits(ie),Ro(M)&&kd(c))},Hn=(c,g="as-default",M)=>{de({message:`set highQualityEnabled, value: ${c}`}),U.log("set high quality enabled",{highQualityEnabled:c}),zr(c?hs.HIGH_QUALITY:hs.UNKNOWN,g,M)},zr=(c,g,M)=>{c!==hs.UNKNOWN&&(be(pn)&&!be(ho)&&bn("auto",{appliesTo:g,changeReason:"limit-changed"},M),Wr(c,g,M)),O.setPredefinedQualityLimits(c)},Wr=(c,g,M)=>{Ro(M)&&(yu({type:c,videoId:i},g),g==="as-default"&&yu({type:c,videoId:i},"to-video"))},Fn=(c,g=!0)=>{U.log("set playback rate",{playbackRate:c}),O.setPlaybackRate(c),ue.features.saveRate&&Ce&&!O.info.isLive$.getValue()&&g&&o_(c)},Je=()=>{let c=be(Mn),g=be(hn),M=g.findIndex(({selected:Se})=>Se);if(M===g.length-1||!c)return g[M];let ie=g[M+1];return Fn(ie.value),ie},Yt=()=>{let c=be(Mn),g=be(hn),M=g.findIndex(({selected:Se})=>Se);if(M===0||!c)return g[M];let ie=g[M-1];return Fn(ie.value),ie},bi=(c={...Xo(),selected:!1},g)=>{U.log("set subtitles",{...c}),c.value!==Ln&&Dt.next(c.isAuto?c.value+"_auto":c.value),fi.next({enabled:c.value!==Ln,lang:c.language,auto:!!c.isAuto}),Di.set(c),Ro(g)&&(Af(c.value===Ln?void 0:c.language),ue.features.userVideoPrefs&&i&&Lf(ue.userSalt,String(i),{subtitleTrackId:c.value===Ln?void 0:c.value}))},So=c=>{U.log("toggle subtitles");let g=be(Gi);(g==null?void 0:g.value)===Ln?Un(c):Bo(c)},$n=(c,g)=>{U.log("change subtitle",{enabled:c}),c?Un(!0,g):Bo(!0)},Un=(c,g)=>{U.log("subtitle on");let M=be(yr),ie=be(Be),Se=Fe!=null?Fe:ie,je;g&&(je=M.find(Et=>Et.value===g)),je!=null||(je=M.filter(Et=>Et.value!==Ln).find(Et=>Et.language===Se)),bi(je!=null?je:M[1],c)},Bo=c=>{U.log("subtitle off"),bi(void 0,c)};Te.add(O.info.availableTextTracks$.subscribe(c=>{var M;function g(){let ie=[];for(let{language:Se,isAuto:je,id:Et}of c){let Ht=Se&&Zd(Se);Se&&Ht&&ie.push({id:Et,language:Se,title:je?fe("subtitles_auto",{language:Ht}):Ht})}return ie}(M=s==null?void 0:s.onAvailableSubtitlesChanged)==null||M.call(s,g())}));let or=le(!0),ss=c=>{or.set(c)},Cr=(c,g,M=!0)=>{var ie;if(de({message:`seek to time, time: ${c}`}),U.log("seek to time",{time:c,action:g,forcePrecise:M}),ct.next(g),O.info.isLive$.getValue()){let Se=O.info.duration$.getValue(),je=Math.min(0,Se+c);O.seekTime(je,M)}else{if(T!=null&&T.getValue())return;O.info.isEnded$.getValue()&&(de({message:"seek after ended, call callbacks.onPlay"}),(ie=s==null?void 0:s.onPlay)==null||ie.call(s)),O.seekTime(on(c),M)}},xs=c=>{de({message:`seek to episode start time: ${c}`}),U.log("seek to episode start time",{time:c}),Cr(c,Os.EPISODE,!0)},Us=(c,g,M=!1)=>{de({message:`seek to percent, percent: ${c}`}),U.log("seek to percent",{percent:c,action:g});let ie=be(jo)*c;Cr(ie,g,M)},ua=c=>{de({message:`seek external, time: ${c}`}),U.log("seek external",{time:c}),ct.next(Os.UNKNOWN),O.seekTime(O.info.isLive$.getValue()?-c:c)},lt=c=>{var ie,Se;let g=(ie=c.max)!=null?ie:"none",M=(Se=c.min)!=null?Se:"none";de({message:`set auto quality limitation. Max: ${g}. Min: ${M}`}),U.log("set auto quality limits",{max:g,min:M}),O.setAutoQualityLimits(c)},ri=c=>{de({message:`seek external to episode start time: ${c}`}),U.log("seek external to episode start time",{time:c}),Cr(c,Os.EPISODE,!0)},Co=c=>{de({message:`set playback rate to: ${c}`}),U.log("set playback rate external",{playbackRate:c}),O.setPlaybackRate(c)},$i=le(!1),yn=le(!1),xn=mi([jo],([c])=>!!p&&c>=ue.suitableDurationForUsingRichSeek&&ue.features.useRichSeek&&!w),ws=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),Ss=mi([Ot],([c])=>{let g=Hl(c);return ws?!g:g});Te.add(qe.subscribe(c=>{c!=="video"&&$i.set(!1)})),$i.subscribe(c=>{var g;(g=s==null?void 0:s.onRichSeekActiveChanged)==null||g.call(s,c)});let Hi=le(void 0),Si=le(!1),ge=c=>{de({message:`start scrubbing, progress: ${c}`}),U.log("start scrubbing",{progress:c}),Si.set(!0),ht(c)},ht=c=>{Hi.set(c)},Jt,Gt,To=()=>{Hi.set(void 0),Si.set(!1)},ro=()=>{clearTimeout(Gt),clearTimeout(Jt),Jt=window.setTimeout(()=>{To()},500),Ve==null||Ve.removeEventListener("seeked",ro)},Ho=(c,g=!1)=>{de({message:`complete scrubbing, progress: ${c}`}),U.log("complete scrubbing",{progress:c}),Us(c,Os.SLIDER,g),be(Kt.ui.isMobile)&&be(Kt.state.currentFormat$)===Jd.HLS?(Ve==null||Ve.addEventListener("seeked",ro),Gt=window.setTimeout(()=>{ro()},300)):To()},Cs=mi([rt,jo,Hi],([c,g,M],ie)=>{ie(Ux(M)?M*g:c)}),Kr=le(!1),Tr=()=>{Kr.set(!0)},pa=()=>{Kr.set(!1)},zs=mi([pi],([{width:c}],g)=>{let M=U_(c);g(M)}),fa=Q.filter(c=>Uh(c)),qr=mi([zs,kt],([c,g])=>g?fa.filter(M=>!M.hideOnMobile):fa.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(c))})),wn=le(Q.filter(c=>zh(c))),tl=mi([wn,zs],([c,g])=>c.filter(M=>{var ie;return!((ie=M.hideOnDesktopGridTypes)!=null&&ie.includes(g))})),ma=mi([tl,qr],([c,g])=>[...ue.features.additionalButtonsDesktopControlPanelRight?c.filter(M=>M.type==="desktop-control-panel-right"):[],...ue.features.additionalButtons?g.map((M,ie)=>{var Se;return{id:ie,weight:ie,type:"desktop-control-panel-right",testId:M.testId,icon:M.iconUrl,onClick:M.onClick,ariaLabel:(Se=M.ariaLabel)!=null?Se:M.tooltip,tooltipText:M.tooltip}}):[]].filter(M=>!v.disabledAdditionalButtonIds.includes(M.id))),Qr=le(F),il=mi([Qr],([c])=>ue.features.additionalSettingsMenuItems?c.map(g=>g.type==="SWITCH"?{...g,onClick:g.onChangeEnabled}:g):[]),jl=(c,g)=>{let M=be(wn).map(ie=>ie.id!==c?ie:{...ie,...g});wn.set(M)},va=c=>{let g=be(wn);if(g.some(M=>M.id===c.id)){de({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),wn.set(g)},Xl=c=>{let g=be(wn);if(!g.some(M=>M.id===c)){de({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),wn.set(g)},ol=c=>{ct.next(Os.LIVE),de({message:"live switch to low latency "+c}),U.log("live switch to low latency "+c),O.setLiveLowLatency(c)},nl=(c,g)=>{let M=be(Qr).map(ie=>ie.id!==c?ie:{...ie,...g});Qr.set(M)},ga=c=>{let g=be(Qr);if(g.some(M=>M.id===c.id)){de({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),Qr.set(g)},pt=c=>{let g=be(Qr);if(!g.some(M=>M.id===c)){de({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),Qr.set(g)},ot=le(z),Yi=mi([ot],([c])=>ue.features.additionalContextMenuItems?c:[]),Io=(c,g)=>{let M=be(ot).map(ie=>ie.id!==c?ie:{...ie,...g});ot.set(M)},ji=c=>{let g=be(ot);if(g.some(M=>M.id===c.id)){de({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}g.push(c),ot.set(g)},vi=c=>{let g=be(ot);if(!g.some(M=>M.id===c)){de({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}g=g.filter(M=>M.id!==c),ot.set(g)},Fi=mi([kt,ke],([c,g],M)=>{M(c&&g)}),Ws=()=>{ct.next(Os.LIVE),de({message:"switch to active live"}),U.log("switch to active live"),O.seekTime(0),O.info.playbackState$.getValue()!==Fl.PLAYING&&Kt.actions.internal.togglePlay()},Zl=()=>{U.log("skip adman"),K.skip()},kc=(c=!0)=>{var ie;pr(Kt),de({message:`switch from ads to video, callPlay: ${c}`}),U.log("switch from ads to video",{callPlay:c}),Ne.set("video"),c&&O.play(),l&&en(!0,!0);let g=(ie=be(nt))==null?void 0:ie.muted,M=!O.info.muted$.getValue();g!==void 0&&!M&&en(g,!0),nt.set(void 0)},gp=()=>{pr(Kt),de({message:"switch from video to ads"}),U.log("switch from video to ads"),Kt.actions.internal.pause(),Yo(),Ne.set("ads")},Pc=c=>{pr(Kt);let g=c?"LiveWaitingStart":"thumb";U.log("set live waiting start",{state:c,playerPhase:g}),Ne.set(g)},hp=c=>{pr(Kt);let g=c?"LiveWaitingRecover":"thumb";U.log("set live waiting recover",{state:c,playerPhase:g}),Ne.set(g)},Ac=c=>{pr(Kt);let g=c?"LiveWaitingRecord":"thumb";U.log("set live waiting record",{state:c,playerPhase:g}),Ne.set(g)},_p=()=>(pr(Kt),U.log("get debug text data"),Bh(O,Re,Kt,Qe.getTraceId(),we)),Lc=()=>(pr(Kt),JSON.stringify(Qe.getFinishedSpans())),bp=()=>(pr(Kt),Hh(O,Re,Kt)),ha=()=>Ve,Mc=()=>{de({message:"toggle chromecast"}),U.log("toggle chromecast"),O.toggleChromecast()},Ks=c=>{var M;if(pr(Kt),O.info.isEnded$.getValue())return;let g=!c;if(be(Kt.playerPhase)==="ads"){de({message:`pause ads, internalCall: ${g}`}),U.log("pause ads",{internalCall:g}),K.pause();return}de({message:`pause video, internalCall: ${g}`}),U.log("pause video",{internalCall:g}),g&&((M=s==null?void 0:s.onPause)==null||M.call(s)),O.pause()},rl=c=>{var M;pr(Kt);let g=!c;if(be(Kt.playerPhase)==="ads"){de({message:`play ads, internalCall: ${g}`}),U.log("play ads",{internalCall:g}),K.play();return}de({message:`play video, internalCall: ${g}`}),U.log("play video",{internalCall:g}),g&&((M=s==null?void 0:s.onPlay)==null||M.call(s)),O.play()},Vc=c=>{pr(Kt);let g=!c;if(be(Kt.playerPhase)==="ads"){de({message:"player cannot be stopped during ads via external method"});return}de({message:`player will be stopped, internalCall: ${g}`}),A==null||A()},Rc=(c,g)=>{pr(Kt),de({message:`first start, show ads: ${c}, internalCall: ${!g}`}),U.log("first start",{showAds:c,external:g}),c?Ne.set("ads"):(Ne.set("video"),g?O.play():Kt.actions.internal.togglePlay())},sl=()=>(de({message:"getting time codes"}),f),Nc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let g=O.info.position$.getValue();return c.find(M=>M.time>g)},Dc=c=>{let g=c;g||(g=Nc());let M=O.info.position$.getValue();U.log("seek to next episode",{currentTime:M,...g}),g&&(de({message:"seek to next episode"}),Cr(g.time,Os.EPISODE,!0))},Oc=()=>{let c=sl();if(!c||[0,1].includes(c.length))return;let g=O.info.position$.getValue(),M=c.findIndex(Se=>Se.time>g),ie=M===-1?c.length-2:M-2;if(!(ie<0))return c[ie]},$p=c=>{let g=c;g||(g=Oc());let M=O.info.position$.getValue();U.log("seek to prev episode",{currentTime:M,...g}),g&&(de({message:"seek to prev episode"}),Cr(g.time,Os.EPISODE,!0))},yp=()=>(de({message:"getting preview thumbs data"}),U.log("get preview thumbs data",{...p}),p),ze=async()=>{let c=ye==null?void 0:ye.isActive(),g="none";ye!=null&&ye.isActive()?(g="exit",await(ye==null?void 0:ye.exit())):(g="request",await(ye==null?void 0:ye.request())),U.log("toggle picture in picture",{isActive:c,action:g})},gi=(c=-90)=>{U.log("rotate video",{alphaDiff:c}),Ot.update(g=>g+c)},so=le([]);I==null||I.subscribe(c=>{let g=[];for(let M=0;M<c.length;M++){let{range:[ie,Se],subjects:je}=c[M];M===0&&ie!==0&&g.push({time:0,text:"",interactive:!1,completed:!0}),g.push({time:ie/1e3,text:"",interactive:!0,completed:ue.features.interactiveTimeOpenUri?!je.length||je.every(Et=>Et.isRemoved):!je.length}),Se!==1/0&&g.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}so.set(g)});let Ir=le(!1);T==null||T.subscribe(c=>{c&&be(Si)&&To()});let on=c=>{if(!w)return c;let g=be(so),M=be(jo),Se=be(Vn)/M,je=g.find(Et=>Et.interactive&&!Et.completed&&Et.time>Se);return typeof(je==null?void 0:je.time)=="number"?Math.min(c,je.time-.05):c},Wb=()=>{Kt.ui.episodes.panelOpened$.set(!1)},Kb=()=>{U.log("destroy store"),clearTimeout(Gt),clearTimeout(Jt),Te.unsubscribe(),xt.unsubscribe(),O.destroy(),K.destroy(),J==null||J.destroy(),ae==null||ae.destroy(),Pe.unsubscribe(),at==null||at.disconnect(),at=null,Ee.destroy()},qb=mi([gr,qe,Mn],([c,g,M])=>v.features.doubleForwardAvailable&&!c&&g==="video"&&M),xp=le(!1),Hv=2,Bc=null,Fv=c=>{if(!be(vr)&&c)return;let g=O.info.currentPlaybackRate$.getValue();c?g!==Hv&&(Bc=g,Fn(Hv,!1),xp.set(!0)):(Bc&&Fn(Bc,!1),xp.set(!1),Bc=null)};qe.subscribe(c=>{c!=="video"&&Fv(!1)});let Qb=()=>{Ks(!1),$i.set(!0)},Gb=()=>{rl(!1),$i.set(!1)},wp=!1,Yb=()=>{yn.set(!0),wp=O.info.playbackState$.getValue()===Fl.PLAYING,Ks(!1)},jb=()=>{yn.set(!1),!be($i)&&wp&&rl(!1),wp=!1};O.events.playing$.subscribe(()=>{be($i)&&Ks(!1)});let Kt={interfaceLanguage$:Be,isCyrillicRelatedInterface$:St,initVideo:hi,videoId:i,isClip:o,playerPhase:qe,vsid:It,state:{positionExact$:rt,positionWithScrubbing$:Cs,duration$:jo,playbackState$:Vi,playbackStateRealistic$:cn,isPlaying$:vr,isLoaderVisible:to,bufferedProgress$:_o,isLive$:Ri,canChangePlaybackSpeed$:Mn,isActiveLive$:gr,isOldestAvailableLive$:Jn,isRewindableLive$:ns,isEnded$:Pi,muted$:Ti,volume$:io,trafficSavingEnabled$:Lo,highQualityEnabled$:Mo,autoQualityLimitingAvailable$:pn,availableVideoStreams$:hr,availableAudioStreams$:Ni,videoStream$:_r,audioStream$:Rn,currentQuality$:tr,isAutoQualityEnabled$:ho,availableQualities$:vn,currentPlaybackRate$:gn,availablePlaybackRates$:hn,currentSubtitle$:Gi,availableTextTracks$:Zo,availableSubtitlesList$:yr,currentSubtitleCaptions$:fo,isAutoSubtitleCaptionVisible$:Jo,chromecastState$:Nr,chromecastDeviceName$:bs,chromecastConnected$:Vo,currentFormat$:Dr,throughputEstimation$:Zn,videoBitrate$:Or,videoSize$:fn,errorLog$:G,crashed$:ke,isAudioAvailable$:fr,isAudioDisabled:!!l,canDownload:ue.features.download&&!!d,availableSources$:bo,hasMpegSources$:Ii,isInteractive:w,showInteractiveGraph:ue.features.interactiveGraph,showSeekToInteractive:ue.features.seekToInteractive,showPlayPrevChapter:ue.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ue.features.interactiveTimeIndicator&&!!be(so).length,interactiveEpisodes$:so,isInteractiveTime$:T?ti(T):le(!1),isInteractiveExpectation$:Ir,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:k,looped$:tn,loadedMetadata$:Nt,isAutoQualityAvailable$:On,previewTrackActive:$i,previewTrackDragInProgress:yn},ui:{t:fe,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:Q.length?Q.reduce(c=>[...c,le(void 0)],[]):[],disabledControls$:Vt},modals:{hotKeyMap:{show:le(!1),data:le({title:"",closeBtnText:"",groups:[]})}},isFullscreen:Pt,isFullscreenOpenedByKeyboard:st,rotateAlpha:Ot,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:pi,isMobile:kt,mobileNotReportControlHidden$:Fi,icon3DVideoVisible:le(!1),scrubbingInProgress:Si,volumeChangingInProgress:Kr,is3DVideo:zt,currentGridType$:zs,additionalButtonsDeprecated$:qr,additionalDesktopControlPanelRightButtons$:ma,additionalSettingsMenuItems$:il,additionalContextMenuItems$:Yi,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:or,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$:xp,doubleForwardAvailable$:qb,previewTrackNotificationVisible:le(!1),previewTrackActive:$i,previewTrackDragInProgress:yn,previewTrackAvailable:xn,isPreviewTrackHorizontallyAligned:Ss},ads:{position:le(0),duration:le(0),playbackState:le("inactive"),canSkip:le(!1),secondsToWatchBeforeSkip:le(0),postrollPassed:le(!1)},webApi:{pictureInPictureApi:ye,annotationsApi:He,slotsApi:it,focusManager:re},actions:{internal:{preload:wo,firstStart:c=>Rc(c,!1),play:()=>rl(!1),pause:()=>Ks(!1),togglePlay:no,toggleMuted:xr,openSettingsMenu:Oi,closeSettingsMenu:$s,openSettingsSubMenu:rs,closeSettingsSubMenu:ys,setVolume:c=>Ur(c,!1),setMuted:c=>en(c,!1),startVolumeChanging:Tr,stopVolumeChanging:pa,setVideoStream:ft,setAudioStream:c=>Zt(c,!1),setQuality:(c,g)=>bn(c,g,!1),setTrafficSavingEnabled:(c,g)=>Oo(c,g,!1),setHighQualityEnabled:(c,g)=>Hn(c,g,!1),setPlaybackRate:Fn,incrementPlaybackRate:Je,decrementPlaybackRate:Yt,setSubtitle:c=>bi(c,!1),toggleSubtitle:()=>So(!1),togglePictureInPicture:ze,startScrubbing:ge,progressScrubbing:ht,completeScrubbing:Ho,toggleChromecast:Mc,switchToActiveLive:Ws,switchFromAdsToVideo:kc,switchFromVideoToAds:gp,skipAd:Zl,setLiveWaitingStart:Pc,setLiveWaitingRecover:hp,setLiveWaitingRecord:Ac,getDebugTextData:_p,getTraceTextData:Lc,getDebugPanelData:bp,getVideoElement:ha,seekTime:(c,g,M)=>Cr(c,g,M),clearDelayedBufferingCheckTimeout:mr,seekEpisodeStartTime:xs,seekToPercent:Us,getNextEpisode:Nc,seekToNextEpisode:Dc,getPrevEpisode:Oc,seekToPrevEpisode:$p,startLogging:Bt,stopLogging:W,startCameraManualRotation:At,stopCameraManualRotation:ni,moveCameraFocusPX:mt,holdCamera:Xt,releaseCamera:gt,getVideoEpisodes:sl,getPreviewThumbsData:yp,downloadVideo:Fr,addLanguage:Mf,setLanguage:xe,nextMovie:ui,videoRotate:gi,correctSeekTimeToInteractive:on,replayInteractive:N,setLooped:Ue,reportProblem:Ct,setAutoplayNextEnabled:li,setTimerNextVideoRunning:No,prevVideoClick:yo,nextVideoClick:Do,nextVideoAnnouncementShow:Bi,nextVideoAnnouncementClick:xo,nextVideoAnnouncementAuto:Bn,nextVideoAnnouncementCancel:Sr,checkFullscreenSupport:wt,changeDoubleForwardOn:Fv,closePreviewTrack:Gb,previewTrackOpened:Qb,previewTrackDragStarted:Yb,previewTrackDragFinished:jb},external:{firstStart:c=>Rc(c,!0),play:()=>rl(!0),pause:()=>Ks(!0),stop:()=>Vc(!0),seekTime:c=>ua(c),seekEpisodeStartTime:c=>ri(c),setPlaybackRate:c=>Co(c),setAutoQualityLimits:c=>lt(c),setMuted:c=>en(c,!0),toggleSubtitle:()=>So(!0),changeSubtitle:$n,setVolume:c=>Ur(c,!0),returnFocusToEpisodes:Wb,updateAdditionalSettingsItem:nl,addAdditionalSettingsItem:ga,removeAdditionalSettingsItem:pt,updateAdditionalContextItem:Io,addAdditionalContextItem:ji,removeAdditionalContextItem:vi,updateAdditionalButton:jl,addAdditionalButton:va,removeAdditionalButton:Xl,setLiveLowLatency:ol,hideControls:()=>ss(!1),showControls:()=>ss(!0),setQuality:c=>bn(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Oo(c,"to-video",!0),setHighQualityEnabled:c=>Hn(c,"to-video",!0),changeAudioStream:Br}},callbacks:s,setUiCallbacks:c=>{et={...c}},getAdmanWrapper:()=>K,getLogger:()=>Ge,getPlayer:()=>O,destroy:Kb};return Kt};function jn(t,e,i,o){var f;let r=(f=e[i])==null?void 0:f.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Ds(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 Jx=["disabledControls$","additionalButtons"],e2=["interactiveTimeIndicator"],Wl=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Jx.includes(r)){let l=o||e2.includes(r);a.set(jn(t,i,r,l))}}};var ju=async(t,e,i)=>{await uo(),e&&i&&(i.focus(),t.set(!1))};var t2=Ie('<path d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2Zm-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Zm-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2Z"></path>');function wm(t){Ze(t,{children:(e,i)=>{var o=t2();$(e,o)},$$slots:{default:!0}})}function Sm(t,e){B(e,!0);let[i,o]=De(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=he(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,_=q(void 0);Oe(()=>{n(_)&&Tt(()=>{v.set(n(_))})});let y=T=>{let N=sa(T),A=R_(n(_));p.set(A),u.set(N),s.set(!r())},b=()=>{f.set(!0)},w=()=>{f.set(!1)},I=m(()=>r()?"opened":"");Ut(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:b,blur:w,get ariaExpanded(){return r()},get ref(){return n(_)},set ref(T){R(_,T,!0)},children:(T,N)=>{wm(T,{})},$$slots:{default:!0}}),H(),o()}var i2=t=>{t.stopPropagation()},o2=L("<div><!> <div></div> <div></div></div>"),n2={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 ec(t,e){var K;B(e,!0),Y(t,n2);let[i,o]=De(),r=()=>x(w,"$isMobile",i),a=()=>x(A,"$areControlsVisible",i),l=()=>x(k,"$currentGridType$",i),d=()=>x(T,"$isInteractiveTime$",i),s=()=>x(b,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>x(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=q(void 0),_=he(),y=vo(),{interactiveControlsOpacity$:b}=y,w=_.ui.isMobile,I=_.ui.isFullscreen,T=_.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,A=_.ui.controlsVisible,E=(K=_.callbacks)==null?void 0:K.onInteractiveTimeIndicatorClick,k=_.ui.currentGridType$,Q=m(()=>!r()&&a()),F=m(()=>Ns(l(),"s")),z=m(()=>!d()||!!s()||n(Q)),X=q(!1);Oe(()=>{R(X,n(z),!0)});let se=()=>{R(X,!0)},Z=()=>{var ae;oe(),(ae=n(v))==null||ae.addEventListener("animationiteration",se,{once:!0})},oe=()=>{var ae;R(X,!1),(ae=n(v))==null||ae.removeEventListener("animationiteration",se)},J=ae=>{N.set(ae)},Ce=m(()=>u()&&!n(z));Oe(()=>{u()?Z():oe()});let pe=()=>{n(z)||(N.set(!0),E==null||E())};sn(()=>{N.clearTimeout(),oe()});let ee=()=>{N.set(!1)},_e=j("tooltip_interactive_interaction_time_indicator");var we=o2();let ve;we.__mousemove=[i2],we.__click=pe;var ue=C(we);Ao(ue,{get tooltipContent(){return _e},get tooltipVisible(){return n(Ce)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:J,get ref(){return p()},set ref(ae){p(ae)},children:(ae,ye)=>{qd(ae,{completed:!0})},$$slots:{default:!0}});var Qe=P(ue,2);let U;Xe(Qe,ae=>p(ae),()=>p());var O=P(Qe,2);let Ge;Xe(O,ae=>R(v,ae),()=>n(v)),S(we),D((ae,ye,He)=>{ve=ne(we,1,"interactive-episode-icon-animated s-27",null,ve,ae),U=ne(Qe,1,"ref-block s-27",null,U,ye),Ge=ne(O,1,"pulse s-27",null,Ge,He)},[()=>({mobile:r(),fullscreen:f(),invisible:n(z),"icon-small":n(F)}),()=>({hidden:n(z)}),()=>({paused:n(X)})]),dt("mouseleave",we,ee),$(t,we),H(),o()}Ye(["mousemove","click"]);function Xu(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);Ao(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Le();let f=m(()=>e.buttonComponent);var p=ce(u);Mi(p,()=>n(f),(v,_)=>{_(v,ts(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),$(d,u)},$$slots:{default:!0}}),H()}var Bs={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var s2=Ie('<path d="M32 21.68V15a2 2 90 114 0v18a2 2 90 01-4 0v-6.66l-16.3 9.32A2.48 2.48 90 0112 33.56V14.46c0-1.9 2.06-3.08 3.7-2.12z"></path>');function ca(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);transform-origin: 50%;":void 0),r=m(()=>`${an(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(r)},get testId(){return n(a)},get shadow(){return e.shadow},children:(l,d)=>{var s=s2();$(l,s)},$$slots:{default:!0}}),H()}var a2=L('<div class="icon-background-mobile s-26"><!></div>'),l2={hash:"s-26",code:".icon-background-mobile.s-26{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 Wa(t,e){B(e,!0),Y(t,l2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=he().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}`);Ut(t,{get className(){return n(u)},get testId(){var f;return`btn-${(f=e.type)!=null?f:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{var v=Le(),_=ce(v);{var y=w=>{var I=a2(),T=C(I);let N=m(()=>e.type==="prev");ca(T,{get size(){return"32"},get reversed(){return n(N)}}),S(I),$(w,I)},b=w=>{let I=m(()=>e.type==="prev");ca(w,{get size(){return"24"},get reversed(){return n(I)}})};V(_,w=>{o()?w(y):w(b,!1)})}$(f,v)},$$slots:{default:!0}}),H()}var d2=Ie('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function tc(t,e){B(e,!0);let i=m(()=>an(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(i)},testId:"replay-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=d2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as c2}from"@vkontakte/videoplayer-shared/es2018";var u2=L('<div class="icon-background-mobile s-24"></div>'),p2=L("<!> <div><!></div>",1),f2={hash:"s-24",code:".mobile.s-24{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-24{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function Kl(t,e){B(e,!0),Y(t,f2);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,c2),d=j("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Ut(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return fs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,f)=>{var p=p2(),v=ce(p);{var _=T=>{var N=u2();$(T,N)};V(v,T=>{o()&&T(_)})}var y=P(v,2);let b;var w=C(y);let I=m(()=>o()?"48":"24");tc(w,{get size(){return n(I)}}),S(y),D(T=>b=ne(y,1,"s-24",null,b,T),[()=>({mobile:o()})]),$(u,p)},$$slots:{default:!0}}),H()}var m2=Ie('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Hs(t,e){B(e,!0);let i=m(()=>an(e.size));Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(o,r)=>{var a=m2();$(o,a)},$$slots:{default:!0}}),H()}import{noop as v2}from"@vkontakte/videoplayer-shared/es2018";var g2=L('<div class="icon-background-mobile s-21"><!></div>'),h2={hash:"s-21",code:".icon-background-mobile.s-21{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function ql(t,e){B(e,!0),Y(t,h2);let[i,o]=De(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=vo(),l=h(e,"ref",15,void 0),d=h(e,"isMobile",3,!1),s=h(e,"isPlaying",3,!1),u=h(e,"disabled",3,!1),f=h(e,"className",3,""),p=h(e,"click",3,v2),_=he().ui.t,{toggle:y}=a,b=m(()=>y),w=m(()=>r()!==null),I=m(()=>n(w)?r():s()),T=m(()=>n(I)?_("tooltip_pause"):_("tooltip_play")),N=m(()=>n(I)?Hs:An),A=m(()=>`${d()?"btn-m--play":""} ${f()}`),E=m(()=>n(w)?n(b):p());Ut(t,{get className(){return n(A)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(T)},get ariaKeyShortCut(){return fs.KeyK},get ref(){return l()},set ref(k){l(k)},children:(k,Q)=>{var F=Le();let z=m(()=>n(N));var X=ce(F);{var se=oe=>{var J=g2(),Ce=C(J);Mi(Ce,()=>n(z),(pe,ee)=>{ee(pe,{get size(){return"48"}})}),S(J),$(oe,J)},Z=oe=>{var J=Le(),Ce=ce(J);Mi(Ce,()=>n(z),(pe,ee)=>{ee(pe,{get size(){return"24"}})}),$(oe,J)};V(X,oe=>{d()?oe(se):oe(Z,!1)})}$(k,F)},$$slots:{default:!0}}),H(),o()}var _2=Ie('<path d="M12.58 12.92v2.5a1 1 0 0 1-1.52.85l-5.58-3.42a1 1 0 0 1 0-1.7l5.58-3.42a1 1 0 0 1 1.52.86v2.5l5.48-3.36a1 1 0 0 1 1.52.86v6.82a1 1 0 0 1-1.52.86z"></path>');function Cm(t){Ze(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=_2();$(e,o)},$$slots:{default:!0}})}function ic(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=j("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Ut(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}}),H()}var b2=L('<span class="gutter s-25"><span><!></span></span>'),$2={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 oc(t,e){B(e,!0),Y(t,$2);let[i,o]=De(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=he(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,f=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",_="#000",y=m(()=>r()?"true":"false");Ut(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(b){a(b)},children:(b,w)=>{var I=b2(),T=C(I);let N;var A=C(T);{var E=Q=>{An(Q,{get size(){return v},fill:_})},k=Q=>{Hs(Q,{get size(){return v},fill:_})};V(A,Q=>{r()?Q(E):Q(k,!1)})}S(T),S(I),D(Q=>N=ne(T,1,"toggler s-25",null,N,Q),[()=>({enabled:r()})]),$(b,I)},$$slots:{default:!0}}),H(),o()}var y2=Ie('<path d="M16.73 4.85c-.54-.05-1.23-.05-2.23-.05H7.9a.9.9 0 1 1 0-1.8h6.64q1.41-.01 2.33.05c.64.05 1.2.16 1.73.43a4.4 4.4 0 0 1 1.92 1.92c.27.52.38 1.09.43 1.73q.06.92.05 2.33v5.08q.01 1.41-.05 2.33a5 5 0 0 1-.43 1.73 4.4 4.4 0 0 1-1.92 1.92 5 5 0 0 1-1.73.43q-.92.06-2.33.05H7.9a.9.9 0 1 1 0-1.8h6.6c1 0 1.69 0 2.23-.04.52-.05.82-.13 1.05-.24a2.6 2.6 0 0 0 1.14-1.14c.11-.23.2-.53.24-1.06s.04-1.23.04-2.22v-5c0-1 0-1.69-.04-2.23a3 3 0 0 0-.24-1.05 2.6 2.6 0 0 0-1.14-1.14c-.23-.11-.53-.2-1.05-.24"></path><path d="M7.76 11.17V8.9c0-.71.7-1.15 1.25-.78l4.6 3.1a.96.96 0 0 1 0 1.54L9 15.87c-.55.37-1.25-.07-1.25-.78v-2.26l-4.5 3.04C2.7 16.24 2 15.8 2 15.09V8.91c0-.71.7-1.15 1.25-.78z "></path>',1);function Tm(t){Ze(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=y2();ai(),$(e,o)},$$slots:{default:!0}})}function nc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=j("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Ut(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}}),H()}var x2=Ie('<path d="M15.2 5.9v1.2c0 .6 0 .9.12 1.12q.15.3.46.46c.23.12.52.12 1.12.12h1.2c.6 0 .9 0 1.12-.12q.3-.15.46-.46c.12-.23.12-.52.12-1.12V5.9c0-.6 0-.9-.12-1.12a1 1 0 0 0-.46-.46c-.23-.12-.52-.12-1.12-.12h-1.2c-.6 0-.9 0-1.12.12q-.3.15-.47.46c-.11.23-.11.53-.11 1.12m-.05 11.03v1.14c0 .6 0 .91.12 1.14q.15.31.47.47c.23.12.53.12 1.14.12h1.22c.6 0 .9 0 1.14-.12a1 1 0 0 0 .47-.47c.12-.23.12-.53.12-1.14v-1.14c0-.6 0-.9-.12-1.14a1 1 0 0 0-.47-.47c-.23-.12-.54-.12-1.14-.12h-1.22c-.6 0-.91 0-1.14.12a1 1 0 0 0-.47.47c-.12.23-.12.53-.12 1.14"></path>'),w2=Ie('<path d="M16.78 3h1.42q.47 0 .83.02.4.02.82.21.61.31.92.92.2.41.21.81.03.36.02.83v1.4q0 .47-.02.83-.02.4-.21.81a2 2 0 0 1-.92.92 2 2 0 0 1-.82.21q-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.2 2 2 0 0 1-.93-.93 2 2 0 0 1-.2-.8l-.03-.64h-2.2c-.49 0-.8 0-1.04.02a1 1 0 0 0-.35.06 1 1 0 0 0-.35.35 1 1 0 0 0-.07.35c-.02.24-.02.55-.02 1.04v5.57c0 .5 0 .8.02 1.04s.05.31.07.34q.12.23.35.35c.03.02.11.05.34.07s.56.02 1.05.02h2.2q0-.34.02-.62.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02h1.42q.47 0 .83.02.4.01.82.2.61.31.92.93.2.41.21.8.03.37.02.84v1.4q0 .47-.02.83-.02.39-.21.81a2 2 0 0 1-.92.92q-.43.2-.82.21-.36.02-.83.02h-1.42q-.47 0-.84-.02a2 2 0 0 1-.81-.21 2 2 0 0 1-.93-.92 2 2 0 0 1-.2-.81l-.03-.63h-2.24q-.68 0-1.16-.03a3 3 0 0 1-1.01-.26 2.6 2.6 0 0 1-1.14-1.14 3 3 0 0 1-.26-1q-.04-.5-.03-1.16v-1.93H2.9A.9.9 0 0 1 2 12c0-.5.4-.9.9-.9h5.23V9.18q0-.68.03-1.16.02-.51.26-1.02a2.6 2.6 0 0 1 1.14-1.13q.5-.24 1.02-.26.48-.04 1.16-.02h2.23q0-.34.02-.63.01-.4.21-.81.31-.61.93-.92.42-.2.81-.21.37-.02.84-.02m-.84 1.84.15-.02c.16-.02.37-.02.72-.02h1.35c.36 0 .57 0 .72.02l.15.02a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.13l-.15.02-.72.01h-1.35l-.72-.01-.15-.03a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71V5.82q0-.5.02-.71l.02-.15a.3.3 0 0 1 .12-.12m0 11.02.15-.03.72-.01h1.35l.72.01.15.03a.3.3 0 0 1 .12.12l.03.15.01.71v1.34l-.01.71-.02.15a.3.3 0 0 1-.13.12l-.15.02c-.15.02-.36.02-.72.02h-1.35c-.35 0-.56 0-.72-.02l-.15-.02a.3.3 0 0 1-.12-.12l-.02-.15-.02-.71v-1.34c0-.35 0-.56.02-.71l.02-.15a.3.3 0 0 1 .12-.13"></path><!>',1);function Im(t,e){let i=h(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=w2(),d=P(ce(l));{var s=u=>{var f=x2();$(u,f)};V(d,u=>{i()&&u(s)})}$(r,l)},$$slots:{default:!0}})}function rc(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=he().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Ut(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(f){i(f)},children:(f,p)=>{let v=m(()=>!!a());Im(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),H()}import{PlaybackState as J_}from"@vkontakte/videoplayer-core/es2018";function sc(t,e){B(e,!0);let[i,o]=De(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=he(),u=s.state.playbackState$,f=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}r()===J_.PAUSED&&p()}),_=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),b=m(()=>l()&&r()===J_.PLAYING);Ut(t,{get className(){return n(_)},get testId(){return n(y)},get disabled(){return n(b)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{Vd(w,{get isActive(){return l()}})},$$slots:{default:!0}}),H(),o()}import{noop as eb}from"@vkontakte/videoplayer-shared/es2018";var S2=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),C2=L('<img class="icon" aria-hidden="true"/>');function Ka(t,e){"use strict";let i=q(!1),o=()=>{R(i,!0)};var r=Le(),a=ce(r);{var l=s=>{var u=S2();$(s,u)},d=s=>{var u=C2();D(()=>Me(u,"src",e.icon)),dt("error",u,o),ka(u),$(s,u)};V(a,s=>{n(i)?s(l):s(d,!1)})}$(t,r)}function Em(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,eb),r=h(e,"ref",15),a=m(()=>o()===eb),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Ao(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Ut(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(f)},children:(p,v)=>{Ka(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),H()}var tb=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var Zu=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(jn(t,i,r,o))};import{interpolate as km}from"@vkontakte/videoplayer-shared/es2018";var ib=10,ob=40,Pm=.2,I2=.5,E2=65,k2=114,P2=4,nb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?E2:k2),r=q(!1),a=q(0),l=q(0),d=m(()=>n(o)+ib-ob-P2),s=m(()=>km(n(a),[Pm,1],[0,-n(d)])),u=m(()=>km(n(a),[Pm,1],[0,ob])),f=m(()=>km(n(a),[Pm,1],[0,n(o)+ib]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:b=>{var w;R(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),R(r,!0)},onPointerMove:b=>{if(!n(r))return;let w=Math.max(Math.min(b.clientY-n(l),0),-n(d));R(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{R(r,!1),R(a,n(a)>=I2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{R(a,0)}}};var A2=t=>t;function _s(t,{delay:e=0,duration:i=400,easing:o=A2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var L2=L('<span class="root s-2c"> </span>'),M2={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 Am(t,e){Y(t,M2);var i=L2(),o=C(i,!0);S(i),D(()=>me(o,e.time)),$(t,i)}var V2=L('<div class="tooltip-wrapper s-v"><div><!></div></div>'),R2={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){Y(t,R2);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=q(void 0),u=q(void 0);function f(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),T=I/2;return w<T?T+l():w>e.containerWidth-T?e.containerWidth-T-d():w}let p=m(()=>f(r()));var v=V2(),_=C(v);let y;var b=C(_);ei(b,()=>{var w;return(w=e.children)!=null?w:vt}),S(_),Xe(_,w=>R(u,w),()=>n(u)),S(v),Xe(v,w=>R(s,w),()=>n(s)),D(w=>{Ke(v,`transform: translate(${n(p)}px, ${a()}px);`),y=ne(_,1,"tooltip s-v",null,y,w),Ke(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),$(t,v)}var rb=t=>Math.abs(t)/90%4===1;var N2=L('<div class="preview s-u"></div>'),D2=L('<div class="time s-u"> </div>'),O2=L('<div><!> <div class="episode s-u"><!></div> <!></div>'),B2={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),Y(t,B2);let[i,o]=De(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(b,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),f=h(e,"progress",3,0),p=h(e,"duration",3,0),v=h(e,"isInteractive",3,!1),_=he(),y=_.ui.rotateAlpha,b=_.ui.playerSize,w=q(0),I=q(0),T=q(""),N=q(0),A=q(0),E=q(0),k=q(0),Q=m(()=>Uu(f(),p(),u())),F=m(()=>Hl(r())),z=m(()=>rb(r())),X=m(oe),se=m(()=>(n(z)?1:-1)*(n(w)/2-n(I)/2)),Z=m(()=>n(se)*-1);Oe(()=>{(K=>{R(w,K.width,!0),R(I,K.height,!0)})(Ce())}),Oe(()=>{(K=>{R(T,K.imgSrc,!0),R(N,K.imgWidth,!0),R(A,K.imgHeight,!0),R(E,K.imgOffsetX,!0),R(k,K.imgOffsetY,!0)})(pe(f()))});function oe(){var He;let K=s()?l.MOBILE:l.DESKTOP,{isVertical:ae}=J(),ye=30;return(He=n(Q))!=null&&He.text&&(ye+=16),(ae||n(F))&&(ye+=18,ye+=50),Math.min(Math.max(a().height-ye,0),K)}function J(){let K=e.previewThumbsData.frameWidth,ae=e.previewThumbsData.frameHeight,ye=ae>K;return{width:K,height:ae,isHorizontal:!ye,isVertical:ye}}function Ce(){let{height:K,isHorizontal:ae,isVertical:ye,width:He}=J();return ae&&(K=K/He*n(X),He=n(X)),ye&&(He=He/K*n(X),K=n(X)),{width:He,height:K}}function pe(K){let ae;e.previewThumbsData.isUV?ae=Math.floor(p()*K/e.previewThumbsData.frequency):ae=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*K)));let ye=Math.floor(ae/e.previewThumbsData.countPerImage),He=Math.floor(ae%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),it=ae%e.previewThumbsData.countPerRow,re=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&ye===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(re=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&re++);let de=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&ye===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(de=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let Re=n(w)*de,Ve=n(I)*re,et=-it*n(w),Ee=-He*n(I);return{imgSrc:e.previewThumbsData.links[ye],imgWidth:Re,imgHeight:Ve,imgOffsetX:et,imgOffsetY:Ee}}var ee=O2();let _e;var we=C(ee);{var ve=K=>{var ae=N2();D(()=>Ke(ae,`width: ${n(w)}px; height: ${n(I)}px; background-image: url(${n(T)}); background-size: ${n(N)}px ${n(A)}px; background-position: ${n(E)}px ${n(k)}px;
61
+ transform: rotate(${r()}deg) ${n(F)?`translate(${n(se)}px, ${n(Z)}px)`:""};
62
+ `)),$(K,ae)};V(we,K=>{n(T)&&K(ve)})}var ue=P(we,2),Qe=C(ue);{var U=K=>{var ae=Le(),ye=ce(ae);{var He=re=>{var de=ps();D(Re=>me(de,Re),[()=>j("tooltip_episode_unfinished")]),$(re,de)},it=re=>{var de=ps();D(()=>me(de,n(Q).text||"")),$(re,de)};V(ye,re=>{v()&&n(Q).completed===!1?re(He):re(it,!1)})}$(K,ae)};V(Qe,K=>{n(Q)&&K(U)})}S(ue);var O=P(ue,2);{var Ge=K=>{var ae=D2(),ye=C(ae,!0);S(ae),D(()=>me(ye,d())),$(K,ae)};V(O,K=>{v()||K(Ge)})}S(ee),D(K=>{_e=ne(ee,1,"timeline-preview s-u",null,_e,K),Ke(ee,`width: ${n(F)?n(I):n(w)}px;`)},[()=>({mobile:s()})]),$(t,ee),H(),o()}var H2=L('<span class="time s-f"> </span>'),F2=L("<!> <!>",1),U2={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 ke,xe,Be,$e,St;B(e,!0),Y(t,U2);let[i,o]=De(),r=()=>x(Z,"$interactiveEpisodes$",i),a=()=>x(k,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(Ce,"$isInteractiveExpectation$",i),s=()=>x(J,"$isInteractiveTime$",i),u=()=>x(we,"$previewTrackActive",i),f=()=>x(Q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),v=()=>x(z,"$isMobile",i),_=()=>x(F,"$isActiveLive$",i),y=()=>x(A,"$bufferedProgress$",i),b=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),T=he(),N=Mt(),A=T.state.bufferedProgress$,E=T.state.positionWithScrubbing$,k=T.state.duration$,Q=T.state.isLive$,F=T.state.isActiveLive$,z=T.ui.isMobile,X=N.features.episodes&&w()?T.actions.internal.getVideoEpisodes():void 0,se=T.actions.internal.getPreviewThumbsData(),Z=T.state.interactiveEpisodes$,oe=T.state.isInteractive,J=T.state.isInteractiveTime$,Ce=T.state.isInteractiveExpectation$,pe=T.actions.internal.correctSeekTimeToInteractive,ee=(ke=T.callbacks)==null?void 0:ke.onDisabledTimelineClick,_e=T.ui.controls.disabledControls$,we=T.ui.previewTrackActive,ve=(Be=(xe=T.callbacks)==null?void 0:xe.uiInfo)==null?void 0:Be.onTimelineMouseEnter,ue=(St=($e=T.callbacks)==null?void 0:$e.uiInfo)==null?void 0:St.onTimelineMouseLeave,Qe=T.ui.t,U=N.features.interactiveResponsiveUi,O=m(()=>oe?r():X),Ge=m(()=>Qo(a())),K=m(()=>Qo(l())),ae=m(()=>l()/a()),ye=m(()=>d()||s()),He=q(!1),it=q(""),re=q(0),de=q(0),Re=q(0),Ve=m(()=>({containerWidth:n(de),translateXPx:n(re),translateYPx:oe&&se?-36:-16,active:n(He)&&b()&&!n(ye)&&!U&&!u(),pointer:!N.features.timelinePreview||!se||f()})),et=Qe("aria_timeline"),Ee=m(()=>Qe("aria_timeline_value",{position:n(K),duration:n(Ge)}));function Te(fe){return!pe||!oe?fe:pe(fe*a())/a()}function Fe(fe,Ne){var qe;(qe=e.onSliderPointerDown)==null||qe.call(e,Ne),T.actions.internal.startScrubbing(Te(fe))}function kt(fe){s()||T.actions.internal.progressScrubbing(Te(fe))}function It(fe){var Ne;T.actions.internal.completeScrubbing(Te(fe)),R(He,!1),(Ne=e.onSliderPointerUp)==null||Ne.call(e)}function Pt(fe,Ne,qe){var nt;(nt=e.onSliderPointerEnter)==null||nt.call(e,fe),jt(fe,Ne,qe),R(He,!0)}function st(fe,Ne,qe,nt){var Wt;(Wt=e.onSliderMove)==null||Wt.call(e,nt,fe),jt(fe,Ne,qe),R(He,!0)}function wt(){var fe;R(He,!1),(fe=e.onSliderLeave)==null||fe.call(e)}function jt(fe,Ne,qe){R(Re,Te(fe),!0),R(re,Ne,!0),qe&&R(de,qe,!0),R(it,Ot(fe),!0)}function Ot(fe){let Ne=Qo((f()?1-fe:fe)*a());return f()?`-${Ne}`:Ne}let Nt=m(()=>p().has("TIMELINE"));var zt=F2(),G=ce(zt);Lm(G,ts(()=>n(Ve),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(fe,Ne)=>{var qe=Le(),nt=ce(qe);{var Wt=pi=>{Mm(pi,{get time(){return n(it)},get isMobile(){return v()},get videoEpisodes(){return n(O)},get previewThumbsData(){return se},get progress(){return n(Re)},get duration(){return a()},get isInteractive(){return oe}})},Vt=pi=>{var di=H2(),Ci=C(di,!0);S(di),D(()=>me(Ci,n(it))),$(pi,di)};V(nt,pi=>{N.features.timelinePreview&&se&&!f()?pi(Wt):pi(Vt,!1)})}$(fe,qe)},$$slots:{default:!0}}));var Pe=P(G,2);Ua(Pe,{className:"timeline-slider",get isActiveLive(){return _()},get isMobile(){return v()},get ariaLabel(){return et},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(Ee)},get loadedProgress(){return y()},get filledProgress(){return n(ae)},get handleProgress(){return n(ae)},get videoEpisodes(){return n(O)},onPointerDown:Fe,onHandleMove:kt,onPointerMove:st,onPointerUp:It,onPointerEnter:Pt,onPointerLeave:wt,get onMouseEnter(){return ve},get onMouseLeave(){return ue},get onDisabledClick(){return ee},get isInteractive(){return oe},get disabled(){return n(Nt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:It,get ref(){return I()},set ref(fe){I(fe)}}),$(t,zt),H(),o()}var z2={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 ac(t,e){B(e,!0),Y(t,z2);let[i,o]=De(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=he(),s=d.ui.isMobile,u=d.ui.t,f=m(()=>Qo(l())),p=m(()=>Qo(a())),v=m(()=>a()/l()),_=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Ua(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n(_)},get filledProgress(){return n(v)},hideHandel:!0,get squareBorders(){return r()}}),H(),o()}var W2=L("<div><!></div>"),K2=L("<div></div>"),q2={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 qa(t,e){B(e,!0),Y(t,q2);let[i,o]=De(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(A,"$disabled",i),d=()=>x(T,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=h(e,"isAds",3,!1),f=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),_=h(e,"ref",15,void 0),y=he(),b=Mt(),w=y.state.isLive$,I=y.ads.duration,T=y.ads.position,N=y.ui.isMobile,A=le(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var k=Le(),Q=ce(k);{var F=X=>{var se=W2();let Z;var oe=C(se);{var J=pe=>{ac(pe,{get position(){return d()},get duration(){return s()}})},Ce=pe=>{Vm(pe,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return _()},set ref(ee){_(ee)}})};V(oe,pe=>{u()?pe(J):pe(Ce,!1)})}S(se),Ms(se,()=>Ll(f()&&b.features.usePerformanceFix,A,b.disableInvisibleComponentsTimeout)),D(pe=>Z=ne(se,1,"timeline s-e",null,Z,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),$(X,se)},z=X=>{var se=K2();let Z;D(oe=>Z=ne(se,1,"timeline-stub s-e",null,Z,oe),[()=>({mobile:a()})]),$(X,se)};V(Q,X=>{n(E)?X(F):X(z,!1)})}$(t,k),H(),o()}import{getRangeAroundIndex as Q2}from"@vkontakte/videoplayer-shared/es2018";var G2=(t,e,i,o,r,a,l)=>{R(e,!0),R(i,t.clientX,!0),R(o,n(r),!0),a(l())},Y2=L("<div></div>"),j2=L('<div><div class="track s-2b"></div></div>'),X2={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 Nm(t,e){B(e,!0),Y(t,X2);let[i,o]=De(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(b,"$position$",i),l=()=>x(y,"$duration$",i),d=he(),{countPerImage:s=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:_=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:b}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:T}=d.actions.internal,N=d.ui.rotateAlpha,A=q(void 0),E=q(!1),k=q(0),Q=q(0),F=q(0),z=q(0),X=m(()=>v<=_),se=m(()=>Hl(r())),Z=m(()=>n(X)?!n(se):n(se)),oe=114,J=65,Ce=3,pe=m(()=>n(Z)?oe:J),ee=m(()=>n(X)?oe:J),_e=m(()=>n(X)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),we=m(()=>f*n(pe)),ve=q(0);Oe(()=>{R(z,Math.ceil(-n(F)/n(pe))-1),R(F,-n(we)*a()/l())});let ue=()=>{T(Qe(),!0)},Qe=()=>l()*-n(F)/n(we)/l(),U=!1,O=Ee=>{if(!n(E))return!1;let Te=Ee.clientX-n(k);R(F,n(Q)+Te),R(F,Math.max(Math.min(n(F),0),-n(we)),!0),Math.abs(Te)>1&&(U=!0),I(Qe())},Ge=Ee=>{n(E)&&(R(E,!1),!U&&Ee&&R(F,-(Ee.offsetX-n(ve)/2)),U=!1,ue())},K=()=>{n(E)&&Ge()},ae=m(()=>s/u),ye=(Ee,Te)=>{if(Ee!==p.length-1)return u;let Fe=0,kt=Te*u;for(let It=1;It<=u;It++)Ee*s+Fe+kt<f&&Fe++;return Fe},He=m(()=>Math.floor(n(z)/s)),it=m(()=>Q2(3,n(He),p.length-1)),re=(Ee,Te,Fe)=>{let kt=s*n(pe);return Ee*kt+Te*n(pe)*u+n(ve)/2-Ce/2+Fe*n(pe)},de=m(()=>[`--row-numbers: ${n(ae)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ee)}px`,`--frame-height: ${n(_e)}`].join(";"));var Re=j2();let Ve;var et=C(Re);et.__pointerdown=[G2,E,k,Q,F,w,Qe],et.__pointermove=O,et.__pointerup=Ge,_i(et,20,()=>n(it),Ee=>Ee,(Ee,Te)=>{var Fe=Le(),kt=ce(Fe);_i(kt,16,()=>Array.from({length:n(ae)},(It,Pt)=>Pt),It=>It,(It,Pt)=>{var st=Le(),wt=ce(st);_i(wt,16,()=>Array.from({length:ye(Te,Pt)},(jt,Ot)=>Ot),jt=>jt,(jt,Ot)=>{var Nt=Y2();D((zt,G)=>{Ke(Nt,zt),ne(Nt,1,G,"s-2b")},[()=>`--row-index: ${Pt}; --column-index: ${Ot}; left: ${re(Te,Pt,Ot)}px; background-image: url(${p[Te]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),$(jt,Nt)}),$(It,st)}),$(Ee,Fe)}),S(et),S(Re),Xe(Re,Ee=>R(A,Ee),()=>n(A)),D(Ee=>{Ve=ne(Re,1,"root s-2b",null,Ve,Ee),Ke(Re,n(de)),Ke(et,`transform: translateX(${n(F)}px); width: ${n(we)}px;`)},[()=>({"is-vertical-video":!n(X),"vertically-rotated":n(se)})]),dt("mouseleave",et,K),kn(Re,"clientWidth",Ee=>R(ve,Ee)),$(t,Re),H(),o()}Ye(["pointerdown","pointermove","pointerup"]);var Z2=L('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),J2={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 Dm(t,e){B(e,!1),Y(t,J2);let i=340,{ui:{t:o}}=he();mo();var r=Z2(),a=C(r),l=C(a,!0);S(a),S(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],Sn),es(3,r,()=>_s,()=>({duration:i})),$(t,r),H()}import{getRangeAroundIndex as ew}from"@vkontakte/videoplayer-shared/es2018";var tw=L('<div class="preview-track-close tooltip s-29"><!></div>'),iw=L('<div class="preview-track-control s-29"><!> <div class="preview-track-close s-29"><!></div> <!></div>'),ow=L('<div class="wrapper-preview-track s-29"><!></div>'),nw=L('<div class="enriched-timeline s-29"><!> <!> <!></div>'),rw={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 Om(t,e){B(e,!0),Y(t,rw);let[i,o]=De(),r=()=>x(b,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),s=()=>x(_,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),f=he(),p=200,{positionWithScrubbing$:v,isRewindableLive$:_,duration$:y}=f.state,{playerSize:b,previewTrackActive:w}=f.ui,{countPerImage:I=0,links:T=[],frequency:N=0}=f.actions.internal.getPreviewThumbsData()||{},A=m(()=>r().width>100),E=q(!u_()),k=()=>{n(E)&&(c_(),R(E,!1))},Q=pe=>{let ee=Math.floor(a()*pe/N),_e=Math.floor(ee/I),we=ew(3,_e,T.length-1);for(let ve of we){let ue=new Image;ue.src=T[ve]}},F=(pe,ee)=>{Q(ee),!l()&&e.onTimelineMove(pe)};var z=nw(),X=C(z);{var se=pe=>{var ee=iw(),_e=C(ee);let we=m(()=>Qo(d()));Am(_e,{get time(){return n(we)}});var ve=P(_e,2),ue=C(ve);Rs(ue,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(ve);var Qe=P(ve,2);{var U=O=>{var Ge=tw(),K=C(Ge);Dm(K,{}),S(Ge),$(O,Ge)};V(Qe,O=>{n(E)&&O(U)})}S(ee),dt("mouseleave",ve,k),es(3,ee,()=>_s,()=>({duration:p})),$(pe,ee)};V(X,pe=>{l()&&pe(se)})}var Z=P(X,2);let oe=m(()=>!n(A));qa(Z,{get isHidden(){return n(oe)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:F,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:Q,get ref(){return u()},set ref(pe){u(pe)}});var J=P(Z,2);{var Ce=pe=>{var ee=ow(),_e=C(ee);Nm(_e,{}),S(ee),D(()=>Ke(ee,`height: ${e.animatedPreviewTrackHeight}px;`)),$(pe,ee)};V(J,pe=>{e.previewTrackAvailable&&pe(Ce)})}S(z),D(()=>Ke(z,`transform: translateY(${e.animatedOffsetY}px);`)),$(t,z),H(),o()}var aw=L('<div><!> <div class="controls s-1e" data-testid="player_controls"><div class="controls-left s-1e"><!> <!> <!></div> <div class="controls-right s-1e"></div></div></div> <!>',1),lw={hash:"s-1e",code:'.wrapper-bottom.s-1e{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-1e:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1e>:where(.s-1e){pointer-events:auto}.controls.s-1e{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-1e,.controls-right.s-1e{align-content:center;display:flex}.controls-left.s-1e{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1e >:not(:first-child),.controls-right.s-1e >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1e{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1e{transition:none}'};function Hm(t,e){var nl,ga;B(e,!0),Y(t,lw);let[i,o]=De(),r=()=>x(Go,"$disabledControls$",i),a=()=>x(rt,"$adPlaybackState",i),l=()=>x(Vt,"$playbackState$",i),d=()=>x(po,"$currentSubtitle$",i),s=()=>x(Ci,"$isEnded$",i),u=()=>x(cn,"$currentGridType$",i),f=()=>x(to,"$isLive$",i),p=()=>x(We,"$chromecastState$",i),v=()=>x($t,"$isPictureInPictureActive",i),_=()=>x(ui,"$pictureInPictureType$",i),y=()=>x(fi,"$availableSubtitlesList$",i),b=()=>x(Bt,"$contextMenuOpenedByKeyboard$",i),w=()=>x(xt,"$showContextMenuBtn$",i),I=()=>x(hi,"$isRewindableLive$",i),T=()=>x(ci,"$isActiveLive$",i),N=()=>x(Dr,"$graphIsOpened$",i),A=()=>x(Yo,"$contextMenuVisible$",i),E=()=>x(Vi,"$isFullscreen",i),k=()=>x(Pi,"$autoplayNextEnabled",i),Q=()=>x(n(fo),"$prevButton",i),F=()=>x(n(Jo),"$replayButton",i),z=()=>x(n(_o),"$playButton",i),X=()=>x(n(bo),"$nextButton",i),se=()=>x(n(Ii),"$playPrevChapterButton",i),Z=()=>x(n($o),"$seekToInteractiveButton",i),oe=()=>x(n(Fr),"$interactiveGraphButton",i),J=()=>x(n(xr),"$liveButton",i),Ce=()=>x(n($s),"$time",i),pe=()=>x(n(Oi),"$episodes",i),ee=()=>x(n(ys),"$vkLogo",i),_e=()=>x(n(rs),"$volume",i),we=()=>x(n(wr),"$subtitles",i),ve=()=>x(n(Ro),"$settings",i),ue=()=>x(n(Ur),"$context",i),Qe=()=>x(n(en),"$fullscreen",i),U=()=>x(n(tn),"$chromecast",i),O=()=>x(un,"$additionalDesktopControlPanelRightButtons$",i),Ge=()=>x(ki,"$playerSize",i),K=()=>x(Lo,"$isInteractiveTime$",i),ae=()=>x(ri,"$previewTrackActive",i),ye=()=>x(Qi,"$settingsMenuVisible",i),He=()=>x(Bi,"$settingButtonRef$",i),it=()=>x(W,"$startedByKeyboard$",i),re=()=>x(pi,"$isAudioAvailable$",i),de=()=>x(zt,"$fakeIsPlaying$",i),Re=()=>x(bs,"$seekToInteractiveDisabledTooltip$",i),Ve=()=>x(yn,"$isPreviewTrackHorizontallyAligned$",i),et=()=>x($i,"$previewTrackAvailable",i),Ee=()=>x(Co,"$previewTrackDragInProgress",i),Te=()=>x(gt,"$adPosition",i),Fe=()=>x(Wt,"$position$",i),kt=()=>x(Xt,"$adDuration",i),It=()=>x(nt,"$duration$",i),Pt=h(e,"playerControlsWrapperRef",15,void 0),st=h(e,"playerControlsRef",15,void 0),wt=h(e,"isAds",3,!1),jt=h(e,"logoTargetUrl",3,""),Ot=h(e,"isOneVideoPlaylist",3,!1),Nt=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:zt}=vo(),G=he(),Pe=vo(),ke=Mt(),xe=G.actions.internal.toggleMuted,Be=G.actions.internal.togglePlay,$e=G.actions.internal.pause,St=G.actions.internal.toggleSubtitle,fe=G.actions.internal.checkFullscreenSupport,Ne=(nl=G.callbacks)==null?void 0:nl.onAudioDoesNotExistHint,qe=(ga=G.callbacks)==null?void 0:ga.onAudioDisabledHint,nt=G.state.duration$,Wt=G.state.positionWithScrubbing$,Vt=G.state.playbackState$,pi=G.state.isAudioAvailable$,di=G.state.isAudioDisabled,Ci=G.state.isEnded$,to=G.state.isLive$,ci=G.state.isActiveLive$,hi=G.state.isRewindableLive$,{isActive$:$t,type$:ui}=Pe.pictureInPicture$,Qi=G.ui.settingsMenu.visible$,ct=G.ui.settingsMenu.openedByBtnKeyboard$,Dt=G.ui.controls,at=G.actions.internal.getVideoEpisodes(),We=G.state.chromecastState$,fi=G.state.availableSubtitlesList$,po=G.state.currentSubtitle$,Go=Dt.disabledControls$,Yo=G.ui.contextMenu.visible$,xt=G.ui.contextMenu.showContextMenuBtn$,Bt=G.ui.contextMenu.openedByBtnKeyboard$,W=G.ui.startedByKeyboard$,At=G.ui.controlBlocks,ni=G.ui.previewTrackNotificationVisible,mt=G.ui.t,Xt=G.ads.duration,gt=G.ads.position,rt=G.ads.playbackState,Vi=G.ui.isFullscreen,ki=G.ui.playerSize,cn=G.ui.currentGridType$,un=G.ui.additionalDesktopControlPanelRightButtons$,Pi=G.ui.autoplayNextEnabled$,Ri=G.actions.internal.getVideoElement,Mn=G.actions.internal.replayInteractive,go=G.actions.internal.prevVideoClick,io=G.actions.internal.nextVideoClick,Ti=G.state.isInteractive,Lo=G.state.isInteractiveTime$,Mo=G.state.showInteractiveGraph,pn=G.state.showSeekToInteractive,Vr=G.state.showPlayPrevChapter,Rr=G.state.showInteractiveTimeIndicator,Nr=G.state.playPrevChapterDisabledTooltip,bs=Pe.seekToInteractiveDisabledTooltip$,Dr=Pe.graphIsOpened$,Zn=ke.features.interactiveResponsiveUi,Or=m(()=>r().has("EPISODE_BUTTON")),fn=m(()=>r().has("GRAPH_BUTTON")),mn=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),fr=m(()=>r().has("PLAY_BUTTON")),mr=m(()=>r().has("REPLAY_BUTTON")),jo=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),vr=()=>G.actions.internal.toggleChromecast(),gr=m(()=>wt()?a()==="playing":l()===Bm.PLAYING),Jn=m(()=>d().value!=="off"),Vn=m(()=>s()&&!wt()||Ti),ns=m(()=>Zn?n(Vn)&&Ji(u(),"m"):n(Vn)),Vo=m(()=>!s()||Ti||wt()),hr=m(()=>Ji(u(),"m")),Ni=m(()=>e.showNextPrevButtons&&Ji(u(),"m")&&!wt()&&e.nextButtonActive),_r=m(()=>e.showNextPrevButtons&&Ji(u(),"m")&&!wt()&&e.prevButtonActive),Rn=m(()=>!wt()&&!!f()),ft=m(()=>p()!==sb.NOT_AVAILABLE&&!(v()&&_()===1)&&Ji(u(),"m")&&!Ti),Zt=m(()=>e.showAutoplayNext&&!Ot()&&Ji(u(),"s")),br=m(()=>y().length>0&&Ji(u(),"m")),Br=m(()=>b()||w()),Hr=m(()=>Ji(u(),"s")&&!wt()),Nn=m(()=>!e.logoHidden&&!wt()),er=m(()=>ke.features.fullscreen&&fe()&&(e.logoHidden||Ji(u(),Zn?"xs":"s"))&&!(v()&&_()===1)&&(Ti?Nt():!0)),ho=m(()=>(!f()||wt())&&!(ke.features.interactiveHideTime&&Ti)),Dn=m(()=>Mo&&Ji(u(),"m")),tr=m(()=>Zn?pn&&Ji(u(),"s"):pn),On=m(()=>Zn?Vr&&Ji(u(),"s"):Vr),vn=m(()=>!wt()&&!f()&&!!(at!=null&&at.length)&&n(hr)&&!n(Or)),gn=m(()=>!I()||!!T()),hn=m(()=>N()?mt("tooltip_interactive_graph_on"):mt("tooltip_interactive_graph_off")),Xo=m(()=>A()?mt("tooltip_context_menu_close"):mt("tooltip_context_menu_open")),Di=(pt,ot)=>pt?ot&&ot===Bm.PAUSED?mt("tooltip_play"):"":mt("tooltip_live"),Gi=m(()=>Di(n(gn),l())),Zo=m(()=>ke.logoType==="vk_video"?mt("tooltip_vk_video_logo"):mt("tooltip_vk_logo")),ir=m(()=>n(Jn)?mt("tooltip_subtitles_on"):mt("tooltip_subtitles_off")),$r=m(()=>E()?mt("tooltip_fullscreen_on"):mt("tooltip_fullscreen_off")),_n=m(()=>p()===sb.CONNECTED?mt("tooltip_chromecast_on"):mt("tooltip_chromecast_off")),yr=m(()=>k()?mt("tooltip_autoplay_on"):mt("tooltip_autoplay_off")),ut=q(0),yt=si({}),oo=si({}),fo=m(()=>Dt.prevButton),Jo=m(()=>Dt.replayButton),_o=m(()=>Dt.playButton),bo=m(()=>Dt.nextButton),Ii=m(()=>Dt.playPrevChapterButton),$o=m(()=>Dt.seekToInteractiveButton),Fr=m(()=>Dt.interactiveGraphButton),xr=m(()=>Dt.liveButton),$s=m(()=>Dt.time),Oi=m(()=>Dt.episodes),ys=m(()=>Dt.vkLogo),rs=m(()=>Dt.volume),wr=m(()=>Dt.subtitles),Ro=m(()=>Dt.settings),Ur=m(()=>Dt.context),en=m(()=>Dt.fullscreen),tn=m(()=>Dt.chromecast),Ue=m(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:F()?F().right-F().left:0,playButton:z()?z().right-z().left:0,nextButton:X()?X().right-X().left:0,playPrevChapterButton:se()?se().right-se().left:0,seekToInteractiveButton:Z()?Z().right-Z().left:0,interactiveGraphButton:oe()?oe().right-oe().left:0,liveButton:J()?J().right-J().left:0,time:Ce()?Ce().right-Ce().left:0,episodes:pe()?pe().right-pe().left:0,vkLogo:ee()?ee().right-ee().left:0,volume:_e()?_e().right-_e().left:0,subtitles:we()?we().right-we().left:0,settings:ve()?ve().right-ve().left:0,context:ue()?ue().right-ue().left:0,fullscreen:Qe()?Qe().right-Qe().left:0,chromecast:U()?U().right-U().left:0,additionalButtons:O().length?O().reduce(pt=>[...pt,40],[]):[]})),Ct=q(0);Oe(()=>{(!n(Ct)||n(Ct)<n(Ue).time)&&Tt(()=>R(Ct,n(Ue).time,!0))});let li=q(!1);Oe(()=>{let pt=0;n(vn)&&(Ji(u(),"xl")?pt=n(Ue).time:pt=60);let ot=n(Ue).prevButton+n(Ue).playButton+n(Ue).nextButton+n(Ue).seekToInteractiveButton+n(Ue).interactiveGraphButton+n(Ue).liveButton+n(Ct)+pt;R(li,n(ho)&&n(ut)>=ot,!0)});let No=m(()=>n(li)&&Ji(u(),"m")),yo=ab(Wl,260),Do=ab(Zu,260);Oe(()=>{Ge(),K(),ae(),yo(Ri(),Dt,yt,e.showControls),Do(Ri(),At,oo,e.showControls)}),Oe(()=>{oo.bottom=Pt()});let Bi=le();Oe(()=>{ye(),He()&&Tt(()=>Vl(He(),ye(),ct))});let xo;Oe(()=>{it(),Tt(()=>ju(W,it(),xo))});function Bn(){aa({isAudioDisabled:di,isAudioAvailable:re(),isAds:wt(),audioIsNotExistHintCallback:Ne,audioDisabledHintCallback:qe})&&xe()}let Sr=Ti?Mn:Be,wo=m(()=>de()!==null),no=m(()=>n(wo)?de():n(gr)),bn=m(()=>n(no)?mt("tooltip_pause"):mt("tooltip_play")),Oo=mt("tooltip_episodes"),Hn=m(()=>{var pt,ot,Yi,Io;return n(_r)?{id:"prevButton",type:"desktop-control-panel-left",weight:Bs.prevButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:go.bind(null,!0)},tooltipEnabled:!((ot=(pt=G.callbacks)==null?void 0:pt.uiInfo)!=null&&ot.onPrevButtonMouseEnter)&&!((Io=(Yi=G.callbacks)==null?void 0:Yi.uiInfo)!=null&&Io.onPrevButtonMouseLeave),mouseEnter:()=>{var ji,vi,Fi;(Fi=(vi=(ji=G.callbacks)==null?void 0:ji.uiInfo)==null?void 0:vi.onPrevButtonMouseEnter)==null||Fi.call(vi,jn(Ri(),yt,"prevButton",e.showControls))},mouseLeave:()=>{var ji,vi,Fi;(Fi=(vi=(ji=G.callbacks)==null?void 0:ji.uiInfo)==null?void 0:vi.onPrevButtonMouseLeave)==null||Fi.call(vi,jn(Ri(),yt,"prevButton",e.showControls))},tooltipText:mt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),zr=m(()=>n(ns)?{id:"replayButton",type:"desktop-control-panel-left",weight:Bs.replayButton,buttonComponent:Kl,buttonComponentProps:{disabled:n(mr),click:Sr},tooltipText:mt("tooltip_restart"),disabled:n(mr)}:void 0),Wr=m(()=>n(Vo)?{id:"playButton",type:"desktop-control-panel-left",weight:Bs.playButton,buttonComponent:ql,buttonComponentProps:{disabled:n(fr),isPlaying:n(gr),click:Be},tooltipText:n(bn),disabled:n(fr)}:void 0),Fn=m(()=>{var pt,ot,Yi,Io;return n(Ni)?{id:"nextButton",type:"desktop-control-panel-left",weight:Bs.nextButton,buttonComponent:Wa,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:io.bind(null,!0)},tooltipEnabled:!((ot=(pt=G.callbacks)==null?void 0:pt.uiInfo)!=null&&ot.onNextButtonMouseEnter)&&!((Io=(Yi=G.callbacks)==null?void 0:Yi.uiInfo)!=null&&Io.onNextButtonMouseLeave),mouseEnter:()=>{var ji,vi,Fi;(Fi=(vi=(ji=G.callbacks)==null?void 0:ji.uiInfo)==null?void 0:vi.onNextButtonMouseEnter)==null||Fi.call(vi,jn(Ri(),yt,"nextButton",e.showControls))},mouseLeave:()=>{var ji,vi,Fi;(Fi=(vi=(ji=G.callbacks)==null?void 0:ji.uiInfo)==null?void 0:vi.onNextButtonMouseLeave)==null||Fi.call(vi,jn(Ri(),yt,"nextButton",e.showControls))},tooltipText:mt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),Je=m(()=>Ti&&n(On)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Bs.playPrevChapterButton,buttonComponent:ic,buttonComponentProps:{disabled:n(jo),click:e.playPrevChapter},tooltipText:mt("tooltip_interactive_go_back"),disabledTooltipContent:mt(Nr),disabled:n(jo)}:void 0),Yt=m(()=>Ti&&n(tr)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Bs.seekToInteractiveButton,buttonComponent:nc,buttonComponentProps:{disabled:n(mn),click:e.seekToInteractive},tooltipText:mt("tooltip_interactive_seek"),disabled:n(mn),disabledTooltipContent:mt(Re())}:void 0),bi=m(()=>Ti&&n(Dn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Bs.interactiveGraphButton,buttonComponent:rc,buttonComponentProps:{disabled:n(fn),click:Dr.toggle,graphIsOpened:N()},tooltipText:n(hn)}:void 0),So=m(()=>n(Rn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Bs.liveButton,buttonComponent:sc,buttonComponentProps:{isLiveActive:n(gn),ariaLabel:n(Gi)},tooltipText:n(Gi),disabled:n(gn)&&l()===Bm.PLAYING}:void 0),$n=m(()=>[n(Hn),n(zr),n(Wr),n(Fn),n(Je),n(Yt),n(bi),n(So)].filter(pt=>!!pt).sort(Oa)),Un=m(()=>n(Nn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:Gd,buttonComponentProps:{targetUrl:jt(),logoClickable:e.logoClickable,click:$e},tooltipText:n(Zo),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Bo=m(()=>n(Zt)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:oc,tooltipText:n(yr)}:void 0),or=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:um,buttonComponentProps:{click:Bn,isAds:wt()}})),ss=m(()=>n(br)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:sm,buttonComponentProps:{isSubtitlesEnabled:n(Jn),click:St},tooltipText:n(ir)}:void 0),Cr=m(()=>n(Hr)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Ol,buttonComponentProps:{ref$:Bi},tooltipText:ye()?void 0:mt("tooltip_settings_off")}:void 0),xs=m(()=>ke.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:Sm,buttonComponentProps:{ariaLabel:mt("aria_label_context_menu")},className:n(Br)?"":"out-of-view",tooltipText:n(Xo)}:void 0),Us=m(()=>n(er)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:Qd,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n($r)}:void 0),ua=m(()=>n(ft)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:jd,buttonComponentProps:{state:p(),click:vr},tooltipText:n(_n)}:void 0),lt=m(()=>[n(Un),n(Bo),n(or),n(ss),n(Cr),n(xs),n(Us),n(ua),...O()].filter(pt=>!!pt).sort(Oa)),ri=G.ui.previewTrackActive,Co=G.ui.previewTrackDragInProgress,$i=G.ui.previewTrackAvailable,yn=G.ui.isPreviewTrackHorizontallyAligned,xn=m(()=>nb({onPreviewTrackOpened:G.actions.internal.previewTrackOpened,getTimelineRef:()=>yt.timeline,isHorizontal:Ve()})),ws=m(()=>n(xn).progressBarY),Ss=m(()=>n(xn).controlsY),Hi=m(()=>n(xn).onPointerDown),Si=m(()=>n(xn).onPointerMove),ge=m(()=>n(xn).onPointerUp),ht=m(()=>n(xn).calculatedHeight),Jt=m(()=>n(xn).closePreviewTrack);Oe(()=>{ae()?ni.set(!1):n(Jt)()});let Gt;Lt(()=>()=>Gt&&clearTimeout(Gt));let To=pt=>{ae()||!et()||(n(Hi)(pt),Gt=setTimeout(()=>{G.actions.internal.previewTrackDragStarted()},200))},ro=()=>{ae()||n(ge)(),Gt&&clearTimeout(Gt),Ee()&&G.actions.internal.previewTrackDragFinished()},Ho=pt=>{n(Si)(pt),!ae()&&et()&&!ae()&&ni.set(!0)},Cs=()=>{ni.set(!1)};var Kr=aw(),Tr=ce(Kr);let pa;var zs=C(Tr);{var fa=pt=>{let ot=m(()=>n(ws)()),Yi=m(()=>n(ht)());Om(pt,{get animatedOffsetY(){return n(ot)},get animatedPreviewTrackHeight(){return n(Yi)},get canRewindLive(){return e.canRewindLive},get isAds(){return wt()},onTimelineMove:Ho,onTimelinePointerDown:To,onTimelinePointerUp:ro,onTimelinePointerLeave:Cs,get previewTrackAvailable(){return et()},get timelineRef(){return yt.timeline},set timelineRef(Io){yt.timeline=Io}})};V(zs,pt=>{e.showControls&&pt(fa)})}var qr=P(zs,2),wn=C(qr),tl=C(wn);_i(tl,17,()=>n($n),pt=>pt.id,(pt,ot)=>{Xu(pt,{get buttonComponent(){return n(ot).buttonComponent},get buttonComponentProps(){return n(ot).buttonComponentProps},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(ot).disabled},get className(){return n(ot).className},get tooltipEnabled(){return n(ot).tooltipEnabled},get mouseEnter(){return n(ot).mouseEnter},get mouseLeave(){return n(ot).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return yt[n(ot).id]},set ref(Yi){yt[n(ot).id]=Yi}})});var ma=P(tl,2);{var Qr=pt=>{let ot=m(()=>!e.showControls),Yi=m(()=>wt()?Te():Fe()),Io=m(()=>wt()?kt():It());Kd(pt,{get isHidden(){return n(ot)},isMobile:!1,get showDuration(){return n(No)},get position(){return n(Yi)},get duration(){return n(Io)},get ref(){return yt.time},set ref(ji){yt.time=ji}})};V(ma,pt=>{n(ho)&&pt(Qr)})}var il=P(ma,2);let jl=m(()=>!n(vn));Ao(il,{className:"w-max",get disabled(){return n(jl)},get tooltipContent(){return Oo},get tooltipVisible(){return e.showControls},get ref(){return yt.episodes},set ref(pt){yt.episodes=pt},children:(pt,ot)=>{var Yi=Le(),Io=ce(Yi);{var ji=vi=>{Xd(vi,{get position(){return Fe()},get duration(){return It()},get timeCodes(){return at}})};V(Io,vi=>{n(vn)&&vi(ji)})}$(pt,Yi)},$$slots:{default:!0}}),S(wn);var va=P(wn,2);_i(va,21,()=>n(lt),pt=>pt.id,(pt,ot)=>{var Yi=Le(),Io=ce(Yi);{var ji=Fi=>{Xu(Fi,{get buttonComponent(){return n(ot).buttonComponent},get buttonComponentProps(){return n(ot).buttonComponentProps},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(ot).disabled},get className(){return n(ot).className},get tooltipVisible(){return e.showControls},get ref(){return yt[n(ot).id]},set ref(Ws){yt[n(ot).id]=Ws}})},vi=Fi=>{let Ws=m(()=>!!n(ot).disabled);Em(Fi,{get id(){return n(ot).id},get testId(){return n(ot).testId},get icon(){return n(ot).icon},get ariaLabel(){return n(ot).ariaLabel},get tooltipText(){return n(ot).tooltipText},get disabledTooltipContent(){return n(ot).disabledTooltipContent},get disabled(){return n(Ws)},get onClick(){return n(ot).onClick},get disableMouseupTooltipShow(){return n(ot).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return yt[n(ot).id]},set ref(Zl){yt[n(ot).id]=Zl}})};V(Io,Fi=>{tb(n(ot))?Fi(ji):Fi(vi,!1)})}$(pt,Yi)}),S(va),S(qr),Xe(qr,pt=>st(pt),()=>st()),S(Tr),Xe(Tr,pt=>Pt(pt),()=>Pt());var Xl=P(Tr,2);{var ol=pt=>{ec(pt,{get ref(){return yt.interactiveTimeIndicator},set ref(ot){yt.interactiveTimeIndicator=ot}})};V(Xl,pt=>{Rr&&pt(ol)})}D((pt,ot)=>{pa=ne(Tr,1,"wrapper-bottom s-1e",null,pa,pt),Ke(qr,ot),qr.inert=ae()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||Ee()}),()=>`transform: translateY(${n(Ss)()}px);`]),kn(wn,"clientWidth",pt=>R(ut,pt)),$(t,Kr),H(),o()}import{ChromecastState as db,PlaybackState as cb}from"@vkontakte/videoplayer-core/es2018";import{noop as lb}from"@vkontakte/videoplayer-shared/es2018";var dw=L('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),cw=L('<img class="icon s-1z" aria-hidden="true"/>'),uw={hash:"s-1z",code:".icon.s-1z{height:24px!important;width:24px!important}.inner.s-1z{background-color:var(--white);height:16px;width:16px}"};function Fm(t,e){Y(t,uw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,lb),r=m(()=>o()===lb),a=m(()=>n(r)||i()),l=q(!1),d=()=>{R(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Ut(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Le(),v=ce(p);{var _=b=>{var w=dw();$(b,w)},y=b=>{var w=cw();D(()=>Me(w,"src",e.iconUrl)),dt("error",w,d),ka(w),$(b,w)};V(v,b=>{n(l)?b(_):b(y,!1)})}$(u,p)},$$slots:{default:!0}})}var pw=Ie('<path d="M8.7 8.1 5.3 4.72A1 1 0 0 1 6.72 3.3L20.7 17.29a1 1 0 0 1-1.41 1.41L16 15.41V20a1 1 0 0 1-1 1c-.64 0-1.26-.25-1.72-.7L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.77zm2.88-2.76 1.7-1.65A2.5 2.5 0 0 1 15 3a1 1 0 0 1 1 1v5.76z"></path>');function Um(t){Ze(t,{testId:"muted-icon",children:(e,i)=>{var o=pw();$(e,o)},$$slots:{default:!0}})}import{noop as fw}from"@vkontakte/videoplayer-shared/es2018";function Ju(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,fw),r=h(e,"ref",15,void 0),l=he().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Ut(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,f)=>{var p=Le(),v=ce(p);{var _=b=>{Um(b,{})},y=b=>{da(b,{get size(){return"24"}})};V(v,b=>{i()?b(_):b(y,!1)})}$(u,p)},$$slots:{default:!0}}),H()}var mw=Ie('<path d="M11.64 12.37 9.07 9.8h1.03a.9.9 0 1 0 0-1.8H6.9a.9.9 0 0 0-.9.9v3.2a.9.9 0 0 0 1.8 0v-1.02l2.53 2.52.13.14a.9.9 0 0 0 1.28-1.28z"></path>'),vw=Ie('<path d="m6.36 9.63 2.57 2.57H7.9a.9.9 0 1 0 0 1.8h3.2a.9.9 0 0 0 .9-.9V9.9a.9.9 0 0 0-1.8 0v1.02L7.67 8.4l-.13-.14a.9.9 0 0 0-1.28 1.28z"></path>'),gw=Ie('<path d="M7.66 4h6.68q1.2-.01 2 .04.83.06 1.53.38a4 4 0 0 1 1.7 1.7c.24.48.34.98.39 1.54q.05.8.04 2v1.44a.9.9 0 0 1-1.8 0V9.7c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2 2 0 0 0-.92-.92 2 2 0 0 0-.85-.2c-.46-.03-1.04-.03-1.9-.03H7.7c-.85 0-1.44 0-1.9.04-.44.03-.68.1-.85.19a2 2 0 0 0-.92.92c-.09.17-.16.4-.2.85-.03.46-.03 1.05-.03 1.9v2.65c0 .85 0 1.44.04 1.9.03.44.1.68.19.85a2 2 0 0 0 .92.92c.17.08.4.15.85.19.46.03 1.04.04 1.9.04h2.4a.9.9 0 0 1 0 1.8H7.66q-1.2.01-2-.05a4 4 0 0 1-1.53-.38 4 4 0 0 1-1.7-1.7 4 4 0 0 1-.39-1.53q-.05-.8-.04-2V9.65q-.01-1.2.04-2c.05-.56.15-1.06.39-1.53a4 4 0 0 1 1.7-1.7c.47-.24.97-.34 1.53-.39q.8-.05 2-.04M13 16.8c0-.98 0-1.47.19-1.84a2 2 0 0 1 .77-.77c.37-.19.86-.19 1.84-.19h3.4c.98 0 1.47 0 1.85.19q.5.27.76.77c.19.37.19.86.19 1.84v.4c0 .98 0 1.47-.19 1.85a2 2 0 0 1-.77.76c-.37.19-.86.19-1.84.19h-3.4c-.98 0-1.47 0-1.85-.19a2 2 0 0 1-.76-.76c-.19-.38-.19-.87-.19-1.85z"></path><!>',1);function zm(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Ze(t,{get testId(){return n(o)},children:(r,a)=>{var l=gw(),d=P(ce(l));{var s=f=>{var p=mw();$(f,p)},u=f=>{var p=vw();$(f,p)};V(d,f=>{i()?f(s):f(u,!1)})}$(r,l)},$$slots:{default:!0}})}import{noop as hw}from"@vkontakte/videoplayer-shared/es2018";function Wm(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,hw),a=j("menu_pip");Ut(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}}),H()}import{debounceFn as ub}from"@vkontakte/videoplayer-shared/es2018";var _w=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},bw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},$w=L("<div><!></div>"),yw=L("<div><!></div>"),xw=L("<div><!></div>"),ww=L("<!> <!> <!>",1),Sw=L("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Cw=L('<div class="wrapper-middle s-1c"><!></div>'),Tw=L("<div><!></div> <!> <div><!></div>",1),Iw=L('<div aria-hidden="true">·</div> <!>',1),Ew=L('<!> <!> <div><div><div class="controls mobile s-1c" data-testid="bottom-controls"><div class="controls-group contain s-1c"><!> <!> <!> <!></div> <div class="controls-group s-1c"><!> <!> <!></div></div> <!></div></div> <!>',1),kw={hash:"s-1c",code:".wrapper-bottom.s-1c{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-1c>:where(.s-1c){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1c{height:9px;padding:0 4px 4px}.wrapper-middle.s-1c{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1c,.wrapper-top-right.s-1c{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1c{right:8px;top:4px}.wrapper-top-left.s-1c{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1c,.wrapper-middle-left-second.s-1c,.wrapper-middle-right.s-1c{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-1c{left:12px}.wrapper-middle-left-second.s-1c{left:64px}.wrapper-middle-right.s-1c{right:12px}.controls.s-1c{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-1c,.controls-group.s-1c{display:flex}.controls-group.contain.s-1c{min-width:0}.controls-group.s-1c >:not(:first-child){margin-left:8px}.hidden.s-1c{opacity:0;visibility:hidden}.controls-hidden.s-1c{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1c{transition:none}.overlay-mobile.s-1c{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-1c,.wrapper-top-right.fullscreen.s-1c{top:16px}.controls-wrapper.fullscreen.s-1c{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1c{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1c{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1c{left:44px}.wrapper-middle-left-second.fullscreen.s-1c{left:96px}.wrapper-middle-right.fullscreen.s-1c{right:44px}.controls-wrapper.fullscreen.s-1c{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function Km(t,e){var en,tn;B(e,!0),Y(t,kw);let[i,o]=De(),r=()=>x(ki,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(Dt,"$disabledControls$",i),l=()=>x(Ot,"$playbackState$",i),d=()=>x(Go,"$adPlaybackState",i),s=()=>x(G,"$isEnded$",i),u=()=>x(xt,"$playerSize",i),f=()=>x(St,"$scrubbingInProgress",i),p=()=>x(Qi,"$chromecastState$",i),v=()=>x(Ne,"$isPictureInPictureActive",i),_=()=>x(qe,"$pictureInPictureType$",i),y=()=>x(fe,"$mobileNotReportControlHidden$",i),b=()=>x(hi,"$chromecastHidden",i),w=()=>x(st,"$playerPhase",i),I=()=>x(to,"$pipHidden",i),T=()=>x(We,"$currentGridType$",i),N=()=>x(di,"$vkLogoHidden",i),A=()=>x(pi,"$volumeHidden",i),E=()=>x(Pe,"$isLive$",i),k=()=>x(nt,"$settingsMenuVisible",i),Q=()=>x($e,"$isRewindableLive$",i),F=()=>x(Be,"$isActiveLive$",i),z=()=>x(Nt,"$isAudioAvailable$",i),X=()=>x(xe,"$muted$",i),se=()=>x(ke,"$volume$",i),Z=()=>x(mt,"$isInteractiveTime$",i),oe=()=>x(tr,"$settingButtonRef$",i),J=()=>x(at,"$startedByKeyboard$",i),Ce=()=>x(Yo,"$isFullscreen",i),pe=()=>x(Bt,"$additionalButtons$",i),ee=()=>x(Ci,"$autoplayNextToggleHidden",i),_e=()=>x(ct,"$crashed$",i),we=()=>x(ci,"$settingsHidden",i),ve=()=>x(cn,"$graphIsOpened$",i),ue=()=>x(po,"$adPosition",i),Qe=()=>x(fi,"$adDuration",i),U=()=>x(jt,"$position$",i),O=()=>x(wt,"$duration$",i),Ge=h(e,"playerControlsWrapperRef",15,void 0),K=h(e,"playerControlsRef",15,void 0),ae=h(e,"isAds",3,!1),ye=h(e,"logoTargetUrl",3,""),He=h(e,"isOneVideoPlaylist",3,!1),it=h(e,"customFullscreenSupported",3,!0),re=he(),de=vo(),Re=Mt(),Ve=re.actions.internal.toggleMuted,et=re.actions.internal.togglePlay,Ee=re.actions.internal.pause,Te=re.actions.internal.prevVideoClick,Fe=re.actions.internal.nextVideoClick,kt=re.actions.internal.checkFullscreenSupport,It=(en=re.callbacks)==null?void 0:en.onAudioDoesNotExistHint,Pt=(tn=re.callbacks)==null?void 0:tn.onAudioDisabledHint,st=re.playerPhase,wt=re.state.duration$,jt=re.state.positionWithScrubbing$,Ot=re.state.playbackState$,Nt=re.state.isAudioAvailable$,zt=re.state.isAudioDisabled,G=re.state.isEnded$,Pe=re.state.isLive$,ke=re.state.volume$,xe=re.state.muted$,Be=re.state.isActiveLive$,$e=re.state.isRewindableLive$,St=re.ui.scrubbingInProgress,fe=re.ui.mobileNotReportControlHidden$,{isActive$:Ne,type$:qe}=de.pictureInPicture$,nt=re.ui.settingsMenu.visible$,Wt=re.ui.settingsMenu.openedByBtnKeyboard$,Vt=re.ui.controls,{volume:pi,vkLogo:di,autoplayNextToggle:Ci,pip:to,settings:ci,chromecast:hi}=re.ui.hiddenControls,$t=re.actions.internal.getVideoEpisodes(),ui=re.webApi.pictureInPictureApi,Qi=re.state.chromecastState$,ct=re.state.crashed$,Dt=Vt.disabledControls$,at=re.ui.startedByKeyboard$,We=re.ui.currentGridType$,fi=re.ads.duration,po=re.ads.position,Go=re.ads.playbackState,Yo=re.ui.isFullscreen,xt=re.ui.playerSize,Bt=re.ui.additionalButtonsDeprecated$,W=re.actions.internal.getVideoElement,At=re.actions.internal.replayInteractive,ni=re.state.isInteractive,mt=re.state.isInteractiveTime$,Xt=re.state.showInteractiveGraph,gt=re.state.showSeekToInteractive,rt=re.state.showPlayPrevChapter,Vi=re.state.showInteractiveTimeIndicator,ki=de.seekToInteractiveDisabledTooltip$,cn=de.graphIsOpened$,un=re.ui.controlBlocks,Pi=m(()=>j(re.state.playPrevChapterDisabledTooltip)),Ri=m(()=>j(r())),Mn=m(()=>a().has("EPISODE_BUTTON")),go=m(()=>a().has("GRAPH_BUTTON")),io=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Ti=m(()=>a().has("PLAY_BUTTON")),Lo=m(()=>a().has("REPLAY_BUTTON")),Mo=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),pn=m(()=>l()===cb.PLAYING),Vr=m(()=>d()==="paused"),Rr=m(()=>s()&&!ae()&&!ni),Nr=m(()=>!s()||ae()),bs=m(()=>e.showNextPrevButtons&&!ae()&&e.prevButtonActive),Dr=m(()=>e.showNextPrevButtons&&!ae()&&e.nextButtonActive),Zn=m(()=>u().width>300),Or=m(()=>u().width>400),fn=m(f),mn=m(()=>p()!==db.NOT_AVAILABLE&&!(v()&&_()===1)&&!y()&&!ni&&!b()),fr=m(()=>w()==="LiveWaitingStart"),mr=m(()=>!!ui&&p()!==db.CONNECTED&&!y()&&(_()===1&&n(fr)||!n(fr))&&!n(fn)&&!ni&&!I()),jo=q(!1);Lt(()=>{let Ue=ui==null?void 0:ui.info.isActive$.subscribe(Ct=>R(jo,Ct,!0));return()=>Ue==null?void 0:Ue.unsubscribe()});let vr=m(()=>!n(fn)&&Ji(T(),"s")),gr=m(()=>!e.logoHidden&&u().width>350&&!N()),Jn=m(()=>Re.features.fullscreen&&kt()&&!(v()&&_()===1)&&(ni?it():!0)&&!n(fn)&&!n(jo)),Vn=m(()=>!A()&&!n(fn)),ns=m(()=>(!E()||ae())&&u().width>260&&!n(fn)&&!(Re.features.interactiveHideTime&&ni)),Vo=m(()=>k()||e.showControls),hr=m(()=>!ae()&&!E()&&!!($t!=null&&$t.length)&&n(Zn)&&!n(Mn)&&!n(fn)),Ni=m(()=>!Q()||!!F()),_r=m(()=>Xt&&Ji(T(),"m")),Rn=m(()=>!z()||X()||se()===0),ft=si({}),Zt=si({}),br=ub(Wl,260),Br=ub(Zu,260);Oe(()=>{u(),Z(),br(W(),Vt,ft,e.showControls),Br(W(),un,Zt,e.showControls)});let Hr=()=>re.actions.internal.toggleChromecast();async function Nn(){ui!=null&&ui.isActive()?await(ui==null?void 0:ui.exit()):await(ui==null?void 0:ui.request())}function er(){aa({isAudioDisabled:zt,audioDisabledHintCallback:Pt,isAudioAvailable:z(),audioIsNotExistHintCallback:It,isAds:ae()})&&Ve()}let ho=q(""),Dn=(Ue,Ct)=>{if(!Ue){R(ho,j("tooltip_live"),!0);return}Ct&&Ct===cb.PAUSED&&R(ho,j("tooltip_play"),!0)};Oe(()=>{Dn(n(Ni),l())});let tr=le();Oe(()=>{oe()&&Vl(oe(),k(),Wt)}),Oe(()=>{ju(at,J(),ft.playButton)});var On=Ew(),vn=ce(On);{var gn=Ue=>{var Ct=Sw(),li=ce(Ct);let No;var yo=P(li,2);let Do;Xe(yo,lt=>Zt.topLeft=lt,()=>Zt==null?void 0:Zt.topLeft);var Bi=P(yo,2);let xo;var Bn=C(Bi);_i(Bn,1,pe,({iconUrl:lt,ariaLabel:ri,testId:Co,onClick:$i,tooltip:yn})=>lt,(lt,ri)=>{let Co=()=>n(ri).iconUrl,$i=()=>n(ri).ariaLabel,yn=()=>n(ri).testId,xn=()=>n(ri).onClick,ws=()=>n(ri).tooltip,Ss=m(()=>{var Hi;return(Hi=$i())!=null?Hi:ws()});Fm(lt,{get iconUrl(){return Co()},get ariaLabel(){return n(Ss)},get testId(){return yn()},get onClick(){return xn()}})});var Sr=P(Bn,2);{var wo=lt=>{oc(lt,{get ref(){return ft.autoplayNextToggle},set ref(ri){ft.autoplayNextToggle=ri}})};V(Sr,lt=>{e.showAutoplayNext&&!He()&&!ee()&&lt(wo)})}var no=P(Sr,2);{var bn=lt=>{jd(lt,{isMobile:!0,click:Hr,get state(){return p()},get ref(){return ft.chromecast},set ref(ri){ft.chromecast=ri}})};V(no,lt=>{n(mn)&&lt(bn)})}var Oo=P(no,2);{var Hn=lt=>{Wm(lt,{click:Nn,get isPictureInPictureActive(){return v()},get ref(){return ft.pip},set ref(ri){ft.pip=ri}})};V(Oo,lt=>{n(mr)&&lt(Hn)})}var zr=P(Oo,2);{var Wr=lt=>{Ol(lt,{get ref$(){return tr}})};V(zr,lt=>{_e()&&!we()&&lt(Wr)})}var Fn=P(zr,2);{var Je=lt=>{Gd(lt,{get click(){return Ee},get targetUrl(){return ye()},get logoClickable(){return e.logoClickable},get ref(){return ft.vkLogo},set ref(ri){ft.vkLogo=ri}})};V(Fn,lt=>{n(gr)&&lt(Je)})}S(Bi),Xe(Bi,lt=>Zt.topRight=lt,()=>Zt==null?void 0:Zt.topRight);var Yt=P(Bi,2);let bi;var So=C(Yt);{var $n=lt=>{let ri=m(()=>Te.bind(null,!0));Wa(lt,{get click(){return n(ri)},type:"prev",isMobile:!0,get ref(){return ft.prevButton},set ref(Co){ft.prevButton=Co}})};V(So,lt=>{n(bs)&&lt($n)})}var Un=P(So,2);{var Bo=lt=>{ql(lt,{get disabled(){return n(Ti)},get click(){return et},isMobile:!0,get isPlaying(){return n(pn)},get ref(){return ft.playButton},set ref(ri){ft.playButton=ri}})};V(Un,lt=>{n(Nr)&&lt(Bo)})}var or=P(Un,2);{var ss=lt=>{Kl(lt,{get disabled(){return n(Lo)},get click(){return et},isMobile:!0,get ref(){return ft.replayButton},set ref(ri){ft.replayButton=ri}})};V(or,lt=>{n(Rr)&&lt(ss)})}var Cr=P(or,2);{var xs=lt=>{let ri=m(()=>Fe.bind(null,!0));Wa(lt,{get click(){return n(ri)},type:"next",isMobile:!0,get ref(){return ft.nextButton},set ref(Co){ft.nextButton=Co}})};V(Cr,lt=>{n(Dr)&&lt(xs)})}S(Yt),Xe(Yt,lt=>Zt.middle=lt,()=>Zt==null?void 0:Zt.middle);var Us=P(Yt,2);{var ua=lt=>{var ri=ww(),Co=ce(ri);{var $i=Hi=>{var Si=$w();let ge;Si.__click=[_w,Mo,e,Pi];var ht=C(Si);let Jt=m(()=>!e.showControls);ic(ht,{get hidden(){return n(Jt)},get disabled(){return n(Mo)},get click(){return e.playPrevChapter},get ref(){return ft.playPrevChapterButton},set ref(Gt){ft.playPrevChapterButton=Gt}}),S(Si),D(Gt=>ge=ne(Si,1,"wrapper-middle-left s-1c",null,ge,Gt),[()=>({fullscreen:Ce(),hidden:!e.showControls})]),$(Hi,Si)};V(Co,Hi=>{rt&&Hi($i)})}var yn=P(Co,2);{var xn=Hi=>{var Si=yw();let ge;var ht=C(Si);let Jt=m(()=>!e.showControls&&!ve());rc(ht,{get hidden(){return n(Jt)},get disabled(){return n(go)},get click(){return cn.toggle},get graphIsOpened(){return ve()},get ref(){return ft.interactiveGraphButton},set ref(Gt){ft.interactiveGraphButton=Gt}}),S(Si),D(Gt=>ge=ne(Si,1,yd(rt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1c",ge,Gt),[()=>({fullscreen:Ce(),hidden:!e.showControls&&!ve()})]),$(Hi,Si)};V(yn,Hi=>{n(_r)&&Hi(xn)})}var ws=P(yn,2);{var Ss=Hi=>{var Si=xw();let ge;Si.__click=[bw,io,e,Ri];var ht=C(Si);let Jt=m(()=>!e.showControls);nc(ht,{get hidden(){return n(Jt)},get disabled(){return n(io)},get click(){return e.seekToInteractive},get ref(){return ft.seekToInteractiveButton},set ref(Gt){ft.seekToInteractiveButton=Gt}}),S(Si),D(Gt=>ge=ne(Si,1,"wrapper-middle-right s-1c",null,ge,Gt),[()=>({fullscreen:Ce(),hidden:!e.showControls})]),$(Hi,Si)};V(ws,Hi=>{gt&&Hi(Ss)})}$(lt,ri)};V(Us,lt=>{ni&&!f()&&lt(ua)})}D((lt,ri,Co,$i)=>{No=ne(li,1,"overlay-mobile s-1c",null,No,lt),Do=ne(yo,1,"wrapper-top-left s-1c",null,Do,ri),xo=ne(Bi,1,"wrapper-top-right s-1c",null,xo,Co),bi=ne(Yt,1,"wrapper-middle s-1c",null,bi,$i)},[()=>({hidden:!n(Vo)}),()=>({hidden:!e.showControls,fullscreen:Ce()}),()=>({hidden:!e.showControls&&!y(),fullscreen:Ce()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),$(Ue,Ct)};V(vn,Ue=>{ae()||Ue(gn)})}var hn=P(vn,2);{var Xo=Ue=>{var Ct=Tw(),li=ce(Ct);let No;var yo=C(li);Ju(yo,{get muted(){return X()},click:er,get ref(){return ft.volume},set ref(wo){ft.volume=wo}}),S(li);var Do=P(li,2);{var Bi=wo=>{var no=Cw(),bn=C(no);let Oo=m(()=>!n(Vr));ql(bn,{get disabled(){return n(Ti)},get click(){return et},isMobile:!0,get isPlaying(){return n(Oo)},get ref(){return ft.playButton},set ref(Hn){ft.playButton=Hn}}),S(no),$(wo,no)};V(Do,wo=>{n(Vr)&&wo(Bi)})}var xo=P(Do,2);let Bn;var Sr=C(xo);ac(Sr,{get position(){return ue()},get duration(){return Qe()}}),S(xo),D((wo,no)=>{No=ne(li,1,"wrapper-top-right s-1c",null,No,wo),Bn=ne(xo,1,"wrapper-bottom ads-timeline-mobile s-1c",null,Bn,no)},[()=>({fullscreen:Ce()}),()=>({fullscreen:Ce()})]),$(Ue,Ct)};V(hn,Ue=>{ae()&&d()!=="inactive"&&Ue(Xo)})}var Di=P(hn,2);let Gi;var Zo=C(Di);let ir;var $r=C(Zo),_n=C($r),yr=C(_n);{var ut=Ue=>{Ao(Ue,{get disabled(){return n(Lo)},get ref(){return ft.replayButton},set ref(Ct){ft.replayButton=Ct},children:(Ct,li)=>{Kl(Ct,{get disabled(){return n(Lo)},get click(){return At}})},$$slots:{default:!0}})};V(yr,Ue=>{ni&&Ue(ut)})}var yt=P(yr,2);{var oo=Ue=>{Ao(Ue,{get ref(){return ft.liveButton},set ref(Ct){ft.liveButton=Ct},children:(Ct,li)=>{sc(Ct,{get isLiveActive(){return n(Ni)},isMobile:!0,get ariaLabel(){return n(ho)}})},$$slots:{default:!0}})};V(yt,Ue=>{!ae()&&E()&&Ue(oo)})}var fo=P(yt,2);{var Jo=Ue=>{let Ct=m(()=>ae()?ue():U()),li=m(()=>ae()?Qe():O()),No=m(()=>!e.showControls);Kd(Ue,{get showDuration(){return n(Or)},get position(){return n(Ct)},get duration(){return n(li)},isMobile:!0,get isHidden(){return n(No)},get ref(){return ft.time},set ref(yo){ft.time=yo}})};V(fo,Ue=>{n(ns)&&Ue(Jo)})}var _o=P(fo,2);let bo=m(()=>!n(hr));Ao(_o,{className:"w-max",get disabled(){return n(bo)},get ref(){return ft.episodes},set ref(Ue){ft.episodes=Ue},children:(Ue,Ct)=>{var li=Le(),No=ce(li);{var yo=Do=>{var Bi=Iw(),xo=P(ce(Bi),2);Xd(xo,{get position(){return U()},get duration(){return O()},get timeCodes(){return $t}}),$(Do,Bi)};V(No,Do=>{n(hr)&&Do(yo)})}$(Ue,li)},$$slots:{default:!0}}),S(_n),Xe(_n,Ue=>Zt.bottomLeft=Ue,()=>Zt==null?void 0:Zt.bottomLeft);var Ii=P(_n,2),$o=C(Ii);{var Fr=Ue=>{Ao(Ue,{get ref(){return ft.volume},set ref(Ct){ft.volume=Ct},children:(Ct,li)=>{Ju(Ct,{get muted(){return n(Rn)},click:er})},$$slots:{default:!0}})};V($o,Ue=>{n(Vn)&&Ue(Fr)})}var xr=P($o,2);{var $s=Ue=>{Ao(Ue,{get ref(){return ft.settings},set ref(Ct){ft.settings=Ct},children:(Ct,li)=>{Ol(Ct,{get ref$(){return tr}})},$$slots:{default:!0}})};V(xr,Ue=>{n(vr)&&Ue($s)})}var Oi=P(xr,2);{var ys=Ue=>{Ao(Ue,{get ref(){return ft.fullscreen},set ref(Ct){ft.fullscreen=Ct},children:(Ct,li)=>{Qd(Ct,{get click(){return e.toggleFullscreen},get isFullscreen(){return Ce()}})},$$slots:{default:!0}})};V(Oi,Ue=>{n(Jn)&&Ue(ys)})}S(Ii),Xe(Ii,Ue=>Zt.bottomRight=Ue,()=>Zt==null?void 0:Zt.bottomRight),S($r),Xe($r,Ue=>K(Ue),()=>K());var rs=P($r,2);let wr=m(()=>!e.showControls);qa(rs,{get isHidden(){return n(wr)},get isAds(){return ae()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return Q()},get ref(){return ft.timeline},set ref(Ue){ft.timeline=Ue}}),S(Zo),Xe(Zo,Ue=>Zt.bottom=Ue,()=>Zt==null?void 0:Zt.bottom),S(Di),Xe(Di,Ue=>Ge(Ue),()=>Ge());var Ro=P(Di,2);{var Ur=Ue=>{ec(Ue,{get ref(){return ft.interactiveTimeIndicator},set ref(Ct){ft.interactiveTimeIndicator=Ct}})};V(Ro,Ue=>{Vi&&Ue(Ur)})}D((Ue,Ct)=>{Gi=ne(Di,1,"wrapper-bottom mobile s-1c",null,Gi,Ue),ir=ne(Zo,1,"controls-wrapper s-1c",null,ir,Ct)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:Ce()})]),$(t,On),H(),o()}Ye(["click"]);function lc(t,e){B(e,!0);let[i,o]=De(),r=()=>x(I,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),f=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),_=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,pb),b=h(e,"onDisabledSeekToInteractiveClick",3,pb),I=he().ui.isMobile,T=q(!1);Lt(()=>{let k=setTimeout(()=>R(T,!0),0);return()=>clearTimeout(k)});var N=Le(),A=ce(N);{var E=k=>{var Q=Le(),F=ce(Q);{var z=se=>{Km(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return b()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})},X=se=>{Hm(se,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(Z){l(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})};V(F,se=>{r()?se(z):se(X,!1)})}$(k,Q)};V(A,k=>{n(T)&&k(E)})}$(t,N),H(),o()}var Pw=Ie('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function dc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${an(e.size)}${n(i)}`);Ze(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return n(o)},get testId(){return e.testId},get shadow(){return e.shadow},children:(r,a)=>{var l=Pw();$(r,l)},$$slots:{default:!0}}),H()}var Aw=Ie('<path d="M32.46 9.53a1.16 1.16 90 010 1.96l-7.66 4.83c-.78.49-1.8-.07-1.8-.98v-3.3a14 14 90 1014.1 18.93 1.5 1.5 90 012.8 1.06 17 17 90 11-16.9-23V5.66c0-.91 1.03-1.47 1.8-.98z"></path>');function qm(t,e){B(e,!0);let i=h(e,"reversed",3,!1),o=m(()=>i()?"transform:scaleX(-1);transform-origin: 50% 0;":void 0),r=m(()=>`seek-icon-${i()?"backward":"forward"}`);Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(o)},get testId(){return n(r)},get shadow(){return e.shadow},children:(a,l)=>{var d=Aw();$(a,d)},$$slots:{default:!0}}),H()}var Lw=L('<span class="hot-key-helpers-text s-x"> </span>'),Mw=L('<div data-testid="hotkey-helper-icon" class="s-x"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Vw=L("<div><!></div>"),Rw={hash:"s-x",code:'.hot-key-helpers-container.s-x{align-items:center;animation:s-x-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-x{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-x{left:calc(75% - 100px)}.hot-key-helpers-text.s-x{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-x{animation:s-x-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-x-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-x-fadeOut{0%{opacity:1}to{opacity:0}}'};function Qm(t,e){B(e,!0),Y(t,Rw);let[i,o]=De(),r=()=>x(e.data,"$data",i),a=he(),{features:l}=Mt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=r())==null?void 0:I.type}),v=m(()=>{var I,T;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(T=r())==null?void 0:T.text});var _=Vw();let y;var b=C(_);{var w=I=>{var T=Mw(),N=ce(T),A=C(N);{var E=K=>{let ae=m(()=>n(p)==="BACKWARD_SEEK");qm(K,{get reversed(){return n(ae)},shadow:!0})};V(A,K=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&K(E)})}var k=P(A,2);{var Q=K=>{Hs(K,{get size(){return"48"},shadow:!0})};V(k,K=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&K(Q)})}var F=P(k,2);{var z=K=>{An(K,{get size(){return"48"},shadow:!0})};V(F,K=>{n(p)==="PLAY"&&!l.playbackStatusShow&&K(z)})}var X=P(F,2);{var se=K=>{tc(K,{get size(){return"48"},shadow:!0})};V(X,K=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&K(se)})}var Z=P(X,2);{var oe=K=>{la(K,{get size(){return"48"},type:"off",shadow:!0})};V(Z,K=>{n(p)==="SUBTITLES_OFF"&&K(oe)})}var J=P(Z,2);{var Ce=K=>{la(K,{get size(){return"48"},shadow:!0})};V(J,K=>{n(p)==="SUBTITLES_ON"&&K(Ce)})}var pe=P(J,2);{var ee=K=>{let ae=m(()=>n(p)==="RATE_DOWN");dc(K,{get size(){return"48"},get reversed(){return n(ae)},testId:"rate-change-icon",shadow:!0})};V(pe,K=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&K(ee)})}var _e=P(pe,2);{var we=K=>{let ae=m(()=>n(p)==="EPISODE_PREV");ca(K,{get size(){return"48"},get reversed(){return n(ae)},shadow:!0})};V(_e,K=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&K(we)})}var ve=P(_e,2);{var ue=K=>{da(K,{get size(){return"48"},volume:0,shadow:!0})};V(ve,K=>{n(p)==="MUTE"&&K(ue)})}var Qe=P(ve,2);{var U=K=>{da(K,{get size(){return"48"},volume:1,shadow:!0})};V(Qe,K=>{n(p)==="VOLUME"&&K(U)})}S(N);var O=P(N,2);{var Ge=K=>{var ae=Lw(),ye=C(ae,!0);S(ae),D(()=>me(ye,n(v))),$(K,ae)};V(O,K=>{n(v)&&K(Ge)})}D(()=>Me(N,"data-type",n(p))),$(I,T)};V(b,I=>{!n(s)&&n(p)&&I(w)})}S(_),D(I=>y=ne(_,1,"hot-key-helpers-container s-x",null,y,I),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(f)})]),$(t,_),H(),o()}var Nw=(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}},Dw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Ow=L('<div tabindex="0" role="button"><div class="button-block s-p" aria-hidden="true"><div class="button-row s-p"><div class="button button-up s-p"><!></div> <div class="button button-right s-p"><!></div></div> <div class="button-row s-p"><div class="button button-left s-p"><!></div> <div class="button button-down s-p"><!></div></div></div></div>'),Bw={hash:"s-p",code:".immersive-controls.s-p{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-p{left:20px;top:50px}.button-block.s-p{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-p{display:flex;flex-direction:row;position:relative}.button.s-p{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-p svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-p svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-p svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-p svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-p svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-p:hover svg{opacity:1}"};function cc(t,e){B(e,!0),Y(t,Bw);let i=h(e,"isShifted",3,!1),o=he(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),f=j("aria_label_spherical_control");var p=Ow();let v;p.__keydown=[Nw,r,a,l,s,d],p.__keyup=[Dw,r,u];var _=C(p),y=C(_),b=C(y);b.__mousedown=a,b.__mouseup=u;var w=C(b);Lr(w,{direction:"up",useBtnColor:!0}),S(b);var I=P(b,2);I.__mousedown=d,I.__mouseup=u;var T=C(I);Lr(T,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=P(y,2),A=C(N);A.__mousedown=s,A.__mouseup=u;var E=C(A);Lr(E,{direction:"up",useBtnColor:!0}),S(A);var k=P(A,2);k.__mousedown=l,k.__mouseup=u;var Q=C(k);Lr(Q,{direction:"up",useBtnColor:!0}),S(k),S(N),S(_),S(p),D(F=>{v=ne(p,1,"immersive-controls s-p",null,v,F),Me(p,"aria-label",f)},[()=>({"m-shifted":i()})]),dt("mouseleave",b,u),dt("mouseleave",I,u),dt("mouseleave",A,u),dt("mouseleave",k,u),$(t,p),H()}Ye(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as mb,Subscription as Hw,filterChanged as Fw,filter as Uw}from"@vkontakte/videoplayer-shared/es2018";var fb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var ep=class{constructor(){this.flickeringTimeout=fb(1e3);this.subscriptions=new Hw;this.isAuto=!1;this.isLive=!1;this.captions$=new mb([]);this.captionsPrepared$=new mb([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(Uw(()=>this.isEnabled()),Fw()).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 zw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Ww=L('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),Kw=L('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),qw=L('<div><span class="caption s-a"><!></span></div>'),Qw=L("<div><!></div>"),Gw={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 Ga(t,e){B(e,!0),Y(t,Gw);let[i,o]=De(),r=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(b,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x(_,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),f=he(),p=Mt(),v=f.state.currentSubtitle$,_=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,b=f.ui.isFullscreen,w=f.ui.previewTrackActive,I=m(()=>!!r().isAuto),T=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),A=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=q(null);Oe(()=>{var Z,oe,J;(Z=n(E))==null||Z.setIsAuto(n(I)),(oe=n(E))==null||oe.setIsLive(n(T)),(J=n(E))==null||J.setCaptions(e.captions)});let k=q(si([[]]));Lt(()=>{R(E,new ep().subscribe(),!0);let Z=n(E).captionsPrepared$.subscribe(oe=>{R(k,oe,!0)});return()=>{var oe;(oe=n(E))==null||oe.destroy(),Z.unsubscribe()}}),Lt(()=>{if(n(I)){let Z=window.setTimeout(()=>{_.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(Z)}}else _.set(!1)});let Q=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var F=Qw();let z;var X=C(F);{var se=Z=>{var oe=qw();let J;var Ce=C(oe),pe=C(Ce);{var ee=we=>{var ve=zw(),ue=C(ve),Qe=C(ue,!0);S(ue),S(ve),D(U=>{var O;Ke(ue,`font-size: ${(O=n(A))!=null?O:""}px`),me(Qe,U)},[()=>j("subtitles_auto_caption")]),$(we,ve)},_e=(we,ve)=>{{var ue=U=>{var O=Le(),Ge=ce(O);_i(Ge,17,()=>n(k),bd,(K,ae)=>{var ye=Ww(),He=C(ye);_i(He,21,()=>n(ae),({value:it,timeAppeared:re})=>re,(it,re)=>{let de=()=>n(re).value,Re=()=>n(re).timeAppeared;var Ve=Le(),et=ce(Ve);{var Ee=Te=>{var Fe=ps();D(()=>me(Fe,de())),$(Te,Fe)};V(et,Te=>{(!Re()||Re()<=e.position)&&Te(Ee)})}$(it,Ve)}),S(He),S(ye),D(()=>{var it;return Ke(He,`font-size: ${(it=n(A))!=null?it:""}px`)}),$(K,ye)}),$(U,O)},Qe=U=>{var O=Le(),Ge=ce(O);_i(Ge,17,()=>e.captions,({value:K})=>K,(K,ae)=>{let ye=()=>n(ae).value;var He=Kw(),it=C(He),re=C(it,!0);S(it),S(He),D(()=>{var de;Ke(it,`font-size: ${(de=n(A))!=null?de:""}px`),me(re,ye())}),$(K,He)}),$(U,O)};V(we,U=>{var O;n(I)&&((O=n(k))!=null&&O.length)?U(ue):U(Qe,!1)},ve)}};V(pe,we=>{n(I)&&s()?we(ee):we(_e,!1)})}S(Ce),S(oe),D(we=>{var ve;J=ne(oe,1,"subtitles-caption s-a",null,J,we),Ke(oe,`--subtitles-caption-margin: ${(ve=n(Q))!=null?ve:""}%`)},[()=>({mobile:u()})]),$(Z,oe)};V(X,Z=>{var oe;(e.captions.length||(oe=n(k))!=null&&oe.length)&&Z(se)})}S(F),D(Z=>z=ne(F,1,"subtitles-container s-a",null,z,Z),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(T)&&!s()})]),$(t,F),H(),o()}import{ChromecastState as Yw}from"@vkontakte/videoplayer-core/es2018";var jw=L('<div class="text s-l"> </div>'),Xw=L('<div><div class="icon_wrapper s-l"><!></div> <!></div>'),Zw={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 uc(t,e){B(e,!0),Y(t,Zw);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Mt();var r=Xw();let a;r.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},r.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},r.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=C(r),d=C(l);Yd(d,{get size(){return"48"},get iconState(){return Yw.CONNECTED}}),S(l);var s=P(l,2);{var u=f=>{var p=jw(),v=C(p);S(p),D(()=>{var _;return me(v,`Видео воспроизводится на ${(_=i())!=null?_:""}`)}),$(f,p)};V(s,f=>{i()&&f(u)})}S(r),D(f=>{a=ne(r,1,"wrapper s-l",null,a,f),Ke(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),$(t,r),H()}Ye(["contextmenu","click","dblclick"]);var Jw=Ie('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function Gm(t){Ze(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=Jw();$(e,o)},$$slots:{default:!0}})}var eS=L('<div class="container s-4"><!></div>'),tS={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 Ya(t){Y(t,tS);var e=eS(),i=C(e);Gm(i,{}),S(e),$(t,e)}var iS=L('<div class="playButton s-c" tabindex="0" role="button"><div class="playButtonBackground s-c"></div> <!></div>'),oS=L('<div data-testid="unstarted-thumb"><!></div>'),nS={hash:"s-c",code:".container.s-c{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-c{opacity:0;visibility:hidden}.container.bgCover.s-c{background-size:cover}.playButton.s-c{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-c,.playButtonBackground.s-c{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-c{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-c:hover .playButtonBackground:where(.s-c){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-c svg{position:relative}"};function ja(t,e){B(e,!0),Y(t,nS);let i=h(e,"iconVisible",3,!0),o=he(),r=Mt(),a=o.ui.startedByKeyboard$,l=j("tooltip_play"),d=_=>{var b;let y=_.code;["Enter","Space"].includes(y)&&(_.stopPropagation(),_.preventDefault(),a.set(!0),(b=e.startVideo)==null||b.call(e))},s=_=>{var y,b;_.stopPropagation(),(y=e.startVideo)==null||y.call(e),(b=e.onClick)==null||b.call(e,_)};var u=oS();let f;u.__click=s,u.__contextmenu=function(..._){var y;(y=e.onContextMenu)==null||y.apply(this,_)};var p=C(u);{var v=_=>{var y=iS();y.__keydown=d;var b=P(C(y),2);An(b,{get size(){return"48"}}),S(y),D(()=>Me(y,"aria-label",l)),$(_,y)};V(p,_=>{i()&&_(v)})}return S(u),D(_=>{f=ne(u,1,"container s-c",null,f,_),Ke(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),$(t,u),H({handlePressKey:d,handleClick:s})}Ye(["click","contextmenu","keydown"]);var rS=L('<span class="text s-11"> </span>'),sS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},aS=L('<a target="_blank" class="link s-11"><!></a>'),lS=(t,e)=>e.onTitleClicked(),dS=L("<button><!></button>"),cS=L('<div data-testid="video_title"><!></div>'),uS={hash:"s-11",code:".title.s-11{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-11,.title.s-11{color:var(--white)}.link.s-11{pointer-events:auto;text-decoration:none}.link.s-11:hover{text-decoration:underline}.text.s-11{pointer-events:auto}.size-sm.s-11{font-size:14px;font-weight:500;line-height:18px}.hidden.s-11{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Ym(t,e){B(e,!0),Y(t,uS);let i=_=>{var y=rS(),b=C(y,!0);S(y),Xe(y,w=>l(w),()=>l()),D(()=>me(b,o())),dt("mouseenter",y,function(...w){var I;(I=e.onMouseEnter)==null||I.apply(this,w)}),dt("mouseleave",y,function(...w){var I;(I=e.onMouseLeave)==null||I.apply(this,w)}),$(_,y)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=q(void 0);Lt(()=>{var y;requestAnimationFrame(()=>{var b;(b=e.onVisibilityChanged)==null||b.call(e,!0)});function _(b){var w;b.propertyName==="transform"&&((w=e.onVisibilityChanged)==null||w.call(e,!r()))}return(y=n(d))==null||y.addEventListener("transitionend",_),()=>{var b;return(b=n(d))==null?void 0:b.removeEventListener("transitionend",_)}});var s=cS();let u;var f=C(s);{var p=_=>{var y=aS();y.__click=[sS,e];var b=C(y);i(b),S(y),D(()=>Me(y,"href",e.titleLinkHref)),$(_,y)},v=(_,y)=>{{var b=I=>{var T=dS();T.__click=[lS,e];var N=C(T);i(N),S(T),$(I,T)},w=I=>{i(I)};V(_,I=>{e.onTitleClicked?I(b):I(w,!1)},y)}};V(f,_=>{e.titleLinkHref?_(p):_(v,!1)})}S(s),Xe(s,_=>R(d,_),()=>n(d)),D(_=>u=ne(s,1,`title size-${a()}`,"s-11",u,_),[()=>({hidden:r()})]),$(t,s),H()}Ye(["click"]);import{throttleFn as _S}from"@vkontakte/videoplayer-shared/es2018";var pS=L('<div class="timer__cell cell s-18"><span class="cell__value s-18"> </span> <span class="cell__unit s-18"> </span></div> <span class="timer__points s-18"> </span>',1),fS=L('<div class="timer__cell cell s-18"><span class="cell__value s-18"> </span> <span class="cell__unit s-18"> </span></div> <span class="timer__points s-18"> </span>',1),mS=L('<div class="timer__cell cell s-18"><span class="cell__value s-18"> </span> <span class="cell__unit s-18"> </span></div> <span class="timer__points s-18"> </span>',1),vS=L('<div class="timer__cell cell s-18"><span class="cell__value s-18"> </span> <span class="cell__unit s-18"> </span></div>'),gS=L("<div><!> <!> <!> <!></div>"),hS={hash:"s-18",code:".timer__container.s-18{align-items:flex-start;display:flex;justify-content:center}.cell.s-18{align-items:center;display:flex;flex-direction:column}.cell__value.s-18{font-size:48px;font-weight:600;line-height:1.2}.small.s-18 .cell__value:where(.s-18){font-size:24px}.cell__unit.s-18{font-size:14px;font-weight:400;line-height:1.2}.small.s-18 .cell__unit:where(.s-18){font-size:12px}.timer__points.s-18{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-18 .timer__points:where(.s-18){font-size:20px}"};function jm(t,e){B(e,!0),Y(t,hS);let i=q(""),o=q(""),r=q(""),a=q(""),l,d=32,s=d/2,u=F=>String(F).padStart(2,"0"),f=F=>Math.max(F.length,1),p=F=>`${(e.isSmallSize?s:d)*f(F)}px`,v=F=>{let z=Math.floor(F/86400);z&&(F-=z*86400,R(i,u(z),!0));let X=Math.floor(F/3600);R(o,u(X),!0);let se=Math.floor(F/60)%60;R(r,u(se),!0);let Z=F%60;R(a,u(Z),!0)},_=()=>{let F=Math.floor(Date.now()/1e3),z=e.startTime-F;v(z),z>=1?l=requestAnimationFrame(_):e.onTimerOver()};Lt(()=>{l=requestAnimationFrame(_)}),sn(()=>{cancelAnimationFrame(l)});var y=gS();let b;var w=C(y);{var I=F=>{var z=pS(),X=ce(z);let se;var Z=C(X),oe=C(Z,!0);S(Z);var J=P(Z,2),Ce=C(J,!0);S(J),S(X);var pe=P(X,2),ee=C(pe,!0);S(pe),D((_e,we,ve)=>{se=Ke(X,"",se,{width:_e}),me(oe,n(i)),me(Ce,we),me(ee,ve)},[()=>p(n(i)),()=>j("waiting_live_day_value"),()=>j("waiting_live_colon")]),$(F,z)};V(w,F=>{n(i)&&F(I)})}var T=P(w,2);{var N=F=>{var z=fS(),X=ce(z);let se;var Z=C(X),oe=C(Z,!0);S(Z);var J=P(Z,2),Ce=C(J,!0);S(J),S(X);var pe=P(X,2),ee=C(pe,!0);S(pe),D((_e,we,ve)=>{se=Ke(X,"",se,{width:_e}),me(oe,n(o)),me(Ce,we),me(ee,ve)},[()=>p(n(o)),()=>j("waiting_live_hour_value"),()=>j("waiting_live_colon")]),$(F,z)};V(T,F=>{n(o)&&F(N)})}var A=P(T,2);{var E=F=>{var z=mS(),X=ce(z);let se;var Z=C(X),oe=C(Z,!0);S(Z);var J=P(Z,2),Ce=C(J,!0);S(J),S(X);var pe=P(X,2),ee=C(pe,!0);S(pe),D((_e,we,ve)=>{se=Ke(X,"",se,{width:_e}),me(oe,n(r)),me(Ce,we),me(ee,ve)},[()=>p(n(r)),()=>j("waiting_live_minute_value"),()=>j("waiting_live_colon")]),$(F,z)};V(A,F=>{n(r)&&F(E)})}var k=P(A,2);{var Q=F=>{var z=vS();let X;var se=C(z),Z=C(se,!0);S(se);var oe=P(se,2),J=C(oe,!0);S(oe),S(z),D((Ce,pe)=>{X=Ke(z,"",X,{width:Ce}),me(Z,n(a)),me(J,pe)},[()=>p(n(a)),()=>j("waiting_live_second_value")]),$(F,z)};V(k,F=>{n(a)&&F(Q)})}S(y),D(F=>b=ne(y,1,"timer__container s-18",null,b,F),[()=>({small:e.isSmallSize})]),$(t,y),H()}var bS=L('<div class="waiting s-n"><span> </span></div>'),$S=L('<div class="upcoming-timer timer s-n"><span> </span> <!></div>'),yS=L('<div class="waiting-container s-n"><!></div>'),xS={hash:"s-n",code:'.waiting-container.s-n{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-n,.waiting-container.s-n:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-n:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-n{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-n{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-n{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-n{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-n{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-n{font-size:15px}.medium.s-n{font-size:17px}'};function pc(t,e){B(e,!0),Y(t,xS);let i=h(e,"startTime",3,0),o=m(()=>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=m(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),f=m(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?_S(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"},I=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,I)})},300):void 0;Oe(()=>{n(s),n(d),n(o),p==null||p()}),sn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(f)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var v=yS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var _=C(v);{var y=w=>{var I=bS(),T=C(I);let N;var A=C(T,!0);S(T),S(I),Xe(I,E=>R(r,E),()=>n(r)),D((E,k)=>{N=ne(T,1,"waiting__title s-n",null,N,E),me(A,k)},[()=>({medium:n(f),small:n(u)}),()=>j("waiting_live_upcoming_title")]),$(w,I)},b=w=>{var I=$S(),T=C(I);let N;var A=C(T,!0);S(T);var E=P(T,2);let k=m(()=>n(u)||n(f)),Q=m(()=>i()||0);jm(E,{get isSmallSize(){return n(k)},get startTime(){return n(Q)},onTimerOver:()=>R(o,!0)}),S(I),Xe(I,F=>R(a,F),()=>n(a)),D((F,z)=>{N=ne(T,1,"timer__title s-n",null,N,F),me(A,z)},[()=>({medium:n(f),small:n(u)}),()=>j("waiting_live_timer_title")]),$(w,I)};V(_,w=>{n(o)?w(y):w(b,!1)})}S(v),D(()=>Ke(v,`background-image: url(${e.thumbUrl})`)),kn(v,"clientWidth",w=>R(d,w)),kn(v,"clientHeight",w=>R(s,w)),$(t,v),H()}Ye(["contextmenu","click"]);var wS=L('<div class="waiting-container s-r"><div class="waiting-caption s-r"><!> <p class="waiting-title s-r"> </p></div></div>'),SS={hash:"s-r",code:'.waiting-container.s-r{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-r,.waiting-container.s-r:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-r:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-r{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-r{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function Xa(t,e){B(e,!0),Y(t,SS);let i=h(e,"thumbUrl",3,""),o={recover:j("waiting_live_recover_title"),record:j("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=wS();a.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},a.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)};var l=C(a),d=C(l);Ha(d,{style:"position: static; transform: translate(0, 0)"});var s=P(d,2),u=C(s,!0);S(s),S(l),S(a),D(()=>{Ke(a,`background-image: url('${i()}')`),me(u,n(r))}),$(t,a),H()}Ye(["contextmenu","click"]);var CS=Ie('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function Xm(t){Ze(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=CS();$(e,o)},$$slots:{default:!0}})}var TS=L('<div class="select-icon s-1x"><!></div>'),IS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function fc(t){Y(t,IS);var e=TS(),i=C(e);Xm(i,{}),S(e),$(t,e)}var ES=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},kS=(t,e)=>{Rl(t,()=>e.item.selectItem(e.item.value))},PS=L("<p> </p>"),AS=L('<p class="sublabel s-1s"> </p>'),LS=L('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),MS={hash:"s-1s",code:".menu-item-value.s-1s{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1s{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1s,.sublabel.s-1s{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1s{opacity:.5}"};function Zm(t,e){B(e,!0),Y(t,MS);let i=h(e,"isMobile",3,!1);var o=LS();let r;o.__click=[ES,e],o.__keydown=[kS,e];var a=C(o);{var l=y=>{fc(y,{})};V(a,y=>{e.item.selected&&y(l)})}var d=P(a,2);let s;var u=C(d);{var f=y=>{var b=Le(),w=ce(b);Mi(w,()=>e.item.valueComponent,(I,T)=>{T(I,ts(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),$(y,b)},p=y=>{var b=PS();let w;var I=C(b,!0);S(b),D(T=>{var N;w=ne(b,1,"label s-1s",null,w,T),me(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),$(y,b)};V(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=P(u,2);{var _=y=>{var b=AS(),w=C(b,!0);S(b),D(()=>me(w,e.item.sublabel)),$(y,b)};V(v,y=>{e.item.sublabel&&y(_)})}S(d),S(o),D((y,b,w)=>{var I;r=ne(o,1,"item",null,r,y),Me(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Me(o,"aria-label",b),Me(o,"data-testid",e.item.dataTestid),s=ne(d,1,"menu-item-value s-1s",null,s,w),Me(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,b;return(b=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?b:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),$(t,o),H()}Ye(["click","keydown"]);var VS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Jm(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(()=>b=>Vu(b,n(r)));var l=VS();let d;l.__click=function(...b){var w;(w=n(r))==null||w.apply(this,b)},l.__keydown=function(...b){var w;(w=n(a))==null||w.apply(this,b)};var s=C(l);{var u=b=>{fc(b,{})};V(s,b=>{e.item.selected&&b(u)})}var f=P(s,2);let p;var v=C(f);{var _=b=>{var w=Le();let I=m(()=>e.item.valueComponent);var T=ce(w);Mi(T,()=>n(I),(N,A)=>{A(N,ts(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),$(b,w)},y=b=>{var w=ps();D(()=>me(w,e.item.label)),$(b,w)};V(v,b=>{e.item.valueComponent?b(_):b(y,!1)})}S(f),S(l),Xe(l,b=>o(o()[e.item.id]=b,!0),()=>{var b;return(b=o())==null?void 0:b[e.item.id]}),D((b,w)=>{var I;d=ne(l,1,"item",null,d,b),Me(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Me(l,"data-testid",e.item.id),p=ne(f,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),$(t,l),H()}Ye(["click","keydown"]);var os={"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 NS=(t,e)=>{M_(t,e.returnFromSubMenu,e.closeSettingsMenu)},DS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},OS=(t,e)=>{Dd(t)&&(Mr(t),e.returnFromSubMenu())},BS=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1k"> </p></li> <!></ul></div>'),HS={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),Y(t,HS);let[i,o]=De(),r=()=>x(p,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>j("aria_label_submenu_back")),u=h(e,"listRef",15);Lt(()=>{let Z=e.items.findIndex(oe=>oe.selected);u().children[Z+1].focus()});let f=he(),p=f.ui.isFullscreen,v=f.ui.playerSize,_=q(void 0),y=q(0),b=q(0),w=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(b)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var T=BS();let N;var A=C(T);let E;A.__keydown=[NS,e];var k=C(A);let Q;k.__click=[DS,e],k.__keydown=[OS,e];var F=C(k);Lr(F,{direction:"left"});var z=P(F,2),X=C(z,!0);S(z),S(k),Xe(k,Z=>R(_,Z),()=>n(_));var se=P(k,2);_i(se,17,()=>e.items,bd,(Z,oe)=>{var J=Le(),Ce=ce(J);{var pe=_e=>{Zm(_e,{get item(){return n(oe)},get isMobile(){return l()}})},ee=(_e,we)=>{{var ve=ue=>{Jm(ue,{get isMobile(){return l()},get item(){return n(oe)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};V(_e,ue=>{n(oe).type==="OPEN_SUB_MENU"&&ue(ve)},we)}};V(Ce,_e=>{n(oe).type==="SELECT_VALUE"?_e(pe):_e(ee,!1)})}$(Z,J)}),S(A),Xe(A,Z=>u(Z),()=>u()),S(T),D((Z,oe,J)=>{N=ne(T,1,"sub-menu menu s-1k",null,N,Z),Me(T,"data-testid",`${e.id}-sub-menu`),Ke(T,`min-width: ${n(I)}px`),E=ne(A,1,"items s-1k",null,E,oe),Ke(A,n(w)),Q=ne(k,1,"item header back s-1k",null,Q,J),Me(k,"aria-label",s()),me(X,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),kn(k,"clientWidth",Z=>R(y,Z)),kn(k,"clientHeight",Z=>R(b,Z)),$(t,T),H(),o()}Ye(["keydown","click"]);import{noop as FS}from"@vkontakte/videoplayer-shared/es2018";var US=(t,e)=>Vu(t,e()),zS=(t,e)=>{t.stopPropagation(),e()()},WS=L('<div class="value s-1l"> </div>'),KS=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),qS={hash:"s-1l",code:".value.s-1l{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function iv(t,e){B(e,!0),Y(t,qS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,FS),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=KS();let s;d.__click=[zS,o],d.__keydown=[US,o];var u=C(d),f=C(u);{var p=T=>{Ka(T,{get icon(){return e.icon}})},v=T=>{var N=Le();let A=m(()=>e.icon);var E=ce(N);Mi(E,()=>n(A),(k,Q)=>{Q(k,ts(a))}),$(T,N)};V(f,T=>{typeof e.icon=="string"?T(p):T(v,!1)})}S(u);var _=P(u,2),y=C(_,!0);S(_);var b=P(_,2);{var w=T=>{var N=Le();let A=m(r);var E=ce(N);Mi(E,()=>n(A),(k,Q)=>{Q(k,{})}),$(T,N)},I=T=>{var N=WS(),A=C(N,!0);S(N),D(()=>me(A,e.value)),$(T,N)};V(b,T=>{r()?T(w):T(I,!1)})}S(d),Xe(d,T=>l(T),()=>l()),D(T=>{s=ne(d,1,"item",null,s,T),Me(d,"aria-label",e.ariaLabel),Me(d,"data-testid",e.id),me(y,e.label)},[()=>({mobile:i()})]),$(t,d),H()}Ye(["click","keydown"]);import{noop as gb}from"@vkontakte/videoplayer-shared/es2018";var QS=(t,e)=>{Rl(t,()=>e())},GS=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),YS=L('<img class="icon" aria-hidden="true"/>'),jS=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1m"> </div></li>'),XS={hash:"s-1m",code:".label.s-1m{overflow:hidden;text-overflow:ellipsis}"};function ov(t,e){B(e,!0),Y(t,XS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,gb),r=h(e,"closeSettings",3,gb),a=q(!1),l=()=>{R(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=jS();let u;s.__click=d,s.__keydown=[QS,d];var f=C(s),p=C(f);{var v=w=>{var I=Le(),T=ce(I);{var N=E=>{var k=GS();$(E,k)},A=E=>{var k=YS();D(()=>Me(k,"src",e.icon)),dt("error",k,l),ka(k),$(E,k)};V(T,E=>{n(a)?E(N):E(A,!1)})}$(w,I)},_=w=>{var I=Le();let T=m(()=>e.icon);var N=ce(I);Mi(N,()=>n(T),(A,E)=>{E(A,{})}),$(w,I)};V(p,w=>{typeof e.icon=="string"?w(v):w(_,!1)})}S(f);var y=P(f,2),b=C(y,!0);S(y),S(s),D(w=>{var I;u=ne(s,1,"item",null,u,w),Me(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Me(s,"data-testid",e.id),me(b,e.label)},[()=>({mobile:i()})]),$(t,s),H()}Ye(["click","keydown"]);import{noop as eC}from"@vkontakte/videoplayer-shared/es2018";var ZS=L('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),JS={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 nv(t,e){Y(t,JS);let i=h(e,"enabled",3,!1);var o=ZS(),r=C(o);let a;ai(2),S(o),D(l=>a=ne(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),$(t,o)}var tC=(t,e,i)=>{V_(t,e(),o=>i()(o))},iC=(t,e,i)=>{t.stopPropagation(),e()(!i())},oC=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),nC=L('<li role="menuitem" tabindex="0"><!></li>');function rv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,eC),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=nC();let s;d.__click=[iC,o,r],d.__keydown=[tC,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:(f,p)=>{var v=oC();let _;var y=C(v),b=C(y);{var w=E=>{Ka(E,{get icon(){return e.icon}})},I=E=>{var k=Le();let Q=m(()=>e.icon);var F=ce(k);Mi(F,()=>n(Q),(z,X)=>{X(z,{})}),$(E,k)};V(b,E=>{typeof e.icon=="string"?E(w):E(I,!1)})}S(y);var T=P(y,2),N=C(T,!0);S(T);var A=P(T,2);nv(A,{get enabled(){return r()}}),S(v),D(E=>{_=ne(v,1,"switch-wrapper",null,_,E),me(N,e.label)},[()=>({mobile:i()})]),$(f,v)},$$slots:{default:!0}}),S(d),D(f=>{var p;s=ne(d,1,"item switch-item",null,s,f),Me(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Me(d,"data-testid",e.id)},[()=>({mobile:i()})]),$(t,d),H()}Ye(["click","keydown"]);import{isValidURL as kC,VideoQuality as Ib}from"@vkontakte/videoplayer-shared/es2018";var hb=()=>{let t=q(si([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{R(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{R(t,[],!0)}}};import{getVideoQualityLabel as rC}from"@vkontakte/videoplayer-shared/es2018";var sC=L('<div class="quality-icon s-1q"><!></div>'),aC=L('<div class="quality-label s-1q"><span> </span> <!></div>'),lC={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 Za(t,e){B(e,!0),Y(t,lC);let i=h(e,"isSubCase",3,!1),o=m(()=>e.quality?rC(e.quality):""),r=m(()=>Hu(e.quality));var a=aC(),l=C(a);let d;var s=C(l,!0);S(l);var u=P(l,2);{var f=p=>{var v=sC();let _=m(()=>n(r));var y=C(v);Mi(y,()=>n(_),(b,w)=>{w(b,{})}),S(v),D(()=>Me(v,"data-testid",`${n(o)}-icon`)),$(p,v)};V(u,p=>{n(r)&&!e.isMobile&&p(f)})}S(a),D(p=>{d=ne(l,1,"s-1q",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),$(t,a),H()}import{VideoQuality as dC}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as _b}from"@vkontakte/videoplayer-core/es2018";var bb=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},$b=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=bb({quality:t,availableQualities:e});return i?t===_b.INVARIANT?j("auto_quality_invariant"):j("auto_quality",{actual:o}):o},yb=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===_b.INVARIANT?i:`${i}${bb({quality:t,availableQualities:e})}`:"...";var cC=L('<div class="menu-item-value-wrapper s-1t"><!></div>'),uC={hash:"s-1t",code:".menu-item-value-wrapper.s-1t{line-height:normal}"};function Ql(t,e){B(e,!0),Y(t,uC);let[i,o]=De(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(f,"$isMobile$",i),d=he(),s=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&r()!==dC.INVARIANT?p:"")),_=m(()=>yb({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=cC(),b=C(y);let w=m(()=>e.selected?r():void 0);Za(b,{get quality(){return n(w)},get label(){return n(_)},get isMobile(){return l()},isSubCase:!0}),S(y),$(t,y),H(),o()}var pC=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")},fC={br:!0,span:!0},sv=(t,e={})=>{var d,s,u,f,p,v,_;if(!t)return t;let i={...fC,...e},o=Object.keys(i);if(!o.length)return t;let r=pC(o),a=[],l=0;for(let y of t.matchAll(r)){let b=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+b.length;continue}let T=(p=y.groups)!=null&&p.childrenhtml?sv(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?b.replace(new RegExp((_=y.groups)==null?void 0:_.childrenhtml),()=>T||""):b;a.push(t.slice(l,I),N),l=I+b.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function mc(t,e){B(e,!1);let i=h(e,"message",8),o=sv(i());mo();var r=Le(),a=ce(r);{var l=d=>{var s=Le(),u=ce(s);$d(u,()=>o),$(d,s)};V(a,d=>{o&&d(l)})}$(t,r),H()}var mC=L('<p class="quality-applies sublabel s-1u"><!></p>'),vC={hash:"s-1u",code:".quality-applies.s-1u{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),Y(t,vC),mo();var i=mC(),o=C(i);let r=Sn(()=>j("quality_applience",{action:`<span>${j("quality_applience_action")}</span>`}));mc(o,{get message(){return n(r)}}),S(i),$(t,i),H()}var wb=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",label:j("other_quality"),selected:o,valueComponent:Ql,valueComponentParams:{prefix:j("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:j("auto_quality_limit"),valueComponent:e?Ql:void 0,valueComponentParams:{prefix:j("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),Sb=()=>({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:j("high_quality"),valueComponent:t?Ql:void 0,valueComponentParams:{prefix:j("high_quality"),selected:i},sublabel:j("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:j("traffic_saving_quality"),valueComponent:t?Ql:void 0,valueComponentParams:{prefix:j("traffic_saving_quality"),selected:i},sublabel:j("traffic_saving_quality_description")});var tp=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),ip=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=Zd(i))!=null?l:i),o&&i&&r){let d=e.filter(s=>s.label===o&&s.language===i);if(d.length===1)return j("audio_stream_display_language_label",{language:r,label:o});{let s=tp(t,d);return j("audio_stream_display_language_label_index",{language:r,label:o,index:s})}}if(o){let d=e.filter(s=>s.label===o);if(d.length===1)return o;{let s=tp(t,d);return j("audio_stream_display_label_index",{label:o,index:s})}}if(i&&r){let d=e.filter(s=>s.language===i);if(d.length===1)return r;{let s=tp(t,d);return j("audio_stream_display_language_index",{language:r,index:s})}}let a=tp(t,e);return j("audio_stream_display_unknown",{index:a})};var gC={"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:j("submenu_quality"),id:"quality-settings",items:[Sb(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),wb(t)]}},"quality-other-settings":({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"quality-other-settings",title:j("submenu_quality"),closeSettingsMenu:t,items:i.map(r=>({type:"SELECT_VALUE",value:r.value,valueComponent:Za,valueComponentParams:{quality:r.value,label:r.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:r.selected,label:r.displayValue}))}),"quality-appliance":t=>{var i,o,r;let{closeSettingsMenu:e}=t;return{id:"quality-appliance",title:j("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:lv,selected:((i=xu())==null?void 0:i.type)==="auto_quality"},{handler:cv,selected:((o=xu())==null?void 0:o.type)==="traffic_saving"},{handler:dv,selected:((r=xu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-tracks":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-tracks",title:j("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:ip(r,e)}))}),"playback-rate":({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"playback-rate",title:j("submenu_playback_rate"),closeSettingsMenu:t,items:e.map(o=>({type:"SELECT_VALUE",value:o.value,selectItem:i,selected:o.selected,label:o.displayValue}))}),subtitles:({availableSubtitlesList:t,selectSubtitle:e})=>({id:"subtitles",minWidth:164,title:j("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i.value,selectItem:()=>e(i),selected:i.selected,label:i.displayValue,dataTestid:i.value===Ln?"sub_off":void 0}))})},Cb=({subMenuId:t,context:e})=>t?[gC[t](e)]:[];var hC=Ie('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function uv(t){Ze(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=hC();$(e,o)},$$slots:{default:!0}})}var _C=Ie('<path d="M8.3 14.25c1.86 1.9 5.5.02 5.5-3.55V5.64l2.4-.7A2.74 2.74 0 0 0 18 2.37V.64a.75.75 0 0 0-.92-.62l-.26.06C15.88.3 14.93.51 14 .8c-1.33.45-2.03 1.62-2.01 3.08V9c-3.89.2-5.64 3.29-3.7 5.25ZM.9.1a.9.9 0 0 0 0 1.8h8.2a.9.9 0 0 0 0-1.8H.9ZM.9 5.1a.9.9 0 1 0 0 1.8h7.2a.9.9 0 0 0 0-1.8H.9ZM0 11c0-.5.4-.9.9-.9h4.18a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11Z"></path>');function pv(t){Ze(t,{width:"18",height:"15",children:(e,i)=>{var o=_C();$(e,o)},$$slots:{default:!0}})}var bC=Ie('<path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A8 8 0 0 1 11 4.07M5.69 7.1 4.26 5.68A10 10 0 0 0 2.05 11h2.02a8 8 0 0 1 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A8 8 0 0 1 4.07 13zM11 21.95v-2.02a8 8 0 0 1-3.9-1.62l-1.42 1.43A10 10 0 0 0 11 21.95M22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12M10.69 8.58l4.74 2.73a.8.8 0 0 1 0 1.37l-4.74 2.74a.8.8 0 0 1-1.19-.68V9.26a.8.8 0 0 1 1.19-.68"></path>');function fv(t){Ze(t,{testId:"play-speed-icon",children:(e,i)=>{var o=bC();$(e,o)},$$slots:{default:!0}})}var $C=Ie('<path d="M12 2a.9.9 0 01.9.9v10.93l4.56-4.57a.9.9 0 011.28 1.28l-6.1 6.1a.9.9 0 01-1.28 0l-6.1-6.1a.9.9 0 111.28-1.28l4.56 4.57V2.9A.9.9 0 0112 2M4 20a.9.9 0 01.9-.9h14.2a.9.9 0 110 1.8H4.9A.9.9 0 014 20"></path>');function mv(t){Ze(t,{testId:"download-icon",children:(e,i)=>{var o=$C();$(e,o)},$$slots:{default:!0}})}var yC=Ie('<path d="M8.86 2.1h6.28c.67 0 1.2.21 1.68.7l4.38 4.38c.48.48.7 1 .7 1.68v6.28c0 .68-.22 1.2-.7 1.68l-4.38 4.38c-.48.48-1 .7-1.68.7H8.86c-.68 0-1.2-.22-1.68-.7L2.8 16.82c-.48-.48-.7-1-.7-1.68V8.86c0-.68.22-1.2.7-1.68L7.18 2.8c.48-.49 1-.7 1.68-.7m-.44 2L4.1 8.43c-.18.18-.21.24-.21.5v6.17c0 .25.03.31.2.5l4.32 4.3c.18.18.24.21.5.21h6.17c.25 0 .31-.03.5-.2l4.3-4.32c.18-.18.21-.24.21-.5V8.92c0-.25-.03-.31-.2-.5l-4.32-4.3c-.18-.18-.24-.21-.5-.21H8.92c-.25 0-.32.03-.5.2M13 16a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.1-8.1a.9.9 0 0 0-1.8 0v5.2a.9.9 0 1 0 1.8 0z"></path>');function vv(t){Ze(t,{testId:"report-icon",children:(e,i)=>{var o=yC();$(e,o)},$$slots:{default:!0}})}var xC=Ie('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function op(t){Ze(t,{children:(e,i)=>{var o=xC();$(e,o)},$$slots:{default:!0}})}var wC=Ie('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function gv(t){Ze(t,{testId:"info-icon",children:(e,i)=>{var o=wC();$(e,o)},$$slots:{default:!0}})}var SC=L('<div class="menu-item-value-wrapper s-1w"><!></div>'),CC={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function hv(t,e){B(e,!0),Y(t,CC);let[i,o]=De(),r=()=>x(u,"$currentQuality$",i),a=()=>x(f,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),s=he(),u=s.state.currentQuality$,f=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,_=m(()=>$b({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=SC(),b=C(y);Za(b,{get quality(){return r()},get label(){return n(_)},get isMobile(){return d()}}),S(y),$(t,y),H(),o()}var IC={"quality-settings":({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?j("auto_quality_option"):e)||"";return{id:"quality-settings",type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_quality",{actual:o}),icon:Wd,label:j("menu_quality"),value:e,valueComponent:hv,weight:os["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:os["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:j("aria_label_submenu_traffic_saving"),icon:uv,label:j("menu_traffic_saving"),enabled:t,tooltipText:j("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=ip(t,e);return{id:"audio-tracks-settings",weight:os["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_audio_languages",{actual:i}),icon:pv,label:j("menu_audio_languages"),value:i,children:"audio-tracks"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:os["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_rate",{actual:i}),icon:fv,label:j("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:os["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:j("aria_label_menu_subtitle",{actual:t.displayValue}),icon:la,iconProps:{type:"outline"},label:j("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:os.download,type:"CLICK",onClick:t,label:j("download_video_caption"),ariaLabel:j("aria_label_menu_download"),icon:mv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:os.report,type:"CLICK",onClick:t,label:j("menu_report"),ariaLabel:`${j("menu_report")}. ${j("aria_label_new_tab_alert")}`,icon:vv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:os["copy-data"],type:"CLICK",onClick:t,label:j("menu_copy_debug"),ariaLabel:j("menu_copy_debug"),icon:op,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:os["save-trace-info"],type:"CLICK",onClick:t,label:j("menu_save_debug"),ariaLabel:j("menu_save_debug"),icon:op,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:os["debug-info"],type:"CLICK",onClick:t,ariaLabel:j("aria_label_menu_debug_overlay"),label:j("menu_debug_overlay"),icon:gv,isHiddenFor:["desktop"]})},Tb=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>IC[r](e)),...i.map(r=>({...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 PC=(t,e)=>{Mu(t,e)},AC=L('<div><div> </div> <div class="close s-o"></div></div>'),LC=L('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),MC=L("<div><!> <!></div>"),VC={hash:"s-o",code:'.settings-menu-container.mobile.s-o{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-o ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-o .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-o .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-o .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-o .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-o .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-o .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-o{line-height:40px}.settings-menu.desktop.s-o{min-width:300px}.settings-menu-container.s-o .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-o .menu.mobile.hidden{display:none}.settings-menu-container.s-o .menu .item:not(.switch-item),.settings-menu-container.s-o .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-o .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-o .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-o .item:not(.switch-item),.settings-menu.s-o .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-o .item.mobile:not(.switch-item),.settings-menu.s-o .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-o .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-o .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-o .item.header.mobile:where(.s-o){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-o .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-o .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-o .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-o .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-o .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-o{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-o:after,.close.s-o:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-o:before{transform:rotate(45deg)}.close.s-o:after{transform:rotate(-45deg)}'};function vc(t,e){B(e,!0),Y(t,VC);let[i,o]=De(),r=()=>x(He,"$settingsMenuVisible",i),a=()=>x(it,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Fe,"$debugPanelVisible",i),d=()=>x(de,"$isMobile",i),s=()=>x(Te,"$playerSize",i),u=()=>x(ye,"$hasMpegSources$",i),f=()=>x(Re,"$mobileNotReportControlHidden$",i),p=()=>x(ve,"$autoQualityLimitingAvailable$",i),v=()=>x(K,"$availableSubtitlesList$",i),_=()=>x(Ve,"$isLiveWithPlaybackSpeed",i),y=()=>x(ee,"$availableAudioStreams$",i),b=()=>x(O,"$availablePlaybackRates$",i),w=()=>x(pe,"$currentAudioStream$",i),I=()=>x(U,"$currentPlaybackRate$",i),T=()=>x(et,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),A=()=>x(ue,"$isAutoQualityEnabled$",i),E=()=>x(Ge,"$currentSubtitle$",i),k=()=>x(It,"$additionalSettingsMenuItems$",i),Q=()=>x(Qe,"$isAutoQualityAvailable$",i),F=()=>x(we,"$availableQualities$",i),z=()=>x(Ee,"$highQualityEnabled",i),X=h(e,"ref",15,void 0),se=h(e,"playerControlsHeight",3,0),Z=si({}),oe=si({}),J=he(),Ce=Mt(),pe=J.state.audioStream$,ee=J.state.availableAudioStreams$,_e=J.state.currentQuality$,we=J.state.availableQualities$,ve=J.state.autoQualityLimitingAvailable$,ue=J.state.isAutoQualityEnabled$,Qe=J.state.isAutoQualityAvailable$,U=J.state.currentPlaybackRate$,O=J.state.availablePlaybackRates$,Ge=J.state.currentSubtitle$,K=J.state.availableSubtitlesList$,ae=J.state.canDownload,ye=J.state.hasMpegSources$,He=J.ui.settingsMenu.visible$,it=J.ui.settingsMenu.openedByBtnKeyboard$,re=J.ui.settingsMenu.ref$,de=J.ui.isMobile,Re=J.ui.mobileNotReportControlHidden$,Ve=J.state.canChangePlaybackSpeed$,et=J.state.trafficSavingEnabled$,Ee=J.state.highQualityEnabled$,Te=J.ui.playerSize,Fe=J.ui.debugPanelVisible,kt=J.state.isInteractiveTime$,It=J.ui.additionalSettingsMenuItems$,Pt=J.ui.t,st=J.actions.internal.downloadVideo,wt=J.actions.internal.closeSettingsMenu,jt=J.actions.internal.openSettingsSubMenu,Ot=J.actions.internal.closeSettingsSubMenu,Nt=q(!1),zt=q(void 0),G=hb();Oe(()=>{!r()&&G.current&&(Ot(oe[G.current]),G.popAllSubMenus())}),Oe(()=>{r()||R(zt,void 0)}),Oe(()=>{!G.current&&n(zt)&&L_(Z,n(zt))}),Oe(()=>{X()&&re.set(X())});async function Pe(xt){var W;G.pushSubMenu(xt),await uo(),jt(xt,oe[xt]);let Bt=(W=X())==null?void 0:W.firstElementChild;Bt&&Uf(Bt)}function ke(xt){var Bt;xt==null||xt.stopPropagation(),a()||(Bt=e.returnFocus)==null||Bt.call(e),wt(),R(Nt,!1)}function xe(xt,Bt){J.actions.internal.setQuality(xt,{appliesTo:Bt,byUser:!0}),ke()}function Be(xt){J.actions.internal.setAudioStream(xt),ke()}function $e(xt,Bt){J.actions.internal.setTrafficSavingEnabled(xt,Bt),Ce.features.qualityDetailsSubMenuEnabled&&ke()}function St(xt,Bt){J.actions.internal.setHighQualityEnabled(xt,Bt),ke()}function fe(xt){J.actions.internal.setPlaybackRate(xt),ke()}function Ne(xt){J.actions.internal.setSubtitle(xt),ke()}function qe(){st()}function nt(){kC(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function Wt(){Ml(J.actions.internal.getDebugTextData())}let Vt=()=>{let xt=J.actions.internal.getTraceTextData(),Bt=new Blob([...xt],{type:"application/json"}),W=window.URL.createObjectURL(Bt);Ma(W,"vk_player_trace_info","json")};function pi(){Fe.set(!l())}function di(){R(Nt,!0)}function Ci(){R(Nt,!1)}function to(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-se()}px; overflow: auto;`}let ci=m(()=>ae&&u()&&!f()),hi=m(()=>Ce.features.trafficSaving&&!f()&&p()&&!Ce.features.qualityDetailsSubMenuEnabled),$t=m(()=>v().length>0&&!f()),ui=m(()=>!!_()&&!f()),Qi=m(()=>Ce.features.audioLanguages&&y().length>=2&&!f()),ct=m(()=>!f());Lt(()=>kt.subscribe(xt=>{xt&&!d()&&!n(Nt)&&!a()&&ke()}));let Dt=m(()=>{let xt=[n(ct)&&"quality-settings",n(Qi)&&"audio-tracks-settings",n(ui)&&"playback-rate-settings",n($t)&&"subtitles-settings",n(hi)&&"traffic-saving-switch",n(ci)&&"download",Ce.showSupport&&"show-support","copy-data",Ce.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Bt=>!!Bt);return Tb({items:xt,context:{qualityDetailsSubMenuEnabled:Ce.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:b(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:fe,trafficSavingEnabled:T(),toggleTrafficSaving:$e,currentQuality:N()||Ib.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:qe,onCopyDataClick:Wt,onReportProblemClick:nt,onSaveTraceDataClick:Vt,toggleShowDebugInfo:pi},additionalSettingsMenuItems:k()})}),at=m(()=>Cb({subMenuId:G.current,context:{availablePlaybackRates:b(),selectPlaybackRate:fe,trafficSavingEnabled:T(),toggleTrafficSaving:$e,currentQuality:N()||Ib.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:F(),highQualityEnabled:z(),toggleHighQuality:St,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:wt,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:Be,selectQuality:xe,selectSubtitle:Ne}}));var We=MC();let fi;var po=C(We);{var Go=xt=>{var Bt=LC();let W;Bt.__keydown=[PC,wt];var At=C(Bt);{var ni=gt=>{var rt=AC();let Vi;var ki=C(rt),cn=C(ki,!0);S(ki);var un=P(ki,2);un.__click=ke,S(rt),D((Pi,Ri)=>{Vi=ne(rt,1,"item header s-o",null,Vi,Pi),me(cn,Ri)},[()=>({mobile:d()}),()=>Pt("submenu_settings")]),$(gt,rt)};V(At,gt=>{d()&&gt(ni)})}var mt=P(At,2);let Xt;_i(mt,21,()=>n(Dt),gt=>gt.id,(gt,rt)=>{var Vi=Le(),ki=ce(Vi);{var cn=Pi=>{iv(Pi,{get isMobile(){return d()},get id(){return n(rt).id},get icon(){return n(rt).icon},get iconProps(){return n(rt).iconProps},get label(){return n(rt).label},get ariaLabel(){return n(rt).ariaLabel},get value(){return n(rt).value},get valueComponent(){return n(rt).valueComponent},onClick:()=>{Pe(n(rt).children),R(zt,n(rt).id,!0)},get ref(){return Z[n(rt).id]},set ref(Ri){Z[n(rt).id]=Ri}})},un=(Pi,Ri)=>{{var Mn=io=>{let Ti=m(()=>`${n(rt).id}-menu-item`);ov(io,{get isMobile(){return d()},get id(){return n(Ti)},get onClick(){return n(rt).onClick},get icon(){return n(rt).icon},get label(){return n(rt).label},get ariaLabel(){return n(rt).ariaLabel},closeSettings:ke})},go=(io,Ti)=>{{var Lo=Mo=>{let pn=m(()=>`${n(rt).id}-menu-item`);rv(Mo,{get isMobile(){return d()},get id(){return n(pn)},get onClick(){return n(rt).onClick},get icon(){return n(rt).icon},get label(){return n(rt).label},get ariaLabel(){return n(rt).ariaLabel},get enabled(){return n(rt).enabled},get tooltipText(){return n(rt).tooltipText},get maxTooltipWidth(){return n(rt).maxTooltipWidth}})};V(io,Mo=>{n(rt).type==="SWITCH"&&Mo(Lo)},Ti)}};V(Pi,io=>{n(rt).type==="CLICK"?io(Mn):io(go,!1)},Ri)}};V(ki,Pi=>{n(rt).type==="OPEN_SUB_MENU"?Pi(cn):Pi(un,!1)})}$(gt,Vi)}),S(mt),Xe(mt,gt=>X(gt),()=>X()),S(Bt),D((gt,rt,Vi)=>{W=ne(Bt,1,"settings-menu menu s-o",null,W,gt),Xt=ne(mt,1,"items",null,Xt,rt),Ke(mt,Vi)},[()=>({desktop:!d(),mobile:d(),hidden:!!G.current}),()=>({mobile:d()}),to]),dt("mouseenter",Bt,di),dt("mouseleave",Bt,Ci),$(xt,Bt)};V(po,xt=>{r()&&xt(Go)})}var Yo=P(po,2);_i(Yo,17,()=>n(at),xt=>xt.id,(xt,Bt)=>{let W=m(()=>{var At;return(At=n(Bt).minWidth)!=null?At:137});tv(xt,{get isMobile(){return d()},get playerControlsHeight(){return se()},get returnFromSubMenu(){return G.popSubMenu},get id(){return n(Bt).id},get title(){return n(Bt).title},get closeSettingsMenu(){return wt},openSubMenuList:Pe,get items(){return n(Bt).items},get minWidth(){return n(W)},get refMenuItems(){return Z},get listRef(){return oe[n(Bt).id]},set listRef(At){oe[n(Bt).id]=At}})}),S(We),D(xt=>fi=ne(We,1,"settings-menu-container s-o",null,fi,xt),[()=>({mobile:d(),hidden:!r()})]),$(t,We),H(),o()}Ye(["keydown","click"]);var RC=L('<button class="btn s-1d"> </button>'),NC={hash:"s-1d",code:"button.btn.s-1d{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){Y(t,NC);var i=RC();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)),$(t,i)}Ye(["click"]);var DC=L('<div class="container s-q"><div class="notification s-q"><div><p class="description s-q"><!></p> <!></div> <!></div></div>'),OC={hash:"s-q",code:".container.s-q{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px;z-index:var(--controls-container-z-index)}.notification.s-q{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-q{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function gc(t,e){B(e,!0),Y(t,OC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Mt(),{ui:{t:r}}=he(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=DC(),d=C(l),s=C(d),u=C(s),f=C(u);mc(f,{get message(){return a}}),S(u);var p=P(u,2);{var v=y=>{let b=m(()=>r("slow_video_notification_button"));_v(y,{get label(){return n(b)},get onClick(){return e.onSelectAutoQuality}})};V(p,y=>{o||y(v)})}S(s);var _=P(s,2);Rs(_,{get onClick(){return e.onClose}}),S(d),S(l),es(3,d,()=>_s,()=>({duration:i})),$(t,l),H()}import{isIntersecting as Eb,Subscription as BC}from"@vkontakte/videoplayer-shared/es2018";var Ja="annotation",np=class{constructor(e){this.slots=new Map;this.disabledIds=new Set(e)}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var s;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;if(this.disabledIds.has(r))return{success:!1,message:"current slotId is disabled via config"};let d=typeof e=="function"?e():e;return d.setAttribute("slot",Ja),this.setupSlotStyles(d,o),this.shadowRootContainer.append(d),this.slots.set(r,{rootElement:d,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((s=this.store)==null||s.ui.isControlsAvailable.set(!1)),{success:!0}}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}async runHidingControlsWhenIntersected(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let r=this.slots.get(e);if(!r)return;let a=await this.findSlotElement(r.rootElement,i,e),{controls:l,hiddenControls:d}=((f=this.store)==null?void 0:f.ui)||{},s=new MutationObserver(p=>p.forEach(()=>{let v=Ds(a,this.shadowRootContainer);o.forEach(_=>{let y=l==null?void 0:l[_],b=y?be(y):null,w=d==null?void 0:d[_];b&&(w==null||w.set(Eb(b,v)))})}));s.observe(a,{childList:!0,subtree:!0}),r.observer=s;let u=new BC;o.forEach(p=>{l&&u.add(l[p].subscribe(v=>{let _=d==null?void 0:d[p];v&&v.isDisplayed?_==null||_.set(Eb(v,Ds(a,this.shadowRootContainer))):_==null||_.set(!1)}))}),r.subs=u}async findSlotElement(e,i,o){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,_;(_=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||_.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var HC=L('<div class="container s-5"><!></div>'),FC={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 hc(t,e){B(e,!0),Y(t,FC);let i=h(e,"reversed",3,!1);var o=Le(),r=ce(o);As(r,()=>e.Icon,a=>{var l=HC(),d=C(l);Mi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),D(()=>Ke(l,`animation-duration: ${e.duration}ms`)),$(a,l)}),$(t,o),H()}import{PlaybackState as kb}from"@vkontakte/videoplayer-core/es2018";var UC=L('<div class="container s-10"><!></div>'),zC={hash:"s-10",code:".container.s-10{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function bv(t,e){B(e,!0),Y(t,zC);let[i,o]=De(),r=()=>x(s,"$playbackState$",i),a=()=>x(f,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=he(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:_}=Mt(),y=0,b=q(null),w=q(!1);Oe(()=>{r()===kb.PLAYING?R(b,An,!0):r()===kb.PAUSED?R(b,Hs,!0):R(b,null)}),Oe(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,R(b,null)},_),()=>{y&&(window.clearTimeout(y),y=0)}}),Oe(()=>{d()&&!n(w)&&(R(w,!0),R(b,null))});var I=Le(),T=ce(I);{var N=A=>{var E=UC(),k=C(E);hc(k,{get duration(){return _},get Icon(){return n(b)}}),S(E),$(A,E)};V(T,A=>{n(b)&&v&&A(N)})}$(t,I),H(),o()}var WC=L('<div><div data-testid="video-container"></div></div>'),KC={hash:"s-d",code:".video-container.s-d,.video-wrapper.s-d{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-d{background:var(--black)}.video-container.s-d,.video-wrapper.s-d{z-index:var(--video-container-z-index)}.video-container.s-d{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-d{transition:none}.nocursor.s-d{cursor:none}"};function el(t,e){B(e,!0),Y(t,KC);let[i,o]=De(),r=()=>x(p,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(f,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),s=()=>x(_,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:_,chromecastConnected$:y}}=he(),{isSmoothVideoRotate:b}=Mt(),w=m(()=>u()&&r()%180?a().height/a().width:1);var I=WC();let T;I.__contextmenu=function(...E){var k;(k=e.onContextMenu)==null||k.apply(this,E)},I.__mousedown=function(...E){var k;(k=e.onMouseDown)==null||k.apply(this,E)},I.__mouseup=function(...E){var k;(k=e.onMouseUp)==null||k.apply(this,E)},I.__click=function(...E){var k;(k=e.onClick)==null||k.apply(this,E)},I.__dblclick=function(...E){var k;(k=e.onDblClick)==null||k.apply(this,E)};var N=C(I);let A;Xe(N,E=>u(E),()=>u()),S(I),D((E,k)=>{T=ne(I,1,"video-wrapper s-d",null,T,E),A=ne(N,1,"video-container s-d",null,A,k),Ke(N,`transform: rotate(${r()}deg) scale(${n(w)})`),Me(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!b})]),$(t,I),H(),o()}Ye(["contextmenu","mousedown","mouseup","click","dblclick"]);var qC=L('<div><span class="text s-12"> </span> <!></div>'),QC={hash:"s-12",code:".root.s-12{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-12,.root.visible.s-12{transform:translateX(-50%)}.root.visible.s-12{opacity:1;visibility:visible}.text.s-12{font-size:13px;font-weight:600;line-height:16px}"};function $v(t,e){B(e,!0),Y(t,QC);let{ui:{t:i}}=he();var o=qC();let r;var a=C(o),l=C(a,!0);S(a);var d=P(a,2);dc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=ne(o,1,"root s-12",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),$(t,o),H()}var GC=L('<div class="container s-14" role="button" data-testid="preview-track-overlay"><div class="icon s-14"><!></div></div>'),YC={hash:"s-14",code:".container.s-14{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-14,.icon.s-14{align-items:center;display:flex;justify-content:center}.icon.s-14{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-14:hover .icon:where(.s-14){transform:scale(1.15)}"};function yv(t,e){B(e,!1),Y(t,YC);let o=he().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};mo();var l=GC();l.__click=a;var d=C(l),s=C(d);return An(s,{get size(){return"32"}}),S(d),S(l),es(3,l,()=>_s,()=>({duration:r})),$(t,l),pf(e,"handleClick",a),H({handleClick:a})}Ye(["click"]);var jC=L('<div class="container s-15"><div class="notification s-15"><span class="text s-15"> </span></div></div>'),XC={hash:"s-15",code:".container.s-15{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-15{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-15{font-size:14px;font-weight:500;line-height:18px}"};function xv(t,e){B(e,!1),Y(t,XC);let{ui:{t:i}}=he();mo();var o=jC(),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")],Sn),es(3,r,()=>_s,()=>({duration:340})),$(t,o),H()}var ZC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},JC=L("<div><!></div>"),eT=L('<div class="spherical-video-icon s-7"><!></div>'),tT=L("<div><!></div>"),iT=L('<div class="settings-menu s-7"><!></div>'),oT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),nT=L("<!> <!> <!>",1),rT=L('<div class="blocked s-7"></div>'),sT=L('<div class="player-wrapper s-7"><!> <div class="overlay-container"></div></div> <!>',1),aT={hash:"s-7",code:".blocked.s-7,.player-wrapper.s-7{height:100%;position:absolute;width:100%}.blocked.s-7{z-index:var(--overlay-container-z-index)}.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-menu.s-7{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),Y(t,aT);let[i,o]=De(),r=()=>x(Br,"$notificationsToShow$",i),a=()=>x(hi,"$playerPhase",i),l=()=>x(Go,"$isLoaderVisible",i),d=()=>x(Ci,"$adPlaybackState",i),s=()=>x(mt,"$crashed",i),u=()=>x(Ri,"$isInteractiveTime$",i),f=()=>x(ct,"$settingsMenuVisible",i),p=()=>x(Mn,"$isInteractiveExpectation$",i),v=()=>x(Qi,"$controlsVisible",i),_=()=>x(io,"$touched",i),y=()=>x(ns,"$graphIsOpened$",i),b=()=>x($t,"$isFullscreen",i),w=()=>x(Zn,"$autoplayNextEnabled$",i),I=()=>x(W,"$postrollPassed",i),T=()=>x(Yo,"$isEnded$",i),N=()=>x(gn,"$cursorInside",i),A=()=>x(fn,"$isControlsAvailable",i),E=()=>x(fr,"$doubleForwardOn$",i),k=()=>x(Jn,"$fakeIsPlaying$",i),Q=()=>x(Dn,"$bottomNoSmooth",i),F=()=>x(Vr,"$interactiveTimeIndicator",i),z=()=>x(ki,"$playerSize",i),X=()=>x(cn,"$is3DVideo",i),se=()=>x(mr,"$doubleForwardAvailable$",i),Z=()=>x(fi,"$contextMenuVisible$",i),oe=()=>x(di,"$playbackState$",i),J=()=>x(Ti,"$hotKeyMapData",i),Ce=()=>x(at,"$scrubbingInProgress",i),pe=()=>x(We,"$volumeChangingInProgress",i),ee=()=>x(xt,"$chromecastConnected$",i),_e=()=>x(On,"$controlsTimeoutActive",i),we=()=>x(Dt,"$settingsMenuOpenedByKeyboard",i),ve=()=>x(So,"$contextMenuOpenedByKeyboard$",i),ue=()=>x(Bo,"$contextMenuOpenedByHotKey$",i),Qe=()=>x($n,"$contextMenuButtonRef$",i),U=()=>x(or,"$contextMenuLastActiveElem$",i),O=()=>x(ui,"$isFullscreenOpenedByKeyboard",i),Ge=()=>x(Mo,"$positionExact$",i),K=()=>x(pi,"$language$",i),ae=()=>x(Cr,"$previewTrackActive$",i),ye=()=>x(un,"$icon3DVideoVisible",i),He=()=>x(Bt,"$chromecastDeviceName$",i),it=()=>x(rt,"$currentSubtitle$",i),re=()=>x(Vi,"$currentSubtitleCaptions$",i),de=()=>x(to,"$position$",i),Re=()=>x(ci,"$duration$",i),Ve=()=>x(At,"$isLive$",i),et=()=>x(ni,"$isPlaying$",i),Ee=()=>x(Nr,"$contextMenuPosition$",i),Te=()=>x(jo,"$previewTrackNotificationVisible$",i),Fe=()=>x(Lo,"$showHotKeyMap",i),kt=()=>x(po,"$debugPanelVisible",i),It=()=>x(Or,"$userActionsDisabled$",i),Pt=h(e,"videoContainer",15),st=h(e,"adsSlotId",3,void 0),wt=h(e,"adsParams",3,void 0),jt=h(e,"adsAutoplayParam",3,void 0),Ot=h(e,"duration",3,void 0),Nt=h(e,"logoTargetUrl",3,""),zt=h(e,"showNextPrevButtons",3,!1),G=h(e,"nextButtonActive",3,!1),Pe=h(e,"prevButtonActive",3,!1),ke=h(e,"endScreenVideoTitle",3,void 0),xe=h(e,"endScreenVideoThumb",3,void 0),Be=h(e,"isOneVideoPlaylist",3,!1),$e=h(e,"shadowRootContainer",3,void 0),St=h(e,"outerContainerRef",3,void 0),fe=h(e,"playerStarted",3,!1),Ne=h(e,"fullScreenTarget",3,void 0),qe=h(e,"showMiniTimer",3,!1),nt=h(e,"showEndScreen",3,!0),Wt=h(e,"keyboardControls",15),Vt=e.store.getLogger().createComponentLog("Root component"),pi=e.store.interfaceLanguage$,di=e.store.state.playbackState$,Ci=e.store.ads.playbackState,to=e.store.state.positionWithScrubbing$,ci=e.store.state.duration$,hi=e.store.playerPhase,$t=e.store.ui.isFullscreen,ui=e.store.ui.isFullscreenOpenedByKeyboard,Qi=e.store.ui.controlsVisible,ct=e.store.ui.settingsMenu.visible$,Dt=e.store.ui.settingsMenu.openedByBtnKeyboard$,at=e.store.ui.scrubbingInProgress,We=e.store.ui.volumeChangingInProgress,fi=e.store.ui.contextMenu.visible$,po=e.store.ui.debugPanelVisible,Go=e.store.state.isLoaderVisible,Yo=e.store.state.isEnded$,xt=e.store.state.chromecastConnected$,Bt=e.store.state.chromecastDeviceName$,W=e.store.ads.postrollPassed,At=e.store.state.isLive$,ni=e.store.state.isPlaying$,mt=e.store.state.crashed$,Xt=e.store.webApi.annotationsApi,gt=e.store.webApi.pictureInPictureApi,rt=e.store.state.currentSubtitle$,Vi=e.store.state.currentSubtitleCaptions$,ki=e.store.ui.playerSize,cn=e.store.ui.is3DVideo,un=e.store.ui.icon3DVideoVisible,Pi=e.store.state.isInteractive,Ri=e.store.state.isInteractiveTime$,Mn=e.store.state.isInteractiveExpectation$,go=e.store.state.hasInteractiveBranches,io=e.store.ui.touched,Ti=e.store.ui.modals.hotKeyMap.data,Lo=e.store.ui.modals.hotKeyMap.show,Mo=e.store.state.positionExact$,pn=e.store.ui.overlayContainer$,Vr=e.store.ui.controls.interactiveTimeIndicator,Rr=e.store.state.showInteractiveTimeIndicator,Nr=e.store.ui.contextMenu.position$,bs=e.store.actions.internal.setQuality,Dr=e.store.actions.internal.closeSettingsMenu,Zn=e.store.ui.autoplayNextEnabled$,Or=e.store.ui.userActionsDisabled,fn=e.store.ui.isControlsAvailable,mn=e.store.ui.videoTitleInfo,fr=e.store.ui.doubleForwardOn$,mr=e.store.ui.doubleForwardAvailable$,jo=e.store.ui.previewTrackNotificationVisible,vr=e.store.actions.internal.getVideoElement,gr=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:Jn,notifications$:Vn,graphIsOpened$:ns}=vo(),Vo=q(void 0),hr=q(void 0),Ni=q(void 0),_r=q(void 0),Rn,ft,Zt;Ti.set(w_());let{closeNotification:br,notificationsToShow$:Br}=Vn,Hr=m(()=>!!r().slow_video),Nn=()=>br("slow_video"),er=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),ho=q(void 0),Dn=le(!1),tr,On=le(!1),vn=le(),gn=le(!1),hn=q(!1),Xo=q(!1),Di=q(!1),Gi=q(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Zo=m(()=>u()&&!f()&&!(n(hn)||n(Xo))&&!(n(Di)&&!p())),ir=!0,$r=m(()=>e.uiConfig.features.thumbTimer&&qe()&&a()==="video"&&!v()&&!s()&&!Pi&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),_n=e.uiConfig.titleShowBehaviour,yr=m(()=>!["video","thumb"].includes(a())||_n==="never"||y()?!1:_n==="fullscreen"?b():!0),ut=m(()=>_n==="always"||a()==="thumb"?!1:!v()),yt=q(!1),oo=m(()=>(nt()||e.showAutoplayNext&&w())&&!!ke()&&!!xe()&&(e.showAds&&I()||!e.showAds)&&T()&&!s()&&!n(yt)&&!go),fo=m(()=>N()&&!(v()||n(oo))&&!u()&&A()&&!E()),Jo=q(!1),_o=m(()=>k()!==null),{toggle:bo}=Jn,Ii=!1,$o=null;gt==null||gt.setContext(od());let Fr=()=>{e.autoplay&&!Pi&&e.uiConfig.controls.showOnStartupAtAutoplay&&Oi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Fr});let xr=()=>{window.clearTimeout(Rn),On.set(!1)},$s=()=>{window.clearTimeout(ft),vn.set(null)},Oi=ge=>{xr(),On.set(!0),Rn=window.setTimeout(()=>On.set(!1),ge);let ht=ge-100;tr=window.setTimeout(()=>{Q()&&Dn.set(!1)},ht>0?ht:ge)},ys=(ge,ht)=>{$s(),vn.set(ht),ft=window.setTimeout(()=>vn.set(null),ge)},rs=cn.subscribe(ge=>{un.set(ge),ge&&(window.clearTimeout(Zt),Zt=window.setTimeout(()=>un.set(!1),e.uiConfig.controls.hide360IconTimeout))}),wr=async()=>{var ht,Jt,Gt,To;let ge=oa();if(ge){let ro=Ad(),Ho=en();ge=ro===Ho||ro===$e()}if(ge){Oi(e.uiConfig.controls.hideTimeoutFullscreen);try{await(gt==null?void 0:gt.exit())}catch(ro){Vt({message:String(ro)})}}$t.set(ge),e.store.getAdmanWrapper().setFullscreen(ge),b()?(Jt=(ht=e.store.callbacks)==null?void 0:ht.onFullscreenEnter)==null||Jt.call(ht):(To=(Gt=e.store.callbacks)==null?void 0:Gt.onFullscreenExit)==null||To.call(Gt)},Ro=ge=>{let{width:ht,height:Jt}=ge.target;ki.set({width:ht,height:Jt})},Ur=()=>{let{width:ge,height:ht}=n(Vo).getBoundingClientRect();ki.set({width:ge,height:ht})};Lt(()=>{var ht;return Au(wr),e.uiConfig.features.annotationsInside&&(Xt==null||Xt.init(n(Vo))),Na(gt)&&(gt==null||gt.assignPlayerContainer(n(Vo)),gt==null||gt.setExternalEventHandlers({resize:Ro,leavepictureinpicture:Ur})),e.interactiveContainer&&((ht=Pt().parentElement)==null||ht.insertBefore(e.interactiveContainer,Pt().nextSibling)),()=>{window.clearTimeout(Rn),window.clearTimeout(tr),window.clearTimeout(ft),window.clearTimeout(Zt),rs(),gt==null||gt.dispose().catch(Jt=>{Vt({message:String(Jt)})}),Lu(wr)}});let en=()=>{let ge=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!St()?n(Vo):St(),ht=ge.getRootNode(),Jt=ht instanceof ShadowRoot?ht.host:ht,Gt=Ne()instanceof HTMLElement&&Ne().contains(Jt);return e.uiConfig.allowChangingFullscreenTarget&&Ne()&&Gt?Ne():ge},tn=()=>{fi.set(!1)},Ue=()=>{Dr(),tn()},Ct=async()=>{if(!gr()){Vt({message:"fullscreen disabled"});return}tn(),oa()?(await Pu(document),Vt({message:"exit fullscreen"})):(Vt({message:"request fullscreen"}),await ku(en()))},li=ge=>{y()||(ge.preventDefault(),fi.set(!0),Nr.set({left:ge.clientX,top:ge.clientY}))};function No(){gn.set(!0),Pi||Oi(e.uiConfig.controls.hideTimeoutCursor)}function yo(ge){var To,ro;let{relatedTarget:ht}=ge,Gt=!!(ht&&((To=n(Ni))!=null&&To.contains(ht)))&&((ro=Wt())==null?void 0:ro.isFocused());!Pi&&!Gt&&(Dn.set(!0),Oi(e.uiConfig.controls.hideTimeoutCursor))}function Do(){gn.set(!1),R(Xo,!1),R(hn,!1),Ii=!1,e.store.actions.internal.releaseCamera(),Oi(e.uiConfig.controls.hideTimeout),E()&&Oo()}function Bi(ge){return ge?ge.offsetTop+Bi(ge.offsetParent):0}function xo(ge){return ge?ge.offsetLeft+xo(ge.offsetParent):0}function Bn(ge){if(F()&&Rr){let ht=ge.currentTarget,Jt=Bi(ht),Gt=xo(ht),To=ge.pageX-Gt,ro=ge.pageY-Jt,{left:Ho,bottom:Cs,right:Kr}=F(),Tr=Kr-Ho;return To>=Ho-Tr&&ro<=Cs+Tr}}function Sr(ge){if(n(Vo)){let ht=Bi(ge.currentTarget),Jt=z().height,Gt=ge.pageY-ht;if(Bn(ge)){R(Xo,!1);return}Gt<40?R(Xo,!0):Gt>Jt-40?R(hn,!0):(R(Xo,!1),f()||R(hn,!1))}}function wo(ge){Sr(ge),!n(Zo)&&!E()&&Oi(e.uiConfig.controls.hideTimeoutCursor),X()&&Ii&&$o&&e.store.actions.internal.moveCameraFocusPX($o.clientX-ge.clientX,$o.clientY-ge.clientY,ge.timeStamp-$o.timeStamp),$o=ge}let no=null,bn=()=>{no=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),xr()},e.uiConfig.doubleForwardActivationTime)},Oo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),no&&clearTimeout(no),no=null},Hn=ge=>{ge.preventDefault(),ge.button===0&&(Ii=!0,e.store.actions.internal.holdCamera(),se()&&bn()),!Ii&&Oi(e.uiConfig.controls.hideTimeoutCursor)},zr=ge=>{ge.preventDefault(),ge.button===0&&($o=ge,Ii=!1,e.store.actions.internal.releaseCamera()),!E()&&Oi(e.uiConfig.controls.hideTimeoutCursor)},Wr=ge=>{ge.preventDefault(),ir&&(Vt({message:"double click on video"}),Ct(),Oi(e.uiConfig.controls.hideTimeoutCursor))},Fn=ge=>{var ht;if(ge.preventDefault(),E()){Oo();return}if(no&&Oo(),Z()||f()){Ue();return}if(!(T()&&!go)){if(n(_o))return bo();if((ht=Wt())==null||ht.focus(),!fe()){e.firstStart(),Oi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||oe()!==Ab.PLAYING)&&e.store.actions.internal.togglePlay(),Oi(e.uiConfig.controls.hideTimeoutCursor)}},Je=ge=>{Ue(),io.set(!0),Oi(e.uiConfig.controls.hideTimeout),ge&&ys(e.uiConfig.controls.hideHotKeyHelpers,ge)},Yt=()=>{var ge,ht;Ue(),(ge=e.store.callbacks)!=null&&ge.onOpenHotKeyMap?(ht=e.store.callbacks)==null||ht.onOpenHotKeyMap(J()):Lo.update(Jt=>!Jt)},bi=()=>{io.set(!0)},So=e.store.ui.contextMenu.openedByBtnKeyboard$,$n=e.store.ui.contextMenu.btnRef$,Un=q(void 0),Bo=e.store.ui.contextMenu.openedByHotKey$,or=e.store.ui.contextMenu.lastActiveElem$,ss=q(!1),Cr=e.store.ui.previewTrackActive;Oe(()=>{pn.set(n(ho))}),Oe(()=>{R(Di,n(Gi)&&oe()!==Ab.PLAYING,!0),n(Gi)||Tt(()=>R(Gi,!0))}),Oe(()=>{var ht,Jt;let ge=(n(Di)||T()||f()||Ce()||pe()||ee()||_e()||n(ss))&&!n(Zo)&&(a()==="video"||a()==="ads")&&!s()&&A();Qi.set(ge),!ge&&!_e()&&((ht=n(Ni))!=null&&ht.contains(Bu()))&&((Jt=Wt())==null||Jt.focus())}),Oe(()=>{!Ce()&&n(Jo)&&!u()&&Oi(e.uiConfig.controls.hideTimeoutCursor),Tt(()=>R(Jo,Ce(),!0))}),Oe(()=>{n(_r),f(),we(),Tt(()=>Od(n(_r),f(),we()))}),Oe(()=>{n(Un),Z(),ve(),ue(),Tt(()=>{let ge=ve()||ue();Od(n(Un),Z(),ge)})}),Oe(()=>{let ge=Qe();ge&&(Z(),Tt(()=>Vl(ge,Z(),So)))}),Oe(()=>{let ge=U();ge&&(Z(),Tt(()=>A_(ge,Z(),Bo)))}),Oe(()=>{var ge;!O()&&b()&&(Tt(()=>ui.set(!1)),(ge=Wt())==null||ge.focus())}),Oe(()=>{y()&&Ue()});let xs=q(void 0),Us=ge=>{mn.set(jn(vr(),{title:n(xs)},"title",ge))},ua=(ge,ht)=>{var ro,Ho;let Jt=(Ho=(ro=e.store.callbacks)==null?void 0:ro.uiInfo)==null?void 0:Ho.onUpcomingLiveViewStateChanged;if(!Jt)return;let Gt=!!ht,To={...jn(n(Vo),{upcomingLiveScreen:ht},"upcomingLiveScreen",Gt),...ge};Jt(To)},lt="",ri=m(()=>{var ge;return n(ut)?lt:(ge=e.getVideoDeeplink)==null?void 0:ge.call(e,Ge())});Oe(()=>{lt=n(ri)});var Co=sT();dt("blur",Ca,Ue);var $i=ce(Co);$i.__mousemove=wo;var yn=C($i);let xn=m(()=>a()==="ads"),ws=m(()=>n(_o)?bo:void 0);Xe(Gf(yn,{startDoubleForwardActivationTimer:bn,stopDoubleForward:Oo,toggleFullscreen:Ct,hideContextMenu:Ue,showHotKeyHelpers:Je,showKeyMap:Yt,get isAds(){return n(xn)},get fakePlayButtonHandler(){return n(ws)},get nextButtonActive(){return G()},get prevButtonActive(){return Pe()},children:(ge,ht)=>{var Jt=nT(),Gt=ce(Jt);el(Gt,{get hideCursor(){return n(fo)},onClick:Fn,onContextMenu:li,onMouseDown:Hn,onMouseUp:zr,onDblClick:Wr,get videoContainer(){return Pt()},set videoContainer(Ho){Pt(Ho)}});var To=P(Gt,2);Aa(To,()=>"slot",!1,(Ho,Cs)=>{Zi(Ho,()=>({name:Ja}))});var ro=P(To,2);As(ro,K,Ho=>{var Cs=oT(),Kr=ce(Cs);let Tr=m(()=>a()!=="thumb"||s()||Pi&&e.autoplay);ja(Kr,{get hidden(){return n(Tr)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:li,onClick:tn});var pa=P(Kr,2);{var zs=ze=>{yv(ze,{})};V(pa,ze=>{ae()&&ze(zs)})}var fa=P(pa,2);bv(fa,{});var qr=P(fa,2);$v(qr,{get isVisible(){return E()}});var wn=P(qr,2);{var tl=ze=>{let gi=m(()=>{var so;return(so=e.live)==null?void 0:so.startTime});pc(ze,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(gi)},onUpcomingLiveViewStateChanged:ua,onContextMenu:li,onClick:tn})};V(wn,ze=>{a()==="LiveWaitingStart"&&ze(tl)})}var ma=P(wn,2);{var Qr=ze=>{Xa(ze,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:li,onClick:tn})};V(ma,ze=>{a()==="LiveWaitingRecover"&&ze(Qr)})}var il=P(ma,2);{var jl=ze=>{Xa(ze,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:li,onClick:tn})};V(il,ze=>{a()==="LiveWaitingRecord"&&ze(jl)})}var va=P(il,2);{var Xl=ze=>{var gi=JC();let so;var Ir=C(gi);Md(Ir,{get adsSlotId(){return st()},get adsParams(){return wt()},get adsAutoplayParam(){return jt()},get duration(){return Ot()},get adsExternalApi(){return e.adsExternalApi}}),S(gi),D(on=>so=ne(gi,1,"ads-container s-7",null,so,on),[()=>({hidden:a()!=="ads"})]),$(ze,gi)};V(va,ze=>{e.showAds&&fe()&&ze(Xl)})}var ol=P(va,2);{var nl=ze=>{let gi=m(()=>!nt()&&e.showAutoplayNext&&w());Kf(ze,{get title(){return ke()},get thumb(){return xe()},get isHide(){return n(gi)},clickCloseIcon:()=>R(yt,!0)})};V(ol,ze=>{n(oo)&&ke()&&xe()&&ze(nl)})}var ga=P(ol,2);{var pt=ze=>{let gi=m(()=>b()?"md":"sm"),so=m(()=>{var Ir;return(Ir=e.store.callbacks)==null?void 0:Ir.onTitleClicked});Ym(ze,{get title(){return e.title},get isHidden(){return n(ut)},onVisibilityChanged:Us,get titleLinkHref(){return n(ri)},onMouseEnter:()=>{R(ss,!0)},onMouseLeave:()=>{R(ss,!1)},get size(){return n(gi)},get onTitleClicked(){return n(so)},get ref(){return n(xs)},set ref(Ir){R(xs,Ir,!0)}})};V(ga,ze=>{n(yr)&&ze(pt)})}var ot=P(ga,2);{var Yi=ze=>{let gi=m(()=>a()==="video"&&v());cc(ze,{get isShifted(){return n(gi)}})};V(ot,ze=>{X()&&ze(Yi)})}var Io=P(ot,2);{var ji=ze=>{var gi=eT(),so=C(gi);Pd(so,{}),S(gi),$(ze,gi)};V(Io,ze=>{ye()&&ze(ji)})}var vi=P(Io,2);{var Fi=ze=>{uc(ze,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return He()},onClick:Fn,onContextMenu:li,onDblClick:Wr})};V(vi,ze=>{ee()&&ze(Fi)})}var Ws=P(vi,2);{var Zl=ze=>{Ga(ze,{get shifted(){return v()},get captions(){return re()},get position(){return de()},get playerSize(){return z()}})};V(Ws,ze=>{it().value!=="off"&&ze(Zl)})}var kc=P(Ws,2);{var gp=ze=>{var gi=tT();gi.__contextmenu=li,gi.__click=[ZC,Z,fi,f,ct,Ue];var so=C(gi);Ya(so,{}),S(gi),$(ze,gi)};V(kc,ze=>{s()&&ze(gp)})}var Pc=P(kc,2);{var hp=ze=>{let gi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),so=m(()=>a()==="ads"),Ir=m(()=>e.canRewindLive&&Re()!==0);lc(ze,{get bottomHidden(){return n(gi)},get bottomNoSmooth(){return Q()},get showControls(){return v()},get isAds(){return n(so)},get canRewindLive(){return n(Ir)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Nt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return zt()},get nextButtonActive(){return G()},get prevButtonActive(){return Pe()},get isOneVideoPlaylist(){return Be()},customFullscreenSupported:ir,toggleFullscreen:Ct,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(hr)},set playerControlsWrapperRef(on){R(hr,on,!0)},get playerControlsRef(){return n(Ni)},set playerControlsRef(on){R(Ni,on,!0)}})};V(Pc,ze=>{fe()&&ze(hp)})}var Ac=P(Pc,2);{var _p=ze=>{var gi=iT(),so=C(gi);let Ir=m(()=>{var on;return(on=n(Ni))==null?void 0:on.clientHeight});vc(so,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ir)},returnFocus:()=>{var on;return(on=Wt())==null?void 0:on.focus()},get ref(){return n(_r)},set ref(on){R(_r,on,!0)}}),S(gi),$(ze,gi)};V(Ac,ze=>{!ee()&&a()!=="ads"&&ze(_p)})}var Lc=P(Ac,2);let bp=m(()=>!n($r));Nd(Lc,{get isLive(){return Ve()},get isHidden(){return n(bp)},get isPlaying(){return et()},get position(){return de()},get duration(){return Re()}});var ha=P(Lc,2);Qm(ha,{get data(){return vn}});var Mc=P(ha,2);Wf(Mc,{get supportLink(){return e.supportLink},returnFocus:()=>{var ze;return(ze=Wt())==null?void 0:ze.focus()},get visible(){return Z()},get playerContainerRef(){return n(Vo)},get position(){return Ee()},get menuElementRef(){return n(Un)},set menuElementRef(ze){R(Un,ze,!0)}});var Ks=P(Mc,2);{var rl=ze=>{gc(ze,{onClose:Nn,onSelectAutoQuality:()=>{bs("auto"),Nn()}})};V(Ks,ze=>{n(Hr)&&ze(rl)})}var Vc=P(Ks,2);{var Rc=ze=>{xv(ze,{})};V(Vc,ze=>{Te()&&ze(Rc)})}var sl=P(Vc,2);{var Nc=ze=>{Ha(ze,{})};V(sl,ze=>{n(er)&&ze(Nc)})}var Dc=P(sl,2);{var Oc=ze=>{Xf(ze,{})};V(Dc,ze=>{Fe()&&ze(Oc)})}var $p=P(Dc,2);{var yp=ze=>{Fd(ze,{})};V($p,ze=>{kt()&&ze(yp)})}$(Ho,Cs)}),$(ge,Jt)},$$slots:{default:!0}}),ge=>Wt(ge),()=>Wt());var Ss=P(yn,2);Xe(Ss,ge=>R(ho,ge),()=>n(ho)),S($i),Xe($i,ge=>R(Vo,ge),()=>n(Vo));var Hi=P($i,2);{var Si=ge=>{var ht=rT();$(ge,ht)};V(Hi,ge=>{It()&&ge(Si)})}dt("mouseenter",$i,No),dt("mouseleave",$i,Do),dt("click",$i,bi,!0),dt("focusin",$i,yo,!0),$(t,Co),H(),o()}Ye(["mousemove","contextmenu","click"]);import{clientChecker as _c,PlaybackState as hT}from"@vkontakte/videoplayer-core/es2018";import{noop as _T}from"@vkontakte/videoplayer-shared/es2018";var lT=L('<div></div> <div class="info s-h"><div class="triangles-wrapper s-h"><div></div> <div></div> <div></div></div> <p class="step-caption s-h"> </p></div>',1),dT=L("<div><!></div>"),cT={hash:"s-h",code:".double-click-area.s-h{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-h{left:0}.double-click-area.right.s-h{right:0}.semicircle.s-h{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-h{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-h{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-h{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-h,.triangles-wrapper.s-h{display:flex;justify-content:center}.triangles-wrapper.s-h{margin-bottom:10px;position:relative}.triangle.s-h{animation:s-h-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-h:nth-child(3),.triangle.right.s-h:first-child{animation-delay:0s}.triangle.left.s-h:nth-child(2),.triangle.right.s-h:nth-child(2){animation-delay:.1s}.triangle.left.s-h:first-child,.triangle.right.s-h:nth-child(3){animation-delay:.2s}@keyframes s-h-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-h{border-right:8px solid var(--white)}.triangle.right.s-h{border-left:8px solid var(--white)}.triangle.s-h:not(:last-child){margin-right:5px}.step-caption.s-h{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function rp(t,e){B(e,!0),Y(t,cT);let i=h(e,"seekStep",3,0),o=q(!1),r=0,a=0,l=q(si(i())),d=p=>{p.stopPropagation(),a+=1,R(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(R(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,R(o,!1)},300)};sn(()=>{window.clearTimeout(r)});var s=dT();s.__click=d;var u=C(s);{var f=p=>{var v=lT(),_=ce(v),y=P(_,2),b=C(y),w=C(b),I=P(w,2),T=P(I,2);S(b);var N=P(b,2),A=C(N,!0);S(N),S(y),D(E=>{var k,Q,F,z;ne(_,1,`semicircle ${(k=e.side)!=null?k:""}`,"s-h"),ne(w,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-h"),ne(I,1,`triangle ${(F=e.side)!=null?F:""}`,"s-h"),ne(T,1,`triangle ${(z=e.side)!=null?z:""}`,"s-h"),me(A,E)},[()=>j("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),$(p,v)};V(u,p=>{n(o)&&p(f)})}S(s),D(()=>{var p;return ne(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-h")}),$(t,s),H()}Ye(["click"]);var uT=(t,e,i)=>{e(!1),i()},pT=L('<div class="overlay s-m"></div> <div class="next-video s-m"><div class="top s-m"><div class="caption s-m"> </div> <!></div> <div class="row s-m"><div class="column s-m"><div class="thumb s-m"><div></div> <!></div></div> <div class="column s-m"><div class="title s-m"> </div></div></div></div>',1),fT={hash:"s-m",code:".overlay.s-m{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-m{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-m{display:flex;justify-content:space-between}.caption.s-m{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-m{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-m{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-m{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-m,.thumb-overlay.s-m{height:100%;width:100%}.thumb-overlay.s-m{position:absolute}.thumb-overlay.withOpacity.s-m{background:var(--black);opacity:.3}.title.s-m{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),Y(t,fT);let[i,o]=De(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=he(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,_=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},b=()=>{e.clickCloseIcon(),_()};Lt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ce(w);{var T=N=>{var A=pT(),E=P(ce(A),2),k=C(E),Q=C(k),F=C(Q,!0);S(Q);var z=P(Q,2);Rs(z,{onClick:b}),S(k);var X=P(k,2);X.__click=[uT,u,p];var se=C(X),Z=C(se),oe=C(Z);let J;var Ce=P(oe,2);{var pe=ve=>{Ud(ve,{get isRunning(){return a()},onTimerEnded:y})};V(Ce,ve=>{r()&&ve(pe)})}S(Z),S(se);var ee=P(se,2),_e=C(ee),we=C(_e,!0);S(_e),S(ee),S(X),S(E),D((ve,ue)=>{me(F,ve),Ke(Z,`background-image: url('${e.thumb}')`),J=ne(oe,1,"thumb-overlay s-m",null,J,ue),me(we,e.title)},[()=>r()?j("end_screen_next_video"):j("end_screen_recommended_video"),()=>({withOpacity:r()})]),$(N,A)};V(I,N=>{e.isHide||N(T)})}$(t,w),H(),o()}Ye(["click"]);import{clientChecker as mT}from"@vkontakte/videoplayer-core/es2018";var Lb=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Lt(()=>{mT.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))}),sn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as vT}from"@vkontakte/videoplayer-core/es2018";var sp=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 gT}from"@vkontakte/videoplayer-core/es2018";var Mb=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),f=()=>gT.device.isIOS&&be(l)===vT.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=_=>{if(p(),!f()||!_)return;let y=u();if(!y)return;let b=new sp(y),w=be(d),I=be(a),T=be(r);for(let E of w)I.some(Q=>Q.value===E.id)&&b.attach(E,T.value===E.id);let N=d.subscribe(E=>{for(let k of E)b.updateSrc(k)}),A=()=>{let E=b.getCurrentShowingId();o(be(a).find(k=>k.value===E))};y.textTracks.addEventListener("change",A),s=()=>{N(),b.detachAll(),y.textTracks.removeEventListener("change",A)}};Lt(()=>i.subscribe(v)),sn(p)};var bT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},$T=L("<!> <!>",1),yT=L("<div><!></div>"),xT=L('<div class="spherical-video-icon s-8"><!></div>'),wT=L("<div><!></div>"),ST=L('<div class="settings-mobile s-8"><!></div>'),CT=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),TT=L('<div class="player-wrapper s-8" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),IT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-8{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function Cv(t,e){var _n,yr;B(e,!0),Y(t,IT);let[i,o]=De(),r=()=>x(Be,"$playerPhase",i),a=()=>x(di,"$isLoaderVisible",i),l=()=>x(Pe,"$adPlaybackState",i),d=()=>x(Dt,"$crashed",i),s=()=>x(bs,"$notificationsToShow$",i),u=()=>x(G,"$playbackState$",i),f=()=>x(Ot,"$graphIsOpened$",i),p=()=>x(Ne,"$interactiveHideMobileControls",i),v=()=>x(Ci,"$isEnded$",i),_=()=>x(mt,"$isInteractiveExpectation$",i),y=()=>x(St,"$controlsVisible",i),b=()=>x(rt,"$touched",i),w=()=>x(ki,"$autoplayNextEnabled$",i),I=()=>x(hi,"$postrollPassed",i),T=()=>x(Or,"$bottomNoSmooth",i),N=()=>x(fi,"$videoSize",i),A=()=>x(xt,"$playerSize",i),E=()=>x($e,"$isFullscreen",i),k=()=>x(ke,"$position$",i),Q=()=>x(xe,"$duration$",i),F=()=>x(cn,"$loadedMetadata",i),z=()=>x(qe,"$settingsMenuVisible",i),X=()=>x(Wt,"$scrubbingInProgress",i),se=()=>x(Vt,"$volumeChangingInProgress",i),Z=()=>x(to,"$chromecastConnected$",i),oe=()=>x(fe,"$isControlsAvailable",i),J=()=>x(ni,"$isInteractiveTime$",i),Ce=()=>x(Qi,"$isActiveLive",i),pe=()=>x(nt,"$settingsMenuOpenedByKeyboard",i),ee=()=>x(zt,"$language$",i),_e=()=>x(gt,"$disabledControls$",i),we=()=>x(Bt,"$is3DVideo",i),ve=()=>x(W,"$icon3DVideoVisible",i),ue=()=>x(ci,"$chromecastDeviceName$",i),Qe=()=>x(po,"$currentSubtitle$",i),U=()=>x(Go,"$currentSubtitleCaptions$",i),O=()=>x(Yo,"$realDuration$",i),Ge=()=>x($t,"$isLive$",i),K=()=>x(ui,"$isPlaying$",i),ae=()=>x(pi,"$debugPanelVisible",i),ye=h(e,"videoContainer",15),He=h(e,"adsSlotId",3,void 0),it=h(e,"adsParams",3,void 0),re=h(e,"adsAutoplayParam",3,void 0),de=h(e,"duration",3,void 0),Re=h(e,"logoTargetUrl",3,""),Ve=h(e,"showNextPrevButtons",3,!1),et=h(e,"nextButtonActive",3,!1),Ee=h(e,"prevButtonActive",3,!1),Te=h(e,"endScreenVideoTitle",3,void 0),Fe=h(e,"endScreenVideoThumb",3,void 0),kt=h(e,"isOneVideoPlaylist",3,!1),It=h(e,"showMiniTimer",3,!1),Pt=h(e,"fullScreenTarget",3,void 0),st=h(e,"playerStarted",3,!1),wt=h(e,"showEndScreen",3,!0),{notifications$:jt,graphIsOpened$:Ot}=vo(),Nt=e.store.getLogger().createComponentLog("Root component"),zt=e.store.interfaceLanguage$,G=e.store.state.playbackState$,Pe=e.store.ads.playbackState,ke=e.store.state.positionWithScrubbing$,xe=e.store.state.duration$,Be=e.store.playerPhase,$e=e.store.ui.isFullscreen,St=e.store.ui.controlsVisible,fe=e.store.ui.isControlsAvailable,Ne=e.store.ui.interactiveHideMobileControls,qe=e.store.ui.settingsMenu.visible$,nt=e.store.ui.settingsMenu.openedByBtnKeyboard$,Wt=e.store.ui.scrubbingInProgress,Vt=e.store.ui.volumeChangingInProgress,pi=e.store.ui.debugPanelVisible,di=e.store.state.isLoaderVisible,Ci=e.store.state.isEnded$,to=e.store.state.chromecastConnected$,ci=e.store.state.chromecastDeviceName$,hi=e.store.ads.postrollPassed,$t=e.store.state.isLive$,ui=e.store.state.isPlaying$,Qi=e.store.state.isActiveLive$,ct=e.store.state.isRewindableLive$,Dt=e.store.state.crashed$,at=e.store.webApi.annotationsApi,We=e.store.webApi.pictureInPictureApi,fi=e.store.state.videoSize$,po=e.store.state.currentSubtitle$,Go=e.store.state.currentSubtitleCaptions$,Yo=e.store.state.duration$,xt=e.store.ui.playerSize,Bt=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,At=e.store.state.isInteractive,ni=e.store.state.isInteractiveTime$,mt=e.store.state.isInteractiveExpectation$,Xt=e.store.state.hasInteractiveBranches,gt=e.store.ui.controls.disabledControls$,rt=e.store.ui.touched,Vi=e.store.ui.overlayContainer$,ki=e.store.ui.autoplayNextEnabled$,cn=e.store.state.loadedMetadata$,un=e.store.actions.internal.closeSettingsMenu,Pi=(_n=e.store.callbacks)==null?void 0:_n.onDisabledPlayPrevChapterClick,Ri=(yr=e.store.callbacks)==null?void 0:yr.onDisabledSeekToInteractiveClick,Mn=e.store.actions.internal.setQuality,go=q(void 0),io=q(void 0),Ti=q(void 0),Lo=q(void 0),Mo,pn,Vr=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Rr=q(void 0),{closeNotification:Nr,notificationsToShow$:bs}=jt,Dr=m(()=>!!s().slow_video),Zn=()=>Nr("slow_video"),Or=le(!1),fn,mn=q(!1),fr=m(()=>u()!==hT.PLAYING),mr=q(!1),jo=m(()=>f()||p()||!n(mn)&&(v()&&!!Xt||n(fr)&&_())),vr=q(!0),gr=m(()=>e.uiConfig.features.thumbTimer&&It()&&r()==="video"&&!y()&&!d()&&!At&&(e.uiConfig.hideThumbTimerAfterTouch&&!b()||!e.uiConfig.hideThumbTimerAfterTouch)),Jn=q(!1),Vn=m(()=>(wt()||e.showAutoplayNext&&w())&&!!Te()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(Jn)),ns=q(!1);We==null||We.setContext(od());let Vo=ut=>{ut&&!At&&Ni(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:Vo});let hr=()=>{clearTimeout(Mo),R(mn,!1),p()&&Ne.set(!1)},Ni=ut=>{hr(),R(mn,!0),Mo=setTimeout(()=>R(mn,!1),ut);let yt=ut-100;fn=setTimeout(()=>{T()&&Or.set(!1)},yt>0?yt:ut)},_r=Bt.subscribe(ut=>{W.set(ut),ut&&(clearTimeout(pn),pn=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Rn=async(ut=oa())=>{var yt,oo,fo,Jo,_o,bo;if(ut&&!_c.device.isIOS){let Ii=Ad(),$o=Nn(),Fr=_c.browser.isSamsungBrowser&&Ii===e.shadowRootContainer;ut=Ii===$o||Fr}if(ut){Ni(e.uiConfig.controls.hideTimeoutFullscreen);try{await(We==null?void 0:We.exit())}catch(Ii){Nt({message:String(Ii)})}try{let Ii=(yt=N())!=null&&yt.width&&((oo=N())!=null&&oo.height)?N():A();await y_(Ii)}catch(Ii){Nt({message:String(Ii)})}}$e.set(ut),e.store.getAdmanWrapper().setFullscreen(ut),E()?(Jo=(fo=e.store.callbacks)==null?void 0:fo.onFullscreenEnter)==null||Jo.call(fo):(bo=(_o=e.store.callbacks)==null?void 0:_o.onFullscreenExit)==null||bo.call(_o)},ft=ut=>{let yt=ut,{width:oo,height:fo}=yt.target;xt.set({width:oo,height:fo})},Zt=()=>{let{width:ut,height:yt}=n(go).getBoundingClientRect();xt.set({width:ut,height:yt})};Lt(()=>{var ut;return Au(Rn),e.uiConfig.features.annotationsInside&&(at==null||at.init(n(go))),Na(We)&&(We==null||We.assignPlayerContainer(n(go)),We==null||We.setExternalEventHandlers({resize:ft,leavepictureinpicture:Zt})),R(vr,!_c.device.isIphoneOrOldIpad),e.interactiveContainer&&((ut=ye().parentElement)==null||ut.insertBefore(e.interactiveContainer,ye().nextSibling)),()=>{clearTimeout(Mo),clearTimeout(fn),clearTimeout(pn),_r(),We==null||We.dispose().catch(yt=>{Nt({message:String(yt)})}),Lu(Rn)}});let br=q(!0),Br=q(!0),Hr=ut=>{let yt=k()+(ut==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;yt<0?(R(br,!1),yt=0):yt>=Q()&&(R(Br,!1),yt=Q()),R(mr,!0),e.seekTime(yt)},Nn=()=>_c.device.isIOS?n(go):!e.uiConfig.allowChangingFullscreenTarget||!Pt()?e.outerContainerRef:Pt().contains(e.outerContainerRef)?Pt():e.outerContainerRef,er=async()=>{try{if(oa())await Pu(document),Nt({message:"exit fullscreen"});else{if(Nt({message:"request fullscreen"}),_c.device.isIOS&&!F())return;await ku(Nn())}}catch(ut){Nt({message:String(ut)})}},ho=()=>{un()},Dn=ut=>{if(ut.preventDefault(),z()){ho();return}if(!st()){e.firstStart(),Ni(e.uiConfig.controls.hideTimeoutCursor);return}R(mr,!1),y()?hr():Ni(e.uiConfig.controls.hideTimeoutMobile)},tr=()=>{rt.set(!0)},On=()=>{At||(Or.set(!0),Ni(e.uiConfig.controls.hideTimeoutCursor))},vn=ut=>{Pi&&(Pi(ut),Ni(e.uiConfig.controls.hideTimeoutMobile))},gn=ut=>{Ri&&(Ri(ut),Ni(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{Vi.set(n(Rr))}),Oe(()=>{St.set((n(fr)||z()||X()||se()||Z()||!n(Vn)&&(v()||n(mn)&&!n(mr)))&&!n(jo)&&r()==="video"&&!d()&&oe())}),Oe(()=>{!X()&&n(ns)&&!J()&&Ni(e.uiConfig.controls.hideTimeoutMobile),R(ns,X(),!0)}),Oe(()=>{R(br,k()>0),R(Br,!Ce()&&k()<Q(),!0)}),Oe(()=>{Od(n(Lo),z(),pe(),!0)});let hn=j("aria_label_video_player");Lb({fullScreenChangeHandler:Rn,getFullscreenTarget:Nn}),Mb({store:e.store,getFullscreenTarget:Nn});let Xo=(ut,yt)=>{var _o,bo;let oo=(bo=(_o=e.store.callbacks)==null?void 0:_o.uiInfo)==null?void 0:bo.onUpcomingLiveViewStateChanged;if(!oo)return;let fo=!!yt,Jo={...jn(n(go),{upcomingLiveScreen:yt},"upcomingLiveScreen",fo),...ut};oo(Jo)};var Di=TT();dt("blur",Ca,ho);var Gi=C(Di);el(Gi,{onClick:Dn,get videoContainer(){return ye()},set videoContainer(ut){ye(ut)}});var Zo=P(Gi,2);Aa(Zo,()=>"slot",!1,(ut,yt)=>{Zi(ut,()=>({name:Ja}))});var ir=P(Zo,2);As(ir,ee,ut=>{var yt=CT(),oo=ce(yt);let fo=m(()=>r()!=="thumb"||d()||At&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);ja(oo,{get hidden(){return n(fo)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Jo=P(oo,2);{var _o=Je=>{var Yt=$T(),bi=ce(Yt);{var So=Bo=>{let or=m(()=>e.uiConfig.controls.seekStepMobile/1e3);rp(Bo,{side:"left",get seekStep(){return n(or)},handleSingleFirstClick:Dn,handleSecondClick:()=>Hr("backward")})};V(bi,Bo=>{n(br)&&Bo(So)})}var $n=P(bi,2);{var Un=Bo=>{let or=m(()=>e.uiConfig.controls.seekStepMobile/1e3);rp(Bo,{side:"right",get seekStep(){return n(or)},handleSingleFirstClick:Dn,handleSecondClick:()=>Hr("forward")})};V($n,Bo=>{n(Br)&&Bo(Un)})}$(Je,Yt)};V(Jo,Je=>{e.canRewindLive&&ct&&!_e().has("TIMELINE")&&Je(_o)})}var bo=P(Jo,2);{var Ii=Je=>{let Yt=m(()=>{var bi;return(bi=e.live)==null?void 0:bi.startTime});pc(Je,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Yt)},onUpcomingLiveViewStateChanged:Xo})};V(bo,Je=>{r()==="LiveWaitingStart"&&Je(Ii)})}var $o=P(bo,2);{var Fr=Je=>{Xa(Je,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};V($o,Je=>{r()==="LiveWaitingRecover"&&Je(Fr)})}var xr=P($o,2);{var $s=Je=>{Xa(Je,{kind:"record",get thumbUrl(){return e.thumbUrl}})};V(xr,Je=>{r()==="LiveWaitingRecord"&&Je($s)})}var Oi=P(xr,2);{var ys=Je=>{var Yt=yT();let bi;var So=C(Yt);Md(So,{get adsSlotId(){return He()},get adsParams(){return it()},get adsAutoplayParam(){return re()},get duration(){return de()},get adsExternalApi(){return e.adsExternalApi}}),S(Yt),D($n=>bi=ne(Yt,1,"ads-container s-8",null,bi,$n),[()=>({hidden:r()!=="ads"})]),$(Je,Yt)};V(Oi,Je=>{e.showAds&&st()&&Je(ys)})}var rs=P(Oi,2);{var wr=Je=>{let Yt=m(()=>!wt()&&e.showAutoplayNext&&w());Sv(Je,{get title(){return Te()},get thumb(){return Fe()},get isHide(){return n(Yt)},clickCloseIcon:()=>R(Jn,!0)})};V(rs,Je=>{n(Vn)&&Te()&&Fe()&&Je(wr)})}var Ro=P(rs,2);{var Ur=Je=>{cc(Je,{})};V(Ro,Je=>{we()&&Je(Ur)})}var en=P(Ro,2);{var tn=Je=>{var Yt=xT(),bi=C(Yt);Pd(bi,{}),S(Yt),$(Je,Yt)};V(en,Je=>{ve()&&Je(tn)})}var Ue=P(en,2);{var Ct=Je=>{uc(Je,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return ue()},onClick:Dn})};V(Ue,Je=>{Z()&&Je(Ct)})}var li=P(Ue,2);{var No=Je=>{Ga(Je,{get shifted(){return y()},get captions(){return U()},get position(){return k()},get playerSize(){return A()},isMobile:!0})};V(li,Je=>{Qe().value!=="off"&&Je(No)})}var yo=P(li,2);{var Do=Je=>{var Yt=wT();Yt.__click=[bT,z,qe,ho];var bi=C(Yt);Ya(bi,{}),S(Yt),$(Je,Yt)};V(yo,Je=>{d()&&Je(Do)})}var Bi=P(yo,2);{var xo=Je=>{let Yt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),bi=m(()=>r()==="ads"),So=m(()=>e.canRewindLive&&O()!==0);lc(Je,{get bottomHidden(){return n(Yt)},get showControls(){return y()},get bottomNoSmooth(){return T()},get isAds(){return n(bi)},get canRewindLive(){return n(So)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Re()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Ve()},get nextButtonActive(){return et()},get prevButtonActive(){return Ee()},get isOneVideoPlaylist(){return kt()},get customFullscreenSupported(){return n(vr)},get endScreenShown(){return n(Vn)},toggleFullscreen:er,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:vn,onDisabledSeekToInteractiveClick:gn,get playerControlsWrapperRef(){return n(io)},set playerControlsWrapperRef($n){R(io,$n,!0)},get playerControlsRef(){return n(Ti)},set playerControlsRef($n){R(Ti,$n,!0)}})};V(Bi,Je=>{st()&&Je(xo)})}var Bn=P(Bi,2);{var Sr=Je=>{var Yt=ST(),bi=C(Yt);vc(bi,{get supportLink(){return e.supportLink},get returnFocus(){return _T},get ref(){return n(Lo)},set ref(So){R(Lo,So,!0)}}),S(Yt),$(Je,Yt)};V(Bn,Je=>{z()&&Je(Sr)})}var wo=P(Bn,2);let no=m(()=>!n(gr));Nd(wo,{get isLive(){return Ge()},get isHidden(){return n(no)},get isPlaying(){return K()},get position(){return k()},get duration(){return Q()}});var bn=P(wo,2);{var Oo=Je=>{Ha(Je,{})};V(bn,Je=>{n(Vr)&&Je(Oo)})}var Hn=P(bn,2);{var zr=Je=>{Fd(Je,{})};V(Hn,Je=>{ae()&&Je(zr)})}var Wr=P(Hn,2);{var Fn=Je=>{gc(Je,{onClose:Zn,onSelectAutoQuality:()=>{Mn("auto"),Zn()}})};V(Wr,Je=>{n(Dr)&&Je(Fn)})}$(ut,yt)});var $r=P(ir,2);Xe($r,ut=>R(Rr,ut),()=>n(Rr)),S(Di),Xe(Di,ut=>R(go,ut),()=>n(go)),D(()=>Me(Di,"aria-label",hn)),dt("click",Di,tr,!0),dt("focusin",Di,On,!0),$(t,Di),H(),o()}Ye(["click"]);function ap(t){let e="";return eo(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),eo(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),eo(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),eo(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),eo(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),eo(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),eo(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),eo(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),eo(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),eo(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),eo(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),eo(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),eo(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),eo(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),eo(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),eo(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),eo(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),eo(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),eo(t.font)&&(e+=`--font:${t.font};`),eo(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),eo(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function eo(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as ET}from"@vkontakte/videoplayer-shared/es2018";var kT=L('<div class="time-container s-9"><!></div>'),PT=L('<div class="player-wrapper s-9" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),AT={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%}.timeline.s-9{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-9{opacity:1}.time-container.s-9{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function Tv(t,e){B(e,!0),Y(t,AT);let[i,o]=De(),r=()=>x(J,"$scrubbingInProgress",i),a=()=>x(Z,"$playerSize",i),l=()=>x(k,"$isPlaying$",i),d=()=>x(A,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(T,"$playerPhase",i),f=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),v=()=>x(F,"$currentSubtitleCaptions$",i),_=()=>x(E,"$positionExact$",i),y=()=>x(X,"$isLive$",i),b=()=>x(se,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:T,state:{crashed$:N,duration$:A,positionExact$:E,isPlaying$:k,currentSubtitle$:Q,currentSubtitleCaptions$:F,positionWithScrubbing$:z,isLive$:X,isRewindableLive$:se},ui:{playerSize:Z,controls:oe,scrubbingInProgress:J},actions:{internal:{getVideoElement:Ce}}}=he(),pe=8,ee=q(!1),_e=si({}),we=q(!1),ve=m(()=>!r()&&!n(we)),ue=()=>{R(ee,!0)},Qe=()=>{R(ee,!1)},U=ET(Wl,260);Oe(()=>{a(),U(Ce(),oe,_e,n(ee))});let O=m(()=>l()?Qo(d()-s()):Qo(isFinite(d())?d():w()));var Ge=PT(),K=C(Ge);el(K,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Te){I(Te)}});var ae=P(K,2);Aa(ae,()=>"slot",!1,(Te,Fe)=>{Zi(Te,()=>({name:Ja}))});var ye=P(ae,2);let He=m(()=>u()!=="thumb"||f());ja(ye,{get hidden(){return n(He)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var it=P(ye,2);{var re=Te=>{Ga(Te,{shifted:!1,get captions(){return v()},get position(){return _()},get playerSize(){return a()}})};V(it,Te=>{p().value!=="off"&&n(ve)&&Te(re)})}var de=P(it,2);{var Re=Te=>{var Fe=kT(),kt=C(Fe);Rd(kt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(O)}}),S(Fe),$(Te,Fe)};V(de,Te=>{n(ve)&&Te(Re)})}var Ve=P(de,2);let et;var Ee=C(Ve);qa(Ee,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return b()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return _e.timeline},set ref(Te){_e.timeline=Te}}),S(Ve),S(Ge),D(Te=>et=ne(Ve,1,"timeline s-9",null,et,Te),[()=>({visible:n(ee)})]),dt("mouseenter",Ge,ue),dt("mouseleave",Ge,Qe),dt("mouseenter",Ve,()=>R(we,!0)),dt("mouseleave",Ve,()=>R(we,!1)),$(t,Ge),H(),o()}var NT=L("<div><!></div>"),DT={hash:"s-0",code:'.vk-vp-root.s-0{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-0{overflow:visible}.vk-vp-root.s-0 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-0 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-0 p{margin:0}.vk-vp-root.s-0 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-0 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-0 :focus,.vk-vp-root.s-0 :focus-visible{outline:none}.vk-vp-root.s-0 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-0 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-0 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-0 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-0 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-0 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-0 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function Ev(t,e){B(e,!0),Y(t,DT);let[i,o]=De(),r=()=>x(st,"$isLive$",i),a=()=>x(at,"$availableSubtitlesList$",i),l=()=>x(We,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),f=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),_=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),b=h(e,"interactiveController",7),w=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),T=h(e,"live",7),N=h(e,"preload",7),A=h(e,"autoplay",7),E=h(e,"volume",7,void 0),k=h(e,"muted",7,void 0),Q=h(e,"fromTime",7),F=h(e,"canRewindLive",7),z=h(e,"showAds",7),X=h(e,"adsSlotId",7,void 0),se=h(e,"adsParams",7,void 0),Z=h(e,"adsAutoplayParam",7,void 0),oe=h(e,"duration",7,void 0),J=h(e,"logoClickable",7),Ce=h(e,"logoHidden",7),pe=h(e,"isMobile",7),ee=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),we=h(e,"prevButtonActive",7,!1),ve=h(e,"endScreenVideoTitle",7,void 0),ue=h(e,"endScreenVideoThumb",7,void 0),Qe=h(e,"isOneVideoPlaylist",7,!1),U=h(e,"supportLink",7),O=h(e,"shadowRootContainer",7),Ge=h(e,"outerContainerRef",7),K=h(e,"fullScreenTarget",7,void 0),ae=h(e,"failoverHosts",7,void 0),ye=h(e,"showMiniTimer",7,!1),He=h(e,"saveRate",7),it=h(e,"seekToInteractive",7,Vb),re=h(e,"playPrevChapter",7,Vb),de=h(e,"volumeMultiplier",7),Re=h(e,"showAutoplayNext",7),Ve=h(e,"showEndScreen",7,!0),et=h(e,"keyboardControls",15,void 0),{subscribers:Ee,stores:Te}=u();Eh(p());let Fe=Mt(),kt=p().logoLink,It=s().ui.debugPanelVisible,Pt=s().ui.playerSize,st=s().state.isLive$,jt=s().state.isInteractive&&Iv.device.isAndroid,Ot=q(void 0),Nt=null,zt=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}),Oh(s(),Te),Oe(()=>{var W,At;s().ui.isMobile.set(pe()),(At=(W=f().callbacks)==null?void 0:W.onDomReady)==null||At.call(W)});let G=(W=!1)=>{R(zt,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Pe=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let W=a_(s().videoId);if(W)switch(W.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,W.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,W.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(W.quality);break}}else{l_(s().videoId),Ef()&&s().actions.internal.setTrafficSavingEnabled(!0);let At=Cf(s().videoId);At&&s().actions.internal.setQuality(At)}};function ke(W){var gt,rt,Vi;let At=d()||W;At&&s().initVideo({container:n(Ot),sources:At,failoverHosts:ae(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:de()});let ni=MT.get(Cd)==="true";It.set(ni),Q()>0&&s().actions.external.seekTime(Q());let mt=pe()?Fe.volumeDefault:(rt=(gt=E())!=null?gt:bu())!=null?rt:Fe.volumeDefault,Xt=(Vi=k())!=null?Vi:t_();if(s().actions.external.setVolume(mt),s().actions.external.setMuted(Xt),s().getAdmanWrapper().setInitialVolume(Xt?0:mt),Pe(),Fe.features.saveRate&&He()){let ki=n_();ki&&!r()&&s().actions.internal.setPlaybackRate(ki)}if(Re()){let ki=s_();ki&&s().actions.internal.setAutoplayNextEnabled(ki)}s().ui.isAutoplay.set(A()),A()&&G(),N()&&Fe.features.preload&&s().actions.internal.preload()}let xe=W=>{if(window.ResizeObserver){let At,ni;Nt=new ResizeObserver(VT(mt=>{let Xt=mt[0];if(Xt.contentBoxSize){let gt=Array.isArray(Xt.contentBoxSize)?Xt.contentBoxSize[0]:Xt.contentBoxSize;At=gt.inlineSize,ni=gt.blockSize}else Xt.contentRect&&(At=Xt.contentRect.width,ni=Xt.contentRect.height);Pt.set({width:At,height:ni})},300)),Nt.observe(W)}W.clientWidth&&W.clientHeight&&Pt.set({width:W.clientWidth,height:W.clientHeight})},Be=()=>{document.hidden&&s().actions.external.stop()};Lt(()=>{var ni,mt,Xt,gt;jt&&document.addEventListener("visibilitychange",Be),Fe.debugLog&&s().actions.internal.startLogging(),xe(n(Ot));let W=Ee.map(rt=>rt.init({store:s(),microStores:Te,config:f(),interactiveController:b(),uiConfig:p()})),At=()=>{jt&&document.removeEventListener("visibilitychange",Be),Nt==null||Nt.disconnect(),W.forEach(rt=>rt.unsubscribe()),s().destroy()};return((ni=T())==null?void 0:ni.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),At):((mt=T())==null?void 0:mt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),At):(((Xt=T())==null?void 0:Xt.status)==="finished"||((gt=T())==null?void 0:gt.status)==="postlive")&&!(d()&&LT(d()))?(s().actions.internal.setLiveWaitingRecord(!0),At):(ke(),At)});function $e(){n(zt)?s().actions.external.play():G(!0)}function St(){s().actions.external.pause()}function fe(W){s().actions.external.setMuted(W)}function Ne(){s().actions.external.toggleSubtitle()}function qe(W,At){s().actions.external.changeSubtitle(W,At)}function nt(W){s().actions.external.changeAudioStream(W)}function Wt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function Vt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function pi(W){pe()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function di(W){s().actions.internal.seekTime(W,RT.UNKNOWN)}function Ci(W){s().actions.external.seekEpisodeStartTime(W)}function to(){s().actions.external.returnFocusToEpisodes()}function ci(W){s().actions.external.setPlaybackRate(W)}function hi(W){s().actions.external.setAutoQualityLimits(W)}function $t(){s().actions.external.setQuality("auto")}function ui(W){s().actions.external.setTrafficSavingEnabled(W)}function Qi(W){s().actions.external.setHighQualityEnabled(W)}let ct=ap(Fe.view),Dt=f().playerView==="preview",at=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let W=!1;Oe(()=>{var At;if(!W&&a().length){W=!0;let ni;if(Fe.features.userVideoPrefs&&s().videoId){let Xt=wu(Fe.userSalt,String(s().videoId));Xt!=null&&Xt.subtitleTrackId&&(ni=a().find(gt=>gt.value===Xt.subtitleTrackId))}let mt=(At=I())!=null?At:Pf();mt&&(ni=a().find(Xt=>Xt.language===mt)),s().actions.internal.setSubtitle(ni)}})}let We=s().ui.isPreviewTrackHorizontallyAligned;var fi=NT();let po;var Go=C(fi);{var Yo=W=>{Cv(W,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return z()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return Z()},get duration(){return oe()},get logoClickable(){return J()},get logoHidden(){return Ce()},get logoTargetUrl(){return kt},get nextButtonActive(){return _e()},get prevButtonActive(){return we()},get endScreenVideoTitle(){return ve()},get endScreenVideoThumb(){return ue()},get isOneVideoPlaylist(){return Qe()},get supportLink(){return U()},get shadowRootContainer(){return O()},get outerContainerRef(){return Ge()},get fullScreenTarget(){return K()},get showMiniTimer(){return ye()},get playerStarted(){return n(zt)},get seekToInteractive(){return it()},get playPrevChapter(){return re()},firstStart:G,seekTime:di,get showEndScreen(){return Ve()},get showAutoplayNext(){return Re()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Ot)},set videoContainer(At){R(Ot,At,!0)}})},xt=W=>{var At=Le(),ni=ce(At);{var mt=gt=>{Tv(gt,{get thumbUrl(){return _()},get outsideDuration(){return oe()},get canRewindLive(){return F()},get videoContainer(){return n(Ot)},set videoContainer(rt){R(Ot,rt,!0)}})},Xt=gt=>{wv(gt,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return _()},get interactiveContainer(){return y()},get live(){return T()},get autoplay(){return A()},get canRewindLive(){return F()},get showAds(){return z()},get adsSlotId(){return X()},get adsParams(){return se()},get adsAutoplayParam(){return Z()},get duration(){return oe()},get logoClickable(){return J()},get logoHidden(){return Ce()},get logoTargetUrl(){return kt},get nextButtonActive(){return _e()},get prevButtonActive(){return we()},get endScreenVideoTitle(){return ve()},get endScreenVideoThumb(){return ue()},get isOneVideoPlaylist(){return Qe()},get supportLink(){return U()},get shadowRootContainer(){return O()},get outerContainerRef(){return Ge()},get fullScreenTarget(){return K()},get showMiniTimer(){return ye()},get playerStarted(){return n(zt)},get seekToInteractive(){return it()},get playPrevChapter(){return re()},firstStart:G,get showEndScreen(){return Ve()},get showAutoplayNext(){return Re()},get showNextPrevButtons(){return ee()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Ot)},set videoContainer(rt){R(Ot,rt,!0)},get keyboardControls(){return et()},set keyboardControls(rt){et(rt)}})};V(ni,gt=>{Dt?gt(mt):gt(Xt,!1)})}$(W,At)};V(Go,W=>{pe()?W(Yo):W(xt,!1)})}S(fi),D(W=>{po=ne(fi,1,"vk-vp-root s-0",null,po,W),Ke(fi,ct)},[()=>({"root--miui-browser":Iv.device.isMobile&&Iv.browser.isMiuiBrowser,"visible-outside":Dt,"preview-track-horizontally-alinged":l()})]),$(t,fi);var Bt=H({initVideo:ke,play:$e,pause:St,setMuted:fe,toggleSubtitle:Ne,changeSubtitle:qe,changeAudioStream:nt,hideControls:Wt,showControls:Vt,setVolume:pi,seekTime:di,seekEpisodeStartTime:Ci,returnFocusToEpisodes:to,setPlaybackRate:ci,setAutoQualityLimits:hi,setAutoQuality:$t,toggleTrafficSaving:ui,toggleHighQuality:Qi,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return f()},set videoConfig(W){f(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return _()},set thumbUrl(W){_(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return b()},set interactiveController(W){b(W)},get subtitles(){return w()},set subtitles(W){w(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return T()},set live(W){T(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return A()},set autoplay(W){A(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return k()},set muted(W){k(W)},get fromTime(){return Q()},set fromTime(W){Q(W)},get canRewindLive(){return F()},set canRewindLive(W){F(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return X()},set adsSlotId(W){X(W)},get adsParams(){return se()},set adsParams(W){se(W)},get adsAutoplayParam(){return Z()},set adsAutoplayParam(W){Z(W)},get duration(){return oe()},set duration(W){oe(W)},get logoClickable(){return J()},set logoClickable(W){J(W)},get logoHidden(){return Ce()},set logoHidden(W){Ce(W)},get isMobile(){return pe()},set isMobile(W){pe(W)},get showNextPrevButtons(){return ee()},set showNextPrevButtons(W){ee(W)},get nextButtonActive(){return _e()},set nextButtonActive(W){_e(W)},get prevButtonActive(){return we()},set prevButtonActive(W){we(W)},get endScreenVideoTitle(){return ve()},set endScreenVideoTitle(W){ve(W)},get endScreenVideoThumb(){return ue()},set endScreenVideoThumb(W){ue(W)},get isOneVideoPlaylist(){return Qe()},set isOneVideoPlaylist(W){Qe(W)},get supportLink(){return U()},set supportLink(W){U(W)},get shadowRootContainer(){return O()},set shadowRootContainer(W){O(W)},get outerContainerRef(){return Ge()},set outerContainerRef(W){Ge(W)},get fullScreenTarget(){return K()},set fullScreenTarget(W){K(W)},get failoverHosts(){return ae()},set failoverHosts(W){ae(W)},get showMiniTimer(){return ye()},set showMiniTimer(W){ye(W)},get saveRate(){return He()},set saveRate(W){He(W)},get showAutoplayNext(){return Re()},set showAutoplayNext(W){Re(W)},get seekToInteractive(){return it()},set seekToInteractive(W){it(W)},get playPrevChapter(){return re()},set playPrevChapter(W){re(W)},get volumeMultiplier(){return de()},set volumeMultiplier(W){de(W)},get showEndScreen(){return Ve()},set showEndScreen(W){Ve(W)},get keyboardControls(){return et()},set keyboardControls(W){et(W)}});return o(),Bt}var OT=Ie('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function kv(t,e){let i=h(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");Ze(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=OT();ai(9),$(r,l)},$$slots:{default:!0}})}var BT=L('<div class="title s-2"> </div>'),HT=L('<div class="playerStub s-2"><!> <!></div>'),FT={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 Pv(t,e){Y(t,FT);var i=HT(),o=C(i);{var r=d=>{var s=BT(),u=C(s,!0);S(s),D(()=>me(u,e.title)),$(d,s)};V(o,d=>{e.title&&d(r)})}var a=P(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);kv(d,{get isWhite(){return n(s)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),D(()=>Ke(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),$(t,i)}var UT=L('<div class="playerError s-1"><!></div>'),zT={hash:"s-1",code:".playerError.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function Av(t){Y(t,zT);var e=UT(),i=C(e);Ya(i,{}),S(e),$(t,e)}import{now as _I,ValueSubject as bI}from"@vkontakte/videoplayer-shared/es2018";import{cloneDeepWith as $I,InterfaceLanguage as yI,isNonNullable as Ov,Logger as xI,Observable as wI,Subscription as Ub,once as SI,InternalsExposure as CI,skip as TI,getPlayerId as II}from"@vkontakte/videoplayer-shared/es2018";import{clientChecker as zb,isMobile as EI}from"@vkontakte/videoplayer-core/es2018";import{OneStat as kI,ThinOneStat as PI,MediascopePixel as AI}from"@vkontakte/videoplayer-statistics/es2018";import{Logger as WT,Subscription as KT}from"@vkontakte/videoplayer-shared/es2018";var lp=class{constructor(){this.subscription=new KT,this.logger=new WT,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=be(e.state.currentPlaybackRate$),r=be(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 Mv,detectEmbed as XT}from"@vkontakte/videoplayer-shared/es2018";var qT=Ie('<path d="M31.257 3.998c3.037.01 4.52.39 6.13 1.24a9 9 0 013.47 3.35l.17.31.15.3c.78 1.55 1.07 3.18 1.09 6.25v9.04a1.5 1.5 0 01-3 .02v-9.65c-.05-2.04-.24-3.12-.64-4.04l-.12-.27-.13-.25A6 6 0 0036.2 7.9c-1.19-.64-2.34-.88-5.11-.9h-8.84c-2.73 0-4 .2-5.07.7l-.25.13a6 6 0 00-2.4 2.41c-.64 1.19-.88 2.34-.9 5.11v20.83c0 2.74.2 4 .7 5.08l.13.25a6 6 0 002.41 2.4c1.1.6 2.13.83 4.44.89H26a1.5 1.5 0 010 3h-4.47c-3-.05-4.53-.38-6.14-1.24a9 9 0 01-3.48-3.35l-.15-.3c-.73-1.47-1.04-3.01-1.08-5.8V15c.05-2.98.39-4.52 1.25-6.12a9 9 0 013.293-3.582c1.85-.871 2.623-1.27 5.747-1.27z"></path><path d="M30.5 33.8c0-1.68 0-2.52.33-3.16a3 3 0 0 1 1.3-1.31c.65-.33 1.49-.33 3.17-.33h6.4c1.68 0 2.52 0 3.16.33a3 3 0 0 1 1.31 1.3c.33.65.33 1.49.33 3.17v13.4c0 1.68 0 2.52-.33 3.16a3 3 0 0 1-1.3 1.31c-.65.33-1.49.33-3.17.33h-6.4c-1.68 0-2.52 0-3.16-.33a3 3 0 0 1-1.31-1.3c-.33-.65-.33-1.49-.33-3.17z"></path>',1),QT=L('<div><div><!></div> <span class="title s-6"> </span></div>'),GT={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),Y(t,GT);let[i,o]=De(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(f,"$isMobile$",i),l=he(),d=Mt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>r()&&p("pip_dummy_title")),_=ap(d.view);var y=QT();let b;var w=C(y);let I;var T=C(w);Ze(T,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,k)=>{var Q=qT();ai(),$(E,Q)},$$slots:{default:!0}}),S(w);var N=P(w,2),A=C(N,!0);S(N),S(y),D((E,k)=>{b=ne(y,1,"player-pip-dummy s-6",null,b,E),Ke(y,_),I=ne(w,1,"dummy-image s-6",null,I,k),me(A,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),$(t,y),H(),o()}var YT=Object.defineProperty,jT=(t,e,i)=>e in t?YT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Gl=(t,e,i)=>jT(t,typeof e!="symbol"?e+"":e,i),ZT=460,JT=280,bc=class{constructor({enabled:e=!0}={enabled:!0}){Gl(this,"playerDomElement"),Gl(this,"playerParentShadowRoot"),Gl(this,"playerDummyElement"),Gl(this,"svelteContext"),Gl(this,"pipWindow"),Gl(this,"info",{isActive$:new Mv(!1),isEnabled$:new Mv(!1),type:1}),this.info.isEnabled$=new Mv(e)}isSupported(){let{isEmbed:e}=XT();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}async request(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:ZT,height:JT,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=Zr(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)})}async exit(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})}async dispose(){await 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 Rb(t){return t instanceof bc}var dp=class{static getLatestSupportedVersion(e){let i=new Ra(e),o=new bc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function $c(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 Nb="Inner error. Unexpectedly root annotation container null reference exception",Db="Annotation with such name already exists",Ob="Annotation with such name does not exist";var Yl=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as eI,Subscription as tI,throttleFn as iI}from"@vkontakte/videoplayer-shared/es2018";var oI="1",nI=100,cp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new tI}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=iI(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},nI);this.subscriptions.add(eI(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 Yl(Nb);if(this.annotations.has(e))throw new Yl(Db);i.style.zIndex=(o=i.style.zIndex)!=null?o:oI,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 Yl(Ob);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 up,Subscription as rI}from"@vkontakte/videoplayer-shared/es2018";var dn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return up(e),up(i),up(r),r.interactiveData&&up(o),this.subscription=new rI,this.subscription}};var yc=class extends dn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...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 xc=class extends dn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...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:f}=a.ui,p=be(f),v=()=>p&&be(u);return o.add(u.subscribe(_=>{if(!p)return;let y=be(l);be(s)?this.state$.set(_):y!==null&&this.state$.set(!y||_)})),o.add(s.subscribe(_=>{this.state$.set(!_||v())})),o.add(l.subscribe(_=>{if(_===null)return;let y=be(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!_)})),o}};var wc=class extends dn{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 sI}from"@vkontakte/videoplayer-shared/es2018";var Vv=le(!1),pp=null,Sc=class extends dn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...Vv,set:(i,o=!1)=>{i!==be(Vv)&&(this.clearTimeout(),Vv.set(i),!i&&pp&&(pp=!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=>{be(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(sI({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:_})=>{var y,b;if(!(!p||!(_!=null&&_.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&pp===null&&(pp=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(b=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||b.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as aI,noop as lI}from"@vkontakte/videoplayer-shared/es2018";var Cc=class extends dn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...le(null),toggle:lI};this.checkIfShouldHide=i=>Ns(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=async()=>{if(this.checkIfShouldHide(be(l)))return;let s=be(this.state$),{isEnded$:u,playbackState$:f}=r.state,{disabledControls$:p}=r.ui.controls,v=be(u),_=be(f);if(s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1),p.remove(hf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=_==="playing";try{await(a==null?void 0:a.toggleGraphView(!0)),this.state$.set(!0),p.add(hf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}},o.add(aI({graphIsOpened:this.state$,currentGridType:l}).subscribe(async({graphIsOpened:s,currentGridType:u})=>{if(this.checkIfShouldHide(u)&&s)try{await(a==null?void 0:a.toggleGraphView(!1)),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Bb}from"@vkontakte/videoplayer-shared/es2018";var Tc=class extends dn{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 Bb(!1),isEnabled$:new Bb(!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 uI,filterChanged as pI}from"@vkontakte/videoplayer-shared/es2018";import{safeStorage as Rv}from"@vkontakte/videoplayer-shared/es2018";var Hb=({maxShowCount:t,timeout:e})=>{let i=[t!==0?dI({maxCount:t}):void 0,e!==0?cI({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},dI=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Rv.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}}},cI=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Rv.get(e)||"{}")}catch(a){return{}}},o=a=>Rv.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o({...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 Ic=class extends dn{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=Hb({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe(pI(),uI(f=>f)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var Fb=()=>[yc,xc,wc,Sc,Cc,Tc,Ic].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as Ec}from"@vkontakte/videoplayer-shared/es2018";var fp=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 mp=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 fp(()=>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 fI=L('<div class="root s-3"><!></div>'),mI={hash:"s-3",code:".root.s-3{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function Nv(t,e){B(e,!0),Y(t,mI);let i=null,o=q(null);Oe(()=>(n(o)&&(i=window.setTimeout(()=>{R(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&R(o,s?"prev":"next",!0)}var a=Le(),l=ce(a);{var d=s=>{var u=Le(),f=ce(u);As(f,()=>n(o),p=>{var v=fI(),_=C(v);let y=m(()=>n(o)==="prev");hc(_,{get duration(){return e.animationDuration},get Icon(){return ca},get reversed(){return n(y)}}),S(v),$(p,v)}),$(s,u)};V(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return $(t,a),H({startVideoChangedAnimation:r})}import{getWindow as vI}from"@vkontakte/videoplayer-shared/es2018";var Dv=vI().HTMLElement||class{constructor(){this.isConnected=!1}};var gI=Object.defineProperty,hI=(t,e,i)=>e in t?gI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Qt=(t,e,i)=>hI(t,typeof e!="symbol"?e+"":e,i),LI={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:yI.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:EI(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Xn=q(void 0),Bv=si({animationDuration:0,playbackStatusShow:!1}),vp=class extends Dv{constructor(){super(),Qt(this,"svelteStubComponent"),Qt(this,"svelteRootComponent"),Qt(this,"sveltePersistentLayerComponent"),Qt(this,"svelteErrorComponent"),Qt(this,"store"),Qt(this,"microStoresRoot"),Qt(this,"statistics"),Qt(this,"sentry"),Qt(this,"_shadowRoot"),Qt(this,"playerContainer"),Qt(this,"rootContainer"),Qt(this,"stateContainer"),Qt(this,"shadowRootContainer"),Qt(this,"playerId"),Qt(this,"uiConfig"),Qt(this,"coreConfig"),Qt(this,"statisticsConfig"),Qt(this,"metaConfig"),Qt(this,"interactiveController"),Qt(this,"interactiveContainer"),Qt(this,"graphMadePause"),Qt(this,"currentPlayingVideoIndex",0),Qt(this,"needToRepeatPlaylist",!1),Qt(this,"videoConfig"),Qt(this,"pictureInPictureApi"),Qt(this,"mediaSessionApi"),Qt(this,"unsubscribePlayerPhaseSubscription"),Qt(this,"logger"),Qt(this,"log"),Qt(this,"subscription"),Qt(this,"interactiveSubscription"),Qt(this,"annotationsApi"),Qt(this,"slotsApi"),Qt(this,"focusManager"),Qt(this,"prevIsid"),Qt(this,"isInited",!1),Qt(this,"postponedInitParams",null),Qt(this,"internalsExposure",null),Qt(this,"shadowDOMCallbacksDisabled",!1),Qt(this,"fatalError$",new bI(null)),Qt(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:_,isMobile:y,isTouch:b,refDomain:w,deviceId:I,interactiveData:T}=$c(this.videoConfig,i),N=(o=T==null?void 0:T.projectInfo)==null?void 0:o.pid,A=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:k=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new kI({movieId:E,albumId:d,place:s,trackCode:f,vkAppId:p,autoplay:(l=_&&!this.interactiveController)!=null?l:!1,mobile:b!=null?b:y,clip:k,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview",...N&&(!this.isInited||A)&&{projectId:Number(N)}},{refreshAuthToken:v,userSalt:u,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})}catch(F){console.error(F),this.log({message:F.message})}}),Ec.create("ui"),this.logger=new xI,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Ub,this.interactiveSubscription=new Ub,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Zr(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=si({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Zr(Pv,l),this.sveltePersistentLayerComponent=Zr(Nv,{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(),Ec.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}=$c(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new PI.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,f,p,v,_;if(!this.videoConfig)return;let{albumId:y,statPlace:b,statAuthToken:w,preload:I,autoplay:T,volume:N,muted:A,fromTime:E,canRewindLive:k,supportLink:Q,showAds:F,adsSlotId:z,adsParams:X={},adsAutoplayParam:se,interfaceLanguage:Z,isCyrillicRelatedInterface:oe,logoClickable:J,logoHidden:Ce,isMobile:pe,isTouch:ee,isAudioDisabled:_e,isLiveCatchUpMode:we,fullScreenTarget:ve,failoverHosts:ue,canDownload:Qe,callbacks:U,interactiveData:O,showThumbTimer:Ge,additionalButtons:K=[],additionalSettingsMenuItems:ae=[],additionalContextMenuItems:ye=[],repeat:He,loop:it,saveRate:re,volumeMultiplier:de,showEndScreen:Re,showAutoplayNext:Ve,mediascopePixels:et}=$c(this.videoConfig,i),{sources:Ee,title:Te,thumbUrl:Fe,unitedVideoId:kt,isClip:It=!1,duration:Pt,adsParams:st={},videoEpisodes:wt,previewThumbsData:jt,subtitles:Ot,subtitlesForcedLanguage:Nt,live:zt,adsExternalApi:G}=e;if(!Ee&&!zt){let ci=new Error("empty sources and live");this.fatalError$.next(ci),(r=U.onCrashed)==null||r.call(U,ci.message);return}let Pe={...X,...st},ke=this.getNextVideoInfo(),xe={sources:Ee,title:Te,thumbUrl:Fe,subtitles:Ot,subtitlesForcedLanguage:Nt,unitedVideoId:kt,isClip:It,live:zt,albumId:y,statPlace:b,autoplay:T,muted:A,volume:N,fromTime:E,canRewindLive:k,showAds:F,adsSlotId:z,adsParams:Pe,adsAutoplayParam:se,duration:Pt,logoClickable:J,logoHidden:Ce,isTouch:ee!=null?ee:pe,repeat:He,loop:it,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:ke.nextVideoTitle,endScreenVideoThumb:ke.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Be={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(xe)}`});let $e=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),St=($e==null?void 0:$e.oneStat)||this.createOneStat(e,i),fe=this.createThinOneStat(e,i),Ne;et&&(Ne=new AI({pixels:et})),(St||fe)&&(this.statistics=new Qu(St,fe,Ne,$e==null?void 0:$e.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Va(this.uiConfig.sentry,{version:Pl,env:gu},{movieId:kt,albumId:y,place:b,autoplay:(l=T&&!this.interactiveController)!=null?l:!1,mobile:ee!=null?ee:pe,clip:It}),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={...this.sentry,...Va.getInstance()};let nt=!!O,Wt=[],Vt="tooltip_interactive_go_back_disabled_first";if(nt&&this.interactiveController){let ci=this.interactiveController.state.isInitialChapter$.getValue(),hi=this.interactiveController.getHistoryState();ci&&Wt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Wt.push("SEEK_TO_INTERACTIVE_BUTTON"),hi.hasPrevChapter$.getValue()||(Wt.push("PLAY_PREV_CHAPTER_BUTTON"),ci||(hi.isGoBackLimited$.getValue()?Vt="tooltip_interactive_go_back_disabled_limit":Vt="tooltip_interactive_go_back_disabled"))}let pi=()=>{var ci;this.isInited=!1,this.prevIsid=void 0;let hi=(o==null?void 0:o.info.isEnded$.getValue())&&((ci=this.interactiveController)==null?void 0:ci.state.isEndChapter$.getValue());U.onReplayInteractiveVideo&&!hi?U.onReplayInteractiveVideo():this.replayInteractiveVideo()},di=He&&this.videoConfig.videos.length===1;this.store=Z_({player:o,interfaceLanguage:Z,isCyrillicRelatedInterface:oe,videoId:kt,isClip:It,isLiveCatchUpMode:we,isAudioDisabled:_e,statAuthToken:w,callbacks:U,webApi:Be,videoEpisodes:wt,previewThumbsData:jt,canDownload:Qe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,disabledControls:Wt,isInteractive:nt,saveRate:re,interactiveRanges$:(f=this.interactiveController)==null?void 0:f.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:pi,playPrevChapterDisabledTooltip:Vt,hasInteractiveBranches:!!((_=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&_.length),additionalButtons:this.uiConfig.features.additionalButtons?K:[],additionalSettingsMenuItems:ae!=null?ae:[],additionalContextMenuItems:ye!=null?ye:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:ci=>{var hi;return(hi=this.sveltePersistentLayerComponent)==null?void 0:hi.startVideoChangedAnimation(ci)},looped:this.uiConfig.features.useLoopSetting?it:di,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Ci}=this.microStoresRoot=Fb(),to=()=>{var ci,hi,$t,ui,Qi,ct;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(at=>{var We;return(We=U==null?void 0:U.onCurrentFormatChanged)==null?void 0:We.call(U,at)})),this.subscription.add(Ci.interactiveControlsOpacity$.subscribe(at=>{var We;at!==null&&((We=this==null?void 0:this.interactiveController)==null||We.setDisabledControls(at))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(at=>{var We;return(We=U==null?void 0:U.onThroughputEstimationChanged)==null?void 0:We.call(U,at)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(at=>{var We;return(We=U==null?void 0:U.onTrafficSavingEnabledChanged)==null?void 0:We.call(U,at)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(at=>{var We;return(We=U==null?void 0:U.onHighQualityEnabledChanged)==null?void 0:We.call(U,at)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(at=>{var We;return(We=U==null?void 0:U.onAutoQualityEnabledChanged)==null?void 0:We.call(U,!!at)})),this.subscription.add(new wI(at=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(We=>at.next(We)))}).pipe(TI(1)).subscribe(at=>{var We;return(We=U==null?void 0:U.onCurrentPlaybackRateChanged)==null?void 0:We.call(U,at)})),this.subscription.add(this.store.state.volume$.subscribe(at=>{var We;return(We=U==null?void 0:U.onVolumeChange)==null?void 0:We.call(U,at)})),this.subscription.add(this.store.state.muted$.subscribe(at=>{var We,fi,po,Go;if(at)(We=U==null?void 0:U.onMute)==null||We.call(U);else{let Yo=(po=((fi=this.store)==null?void 0:fi.state.volume$)&&be(this.store.state.volume$))!=null?po:0;(Go=U==null?void 0:U.onUnmute)==null||Go.call(U,Yo)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(at=>{var We;return(We=U==null?void 0:U.onVideoBitrateChanged)==null?void 0:We.call(U,at)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(at=>{var We;let fi=(We=this.store)==null?void 0:We.ui.controls.disabledControls$;fi&&(at&&!fi.includes(Td)&&fi.add(Td),at||fi.remove(Td))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async at=>{var We;if(!zb.browser.isSamsungBrowser||!at||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter((We=this.videoConfig)==null?void 0:We.callbacks.onExternalFullscreenExit)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(at=>{var We;return(We=U==null?void 0:U.onVSIDChanged)==null?void 0:We.call(U,at)})),this.initMediaSession(),R(Xn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:Ee,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Te,thumbUrl:Fe,subtitles:Ot,subtitlesForcedLanguage:Nt,live:zt,preload:I,autoplay:T,muted:A,volume:N,fromTime:E,canRewindLive:k,supportLink:Q,showAds:F,adsSlotId:z,adsParams:Pe,adsAutoplayParam:se,duration:Pt,logoClickable:J,logoHidden:Ce,isMobile:ee!=null?ee:pe,failoverHosts:ue,fullScreenTarget:ve,saveRate:re,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ge,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:ke.nextVideoTitle,endScreenVideoThumb:ke.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:de,showEndScreen:Re,showAutoplayNext:Ve,adsExternalApi:G,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let Dt={target:this.playerContainer,props:n(Xn)};this.svelteRootComponent=Zr(Ev,Dt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,($t=(hi=(ci=this.videoConfig)==null?void 0:ci.callbacks)==null?void 0:hi.onInited)==null||$t.call(hi)),(ui=this.internalsExposure)==null||ui.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((ct=(Qi=this.videoConfig)==null?void 0:Qi.callbacks)!=null&&ct.onDevNullLog)?Ec.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ec.destroy("ui")};this.coreConfig.asyncResolveClientChecker?zb.isInited$.subscribe(ci=>{ci&&(console.log("UI SDK async start"),to())}):to()}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&&Ov(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)}async initInteractives(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=await import("@vkontakte/videoplayer-interactive/es2018");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?be(s):this.videoConfig.interfaceLanguage,{projectInfo:f,initChapterId:p,historyApi:v,videoLoader:_}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:f,initChapterId:p,historyApi:v,vkVideoLoader:_,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:b}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(b.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 w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={...I.config,title:(f==null?void 0:f.title)||I.config.title};let T=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,T),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:T})=>{var N,A,E,k,Q,F;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(Id)),I==="action-choice-canceled"){let X=be(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(A=this.videoConfig)!=null&&A.isMobile)&&X){this.store.ui.interactiveHideMobileControls.set(!0);return}(F=(k=this.videoConfig)==null?void 0:(Q=k.callbacks).onDisabledInteractiveClick)==null||F.call(Q)}})),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(Id)})),await 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,A,E;T.length&&((E=(A=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:A.onInteractiveHistoryChanged)==null||E.call(A,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,A;(A=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveChapterChanged)==null||A.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,T,N,A;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(A=(T=this.videoConfig)==null?void 0:(N=T.callbacks).onInteractiveTimeIndicatorClick)==null||A.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}}initPlayer(e,i={}){var o,r,a,l,d,s,u,f,p,v,_,y,b,w,I,T,N,A,E,k,Q,F,z,X,se;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let Z=new Error("empty videos");this.fatalError$.next(Z),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,Z.message);return}else this.fatalError$.next(null);if(this.videoConfig=$c(LI,$I(e,Z=>Z instanceof Dv?Z:void 0)),this.playerId=II(e.playerId),this.uiConfig=Ih((a=i.ui)!=null?a:{}),this.updatePersistentLayerProps(),this.coreConfig=(l=i.core)!=null?l:{},this.statisticsConfig=(d=i.statistics)!=null?d:{},this.metaConfig=i.meta,this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer&&(this.rootContainer.style.minHeight="unset"),this.style.display="block",this.style.width="100%",this.style.height="100%"),this.videoConfig.playerView==="preview"&&(this.playerContainer.style.contain="none"),this.sentry={config:(s=this.uiConfig.sentry)!=null?s:{}},this.uiConfig.features.exposeInternalsToGlobal&&((u=this.internalsExposure)!=null||(this.internalsExposure=new CI("ui",this.playerId))),Ec.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((f=this.videoConfig)==null?void 0:f.showAds)],numbers:[_I()]}),Ov(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Ov(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=(_=this.uiConfig.features.pip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(b=this.uiConfig.features.dpip)!=null?b:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride={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,(A=this.videoConfig).autoplay&&(A.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(k=this.uiConfig.ads.slot)!=null?k:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((Q=this.uiConfig.showLogo)!=null?Q:!this.videoConfig.logoHidden),(F=this.videoConfig).canRewindLive&&(F.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((X=this.videoConfig.videos)!=null&&X[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let Z={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=dp.getLatestSupportedVersion(Z):this.pictureInPictureApi=new Ra(Z)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new lp:void 0,this.slotsApi=this.uiConfig.features.slots?new np(this.uiConfig.disabledSlotIds):void 0,this.annotationsApi=this.uiConfig.features.annotations?new cp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new mp(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]),Rb(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(se=this.slotsApi)==null||se.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(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}={...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)}async setLanguage(e){var i;await((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()}async replayInteractiveChapter(e){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=be(this.store.state.positionExact$),l=be(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(SI()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();await 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 Voe,VKNumericLanguage as Roe,loadVKLangPack as Noe}from"@vkontakte/videoplayer-shared/es2018";import{VideoQuality as Ooe,VideoFormat as Boe}from"@vkontakte/videoplayer-core/es2018";var Toe=()=>{window.customElements.define("vk-video-player",vp)};export{Gu as ControlButtonType,ms as GridTypes,Voe as InterfaceLanguage,Bd as MenuItemType,vs as PlayerPhase,Pl as VERSION,Roe as VKNumericLanguage,Boe as VideoFormat,Ooe as VideoQuality,Noe as loadVKLangPack,Toe as registerPlayerWebComponent};