@vkontakte/videoplayer 1.1.79 → 1.1.80-dev.0c91b20c.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2015.cjs.js CHANGED
@@ -1,63 +1,63 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.79
3
- * Thu, 04 Dec 2025 16:03:01 GMT
4
- * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-79/doc/
2
+ * @vkontakte/videoplayer v1.1.80-dev.0c91b20c.0
3
+ * Fri, 12 Dec 2025 13:59:23 GMT
4
+ * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-80/doc/
5
5
  */
6
- "use strict";var N$=Object.create;var yd=Object.defineProperty,O$=Object.defineProperties,D$=Object.getOwnPropertyDescriptor,B$=Object.getOwnPropertyDescriptors,F$=Object.getOwnPropertyNames,wg=Object.getOwnPropertySymbols,H$=Object.getPrototypeOf,Sg=Object.prototype.hasOwnProperty,U$=Object.prototype.propertyIsEnumerable;var Tg=t=>{throw TypeError(t)};var Gp=(t,e,i)=>e in t?yd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ie=(t,e)=>{for(var i in e||(e={}))Sg.call(e,i)&&Gp(t,i,e[i]);if(wg)for(var i of wg(e))U$.call(e,i)&&Gp(t,i,e[i]);return t},jt=(t,e)=>O$(t,B$(e));var z$=(t,e)=>{for(var i in e)yd(t,i,{get:e[i],enumerable:!0})},Cg=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of F$(e))!Sg.call(t,r)&&r!==i&&yd(t,r,{get:()=>e[r],enumerable:!(o=D$(e,r))||o.enumerable});return t};var Ig=(t,e,i)=>(i=t!=null?N$(H$(t)):{},Cg(e||!t||!t.__esModule?yd(i,"default",{value:t,enumerable:!0}):i,t)),W$=t=>Cg(yd({},"__esModule",{value:!0}),t);var pr=(t,e,i)=>Gp(t,typeof e!="symbol"?e+"":e,i),Yp=(t,e,i)=>e.has(t)||Tg("Cannot "+i);var Ni=(t,e,i)=>(Yp(t,e,"read from private field"),i?i.call(t):e.get(t)),Zs=(t,e,i)=>e.has(t)?Tg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),bl=(t,e,i,o)=>(Yp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Eg=(t,e,i)=>(Yp(t,e,"access private method"),i);var ht=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())});var RC={};z$(RC,{ControlButtonType:()=>xc,GridTypes:()=>ts,InterfaceLanguage:()=>vd.InterfaceLanguage,MenuItemType:()=>jl,PlayerPhase:()=>is,VERSION:()=>Fa,VKNumericLanguage:()=>vd.VKNumericLanguage,VideoFormat:()=>Hp.VideoFormat,VideoQuality:()=>Hp.VideoQuality,loadVKLangPack:()=>vd.loadVKLangPack,registerPlayerWebComponent:()=>VC});module.exports=W$(RC);var Js="[",ea="[!",Sa="]",ls={};var no=Symbol(),Qn=Symbol("filename"),kg=Symbol("hmr"),Pg="http://www.w3.org/1999/xhtml",lu="http://www.w3.org/2000/svg";var jp="@attach";var du=!0;var Lg,Mg,Ag=(Mg=(Lg=globalThis.process)==null?void 0:Lg.env)==null?void 0:Mg.NODE_ENV,Ee=Ag&&!Ag.toLowerCase().startsWith("prod");var fr=Array.isArray,Vg=Array.prototype.indexOf,xd=Array.from,Xp=Object.keys,_o=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,cu=Object.getOwnPropertyDescriptors,Zp=Object.prototype,Rg=Array.prototype,Ta=Object.getPrototypeOf,Jp=Object.isExtensible;function ta(t){return typeof t=="function"}var _t=()=>{};function Ng(t){return t()}function ia(t){for(var e=0;e<t.length;e++)t[e]()}var Jo=Symbol("$state"),$l=Symbol("legacy props"),Og=Symbol(""),uu=Symbol("proxy path"),pu=1,yl=3,mr=8;function fu(t){return t===this.v}function xl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Dg(t,e){return t!==e}function wl(t){return!xl(t,this.v)}function Bg(){if(Ee){let t=new Error(`derived_references_self
6
+ "use strict";var O$=Object.create;var xd=Object.defineProperty,D$=Object.defineProperties,B$=Object.getOwnPropertyDescriptor,F$=Object.getOwnPropertyDescriptors,H$=Object.getOwnPropertyNames,Sg=Object.getOwnPropertySymbols,U$=Object.getPrototypeOf,Cg=Object.prototype.hasOwnProperty,z$=Object.prototype.propertyIsEnumerable;var Tg=t=>{throw TypeError(t)};var Yp=(t,e,i)=>e in t?xd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Ee=(t,e)=>{for(var i in e||(e={}))Cg.call(e,i)&&Yp(t,i,e[i]);if(Sg)for(var i of Sg(e))z$.call(e,i)&&Yp(t,i,e[i]);return t},jt=(t,e)=>D$(t,F$(e));var W$=(t,e)=>{for(var i in e)xd(t,i,{get:e[i],enumerable:!0})},Ig=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of H$(e))!Cg.call(t,r)&&r!==i&&xd(t,r,{get:()=>e[r],enumerable:!(o=B$(e,r))||o.enumerable});return t};var Eg=(t,e,i)=>(i=t!=null?O$(U$(t)):{},Ig(e||!t||!t.__esModule?xd(i,"default",{value:t,enumerable:!0}):i,t)),K$=t=>Ig(xd({},"__esModule",{value:!0}),t);var mr=(t,e,i)=>Yp(t,typeof e!="symbol"?e+"":e,i),jp=(t,e,i)=>e.has(t)||Tg("Cannot "+i);var Bi=(t,e,i)=>(jp(t,e,"read from private field"),i?i.call(t):e.get(t)),Gs=(t,e,i)=>e.has(t)?Tg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),bl=(t,e,i,o)=>(jp(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),Pg=(t,e,i)=>(jp(t,e,"access private method"),i);var ht=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())});var BT={};W$(BT,{ControlButtonType:()=>wc,GridTypes:()=>ts,InterfaceLanguage:()=>vd.InterfaceLanguage,MenuItemType:()=>jl,PlayerPhase:()=>is,VERSION:()=>Ba,VKNumericLanguage:()=>vd.VKNumericLanguage,VideoFormat:()=>Up.VideoFormat,VideoQuality:()=>Up.VideoQuality,loadVKLangPack:()=>vd.loadVKLangPack,registerPlayerWebComponent:()=>DT});module.exports=K$(BT);var Ys="[",js="[!",wa="]",us={};var oo=Symbol(),Gn=Symbol("filename"),kg=Symbol("hmr"),Ag="http://www.w3.org/1999/xhtml",du="http://www.w3.org/2000/svg";var Xp="@attach";var cu=!0;var Mg,Vg,Lg=(Vg=(Mg=globalThis.process)==null?void 0:Mg.env)==null?void 0:Vg.NODE_ENV,Pe=Lg&&!Lg.toLowerCase().startsWith("prod");var vr=Array.isArray,Rg=Array.prototype.indexOf,wd=Array.from,Zp=Object.keys,vo=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,uu=Object.getOwnPropertyDescriptors,Jp=Object.prototype,Ng=Array.prototype,Sa=Object.getPrototypeOf,ef=Object.isExtensible;function Xs(t){return typeof t=="function"}var _t=()=>{};function Og(t){return t()}function Zs(t){for(var e=0;e<t.length;e++)t[e]()}var Zo=Symbol("$state"),$l=Symbol("legacy props"),Dg=Symbol(""),pu=Symbol("proxy path"),fu=1,yl=3,gr=8;function mu(t){return t===this.v}function xl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Bg(t,e){return t!==e}function wl(t){return!xl(t,this.v)}function Fg(){if(Pe){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 Fg(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 Hg(t){if(Pe){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 Hg(){if(Ee){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ug(t){if(Ee){let e=new Error(`effect_orphan
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 Ug(){if(Pe){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function zg(t){if(Pe){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 zg(){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 Wg(){if(Pe){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 Wg(){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 Kg(){if(Pe){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 Kg(){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 qg(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 qg(){if(Pe){let t=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/invalid_snippet")}function Qg(t){if(Pe){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 Qg(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 Gg(t){if(Pe){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 Gg(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 Yg(t){if(Pe){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 Yg(){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 jg(){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 Xg(){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 ds=!1,cs=!1;function Zg(){ds=!0}var wd=null;function Ts(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 jg(){if(Pe){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xg(){if(Pe){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Zg(){if(Pe){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var ps=!1,fs=!1;function Jg(){ps=!0}var Sd=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;_o(e,"stack",{value:r.join(`
25
- `)}),_o(e,"name",{value:`${t}Error`})}return e}function Gr(t,e){return t.label=e,mu(t.v,e),t}function mu(t,e){var i;return(i=t==null?void 0:t[uu])==null||i.call(t,e),t}function Sl(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;vo(e,"stack",{value:r.join(`
25
+ `)}),vo(e,"name",{value:`${t}Error`})}return e}function Qr(t,e){return t.label=e,vu(t.v,e),t}function vu(t,e){var i;return(i=t==null?void 0:t[pu])==null||i.call(t,e),t}function Sl(t){if(Pe){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 Qt=null;function Sd(t){Qt=t}var vr=null;function Td(t){vr=t}function Tl(t){return of("getContext").get(t)}function Cl(t,e){return of("setContext").set(t,e),e}function Cd(){return of("getAllContexts")}function B(t,e=!1,i){var o=Qt={p:Qt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ds&&!e&&(Qt.l={s:null,u:null,r1:[],r2:Vr(!1)}),Do(()=>{o.d=!0}),Ee&&(Qt.function=i,vr=i)}function F(t){var l,d;let e=Qt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=yt,o=Bt;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];bo(a.effect),qi(a.reaction),Bo(a.fn)}}finally{bo(i),qi(o)}}Qt=e.p,Ee&&(vr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function us(){return!ds||Qt!==null&&Qt.l===null}function of(t){var e;return Qt===null&&Sl(t),(e=Qt.c)!=null?e:Qt.c=new Map(q$(Qt)||void 0)}function q$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var Q$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||Jo in t)return t;let e=Ta(t);if(e!==Zp&&e!==Rg)return t;var i=new Map,o=fr(t),r=W(0),a=Ee&&cs?Ts("CreatedAt"):null,l=Bt,d=v=>{var p=Bt;qi(l);var f=v();return qi(p),f};o&&i.set("length",W(t.length,a));var s="";function u(v){s=v,Gr(r,`${s} version`);for(let[p,f]of i)Gr(f,Ca(s,p))}return new Proxy(t,{defineProperty(v,p,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&Yg();var $=i.get(p);return $===void 0?$=d(()=>{var y=W(f.value,a);return i.set(p,y),Ee&&typeof p=="string"&&Gr(y,Ca(s,p)),y}):O($,f.value,!0),!0},deleteProperty(v,p){var f=i.get(p);if(f===void 0){if(p in v){let g=d(()=>W(no,a));i.set(p,g),nf(r),Ee&&Gr(g,Ca(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(f,no),nf(r)}return!0},get(v,p,f){var w;if(p===Jo)return t;if(Ee&&p===uu)return u;var $=i.get(p),y=p in v;if($===void 0&&(!y||(w=Zo(v,p))!=null&&w.writable)&&($=d(()=>{var T=ci(y?v[p]:no),I=W(T,a);return Ee&&Gr(I,Ca(s,p)),I}),i.set(p,$)),$!==void 0){var g=n($);return g===no?void 0:g}return Reflect.get(v,p,f)},getOwnPropertyDescriptor(v,p){var f=Reflect.getOwnPropertyDescriptor(v,p);if(f&&"value"in f){var $=i.get(p);$&&(f.value=n($))}else if(f===void 0){var y=i.get(p),g=y==null?void 0:y.v;if(y!==void 0&&g!==no)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return f},has(v,p){var g;if(p===Jo)return!0;var f=i.get(p),$=f!==void 0&&f.v!==no||Reflect.has(v,p);if(f!==void 0||yt!==null&&(!$||(g=Zo(v,p))!=null&&g.writable)){f===void 0&&(f=d(()=>{var w=$?ci(v[p]):no,T=W(w,a);return Ee&&Gr(T,Ca(s,p)),T}),i.set(p,f));var y=n(f);if(y===no)return!1}return $},set(v,p,f,$){var A;var y=i.get(p),g=p in v;if(o&&p==="length")for(var w=f;w<y.v;w+=1){var T=i.get(w+"");T!==void 0?O(T,no):w in v&&(T=d(()=>W(no,a)),i.set(w+"",T),Ee&&Gr(T,Ca(s,w)))}if(y===void 0)(!g||(A=Zo(v,p))!=null&&A.writable)&&(y=d(()=>W(void 0,a)),O(y,ci(f)),i.set(p,y),Ee&&Gr(y,Ca(s,p)));else{g=y.v!==no;var I=d(()=>ci(f));O(y,I)}var N=Reflect.getOwnPropertyDescriptor(v,p);if(N!=null&&N.set&&N.set.call($,f),!g){if(o&&typeof p=="string"){var k=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=k.v&&O(k,E+1)}nf(r)}return!0},ownKeys(v){n(r);var p=Reflect.ownKeys(v).filter(y=>{var g=i.get(y);return g===void 0||g.v!==no});for(var[f,$]of i)$.v!==no&&!(f in v)&&p.push(f);return p},setPrototypeOf(){jg()}})}function Ca(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:Q$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function nf(t,e=1){O(t,t.v+e)}function Il(t){try{if(t!==null&&typeof t=="object"&&Jo in t)return t[Jo]}catch(e){}return t}function rf(t,e){return Object.is(Il(t),Il(e))}function Yr(t){var e=2050,i=Bt!==null&&(Bt.f&2)!==0?Bt:null;yt===null||i!==null&&(i.f&256)!==0?e|=256:yt.f|=1048576;let o={ctx:Qt,deps:null,effects:null,equals:fu,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:yt};return Ee&&cs&&(o.created=Ts("CreatedAt")),o}function m(t){let e=Yr(t);return hu(e),e}function Sn(t){let e=Yr(t);return e.equals=wl,e}function vu(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Qi(e[i])}}var sf=[];function G$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function df(t){var e,i=yt;if(bo(G$(t)),Ee){let o=Ia;af(new Set);try{sf.includes(t)&&Bg(),sf.push(t),vu(t),e=gu(t)}finally{bo(i),af(o),sf.pop()}}else try{vu(t),e=gu(t)}finally{bo(i)}return e}function cf(t){var e=df(t);if(t.equals(e)||(t.v=e,t.wv=Id()),!Cs){var i=(Is||(t.f&256)!==0)&&t.deps!==null?4096:1024;Tn(t,i)}}var Ia=new Set,El=new Map;function af(t){Ia=t}function Vr(t,e){var i={f:0,v:t,reactions:null,equals:fu,rv:0,wv:0};return Ee&&cs&&(i.created=e!=null?e:Ts("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function W(t,e){let i=Vr(t,e);return hu(i),i}function ps(t,e=!1,i=!0){var r,a;let o=Vr(t);return e||(o.equals=wl),ds&&i&&Qt!==null&&Qt.l!==null&&((a=(r=Qt.l).s)!=null?a:r.s=[]).push(o),o}function O(t,e,i=!1){var r;Bt!==null&&(!_r||(Bt.f&262144)!==0)&&us()&&(Bt.f&262162)!==0&&!((r=tn)!=null&&r[1].includes(t)&&tn[0]===Bt)&&Xg();let o=i?ci(e):e;return Ee&&mu(o,t.label),kl(t,o)}function kl(t,e){if(!t.equals(e)){var i=t.v;if(Cs?El.set(t,e):El.set(t,i),t.v=e,Ee&&cs&&(t.updated=Ts("UpdatedAt"),yt!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&df(t),Tn(t,(t.f&256)===0?1024:4096)),t.wv=Id(),eh(t,2048),us()&&yt!==null&&(yt.f&1024)!==0&&(yt.f&96)===0&&(hr===null?th([t]):hr.push(t)),Ee&&Ia.size>0){let o=Array.from(Ia);for(let r of o)(r.f&1024)!==0&&Tn(r,4096),ka(r)&&Pl(r);Ia.clear()}}return e}function eh(t,e){var i=t.reactions;if(i!==null)for(var o=us(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===yt)){if(Ee&&(d&262144)!==0){Ia.add(l);continue}Tn(l,e),(d&1280)!==0&&((d&2)!==0?eh(l,4096):kd(l))}}}var Al="font-weight: bold",Ll="font-weight: normal";function ih(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 Qt=null;function Cd(t){Qt=t}var hr=null;function Td(t){hr=t}function Cl(t){return nf("getContext").get(t)}function Tl(t,e){return nf("setContext").set(t,e),e}function Id(){return nf("getAllContexts")}function B(t,e=!1,i){var o=Qt={p:Qt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};ps&&!e&&(Qt.l={s:null,u:null,r1:[],r2:Mr(!1)}),Vo(()=>{o.d=!0}),Pe&&(Qt.function=i,hr=i)}function F(t){var l,d;let e=Qt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=$t,o=Ot;e.e=null;try{for(var r=0;r<s.length;r++){var a=s[r];go(a.effect),qi(a.reaction),Ro(a.fn)}}finally{go(i),qi(o)}}Qt=e.p,Pe&&(hr=(d=(l=e.p)==null?void 0:l.function)!=null?d:null),e.m=!0}return t||{}}function ms(){return!ps||Qt!==null&&Qt.l===null}function nf(t){var e;return Qt===null&&Sl(t),(e=Qt.c)!=null?e:Qt.c=new Map(Q$(Qt)||void 0)}function Q$(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var G$=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ci(t){if(typeof t!="object"||t===null||Zo in t)return t;let e=Sa(t);if(e!==Jp&&e!==Ng)return t;var i=new Map,o=vr(t),r=K(0),a=Pe&&fs?Ts("CreatedAt"):null,l=Ot,d=f=>{var p=Ot;qi(l);var v=f();return qi(p),v};o&&i.set("length",K(t.length,a));var s="";function u(f){s=f,Qr(r,`${s} version`);for(let[p,v]of i)Qr(v,Ca(s,p))}return new Proxy(t,{defineProperty(f,p,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&jg();var $=i.get(p);return $===void 0?$=d(()=>{var y=K(v.value,a);return i.set(p,y),Pe&&typeof p=="string"&&Qr(y,Ca(s,p)),y}):O($,v.value,!0),!0},deleteProperty(f,p){var v=i.get(p);if(v===void 0){if(p in f){let g=d(()=>K(oo,a));i.set(p,g),rf(r),Pe&&Qr(g,Ca(s,p))}}else{if(o&&typeof p=="string"){var $=i.get("length"),y=Number(p);Number.isInteger(y)&&y<$.v&&O($,y)}O(v,oo),rf(r)}return!0},get(f,p,v){var w;if(p===Zo)return t;if(Pe&&p===pu)return u;var $=i.get(p),y=p in f;if($===void 0&&(!y||(w=Xo(f,p))!=null&&w.writable)&&($=d(()=>{var I=ci(y?f[p]:oo),C=K(I,a);return Pe&&Qr(C,Ca(s,p)),C}),i.set(p,$)),$!==void 0){var g=n($);return g===oo?void 0:g}return Reflect.get(f,p,v)},getOwnPropertyDescriptor(f,p){var v=Reflect.getOwnPropertyDescriptor(f,p);if(v&&"value"in v){var $=i.get(p);$&&(v.value=n($))}else if(v===void 0){var y=i.get(p),g=y==null?void 0:y.v;if(y!==void 0&&g!==oo)return{enumerable:!0,configurable:!0,value:g,writable:!0}}return v},has(f,p){var g;if(p===Zo)return!0;var v=i.get(p),$=v!==void 0&&v.v!==oo||Reflect.has(f,p);if(v!==void 0||$t!==null&&(!$||(g=Xo(f,p))!=null&&g.writable)){v===void 0&&(v=d(()=>{var w=$?ci(f[p]):oo,I=K(w,a);return Pe&&Qr(I,Ca(s,p)),I}),i.set(p,v));var y=n(v);if(y===oo)return!1}return $},set(f,p,v,$){var P;var y=i.get(p),g=p in f;if(o&&p==="length")for(var w=v;w<y.v;w+=1){var I=i.get(w+"");I!==void 0?O(I,oo):w in f&&(I=d(()=>K(oo,a)),i.set(w+"",I),Pe&&Qr(I,Ca(s,w)))}if(y===void 0)(!g||(P=Xo(f,p))!=null&&P.writable)&&(y=d(()=>K(void 0,a)),O(y,ci(v)),i.set(p,y),Pe&&Qr(y,Ca(s,p)));else{g=y.v!==oo;var C=d(()=>ci(v));O(y,C)}var N=Reflect.getOwnPropertyDescriptor(f,p);if(N!=null&&N.set&&N.set.call($,v),!g){if(o&&typeof p=="string"){var L=i.get("length"),E=Number(p);Number.isInteger(E)&&E>=L.v&&O(L,E+1)}rf(r)}return!0},ownKeys(f){n(r);var p=Reflect.ownKeys(f).filter(y=>{var g=i.get(y);return g===void 0||g.v!==oo});for(var[v,$]of i)$.v!==oo&&!(v in f)&&p.push(v);return p},setPrototypeOf(){Xg()}})}function Ca(t,e){var i;return typeof e=="symbol"?`${t}[Symbol(${(i=e.description)!=null?i:""})]`:G$.test(e)?`${t}.${e}`:/^\d+$/.test(e)?`${t}[${e}]`:`${t}['${e}']`}function rf(t,e=1){O(t,t.v+e)}function Il(t){try{if(t!==null&&typeof t=="object"&&Zo in t)return t[Zo]}catch(e){}return t}function sf(t,e){return Object.is(Il(t),Il(e))}function Gr(t){var e=2050,i=Ot!==null&&(Ot.f&2)!==0?Ot:null;$t===null||i!==null&&(i.f&256)!==0?e|=256:$t.f|=1048576;let o={ctx:Qt,deps:null,effects:null,equals:mu,f:e,fn:t,reactions:null,rv:0,v:null,wv:0,parent:i!=null?i:$t};return Pe&&fs&&(o.created=Ts("CreatedAt")),o}function m(t){let e=Gr(t);return _u(e),e}function In(t){let e=Gr(t);return e.equals=wl,e}function gu(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Qi(e[i])}}var af=[];function Y$(t){for(var e=t.parent;e!==null;){if((e.f&2)===0)return e;e=e.parent}return null}function cf(t){var e,i=$t;if(go(Y$(t)),Pe){let o=Ta;lf(new Set);try{af.includes(t)&&Fg(),af.push(t),gu(t),e=hu(t)}finally{go(i),lf(o),af.pop()}}else try{gu(t),e=hu(t)}finally{go(i)}return e}function uf(t){var e=cf(t);if(t.equals(e)||(t.v=e,t.wv=Ed()),!Is){var i=(Es||(t.f&256)!==0)&&t.deps!==null?4096:1024;En(t,i)}}var Ta=new Set,El=new Map;function lf(t){Ta=t}function Mr(t,e){var i={f:0,v:t,reactions:null,equals:mu,rv:0,wv:0};return Pe&&fs&&(i.created=e!=null?e:Ts("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function K(t,e){let i=Mr(t,e);return _u(i),i}function vs(t,e=!1,i=!0){var r,a;let o=Mr(t);return e||(o.equals=wl),ps&&i&&Qt!==null&&Qt.l!==null&&((a=(r=Qt.l).s)!=null?a:r.s=[]).push(o),o}function O(t,e,i=!1){var r;Ot!==null&&(!$r||(Ot.f&262144)!==0)&&ms()&&(Ot.f&262162)!==0&&!((r=en)!=null&&r[1].includes(t)&&en[0]===Ot)&&Zg();let o=i?ci(e):e;return Pe&&vu(o,t.label),Pl(t,o)}function Pl(t,e){if(!t.equals(e)){var i=t.v;if(Is?El.set(t,e):El.set(t,i),t.v=e,Pe&&fs&&(t.updated=Ts("UpdatedAt"),$t!==null&&(t.set_during_effect=!0)),(t.f&2)!==0&&((t.f&2048)!==0&&cf(t),En(t,(t.f&256)===0?1024:4096)),t.wv=Ed(),th(t,2048),ms()&&$t!==null&&($t.f&1024)!==0&&($t.f&96)===0&&(br===null?ih([t]):br.push(t)),Pe&&Ta.size>0){let o=Array.from(Ta);for(let r of o)(r.f&1024)!==0&&En(r,4096),Ea(r)&&kl(r);Ta.clear()}}return e}function th(t,e){var i=t.reactions;if(i!==null)for(var o=ms(),r=i.length,a=0;a<r;a++){var l=i[a],d=l.f;if((d&2048)===0&&!(!o&&l===$t)){if(Pe&&(d&262144)!==0){Ta.add(l);continue}En(l,e),(d&1280)!==0&&((d&2)!==0?th(l,4096):kd(l))}}}var Al="font-weight: bold",Ll="font-weight: normal";function oh(t,e,i){Pe?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`,Al,Ll):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function oh(t){Ee?console.warn(`%c[svelte] hydration_html_changed
29
+ https://svelte.dev/e/hydration_attribute_changed`,Al,Ll):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function nh(t){Pe?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`,Al,Ll):console.warn("https://svelte.dev/e/hydration_html_changed")}function oa(t){Ee?console.warn(`%c[svelte] hydration_mismatch
31
+ https://svelte.dev/e/hydration_html_changed`,Al,Ll):console.warn("https://svelte.dev/e/hydration_html_changed")}function Js(t){Pe?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`,Al,Ll):console.warn("https://svelte.dev/e/hydration_mismatch")}function nh(){Ee?console.warn(`%c[svelte] lifecycle_double_unmount
33
+ https://svelte.dev/e/hydration_mismatch`,Al,Ll):console.warn("https://svelte.dev/e/hydration_mismatch")}function rh(){Pe?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`,Al,Ll):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function rh(){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",Al,Ll):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function _u(t){Ee?console.warn(`%c[svelte] state_proxy_equality_mismatch
35
+ https://svelte.dev/e/lifecycle_double_unmount`,Al,Ll):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function sh(){Pe?console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",Al,Ll):console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function bu(t){Pe?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`,Al,Ll):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var tt=!1;function $o(t){tt=t}var xt;function Ii(t){if(t===null)throw oa(),ls;return xt=t}function Gi(){return Ii(on(xt))}function S(t){if(tt){if(on(xt)!==null)throw oa(),ls;xt=t}}function fi(t=1){if(tt){for(var e=t,i=xt;e--;)i=on(i);xt=i}}function Pa(){for(var t=0,e=xt;;){if(e.nodeType===mr){var i=e.data;if(i===Sa){if(t===0)return e;t-=1}else(i===Js||i===ea)&&(t+=1)}var o=on(e);e.remove(),e=o}}function bu(t){if(!t||t.nodeType!==mr)throw oa(),ls;return t.data}function sh(){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(Il(this[s])===a){_u("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(Il(this[s])===a){_u("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(Il(this[s])===a){_u("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var Aa,ah,Pd,lh,dh;function $u(){if(Aa===void 0){Aa=window,ah=document,Pd=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;lh=Zo(e,"firstChild").get,dh=Zo(e,"nextSibling").get,Jp(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Jp(i)&&(i.__t=void 0),Ee&&(t.__svelte_meta=null,sh())}}function Cn(t=""){return document.createTextNode(t)}function ki(t){return lh.call(t)}function on(t){return dh.call(t)}function C(t,e){if(!tt)return ki(t);var i=ki(xt);if(i===null)i=xt.appendChild(Cn());else if(e&&i.nodeType!==yl){var o=Cn();return i==null||i.before(o),Ii(o),o}return Ii(i),i}function de(t,e){var r,a;if(!tt){var i=ki(t);return i.nodeType===8&&i.data===""?on(i):i}if(e&&((r=xt)==null?void 0:r.nodeType)!==yl){var o=Cn();return(a=xt)==null||a.before(o),Ii(o),o}return xt}function L(t,e=1,i=!1){let o=tt?xt:t;for(var r;e--;)r=o,o=on(o);if(!tt)return o;if(i&&(o==null?void 0:o.nodeType)!==yl){var a=Cn();return o===null?r==null||r.after(a):o.before(a),Ii(a),a}return Ii(o),o}function Ad(t){t.textContent=""}function ff(t){yt===null&&Bt===null&&Ug(t),Bt!==null&&(Bt.f&256)!==0&&yt===null&&Hg(),Cs&&Fg(t)}function Y$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function La(t,e,i,o=!0){var s;var r=yt;if(Ee)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Qt,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=vr),i)try{Pl(a),a.f|=32768}catch(u){throw Qi(a),u}else e!==null&&kd(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&&Y$(a,r),Bt!==null&&(Bt.f&2)!==0)){var d=Bt;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Do(t){let e=La(8,null,!1);return Tn(e,1024),e.teardown=t,e}function Oe(t){var r;ff("$effect");var e=yt!==null&&(yt.f&32)!==0&&Qt!==null&&!Qt.m;if(Ee&&_o(t,"name",{value:"$effect"}),e){var i=Qt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:yt,reaction:Bt})}else{var o=Bo(t);return o}}function Vd(t){return ff("$effect.pre"),Ee&&_o(t,"name",{value:"$effect.pre"}),nn(t)}function wu(t){let e=La(64,t,!0);return()=>{Qi(e)}}function uh(t){let e=La(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Xn(e,()=>{Qi(e),o(void 0)}):(Qi(e),o(void 0))})}function Bo(t){return La(4,t,!1)}function nn(t){return La(8,t,!0)}function D(t,e=[],i=Yr){if(Ee)return nn(()=>{var r=yt,a=()=>t(...l.map(n));_o(r.fn,"name",{value:"{expression}"}),_o(a,"name",{value:"{expression}"});let l=e.map(i);Yi(a)});let o=e.map(i);return Yi(()=>t(...o.map(n)))}function Yi(t,e=0){return La(24|e,t,!0)}function Oi(t,e=!0){return La(40,t,!0,e)}function mf(t){var e=t.teardown;if(e!==null){let i=Cs,o=Bt;uf(!0),qi(null);try{e.call(null)}finally{uf(i),qi(o)}}}function vf(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:Qi(i,e),i=o}}function ph(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Qi(e),e=i}}function Qi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(gf(t.nodes_start,t.nodes_end),i=!0),vf(t,e&&!i),Rd(t,0),Tn(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();mf(t);var r=t.parent;r!==null&&r.first!==null&&hf(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 gf(t,e){for(;t!==null;){var i=t===e?null:on(t);t.remove(),t=i}}function hf(t){var e=t.parent,i=t.prev,o=t.next;i!==null&&(i.next=o),o!==null&&(o.prev=i),e!==null&&(e.first===t&&(e.first=o),e.last===t&&(e.last=i))}function Xn(t,e){var i=[];Su(t,i,!0),_f(i,()=>{Qi(t),e&&e()})}function _f(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function Su(t,e,i){if((t.f&8192)===0){if(t.f^=8192,t.transitions!==null)for(let l of t.transitions)(l.is_global||i)&&e.push(l);for(var o=t.first;o!==null;){var r=o.next,a=(o.f&65536)!==0||(o.f&32)!==0;Su(o,e,a?i:!1),o=r}}}function ks(t){fh(t,!0)}function fh(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;fh(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var Nd=[],bf=[];function mh(){var t=Nd;Nd=[],ia(t)}function j$(){var t=bf;bf=[],ia(t)}function In(t){Nd.length===0&&queueMicrotask(mh),Nd.push(t)}function vh(){Nd.length>0&&mh(),bf.length>0&&j$()}function hh(t){var e=yt;if(Ee&&t instanceof Error&&X$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else Od(t,e)}function Od(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var gh=new WeakSet;function X$(t,e){var l,d;if(gh.has(t))return;gh.add(t);let i=Zo(t,"message");if(!(i&&!i.configurable)){for(var o=Pd?" ":" ",r=`
37
+ https://svelte.dev/e/state_proxy_equality_mismatch`,Al,Ll):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var tt=!1;function ho(t){tt=t}var yt;function Ii(t){if(t===null)throw Js(),us;return yt=t}function Gi(){return Ii(tn(yt))}function S(t){if(tt){if(tn(yt)!==null)throw Js(),us;yt=t}}function ui(t=1){if(tt){for(var e=t,i=yt;e--;)i=tn(i);yt=i}}function Pa(){for(var t=0,e=yt;;){if(e.nodeType===gr){var i=e.data;if(i===wa){if(t===0)return e;t-=1}else(i===Ys||i===js)&&(t+=1)}var o=tn(e);e.remove(),e=o}}function $u(t){if(!t||t.nodeType!==gr)throw Js(),us;return t.data}function ah(){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(Il(this[s])===a){bu("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(Il(this[s])===a){bu("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(Il(this[s])===a){bu("array.includes(...)");break}}return d},Array.__svelte_cleanup=()=>{t.indexOf=i,t.lastIndexOf=o,t.includes=r}}var ka,lh,Ad,dh,ch;function yu(){if(ka===void 0){ka=window,lh=document,Ad=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;dh=Xo(e,"firstChild").get,ch=Xo(e,"nextSibling").get,ef(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),ef(i)&&(i.__t=void 0),Pe&&(t.__svelte_meta=null,ah())}}function Pn(t=""){return document.createTextNode(t)}function Ai(t){return dh.call(t)}function tn(t){return ch.call(t)}function T(t,e){if(!tt)return Ai(t);var i=Ai(yt);if(i===null)i=yt.appendChild(Pn());else if(e&&i.nodeType!==yl){var o=Pn();return i==null||i.before(o),Ii(o),o}return Ii(i),i}function ce(t,e){var r,a;if(!tt){var i=Ai(t);return i.nodeType===8&&i.data===""?tn(i):i}if(e&&((r=yt)==null?void 0:r.nodeType)!==yl){var o=Pn();return(a=yt)==null||a.before(o),Ii(o),o}return yt}function A(t,e=1,i=!1){let o=tt?yt:t;for(var r;e--;)r=o,o=tn(o);if(!tt)return o;if(i&&(o==null?void 0:o.nodeType)!==yl){var a=Pn();return o===null?r==null||r.after(a):o.before(a),Ii(a),a}return Ii(o),o}function Ld(t){t.textContent=""}function mf(t){$t===null&&Ot===null&&zg(t),Ot!==null&&(Ot.f&256)!==0&&$t===null&&Ug(),Is&&Hg(t)}function j$(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Aa(t,e,i,o=!0){var s;var r=$t;if(Pe)for(;r!==null&&(r.f&262144)!==0;)r=r.parent;var a={ctx:Qt,deps:null,nodes_start:null,nodes_end:null,f:t|2048,first:null,fn:e,last:null,next:null,parent:r,prev:null,teardown:null,transitions:null,wv:0};if(Pe&&(a.component_function=hr),i)try{kl(a),a.f|=32768}catch(u){throw Qi(a),u}else e!==null&&kd(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&&j$(a,r),Ot!==null&&(Ot.f&2)!==0)){var d=Ot;((s=d.effects)!=null?s:d.effects=[]).push(a)}return a}function Vo(t){let e=Aa(8,null,!1);return En(e,1024),e.teardown=t,e}function Oe(t){var r;mf("$effect");var e=$t!==null&&($t.f&32)!==0&&Qt!==null&&!Qt.m;if(Pe&&vo(t,"name",{value:"$effect"}),e){var i=Qt;((r=i.e)!=null?r:i.e=[]).push({fn:t,effect:$t,reaction:Ot})}else{var o=Ro(t);return o}}function Rd(t){return mf("$effect.pre"),Pe&&vo(t,"name",{value:"$effect.pre"}),on(t)}function Su(t){let e=Aa(64,t,!0);return()=>{Qi(e)}}function ph(t){let e=Aa(64,t,!0);return(i={})=>new Promise(o=>{i.outro?Zn(e,()=>{Qi(e),o(void 0)}):(Qi(e),o(void 0))})}function Ro(t){return Aa(4,t,!1)}function on(t){return Aa(8,t,!0)}function D(t,e=[],i=Gr){if(Pe)return on(()=>{var r=$t,a=()=>t(...l.map(n));vo(r.fn,"name",{value:"{expression}"}),vo(a,"name",{value:"{expression}"});let l=e.map(i);Yi(a)});let o=e.map(i);return Yi(()=>t(...o.map(n)))}function Yi(t,e=0){return Aa(24|e,t,!0)}function Fi(t,e=!0){return Aa(40,t,!0,e)}function vf(t){var e=t.teardown;if(e!==null){let i=Is,o=Ot;pf(!0),qi(null);try{e.call(null)}finally{pf(i),qi(o)}}}function gf(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:Qi(i,e),i=o}}function fh(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&32)===0&&Qi(e),e=i}}function Qi(t,e=!0){var i=!1;(e||(t.f&524288)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(hf(t.nodes_start,t.nodes_end),i=!0),gf(t,e&&!i),Nd(t,0),En(t,16384);var o=t.transitions;if(o!==null)for(let a of o)a.stop();vf(t);var r=t.parent;r!==null&&r.first!==null&&_f(t),Pe&&(t.component_function=null),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function hf(t,e){for(;t!==null;){var i=t===e?null:tn(t);t.remove(),t=i}}function _f(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 Zn(t,e){var i=[];Cu(t,i,!0),bf(i,()=>{Qi(t),e&&e()})}function bf(t,e){var i=t.length;if(i>0){var o=()=>--i||e();for(var r of t)r.out(o)}else e()}function Cu(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;Cu(o,e,a?i:!1),o=r}}}function ks(t){mh(t,!0)}function mh(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;mh(i,r?e:!1),i=o}if(t.transitions!==null)for(let a of t.transitions)(a.is_global||e)&&a.in()}}var Od=[],$f=[];function vh(){var t=Od;Od=[],Zs(t)}function X$(){var t=$f;$f=[],Zs(t)}function kn(t){Od.length===0&&queueMicrotask(vh),Od.push(t)}function gh(){Od.length>0&&vh(),$f.length>0&&X$()}function _h(t){var e=$t;if(Pe&&t instanceof Error&&Z$(t,e),(e.f&32768)===0){if((e.f&128)===0)throw t;e.fn(t)}else Dd(t,e)}function Dd(t,e){for(;e!==null;){if((e.f&128)!==0)try{e.fn(t);return}catch(i){}e=e.parent}throw t}var hh=new WeakSet;function Z$(t,e){var l,d;if(hh.has(t))return;hh.add(t);let i=Xo(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[Qn].split("/").pop()}`,a=a.p;_o(t,"message",{value:t.message+`
39
+ ${o}in ${(d=a.function)==null?void 0:d[Gn].split("/").pop()}`,a=a.p;vo(t,"message",{value:t.message+`
40
40
  ${r}
41
- `}),t.stack&&_o(t,"stack",{value:t.stack.split(`
41
+ `}),t.stack&&vo(t,"stack",{value:t.stack.split(`
42
42
  `).filter(s=>!s.includes("svelte/src/internal")).join(`
43
- `)})}}var Ma=!1,Ml=null,Va=!1,Cs=!1;function uf(t){Cs=t}var Dd=[],Bd=[],Bt=null,_r=!1;function qi(t){Bt=t}var yt=null;function bo(t){yt=t}var tn=null;function hu(t){Bt!==null&&Bt.f&2097152&&(tn===null?tn=[Bt,[t]]:tn[1].push(t))}var En=null,br=0,hr=null;function th(t){hr=t}var $h=1,Cu=0,Is=!1,Iu=null;function Id(){return++$h}function ka(t){var p,f;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,o=(e&256)!==0;if(i!==null){var r,a,l=(e&512)!==0,d=o&&yt!==null&&!Is,s=i.length;if(l||d){var u=t,v=u.parent;for(r=0;r<s;r++)a=i[r],(l||!((p=a==null?void 0:a.reactions)!=null&&p.includes(u)))&&((f=a.reactions)!=null?f:a.reactions=[]).push(u);l&&(u.f^=512),d&&v!==null&&(v.f&256)===0&&(u.f^=256)}for(r=0;r<s;r++)if(a=i[r],ka(a)&&cf(a),a.wv>t.wv)return!0}(!o||yt!==null&&!Is)&&Tn(t,1024)}return!1}function yh(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];tn!=null&&tn[1].includes(t)&&tn[0]===Bt||((a.f&2)!==0?yh(a,e,!1):e===a&&(i?Tn(a,2048):(a.f&1024)!==0&&Tn(a,4096),kd(a)))}}function gu(t){var $,y;var e=En,i=br,o=hr,r=Bt,a=Is,l=tn,d=Qt,s=_r,u=t.f;En=null,br=0,hr=null,Is=(u&256)!==0&&(_r||!Va||Bt===null),Bt=(u&96)===0?t:null,tn=null,Sd(t.ctx),_r=!1,Cu++,t.f|=2097152;try{var v=(0,t.fn)(),p=t.deps;if(En!==null){var f;if(Rd(t,br),p!==null&&br>0)for(p.length=br+En.length,f=0;f<En.length;f++)p[br+f]=En[f];else t.deps=p=En;if(!Is||(u&2)!==0&&t.reactions!==null)for(f=br;f<p.length;f++)((y=($=p[f]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&br<p.length&&(Rd(t,br),p.length=br);if(us()&&hr!==null&&!_r&&p!==null&&(t.f&6146)===0)for(f=0;f<hr.length;f++)yh(hr[f],t);return r!==null&&r!==t&&(Cu++,hr!==null&&(o===null?o=hr:o.push(...hr))),v}catch(g){hh(g)}finally{En=e,br=i,hr=o,Bt=r,Is=a,tn=l,Sd(d),_r=s,t.f^=2097152}}function Z$(t,e){let i=e.reactions;if(i!==null){var o=Vg.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))&&(Tn(e,4096),(e.f&768)===0&&(e.f^=512),vu(e),Rd(e,0))}function Rd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)Z$(t,i[o])}function Pl(t){var e=t.f;if((e&16384)===0){Tn(t,1024);var i=yt,o=Va;if(yt=t,Va=!0,Ee){var r=vr;Td(t.component_function)}try{(e&16)!==0?ph(t):vf(t),mf(t);var a=gu(t);if(t.teardown=typeof a=="function"?a:null,t.wv=$h,Ee&&cs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=Id(),l.set_during_effect=!1);Ee&&Bd.push(t)}finally{Va=o,yt=i,Ee&&Td(r)}}}function _h(){console.error("Last ten effects were: ",Bd.slice(-10).map(t=>t.fn)),Bd=[]}function J$(){try{zg()}catch(t){if(Ee&&_o(t,"stack",{value:""}),Ml!==null)if(Ee)try{Od(t,Ml)}catch(e){throw _h(),e}else Od(t,Ml);else throw Ee&&_h(),t}}function yf(){var t=Va;try{var e=0;for(Va=!0;Dd.length>0;){e++>1e3&&J$();var i=Dd,o=i.length;Dd=[];for(var r=0;r<o;r++){var a=ty(i[r]);ey(a)}El.clear()}}finally{Ma=!1,Va=t,Ml=null,Ee&&(Bd=[])}}function ey(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&ka(o)&&(Pl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?hf(o):o.fn=null))}}function kd(t){Ma||(Ma=!0,queueMicrotask(yf));for(var e=Ml=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}Dd.push(e)}function ty(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:ka(i)&&Pl(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 Vl(t){var e;for(t&&(Ma=!0,yf(),Ma=!0,e=t());;){if(vh(),Dd.length===0)return Ma=!1,Ml=null,Ee&&(Bd=[]),e;Ma=!0,yf()}}function yo(){return ht(this,null,function*(){yield Promise.resolve(),Vl()})}function n(t){var e=t.f,i=(e&2)!==0;if(Iu!==null&&Iu.add(t),Bt!==null&&!_r){if(!(tn!=null&&tn[1].includes(t))||tn[0]!==Bt){var o=Bt.deps;t.rv<Cu&&(t.rv=Cu,En===null&&o!==null&&o[br]===t?br++:En===null?En=[t]:(!Is||!En.includes(t))&&En.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,ka(r)&&cf(r)),Ee&&cs&&!_r&&wd!==null&&Bt!==null&&wd.reaction===Bt)if(t.trace)t.trace();else{var l=Ts("TracedAt");if(l){var d=wd.entries.get(t);d===void 0&&(d={traces:[]},wd.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 Cs&&El.has(t)?El.get(t):t.v}function Et(t){var e=_r;try{return _r=!0,t()}finally{_r=e}}var iy=-7169;function Tn(t,e){t.f=t.f&iy|e}function ku(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Jo in t)Eu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Jo in i&&Eu(i)}}}function Eu(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{Eu(t[o],e)}catch(r){}let i=Ta(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=cu(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function xf(t,e){if(e){let i=document.body;t.autofocus=!0,In(()=>{document.activeElement===i&&t.focus()})}}function Fd(t){var e=Bt,i=yt;qi(null),bo(null);try{return t()}finally{qi(e),bo(i)}}var wf=new Set,Pu=new Set;function Ra(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 Sf(t,e,i,o={}){function r(a){if(o.capture||Rl.call(e,a),!a.cancelBubble)return Fd(()=>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 lt(t,e,i,o,r){var a={capture:o,passive:r},l=Sf(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Do(()=>{e.removeEventListener(t,l,a)})}function Je(t){for(var e=0;e<t.length;e++)wf.add(t[e]);for(var i of Pu)i(t)}function Rl(t){var I;var e=this,i=e.ownerDocument,o=t.type,r=((I=t.composedPath)==null?void 0:I.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){_o(t,"currentTarget",{configurable:!0,get(){return a||i}});var v=Bt,p=yt;qi(null),bo(null);try{for(var f,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var g=a["__"+o];if(g!=null&&(!a.disabled||t.target===a))if(fr(g)){var[w,...T]=g;w.apply(a,[t,...T])}else g.call(a,t)}catch(N){f?$.push(N):f=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(f){for(let N of $)queueMicrotask(()=>{throw N});throw f}}finally{t.__root=e,delete t.currentTarget,qi(v),bo(p)}}}var ny;function xh(){ny=void 0}function Nl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Fo(t,e){var i=yt;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(tt)return Fo(xt,null),xt;r===void 0&&(r=Nl(a?t:"<!>"+t),i||(r=ki(r)));var l=o||Pd?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=ki(l),s=l.lastChild;Fo(d,s)}else Fo(l,l);return l}}function ay(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(tt)return Fo(xt,null),xt;if(!l){var d=Nl(a),s=ki(d);if(r)for(l=document.createDocumentFragment();ki(s);)l.appendChild(ki(s));else l=ki(s)}var u=l.cloneNode(!0);if(r){var v=ki(u),p=u.lastChild;Fo(v,p)}else Fo(u,u);return u}}function Ce(t,e){return ay(t,e,"svg")}function fs(t=""){if(!tt){var e=Cn(t+"");return Fo(e,e),e}var i=xt;return i.nodeType!==yl&&(i.before(i=Cn()),Ii(i)),Fo(i,i),i}function Le(){if(tt)return Fo(xt,null),xt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Cn();return t.append(e,i),Fo(e,i),t}function b(t,e){if(tt){yt.nodes_end=xt,Gi();return}t!==null&&t.before(e)}var ly=/\r/g;function Sh(t){t=t.replace(ly,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Th(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var dy=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ch(t){return dy.includes(t)}var cy=["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 uy={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 Ih(t){var e;return t=t.toLowerCase(),(e=uy[t])!=null?e:t}var Sk=[...cy,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var py=["touchstart","touchmove"];function Eh(t){return py.includes(t)}var fy=["$state","$state.raw","$derived","$derived.by"],Tk=[...fy,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var my=["textarea","script","style","title"];function kh(t){return my.includes(t)}function Au(t){return t==null?void 0:t.replace(/\//g,"/​")}var Hd=!0;function Lu(t){Hd=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 Ph(t,e)}function Cf(t,e){var l;$u(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=tt,r=xt;try{for(var a=ki(i);a&&(a.nodeType!==mr||a.data!==Js);)a=on(a);if(!a)throw ls;$o(!0),Ii(a),Gi();let d=Ph(t,jt(Ie({},e),{anchor:a}));if(xt===null||xt.nodeType!==mr||xt.data!==Sa)throw oa(),ls;return $o(!1),d}catch(d){if(d===ls)return e.recover===!1&&Wg(),$u(),Ad(i),$o(!1),Zr(t,e);throw d}finally{$o(o),Ii(r),xh()}}var Ol=new Map;function Ph(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){$u();var d=new Set,s=p=>{for(var f=0;f<p.length;f++){var $=p[f];if(!d.has($)){d.add($);var y=Eh($);e.addEventListener($,Rl,{passive:y});var g=Ol.get($);g===void 0?(document.addEventListener($,Rl,{passive:y}),Ol.set($,1)):Ol.set($,g+1)}}};s(xd(wf)),Pu.add(s);var u=void 0,v=uh(()=>{var p=i!=null?i:e.appendChild(Cn());return Oi(()=>{if(a){B({});var f=Qt;f.c=a}r&&(o.$$events=r),tt&&Fo(p,null),Hd=l,u=t(p,o)||{},Hd=!0,tt&&(yt.nodes_end=xt),a&&F()}),()=>{var y;for(var f of d){e.removeEventListener(f,Rl);var $=Ol.get(f);--$===0?(document.removeEventListener(f,Rl),Ol.delete(f)):Ol.set(f,$)}Pu.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Tf.set(u,v),u}var Tf=new WeakMap;function Na(t,e){let i=Tf.get(t);return i?(Tf.delete(t),i(e)):(Ee&&nh(),Promise.resolve())}function ai(t,e,...i){var o=t,r=_t,a;Yi(()=>{r!==(r=e())&&(a&&(Qi(a),a=null),Ee&&r==null&&Kg(),a=Oi(()=>r(o,...i)))},65536),tt&&(o=xt)}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;Gg(e)},set:o=>{i=o}})}};_y=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var _y;function Rt(t){Qt===null&&Sl("onMount"),ds&&Qt.l!==null?hy(Qt).m.push(t):Oe(()=>{let e=Et(t);if(typeof e=="function")return e})}function mn(t){Qt===null&&Sl("onDestroy"),Rt(()=>()=>Et(t))}function hy(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Ah=new Map;function Lh(t,e){var i=Ah.get(t);i||(i=new Set,Ah.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){tt&&i===0&&Gi();var r=t,a=null,l=null,d=no,s=i>0?65536:0,u=!1;let v=(f,$=!0)=>{u=!0,p($,f)},p=(f,$)=>{if(d===(d=f))return;let y=!1;if(tt&&o!==-1){if(i===0){let w=bu(r);w===Js?o=0:w===ea?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let g=o>i;!!d===g&&(r=Pa(),Ii(r),$o(!1),y=!0,o=-1)}d?(a?ks(a):$&&(a=Oi(()=>$(r))),l&&Xn(l,()=>{l=null})):(l?ks(l):$&&(l=Oi(()=>$(r,[i+1,o]))),a&&Xn(a,()=>{a=null})),y&&$o(!0)};Yi(()=>{u=!1,e(v),u||p(null,null)},s),tt&&(r=xt)}function Ps(t,e,i){tt&&Gi();var o=t,r=no,a,l=us()?Dg:xl;Yi(()=>{l(r,r=e())&&(a&&Xn(a),a=Oi(()=>i(o)))}),tt&&(o=xt)}var ra=null;function kf(t){ra=t}function Ud(t,e){return e}function yy(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)Su(e[l].e,r,!0);var d=a>0&&r.length===0&&i!==null;if(d){var s=i.parentNode;Ad(s),s.append(i),o.clear(),na(t,e[0].prev,e[a-1].next)}_f(r,()=>{for(var u=0;u<a;u++){var v=e[u];d||(o.delete(v.k),na(t,v.prev,v.next)),Qi(v.e,!d)}})}function yi(t,e,i,o,r,a=null){var l=t,d={flags:e,items:new Map,first:null},s=(e&4)!==0;if(s){var u=t;l=tt?Ii(ki(u)):u.appendChild(Cn())}tt&&Gi();var v=null,p=!1,f=Sn(()=>{var $=i();return fr($)?$:$==null?[]:xd($)});Yi(()=>{var $=n(f),y=$.length;if(p&&y===0)return;p=y===0;let g=!1;if(tt){var w=bu(l)===ea;w!==(y===0)&&(l=Pa(),Ii(l),$o(!1),g=!0)}if(tt){for(var T=null,I,N=0;N<y;N++){if(xt.nodeType===mr&&xt.data===Sa){l=xt,g=!0,$o(!1);break}var k=$[N],E=o(k,N);I=Rh(xt,d,T,null,k,E,N,r,e,i),d.items.set(E,I),T=I}y>0&&Ii(Pa())}tt||xy($,d,l,r,e,o,i),a!==null&&(y===0?v?ks(v):v=Oi(()=>a(l)):v!==null&&Xn(v,()=>{v=null})),g&&$o(!0),n(f)}),tt&&(l=xt)}function xy(t,e,i,o,r,a,l){var Z,we,ue,ne;var d=(r&8)!==0,s=(r&3)!==0,u=t.length,v=e.items,p=e.first,f=p,$,y=null,g,w=[],T=[],I,N,k,E;if(d)for(E=0;E<u;E+=1)I=t[E],N=a(I,E),k=v.get(N),k!==void 0&&((Z=k.a)==null||Z.measure(),(g!=null?g:g=new Set).add(k));for(E=0;E<u;E+=1){if(I=t[E],N=a(I,E),k=v.get(N),k===void 0){var A=f?f.e.nodes_start:i;y=Rh(A,e,y,y===null?e.first:y.next,I,N,E,o,r,l),v.set(N,y),w=[],T=[],f=y.next;continue}if(s&&wy(k,I,E,r),(k.e.f&8192)!==0&&(ks(k.e),d&&((we=k.a)==null||we.unfix(),(g!=null?g:g=new Set).delete(k))),k!==f){if($!==void 0&&$.has(k)){if(w.length<T.length){var Q=T[0],H;y=Q.prev;var z=w[0],Y=w[w.length-1];for(H=0;H<w.length;H+=1)Mh(w[H],Q,i);for(H=0;H<T.length;H+=1)$.delete(T[H]);na(e,z.prev,Y.next),na(e,y,z),na(e,Y,Q),f=Q,y=Y,E-=1,w=[],T=[]}else $.delete(k),Mh(k,f,i),na(e,k.prev,k.next),na(e,k,y===null?e.first:y.next),na(e,y,k),y=k;continue}for(w=[],T=[];f!==null&&f.k!==N;)(f.e.f&8192)===0&&($!=null?$:$=new Set).add(f),T.push(f),f=f.next;if(f===null)continue;k=f}w.push(k),y=k,f=k.next}if(f!==null||$!==void 0){for(var le=$===void 0?[]:xd($);f!==null;)(f.e.f&8192)===0&&le.push(f),f=f.next;var X=le.length;if(X>0){var re=(r&4)!==0&&u===0?i:null;if(d){for(E=0;E<X;E+=1)(ue=le[E].a)==null||ue.measure();for(E=0;E<X;E+=1)(ne=le[E].a)==null||ne.fix()}yy(e,le,re,v)}}d&&In(()=>{var _e;if(g!==void 0)for(k of g)(_e=k.a)==null||_e.apply()}),yt.first=e.first&&e.first.e,yt.last=y&&y.e}function wy(t,e,i,o){(o&1)!==0&&kl(t.v,e),(o&2)!==0?kl(t.i,i):t.i=i}function Rh(t,e,i,o,r,a,l,d,s,u){var v=ra,p=(s&1)!==0,f=(s&16)===0,$=p?f?ps(r,!1,!1):Vr(r):r,y=(s&2)===0?l:Vr(l);Ee&&p&&($.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var g={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};ra=g;try{return g.e=Oi(()=>d(t,$,y,u),tt),g.e.prev=i&&i.e,g.e.next=o&&o.e,i===null?e.first=g:(i.next=g,i.e.next=g.e),o!==null&&(o.prev=g,o.e.prev=g.e),g}finally{ra=v}}function Mh(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=on(a);r.before(a),a=l}}function na(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 Sy(t,e,i){var a,l;if(!e||e===Sh(String(i!=null?i:"")))return;let o,r=(a=t.__svelte_meta)==null?void 0:a.loc;r?o=`near ${r.file}:${r.line}:${r.column}`:(l=vr)!=null&&l[Qn]&&(o=`in ${vr[Qn]}`),oh(Au(o))}function zd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=yt;if(l===(l=($=e())!=null?$:"")){tt&&Gi();return}if(d.nodes_start!==null&&(gf(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(tt){for(var s=xt.data,u=Gi(),v=u;u!==null&&(u.nodeType!==mr||u.data!=="");)v=u,u=on(u);if(u===null)throw oa(),ls;Ee&&!r&&Sy(u.parentNode,s,l),Fo(xt,v),a=Ii(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var f=Nl(p);if((i||o)&&(f=ki(f)),Fo(ki(f),f.lastChild),i||o)for(;ki(f);)a.before(ki(f));else a.before(f)}})}function Di(t,e,i){tt&&Gi();var o=t,r,a;Yi(()=>{r!==(r=e())&&(a&&(Xn(a),a=null),r&&(a=Oi(()=>i(o,r))))},65536),tt&&(o=xt)}function Oa(t,e,i,o,r,a){var y;let l=tt;tt&&Gi();var d=Ee&&a&&((y=Qt)==null?void 0:y.function[Qn]),s,u,v=null;tt&&xt.nodeType===pu&&(v=xt,Gi());var p=tt?xt:t,f,$=ra;Yi(()=>{let g=e()||null;var w=r?r():i||g==="svg"?lu:null;if(g!==s){var T=ra;kf($),f&&(g===null?Xn(f,()=>{f=null,u=null}):g===u?ks(f):(Qi(f),Lu(!1))),g&&g!==u&&(f=Oi(()=>{if(v=tt?v:w?document.createElementNS(w,g):document.createElement(g),Ee&&a&&(v.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),Fo(v,v),o){tt&&kh(g)&&v.append(document.createComment(""));var I=tt?ki(v):v.appendChild(Cn());tt&&(I===null?$o(!1):Ii(I)),o(v,I)}yt.nodes_end=v,p.before(v)})),s=g,s&&(u=s),Lu(!0),kf(T)}},65536),l&&($o(!0),Ii(p))}var Af;function Nh(t){return Af=t.target,new Pf(t)}var As,Rr,Pf=class{constructor(e){Zs(this,As);Zs(this,Rr);var a,l;var i=new Map,o=(d,s)=>{var u=ps(s,!1,!1);return i.set(d,u),u};let r=new Proxy(jt(Ie({},e.props||{}),{$$events:{}}),{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===$l?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var v;return O((v=i.get(s))!=null?v:o(s,u),u),Reflect.set(d,s,u)}});bl(this,Rr,(e.hydrate?Cf: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)&&Vl(),bl(this,As,r.$$events);for(let d of Object.keys(Ni(this,Rr)))d==="$set"||d==="$destroy"||d==="$on"||_o(this,d,{get(){return Ni(this,Rr)[d]},set(s){Ni(this,Rr)[d]=s},enumerable:!0});Ni(this,Rr).$set=d=>{Object.assign(r,d)},Ni(this,Rr).$destroy=()=>{Na(Ni(this,Rr))}}$set(e){Ni(this,Rr).$set(e)}$on(e,i){Ni(this,As)[e]=Ni(this,As)[e]||[];let o=(...r)=>i.call(this,...r);return Ni(this,As)[e].push(o),()=>{Ni(this,As)[e]=Ni(this,As)[e].filter(r=>r!==o)}}$destroy(){Ni(this,Rr).$destroy()}};As=new WeakMap,Rr=new WeakMap;function q(t,e){In(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=Af)==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&&Lh(e.hash,d)}})}function Ls(t,e){var i=void 0,o;Yi(()=>{i!==(i=e())&&(o&&(Qi(o),o=null),i&&(o=Oi(()=>{Bo(()=>i(t))})))})}function Oh(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=Oh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Dh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Oh(t))&&(o&&(o+=" "),o+=e);return o}function Wd(t){return typeof t=="object"?Dh(t):t!=null?t:""}var Bh=[...`
44
- \r\f \v\uFEFF`];function Hh(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||Bh.includes(o[l-1]))&&(d===o.length||Bh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function Fh(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 Lf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Uh(t,e){if(e){var i="",o,r;if(Array.isArray(e)?(o=e[0],r=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,s=[];o&&s.push(...Object.keys(o).map(Lf)),r&&s.push(...Object.keys(r).map(Lf));var u=0,v=-1;let g=t.length;for(var p=0;p<g;p++){var f=t[p];if(d?f==="/"&&t[p-1]==="*"&&(d=!1):a?a===f&&(a=!1):f==="/"&&t[p+1]==="*"?d=!0:f==='"'||f==="'"?a=f:f==="("?l++:f===")"&&l--,!d&&a===!1&&l===0){if(f===":"&&v===-1)v=p;else if(f===";"||p===g-1){if(v!==-1){var $=Lf(t.substring(u,v).trim());if(!s.includes($)){f!==";"&&p++;var y=t.substring(u,p).trim();i+=" "+y+";"}}u=p+1,v=-1}}}}return o&&(i+=Fh(o)),r&&(i+=Fh(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(tt||l!==i||l===void 0){var d=Hh(i,o,a);(!tt||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&r!==a)for(var s in a){var u=!!a[s];(r==null||u!==!!r[s])&&t.classList.toggle(s,u)}return a}function Mf(t,e={},i,o){for(var r in i){var a=i[r];e[r]!==a&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,a,o))}}function Qe(t,e,i,o){var r=t.__style;if(tt||r!==e){var a=Uh(e,o);(!tt||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(Mf(t,i==null?void 0:i[0],o[0]),Mf(t,i==null?void 0:i[1],o[1],"important")):Mf(t,i,o));return o}function Kd(t,e,i){if(t.multiple){if(e==null)return;if(!fr(e))return rh();for(var o of t.options)o.selected=e.includes(zh(o));return}for(o of t.options){var r=zh(o);if(rf(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function Vf(t){var e=new MutationObserver(()=>{Kd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Do(()=>{e.disconnect()})}function zh(t){return"__value"in t?t.__value:t.value}var Dl=Symbol("class"),Bl=Symbol("style"),qh=Symbol("is custom element"),Qh=Symbol("is html");function Gh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Ve(t,e,i,o){var r=jh(t);if(tt&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||Ly(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Og]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Xh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function Yh(t,e,i,o,r=!1){var k;var a=jh(t),l=a[qh],d=!a[Qh];let s=tt&&l;s&&$o(!1);var u=e||{},v=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Wd(i.class):(o||i[Dl])&&(i.class=null),i[Bl]&&((k=i.style)!=null||(i.style=null));var f=Xh(t);for(let E in i){let A=i[E];if(v&&E==="value"&&A==null){t.value=t.__value="",u[E]=A;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,A,o,e==null?void 0:e[Dl],i[Dl]),u[E]=A,u[Dl]=i[Dl];continue}if(E==="style"){Qe(t,A,e==null?void 0:e[Bl],i[Bl]),u[E]=A,u[Bl]=i[Bl];continue}var y=u[E];if(!(A===y&&!(A===void 0&&t.hasAttribute(E)))){u[E]=A;var g=E[0]+E[1];if(g!=="$$")if(g==="on"){let Q={},H="$$"+E,z=E.slice(2);var w=Ch(z);if(Th(z)&&(z=z.slice(0,-7),Q.capture=!0),!w&&y){if(A!=null)continue;t.removeEventListener(z,u[H],Q),u[H]=null}if(A!=null)if(w)t[`__${z}`]=A,Je([z]);else{let Y=function(le){u[E].call(this,le)};var N=Y;u[H]=Sf(z,t,Y,Q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Ve(t,E,A);else if(E==="autofocus")xf(t,!!A);else if(!l&&(E==="__value"||E==="value"&&A!=null))t.value=t.__value=A;else if(E==="selected"&&v)Gh(t,A);else{var T=E;d||(T=Ih(T));var I=T==="defaultValue"||T==="defaultChecked";if(A==null&&!l&&!I)if(a[E]=null,T==="value"||T==="checked"){let Q=t,H=e===void 0;if(T==="value"){let z=Q.defaultValue;Q.removeAttribute(T),Q.defaultValue=z,Q.value=Q.__value=H?z:null}else{let z=Q.defaultChecked;Q.removeAttribute(T),Q.defaultChecked=z,Q.checked=H?z:!1}}else t.removeAttribute(E);else I||f.includes(T)&&(l||typeof A!="string")?t[T]=A:typeof A!="function"&&Ve(t,T,A,r)}}}return s&&$o(!0),u}function ro(t,e,i=[],o,r=!1,a=Yr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",v=!1;if(Yi(()=>{var f=e(...l.map(n)),$=Yh(t,d,f,o,r);v&&u&&"value"in f&&Kd(t,f.value,!1);for(let g of Object.getOwnPropertySymbols(s))f[g]||Qi(s[g]);for(let g of Object.getOwnPropertySymbols(f)){var y=f[g];g.description===jp&&(!d||y!==d[g])&&(s[g]&&Qi(s[g]),s[g]=Oi(()=>Ls(t,()=>y))),$[g]=y}d=$}),u){var p=t;Bo(()=>{Kd(p,d.value),Vf(p)})}v=!0}function jh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[qh]:t.nodeName.includes("-"),[Qh]:t.namespaceURI===Pg}}var Wh=new Map;function Xh(t){var e=Wh.get(t.nodeName);if(e)return e;Wh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=cu(o);for(var a in i)i[a].set&&e.push(a);o=Ta(o)}return e}function Ly(t,e,i){var o;Ee&&(e==="srcset"&&My(t,i)||Rf((o=t.getAttribute(e))!=null?o:"",i)||ih(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Rf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function Kh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function My(t,e){var i=Kh(t.srcset),o=Kh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(Rf(i[l][0],r)||Rf(r,i[l][0])))}var Vy=du?()=>performance.now():()=>Date.now(),Jr={tick:t=>(du?requestAnimationFrame:_t)(t),now:()=>Vy(),tasks:new Set};function Zh(){let t=Jr.now();Jr.tasks.forEach(e=>{e.c(t)||(Jr.tasks.delete(e),e.f())}),Jr.tasks.size!==0&&Jr.tick(Zh)}function Jh(t){let e;return Jr.tasks.size===0&&Jr.tick(Zh),{promise:new Promise(i=>{Jr.tasks.add(e={c:t,f:i})}),abort(){Jr.tasks.delete(e)}}}function Mu(t,e){Fd(()=>{t.dispatchEvent(new CustomEvent(e))})}function Dy(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 e_(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=Dy(r.trim());e[l]=a.trim()}return e}var By=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,v=e.inert,p=e.style.overflow,f,$;function y(){var A;var k=Bt,E=yt;qi(null),bo(null);try{return u!=null?u:u=i()(e,(A=o==null?void 0:o())!=null?A:{},{direction:s})}finally{qi(k),bo(E)}}var g={is_global:d,in(){var k;if(e.inert=v,!r){$==null||$.abort(),(k=$==null?void 0:$.reset)==null||k.call($);return}a||f==null||f.abort(),Mu(e,"introstart"),f=Nf(e,y(),$,1,()=>{Mu(e,"introend"),f==null||f.abort(),f=u=void 0,e.style.overflow=p})},out(k){if(!a){k==null||k(),u=void 0;return}e.inert=!0,Mu(e,"outrostart"),$=Nf(e,y(),f,0,()=>{Mu(e,"outroend"),k==null||k()})},stop:()=>{f==null||f.abort(),$==null||$.abort()}},w=yt;if(((N=w.transitions)!=null?N:w.transitions=[]).push(g),r&&Hd){var T=d;if(!T){for(var I=w.parent;I&&(I.f&65536)!==0;)for(;(I=I.parent)&&(I.f&16)===0;);T=!I||(I.f&32768)!==0}T&&Bo(()=>{Et(()=>g.in())})}}function Nf(t,e,i,o,r){var a=o===1;if(ta(e)){var l,d=!1;return In(()=>{if(!d){var w=e({direction:a?"in":"out"});l=Nf(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:_t,deactivate:_t,reset:_t,t:()=>o};let{delay:s=0,css:u,tick:v,easing:p=By}=e;var f=[];if(a&&i===void 0&&(v&&v(0,1),u)){var $=e_(u(0,1));f.push($,$)}var y=()=>1-o,g=t.animate(f,{duration:s,fill:"forwards"});return g.onfinish=()=>{var z;g.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var T=o-w,I=e.duration*Math.abs(T),N=[];if(I>0){var k=!1;if(u)for(var E=Math.ceil(I/16.666666666666668),A=0;A<=E;A+=1){var Q=w+T*p(A/E),H=e_(u(Q,1-Q));N.push(H),k||(k=H.overflow==="hidden")}k&&(t.style.overflow="hidden"),y=()=>{var Y=g.currentTime;return w+T*p(Y/I)},v&&Jh(()=>{if(g.playState!=="running")return!1;var Y=y();return v(Y,1-Y),!0})}g=t.animate(N,{duration:I,fill:"forwards"}),g.onfinish=()=>{y=()=>o,v==null||v(o,1-o),r()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=_t)},deactivate:()=>{r=_t},reset:()=>{o===0&&(v==null||v(1,0))},t:()=>y()}}function Of(t,e,i){var o=Zo(t,e);o&&o.set&&(t[e]=i,Do(()=>{t[e]=null}))}var sa,Fl,qd,Ru,t_,Nu=class Nu{constructor(e){Zs(this,Ru);Zs(this,sa,new WeakMap);Zs(this,Fl);Zs(this,qd);bl(this,qd,e)}observe(e,i){var o=Ni(this,sa).get(e)||new Set;return o.add(i),Ni(this,sa).set(e,o),Eg(this,Ru,t_).call(this).observe(e,Ni(this,qd)),()=>{var r=Ni(this,sa).get(e);r.delete(i),r.size===0&&(Ni(this,sa).delete(e),Ni(this,Fl).unobserve(e))}}};sa=new WeakMap,Fl=new WeakMap,qd=new WeakMap,Ru=new WeakSet,t_=function(){var e;return(e=Ni(this,Fl))!=null?e:bl(this,Fl,new ResizeObserver(i=>{for(var o of i){Nu.entries.set(o.target,o);for(var r of Ni(this,sa).get(o.target)||[])r(o)}}))},pr(Nu,"entries",new WeakMap);var Df=Nu;var Fy=new Df({box:"border-box"});function kn(t,e,i){var o=Fy.observe(t,()=>i(t[e]));Bo(()=>(Et(()=>i(t[e])),o))}function i_(t,e){return t===e||(t==null?void 0:t[Jo])===e}function Xe(t={},e,i,o){return Bo(()=>{var r,a;return nn(()=>{r=a,a=(o==null?void 0:o())||[],Et(()=>{t!==i(...a)&&(e(t,...a),r&&i_(i(...r),t)&&e(null,...r))})}),()=>{In(()=>{a&&i_(i(...a),t)&&e(null,...a)})}}),t}function Co(t=!1){let e=Qt,i=e.l.u;if(!i)return;let o=()=>ku(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&&Vd(()=>{o_(e,o),ia(i.b)}),Oe(()=>{let r=Et(()=>i.m.map(Ng));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{o_(e,o),ia(i.a)})}function o_(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Qd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),_t;let o=Et(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Hl=[];function Nr(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=_t){let i=null,o=new Set;function r(d){if(xl(t,d)&&(t=d,i)){let s=!Hl.length;for(let u of o)u[1](),Hl.push(u,t);if(s){for(let u=0;u<Hl.length;u+=2)Hl[u][0](Hl[u+1]);Hl.length=0}}}function a(d){r(d(t))}function l(d,s=_t){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||_t),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 Nr(i,(l,d)=>{let s=!1,u=[],v=0,p=_t,f=()=>{if(v)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:_t},$=r.map((y,g)=>Qd(y,w=>{u[g]=w,v&=~(1<<g),s&&f()},()=>{v|=1<<g}));return s=!0,f(),function(){ia($),p(),s=!1}})}function ge(t){let e;return Qd(t,i=>e=i)(),e}var Ou=!1,Bf=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:ps(void 0),unsubscribe:_t};if(o.store!==t&&!(Bf in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=_t;else{var r=!0;o.unsubscribe=Qd(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&Bf in i?ge(t):n(o.source)}function Re(){let t={};function e(){Do(()=>{for(var i in t)t[i].unsubscribe();_o(t,Bf,{enumerable:!1,value:!0})})}return[t,e]}function Ff(t){var e=Ou;try{return Ou=!1,[t(),Ou]}finally{Ou=e}}var Qy={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Ee&&Qg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Pn(t,e,i){return new Proxy(Ee?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},Qy)}var Gy={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(ta(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];ta(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(ta(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===Jo||e===$l)return!1;for(let i of t.props)if(ta(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(ta(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 Ms(...t){return new Proxy({props:t},Gy)}function n_(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var Q,H;var r=(i&1)!==0,a=!ds||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=Ff(()=>t[e]):u=t[e];var v=Jo in t||$l in t,p=l&&((H=(Q=Zo(t,e))==null?void 0:Q.set)!=null?H:v&&e in t&&(z=>t[e]=z))||void 0,f=o,$=!0,y=!1,g=()=>(y=!0,$&&($=!1,d?f=Et(o):f=o),f);u===void 0&&o!==void 0&&(p&&a&&qg(e),u=g(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?g():($=!0,y=!1,z)};else{var T=(r?Yr:Sn)(()=>t[e]);T.f|=131072,w=()=>{var z=n(T);return z!==void 0&&(f=void 0),z===void 0?f:z}}if((i&4)===0&&a)return w;if(p){var I=t.$$legacy;return function(z,Y){return arguments.length>0?((!a||!Y||I||s)&&p(Y?w():z),z):w()}}var N=!1,k=!1,E=ps(u),A=Yr(()=>{var z=w(),Y=n(E);return N?(N=!1,k=!0,Y):(k=!1,E.v=z)});return l&&n(A),r||(A.equals=wl),function(z,Y){if(Iu!==null&&(N=k,w(),n(E)),arguments.length>0){let le=Y?n(A):a&&l?ci(z):z;if(!A.equals(le)){if(N=!0,O(E,le),y&&f!==void 0&&(f=le),n_(A))return z;Et(()=>n(A))}return z}return n_(A)?A.v:n(A)}}var Yy;typeof HTMLElement=="function"&&(Yy=class extends HTMLElement{constructor(e,i,o){super();pr(this,"$$ctor");pr(this,"$$s");pr(this,"$$c");pr(this,"$$cn",!1);pr(this,"$$d",{});pr(this,"$$r",!1);pr(this,"$$p_d",{});pr(this,"$$l",{});pr(this,"$$l_u",new Map);pr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}connectedCallback(){return ht(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=jy(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]=Hf(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=Nh({component:this.$$ctor,target:this.shadowRoot||this,props:jt(Ie({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=wu(()=>{nn(()=>{var a;this.$$r=!0;for(let l of Xp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=Hf(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]=Hf(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 Xp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function Hf(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 jy(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var r_="5";var s_,a_,l_;typeof window!="undefined"&&((l_=(a_=(s_=window.__svelte)!=null?s_:window.__svelte={}).v)!=null?l_:a_.v=new Set).add(r_);var ld=require("@vkontakte/videoplayer-core/es2015"),bJ=require("@vkontakte/videoplayer-core/es2015"),pl=require("@vkontakte/videoplayer-shared/es2015"),h$=require("@vkontakte/videoplayer-statistics/es2015");var Da=require("@vkontakte/videoplayer-shared/es2015");var Xy={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:Da.InterfaceLanguage.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:Da.VideoQuality.Q_480P,highQualityLimit:Da.VideoQuality.Q_720P,episodeMinWidthPc:8,hideThumbTimerAfterTouch:!0,preventPauseOnVideoClick:!1,returnFocusOnControlsHide:!1,sentry:{dsn:"https://e349fd23c68f405388980d0868d0ff27@sentry.mvk.com/126",sampleRate:.01,whiteErrorCategoryList:[],blackErrorCategoryList:[],whiteErrorIdList:[],blackErrorIdList:[]},features:{autoplay:!0,statistics:!0,thinStatistics:!1,sentry:!0,preload:!0,subtitles:!0,episodes:!0,fullscreen:!0,timelinePreview:!0,mediaSession:!0,annotations:!0,slots:!0,annotationsInside:!1,pip:!0,dpip:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,episodesClustering:!0,copyVideoLink:!0,videoRotate:!0,tracer:!1,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,interactiveControlsFillAnimation:!1,interactiveControlsHideAnimation:!1,interactiveHistoryEndChapterFix:!0,thumbTimer:!0,hotKeyMapModal:!0,hotKeyHelpers:!0,saveDebugInfoToFile:!1,saveTraceInfoToFile:!1,additionalButtons:!0,additionalButtonsDesktopControlPanelRight:!0,additionalSettingsMenuItems:!0,additionalContextMenuItems:!0,contextMenuButton:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,autoplayNext:!0,nextPrevButtons:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,initSubtitles:!0,useCallbackForMediaSessionNextPrevClick:!1,usePerformanceFix:!1,userVideoPrefs:!1,savePreferredStatesOnUserActionOnly:!1,useLoopSetting:!1,doubleForwardAvailable:!1,useRichSeek:!1,disableThumbUnstartedOnAutoplay:!1},controls:{showOnStartupAtAutoplay:!0,hideTimeout:500,hideTimeoutMobile:3e3,hideTimeoutInitial:200,hideTimeoutFullscreen:3e3,hideTimeoutCursor:3e3,hideTimeoutTooltips:1e3,collapseMobileUnmute:6e3,hide360IconTimeout:3e3,hideHotKeyHelpers:2e3,playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25,volumeStepKeyboard:.05,volumeStepWheel:.05,volumeBarTimeout:300,seekStepKeyboard:1e4,seekStepMobile:15e3,seekStepFrame:400},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},interactive:{historyMaxLength:100,noInteractionEventTimeout:3e4},view:{timelineSliderColor:null,timelineSliderHandleColor:null,timelineSliderFilledColor:null,timelineSliderLoadedColor:null,volumeSliderColor:null,volumeSliderHandleColor:null,volumeSliderFilledColor:null,controlsTimeColor:null,timelineSliderFilledActiveLiveColor:null,timelineSliderHandleActiveLiveColor:null,buttonColor:null,buttonToggleOnColor:null,focusedColor:null,font:null,focusedOutlineWidth:null,focusedOutlineRadius:null,controlsDesktopPaddingHorizontal:null,timelinePaddingHorizontal:null,settingsBackgroundColor:null,controlsGradientHeight:null,controlsGradient:null},userSalt:"0",doubleForwardActivationTime:600,playbackStatusAnimationDuration:1e3,playbackStatusNextVideoAnimationDuration:1e3,suitableDurationForUsingRichSeek:180,titleShowBehaviour:"fullscreen"},d_=t=>(0,Da.fillWithDefault)(t,Xy),c_=t=>Cl("ui-config",t),Nt=()=>Tl("ui-config");var Gd="vk_player_debug_panel_opened";var u_="videoplayer",p_="videoplayer";var ms={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},f_=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),m_=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),v_=new Set(["ShiftRight","ShiftLeft"]);var g_=["TIMELINE"],Yd=[...g_,"GRAPH_BUTTON"],Uf=[...g_,"PLAY_BUTTON"],jd=[...Yd,"PLAY_BUTTON"];var ts=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ts||{}),Xd={xs:0,s:1,m:2,l:3,xl:4};var Zd=require("@vkontakte/videoplayer-shared/es2015"),h_=require("@vkontakte/videoplayer-core/es2015"),__=require("@vkontakte/videoplayer-statistics/es2015");var Du="prod",Fa="1.1.79";var Ha=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var b_=Symbol("storeContext"),$_=Symbol("microStoresContext"),y_=(t,e)=>{Cl(b_,t),Cl($_,e),Du==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=Tl(b_);return(0,Zd.assertNonNullable)(t,"Store context is empty!"),t},Io=()=>{let t=Tl($_);return(0,Zd.assertNonNullable)(t,"MicroStores context is empty!"),t},li=(t,e)=>Fu(t,t.getValue(),e),Fu=(t,e,i)=>Nr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),x_=(t,e,i,o)=>{var Q,H,z,Y,le,X,re,Z,we;let r=t.info,{width:a,height:l}=ge(i.ui.playerSize),d=(H=(Q=r.throughputEstimation$.getValue())==null?void 0:Q.toFixed(0))!=null?H:0,s=(Y=(z=r.rttEstimation$.getValue())==null?void 0:z.toFixed(0))!=null?Y:0,u=r.isAutoQualityEnabled$.getValue()?"auto":"manual",v=`${Fa} (core: ${h_.VERSION}, stat: ${__.VERSION}, shared: ${Zd.VERSION})`,p=ge(i.state.errorLog$),f=p.length?`
45
- `+p.map((ue,ne)=>{var Ne;let _e=`${ne}) Type: ${ue.id}
46
- `,xe=`Message: ${ue.message} (${ue.thrown})
47
- `,J=`Trace: ${(Ne=ue.thrown)==null?void 0:Ne.stack}
48
- `;return _e+xe+J}).join(`
49
- `):void 0,$=i.state.isAudioDisabled?"disabled":ge(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),g=t.info.currentAudioStream$.getValue(),w=[];y&&w.push(`Video: ${(le=y==null?void 0:y.codec)!=null?le:""}`+(y!=null&&y.hdr?" (HDR)":"")),g&&w.push(`Audio: ${(X=g==null?void 0:g.codec)!=null?X:""}`+(g!=null&&g.language?` (${g.language})`:""));let T=r.currentQuality$.getValue(),I="";if(T){let ue=r.availableQualitiesFps$.getValue()[T];I=ue?`${ue}fps`:""}let N=r.httpConnectionType$.getValue(),k=(Z=(re=r.currentBuffer$.getValue())==null?void 0:re.end)!=null?Z:0,E=Math.max(k-ge(i.state.positionExact$),0),A={Version:v,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":N?N+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:w.join(", "),Quality:`${u} ${T!=null?T:""} ${I}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:$,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:f};return Object.entries(A).filter(([ue,ne])=>ne!==void 0).map(([ue,ne])=>`${ue}: ${ne}`).join(`
50
- `)},w_=(t,e,i)=>{var Q,H,z,Y;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:Fa,viewport:`${r}x${a}`,volume:Math.round(ge(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let v=o.currentBuffer$.getValue(),p=o.isLive$.getValue(),f=o.liveBufferTime$.getValue();v&&(p&&f?l.buffer=v.end-f:l.buffer=Math.max(v.end-ge(i.state.positionExact$),0)),l.position=ge(i.state.positionExact$);let $=o.throughputEstimation$.getValue();$&&(l.speed=$);let y=o.videoBitrate$.getValue();y&&(l.bitrate=y);let g=o.liveLatency$.getValue();g&&(l.liveLatency=g);let w=o.currentVideoSegmentLength$.getValue();w&&(l.currentVideoSegmentLength=w);let T=o.currentAudioSegmentLength$.getValue();T&&(l.currentAudioSegmentLength=T);let I=ge(i.vsid);typeof I=="string"&&(l.vsid=I);let N=(Q=t.info.currentVideoStream$.getValue())==null?void 0:Q.codec;N&&(l.videoCodec=N);let k=(H=t.info.currentAudioStream$.getValue())==null?void 0:H.codec;k&&(l.audioCodec=k),((z=t.info.currentVideoStream$.getValue())==null?void 0:z.hdr)&&(l.hdr=!0);let A=(Y=t.info.currentAudioStream$.getValue())==null?void 0:Y.language;return A&&(l.audioLanguage=A),l},S_=(t,e)=>Ha(t,e,"mp4"),T_=t=>!t.type,C_=t=>!!t.type,I_=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},Bu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return ht(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};var vi=require("@vkontakte/videoplayer-shared/es2015"),K6=require("@vkontakte/videoplayer-core/es2015");var Zy="vk_player_",E_="vk_player_prefer_traffic_saving_enabled",k_="vk_player_preferred_volume",P_="vk_player_prefer_volume_mute",qf="vk_player_preferred_quality",zf="vk_player_preferred_default_quality_settings",Wf="vk_player_preferred_quality_settings_by_video",A_="vk_player_preferred_stream_language",L_="vk_player_preferred_rate",M_="vk_player_preferred_autoplay_next",Kf="vk_player_preferred_subtitles_language",V_="vk_player_user_video_prefs",R_=`${Zy}preview_track_close_tooltip`,N_=t=>t>1?1:t<0?0:t,Qf=t=>vi.safeStorage.set(k_,N_(t).toString(10)),Hu=()=>{let t=vi.safeStorage.get(k_);return(0,vi.isNullable)(t)?void 0:N_(parseFloat(t))},Gf=(t,e)=>vi.safeStorage.set(qf,JSON.stringify({videoId:t,value:e})),Uu=()=>vi.safeStorage.remove(qf),Yf=t=>{let e=vi.safeStorage.get(qf);if((0,vi.isNullable)(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){Uu();return}return o},O_=(t,e)=>{e?vi.safeStorage.set(t,"true"):vi.safeStorage.remove(t)},jf=t=>vi.safeStorage.get(t)==="true",Xf=t=>O_(P_,t),D_=()=>jf(P_),Jd=t=>O_(E_,t),Zf=()=>jf(E_),B_=()=>vi.safeStorage.get(A_),Jf=t=>vi.safeStorage.set(A_,t),em=()=>vi.safeStorage.get(Kf),tm=t=>{t?vi.safeStorage.set(Kf,t):vi.safeStorage.remove(Kf)},F_=t=>vi.safeStorage.set(L_,JSON.stringify({rate:t})),H_=()=>{let t=vi.safeStorage.get(L_);if((0,vi.isNullable)(t))return;let{rate:e}=JSON.parse(t);return e},U_=t=>{vi.safeStorage.set(M_,String(t))},z_=()=>jf(M_),Jy=()=>{let t=v=>{vi.safeStorage.set(zf,JSON.stringify(v))},e=()=>{try{let v=vi.safeStorage.get(zf);return v?JSON.parse(v):null}catch(v){return null}},i=()=>{try{let v=vi.safeStorage.get(Wf);return v?JSON.parse(v):null}catch(v){return null}},o=v=>{vi.safeStorage.set(Wf,JSON.stringify(v))},r=v=>{u(v);let p=v?i():null;if(p&&(p==null?void 0:p.videoId)===v)return jt(Ie({},p),{appliesTo:"to-video"});p&&a();let f=e();return f?jt(Ie({},f),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{vi.safeStorage.remove(Wf)},l=()=>{vi.safeStorage.remove(zf)},d=(v,p="as-default")=>{v.type==="exact_quality"||p==="to-video"?o(v):t(v)},s=v=>{let p=r(v);if(p){switch(p.type){case"traffic_saving":Jd(!0);break;case"exact_quality":Gf(v,p.quality)}a(),l()}},u=v=>{let p=Yf(v);if(p){o({type:"exact_quality",videoId:v,quality:p});return}Zf()&&t({type:"traffic_saving",videoId:v}),Jd(!1),Uu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:em,savePreferredSubtitlesLanguage:tm}},{getPreferredQualitySettings:W_,migrateSettingsToLegacyWay:K_,savePreferredQualitySettings:zu,savePreferredDefaultQualitySettings:q6,removePreferredQualitySettingsByVideo:Q6,getPreferredDefaultQualitySettings:Wu}=Jy(),e1=3,t1=3,q_=()=>{let t=vi.safeStorage.get(V_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},Ku=(t,e)=>{var r,a;let i=q_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},im=(t,e,i)=>{var l,d,s;let o=(l=q_())!=null?l:{},r=(s=(d=o[t])==null?void 0:d[e])!=null?s:{};Object.assign(r,i,{updatedTs:Date.now()}),t in o||(o[t]={}),o[t][e]=r;let a=i1(o);vi.safeStorage.set(V_,JSON.stringify(a))};function i1(t){let e=Object.entries(t).reduce((o,[r,a])=>{let l=0;return Object.values(a).forEach(d=>{l<d.updatedTs&&(l=d.updatedTs)}),o.push([r,l]),o},[]);return e.sort(([,o],[,r])=>o>r?-1:1),e.splice(t1),e.reduce((o,[r])=>(o[r]=o1(t[r]),o),{})}function o1(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(e1),Object.fromEntries(e)}function Q_(){vi.safeStorage.set(R_,JSON.stringify(!0))}function G_(){let t=vi.safeStorage.get(R_);try{return t?JSON.parse(t):!1}catch(e){return!1}}var tg=require("@vkontakte/videoplayer-core/es2015");Zg();var aa="var(--btn-color, #fff)";var n1=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),r1=Ce('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Ze(t,e){var v;B(e,!0);let i=h(e,"width",19,()=>"24"),o=h(e,"height",19,()=>"24"),r=h(e,"fill",3,aa),a=(v=e.viewBox)!=null?v:`0 0 ${i()} ${o()}`;var l=r1(),d=C(l);{var s=p=>{var f=n1(),$=de(f),y=C($);ai(y,()=>e.children),S($),fi(),b(p,f)},u=p=>{var f=Le(),$=de(f);ai($,()=>e.children),b(p,f)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{Ve(l,"aria-label",e.ariaLabel),Ve(l,"aria-hidden",!e.ariaLabel),Ve(l,"width",i()),Ve(l,"height",o()),Ve(l,"viewBox",a),Ve(l,"fill",r()),Qe(l,e.style),Ve(l,"data-testid",e.testId)}),b(t,l),F()}var Ul=require("@vkontakte/videoplayer-shared/es2015");var s1={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 La=!1,Ml=null,Ma=!1,Is=!1;function pf(t){Is=t}var Bd=[],Fd=[],Ot=null,$r=!1;function qi(t){Ot=t}var $t=null;function go(t){$t=t}var en=null;function _u(t){Ot!==null&&Ot.f&2097152&&(en===null?en=[Ot,[t]]:en[1].push(t))}var An=null,yr=0,br=null;function ih(t){br=t}var yh=1,Iu=0,Es=!1,Eu=null;function Ed(){return++yh}function Ea(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],Ea(a)&&uf(a),a.wv>t.wv)return!0}(!o||$t!==null&&!Es)&&En(t,1024)}return!1}function xh(t,e,i=!0){var o=t.reactions;if(o!==null)for(var r=0;r<o.length;r++){var a=o[r];en!=null&&en[1].includes(t)&&en[0]===Ot||((a.f&2)!==0?xh(a,e,!1):e===a&&(i?En(a,2048):(a.f&1024)!==0&&En(a,4096),kd(a)))}}function hu(t){var $,y;var e=An,i=yr,o=br,r=Ot,a=Es,l=en,d=Qt,s=$r,u=t.f;An=null,yr=0,br=null,Es=(u&256)!==0&&($r||!Ma||Ot===null),Ot=(u&96)===0?t:null,en=null,Cd(t.ctx),$r=!1,Iu++,t.f|=2097152;try{var f=(0,t.fn)(),p=t.deps;if(An!==null){var v;if(Nd(t,yr),p!==null&&yr>0)for(p.length=yr+An.length,v=0;v<An.length;v++)p[yr+v]=An[v];else t.deps=p=An;if(!Es||(u&2)!==0&&t.reactions!==null)for(v=yr;v<p.length;v++)((y=($=p[v]).reactions)!=null?y:$.reactions=[]).push(t)}else p!==null&&yr<p.length&&(Nd(t,yr),p.length=yr);if(ms()&&br!==null&&!$r&&p!==null&&(t.f&6146)===0)for(v=0;v<br.length;v++)xh(br[v],t);return r!==null&&r!==t&&(Iu++,br!==null&&(o===null?o=br:o.push(...br))),f}catch(g){_h(g)}finally{An=e,yr=i,br=o,Ot=r,Es=a,en=l,Cd(d),$r=s,t.f^=2097152}}function J$(t,e){let i=e.reactions;if(i!==null){var o=Rg.call(i,t);if(o!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[o]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(An===null||!An.includes(e))&&(En(e,4096),(e.f&768)===0&&(e.f^=512),gu(e),Nd(e,0))}function Nd(t,e){var i=t.deps;if(i!==null)for(var o=e;o<i.length;o++)J$(t,i[o])}function kl(t){var e=t.f;if((e&16384)===0){En(t,1024);var i=$t,o=Ma;if($t=t,Ma=!0,Pe){var r=hr;Td(t.component_function)}try{(e&16)!==0?fh(t):gf(t),vf(t);var a=hu(t);if(t.teardown=typeof a=="function"?a:null,t.wv=yh,Pe&&fs&&(t.f&2048)!==0&&t.deps!==null)for(var l of t.deps)l.set_during_effect&&(l.wv=Ed(),l.set_during_effect=!1);Pe&&Fd.push(t)}finally{Ma=o,$t=i,Pe&&Td(r)}}}function bh(){console.error("Last ten effects were: ",Fd.slice(-10).map(t=>t.fn)),Fd=[]}function e1(){try{Wg()}catch(t){if(Pe&&vo(t,"stack",{value:""}),Ml!==null)if(Pe)try{Dd(t,Ml)}catch(e){throw bh(),e}else Dd(t,Ml);else throw Pe&&bh(),t}}function xf(){var t=Ma;try{var e=0;for(Ma=!0;Bd.length>0;){e++>1e3&&e1();var i=Bd,o=i.length;Bd=[];for(var r=0;r<o;r++){var a=i1(i[r]);t1(a)}El.clear()}}finally{La=!1,Ma=t,Ml=null,Pe&&(Fd=[])}}function t1(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var o=t[i];(o.f&24576)===0&&Ea(o)&&(kl(o),o.deps===null&&o.first===null&&o.nodes_start===null&&(o.teardown===null?_f(o):o.fn=null))}}function kd(t){La||(La=!0,queueMicrotask(xf));for(var e=Ml=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}Bd.push(e)}function i1(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:Ea(i)&&kl(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 Vl(t){var e;for(t&&(La=!0,xf(),La=!0,e=t());;){if(gh(),Bd.length===0)return La=!1,Ml=null,Pe&&(Fd=[]),e;La=!0,xf()}}function _o(){return ht(this,null,function*(){yield Promise.resolve(),Vl()})}function n(t){var e=t.f,i=(e&2)!==0;if(Eu!==null&&Eu.add(t),Ot!==null&&!$r){if(!(en!=null&&en[1].includes(t))||en[0]!==Ot){var o=Ot.deps;t.rv<Iu&&(t.rv=Iu,An===null&&o!==null&&o[yr]===t?yr++:An===null?An=[t]:(!Es||!An.includes(t))&&An.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,a=r.parent;a!==null&&(a.f&256)===0&&(r.f^=256)}if(i&&(r=t,Ea(r)&&uf(r)),Pe&&fs&&!$r&&Sd!==null&&Ot!==null&&Sd.reaction===Ot)if(t.trace)t.trace();else{var l=Ts("TracedAt");if(l){var d=Sd.entries.get(t);d===void 0&&(d={traces:[]},Sd.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&&El.has(t)?El.get(t):t.v}function It(t){var e=$r;try{return $r=!0,t()}finally{$r=e}}var o1=-7169;function En(t,e){t.f=t.f&o1|e}function ku(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Zo in t)Pu(t);else if(!Array.isArray(t))for(let e in t){let i=t[e];typeof i=="object"&&i&&Zo in i&&Pu(i)}}}function Pu(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{Pu(t[o],e)}catch(r){}let i=Sa(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){let o=uu(i);for(let r in o){let a=o[r].get;if(a)try{a.call(t)}catch(l){}}}}}function wf(t,e){if(e){let i=document.body;t.autofocus=!0,kn(()=>{document.activeElement===i&&t.focus()})}}function Hd(t){var e=Ot,i=$t;qi(null),go(null);try{return t()}finally{qi(e),go(i)}}var Sf=new Set,Au=new Set;function Va(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 Cf(t,e,i,o={}){function r(a){if(o.capture||Rl.call(e,a),!a.cancelBubble)return Hd(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?kn(()=>{e.addEventListener(t,r,o)}):e.addEventListener(t,r,o),r}function dt(t,e,i,o,r){var a={capture:o,passive:r},l=Cf(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Vo(()=>{e.removeEventListener(t,l,a)})}function je(t){for(var e=0;e<t.length;e++)Sf.add(t[e]);for(var i of Au)i(t)}function Rl(t){var C;var e=this,i=e.ownerDocument,o=t.type,r=((C=t.composedPath)==null?void 0:C.call(t))||[],a=r[0]||t.target,l=0,d=t.__root;if(d){var s=r.indexOf(d);if(s!==-1&&(e===document||e===window)){t.__root=e;return}var u=r.indexOf(e);if(u===-1)return;s<=u&&(l=s)}if(a=r[l]||t.target,a!==e){vo(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=Ot,p=$t;qi(null),go(null);try{for(var v,$=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var g=a["__"+o];if(g!=null&&(!a.disabled||t.target===a))if(vr(g)){var[w,...I]=g;w.apply(a,[t,...I])}else g.call(a,t)}catch(N){v?$.push(N):v=N}if(t.cancelBubble||y===e||y===null)break;a=y}if(v){for(let N of $)queueMicrotask(()=>{throw N});throw v}}finally{t.__root=e,delete t.currentTarget,qi(f),go(p)}}}var r1;function wh(){r1=void 0}function Nl(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function No(t,e){var i=$t;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,r,a=!t.startsWith("<!>");return()=>{if(tt)return No(yt,null),yt;r===void 0&&(r=Nl(a?t:"<!>"+t),i||(r=Ai(r)));var l=o||Ad?document.importNode(r,!0):r.cloneNode(!0);if(i){var d=Ai(l),s=l.lastChild;No(d,s)}else No(l,l);return l}}function l1(t,e,i="svg"){var o=!t.startsWith("<!>"),r=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,l;return()=>{if(tt)return No(yt,null),yt;if(!l){var d=Nl(a),s=Ai(d);if(r)for(l=document.createDocumentFragment();Ai(s);)l.appendChild(Ai(s));else l=Ai(s)}var u=l.cloneNode(!0);if(r){var f=Ai(u),p=u.lastChild;No(f,p)}else No(u,u);return u}}function Ce(t,e){return l1(t,e,"svg")}function gs(t=""){if(!tt){var e=Pn(t+"");return No(e,e),e}var i=yt;return i.nodeType!==yl&&(i.before(i=Pn()),Ii(i)),No(i,i),i}function Le(){if(tt)return No(yt,null),yt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Pn();return t.append(e,i),No(e,i),t}function b(t,e){if(tt){$t.nodes_end=yt,Gi();return}t!==null&&t.before(e)}var d1=/\r/g;function Ch(t){t=t.replace(d1,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function Th(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var c1=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Ih(t){return c1.includes(t)}var u1=["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 p1={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 Eh(t){var e;return t=t.toLowerCase(),(e=p1[t])!=null?e:t}var E3=[...u1,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var f1=["touchstart","touchmove"];function Ph(t){return f1.includes(t)}var m1=["$state","$state.raw","$derived","$derived.by"],P3=[...m1,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var v1=["textarea","script","style","title"];function kh(t){return v1.includes(t)}function Lu(t){return t==null?void 0:t.replace(/\//g,"/​")}var Ud=!0;function Mu(t){Ud=t}function me(t,e){var o;var i=e==null?"":typeof e=="object"?e+"":e;i!==((o=t.__t)!=null?o:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function Xr(t,e){return Ah(t,e)}function If(t,e){var l;yu(),e.intro=(l=e.intro)!=null?l:!1;let i=e.target,o=tt,r=yt;try{for(var a=Ai(i);a&&(a.nodeType!==gr||a.data!==Ys);)a=tn(a);if(!a)throw us;ho(!0),Ii(a),Gi();let d=Ah(t,jt(Ee({},e),{anchor:a}));if(yt===null||yt.nodeType!==gr||yt.data!==wa)throw Js(),us;return ho(!1),d}catch(d){if(d===us)return e.recover===!1&&Kg(),yu(),Ld(i),ho(!1),Xr(t,e);throw d}finally{ho(o),Ii(r),wh()}}var Ol=new Map;function Ah(t,{target:e,anchor:i,props:o={},events:r,context:a,intro:l=!0}){yu();var d=new Set,s=p=>{for(var v=0;v<p.length;v++){var $=p[v];if(!d.has($)){d.add($);var y=Ph($);e.addEventListener($,Rl,{passive:y});var g=Ol.get($);g===void 0?(document.addEventListener($,Rl,{passive:y}),Ol.set($,1)):Ol.set($,g+1)}}};s(wd(Sf)),Au.add(s);var u=void 0,f=ph(()=>{var p=i!=null?i:e.appendChild(Pn());return Fi(()=>{if(a){B({});var v=Qt;v.c=a}r&&(o.$$events=r),tt&&No(p,null),Ud=l,u=t(p,o)||{},Ud=!0,tt&&($t.nodes_end=yt),a&&F()}),()=>{var y;for(var v of d){e.removeEventListener(v,Rl);var $=Ol.get(v);--$===0?(document.removeEventListener(v,Rl),Ol.delete(v)):Ol.set(v,$)}Au.delete(s),p!==i&&((y=p.parentNode)==null||y.removeChild(p))}});return Tf.set(u,f),u}var Tf=new WeakMap;function Ra(t,e){let i=Tf.get(t);return i?(Tf.delete(t),i(e)):(Pe&&rh(),Promise.resolve())}function si(t,e,...i){var o=t,r=_t,a;Yi(()=>{r!==(r=e())&&(a&&(Qi(a),a=null),Pe&&r==null&&qg(),a=Fi(()=>r(o,...i)))},65536),tt&&(o=yt)}if(Pe){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;Yg(e)},set:o=>{i=o}})}};b1=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var b1;function Vt(t){Qt===null&&Sl("onMount"),ps&&Qt.l!==null?_1(Qt).m.push(t):Oe(()=>{let e=It(t);if(typeof e=="function")return e})}function mn(t){Qt===null&&Sl("onDestroy"),Vt(()=>()=>It(t))}function _1(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var Lh=new Map;function Mh(t,e){var i=Lh.get(t);i||(i=new Set,Lh.set(t,i)),i.add(e)}function R(t,e,[i,o]=[0,0]){tt&&i===0&&Gi();var r=t,a=null,l=null,d=oo,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=$u(r);w===Ys?o=0:w===js?o=1/0:(o=parseInt(w.substring(1)),o!==o&&(o=d?1/0:-1))}let g=o>i;!!d===g&&(r=Pa(),Ii(r),ho(!1),y=!0,o=-1)}d?(a?ks(a):$&&(a=Fi(()=>$(r))),l&&Zn(l,()=>{l=null})):(l?ks(l):$&&(l=Fi(()=>$(r,[i+1,o]))),a&&Zn(a,()=>{a=null})),y&&ho(!0)};Yi(()=>{u=!1,e(f),u||p(null,null)},s),tt&&(r=yt)}function As(t,e,i){tt&&Gi();var o=t,r=oo,a,l=ms()?Bg:xl;Yi(()=>{l(r,r=e())&&(a&&Zn(a),a=Fi(()=>i(o)))}),tt&&(o=yt)}var ta=null;function kf(t){ta=t}function zd(t,e){return e}function x1(t,e,i,o){for(var r=[],a=e.length,l=0;l<a;l++)Cu(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(),ea(t,e[0].prev,e[a-1].next)}bf(r,()=>{for(var u=0;u<a;u++){var f=e[u];d||(o.delete(f.k),ea(t,f.prev,f.next)),Qi(f.e,!d)}})}function xi(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?Ii(Ai(u)):u.appendChild(Pn())}tt&&Gi();var f=null,p=!1,v=In(()=>{var $=i();return vr($)?$:$==null?[]:wd($)});Yi(()=>{var $=n(v),y=$.length;if(p&&y===0)return;p=y===0;let g=!1;if(tt){var w=$u(l)===js;w!==(y===0)&&(l=Pa(),Ii(l),ho(!1),g=!0)}if(tt){for(var I=null,C,N=0;N<y;N++){if(yt.nodeType===gr&&yt.data===wa){l=yt,g=!0,ho(!1);break}var L=$[N],E=o(L,N);C=Nh(yt,d,I,null,L,E,N,r,e,i),d.items.set(E,C),I=C}y>0&&Ii(Pa())}tt||w1($,d,l,r,e,o,i),a!==null&&(y===0?f?ks(f):f=Fi(()=>a(l)):f!==null&&Zn(f,()=>{f=null})),g&&ho(!0),n(v)}),tt&&(l=yt)}function w1(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,g,w=[],I=[],C,N,L,E;if(d)for(E=0;E<u;E+=1)C=t[E],N=a(C,E),L=f.get(N),L!==void 0&&((J=L.a)==null||J.measure(),(g!=null?g:g=new Set).add(L));for(E=0;E<u;E+=1){if(C=t[E],N=a(C,E),L=f.get(N),L===void 0){var P=v?v.e.nodes_start:i;y=Nh(P,e,y,y===null?e.first:y.next,C,N,E,o,r,l),f.set(N,y),w=[],I=[],v=y.next;continue}if(s&&S1(L,C,E,r),(L.e.f&8192)!==0&&(ks(L.e),d&&((we=L.a)==null||we.unfix(),(g!=null?g:g=new Set).delete(L))),L!==v){if($!==void 0&&$.has(L)){if(w.length<I.length){var q=I[0],H;y=q.prev;var z=w[0],j=w[w.length-1];for(H=0;H<w.length;H+=1)Vh(w[H],q,i);for(H=0;H<I.length;H+=1)$.delete(I[H]);ea(e,z.prev,j.next),ea(e,y,z),ea(e,j,q),v=q,y=j,E-=1,w=[],I=[]}else $.delete(L),Vh(L,v,i),ea(e,L.prev,L.next),ea(e,L,y===null?e.first:y.next),ea(e,y,L),y=L;continue}for(w=[],I=[];v!==null&&v.k!==N;)(v.e.f&8192)===0&&($!=null?$:$=new Set).add(v),I.push(v),v=v.next;if(v===null)continue;L=v}w.push(L),y=L,v=L.next}if(v!==null||$!==void 0){for(var ae=$===void 0?[]:wd($);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()}x1(e,ae,ne,f)}}d&&kn(()=>{var _e;if(g!==void 0)for(L of g)(_e=L.a)==null||_e.apply()}),$t.first=e.first&&e.first.e,$t.last=y&&y.e}function S1(t,e,i,o){(o&1)!==0&&Pl(t.v,e),(o&2)!==0?Pl(t.i,i):t.i=i}function Nh(t,e,i,o,r,a,l,d,s,u){var f=ta,p=(s&1)!==0,v=(s&16)===0,$=p?v?vs(r,!1,!1):Mr(r):r,y=(s&2)===0?l:Mr(l);Pe&&p&&($.trace=()=>{var w=typeof y=="number"?l:y.v;u()[w]});var g={i:y,v:$,k:a,a:null,e:null,prev:i,next:o};ta=g;try{return g.e=Fi(()=>d(t,$,y,u),tt),g.e.prev=i&&i.e,g.e.next=o&&o.e,i===null?e.first=g:(i.next=g,i.e.next=g.e),o!==null&&(o.prev=g,o.e.prev=g.e),g}finally{ta=f}}function Vh(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=tn(a);r.before(a),a=l}}function ea(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 C1(t,e,i){var a,l;if(!e||e===Ch(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=hr)!=null&&l[Gn]&&(o=`in ${hr[Gn]}`),nh(Lu(o))}function Wd(t,e,i=!1,o=!1,r=!1){var a=t,l="";D(()=>{var $;var d=$t;if(l===(l=($=e())!=null?$:"")){tt&&Gi();return}if(d.nodes_start!==null&&(hf(d.nodes_start,d.nodes_end),d.nodes_start=d.nodes_end=null),l!==""){if(tt){for(var s=yt.data,u=Gi(),f=u;u!==null&&(u.nodeType!==gr||u.data!=="");)f=u,u=tn(u);if(u===null)throw Js(),us;Pe&&!r&&C1(u.parentNode,s,l),No(yt,f),a=Ii(u);return}var p=l+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var v=Nl(p);if((i||o)&&(v=Ai(v)),No(Ai(v),v.lastChild),i||o)for(;Ai(v);)a.before(Ai(v));else a.before(v)}})}function Hi(t,e,i){tt&&Gi();var o=t,r,a;Yi(()=>{r!==(r=e())&&(a&&(Zn(a),a=null),r&&(a=Fi(()=>i(o,r))))},65536),tt&&(o=yt)}function Na(t,e,i,o,r,a){var y;let l=tt;tt&&Gi();var d=Pe&&a&&((y=Qt)==null?void 0:y.function[Gn]),s,u,f=null;tt&&yt.nodeType===fu&&(f=yt,Gi());var p=tt?yt:t,v,$=ta;Yi(()=>{let g=e()||null;var w=r?r():i||g==="svg"?du:null;if(g!==s){var I=ta;kf($),v&&(g===null?Zn(v,()=>{v=null,u=null}):g===u?ks(v):(Qi(v),Mu(!1))),g&&g!==u&&(v=Fi(()=>{if(f=tt?f:w?document.createElementNS(w,g):document.createElement(g),Pe&&a&&(f.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),No(f,f),o){tt&&kh(g)&&f.append(document.createComment(""));var C=tt?Ai(f):f.appendChild(Pn());tt&&(C===null?ho(!1):Ii(C)),o(f,C)}$t.nodes_end=f,p.before(f)})),s=g,s&&(u=s),Mu(!0),kf(I)}},65536),l&&(ho(!0),Ii(p))}var Lf;function Oh(t){return Lf=t.target,new Af(t)}var Ls,Vr,Af=class{constructor(e){Gs(this,Ls);Gs(this,Vr);var a,l;var i=new Map,o=(d,s)=>{var u=vs(s,!1,!1);return i.set(d,u),u};let r=new Proxy(jt(Ee({},e.props||{}),{$$events:{}}),{get(d,s){var u;return n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s)))},has(d,s){var u;return s===$l?!0:(n((u=i.get(s))!=null?u:o(s,Reflect.get(d,s))),Reflect.has(d,s))},set(d,s,u){var f;return O((f=i.get(s))!=null?f:o(s,u),u),Reflect.set(d,s,u)}});bl(this,Vr,(e.hydrate?If:Xr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((l=e==null?void 0:e.props)!=null&&l.$$host)||e.sync===!1)&&Vl(),bl(this,Ls,r.$$events);for(let d of Object.keys(Bi(this,Vr)))d==="$set"||d==="$destroy"||d==="$on"||vo(this,d,{get(){return Bi(this,Vr)[d]},set(s){Bi(this,Vr)[d]=s},enumerable:!0});Bi(this,Vr).$set=d=>{Object.assign(r,d)},Bi(this,Vr).$destroy=()=>{Ra(Bi(this,Vr))}}$set(e){Bi(this,Vr).$set(e)}$on(e,i){Bi(this,Ls)[e]=Bi(this,Ls)[e]||[];let o=(...r)=>i.call(this,...r);return Bi(this,Ls)[e].push(o),()=>{Bi(this,Ls)[e]=Bi(this,Ls)[e].filter(r=>r!==o)}}$destroy(){Bi(this,Vr).$destroy()}};Ls=new WeakMap,Vr=new WeakMap;function Q(t,e){kn(()=>{var r,a,l;var i=t.getRootNode(),o=i.host?i:(l=(r=i.head)!=null?r:i.ownerDocument.head)!=null?l:(a=Lf)==null?void 0:a.parentNode;if(!(o!=null&&o.querySelector("#"+e.hash))){let d=document.createElement("style");d.id=e.hash,d.textContent=e.code,o.appendChild(d),Pe&&Mh(e.hash,d)}})}function Ms(t,e){var i=void 0,o;Yi(()=>{i!==(i=e())&&(o&&(Qi(o),o=null),i&&(o=Fi(()=>{Ro(()=>i(t))})))})}function Dh(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=Dh(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Bh(){for(var t,e,i=0,o="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Dh(t))&&(o&&(o+=" "),o+=e);return o}function Kd(t){return typeof t=="object"?Bh(t):t!=null?t:""}var Fh=[...`
44
+ \r\f \v\uFEFF`];function Uh(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||Fh.includes(o[l-1]))&&(d===o.length||Fh.includes(o[d]))?o=(l===0?"":o.substring(0,l))+o.substring(d+1):l=d}}return o===""?null:o}function Hh(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 Mf(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function zh(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(Mf)),r&&s.push(...Object.keys(r).map(Mf));var u=0,f=-1;let g=t.length;for(var p=0;p<g;p++){var v=t[p];if(d?v==="/"&&t[p-1]==="*"&&(d=!1):a?a===v&&(a=!1):v==="/"&&t[p+1]==="*"?d=!0:v==='"'||v==="'"?a=v:v==="("?l++:v===")"&&l--,!d&&a===!1&&l===0){if(v===":"&&f===-1)f=p;else if(v===";"||p===g-1){if(f!==-1){var $=Mf(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+=Hh(o)),r&&(i+=Hh(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(tt||l!==i||l===void 0){var d=Uh(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 Vf(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(tt||r!==e){var a=zh(e,o);(!tt||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(Vf(t,i==null?void 0:i[0],o[0]),Vf(t,i==null?void 0:i[1],o[1],"important")):Vf(t,i,o));return o}function qd(t,e,i){if(t.multiple){if(e==null)return;if(!vr(e))return sh();for(var o of t.options)o.selected=e.includes(Wh(o));return}for(o of t.options){var r=Wh(o);if(sf(r,e)){o.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function Rf(t){var e=new MutationObserver(()=>{qd(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Vo(()=>{e.disconnect()})}function Wh(t){return"__value"in t?t.__value:t.value}var Dl=Symbol("class"),Bl=Symbol("style"),Qh=Symbol("is custom element"),Gh=Symbol("is html");function Yh(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var r=Xh(t);if(tt&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||M1(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Dg]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Zh(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function jh(t,e,i,o,r=!1){var L;var a=Xh(t),l=a[Qh],d=!a[Gh];let s=tt&&l;s&&ho(!1);var u=e||{},f=t.tagName==="OPTION";for(var p in e)p in i||(i[p]=null);i.class?i.class=Kd(i.class):(o||i[Dl])&&(i.class=null),i[Bl]&&((L=i.style)!=null||(i.style=null));var v=Zh(t);for(let E in i){let P=i[E];if(f&&E==="value"&&P==null){t.value=t.__value="",u[E]=P;continue}if(E==="class"){var $=t.namespaceURI==="http://www.w3.org/1999/xhtml";se(t,$,P,o,e==null?void 0:e[Dl],i[Dl]),u[E]=P,u[Dl]=i[Dl];continue}if(E==="style"){Qe(t,P,e==null?void 0:e[Bl],i[Bl]),u[E]=P,u[Bl]=i[Bl];continue}var y=u[E];if(!(P===y&&!(P===void 0&&t.hasAttribute(E)))){u[E]=P;var g=E[0]+E[1];if(g!=="$$")if(g==="on"){let q={},H="$$"+E,z=E.slice(2);var w=Ih(z);if(Th(z)&&(z=z.slice(0,-7),q.capture=!0),!w&&y){if(P!=null)continue;t.removeEventListener(z,u[H],q),u[H]=null}if(P!=null)if(w)t[`__${z}`]=P,je([z]);else{let j=function(ae){u[E].call(this,ae)};var N=j;u[H]=Cf(z,t,j,q)}else w&&(t[`__${z}`]=void 0)}else if(E==="style")Me(t,E,P);else if(E==="autofocus")wf(t,!!P);else if(!l&&(E==="__value"||E==="value"&&P!=null))t.value=t.__value=P;else if(E==="selected"&&f)Yh(t,P);else{var I=E;d||(I=Eh(I));var C=I==="defaultValue"||I==="defaultChecked";if(P==null&&!l&&!C)if(a[E]=null,I==="value"||I==="checked"){let q=t,H=e===void 0;if(I==="value"){let z=q.defaultValue;q.removeAttribute(I),q.defaultValue=z,q.value=q.__value=H?z:null}else{let z=q.defaultChecked;q.removeAttribute(I),q.defaultChecked=z,q.checked=H?z:!1}}else t.removeAttribute(E);else C||v.includes(I)&&(l||typeof P!="string")?t[I]=P:typeof P!="function"&&Me(t,I,P,r)}}}return s&&ho(!0),u}function no(t,e,i=[],o,r=!1,a=Gr){let l=i.map(a);var d=void 0,s={},u=t.nodeName==="SELECT",f=!1;if(Yi(()=>{var v=e(...l.map(n)),$=jh(t,d,v,o,r);f&&u&&"value"in v&&qd(t,v.value,!1);for(let g of Object.getOwnPropertySymbols(s))v[g]||Qi(s[g]);for(let g of Object.getOwnPropertySymbols(v)){var y=v[g];g.description===Xp&&(!d||y!==d[g])&&(s[g]&&Qi(s[g]),s[g]=Fi(()=>Ms(t,()=>y))),$[g]=y}d=$}),u){var p=t;Ro(()=>{qd(p,d.value),Rf(p)})}f=!0}function Xh(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[Qh]:t.nodeName.includes("-"),[Gh]:t.namespaceURI===Ag}}var Kh=new Map;function Zh(t){var e=Kh.get(t.nodeName);if(e)return e;Kh.set(t.nodeName,e=[]);for(var i,o=t,r=Element.prototype;r!==o;){i=uu(o);for(var a in i)i[a].set&&e.push(a);o=Sa(o)}return e}function M1(t,e,i){var o;Pe&&(e==="srcset"&&V1(t,i)||Nf((o=t.getAttribute(e))!=null?o:"",i)||oh(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Nf(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function qh(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function V1(t,e){var i=qh(t.srcset),o=qh(e);return o.length===i.length&&o.every(([r,a],l)=>a===i[l][1]&&(Nf(i[l][0],r)||Nf(r,i[l][0])))}var R1=cu?()=>performance.now():()=>Date.now(),Zr={tick:t=>(cu?requestAnimationFrame:_t)(t),now:()=>R1(),tasks:new Set};function Jh(){let t=Zr.now();Zr.tasks.forEach(e=>{e.c(t)||(Zr.tasks.delete(e),e.f())}),Zr.tasks.size!==0&&Zr.tick(Jh)}function e_(t){let e;return Zr.tasks.size===0&&Zr.tick(Jh),{promise:new Promise(i=>{Zr.tasks.add(e={c:t,f:i})}),abort(){Zr.tasks.delete(e)}}}function Vu(t,e){Hd(()=>{t.dispatchEvent(new CustomEvent(e))})}function B1(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 t_(t){let e={},i=t.split(";");for(let o of i){let[r,a]=o.split(":");if(!r||a===void 0)break;let l=B1(r.trim());e[l]=a.trim()}return e}var F1=t=>t;function Jr(t,e,i,o){var N;var r=(t&1)!==0,a=(t&2)!==0,l=r&&a,d=(t&4)!==0,s=l?"both":r?"in":"out",u,f=e.inert,p=e.style.overflow,v,$;function y(){var P;var L=Ot,E=$t;qi(null),go(null);try{return u!=null?u:u=i()(e,(P=o==null?void 0:o())!=null?P:{},{direction:s})}finally{qi(L),go(E)}}var g={is_global:d,in(){var L;if(e.inert=f,!r){$==null||$.abort(),(L=$==null?void 0:$.reset)==null||L.call($);return}a||v==null||v.abort(),Vu(e,"introstart"),v=Of(e,y(),$,1,()=>{Vu(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,Vu(e,"outrostart"),$=Of(e,y(),v,0,()=>{Vu(e,"outroend"),L==null||L()})},stop:()=>{v==null||v.abort(),$==null||$.abort()}},w=$t;if(((N=w.transitions)!=null?N:w.transitions=[]).push(g),r&&Ud){var I=d;if(!I){for(var C=w.parent;C&&(C.f&65536)!==0;)for(;(C=C.parent)&&(C.f&16)===0;);I=!C||(C.f&32768)!==0}I&&Ro(()=>{It(()=>g.in())})}}function Of(t,e,i,o,r){var a=o===1;if(Xs(e)){var l,d=!1;return kn(()=>{if(!d){var w=e({direction:a?"in":"out"});l=Of(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:_t,deactivate:_t,reset:_t,t:()=>o};let{delay:s=0,css:u,tick:f,easing:p=F1}=e;var v=[];if(a&&i===void 0&&(f&&f(0,1),u)){var $=t_(u(0,1));v.push($,$)}var y=()=>1-o,g=t.animate(v,{duration:s,fill:"forwards"});return g.onfinish=()=>{var z;g.cancel();var w=(z=i==null?void 0:i.t())!=null?z:1-o;i==null||i.abort();var I=o-w,C=e.duration*Math.abs(I),N=[];if(C>0){var L=!1;if(u)for(var E=Math.ceil(C/16.666666666666668),P=0;P<=E;P+=1){var q=w+I*p(P/E),H=t_(u(q,1-q));N.push(H),L||(L=H.overflow==="hidden")}L&&(t.style.overflow="hidden"),y=()=>{var j=g.currentTime;return w+I*p(j/C)},f&&e_(()=>{if(g.playState!=="running")return!1;var j=y();return f(j,1-j),!0})}g=t.animate(N,{duration:C,fill:"forwards"}),g.onfinish=()=>{y=()=>o,f==null||f(o,1-o),r()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=_t)},deactivate:()=>{r=_t},reset:()=>{o===0&&(f==null||f(1,0))},t:()=>y()}}function Df(t,e,i){var o=Xo(t,e);o&&o.set&&(t[e]=i,Vo(()=>{t[e]=null}))}var ia,Fl,Qd,Nu,i_,Ou=class Ou{constructor(e){Gs(this,Nu);Gs(this,ia,new WeakMap);Gs(this,Fl);Gs(this,Qd);bl(this,Qd,e)}observe(e,i){var o=Bi(this,ia).get(e)||new Set;return o.add(i),Bi(this,ia).set(e,o),Pg(this,Nu,i_).call(this).observe(e,Bi(this,Qd)),()=>{var r=Bi(this,ia).get(e);r.delete(i),r.size===0&&(Bi(this,ia).delete(e),Bi(this,Fl).unobserve(e))}}};ia=new WeakMap,Fl=new WeakMap,Qd=new WeakMap,Nu=new WeakSet,i_=function(){var e;return(e=Bi(this,Fl))!=null?e:bl(this,Fl,new ResizeObserver(i=>{for(var o of i){Ou.entries.set(o.target,o);for(var r of Bi(this,ia).get(o.target)||[])r(o)}}))},mr(Ou,"entries",new WeakMap);var Bf=Ou;var H1=new Bf({box:"border-box"});function Ln(t,e,i){var o=H1.observe(t,()=>i(t[e]));Ro(()=>(It(()=>i(t[e])),o))}function o_(t,e){return t===e||(t==null?void 0:t[Zo])===e}function Ze(t={},e,i,o){return Ro(()=>{var r,a;return on(()=>{r=a,a=(o==null?void 0:o())||[],It(()=>{t!==i(...a)&&(e(t,...a),r&&o_(i(...r),t)&&e(null,...r))})}),()=>{kn(()=>{a&&o_(i(...a),t)&&e(null,...a)})}}),t}function So(t=!1){let e=Qt,i=e.l.u;if(!i)return;let o=()=>ku(e.s);if(t){let r=0,a={},l=Gr(()=>{let d=!1,s=e.s;for(let u in s)s[u]!==a[u]&&(a[u]=s[u],d=!0);return d&&r++,r});o=()=>n(l)}i.b.length&&Rd(()=>{n_(e,o),Zs(i.b)}),Oe(()=>{let r=It(()=>i.m.map(Og));return()=>{for(let a of r)typeof a=="function"&&a()}}),i.a.length&&Oe(()=>{n_(e,o),Zs(i.a)})}function n_(t,e){if(t.l.s)for(let i of t.l.s)n(i);e()}function Gd(t,e,i){if(t==null)return e(void 0),i&&i(void 0),_t;let o=It(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var Hl=[];function Rr(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=_t){let i=null,o=new Set;function r(d){if(xl(t,d)&&(t=d,i)){let s=!Hl.length;for(let u of o)u[1](),Hl.push(u,t);if(s){for(let u=0;u<Hl.length;u+=2)Hl[u][0](Hl[u+1]);Hl.length=0}}}function a(d){r(d(t))}function l(d,s=_t){let u=[d,s];return o.add(u),o.size===1&&(i=e(r,a)||_t),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:r,update:a,subscribe:l}}function mi(t,e,i){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Rr(i,(l,d)=>{let s=!1,u=[],f=0,p=_t,v=()=>{if(f)return;p();let y=e(o?u[0]:u,l,d);a?l(y):p=typeof y=="function"?y:_t},$=r.map((y,g)=>Gd(y,w=>{u[g]=w,f&=~(1<<g),s&&v()},()=>{f|=1<<g}));return s=!0,v(),function(){Zs($),p(),s=!1}})}function ge(t){let e;return Gd(t,i=>e=i)(),e}var Du=!1,Ff=Symbol();function x(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:vs(void 0),unsubscribe:_t};if(o.store!==t&&!(Ff in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=_t;else{var r=!0;o.unsubscribe=Gd(t,l=>{r?o.source.v=l:O(o.source,l)}),r=!1}return t&&Ff in i?ge(t):n(o.source)}function Re(){let t={};function e(){Vo(()=>{for(var i in t)t[i].unsubscribe();vo(t,Ff,{enumerable:!1,value:!0})})}return[t,e]}function Hf(t){var e=Du;try{return Du=!1,[t(),Du]}finally{Du=e}}var G1={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Pe&&Gg(`${t.name}.${String(e)}`),!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Mn(t,e,i){return new Proxy(Pe?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},G1)}var Y1={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(Xs(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];Xs(r)&&(r=r());let a=Xo(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(Xs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let r=Xo(o,e);return r&&!r.configurable&&(r.configurable=!0),r}}},has(t,e){if(e===Zo||e===$l)return!1;for(let i of t.props)if(Xs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props)if(Xs(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 es(...t){return new Proxy({props:t},Y1)}function r_(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function h(t,e,i,o){var q,H;var r=(i&1)!==0,a=!ps||(i&2)!==0,l=(i&8)!==0,d=(i&16)!==0,s=!1,u;l?[u,s]=Hf(()=>t[e]):u=t[e];var f=Zo in t||$l in t,p=l&&((H=(q=Xo(t,e))==null?void 0:q.set)!=null?H:f&&e in t&&(z=>t[e]=z))||void 0,v=o,$=!0,y=!1,g=()=>(y=!0,$&&($=!1,d?v=It(o):v=o),v);u===void 0&&o!==void 0&&(p&&a&&Qg(e),u=g(),p&&p(u));var w;if(a)w=()=>{var z=t[e];return z===void 0?g():($=!0,y=!1,z)};else{var I=(r?Gr:In)(()=>t[e]);I.f|=131072,w=()=>{var z=n(I);return z!==void 0&&(v=void 0),z===void 0?v:z}}if((i&4)===0&&a)return w;if(p){var C=t.$$legacy;return function(z,j){return arguments.length>0?((!a||!j||C||s)&&p(j?w():z),z):w()}}var N=!1,L=!1,E=vs(u),P=Gr(()=>{var z=w(),j=n(E);return N?(N=!1,L=!0,j):(L=!1,E.v=z)});return l&&n(P),r||(P.equals=wl),function(z,j){if(Eu!==null&&(N=L,w(),n(E)),arguments.length>0){let ae=j?n(P):a&&l?ci(z):z;if(!P.equals(ae)){if(N=!0,O(E,ae),y&&v!==void 0&&(v=ae),r_(P))return z;It(()=>n(P))}return z}return r_(P)?P.v:n(P)}}var j1;typeof HTMLElement=="function"&&(j1=class extends HTMLElement{constructor(e,i,o){super();mr(this,"$$ctor");mr(this,"$$s");mr(this,"$$c");mr(this,"$$cn",!1);mr(this,"$$d",{});mr(this,"$$r",!1);mr(this,"$$p_d",{});mr(this,"$$l",{});mr(this,"$$l_u",new Map);mr(this,"$$me");this.$$ctor=e,this.$$s=i,o&&this.attachShadow({mode:"open"})}addEventListener(e,i,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}connectedCallback(){return ht(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return l=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(l,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},r=X1(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]=Uf(l,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=Oh({component:this.$$ctor,target:this.shadowRoot||this,props:jt(Ee({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=Su(()=>{on(()=>{var a;this.$$r=!0;for(let l of Zp(this.$$c)){if(!((a=this.$$p_d[l])!=null&&a.reflect))continue;this.$$d[l]=this.$$c[l];let d=Uf(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]=Uf(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 Zp(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function Uf(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 X1(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var s_="5";var a_,l_,d_;typeof window!="undefined"&&((d_=(l_=(a_=window.__svelte)!=null?a_:window.__svelte={}).v)!=null?d_:l_.v=new Set).add(s_);var ld=require("@vkontakte/videoplayer-core/es2015"),SJ=require("@vkontakte/videoplayer-core/es2015"),ul=require("@vkontakte/videoplayer-shared/es2015"),_$=require("@vkontakte/videoplayer-statistics/es2015");var Oa=require("@vkontakte/videoplayer-shared/es2015");var Z1={isMobile:void 0,disableInvisibleComponentsTimeout:500,debugLog:!1,devNullLog:!1,defaultLanguage:Oa.InterfaceLanguage.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:Oa.VideoQuality.Q_480P,highQualityLimit:Oa.VideoQuality.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"},c_=t=>(0,Oa.fillWithDefault)(t,Z1),u_=t=>Tl("ui-config",t),Rt=()=>Cl("ui-config");var Yd="vk_player_debug_panel_opened";var p_="videoplayer",f_="videoplayer";var hs={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},m_=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),v_=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),g_=new Set(["ShiftRight","ShiftLeft"]);var h_=["TIMELINE"],jd=[...h_,"GRAPH_BUTTON"],zf=[...h_,"PLAY_BUTTON"],Xd=[...jd,"PLAY_BUTTON"];var ts=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(ts||{}),Zd={xs:0,s:1,m:2,l:3,xl:4};var Jd=require("@vkontakte/videoplayer-shared/es2015"),__=require("@vkontakte/videoplayer-core/es2015"),b_=require("@vkontakte/videoplayer-statistics/es2015");var Bu="prod",Ba="1.1.80-dev.0c91b20c.0";var Fa=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var $_=Symbol("storeContext"),y_=Symbol("microStoresContext"),x_=(t,e)=>{Tl($_,t),Tl(y_,e),Bu==="dev"&&(window.app={store:t,microStores:e})},ve=()=>{let t=Cl($_);return(0,Jd.assertNonNullable)(t,"Store context is empty!"),t},Co=()=>{let t=Cl(y_);return(0,Jd.assertNonNullable)(t,"MicroStores context is empty!"),t},ai=(t,e)=>Hu(t,t.getValue(),e),Hu=(t,e,i)=>Rr(e,o=>{let r=t.subscribe(a=>{o(a),i==null||i(a)});return()=>r.unsubscribe()}),w_=(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=`${Ba} (core: ${__.VERSION}, stat: ${b_.VERSION}, shared: ${Jd.VERSION})`,p=ge(i.state.errorLog$),v=p.length?`
45
+ `+p.map((pe,re)=>{var Ne;let _e=`${re}) Type: ${pe.id}
46
+ `,$e=`Message: ${pe.message} (${pe.thrown})
47
+ `,ee=`Trace: ${(Ne=pe.thrown)==null?void 0:Ne.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(),g=t.info.currentAudioStream$.getValue(),w=[];y&&w.push(`Video: ${(ae=y==null?void 0:y.codec)!=null?ae:""}`+(y!=null&&y.hdr?" (HDR)":"")),g&&w.push(`Audio: ${(X=g==null?void 0:g.codec)!=null?X:""}`+(g!=null&&g.language?` (${g.language})`:""));let I=r.currentQuality$.getValue(),C="";if(I){let pe=r.availableQualitiesFps$.getValue()[I];C=pe?`${pe}fps`:""}let N=r.httpConnectionType$.getValue(),L=(J=(ne=r.currentBuffer$.getValue())==null?void 0:ne.end)!=null?J:0,E=Math.max(L-ge(i.state.positionExact$),0),P={Version:f,Browser:navigator.userAgent,Config:t.experimental.tuningConfigName$.getValue().join(", "),"United video id":String(i.videoId),TraceId:o,VSID:ge(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":N?N+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${d}Kbps @ ${s}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:w.join(", "),Quality:`${u} ${I!=null?I:""} ${C}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:$,Position:`${ge(i.state.positionExact$)}s`,Buffer:`${E}s`,State:`${ge(i.playerPhase)} ${(we=r.playbackState$.getValue())!=null?we:""}`,"Player size":`${a}x${l}`,URL:window.location.href,Errors:v};return Object.entries(P).filter(([pe,re])=>re!==void 0).map(([pe,re])=>`${pe}: ${re}`).join(`
50
+ `)},S_=(t,e,i)=>{var H,z,j,ae;let o=t.info,{width:r,height:a}=ge(i.ui.playerSize),l={version:Ba,viewport:`${r}x${a}`,volume:Math.round(ge(i.state.volume$)*100)};l.id=i.videoId,o.currentFormat$.getValue()&&(l.provider=o.currentFormat$.getValue()),o.hostname$.getValue()&&(l.cdn=o.hostname$.getValue());let u=o.intrinsicVideoSize$.getValue();u&&(l.videoSize=`${u.width}x${u.height}`);let f=o.currentBuffer$.getValue(),p=o.currentNativeBuffer$.getValue(),v=o.isLive$.getValue(),$=o.liveBufferTime$.getValue();f&&p&&(v&&$?(l.buffer=f.end-$,l.nativeBuffer=p.end-$):(l.buffer=Math.max(f.end-ge(i.state.positionExact$),0),l.nativeBuffer=Math.max(p.end-ge(i.state.positionExact$),0))),l.position=ge(i.state.positionExact$);let y=o.throughputEstimation$.getValue();y&&(l.speed=y);let g=o.videoBitrate$.getValue();g&&(l.bitrate=g);let w=o.liveLatency$.getValue();w&&(l.liveLatency=w);let I=o.currentVideoSegmentLength$.getValue();I&&(l.currentVideoSegmentLength=I);let C=o.currentAudioSegmentLength$.getValue();C&&(l.currentAudioSegmentLength=C);let N=ge(i.vsid);typeof N=="string"&&(l.vsid=N);let L=(H=t.info.currentVideoStream$.getValue())==null?void 0:H.codec;L&&(l.videoCodec=L);let E=(z=t.info.currentAudioStream$.getValue())==null?void 0:z.codec;E&&(l.audioCodec=E),((j=t.info.currentVideoStream$.getValue())==null?void 0:j.hdr)&&(l.hdr=!0);let q=(ae=t.info.currentAudioStream$.getValue())==null?void 0:ae.language;return q&&(l.audioLanguage=q),l},C_=(t,e)=>Fa(t,e,"mp4"),T_=t=>!t.type,I_=t=>!!t.type,E_=()=>{let e=[],i=0;return{add:(o,r)=>{e[i]=[o,r],i=(i+1)%10},find:o=>e.find(([r])=>r===o)}},Fu=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}download(e){return ht(this,null,function*(){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=yield fetch(e,{signal:this.destroyController.signal});if(i.ok)return yield i.text();throw i}finally{this.pendingDownloads.delete(e)}})}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};var vi=require("@vkontakte/videoplayer-shared/es2015"),YV=require("@vkontakte/videoplayer-core/es2015");var J1="vk_player_",P_="vk_player_prefer_traffic_saving_enabled",k_="vk_player_preferred_volume",A_="vk_player_prefer_volume_mute",Qf="vk_player_preferred_quality",Wf="vk_player_preferred_default_quality_settings",Kf="vk_player_preferred_quality_settings_by_video",L_="vk_player_preferred_stream_language",M_="vk_player_preferred_rate",V_="vk_player_preferred_autoplay_next",qf="vk_player_preferred_subtitles_language",R_="vk_player_user_video_prefs",N_=`${J1}preview_track_close_tooltip`,O_=t=>t>1?1:t<0?0:t,Gf=t=>vi.safeStorage.set(k_,O_(t).toString(10)),Uu=()=>{let t=vi.safeStorage.get(k_);return(0,vi.isNullable)(t)?void 0:O_(parseFloat(t))},Yf=(t,e)=>vi.safeStorage.set(Qf,JSON.stringify({videoId:t,value:e})),zu=()=>vi.safeStorage.remove(Qf),jf=t=>{let e=vi.safeStorage.get(Qf);if((0,vi.isNullable)(e))return;let{videoId:i,value:o}=JSON.parse(e);if(t!==i){zu();return}return o},D_=(t,e)=>{e?vi.safeStorage.set(t,"true"):vi.safeStorage.remove(t)},Xf=t=>vi.safeStorage.get(t)==="true",Zf=t=>D_(A_,t),B_=()=>Xf(A_),ec=t=>D_(P_,t),Jf=()=>Xf(P_),F_=()=>vi.safeStorage.get(L_),em=t=>vi.safeStorage.set(L_,t),tm=()=>vi.safeStorage.get(qf),im=t=>{t?vi.safeStorage.set(qf,t):vi.safeStorage.remove(qf)},H_=t=>vi.safeStorage.set(M_,JSON.stringify({rate:t})),U_=()=>{let t=vi.safeStorage.get(M_);if((0,vi.isNullable)(t))return;let{rate:e}=JSON.parse(t);return e},z_=t=>{vi.safeStorage.set(V_,String(t))},W_=()=>Xf(V_),ey=()=>{let t=f=>{vi.safeStorage.set(Wf,JSON.stringify(f))},e=()=>{try{let f=vi.safeStorage.get(Wf);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=vi.safeStorage.get(Kf);return f?JSON.parse(f):null}catch(f){return null}},o=f=>{vi.safeStorage.set(Kf,JSON.stringify(f))},r=f=>{u(f);let p=f?i():null;if(p&&(p==null?void 0:p.videoId)===f)return jt(Ee({},p),{appliesTo:"to-video"});p&&a();let v=e();return v?jt(Ee({},v),{appliesTo:"as-default"}):(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{vi.safeStorage.remove(Kf)},l=()=>{vi.safeStorage.remove(Wf)},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":ec(!0);break;case"exact_quality":Yf(f,p.quality)}a(),l()}},u=f=>{let p=jf(f);if(p){o({type:"exact_quality",videoId:f,quality:p});return}Jf()&&t({type:"traffic_saving",videoId:f}),ec(!1),zu()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:s,savePreferredQualitySettings:d,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:tm,savePreferredSubtitlesLanguage:im}},{getPreferredQualitySettings:K_,migrateSettingsToLegacyWay:q_,savePreferredQualitySettings:Wu,savePreferredDefaultQualitySettings:jV,removePreferredQualitySettingsByVideo:XV,getPreferredDefaultQualitySettings:Ku}=ey(),ty=3,iy=3,Q_=()=>{let t=vi.safeStorage.get(R_);if(t)try{return JSON.parse(t)}catch(e){return null}return null},qu=(t,e)=>{var r,a;let i=Q_();return(a=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?a:null},om=(t,e,i)=>{var l,d,s;let o=(l=Q_())!=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=oy(o);vi.safeStorage.set(R_,JSON.stringify(a))};function oy(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(iy),e.reduce((o,[r])=>(o[r]=ny(t[r]),o),{})}function ny(t){let e=Object.entries(t);return e.sort(([,i],[,o])=>i.updatedTs>o.updatedTs?-1:1),e.splice(ty),Object.fromEntries(e)}function G_(){vi.safeStorage.set(N_,JSON.stringify(!0))}function Y_(){let t=vi.safeStorage.get(N_);try{return t?JSON.parse(t):!1}catch(e){return!1}}var ig=require("@vkontakte/videoplayer-core/es2015");Jg();var oa="var(--btn-color, #fff)";var ry=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),sy=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 Je(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,oa),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${o()}`;var l=sy(),d=T(l);{var s=p=>{var v=ry(),$=ce(v),y=T($);si(y,()=>e.children),S($),ui(),b(p,v)},u=p=>{var v=Le(),$=ce(v);si($,()=>e.children),b(p,v)};R(d,p=>{e.shadow?p(s):p(u,!1)})}S(l),D(()=>{Me(l,"aria-label",e.ariaLabel),Me(l,"aria-hidden",!e.ariaLabel),Me(l,"width",i()),Me(l,"height",o()),Me(l,"viewBox",a),Me(l,"fill",r()),Qe(l,e.style),Me(l,"data-testid",e.testId)}),b(t,l),F()}var Ul=require("@vkontakte/videoplayer-shared/es2015");var ay={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
51
51
  качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
52
- попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},Y_=s1;var a1={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:"Выйти из режима точной перемотки"},j_=ay;var ly={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
53
53
  so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
54
- Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},j_=a1;var Vs=new Map;Vs.set(Ul.InterfaceLanguage.EN,j_);Vs.set(Ul.InterfaceLanguage.RU,Y_);var X_=new Map,om=({language:t,pack:e,fallback:i})=>{if(Vs.has(t)){let o=Vs.get(t);Vs.set(t,Ie(Ie({},o),e))}else Vs.set(t,e);X_.set(t,i)},nm=t=>Vs.has(t),rm=(t,e,i,o)=>{var l;let r=Vs.get(t),a=r==null?void 0:r[e];if((0,Ul.isNullable)(a)){let d=(l=X_.get(t))!=null?l:o,s=d?Vs.get(d):void 0;a=s==null?void 0:s[e]}return(0,Ul.isNullable)(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=Nt();return rm(o,t,e,r.defaultLanguage)};var l1=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 ec(t,e){B(e,!1);let i=G("video360");Co(),Ze(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=l1();b(o,a)},$$slots:{default:!0}}),F()}var T8=require("@vkontakte/videoplayer-core/es2015");var zl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(zl||(zl={}));var d1=/^\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,u1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,qu="?",p1="X-Sentry-Auth",f1=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function m1(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=d1.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||qu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=u1.exec(i[a]))r={filename:o[2],function:o[1]||qu,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]||qu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=qu),e.push(r)}return e.length?{value:Z_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function Z_(t){return(t&&t.message||"No error message").split(`
56
- `).filter(i=>!!i)[0]}function v1(t){try{let e=m1(t);if(e)return e}catch(e){}return{value:Z_(t),type:t&&t.name,stacktrace:{frames:[]}}}function g1(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Qu=class{constructor(e){if(e&&e.dsn){let i=f1.exec(e.dsn),o=i?i.slice(1):[],r=o[5].split("/"),a=r.slice(0,-1).join("/");this.apiUrl=o[0]+"://"+o[3]+(o[4]?":"+o[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/store/",this.authHeader="Sentry sentry_version=7,sentry_key="+o[1]+(o[2]?",sentry_secret="+o[2]:"")}this.environment=e&&e.environment}prepare(e){return jt(Ie({},this.getRequestBlank()),{exception:{values:[v1(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(p1,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:g1(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function J_(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function h1(){return window}var Gu=class t extends Qu{constructor(e,i=h1()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",Ie({},e)),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",Ie({},e)),this}setUser(e){return this.setKeyState("user",Ie({},e)),this}clone(){let e=new t(jt(Ie({},this.options),{plugins:[]}));return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[Ie({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(jt(Ie({},this.getRequestBlank()),{message:e,level:i}))}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>J_(i,o))):!1}getRequestBlank(){return Ie(jt(Ie({request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}}},super.getRequestBlank()),{sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"}}),this.state)}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend(Ie({release:this.release},e))),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>J_(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 jt(Ie({},i),{[o]:a||d?[...a||[],...d||[]]:Ie(Ie({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};var Ua=require("@vkontakte/videoplayer-shared/es2015");var Yu=null,za=class{constructor(e,i,o={}){!Yu&&e.dsn&&(this.sentryClient=new Gu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new Ua.Subscription,this.options=e,this.context=o,Yu=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),Yu=null}logIError(e,i=!1){e.thrown&&this.report(e.thrown,{fatal:i,errorType:e.id,category:e.category},{message:e.message,errorData:e.data})}report(e,i={},o={}){let{sentryClient:r,context:a,options:l}=this,{sampleRate:d=0,whiteErrorIdList:s,whiteErrorCategoryList:u=[],blackErrorIdList:v,blackErrorCategoryList:p}=l,{errorType:f,category:$}=i;if((0,Ua.isNonNullable)($)&&p.includes($)||(0,Ua.isNonNullable)(f)&&v.includes(f))return;if(Math.random()<=d||(0,Ua.isNonNullable)($)&&u.includes($)||(0,Ua.isNonNullable)(f)&&s.includes(f)){Object.keys(i).length&&r.setTags(Ie({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ie(Ie({},a),o));try{f&&r.captureMessage(f,i.fatal?zl.fatal:zl.error),r.report(e)}catch(g){console.error(g)}}}static getInstance(){return Yu}};var is=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(is||{});var ju=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()},Xu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),eb=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,tb=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},tc=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},la=()=>!!tc(),Zu=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},Ju=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},ib=t=>{let e=window.screen;return(r=>ht(null,null,function*(){return e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject()}))(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};var sm=require("@vkontakte/videoplayer-core/es2015"),ob=()=>({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:sm.clientChecker.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:sm.clientChecker.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});var Wl=require("@vkontakte/videoplayer-shared/es2015");var Wa=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:(0,Wl.debounceFn)(this.onResize.bind(this),300)};this.info={isActive$:new Wl.ValueSubject(!1),isEnabled$:new Wl.ValueSubject(!1),type:0};this.info.isEnabled$=new Wl.ValueSubject(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return ht(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return ht(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return ht(this,null,function*(){!this.isSupported()||!this.isActive()||(yield document.exitPictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Ie({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return ht(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Ka(t){return t instanceof Wa}var Kl=require("@vkontakte/videoplayer-shared/es2015");function lm(t,e){B(e,!1);let i=ve();Rt(()=>{i.getAdmanWrapper().startPostroll()}),Co(),F()}var nb=require("@vkontakte/videoplayer-shared/es2015");var _1=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>'),b1=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 Or(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let v="";return n(a)&&(v+="transform: rotate(180deg);"),v.length?v:void 0})()),s=m(()=>o()?aa:"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:(v,p)=>{var f=Le(),$=de(f);{var y=w=>{var T=_1();b(w,T)},g=w=>{var T=b1();b(w,T)};R($,w=>{n(r)?w(y):w(g,!1)})}b(v,f)},$$slots:{default:!0}}),F()}var $1=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},y1=M('<div class="skip s-1i"> <!></div>'),x1=M("<div><!></div>"),w1={hash:"s-1i",code:".container.s-1i{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1i{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1i{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1i{color:var(--white);cursor:pointer}.skippable.s-1i:hover{color:hsla(0,0%,100%,.75)}"};function dm(t,e){B(e,!0),q(t,w1);let[i,o]=Re(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,nb.noop),u=ve().ui.isMobile,v=m(()=>a()>0&&a()>=l());var p=x1();let f;p.__click=[$1,v,d];var $=C(p);{var y=w=>{var T=y1(),I=C(T),N=L(I);Or(N,{direction:"right"}),S(T),D(k=>me(I,`${k!=null?k:""} `),[()=>G("skip_ads_now")]),b(w,T)},g=w=>{var T=fs();D(I=>me(T,I),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(w,T)};R($,w=>{n(v)?w(y):w(g,!1)})}S(p),D(w=>f=se(p,1,"container s-1i",null,f,w),[()=>({"container-mobile":r(),skippable:n(v)})]),b(t,p),F(),o()}Je(["click"]);var S1=M('<button class="go-to-site s-1h"> </button>'),T1={hash:"s-1h",code:"button.go-to-site.s-1h{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function cm(t,e){B(e,!1),q(t,T1),Co();var i=S1(),o=C(i,!0);S(i),D(r=>me(o,r),[()=>G("visit_advertiser")],Sn),b(t,i),F()}var C1=M('<div class="top-gradient-mobile s-l"></div>'),I1=M('<div class="container s-l"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),E1={hash:"s-l",code:".container.s-l{height:100%;width:100%}.top-gradient-mobile.s-l{background:linear-gradient(1turn,transparent,rgba(0,0,0,.05) 12%,rgba(0,0,0,.15) 25%,rgba(0,0,0,.3) 45%,rgba(0,0,0,.4) 57%,rgba(0,0,0,.5) 77%,rgba(0,0,0,.55) 88%,rgba(0,0,0,.65));height:80px;left:0;pointer-events:none;position:absolute;top:0;width:100%}"};function oc(t,e){B(e,!0),q(t,E1);let[i,o]=Re(),r=()=>x(H,"$canSkipAd",i),a=()=>x(Q,"$adPlaybackState",i),l=()=>x(I,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(Y,"$secondsToWatchBeforeSkipAd",i),u=()=>x(T,"$isVideoEnded",i),v=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),f=h(e,"adsAutoplayParam",3,void 0),$=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),g=ve(),w=Nt(),T=g.state.isEnded$,I=g.ui.isMobile,N=w.ads.isMobileGoToSiteButton,k=W(void 0),E=W(void 0),A=!1,Q=g.ads.playbackState,H=g.ads.canSkip,z=g.ads.position,Y=g.ads.secondsToWatchBeforeSkip,le=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);Rt(()=>{let P=g.getAdmanWrapper();if(Kl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[(0,Kl.now)(),v()]}),!v()){P.onAdmanLoadingError();return}let Ke=()=>{var ke;let{width:De,height:Be}=ge(g.ui.playerSize),ot=ge(g.ui.isFullscreen),U=(ke=f())!=null?ke:ge(g.ui.isAutoplay),Ae=w.ads.paramsOverride;return{width:De,height:Be,isFullscreen:ot,isAutoplay:U,adsContainer:n(k),adsVideoElement:n(E),slotId:v(),params:p(),paramsOverride:Ae,duration:$(),externalApi:y()}},Te=De=>ht(null,null,function*(){De&&(yield yo());let Be=Ke();yield P.initAdman(Be),A=!0}),j=new AbortController,ie=()=>{j.abort()};return window.AdmanHTML?Te(!0).catch(()=>{P.onAdmanLoadingError()}):P.loadAdman(j.signal).then(()=>Te(!1)).catch(()=>{P.onAdmanLoadingError()}),()=>{Kl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[(0,Kl.now)(),v()]}),!A&&ie()}});var re=I1(),Z=C(re);{var we=P=>{var Ke=C1();b(P,Ke)};R(Z,P=>{l()&&P(we)})}var ue=L(Z,2);Xe(ue,P=>O(E,P),()=>n(E));var ne=L(ue,2);{var _e=P=>{dm(P,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return g.actions.internal.skipAd}})};R(ne,P=>{n(le)&&P(_e)})}var xe=L(ne,2);{var J=P=>{lm(P,{})};R(xe,P=>{u()&&P(J)})}var Ne=L(xe,2);{var pe=P=>{cm(P,{})};R(Ne,P=>{n(X)&&P(pe)})}S(re),Xe(re,P=>O(k,P),()=>n(k)),b(t,re),F(),o()}var rn=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>'),P1=Ce("<path></path><!>",1);function nc(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=P1(),u=de(s),v=L(u);{var p=f=>{var $=k1();Ve($,"d",a),b(f,$)};R(v,f=>{i()&&f(p)})}D(()=>Ve(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),b(l,s)},$$slots:{default:!0}})}var A1=M('<div class="equalizer s-d"><div class="col s-d"></div> <div class="col s-d"></div> <div class="col s-d"></div></div>'),L1=M('<div class="live-icon s-d"><!></div>'),M1=M('<span class="text s-d"> </span>'),V1=M("<div><!> <!></div>"),R1={hash:"s-d",code:".wrapper.s-d{background-color:var(--black-alpha-40);border-radius:4px;padding:2px 6px;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);white-space:nowrap}.wrapper.live.s-d{background:var(--red);border-radius:2px;font-size:0;height:20px;line-height:20px;padding:0 7px}.equalizer.s-d{display:inline-block;height:10px;margin-right:4px;margin-top:-4px;position:relative;vertical-align:middle;width:10px}.live.s-d .equalizer:where(.s-d){margin-top:-2px}.equalizer.s-d .col:where(.s-d){animation:1.5s linear infinite alternate;animation-play-state:paused;background:var(--btn-color,--white);bottom:0;height:10px;margin-right:2px;position:absolute;transform-origin:50% 100%;width:2px}.playing.s-d .equalizer:where(.s-d) .col:where(.s-d){animation-play-state:running}.equalizer.s-d .col:where(.s-d):first-child{animation-name:s-d-thumb-timer-equalizer-col1;left:0}.equalizer.s-d .col:where(.s-d):nth-child(2){animation-name:s-d-thumb-timer-equalizer-col2;left:3px}.equalizer.s-d .col:where(.s-d):nth-child(3){animation-name:s-d-thumb-timer-equalizer-col3;left:6px}.live-icon.s-d{display:inline-block;height:20px;margin:0 -7px;vertical-align:middle;width:42px}@keyframes s-d-thumb-timer-equalizer-col1{0%{transform:scaleY(.1)}25%{transform:scaleY(.8)}50%{transform:scaleY(.4)}75%{transform:scaleY(.6)}to{transform:scaleY(.1)}}@keyframes s-d-thumb-timer-equalizer-col2{0%{transform:scaleY(1)}25%{transform:scaleY(.3)}50%{transform:scaleY(.9)}75%{transform:scaleY(.6)}to{transform:scaleY(1)}}@keyframes s-d-thumb-timer-equalizer-col3{0%{transform:scaleY(.6)}25%{transform:scaleY(.9)}50%{transform:scaleY(.1)}75%{transform:scaleY(.9)}to{transform:scaleY(.6)}}.text.s-d{color:var(--controls-time);font-size:13px;font-weight:500;line-height:16px}"};function rc(t,e){q(t,R1);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=V1();let l;var d=C(a);{var s=f=>{var $=A1();b(f,$)};R(d,f=>{i()&&f(s)})}var u=L(d,2);{var v=f=>{var $=L1(),y=C($);nc(y,{isActive:!0}),S($),b(f,$)},p=f=>{var $=M1(),y=C($,!0);S($),D(()=>me(y,e.time)),b(f,$)};R(u,f=>{o()?f(v):f(p,!1)})}S(a),D(f=>l=se(a,1,"wrapper s-d",null,l,f),[()=>({live:o(),playing:r()})]),b(t,a)}var ql=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var N1=M('<div role="timer" data-testid="thumb-timer"><!></div>'),O1={hash:"s-o",code:".thumb-timer.s-o{bottom:0;margin:8px;position:absolute;right:0;transition:visibility var(--controls-transition-duration),opacity var(--controls-transition-duration);z-index:var(--thumb-timer-z-index)}"};function sc(t,e){B(e,!0),q(t,O1);let[i,o]=Re(),r=()=>x(v,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Nt(),u=m(()=>rn(e.duration-e.position)),v=ae(!1);var p=N1();let f;var $=C(p);rc($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ls(p,()=>ql(a()&&s.features.usePerformanceFix,v,s.disableInvisibleComponentsTimeout)),D(y=>f=se(p,1,"thumb-timer s-o",null,f,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Ql=t=>{if(!navigator.clipboard){rb(t);return}navigator.clipboard.writeText(t).catch(()=>rb(t))};function rb(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)}}}var mb=require("@vkontakte/videoplayer-core/es2015");var pm=require("@vkontakte/videoplayer-core/es2015");var um="focus-hidden";var Dr=t=>{t.stopPropagation(),t.preventDefault()},fm=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(um)},B1=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},F1=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},H1=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},U1=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},sb=t=>t.code==="Escape",z1=t=>t.code==="ArrowLeft",ac=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},ab=t=>{H1(t)?(Dr(t),F1(t.target)):U1(t)&&(Dr(t),B1(t.target))},ua=t=>!pm.clientChecker.device.isAndroid&&(t==null?void 0:t.detail)===0||pm.clientChecker.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Gl=(t,e,i)=>ht(null,null,function*(){yield yo(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield yo(),i.set(!1),t.focus())}),lb=(t,e,i)=>ht(null,null,function*(){yield yo(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),lc=(t,e,i,o=!1)=>ht(null,null,function*(){if(yield yo(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(um,!i),a==null||a.focus()}}),db=(t,e)=>ht(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),ep=(t,e)=>{ab(t),fm(t.target),sb(t)&&(Dr(t),e())},tp=(t,e)=>ht(null,null,function*(){ac(t,["ArrowRight"])&&(Dr(t),e())}),cb=(t,e,i)=>ht(null,null,function*(){if(ab(t),z1(t)){Dr(t),e();return}sb(t)&&(Dr(t),i())}),Yl=(t,e)=>{ac(t)&&(Dr(t),e())},ub=(t,e,i)=>{if(ac(t))Dr(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Dr(t);return}o==="ArrowRight"&&!e&&(i(!0),Dr(t))}},pb=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},fb=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}};var Ga=require("@vkontakte/videoplayer-shared/es2015");var os={"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};var mm=require("@vkontakte/videoplayer-shared/es2015");var K1=(t,e)=>{Yl(t,()=>e())},q1=M('<li class="item s-1l" role="menuitem" tabindex="0"> </li>'),Q1={hash:"s-1l",code:".item.s-1l{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1l:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function vm(t,e){B(e,!0),q(t,Q1);let i=h(e,"onClick",3,mm.noop),o=h(e,"closeContextMenu",3,mm.noop),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=q1();a.__click=r,a.__keydown=[K1,r];var l=C(a,!0);S(a),D(()=>{var d;Ve(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Ve(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}Je(["click","keydown"]);var Qa=(t,e)=>t.weight-e.weight;var jl=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(jl||{});var G1=(t,e)=>{ep(t,e)},Y1=t=>{t.preventDefault()},j1=M('<ul role="menu" class="s-q"></ul>'),X1={hash:"s-q",code:"ul.s-q{background:rgba(0,0,0,.72);border-radius:8px;list-style:none;margin:0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;padding:6px 0;position:absolute;transition:visibility .1s,opacity .1s;z-index:var(--context-menu-z-index)}"};function gm(t,e){B(e,!0),q(t,X1);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(le,"$isLive$",i),l=()=>x(ue,"$isPiPEnabled$",i),d=()=>x(Y,"$chromecastState$",i),s=()=>x(ne,"$pictureInPictureApiIsActive$",i),u=()=>x(Z,"$isLooped$",i),v=()=>x(X,"$positionExact$",i),p=()=>x(Q,"$additionalContextMenuItems$",i),f=h(e,"visible",3,!1),$=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),g=h(e,"menuElementRef",15,void 0),w=W(0),T=W(0),I=ve(),{pictureInPicture$:N}=Io(),k=Nt(),E=I.ui.contextMenu.visible$,A=I.ui.debugPanelVisible,Q=I.ui.additionalContextMenuItems$,H=I.ui.t,z=I.actions.internal.togglePictureInPicture,Y=I.state.chromecastState$,le=I.state.isLive$,X=I.state.positionExact$,re=I.state.isInteractive,Z=I.state.looped$,we=I.playerPhase,{isEnabled$:ue,isActive$:ne}=N,_e=m(()=>r()==="video"),xe=m(()=>!!a()&&n(_e)),J=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=m(()=>{var ce;return k.features.copyVideoLink&&((ce=I.callbacks)==null?void 0:ce.onCopyVideoLink)}),pe=m(()=>n(Ne)&&!n(J)&&!re&&!n(xe)),P=m(()=>{var ce;return!!((ce=I.callbacks)!=null&&ce.onCopyEmbedCodeClicked)}),Ke=m(()=>l()&&d()!==mb.ChromecastState.CONNECTED&&!re&&n(_e)),Te=m(()=>!re&&!n(J)&&!n(xe)),j=m(()=>k.features.videoRotate&&!re&&!n(J)),ie=m(()=>k.showSupport&&!s()),De=m(()=>k.features.saveTraceInfoToFile),Be=()=>{var ce;E.set(!1),(ce=e.returnFocus)==null||ce.call(e)},ot=(ce,We)=>{if(!g()||!y())return;let Ye=g().getBoundingClientRect(),ct=y().getBoundingClientRect();O(w,ce-ct.left),O(T,We-ct.top),n(w)+Ye.width>ct.width&&O(w,ct.width-Ye.width),n(T)+Ye.height>ct.height&&O(T,ct.height-Ye.height),O(w,Math.max(n(w),0),!0),O(T,Math.max(n(T),0),!0)};Oe(()=>{ht(null,null,function*(){if(g()&&y()){yield yo();let{top:We,left:Ye,bottom:ct,right:Ut}=$(),zt=Ye!=null?Ye:0,si=We!=null?We:0,$i=g().getBoundingClientRect();(0,Ga.isNullable)(Ye)&&!(0,Ga.isNullable)(Ut)&&(zt=Ut-$i.width),(0,Ga.isNullable)(We)&&!(0,Ga.isNullable)(ct)&&(si=ct-$i.height),zt=Math.max(zt,0),si=Math.max(si,0),ot(zt,si)}})});let U=()=>{I.actions.internal.videoRotate()},Ae=()=>{(0,Ga.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),I.actions.internal.reportProblem(),I.actions.internal.pause()},ke=()=>{let ce=I.actions.internal.getDebugTextData();if(k.features.saveDebugInfoToFile){let We=new Blob([...ce],{type:"plain/text"}),Ye=window.URL.createObjectURL(We);Ha(Ye,"vk_player_debug_info","txt")}else Ql(I.actions.internal.getDebugTextData())},ze=()=>{let ce=I.actions.internal.getTraceTextData(),We=new Blob([...ce],{type:"application/json"}),Ye=window.URL.createObjectURL(We);Ha(Ye,"vk_player_trace_info","json")},et=()=>{A.set(!0)},ye=()=>ht(null,null,function*(){var ce;try{z()}finally{(ce=e.returnFocus)==null||ce.call(e)}}),Pe=()=>{I.actions.internal.setLooped(!u())},Fe=()=>{var ce,We;if(n(P)){let Ye=(We=(ce=I.callbacks)==null?void 0:ce.onCopyEmbedCodeClicked)==null?void 0:We.call(ce);Ye&&Ql(Ye)}},Ft=(ce=!1)=>{var We,Ye;if((We=I.callbacks)!=null&&We.onCopyVideoLink){let ct=(Ye=I.callbacks)==null?void 0:Ye.onCopyVideoLink(ce,v());ct&&Ql(ct)}},vt=m(()=>k.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Ht=m(()=>n(Ne)?{id:"copy-link",weight:os["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Ft()}:void 0),dt=m(()=>n(pe)?{id:"copy-link-timestamp",weight:os["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Ft(!0)}:void 0),Ct=m(()=>n(P)?{id:"copy-embed-code",weight:os["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Fe}:void 0),ri=m(()=>n(Ke)?{id:"pip",weight:os.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),Ot=m(()=>n(Te)?{id:"video-loop",weight:os["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:Pe}:void 0),$e=m(()=>n(j)?{id:"rotate",weight:os.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),be=m(()=>n(ie)?{id:"report",weight:os.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Ae}:void 0),ee=m(()=>({id:"save-debug",weight:os["save-debug"],label:n(vt),onClick:ke})),nt=m(()=>n(De)?{id:"save-trace",weight:os["save-trace"],label:H("menu_save_debug"),onClick:ze}:void 0),fe=m(()=>({id:"debug-info",weight:os["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:et})),Me=m(()=>[n(Ht),n(dt),n(Ct),n(ri),n(Ot),n($e),n(be),n(ee),n(nt),n(fe),...p()].filter(ce=>!!ce).sort(Qa));var wt=Le(),Lt=de(wt);{var mt=ce=>{var We=j1();We.__contextmenu=[Y1],We.__keydown=[G1,Be],yi(We,21,()=>n(Me),Ye=>Ye.id,(Ye,ct)=>{vm(Ye,{get id(){return n(ct).id},get label(){return n(ct).label},get ariaLabel(){return n(ct).ariaLabel},get onClick(){return n(ct).onClick},closeContextMenu:Be})}),S(We),Xe(We,Ye=>g(Ye),()=>g()),D(()=>{var Ye,ct;return Qe(We,`top: ${(Ye=n(T))!=null?Ye:""}px; left: ${(ct=n(w))!=null?ct:""}px;`)}),b(ce,We)};R(Lt,ce=>{f()&&ce(mt)})}b(t,wt),F(),o()}Je(["contextmenu","keydown"]);var ip=class{constructor(e){this.value=e,this.next=null}};var Xl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new ip(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 Z1=M('<div class="container s-1g"><canvas class="s-1g"></canvas></div>'),J1={hash:"s-1g",code:".container.s-1g{display:inline-block;height:16px;width:120px}canvas.s-1g{margin-top:2px;transform:scaleY(-1)}"};function dc(t,e){B(e,!0),q(t,J1);let i=h(e,"values",19,()=>[]),o=W(void 0),r=W(null),a=16,l=120,d=60,s=l/d;Rt(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(f,$,y,g,w){w===0&&(w=1),f.fillStyle="#fff",f.fillRect($,y,g,w)}Oe(()=>{let f="";if(n(r)){let $=i()[0];for(let g=1;g<i().length;g++)i()[g]>$&&($=i()[g]);n(r).clearRect(0,0,l,a);let y=d-1;for(let g=i().length-1;g>=0;g--){let w=y*s,T=$>0?a*(i()[g]/$):0;u(n(r),w,0,s,T),f=T+" "+f,y--}}});var v=Z1(),p=C(v);Xe(p,f=>O(o,f),()=>n(o)),S(v),b(t,v),F()}var hm=require("@vkontakte/videoplayer-shared/es2015");var e0=(t,e)=>{t.stopPropagation(),hm.safeStorage.remove(Gd),e.set(!1)},t0=M('<div class="s-k"><div class="s-k">Video id</div> <span> </span></div>'),i0=M('<div class="s-k"><div class="s-k">VSID</div> <span> </span></div>'),o0=M('<div class="s-k"><div class="s-k">Provider</div> <span> </span></div>'),n0=M('<div class="s-k"><div class="s-k">Streams</div> <span> </span></div>'),r0=M('<div class="s-k"><div class="s-k">Viewport</div> <span> </span></div>'),s0=M('<div class="s-k"><div class="s-k">Video size</div> <span> </span></div>'),a0=M('<div class="s-k"><div class="s-k">CDN host</div> <span> </span></div>'),l0=M('<div class="s-k"><div class="s-k">Volume</div> <span> </span></div>'),d0=M('<div class="s-k"><div class="s-k">Position</div> <span> </span></div>'),c0=M('<div class="s-k"><div class="s-k">Buffer</div> <span> </span></div>'),u0=M('<div class="s-k"><div class="s-k">Live latency</div> <span> </span></div>'),p0=M('<div class="s-k"><div class="s-k">Segment</div> <span> </span></div>'),f0=M('<div class="s-k"><div class="s-k">Network</div> <!> <span> </span></div>'),m0=M('<div class="s-k"><div class="s-k">V bitrate</div> <!> <span> </span></div>'),v0=M('<div role="region"><button class="close s-k" title="закрыть">[x]</button> <div class="content s-k"><div class="s-k"><div class="s-k">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-k"><div class="s-k">Dropped</div> <span> </span></div> <!> <!> <div class="s-k"><div class="s-k">FPS</div> <!> <span> </span></div></div></div>'),g0={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 cc(t,e){B(e,!0),q(t,g0);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=W(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),v=W(0),p=W(0),f=W(0),$=new Xl(60),y=new Xl(60),g=new Xl(60),w=W(ci([])),T=W(ci([])),I=W(ci([])),N=G("aria_label_debug_panel");Rt(()=>{hm.safeStorage.set(Gd,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(v,u.getVideoPlaybackQuality().totalVideoFrames,!0));let $e=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),be;return u&&(be=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let ee=u.getVideoPlaybackQuality().totalVideoFrames;O(f,ee-n(v)),O(v,ee,!0),$.push(n(f)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&g.push(n(s).bitrate),O(w,$.getValuesFromBottom(),!0),O(T,y.getValuesFromBottom(),!0),O(I,g.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval($e),be&&clearInterval(be)}});var k=v0();let E;var A=C(k);A.__click=[e0,l];var Q=L(A,2),H=C(Q),z=L(C(H),2),Y=C(z,!0);S(z),S(H);var le=L(H,2);{var X=$e=>{var be=t0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(()=>me(nt,n(s).id)),b($e,be)};R(le,$e=>{n(s).id&&$e(X)})}var re=L(le,2);{var Z=$e=>{var be=i0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(()=>me(nt,n(s).vsid)),b($e,be)};R(re,$e=>{n(s).vsid&&$e(Z)})}var we=L(re,2);{var ue=$e=>{var be=o0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(()=>me(nt,n(s).provider)),b($e,be)};R(we,$e=>{n(s).provider&&$e(ue)})}var ne=L(we,2);{var _e=$e=>{var be=n0(),ee=L(C(be),2),nt=C(ee);S(ee),S(be),D(()=>{var fe,Me;return me(nt,`Video: ${(fe=n(s).videoCodec||"")!=null?fe:""} ${n(s).hdr?"(HDR)":""}
54
+ Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},X_=ly;var Vs=new Map;Vs.set(Ul.InterfaceLanguage.EN,X_);Vs.set(Ul.InterfaceLanguage.RU,j_);var Z_=new Map,nm=({language:t,pack:e,fallback:i})=>{if(Vs.has(t)){let o=Vs.get(t);Vs.set(t,Ee(Ee({},o),e))}else Vs.set(t,e);Z_.set(t,i)},rm=t=>Vs.has(t),sm=(t,e,i,o)=>{var l;let r=Vs.get(t),a=r==null?void 0:r[e];if((0,Ul.isNullable)(a)){let d=(l=Z_.get(t))!=null?l:o,s=d?Vs.get(d):void 0;a=s==null?void 0:s[e]}return(0,Ul.isNullable)(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=Rt();return sm(o,t,e,r.defaultLanguage)};var dy=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 tc(t,e){B(e,!1);let i=G("video360");So(),Je(t,{width:"76",height:"45",get ariaLabel(){return i},testId:"video-360-icon",shadow:!0,children:(o,r)=>{var a=dy();b(o,a)},$$slots:{default:!0}}),F()}var P9=require("@vkontakte/videoplayer-core/es2015");var zl;(function(t){t.fatal="fatal",t.error="error",t.warning="warning",t.log="log",t.info="info",t.debug="debug",t.critical="critical"})(zl||(zl={}));var cy=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,uy=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,py=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qu="?",fy="X-Sentry-Auth",my=/^(?:(\w+):)\/\/(?:([\w-]+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function vy(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=cy.exec(i[a]))r={filename:o[2]&&o[2].indexOf("address at ")===0?o[2].substr(11):o[2],function:o[1]||Qu,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(o=py.exec(i[a]))r={filename:o[2],function:o[1]||Qu,lineno:+o[3],colno:o[4]?+o[4]:null};else if(o=uy.exec(i[a]))a===0&&!o[5]&&t.columnNumber!==void 0&&(e[0].column=t.columnNumber+1),r={filename:o[3],function:o[1]||Qu,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!r.function&&r.lineno&&(r.function=Qu),e.push(r)}return e.length?{value:J_(t),type:t.name,stacktrace:{frames:e.reverse()}}:null}function J_(t){return(t&&t.message||"No error message").split(`
56
+ `).filter(i=>!!i)[0]}function gy(t){try{let e=vy(t);if(e)return e}catch(e){}return{value:J_(t),type:t&&t.name,stacktrace:{frames:[]}}}function hy(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Gu=class{constructor(e){if(e&&e.dsn){let i=my.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 jt(Ee({},this.getRequestBlank()),{exception:{values:[gy(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(fy,this.authHeader||""),i.send(JSON.stringify(e))}getRequestBlank(){return{platform:"javascript",event_id:hy(),sdk:{name:"micro-sentry.javascript.core",version:"0.0.0"},timestamp:Date.now()/1e3,environment:this.environment}}};function eb(t,e){return Object.prototype.toString.call(e)==="[object RegExp]"?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1}function _y(){return window}var Yu=class t extends Gu{constructor(e,i=_y()){super(e),this.options=e,this.window=i,this.destroyed=!1,this._state={};let{plugins:o=[],beforeSend:r=u=>u,beforeBreadcrumb:a=u=>u,blacklistUrls:l=[],ignoreErrors:d=[],release:s=void 0}=this.options||{};this.plugins=o.map(u=>new u(this)),this.beforeSend=r,this.beforeBreadcrumb=a,this.blacklistUrls=l,this.ignoreErrors=d,this.release=s}get state(){return this._state}clearState(){this._state={}}setTags(e){return this.setKeyState("tags",Ee({},e)),this}setTag(e,i){return this.extendState({tags:{[e]:i}}),this}setExtra(e,i){return this.extendState({extra:{[e]:i}}),this}setExtras(e){return this.setKeyState("extra",Ee({},e)),this}setUser(e){return this.setKeyState("user",Ee({},e)),this}clone(){let e=new t(jt(Ee({},this.options),{plugins:[]}));return e.extendState(this.state),e}withScope(e){let i=this.clone();e(i),i.destroy(),this.setBreadcrumbs(void 0)}addBreadcrumb(e){this.extendState({breadcrumbs:[Ee({timestamp:Date.now()/1e3},this.beforeBreadcrumb(e))]})}setBreadcrumbs(e){this.setKeyState("breadcrumbs",e)}captureMessage(e,i){this.send(jt(Ee({},this.getRequestBlank()),{message:e,level:i}))}destroy(){this.destroyed=!0,this.plugins.forEach(e=>{e.destroy&&e.destroy()})}isIgnoredError(e){return this.ignoreErrors.length?this.getPossibleEventMessages(e).some(i=>this.ignoreErrors.some(o=>eb(i,o))):!1}getRequestBlank(){return Ee(jt(Ee({request:{url:this.window.location.toString(),headers:{"User-Agent":this.window.navigator.userAgent}}},super.getRequestBlank()),{sdk:{name:"micro-sentry.javascript.browser",version:"0.0.0"}}),this.state)}send(e){this.destroyed||this.isDeniedUrl(e)||this.isIgnoredError(e)||(super.send(this.beforeSend(Ee({release:this.release},e))),this.setBreadcrumbs(void 0))}getPossibleEventMessages(e){if(e.message)return[e.message];if(e.exception)try{let{type:i="",value:o=""}=e.exception.values&&e.exception.values[0]||{};return[`${o}`,`${i}: ${o}`]}catch(i){return[]}return[]}isDeniedUrl(e){if(!this.blacklistUrls.length)return!1;let i=this.getEventFilterUrl(e);return i?this.blacklistUrls.some(o=>eb(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 jt(Ee({},i),{[o]:a||d?[...a||[],...d||[]]:Ee(Ee({},typeof r!="string"?r:{}),typeof l!="string"?l:{})})},this._state)}setKeyState(e,i){this._state[e]=i}};var Ha=require("@vkontakte/videoplayer-shared/es2015");var ju=null,Ua=class{constructor(e,i,o={}){!ju&&e.dsn&&(this.sentryClient=new Yu({dsn:e.dsn,environment:i.env}),this.version=i.version,this.sentrySubscription=new Ha.Subscription,this.options=e,this.context=o,ju=this)}destroy(){var e,i;(e=this.sentryClient)==null||e.destroy(),(i=this.sentrySubscription)==null||i.unsubscribe(),ju=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((0,Ha.isNonNullable)($)&&p.includes($)||(0,Ha.isNonNullable)(v)&&f.includes(v))return;if(Math.random()<=d||(0,Ha.isNonNullable)($)&&u.includes($)||(0,Ha.isNonNullable)(v)&&s.includes(v)){Object.keys(i).length&&r.setTags(Ee({version:this.version},i)),(Object.keys(a).length||Object.keys(o).length)&&r.setExtras(Ee(Ee({},a),o));try{v&&r.captureMessage(v,i.fatal?zl.fatal:zl.error),r.report(e)}catch(g){console.error(g)}}}static getInstance(){return ju}};var is=(d=>(d.Thumb="thumb",d.Video="video",d.Ads="ads",d.Crashed="crashed",d.LiveWaitingStart="LiveWaitingStart",d.LiveWaitingRecover="LiveWaitingRecover",d.LiveWaitingRecord="LiveWaitingRecord",d))(is||{});var Xu=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()},Zu=t=>t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():Promise.reject(),tb=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,ib=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},ic=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},na=()=>!!ic(),Ju=t=>{document.addEventListener("fullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),document.addEventListener("MSFullscreenChange",t)},ep=t=>{document.removeEventListener("fullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),document.removeEventListener("MSFullscreenChange",t)},ob=t=>{let e=window.screen;return(r=>ht(null,null,function*(){return e.orientation?e.orientation.lock(r):e.mozLockOrientation?e.mozLockOrientation(r):e.msLockOrientation?e.msLockOrientation(r):Promise.reject()}))(((r={width:0,height:0})=>r.width<=r.height?"portrait":"landscape")(t))};var am=require("@vkontakte/videoplayer-core/es2015"),nb=()=>({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:am.clientChecker.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:am.clientChecker.device.isApple?G("hotkey_map_item_next_episode_mac_value"):G("hotkey_map_item_next_episode_pc_value")}]}]});var Wl=require("@vkontakte/videoplayer-shared/es2015");var za=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:(0,Wl.debounceFn)(this.onResize.bind(this),300)};this.info={isActive$:new Wl.ValueSubject(!1),isEnabled$:new Wl.ValueSubject(!1),type:0};this.info.isEnabled$=new Wl.ValueSubject(e)}isSupported(){return document.pictureInPictureEnabled}isActive(){return this.info.isActive$.getValue()}setContext(e){this.svelteContext=e}revealPictureInPicture(){return ht(this,null,function*(){this.isRequested&&(this.removeEventHandlers(),yield this.request(),this.addEventHandlers())})}request(){return ht(this,null,function*(){var e;if(!(!this.isSupported()||this.isActive()))try{yield(e=this.videoElement)==null?void 0:e.requestPictureInPicture()}catch(i){this.isRequested=!1}})}exit(){return ht(this,null,function*(){!this.isSupported()||!this.isActive()||(yield document.exitPictureInPicture())})}assignPlayerContainer(e){this.isSupported()&&(this.playerContainer=e)}updateVideoElement(){this.isSupported()&&this.exit().finally(()=>{var e;this.removeEventHandlers(),this.videoElement=(e=this.playerContainer)==null?void 0:e.querySelector("video"),this.addEventHandlers()})}addEventHandlers(){var e,i;(e=this.videoElement)==null||e.addEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.addEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}setExternalEventHandlers(e){this.externalEventHandlers=Ee({},e)}removeEventHandlers(){var e,i;(e=this.videoElement)==null||e.removeEventListener("enterpictureinpicture",this.eventHandlers.enterpictureinpicture),(i=this.videoElement)==null||i.removeEventListener("leavepictureinpicture",this.eventHandlers.leavepictureinpicture)}dispose(){return ht(this,null,function*(){this.removeEventHandlers(),yield this.exit(),this.info.isActive$.next(!1),this.isRequested=!1})}onEnterPictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;o&&(this.info.isActive$.next(!0),this.isRequested=!0,o.addEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).enterpictureinpicture)==null||a.call(r,e))}onLeavePictureInPicture(e){var r,a;let o=e.pictureInPictureWindow;this.info.isActive$.next(!1),this.isRequested=!1,this.eventHandlers.resize.cancel(),o==null||o.removeEventListener("resize",this.eventHandlers.resize),(a=(r=this.externalEventHandlers).leavepictureinpicture)==null||a.call(r,e)}onResize(e){var i,o;(o=(i=this.externalEventHandlers).resize)==null||o.call(i,e)}setEnabled(e){this.info.isEnabled$.next(e)}};function Wa(t){return t instanceof za}var Kl=require("@vkontakte/videoplayer-shared/es2015");function dm(t,e){B(e,!1);let i=ve();Vt(()=>{i.getAdmanWrapper().startPostroll()}),So(),F()}var rb=require("@vkontakte/videoplayer-shared/es2015");var by=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>'),$y=Ce('<path d="m5.773 8 3.363 3.364a.9.9 0 1 1-1.272 1.272l-4-4a.9.9 0 0 1 0-1.272l4-4a.9.9 0 0 1 1.272 1.272L5.773 8z"></path>');function Nr(t,e){B(e,!0);let i=h(e,"direction",3,"left"),o=h(e,"useBtnColor",3,!1),r=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),l=m(()=>`chevron-icon--${i()}`),d=m(()=>(()=>{let f="";return n(a)&&(f+="transform: rotate(180deg);"),f.length?f:void 0})()),s=m(()=>o()?oa:"currentColor"),u=m(()=>n(r)?"7":"16");Je(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=by();b(w,I)},g=w=>{var I=$y();b(w,I)};R($,w=>{n(r)?w(y):w(g,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var yy=(t,e,i)=>{t.stopPropagation(),n(e)&&i()()},xy=M('<div class="skip s-1i"> <!></div>'),wy=M("<div><!></div>"),Sy={hash:"s-1i",code:".container.s-1i{background:rgba(0,0,0,.56);border-radius:6px;color:#fff;font-size:13px;padding:6px 10px;position:absolute;right:16px;top:14px;transition:color .2s}.container-mobile.s-1i{bottom:14px;font-size:15px;max-width:142px;top:unset}.skip.s-1i{align-items:flex-end;display:flex;gap:4px;white-space:nowrap}.skippable.s-1i{color:var(--white);cursor:pointer}.skippable.s-1i:hover{color:hsla(0,0%,100%,.75)}"};function cm(t,e){B(e,!0),Q(t,Sy);let[i,o]=Re(),r=()=>x(u,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"secondsToWatchBeforeSkip",3,0),d=h(e,"skipAd",3,rb.noop),u=ve().ui.isMobile,f=m(()=>a()>0&&a()>=l());var p=wy();let v;p.__click=[yy,f,d];var $=T(p);{var y=w=>{var I=xy(),C=T(I),N=A(C);Nr(N,{direction:"right"}),S(I),D(L=>me(C,`${L!=null?L:""} `),[()=>G("skip_ads_now")]),b(w,I)},g=w=>{var I=gs();D(C=>me(I,C),[()=>G("skip_ads_after",{time:Math.ceil(l()-a()).toFixed(0)})]),b(w,I)};R($,w=>{n(f)?w(y):w(g,!1)})}S(p),D(w=>v=se(p,1,"container s-1i",null,v,w),[()=>({"container-mobile":r(),skippable:n(f)})]),b(t,p),F(),o()}je(["click"]);var Cy=M('<button class="go-to-site s-1h"> </button>'),Ty={hash:"s-1h",code:"button.go-to-site.s-1h{background:#fff;border:none;border-radius:6px;bottom:14px;color:#000;font-size:15px;left:16px;padding:6px 10px;pointer-events:none;position:absolute}"};function um(t,e){B(e,!1),Q(t,Ty),So();var i=Cy(),o=T(i,!0);S(i),D(r=>me(o,r),[()=>G("visit_advertiser")],In),b(t,i),F()}var Iy=M('<div class="top-gradient-mobile s-o"></div>'),Ey=M('<div class="container s-o"><!> <video style="width: 100%; height: 100%" playsinline=""></video> <!> <!> <!></div>',2),Py={hash:"s-o",code:".container.s-o{height:100%;width:100%}.top-gradient-mobile.s-o{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 nc(t,e){B(e,!0),Q(t,Py);let[i,o]=Re(),r=()=>x(H,"$canSkipAd",i),a=()=>x(q,"$adPlaybackState",i),l=()=>x(C,"$isMobile",i),d=()=>x(z,"$adPosition",i),s=()=>x(j,"$secondsToWatchBeforeSkipAd",i),u=()=>x(I,"$isVideoEnded",i),f=h(e,"adsSlotId",3,void 0),p=h(e,"adsParams",3,void 0),v=h(e,"adsAutoplayParam",3,void 0),$=h(e,"duration",3,0),y=h(e,"adsExternalApi",3,void 0),g=ve(),w=Rt(),I=g.state.isEnded$,C=g.ui.isMobile,N=w.ads.isMobileGoToSiteButton,L=K(void 0),E=K(void 0),P=!1,q=g.ads.playbackState,H=g.ads.canSkip,z=g.ads.position,j=g.ads.secondsToWatchBeforeSkip,ae=m(()=>r()&&a()!=="inactive"),X=m(()=>l()&&a()!=="inactive"&&N);Vt(()=>{let k=g.getAdmanWrapper();if(Kl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_mount"],numbers:[(0,Kl.now)(),f()]}),!f()){k.onAdmanLoadingError();return}let Ke=()=>{var ke;let{width:De,height:Be}=ge(g.ui.playerSize),ot=ge(g.ui.isFullscreen),U=(ke=v())!=null?ke:ge(g.ui.isAutoplay),Ae=w.ads.paramsOverride;return{width:De,height:Be,isFullscreen:ot,isAutoplay:U,adsContainer:n(L),adsVideoElement:n(E),slotId:f(),params:p(),paramsOverride:Ae,duration:$(),externalApi:y()}},Te=De=>ht(null,null,function*(){De&&(yield _o());let Be=Ke();yield k.initAdman(Be),P=!0}),Z=new AbortController,ie=()=>{Z.abort()};return window.AdmanHTML?Te(!0).catch(()=>{k.onAdmanLoadingError()}):k.loadAdman(Z.signal).then(()=>Te(!1)).catch(()=>{k.onAdmanLoadingError()}),()=>{Kl.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_unmount"],numbers:[(0,Kl.now)(),f()]}),!P&&ie()}});var ne=Ey(),J=T(ne);{var we=k=>{var Ke=Iy();b(k,Ke)};R(J,k=>{l()&&k(we)})}var pe=A(J,2);Ze(pe,k=>O(E,k),()=>n(E));var re=A(pe,2);{var _e=k=>{cm(k,{get position(){return d()},get secondsToWatchBeforeSkip(){return s()},get skipAd(){return g.actions.internal.skipAd}})};R(re,k=>{n(ae)&&k(_e)})}var $e=A(re,2);{var ee=k=>{dm(k,{})};R($e,k=>{u()&&k(ee)})}var Ne=A($e,2);{var fe=k=>{um(k,{})};R(Ne,k=>{n(X)&&k(fe)})}S(ne),Ze(ne,k=>O(L,k),()=>n(L)),b(t,ne),F(),o()}var nn=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 ky=Ce('<path fill="#fff"></path>'),Ay=Ce("<path></path><!>",1);function rc(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";Je(t,{width:"42",height:"20",get testId(){return n(o)},get fill(){return n(r)},children:(l,d)=>{var s=Ay(),u=ce(s),f=A(u);{var p=v=>{var $=ky();Me($,"d",a),b(v,$)};R(f,v=>{i()&&v(p)})}D(()=>Me(u,"d",`M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5${i()?"":"M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5"+a}z`)),b(l,s)},$$slots:{default:!0}})}var Ly=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>'),My=M('<div class="live-icon s-e"><!></div>'),Vy=M('<span class="text s-e"> </span>'),Ry=M("<div><!> <!></div>"),Ny={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 sc(t,e){Q(t,Ny);let i=h(e,"withEqualizer",3,!1),o=h(e,"isLive",3,!1),r=h(e,"isPlaying",3,!1);var a=Ry();let l;var d=T(a);{var s=v=>{var $=Ly();b(v,$)};R(d,v=>{i()&&v(s)})}var u=A(d,2);{var f=v=>{var $=My(),y=T($);rc(y,{isActive:!0}),S($),b(v,$)},p=v=>{var $=Vy(),y=T($,!0);S($),D(()=>me(y,e.time)),b(v,$)};R(u,v=>{o()?v(f):v(p,!1)})}S(a),D(v=>l=se(a,1,"wrapper s-e",null,l,v),[()=>({live:o(),playing:r()})]),b(t,a)}var ql=(t,e,i)=>{let o;return()=>(window.clearTimeout(o),t?o=window.setTimeout(()=>e.set(!0),i):e.set(!1),()=>window.clearTimeout(o))};var Oy=M('<div role="timer" data-testid="thumb-timer"><!></div>'),Dy={hash:"s-q",code:".thumb-timer.s-q{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 ac(t,e){B(e,!0),Q(t,Dy);let[i,o]=Re(),r=()=>x(f,"$disabled",i),a=h(e,"isHidden",3,!1),l=h(e,"isLive",3,!1),d=h(e,"isPlaying",3,!1),s=Rt(),u=m(()=>nn(e.duration-e.position)),f=de(!1);var p=Oy();let v;var $=T(p);sc($,{get time(){return n(u)},get isLive(){return l()},get isPlaying(){return d()},withEqualizer:!0}),S(p),Ms(p,()=>ql(a()&&s.features.usePerformanceFix,f,s.disableInvisibleComponentsTimeout)),D(y=>v=se(p,1,"thumb-timer s-q",null,v,y),[()=>({"out-of-flow":r(),hidden:a()})]),b(t,p),F(),o()}var Ql=t=>{if(!navigator.clipboard){sb(t);return}navigator.clipboard.writeText(t).catch(()=>sb(t))};function sb(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)}}}var vb=require("@vkontakte/videoplayer-core/es2015");var fm=require("@vkontakte/videoplayer-core/es2015");var pm="focus-hidden";var Or=t=>{t.stopPropagation(),t.preventDefault()},mm=t=>{var e,i;(i=(e=t.parentNode)==null?void 0:e.firstElementChild)==null||i.classList.remove(pm)},Fy=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},Hy=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},Uy=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},zy=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},ab=t=>t.code==="Escape",Wy=t=>t.code==="ArrowLeft",lc=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},lb=t=>{Uy(t)?(Or(t),Hy(t.target)):zy(t)&&(Or(t),Fy(t.target))},aa=t=>!fm.clientChecker.device.isAndroid&&(t==null?void 0:t.detail)===0||fm.clientChecker.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Gl=(t,e,i)=>ht(null,null,function*(){yield _o(),t&&!t.classList.contains("opened")&&!e&&ge(i)&&(yield _o(),i.set(!1),t.focus())}),db=(t,e,i)=>ht(null,null,function*(){yield _o(),t&&!e&&ge(i)&&(i.set(!1),t.focus())}),dc=(t,e,i,o=!1)=>ht(null,null,function*(){if(yield _o(),!!t&&e&&!o){let a=t.children[0];a==null||a.classList.toggle(pm,!i),a==null||a.focus()}}),cb=(t,e)=>ht(null,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),tp=(t,e)=>{lb(t),mm(t.target),ab(t)&&(Or(t),e())},ip=(t,e)=>ht(null,null,function*(){lc(t,["ArrowRight"])&&(Or(t),e())}),ub=(t,e,i)=>ht(null,null,function*(){if(lb(t),Wy(t)){Or(t),e();return}ab(t)&&(Or(t),i())}),Yl=(t,e)=>{lc(t)&&(Or(t),e())},pb=(t,e,i)=>{if(lc(t))Or(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),Or(t);return}o==="ArrowRight"&&!e&&(i(!0),Or(t))}},fb=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,r=e.top+i;return{right:o,bottom:r}},mb=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}};var Qa=require("@vkontakte/videoplayer-shared/es2015");var os={"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};var vm=require("@vkontakte/videoplayer-shared/es2015");var qy=(t,e)=>{Yl(t,()=>e())},Qy=M('<li class="item s-1k" role="menuitem" tabindex="0"> </li>'),Gy={hash:"s-1k",code:".item.s-1k{color:hsla(0,0%,100%,.72);cursor:pointer;display:block;font-size:13px;letter-spacing:-.14px;line-height:18px;padding:8px 16px;position:relative;white-space:nowrap}.item.s-1k:hover{background:rgba(66,66,66,.5);color:var(--white)}"};function gm(t,e){B(e,!0),Q(t,Gy);let i=h(e,"onClick",3,vm.noop),o=h(e,"closeContextMenu",3,vm.noop),r=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=Qy();a.__click=r,a.__keydown=[qy,r];var l=T(a,!0);S(a),D(()=>{var d;Me(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Me(a,"data-testid",e.id),me(l,e.label)}),b(t,a),F()}je(["click","keydown"]);var qa=(t,e)=>t.weight-e.weight;var jl=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(jl||{});var Yy=(t,e)=>{tp(t,e)},jy=t=>{t.preventDefault()},Xy=M('<ul role="menu" class="s-l"></ul>'),Zy={hash:"s-l",code:"ul.s-l{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 hm(t,e){B(e,!0),Q(t,Zy);let[i,o]=Re(),r=()=>x(we,"$playerPhase",i),a=()=>x(ae,"$isLive$",i),l=()=>x(pe,"$isPiPEnabled$",i),d=()=>x(j,"$chromecastState$",i),s=()=>x(re,"$pictureInPictureApiIsActive$",i),u=()=>x(J,"$isLooped$",i),f=()=>x(X,"$positionExact$",i),p=()=>x(q,"$additionalContextMenuItems$",i),v=h(e,"visible",3,!1),$=h(e,"position",19,()=>({top:0,left:0})),y=h(e,"playerContainerRef",3,void 0),g=h(e,"menuElementRef",15,void 0),w=K(0),I=K(0),C=ve(),{pictureInPicture$:N}=Co(),L=Rt(),E=C.ui.contextMenu.visible$,P=C.ui.debugPanelVisible,q=C.ui.additionalContextMenuItems$,H=C.ui.t,z=C.actions.internal.togglePictureInPicture,j=C.state.chromecastState$,ae=C.state.isLive$,X=C.state.positionExact$,ne=C.state.isInteractive,J=C.state.looped$,we=C.playerPhase,{isEnabled$:pe,isActive$:re}=N,_e=m(()=>r()==="video"),$e=m(()=>!!a()&&n(_e)),ee=m(()=>["thumb","LiveWaitingStart","LiveWaitingRecover","LiveWaitingRecord"].includes(r())),Ne=m(()=>{var ue;return L.features.copyVideoLink&&((ue=C.callbacks)==null?void 0:ue.onCopyVideoLink)}),fe=m(()=>n(Ne)&&!n(ee)&&!ne&&!n($e)),k=m(()=>{var ue;return!!((ue=C.callbacks)!=null&&ue.onCopyEmbedCodeClicked)}),Ke=m(()=>l()&&d()!==vb.ChromecastState.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),Be=()=>{var ue;E.set(!1),(ue=e.returnFocus)==null||ue.call(e)},ot=(ue,We)=>{if(!g()||!y())return;let Ye=g().getBoundingClientRect(),ut=y().getBoundingClientRect();O(w,ue-ut.left),O(I,We-ut.top),n(w)+Ye.width>ut.width&&O(w,ut.width-Ye.width),n(I)+Ye.height>ut.height&&O(I,ut.height-Ye.height),O(w,Math.max(n(w),0),!0),O(I,Math.max(n(I),0),!0)};Oe(()=>{ht(null,null,function*(){if(g()&&y()){yield _o();let{top:We,left:Ye,bottom:ut,right:zt}=$(),Wt=Ye!=null?Ye:0,ri=We!=null?We:0,$i=g().getBoundingClientRect();(0,Qa.isNullable)(Ye)&&!(0,Qa.isNullable)(zt)&&(Wt=zt-$i.width),(0,Qa.isNullable)(We)&&!(0,Qa.isNullable)(ut)&&(ri=ut-$i.height),Wt=Math.max(Wt,0),ri=Math.max(ri,0),ot(Wt,ri)}})});let U=()=>{C.actions.internal.videoRotate()},Ae=()=>{(0,Qa.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),C.actions.internal.reportProblem(),C.actions.internal.pause()},ke=()=>{let ue=C.actions.internal.getDebugTextData();if(L.features.saveDebugInfoToFile){let We=new Blob([...ue],{type:"plain/text"}),Ye=window.URL.createObjectURL(We);Fa(Ye,"vk_player_debug_info","txt")}else Ql(C.actions.internal.getDebugTextData())},ze=()=>{let ue=C.actions.internal.getTraceTextData(),We=new Blob([...ue],{type:"application/json"}),Ye=window.URL.createObjectURL(We);Fa(Ye,"vk_player_trace_info","json")},it=()=>{P.set(!0)},ye=()=>ht(null,null,function*(){var ue;try{z()}finally{(ue=e.returnFocus)==null||ue.call(e)}}),Ie=()=>{C.actions.internal.setLooped(!u())},Fe=()=>{var ue,We;if(n(k)){let Ye=(We=(ue=C.callbacks)==null?void 0:ue.onCopyEmbedCodeClicked)==null?void 0:We.call(ue);Ye&&Ql(Ye)}},Dt=(ue=!1)=>{var We,Ye;if((We=C.callbacks)!=null&&We.onCopyVideoLink){let ut=(Ye=C.callbacks)==null?void 0:Ye.onCopyVideoLink(ue,f());ut&&Ql(ut)}},vt=m(()=>L.features.saveDebugInfoToFile?H("menu_save_debug"):H("menu_copy_debug")),Ht=m(()=>n(Ne)?{id:"copy-link",weight:os["copy-link"],label:H("menu_copy_video_link"),onClick:()=>Dt()}:void 0),ct=m(()=>n(fe)?{id:"copy-link-timestamp",weight:os["copy-link-timestamp"],label:H("menu_copy_video_link_with_timestamp"),onClick:()=>Dt(!0)}:void 0),St=m(()=>n(k)?{id:"copy-embed-code",weight:os["copy-embed-code"],label:H("menu_copy_embed_code"),onClick:Fe}:void 0),ni=m(()=>n(Ke)?{id:"pip",weight:os.pip,label:s()?H("menu_pip_close"):H("menu_pip"),onClick:ye}:void 0),At=m(()=>n(Te)?{id:"video-loop",weight:os["video-loop"],label:u()?H("menu_video_loop_off"):H("menu_video_loop_on"),ariaLabel:H("aria_label_menu_loop"),onClick:Ie}:void 0),Bt=m(()=>n(Z)?{id:"rotate",weight:os.rotate,label:H("menu_video_rotate"),ariaLabel:H("aria_label_menu_rotate"),onClick:U}:void 0),Ut=m(()=>n(ie)?{id:"report",weight:os.report,label:H("menu_report"),ariaLabel:`${H("menu_report")}. ${H("aria_label_new_tab_alert")}`,onClick:Ae}:void 0),Y=m(()=>({id:"save-debug",weight:os["save-debug"],label:n(vt),onClick:ke})),Se=m(()=>n(De)?{id:"save-trace",weight:os["save-trace"],label:H("menu_save_debug"),onClick:ze}:void 0),le=m(()=>({id:"debug-info",weight:os["debug-info"],label:H("menu_debug_overlay"),ariaLabel:H("aria_label_menu_debug_overlay"),onClick:it})),he=m(()=>[n(Ht),n(ct),n(St),n(ni),n(At),n(Bt),n(Ut),n(Y),n(Se),n(le),...p()].filter(ue=>!!ue).sort(qa));var Ve=Le(),st=ce(Ve);{var mt=ue=>{var We=Xy();We.__contextmenu=[jy],We.__keydown=[Yy,Be],xi(We,21,()=>n(he),Ye=>Ye.id,(Ye,ut)=>{gm(Ye,{get id(){return n(ut).id},get label(){return n(ut).label},get ariaLabel(){return n(ut).ariaLabel},get onClick(){return n(ut).onClick},closeContextMenu:Be})}),S(We),Ze(We,Ye=>g(Ye),()=>g()),D(()=>{var Ye,ut;return Qe(We,`top: ${(Ye=n(I))!=null?Ye:""}px; left: ${(ut=n(w))!=null?ut:""}px;`)}),b(ue,We)};R(st,ue=>{v()&&ue(mt)})}b(t,Ve),F(),o()}je(["contextmenu","keydown"]);var op=class{constructor(e){this.value=e,this.next=null}};var Xl=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new op(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 Jy=M('<div class="container s-1g"><canvas class="s-1g"></canvas></div>'),e0={hash:"s-1g",code:".container.s-1g{display:inline-block;height:16px;width:120px}canvas.s-1g{margin-top:2px;transform:scaleY(-1)}"};function cc(t,e){B(e,!0),Q(t,e0);let i=h(e,"values",19,()=>[]),o=K(void 0),r=K(null),a=16,l=120,d=60,s=l/d;Vt(()=>{n(o).width=l,n(o).height=a,O(r,n(o).getContext("2d"),!0)});function u(v,$,y,g,w){w===0&&(w=1),v.fillStyle="#fff",v.fillRect($,y,g,w)}Oe(()=>{let v="";if(n(r)){let $=i()[0];for(let g=1;g<i().length;g++)i()[g]>$&&($=i()[g]);n(r).clearRect(0,0,l,a);let y=d-1;for(let g=i().length-1;g>=0;g--){let w=y*s,I=$>0?a*(i()[g]/$):0;u(n(r),w,0,s,I),v=I+" "+v,y--}}});var f=Jy(),p=T(f);Ze(p,v=>O(o,v),()=>n(o)),S(f),b(t,f),F()}var _m=require("@vkontakte/videoplayer-shared/es2015");var t0=(t,e)=>{t.stopPropagation(),_m.safeStorage.remove(Yd),e.set(!1)},i0=M('<div class="s-y"><div class="s-y">Video id</div> <span> </span></div>'),o0=M('<div class="s-y"><div class="s-y">VSID</div> <span> </span></div>'),n0=M('<div class="s-y"><div class="s-y">Provider</div> <span> </span></div>'),r0=M('<div class="s-y"><div class="s-y">Streams</div> <span> </span></div>'),s0=M('<div class="s-y"><div class="s-y">Viewport</div> <span> </span></div>'),a0=M('<div class="s-y"><div class="s-y">Video size</div> <span> </span></div>'),l0=M('<div class="s-y"><div class="s-y">CDN host</div> <span> </span></div>'),d0=M('<div class="s-y"><div class="s-y">Volume</div> <span> </span></div>'),c0=M('<div class="s-y"><div class="s-y">Position</div> <span> </span></div>'),u0=M('<div class="s-y"><div class="s-y">Buffer</div> <span> </span></div>'),p0=M('<div class="s-y"><div class="s-y">Nbuffer</div> <span> </span></div>'),f0=M('<div class="s-y"><div class="s-y">Live latency</div> <span> </span></div>'),m0=M('<div class="s-y"><div class="s-y">Segment</div> <span> </span></div>'),v0=M('<div class="s-y"><div class="s-y">Network</div> <!> <span> </span></div>'),g0=M('<div class="s-y"><div class="s-y">V bitrate</div> <!> <span> </span></div>'),h0=M('<div role="region"><button class="close s-y" title="закрыть">[x]</button> <div class="content s-y"><div class="s-y"><div class="s-y">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-y"><div class="s-y">Dropped</div> <span> </span></div> <!> <!> <div class="s-y"><div class="s-y">FPS</div> <!> <span> </span></div></div></div>'),_0={hash:"s-y",code:".container.s-y{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-y{left:16px;top:16px}button.close.s-y{background-color:transparent;border:none;color:#fff;cursor:pointer;outline:0;padding:0;position:absolute;right:5px;top:3px}.content.s-y{padding:5px}.content.s-y>div:where(.s-y)>div:where(.s-y){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function uc(t,e){B(e,!0),Q(t,_0);let[i,o]=Re(),r=()=>x(d,"$isMobile",i),a=ve(),l=a.ui.debugPanelVisible,d=a.ui.isMobile,s=K(ci(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),f=K(0),p=K(0),v=K(0),$=new Xl(60),y=new Xl(60),g=new Xl(60),w=K(ci([])),I=K(ci([])),C=K(ci([])),N=G("aria_label_debug_panel");Vt(()=>{_m.safeStorage.set(Yd,"true"),a.actions.internal.startLogging(),u&&(O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0),O(f,u.getVideoPlaybackQuality().totalVideoFrames,!0));let Y=window.setInterval(()=>{O(s,a.actions.internal.getDebugPanelData(),!0)},500),Se;return u&&(Se=window.setInterval(()=>{if(u){O(p,u.getVideoPlaybackQuality().droppedVideoFrames,!0);let le=u.getVideoPlaybackQuality().totalVideoFrames;O(v,le-n(f)),O(f,le,!0),$.push(n(v)),n(s).speed&&y.push(n(s).speed),n(s).bitrate&&g.push(n(s).bitrate),O(w,$.getValuesFromBottom(),!0),O(I,y.getValuesFromBottom(),!0),O(C,g.getValuesFromBottom(),!0)}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(Y),Se&&clearInterval(Se)}});var L=h0();let E;var P=T(L);P.__click=[t0,l];var q=A(P,2),H=T(q),z=A(T(H),2),j=T(z,!0);S(z),S(H);var ae=A(H,2);{var X=Y=>{var Se=i0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).id)),b(Y,Se)};R(ae,Y=>{n(s).id&&Y(X)})}var ne=A(ae,2);{var J=Y=>{var Se=o0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).vsid)),b(Y,Se)};R(ne,Y=>{n(s).vsid&&Y(J)})}var we=A(ne,2);{var pe=Y=>{var Se=n0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).provider)),b(Y,Se)};R(we,Y=>{n(s).provider&&Y(pe)})}var re=A(we,2);{var _e=Y=>{var Se=r0(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(()=>{var Ve,st;return me(he,`Video: ${(Ve=n(s).videoCodec||"")!=null?Ve:""} ${n(s).hdr?"(HDR)":""}
57
57
  &
58
- Audio: ${(Me=n(s).audioCodec||"")!=null?Me:""} ${n(s).audioLanguage?`(${n(s).audioLanguage})`:""}`)}),b($e,be)};R(ne,$e=>{(n(s).videoCodec||n(s).audioCodec)&&$e(_e)})}var xe=L(ne,2);{var J=$e=>{var be=r0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(()=>me(nt,n(s).viewport)),b($e,be)};R(xe,$e=>{n(s).viewport&&$e(J)})}var Ne=L(xe,2);{var pe=$e=>{var be=s0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(()=>me(nt,n(s).videoSize)),b($e,be)};R(Ne,$e=>{n(s).videoSize&&$e(pe)})}var P=L(Ne,2);{var Ke=$e=>{var be=a0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(()=>me(nt,n(s).cdn)),b($e,be)};R(P,$e=>{n(s).cdn&&$e(Ke)})}var Te=L(P,2);{var j=$e=>{var be=l0(),ee=L(C(be),2),nt=C(ee);S(ee),S(be),D(()=>{var fe;return me(nt,`${(fe=n(s).volume)!=null?fe:""} %`)}),b($e,be)};R(Te,$e=>{n(s).volume&&$e(j)})}var ie=L(Te,2);{var De=$e=>{var be=d0(),ee=L(C(be),2),nt=C(ee);S(ee),S(be),D(fe=>me(nt,`${fe!=null?fe:""} s`),[()=>n(s).position.toFixed(2)]),b($e,be)};R(ie,$e=>{n(s).position&&$e(De)})}var Be=L(ie,2);{var ot=$e=>{var be=c0(),ee=L(C(be),2),nt=C(ee);S(ee),S(be),D(fe=>me(nt,`${fe!=null?fe:""} s`),[()=>n(s).buffer.toFixed(2)]),b($e,be)};R(Be,$e=>{n(s).buffer&&$e(ot)})}var U=L(Be,2);{var Ae=$e=>{var be=u0(),ee=L(C(be),2),nt=C(ee);S(ee),S(be),D(fe=>me(nt,`${fe!=null?fe:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b($e,be)};R(U,$e=>{n(s).liveLatency&&$e(Ae)})}var ke=L(U,2);{var ze=$e=>{var be=p0(),ee=L(C(be),2),nt=C(ee,!0);S(ee),S(be),D(fe=>me(nt,fe),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:fe})=>fe).map(({value:fe,title:Me})=>`${Me} ${((fe!=null?fe:0)/1e3).toFixed(2)} s`).join(" & ")]),b($e,be)};R(ke,$e=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&$e(ze)})}var et=L(ke,2),ye=L(C(et),2),Pe=C(ye);S(ye),S(et);var Fe=L(et,2);{var Ft=$e=>{var be=f0(),ee=L(C(be),2);dc(ee,{get values(){return n(T)}});var nt=L(ee,2),fe=C(nt);S(nt),S(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b($e,be)};R(Fe,$e=>{n(s).speed&&$e(Ft)})}var vt=L(Fe,2);{var Ht=$e=>{var be=m0(),ee=L(C(be),2);dc(ee,{get values(){return n(I)}});var nt=L(ee,2),fe=C(nt);S(nt),S(be),D(Me=>me(fe,`${Me!=null?Me:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b($e,be)};R(vt,$e=>{n(s).bitrate&&$e(Ht)})}var dt=L(vt,2),Ct=L(C(dt),2);dc(Ct,{get values(){return n(w)}});var ri=L(Ct,2),Ot=C(ri,!0);S(ri),S(dt),S(Q),S(k),D($e=>{var be,ee;E=se(k,1,"container s-k",null,E,$e),Ve(k,"aria-label",N),me(Y,n(s).version),me(Pe,`${(be=n(p))!=null?be:""} / ${(ee=n(v))!=null?ee:""} frames`),me(Ot,n(f))},[()=>({"container-mobile":r()})]),b(t,k),F(),o()}Je(["click"]);var vb=require("@vkontakte/videoplayer-shared/es2015"),h0=(t,e)=>{t.stopPropagation(),e()()},_0=M('<div class="close s-1e"></div>'),b0={hash:"s-1e",code:'.close.s-1e{cursor:pointer;height:16px;opacity:.8;position:relative;transition:opacity .2s;width:16px}.close.s-1e:hover{opacity:1}.close.s-1e:after,.close.s-1e:before{background-color:var(--white);content:" ";height:16px;left:8px;position:absolute;width:2px}.close.s-1e:before{transform:rotate(45deg)}.close.s-1e:after{transform:rotate(-45deg)}'};function Rs(t,e){B(e,!0),q(t,b0);let i=h(e,"onClick",3,vb.noop);var o=_0();o.__click=[h0,i],b(t,o),F()}Je(["click"]);var gb=require("@vkontakte/videoplayer-shared/es2015");var vn=t=>`width:${t}px;height:${t}px;`;var $0=Ce('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function An(t,e){B(e,!0);let i=m(()=>vn(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=$0();b(o,a)},$$slots:{default:!0}}),F()}var y0=M('<div class="timer s-1d"><canvas class="timer-canvas s-1d" width="100" height="100"></canvas> <!></div>'),x0={hash:"s-1d",code:".timer.s-1d{align-items:center;background:rgba(31,31,31,.65);border-radius:50%;display:flex;height:50px;justify-content:space-around;transition:background .2s;width:50px}.timer.s-1d:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-1d{height:50px;position:absolute;width:50px}"};function uc(t,e){B(e,!0),q(t,x0);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,gb.noop),r=5e3,a=W(void 0),l,d,s=0,u;Oe(()=>{i()&&Et(()=>{d=Date.now(),s=requestAnimationFrame(p)})});let v=()=>{s&&(cancelAnimationFrame(s),s=0)},p=()=>{v(),i()&&(u=(Date.now()-d)/r,u<1?(l==null||l.clearRect(0,0,100,100),l==null||l.beginPath(),l==null||l.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),l==null||l.stroke(),s=requestAnimationFrame(p)):o()())};Rt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),mn(()=>{v()});var f=y0(),$=C(f);Xe($,g=>O(a,g),()=>n(a));var y=L($,2);An(y,{get size(){return"24"}}),S(f),b(t,f),F()}var w0=(t,e,i)=>{e(!1),i()},S0=M('<div class="overlay s-p"></div> <div class="next-video s-p"><div class="top s-p"><div class="caption s-p"> </div> <!></div> <div class="row s-p"><div class="column s-p"><div class="thumb s-p"><div></div> <!></div></div> <div class="column s-p"><div class="title s-p"> </div></div></div></div>',1),T0={hash:"s-p",code:".overlay.s-p{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-p{display:flex;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.top.s-p{display:flex;justify-content:space-between}.caption.s-p{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-p{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-p{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-p{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-p,.thumb-overlay.s-p{height:100%;width:100%}.thumb-overlay.s-p{position:absolute}.thumb-overlay.withOpacity.s-p{background:var(--black);opacity:.3}.title.s-p{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function _m(t,e){B(e,!0),q(t,T0);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,v=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),f())},g=()=>{e.clickCloseIcon(),$()};Rt(()=>{e.isHide||v(),e.isHide&&r()&&(u(!1),f())});var w=Le(),T=de(w);{var I=N=>{var k=S0(),E=L(de(k),2),A=C(E),Q=C(A),H=C(Q,!0);S(Q);var z=L(Q,2);Rs(z,{onClick:g}),S(A);var Y=L(A,2);Y.__click=[w0,u,p];var le=C(Y),X=C(le),re=C(X);let Z;var we=L(re,2);{var ue=J=>{let Ne=m(()=>a()&&r());uc(J,{get isRunning(){return n(Ne)},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}S(X),S(le);var ne=L(le,2),_e=C(ne),xe=C(_e,!0);S(_e),S(ne),S(Y),S(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-p",null,Z,Ne),me(xe,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,k)};R(T,N=>{e.isHide||N(I)})}b(t,w),F(),o()}Je(["click"]);var fa=require("@vkontakte/videoplayer-core/es2015"),hb=require("@vkontakte/videoplayer-shared/es2015"),Ln=require("@vkontakte/videoplayer-statistics/es2015");var bm=(t,e)=>Math.min(+(t+e).toFixed(2),1),$m=(t,e)=>Math.max(+(t-e).toFixed(2),0),op=(t,e,i)=>{let o=bm(e,i);e<1&&t.actions.internal.setVolume(o)},np=(t,e,i)=>{let o=$m(e,i);e>0&&t.actions.internal.setVolume(o)};var pa=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function rp(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var I0=(t,e)=>{e(t)},E0=M('<div class="keyboard-controls s-m" tabindex="-1" role="region"><!></div>'),k0={hash:"s-m",code:".keyboard-controls.s-m{bottom:0;left:0;position:absolute;right:0;top:0}"};function ym(t,e){var ee,nt;B(e,!0),q(t,k0);let[i,o]=Re(),r=()=>x(we,"$disabledControls$",i),a=()=>x(ot,"$isInteractiveTime$",i),l=()=>x(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(Ke,"$isEnded$",i),u=()=>x(pe,"$doubleForwardAvailable$",i),v=()=>x(Ne,"$doubleForwardOn$",i),p=()=>x(Te,"$overlayContainer$",i),f=()=>x(le,"$adPlaybackState",i),$=()=>x(X,"$positionExact$",i),y=()=>x(re,"$duration$",i),g=()=>x(De,"$isAudioAvailable$",i),w=()=>x(Z,"$volume$",i),T=()=>x(Y,"$canChangePlaybackSpeed$",i),I=()=>x(ue,"$muted$",i),N=()=>x(ne,"$currentSubtitle$",i),k=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),A=ve(),Q=Nt(),H=A.getLogger().createComponentLog("KeyboardControls component"),z=A.state.playbackState$,Y=A.state.canChangePlaybackSpeed$,le=A.ads.playbackState,X=A.state.positionExact$,re=A.state.duration$,Z=A.state.volume$,we=A.ui.controls.disabledControls$,ue=A.state.muted$,ne=A.state.currentSubtitle$,_e=A.ui.contextMenu.openedByHotKey$,xe=A.ui.contextMenu.lastActiveElem$,J=A.ui.contextMenu.visible$,Ne=A.ui.doubleForwardOn$,pe=A.ui.doubleForwardAvailable$,P=A.ui.contextMenu.position$,Ke=A.state.isEnded$,Te=A.ui.overlayContainer$,j=(ee=A.callbacks)==null?void 0:ee.onAudioDoesNotExistHint,ie=(nt=A.callbacks)==null?void 0:nt.onAudioDisabledHint,De=A.state.isAudioAvailable$,Be=A.state.isAudioDisabled,ot=A.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=Io(),Ae=0,ke=!0,ze=W(void 0),et=fe=>(fe!==ke&&(ke=fe,Ae=0),Ae+=1,(Q.controls.seekStepKeyboard+Q.controls.seekStepKeyboard*Ae)/1e3),ye=!0,Pe=({type:fe,repeat:Me,disableDoubleForward:wt})=>{let Lt=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{A.actions.internal.togglePlay();let ce="PLAY";d()===fa.PlaybackState.PAUSED?ce="PAUSE":s()&&(ce="REPLAY"),e.showHotKeyHelpers({type:ce})}},mt=fe==="down";if(!u()||wt){mt&&Lt(),ye=!0;return}if(mt)ye=!1;else if(ye)return;if(mt){!Me&&e.startDoubleForwardActivationTimer();return}v()||Lt(),e.stopDoubleForward(),ye=!0},Fe=fe=>{let Me=fb(p());P.set(Me),xe.set(fe.target),_e.set(!0),J.set(!0)},Ft=(fe,Me=!1)=>{var pi,hi;let wt=fe.target,Lt=(pi=wt==null?void 0:wt.getAttribute("role"))==null?void 0:pi.includes("menuitem"),mt=wt.classList.contains("btn"),ce=fe.code;if(mt&&ce==="Space")return!1;let We=m_.has(ce);if(Lt&&We)return!1;let Ye=!f_.has(ce);if(fe.ctrlKey&&Ye||fe.altKey&&Ye||fe.metaKey)return!1;let ct=Lt&&ce==="Escape";v_.has(ce)||ct||e.hideContextMenu();let Ut=d()===fa.PlaybackState.PLAYING||d()===fa.PlaybackState.PAUSED,zt=e.isAds&&(f()==="paused"||f()==="playing"),si=!zt&&!r().has("TIMELINE"),$i=fe.shiftKey&&["Digit1","Numpad1"].includes(ce);if(!$i&&!(Ut||zt))return!1;H({message:`key down, code: ${ce}, isExternal = ${Me}`});let ji=!1,Dt=()=>{ji=!0,Me||fe.preventDefault()};if($i)return Fe(fe),Dt(),!0;switch(ce){case"KeyJ":case"ArrowLeft":{if(!si)break;if(fe.ctrlKey||fe.altKey){let bt=A.actions.internal.getPrevEpisode();A.actions.internal.seekToPrevEpisode(bt),bt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:bt.text}),Dt()}else{let bt=fe.shiftKey?et(!1):Q.controls.seekStepKeyboard/1e3,Jt=Math.max($()-bt,0);$()>0&&(A.actions.internal.seekTime(Jt,Ln.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:bt.toString()}),Dt())}break}case"KeyL":case"ArrowRight":{if(!si)break;if(fe.ctrlKey||fe.altKey){let bt=A.actions.internal.getNextEpisode();A.actions.internal.seekToNextEpisode(bt),bt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:bt.text}),Dt()}else{let bt=fe.shiftKey?et(!0):Q.controls.seekStepKeyboard/1e3,Jt=Math.min($()+bt,y());Math.round($())<Math.round(y())&&(A.actions.internal.seekTime(Jt,Ln.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:bt.toString()}),Dt())}break}case"ArrowUp":{if(pa({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let bt=w(),Jt=Q.controls.volumeStepKeyboard,xi=bt<=1;if(op(A,bt,Jt),xi){let Xi=Math.round(bm(bt,Jt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Xi}})}}Dt();break}case"ArrowDown":{if(pa({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})){let bt=w(),Jt=Q.controls.volumeStepKeyboard,xi=bt>=0;if(np(A,bt,Jt),xi){let Xi=Math.round($m(bt,Jt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Xi}})}}Dt();break}case"Comma":{if(fe.shiftKey){if(!v()&&T()){let bt=A.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:bt==null?void 0:bt.displayValue}),Dt()}}else{if(zt||d()!==fa.PlaybackState.PAUSED)break;let bt=Math.max($()-Q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(bt,Ln.SeekAction.DOUBLE_TAP),Dt())}break}case"Period":{if(fe.shiftKey){if(!v()&&T()){let bt=A.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:bt==null?void 0:bt.displayValue}),Dt()}}else{if(zt||d()!==fa.PlaybackState.PAUSED)break;let bt=Math.min($()+Q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),A.actions.internal.clearDelayedBufferingCheckTimeout(),A.actions.internal.seekTime(bt,Ln.SeekAction.DOUBLE_TAP),Dt())}break}case"KeyK":case"Space":Pe({type:"down",repeat:fe.repeat,disableDoubleForward:"KeyK"===ce}),Dt();break;case"KeyM":{pa({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:j,isAds:e.isAds})&&(e.showHotKeyHelpers({type:I()?"VOLUME":"MUTE"}),A.actions.internal.toggleMuted()),Dt();break}case"KeyF":e.toggleFullscreen(),Dt();break;case"KeyC":A.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(hi=N())==null?void 0:hi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Dt();break;case"KeyI":A.actions.internal.togglePictureInPicture(),Dt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.1,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.2,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.3,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.4,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.5,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.6,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.7,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.8,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(.9,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),A.actions.internal.seekToPercent(0,Ln.SeekAction.DOUBLE_TAP),Dt();break;case"Slash":{fe.shiftKey&&Q.features.hotKeyMapModal&&(e.showKeyMap(),Dt());break}case"KeyN":fe.shiftKey&&k()&&(A.actions.internal.nextVideoClick(),Dt());break;case"KeyP":fe.shiftKey&&E()&&(A.actions.internal.prevVideoClick(),Dt());break;case"ShiftLeft":case"ShiftRight":Dt();break;case"Tab":case"Escape":case"Enter":break;default:(0,hb.checkNever)(ce);break}return ji},vt=fe=>{let Me=fe.code;if(fe.ctrlKey||fe.altKey||fe.metaKey)return;let wt=d()===fa.PlaybackState.PLAYING||d()===fa.PlaybackState.PAUSED,Lt=e.isAds&&(f()==="paused"||f()==="playing");if(wt||Lt)switch(Me){case"ShiftLeft":case"ShiftRight":Ae=0;break;case"Space":Pe({type:"up"});break}},Ht=G("aria_label_video_player"),dt=()=>{var fe;return(fe=n(ze))==null?void 0:fe.focus()},Ct=()=>n(ze)===rp(),ri=fe=>fe.type==="keydown"?Ft(fe,!0):(fe.type==="keyup"&&vt(fe),!1);var Ot=E0();Ot.__keyup=vt,Ot.__keydown=[I0,Ft];var $e=C(Ot);ai($e,()=>{var fe;return(fe=e.children)!=null?fe:_t}),S(Ot),Xe(Ot,fe=>O(ze,fe),()=>n(ze)),D(()=>Ve(Ot,"aria-label",Ht)),b(t,Ot);var be=F({focus:dt,isFocused:Ct,handleExternalKeyboardEvent:ri});return o(),be}Je(["keyup","keydown"]);var P0=M('<div class="container s-x"><div class="dot s-x"></div> <div class="dot s-x"></div> <div class="dot s-x"></div></div>'),A0={hash:"s-x",code:".container.s-x{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-x:first-child{animation-delay:0s}.dot.s-x:nth-child(2){animation-delay:.18s}.dot.s-x:nth-child(3){animation-delay:.36s}@keyframes s-x-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-x{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-x-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-x+.dot:where(.s-x){margin-left:4px}"};function Ya(t,e){q(t,A0);let i=h(e,"style",3,"");var o=P0();D(()=>Qe(o,i())),b(t,o)}var L0=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 xm(t,e){Ze(t,{get fill(){return e.fill},children:(i,o)=>{var r=L0();b(i,r)},$$slots:{default:!0}})}var ja=require("@vkontakte/videoplayer-shared/es2015"),M0=t=>{t.stopPropagation()},V0=M("<button><!></button>"),R0={hash:"s-1k",code:"button.btn.s-1k{align-items:center;display:flex;flex-direction:row;height:var(--controls-height);justify-content:center;margin:0;padding:8px;will-change:opacity}button.w-max.s-1k{width:100%}button.btn--live.s-1k{padding:10px 4px}button.btn-jc-l.s-1k{justify-content:left}button.btn-m.s-1k{background-color:rgba(0,0,0,.56);border-radius:12px;height:44px;left:12px;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}button.btn-m.s-1k,button.btn-m--play.s-1k{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1k{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1k,button.btn-m--prev.s-1k{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1k{right:calc(100% + 35px)}button.btn-m--next.s-1k{left:calc(100% + 35px)}button.btn.s-1k:disabled{cursor:default;pointer-events:none}button.btn.s-1k:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1k:not(:disabled):hover{opacity:.8}button.pr-0.s-1k{padding-right:0}button.pl-0.s-1k{padding-left:0}"};function Gt(t,e){B(e,!0),q(t,R0);let i=h(e,"className",3,""),o=h(e,"style",3,""),r=h(e,"disabled",3,void 0),a=h(e,"testId",3,void 0),l=h(e,"ariaHidden",3,void 0),d=h(e,"ariaLabel",3,void 0),s=h(e,"ref",15,void 0),u=h(e,"ariaKeyShortCut",3,void 0),v=h(e,"ariaExpanded",3,void 0),p=h(e,"tabIndex",3,0),f=h(e,"click",3,ja.noop),$=h(e,"focus",3,ja.noop),y=h(e,"blur",3,ja.noop),g=m(()=>f()===ja.noop?null:k=>{k.stopPropagation(),f()(k)}),w=m(()=>$()===ja.noop?null:k=>{k.preventDefault(),$()()}),T=m(()=>y()===ja.noop?null:k=>{k.preventDefault(),y()()});var I=V0();I.__pointerdown=[M0],I.__click=function(...k){var E;(E=n(g))==null||E.apply(this,k)};var N=C(I);ai(N,()=>{var k;return(k=e.children)!=null?k:_t}),S(I),Xe(I,k=>s(k),()=>s()),D(()=>{var k,E,A,Q,H,z,Y,le;se(I,1,`btn ${(k=i())!=null?k:""}`,"s-1k"),Qe(I,o()||null),I.disabled=(E=r())!=null?E:null,Ve(I,"aria-hidden",(A=l())!=null?A:null),Ve(I,"aria-label",(Q=d())!=null?Q:null),Ve(I,"aria-keyshortcuts",(H=u())!=null?H:null),Ve(I,"aria-expanded",(z=v())!=null?z:null),Ve(I,"data-testid",(Y=a())!=null?Y:null),Ve(I,"tabindex",p()),Ve(I,"role",e.role),Ve(I,"aria-checked",(le=e.areaChecked)!=null?le:null)}),lt("focus",I,function(...k){var E;(E=n(w))==null||E.apply(this,k)}),lt("blur",I,function(...k){var E;(E=n(T))==null||E.apply(this,k)}),b(t,I),F()}Je(["pointerdown","click"]);var N0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},O0=M('<div class="modal-header s-18"><h3 class="modal-title s-18"> </h3> <!></div>'),D0=M('<div class="modal-overlay s-18"><div class="modal-container s-18" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-18" tabindex="0" role="scrollbar"><div class="modal-main s-18"><!></div></div></div></div>'),B0={hash:"s-18",code:'.modal-overlay.s-18{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-18{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-18{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-18{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-18{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-18::-webkit-scrollbar{width:8px}.modal-scroll.s-18::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-18::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-18::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-18{margin:-8px -4px 0 0}'};function wm(t,e){B(e,!0),q(t,B0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=W(void 0),a=W(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Rt(()=>{var g;return(g=n(r))==null||g.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=D0();s.__keydown=[N0,e];var u=C(s),v=C(u);{var p=g=>{var w=O0(),T=C(w),I=C(T,!0);S(T);var N=L(T,2);{var k=E=>{Gt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(A,Q)=>{xm(A,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(k)})}S(w),D(()=>me(I,e.title)),b(g,w)};R(v,g=>{i()&&g(p)})}var f=L(v,2),$=C(f),y=C($);ai(y,()=>{var g;return(g=e.children)!=null?g:_t}),S($),S(f),Xe(f,g=>O(r,g),()=>n(r)),S(u),Xe(u,g=>O(a,g),()=>n(a)),S(s),b(t,s),F()}Je(["keydown"]);var F0=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;F0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var H0=M('<li class="hot-key-map-item s-n"><span class="hot-key-map-item-description s-n"><!></span> &nbsp; <span class="hot-key-map-item-value s-n"> </span></li>'),U0=M('<div class="hot-key-map-group s-n"><h5 class="hot-key-map-group-title s-n"> </h5> <ul class="hot-key-map-group-items s-n"></ul></div>'),z0=M('<div class="hot-key-map s-n"></div>'),W0={hash:"s-n",code:'.hot-key-map.s-n{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-n{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-n:last-child{border-bottom:none}.hot-key-map-group-title.s-n{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-n,.hot-key-map-item.s-n{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-n{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-n{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-n{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-n{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-n,.hot-key-map-item-value.s-n{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Sm(t,e){B(e,!1),q(t,W0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};Co(),wm(t,{get title(){return r().title},onClose:s,children:(u,v)=>{var p=z0();yi(p,5,()=>r().groups,({title:f,items:$})=>f,(f,$)=>{let y=()=>n($).title,g=()=>n($).items;var w=U0(),T=C(w),I=C(T,!0);S(T);var N=L(T,2);yi(N,5,g,({description:k,value:E})=>E,(k,E)=>{let A=()=>n(E).description,Q=()=>n(E).value;var H=H0(),z=C(H),Y=C(z);zd(Y,()=>_b(A())),S(z);var le=L(z,2),X=C(le,!0);S(le),S(H),D(()=>me(X,Q())),b(k,H)}),S(N),S(w),D(()=>me(I,y())),b(f,w)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}var $v=require("@vkontakte/videoplayer-shared/es2015");var ol=require("@vkontakte/videoplayer-core/es2015");var bb=require("@vkontakte/videoplayer-shared/es2015");var K0=M('<div class="pillow s-1y"><!></div>'),q0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Tm(t,e){q(t,q0);var i=K0(),o=C(i);ai(o,()=>{var r;return(r=e.children)!=null?r:_t}),S(i),D(()=>Ve(i,"data-testid",e.testId)),b(t,i)}var Zl=require("@vkontakte/videoplayer-shared/es2015");var Q0=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 Cm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=Q0();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(),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 Im(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=G0();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(),S(o),b(t,o)}var Y0=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 Em(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=Y0();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(),S(o),b(t,o)}var j0=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 km(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=j0();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(),S(o),b(t,o)}var X0=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 Pm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=X0();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(),S(o),b(t,o)}var sp=t=>{switch(t){case Zl.VideoQuality.Q_720P:return Em;case Zl.VideoQuality.Q_1080P:return km;case Zl.VideoQuality.Q_1440P:return Pm;case Zl.VideoQuality.Q_2160P:return Cm;case Zl.VideoQuality.Q_4320P:return Im}};var Z0=Ce('<path d="M12.72 2.21q1.8.07 2.41 1.96l.06.21.06.2.06.23.06.16.04.01.06-.02.14-.05.15-.07c1.42-.66 2.5-.53 3.4.44l.12.14.82 1.02c.73.96.7 2 0 3.1l-.13.19-.12.16-.14.2-.07.12-.04.05v.03l.1.06.13.07.15.09c1.39.7 1.96 1.64 1.74 2.93l-.04.19-.24 1.06c-.16.68-.28 1-.77 1.45-.48.43-1.02.61-1.73.67l-.22.02h-.2l-.25.02-.18.02.02.14v.1l.04.17c.32 1.53-.04 2.56-1.19 3.2l-.17.1-1.17.57q-1.64.73-3.02-.7l-.15-.17-.13-.15-.17-.19-.1-.1-.05-.04-.1.09-.1.1-.12.14c-.95 1.13-1.95 1.54-3.17 1.07l-.18-.08-1.05-.5-.31-.17a2 2 0 0 1-1-1.06 3 3 0 0 1-.16-1.88l.04-.23.04-.24.02-.17-.1-.02-.15-.01h-.18c-1.56-.04-2.48-.62-2.85-1.89l-.05-.18-.3-1.28q-.33-1.77 1.37-2.78l.2-.11.17-.1.22-.12.15-.1v-.02l-.06-.1-.08-.13-.1-.14c-.94-1.25-1.04-2.34-.28-3.4L4 6.32l.82-1.01c.8-.92 1.8-1.1 3.04-.64l.2.08.19.08.22.1.13.04.04-.01.03-.1.05-.13.04-.17c.36-1.43 1.09-2.24 2.4-2.35h1.58Zm-.05 1.8h-1.34l-.14.01c-.28.04-.47.2-.65.83l-.04.16-.06.2a6 6 0 0 1-.46 1.14 6 6 0 0 0-1.15.56 7 7 0 0 1-1.16-.35l-.35-.16q-.37-.15-.59-.17h-.08a.6.6 0 0 0-.4.19l-.08.07-.78.98-.1.12c-.18.26-.2.5.2 1.08l.22.31q.34.48.6 1.1-.2.59-.27 1.2-.51.45-1.01.73l-.34.18c-.62.34-.7.56-.65.88l.01.08.28 1.21.04.16c.1.3.27.47.97.5l.39.02q.57.03 1.22.2.35.53.78.97a6 6 0 0 1-.12 1.45c-.2.95-.01 1.1.38 1.3l1.13.54a1 1 0 0 0 .34.1l.06-.01q.26-.03.67-.49l.26-.3q.4-.42.95-.83l.3.02.3.01h.3l.3-.03q.56.4.95.84l.26.3c.32.36.53.48.73.48h.07l.18-.05.09-.04 1.13-.54.14-.08c.3-.17.42-.4.24-1.22a6 6 0 0 1-.12-1.45q.44-.45.78-.97a7 7 0 0 1 1.22-.2l.39-.01c.81-.04.91-.26 1-.66l.27-1.15c.09-.4.1-.64-.62-1.03l-.34-.18a6 6 0 0 1-1.01-.73 6 6 0 0 0-.27-1.2q.26-.62.6-1.1l.22-.31c.4-.58.38-.81.2-1.08l-.05-.06-.78-.97c-.14-.18-.26-.3-.46-.33h-.07q-.23 0-.67.17l-.35.16a6 6 0 0 1-1.16.35 6 6 0 0 0-1.15-.56 7 7 0 0 1-.45-1.1l-.11-.4c-.2-.68-.4-.81-.72-.83zM12 8.2a3.8 3.8 0 1 1 0 7.6 3.8 3.8 0 0 1 0-7.6m0 1.8a2 2 0 1 0 0 4 2 2 0 0 0 0-4"></path>');function Am(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=Z0();b(i,r)},$$slots:{default:!0}})}var J0=Ce('<path d="M13.25 2.83c.23.75.38 1.5 1.63 2.23 1.4.38 2.08 0 2.72-.42.66-.45.86-.32 1.12-.06l.65.64c.29.3.4.42 0 1.18-.38.7-.8 1.33-.42 2.73.72 1.25 1.47 1.47 2.22 1.62.78.16.83.39.83.76v.9c0 .42 0 .59-.83.84-.75.23-1.5.38-2.23 1.63-.38 1.4 0 2.08.42 2.72.45.66.32.86.06 1.12l-.64.65c-.3.29-.42.4-1.18 0-.7-.38-1.34-.8-2.73-.42-1.25.72-1.47 1.47-1.62 2.22-.16.78-.39.83-.76.83h-.9c-.42 0-.59 0-.84-.83-.23-.75-.38-1.5-1.63-2.23-1.4-.38-2.08 0-2.72.42-.66.45-.86.32-1.12.06l-.65-.64c-.29-.3-.4-.42 0-1.18.38-.7.8-1.34.42-2.73-.72-1.25-1.47-1.47-2.22-1.62-.78-.16-.83-.39-.83-.76v-.9c0-.42 0-.59.83-.84.75-.23 1.5-.38 2.22-1.63.38-1.4 0-2.08-.42-2.72-.44-.66-.31-.86-.05-1.12l.64-.65c.3-.29.42-.4 1.18 0 .7.38 1.33.8 2.73.42 1.25-.72 1.47-1.47 1.62-2.22.16-.78.39-.83.76-.83h.9c.42 0 .59 0 .84.83M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5"></path>');function Lm(t,e){Ze(t,{get testId(){return e.testId},children:(i,o)=>{var r=J0();b(i,r)},$$slots:{default:!0}})}var ex=M('<div aria-hidden="true"><!> <!></div>'),tx={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 pc(t,e){B(e,!0),q(t,tx);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=m(()=>o()?(0,bb.getVideoQualityLabel)(o()):""),a=m(()=>sp(o())),l=m(()=>n(r).length>2);var d=Le(),s=de(d);{var u=p=>{Am(p,{testId:"settings-mobile-icon"})},v=p=>{var f=ex();let $;var y=C(f);{var g=I=>{let N=m(()=>`${n(r)}-pill-icon`);Tm(I,{get testId(){return n(N)},children:(k,E)=>{var A=Le(),Q=de(A);Di(Q,()=>n(a),(H,z)=>{z(H,{})}),b(k,A)},$$slots:{default:!0}})};R(y,I=>{n(a)&&I(g)})}var w=L(y,2);let T=m(()=>n(a)?"settings-icon--labeled":"settings-icon");Lm(w,{get testId(){return n(T)}}),S(f),D(I=>$=se(f,1,"icon s-1v",null,$,I),[()=>({triple:n(l)})]),b(p,f)};R(s,p=>{i()?p(u):p(v,!1)})}b(t,d),F()}var ix=M('<span class="settings-icon-wrapper s-1z"><!></span>'),ox={hash:"s-1z",code:".settings-icon-wrapper.s-1z{position:relative;width:24px}"};function Jl(t,e){B(e,!0),q(t,ox);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(f,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,v=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,f=d.ui.isMobile,$=d.ui.t,y=W(void 0);Oe(()=>{n(y)&&Et(()=>{e.ref$.set(n(y))})});let g=$("aria_label_settings");function w(I){return ht(this,null,function*(){let N=ua(I);r()?p():v(N,yo)})}let T=m(()=>r()?"opened":"");Gt(t,{get className(){return n(T)},testId:"settings-btn",click:w,get ariaLabel(){return g},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(I){O(y,I,!0)},children:(I,N)=>{var k=ix(),E=C(k);pc(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(k),b(I,k)},$$slots:{default:!0}}),F(),o()}var nx=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),rx=Ce("<path></path>");function ma(t,e){B(e,!0);let i=m(()=>`subtitles-icon-${e.type==="off"?"off":e.type==="outline"?"outline":""}`),o=m(()=>vn(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=de(l);{var s=v=>{var p=nx();fi(),b(v,p)},u=v=>{var p=rx();D(()=>Ve(p,"d",`M16.92 8h14.16q2.82-.02 4.66.1c1.28.1 2.4.32 3.46.86a8.8 8.8 90 013.84 3.84c.54 1.04.76 2.18.86 3.46q.12 1.84.1 4.66v6.16q.02 2.82-.1 4.66a10 10 90 01-.86 3.46 8.8 8.8 90 01-3.84 3.84 10 10 90 01-3.46.86q-1.84.12-4.66.1H16.92q-2.82.02-4.66-.1a10 10 90 01-3.46-.86 8.8 8.8 90 01-3.84-3.84 10 10 90 01-.86-3.46Q4 29.9 4 27.08v-6.16q-.02-2.82.1-4.66c.1-1.28.32-2.4.86-3.46A8.8 8.8 90 018.8 8.96a10 10 90 013.46-.86Q14.1 8 16.92 8
58
+ Audio: ${(st=n(s).audioCodec||"")!=null?st:""} ${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=s0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).viewport)),b(Y,Se)};R($e,Y=>{n(s).viewport&&Y(ee)})}var Ne=A($e,2);{var fe=Y=>{var Se=a0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).videoSize)),b(Y,Se)};R(Ne,Y=>{n(s).videoSize&&Y(fe)})}var k=A(Ne,2);{var Ke=Y=>{var Se=l0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(()=>me(he,n(s).cdn)),b(Y,Se)};R(k,Y=>{n(s).cdn&&Y(Ke)})}var Te=A(k,2);{var Z=Y=>{var Se=d0(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(()=>{var Ve;return me(he,`${(Ve=n(s).volume)!=null?Ve:""} %`)}),b(Y,Se)};R(Te,Y=>{n(s).volume&&Y(Z)})}var ie=A(Te,2);{var De=Y=>{var Se=c0(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).position.toFixed(2)]),b(Y,Se)};R(ie,Y=>{n(s).position&&Y(De)})}var Be=A(ie,2);{var ot=Y=>{var Se=u0(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).buffer.toFixed(2)]),b(Y,Se)};R(Be,Y=>{n(s).buffer&&Y(ot)})}var U=A(Be,2);{var Ae=Y=>{var Se=p0(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).nativeBuffer.toFixed(2)]),b(Y,Se)};R(U,Y=>{n(s).nativeBuffer&&Y(Ae)})}var ke=A(U,2);{var ze=Y=>{var Se=f0(),le=A(T(Se),2),he=T(le);S(le),S(Se),D(Ve=>me(he,`${Ve!=null?Ve:""} s`),[()=>n(s).liveLatency.toFixed(2)]),b(Y,Se)};R(ke,Y=>{n(s).liveLatency&&Y(ze)})}var it=A(ke,2);{var ye=Y=>{var Se=m0(),le=A(T(Se),2),he=T(le,!0);S(le),S(Se),D(Ve=>me(he,Ve),[()=>[{value:n(s).currentVideoSegmentLength,title:"Video:"},{value:n(s).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ve})=>Ve).map(({value:Ve,title:st})=>`${st} ${((Ve!=null?Ve:0)/1e3).toFixed(2)} s`).join(" & ")]),b(Y,Se)};R(it,Y=>{(n(s).currentVideoSegmentLength||n(s).currentAudioSegmentLength)&&Y(ye)})}var Ie=A(it,2),Fe=A(T(Ie),2),Dt=T(Fe);S(Fe),S(Ie);var vt=A(Ie,2);{var Ht=Y=>{var Se=v0(),le=A(T(Se),2);cc(le,{get values(){return n(I)}});var he=A(le,2),Ve=T(he);S(he),S(Se),D(st=>me(Ve,`${st!=null?st:""} Kbps`),[()=>n(s).speed.toFixed(2)]),b(Y,Se)};R(vt,Y=>{n(s).speed&&Y(Ht)})}var ct=A(vt,2);{var St=Y=>{var Se=g0(),le=A(T(Se),2);cc(le,{get values(){return n(C)}});var he=A(le,2),Ve=T(he);S(he),S(Se),D(st=>me(Ve,`${st!=null?st:""} Kbps`),[()=>n(s).bitrate.toFixed(2)]),b(Y,Se)};R(ct,Y=>{n(s).bitrate&&Y(St)})}var ni=A(ct,2),At=A(T(ni),2);cc(At,{get values(){return n(w)}});var Bt=A(At,2),Ut=T(Bt,!0);S(Bt),S(ni),S(q),S(L),D(Y=>{var Se,le;E=se(L,1,"container s-y",null,E,Y),Me(L,"aria-label",N),me(j,n(s).version),me(Dt,`${(Se=n(p))!=null?Se:""} / ${(le=n(f))!=null?le:""} frames`),me(Ut,n(v))},[()=>({"container-mobile":r()})]),b(t,L),F(),o()}je(["click"]);var gb=require("@vkontakte/videoplayer-shared/es2015"),b0=(t,e)=>{t.stopPropagation(),e()()},$0=M('<div class="close s-1b"></div>'),y0={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),Q(t,y0);let i=h(e,"onClick",3,gb.noop);var o=$0();o.__click=[b0,i],b(t,o),F()}je(["click"]);var hb=require("@vkontakte/videoplayer-shared/es2015");var vn=t=>`width:${t}px;height:${t}px;`;var x0=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 Vn(t,e){B(e,!0);let i=m(()=>vn(e.size));Je(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=x0();b(o,a)},$$slots:{default:!0}}),F()}var w0=M('<div class="timer s-19"><canvas class="timer-canvas s-19" width="100" height="100"></canvas> <!></div>'),S0={hash:"s-19",code:".timer.s-19{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-19:hover{background:rgba(31,31,31,.85)}.timer-canvas.s-19{height:50px;position:absolute;width:50px}"};function pc(t,e){B(e,!0),Q(t,S0);let i=h(e,"isRunning",3,!0),o=h(e,"onTimerEnded",3,hb.noop),r=5e3,a=K(void 0),l,d,s=0,u;Oe(()=>{i()&&It(()=>{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()())};Vt(()=>{l=n(a).getContext("2d"),l&&(l.lineWidth=6,l.lineCap="round",l.strokeStyle="#fff")}),mn(()=>{f()});var v=w0(),$=T(v);Ze($,g=>O(a,g),()=>n(a));var y=A($,2);Vn(y,{get size(){return"24"}}),S(v),b(t,v),F()}var C0=(t,e,i)=>{e(!1),i()},T0=M('<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),I0={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%;position:absolute;top:50%;transform:translate(-50%,-50%);width:362px}.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 bm(t,e){B(e,!0),Q(t,I0);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{r()&&(u(!1),v())},g=()=>{e.clickCloseIcon(),$()};Vt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ce(w);{var C=N=>{var L=T0(),E=A(ce(L),2),P=T(E),q=T(P),H=T(q,!0);S(q);var z=A(q,2);Rs(z,{onClick:g}),S(P);var j=A(P,2);j.__click=[C0,u,p];var ae=T(j),X=T(ae),ne=T(X);let J;var we=A(ne,2);{var pe=ee=>{let Ne=m(()=>a()&&r());pc(ee,{get isRunning(){return n(Ne)},onTimerEnded:y})};R(we,ee=>{r()&&ee(pe)})}S(X),S(ae);var re=A(ae,2),_e=T(re),$e=T(_e,!0);S(_e),S(re),S(j),S(E),D((ee,Ne)=>{me(H,ee),Qe(X,`background-image: url('${e.thumb}')`),J=se(ne,1,"thumb-overlay s-m",null,J,Ne),me($e,e.title)},[()=>G("end_screen_next_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(C)})}b(t,w),F(),o()}je(["click"]);var da=require("@vkontakte/videoplayer-core/es2015"),_b=require("@vkontakte/videoplayer-shared/es2015"),Rn=require("@vkontakte/videoplayer-statistics/es2015");var $m=(t,e)=>Math.min(+(t+e).toFixed(2),1),ym=(t,e)=>Math.max(+(t-e).toFixed(2),0),np=(t,e,i)=>{let o=$m(e,i);e<1&&t.actions.internal.setVolume(o)},rp=(t,e,i)=>{let o=ym(e,i);e>0&&t.actions.internal.setVolume(o)};var la=({isAudioDisabled:t,isAudioAvailable:e,isAds:i,audioDisabledHintCallback:o,audioIsNotExistHintCallback:r})=>t?i?!0:(o==null||o(),!1):e?!0:(r==null||r(),!1);function sp(){var t,e,i;return(i=(e=(t=document.activeElement)==null?void 0:t.shadowRoot)==null?void 0:e.activeElement)!=null?i:null}var P0=(t,e)=>{e(t)},k0=M('<div class="keyboard-controls s-p" tabindex="-1" role="region"><!></div>'),A0={hash:"s-p",code:".keyboard-controls.s-p{bottom:0;left:0;position:absolute;right:0;top:0}"};function xm(t,e){var Y,Se;B(e,!0),Q(t,A0);let[i,o]=Re(),r=()=>x(we,"$disabledControls$",i),a=()=>x(ot,"$isInteractiveTime$",i),l=()=>x(U,"$showInteractiveTimeIndicatorTooltip$",i),d=()=>x(z,"$playbackState$",i),s=()=>x(Ke,"$isEnded$",i),u=()=>x(fe,"$doubleForwardAvailable$",i),f=()=>x(Ne,"$doubleForwardOn$",i),p=()=>x(Te,"$overlayContainer$",i),v=()=>x(ae,"$adPlaybackState",i),$=()=>x(X,"$positionExact$",i),y=()=>x(ne,"$duration$",i),g=()=>x(De,"$isAudioAvailable$",i),w=()=>x(J,"$volume$",i),I=()=>x(j,"$canChangePlaybackSpeed$",i),C=()=>x(pe,"$muted$",i),N=()=>x(re,"$currentSubtitle$",i),L=h(e,"nextButtonActive",3,!1),E=h(e,"prevButtonActive",3,!1),P=ve(),q=Rt(),H=P.getLogger().createComponentLog("KeyboardControls component"),z=P.state.playbackState$,j=P.state.canChangePlaybackSpeed$,ae=P.ads.playbackState,X=P.state.positionExact$,ne=P.state.duration$,J=P.state.volume$,we=P.ui.controls.disabledControls$,pe=P.state.muted$,re=P.state.currentSubtitle$,_e=P.ui.contextMenu.openedByHotKey$,$e=P.ui.contextMenu.lastActiveElem$,ee=P.ui.contextMenu.visible$,Ne=P.ui.doubleForwardOn$,fe=P.ui.doubleForwardAvailable$,k=P.ui.contextMenu.position$,Ke=P.state.isEnded$,Te=P.ui.overlayContainer$,Z=(Y=P.callbacks)==null?void 0:Y.onAudioDoesNotExistHint,ie=(Se=P.callbacks)==null?void 0:Se.onAudioDisabledHint,De=P.state.isAudioAvailable$,Be=P.state.isAudioDisabled,ot=P.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:U}=Co(),Ae=0,ke=!0,ze=K(void 0),it=le=>(le!==ke&&(ke=le,Ae=0),Ae+=1,(q.controls.seekStepKeyboard+q.controls.seekStepKeyboard*Ae)/1e3),ye=!0,Ie=({type:le,repeat:he,disableDoubleForward:Ve})=>{let st=()=>{if(!r().has("PLAY_BUTTON"))if(a()&&l()&&U.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{P.actions.internal.togglePlay();let ue="PLAY";d()===da.PlaybackState.PAUSED?ue="PAUSE":s()&&(ue="REPLAY"),e.showHotKeyHelpers({type:ue})}},mt=le==="down";if(!u()||Ve){mt&&st(),ye=!0;return}if(mt)ye=!1;else if(ye)return;if(mt){!he&&e.startDoubleForwardActivationTimer();return}f()||st(),e.stopDoubleForward(),ye=!0},Fe=le=>{let he=mb(p());k.set(he),$e.set(le.target),_e.set(!0),ee.set(!0)},Dt=(le,he=!1)=>{var fi,hi;let Ve=le.target,st=(fi=Ve==null?void 0:Ve.getAttribute("role"))==null?void 0:fi.includes("menuitem"),mt=Ve.classList.contains("btn"),ue=le.code;if(mt&&ue==="Space")return!1;let We=v_.has(ue);if(st&&We)return!1;let Ye=!m_.has(ue);if(le.ctrlKey&&Ye||le.altKey&&Ye||le.metaKey)return!1;let ut=st&&ue==="Escape";g_.has(ue)||ut||e.hideContextMenu();let zt=d()===da.PlaybackState.PLAYING||d()===da.PlaybackState.PAUSED,Wt=e.isAds&&(v()==="paused"||v()==="playing"),ri=!Wt&&!r().has("TIMELINE"),$i=le.shiftKey&&["Digit1","Numpad1"].includes(ue);if(!$i&&!(zt||Wt))return!1;H({message:`key down, code: ${ue}, isExternal = ${he}`});let Xi=!1,Nt=()=>{Xi=!0,he||le.preventDefault()};if($i)return Fe(le),Nt(),!0;switch(ue){case"KeyJ":case"ArrowLeft":{if(!ri)break;if(le.ctrlKey||le.altKey){let bt=P.actions.internal.getPrevEpisode();P.actions.internal.seekToPrevEpisode(bt),bt&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:bt.text}),Nt()}else{let bt=le.shiftKey?it(!1):q.controls.seekStepKeyboard/1e3,ei=Math.max($()-bt,0);$()>0&&(P.actions.internal.seekTime(ei,Rn.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:bt.toString()}),Nt())}break}case"KeyL":case"ArrowRight":{if(!ri)break;if(le.ctrlKey||le.altKey){let bt=P.actions.internal.getNextEpisode();P.actions.internal.seekToNextEpisode(bt),bt&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:bt.text}),Nt()}else{let bt=le.shiftKey?it(!0):q.controls.seekStepKeyboard/1e3,ei=Math.min($()+bt,y());Math.round($())<Math.round(y())&&(P.actions.internal.seekTime(ei,Rn.SeekAction.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:bt.toString()}),Nt())}break}case"ArrowUp":{if(la({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let bt=w(),ei=q.controls.volumeStepKeyboard,wi=bt<=1;if(np(P,bt,ei),wi){let Zi=Math.round($m(bt,ei)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Zi}})}}Nt();break}case"ArrowDown":{if(la({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:Z,isAds:e.isAds})){let bt=w(),ei=q.controls.volumeStepKeyboard,wi=bt>=0;if(rp(P,bt,ei),wi){let Zi=Math.round(ym(bt,ei)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Zi}})}}Nt();break}case"Comma":{if(le.shiftKey){if(!f()&&I()){let bt=P.actions.internal.decrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_DOWN",text:bt==null?void 0:bt.displayValue}),Nt()}}else{if(Wt||d()!==da.PlaybackState.PAUSED)break;let bt=Math.max($()-q.controls.seekStepFrame/1e3,0);$()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(bt,Rn.SeekAction.DOUBLE_TAP),Nt())}break}case"Period":{if(le.shiftKey){if(!f()&&I()){let bt=P.actions.internal.incrementPlaybackRate();e.showHotKeyHelpers({type:"RATE_UP",text:bt==null?void 0:bt.displayValue}),Nt()}}else{if(Wt||d()!==da.PlaybackState.PAUSED)break;let bt=Math.min($()+q.controls.seekStepFrame/1e3,y());$()<y()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),P.actions.internal.clearDelayedBufferingCheckTimeout(),P.actions.internal.seekTime(bt,Rn.SeekAction.DOUBLE_TAP),Nt())}break}case"KeyK":case"Space":Ie({type:"down",repeat:le.repeat,disableDoubleForward:"KeyK"===ue}),Nt();break;case"KeyM":{la({isAudioDisabled:Be,audioDisabledHintCallback:ie,isAudioAvailable:g(),audioIsNotExistHintCallback:Z,isAds:e.isAds})&&(e.showHotKeyHelpers({type:C()?"VOLUME":"MUTE"}),P.actions.internal.toggleMuted()),Nt();break}case"KeyF":e.toggleFullscreen(),Nt();break;case"KeyC":P.actions.internal.toggleSubtitle(),N().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:(hi=N())==null?void 0:hi.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),Nt();break;case"KeyI":P.actions.internal.togglePictureInPicture(),Nt();break;case"Digit1":case"Numpad1":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.1,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.2,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.3,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.4,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.5,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.6,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.7,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.8,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(.9,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),P.actions.internal.seekToPercent(0,Rn.SeekAction.DOUBLE_TAP),Nt();break;case"Slash":{le.shiftKey&&q.features.hotKeyMapModal&&(e.showKeyMap(),Nt());break}case"KeyN":le.shiftKey&&L()&&(P.actions.internal.nextVideoClick(),Nt());break;case"KeyP":le.shiftKey&&E()&&(P.actions.internal.prevVideoClick(),Nt());break;case"ShiftLeft":case"ShiftRight":Nt();break;case"Tab":case"Escape":case"Enter":break;default:(0,_b.checkNever)(ue);break}return Xi},vt=le=>{let he=le.code;if(le.ctrlKey||le.altKey||le.metaKey)return;let Ve=d()===da.PlaybackState.PLAYING||d()===da.PlaybackState.PAUSED,st=e.isAds&&(v()==="paused"||v()==="playing");if(Ve||st)switch(he){case"ShiftLeft":case"ShiftRight":Ae=0;break;case"Space":Ie({type:"up"});break}},Ht=G("aria_label_video_player"),ct=()=>{var le;return(le=n(ze))==null?void 0:le.focus()},St=()=>n(ze)===sp(),ni=le=>le.type==="keydown"?Dt(le,!0):(le.type==="keyup"&&vt(le),!1);var At=k0();At.__keyup=vt,At.__keydown=[P0,Dt];var Bt=T(At);si(Bt,()=>{var le;return(le=e.children)!=null?le:_t}),S(At),Ze(At,le=>O(ze,le),()=>n(ze)),D(()=>Me(At,"aria-label",Ht)),b(t,At);var Ut=F({focus:ct,isFocused:St,handleExternalKeyboardEvent:ni});return o(),Ut}je(["keyup","keydown"]);var L0=M('<div class="container s-k"><div class="dot s-k"></div> <div class="dot s-k"></div> <div class="dot s-k"></div></div>'),M0={hash:"s-k",code:".container.s-k{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-k:first-child{animation-delay:0s}.dot.s-k:nth-child(2){animation-delay:.18s}.dot.s-k:nth-child(3){animation-delay:.36s}@keyframes s-k-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-k{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-k-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-k+.dot:where(.s-k){margin-left:4px}"};function Ga(t,e){Q(t,M0);let i=h(e,"style",3,"");var o=L0();D(()=>Qe(o,i())),b(t,o)}var V0=Ce('<path d="M5.26 5.26a.9.9 0 0 1 1.28 0L12 10.73l5.46-5.47a.9.9 0 0 1 1.28 1.28L13.27 12l5.47 5.46a.9.9 0 1 1-1.28 1.28L12 13.27l-5.46 5.47a.9.9 0 1 1-1.28-1.28L10.73 12 5.26 6.54a.9.9 0 0 1 0-1.28Z"></path>');function wm(t,e){Je(t,{get fill(){return e.fill},children:(i,o)=>{var r=V0();b(i,r)},$$slots:{default:!0}})}var Ya=require("@vkontakte/videoplayer-shared/es2015"),R0=t=>{t.stopPropagation()},N0=M("<button><!></button>"),O0={hash:"s-1l",code:"button.btn.s-1l{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-1l{width:100%}button.btn--live.s-1l{padding:10px 4px}button.btn-jc-l.s-1l{justify-content:left}button.btn-m.s-1l{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-1l,button.btn-m--play.s-1l{align-items:center;display:flex;justify-content:center}button.btn-m--play.s-1l{height:var(--big-play-size);padding:16px;position:relative;width:var(--big-play-size)}button.btn-m--next.s-1l,button.btn-m--prev.s-1l{height:50px;position:absolute;width:50px}button.btn-m--prev.s-1l{right:calc(100% + 35px)}button.btn-m--next.s-1l{left:calc(100% + 35px)}button.btn.s-1l:disabled{cursor:default;pointer-events:none}button.btn.s-1l:not(.btn-full-opacity):disabled{opacity:.4}button.btn.s-1l:not(:disabled):hover{opacity:.8}button.pr-0.s-1l{padding-right:0}button.pl-0.s-1l{padding-left:0}"};function Gt(t,e){B(e,!0),Q(t,O0);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,Ya.noop),$=h(e,"focus",3,Ya.noop),y=h(e,"blur",3,Ya.noop),g=m(()=>v()===Ya.noop?null:L=>{L.stopPropagation(),v()(L)}),w=m(()=>$()===Ya.noop?null:L=>{L.preventDefault(),$()()}),I=m(()=>y()===Ya.noop?null:L=>{L.preventDefault(),y()()});var C=N0();C.__pointerdown=[R0],C.__click=function(...L){var E;(E=n(g))==null||E.apply(this,L)};var N=T(C);si(N,()=>{var L;return(L=e.children)!=null?L:_t}),S(C),Ze(C,L=>s(L),()=>s()),D(()=>{var L,E,P,q,H,z,j,ae;se(C,1,`btn ${(L=i())!=null?L:""}`,"s-1l"),Qe(C,o()||null),C.disabled=(E=r())!=null?E:null,Me(C,"aria-hidden",(P=l())!=null?P:null),Me(C,"aria-label",(q=d())!=null?q:null),Me(C,"aria-keyshortcuts",(H=u())!=null?H:null),Me(C,"aria-expanded",(z=f())!=null?z:null),Me(C,"data-testid",(j=a())!=null?j:null),Me(C,"tabindex",p()),Me(C,"role",e.role),Me(C,"aria-checked",(ae=e.areaChecked)!=null?ae:null)}),dt("focus",C,function(...L){var E;(E=n(w))==null||E.apply(this,L)}),dt("blur",C,function(...L){var E;(E=n(I))==null||E.apply(this,L)}),b(t,C),F()}je(["pointerdown","click"]);var D0=(t,e)=>{t.key==="Escape"&&e.onClose(),(t.key==="ArrowUp"||t.key==="ArrowDown")&&t.stopPropagation()},B0=M('<div class="modal-header s-18"><h3 class="modal-title s-18"> </h3> <!></div>'),F0=M('<div class="modal-overlay s-18"><div class="modal-container s-18" role="dialog" aria-modal="true"><!> <div class="modal-scroll s-18" tabindex="0" role="scrollbar"><div class="modal-main s-18"><!></div></div></div></div>'),H0={hash:"s-18",code:'.modal-overlay.s-18{align-items:center;background:transparent;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:var(--modal-z-index)}.modal-container.s-18{background:var(--mobile-settings-bg);border-radius:8px;color:var(--white);display:flex;flex-direction:column;height:calc(100% - 24px);max-height:490px;max-width:600px;width:calc(100% - 32px)}.modal-header.s-18{align-items:start;border-bottom:1px solid var(--white-alpha-24);box-sizing:border-box;display:flex;height:40px;justify-content:space-between;padding:8px 10px}.modal-title.s-18{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;margin:3px 0 0 6px}.modal-scroll.s-18{height:100%;margin:8px 4px 8px 0;overflow-x:hidden;overflow-y:auto}.modal-scroll.s-18::-webkit-scrollbar{width:8px}.modal-scroll.s-18::-webkit-scrollbar-track{background-color:transparent;border-radius:4px;box-shadow:none;margin-right:2px}.modal-scroll.s-18::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.modal-scroll.s-18::-webkit-scrollbar-thumb:hover{background-color:#777}.modal-main.s-18{margin:-8px -4px 0 0}'};function Sm(t,e){B(e,!0),Q(t,H0);let i=h(e,"showHeader",3,!0),o=h(e,"showCloseCross",3,!0),r=K(void 0),a=K(void 0),{webApi:{focusManager:l}}=ve(),d=G("hotkey_map_modal_close_btn_text");Vt(()=>{var g;return(g=n(r))==null||g.focus(),n(a)&&l&&(l.setContainerForFocusLock(n(a)),l.activateLock()),()=>l==null?void 0:l.deactivateLock()});var s=F0();s.__keydown=[D0,e];var u=T(s),f=T(u);{var p=g=>{var w=B0(),I=T(w),C=T(I,!0);S(I);var N=A(I,2);{var L=E=>{Gt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",get ariaLabel(){return d},children:(P,q)=>{wm(P,{fill:"currentColor"})},$$slots:{default:!0}})};R(N,E=>{o()&&E(L)})}S(w),D(()=>me(C,e.title)),b(g,w)};R(f,g=>{i()&&g(p)})}var v=A(f,2),$=T(v),y=T($);si(y,()=>{var g;return(g=e.children)!=null?g:_t}),S($),S(v),Ze(v,g=>O(r,g),()=>n(r)),S(u),Ze(u,g=>O(a,g),()=>n(a)),S(s),b(t,s),F()}je(["keydown"]);var U0=new Set(["BR"]),bb=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;U0.has(l)||(r=a.parentElement)==null||r.removeChild(a)}return e.innerHTML};var z0=M('<li class="hot-key-map-item s-n"><span class="hot-key-map-item-description s-n"><!></span> &nbsp; <span class="hot-key-map-item-value s-n"> </span></li>'),W0=M('<div class="hot-key-map-group s-n"><h5 class="hot-key-map-group-title s-n"> </h5> <ul class="hot-key-map-group-items s-n"></ul></div>'),K0=M('<div class="hot-key-map s-n"></div>'),q0={hash:"s-n",code:'.hot-key-map.s-n{box-sizing:border-box;color:var(--black);overflow-x:hidden}.hot-key-map-group.s-n{border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px}.hot-key-map-group.s-n:last-child{border-bottom:none}.hot-key-map-group-title.s-n{color:var(--white);font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:600;line-height:16px}.hot-key-map-group-title.s-n,.hot-key-map-item.s-n{margin:0;padding:12px 0;width:100%}.hot-key-map-group-items.s-n{box-sizing:border-box;list-style:none;margin:0;padding:0}.hot-key-map-item.s-n{align-items:center;box-sizing:border-box;display:flex;justify-content:space-between;--videoplayer-hotkey-item-value-width:156px;--videoplayer-hotkey-item-value-padding-left:24px}.hot-key-map-item-description.s-n{color:var(--white-alpha-72);max-width:388px;width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left))}.hot-key-map-item-value.s-n{color:var(--white);letter-spacing:-.14px;padding-left:var(--videoplayer-hotkey-item-value-padding-left);width:var(--videoplayer-hotkey-item-value-width)}.hot-key-map-item-description.s-n,.hot-key-map-item-value.s-n{font-feature-settings:"clig" off,"liga" off;font-size:13px;font-style:normal;font-weight:400;line-height:16px}'};function Cm(t,e){B(e,!1),Q(t,q0);let[i,o]=Re(),r=()=>x(l,"$data",i),a=ve(),{data:l,show:d}=a.ui.modals.hotKeyMap,s=()=>{d.set(!1)};So(),Sm(t,{get title(){return r().title},onClose:s,children:(u,f)=>{var p=K0();xi(p,5,()=>r().groups,({title:v,items:$})=>v,(v,$)=>{let y=()=>n($).title,g=()=>n($).items;var w=W0(),I=T(w),C=T(I,!0);S(I);var N=A(I,2);xi(N,5,g,({description:L,value:E})=>E,(L,E)=>{let P=()=>n(E).description,q=()=>n(E).value;var H=z0(),z=T(H),j=T(z);Wd(j,()=>bb(P())),S(z);var ae=A(z,2),X=T(ae,!0);S(ae),S(H),D(()=>me(X,q())),b(L,H)}),S(N),S(w),D(()=>me(C,y())),b(v,w)}),S(p),b(u,p)},$$slots:{default:!0}}),F(),o()}var yv=require("@vkontakte/videoplayer-shared/es2015");var il=require("@vkontakte/videoplayer-core/es2015");var $b=require("@vkontakte/videoplayer-shared/es2015");var Q0=M('<div class="pillow s-1y"><!></div>'),G0={hash:"s-1y",code:".pillow.s-1y{background-color:#679ff8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;border-radius:12px;padding:2px 4px}"};function Tm(t,e){Q(t,G0);var i=Q0(),o=T(i);si(o,()=>{var r;return(r=e.children)!=null?r:_t}),S(i),D(()=>Me(i,"data-testid",e.testId)),b(t,i)}var Zl=require("@vkontakte/videoplayer-shared/es2015");var Y0=Ce('<svg><!><path d="M5.52 5c.32 0 .51-.2.51-.54V3.5l.5-.51 1.46 1.74c.16.2.3.28.51.28a.5.5 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.3 2.3 8.8.87c.16-.14.2-.25.2-.4A.47.47 0 0 0 8.52 0c-.18 0-.3.07-.45.22l-2 2.03h-.04V.54C6.03.2 5.84 0 5.52 0S5 .2 5 .54v3.92c0 .34.2.54.52.54M2.55 1.05 1.05 3.1h1.5zM3.5 3.1V.83C3.5.03 2.41-.3 1.94.35L.14 2.82A.75.75 0 0 0 .75 4h1.8v.55c0 .25.25.45.5.45a.45.45 0 0 0 .45-.45V4h.05a.45.45 0 0 0 0-.9z"></path></svg>');function Im(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=Y0();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(),S(o),b(t,o)}var j0=Ce('<svg><!><path d="M5.51 5c.33 0 .52-.2.52-.54V3.5l.49-.51L7.99 4.7c.16.21.3.29.51.29a.49.49 0 0 0 .5-.5c0-.14-.07-.29-.22-.48L7.29 2.3 8.82.87C8.95.73 9 .62 9 .47A.47.47 0 0 0 8.52 0c-.17 0-.3.07-.44.22L6.06 2.25h-.03V.54C6.03.2 5.83 0 5.5 0S5 .2 5 .54v3.92c0 .34.19.54.51.54M2 0c-.35 0-.67.06-.95.17a1.5 1.5 0 0 0-.66.49c-.15.2-.23.44-.23.7 0 .43.21.76.62 1-.23.11-.41.26-.55.44-.15.2-.23.44-.23.71 0 .29.08.55.25.78.18.23.41.4.71.52.3.13.65.19 1.04.19s.73-.06 1.03-.19c.3-.12.54-.3.71-.52a1.26 1.26 0 0 0 .03-1.49 1.45 1.45 0 0 0-.55-.44c.4-.23.62-.57.62-1a1.14 1.14 0 0 0-.24-.7 1.44 1.44 0 0 0-.66-.49A2.4 2.4 0 0 0 2 0m-.57.96C1.56.86 1.75.8 2 .8s.43.06.56.16a.51.51 0 0 1 .2.43c0 .2-.06.34-.2.44A.87.87 0 0 1 2 2a.9.9 0 0 1-.57-.16.52.52 0 0 1-.2-.44c0-.18.06-.32.2-.43ZM1.08 3.5a.6.6 0 0 1 .24-.5c.16-.13.38-.2.68-.2s.52.07.68.2a.6.6 0 0 1 .24.5.63.63 0 0 1-.24.52c-.16.12-.38.19-.68.19s-.52-.07-.68-.19a.64.64 0 0 1-.24-.52"></path></svg>');function Em(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=j0();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor","fill-rule":"evenodd",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(),S(o),b(t,o)}var X0=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 Pm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=X0();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(),S(o),b(t,o)}var Z0=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 km(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=Z0();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"currentColor",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(),S(o),b(t,o)}var J0=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 Am(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=J0();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"currentColor",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(),S(o),b(t,o)}var ap=t=>{switch(t){case Zl.VideoQuality.Q_720P:return Pm;case Zl.VideoQuality.Q_1080P:return km;case Zl.VideoQuality.Q_1440P:return Am;case Zl.VideoQuality.Q_2160P:return Im;case Zl.VideoQuality.Q_4320P:return Em}};var ex=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 Lm(t,e){Je(t,{get testId(){return e.testId},children:(i,o)=>{var r=ex();b(i,r)},$$slots:{default:!0}})}var tx=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 Mm(t,e){Je(t,{get testId(){return e.testId},children:(i,o)=>{var r=tx();b(i,r)},$$slots:{default:!0}})}var ix=M('<div aria-hidden="true"><!> <!></div>'),ox={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 fc(t,e){B(e,!0),Q(t,ox);let i=h(e,"isMobile",3,!1),o=h(e,"currentQuality",3,void 0),r=m(()=>o()?(0,$b.getVideoQualityLabel)(o()):""),a=m(()=>ap(o())),l=m(()=>n(r).length>2);var d=Le(),s=ce(d);{var u=p=>{Lm(p,{testId:"settings-mobile-icon"})},f=p=>{var v=ix();let $;var y=T(v);{var g=C=>{let N=m(()=>`${n(r)}-pill-icon`);Tm(C,{get testId(){return n(N)},children:(L,E)=>{var P=Le(),q=ce(P);Hi(q,()=>n(a),(H,z)=>{z(H,{})}),b(L,P)},$$slots:{default:!0}})};R(y,C=>{n(a)&&C(g)})}var w=A(y,2);let I=m(()=>n(a)?"settings-icon--labeled":"settings-icon");Mm(w,{get testId(){return n(I)}}),S(v),D(C=>$=se(v,1,"icon s-1v",null,$,C),[()=>({triple:n(l)})]),b(p,v)};R(s,p=>{i()?p(u):p(f,!1)})}b(t,d),F()}var nx=M('<span class="settings-icon-wrapper s-20"><!></span>'),rx={hash:"s-20",code:".settings-icon-wrapper.s-20{position:relative;width:24px}"};function Jl(t,e){B(e,!0),Q(t,rx);let[i,o]=Re(),r=()=>x(u,"$settingsMenuVisible",i),a=()=>x(v,"$isMobile",i),l=()=>x(s,"$currentQuality",i),d=ve(),s=d.state.currentQuality$,u=d.ui.settingsMenu.visible$,f=d.actions.internal.openSettingsMenu,p=d.actions.internal.closeSettingsMenu,v=d.ui.isMobile,$=d.ui.t,y=K(void 0);Oe(()=>{n(y)&&It(()=>{e.ref$.set(n(y))})});let g=$("aria_label_settings");function w(C){return ht(this,null,function*(){let N=aa(C);r()?p():f(N,_o)})}let I=m(()=>r()?"opened":"");Gt(t,{get className(){return n(I)},testId:"settings-btn",click:w,get ariaLabel(){return g},get ariaExpanded(){return r()},get ref(){return n(y)},set ref(C){O(y,C,!0)},children:(C,N)=>{var L=nx(),E=T(L);fc(E,{get isMobile(){return a()},get currentQuality(){return l()}}),S(L),b(C,L)},$$slots:{default:!0}}),F(),o()}var sx=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),ax=Ce("<path></path>");function ca(t,e){B(e,!0);let i=m(()=>`subtitles-icon${e.type==="off"?"-off":e.type==="outline"?"-outline":""}`),o=m(()=>vn(e.size));Je(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=sx();ui(),b(f,p)},u=f=>{var p=ax();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(v,p)};R(d,v=>{e.type==="off"?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}}),F()}function Mm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Gt(t,{testId:"btn-Subtitles",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return ms.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");ma(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var sx=M('<span class="duration s-22" data-testid="video_duration"> </span>'),ax=M('<div><span class="current s-22" data-testid="current_time"> </span> <!></div>'),lx={hash:"s-22",code:'.time.s-22{align-items:center;color:var(--controls-time);display:flex;font-variant-numeric:tabular-nums;font-weight:500;padding:12px 6px}.time.mobile.s-22{padding:0 0 0 8px}.current.s-22{position:relative}.duration.s-22{opacity:.7}.duration.s-22:before{content:" / ";white-space:pre}'};function fc(t,e){B(e,!0),q(t,lx);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=Nt(),d=ae(!1),s=m(()=>rn(e.duration)),u=m(()=>rn(e.position));var v=ax();let p;var f=C(v),$=C(f,!0);S(f);var y=L(f,2);{var g=w=>{var T=sx(),I=C(T,!0);S(T),D(()=>me(I,n(s))),b(w,T)};R(y,w=>{r()&&w(g)})}S(v),Ls(v,()=>ql(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Xe(v,w=>a(w),()=>a()),D(w=>{p=se(v,1,"time s-22",null,p,w),me($,n(u))},[()=>({mobile:i()})]),b(t,v),F()}var vc=require("@vkontakte/videoplayer-shared/es2015");var dx=Ce("<path></path>");function va(t,e){B(e,!0);let i=h(e,"volume",3,1),o=h(e,"muted",3,!1),r=(p,f)=>f?"off":p>.5?"max":p>.2?"mid":p>0?"min":"off",a=m(()=>r(i(),o())),l=m(()=>vn(e.size)),d="M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z",s="M44.92 16.52a1.8 1.8 90 012.56 2.56L42.54 24l4.94 4.92a1.8 1.8 90 11-2.56 2.56L40 26.54l-4.92 4.94a1.8 1.8 90 01-2.56-2.56L37.46 24l-4.94-4.92a1.8 1.8 90 112.56-2.56L40 21.46z",u="M31.5 17.8a1.8 1.8 90 012.54-.14A8.6 8.6 90 0136.8 24c0 2.52-1.06 4.8-2.76 6.34a1.8 1.8 90 11-2.4-2.68c.92-.84 1.56-2.16 1.56-3.66s-.64-2.8-1.58-3.66a1.8 1.8 90 01-.12-2.54",v="M37.62 13.34a1.8 1.8 90 012.54.2 16 16 90 010 20.9 1.8 1.8 90 01-2.74-2.32 12.4 12.4 90 000-16.24 1.8 1.8 90 01.2-2.54";Ze(t,{get width(){return"48"},get height(){return"48"},get style(){return n(l)},get testId(){var p;return`volume-${(p=n(a))!=null?p:""}-icon`},get shadow(){return e.shadow},children:(p,f)=>{var $=dx();D(()=>Ve($,"d",`M4 19.9a2 2 90 011.88-2l5.68-.32a4 4 90 002.5-1.08l8.58-8a2 2 90 013.36 1.44v28.12a2 2 90 01-3.36 1.46l-8.58-8.02a4 4 90 00-2.52-1.08l-5.66-.32a2 2 90 01-1.88-2z${n(a)==="off"?s:`${u}${n(a)==="max"?v:""}`}`)),b(p,$)},$$slots:{default:!0}}),F()}var Uo=require("@vkontakte/videoplayer-shared/es2015");var ap=require("@vkontakte/videoplayer-shared/es2015");var $b=require("@vkontakte/videoplayer-shared/es2015");var cx=M('<div class="overlay"><!></div>');function Vm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=W(void 0),s=f=>{!f||!n(d)||!f.contains(n(d))||f.removeChild(n(d))},u=f=>{!f||!n(d)||f.contains(n(d))||f.appendChild(n(d))};Oe(()=>{u(r())}),Rt(()=>(u(r()),()=>s(r())));var v=cx(),p=C(v);ai(p,()=>{var f;return(f=e.children)!=null?f:_t}),S(v),Xe(v,f=>O(d,f),()=>n(d)),b(t,v),F(),o()}var ux=M('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),px=M("<div><!></div> <!>",1),fx={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 Xa(t,e){B(e,!0),q(t,fx);let[i,o]=Re(),r=()=>x(Y,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),v=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),f=h(e,"maxTooltipWidth",3,void 0),$=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,$b.noop),g=5,w=W(void 0),T=W(void 0),I,N=W(0),k=W(0),E=W(0),A=W(0),Q=Nt(),H=ve(),z=H.ui.playerSize,Y=H.ui.overlayContainer$;Oe(()=>{Et(()=>{y()(s())})});let le=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(T)||!n(w))return;O(k,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.width,ze=n(T).clientWidth,et=a().width,ye=(ke-ze)/2,Pe=Ae.left+u()-U.left,Fe=Pe+ye,Ft=Ae.top+v()-U.top,vt=ze/2-g,Ht=Fe<8,dt=Fe+ze>et-8;Ht&&(Fe=8,vt=Pe+Ae.width/2-2.5*g),dt&&(Fe=et-8-ze,vt=Ae.left-U.left+Ae.width/2-Fe-g),O(E,Fe,!0),O(A,Ft),O(N,vt,!0)},re=()=>{!r()||!n(T)||!n(w)||O(k,-g)},Z=()=>{if(!r()||!n(T)||!n(w))return;O(N,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.height,ze=n(T).clientHeight,et=(ke-ze)/2+ze,ye=Ae.left+u()-U.left-n(T).clientWidth,Pe=2,Fe=ye-g;Fe<8&&(Fe=8);let vt=Ae.top+v()-U.top+et,Ht=Pe-et/2,dt=Pe-g;O(E,Fe,!0),O(A,vt),O(k,Ht),O(N,dt)},we=()=>{!r()||!n(T)||!n(w)||O(N,-g)},ue=()=>{switch($()){case"top":X();break;case"bottom":re();break;case"left":Z();break;default:we()}},ne=()=>{try{if(!r()||!n(w))return;ue(),s(!0)}catch(U){le({message:String(U)})}},_e=()=>{s(!1)},xe=()=>{n(T)&&(I||(I=window.setTimeout(ne,Q.controls.hideTimeoutTooltips)),s()&&ne())},J=()=>{_e(),window.clearTimeout(I),I=void 0},Ne=(U,Ae,ke)=>{let ze="";switch($()){case"top":ze=`transform: translate(${U}px, ${Ae}px);`;break;case"bottom":ze=`transform: translate(${U}px, ${Ae}px); top: auto; bottom: 100%;`;break;case"left":ze=`transform: translate(${U}px, ${Ae}px); left: 0; right: auto;`;break;default:ze=`transform: translate(${U}px, ${Ae}px);`}return ze+=` max-width: ${f()===void 0?"auto":`${f()}px`};`,ze+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,ze},pe=(U,Ae)=>{let ke="";switch($()){case"top":ke=`transform: translate(${U}px, ${Ae}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":ke=`transform: translate(${U}px, ${Ae}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":ke=`transform: translate(${U}px, ${Ae}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:ke=`transform: translate(${U}px, ${Ae}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return ke},P=m(()=>Ne(n(E),n(A),s())),Ke=m(()=>pe(n(N),n(k)));Rt(ue),mn(()=>window.clearTimeout(I));var Te=px(),j=de(Te);let ie;j.__pointermove=xe,j.__pointerdown=J,j.__pointerup=function(...U){var Ae;(Ae=e.disableMouseupTooltipShow?void 0:xe)==null||Ae.apply(this,U)};var De=C(j);ai(De,()=>{var U;return(U=e.children)!=null?U:_t}),S(j),Xe(j,U=>O(w,U),()=>n(w));var Be=L(j,2);{var ot=U=>{Vm(U,{children:(Ae,ke)=>{var ze=ux(),et=C(ze),ye=C(et,!0);S(et);var Pe=L(et,2);S(ze),Xe(ze,Fe=>O(T,Fe),()=>n(T)),D(()=>{Qe(ze,n(P)),me(ye,d()),Qe(Pe,n(Ke))}),b(Ae,ze)},$$slots:{default:!0}})};R(Be,U=>{d()&&!l()&&U(ot)})}D(U=>ie=se(j,1,"tooltip-wrapper s-1p",null,ie,U),[()=>({"full-width":p()})]),lt("pointerenter",j,xe),lt("pointerleave",j,J),b(t,Te),F(),o()}Je(["pointermove","pointerdown","pointerup"]);var yb=t=>{t.stopPropagation()},mx=M("<div><!></div>"),vx={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 Ho(t,e){B(e,!0),q(t,vx);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=Io(),s=l.ui.isMobile,u=d.graphIsOpened$,v=l.ui.t,p=h(e,"className",3,""),f=h(e,"disabled",3,!1),$=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),g=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),T=h(e,"tooltipContent",3,""),I=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),k=h(e,"disabledTooltipContent",19,()=>v("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),A=h(e,"onTooltipVisibilityChange",3,ap.noop),Q=h(e,"initialTranslateXPx",3,0),H=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,ap.noop),Y=h(e,"mouseLeave",3,ap.noop),le=m(()=>f()?r()?v("tooltip_disabled_when_graph_on"):k():T()),X=W(!1);Oe(()=>{I()||O(X,!1)});var re=mx();re.__pointerdown=[yb],re.__click=[yb];var Z=C(re);{var we=ne=>{Xa(ne,{get content(){return n(le)},get translateX(){return Q()},get translateY(){return H()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return A()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){O(X,_e,!0)},children:(_e,xe)=>{var J=Le(),Ne=de(J);ai(Ne,()=>{var pe;return(pe=e.children)!=null?pe:_t}),b(_e,J)},$$slots:{default:!0}})},ue=ne=>{var _e=Le(),xe=de(_e);ai(xe,()=>{var J;return(J=e.children)!=null?J:_t}),b(ne,_e)};R(Z,ne=>{$()&&n(le)&&!a()?ne(we):ne(ue,!1)})}S(re),Xe(re,ne=>y(ne),()=>y()),D(()=>{var ne;se(re,1,`btn-container ${(ne=p())!=null?ne:""}`,"s-1j"),Ve(re,"aria-hidden",E()||null)}),lt("mouseenter",re,function(...ne){var _e;(_e=z())==null||_e.apply(this,ne)}),lt("mouseleave",re,function(...ne){var _e;(_e=Y())==null||_e.apply(this,ne)}),kn(re,"clientWidth",g),b(t,re),F(),o()}Je(["pointerdown","click"]);var gx=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 mc(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=gx(),l=de(a),d=L(l);D(()=>{Ve(l,"fill",aa),Ve(l,"fill-opacity",e.completed?1:.24),Ve(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var hx=M("<div><!></div>"),_x={hash:"s-15",code:".interactive-episode-icon.s-15{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-15{opacity:.4;pointer-events:none}"};function Rm(t,e){B(e,!0),q(t,_x);let o=ve().ui.t,r=W(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Ho(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=hx();let u;var v=C(s);let p=m(()=>!!e.videoEpisode.completed);mc(v,{get completed(){return n(p)}}),S(s),D(f=>{u=se(s,1,"interactive-episode-icon s-15",null,u,f),Qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),kn(s,"clientWidth",f=>O(r,f)),b(l,s)},$$slots:{default:!0}}),F()}var bx=M('<div><div class="video-episode-inner s-14"><div class="video-episode-loaded s-14"></div> <div></div></div></div>'),$x=M('<div class="video-episodes-wrap s-14"></div>'),yx={hash:"s-14",code:".video-episodes-wrap.s-14{height:100%;position:absolute;width:100%}.video-episode.s-14{box-sizing:border-box;height:calc(var(--slider-height)*3);margin-top:calc(var(--slider-height)*-1);padding:var(--slider-height) var(--slider-video-episode-gap);position:absolute;transition:transform .2s}.video-episode.s-14:first-child{padding-left:0}.video-episode.s-14:last-child{padding-right:0}.video-episode.s-14:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-14,.video-episode-inner.s-14,.video-episode-loaded.s-14{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-14{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-14:first-child .video-episode-inner:where(.s-14),.video-episode.s-14:last-child .video-episode-inner:where(.s-14){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-14{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-14,.video-episode-loaded.s-14{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-14{background-color:var(--slider-filled-bg)}"};function Nm(t,e){q(t,yx);let i=h(e,"videoEpisodes",19,()=>[]);var o=$x();yi(o,21,i,r=>r.from,(r,a)=>{var l=bx();let d;var s=C(l),u=C(s),v=L(u,2);let p;S(s),S(l),D((f,$)=>{d=se(l,1,"video-episode s-14",null,d,f),Qe(l,`left: ${n(a).from}%; width: ${n(a).width}%`),Qe(u,`transform: translateX(${n(a).loadedWidth/n(a).width*100}%)`),p=se(v,1,"video-episode-filled s-14",null,p,$),Qe(v,`transform: translateX(${n(a).filledWidth/n(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(r,l)}),S(o),b(t,o)}function xx(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;O(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function wx(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 Sx(t,e,i,o,r){if(t.preventDefault(),e()||!n(i))return;O(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Tx(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function Cx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var Ix=M("<div></div>"),Ex=M('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),kx=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),Px={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Za(t,e){B(e,!0),q(t,Px);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),v=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),f=h(e,"isInteractive",3,!1),$=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),g=h(e,"onPointerDown",3,Uo.noop),w=h(e,"onHandleMove",3,Uo.noop),T=h(e,"onPointerUp",3,Uo.noop),I=h(e,"onPointerEnter",3,Uo.noop),N=h(e,"onPointerMove",3,Uo.noop),k=h(e,"onPointerLeave",3,Uo.noop),E=h(e,"onMouseEnter",3,Uo.noop),A=h(e,"onMouseLeave",3,Uo.noop),Q=h(e,"onWheelUp",3,Uo.noop),H=h(e,"onWheelDown",3,Uo.noop),z=h(e,"onWheelLeft",3,Uo.noop),Y=h(e,"onWheelRight",3,Uo.noop),le=h(e,"onDisabledClick",3,Uo.noop),X=h(e,"loadedProgress",3,0),re=h(e,"filledProgress",3,0),Z=h(e,"handleProgress",3,0),we=h(e,"ariaLabel",3,""),ue=h(e,"ariaValueMin",3,void 0),ne=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),xe=h(e,"ariaValueText",3,""),J=h(e,"onContextMenu",3,Uo.noop),Ne=h(e,"handleAlwaysVisible",3,!1),pe=Nt(),P=W(void 0),Ke=W(!1),Te=m(()=>{var Me;return(Me=ne())!=null?Me:0}),j=m(()=>{var Me;return(0,Uo.isNonNullable)(v())&&((Me=v()[v().length-1])==null?void 0:Me.time)<n(Te)}),ie=m(()=>(0,Uo.isNonNullable)(v())&&v().length&&n(j)&&n(Te)?et(X()*100,re()*100):[]);function De(Me){if(Me.preventDefault(),i()&&O(P,i().getBoundingClientRect(),!0),$())return;let wt=ke(Me.clientX,Me.clientY),Lt=ze(Me.clientX);I()(wt,Lt,n(P).width)}function Be(Me){Me.preventDefault(),!$()&&k()()}function ot(){E()()}function U(){A()()}function Ae(Me){$()||p()&&(Me.preventDefault(),Me.deltaY<0?Q()():Me.deltaY>0?H()():Me.deltaX>0?Y()():z()())}function ke(Me,wt){return l()?Math.max(0,Math.min(1,(n(P).height-(wt-n(P).top))/n(P).height)):Math.min(Math.max(Me-n(P).x,0),n(P).width)/n(P).width}function ze(Me){return Math.min(Math.max(Me-n(P).x,0),n(P).width)}function et(Me,wt){let Lt=pe.features.episodesClustering&&!f()?pe.episodeMinWidthPc:0,mt=[],ce=v()[0].time/n(Te)*100,We=0,Ye=0;for(let zt=1;zt<v().length;zt++)We=v()[zt].time/n(Te)*100,We-ce>Lt&&(mt.push({from:ce,width:Math.max(0,We-ce),loadedWidth:Math.max(0,Math.min(We,Me)-ce),filledWidth:Math.max(0,Math.min(We,wt)-ce),interactive:v()[zt-1].interactive,completed:v()[zt-1].completed}),ce=v()[zt].time/n(Te)*100,Ye++);let ct={from:ce,width:Math.max(0,100-ce),loadedWidth:Math.max(0,Math.min(Me,100)-ce),filledWidth:Math.max(0,Math.min(wt,100)-ce),interactive:v()[Ye].interactive,completed:v()[Ye].completed};100-ce<Lt?(Ye-=1,mt[Ye].width+=100-ce,mt[Ye].loadedWidth+=Math.max(0,Math.min(Me,100)-ce),mt[Ye].filledWidth+=Math.max(0,Math.min(wt,100)-ce)):mt[Ye]=ct;let Ut=v()[0].time;if(Ut!==0){let zt=Ut/n(Te)*100;mt.unshift({from:0,width:zt,loadedWidth:Math.min(zt,Me),filledWidth:Math.min(zt,wt)})}return mt}function ye(Me){return Math.max(0,Math.min(100,Me*100))}let Pe=m(()=>ye(X())),Fe=m(()=>ye(re()));var Ft=kx(),vt=de(Ft);{var Ht=Me=>{var wt=Ix();let Lt;yi(wt,21,()=>n(ie),mt=>mt.from,(mt,ce)=>{var We=Le(),Ye=de(We);{var ct=Ut=>{Rm(Ut,{get videoEpisode(){return n(ce)},get disabled(){return $()}})};R(Ye,Ut=>{n(ce).interactive&&Ut(ct)})}b(mt,We)}),S(wt),D(mt=>Lt=se(wt,1,"interactive-icons s-h",null,Lt,mt),[()=>({mobile:s(),hidden:s()&&!n(Ke)})]),b(Me,wt)};R(vt,Me=>{f()&&Me(Ht)})}var dt=L(vt,2);let Ct;dt.__pointerdown=[xx,i,P,$,Ke,ke,g],dt.__pointermove=[wx,$,ke,ze,N,P,Ke,w],dt.__pointerup=[Sx,$,Ke,ke,T],dt.__click=[Tx,$,le,ke],dt.__contextmenu=[Cx,ke,$,le,Ke,J];var ri=C(dt);{var Ot=Me=>{Nm(Me,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},$e=Me=>{var wt=Ex(),Lt=C(wt),mt=L(Lt,2);let ce;S(wt),D(We=>{Ve(Lt,"data-value",n(Pe)),Qe(Lt,`transform: translateX(${n(Pe)}%);`),ce=se(mt,1,"filled s-h",null,ce,We),Ve(mt,"data-value",n(Fe)),Qe(mt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(Me,wt)};R(ri,Me=>{n(ie).length?Me(Ot):Me($e,!1)})}var be=L(ri,2);let ee;var nt=C(be);let fe;S(be),S(dt),Xe(dt,Me=>i(Me),()=>i()),D((Me,wt,Lt,mt)=>{var ce,We;Ct=se(dt,1,`slider ${(ce=o())!=null?ce:""}`,"s-h",Ct,Me),Ve(dt,"aria-label",we()),Ve(dt,"aria-valuemin",ue()),Ve(dt,"aria-valuemax",ne()),Ve(dt,"aria-valuenow",_e()),Ve(dt,"aria-valuetext",xe()),Ve(dt,"data-testid",(We=r())!=null?We:null),ee=se(be,1,"handleWrap s-h",null,ee,wt),Qe(be,Lt),fe=se(nt,1,"handle s-h",null,fe,mt)},[()=>({disabled:$(),"slider-dragging":n(Ke),hidden:a(),"handle-always-visible":Ne(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(Z())}%);`,()=>({"active-live":d()})]),lt("pointerenter",dt,De),lt("pointerleave",dt,Be),lt("mouseenter",dt,ot),lt("mouseleave",dt,U),lt("wheel",dt,Ae),b(t,Ft),F()}Je(["pointerdown","pointermove","pointerup","click","contextmenu"]);var so=(t,e)=>Xd[t]>=Xd[e];var Ns=(t,e)=>Xd[t]<=Xd[e],xb=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var Lx=M("<div><!></div>"),Mx=M("<div><!> <!></div>"),Vx={hash:"s-29",code:".volumeBar-container.s-29{align-items:center;display:flex}.vertical.s-29 .btn,.vertical.s-29 .tooltip-wrapper,.volumeBar-container.vertical.s-29{width:40px}.volumeBar.s-29{align-items:center;display:flex;margin:0 8px;position:relative;width:70px;--slider-height:var(--slider-volume-height);--slider-radius:var(--slider-volume-radius);--slider-handle-size:var(--slider-volume-handle-size);--slider-bg:var(--volume-slider-bg);--slider-filled-bg:var(--volume-slider-filled-bg);--slider-handle-bg:var(--volume-slider-handle-bg)}.volumeBar-slider-vertical{width:50px!important}.volumeBar-vertical.s-29{padding:0 8px 0 0;width:0}"};function Om(t,e){var ze,et;B(e,!0),q(t,Vx);let[i,o]=Re(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(f,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(De,"$controlsVisible",i),u=ve(),v=Nt(),p=u.state.volume$,f=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:g}=u.actions.internal,w=u.ui.currentGridType$,T=(ze=u.callbacks)==null?void 0:ze.onAudioDoesNotExistHint,I=(et=u.callbacks)==null?void 0:et.onAudioDisabledHint,N=u.state.isAudioAvailable$,k=u.state.isAudioDisabled,E=u.ui.t,A=W(!1),Q,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),Y=m(()=>Ns(d(),"l")),le=m(()=>n(Y)?"":n(z)?!r()||k?E("tooltip_sound_unavailable"):E("tooltip_volume"):E("tooltip_volume_muted")),X=m(()=>n(z)?E("tooltip_volume"):E("tooltip_volume_muted")),re=m(()=>n(z)?0:l()),Z=!1,we=m(()=>e.isAds?!1:k?!I:r()?!1:!T);function ue(ye){y(),$(ye)}function ne(){op(u,l(),v.controls.volumeStepWheel)}function _e(){np(u,l(),v.controls.volumeStepWheel)}function xe(ye){$(ye)}function J(ye){$(ye),g()}function Ne(){Z=!0}function pe(){Z=!1,Te()}function P(){clearTimeout(Q),O(A,!0)}function Ke(){Te()}function Te(){Q=window.setTimeout(()=>{Z||O(A,!1)},v.controls.volumeBarTimeout)}function j(ye){ye.preventDefault(),ye.deltaY<0?ne():ye.deltaY>0&&_e()}let ie=W(!1),De=u.ui.controlsVisible;Oe(()=>{s()||O(ie,!1)});var Be=Mx();let ot;var U=C(Be);Xa(U,{get content(){return n(le)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,Pe)=>{let Fe=m(()=>n(Y)?"btn-volume-vertical":"btn-volume-horizontal");Gt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Fe)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return ms.KeyM},role:"button",children:(Ft,vt)=>{va(Ft,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=L(U,2);{var ke=ye=>{var Pe=Lx();let Fe;var Ft=C(Pe);let vt=m(()=>n(Y)?"volumeBar-slider-vertical":""),Ht=m(()=>n(Y)&&!n(A)),dt=m(()=>n(Y)?Ne:vc.noop),Ct=m(()=>n(Y)?pe:vc.noop),ri=m(()=>Math.round(n(re)*100)),Ot=m(()=>`${Math.round(n(re)*100)}%`),$e=m(()=>n(Y)?"volume-slider-vertical":"volume-slider");Za(Ft,{get className(){return n(vt)},get isHidden(){return n(Ht)},get isVertical(){return n(Y)},withWheelHandler:!0,onWheelUp:ne,onWheelDown:_e,onPointerDown:ue,onHandleMove:xe,onPointerUp:J,get onPointerEnter(){return n(dt)},get onPointerLeave(){return n(Ct)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(ri)},get ariaValueText(){return n(Ot)},get filledProgress(){return n(re)},get handleProgress(){return n(re)},get testId(){return n($e)}}),S(Pe),D(be=>Fe=se(Pe,1,"volumeBar s-29",null,Fe,be),[()=>({"volumeBar-vertical":n(Y)})]),b(ye,Pe)};R(Ae,ye=>{n(H)&&ye(ke)})}S(Be),D(ye=>ot=se(Be,1,"volumeBar-container s-29",null,ot,ye),[()=>({vertical:n(Y)})]),lt("mouseenter",Be,function(...ye){var Pe;(Pe=n(Y)?P:vc.noop)==null||Pe.apply(this,ye)}),lt("mouseleave",Be,function(...ye){var Pe;(Pe=n(Y)?Ke:vc.noop)==null||Pe.apply(this,ye)}),lt("wheel",Be,j),b(t,Be),F(),o()}var wb=require("@vkontakte/videoplayer-shared/es2015");var Rx=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>'),Nx=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=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=de(l);{var s=v=>{var p=Rx();b(v,p)},u=v=>{var p=Nx();b(v,p)};R(d,v=>{i()?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}})}function gc(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,wb.noop),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Gt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let v=ua(u);a.set(v),o()()},get ariaKeyShortCut(){return ms.KeyF},role:"button",children:(u,v)=>{Dm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var Ox=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 Bm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=Ox();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(),S(o),b(t,o)}var Dx=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 Fm(t,e){let i=Pn(e,["$$slots","$$events","$$legacy","children"]);var o=Dx();ro(o,()=>Ie({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var r=C(o);ai(r,()=>{var a;return(a=e.children)!=null?a:_t}),fi(6),S(o),b(t,o)}var Bx={hash:"s-28",code:"svg [data-logo],svg[data-testid=vk-video-logo-icon--en] ._ru,svg[data-testid=vk-video-logo-icon--short] ._en,svg[data-testid=vk-video-logo-icon--short] ._ru,svg[data-testid=vk-video-logo-icon] ._en{opacity:0;visibility:hidden}svg[data-logo=app_store] [data-logo=app_store],svg[data-logo=play_market] [data-logo=play_market],svg[data-logo=vk_video] [data-logo=vk_video]{opacity:1;visibility:visible}"};function Hm(t,e){B(e,!0),q(t,Bx);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`);Fm(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 hc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x($,"$isMobile",i),a=()=>x(f,"$currentGridType$",i),l=()=>x(g,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),v=Nt(),p=ve(),f=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,g=p.isCyrillicRelatedInterface$,w=m(()=>v.logoType!=="vk"),T=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),I=m(()=>(r()&&Ns(a(),"m")||Ns(a(),"l"))&&n(w)),N=()=>{var A,Q;e.click(),(A=p.callbacks)!=null&&A.onLogoClicked?(Q=p.callbacks)==null||Q.onLogoClicked():u()&&window.open(u(),"_blank")},k=m(()=>!s()),E=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");Gt(t,{className:"btn-full-opacity",get disabled(){return n(k)},click:N,get testId(){return n(E)},get ariaLabel(){return n(T)},get ref(){return d()},set ref(A){d(A)},children:(A,Q)=>{var H=Le(),z=de(H);{var Y=X=>{Hm(X,{get logo(){return v.logoType},get short(){return n(I)},get isCyrillic(){return l()}})},le=X=>{Bm(X,{})};R(z,X=>{n(w)?X(Y):X(le,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}var Tb=require("@vkontakte/videoplayer-core/es2015");var Um=require("@vkontakte/videoplayer-core/es2015");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-19"></path><path d="M3.6 9.7a8.7 8.7 0 0 1 8.68 9.37.9.9 0 0 1-1.8-.14c.02-.17.02-.35.02-.53a6.9 6.9 0 0 0-7.43-6.88.9.9 0 0 1-.14-1.8l.67-.02ZM3.6 16.9a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z" class="s-19"></path><path d="M16.24 4.1c.8 0 1.47 0 2 .04a4 4 0 0 1 1.53.38 3.9 3.9 0 0 1 1.7 1.71 4 4 0 0 1 .39 1.53c.04.53.04 1.2.04 2v4.48c0 .8 0 1.47-.04 2a4 4 0 0 1-.38 1.53 3.9 3.9 0 0 1-1.7 1.7 4 4 0 0 1-1.54.39c-.53.04-1.2.04-2 .04H15a.9.9 0 0 1 0-1.8h1.2c.85 0 1.44 0 1.9-.04.44-.03.68-.1.85-.19.4-.2.72-.52.92-.92.09-.17.16-.4.2-.85.03-.46.03-1.05.03-1.9V9.8c0-.85 0-1.44-.04-1.9-.03-.44-.1-.68-.19-.85a2.1 2.1 0 0 0-.92-.92 2.25 2.25 0 0 0-.85-.2 25.9 25.9 0 0 0-1.9-.03H5.83a2.1 2.1 0 0 0-1.81 1.4.9.9 0 1 1-1.7-.6A3.9 3.9 0 0 1 6 4.1h10.24Z" class="s-19"></path>',1),Hx=Ce('<path d="M1 18v3h3c0-1.66-1.34-3-3-3z"></path><path d="M1 14v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7z"></path><path d="M1 10v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11z"></path><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" class="s-19"></path><path d="M5.667 7.44H18.5v9.167h-5.161a11.947 11.947 0 0 0-7.673-7.672V7.44Z"></path>',1),Ux={hash:"s-19",code:".animated.s-19{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-19{animation-name:s-19-wave1}.wave2.animated.s-19{animation-name:s-19-wave2}.wave3.animated.s-19{animation-name:s-19-wave3}@keyframes s-19-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-19-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-19-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function _c(t,e){B(e,!0),q(t,Ux);let i=h(e,"isMobile",3,!1),o=m(()=>e.iconState===Um.ChromecastState.CONNECTED),r=m(()=>e.iconState===Um.ChromecastState.CONNECTING),a=m(()=>n(o)?"#2688EB":aa),l=m(()=>e.size?vn(e.size):void 0);var d=Le(),s=de(d);{var u=p=>{Ze(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(f,$)=>{var y=Fx();fi(2),b(f,y)},$$slots:{default:!0}})},v=p=>{Ze(p,{get style(){return n(l)},testId:"chromecast-icon",children:(f,$)=>{var y=Hx(),g=de(y);let w;var T=L(g);let I;var N=L(T);let k;var E=L(N,2);let A;D((Q,H,z,Y)=>{w=se(g,0,"wave1 s-19",null,w,Q),I=se(T,0,"wave2 s-19",null,I,H),k=se(N,0,"wave3 s-19",null,k,z),A=se(E,0,"s-19",null,A,Y)},[()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({animated:n(r)}),()=>({hidden:!n(o)})]),b(f,y)},$$slots:{default:!0}})};R(s,p=>{i()?p(u):p(v,!1)})}b(t,d),F()}var Cb=require("@vkontakte/videoplayer-shared/es2015");function bc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Cb.noop),l=ve().ui.t,d=m(()=>e.state===Tb.ChromecastState.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Gt(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)=>{_c(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}var Ib=require("@vkontakte/videoplayer-shared/es2015");var zx=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 zm(t){Ze(t,{testId:"episodes-icon",children:(e,i)=>{var o=zx();fi(2),b(e,o)},$$slots:{default:!0}})}var lp=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Wx=M('<span class="text mobile s-23"> </span> <div class="chevron-episodes s-23" data-testid="btn-episodes_icon"><!></div>',1),Kx=M('<span class="text s-23"> </span>'),qx=M('<span class="text count s-23"> </span>'),Qx=M('<span class="icon s-23"><!></span> <!>',1),Gx={hash:"s-23",code:".icon.s-23{flex-shrink:0}.text.s-23{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-23{overflow:visible}.text.mobile.s-23{padding:0 3px 0 4px}.chevron-episodes.s-23{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function $c(t,e){var Z,we,ue;B(e,!0),q(t,Gx);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x(g,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(T,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),v=h(e,"timeCodes",19,()=>[]),p=ve(),f=(we=(Z=p.callbacks)==null?void 0:Z.onEpisodeChanged)!=null?we:Ib.noop,$=!!((ue=p.callbacks)!=null&&ue.onEpisodeClicked),y=p.ui.currentGridType$,g=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,T=p.ui.isMobile,I=p.ui.t,N=W(void 0),k=ne=>{var xe,J,Ne;if(!!((xe=p.callbacks)!=null&&xe.onEpisodeClicked)){let pe=ua(ne);g.set(pe),w.set(!0),(Ne=(J=p.callbacks)==null?void 0:J.onEpisodeClicked)==null||Ne.call(J,pe)}},E=W(null),A=m(()=>s()/u());Oe(()=>{var _e;let ne=lp(n(A),u(),v());ne?((_e=n(E))==null?void 0:_e.time)!==ne.time&&(f(ne),O(E,ne,!0)):O(E,null)});let Q=m(()=>{var ne;return((ne=n(E))==null?void 0:ne.text)||""}),H=m(()=>so(r(),"xl")?"FULL":so(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${I("tooltip_episodes")}: ${n(Q)}`),Y=(ne,_e,xe)=>ht(null,null,function*(){yield yo(),(ne==null?void 0:ne.getAttribute("aria-expanded"))==="false"&&_e&&!xe&&Et(()=>{g.set(!1),ne.focus()})});Oe(()=>{Y(n(N),a(),l())});var le=Le(),X=de(le);{var re=ne=>{let _e=m(()=>d()?"px-0":""),xe=m(()=>!$);Gt(ne,{get className(){var J;return`w-max btn-full-opacity btn-jc-l ${(J=n(_e))!=null?J:""}`},testId:"btn-episodes",click:k,get disabled(){return n(xe)},get ariaExpanded(){return l()},get ariaLabel(){return n(z)},get ref(){return n(N)},set ref(J){O(N,J,!0)},children:(J,Ne)=>{var pe=Le(),P=de(pe);{var Ke=j=>{var ie=Wx(),De=de(ie),Be=C(De,!0);S(De);var ot=L(De,2),U=C(ot);Or(U,{direction:"right"}),S(ot),D(()=>me(Be,n(Q))),b(j,ie)},Te=j=>{var ie=Qx(),De=de(ie),Be=C(De);zm(Be,{}),S(De);var ot=L(De,2);{var U=ke=>{var ze=Kx(),et=C(ze,!0);S(ze),D(()=>me(et,n(Q))),b(ke,ze)},Ae=(ke,ze)=>{{var et=ye=>{var Pe=qx(),Fe=C(Pe,!0);S(Pe),D(()=>me(Fe,v().length)),b(ye,Pe)};R(ke,ye=>{n(H)==="COUNT"&&ye(et)},ze)}};R(ot,ke=>{n(H)==="FULL"?ke(U):ke(Ae,!1)})}b(j,ie)};R(P,j=>{d()?j(Ke):j(Te,!1)})}b(J,pe)},$$slots:{default:!0}})};R(X,ne=>{n(E)&&ne(re)})}b(t,le),F(),o()}var uv=require("@vkontakte/videoplayer-shared/es2015");var gi=require("@vkontakte/videoplayer-core/es2015"),rt=require("@vkontakte/videoplayer-shared/es2015"),gs=require("@vkontakte/videoplayer-statistics/es2015");var Ge=require("@vkontakte/videoplayer-shared/es2015"),ao=require("@vkontakte/videoplayer-shared/es2015");var Yx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",dp=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 ao.Subject,loadStarted$:new ao.Subject,loadEnded$:new ao.Subject,loadError$:new ao.Subject,ready$:new ao.Subject,slotRequested$:new ao.Subject,started$:new ao.Subject,timeRemained$:new ao.Subject,paused$:new ao.Subject,resumed$:new ao.Subject,ended$:new ao.Subject,empty$:new ao.Subject,skipped$:new ao.Subject,clicked$:new ao.Subject,closed$:new ao.Subject,error$:new ao.Subject};this.loadAdman=e=>(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,Ge.now)()]}),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?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,Ge.now)()]}),o())};(0,ao.addScript)(Yx,e,this.loadTimeout).then(()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,Ge.now)()]}),window.AdmanHTML?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,Ge.now)()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[(0,Ge.now)()]}),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?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,Ge.now)()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,Ge.now)()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,Ge.now)()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[(0,Ge.now)()]}),!d&&(window.AdmanHTML?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,Ge.now)()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,Ge.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,Ge.now)(),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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")=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,Ge.now)()]}),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"),Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,Ge.now)()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return ht(this,null,function*(){var N,k;if(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,Ge.now)(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:v,externalApi:p}=e;this.externalApi=p;let f,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?f=$:f=parseInt($,36));let{isEmbed:y,immediateOrigin:g}=(0,Ge.detectEmbed)(),w=(N=y?g:window.location.href)!=null?N:window.location.href,T=Ie(jt(Ie(jt(Ie({},s),{dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o}),f?{request_id:f}:{}),{duration:v}),u);T=Object.fromEntries(Object.entries(T).filter(([E,A])=>(0,Ge.isNonNullable)(A)));let I={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:T,browser:{mobile:!1}};try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),(k=this.externalApi)!=null&&k.videoGetAds){let A=yield this.safeExternalCall(this.externalApi.videoGetAds,T);A&&(delete I.slot,delete I.params,Object.assign(I,{json:A}))}E.init(I),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(I)}`})}catch(E){Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[(0,Ge.now)()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var o;(o=this.adman)==null||o.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,o,r,a,l,d,s,u,v,p,f;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,Ge.now)()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(o=this.adman)==null||o.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(l=this.adman)==null||l.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(s=this.adman)==null||s.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(v=this.adman)==null||v.onCompleted(void 0),(p=this.adman)==null||p.onError(void 0),(f=this.adman)==null||f.destroy(),this.videoElement&&(0,ao.clearVideoElement)(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return ht(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var Eb=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var Wm=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],r=e.split(this.twoLinesRegExp);for(let a of r){let l={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let s of d)if(!l.startTime&&!l.endTime){let u=new cp,{startTime:v,endTime:p}=u.parse(s);l.startTime=v,l.endTime=p}else if(s.trim()!==""){let u=new Km,{texts:v}=u.parse(s);l.texts=[...l.texts,...v]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},cp=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}},Km=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](l){let d=0,s=[];for(;d<l.length;){let u=["<",">"].reduce((v,p)=>{let f=l.indexOf(p,d);return v===-1||v>f?f:v},-1);if(u===-1){s.push(l.substring(d));break}s.push(l.substring(d,u)),d=u+1}return s}}),a=new cp;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}},kb=Wm;var pp=require("@vkontakte/videoplayer-shared/es2015"),Ja,Vi,qm=0,Qm=!1,Pb="",Ab=(t,e=0,i=0)=>t<e&&t<i,up=(t,e=0,i=0)=>t>=e&&t<=i,jx=(t,e=0,i=0)=>t>e&&t>i,Lb=(t,e,i,o=!1)=>{var d;let r=(d=i.find(({id:s})=>s===e.value))==null?void 0:d.subtitles;if(o)return r==null?void 0:r.find(({startTime:u,endTime:v})=>up(t,u,v));let a=t>=qm,l=t<qm;if(qm=t,l&&(Qm=!1),(0,pp.isNonNullable)(Ja)&&up(t,Ja.startTime,Ja.endTime)&&Pb===e.value)return Ja;if(!(0,pp.isNonNullable)(Vi)&&(r!=null&&r.length)&&!Qm){Vi=r.find(({startTime:u,endTime:v})=>up(t,u,v)||a&&Ab(t,u,v)),Ja=void 0,!(0,pp.isNonNullable)(Vi)&&r[r.length-1].endTime<t&&(Qm=!0);return}else{if(up(t,Vi==null?void 0:Vi.startTime,Vi==null?void 0:Vi.endTime))return Ja=Vi,Vi=void 0,Pb=e.value,Ja;(a&&jx(t,Vi==null?void 0:Vi.startTime,Vi==null?void 0:Vi.endTime)||l&&Ab(t,Vi==null?void 0:Vi.startTime,Vi==null?void 0:Vi.endTime))&&(Vi=void 0)}};var fp={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"},Xx={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"},yc=t=>{var e,i;return(i=(e=fp[t])!=null?e:fp[Xx[t]])!=null?i:void 0};var Mb=require("@vkontakte/videoplayer-shared/es2015"),z7=require("@vkontakte/videoplayer-statistics/es2015"),mp=class{constructor(e,i,o,r=new Mb.Subscription){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 xc=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(xc||{});var vs=t=>t!=null?t:0,Os=(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(vs(i==null?void 0:i.top)-vs(o==null?void 0:o.top)),left:Math.round(vs(i==null?void 0:i.left)-vs(o==null?void 0:o.left)),bottom:Math.round(vs(i==null?void 0:i.bottom)-vs(o==null?void 0:o.top)),right:Math.round(vs(i==null?void 0:i.right)-vs(o==null?void 0:o.left))}},ed=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:vs(e==null?void 0:e.width),height:vs(e==null?void 0:e.height)}};var Mn="off";var td=t=>!!(Math.round(Math.abs(t)/90)%2);var Vb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:v,previewThumbsData:p,uiConfig:f,coreConfig:$,player:y,disabledControls:g,isInteractive:w,interactiveRanges$:T,isInteractiveTime$:I,replayInteractive:N,stopPlayer:k,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,additionalButtons:Q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:Y,playNextVideo:le,onVideoChanged:X,looped:re=!1,statistics:Z,saveRate:we,internalsExposure:ue,playerView:ne,playerId:_e})=>{var $g,yg,xg;let xe=jt(Ie({},$),{configName:[...($g=$.configName)!=null?$g:[],"ui"],isAudioDisabled:l,live:jt(Ie({},(yg=$.live)!=null?yg:{}),{isLiveCatchUpMode:!!r})}),J=f,Ne=rt.TracerFactory.createRootTracer(J.features.tracer),pe=Ne.createComponentTracer("Store"),P=y||new gi.Player(xe,Ne,{playerId:_e});ue==null||ue.expose({corePlayer:P});let Ke=new rt.Logger,Te=new dp(Ke,{loadTimeout:J.ads.loadTimeout,initTimeout:J.ads.initTimeout,runtimeTimeout:J.ads.runtimeTimeout,useAdmanFromNPM:J.ads.useAdmanFromNPM,volumeMultiplier:J.ads.volumeMultiplier,isVsidOriginal:J.ads.isVsidOriginal}),j=za.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,De=u==null?void 0:u.annotationsApi,Be=u==null?void 0:u.slotsApi,ot=u==null?void 0:u.focusManager,U=Ke.createComponentLog("Store"),Ae,ke,ze={},et=new Bu,ye=new rt.Subscription,Pe="",Fe=ae(!1),Ft=Z&&Z.oneStat?li(Z.oneStat.vsid$):Nr(void 0),vt=ae(la()),Ht=ae(!1),dt=()=>eb(document,gi.clientChecker.device.isIOS),Ct=(xg=ie==null?void 0:ie.info.isActive$)!=null?xg:new rt.ValueSubject(!1),ri=ae(0),Ot=ae(!1),$e=ae(!1),be=ae([]),ee=(0,rt.merge)(P.events.fatalError$,P.events.managedError$).subscribe(c=>be.update(_=>[..._,c])),nt=Nr(!1,c=>{let _=P.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),fe=c=>ht(null,null,function*(){var oe;let _=Object.values(rt.InterfaceLanguage).includes(c);if(J.downloadVKLanguages&&(_&&J.updateBuiltinLanguages||!nm(c))){let Se;try{Se=yield(0,rt.loadVKLangPack)(c,u_,p_)}catch(it){(oe=Z==null?void 0:Z.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),j==null||j.report(it,{errorType:"VKLangPack",fatal:!1})}Se&&(om({language:c,pack:Se,fallback:J.defaultLanguage}),Me.set(c),wt.update(it=>it+1))}nm(c)&&Me.set(c)}),Me=ae(t),wt=ae(0),Lt=ae(e);fe(t);let mt=(c,_)=>{let V=ge(Me);return rm(V,c,_,J.defaultLanguage)},ce=ae("thumb");ce.subscribe(c=>{c==="ads"&&P.info.playbackState$.getValue()&&ct()});let We=(()=>{let c=mi([nt,ce],([_,V])=>_?"crashed":V);return jt(Ie({},c),{is:_=>ge(c)===_})})(),Ye=ae(),ct=()=>{Ye.set({muted:P.info.muted$.getValue()})},Ut=(()=>{let c=ae(new Set(g));return jt(Ie({},c),{add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(Se=>!_.includes(Se)):oe.filter(Se=>Se!==_))})},includes:_=>{let V=ge(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}})})(),zt=ae({width:0,height:0}),si=null,$i=P.info.isBuffering$,ji=Nr($i.getValue(),c=>{let _=$i.subscribe(V=>{V&&si===null?si=window.setTimeout(()=>{c($i.getValue()),si=null},J.loaderDelay):c(V)});return()=>{_.unsubscribe(),si&&clearTimeout(si)}});pe.log("create store"),U({message:"create store"});let Dt=c=>{let _=c.container,V=()=>{oi=new MutationObserver(Se=>{let{removedNodes:it}=Se[0];it.length&&_.append(P.experimental.element$.getValue())}),oi.observe(_,{childList:!0})},oe=P.experimental.element$.getValue();if(oe)_.append(oe),V();else{let Se=P.experimental.element$.pipe((0,rt.filter)(it=>!!it),(0,rt.once)()).subscribe(it=>{_.append(it),V()});ye.add(Se)}},pi=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),w?Dt(c):(rt.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,rt.now)()]}),P.initVideo(c)),pe.log("init video",{isInteractive:w}),c.subtitles&&P.setExternalTextTracks(c.subtitles),Ae=c,Pe=c.subtitlesForcedLanguage||""},hi=new rt.Subject,bt=c=>hi.next(c),Jt=new rt.Subject,xi=new rt.Subject,Xi=new rt.Subject,oi=null,kt={actionRewind$:Jt,actionSeek$:xi,inPiP$:Ct,inFullscreen$:new rt.Observable(c=>vt.subscribe(_=>c.next(_))),actionSetSubtitle$:Xi,nextMovie$:hi},qe=new rt.Subject,wi={actionSeek$:xi,actionSubtitlesSwitched$:qe,playerSize$:new rt.Observable(c=>zt.subscribe(_=>c.next(_))),inPiP$:Ct,inFullscreen$:new rt.Observable(c=>vt.subscribe(_=>c.next(_))),isLoaderVisible$:new rt.Observable(c=>ji.subscribe(_=>c.next(_)))};if(Z){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=Z;c&&(w||oe.add(c.attachTo(P)),oe.add(c.attachToUi(kt)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(Se=>{U({message:`onestat auth error ${String(Se)}`})}),V&&V.attachTo(P)),_&&(oe.add(_.attachTo(P,Te.events)),oe.add(_.attachToUi(wi)),oe.add(_.attachToAds(Te.events)),_.updateContext({isMobile:ge(Fe)}),_.authorize(a))}if(j){let c=new rt.Subscription,_=(V,oe)=>c.add(V.subscribe(oe));if(_(P.events.managedError$,V=>{j.logIError(V)}),_(P.events.fatalError$,V=>{j.logIError(V,!0)}),Z){let{oneStat:V}=Z;V&&_(V.experimental.error$,oe=>{j.logIError(oe)})}j.sentrySubscription.add(c)}let xo=()=>{if(gi.clientChecker.device.isIOS&&ke)try{tb(ke)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(P.experimental.element$.subscribe(c=>{c&&(ke=c,c.classList.add("player-media"),Ka(ie)&&ie.updateVideoElement(),w&&c.setAttribute("pip","false"),ne==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(P.events.ended$.subscribe(()=>{var c;xo(),(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(()=>ht(null,null,function*(){var _,V;Ka(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=P.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=ze.onStarted)==null||V.call(ze,c)}))).add(P.events.willSeek$.subscribe(({from:c,to:_})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,_)})).add(P.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(P.info.position$.subscribe(c=>{var V;let _=P.info.duration$.getValue();isFinite(_)&&_>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,_,c),Te.setPosition(c,_))})).add(P.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(P.events.loadedMetadata$.subscribe(()=>{Ot.set(!0)})).add(P.info.is3DVideo$.subscribe(c=>{$e.set(c)})).add(P.info.isEnded$.subscribe(c=>{w&&(c?(I!=null&&I.getValue()&&Ut.add(jd),Ut.add("PLAY_BUTTON")):Ut.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 Eo=new rt.Subscription,hn=()=>{var it,At,qt;let{debugLog:c}=J,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Zt}=c;_=c.tag,V=(it=Zt==null?void 0:Zt[0])!=null?it:V,oe=(qt=(At=Zt==null?void 0:Zt[1])!=null?At:Zt==null?void 0:Zt[0])!=null?qt:oe}let Se=_?`: ${_}`:"";Eo.add(P.events.log$.subscribe(Zt=>{console.debug(`%c sdk${Se} `,`background:${V};`,`sdk component: ${Zt.component}`,Zt.message)})).add(Ke.log$.subscribe(Zt=>{console.debug(`%c ui${Se} `,`background:${oe};`,`ui component: ${Zt.component}.`,Zt.message)}))},It=()=>{Eo.unsubscribe()},Wt=(c,_)=>{pe.log("start camera manual rotation",{mx:c,my:_}),P.startCameraManualRotation(c,_)},K=(c=!1)=>{pe.log("stop camera manual rotation",{immediate:c}),P.stopCameraManualRotation(c)},Mt=(c,_,V)=>{pe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),P.moveCameraFocusPX(c,_,V)},di=()=>{P.holdCamera()},ut=()=>{P.releaseCamera()},Tt=Nr(P.info.position$.getValue(),c=>{let _,V,oe=()=>{let Se=P.info.playbackState$.getValue(),it=P.info.isLive$.getValue(),At=P.info.duration$.getValue(),qt=P.info.position$.getValue();if(Se&&[gi.PlaybackState.PLAYING,gi.PlaybackState.PAUSED].includes(Se)){let Zt=it?qt-At:P.getExactTime();Zt!==V&&c(Zt),V=Zt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),Xt=li(P.info.playbackState$),st=li(P.info.isBuffering$),Hi=mi([Xt,st],([c,_])=>_?"buffering":c),Ui=li(P.info.currentBuffer$),sn=li(P.info.isEnded$),ko=li(P.info.isLive$),zi=J.features.playbackRate?li(P.info.canChangePlaybackSpeed$):Nr(!1),Zi=li(P.info.liveBufferTime$),Br=li(P.info.volume$),wo=li(P.info.muted$),co=Fu(P.info.predefinedQualityLimitType$.pipe((0,rt.map)(c=>c===gi.PredefinedQualityLimits.TRAFFIC_SAVING)),P.info.predefinedQualityLimitType$.getValue()===gi.PredefinedQualityLimits.TRAFFIC_SAVING),Pi=Fu(P.info.predefinedQualityLimitType$.pipe((0,rt.map)(c=>c===gi.PredefinedQualityLimits.HIGH_QUALITY)),P.info.predefinedQualityLimitType$.getValue()===gi.PredefinedQualityLimits.HIGH_QUALITY),an=li(P.info.autoQualityLimitingAvailable$),ln=li(P.info.availableQualities$),Vn=li(P.info.availableQualitiesFps$),er=li(P.info.chromecastState$),Fr=li(P.info.chromecastDeviceName$),rs=li(P.info.currentFormat$),_s=li(P.info.throughputEstimation$),ss=li(P.info.videoBitrate$),tr=li(P.info.intrinsicVideoSize$),$r=li(P.info.duration$),_n=li(P.info.isAudioAvailable$),Rn=()=>{si&&clearTimeout(si),si=null},zo=mi([$r,ko],([c,_])=>_?-c:c),Nn=mi([Xt],([c])=>c===gi.PlaybackState.PLAYING),ir=li(P.info.atLiveEdge$),yr=li(P.info.atLiveDurationEdge$),xr=li(P.info.position$),Hr=mi([xr,$r],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),uo=mi([er],([c])=>c===gi.ChromecastState.CONNECTED),Ur=li(P.info.availableVideoStreams$),On=J.features.audioLanguages?li(P.info.availableAudioStreams$):Nr([]),Dn=li(P.info.currentVideoStream$),po=li(P.info.currentAudioStream$),zr=c=>{c.language&&Jf(c.language),P.setVideoStream(c)},Bn=(c,_)=>{P.setAudioStream(c),qo(_)&&(c.language&&Jf(c.language),J.features.userVideoPrefs&&i&&im(J.userSalt,String(i),{audioTrackId:c.id}))},gt=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(oe=>"isDefault"in oe&&oe.isDefault)),J.features.userVideoPrefs&&i){let oe=Ku(J.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let Se=c.find(it=>it.id===oe.audioTrackId);_=Se!=null?Se:_}}let V=B_();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},ui=c=>{pe.log("change audio stream",{id:c});let _=P.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&Bn(_,!0)},wr=!1;ye.add(P.info.availableAudioStreams$.subscribe(c=>{if(!wr&&c.length){let _=gt(c);_&&(P.setAudioStream(_),wr=!0)}})),On.subscribe(c=>{var _;(_=s==null?void 0:s.onAvailableAudioStreamsChanged)==null||_.call(s,c.map(({label:V="",id:oe="",language:Se=""})=>({label:V,language:Se,id:oe})))}),po.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let or=!1;ye.add(P.info.availableVideoStreams$.subscribe(c=>{if(!or&&c.length){let _=gt(c);_&&(P.setVideoStream(_),or=!0)}}));let nr=ae(void 0),dn=li(P.info.isAutoQualityEnabled$,c=>c&&nr.set(void 0)),Sr=li(P.info.currentQuality$,()=>nr.set(void 0)),cn=mi([nr,Sr],([c,_])=>c!=null?c:_),bn=mi(rs,c=>c!==gi.VideoFormat.MPEG),Fn=mi([ln,Vn,dn,cn,bn],([c,_,V,oe,Se])=>{let it=[];Se&&it.push({value:"auto",displayValue:mt("auto_quality_option"),selected:V});let At=c.filter(qt=>!(0,rt.isInvariantQuality)(qt));for(let qt of At){let Zt=_[qt];it.push({value:qt,displayValue:`${qt}${Zt?Eb(Zt):""}`,selected:V?!1:qt===oe})}return it}),Hn=li(P.info.currentPlaybackRate$),Wo=mi([Hn,ir,yr],([c,_,V])=>{let oe=V||w?1:J.controls.playbackRateMin,Se=_?1:J.controls.playbackRateMax,it=J.controls.playbackRateStep,At=[];for(let qt=oe;qt<=Se;qt+=it)At.push({value:qt,displayValue:qt===1?mt("playback_rate_1"):mt("playback_rate",{multiplier:qt.toString(10)}),selected:c===qt});return At}),Po=()=>({displayValue:mt("subtitles_off"),value:Mn,language:""}),rr=ae(Po()),Ao=mi([rr,wt],([c],_)=>{c.value===Mn?_(Po()):_(c)}),Wi=J.features.subtitles?li(P.info.availableTextTracks$):Nr([]),Un=I_(),sr=mi([Wi,Ao],([c,_],V)=>{var it;let oe=[],Se=c.find(({id:At})=>At===_.value);if(Se!=null&&Se.url){let[,At]=(it=Un.find(Se.url))!=null?it:[];if(At){V(At);return}et.download(Se.url).then(qt=>{if(!qt||et.isDestroyed())return;let Zt=new kb,Xs=Se.language;if(Xs){let V$=!!Se.isAuto,R$=Zt.parse(qt,Xs);oe.push({lang:Xs,subtitles:R$,isAuto:V$,id:Se.id})}Un.add(Se.url,oe),ge(Ao).value===_.value&&V(oe)}).catch(qt=>{var Zt;(Zt=Z==null?void 0:Z.oneStat)==null||Zt.logError({errorType:"Subtitles download",fatal:!1}),j==null||j.report(qt,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),ar=mi([Hn,Nn,Ao],([c,_,V],oe)=>{let At;if(P.info.isLive$.getValue()&&_&&V.value!==Mn){let Zt=()=>{let Xs=1e3/(3*c);At=setTimeout(Zt,Xs),oe(Date.now())};return Zt(),()=>clearTimeout(At)}}),lr=mi([Wi,Ao],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:Se,id:it}of c){let At=oe&&yc(oe);oe&&At&&V.push({displayValue:Se?mt("subtitles_auto",{language:At}):At,value:it,selected:(_==null?void 0:_.value)===it,isAuto:Se,language:oe})}return V.length?(V.unshift(jt(Ie({},Po()),{selected:(_==null?void 0:_.value)===Mn})),V):[]}),Ko={available:[],prev:[]},Tr=()=>{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},St=mi([Tt,Ao,sr,ar],([c,_,V,oe])=>{var it;let Se=P.info.isLive$.getValue();if(Se&&Ko.prev!==V){let At=V.find(({id:Zt})=>Zt===_.value),qt=Ko.prev.find(({id:Zt})=>Zt===_.value);if(At){let Zt=jt(Ie({},At),{subtitles:[...(it=qt==null?void 0:qt.subtitles)!=null?it:[],...At.subtitles]});Ko.available=[Zt],Ko.prev=V}}if(_&&_.value!==Mn){let At=Se?Tr():c,qt=Se?Ko.available:V;return Lb(At,_,qt,Se)}}),Pt=mi([St],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(Ao.subscribe(c=>{var _,V;if(c.value===Mn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(fp).find(([Se,it])=>it===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let fo=ae(!0),Lo=mi([Ui,zo,xr,Zi],([c,_,V,oe])=>{var qt;let Se=(qt=c==null?void 0:c.end)!=null?qt:0;if(!oe)return Se/_;let At=-V+oe-_;return(Se-At)/_}),So=li(P.info.availableSources$),To=mi([So],([c])=>Object.keys((c==null?void 0:c[gi.VideoFormat.MPEG])||{}).length>0),Ri=()=>{var V,oe,Se;let c=Object.keys(((oe=(V=P.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[gi.VideoFormat.MPEG])||{}),_=(0,rt.getHighestQuality)(c)||rt.VideoQuality.Q_144P;return(Se=Ae.sources[gi.VideoFormat.MPEG])==null?void 0:Se[_]},zn=()=>{var _;let c=Ri();if(c)pe.log("download video",{url:c}),S_(c,((_=Ae==null?void 0:Ae.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";pe.log("download video",{message:V}),U({message:V})}},Ji=()=>{U({message:"toggle muted"});let c=P.info.muted$.getValue();P.info.volume$.getValue()===0&&!c?Kr(Cr(),!1):$n(!c,!1)},Wr=()=>{var c;if(Yt.ui.settingsMenu.visible$.set(!1),!ge(Yt.ui.settingsSubMenu.visible$)){let _=ge(Yt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let oe=ed(_),Se={top:0,left:0,bottom:0,right:0};s.uiInfo.onSettingsMenu({visible:!1,size:oe,position:Se,name:"settings"})}}pe.log("close settings menu")},Ai=(c,_=()=>Promise.resolve())=>ht(null,null,function*(){var Se;Yt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Yt.ui.settingsMenu.visible$.set(!0),yield _();let V=ge(Yt.ui.settingsMenu.ref$),oe=wa();if((Se=s==null?void 0:s.uiInfo)!=null&&Se.onSettingsMenu&&V&&oe){let At=ed(V),qt=Os(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:At,position:qt,name:"settings"})}pe.log("open settings menu",{wasOpenedByKeyboard:c})}),bs=(c,_=!1)=>{var it;Yt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Yt.ui.settingsMenu.ref$),oe=wa(),Se=ge(Yt.ui.settingsMenu.visible$);if((it=s==null?void 0:s.uiInfo)!=null&&it.onSettingsMenu&&V&&oe)if(Se&&!_){let qt=ed(V),Zt=Os(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:qt,position:Zt,name:"settings"})}else{let qt=ed(c),Zt={top:0,left:0,bottom:0,right:0},Xs=ge(Yt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:qt,position:Zt,name:Xs})}pe.log("close settings sub menu")},as=(c,_)=>{var oe;Yt.ui.settingsSubMenu.visible$.set(!0),Yt.ui.settingsSubMenu.ref$.set(_),Yt.ui.settingsSubMenu.name$.set(c);let V=wa();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let it=ed(_),At=Os(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:it,position:At})}pe.log("open settings sub menu",{name:c})},Cr=()=>{var _;let c=Math.max(J.volumeMinRestore,(_=Hu())!=null?_:0);return c===0?J.volumeDefault:c},qo=c=>{let _=J.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},Kr=(c,_)=>{let V=c===0?Cr():c,oe=P.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let Se=!l||We.is("ads");oe&&c>0&&Se&&(oe=!1,qo(_)&&Xf(!1)),P.setVolume(c,oe),Te.setVolume(c),qo(_)&&Qf(V)},$n=(c,_)=>{let V=P.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=We.is("ads");if(P.setMuted(c,oe),Te.setVolume(c?0:V),qo(_)&&(!oe||!c)&&Xf(c),!c&&V===0){let Se=Cr();P.setVolume(Se),qo(_)&&Qf(Se),Te.setVolume(Se)}},yn=ae(!1),Mo=c=>{var _,V;pe.log("set looped",{isLooped:c}),yn.set(c),P.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};Mo(re);let Ir=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},Ue=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),pe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Yt.ui.autoplayNextEnabled$.set(c),U_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Vt=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),pe.log("set timer next video running",{timerNextVideoRunning:c}),Yt.ui.timerNextVideoRunning$.set(c)},Si=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onPrevVideoClick))try{_=(V=s==null?void 0:s.onPrevVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onPrevVideoClick callback failed to execute"})}X(!0),_&&Y()},Qo=(c=!0)=>{var V;let _=!0;if(c&&(s!=null&&s.onNextVideoClick))try{_=(V=s==null?void 0:s.onNextVideoClick)==null?void 0:V.call(s)}catch(oe){U({message:"onNextVideoClick callback failed to execute"})}X(!1),_&&le()},mo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},Vo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},vo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},Go=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},Wn=()=>{P.prepare()},un=()=>{(0,rt.assertNonNullable)(Yt);let c=ge(Yt.ui.controls.disabledControls$),_=ge(Yt.playerPhase),V={playerPhase:_,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),_==="ads"){V.action="play",pe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var it;U({message:"toggle play, call player.play"}),V.action="play",P.play(),(it=s==null?void 0:s.onPlay)==null||it.call(s)},Se=()=>{var it;U({message:"toggle play, call player.pause"}),V.action="pause",P.pause(),(it=s==null?void 0:s.onPause)==null||it.call(s)};if(P.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),Jt.next(),xi.next(gs.SeekAction.REWIND),w){N==null||N();return}P.seekTime(0),oe()}else P.info.playbackState$.getValue()!==gi.PlaybackState.PLAYING?oe():Se();pe.log("toggle play",V)},eo=(c,{changeReason:_="default",appliesTo:V="to-video"}={},oe)=>{U({message:`set quality, quality: ${c}`}),pe.log("set quality",{quality:c}),P.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Se}=J.features;Uu(),c!=="auto"?(Se?(zu({type:"exact_quality",quality:c,videoId:i},V),P.setPredefinedQualityLimits(gi.PredefinedQualityLimits.UNKNOWN)):Gf(i,c),nr.set(c),P.setQuality(c)):Se&&_==="default"&&(cr("auto_quality",V,oe),ge(co)&&to(!1,void 0,oe),ge(Pi)&&Kn(!1,void 0,oe))},to=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),pe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?gi.PredefinedQualityLimits.TRAFFIC_SAVING:gi.PredefinedQualityLimits.UNKNOWN;J.features.qualityDetailsSubMenuEnabled?(dr(oe,_,V),Jd(!1)):(P.setPredefinedQualityLimits(oe),qo(V)&&Jd(c))},Kn=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),pe.log("set high quality enabled",{highQualityEnabled:c}),dr(c?gi.PredefinedQualityLimits.HIGH_QUALITY:gi.PredefinedQualityLimits.UNKNOWN,_,V)},dr=(c,_,V)=>{c!==gi.PredefinedQualityLimits.UNKNOWN&&(ge(an)&&!ge(dn)&&eo("auto",{appliesTo:_,changeReason:"limit-changed"},V),cr(c,_,V)),P.setPredefinedQualityLimits(c)},cr=(c,_,V)=>{qo(V)&&(zu({type:c,videoId:i},_),_==="as-default"&&zu({type:c,videoId:i},"to-video"))},qn=(c,_=!0)=>{pe.log("set playback rate",{playbackRate:c}),P.setPlaybackRate(c),J.features.saveRate&&we&&!P.info.isLive$.getValue()&&_&&F_(c)},$s=()=>{let c=ge(zi),_=ge(Wo),V=_.findIndex(({selected:Se})=>Se);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return qn(oe.value),oe},ys=()=>{let c=ge(zi),_=ge(Wo),V=_.findIndex(({selected:Se})=>Se);if(V===0||!c)return _[V];let oe=_[V-1];return qn(oe.value),oe},je=(c=jt(Ie({},Po()),{selected:!1}),_)=>{pe.log("set subtitles",Ie({},c)),c.value!==Mn&&Xi.next(c.isAuto?c.value+"_auto":c.value),qe.next({enabled:c.value!==Mn,lang:c.language,auto:!!c.isAuto}),rr.set(c),qo(_)&&(tm(c.value===Mn?void 0:c.language),J.features.userVideoPrefs&&i&&im(J.userSalt,String(i),{subtitleTrackId:c.value===Mn?void 0:c.value}))},ei=c=>{pe.log("toggle subtitles");let _=ge(Ao);(_==null?void 0:_.value)===Mn?go(c):Yo(c)},Li=(c,_)=>{pe.log("change subtitle",{enabled:c}),c?go(!0,_):Yo(!0)},go=(c,_)=>{pe.log("subtitle on");let V=ge(lr),oe=ge(Me),Se=Pe!=null?Pe:oe,it;_&&(it=V.find(At=>At.value===_)),it!=null||(it=V.filter(At=>At.value!==Mn).find(At=>At.language===Se)),je(it!=null?it:V[1],c)},Yo=c=>{pe.log("subtitle off"),je(void 0,c)};ye.add(P.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:Se,isAuto:it,id:At}of c){let qt=Se&&yc(Se);Se&&qt&&oe.push({id:At,language:Se,title:it?mt("subtitles_auto",{language:qt}):qt})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let qr=ae(!0),Ro=c=>{qr.set(c)},jo=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),pe.log("seek to time",{time:c,action:_,forcePrecise:V}),xi.next(_),P.info.isLive$.getValue()){let Se=P.info.duration$.getValue(),it=Math.min(0,Se+c);P.seekTime(it,V)}else{if(I!=null&&I.getValue())return;P.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),P.seekTime(hg(c),V)}},xs=c=>{U({message:`seek to episode start time: ${c}`}),pe.log("seek to episode start time",{time:c}),jo(c,gs.SeekAction.EPISODE,!0)},zs=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),pe.log("seek to percent",{percent:c,action:_});let oe=ge(zo)*c;jo(oe,_,V)},_a=c=>{U({message:`seek external, time: ${c}`}),pe.log("seek external",{time:c}),xi.next(gs.SeekAction.UNKNOWN),P.seekTime(P.info.isLive$.getValue()?-c:c)},Ws=c=>{var oe,Se;let _=(oe=c.max)!=null?oe:"none",V=(Se=c.min)!=null?Se:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),pe.log("set auto quality limits",{max:_,min:V}),P.setAutoQualityLimits(c)},xn=c=>{U({message:`seek external to episode start time: ${c}`}),pe.log("seek external to episode start time",{time:c}),jo(c,gs.SeekAction.EPISODE,!0)},at=c=>{U({message:`set playback rate to: ${c}`}),pe.log("set playback rate external",{playbackRate:c}),P.setPlaybackRate(c)},ni=ae(!1),ho=ae(!1),Er=mi([zo],([c])=>!!p&&c>=J.suitableDurationForUsingRichSeek&&J.features.useRichSeek&&!w),Qr=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),wn=mi([ri],([c])=>{let _=td(c);return Qr?!_:_});ye.add(We.subscribe(c=>{c!=="video"&&ni.set(!1)}));let he=ae(void 0),$t=ae(!1),Kt=c=>{U({message:`start scrubbing, progress: ${c}`}),pe.log("start scrubbing",{progress:c}),$t.set(!0),ti(c)},ti=c=>{he.set(c)},Ti,Ei,Mi=()=>{he.set(void 0),$t.set(!1)},Ci=()=>{clearTimeout(Ei),clearTimeout(Ti),Ti=window.setTimeout(()=>{Mi()},500),ke==null||ke.removeEventListener("seeked",Ci)},Ks=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),pe.log("complete scrubbing",{progress:c}),zs(c,gs.SeekAction.SLIDER,_),ge(Yt.ui.isMobile)&&ge(Yt.state.currentFormat$)===gi.VideoFormat.HLS?(ke==null||ke.addEventListener("seeked",Ci),Ei=window.setTimeout(()=>{Ci()},300)):Mi()},qs=mi([Tt,zo,he],([c,_,V],oe)=>{oe((0,rt.isNonNullable)(V)?V*_:c)}),Qs=ae(!1),gd=()=>{Qs.set(!0)},ba=()=>{Qs.set(!1)},kr=mi([zt],([{width:c}],_)=>{let V=xb(c);_(V)}),Gs=Q.filter(c=>T_(c)),$a=mi([kr,Fe],([c,_])=>_?Gs.filter(V=>!V.hideOnMobile):Gs.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),Pr=ae(Q.filter(c=>C_(c))),ws=mi([Pr,kr],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),Ss=mi([ws,$a],([c,_])=>[...J.features.additionalButtonsDesktopControlPanelRight?c.filter(V=>V.type==="desktop-control-panel-right"):[],...J.features.additionalButtons?_.map((V,oe)=>{var Se;return{id:oe,weight:oe,type:"desktop-control-panel-right",testId:V.testId,icon:V.iconUrl,onClick:V.onClick,ariaLabel:(Se=V.ariaLabel)!=null?Se:V.tooltip,tooltipText:V.tooltip}}):[]]),Ar=ae(H),ya=mi([Ar],([c])=>J.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?jt(Ie({},_),{onClick:_.onChangeEnabled}):_):[]),hd=(c,_)=>{let V=ge(Pr).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),_));Pr.set(V)},ml=c=>{let _=ge(Pr);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),Pr.set(_)},_d=c=>{let _=ge(Pr);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),Pr.set(_)},xa=c=>{xi.next(gs.SeekAction.LIVE),U({message:"live switch to low latency "+c}),pe.log("live switch to low latency "+c),P.setLiveLowLatency(c)},bd=(c,_)=>{let V=ge(Ar).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),_));Ar.set(V)},vl=c=>{let _=ge(Ar);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),Ar.set(_)},gl=c=>{let _=ge(Ar);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),Ar.set(_)},ur=ae(z),pt=mi([ur],([c])=>J.features.additionalContextMenuItems?c:[]),ft=(c,_)=>{let V=ge(ur).map(oe=>oe.id!==c?oe:Ie(Ie({},oe),_));ur.set(V)},io=c=>{let _=ge(ur);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),ur.set(_)},No=c=>{let _=ge(ur);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),ur.set(_)},oo=mi([Fe,nt],([c,_],V)=>{V(c&&_)}),_i=()=>{xi.next(gs.SeekAction.LIVE),U({message:"switch to active live"}),pe.log("switch to active live"),P.seekTime(0),P.info.playbackState$.getValue()!==gi.PlaybackState.PLAYING&&Yt.actions.internal.togglePlay()},Ki=()=>{pe.log("skip adman"),Te.skip()},Ys=(c=!0)=>{var oe;(0,rt.assertNonNullable)(Yt),U({message:`switch from ads to video, callPlay: ${c}`}),pe.log("switch from ads to video",{callPlay:c}),ce.set("video"),c&&P.play(),l&&$n(!0,!0);let _=(oe=ge(Ye))==null?void 0:oe.muted,V=!P.info.muted$.getValue();_!==void 0&&!V&&$n(_,!0),Ye.set(void 0)},$d=()=>{(0,rt.assertNonNullable)(Yt),U({message:"switch from video to ads"}),pe.log("switch from video to ads"),Yt.actions.internal.pause(),xo(),ce.set("ads")},Jc=c=>{(0,rt.assertNonNullable)(Yt);let _=c?"LiveWaitingStart":"thumb";pe.log("set live waiting start",{state:c,playerPhase:_}),ce.set(_)},Up=c=>{(0,rt.assertNonNullable)(Yt);let _=c?"LiveWaitingRecover":"thumb";pe.log("set live waiting recover",{state:c,playerPhase:_}),ce.set(_)},eu=c=>{(0,rt.assertNonNullable)(Yt);let _=c?"LiveWaitingRecord":"thumb";pe.log("set live waiting record",{state:c,playerPhase:_}),ce.set(_)},zp=()=>((0,rt.assertNonNullable)(Yt),pe.log("get debug text data"),x_(P,Ae,Yt,Ne.getTraceId())),tu=()=>((0,rt.assertNonNullable)(Yt),JSON.stringify(Ne.getFinishedSpans())),iu=()=>((0,rt.assertNonNullable)(Yt),w_(P,Ae,Yt)),wa=()=>ke,Wp=()=>{U({message:"toggle chromecast"}),pe.log("toggle chromecast"),P.toggleChromecast()},js=c=>{var V;if((0,rt.assertNonNullable)(Yt),P.info.isEnded$.getValue())return;let _=!c;if(ge(Yt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),pe.log("pause ads",{internalCall:_}),Te.pause();return}U({message:`pause video, internalCall: ${_}`}),pe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),P.pause()},hl=c=>{var V;(0,rt.assertNonNullable)(Yt);let _=!c;if(ge(Yt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),pe.log("play ads",{internalCall:_}),Te.play();return}U({message:`play video, internalCall: ${_}`}),pe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),P.play()},ou=c=>{(0,rt.assertNonNullable)(Yt);let _=!c;if(ge(Yt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${_}`}),k==null||k()},nu=(c,_)=>{(0,rt.assertNonNullable)(Yt),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),pe.log("first start",{showAds:c,external:_}),c?ce.set("ads"):(ce.set("video"),_?P.play():Yt.actions.internal.togglePlay())},_l=()=>(U({message:"getting time codes"}),v),ru=()=>{let c=_l();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue();return c.find(V=>V.time>_)},Kp=c=>{let _=c;_||(_=ru());let V=P.info.position$.getValue();pe.log("seek to next episode",Ie({currentTime:V},_)),_&&(U({message:"seek to next episode"}),jo(_.time,gs.SeekAction.EPISODE,!0))},su=()=>{let c=_l();if(!c||[0,1].includes(c.length))return;let _=P.info.position$.getValue(),V=c.findIndex(Se=>Se.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},He=c=>{let _=c;_||(_=su());let V=P.info.position$.getValue();pe.log("seek to prev episode",Ie({currentTime:V},_)),_&&(U({message:"seek to prev episode"}),jo(_.time,gs.SeekAction.EPISODE,!0))},bi=()=>(U({message:"getting preview thumbs data"}),pe.log("get preview thumbs data",Ie({},p)),p),Xo=()=>ht(null,null,function*(){let c=ie==null?void 0:ie.isActive(),_="none";ie!=null&&ie.isActive()?(_="exit",yield ie==null?void 0:ie.exit()):(_="request",yield ie==null?void 0:ie.request()),pe.log("toggle picture in picture",{isActive:c,action:_})}),Lr=(c=-90)=>{pe.log("rotate video",{alphaDiff:c}),ri.update(_=>_+c)},Oo=ae([]);T==null||T.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,Se],subjects:it}=c[V];V===0&&oe!==0&&_.push({time:0,text:"",interactive:!1,completed:!0}),_.push({time:oe/1e3,text:"",interactive:!0,completed:J.features.interactiveTimeOpenUri?!it.length||it.every(At=>At.isRemoved):!it.length}),Se!==1/0&&_.push({time:Se/1e3,text:"",interactive:!1,completed:!0})}Oo.set(_)});let C$=ae(!1);I==null||I.subscribe(c=>{c&&ge($t)&&Mi()});let hg=c=>{if(!w)return c;let _=ge(Oo),V=ge(zo),Se=ge(xr)/V,it=_.find(At=>At.interactive&&!At.completed&&At.time>Se);return typeof(it==null?void 0:it.time)=="number"?Math.min(c,it.time-.05):c},I$=()=>{Yt.ui.episodes.panelOpened$.set(!1)},E$=()=>{pe.log("destroy store"),clearTimeout(Ei),clearTimeout(Ti),ye.unsubscribe(),Eo.unsubscribe(),P.destroy(),Te.destroy(),Z==null||Z.destroy(),j==null||j.destroy(),ee.unsubscribe(),oi==null||oi.disconnect(),oi=null,et.destroy()},k$=mi([ir,We,zi],([c,_,V])=>f.features.doubleForwardAvailable&&!c&&_==="video"&&V),qp=ae(!1),_g=2,au=null,bg=c=>{if(!ge(Nn)&&c)return;let _=P.info.currentPlaybackRate$.getValue();c?_!==_g&&(au=_,qn(_g,!1),qp.set(!0)):(au&&qn(au,!1),qp.set(!1),au=null)};We.subscribe(c=>{c!=="video"&&bg(!1)});let P$=()=>{js(!1),ni.set(!0)},A$=()=>{hl(!1),ni.set(!1)},Qp=!1,L$=()=>{ho.set(!0),Qp=P.info.playbackState$.getValue()===gi.PlaybackState.PLAYING,js(!1)},M$=()=>{ho.set(!1),!ge(ni)&&Qp&&hl(!1),Qp=!1};P.events.playing$.subscribe(()=>{ge(ni)&&js(!1)});let Yt={interfaceLanguage$:Me,isCyrillicRelatedInterface$:Lt,initVideo:pi,videoId:i,isClip:o,playerPhase:We,vsid:Ft,state:{positionExact$:Tt,positionWithScrubbing$:qs,duration$:zo,playbackState$:Xt,playbackStateRealistic$:Hi,isPlaying$:Nn,isLoaderVisible:ji,bufferedProgress$:Lo,isLive$:ko,canChangePlaybackSpeed$:zi,isActiveLive$:ir,isOldestAvailableLive$:yr,isRewindableLive$:Hr,isEnded$:sn,muted$:wo,volume$:Br,trafficSavingEnabled$:co,highQualityEnabled$:Pi,autoQualityLimitingAvailable$:an,availableVideoStreams$:Ur,availableAudioStreams$:On,videoStream$:Dn,audioStream$:po,currentQuality$:cn,isAutoQualityEnabled$:dn,availableQualities$:Fn,currentPlaybackRate$:Hn,availablePlaybackRates$:Wo,currentSubtitle$:Ao,availableTextTracks$:Wi,availableSubtitlesList$:lr,currentSubtitleCaptions$:Pt,isAutoSubtitleCaptionVisible$:fo,chromecastState$:er,chromecastDeviceName$:Fr,chromecastConnected$:uo,currentFormat$:rs,throughputEstimation$:_s,videoBitrate$:ss,videoSize$:tr,errorLog$:be,crashed$:nt,isAudioAvailable$:_n,isAudioDisabled:!!l,canDownload:J.features.download&&!!d,availableSources$:So,hasMpegSources$:To,isInteractive:w,showInteractiveGraph:J.features.interactiveGraph,showSeekToInteractive:J.features.seekToInteractive,showPlayPrevChapter:J.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:J.features.interactiveTimeIndicator&&!!ge(Oo).length,interactiveEpisodes$:Oo,isInteractiveTime$:I?li(I):ae(!1),isInteractiveExpectation$:C$,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:A,looped$:yn,loadedMetadata$:Ot,isAutoQualityAvailable$:bn,previewTrackActive:ni,previewTrackDragInProgress:ho},ui:{t:mt,controlsVisible:ae(!1),touched:ae(!1),controls:{prevButton:ae(void 0),playButton:ae(void 0),replayButton:ae(void 0),nextButton:ae(void 0),playPrevChapterButton:ae(void 0),seekToInteractiveButton:ae(void 0),interactiveGraphButton:ae(void 0),liveButton:ae(void 0),time:ae(void 0),episodes:ae(void 0),volume:ae(void 0),subtitles:ae(void 0),settings:ae(void 0),context:ae(void 0),chromecast:ae(void 0),pip:ae(void 0),fullscreen:ae(void 0),vkLogo:ae(void 0),interactiveTimeIndicator:ae(void 0),timeline:ae(void 0),autoplayNextToggle:ae(void 0),additionalButtons:Q.length?Q.reduce(c=>[...c,ae(void 0)],[]):[],disabledControls$:Ut},modals:{hotKeyMap:{show:ae(!1),data:ae({title:"",closeBtnText:"",groups:[]})}},isFullscreen:vt,isFullscreenOpenedByKeyboard:Ht,rotateAlpha:ri,isAutoplay:ae(!1),debugPanelVisible:ae(!1),episodes:{panelOpened$:ae(!1),openedByKeyboard$:ae(!1)},contextMenu:{visible$:ae(!1),btnRef$:ae(void 0),openedByBtnKeyboard$:ae(!1),openedByHotKey$:ae(!1),lastActiveElem$:ae(void 0),showContextMenuBtn$:ae(!1),position$:ae({top:0,left:0})},playerSize:zt,isMobile:Fe,mobileNotReportControlHidden$:oo,icon3DVideoVisible:ae(!1),scrubbingInProgress:$t,volumeChangingInProgress:Qs,is3DVideo:$e,currentGridType$:kr,additionalButtonsDeprecated$:$a,additionalDesktopControlPanelRightButtons$:Ss,additionalSettingsMenuItems$:ya,additionalContextMenuItems$:pt,interactiveHideMobileControls:ae(!1),overlayContainer$:ae(void 0),startedByKeyboard$:ae(!1),autoplayNextEnabled$:ae(!1),timerNextVideoRunning$:ae(!0),settingsMenu:{visible$:ae(!1),ref$:ae(void 0),openedByBtnKeyboard$:ae(!1)},settingsSubMenu:{visible$:ae(!1),ref$:ae(void 0),name$:ae(void 0)},userActionsDisabled:ae(!1),hiddenControls:{volume:ae(!1),vkLogo:ae(!1),pip:ae(!1),chromecast:ae(!1),settings:ae(!1)},isControlsAvailable:qr,controlBlocks:{topLeft:ae(void 0),topRight:ae(void 0),middle:ae(void 0),bottom:ae(void 0),bottomLeft:ae(void 0),bottomRight:ae(void 0)},videoTitleInfo:ae(void 0),doubleForwardOn$:qp,doubleForwardAvailable$:k$,previewTrackNotificationVisible:ae(!1),previewTrackActive:ni,previewTrackDragInProgress:ho,previewTrackAvailable:Er,isPreviewTrackHorizontallyAligned:wn},ads:{position:ae(0),duration:ae(0),playbackState:ae("inactive"),canSkip:ae(!1),secondsToWatchBeforeSkip:ae(0),postrollPassed:ae(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Be,focusManager:ot},actions:{internal:{preload:Wn,firstStart:c=>nu(c,!1),play:()=>hl(!1),pause:()=>js(!1),togglePlay:un,toggleMuted:Ji,openSettingsMenu:Ai,closeSettingsMenu:Wr,openSettingsSubMenu:as,closeSettingsSubMenu:bs,setVolume:c=>Kr(c,!1),setMuted:c=>$n(c,!1),startVolumeChanging:gd,stopVolumeChanging:ba,setVideoStream:zr,setAudioStream:c=>Bn(c,!1),setQuality:(c,_)=>eo(c,_,!1),setTrafficSavingEnabled:(c,_)=>to(c,_,!1),setHighQualityEnabled:(c,_)=>Kn(c,_,!1),setPlaybackRate:qn,incrementPlaybackRate:$s,decrementPlaybackRate:ys,setSubtitle:c=>je(c,!1),toggleSubtitle:()=>ei(!1),togglePictureInPicture:Xo,startScrubbing:Kt,progressScrubbing:ti,completeScrubbing:Ks,toggleChromecast:Wp,switchToActiveLive:_i,switchFromAdsToVideo:Ys,switchFromVideoToAds:$d,skipAd:Ki,setLiveWaitingStart:Jc,setLiveWaitingRecover:Up,setLiveWaitingRecord:eu,getDebugTextData:zp,getTraceTextData:tu,getDebugPanelData:iu,getVideoElement:wa,seekTime:(c,_,V)=>jo(c,_,V),clearDelayedBufferingCheckTimeout:Rn,seekEpisodeStartTime:xs,seekToPercent:zs,getNextEpisode:ru,seekToNextEpisode:Kp,getPrevEpisode:su,seekToPrevEpisode:He,startLogging:hn,stopLogging:It,startCameraManualRotation:Wt,stopCameraManualRotation:K,moveCameraFocusPX:Mt,holdCamera:di,releaseCamera:ut,getVideoEpisodes:_l,getPreviewThumbsData:bi,downloadVideo:zn,addLanguage:om,setLanguage:fe,nextMovie:bt,videoRotate:Lr,correctSeekTimeToInteractive:hg,replayInteractive:N,setLooped:Mo,reportProblem:Ir,setAutoplayNextEnabled:Ue,setTimerNextVideoRunning:Vt,prevVideoClick:Si,nextVideoClick:Qo,nextVideoAnnouncementShow:mo,nextVideoAnnouncementClick:Vo,nextVideoAnnouncementAuto:vo,nextVideoAnnouncementCancel:Go,checkFullscreenSupport:dt,changeDoubleForwardOn:bg,closePreviewTrack:A$,previewTrackOpened:P$,previewTrackDragStarted:L$,previewTrackDragFinished:M$},external:{firstStart:c=>nu(c,!0),play:()=>hl(!0),pause:()=>js(!0),stop:()=>ou(!0),seekTime:c=>_a(c),seekEpisodeStartTime:c=>xn(c),setPlaybackRate:c=>at(c),setAutoQualityLimits:c=>Ws(c),setMuted:c=>$n(c,!0),toggleSubtitle:()=>ei(!0),changeSubtitle:Li,setVolume:c=>Kr(c,!0),returnFocusToEpisodes:I$,updateAdditionalSettingsItem:bd,addAdditionalSettingsItem:vl,removeAdditionalSettingsItem:gl,updateAdditionalContextItem:ft,addAdditionalContextItem:io,removeAdditionalContextItem:No,updateAdditionalButton:hd,addAdditionalButton:ml,removeAdditionalButton:_d,setLiveLowLatency:xa,hideControls:()=>Ro(!1),showControls:()=>Ro(!0),setQuality:c=>eo(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>to(c,"to-video",!0),setHighQualityEnabled:c=>Kn(c,"to-video",!0),changeAudioStream:ui}},callbacks:s,setUiCallbacks:c=>{ze=Ie({},c)},getAdmanWrapper:()=>Te,getLogger:()=>Ke,getPlayer:()=>P,destroy:E$};return Yt};function Zn(t,e,i,o){var v;let r=(v=e[i])==null?void 0:v.getBoundingClientRect(),a=o&&!!r&&!!(r.right-r.left),{top:l,left:d,bottom:s,right:u}=Os(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 Zx=["disabledControls$","additionalButtons"],Jx=["interactiveTimeIndicator"],od=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!Zx.includes(r)){let l=o||Jx.includes(r);a.set(Zn(t,i,r,l))}}};var vp=(t,e,i)=>ht(null,null,function*(){yield yo(),e&&i&&(i.focus(),t.set(!1))});var ew=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 Gm(t){Ze(t,{children:(e,i)=>{var o=ew();b(e,o)},$$slots:{default:!0}})}function Ym(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,v=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,f=d.ui.contextMenu.btnRef$,$=W(void 0);Oe(()=>{n($)&&Et(()=>{f.set(n($))})});let y=I=>{let N=ua(I),k=pb(n($));p.set(k),u.set(N),s.set(!r())},g=()=>{v.set(!0)},w=()=>{v.set(!1)},T=m(()=>r()?"opened":"");Gt(t,{get className(){return n(T)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:g,blur:w,get ariaExpanded(){return r()},get ref(){return n($)},set ref(I){O($,I,!0)},children:(I,N)=>{Gm(I,{})},$$slots:{default:!0}}),F(),o()}var tw=t=>{t.stopPropagation()},iw=M("<div><!> <div></div> <div></div></div>"),ow={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 wc(t,e){var j;B(e,!0),q(t,ow);let[i,o]=Re(),r=()=>x(w,"$isMobile",i),a=()=>x(k,"$areControlsVisible",i),l=()=>x(A,"$currentGridType$",i),d=()=>x(I,"$isInteractiveTime$",i),s=()=>x(g,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),v=()=>x(T,"$isFullscreen",i),p=h(e,"ref",15,void 0),f=W(void 0),$=ve(),y=Io(),{interactiveControlsOpacity$:g}=y,w=$.ui.isMobile,T=$.ui.isFullscreen,I=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,k=$.ui.controlsVisible,E=(j=$.callbacks)==null?void 0:j.onInteractiveTimeIndicatorClick,A=$.ui.currentGridType$,Q=m(()=>!r()&&a()),H=m(()=>Ns(l(),"s")),z=m(()=>!d()||!!s()||n(Q)),Y=W(!1);Oe(()=>{O(Y,n(z),!0)});let le=()=>{O(Y,!0)},X=()=>{var ie;re(),(ie=n(f))==null||ie.addEventListener("animationiteration",le,{once:!0})},re=()=>{var ie;O(Y,!1),(ie=n(f))==null||ie.removeEventListener("animationiteration",le)},Z=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Oe(()=>{u()?X():re()});let ue=()=>{n(z)||(N.set(!0),E==null||E())};mn(()=>{N.clearTimeout(),re()});let ne=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var xe=iw();let J;xe.__mousemove=[tw],xe.__click=ue;var Ne=C(xe);Ho(Ne,{get tooltipContent(){return _e},get tooltipVisible(){return n(we)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:Z,get ref(){return p()},set ref(ie){p(ie)},children:(ie,De)=>{mc(ie,{completed:!0})},$$slots:{default:!0}});var pe=L(Ne,2);let P;Xe(pe,ie=>p(ie),()=>p());var Ke=L(pe,2);let Te;Xe(Ke,ie=>O(f,ie),()=>n(f)),S(xe),D((ie,De,Be)=>{J=se(xe,1,"interactive-episode-icon-animated s-27",null,J,ie),P=se(pe,1,"ref-block s-27",null,P,De),Te=se(Ke,1,"pulse s-27",null,Te,Be)},[()=>({mobile:r(),fullscreen:v(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(Y)})]),lt("mouseleave",xe,ne),b(t,xe),F(),o()}Je(["mousemove","click"]);function gp(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);Ho(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Le();let v=m(()=>e.buttonComponent);var p=de(u);Di(p,()=>n(v),(f,$)=>{$(f,Ms(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Ds={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var rw=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 ga(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(()=>`${vn(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=rw();b(l,s)},$$slots:{default:!0}}),F()}var sw=M('<div class="icon-background-mobile s-21"><!></div>'),aw={hash:"s-21",code:".icon-background-mobile.s-21{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function el(t,e){B(e,!0),q(t,aw);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=ve().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Gt(t,{get className(){return n(u)},get testId(){var v;return`btn-${(v=e.type)!=null?v:""}`},get disabled(){return r()},get ariaLabel(){return n(d)},get click(){return e.click},get ariaKeyShortCut(){return n(s)},get ref(){return i()},set ref(v){i(v)},children:(v,p)=>{var f=Le(),$=de(f);{var y=w=>{var T=sw(),I=C(T);let N=m(()=>e.type==="prev");ga(I,{get size(){return"32"},get reversed(){return n(N)}}),S(T),b(w,T)},g=w=>{let T=m(()=>e.type==="prev");ga(w,{get size(){return"24"},get reversed(){return n(T)}})};R($,w=>{o()?w(y):w(g,!1)})}b(v,f)},$$slots:{default:!0}}),F()}var lw=Ce('<path d="M24 21.2a.8.8 90 01-1.34.6L14.08 14a1.34 1.34 90 010-2l8.6-7.8a.8.8 90 011.32.6V11a16 16 90 11-16 16 2 2 90 114 0 12 12 90 1012-12z"></path>');function Sc(t,e){B(e,!0);let i=m(()=>vn(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=lw();b(o,a)},$$slots:{default:!0}}),F()}var Rb=require("@vkontakte/videoplayer-shared/es2015");var dw=M('<div class="icon-background-mobile s-25"></div>'),cw=M("<!> <div><!></div>",1),uw={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 nd(t,e){B(e,!0),q(t,uw);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,Rb.noop),d=G("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Gt(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return ms.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,v)=>{var p=cw(),f=de(p);{var $=I=>{var N=dw();b(I,N)};R(f,I=>{o()&&I($)})}var y=L(f,2);let g;var w=C(y);let T=m(()=>o()?"48":"24");Sc(w,{get size(){return n(T)}}),S(y),D(I=>g=se(y,1,"s-25",null,g,I),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var pw=Ce('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Bs(t,e){B(e,!0);let i=m(()=>vn(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=pw();b(o,a)},$$slots:{default:!0}}),F()}var Nb=require("@vkontakte/videoplayer-shared/es2015");var fw=M('<div class="icon-background-mobile s-24"><!></div>'),mw={hash:"s-24",code:".icon-background-mobile.s-24{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:calc(100% - 32px);justify-content:space-around;left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function rd(t,e){B(e,!0),q(t,mw);let[i,o]=Re(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=Io(),l=h(e,"ref",15,void 0),d=h(e,"isMobile",3,!1),s=h(e,"isPlaying",3,!1),u=h(e,"disabled",3,!1),v=h(e,"className",3,""),p=h(e,"click",3,Nb.noop),$=ve().ui.t,{toggle:y}=a,g=m(()=>y),w=m(()=>r()!==null),T=m(()=>n(w)?r():s()),I=m(()=>n(T)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(T)?Bs:An),k=m(()=>`${d()?"btn-m--play":""} ${v()}`),E=m(()=>n(w)?n(g):p());Gt(t,{get className(){return n(k)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(I)},get ariaKeyShortCut(){return ms.KeyK},get ref(){return l()},set ref(A){l(A)},children:(A,Q)=>{var H=Le();let z=m(()=>n(N));var Y=de(H);{var le=re=>{var Z=fw(),we=C(Z);Di(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"48"}})}),S(Z),b(re,Z)},X=re=>{var Z=Le(),we=de(Z);Di(we,()=>n(z),(ue,ne)=>{ne(ue,{get size(){return"24"}})}),b(re,Z)};R(Y,re=>{d()?re(le):re(X,!1)})}b(A,H)},$$slots:{default:!0}}),F(),o()}var vw=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 jm(t){Ze(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=vw();b(e,o)},$$slots:{default:!0}})}function Tc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Gt(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)=>{jm(d,{})},$$slots:{default:!0}}),F()}var gw=M('<span class="gutter s-26"><span><!></span></span>'),hw={hash:"s-26",code:".gutter.s-26{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-26{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-26{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function Cc(t,e){B(e,!0),q(t,hw);let[i,o]=Re(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,v=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),f="12",$="#000",y=m(()=>r()?"true":"false");Gt(t,{click:v,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(g){a(g)},children:(g,w)=>{var T=gw(),I=C(T);let N;var k=C(I);{var E=Q=>{An(Q,{get size(){return f},fill:$})},A=Q=>{Bs(Q,{get size(){return f},fill:$})};R(k,Q=>{r()?Q(E):Q(A,!1)})}S(I),S(T),D(Q=>N=se(I,1,"toggler s-26",null,N,Q),[()=>({enabled:r()})]),b(g,T)},$$slots:{default:!0}}),F(),o()}var _w=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 Xm(t){Ze(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=_w();fi(),b(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=G("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Gt(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)=>{Xm(d,{})},$$slots:{default:!0}}),F()}var bw=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>'),$w=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 Zm(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=$w(),d=L(de(l));{var s=u=>{var v=bw();b(u,v)};R(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function Ec(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=h(e,"graphIsOpened",3,!1),d=ve().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Gt(t,{get className(){return n(u)},testId:"btn-graph",get disabled(){return r()},get ariaLabel(){return n(s)},get click(){return e.click},get ref(){return i()},set ref(v){i(v)},children:(v,p)=>{let f=m(()=>!!a());Zm(v,{get isOpened(){return n(f)}})},$$slots:{default:!0}}),F()}var Jm=require("@vkontakte/videoplayer-core/es2015");function kc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,v=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,f=m(()=>()=>{if(!l()){v();return}r()===Jm.PlaybackState.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),g=m(()=>l()&&r()===Jm.PlaybackState.PLAYING);Gt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(g)},get ariaLabel(){return d()},get click(){return n(f)},children:(w,T)=>{nc(w,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}var ev=require("@vkontakte/videoplayer-shared/es2015");var yw=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),xw=M('<img class="icon" aria-hidden="true"/>');function tl(t,e){"use strict";let i=W(!1),o=()=>{O(i,!0)};var r=Le(),a=de(r);{var l=s=>{var u=yw();b(s,u)},d=s=>{var u=xw();D(()=>Ve(u,"src",e.icon)),lt("error",u,o),Ra(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function tv(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,ev.noop),r=h(e,"ref",15),a=m(()=>o()===ev.noop),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Ho(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let v=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Gt(s,{get className(){return n(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(l)},get testId(){return n(v)},children:(p,f)=>{tl(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var Ob=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var hp=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Zn(t,i,r,o))};var _p=require("@vkontakte/videoplayer-shared/es2015"),Db=10,Bb=40,iv=.2,Sw=.5,Tw=65,Cw=114,Iw=4,Fb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?Tw:Cw),r=W(!1),a=W(0),l=W(0),d=m(()=>n(o)+Db-Bb-Iw),s=m(()=>(0,_p.interpolate)(n(a),[iv,1],[0,-n(d)])),u=m(()=>(0,_p.interpolate)(n(a),[iv,1],[0,Bb])),v=m(()=>(0,_p.interpolate)(n(a),[iv,1],[0,n(o)+Db]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(v),onPointerDown:g=>{var w;O(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:g=>{if(!n(r))return;let w=Math.max(Math.min(g.clientY-n(l),0),-n(d));O(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=Sw?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var Ew=t=>t;function hs(t,{delay:e=0,duration:i=400,easing:o=Ew}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var kw=M('<span class="root s-2c"> </span>'),Pw={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 ov(t,e){q(t,Pw);var i=kw(),o=C(i,!0);S(i),D(()=>me(o,e.time)),b(t,i)}var Aw=M('<div class="tooltip-wrapper s-j"><div><!></div></div>'),Lw={hash:"s-j",code:'.tooltip-wrapper.s-j{display:block;position:relative}.tooltip.s-j{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-j:after{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgba(41,41,41,.8);bottom:0;content:" ";font-size:0;left:50%;line-height:0;position:absolute;transform:translate(-50%,5px);width:0}.tooltip.active.s-j{opacity:1;visibility:visible}'};function nv(t,e){q(t,Lw);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=W(void 0),u=W(void 0);function v(w){if(!n(u))return 0;let{width:T}=n(u).getBoundingClientRect(),I=T/2;return w<I?I+l():w>e.containerWidth-I?e.containerWidth-I-d():w}let p=m(()=>v(r()));var f=Aw(),$=C(f);let y;var g=C($);ai(g,()=>{var w;return(w=e.children)!=null?w:_t}),S($),Xe($,w=>O(u,w),()=>n(u)),S(f),Xe(f,w=>O(s,w),()=>n(s)),D(w=>{Qe(f,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-j",null,y,w),Qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,f)}var Hb=t=>Math.abs(t)/90%4===1;var Mw=M('<div class="preview s-i"></div>'),Vw=M('<div class="time s-i"> </div>'),Rw=M('<div><!> <div class="episode s-i"><!></div> <!></div>'),Nw={hash:"s-i",code:".timeline-preview.s-i{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-i{bottom:72px}.preview.s-i{background-color:var(--timeline-preview-bg);border:1px solid var(--white);border-radius:8px;box-shadow:0 0 2px var(--timeline-preview-shadow),0 8px 24px var(--timeline-preview-shadow)}.episode.s-i{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-i,.time.s-i{font-size:13px;font-weight:500;line-height:16px;text-align:center;text-shadow:0 8px 24px var(--timeline-preview-shadow),0 0 2px var(--timeline-preview-shadow)}.time.s-i{color:var(--white)}"};function rv(t,e){B(e,!0),q(t,Nw);let[i,o]=Re(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(g,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),v=h(e,"progress",3,0),p=h(e,"duration",3,0),f=h(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,g=$.ui.playerSize,w=W(0),T=W(0),I=W(""),N=W(0),k=W(0),E=W(0),A=W(0),Q=m(()=>lp(v(),p(),u())),H=m(()=>td(r())),z=m(()=>Hb(r())),Y=m(re),le=m(()=>(n(z)?1:-1)*(n(w)/2-n(T)/2)),X=m(()=>n(le)*-1);Oe(()=>{(j=>{O(w,j.width,!0),O(T,j.height,!0)})(we())}),Oe(()=>{(j=>{O(I,j.imgSrc,!0),O(N,j.imgWidth,!0),O(k,j.imgHeight,!0),O(E,j.imgOffsetX,!0),O(A,j.imgOffsetY,!0)})(ue(v()))});function re(){var Be;let j=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=Z(),De=30;return(Be=n(Q))!=null&&Be.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),j)}function Z(){let j=e.previewThumbsData.frameWidth,ie=e.previewThumbsData.frameHeight,De=ie>j;return{width:j,height:ie,isHorizontal:!De,isVertical:De}}function we(){let{height:j,isHorizontal:ie,isVertical:De,width:Be}=Z();return ie&&(j=j/Be*n(Y),Be=n(Y)),De&&(Be=Be/j*n(Y),j=n(Y)),{width:Be,height:j}}function ue(j){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*j/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*j)));let De=Math.floor(ie/e.previewThumbsData.countPerImage),Be=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),ot=ie%e.previewThumbsData.countPerRow,U=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(U=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&U++);let Ae=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ae=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let ke=n(w)*Ae,ze=n(T)*U,et=-ot*n(w),ye=-Be*n(T);return{imgSrc:e.previewThumbsData.links[De],imgWidth:ke,imgHeight:ze,imgOffsetX:et,imgOffsetY:ye}}var ne=Rw();let _e;var xe=C(ne);{var J=j=>{var ie=Mw();D(()=>Qe(ie,`width: ${n(w)}px; height: ${n(T)}px; background-image: url(${n(I)}); background-size: ${n(N)}px ${n(k)}px; background-position: ${n(E)}px ${n(A)}px;
61
- transform: rotate(${r()}deg) ${n(H)?`translate(${n(le)}px, ${n(X)}px)`:""};
62
- `)),b(j,ie)};R(xe,j=>{n(I)&&j(J)})}var Ne=L(xe,2),pe=C(Ne);{var P=j=>{var ie=Le(),De=de(ie);{var Be=U=>{var Ae=fs();D(ke=>me(Ae,ke),[()=>G("tooltip_episode_unfinished")]),b(U,Ae)},ot=U=>{var Ae=fs();D(()=>me(Ae,n(Q).text||"")),b(U,Ae)};R(De,U=>{f()&&n(Q).completed===!1?U(Be):U(ot,!1)})}b(j,ie)};R(pe,j=>{n(Q)&&j(P)})}S(Ne);var Ke=L(Ne,2);{var Te=j=>{var ie=Vw(),De=C(ie,!0);S(ie),D(()=>me(De,d())),b(j,ie)};R(Ke,j=>{f()||j(Te)})}S(ne),D(j=>{_e=se(ne,1,"timeline-preview s-i",null,_e,j),Qe(ne,`width: ${n(H)?n(T):n(w)}px;`)},[()=>({mobile:s()})]),b(t,ne),F(),o()}var Ow=M('<span class="time s-f"> </span>'),Dw=M("<!> <!>",1),Bw={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 sv(t,e){var fe,Me,wt,Lt,mt;B(e,!0),q(t,Bw);let[i,o]=Re(),r=()=>x(X,"$interactiveEpisodes$",i),a=()=>x(A,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(Z,"$isInteractiveTime$",i),u=()=>x(xe,"$previewTrackActive",i),v=()=>x(Q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),f=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(k,"$bufferedProgress$",i),g=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),T=h(e,"ref",15,void 0),I=ve(),N=Nt(),k=I.state.bufferedProgress$,E=I.state.positionWithScrubbing$,A=I.state.duration$,Q=I.state.isLive$,H=I.state.isActiveLive$,z=I.ui.isMobile,Y=N.features.episodes&&w()?I.actions.internal.getVideoEpisodes():void 0,le=I.actions.internal.getPreviewThumbsData(),X=I.state.interactiveEpisodes$,re=I.state.isInteractive,Z=I.state.isInteractiveTime$,we=I.state.isInteractiveExpectation$,ue=I.actions.internal.correctSeekTimeToInteractive,ne=(fe=I.callbacks)==null?void 0:fe.onDisabledTimelineClick,_e=I.ui.controls.disabledControls$,xe=I.ui.previewTrackActive,J=(wt=(Me=I.callbacks)==null?void 0:Me.uiInfo)==null?void 0:wt.onTimelineMouseEnter,Ne=(mt=(Lt=I.callbacks)==null?void 0:Lt.uiInfo)==null?void 0:mt.onTimelineMouseLeave,pe=I.ui.t,P=N.features.interactiveResponsiveUi,Ke=m(()=>re?r():Y),Te=m(()=>rn(a())),j=m(()=>rn(l())),ie=m(()=>l()/a()),De=m(()=>d()||s()),Be=W(!1),ot=W(""),U=W(0),Ae=W(0),ke=W(0),ze=m(()=>({containerWidth:n(Ae),translateXPx:n(U),translateYPx:re&&le?-36:-16,active:n(Be)&&g()&&!n(De)&&!P&&!u(),pointer:!N.features.timelinePreview||!le||v()})),et=pe("aria_timeline"),ye=m(()=>pe("aria_timeline_value",{position:n(j),duration:n(Te)}));function Pe(ce){return!ue||!re?ce:ue(ce*a())/a()}function Fe(ce,We){var Ye;(Ye=e.onSliderPointerDown)==null||Ye.call(e,We),I.actions.internal.startScrubbing(Pe(ce))}function Ft(ce){s()||I.actions.internal.progressScrubbing(Pe(ce))}function vt(ce){var We;I.actions.internal.completeScrubbing(Pe(ce)),O(Be,!1),(We=e.onSliderPointerUp)==null||We.call(e)}function Ht(ce,We,Ye){var ct;(ct=e.onSliderPointerEnter)==null||ct.call(e,ce),ri(ce,We,Ye),O(Be,!0)}function dt(ce,We,Ye,ct){var Ut;(Ut=e.onSliderMove)==null||Ut.call(e,ct,ce),ri(ce,We,Ye),O(Be,!0)}function Ct(){var ce;O(Be,!1),(ce=e.onSliderLeave)==null||ce.call(e)}function ri(ce,We,Ye){O(ke,Pe(ce),!0),O(U,We,!0),Ye&&O(Ae,Ye,!0),O(ot,Ot(ce),!0)}function Ot(ce){let We=rn((v()?1-ce:ce)*a());return v()?`-${We}`:We}let $e=m(()=>p().has("TIMELINE"));var be=Dw(),ee=de(be);nv(ee,Ms(()=>n(ze),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ce,We)=>{var Ye=Le(),ct=de(Ye);{var Ut=si=>{rv(si,{get time(){return n(ot)},get isMobile(){return f()},get videoEpisodes(){return n(Ke)},get previewThumbsData(){return le},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return re}})},zt=si=>{var $i=Ow(),ji=C($i,!0);S($i),D(()=>me(ji,n(ot))),b(si,$i)};R(ct,si=>{N.features.timelinePreview&&le&&!v()?si(Ut):si(zt,!1)})}b(ce,Ye)},$$slots:{default:!0}}));var nt=L(ee,2);Za(nt,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return f()},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(Ke)},onPointerDown:Fe,onHandleMove:Ft,onPointerMove:dt,onPointerUp:vt,onPointerEnter:Ht,onPointerLeave:Ct,get onMouseEnter(){return J},get onMouseLeave(){return Ne},get onDisabledClick(){return ne},get isInteractive(){return re},get disabled(){return n($e)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:vt,get ref(){return T()},set ref(ce){T(ce)}}),b(t,be),F(),o()}var Fw={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 Pc(t,e){B(e,!0),q(t,Fw);let[i,o]=Re(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,v=m(()=>rn(l())),p=m(()=>rn(a())),f=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(v)})),y=m(()=>Math.round(n(f)*100));Za(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return l()},get ariaValueNow(){return n(y)},get ariaValueText(){return n($)},get filledProgress(){return n(f)},hideHandel:!0,get squareBorders(){return r()}}),F(),o()}var Hw=M("<div><!></div>"),Uw=M("<div></div>"),zw={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 il(t,e){B(e,!0),q(t,zw);let[i,o]=Re(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(k,"$disabled",i),d=()=>x(I,"$adPosition",i),s=()=>x(T,"$adDuration",i),u=h(e,"isAds",3,!1),v=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),f=h(e,"needPadding",3,!0),$=h(e,"ref",15,void 0),y=ve(),g=Nt(),w=y.state.isLive$,T=y.ads.duration,I=y.ads.position,N=y.ui.isMobile,k=ae(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var A=Le(),Q=de(A);{var H=Y=>{var le=Hw();let X;var re=C(le);{var Z=ue=>{Pc(ue,{get position(){return d()},get duration(){return s()}})},we=ue=>{sv(ue,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return n(E)},get withEpisodes(){return e.withEpisodes},get onSliderMove(){return e.onSliderMove},get onSliderPointerDown(){return e.onSliderPointerDown},get onSliderPointerUp(){return e.onSliderPointerUp},get onSliderLeave(){return e.onSliderLeave},get onSliderPointerEnter(){return e.onSliderPointerEnter},get ref(){return $()},set ref(ne){$(ne)}})};R(re,ue=>{u()?ue(Z):ue(we,!1)})}S(le),Ls(le,()=>ql(v()&&g.features.usePerformanceFix,k,g.disableInvisibleComponentsTimeout)),D(ue=>X=se(le,1,"timeline s-e",null,X,ue),[()=>({withoutPadding:!f(),mobile:a(),"out-of-flow":l()})]),b(Y,le)},z=Y=>{var le=Uw();let X;D(re=>X=se(le,1,"timeline-stub s-e",null,X,re),[()=>({mobile:a()})]),b(Y,le)};R(Q,Y=>{n(E)?Y(H):Y(z,!1)})}b(t,A),F(),o()}var Ub=require("@vkontakte/videoplayer-shared/es2015");var Ww=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},Kw=M("<div></div>"),qw=M('<div><div class="track s-2b"></div></div>'),Qw={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 lv(t,e){B(e,!0),q(t,Qw);let[i,o]=Re(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(g,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:v=0,links:p=[],frameHeight:f=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:g}=d.state,{startScrubbing:w,progressScrubbing:T,completeScrubbing:I}=d.actions.internal,N=d.ui.rotateAlpha,k=W(void 0),E=W(!1),A=W(0),Q=W(0),H=W(0),z=W(0),Y=m(()=>f<=$),le=m(()=>td(r())),X=m(()=>n(Y)?!n(le):n(le)),re=114,Z=65,we=3,ue=m(()=>n(X)?re:Z),ne=m(()=>n(Y)?re:Z),_e=m(()=>n(Y)?"var(--preview-track-frame-height-horizontal)":"var(--preview-track-frame-height-vertical)"),xe=m(()=>v*n(ue)),J=W(0);Oe(()=>{O(z,Math.ceil(-n(H)/n(ue))-1),O(H,-n(xe)*a()/l())});let Ne=()=>{I(pe(),!0)},pe=()=>l()*-n(H)/n(xe)/l(),P=!1,Ke=ye=>{if(!n(E))return!1;let Pe=ye.clientX-n(A);O(H,n(Q)+Pe),O(H,Math.max(Math.min(n(H),0),-n(xe)),!0),Math.abs(Pe)>1&&(P=!0),T(pe())},Te=ye=>{n(E)&&(O(E,!1),!P&&ye&&O(H,-(ye.offsetX-n(J)/2)),P=!1,Ne())},j=()=>{n(E)&&Te()},ie=m(()=>s/u),De=(ye,Pe)=>{if(ye!==p.length-1)return u;let Fe=0,Ft=Pe*u;for(let vt=1;vt<=u;vt++)ye*s+Fe+Ft<v&&Fe++;return Fe},Be=m(()=>Math.floor(n(z)/s)),ot=m(()=>(0,Ub.getRangeAroundIndex)(3,n(Be),p.length-1)),U=(ye,Pe,Fe)=>{let Ft=s*n(ue);return ye*Ft+Pe*n(ue)*u+n(J)/2-we/2+Fe*n(ue)},Ae=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(ne)}px`,`--frame-height: ${n(_e)}`].join(";"));var ke=qw();let ze;var et=C(ke);et.__pointerdown=[Ww,E,A,Q,H,w,pe],et.__pointermove=Ke,et.__pointerup=Te,yi(et,20,()=>n(ot),ye=>ye,(ye,Pe)=>{var Fe=Le(),Ft=de(Fe);yi(Ft,16,()=>Array.from({length:n(ie)},(vt,Ht)=>Ht),vt=>vt,(vt,Ht)=>{var dt=Le(),Ct=de(dt);yi(Ct,16,()=>Array.from({length:De(Pe,Ht)},(ri,Ot)=>Ot),ri=>ri,(ri,Ot)=>{var $e=Kw();D((be,ee)=>{Qe($e,be),se($e,1,ee,"s-2b")},[()=>`--row-index: ${Ht}; --column-index: ${Ot}; left: ${U(Pe,Ht,Ot)}px; background-image: url(${p[Pe]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(ri,$e)}),b(vt,dt)}),b(ye,Fe)}),S(et),S(ke),Xe(ke,ye=>O(k,ye),()=>n(k)),D(ye=>{ze=se(ke,1,"root s-2b",null,ze,ye),Qe(ke,n(Ae)),Qe(et,`transform: translateX(${n(H)}px); width: ${n(xe)}px;`)},[()=>({"is-vertical-video":!n(Y),"vertically-rotated":n(le)})]),lt("mouseleave",et,j),kn(ke,"clientWidth",ye=>O(J,ye)),b(t,ke),F(),o()}Je(["pointerdown","pointermove","pointerup"]);var Gw=M('<div class="notification s-2d"><span class="description s-2d"> </span></div>'),Yw={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 dv(t,e){B(e,!1),q(t,Yw);let i=340,{ui:{t:o}}=ve();Co();var r=Gw(),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,()=>hs,()=>({duration:i})),b(t,r),F()}var zb=require("@vkontakte/videoplayer-shared/es2015"),jw=M('<div class="preview-track-close tooltip s-2a"><!></div>'),Xw=M('<div class="preview-track-control s-2a"><!> <div class="preview-track-close s-2a"><!></div> <!></div>'),Zw=M('<div class="wrapper-preview-track s-2a"><!></div>'),Jw=M('<div class="enriched-timeline s-2a"><!> <!> <!></div>'),eS={hash:"s-2a",code:".enriched-timeline.s-2a{padding:var(--timeline-padding-vertical-top) var(--timeline-padding-horizontal) var(--timeline-padding-vertical-bottom);pointer-events:auto;position:relative}.preview-track-control.s-2a{align-items:center;display:flex;justify-content:center;left:0;padding:0 calc(var(--timeline-padding-horizontal));pointer-events:none;position:absolute;right:0;top:calc((var(--timeline-height) + var(--preview-track-controls-top))*-1)}.preview-track-close.s-2a{pointer-events:auto;position:absolute;right:calc(var(--timeline-padding-horizontal))}.preview-track-close.tooltip.s-2a{bottom:32px;opacity:0;transition:opacity .2s}.preview-track-close.s-2a:hover+.tooltip:where(.s-2a){opacity:1}.wrapper-preview-track.s-2a{box-sizing:border-box;left:0;overflow:hidden;padding:0 calc(var(--timeline-padding-horizontal));position:absolute;right:0;z-index:-1}"};function cv(t,e){B(e,!0),q(t,eS);let[i,o]=Re(),r=()=>x(g,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(f,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),v=ve(),p=200,{positionWithScrubbing$:f,isRewindableLive$:$,duration$:y}=v.state,{playerSize:g,previewTrackActive:w}=v.ui,{countPerImage:T=0,links:I=[],frequency:N=0}=v.actions.internal.getPreviewThumbsData()||{},k=m(()=>r().width>100),E=W(!G_()),A=()=>{n(E)&&(Q_(),O(E,!1))},Q=ue=>{let ne=Math.floor(a()*ue/N),_e=Math.floor(ne/T),xe=(0,zb.getRangeAroundIndex)(3,_e,I.length-1);for(let J of xe){let Ne=new Image;Ne.src=I[J]}},H=(ue,ne)=>{Q(ne),!l()&&e.onTimelineMove(ue)};var z=Jw(),Y=C(z);{var le=ue=>{var ne=Xw(),_e=C(ne);let xe=m(()=>rn(d()));ov(_e,{get time(){return n(xe)}});var J=L(_e,2),Ne=C(J);Rs(Ne,{onClick:()=>v.actions.internal.closePreviewTrack()}),S(J);var pe=L(J,2);{var P=Ke=>{var Te=jw(),j=C(Te);dv(j,{}),S(Te),b(Ke,Te)};R(pe,Ke=>{n(E)&&Ke(P)})}S(ne),lt("mouseleave",J,A),es(3,ne,()=>hs,()=>({duration:p})),b(ue,ne)};R(Y,ue=>{l()&&ue(le)})}var X=L(Y,2);let re=m(()=>!n(k));il(X,{get isHidden(){return n(re)},get isAds(){return e.isAds},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return s()},onSliderMove:H,get onSliderPointerDown(){return e.onTimelinePointerDown},get onSliderPointerUp(){return e.onTimelinePointerUp},get onSliderLeave(){return e.onTimelinePointerLeave},onSliderPointerEnter:Q,get ref(){return u()},set ref(ue){u(ue)}});var Z=L(X,2);{var we=ue=>{var ne=Zw(),_e=C(ne);lv(_e,{}),S(ne),D(()=>Qe(ne,`height: ${e.animatedPreviewTrackHeight}px;`)),b(ue,ne)};R(Z,ue=>{e.previewTrackAvailable&&ue(we)})}S(z),D(()=>Qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var iS=M('<div><!> <div class="controls s-1c" data-testid="player_controls"><div class="controls-left s-1c"><!> <!> <!></div> <div class="controls-right s-1c"></div></div></div> <!>',1),oS={hash:"s-1c",code:'.wrapper-bottom.s-1c{bottom:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;left:0;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;will-change:transform;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-1c:before{background:var(--controls-gradient);content:"";height:var(--controls-gradient-height);position:absolute;width:100%}.wrapper-bottom.s-1c>:where(.s-1c){pointer-events:auto}.controls.s-1c{align-items:center;box-sizing:border-box;display:flex;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 var(--controls-desktop-padding-horizontal) 4px;white-space:nowrap;width:100%}.controls-left.s-1c,.controls-right.s-1c{align-content:center;display:flex}.controls-left.s-1c{flex-grow:1;min-width:0;overflow:hidden}.controls-left.s-1c >:not(:first-child),.controls-right.s-1c >*{margin-left:var(--controls-desktop-item-margin-left)}.controls-hidden.s-1c{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1c{transition:none}'};function pv(t,e){var gl,ur;B(e,!0),q(t,oS);let[i,o]=Re(),r=()=>x(Eo,"$disabledControls$",i),a=()=>x(st,"$adPlaybackState",i),l=()=>x(zt,"$playbackState$",i),d=()=>x(xo,"$currentSubtitle$",i),s=()=>x(ji,"$isEnded$",i),u=()=>x(sn,"$currentGridType$",i),v=()=>x(Dt,"$isLive$",i),p=()=>x(qe,"$chromecastState$",i),f=()=>x(bt,"$isPictureInPictureActive",i),$=()=>x(Jt,"$pictureInPictureType$",i),y=()=>x(wi,"$availableSubtitlesList$",i),g=()=>x(Wt,"$contextMenuOpenedByKeyboard$",i),w=()=>x(It,"$showContextMenuBtn$",i),T=()=>x(hi,"$isRewindableLive$",i),I=()=>x(pi,"$isActiveLive$",i),N=()=>x(ss,"$graphIsOpened$",i),k=()=>x(hn,"$contextMenuVisible$",i),E=()=>x(Hi,"$isFullscreen",i),A=()=>x(zi,"$autoplayNextEnabled",i),Q=()=>x(n(Lo),"$prevButton",i),H=()=>x(n(So),"$replayButton",i),z=()=>x(n(To),"$playButton",i),Y=()=>x(n(Ri),"$nextButton",i),le=()=>x(n(zn),"$playPrevChapterButton",i),X=()=>x(n(Ji),"$seekToInteractiveButton",i),re=()=>x(n(Wr),"$interactiveGraphButton",i),Z=()=>x(n(Ai),"$liveButton",i),we=()=>x(n(bs),"$time",i),ue=()=>x(n(as),"$episodes",i),ne=()=>x(n(Cr),"$vkLogo",i),_e=()=>x(n(qo),"$volume",i),xe=()=>x(n(Kr),"$subtitles",i),J=()=>x(n($n),"$settings",i),Ne=()=>x(n(yn),"$context",i),pe=()=>x(n(Mo),"$fullscreen",i),P=()=>x(n(Ir),"$chromecast",i),Ke=()=>x(ko,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Ui,"$playerSize",i),j=()=>x(an,"$isInteractiveTime$",i),ie=()=>x(ni,"$previewTrackActive",i),De=()=>x(xi,"$settingsMenuVisible",i),Be=()=>x(vo,"$settingButtonRef$",i),ot=()=>x(K,"$startedByKeyboard$",i),U=()=>x(si,"$isAudioAvailable$",i),Ae=()=>x(be,"$fakeIsPlaying$",i),ke=()=>x(_s,"$seekToInteractiveDisabledTooltip$",i),ze=()=>x(Qr,"$isPreviewTrackHorizontallyAligned$",i),et=()=>x(Er,"$previewTrackAvailable",i),ye=()=>x(ho,"$previewTrackDragInProgress",i),Pe=()=>x(Xt,"$adPosition",i),Fe=()=>x(Ut,"$position$",i),Ft=()=>x(Tt,"$adDuration",i),vt=()=>x(ct,"$duration$",i),Ht=h(e,"playerControlsWrapperRef",15,void 0),dt=h(e,"playerControlsRef",15,void 0),Ct=h(e,"isAds",3,!1),ri=h(e,"logoTargetUrl",3,""),Ot=h(e,"isOneVideoPlaylist",3,!1),$e=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:be}=Io(),ee=ve(),nt=Io(),fe=Nt(),Me=ee.actions.internal.toggleMuted,wt=ee.actions.internal.togglePlay,Lt=ee.actions.internal.pause,mt=ee.actions.internal.toggleSubtitle,ce=ee.actions.internal.checkFullscreenSupport,We=(gl=ee.callbacks)==null?void 0:gl.onAudioDoesNotExistHint,Ye=(ur=ee.callbacks)==null?void 0:ur.onAudioDisabledHint,ct=ee.state.duration$,Ut=ee.state.positionWithScrubbing$,zt=ee.state.playbackState$,si=ee.state.isAudioAvailable$,$i=ee.state.isAudioDisabled,ji=ee.state.isEnded$,Dt=ee.state.isLive$,pi=ee.state.isActiveLive$,hi=ee.state.isRewindableLive$,{isActive$:bt,type$:Jt}=nt.pictureInPicture$,xi=ee.ui.settingsMenu.visible$,Xi=ee.ui.settingsMenu.openedByBtnKeyboard$,oi=ee.ui.controls,kt=ee.actions.internal.getVideoEpisodes(),qe=ee.state.chromecastState$,wi=ee.state.availableSubtitlesList$,xo=ee.state.currentSubtitle$,Eo=oi.disabledControls$,hn=ee.ui.contextMenu.visible$,It=ee.ui.contextMenu.showContextMenuBtn$,Wt=ee.ui.contextMenu.openedByBtnKeyboard$,K=ee.ui.startedByKeyboard$,Mt=ee.ui.controlBlocks,di=ee.ui.previewTrackNotificationVisible,ut=ee.ui.t,Tt=ee.ads.duration,Xt=ee.ads.position,st=ee.ads.playbackState,Hi=ee.ui.isFullscreen,Ui=ee.ui.playerSize,sn=ee.ui.currentGridType$,ko=ee.ui.additionalDesktopControlPanelRightButtons$,zi=ee.ui.autoplayNextEnabled$,Zi=ee.actions.internal.getVideoElement,Br=ee.actions.internal.replayInteractive,wo=ee.actions.internal.prevVideoClick,co=ee.actions.internal.nextVideoClick,Pi=ee.state.isInteractive,an=ee.state.isInteractiveTime$,ln=ee.state.showInteractiveGraph,Vn=ee.state.showSeekToInteractive,er=ee.state.showPlayPrevChapter,Fr=ee.state.showInteractiveTimeIndicator,rs=ee.state.playPrevChapterDisabledTooltip,_s=nt.seekToInteractiveDisabledTooltip$,ss=nt.graphIsOpened$,tr=fe.features.interactiveResponsiveUi,$r=m(()=>r().has("EPISODE_BUTTON")),_n=m(()=>r().has("GRAPH_BUTTON")),Rn=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),zo=m(()=>r().has("PLAY_BUTTON")),Nn=m(()=>r().has("REPLAY_BUTTON")),ir=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),yr=()=>ee.actions.internal.toggleChromecast(),xr=m(()=>Ct()?a()==="playing":l()===ol.PlaybackState.PLAYING),Hr=m(()=>d().value!=="off"),uo=m(()=>s()&&!Ct()||Pi),Ur=m(()=>tr?n(uo)&&so(u(),"m"):n(uo)),On=m(()=>!s()||Pi||Ct()),Dn=m(()=>so(u(),"m")),po=m(()=>e.showNextPrevButtons&&so(u(),"m")&&!Ct()&&e.nextButtonActive),zr=m(()=>e.showNextPrevButtons&&so(u(),"m")&&!Ct()&&e.prevButtonActive),Bn=m(()=>!Ct()&&!!v()),gt=m(()=>p()!==ol.ChromecastState.NOT_AVAILABLE&&!(f()&&$()===1)&&so(u(),"m")&&!Pi),ui=m(()=>e.showAutoplayNext&&!Ot()&&so(u(),"s")),wr=m(()=>y().length>0&&so(u(),"m")),or=m(()=>g()||w()),nr=m(()=>so(u(),"s")&&!Ct()),dn=m(()=>!e.logoHidden&&!Ct()),Sr=m(()=>fe.features.fullscreen&&ce()&&(e.logoHidden||so(u(),tr?"xs":"s"))&&!(f()&&$()===1)&&(Pi?$e():!0)),cn=m(()=>(!v()||Ct())&&!(fe.features.interactiveHideTime&&Pi)),bn=m(()=>ln&&so(u(),"m")),Fn=m(()=>tr?Vn&&so(u(),"s"):Vn),Hn=m(()=>tr?er&&so(u(),"s"):er),Wo=m(()=>!Ct()&&!v()&&!!(kt!=null&&kt.length)&&n(Dn)&&!n($r)),Po=m(()=>!T()||!!I()),rr=m(()=>N()?ut("tooltip_interactive_graph_on"):ut("tooltip_interactive_graph_off")),Ao=m(()=>k()?ut("tooltip_context_menu_close"):ut("tooltip_context_menu_open")),Wi=(pt,ft)=>pt?ft&&ft===ol.PlaybackState.PAUSED?ut("tooltip_play"):"":ut("tooltip_live"),Un=m(()=>Wi(n(Po),l())),sr=m(()=>fe.logoType==="vk_video"?ut("tooltip_vk_video_logo"):ut("tooltip_vk_logo")),ar=m(()=>n(Hr)?ut("tooltip_subtitles_on"):ut("tooltip_subtitles_off")),lr=m(()=>E()?ut("tooltip_fullscreen_on"):ut("tooltip_fullscreen_off")),Ko=m(()=>p()===ol.ChromecastState.CONNECTED?ut("tooltip_chromecast_on"):ut("tooltip_chromecast_off")),Tr=m(()=>A()?ut("tooltip_autoplay_on"):ut("tooltip_autoplay_off")),St=W(0),Pt=ci({}),fo=ci({}),Lo=m(()=>oi.prevButton),So=m(()=>oi.replayButton),To=m(()=>oi.playButton),Ri=m(()=>oi.nextButton),zn=m(()=>oi.playPrevChapterButton),Ji=m(()=>oi.seekToInteractiveButton),Wr=m(()=>oi.interactiveGraphButton),Ai=m(()=>oi.liveButton),bs=m(()=>oi.time),as=m(()=>oi.episodes),Cr=m(()=>oi.vkLogo),qo=m(()=>oi.volume),Kr=m(()=>oi.subtitles),$n=m(()=>oi.settings),yn=m(()=>oi.context),Mo=m(()=>oi.fullscreen),Ir=m(()=>oi.chromecast),Ue=m(()=>({prevButton:Q()?Q().right-Q().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:Y()?Y().right-Y().left:0,playPrevChapterButton:le()?le().right-le().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:re()?re().right-re().left:0,liveButton:Z()?Z().right-Z().left:0,time:we()?we().right-we().left:0,episodes:ue()?ue().right-ue().left:0,vkLogo:ne()?ne().right-ne().left:0,volume:_e()?_e().right-_e().left:0,subtitles:xe()?xe().right-xe().left:0,settings:J()?J().right-J().left:0,context:Ne()?Ne().right-Ne().left:0,fullscreen:pe()?pe().right-pe().left:0,chromecast:P()?P().right-P().left:0,additionalButtons:Ke().length?Ke().reduce(pt=>[...pt,40],[]):[]})),Vt=W(0);Oe(()=>{(!n(Vt)||n(Vt)<n(Ue).time)&&Et(()=>O(Vt,n(Ue).time,!0))});let Si=W(!1);Oe(()=>{let pt=0;n(Wo)&&(so(u(),"xl")?pt=n(Ue).time:pt=60);let ft=n(Ue).prevButton+n(Ue).playButton+n(Ue).nextButton+n(Ue).seekToInteractiveButton+n(Ue).interactiveGraphButton+n(Ue).liveButton+n(Vt)+pt;O(Si,n(cn)&&n(St)>=ft,!0)});let Qo=m(()=>n(Si)&&so(u(),"m")),mo=(0,uv.debounceFn)(od,260),Vo=(0,uv.debounceFn)(hp,260);Oe(()=>{Te(),j(),ie(),mo(Zi(),oi,Pt,e.showControls),Vo(Zi(),Mt,fo,e.showControls)}),Oe(()=>{fo.bottom=Ht()});let vo=ae();Oe(()=>{De(),Be()&&Et(()=>Gl(Be(),De(),Xi))});let Go;Oe(()=>{ot(),Et(()=>vp(K,ot(),Go))});function Wn(){pa({isAudioDisabled:$i,isAudioAvailable:U(),isAds:Ct(),audioIsNotExistHintCallback:We,audioDisabledHintCallback:Ye})&&Me()}let un=Pi?Br:wt,eo=m(()=>Ae()!==null),to=m(()=>n(eo)?Ae():n(xr)),Kn=m(()=>n(to)?ut("tooltip_pause"):ut("tooltip_play")),dr=ut("tooltip_episodes"),cr=m(()=>{var pt,ft,io,No;return n(zr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ds.prevButton,buttonComponent:el,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:wo.bind(null,!0)},tooltipEnabled:!((ft=(pt=ee.callbacks)==null?void 0:pt.uiInfo)!=null&&ft.onPrevButtonMouseEnter)&&!((No=(io=ee.callbacks)==null?void 0:io.uiInfo)!=null&&No.onPrevButtonMouseLeave),mouseEnter:()=>{var oo,_i,Ki;(Ki=(_i=(oo=ee.callbacks)==null?void 0:oo.uiInfo)==null?void 0:_i.onPrevButtonMouseEnter)==null||Ki.call(_i,Zn(Zi(),Pt,"prevButton",e.showControls))},mouseLeave:()=>{var oo,_i,Ki;(Ki=(_i=(oo=ee.callbacks)==null?void 0:oo.uiInfo)==null?void 0:_i.onPrevButtonMouseLeave)==null||Ki.call(_i,Zn(Zi(),Pt,"prevButton",e.showControls))},tooltipText:ut("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),qn=m(()=>n(Ur)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ds.replayButton,buttonComponent:nd,buttonComponentProps:{disabled:n(Nn),click:un},tooltipText:ut("tooltip_restart"),disabled:n(Nn)}:void 0),$s=m(()=>n(On)?{id:"playButton",type:"desktop-control-panel-left",weight:Ds.playButton,buttonComponent:rd,buttonComponentProps:{disabled:n(zo),isPlaying:n(xr),click:wt},tooltipText:n(Kn),disabled:n(zo)}:void 0),ys=m(()=>{var pt,ft,io,No;return n(po)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ds.nextButton,buttonComponent:el,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:co.bind(null,!0)},tooltipEnabled:!((ft=(pt=ee.callbacks)==null?void 0:pt.uiInfo)!=null&&ft.onNextButtonMouseEnter)&&!((No=(io=ee.callbacks)==null?void 0:io.uiInfo)!=null&&No.onNextButtonMouseLeave),mouseEnter:()=>{var oo,_i,Ki;(Ki=(_i=(oo=ee.callbacks)==null?void 0:oo.uiInfo)==null?void 0:_i.onNextButtonMouseEnter)==null||Ki.call(_i,Zn(Zi(),Pt,"nextButton",e.showControls))},mouseLeave:()=>{var oo,_i,Ki;(Ki=(_i=(oo=ee.callbacks)==null?void 0:oo.uiInfo)==null?void 0:_i.onNextButtonMouseLeave)==null||Ki.call(_i,Zn(Zi(),Pt,"nextButton",e.showControls))},tooltipText:ut("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),je=m(()=>Pi&&n(Hn)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ds.playPrevChapterButton,buttonComponent:Tc,buttonComponentProps:{disabled:n(ir),click:e.playPrevChapter},tooltipText:ut("tooltip_interactive_go_back"),disabledTooltipContent:ut(rs),disabled:n(ir)}:void 0),ei=m(()=>Pi&&n(Fn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ds.seekToInteractiveButton,buttonComponent:Ic,buttonComponentProps:{disabled:n(Rn),click:e.seekToInteractive},tooltipText:ut("tooltip_interactive_seek"),disabled:n(Rn),disabledTooltipContent:ut(ke())}:void 0),Li=m(()=>Pi&&n(bn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ds.interactiveGraphButton,buttonComponent:Ec,buttonComponentProps:{disabled:n(_n),click:ss.toggle,graphIsOpened:N()},tooltipText:n(rr)}:void 0),go=m(()=>n(Bn)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ds.liveButton,buttonComponent:kc,buttonComponentProps:{isLiveActive:n(Po),ariaLabel:n(Un)},tooltipText:n(Un),disabled:n(Po)&&l()===ol.PlaybackState.PLAYING}:void 0),Yo=m(()=>[n(cr),n(qn),n($s),n(ys),n(je),n(ei),n(Li),n(go)].filter(pt=>!!pt).sort(Qa)),qr=m(()=>n(dn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:hc,buttonComponentProps:{targetUrl:ri(),logoClickable:e.logoClickable,click:Lt},tooltipText:n(sr),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Ro=m(()=>n(ui)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:Cc,tooltipText:n(Tr)}:void 0),jo=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:Om,buttonComponentProps:{click:Wn,isAds:Ct()}})),xs=m(()=>n(wr)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:Mm,buttonComponentProps:{isSubtitlesEnabled:n(Hr),click:mt},tooltipText:n(ar)}:void 0),zs=m(()=>n(nr)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Jl,buttonComponentProps:{ref$:vo},tooltipText:De()?void 0:ut("tooltip_settings_off")}:void 0),_a=m(()=>fe.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:Ym,buttonComponentProps:{ariaLabel:ut("aria_label_context_menu")},className:n(or)?"":"out-of-view",tooltipText:n(Ao)}:void 0),Ws=m(()=>n(Sr)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:gc,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(lr)}:void 0),xn=m(()=>n(gt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:bc,buttonComponentProps:{state:p(),click:yr},tooltipText:n(Ko)}:void 0),at=m(()=>[n(qr),n(Ro),n(jo),n(xs),n(zs),n(_a),n(Ws),n(xn),...Ke()].filter(pt=>!!pt).sort(Qa)),ni=ee.ui.previewTrackActive,ho=ee.ui.previewTrackDragInProgress,Er=ee.ui.previewTrackAvailable,Qr=ee.ui.isPreviewTrackHorizontallyAligned,wn=m(()=>Fb({onPreviewTrackOpened:ee.actions.internal.previewTrackOpened,getTimelineRef:()=>Pt.timeline,isHorizontal:ze()})),he=m(()=>n(wn).progressBarY),$t=m(()=>n(wn).controlsY),Kt=m(()=>n(wn).onPointerDown),ti=m(()=>n(wn).onPointerMove),Ti=m(()=>n(wn).onPointerUp),Ei=m(()=>n(wn).calculatedHeight),Mi=m(()=>n(wn).closePreviewTrack);Oe(()=>{ie()?di.set(!1):n(Mi)()});let Ci;Rt(()=>()=>Ci&&clearTimeout(Ci));let Ks=pt=>{ie()||!et()||(n(Kt)(pt),Ci=setTimeout(()=>{ee.actions.internal.previewTrackDragStarted()},200))},qs=()=>{ie()||n(Ti)(),Ci&&clearTimeout(Ci),ye()&&ee.actions.internal.previewTrackDragFinished()},Qs=pt=>{n(ti)(pt),!ie()&&et()&&!ie()&&di.set(!0)},gd=()=>{di.set(!1)};var ba=iS(),kr=de(ba);let Gs;var $a=C(kr);{var Pr=pt=>{let ft=m(()=>n(he)()),io=m(()=>n(Ei)());cv(pt,{get animatedOffsetY(){return n(ft)},get animatedPreviewTrackHeight(){return n(io)},get canRewindLive(){return e.canRewindLive},get isAds(){return Ct()},onTimelineMove:Qs,onTimelinePointerDown:Ks,onTimelinePointerUp:qs,onTimelinePointerLeave:gd,get previewTrackAvailable(){return et()},get timelineRef(){return Pt.timeline},set timelineRef(No){Pt.timeline=No}})};R($a,pt=>{e.showControls&&pt(Pr)})}var ws=L($a,2),Ss=C(ws),Ar=C(Ss);yi(Ar,17,()=>n(Yo),pt=>pt.id,(pt,ft)=>{gp(pt,{get buttonComponent(){return n(ft).buttonComponent},get buttonComponentProps(){return n(ft).buttonComponentProps},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(ft).disabled},get className(){return n(ft).className},get tooltipEnabled(){return n(ft).tooltipEnabled},get mouseEnter(){return n(ft).mouseEnter},get mouseLeave(){return n(ft).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Pt[n(ft).id]},set ref(io){Pt[n(ft).id]=io}})});var ya=L(Ar,2);{var hd=pt=>{let ft=m(()=>!e.showControls),io=m(()=>Ct()?Pe():Fe()),No=m(()=>Ct()?Ft():vt());fc(pt,{get isHidden(){return n(ft)},isMobile:!1,get showDuration(){return n(Qo)},get position(){return n(io)},get duration(){return n(No)},get ref(){return Pt.time},set ref(oo){Pt.time=oo}})};R(ya,pt=>{n(cn)&&pt(hd)})}var ml=L(ya,2);let _d=m(()=>!n(Wo));Ho(ml,{className:"w-max",get disabled(){return n(_d)},get tooltipContent(){return dr},get tooltipVisible(){return e.showControls},get ref(){return Pt.episodes},set ref(pt){Pt.episodes=pt},children:(pt,ft)=>{var io=Le(),No=de(io);{var oo=_i=>{$c(_i,{get position(){return Fe()},get duration(){return vt()},get timeCodes(){return kt}})};R(No,_i=>{n(Wo)&&_i(oo)})}b(pt,io)},$$slots:{default:!0}}),S(Ss);var xa=L(Ss,2);yi(xa,21,()=>n(at),pt=>pt.id,(pt,ft)=>{var io=Le(),No=de(io);{var oo=Ki=>{gp(Ki,{get buttonComponent(){return n(ft).buttonComponent},get buttonComponentProps(){return n(ft).buttonComponentProps},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(ft).disabled},get className(){return n(ft).className},get tooltipVisible(){return e.showControls},get ref(){return Pt[n(ft).id]},set ref(Ys){Pt[n(ft).id]=Ys}})},_i=Ki=>{let Ys=m(()=>!!n(ft).disabled);tv(Ki,{get id(){return n(ft).id},get testId(){return n(ft).testId},get icon(){return n(ft).icon},get ariaLabel(){return n(ft).ariaLabel},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(Ys)},get onClick(){return n(ft).onClick},get disableMouseupTooltipShow(){return n(ft).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Pt[n(ft).id]},set ref($d){Pt[n(ft).id]=$d}})};R(No,Ki=>{Ob(n(ft))?Ki(oo):Ki(_i,!1)})}b(pt,io)}),S(xa),S(ws),Xe(ws,pt=>dt(pt),()=>dt()),S(kr),Xe(kr,pt=>Ht(pt),()=>Ht());var bd=L(kr,2);{var vl=pt=>{wc(pt,{get ref(){return Pt.interactiveTimeIndicator},set ref(ft){Pt.interactiveTimeIndicator=ft}})};R(bd,pt=>{Fr&&pt(vl)})}D((pt,ft)=>{Gs=se(kr,1,"wrapper-bottom s-1c",null,Gs,pt),Qe(ws,ft),ws.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n($t)()}px);`]),kn(Ss,"clientWidth",pt=>O(St,pt)),b(t,ba),F(),o()}var sd=require("@vkontakte/videoplayer-core/es2015");var fv=require("@vkontakte/videoplayer-shared/es2015");var nS=M('<div class="icon icon-error-stub s-20"><div class="inner s-20"></div></div>'),rS=M('<img class="icon s-20" aria-hidden="true"/>'),sS={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 mv(t,e){q(t,sS);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,fv.noop),r=m(()=>o()===fv.noop),a=m(()=>n(r)||i()),l=W(!1),d=()=>{O(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Gt(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,v)=>{var p=Le(),f=de(p);{var $=g=>{var w=nS();b(g,w)},y=g=>{var w=rS();D(()=>Ve(w,"src",e.iconUrl)),lt("error",w,d),Ra(w),b(g,w)};R(f,g=>{n(l)?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}})}var aS=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 vv(t){Ze(t,{testId:"muted-icon",children:(e,i)=>{var o=aS();b(e,o)},$$slots:{default:!0}})}var Wb=require("@vkontakte/videoplayer-shared/es2015");function bp(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,Wb.noop),r=h(e,"ref",15,void 0),l=ve().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Gt(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,v)=>{var p=Le(),f=de(p);{var $=g=>{vv(g,{})},y=g=>{va(g,{get size(){return"24"}})};R(f,g=>{i()?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var lS=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>'),dS=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>'),cS=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 gv(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=cS(),d=L(de(l));{var s=v=>{var p=lS();b(v,p)},u=v=>{var p=dS();b(v,p)};R(d,v=>{i()?v(s):v(u,!1)})}b(r,l)},$$slots:{default:!0}})}var Kb=require("@vkontakte/videoplayer-shared/es2015");function hv(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,Kb.noop),a=G("menu_pip");Gt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{gv(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}var _v=require("@vkontakte/videoplayer-shared/es2015");var uS=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},pS=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},fS=M("<div><!></div>"),mS=M("<div><!></div>"),vS=M("<div><!></div>"),gS=M("<!> <!> <!>",1),hS=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),_S=M('<div class="wrapper-middle s-1b"><!></div>'),bS=M("<div><!></div> <!> <div><!></div>",1),$S=M('<div aria-hidden="true">·</div> <!>',1),yS=M('<!> <!> <div><div><div class="controls mobile s-1b" data-testid="bottom-controls"><div class="controls-group contain s-1b"><!> <!> <!> <!></div> <div class="controls-group s-1b"><!> <!> <!></div></div> <!></div></div> <!>',1),xS={hash:"s-1b",code:".wrapper-bottom.s-1b{background:var(--controls-gradient);bottom:0;box-sizing:border-box;display:flex;flex-direction:column;height:var(--controls-gradient-height);justify-content:flex-end;left:0;padding:0 4px 8px;pointer-events:none;position:absolute;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.wrapper-bottom.s-1b>:where(.s-1b){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1b{height:9px;padding:0 4px 4px}.wrapper-middle.s-1b{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1b,.wrapper-top-right.s-1b{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1b{right:8px;top:4px}.wrapper-top-left.s-1b{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1b,.wrapper-middle-left-second.s-1b,.wrapper-middle-right.s-1b{align-items:center;background-color:rgba(0,0,0,.56);border-radius:12px;display:flex;height:44px;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);transition:opacity var(--controls-transition-duration);width:44px}.wrapper-middle-left.s-1b{left:12px}.wrapper-middle-left-second.s-1b{left:64px}.wrapper-middle-right.s-1b{right:12px}.controls.s-1b{align-items:center;box-sizing:border-box;font-size:13px;height:var(--controls-height);justify-content:space-between;padding:0 4px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform}.controls.s-1b,.controls-group.s-1b{display:flex}.controls-group.contain.s-1b{min-width:0}.controls-group.s-1b >:not(:first-child){margin-left:8px}.hidden.s-1b{opacity:0;visibility:hidden}.controls-hidden.s-1b{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1b{transition:none}.overlay-mobile.s-1b{background-color:rgba(0,0,0,.3);height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:opacity var(--controls-transition-duration);width:100%}@media screen and (orientation:portrait){.wrapper-top-left.fullscreen.s-1b,.wrapper-top-right.fullscreen.s-1b{top:16px}.controls-wrapper.fullscreen.s-1b{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1b{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1b{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1b{left:44px}.wrapper-middle-left-second.fullscreen.s-1b{left:96px}.wrapper-middle-right.fullscreen.s-1b{right:44px}.controls-wrapper.fullscreen.s-1b{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function bv(t,e){var Mo,Ir;B(e,!0),q(t,xS);let[i,o]=Re(),r=()=>x(Ui,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(oi,"$disabledControls$",i),l=()=>x(Ot,"$playbackState$",i),d=()=>x(Eo,"$adPlaybackState",i),s=()=>x(ee,"$isEnded$",i),u=()=>x(It,"$playerSize",i),v=()=>x(mt,"$scrubbingInProgress",i),p=()=>x(xi,"$chromecastState$",i),f=()=>x(We,"$isPictureInPictureActive",i),$=()=>x(Ye,"$pictureInPictureType$",i),y=()=>x(ce,"$mobileNotReportControlHidden$",i),g=()=>x(hi,"$chromecastHidden",i),w=()=>x(dt,"$playerPhase",i),T=()=>x(Dt,"$pipHidden",i),I=()=>x(qe,"$currentGridType$",i),N=()=>x($i,"$vkLogoHidden",i),k=()=>x(si,"$volumeHidden",i),E=()=>x(nt,"$isLive$",i),A=()=>x(ct,"$settingsMenuVisible",i),Q=()=>x(Lt,"$isRewindableLive$",i),H=()=>x(wt,"$isActiveLive$",i),z=()=>x($e,"$isAudioAvailable$",i),Y=()=>x(Me,"$muted$",i),le=()=>x(fe,"$volume$",i),X=()=>x(ut,"$isInteractiveTime$",i),re=()=>x(Fn,"$settingButtonRef$",i),Z=()=>x(kt,"$startedByKeyboard$",i),we=()=>x(hn,"$isFullscreen",i),ue=()=>x(Wt,"$additionalButtons$",i),ne=()=>x(ji,"$autoplayNextToggleHidden",i),_e=()=>x(Xi,"$crashed$",i),xe=()=>x(pi,"$settingsHidden",i),J=()=>x(sn,"$graphIsOpened$",i),Ne=()=>x(xo,"$adPosition",i),pe=()=>x(wi,"$adDuration",i),P=()=>x(ri,"$position$",i),Ke=()=>x(Ct,"$duration$",i),Te=h(e,"playerControlsWrapperRef",15,void 0),j=h(e,"playerControlsRef",15,void 0),ie=h(e,"isAds",3,!1),De=h(e,"logoTargetUrl",3,""),Be=h(e,"isOneVideoPlaylist",3,!1),ot=h(e,"customFullscreenSupported",3,!0),U=ve(),Ae=Io(),ke=Nt(),ze=U.actions.internal.toggleMuted,et=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Pe=U.actions.internal.prevVideoClick,Fe=U.actions.internal.nextVideoClick,Ft=U.actions.internal.checkFullscreenSupport,vt=(Mo=U.callbacks)==null?void 0:Mo.onAudioDoesNotExistHint,Ht=(Ir=U.callbacks)==null?void 0:Ir.onAudioDisabledHint,dt=U.playerPhase,Ct=U.state.duration$,ri=U.state.positionWithScrubbing$,Ot=U.state.playbackState$,$e=U.state.isAudioAvailable$,be=U.state.isAudioDisabled,ee=U.state.isEnded$,nt=U.state.isLive$,fe=U.state.volume$,Me=U.state.muted$,wt=U.state.isActiveLive$,Lt=U.state.isRewindableLive$,mt=U.ui.scrubbingInProgress,ce=U.ui.mobileNotReportControlHidden$,{isActive$:We,type$:Ye}=Ae.pictureInPicture$,ct=U.ui.settingsMenu.visible$,Ut=U.ui.settingsMenu.openedByBtnKeyboard$,zt=U.ui.controls,{volume:si,vkLogo:$i,autoplayNextToggle:ji,pip:Dt,settings:pi,chromecast:hi}=U.ui.hiddenControls,bt=U.actions.internal.getVideoEpisodes(),Jt=U.webApi.pictureInPictureApi,xi=U.state.chromecastState$,Xi=U.state.crashed$,oi=zt.disabledControls$,kt=U.ui.startedByKeyboard$,qe=U.ui.currentGridType$,wi=U.ads.duration,xo=U.ads.position,Eo=U.ads.playbackState,hn=U.ui.isFullscreen,It=U.ui.playerSize,Wt=U.ui.additionalButtonsDeprecated$,K=U.actions.internal.getVideoElement,Mt=U.actions.internal.replayInteractive,di=U.state.isInteractive,ut=U.state.isInteractiveTime$,Tt=U.state.showInteractiveGraph,Xt=U.state.showSeekToInteractive,st=U.state.showPlayPrevChapter,Hi=U.state.showInteractiveTimeIndicator,Ui=Ae.seekToInteractiveDisabledTooltip$,sn=Ae.graphIsOpened$,ko=U.ui.controlBlocks,zi=m(()=>G(U.state.playPrevChapterDisabledTooltip)),Zi=m(()=>G(r())),Br=m(()=>a().has("EPISODE_BUTTON")),wo=m(()=>a().has("GRAPH_BUTTON")),co=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Pi=m(()=>a().has("PLAY_BUTTON")),an=m(()=>a().has("REPLAY_BUTTON")),ln=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),Vn=m(()=>l()===sd.PlaybackState.PLAYING),er=m(()=>d()==="paused"),Fr=m(()=>s()&&!ie()&&!di),rs=m(()=>!s()||ie()),_s=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),ss=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),tr=m(()=>u().width>300),$r=m(()=>u().width>400),_n=m(v),Rn=m(()=>p()!==sd.ChromecastState.NOT_AVAILABLE&&!(f()&&$()===1)&&!y()&&!di&&!g()),zo=m(()=>w()==="LiveWaitingStart"),Nn=m(()=>!!Jt&&p()!==sd.ChromecastState.CONNECTED&&!y()&&($()===1&&n(zo)||!n(zo))&&!n(_n)&&!di&&!T()),ir=W(!1);Rt(()=>{let Ue=Jt==null?void 0:Jt.info.isActive$.subscribe(Vt=>O(ir,Vt,!0));return()=>Ue==null?void 0:Ue.unsubscribe()});let yr=m(()=>!n(_n)&&so(I(),"s")),xr=m(()=>!e.logoHidden&&u().width>350&&!N()),Hr=m(()=>ke.features.fullscreen&&Ft()&&!(f()&&$()===1)&&(di?ot():!0)&&!n(_n)&&!n(ir)),uo=m(()=>!k()&&!n(_n)),Ur=m(()=>(!E()||ie())&&u().width>260&&!n(_n)&&!(ke.features.interactiveHideTime&&di)),On=m(()=>A()||e.showControls),Dn=m(()=>!ie()&&!E()&&!!(bt!=null&&bt.length)&&n(tr)&&!n(Br)&&!n(_n)),po=m(()=>!Q()||!!H()),zr=m(()=>Tt&&so(I(),"m")),Bn=m(()=>!z()||Y()||le()===0),gt=ci({}),ui=ci({}),wr=(0,_v.debounceFn)(od,260),or=(0,_v.debounceFn)(hp,260);Oe(()=>{u(),X(),wr(K(),zt,gt,e.showControls),or(K(),ko,ui,e.showControls)});let nr=()=>U.actions.internal.toggleChromecast();function dn(){return ht(this,null,function*(){Jt!=null&&Jt.isActive()?yield Jt==null?void 0:Jt.exit():yield Jt==null?void 0:Jt.request()})}function Sr(){pa({isAudioDisabled:be,audioDisabledHintCallback:Ht,isAudioAvailable:z(),audioIsNotExistHintCallback:vt,isAds:ie()})&&ze()}let cn=W(""),bn=(Ue,Vt)=>{if(!Ue){O(cn,G("tooltip_live"),!0);return}Vt&&Vt===sd.PlaybackState.PAUSED&&O(cn,G("tooltip_play"),!0)};Oe(()=>{bn(n(po),l())});let Fn=ae();Oe(()=>{re()&&Gl(re(),A(),Ut)}),Oe(()=>{vp(kt,Z(),gt.playButton)});var Hn=yS(),Wo=de(Hn);{var Po=Ue=>{var Vt=hS(),Si=de(Vt);let Qo;var mo=L(Si,2);let Vo;Xe(mo,at=>ui.topLeft=at,()=>ui==null?void 0:ui.topLeft);var vo=L(mo,2);let Go;var Wn=C(vo);yi(Wn,1,ue,({iconUrl:at,ariaLabel:ni,testId:ho,onClick:Er,tooltip:Qr})=>at,(at,ni)=>{let ho=()=>n(ni).iconUrl,Er=()=>n(ni).ariaLabel,Qr=()=>n(ni).testId,wn=()=>n(ni).onClick,he=()=>n(ni).tooltip,$t=m(()=>{var Kt;return(Kt=Er())!=null?Kt:he()});mv(at,{get iconUrl(){return ho()},get ariaLabel(){return n($t)},get testId(){return Qr()},get onClick(){return wn()}})});var un=L(Wn,2);{var eo=at=>{Cc(at,{get ref(){return gt.autoplayNextToggle},set ref(ni){gt.autoplayNextToggle=ni}})};R(un,at=>{e.showAutoplayNext&&!Be()&&!ne()&&at(eo)})}var to=L(un,2);{var Kn=at=>{bc(at,{isMobile:!0,click:nr,get state(){return p()},get ref(){return gt.chromecast},set ref(ni){gt.chromecast=ni}})};R(to,at=>{n(Rn)&&at(Kn)})}var dr=L(to,2);{var cr=at=>{hv(at,{click:dn,get isPictureInPictureActive(){return f()},get ref(){return gt.pip},set ref(ni){gt.pip=ni}})};R(dr,at=>{n(Nn)&&at(cr)})}var qn=L(dr,2);{var $s=at=>{Jl(at,{get ref$(){return Fn}})};R(qn,at=>{_e()&&!xe()&&at($s)})}var ys=L(qn,2);{var je=at=>{hc(at,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return gt.vkLogo},set ref(ni){gt.vkLogo=ni}})};R(ys,at=>{n(xr)&&at(je)})}S(vo),Xe(vo,at=>ui.topRight=at,()=>ui==null?void 0:ui.topRight);var ei=L(vo,2);let Li;var go=C(ei);{var Yo=at=>{let ni=m(()=>Pe.bind(null,!0));el(at,{get click(){return n(ni)},type:"prev",isMobile:!0,get ref(){return gt.prevButton},set ref(ho){gt.prevButton=ho}})};R(go,at=>{n(_s)&&at(Yo)})}var qr=L(go,2);{var Ro=at=>{rd(at,{get disabled(){return n(Pi)},get click(){return et},isMobile:!0,get isPlaying(){return n(Vn)},get ref(){return gt.playButton},set ref(ni){gt.playButton=ni}})};R(qr,at=>{n(rs)&&at(Ro)})}var jo=L(qr,2);{var xs=at=>{nd(at,{get disabled(){return n(an)},get click(){return et},isMobile:!0,get ref(){return gt.replayButton},set ref(ni){gt.replayButton=ni}})};R(jo,at=>{n(Fr)&&at(xs)})}var zs=L(jo,2);{var _a=at=>{let ni=m(()=>Fe.bind(null,!0));el(at,{get click(){return n(ni)},type:"next",isMobile:!0,get ref(){return gt.nextButton},set ref(ho){gt.nextButton=ho}})};R(zs,at=>{n(ss)&&at(_a)})}S(ei),Xe(ei,at=>ui.middle=at,()=>ui==null?void 0:ui.middle);var Ws=L(ei,2);{var xn=at=>{var ni=gS(),ho=de(ni);{var Er=Kt=>{var ti=fS();let Ti;ti.__click=[uS,ln,e,zi];var Ei=C(ti);let Mi=m(()=>!e.showControls);Tc(Ei,{get hidden(){return n(Mi)},get disabled(){return n(ln)},get click(){return e.playPrevChapter},get ref(){return gt.playPrevChapterButton},set ref(Ci){gt.playPrevChapterButton=Ci}}),S(ti),D(Ci=>Ti=se(ti,1,"wrapper-middle-left s-1b",null,Ti,Ci),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Kt,ti)};R(ho,Kt=>{st&&Kt(Er)})}var Qr=L(ho,2);{var wn=Kt=>{var ti=mS();let Ti;var Ei=C(ti);let Mi=m(()=>!e.showControls&&!J());Ec(Ei,{get hidden(){return n(Mi)},get disabled(){return n(wo)},get click(){return sn.toggle},get graphIsOpened(){return J()},get ref(){return gt.interactiveGraphButton},set ref(Ci){gt.interactiveGraphButton=Ci}}),S(ti),D(Ci=>Ti=se(ti,1,Wd(st?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1b",Ti,Ci),[()=>({fullscreen:we(),hidden:!e.showControls&&!J()})]),b(Kt,ti)};R(Qr,Kt=>{n(zr)&&Kt(wn)})}var he=L(Qr,2);{var $t=Kt=>{var ti=vS();let Ti;ti.__click=[pS,co,e,Zi];var Ei=C(ti);let Mi=m(()=>!e.showControls);Ic(Ei,{get hidden(){return n(Mi)},get disabled(){return n(co)},get click(){return e.seekToInteractive},get ref(){return gt.seekToInteractiveButton},set ref(Ci){gt.seekToInteractiveButton=Ci}}),S(ti),D(Ci=>Ti=se(ti,1,"wrapper-middle-right s-1b",null,Ti,Ci),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Kt,ti)};R(he,Kt=>{Xt&&Kt($t)})}b(at,ni)};R(Ws,at=>{di&&!v()&&at(xn)})}D((at,ni,ho,Er)=>{Qo=se(Si,1,"overlay-mobile s-1b",null,Qo,at),Vo=se(mo,1,"wrapper-top-left s-1b",null,Vo,ni),Go=se(vo,1,"wrapper-top-right s-1b",null,Go,ho),Li=se(ei,1,"wrapper-middle s-1b",null,Li,Er)},[()=>({hidden:!n(On)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||v()||e.endScreenShown&&e.showNextPrevButtons})]),b(Ue,Vt)};R(Wo,Ue=>{ie()||Ue(Po)})}var rr=L(Wo,2);{var Ao=Ue=>{var Vt=bS(),Si=de(Vt);let Qo;var mo=C(Si);bp(mo,{get muted(){return Y()},click:Sr,get ref(){return gt.volume},set ref(eo){gt.volume=eo}}),S(Si);var Vo=L(Si,2);{var vo=eo=>{var to=_S(),Kn=C(to);let dr=m(()=>!n(er));rd(Kn,{get disabled(){return n(Pi)},get click(){return et},isMobile:!0,get isPlaying(){return n(dr)},get ref(){return gt.playButton},set ref(cr){gt.playButton=cr}}),S(to),b(eo,to)};R(Vo,eo=>{n(er)&&eo(vo)})}var Go=L(Vo,2);let Wn;var un=C(Go);Pc(un,{get position(){return Ne()},get duration(){return pe()}}),S(Go),D((eo,to)=>{Qo=se(Si,1,"wrapper-top-right s-1b",null,Qo,eo),Wn=se(Go,1,"wrapper-bottom ads-timeline-mobile s-1b",null,Wn,to)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(Ue,Vt)};R(rr,Ue=>{ie()&&d()!=="inactive"&&Ue(Ao)})}var Wi=L(rr,2);let Un;var sr=C(Wi);let ar;var lr=C(sr),Ko=C(lr),Tr=C(Ko);{var St=Ue=>{Ho(Ue,{get disabled(){return n(an)},get ref(){return gt.replayButton},set ref(Vt){gt.replayButton=Vt},children:(Vt,Si)=>{nd(Vt,{get disabled(){return n(an)},get click(){return Mt}})},$$slots:{default:!0}})};R(Tr,Ue=>{di&&Ue(St)})}var Pt=L(Tr,2);{var fo=Ue=>{Ho(Ue,{get ref(){return gt.liveButton},set ref(Vt){gt.liveButton=Vt},children:(Vt,Si)=>{kc(Vt,{get isLiveActive(){return n(po)},isMobile:!0,get ariaLabel(){return n(cn)}})},$$slots:{default:!0}})};R(Pt,Ue=>{!ie()&&E()&&Ue(fo)})}var Lo=L(Pt,2);{var So=Ue=>{let Vt=m(()=>ie()?Ne():P()),Si=m(()=>ie()?pe():Ke()),Qo=m(()=>!e.showControls);fc(Ue,{get showDuration(){return n($r)},get position(){return n(Vt)},get duration(){return n(Si)},isMobile:!0,get isHidden(){return n(Qo)},get ref(){return gt.time},set ref(mo){gt.time=mo}})};R(Lo,Ue=>{n(Ur)&&Ue(So)})}var To=L(Lo,2);let Ri=m(()=>!n(Dn));Ho(To,{className:"w-max",get disabled(){return n(Ri)},get ref(){return gt.episodes},set ref(Ue){gt.episodes=Ue},children:(Ue,Vt)=>{var Si=Le(),Qo=de(Si);{var mo=Vo=>{var vo=$S(),Go=L(de(vo),2);$c(Go,{get position(){return P()},get duration(){return Ke()},get timeCodes(){return bt}}),b(Vo,vo)};R(Qo,Vo=>{n(Dn)&&Vo(mo)})}b(Ue,Si)},$$slots:{default:!0}}),S(Ko),Xe(Ko,Ue=>ui.bottomLeft=Ue,()=>ui==null?void 0:ui.bottomLeft);var zn=L(Ko,2),Ji=C(zn);{var Wr=Ue=>{Ho(Ue,{get ref(){return gt.volume},set ref(Vt){gt.volume=Vt},children:(Vt,Si)=>{bp(Vt,{get muted(){return n(Bn)},click:Sr})},$$slots:{default:!0}})};R(Ji,Ue=>{n(uo)&&Ue(Wr)})}var Ai=L(Ji,2);{var bs=Ue=>{Ho(Ue,{get ref(){return gt.settings},set ref(Vt){gt.settings=Vt},children:(Vt,Si)=>{Jl(Vt,{get ref$(){return Fn}})},$$slots:{default:!0}})};R(Ai,Ue=>{n(yr)&&Ue(bs)})}var as=L(Ai,2);{var Cr=Ue=>{Ho(Ue,{get ref(){return gt.fullscreen},set ref(Vt){gt.fullscreen=Vt},children:(Vt,Si)=>{gc(Vt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(as,Ue=>{n(Hr)&&Ue(Cr)})}S(zn),Xe(zn,Ue=>ui.bottomRight=Ue,()=>ui==null?void 0:ui.bottomRight),S(lr),Xe(lr,Ue=>j(Ue),()=>j());var qo=L(lr,2);let Kr=m(()=>!e.showControls);il(qo,{get isHidden(){return n(Kr)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return Q()},get ref(){return gt.timeline},set ref(Ue){gt.timeline=Ue}}),S(sr),Xe(sr,Ue=>ui.bottom=Ue,()=>ui==null?void 0:ui.bottom),S(Wi),Xe(Wi,Ue=>Te(Ue),()=>Te());var $n=L(Wi,2);{var yn=Ue=>{wc(Ue,{get ref(){return gt.interactiveTimeIndicator},set ref(Vt){gt.interactiveTimeIndicator=Vt}})};R($n,Ue=>{Hi&&Ue(yn)})}D((Ue,Vt)=>{Un=se(Wi,1,"wrapper-bottom mobile s-1b",null,Un,Ue),ar=se(sr,1,"controls-wrapper s-1b",null,ar,Vt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,Hn),F(),o()}Je(["click"]);function Ac(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(T,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),v=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),f=h(e,"customFullscreenSupported",3,!0),$=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,$v.noop),g=h(e,"onDisabledSeekToInteractiveClick",3,$v.noop),T=ve().ui.isMobile,I=W(!1);Rt(()=>{let A=setTimeout(()=>O(I,!0),0);return()=>clearTimeout(A)});var N=Le(),k=de(N);{var E=A=>{var Q=Le(),H=de(Q);{var z=le=>{bv(le,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return f()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return g()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},Y=le=>{pv(le,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return f()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};R(H,le=>{r()?le(z):le(Y,!1)})}b(A,Q)};R(k,A=>{n(I)&&A(E)})}b(t,N),F(),o()}var wS=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 Lc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${vn(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=wS();b(r,l)},$$slots:{default:!0}}),F()}var SS=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 yv(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=SS();b(a,d)},$$slots:{default:!0}}),F()}var TS=M('<span class="hot-key-helpers-text s-u"> </span>'),CS=M('<div data-testid="hotkey-helper-icon" class="s-u"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),IS=M("<div><!></div>"),ES={hash:"s-u",code:'.hot-key-helpers-container.s-u{align-items:center;animation:s-u-fadeIn ease var(--controls-transition-duration);box-sizing:border-box;display:flex;flex-direction:column;height:120px;left:calc(50% - 100px);padding-top:14px;position:absolute;top:calc(50% - 40px);width:200px;z-index:var(--hot-key-helpers-container-z-index)}.hot-key-helpers-container--left.s-u{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-u{left:calc(75% - 100px)}.hot-key-helpers-text.s-u{display:-webkit-box;font-feature-settings:"clig" off,"liga" off;font-size:15px;font-style:normal;font-weight:600;letter-spacing:-.105px;-webkit-line-clamp:2;line-height:20px;margin-top:4px;max-height:40px;overflow:hidden;text-align:center;text-overflow:ellipsis;text-shadow:0 0 5px rgba(0,0,0,.16);white-space:pre-wrap;width:100%;-webkit-box-orient:vertical}.hidden.s-u{animation:s-u-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-u-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-u-fadeOut{0%{opacity:1}to{opacity:0}}'};function xv(t,e){B(e,!0),q(t,ES);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Nt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var T;return((T=r())==null?void 0:T.type)==="BACKWARD_SEEK"}),v=m(()=>{var T;return((T=r())==null?void 0:T.type)==="FORWARD_SEEK"}),p=m(()=>{var T;return(T=r())==null?void 0:T.type}),f=m(()=>{var T,I;return(T=r())!=null&&T.t?d(r().t.key,{value:r().t.value||""}):(I=r())==null?void 0:I.text});var $=IS();let y;var g=C($);{var w=T=>{var I=CS(),N=de(I),k=C(N);{var E=j=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");yv(j,{get reversed(){return n(ie)},shadow:!0})};R(k,j=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&j(E)})}var A=L(k,2);{var Q=j=>{Bs(j,{get size(){return"48"},shadow:!0})};R(A,j=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&j(Q)})}var H=L(A,2);{var z=j=>{An(j,{get size(){return"48"},shadow:!0})};R(H,j=>{n(p)==="PLAY"&&!l.playbackStatusShow&&j(z)})}var Y=L(H,2);{var le=j=>{Sc(j,{get size(){return"48"},shadow:!0})};R(Y,j=>{n(p)==="REPLAY"&&!l.playbackStatusShow&&j(le)})}var X=L(Y,2);{var re=j=>{ma(j,{get size(){return"48"},type:"off",shadow:!0})};R(X,j=>{n(p)==="SUBTITLES_OFF"&&j(re)})}var Z=L(X,2);{var we=j=>{ma(j,{get size(){return"48"},shadow:!0})};R(Z,j=>{n(p)==="SUBTITLES_ON"&&j(we)})}var ue=L(Z,2);{var ne=j=>{let ie=m(()=>n(p)==="RATE_DOWN");Lc(j,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(ue,j=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&j(ne)})}var _e=L(ue,2);{var xe=j=>{let ie=m(()=>n(p)==="EPISODE_PREV");ga(j,{get size(){return"48"},get reversed(){return n(ie)},shadow:!0})};R(_e,j=>{["EPISODE_PREV","EPISODE_NEXT"].includes(n(p))&&j(xe)})}var J=L(_e,2);{var Ne=j=>{va(j,{get size(){return"48"},volume:0,shadow:!0})};R(J,j=>{n(p)==="MUTE"&&j(Ne)})}var pe=L(J,2);{var P=j=>{va(j,{get size(){return"48"},volume:1,shadow:!0})};R(pe,j=>{n(p)==="VOLUME"&&j(P)})}S(N);var Ke=L(N,2);{var Te=j=>{var ie=TS(),De=C(ie,!0);S(ie),D(()=>me(De,n(f))),b(j,ie)};R(Ke,j=>{n(f)&&j(Te)})}D(()=>Ve(N,"data-type",n(p))),b(T,I)};R(g,T=>{!n(s)&&n(p)&&T(w)})}S($),D(T=>y=se($,1,"hot-key-helpers-container s-u",null,y,T),[()=>({hidden:n(s),"hot-key-helpers-container--left":n(u),"hot-key-helpers-container--right":n(v)})]),b(t,$),F(),o()}var kS=(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}},PS=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},AS=M('<div tabindex="0" role="button"><div class="button-block s-z" aria-hidden="true"><div class="button-row s-z"><div class="button button-up s-z"><!></div> <div class="button button-right s-z"><!></div></div> <div class="button-row s-z"><div class="button button-left s-z"><!></div> <div class="button button-down s-z"><!></div></div></div></div>'),LS={hash:"s-z",code:".immersive-controls.s-z{background-color:rgba(0,0,0,.56);border-radius:8px;display:flex;flex-direction:row;height:56px;left:10px;position:absolute;top:10px;transition-duration:var(--controls-transition-duration);transition-property:top,left;transition-timing-function:var(--controls-transition-fn);width:56px}.immersive-controls.m-shifted.s-z{left:20px;top:50px}.button-block.s-z{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-z{display:flex;flex-direction:row;position:relative}.button.s-z{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-z svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-z svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-z svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-z svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-z svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-z:hover svg{opacity:1}"};function Mc(t,e){B(e,!0),q(t,LS);let i=h(e,"isShifted",3,!1),o=ve(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),v=G("aria_label_spherical_control");var p=AS();let f;p.__keydown=[kS,r,a,l,s,d],p.__keyup=[PS,r,u];var $=C(p),y=C($),g=C(y);g.__mousedown=a,g.__mouseup=u;var w=C(g);Or(w,{direction:"up",useBtnColor:!0}),S(g);var T=L(g,2);T.__mousedown=d,T.__mouseup=u;var I=C(T);Or(I,{direction:"up",useBtnColor:!0}),S(T),S(y);var N=L(y,2),k=C(N);k.__mousedown=s,k.__mouseup=u;var E=C(k);Or(E,{direction:"up",useBtnColor:!0}),S(k);var A=L(k,2);A.__mousedown=l,A.__mouseup=u;var Q=C(A);Or(Q,{direction:"up",useBtnColor:!0}),S(A),S(N),S($),S(p),D(H=>{f=se(p,1,"immersive-controls s-z",null,f,H),Ve(p,"aria-label",v)},[()=>({"m-shifted":i()})]),lt("mouseleave",g,u),lt("mouseleave",T,u),lt("mouseleave",k,u),lt("mouseleave",A,u),b(t,p),F()}Je(["keydown","keyup","mousedown","mouseup"]);var Hs=require("@vkontakte/videoplayer-shared/es2015");var qb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var $p=class{constructor(){this.flickeringTimeout=qb(1e3);this.subscriptions=new Hs.Subscription;this.isAuto=!1;this.isLive=!1;this.captions$=new Hs.ValueSubject([]);this.captionsPrepared$=new Hs.ValueSubject([])}subscribe(){return this.subscriptions.add(this.captions$.pipe((0,Hs.filter)(()=>this.isEnabled()),(0,Hs.filterChanged)()).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 MS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),VS=M('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),RS=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),NS=M('<div><span class="caption s-a"><!></span></div>'),OS=M("<div><!></div>"),DS={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 rl(t,e){B(e,!0),q(t,DS);let[i,o]=Re(),r=()=>x(f,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(g,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),v=ve(),p=Nt(),f=v.state.currentSubtitle$,$=v.state.isAutoSubtitleCaptionVisible$,y=v.state.isLive$,g=v.ui.isFullscreen,w=v.ui.previewTrackActive,T=m(()=>!!r().isAuto),I=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),k=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=W(null);Oe(()=>{var X,re,Z;(X=n(E))==null||X.setIsAuto(n(T)),(re=n(E))==null||re.setIsLive(n(I)),(Z=n(E))==null||Z.setCaptions(e.captions)});let A=W(ci([[]]));Rt(()=>{O(E,new $p().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(re=>{O(A,re,!0)});return()=>{var re;(re=n(E))==null||re.destroy(),X.unsubscribe()}}),Rt(()=>{if(n(T)){let X=window.setTimeout(()=>{$.set(!1)},p.autoSubtitlesTimeout);return()=>{window.clearTimeout(X)}}else $.set(!1)});let Q=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var H=OS();let z;var Y=C(H);{var le=X=>{var re=NS();let Z;var we=C(re),ue=C(we);{var ne=xe=>{var J=MS(),Ne=C(J),pe=C(Ne,!0);S(Ne),S(J),D(P=>{var Ke;Qe(Ne,`font-size: ${(Ke=n(k))!=null?Ke:""}px`),me(pe,P)},[()=>G("subtitles_auto_caption")]),b(xe,J)},_e=(xe,J)=>{{var Ne=P=>{var Ke=Le(),Te=de(Ke);yi(Te,17,()=>n(A),Ud,(j,ie)=>{var De=VS(),Be=C(De);yi(Be,21,()=>n(ie),({value:ot,timeAppeared:U})=>U,(ot,U)=>{let Ae=()=>n(U).value,ke=()=>n(U).timeAppeared;var ze=Le(),et=de(ze);{var ye=Pe=>{var Fe=fs();D(()=>me(Fe,Ae())),b(Pe,Fe)};R(et,Pe=>{(!ke()||ke()<=e.position)&&Pe(ye)})}b(ot,ze)}),S(Be),S(De),D(()=>{var ot;return Qe(Be,`font-size: ${(ot=n(k))!=null?ot:""}px`)}),b(j,De)}),b(P,Ke)},pe=P=>{var Ke=Le(),Te=de(Ke);yi(Te,17,()=>e.captions,({value:j})=>j,(j,ie)=>{let De=()=>n(ie).value;var Be=RS(),ot=C(Be),U=C(ot,!0);S(ot),S(Be),D(()=>{var Ae;Qe(ot,`font-size: ${(Ae=n(k))!=null?Ae:""}px`),me(U,De())}),b(j,Be)}),b(P,Ke)};R(xe,P=>{var Ke;n(T)&&((Ke=n(A))!=null&&Ke.length)?P(Ne):P(pe,!1)},J)}};R(ue,xe=>{n(T)&&s()?xe(ne):xe(_e,!1)})}S(we),S(re),D(xe=>{var J;Z=se(re,1,"subtitles-caption s-a",null,Z,xe),Qe(re,`--subtitles-caption-margin: ${(J=n(Q))!=null?J:""}%`)},[()=>({mobile:u()})]),b(X,re)};R(Y,X=>{var re;(e.captions.length||(re=n(A))!=null&&re.length)&&X(le)})}S(H),D(X=>z=se(H,1,"subtitles-container s-a",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(T)&&!n(I)&&!s()})]),b(t,H),F(),o()}var Qb=require("@vkontakte/videoplayer-core/es2015");var BS=M('<div class="text s-11"> </div>'),FS=M('<div><div class="icon_wrapper s-11"><!></div> <!></div>'),HS={hash:"s-11",code:".wrapper.s-11{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:contain;display:flex;flex-direction:column;font-size:16px;height:100%;justify-content:center}.wrapper.bgCover.s-11{background-size:cover}.icon_wrapper.s-11{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-11{margin-top:20px}"};function Vc(t,e){B(e,!0),q(t,HS);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Nt();var r=FS();let a;var l=C(r),d=C(l);_c(d,{get size(){return"48"},get iconState(){return Qb.ChromecastState.CONNECTED}}),S(l);var s=L(l,2);{var u=v=>{var p=BS(),f=C(p);S(p),D(()=>{var $;return me(f,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(v,p)};R(s,v=>{i()&&v(u)})}S(r),D(v=>{a=se(r,1,"wrapper s-11",null,a,v),Qe(r,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:o.features.previewNoEmptySpace})]),b(t,r),F()}var US=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 wv(t){Ze(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=US();b(e,o)},$$slots:{default:!0}})}var zS=M('<div class="container s-5"><!></div>'),WS={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 sl(t){q(t,WS);var e=zS(),i=C(e);wv(i,{}),S(e),b(t,e)}var KS=M('<div class="playButton s-b" tabindex="0" role="button"><div class="playButtonBackground s-b"></div> <!></div>'),qS=M('<div data-testid="unstarted-thumb"><!></div>'),QS={hash:"s-b",code:".container.s-b{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-b{opacity:0;visibility:hidden}.container.bgCover.s-b{background-size:cover}.playButton.s-b{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-b,.playButtonBackground.s-b{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-b{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-b:hover .playButtonBackground:where(.s-b){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-b svg{position:relative}"};function al(t,e){B(e,!0),q(t,QS);let i=h(e,"iconVisible",3,!0),o=ve(),r=Nt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var g;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(g=e.startVideo)==null||g.call(e))},s=$=>{var y,g;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(g=e.onClick)==null||g.call(e,$)};var u=qS();let v;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=C(u);{var f=$=>{var y=KS();y.__keydown=d;var g=L(C(y),2);An(g,{get size(){return"48"}}),S(y),D(()=>Ve(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(f)})}return S(u),D($=>{v=se(u,1,"container s-b",null,v,$),Qe(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:r.features.previewNoEmptySpace})]),b(t,u),F({handlePressKey:d,handleClick:s})}Je(["click","contextmenu","keydown"]);var GS=M('<span class="text s-t"> </span>'),YS=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},jS=M('<a target="_blank" class="link s-t"><!></a>'),XS=M('<div data-testid="video_title"><!></div>'),ZS={hash:"s-t",code:".title.s-t{background:linear-gradient(0deg,transparent,rgba(0,0,0,.02) 19%,rgba(0,0,0,.1) 34%,rgba(0,0,0,.4) 60%,rgba(0,0,0,.6));box-sizing:border-box;font-size:15px;height:var(--controls-gradient-height);left:0;overflow:hidden;padding:18px 20px 10px;pointer-events:none;position:absolute;text-overflow:ellipsis;top:0;transition-duration:var(--controls-transition-duration);transition-property:visibility,transform,opacity;transition-timing-function:var(--controls-transition-fn);white-space:nowrap;width:100%;will-change:transform,opacity;z-index:var(--controls-container-z-index)}.link.s-t,.title.s-t{color:var(--white)}.link.s-t{pointer-events:auto;text-decoration:none}.link.s-t:hover{text-decoration:underline}.text.s-t{pointer-events:auto}.size-sm.s-t{font-size:14px;font-weight:500;line-height:18px}.hidden.s-t{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Sv(t,e){var y;B(e,!0),q(t,ZS);let i=g=>{var w=GS(),T=C(w,!0);S(w),Xe(w,I=>l(I),()=>l()),D(()=>me(T,o())),lt("mouseenter",w,function(...I){var N;(N=e.onMouseEnter)==null||N.apply(this,I)}),lt("mouseleave",w,function(...I){var N;(N=e.onMouseLeave)==null||N.apply(this,I)}),b(g,w)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=W(void 0);Rt(()=>{var w;requestAnimationFrame(()=>{var T;(T=e.onVisibilityChanged)==null||T.call(e,!0)});function g(T){var I;T.propertyName==="transform"&&((I=e.onVisibilityChanged)==null||I.call(e,!r()))}return(w=n(d))==null||w.addEventListener("transitionend",g),()=>{var T;return(T=n(d))==null?void 0:T.removeEventListener("transitionend",g)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=XS();let v;var p=C(u);{var f=g=>{var w=jS();w.__click=[YS,e];var T=C(w);i(T),S(w),D(()=>Ve(w,"href",s||"")),b(g,w)},$=g=>{i(g)};R(p,g=>{s||e.onTitleClicked?g(f):g($,!1)})}S(u),Xe(u,g=>O(d,g),()=>n(d)),D(g=>v=se(u,1,`title size-${a()}`,"s-t",v,g),[()=>({hidden:r()})]),b(t,u),F()}Je(["click"]);var Gb=require("@vkontakte/videoplayer-shared/es2015");var JS=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),e2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),t2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div> <span class="timer__points s-1a"> </span>',1),i2=M('<div class="timer__cell cell s-1a"><span class="cell__value s-1a"> </span> <span class="cell__unit s-1a"> </span></div>'),o2=M("<div><!> <!> <!> <!></div>"),n2={hash:"s-1a",code:".timer__container.s-1a{align-items:flex-start;display:flex;justify-content:center}.cell.s-1a{align-items:center;display:flex;flex-direction:column}.cell__value.s-1a{font-size:48px;font-weight:600;line-height:1.2}.small.s-1a .cell__value:where(.s-1a){font-size:24px}.cell__unit.s-1a{font-size:14px;font-weight:400;line-height:1.2}.small.s-1a .cell__unit:where(.s-1a){font-size:12px}.timer__points.s-1a{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1a .timer__points:where(.s-1a){font-size:20px}"};function Tv(t,e){B(e,!0),q(t,n2);let i=W(""),o=W(""),r=W(""),a=W(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),v=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*v(H)}px`,f=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let Y=Math.floor(H/3600);O(o,u(Y),!0);let le=Math.floor(H/60)%60;O(r,u(le),!0);let X=H%60;O(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;f(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Rt(()=>{l=requestAnimationFrame($)}),mn(()=>{cancelAnimationFrame(l)});var y=o2();let g;var w=C(y);{var T=H=>{var z=JS(),Y=de(z);let le;var X=C(Y),re=C(X,!0);S(X);var Z=L(X,2),we=C(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=C(ue,!0);S(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(i)),me(we,xe),me(ne,J)},[()=>p(n(i)),()=>G("waiting_live_day_value"),()=>G("waiting_live_colon")]),b(H,z)};R(w,H=>{n(i)&&H(T)})}var I=L(w,2);{var N=H=>{var z=e2(),Y=de(z);let le;var X=C(Y),re=C(X,!0);S(X);var Z=L(X,2),we=C(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=C(ue,!0);S(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(o)),me(we,xe),me(ne,J)},[()=>p(n(o)),()=>G("waiting_live_hour_value"),()=>G("waiting_live_colon")]),b(H,z)};R(I,H=>{n(o)&&H(N)})}var k=L(I,2);{var E=H=>{var z=t2(),Y=de(z);let le;var X=C(Y),re=C(X,!0);S(X);var Z=L(X,2),we=C(Z,!0);S(Z),S(Y);var ue=L(Y,2),ne=C(ue,!0);S(ue),D((_e,xe,J)=>{le=Qe(Y,"",le,{width:_e}),me(re,n(r)),me(we,xe),me(ne,J)},[()=>p(n(r)),()=>G("waiting_live_minute_value"),()=>G("waiting_live_colon")]),b(H,z)};R(k,H=>{n(r)&&H(E)})}var A=L(k,2);{var Q=H=>{var z=i2();let Y;var le=C(z),X=C(le,!0);S(le);var re=L(le,2),Z=C(re,!0);S(re),S(z),D((we,ue)=>{Y=Qe(z,"",Y,{width:we}),me(X,n(a)),me(Z,ue)},[()=>p(n(a)),()=>G("waiting_live_second_value")]),b(H,z)};R(A,H=>{n(a)&&H(Q)})}S(y),D(H=>g=se(y,1,"timer__container s-1a",null,g,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var r2=M('<div class="waiting s-w"><span> </span></div>'),s2=M('<div class="upcoming-timer timer s-w"><span> </span> <!></div>'),a2=M('<div class="waiting-container s-w"><!></div>'),l2={hash:"s-w",code:'.waiting-container.s-w{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-w,.waiting-container.s-w:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-w:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-w{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-w{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-w{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-w{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-w{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-w{font-size:15px}.medium.s-w{font-size:17px}'};function Rc(t,e){B(e,!0),q(t,l2);let i=h(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=W(void 0),a=W(void 0),l=0,d=W(void 0),s=W(void 0),u=m(()=>{var w,T;return((w=n(d))!=null?w:1/0)<=509||((T=n(s))!=null?T:1/0)<=320}),v=m(()=>{var w,T;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((T=n(s))!=null?T:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?(0,Gb.throttleFn)(()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{let w={type:n(o)?"expired":"default",size:n(u)?"s":n(v)?"m":"l"},T=n(o)?n(r):n(a);e.onUpcomingLiveViewStateChanged(w,T)})},300):void 0;Oe(()=>{n(s),n(d),n(o),p==null||p()}),mn(()=>{if(cancelAnimationFrame(l),p==null||p.cancel(),e.onUpcomingLiveViewStateChanged){let w={type:n(o)?"expired":"default",size:n(u)?"s":n(v)?"m":"l"};e.onUpcomingLiveViewStateChanged(w)}});var f=a2();f.__contextmenu=function(...w){var T;(T=e.onContextMenu)==null||T.apply(this,w)},f.__click=function(...w){var T;(T=e.onClick)==null||T.apply(this,w)};var $=C(f);{var y=w=>{var T=r2(),I=C(T);let N;var k=C(I,!0);S(I),S(T),Xe(T,E=>O(r,E),()=>n(r)),D((E,A)=>{N=se(I,1,"waiting__title s-w",null,N,E),me(k,A)},[()=>({medium:n(v),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(w,T)},g=w=>{var T=s2(),I=C(T);let N;var k=C(I,!0);S(I);var E=L(I,2);let A=m(()=>n(u)||n(v)),Q=m(()=>i()||0);Tv(E,{get isSmallSize(){return n(A)},get startTime(){return n(Q)},onTimerOver:()=>O(o,!0)}),S(T),Xe(T,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(I,1,"timer__title s-w",null,N,H),me(k,z)},[()=>({medium:n(v),small:n(u)}),()=>G("waiting_live_timer_title")]),b(w,T)};R($,w=>{n(o)?w(y):w(g,!1)})}S(f),D(()=>Qe(f,`background-image: url(${e.thumbUrl})`)),kn(f,"clientWidth",w=>O(d,w)),kn(f,"clientHeight",w=>O(s,w)),b(t,f),F()}Je(["contextmenu","click"]);var d2=M('<div class="waiting-container s-v"><div class="waiting-caption s-v"><!> <p class="waiting-title s-v"> </p></div></div>'),c2={hash:"s-v",code:'.waiting-container.s-v{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-v,.waiting-container.s-v:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-v:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-v{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-v{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function ll(t,e){B(e,!0),q(t,c2);let i=h(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=d2();a.__contextmenu=function(...v){var p;(p=e.onContextMenu)==null||p.apply(this,v)},a.__click=function(...v){var p;(p=e.onClick)==null||p.apply(this,v)};var l=C(a),d=C(l);Ya(d,{style:"position: static; transform: translate(0, 0)"});var s=L(d,2),u=C(s,!0);S(s),S(l),S(a),D(()=>{Qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}Je(["contextmenu","click"]);var u2=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 Cv(t){Ze(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=u2();b(e,o)},$$slots:{default:!0}})}var p2=M('<div class="select-icon s-1x"><!></div>'),f2={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function Nc(t){q(t,f2);var e=p2(),i=C(e);Cv(i,{}),S(e),b(t,e)}var m2=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},v2=(t,e)=>{Yl(t,()=>e.item.selectItem(e.item.value))},g2=M("<p> </p>"),h2=M('<p class="sublabel s-1u"> </p>'),_2=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),b2={hash:"s-1u",code:".menu-item-value.s-1u{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1u{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1u,.sublabel.s-1u{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1u{opacity:.5}"};function Iv(t,e){B(e,!0),q(t,b2);let i=h(e,"isMobile",3,!1);var o=_2();let r;o.__click=[m2,e],o.__keydown=[v2,e];var a=C(o);{var l=y=>{Nc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=L(a,2);let s;var u=C(d);{var v=y=>{var g=Le(),w=de(g);Di(w,()=>e.item.valueComponent,(T,I)=>{I(T,Ms(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,g)},p=y=>{var g=g2();let w;var T=C(g,!0);S(g),D(I=>{var N;w=se(g,1,"label s-1u",null,w,I),me(T,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,g)};R(u,y=>{e.item.valueComponent?y(v):y(p,!1)})}var f=L(u,2);{var $=y=>{var g=h2(),w=C(g,!0);S(g),D(()=>me(w,e.item.sublabel)),b(y,g)};R(f,y=>{e.item.sublabel&&y($)})}S(d),S(o),D((y,g,w)=>{r=se(o,1,"item",null,r,y),Ve(o,"data-value",e.item.value),Ve(o,"aria-label",g),Ve(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1u",null,s,w),Ve(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,g;return(g=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?g:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}Je(["click","keydown"]);var $2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Ev(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>g=>tp(g,n(r)));var l=$2();let d;l.__click=function(...g){var w;(w=n(r))==null||w.apply(this,g)},l.__keydown=function(...g){var w;(w=n(a))==null||w.apply(this,g)};var s=C(l);{var u=g=>{Nc(g,{})};R(s,g=>{e.item.selected&&g(u)})}var v=L(s,2);let p;var f=C(v);{var $=g=>{var w=Le();let T=m(()=>e.item.valueComponent);var I=de(w);Di(I,()=>n(T),(N,k)=>{k(N,Ms(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(g,w)},y=g=>{var w=fs();D(()=>me(w,e.item.label)),b(g,w)};R(f,g=>{e.item.valueComponent?g($):g(y,!1)})}S(v),S(l),Xe(l,g=>o(o()[e.item.id]=g,!0),()=>{var g;return(g=o())==null?void 0:g[e.item.id]}),D((g,w)=>{var T;d=se(l,1,"item",null,d,g),Ve(l,"aria-label",(T=e.item.ariaLabel)!=null?T:e.item.label),Ve(l,"data-testid",e.item.id),p=se(v,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}Je(["click","keydown"]);var ns={"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 x2=(t,e)=>{cb(t,e.returnFromSubMenu,e.closeSettingsMenu)},w2=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},S2=(t,e)=>{ac(t)&&(Dr(t),e.returnFromSubMenu())},T2=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1m"> </p></li> <!></ul></div>'),C2={hash:"s-1m",code:".sub-menu.s-1m{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1m .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1m{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1m{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1m .items:where(.s-1m) .item.header:where(.s-1m){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1m .title:where(.s-1m){margin-left:8px}.sub-menu.s-1m .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1m .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1m .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1m .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1m .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1m .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1m .item .sublabel{font-size:12px;line-height:14px}.item.s-1m:not(.mobile) p:where(.s-1m),.sub-menu.s-1m .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Pv(t,e){B(e,!0),q(t,C2);let[i,o]=Re(),r=()=>x(p,"$isFullscreen",i),a=()=>x(f,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=h(e,"listRef",15);Rt(()=>{let X=e.items.findIndex(re=>re.selected);u().children[X+1].focus()});let v=ve(),p=v.ui.isFullscreen,f=v.ui.playerSize,$=W(void 0),y=W(0),g=W(0),w=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(g)-d()}px; overflow: auto;`),T=m(()=>Math.max(e.minWidth,n(y)));var I=T2();let N;var k=C(I);let E;k.__keydown=[x2,e];var A=C(k);let Q;A.__click=[w2,e],A.__keydown=[S2,e];var H=C(A);Or(H,{direction:"left"});var z=L(H,2),Y=C(z,!0);S(z),S(A),Xe(A,X=>O($,X),()=>n($));var le=L(A,2);yi(le,17,()=>e.items,Ud,(X,re)=>{var Z=Le(),we=de(Z);{var ue=_e=>{Iv(_e,{get item(){return n(re)},get isMobile(){return l()}})},ne=(_e,xe)=>{{var J=Ne=>{Ev(Ne,{get isMobile(){return l()},get item(){return n(re)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Ne=>{n(re).type==="OPEN_SUB_MENU"&&Ne(J)},xe)}};R(we,_e=>{n(re).type==="SELECT_VALUE"?_e(ue):_e(ne,!1)})}b(X,Z)}),S(k),Xe(k,X=>u(X),()=>u()),S(I),D((X,re,Z)=>{N=se(I,1,"sub-menu menu s-1m",null,N,X),Ve(I,"data-testid",`${e.id}-sub-menu`),Qe(I,`min-width: ${n(T)}px`),E=se(k,1,"items s-1m",null,E,re),Qe(k,n(w)),Q=se(A,1,"item header back s-1m",null,Q,Z),Ve(A,"aria-label",s()),me(Y,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),kn(A,"clientWidth",X=>O(y,X)),kn(A,"clientHeight",X=>O(g,X)),b(t,I),F(),o()}Je(["keydown","click"]);var jb=require("@vkontakte/videoplayer-shared/es2015");var I2=(t,e)=>tp(t,e()),E2=(t,e)=>{t.stopPropagation(),e()()},k2=M('<div class="value s-1o"> </div>'),P2=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),A2={hash:"s-1o",code:".value.s-1o{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function Av(t,e){B(e,!0),q(t,A2);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,jb.noop),r=h(e,"valueComponent",3,void 0),a=h(e,"ref",15);var l=P2();let d;l.__click=[E2,o],l.__keydown=[I2,o];var s=C(l),u=C(s);{var v=T=>{tl(T,{get icon(){return e.icon}})},p=T=>{var I=Le();let N=m(()=>e.icon);var k=de(I);Di(k,()=>n(N),(E,A)=>{A(E,{})}),b(T,I)};R(u,T=>{typeof e.icon=="string"?T(v):T(p,!1)})}S(s);var f=L(s,2),$=C(f,!0);S(f);var y=L(f,2);{var g=T=>{var I=Le();let N=m(r);var k=de(I);Di(k,()=>n(N),(E,A)=>{A(E,{})}),b(T,I)},w=T=>{var I=k2(),N=C(I,!0);S(I),D(()=>me(N,e.value)),b(T,I)};R(y,T=>{r()?T(g):T(w,!1)})}S(l),Xe(l,T=>a(T),()=>a()),D(T=>{d=se(l,1,"item",null,d,T),Ve(l,"aria-label",e.ariaLabel),Ve(l,"data-testid",e.id),me($,e.label)},[()=>({mobile:i()})]),b(t,l),F()}Je(["click","keydown"]);var Lv=require("@vkontakte/videoplayer-shared/es2015");var L2=(t,e)=>{Yl(t,()=>e())},M2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),V2=M('<img class="icon" aria-hidden="true"/>'),R2=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),N2={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function Mv(t,e){B(e,!0),q(t,N2);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,Lv.noop),r=h(e,"closeSettings",3,Lv.noop),a=W(!1),l=()=>{O(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=R2();let u;s.__click=d,s.__keydown=[L2,d];var v=C(s),p=C(v);{var f=w=>{var T=Le(),I=de(T);{var N=E=>{var A=M2();b(E,A)},k=E=>{var A=V2();D(()=>Ve(A,"src",e.icon)),lt("error",A,l),Ra(A),b(E,A)};R(I,E=>{n(a)?E(N):E(k,!1)})}b(w,T)},$=w=>{var T=Le();let I=m(()=>e.icon);var N=de(T);Di(N,()=>n(I),(k,E)=>{E(k,{})}),b(w,T)};R(p,w=>{typeof e.icon=="string"?w(f):w($,!1)})}S(v);var y=L(v,2),g=C(y,!0);S(y),S(s),D(w=>{var T;u=se(s,1,"item",null,u,w),Ve(s,"aria-label",(T=e.ariaLabel)!=null?T:e.label),Ve(s,"data-testid",e.id),me(g,e.label)},[()=>({mobile:i()})]),b(t,s),F()}Je(["click","keydown"]);var Xb=require("@vkontakte/videoplayer-shared/es2015");var O2=M('<div class="toggle_wrap s-1r"><div></div> <div class="toggle-label s-1r"></div></div>'),D2={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 Vv(t,e){q(t,D2);let i=h(e,"enabled",3,!1);var o=O2(),r=C(o);let a;fi(2),S(o),D(l=>a=se(r,1,"toggle s-1r",null,a,l),[()=>({on:i()})]),b(t,o)}var B2=(t,e,i)=>{ub(t,e(),o=>i()(o))},F2=(t,e,i)=>{t.stopPropagation(),e()(!i())},H2=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),U2=M('<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,Xb.noop),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=U2();let s;d.__click=[F2,o,r],d.__keydown=[B2,r,o];var u=C(d);Xa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(v,p)=>{var f=H2();let $;var y=C(f),g=C(y);{var w=E=>{tl(E,{get icon(){return e.icon}})},T=E=>{var A=Le();let Q=m(()=>e.icon);var H=de(A);Di(H,()=>n(Q),(z,Y)=>{Y(z,{})}),b(E,A)};R(g,E=>{typeof e.icon=="string"?E(w):E(T,!1)})}S(y);var I=L(y,2),N=C(I,!0);S(I);var k=L(I,2);Vv(k,{get enabled(){return r()}}),S(f),D(E=>{$=se(f,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(v,f)},$$slots:{default:!0}}),S(d),D(v=>{var p;s=se(d,1,"item switch-item",null,s,v),Ve(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Ve(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}Je(["click","keydown"]);var Dc=require("@vkontakte/videoplayer-shared/es2015");var Zb=()=>{let t=W(ci([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};var Jb=require("@vkontakte/videoplayer-shared/es2015");var z2=M('<div class="quality-icon s-1q"><!></div>'),W2=M('<div class="quality-label s-1q"><span> </span> <!></div>'),K2={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 dl(t,e){B(e,!0),q(t,K2);let i=h(e,"isSubCase",3,!1),o=m(()=>e.quality?(0,Jb.getVideoQualityLabel)(e.quality):""),r=m(()=>sp(e.quality));var a=W2(),l=C(a);let d;var s=C(l,!0);S(l);var u=L(l,2);{var v=p=>{var f=z2();let $=m(()=>n(r));var y=C(f);Di(y,()=>n($),(g,w)=>{w(g,{})}),S(f),D(()=>Ve(f,"data-testid",`${n(o)}-icon`)),b(p,f)};R(u,p=>{n(r)&&!e.isMobile&&p(v)})}S(a),D(p=>{d=se(l,1,"s-1q",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}var o$=require("@vkontakte/videoplayer-shared/es2015");var Nv=require("@vkontakte/videoplayer-core/es2015");var e$=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},t$=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=e$({quality:t,availableQualities:e});return i?t===Nv.VideoQuality.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},i$=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Nv.VideoQuality.INVARIANT?i:`${i}${e$({quality:t,availableQualities:e})}`:"...";var q2=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),Q2={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function ad(t,e){B(e,!0),q(t,Q2);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(v,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,v=d.ui.isMobile,p=" · ",f=m(()=>e.prefix+(e.selected&&r()!==o$.VideoQuality.INVARIANT?p:"")),$=m(()=>i$({prefix:n(f),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=q2(),g=C(y);let w=m(()=>e.selected?r():void 0);dl(g,{get quality(){return n(w)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var G2=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")},Y2={br:!0,span:!0},Ov=(t,e={})=>{var d,s,u,v,p,f,$;if(!t)return t;let i=Ie(Ie({},Y2),e),o=Object.keys(i);if(!o.length)return t;let r=G2(o),a=[],l=0;for(let y of t.matchAll(r)){let g=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((v=y.groups)==null?void 0:v.keyi18nself)||"",{index:T}=y;if(!i[w]){a.push(t.slice(l,T)),l=T+g.length;continue}let I=(p=y.groups)!=null&&p.childrenhtml?Ov(y.groups.childrenhtml,i):"",N=(f=y.groups)!=null&&f.childrenhtml?g.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>I||""):g;a.push(t.slice(l,T),N),l=T+g.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function Oc(t,e){B(e,!1);let i=h(e,"message",8),o=Ov(i());Co();var r=Le(),a=de(r);{var l=d=>{var s=Le(),u=de(s);zd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var j2=M('<p class="quality-applies sublabel s-1t"><!></p>'),X2={hash:"s-1t",code:".quality-applies.s-1t{color:hsla(0,0%,100%,.5);display:flex;justify-content:end;padding:3px 0}.quality-applies span{color:#70c1ff}"};function Dv(t,e){B(e,!1),q(t,X2),Co();var i=j2(),o=C(i);let r=Sn(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));Oc(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var r$=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"quality-other-settings",type:"OPEN_SUB_MENU",selected:o,valueComponent:ad,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},Bv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?ad:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),s$=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:Dv,bottomBordered:!0,children:"quality-appliance"}),Fv=({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?ad:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),Hv=({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?ad:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var yp=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),xp=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=yc(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=yp(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=yp(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=yp(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=yp(t,e);return G("audio_stream_display_unknown",{index:a})};var Z2={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:Bv,selected:e&&!o&&!r||!1}),a.push({handler:Hv,selected:o},{handler:Fv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[s$(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),r$(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:dl,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:Bv,selected:((i=Wu())==null?void 0:i.type)==="auto_quality"},{handler:Hv,selected:((o=Wu())==null?void 0:o.type)==="traffic_saving"},{handler:Fv,selected:((r=Wu())==null?void 0:r.type)==="high_quality"}].map(({handler:a,selected:l})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:l},t))}},"audio-languages":({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"audio-languages",title:G("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(r=>({type:"SELECT_VALUE",value:r,dataValue:r.id,selectItem:o,selected:r.id===(i==null?void 0:i.id),label:xp(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===Mn?"sub_off":void 0}))})},a$=({subMenuId:t,context:e})=>t?[Z2[t](e)]:[];var J2=Ce('<path d="M3.1 9.5c0-2.24 0-3.36.44-4.22A4 4 0 015.28 3.54C6.14 3.1 7.26 3.1 9.5 3.1h5c2.24 0 3.36 0 4.22.44a4 4 0 011.74 1.74c.44.86.44 1.98.44 4.22s0 3.36-.44 4.22a4 4 0 01-1.74 1.74c-.84.43-1.93.44-4.07.44l.55 2.2h1.9a.9.9 0 010 1.8H6.9a.9.9 0 110-1.8h1.9l.55-2.2c-2.14 0-3.23-.01-4.07-.44a4 4 0 01-1.74-1.74C3.1 12.86 3.1 11.74 3.1 9.5m11.4-4.6h-5c-1.15 0-1.9 0-2.48.05-.56.04-.79.12-.92.19a2.2 2.2 0 00-.96.96 2 2 0 00-.2.92C4.9 7.6 4.9 8.35 4.9 9.5s0 1.9.05 2.48c.04.56.12.79.19.92q.33.63.96.96c.13.07.36.15.92.2.58.04 1.33.04 2.48.04h5c1.15 0 1.9 0 2.48-.05.56-.04.79-.12.92-.19a2.2 2.2 0 00.96-.96c.07-.13.15-.36.2-.92.04-.58.04-1.33.04-2.48s0-1.9-.05-2.48a3 3 0 00-.19-.92 2.2 2.2 0 00-.96-.96 2 2 0 00-.92-.2c-.58-.04-1.33-.04-2.48-.04m-3.3 11-.55 2.2h2.7l-.55-2.2z"></path>');function Uv(t){Ze(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=J2();b(e,o)},$$slots:{default:!0}})}var eT=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 zv(t){Ze(t,{width:"18",height:"15",children:(e,i)=>{var o=eT();b(e,o)},$$slots:{default:!0}})}var tT=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 Wv(t){Ze(t,{testId:"play-speed-icon",children:(e,i)=>{var o=tT();b(e,o)},$$slots:{default:!0}})}var iT=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 Kv(t){Ze(t,{testId:"download-icon",children:(e,i)=>{var o=iT();b(e,o)},$$slots:{default:!0}})}var oT=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 qv(t){Ze(t,{testId:"report-icon",children:(e,i)=>{var o=oT();b(e,o)},$$slots:{default:!0}})}var nT=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 wp(t){Ze(t,{children:(e,i)=>{var o=nT();b(e,o)},$$slots:{default:!0}})}var rT=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 Qv(t){Ze(t,{testId:"info-icon",children:(e,i)=>{var o=rT();b(e,o)},$$slots:{default:!0}})}var sT=M('<div class="menu-item-value-wrapper s-1w"><!></div>'),aT={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function Gv(t,e){B(e,!0),q(t,aT);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(v,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(f,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,v=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,f=s.ui.isMobile,$=m(()=>t$({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=sT(),g=C(y);dl(g,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var dT={"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:pc,label:G("menu_quality"),value:e,valueComponent:Gv,weight:ns["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ns["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:Uv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-languages-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=xp(t,e);return{id:"audio-languages-settings",weight:ns["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:zv,label:G("menu_audio_languages"),value:i,children:"audio-languages"}},"playback-rate-settings":({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(r=>r.value===e))==null?void 0:o.displayValue)||"";return{id:"playback-rate-settings",weight:ns["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:Wv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ns["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:ma,label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ns.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:Kv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ns.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:qv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ns["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:wp,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ns["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:wp,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ns["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:Qv,isHiddenFor:["desktop"]})},l$=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>dT[r](e)),...i.map(r=>jt(Ie({},r),{isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(Qa)};var uT=(t,e)=>{ep(t,e)},pT=M('<div><div> </div> <div class="close s-y"></div></div>'),fT=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),mT=M("<div><!> <!></div>"),vT={hash:"s-y",code:'.settings-menu-container.mobile.s-y{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-y ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-y .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-y .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-y .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-y .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-y .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-y .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-y{line-height:40px}.settings-menu.desktop.s-y{min-width:300px}.settings-menu-container.s-y .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-y .menu.mobile.hidden{display:none}.settings-menu-container.s-y .menu .item:not(.switch-item),.settings-menu-container.s-y .menu .switch-wrapper{align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;position:relative;white-space:nowrap}.settings-menu-container.s-y .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-y .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-y .item:not(.switch-item),.settings-menu.s-y .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-y .item.mobile:not(.switch-item),.settings-menu.s-y .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-y .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-y .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-y .item.header.mobile:where(.s-y){border-bottom:var(--divider-border);color:var(--white);column-gap:12px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:4px}.settings-menu-container.s-y .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-y .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-y .items::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#666;border:1px solid transparent;border-radius:5px;min-height:40px}.settings-menu-container.s-y .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-y .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-y{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-y:after,.close.s-y:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-y:before{transform:rotate(45deg)}.close.s-y:after{transform:rotate(-45deg)}'};function Bc(t,e){B(e,!0),q(t,vT);let[i,o]=Re(),r=()=>x(Be,"$settingsMenuVisible",i),a=()=>x(ot,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Fe,"$debugPanelVisible",i),d=()=>x(Ae,"$isMobile",i),s=()=>x(Pe,"$playerSize",i),u=()=>x(De,"$hasMpegSources$",i),v=()=>x(ke,"$mobileNotReportControlHidden$",i),p=()=>x(J,"$autoQualityLimitingAvailable$",i),f=()=>x(j,"$availableSubtitlesList$",i),$=()=>x(ze,"$isLiveWithPlaybackSpeed",i),y=()=>x(ne,"$availableAudioStreams$",i),g=()=>x(Ke,"$availablePlaybackRates$",i),w=()=>x(ue,"$currentAudioStream$",i),T=()=>x(P,"$currentPlaybackRate$",i),I=()=>x(et,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),k=()=>x(Ne,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),A=()=>x(vt,"$additionalSettingsMenuItems$",i),Q=()=>x(pe,"$isAutoQualityAvailable$",i),H=()=>x(xe,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),Y=h(e,"ref",15,void 0),le=h(e,"playerControlsHeight",3,0),X=ci({}),re=ci({}),Z=ve(),we=Nt(),ue=Z.state.audioStream$,ne=Z.state.availableAudioStreams$,_e=Z.state.currentQuality$,xe=Z.state.availableQualities$,J=Z.state.autoQualityLimitingAvailable$,Ne=Z.state.isAutoQualityEnabled$,pe=Z.state.isAutoQualityAvailable$,P=Z.state.currentPlaybackRate$,Ke=Z.state.availablePlaybackRates$,Te=Z.state.currentSubtitle$,j=Z.state.availableSubtitlesList$,ie=Z.state.canDownload,De=Z.state.hasMpegSources$,Be=Z.ui.settingsMenu.visible$,ot=Z.ui.settingsMenu.openedByBtnKeyboard$,U=Z.ui.settingsMenu.ref$,Ae=Z.ui.isMobile,ke=Z.ui.mobileNotReportControlHidden$,ze=Z.state.canChangePlaybackSpeed$,et=Z.state.trafficSavingEnabled$,ye=Z.state.highQualityEnabled$,Pe=Z.ui.playerSize,Fe=Z.ui.debugPanelVisible,Ft=Z.state.isInteractiveTime$,vt=Z.ui.additionalSettingsMenuItems$,Ht=Z.ui.t,dt=Z.actions.internal.downloadVideo,Ct=Z.actions.internal.closeSettingsMenu,ri=Z.actions.internal.openSettingsSubMenu,Ot=Z.actions.internal.closeSettingsSubMenu,$e=W(!1),be=W(void 0),ee=Zb();Oe(()=>{!r()&&ee.current&&(Ot(re[ee.current]),ee.popAllSubMenus())}),Oe(()=>{r()||O(be,void 0)}),Oe(()=>{!ee.current&&n(be)&&db(X,n(be))}),Oe(()=>{Y()&&U.set(Y())});function nt(It){return ht(this,null,function*(){var K;ee.pushSubMenu(It),yield yo(),ri(It,re[It]);let Wt=(K=Y())==null?void 0:K.firstElementChild;Wt&&fm(Wt)})}function fe(It){var Wt;It==null||It.stopPropagation(),a()||(Wt=e.returnFocus)==null||Wt.call(e),Ct(),O($e,!1)}function Me(It,Wt){Z.actions.internal.setQuality(It,{appliesTo:Wt}),fe()}function wt(It){Z.actions.internal.setAudioStream(It),fe()}function Lt(It,Wt){Z.actions.internal.setTrafficSavingEnabled(It,Wt),we.features.qualityDetailsSubMenuEnabled&&fe()}function mt(It,Wt){Z.actions.internal.setHighQualityEnabled(It,Wt),fe()}function ce(It){Z.actions.internal.setPlaybackRate(It),fe()}function We(It){Z.actions.internal.setSubtitle(It),fe()}function Ye(){dt()}function ct(){(0,Dc.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),Z.actions.internal.reportProblem(),Z.actions.internal.pause()}function Ut(){Ql(Z.actions.internal.getDebugTextData())}let zt=()=>{let It=Z.actions.internal.getTraceTextData(),Wt=new Blob([...It],{type:"application/json"}),K=window.URL.createObjectURL(Wt);Ha(K,"vk_player_trace_info","json")};function si(){Fe.set(!l())}function $i(){O($e,!0)}function ji(){O($e,!1)}function Dt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-le()}px; overflow: auto;`}let pi=m(()=>ie&&u()&&!v()),hi=m(()=>we.features.trafficSaving&&!v()&&p()&&!we.features.qualityDetailsSubMenuEnabled),bt=m(()=>f().length>0&&!v()),Jt=m(()=>!!$()&&!v()),xi=m(()=>we.features.audioLanguages&&y().length>=2&&!v()),Xi=m(()=>!v());Rt(()=>Ft.subscribe(It=>{It&&!d()&&!n($e)&&!a()&&fe()}));let oi=m(()=>{let It=[n(Xi)&&"quality-settings",n(xi)&&"audio-languages-settings",n(Jt)&&"playback-rate-settings",n(bt)&&"subtitles-settings",n(hi)&&"traffic-saving-switch",n(pi)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Wt=>!!Wt);return l$({items:It,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:g(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:T(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:Lt,currentQuality:N()||Dc.VideoQuality.INVARIANT,isAutoQualityEnabled:k()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Ye,onCopyDataClick:Ut,onReportProblemClick:ct,onSaveTraceDataClick:zt,toggleShowDebugInfo:si},additionalSettingsMenuItems:A()})}),kt=m(()=>a$({subMenuId:ee.current,context:{availablePlaybackRates:g(),selectPlaybackRate:ce,trafficSavingEnabled:I(),toggleTrafficSaving:Lt,currentQuality:N()||Dc.VideoQuality.INVARIANT,isAutoQualityEnabled:k()||!1,isAutoQualityAvailable:Q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:mt,availableAudioStreams:y(),availableSubtitlesList:f(),closeSettingsMenu:Ct,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:wt,selectQuality:Me,selectSubtitle:We}}));var qe=mT();let wi;var xo=C(qe);{var Eo=It=>{var Wt=fT();let K;Wt.__keydown=[uT,Ct];var Mt=C(Wt);{var di=Xt=>{var st=pT();let Hi;var Ui=C(st),sn=C(Ui,!0);S(Ui);var ko=L(Ui,2);ko.__click=fe,S(st),D((zi,Zi)=>{Hi=se(st,1,"item header s-y",null,Hi,zi),me(sn,Zi)},[()=>({mobile:d()}),()=>Ht("submenu_settings")]),b(Xt,st)};R(Mt,Xt=>{d()&&Xt(di)})}var ut=L(Mt,2);let Tt;yi(ut,21,()=>n(oi),Xt=>Xt.id,(Xt,st)=>{var Hi=Le(),Ui=de(Hi);{var sn=zi=>{Av(zi,{get isMobile(){return d()},get id(){return n(st).id},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get value(){return n(st).value},get valueComponent(){return n(st).valueComponent},onClick:()=>{nt(n(st).children),O(be,n(st).id,!0)},get ref(){return X[n(st).id]},set ref(Zi){X[n(st).id]=Zi}})},ko=(zi,Zi)=>{{var Br=co=>{let Pi=m(()=>`${n(st).id}-menu-item`);Mv(co,{get isMobile(){return d()},get id(){return n(Pi)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},closeSettings:fe})},wo=(co,Pi)=>{{var an=ln=>{let Vn=m(()=>`${n(st).id}-menu-item`);Rv(ln,{get isMobile(){return d()},get id(){return n(Vn)},get onClick(){return n(st).onClick},get icon(){return n(st).icon},get label(){return n(st).label},get ariaLabel(){return n(st).ariaLabel},get enabled(){return n(st).enabled},get tooltipText(){return n(st).tooltipText},get maxTooltipWidth(){return n(st).maxTooltipWidth}})};R(co,ln=>{n(st).type==="SWITCH"&&ln(an)},Pi)}};R(zi,co=>{n(st).type==="CLICK"?co(Br):co(wo,!1)},Zi)}};R(Ui,zi=>{n(st).type==="OPEN_SUB_MENU"?zi(sn):zi(ko,!1)})}b(Xt,Hi)}),S(ut),Xe(ut,Xt=>Y(Xt),()=>Y()),S(Wt),D((Xt,st,Hi)=>{K=se(Wt,1,"settings-menu menu s-y",null,K,Xt),Tt=se(ut,1,"items",null,Tt,st),Qe(ut,Hi)},[()=>({desktop:!d(),mobile:d(),hidden:!!ee.current}),()=>({mobile:d()}),Dt]),lt("mouseenter",Wt,$i),lt("mouseleave",Wt,ji),b(It,Wt)};R(xo,It=>{r()&&It(Eo)})}var hn=L(xo,2);yi(hn,17,()=>n(kt),It=>It.id,(It,Wt)=>{let K=m(()=>{var Mt;return(Mt=n(Wt).minWidth)!=null?Mt:137});Pv(It,{get isMobile(){return d()},get playerControlsHeight(){return le()},get returnFromSubMenu(){return ee.popSubMenu},get id(){return n(Wt).id},get title(){return n(Wt).title},get closeSettingsMenu(){return Ct},openSubMenuList:nt,get items(){return n(Wt).items},get minWidth(){return n(K)},get refMenuItems(){return X},get listRef(){return re[n(Wt).id]},set listRef(Mt){re[n(Wt).id]=Mt}})}),S(qe),D(It=>wi=se(qe,1,"settings-menu-container s-y",null,wi,It),[()=>({mobile:d(),hidden:!r()})]),b(t,qe),F(),o()}Je(["keydown","click"]);var gT=M('<button class="btn s-1f"> </button>'),hT={hash:"s-1f",code:"button.btn.s-1f{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function Yv(t,e){q(t,hT);var i=gT();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=C(i,!0);S(i),D(()=>me(o,e.label)),b(t,i)}Je(["click"]);var _T=M('<div class="container s-r"><div class="notification s-r"><div><p class="description s-r"><!></p> <!></div> <!></div></div>'),bT={hash:"s-r",code:".container.s-r{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-r{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-r{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function Fc(t,e){B(e,!0),q(t,bT);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Nt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=_T(),d=C(l),s=C(d),u=C(s),v=C(u);Oc(v,{get message(){return a}}),S(u);var p=L(u,2);{var f=y=>{let g=m(()=>r("slow_video_notification_button"));Yv(y,{get label(){return n(g)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(f)})}S(s);var $=L(s,2);Rs($,{get onClick(){return e.onClose}}),S(d),S(l),es(3,d,()=>hs,()=>({duration:i})),b(t,l),F()}var Hc=require("@vkontakte/videoplayer-shared/es2015");var cl="annotation",Sp=class{constructor(){this.slots=new Map}init(e,i){this.shadowRootContainer=e,this.store=i}add(e,i){var d;let{overlay:o,id:r,controlsBehaviour:a,hideAllControls:l}=i;e.setAttribute("slot",cl),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1))}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(r,a){return ht(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var f;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((f=this.store)==null?void 0:f.ui)||{},v=new MutationObserver($=>$.forEach(()=>{let y=Os(d,this.shadowRootContainer);o.forEach(g=>{let w=s==null?void 0:s[g],T=w?ge(w):null,I=u==null?void 0:u[g];T&&(I==null||I.set((0,Hc.isIntersecting)(T,y)))})}));v.observe(d,{childList:!0,subtree:!0}),l.observer=v;let p=new Hc.Subscription;o.forEach($=>{s&&p.add(s[$].subscribe(y=>{let g=u==null?void 0:u[$];y&&y.isDisplayed?g==null||g.set((0,Hc.isIntersecting)(y,Os(d,this.shadowRootContainer))):g==null||g.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return ht(this,null,function*(){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,v;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(v=d==null?void 0:d.controlsToObserve)==null||v.forEach(p=>{var f,$;($=(f=this.store)==null?void 0:f.ui.hiddenControls[p])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var $T=M('<div class="container s-4"><!></div>'),yT={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 Uc(t,e){B(e,!0),q(t,yT);let i=h(e,"reversed",3,!1);var o=Le(),r=de(o);Ps(r,()=>e.Icon,a=>{var l=$T(),d=C(l);Di(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),D(()=>Qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}var jv=require("@vkontakte/videoplayer-core/es2015"),xT=M('<div class="container s-s"><!></div>'),wT={hash:"s-s",code:".container.s-s{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function Xv(t,e){B(e,!0),q(t,wT);let[i,o]=Re(),r=()=>x(s,"$playbackState$",i),a=()=>x(v,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:v,previewTrackDragInProgress:p}}=ve(),{features:{playbackStatusShow:f},playbackStatusAnimationDuration:$}=Nt(),y=0,g=W(null),w=W(!1);Oe(()=>{r()===jv.PlaybackState.PLAYING?O(g,An,!0):r()===jv.PlaybackState.PAUSED?O(g,Bs,!0):O(g,null)}),Oe(()=>{if(!(!f||a()||l()))return y=window.setTimeout(()=>{y=0,O(g,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Oe(()=>{d()&&!n(w)&&(O(w,!0),O(g,null))});var T=Le(),I=de(T);{var N=k=>{var E=xT(),A=C(E);Uc(A,{get duration(){return $},get Icon(){return n(g)}}),S(E),b(k,E)};R(I,k=>{n(g)&&f&&k(N)})}b(t,T),F(),o()}var ST=M('<div><div data-testid="video-container"></div></div>'),TT={hash:"s-c",code:".video-container.s-c,.video-wrapper.s-c{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-c{background:var(--black)}.video-container.s-c,.video-wrapper.s-c{z-index:var(--video-container-z-index)}.video-container.s-c{transition:var(--rotate-transition-duration) ease all}.video-container.fast-rotate.s-c{transition:none}.nocursor.s-c{cursor:none}"};function ul(t,e){B(e,!0),q(t,TT);let[i,o]=Re(),r=()=>x(v,"$rotateAlpha",i),a=()=>x(p,"$playerSize",i),l=()=>x(u,"$playerPhase",i),d=()=>x(f,"$isPlaying$",i),s=h(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:v,playerSize:p},state:{isPlaying$:f}}=ve(),{isSmoothVideoRotate:$}=Nt(),y=m(()=>s()&&r()%180?a().height/a().width:1);var g=ST();let w;g.__contextmenu=function(...N){var k;(k=e.onContextMenu)==null||k.apply(this,N)},g.__mousedown=function(...N){var k;(k=e.onMouseDown)==null||k.apply(this,N)},g.__mouseup=function(...N){var k;(k=e.onMouseUp)==null||k.apply(this,N)},g.__click=function(...N){var k;(k=e.onClick)==null||k.apply(this,N)},g.__dblclick=function(...N){var k;(k=e.onDblClick)==null||k.apply(this,N)};var T=C(g);let I;Xe(T,N=>s(N),()=>s()),S(g),D((N,k)=>{w=se(g,1,"video-wrapper s-c",null,w,N),I=se(T,1,"video-container s-c",null,I,k),Qe(T,`transform: rotate(${r()}deg) scale(${n(y)})`),Ve(T,"data-is-playing",d())},[()=>({hidden:l()!=="video",nocursor:e.hideCursor}),()=>({"fast-rotate":!$})]),b(t,g),F(),o()}Je(["contextmenu","mousedown","mouseup","click","dblclick"]);var CT=M('<div><span class="text s-10"> </span> <!></div>'),IT={hash:"s-10",code:".root.s-10{background-color:var(--double-forward-bg);border-radius:100px;color:var(--white);display:flex;gap:4px;left:50%;opacity:0;padding:6px 12px;pointer-events:none;position:absolute;top:24px;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);visibility:hidden}.root.s-10,.root.visible.s-10{transform:translateX(-50%)}.root.visible.s-10{opacity:1;visibility:visible}.text.s-10{font-size:13px;font-weight:600;line-height:16px}"};function Zv(t,e){B(e,!0),q(t,IT);let{ui:{t:i}}=ve();var o=CT();let r;var a=C(o),l=C(a,!0);S(a);var d=L(a,2);Lc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=se(o,1,"root s-10",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var ET=M('<div class="container s-12" role="button" data-testid="preview-track-overlay"><div class="icon s-12"><!></div></div>'),kT={hash:"s-12",code:".container.s-12{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-12,.icon.s-12{align-items:center;display:flex;justify-content:center}.icon.s-12{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-12:hover .icon:where(.s-12){transform:scale(1.15)}"};function Jv(t,e){B(e,!1),q(t,kT);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};Co();var l=ET();l.__click=a;var d=C(l),s=C(d);return An(s,{get size(){return"32"}}),S(d),S(l),es(3,l,()=>hs,()=>({duration:r})),b(t,l),Of(e,"handleClick",a),F({handleClick:a})}Je(["click"]);var PT=M('<div class="container s-13"><div class="notification s-13"><span class="text s-13"> </span></div></div>'),AT={hash:"s-13",code:".container.s-13{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-13{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-13{font-size:14px;font-weight:500;line-height:18px}"};function eg(t,e){B(e,!1),q(t,AT);let{ui:{t:i}}=ve();Co();var o=PT(),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,()=>hs,()=>({duration:340})),b(t,o),F()}var LT=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},MT=M("<div><!></div>"),VT=M('<div class="spherical-video-icon s-8"><!></div>'),RT=M("<div><!></div>"),NT=M('<div class="settings-menu s-8"><!></div>'),OT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),DT=M("<!> <!> <!>",1),BT=M('<div class="blocked s-8"></div>'),FT=M('<div class="player-wrapper s-8"><!> <div class="overlay-container"></div></div> <!>',1),HT={hash:"s-8",code:".blocked.s-8,.player-wrapper.s-8{height:100%;position:absolute;width:100%}.blocked.s-8{z-index:var(--overlay-container-z-index)}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-8{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-8{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-menu.s-8{bottom:57px;left:0;position:absolute;right:18px;transition:opacity .2s;z-index:var(--settings-menu-z-index)}"};function ig(t,e){B(e,!0),q(t,HT);let[i,o]=Re(),r=()=>x(ui,"$notificationsToShow$",i),a=()=>x(pi,"$playerPhase",i),l=()=>x(xo,"$isLoaderVisible",i),d=()=>x($i,"$adPlaybackState",i),s=()=>x(di,"$crashed",i),u=()=>x(zi,"$isInteractiveTime$",i),v=()=>x(xi,"$settingsMenuVisible",i),p=()=>x(Zi,"$isInteractiveExpectation$",i),f=()=>x(Jt,"$controlsVisible",i),$=()=>x(wo,"$touched",i),y=()=>x(Hr,"$graphIsOpened$",i),g=()=>x(hi,"$isFullscreen",i),w=()=>x(_s,"$autoplayNextEnabled$",i),T=()=>x(Wt,"$postrollPassed",i),I=()=>x(Eo,"$isEnded$",i),N=()=>x(Hn,"$cursorInside",i),k=()=>x(tr,"$isControlsAvailable",i),E=()=>x(_n,"$doubleForwardOn$",i),A=()=>x(yr,"$fakeIsPlaying$",i),Q=()=>x(Sr,"$bottomNoSmooth",i),H=()=>x(ln,"$interactiveTimeIndicator",i),z=()=>x(Hi,"$playerSize",i),Y=()=>x(Ui,"$is3DVideo",i),le=()=>x(Rn,"$doubleForwardAvailable$",i),X=()=>x(qe,"$contextMenuVisible$",i),re=()=>x(si,"$playbackState$",i),Z=()=>x(co,"$hotKeyMapData",i),we=()=>x(oi,"$scrubbingInProgress",i),ue=()=>x(kt,"$volumeChangingInProgress",i),ne=()=>x(hn,"$chromecastConnected$",i),_e=()=>x(bn,"$controlsTimeoutActive",i),xe=()=>x(Xi,"$settingsMenuOpenedByKeyboard",i),J=()=>x(ei,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Yo,"$contextMenuOpenedByHotKey$",i),pe=()=>x(Li,"$contextMenuButtonRef$",i),P=()=>x(qr,"$contextMenuLastActiveElem$",i),Ke=()=>x(bt,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(zt,"$language$",i),j=()=>x(jo,"$previewTrackActive$",i),ie=()=>x(sn,"$icon3DVideoVisible",i),De=()=>x(It,"$chromecastDeviceName$",i),Be=()=>x(Xt,"$currentSubtitle$",i),ot=()=>x(st,"$currentSubtitleCaptions$",i),U=()=>x(ji,"$position$",i),Ae=()=>x(Dt,"$duration$",i),ke=()=>x(K,"$isLive$",i),ze=()=>x(Mt,"$isPlaying$",i),et=()=>x(er,"$contextMenuPosition$",i),ye=()=>x(zo,"$previewTrackNotificationVisible$",i),Pe=()=>x(Pi,"$showHotKeyMap",i),Fe=()=>x(wi,"$debugPanelVisible",i),Ft=()=>x(ss,"$userActionsDisabled$",i),vt=h(e,"videoContainer",15),Ht=h(e,"adsSlotId",3,void 0),dt=h(e,"adsParams",3,void 0),Ct=h(e,"adsAutoplayParam",3,void 0),ri=h(e,"duration",3,void 0),Ot=h(e,"logoTargetUrl",3,""),$e=h(e,"showNextPrevButtons",3,!1),be=h(e,"nextButtonActive",3,!1),ee=h(e,"prevButtonActive",3,!1),nt=h(e,"endScreenVideoTitle",3,void 0),fe=h(e,"endScreenVideoThumb",3,void 0),Me=h(e,"isOneVideoPlaylist",3,!1),wt=h(e,"shadowRootContainer",3,void 0),Lt=h(e,"outerContainerRef",3,void 0),mt=h(e,"playerStarted",3,!1),ce=h(e,"fullScreenTarget",3,void 0),We=h(e,"showMiniTimer",3,!1),Ye=h(e,"showEndScreen",3,!0),ct=h(e,"keyboardControls",15),Ut=e.store.getLogger().createComponentLog("Root component"),zt=e.store.interfaceLanguage$,si=e.store.state.playbackState$,$i=e.store.ads.playbackState,ji=e.store.state.positionWithScrubbing$,Dt=e.store.state.duration$,pi=e.store.playerPhase,hi=e.store.ui.isFullscreen,bt=e.store.ui.isFullscreenOpenedByKeyboard,Jt=e.store.ui.controlsVisible,xi=e.store.ui.settingsMenu.visible$,Xi=e.store.ui.settingsMenu.openedByBtnKeyboard$,oi=e.store.ui.scrubbingInProgress,kt=e.store.ui.volumeChangingInProgress,qe=e.store.ui.contextMenu.visible$,wi=e.store.ui.debugPanelVisible,xo=e.store.state.isLoaderVisible,Eo=e.store.state.isEnded$,hn=e.store.state.chromecastConnected$,It=e.store.state.chromecastDeviceName$,Wt=e.store.ads.postrollPassed,K=e.store.state.isLive$,Mt=e.store.state.isPlaying$,di=e.store.state.crashed$,ut=e.store.webApi.annotationsApi,Tt=e.store.webApi.pictureInPictureApi,Xt=e.store.state.currentSubtitle$,st=e.store.state.currentSubtitleCaptions$,Hi=e.store.ui.playerSize,Ui=e.store.ui.is3DVideo,sn=e.store.ui.icon3DVideoVisible,ko=e.store.state.isInteractive,zi=e.store.state.isInteractiveTime$,Zi=e.store.state.isInteractiveExpectation$,Br=e.store.state.hasInteractiveBranches,wo=e.store.ui.touched,co=e.store.ui.modals.hotKeyMap.data,Pi=e.store.ui.modals.hotKeyMap.show,an=e.store.ui.overlayContainer$,ln=e.store.ui.controls.interactiveTimeIndicator,Vn=e.store.state.showInteractiveTimeIndicator,er=e.store.ui.contextMenu.position$,Fr=e.store.actions.internal.setQuality,rs=e.store.actions.internal.closeSettingsMenu,_s=e.store.ui.autoplayNextEnabled$,ss=e.store.ui.userActionsDisabled,tr=e.store.ui.isControlsAvailable,$r=e.store.ui.videoTitleInfo,_n=e.store.ui.doubleForwardOn$,Rn=e.store.ui.doubleForwardAvailable$,zo=e.store.ui.previewTrackNotificationVisible,Nn=e.store.actions.internal.getVideoElement,ir=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:yr,notifications$:xr,graphIsOpened$:Hr}=Io(),uo=W(void 0),Ur=W(void 0),On=W(void 0),Dn=W(void 0),po,zr,Bn;co.set(ob());let{closeNotification:gt,notificationsToShow$:ui}=xr,wr=m(()=>!!r().slow_video),or=()=>gt("slow_video"),nr=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),dn=W(void 0),Sr=ae(!1),cn,bn=ae(!1),Fn=ae(),Hn=ae(!1),Wo=W(!1),Po=W(!1),rr=W(!1),Ao=W(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Wi=m(()=>u()&&!v()&&!(n(Wo)||n(Po))&&!(n(rr)&&!p())),Un=!0,sr=m(()=>e.uiConfig.features.thumbTimer&&We()&&a()==="video"&&!f()&&!s()&&!ko&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),ar=e.uiConfig.titleShowBehaviour,lr=m(()=>!["video","thumb"].includes(a())||ar==="never"||y()?!1:ar==="fullscreen"?g():!0),Ko=m(()=>ar==="always"||a()==="thumb"?!1:!f()),Tr=W(!1),St=m(()=>(Ye()||e.showAutoplayNext&&w())&&!!nt()&&!!fe()&&(e.showAds&&T()||!e.showAds)&&I()&&!s()&&!n(Tr)),Pt=m(()=>N()&&!(f()||n(St))&&!u()&&k()&&!E()),fo=W(!1),Lo=m(()=>A()!==null),{toggle:So}=yr,To=!1,Ri=null;Tt==null||Tt.setContext(Cd());let zn=()=>{e.autoplay&&!ko&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ai(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:zn});let Ji=()=>{window.clearTimeout(po),bn.set(!1)},Wr=()=>{window.clearTimeout(zr),Fn.set(null)},Ai=he=>{Ji(),bn.set(!0),po=window.setTimeout(()=>bn.set(!1),he);let $t=he-100;cn=window.setTimeout(()=>{Q()&&Sr.set(!1)},$t>0?$t:he)},bs=(he,$t)=>{Wr(),Fn.set($t),zr=window.setTimeout(()=>Fn.set(null),he)},as=Ui.subscribe(he=>{sn.set(he),he&&(window.clearTimeout(Bn),Bn=window.setTimeout(()=>sn.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Cr=()=>ht(null,null,function*(){var $t,Kt,ti,Ti;let he=la();if(he){let Ei=tc(),Mi=$n();he=Ei===Mi||Ei===wt()}if(he){Ai(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Tt==null?void 0:Tt.exit()}catch(Ei){Ut({message:String(Ei)})}}hi.set(he),e.store.getAdmanWrapper().setFullscreen(he),g()?(Kt=($t=e.store.callbacks)==null?void 0:$t.onFullscreenEnter)==null||Kt.call($t):(Ti=(ti=e.store.callbacks)==null?void 0:ti.onFullscreenExit)==null||Ti.call(ti)}),qo=he=>{let{width:$t,height:Kt}=he.target;Hi.set({width:$t,height:Kt})},Kr=()=>{let{width:he,height:$t}=n(uo).getBoundingClientRect();Hi.set({width:he,height:$t})};Rt(()=>{var $t;return Zu(Cr),e.uiConfig.features.annotationsInside&&(ut==null||ut.init(n(uo))),Ka(Tt)&&(Tt==null||Tt.assignPlayerContainer(n(uo)),Tt==null||Tt.setExternalEventHandlers({resize:qo,leavepictureinpicture:Kr})),e.interactiveContainer&&(($t=vt().parentElement)==null||$t.insertBefore(e.interactiveContainer,vt().nextSibling)),()=>{window.clearTimeout(po),window.clearTimeout(cn),window.clearTimeout(zr),window.clearTimeout(Bn),as(),Tt==null||Tt.dispose().catch(Kt=>{Ut({message:String(Kt)})}),Ju(Cr)}});let $n=()=>{let he=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!Lt()?n(uo):Lt(),$t=he.getRootNode(),Kt=$t instanceof ShadowRoot?$t.host:$t,ti=ce()instanceof HTMLElement&&ce().contains(Kt);return e.uiConfig.allowChangingFullscreenTarget&&ce()&&ti?ce():he},yn=()=>{qe.set(!1)},Mo=()=>{rs(),yn()},Ir=()=>ht(null,null,function*(){if(!ir()){Ut({message:"fullscreen disabled"});return}yn(),la()?(yield Xu(document),Ut({message:"exit fullscreen"})):(Ut({message:"request fullscreen"}),yield ju($n()))}),Ue=he=>{y()||(he.preventDefault(),qe.set(!0),er.set({left:he.clientX,top:he.clientY}))};function Vt(){Hn.set(!0),ko||Ai(e.uiConfig.controls.hideTimeoutCursor)}function Si(he){var Ti,Ei;let{relatedTarget:$t}=he,ti=!!($t&&((Ti=n(On))!=null&&Ti.contains($t)))&&((Ei=ct())==null?void 0:Ei.isFocused());!ko&&!ti&&(Sr.set(!0),Ai(e.uiConfig.controls.hideTimeoutCursor))}function Qo(){Hn.set(!1),O(Po,!1),O(Wo,!1),To=!1,e.store.actions.internal.releaseCamera(),Ai(e.uiConfig.controls.hideTimeout),E()&&to()}function mo(he){return he?he.offsetTop+mo(he.offsetParent):0}function Vo(he){return he?he.offsetLeft+Vo(he.offsetParent):0}function vo(he){if(H()&&Vn){let $t=he.currentTarget,Kt=mo($t),ti=Vo($t),Ti=he.pageX-ti,Ei=he.pageY-Kt,{left:Mi,bottom:Ci,right:Ks}=H(),qs=Ks-Mi;return Ti>=Mi-qs&&Ei<=Ci+qs}}function Go(he){if(n(uo)){let $t=mo(he.currentTarget),Kt=z().height,ti=he.pageY-$t;if(vo(he)){O(Po,!1);return}ti<40?O(Po,!0):ti>Kt-40?O(Wo,!0):(O(Po,!1),v()||O(Wo,!1))}}function Wn(he){Go(he),!n(Wi)&&!E()&&Ai(e.uiConfig.controls.hideTimeoutCursor),Y()&&To&&Ri&&e.store.actions.internal.moveCameraFocusPX(Ri.clientX-he.clientX,Ri.clientY-he.clientY,he.timeStamp-Ri.timeStamp),Ri=he}let un=null,eo=()=>{un=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Ji()},e.uiConfig.doubleForwardActivationTime)},to=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),un&&clearTimeout(un),un=null},Kn=he=>{he.preventDefault(),he.button===0&&(To=!0,e.store.actions.internal.holdCamera(),le()&&eo()),!To&&Ai(e.uiConfig.controls.hideTimeoutCursor)},dr=he=>{he.preventDefault(),he.button===0&&(Ri=he,To=!1,e.store.actions.internal.releaseCamera()),!E()&&Ai(e.uiConfig.controls.hideTimeoutCursor)},cr=he=>{he.preventDefault(),Un&&(Ut({message:"double click on video"}),Ir(),Ai(e.uiConfig.controls.hideTimeoutCursor))},qn=he=>{var $t;if(he.preventDefault(),E()){to();return}if(un&&to(),X()||v()){Mo();return}if(!(I()&&!Br)){if(n(Lo))return So();if(($t=ct())==null||$t.focus(),!mt()){e.firstStart(),Ai(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||re()!==tg.PlaybackState.PLAYING)&&e.store.actions.internal.togglePlay(),Ai(e.uiConfig.controls.hideTimeoutCursor)}},$s=he=>{Mo(),wo.set(!0),Ai(e.uiConfig.controls.hideTimeout),he&&bs(e.uiConfig.controls.hideHotKeyHelpers,he)},ys=()=>{var he,$t;Mo(),(he=e.store.callbacks)!=null&&he.onOpenHotKeyMap?($t=e.store.callbacks)==null||$t.onOpenHotKeyMap(Z()):Pi.update(Kt=>!Kt)},je=()=>{wo.set(!0)},ei=e.store.ui.contextMenu.openedByBtnKeyboard$,Li=e.store.ui.contextMenu.btnRef$,go=W(void 0),Yo=e.store.ui.contextMenu.openedByHotKey$,qr=e.store.ui.contextMenu.lastActiveElem$,Ro=W(!1),jo=e.store.ui.previewTrackActive;Oe(()=>{an.set(n(dn))}),Oe(()=>{O(rr,n(Ao)&&re()!==tg.PlaybackState.PLAYING,!0),n(Ao)||Et(()=>O(Ao,!0))}),Oe(()=>{var $t,Kt;let he=(n(rr)||I()||v()||we()||ue()||ne()||_e()||n(Ro))&&!n(Wi)&&(a()==="video"||a()==="ads")&&!s()&&k();Jt.set(he),!he&&!_e()&&e.uiConfig.returnFocusOnControlsHide&&(($t=n(On))!=null&&$t.contains(rp()))&&((Kt=ct())==null||Kt.focus())}),Oe(()=>{!we()&&n(fo)&&!u()&&Ai(e.uiConfig.controls.hideTimeoutCursor),Et(()=>O(fo,we(),!0))}),Oe(()=>{n(Dn),v(),xe(),Et(()=>lc(n(Dn),v(),xe()))}),Oe(()=>{n(go),X(),J(),Ne(),Et(()=>{let he=J()||Ne();lc(n(go),X(),he)})}),Oe(()=>{let he=pe();he&&(X(),Et(()=>Gl(he,X(),ei)))}),Oe(()=>{let he=P();he&&(X(),Et(()=>lb(he,X(),Yo)))}),Oe(()=>{var he;!Ke()&&g()&&(Et(()=>bt.set(!1)),(he=ct())==null||he.focus())}),Oe(()=>{y()&&Mo()});let xs=W(void 0),zs=he=>{$r.set(Zn(Nn(),{title:n(xs)},"title",he))},_a=(he,$t)=>{var Ei,Mi;let Kt=(Mi=(Ei=e.store.callbacks)==null?void 0:Ei.uiInfo)==null?void 0:Mi.onUpcomingLiveViewStateChanged;if(!Kt)return;let ti=!!$t,Ti=Ie(Ie({},Zn(n(uo),{upcomingLiveScreen:$t},"upcomingLiveScreen",ti)),he);Kt(Ti)};var Ws=FT();lt("blur",Aa,Mo);var xn=de(Ws);xn.__mousemove=Wn;var at=C(xn);let ni=m(()=>a()==="ads"),ho=m(()=>n(Lo)?So:void 0);Xe(ym(at,{startDoubleForwardActivationTimer:eo,stopDoubleForward:to,toggleFullscreen:Ir,hideContextMenu:Mo,showHotKeyHelpers:$s,showKeyMap:ys,get isAds(){return n(ni)},get fakePlayButtonHandler(){return n(ho)},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},children:(he,$t)=>{var Kt=DT(),ti=de(Kt);ul(ti,{get hideCursor(){return n(Pt)},onClick:qn,onContextMenu:Ue,onMouseDown:Kn,onMouseUp:dr,onDblClick:cr,get videoContainer(){return vt()},set videoContainer(Mi){vt(Mi)}});var Ti=L(ti,2);Oa(Ti,()=>"slot",!1,(Mi,Ci)=>{ro(Mi,()=>({name:cl}))});var Ei=L(Ti,2);Ps(Ei,Te,Mi=>{var Ci=OT(),Ks=de(Ci);let qs=m(()=>a()!=="thumb"||s()||ko&&e.autoplay);al(Ks,{get hidden(){return n(qs)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ue,onClick:yn});var Qs=L(Ks,2);{var gd=He=>{Jv(He,{})};R(Qs,He=>{j()&&He(gd)})}var ba=L(Qs,2);Xv(ba,{});var kr=L(ba,2);Zv(kr,{get isVisible(){return E()}});var Gs=L(kr,2);{var $a=He=>{let bi=m(()=>{var Xo;return(Xo=e.live)==null?void 0:Xo.startTime});Rc(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(bi)},onUpcomingLiveViewStateChanged:_a,onContextMenu:Ue,onClick:yn})};R(Gs,He=>{a()==="LiveWaitingStart"&&He($a)})}var Pr=L(Gs,2);{var ws=He=>{ll(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:yn})};R(Pr,He=>{a()==="LiveWaitingRecover"&&He(ws)})}var Ss=L(Pr,2);{var Ar=He=>{ll(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:yn})};R(Ss,He=>{a()==="LiveWaitingRecord"&&He(Ar)})}var ya=L(Ss,2);{var hd=He=>{var bi=MT();let Xo;var Lr=C(bi);oc(Lr,{get adsSlotId(){return Ht()},get adsParams(){return dt()},get adsAutoplayParam(){return Ct()},get duration(){return ri()},get adsExternalApi(){return e.adsExternalApi}}),S(bi),D(Oo=>Xo=se(bi,1,"ads-container s-8",null,Xo,Oo),[()=>({hidden:a()!=="ads"})]),b(He,bi)};R(ya,He=>{e.showAds&&mt()&&He(hd)})}var ml=L(ya,2);{var _d=He=>{let bi=m(()=>!Ye()&&e.showAutoplayNext&&w());_m(He,{get title(){return nt()},get thumb(){return fe()},get isHide(){return n(bi)},clickCloseIcon:()=>O(Tr,!0)})};R(ml,He=>{n(St)&&nt()&&fe()&&He(_d)})}var xa=L(ml,2);{var bd=He=>{let bi=m(()=>g()?"md":"sm"),Xo=m(()=>{var Lr;return(Lr=e.store.callbacks)==null?void 0:Lr.onTitleClicked});Sv(He,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(Ko)},onVisibilityChanged:zs,onMouseEnter:()=>{O(Ro,!0)},onMouseLeave:()=>{O(Ro,!1)},get size(){return n(bi)},get onTitleClicked(){return n(Xo)},get ref(){return n(xs)},set ref(Lr){O(xs,Lr,!0)}})};R(xa,He=>{n(lr)&&He(bd)})}var vl=L(xa,2);{var gl=He=>{let bi=m(()=>a()==="video"&&f());Mc(He,{get isShifted(){return n(bi)}})};R(vl,He=>{Y()&&He(gl)})}var ur=L(vl,2);{var pt=He=>{var bi=VT(),Xo=C(bi);ec(Xo,{}),S(bi),b(He,bi)};R(ur,He=>{ie()&&He(pt)})}var ft=L(ur,2);{var io=He=>{Vc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()}})};R(ft,He=>{ne()&&He(io)})}var No=L(ft,2);{var oo=He=>{rl(He,{get shifted(){return f()},get captions(){return ot()},get position(){return U()},get playerSize(){return z()}})};R(No,He=>{Be().value!=="off"&&He(oo)})}var _i=L(No,2);{var Ki=He=>{var bi=RT();bi.__contextmenu=Ue,bi.__click=[LT,X,qe,v,xi,Mo];var Xo=C(bi);sl(Xo,{}),S(bi),b(He,bi)};R(_i,He=>{s()&&He(Ki)})}var Ys=L(_i,2);{var $d=He=>{let bi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Xo=m(()=>a()==="ads"),Lr=m(()=>e.canRewindLive&&Ae()!==0);Ac(He,{get bottomHidden(){return n(bi)},get bottomNoSmooth(){return Q()},get showControls(){return f()},get isAds(){return n(Xo)},get canRewindLive(){return n(Lr)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return Ot()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return $e()},get nextButtonActive(){return be()},get prevButtonActive(){return ee()},get isOneVideoPlaylist(){return Me()},customFullscreenSupported:Un,toggleFullscreen:Ir,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Ur)},set playerControlsWrapperRef(Oo){O(Ur,Oo,!0)},get playerControlsRef(){return n(On)},set playerControlsRef(Oo){O(On,Oo,!0)}})};R(Ys,He=>{mt()&&He($d)})}var Jc=L(Ys,2);{var Up=He=>{var bi=NT(),Xo=C(bi);let Lr=m(()=>{var Oo;return(Oo=n(On))==null?void 0:Oo.clientHeight});Bc(Xo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Lr)},returnFocus:()=>{var Oo;return(Oo=ct())==null?void 0:Oo.focus()},get ref(){return n(Dn)},set ref(Oo){O(Dn,Oo,!0)}}),S(bi),b(He,bi)};R(Jc,He=>{!ne()&&a()!=="ads"&&He(Up)})}var eu=L(Jc,2);let zp=m(()=>!n(sr));sc(eu,{get isLive(){return ke()},get isHidden(){return n(zp)},get isPlaying(){return ze()},get position(){return U()},get duration(){return Ae()}});var tu=L(eu,2);xv(tu,{get data(){return Fn}});var iu=L(tu,2);gm(iu,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=ct())==null?void 0:He.focus()},get visible(){return X()},get playerContainerRef(){return n(uo)},get position(){return et()},get menuElementRef(){return n(go)},set menuElementRef(He){O(go,He,!0)}});var wa=L(iu,2);{var Wp=He=>{Fc(He,{onClose:or,onSelectAutoQuality:()=>{Fr("auto"),or()}})};R(wa,He=>{n(wr)&&He(Wp)})}var js=L(wa,2);{var hl=He=>{eg(He,{})};R(js,He=>{ye()&&He(hl)})}var ou=L(js,2);{var nu=He=>{Ya(He,{})};R(ou,He=>{n(nr)&&He(nu)})}var _l=L(ou,2);{var ru=He=>{Sm(He,{})};R(_l,He=>{Pe()&&He(ru)})}var Kp=L(_l,2);{var su=He=>{cc(He,{})};R(Kp,He=>{Fe()&&He(su)})}b(Mi,Ci)}),b(he,Kt)},$$slots:{default:!0}}),he=>ct(he),()=>ct());var Er=L(at,2);Xe(Er,he=>O(dn,he),()=>n(dn)),S(xn),Xe(xn,he=>O(uo,he),()=>n(uo));var Qr=L(xn,2);{var wn=he=>{var $t=BT();b(he,$t)};R(Qr,he=>{Ft()&&he(wn)})}lt("mouseenter",xn,Vt),lt("mouseleave",xn,Qo),lt("click",xn,je,!0),lt("focusin",xn,Si,!0),b(t,Ws),F(),o()}Je(["mousemove","contextmenu","click"]);var ha=require("@vkontakte/videoplayer-core/es2015"),v$=require("@vkontakte/videoplayer-shared/es2015");var UT=M('<div></div> <div class="info s-17"><div class="triangles-wrapper s-17"><div></div> <div></div> <div></div></div> <p class="step-caption s-17"> </p></div>',1),zT=M("<div><!></div>"),WT={hash:"s-17",code:".double-click-area.s-17{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-17{left:0}.double-click-area.right.s-17{right:0}.semicircle.s-17{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-17{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-17{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-17{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-17,.triangles-wrapper.s-17{display:flex;justify-content:center}.triangles-wrapper.s-17{margin-bottom:10px;position:relative}.triangle.s-17{animation:s-17-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-17:nth-child(3),.triangle.right.s-17:first-child{animation-delay:0s}.triangle.left.s-17:nth-child(2),.triangle.right.s-17:nth-child(2){animation-delay:.1s}.triangle.left.s-17:first-child,.triangle.right.s-17:nth-child(3){animation-delay:.2s}@keyframes s-17-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-17{border-right:8px solid var(--white)}.triangle.right.s-17{border-left:8px solid var(--white)}.triangle.s-17:not(:last-child){margin-right:5px}.step-caption.s-17{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function Tp(t,e){B(e,!0),q(t,WT);let i=h(e,"seekStep",3,0),o=W(!1),r=0,a=0,l=W(ci(i())),d=p=>{p.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};mn(()=>{window.clearTimeout(r)});var s=zT();s.__click=d;var u=C(s);{var v=p=>{var f=UT(),$=de(f),y=L($,2),g=C(y),w=C(g),T=L(w,2),I=L(T,2);S(g);var N=L(g,2),k=C(N,!0);S(N),S(y),D(E=>{var A,Q,H,z;se($,1,`semicircle ${(A=e.side)!=null?A:""}`,"s-17"),se(w,1,`triangle ${(Q=e.side)!=null?Q:""}`,"s-17"),se(T,1,`triangle ${(H=e.side)!=null?H:""}`,"s-17"),se(I,1,`triangle ${(z=e.side)!=null?z:""}`,"s-17"),me(k,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,f)};R(u,p=>{n(o)&&p(v)})}S(s),D(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-17")}),b(t,s),F()}Je(["click"]);var KT=(t,e,i)=>{e(!1),i()},qT=M('<div class="overlay s-16"></div> <div class="next-video s-16"><div class="top s-16"><div class="caption s-16"> </div> <!></div> <div class="row s-16"><div class="column s-16"><div class="thumb s-16"><div></div> <!></div></div> <div class="column s-16"><div class="title s-16"> </div></div></div></div>',1),QT={hash:"s-16",code:".overlay.s-16{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-16{display:flex;flex-direction:column;left:50%;margin:0 auto;max-width:362px;min-width:320px;padding-bottom:12px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:var(--end-screen-mobile-z-index)}.top.s-16{display:flex;justify-content:space-between}.caption.s-16{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-16{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-16{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-16{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-16,.thumb-overlay.s-16{height:100%;width:100%}.thumb-overlay.s-16{position:absolute}.thumb-overlay.withOpacity.s-16{background:var(--black);opacity:.3}.title.s-16{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function og(t,e){B(e,!0),q(t,QT);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,v=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,f=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),f()},g=()=>{e.clickCloseIcon(),$()};Rt(()=>{e.isHide||v(),e.isHide&&r()&&(u(!1),f())});var w=Le(),T=de(w);{var I=N=>{var k=qT(),E=L(de(k),2),A=C(E),Q=C(A),H=C(Q,!0);S(Q);var z=L(Q,2);Rs(z,{onClick:g}),S(A);var Y=L(A,2);Y.__click=[KT,u,p];var le=C(Y),X=C(le),re=C(X);let Z;var we=L(re,2);{var ue=J=>{uc(J,{get isRunning(){return a()},onTimerEnded:y})};R(we,J=>{r()&&J(ue)})}S(X),S(le);var ne=L(le,2),_e=C(ne),xe=C(_e,!0);S(_e),S(ne),S(Y),S(E),D((J,Ne)=>{me(H,J),Qe(X,`background-image: url('${e.thumb}')`),Z=se(re,1,"thumb-overlay s-16",null,Z,Ne),me(xe,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,k)};R(T,N=>{e.isHide||N(I)})}b(t,w),F(),o()}Je(["click"]);var c$=require("@vkontakte/videoplayer-core/es2015");var u$=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Rt(()=>{c$.clientChecker.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))}),mn(()=>{i==null||i(),clearTimeout(o)})};var p$=require("@vkontakte/videoplayer-core/es2015");var Cp=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};var f$=require("@vkontakte/videoplayer-core/es2015"),m$=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:r,availableSubtitlesList$:a,currentFormat$:l,availableTextTracks$:d}=t.state,s=null,u=()=>e().querySelector("video"),v=()=>f$.clientChecker.device.isIOS&&ge(l)===p$.VideoFormat.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},f=$=>{if(p(),!v()||!$)return;let y=u();if(!y)return;let g=new Cp(y),w=ge(d),T=ge(a),I=ge(r);for(let E of w)T.some(Q=>Q.value===E.id)&&g.attach(E,I.value===E.id);let N=d.subscribe(E=>{for(let A of E)g.updateSrc(A)}),k=()=>{let E=g.getCurrentShowingId();o(ge(a).find(A=>A.value===E))};y.textTracks.addEventListener("change",k),s=()=>{N(),g.detachAll(),y.textTracks.removeEventListener("change",k)}};Rt(()=>i.subscribe(f)),mn(p)};var GT=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},YT=M("<!> <!>",1),jT=M("<div><!></div>"),XT=M('<div class="spherical-video-icon s-9"><!></div>'),ZT=M("<div><!></div>"),JT=M('<div class="settings-mobile s-9"><!></div>'),eC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),tC=M('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),iC={hash:"s-9",code:".player-wrapper.s-9{height:100%;position:absolute;width:100%}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-9{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function ng(t,e){var Ko,Tr;B(e,!0),q(t,iC);let[i,o]=Re(),r=()=>x(wt,"$playerPhase",i),a=()=>x($i,"$isLoaderVisible",i),l=()=>x(nt,"$adPlaybackState",i),d=()=>x(oi,"$crashed",i),s=()=>x(_s,"$notificationsToShow$",i),u=()=>x(ee,"$playbackState$",i),v=()=>x(Ot,"$graphIsOpened$",i),p=()=>x(We,"$interactiveHideMobileControls",i),f=()=>x(ji,"$isEnded$",i),$=()=>x(ut,"$isInteractiveExpectation$",i),y=()=>x(mt,"$controlsVisible",i),g=()=>x(st,"$touched",i),w=()=>x(Ui,"$autoplayNextEnabled$",i),T=()=>x(hi,"$postrollPassed",i),I=()=>x($r,"$bottomNoSmooth",i),N=()=>x(wi,"$videoSize",i),k=()=>x(It,"$playerSize",i),E=()=>x(Lt,"$isFullscreen",i),A=()=>x(fe,"$position$",i),Q=()=>x(Me,"$duration$",i),H=()=>x(sn,"$loadedMetadata",i),z=()=>x(Ye,"$settingsMenuVisible",i),Y=()=>x(Ut,"$scrubbingInProgress",i),le=()=>x(zt,"$volumeChangingInProgress",i),X=()=>x(Dt,"$chromecastConnected$",i),re=()=>x(ce,"$isControlsAvailable",i),Z=()=>x(di,"$isInteractiveTime$",i),we=()=>x(xi,"$isActiveLive",i),ue=()=>x(ct,"$settingsMenuOpenedByKeyboard",i),ne=()=>x(be,"$language$",i),_e=()=>x(Xt,"$disabledControls$",i),xe=()=>x(Wt,"$is3DVideo",i),J=()=>x(K,"$icon3DVideoVisible",i),Ne=()=>x(pi,"$chromecastDeviceName$",i),pe=()=>x(xo,"$currentSubtitle$",i),P=()=>x(Eo,"$currentSubtitleCaptions$",i),Ke=()=>x(hn,"$realDuration$",i),Te=()=>x(bt,"$isLive$",i),j=()=>x(Jt,"$isPlaying$",i),ie=()=>x(si,"$debugPanelVisible",i),De=h(e,"videoContainer",15),Be=h(e,"adsSlotId",3,void 0),ot=h(e,"adsParams",3,void 0),U=h(e,"adsAutoplayParam",3,void 0),Ae=h(e,"duration",3,void 0),ke=h(e,"logoTargetUrl",3,""),ze=h(e,"showNextPrevButtons",3,!1),et=h(e,"nextButtonActive",3,!1),ye=h(e,"prevButtonActive",3,!1),Pe=h(e,"endScreenVideoTitle",3,void 0),Fe=h(e,"endScreenVideoThumb",3,void 0),Ft=h(e,"isOneVideoPlaylist",3,!1),vt=h(e,"showMiniTimer",3,!1),Ht=h(e,"fullScreenTarget",3,void 0),dt=h(e,"playerStarted",3,!1),Ct=h(e,"showEndScreen",3,!0),{notifications$:ri,graphIsOpened$:Ot}=Io(),$e=e.store.getLogger().createComponentLog("Root component"),be=e.store.interfaceLanguage$,ee=e.store.state.playbackState$,nt=e.store.ads.playbackState,fe=e.store.state.positionWithScrubbing$,Me=e.store.state.duration$,wt=e.store.playerPhase,Lt=e.store.ui.isFullscreen,mt=e.store.ui.controlsVisible,ce=e.store.ui.isControlsAvailable,We=e.store.ui.interactiveHideMobileControls,Ye=e.store.ui.settingsMenu.visible$,ct=e.store.ui.settingsMenu.openedByBtnKeyboard$,Ut=e.store.ui.scrubbingInProgress,zt=e.store.ui.volumeChangingInProgress,si=e.store.ui.debugPanelVisible,$i=e.store.state.isLoaderVisible,ji=e.store.state.isEnded$,Dt=e.store.state.chromecastConnected$,pi=e.store.state.chromecastDeviceName$,hi=e.store.ads.postrollPassed,bt=e.store.state.isLive$,Jt=e.store.state.isPlaying$,xi=e.store.state.isActiveLive$,Xi=e.store.state.isRewindableLive$,oi=e.store.state.crashed$,kt=e.store.webApi.annotationsApi,qe=e.store.webApi.pictureInPictureApi,wi=e.store.state.videoSize$,xo=e.store.state.currentSubtitle$,Eo=e.store.state.currentSubtitleCaptions$,hn=e.store.state.duration$,It=e.store.ui.playerSize,Wt=e.store.ui.is3DVideo,K=e.store.ui.icon3DVideoVisible,Mt=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,ut=e.store.state.isInteractiveExpectation$,Tt=e.store.state.hasInteractiveBranches,Xt=e.store.ui.controls.disabledControls$,st=e.store.ui.touched,Hi=e.store.ui.overlayContainer$,Ui=e.store.ui.autoplayNextEnabled$,sn=e.store.state.loadedMetadata$,ko=e.store.actions.internal.closeSettingsMenu,zi=(Ko=e.store.callbacks)==null?void 0:Ko.onDisabledPlayPrevChapterClick,Zi=(Tr=e.store.callbacks)==null?void 0:Tr.onDisabledSeekToInteractiveClick,Br=e.store.actions.internal.setQuality,wo=W(void 0),co=W(void 0),Pi=W(void 0),an=W(void 0),ln,Vn,er=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),Fr=W(void 0),{closeNotification:rs,notificationsToShow$:_s}=ri,ss=m(()=>!!s().slow_video),tr=()=>rs("slow_video"),$r=ae(!1),_n,Rn=W(!1),zo=m(()=>u()!==ha.PlaybackState.PLAYING),Nn=W(!1),ir=m(()=>v()||p()||!n(Rn)&&(f()&&!!Tt||n(zo)&&$())),yr=W(!0),xr=m(()=>e.uiConfig.features.thumbTimer&&vt()&&r()==="video"&&!y()&&!d()&&!Mt&&(e.uiConfig.hideThumbTimerAfterTouch&&!g()||!e.uiConfig.hideThumbTimerAfterTouch)),Hr=W(!1),uo=m(()=>(Ct()||e.showAutoplayNext&&w())&&!!Pe()&&!!Fe()&&(e.showAds&&T()||!e.showAds)&&f()&&!d()&&!n(Hr)),Ur=W(!1);qe==null||qe.setContext(Cd());let On=St=>{St&&!Mt&&po(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:On});let Dn=()=>{clearTimeout(ln),O(Rn,!1),p()&&We.set(!1)},po=St=>{Dn(),O(Rn,!0),ln=setTimeout(()=>O(Rn,!1),St);let Pt=St-100;_n=setTimeout(()=>{I()&&$r.set(!1)},Pt>0?Pt:St)},zr=Wt.subscribe(St=>{K.set(St),St&&(clearTimeout(Vn),Vn=setTimeout(()=>K.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Bn=(...Pt)=>ht(null,[...Pt],function*(St=la()){var fo,Lo,So,To,Ri,zn;if(St&&!ha.clientChecker.device.isIOS){let Ji=tc(),Wr=dn(),Ai=ha.clientChecker.browser.isSamsungBrowser&&Ji===e.shadowRootContainer;St=Ji===Wr||Ai}if(St){po(e.uiConfig.controls.hideTimeoutFullscreen);try{yield qe==null?void 0:qe.exit()}catch(Ji){$e({message:String(Ji)})}try{let Ji=(fo=N())!=null&&fo.width&&((Lo=N())!=null&&Lo.height)?N():k();yield ib(Ji)}catch(Ji){$e({message:String(Ji)})}}Lt.set(St),e.store.getAdmanWrapper().setFullscreen(St),E()?(To=(So=e.store.callbacks)==null?void 0:So.onFullscreenEnter)==null||To.call(So):(zn=(Ri=e.store.callbacks)==null?void 0:Ri.onFullscreenExit)==null||zn.call(Ri)}),gt=St=>{let Pt=St,{width:fo,height:Lo}=Pt.target;It.set({width:fo,height:Lo})},ui=()=>{let{width:St,height:Pt}=n(wo).getBoundingClientRect();It.set({width:St,height:Pt})};Rt(()=>{var St;return Zu(Bn),e.uiConfig.features.annotationsInside&&(kt==null||kt.init(n(wo))),Ka(qe)&&(qe==null||qe.assignPlayerContainer(n(wo)),qe==null||qe.setExternalEventHandlers({resize:gt,leavepictureinpicture:ui})),O(yr,!ha.clientChecker.device.isIphoneOrOldIpad),e.interactiveContainer&&((St=De().parentElement)==null||St.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(ln),clearTimeout(_n),clearTimeout(Vn),zr(),qe==null||qe.dispose().catch(Pt=>{$e({message:String(Pt)})}),Ju(Bn)}});let wr=W(!0),or=W(!0),nr=St=>{let Pt=A()+(St==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Pt<0?(O(wr,!1),Pt=0):Pt>=Q()&&(O(or,!1),Pt=Q()),O(Nn,!0),e.seekTime(Pt)},dn=()=>ha.clientChecker.device.isIOS?n(wo):!e.uiConfig.allowChangingFullscreenTarget||!Ht()?e.outerContainerRef:Ht().contains(e.outerContainerRef)?Ht():e.outerContainerRef,Sr=()=>ht(null,null,function*(){try{if(la())yield Xu(document),$e({message:"exit fullscreen"});else{if($e({message:"request fullscreen"}),ha.clientChecker.device.isIOS&&!H())return;yield ju(dn())}}catch(St){$e({message:String(St)})}}),cn=()=>{ko()},bn=St=>{if(St.preventDefault(),z()){cn();return}if(!dt()){e.firstStart(),po(e.uiConfig.controls.hideTimeoutCursor);return}O(Nn,!1),y()?Dn():po(e.uiConfig.controls.hideTimeoutMobile)},Fn=()=>{st.set(!0)},Hn=()=>{Mt||($r.set(!0),po(e.uiConfig.controls.hideTimeoutCursor))},Wo=St=>{zi&&(zi(St),po(e.uiConfig.controls.hideTimeoutMobile))},Po=St=>{Zi&&(Zi(St),po(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{Hi.set(n(Fr))}),Oe(()=>{mt.set((n(zo)||z()||Y()||le()||X()||!n(uo)&&(f()||n(Rn)&&!n(Nn)))&&!n(ir)&&r()==="video"&&!d()&&re())}),Oe(()=>{!Y()&&n(Ur)&&!Z()&&po(e.uiConfig.controls.hideTimeoutMobile),O(Ur,Y(),!0)}),Oe(()=>{O(wr,A()>0),O(or,!we()&&A()<Q(),!0)}),Oe(()=>{lc(n(an),z(),ue(),!0)});let rr=G("aria_label_video_player");u$({fullScreenChangeHandler:Bn,getFullscreenTarget:dn}),m$({store:e.store,getFullscreenTarget:dn});let Ao=(St,Pt)=>{var To,Ri;let fo=(Ri=(To=e.store.callbacks)==null?void 0:To.uiInfo)==null?void 0:Ri.onUpcomingLiveViewStateChanged;if(!fo)return;let Lo=!!Pt,So=Ie(Ie({},Zn(n(wo),{upcomingLiveScreen:Pt},"upcomingLiveScreen",Lo)),St);fo(So)};var Wi=tC();lt("blur",Aa,cn);var Un=C(Wi);ul(Un,{onClick:bn,get videoContainer(){return De()},set videoContainer(St){De(St)}});var sr=L(Un,2);Oa(sr,()=>"slot",!1,(St,Pt)=>{ro(St,()=>({name:cl}))});var ar=L(sr,2);Ps(ar,ne,St=>{var Pt=eC(),fo=de(Pt);let Lo=m(()=>r()!=="thumb"||d()||Mt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);al(fo,{get hidden(){return n(Lo)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var So=L(fo,2);{var To=je=>{var ei=YT(),Li=de(ei);{var go=Ro=>{let jo=m(()=>e.uiConfig.controls.seekStepMobile/1e3);Tp(Ro,{side:"left",get seekStep(){return n(jo)},handleSingleFirstClick:bn,handleSecondClick:()=>nr("backward")})};R(Li,Ro=>{n(wr)&&Ro(go)})}var Yo=L(Li,2);{var qr=Ro=>{let jo=m(()=>e.uiConfig.controls.seekStepMobile/1e3);Tp(Ro,{side:"right",get seekStep(){return n(jo)},handleSingleFirstClick:bn,handleSecondClick:()=>nr("forward")})};R(Yo,Ro=>{n(or)&&Ro(qr)})}b(je,ei)};R(So,je=>{e.canRewindLive&&Xi&&!_e().has("TIMELINE")&&je(To)})}var Ri=L(So,2);{var zn=je=>{let ei=m(()=>{var Li;return(Li=e.live)==null?void 0:Li.startTime});Rc(je,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(ei)},onUpcomingLiveViewStateChanged:Ao})};R(Ri,je=>{r()==="LiveWaitingStart"&&je(zn)})}var Ji=L(Ri,2);{var Wr=je=>{ll(je,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Ji,je=>{r()==="LiveWaitingRecover"&&je(Wr)})}var Ai=L(Ji,2);{var bs=je=>{ll(je,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Ai,je=>{r()==="LiveWaitingRecord"&&je(bs)})}var as=L(Ai,2);{var Cr=je=>{var ei=jT();let Li;var go=C(ei);oc(go,{get adsSlotId(){return Be()},get adsParams(){return ot()},get adsAutoplayParam(){return U()},get duration(){return Ae()},get adsExternalApi(){return e.adsExternalApi}}),S(ei),D(Yo=>Li=se(ei,1,"ads-container s-9",null,Li,Yo),[()=>({hidden:r()!=="ads"})]),b(je,ei)};R(as,je=>{e.showAds&&dt()&&je(Cr)})}var qo=L(as,2);{var Kr=je=>{let ei=m(()=>!Ct()&&e.showAutoplayNext&&w());og(je,{get title(){return Pe()},get thumb(){return Fe()},get isHide(){return n(ei)},clickCloseIcon:()=>O(Hr,!0)})};R(qo,je=>{n(uo)&&Pe()&&Fe()&&je(Kr)})}var $n=L(qo,2);{var yn=je=>{Mc(je,{})};R($n,je=>{xe()&&je(yn)})}var Mo=L($n,2);{var Ir=je=>{var ei=XT(),Li=C(ei);ec(Li,{}),S(ei),b(je,ei)};R(Mo,je=>{J()&&je(Ir)})}var Ue=L(Mo,2);{var Vt=je=>{Vc(je,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()}})};R(Ue,je=>{X()&&je(Vt)})}var Si=L(Ue,2);{var Qo=je=>{rl(je,{get shifted(){return y()},get captions(){return P()},get position(){return A()},get playerSize(){return k()},isMobile:!0})};R(Si,je=>{pe().value!=="off"&&je(Qo)})}var mo=L(Si,2);{var Vo=je=>{var ei=ZT();ei.__click=[GT,z,Ye,cn];var Li=C(ei);sl(Li,{}),S(ei),b(je,ei)};R(mo,je=>{d()&&je(Vo)})}var vo=L(mo,2);{var Go=je=>{let ei=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Li=m(()=>r()==="ads"),go=m(()=>e.canRewindLive&&Ke()!==0);Ac(je,{get bottomHidden(){return n(ei)},get showControls(){return y()},get bottomNoSmooth(){return I()},get isAds(){return n(Li)},get canRewindLive(){return n(go)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return ke()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return ze()},get nextButtonActive(){return et()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Ft()},get customFullscreenSupported(){return n(yr)},get endScreenShown(){return n(uo)},toggleFullscreen:Sr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Wo,onDisabledSeekToInteractiveClick:Po,get playerControlsWrapperRef(){return n(co)},set playerControlsWrapperRef(Yo){O(co,Yo,!0)},get playerControlsRef(){return n(Pi)},set playerControlsRef(Yo){O(Pi,Yo,!0)}})};R(vo,je=>{dt()&&je(Go)})}var Wn=L(vo,2);{var un=je=>{var ei=JT(),Li=C(ei);Bc(Li,{get supportLink(){return e.supportLink},get returnFocus(){return v$.noop},get ref(){return n(an)},set ref(go){O(an,go,!0)}}),S(ei),b(je,ei)};R(Wn,je=>{z()&&je(un)})}var eo=L(Wn,2);let to=m(()=>!n(xr));sc(eo,{get isLive(){return Te()},get isHidden(){return n(to)},get isPlaying(){return j()},get position(){return A()},get duration(){return Q()}});var Kn=L(eo,2);{var dr=je=>{Ya(je,{})};R(Kn,je=>{n(er)&&je(dr)})}var cr=L(Kn,2);{var qn=je=>{cc(je,{})};R(cr,je=>{ie()&&je(qn)})}var $s=L(cr,2);{var ys=je=>{Fc(je,{onClose:tr,onSelectAutoQuality:()=>{Br("auto"),tr()}})};R($s,je=>{n(ss)&&je(ys)})}b(St,Pt)});var lr=L(ar,2);Xe(lr,St=>O(Fr,St),()=>n(Fr)),S(Wi),Xe(Wi,St=>O(wo,St),()=>n(wo)),D(()=>Ve(Wi,"aria-label",rr)),lt("click",Wi,Fn,!0),lt("focusin",Wi,Hn,!0),b(t,Wi),F(),o()}Je(["click"]);function Ip(t){let e="";return lo(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),lo(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),lo(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),lo(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),lo(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),lo(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),lo(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),lo(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),lo(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),lo(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),lo(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),lo(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),lo(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),lo(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),lo(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),lo(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),lo(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),lo(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),lo(t.font)&&(e+=`--font:${t.font};`),lo(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),lo(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function lo(t){return typeof t=="string"&&!t.includes(";")}var g$=require("@vkontakte/videoplayer-shared/es2015");var oC=M('<div class="time-container s-7"><!></div>'),nC=M('<div class="player-wrapper s-7" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),rC={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 rg(t,e){B(e,!0),q(t,rC);let[i,o]=Re(),r=()=>x(Z,"$scrubbingInProgress",i),a=()=>x(X,"$playerSize",i),l=()=>x(A,"$isPlaying$",i),d=()=>x(k,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(I,"$playerPhase",i),v=()=>x(N,"$crashed$",i),p=()=>x(Q,"$currentSubtitle$",i),f=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(Y,"$isLive$",i),g=()=>x(le,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),T=h(e,"videoContainer",15),{playerPhase:I,state:{crashed$:N,duration$:k,positionExact$:E,isPlaying$:A,currentSubtitle$:Q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:Y,isRewindableLive$:le},ui:{playerSize:X,controls:re,scrubbingInProgress:Z},actions:{internal:{getVideoElement:we}}}=ve(),ue=8,ne=W(!1),_e=ci({}),xe=W(!1),J=m(()=>!r()&&!n(xe)),Ne=()=>{O(ne,!0)},pe=()=>{O(ne,!1)},P=(0,g$.debounceFn)(od,260);Oe(()=>{a(),P(we(),re,_e,n(ne))});let Ke=m(()=>l()?rn(d()-s()):rn(isFinite(d())?d():w()));var Te=nC(),j=C(Te);ul(j,{hideCursor:!1,get videoContainer(){return T()},set videoContainer(Pe){T(Pe)}});var ie=L(j,2);Oa(ie,()=>"slot",!1,(Pe,Fe)=>{ro(Pe,()=>({name:cl}))});var De=L(ie,2);let Be=m(()=>u()!=="thumb"||v());al(De,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var ot=L(De,2);{var U=Pe=>{rl(Pe,{shifted:!1,get captions(){return f()},get position(){return $()},get playerSize(){return a()}})};R(ot,Pe=>{p().value!=="off"&&n(J)&&Pe(U)})}var Ae=L(ot,2);{var ke=Pe=>{var Fe=oC(),Ft=C(Fe);rc(Ft,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Ke)}}),S(Fe),b(Pe,Fe)};R(Ae,Pe=>{n(J)&&Pe(ke)})}var ze=L(Ae,2);let et;var ye=C(ze);il(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return g()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:ue,tooltipRightOffset:ue,get ref(){return _e.timeline},set ref(Pe){_e.timeline=Pe}}),S(ze),S(Te),D(Pe=>et=se(ze,1,"timeline s-7",null,et,Pe),[()=>({visible:n(ne)})]),lt("mouseenter",Te,Ne),lt("mouseleave",Te,pe),lt("mouseenter",ze,()=>O(xe,!0)),lt("mouseleave",ze,()=>O(xe,!1)),b(t,Te),F(),o()}var sC=M("<div><!></div>"),aC={hash:"s-3",code:'.vk-vp-root.s-3{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-3{overflow:visible}.vk-vp-root.s-3 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-3 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-3 p{margin:0}.vk-vp-root.s-3 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-3 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-3 :focus,.vk-vp-root.s-3 :focus-visible{outline:none}.vk-vp-root.s-3 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-3 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-3 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-3 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-3 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-3 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-3 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function sg(t,e){B(e,!0),q(t,aC);let[i,o]=Re(),r=()=>x(dt,"$isLive$",i),a=()=>x(kt,"$availableSubtitlesList$",i),l=()=>x(qe,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),v=h(e,"videoConfig",7),p=h(e,"uiConfig",7),f=h(e,"title",7),$=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),g=h(e,"interactiveController",7),w=h(e,"subtitles",7),T=h(e,"subtitlesForcedLanguage",7),I=h(e,"live",7),N=h(e,"preload",7),k=h(e,"autoplay",7),E=h(e,"volume",7,void 0),A=h(e,"muted",7,void 0),Q=h(e,"fromTime",7),H=h(e,"canRewindLive",7),z=h(e,"showAds",7),Y=h(e,"adsSlotId",7,void 0),le=h(e,"adsParams",7,void 0),X=h(e,"adsAutoplayParam",7,void 0),re=h(e,"duration",7,void 0),Z=h(e,"logoClickable",7),we=h(e,"logoHidden",7),ue=h(e,"isMobile",7),ne=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),xe=h(e,"prevButtonActive",7,!1),J=h(e,"endScreenVideoTitle",7,void 0),Ne=h(e,"endScreenVideoThumb",7,void 0),pe=h(e,"isOneVideoPlaylist",7,!1),P=h(e,"supportLink",7),Ke=h(e,"shadowRootContainer",7),Te=h(e,"outerContainerRef",7),j=h(e,"fullScreenTarget",7,void 0),ie=h(e,"failoverHosts",7,void 0),De=h(e,"showMiniTimer",7,!1),Be=h(e,"saveRate",7),ot=h(e,"seekToInteractive",7,pl.noop),U=h(e,"playPrevChapter",7,pl.noop),Ae=h(e,"volumeMultiplier",7),ke=h(e,"showAutoplayNext",7),ze=h(e,"showEndScreen",7,!0),et=h(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Pe}=u();c_(p());let Fe=Nt(),Ft=p().logoLink,vt=s().ui.debugPanelVisible,Ht=s().ui.playerSize,dt=s().state.isLive$,ri=s().state.isInteractive&&ld.clientChecker.device.isAndroid,Ot=W(void 0),$e=null,be=W(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),y_(s(),Pe),Oe(()=>{var K,Mt;s().ui.isMobile.set(ue()),(Mt=(K=v().callbacks)==null?void 0:K.onDomReady)==null||Mt.call(K)});let ee=(K=!1)=>{O(be,!0),K?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},nt=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let K=W_(s().videoId);if(K)switch(K.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,K.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,K.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(K.quality);break}}else{K_(s().videoId),Zf()&&s().actions.internal.setTrafficSavingEnabled(!0);let Mt=Yf(s().videoId);Mt&&s().actions.internal.setQuality(Mt)}};function fe(K){var Xt,st,Hi;let Mt=d()||K;Mt&&s().initVideo({container:n(Ot),sources:Mt,failoverHosts:ie(),subtitles:w(),subtitlesForcedLanguage:T(),volumeMultiplier:Ae()});let di=pl.safeStorage.get(Gd)==="true";vt.set(di),Q()>0&&s().actions.external.seekTime(Q());let ut=ue()?Fe.volumeDefault:(st=(Xt=E())!=null?Xt:Hu())!=null?st:Fe.volumeDefault,Tt=(Hi=A())!=null?Hi:D_();if(s().actions.external.setVolume(ut),s().actions.external.setMuted(Tt),s().getAdmanWrapper().setInitialVolume(Tt?0:ut),nt(),Fe.features.saveRate&&Be()){let Ui=H_();Ui&&!r()&&s().actions.internal.setPlaybackRate(Ui)}if(ke()){let Ui=z_();Ui&&s().actions.internal.setAutoplayNextEnabled(Ui)}s().ui.isAutoplay.set(k()),k()&&ee(),N()&&Fe.features.preload&&s().actions.internal.preload()}let Me=K=>{if(window.ResizeObserver){let Mt,di;$e=new ResizeObserver((0,pl.throttleFn)(ut=>{let Tt=ut[0];if(Tt.contentBoxSize){let Xt=Array.isArray(Tt.contentBoxSize)?Tt.contentBoxSize[0]:Tt.contentBoxSize;Mt=Xt.inlineSize,di=Xt.blockSize}else Tt.contentRect&&(Mt=Tt.contentRect.width,di=Tt.contentRect.height);Ht.set({width:Mt,height:di})},300)),$e.observe(K)}Ht.set({width:K.clientWidth,height:K.clientHeight})},wt=()=>{document.hidden&&s().actions.external.stop()};Rt(()=>{var di,ut,Tt,Xt;ri&&document.addEventListener("visibilitychange",wt),Fe.debugLog&&s().actions.internal.startLogging(),Me(n(Ot));let K=ye.map(st=>st.init({store:s(),microStores:Pe,config:v(),interactiveController:g(),uiConfig:p()})),Mt=()=>{ri&&document.removeEventListener("visibilitychange",wt),$e==null||$e.disconnect(),K.forEach(st=>st.unsubscribe()),s().destroy()};return((di=I())==null?void 0:di.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Mt):((ut=I())==null?void 0:ut.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Mt):(((Tt=I())==null?void 0:Tt.status)==="finished"||((Xt=I())==null?void 0:Xt.status)==="postlive")&&!(d()&&(0,ld.areValidLiveRecordSources)(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Mt):(fe(),Mt)});function Lt(){n(be)?s().actions.external.play():ee(!0)}function mt(){s().actions.external.pause()}function ce(K){s().actions.external.setMuted(K)}function We(){s().actions.external.toggleSubtitle()}function Ye(K,Mt){s().actions.external.changeSubtitle(K,Mt)}function ct(K){s().actions.external.changeAudioStream(K)}function Ut(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.hideControls()}function zt(){var K;(K=s().webApi.slotsApi)!=null&&K.haveSlots()&&s().actions.external.showControls()}function si(K){ue()||K>=0&&K<=1&&s().actions.external.setVolume(K)}function $i(K){s().actions.internal.seekTime(K,h$.SeekAction.UNKNOWN)}function ji(K){s().actions.external.seekEpisodeStartTime(K)}function Dt(){s().actions.external.returnFocusToEpisodes()}function pi(K){s().actions.external.setPlaybackRate(K)}function hi(K){s().actions.external.setAutoQualityLimits(K)}function bt(){s().actions.external.setQuality("auto")}function Jt(K){s().actions.external.setTrafficSavingEnabled(K)}function xi(K){s().actions.external.setHighQualityEnabled(K)}let Xi=Ip(Fe.view),oi=v().playerView==="preview",kt=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let K=!1;Oe(()=>{var Mt;if(!K&&a().length){K=!0;let di;if(Fe.features.userVideoPrefs&&s().videoId){let Tt=Ku(Fe.userSalt,String(s().videoId));Tt!=null&&Tt.subtitleTrackId&&(di=a().find(Xt=>Xt.value===Tt.subtitleTrackId))}let ut=(Mt=T())!=null?Mt:em();ut&&(di=a().find(Tt=>Tt.language===ut)),s().actions.internal.setSubtitle(di)}})}let qe=s().ui.isPreviewTrackHorizontallyAligned;var wi=sC();let xo;var Eo=C(wi);{var hn=K=>{ng(K,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Ft},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return ot()},get playPrevChapter(){return U()},firstStart:ee,seekTime:$i,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(Ot)},set videoContainer(Mt){O(Ot,Mt,!0)}})},It=K=>{var Mt=Le(),di=de(Mt);{var ut=Xt=>{rg(Xt,{get thumbUrl(){return $()},get outsideDuration(){return re()},get canRewindLive(){return H()},get videoContainer(){return n(Ot)},set videoContainer(st){O(Ot,st,!0)}})},Tt=Xt=>{ig(Xt,{get store(){return s()},get uiConfig(){return Fe},get title(){return f()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return I()},get autoplay(){return k()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return Y()},get adsParams(){return le()},get adsAutoplayParam(){return X()},get duration(){return re()},get logoClickable(){return Z()},get logoHidden(){return we()},get logoTargetUrl(){return Ft},get nextButtonActive(){return _e()},get prevButtonActive(){return xe()},get endScreenVideoTitle(){return J()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return pe()},get supportLink(){return P()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return j()},get showMiniTimer(){return De()},get playerStarted(){return n(be)},get seekToInteractive(){return ot()},get playPrevChapter(){return U()},firstStart:ee,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return ne()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(Ot)},set videoContainer(st){O(Ot,st,!0)},get keyboardControls(){return et()},set keyboardControls(st){et(st)}})};R(di,Xt=>{oi?Xt(ut):Xt(Tt,!1)})}b(K,Mt)};R(Eo,K=>{ue()?K(hn):K(It,!1)})}S(wi),D(K=>{xo=se(wi,1,"vk-vp-root s-3",null,xo,K),Qe(wi,Xi)},[()=>({"root--miui-browser":ld.clientChecker.device.isMobile&&ld.clientChecker.browser.isMiuiBrowser,"visible-outside":oi,"preview-track-horizontally-alinged":l()})]),b(t,wi);var Wt=F({initVideo:fe,play:Lt,pause:mt,setMuted:ce,toggleSubtitle:We,changeSubtitle:Ye,changeAudioStream:ct,hideControls:Ut,showControls:zt,setVolume:si,seekTime:$i,seekEpisodeStartTime:ji,returnFocusToEpisodes:Dt,setPlaybackRate:pi,setAutoQualityLimits:hi,setAutoQuality:bt,toggleTrafficSaving:Jt,toggleHighQuality:xi,get sources(){return d()},set sources(K){d(K)},get store(){return s()},set store(K){s(K)},get microStoresRoot(){return u()},set microStoresRoot(K){u(K)},get videoConfig(){return v()},set videoConfig(K){v(K)},get uiConfig(){return p()},set uiConfig(K){p(K)},get title(){return f()},set title(K){f(K)},get thumbUrl(){return $()},set thumbUrl(K){$(K)},get interactiveContainer(){return y()},set interactiveContainer(K){y(K)},get interactiveController(){return g()},set interactiveController(K){g(K)},get subtitles(){return w()},set subtitles(K){w(K)},get subtitlesForcedLanguage(){return T()},set subtitlesForcedLanguage(K){T(K)},get live(){return I()},set live(K){I(K)},get preload(){return N()},set preload(K){N(K)},get autoplay(){return k()},set autoplay(K){k(K)},get volume(){return E()},set volume(K){E(K)},get muted(){return A()},set muted(K){A(K)},get fromTime(){return Q()},set fromTime(K){Q(K)},get canRewindLive(){return H()},set canRewindLive(K){H(K)},get showAds(){return z()},set showAds(K){z(K)},get adsSlotId(){return Y()},set adsSlotId(K){Y(K)},get adsParams(){return le()},set adsParams(K){le(K)},get adsAutoplayParam(){return X()},set adsAutoplayParam(K){X(K)},get duration(){return re()},set duration(K){re(K)},get logoClickable(){return Z()},set logoClickable(K){Z(K)},get logoHidden(){return we()},set logoHidden(K){we(K)},get isMobile(){return ue()},set isMobile(K){ue(K)},get showNextPrevButtons(){return ne()},set showNextPrevButtons(K){ne(K)},get nextButtonActive(){return _e()},set nextButtonActive(K){_e(K)},get prevButtonActive(){return xe()},set prevButtonActive(K){xe(K)},get endScreenVideoTitle(){return J()},set endScreenVideoTitle(K){J(K)},get endScreenVideoThumb(){return Ne()},set endScreenVideoThumb(K){Ne(K)},get isOneVideoPlaylist(){return pe()},set isOneVideoPlaylist(K){pe(K)},get supportLink(){return P()},set supportLink(K){P(K)},get shadowRootContainer(){return Ke()},set shadowRootContainer(K){Ke(K)},get outerContainerRef(){return Te()},set outerContainerRef(K){Te(K)},get fullScreenTarget(){return j()},set fullScreenTarget(K){j(K)},get failoverHosts(){return ie()},set failoverHosts(K){ie(K)},get showMiniTimer(){return De()},set showMiniTimer(K){De(K)},get saveRate(){return Be()},set saveRate(K){Be(K)},get showAutoplayNext(){return ke()},set showAutoplayNext(K){ke(K)},get seekToInteractive(){return ot()},set seekToInteractive(K){ot(K)},get playPrevChapter(){return U()},set playPrevChapter(K){U(K)},get volumeMultiplier(){return Ae()},set volumeMultiplier(K){Ae(K)},get showEndScreen(){return ze()},set showEndScreen(K){ze(K)},get keyboardControls(){return et()},set keyboardControls(K){et(K)}});return o(),Wt}var lC=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 ag(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=lC();fi(9),b(r,l)},$$slots:{default:!0}})}var dC=M('<div class="title s-2"> </div>'),cC=M('<div class="playerStub s-2"><!> <!></div>'),uC={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 lg(t,e){q(t,uC);var i=cC(),o=C(i);{var r=d=>{var s=dC(),u=C(s,!0);S(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=L(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);ag(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),D(()=>Qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var pC=M('<div class="playerError s-1"><!></div>'),fC={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 dg(t){q(t,fC);var e=pC(),i=C(e);sl(i,{}),S(e),b(t,e)}var Fp=require("@vkontakte/videoplayer-shared/es2015"),Fi=require("@vkontakte/videoplayer-shared/es2015"),Zc=require("@vkontakte/videoplayer-core/es2015"),md=require("@vkontakte/videoplayer-statistics/es2015");var kp=require("@vkontakte/videoplayer-shared/es2015"),Ep=class{constructor(){this.subscription=new kp.Subscription,this.logger=new kp.Logger,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()}};var cd=require("@vkontakte/videoplayer-shared/es2015");var mC=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),vC=M('<div><div><!></div> <span class="title s-6"> </span></div>'),gC={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 cg(t,e){B(e,!0),q(t,gC);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(v,"$isMobile$",i),l=ve(),d=Nt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,v=l.ui.isMobile,p=l.ui.t,f=m(()=>r()&&p("pip_dummy_title")),$=Ip(d.view);var y=vC();let g;var w=C(y);let T;var I=C(w);Ze(I,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,A)=>{var Q=mC();fi(),b(E,Q)},$$slots:{default:!0}}),S(w);var N=L(w,2),k=C(N,!0);S(N),S(y),D((E,A)=>{g=se(y,1,"player-pip-dummy s-6",null,g,E),Qe(y,$),T=se(w,1,"dummy-image s-6",null,T,A),me(k,n(f))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var hC=Object.defineProperty,_C=(t,e,i)=>e in t?hC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,dd=(t,e,i)=>_C(t,typeof e!="symbol"?e+"":e,i),ug=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),bC=460,$C=280,zc=class{constructor({enabled:e=!0}={enabled:!0}){dd(this,"playerDomElement"),dd(this,"playerParentShadowRoot"),dd(this,"playerDummyElement"),dd(this,"svelteContext"),dd(this,"pipWindow"),dd(this,"info",{isActive$:new cd.ValueSubject(!1),isEnabled$:new cd.ValueSubject(!1),type:1}),this.info.isEnabled$=new cd.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,cd.detectEmbed)();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return ug(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:bC,height:$C,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(cg,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||(Na(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return ug(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return ug(this,null,function*(){yield this.exit()})}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function _$(t){return t instanceof zc}var Pp=class{static getLatestSupportedVersion(e){let i=new Wa(e),o=new zc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Wc(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 b$="Inner error. Unexpectedly root annotation container null reference exception",$$="Annotation with such name already exists",y$="Annotation with such name does not exist";var ud=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var pd=require("@vkontakte/videoplayer-shared/es2015"),yC="1",xC=100,Ap=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new pd.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,pd.throttleFn)(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},xC);this.subscriptions.add((0,pd.observeElementSize)(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 ud(b$);if(this.annotations.has(e))throw new ud($$);i.style.zIndex=(o=i.style.zIndex)!=null?o:yC,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 ud(y$);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(){}};var fl=require("@vkontakte/videoplayer-shared/es2015"),gn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return(0,fl.assertNonNullable)(e),(0,fl.assertNonNullable)(i),(0,fl.assertNonNullable)(r),r.interactiveData&&(0,fl.assertNonNullable)(o),this.subscription=new fl.Subscription,this.subscription}};var Kc=class extends gn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=jt(Ie({},ae(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var qc=class extends gn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=jt(Ie({},ae(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:v}=a.ui,p=ge(v),f=()=>p&&ge(u);return o.add(u.subscribe($=>{if(!p)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||f())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(f()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Qc=class extends gn{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:r}=i;return o.add(r.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(l=>l.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};var x$=require("@vkontakte/videoplayer-shared/es2015");var pg=ae(!1),Lp=null,Gc=class extends gn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=jt(Ie({},pg),{set:(i,o=!1)=>{i!==ge(pg)&&(this.clearTimeout(),pg.set(i),!i&&Lp&&(Lp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{ge(l)&&p&&this.state$.set(!1)}));let v=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add((0,x$.combine)({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:f,interactiveTimeIndicator:$})=>{var y,g;if(!(!p||!($!=null&&$.isDisplayed))){if(!f)return this.state$.set(!1);v.tooltipHelpHintActive&&Lp===null&&(Lp=!0,v.tooltipHelpHintActive=!1,this.state$.set(!0),(g=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||g.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var Mp=require("@vkontakte/videoplayer-shared/es2015");var Yc=class extends gn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=jt(Ie({},ae(null)),{toggle:Mp.noop});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=()=>ht(this,null,function*(){if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:v}=r.state,{disabledControls$:p}=r.ui.controls,f=ge(u),$=ge(v);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(Uf),!f&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(Uf),!f&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add((0,Mp.combine)({graphIsOpened:this.state$,currentGridType:l}).subscribe(v=>ht(this,[v],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(f){d({message:"Cant hide graph"})}}))),o}};var fg=require("@vkontakte/videoplayer-shared/es2015"),jc=class extends gn{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(void 0)}}init(i){let o=super.init(i),{store:r}=i,{info:{isActive$:a,isEnabled$:l,type:d}}=r.webApi.pictureInPictureApi||{info:{isActive$:new fg.ValueSubject(!1),isEnabled$:new fg.ValueSubject(!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}};var Rp=require("@vkontakte/videoplayer-shared/es2015");var Vp=require("@vkontakte/videoplayer-shared/es2015");var w$=({maxShowCount:t,timeout:e})=>{let i=[t!==0?wC({maxCount:t}):void 0,e!==0?SC({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},wC=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Vp.safeStorage.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}}},SC=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Vp.safeStorage.get(e)||"{}")}catch(a){return{}}},o=a=>Vp.safeStorage.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(jt(Ie({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Xc=class extends gn{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:r,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:l,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:s}}}=i;this.notificationManager=w$({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe((0,Rp.filterChanged)(),(0,Rp.filter)(v=>v)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(s&&r.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var S$=()=>[Kc,qc,Qc,Gc,Yc,jc,Xc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:jt(Ie({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});var fd=require("@vkontakte/videoplayer-shared/es2015");var Np=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 Op=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 Np(()=>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 TC=M('<div class="root s-0"><!></div>'),CC={hash:"s-0",code:".root.s-0{align-items:center;display:flex;inset:0;justify-content:center;pointer-events:none;position:absolute;z-index:1}"};function mg(t,e){B(e,!0),q(t,CC);let i=null,o=W(null);Oe(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&O(o,s?"prev":"next",!0)}var a=Le(),l=de(a);{var d=s=>{var u=Le(),v=de(u);Ps(v,()=>n(o),p=>{var f=TC(),$=C(f);let y=m(()=>n(o)==="prev");Uc($,{get duration(){return e.animationDuration},get Icon(){return ga},get reversed(){return n(y)}}),S(f),b(p,f)}),b(s,u)};R(l,s=>{e.playbackStatusShow&&n(o)&&s(d)})}return b(t,a),F({startVideoChangedAnimation:r})}var IC=Object.defineProperty,EC=Object.defineProperties,kC=Object.getOwnPropertyDescriptors,T$=Object.getOwnPropertySymbols,PC=Object.prototype.hasOwnProperty,AC=Object.prototype.propertyIsEnumerable,gg=(t,e,i)=>e in t?IC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Us=(t,e)=>{for(var i in e||(e={}))PC.call(e,i)&&gg(t,i,e[i]);if(T$)for(var i of T$(e))AC.call(e,i)&&gg(t,i,e[i]);return t},LC=(t,e)=>EC(t,kC(e)),ii=(t,e,i)=>gg(t,typeof e!="symbol"?e+"":e,i),Dp=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),MC={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Fi.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,Zc.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},Jn=W(void 0),vg=ci({animationDuration:0,playbackStatusShow:!1}),Bp=class extends HTMLElement{constructor(){super(),ii(this,"svelteStubComponent"),ii(this,"svelteRootComponent"),ii(this,"sveltePersistentLayerComponent"),ii(this,"svelteErrorComponent"),ii(this,"store"),ii(this,"microStoresRoot"),ii(this,"statistics"),ii(this,"sentry"),ii(this,"_shadowRoot"),ii(this,"playerContainer"),ii(this,"rootContainer"),ii(this,"stateContainer"),ii(this,"shadowRootContainer"),ii(this,"playerId"),ii(this,"uiConfig"),ii(this,"coreConfig"),ii(this,"statisticsConfig"),ii(this,"interactiveController"),ii(this,"interactiveContainer"),ii(this,"graphMadePause"),ii(this,"currentPlayingVideoIndex",0),ii(this,"needToRepeatPlaylist",!1),ii(this,"videoConfig"),ii(this,"pictureInPictureApi"),ii(this,"mediaSessionApi"),ii(this,"unsubscribePlayerPhaseSubscription"),ii(this,"logger"),ii(this,"log"),ii(this,"subscription"),ii(this,"interactiveSubscription"),ii(this,"annotationsApi"),ii(this,"slotsApi"),ii(this,"focusManager"),ii(this,"prevIsid"),ii(this,"isInited",!1),ii(this,"postponedInitParams",null),ii(this,"internalsExposure",null),ii(this,"shadowDOMCallbacksDisabled",!1),ii(this,"fatalError$",new Fp.ValueSubject(null)),ii(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:v,statVKAppId:p,refreshStatAuthToken:f,autoplay:$,isMobile:y,isTouch:g,refDomain:w,deviceId:T,interactiveData:I}=Wc(this.videoConfig,i),N=(o=I==null?void 0:I.projectInfo)==null?void 0:o.pid,k=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;k&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:A=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new md.OneStat(Us({movieId:E,albumId:d,place:s,trackCode:v,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:g!=null?g:y,clip:A,refDomain:w,deviceId:T,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||k)&&{projectId:Number(N)}),Us({refreshAuthToken:f,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(H){console.error(H),this.log({message:H.message})}}),fd.devNull.create("ui"),this.logger=new Fi.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Fi.Subscription,this.interactiveSubscription=new Fi.Subscription,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Zr(dg,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ci({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Zr(lg,l),this.sveltePersistentLayerComponent=Zr(mg,{target:this.playerContainer,props:vg}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;vg.animationDuration=e,vg.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(),fd.devNull.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}=Wc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new md.ThinOneStat.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,v,p,f,$;if(!this.videoConfig)return;let{albumId:y,statPlace:g,statAuthToken:w,preload:T,autoplay:I,volume:N,muted:k,fromTime:E,canRewindLive:A,supportLink:Q,showAds:H,adsSlotId:z,adsParams:Y={},adsAutoplayParam:le,interfaceLanguage:X,isCyrillicRelatedInterface:re,logoClickable:Z,logoHidden:we,isMobile:ue,isTouch:ne,isAudioDisabled:_e,isLiveCatchUpMode:xe,fullScreenTarget:J,failoverHosts:Ne,canDownload:pe,callbacks:P,interactiveData:Ke,showThumbTimer:Te,additionalButtons:j=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Be,loop:ot,saveRate:U,volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,mediascopePixels:et}=Wc(this.videoConfig,i),{sources:ye,title:Pe,thumbUrl:Fe,unitedVideoId:Ft,isClip:vt=!1,duration:Ht,adsParams:dt={},videoEpisodes:Ct,previewThumbsData:ri,subtitles:Ot,subtitlesForcedLanguage:$e,live:be,adsExternalApi:ee}=e;if(!ye&&!be){let pi=new Error("empty sources and live");this.fatalError$.next(pi),(r=P.onCrashed)==null||r.call(P,pi.message);return}let nt=Us(Us({},Y),dt),fe=this.getNextVideoInfo(),Me={sources:ye,title:Pe,thumbUrl:Fe,subtitles:Ot,subtitlesForcedLanguage:$e,unitedVideoId:Ft,isClip:vt,live:be,albumId:y,statPlace:g,autoplay:I,muted:k,volume:N,fromTime:E,canRewindLive:A,showAds:H,adsSlotId:z,adsParams:nt,adsAutoplayParam:le,duration:Ht,logoClickable:Z,logoHidden:we,isTouch:ne!=null?ne:ue,repeat:Be,loop:ot,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},wt={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(Me)}`});let Lt=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),mt=(Lt==null?void 0:Lt.oneStat)||this.createOneStat(e,i),ce=this.createThinOneStat(e,i),We;et&&(We=new md.MediascopePixel({pixels:et})),(mt||ce)&&(this.statistics=new mp(mt,ce,We,Lt==null?void 0:Lt.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new za(this.uiConfig.sentry,{version:Fa,env:Du},{movieId:Ft,albumId:y,place:g,autoplay:(l=I&&!this.interactiveController)!=null?l:!1,mobile:ne!=null?ne:ue,clip:vt}),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=Us(Us({},this.sentry),za.getInstance());let ct=!!Ke,Ut=[],zt="tooltip_interactive_go_back_disabled_first";if(ct&&this.interactiveController){let pi=this.interactiveController.state.isInitialChapter$.getValue(),hi=this.interactiveController.getHistoryState();pi&&Ut.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ut.push("SEEK_TO_INTERACTIVE_BUTTON"),hi.hasPrevChapter$.getValue()||(Ut.push("PLAY_PREV_CHAPTER_BUTTON"),pi||(hi.isGoBackLimited$.getValue()?zt="tooltip_interactive_go_back_disabled_limit":zt="tooltip_interactive_go_back_disabled"))}let si=()=>{var pi;this.isInited=!1,this.prevIsid=void 0;let hi=(o==null?void 0:o.info.isEnded$.getValue())&&((pi=this.interactiveController)==null?void 0:pi.state.isEndChapter$.getValue());P.onReplayInteractiveVideo&&!hi?P.onReplayInteractiveVideo():this.replayInteractiveVideo()},$i=Be&&this.videoConfig.videos.length===1;this.store=Vb({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:re,videoId:Ft,isClip:vt,isLiveCatchUpMode:xe,isAudioDisabled:_e,statAuthToken:w,callbacks:P,webApi:wt,videoEpisodes:Ct,previewThumbsData:ri,canDownload:pe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ut,isInteractive:ct,saveRate:U,interactiveRanges$:(v=this.interactiveController)==null?void 0:v.state.interactiveRanges$,isInteractiveTime$:(p=this.interactiveController)==null?void 0:p.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:si,playPrevChapterDisabledTooltip:zt,hasInteractiveBranches:!!(($=(f=this.interactiveController)==null?void 0:f.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?j:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:pi=>{var hi;return(hi=this.sveltePersistentLayerComponent)==null?void 0:hi.startVideoChangedAnimation(pi)},looped:this.uiConfig.features.useLoopSetting?ot:$i,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:ji}=this.microStoresRoot=S$(),Dt=()=>{var pi,hi,bt,Jt,xi,Xi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onCurrentFormatChanged)==null?void 0:qe.call(P,kt)})),this.subscription.add(ji.interactiveControlsOpacity$.subscribe(kt=>{var qe;kt!==null&&((qe=this==null?void 0:this.interactiveController)==null||qe.setDisabledControls(kt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onThroughputEstimationChanged)==null?void 0:qe.call(P,kt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onTrafficSavingEnabledChanged)==null?void 0:qe.call(P,kt)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onHighQualityEnabledChanged)==null?void 0:qe.call(P,kt)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onAutoQualityEnabledChanged)==null?void 0:qe.call(P,!!kt)})),this.subscription.add(new Fi.Observable(kt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(qe=>kt.next(qe)))}).pipe((0,Fi.skip)(1)).subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onCurrentPlaybackRateChanged)==null?void 0:qe.call(P,kt)})),this.subscription.add(this.store.state.volume$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onVolumeChange)==null?void 0:qe.call(P,kt)})),this.subscription.add(this.store.state.muted$.subscribe(kt=>{var qe,wi,xo,Eo;if(kt)(qe=P==null?void 0:P.onMute)==null||qe.call(P);else{let hn=(xo=((wi=this.store)==null?void 0:wi.state.volume$)&&ge(this.store.state.volume$))!=null?xo:0;(Eo=P==null?void 0:P.onUnmute)==null||Eo.call(P,hn)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onVideoBitrateChanged)==null?void 0:qe.call(P,kt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(kt=>{var qe;let wi=(qe=this.store)==null?void 0:qe.ui.controls.disabledControls$;wi&&(kt&&!wi.includes(Yd)&&wi.add(Yd),kt||wi.remove(Yd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(kt=>Dp(this,null,function*(){var qe;if(!Zc.clientChecker.browser.isSamsungBrowser||!kt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((qe=this.videoConfig)==null?void 0:qe.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(kt=>{var qe;return(qe=P==null?void 0:P.onVSIDChanged)==null?void 0:qe.call(P,kt)})),this.initMediaSession(),O(Jn,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Pe,thumbUrl:Fe,subtitles:Ot,subtitlesForcedLanguage:$e,live:be,preload:T,autoplay:I,muted:k,volume:N,fromTime:E,canRewindLive:A,supportLink:Q,showAds:H,adsSlotId:z,adsParams:nt,adsAutoplayParam:le,duration:Ht,logoClickable:Z,logoHidden:we,isMobile:ne!=null?ne:ue,failoverHosts:Ne,fullScreenTarget:J,saveRate:U,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Te,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:fe.nextVideoTitle,endScreenVideoThumb:fe.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,adsExternalApi:ee,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let oi={target:this.playerContainer,props:n(Jn)};this.svelteRootComponent=Zr(sg,oi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(bt=(hi=(pi=this.videoConfig)==null?void 0:pi.callbacks)==null?void 0:hi.onInited)==null||bt.call(hi)),(Jt=this.internalsExposure)==null||Jt.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Xi=(xi=this.videoConfig)==null?void 0:xi.callbacks)!=null&&Xi.onDevNullLog)?fd.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):fd.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Zc.clientChecker.isInited$.subscribe(pi=>{pi&&(console.log("UI SDK async start"),Dt())}):Dt()}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&&(0,Fi.isNonNullable)(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return Dp(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:v,initChapterId:p,historyApi:f,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:v,initChapterId:p,historyApi:f,vkVideoLoader:$,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:g}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(g.subscribe(T=>{if(!this.isInited)return;let I=this.store;T?I.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):I.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(T=>{this.store&&this.store.state.isInteractiveExpectation$.set(T)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(T=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=LC(Us({},T.config),{title:(v==null?void 0:v.title)||T.config.title});let I=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(T.player,I),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:T,actionType:I})=>{var N,k,E,A,Q,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(T==="action-choice"&&I==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(jd)),T==="action-choice-canceled"){let Y=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(k=this.videoConfig)!=null&&k.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(A=this.videoConfig)==null?void 0:(Q=A.callbacks).onDisabledInteractiveClick)==null||H.call(Q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:T,removeAllOpenURI:I})=>{this.store&&T==="container-fake-removed"&&I&&this.store.ui.controls.disabledControls$.remove(jd)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let T=this.interactiveController.getHistoryState();this.subscription.add(T.history$.subscribe(I=>{var N,k,E;I.length&&((E=(k=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:k.onInteractiveHistoryChanged)==null||E.call(k,I))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(T=>{var I,N,k;(k=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveChapterChanged)==null||k.call(N,T.chapter,T.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var T,I,N,k;(T=this.microStoresRoot)==null||T.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(k=(I=this.videoConfig)==null?void 0:(N=I.callbacks).onInteractiveTimeIndicatorClick)==null||k.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(T=>{this.log({message:T.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,v,p,f,$,y,g,w,T,I,N,k,E,A,Q,H,z,Y,le;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let X=new Error("empty videos");this.fatalError$.next(X),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,X.message);return}else this.fatalError$.next(null);if(this.videoConfig=Wc(MC,(0,Fi.cloneDeepWith)(e,X=>X instanceof HTMLElement?X:void 0)),this.playerId=(0,Fi.getPlayerId)(e.playerId),this.uiConfig=d_((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 Fi.InternalsExposure("ui",this.playerId))),fd.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((v=this.videoConfig)==null?void 0:v.showAds)],numbers:[(0,Fp.now)()]}),(0,Fi.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(f=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?f:!0),(0,Fi.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(g=this.uiConfig.features.dpip)!=null?g:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride=Us({preview:(T=this.uiConfig.ads.preview)!=null?T:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(I=this.uiConfig.isMobile)!=null?I:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(k=this.videoConfig).autoplay&&(k.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(A=this.uiConfig.ads.slot)!=null?A:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((Q=this.uiConfig.showLogo)!=null?Q:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((Y=this.videoConfig.videos)!=null&&Y[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let X={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=Pp.getLatestSupportedVersion(X):this.pictureInPictureApi=new Wa(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new Ep:void 0,this.slotsApi=this.uiConfig.features.slots?new Sp:void 0,this.annotationsApi=this.uiConfig.features.annotations?new Ap(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new Op(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]),_$(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot),(le=this.slotsApi)==null||le.init(this.shadowRootContainer,this.store)}isOneVideoPlaylist(){return this.videoConfig?this.videoConfig.videos.length===1:!1}updateVideos(e,i){if(!this.videoConfig)return;this.log({message:`update ${i} videos, videos: ${JSON.stringify(e)}`}),i==="prev"?(this.videoConfig.videos.splice(0,this.currentPlayingVideoIndex),this.videoConfig.videos.unshift(...e),this.currentPlayingVideoIndex=e.length):i==="next"&&(this.videoConfig.videos.splice(this.currentPlayingVideoIndex+1),this.videoConfig.videos.push(...e));let o=this.getNextVideoInfo();n(Jn)&&(n(Jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Jn).nextButtonActive=this.isNextButtonActive(),n(Jn).prevButtonActive=this.isPrevButtonActive(),n(Jn).endScreenVideoTitle=o.nextVideoTitle,n(Jn).endScreenVideoThumb=o.nextVideoThumb,n(Jn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=Us({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",r=>this.seekTime(r.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onNextVideoClick)==null||l.call(a)}catch(d){this.log({message:"onNextVideoClick callback failed to execute"})}else this.playNextVideo()}]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>{var r,a,l;if(this.uiConfig.features.useCallbackForMediaSessionNextPrevClick)try{(l=(a=(r=this.videoConfig)==null?void 0:r.callbacks)==null?void 0:a.onPrevVideoClick)==null||l.call(a)}catch(d){this.log({message:"onPrevVideoClick callback failed to execute"})}else this.playPrevVideo()}])),this.mediaSessionApi.setMetaData({title:e,thumbUrl:i}),this.mediaSessionApi.updateActionHandlers(o),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}setupMediaSessionForAds(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let e="Реклама",i=[["play",()=>this.play()],["pause",()=>this.pause()]];this.mediaSessionApi.setMetaData({title:e}),this.mediaSessionApi.updateActionHandlers(i),this.mediaSessionApi.attachToStore(this.store)}catch(e){this.log({message:e.message})}}moveTo(e){this.shadowDOMCallbacksDisabled=!0,e.append(this),this.shadowDOMCallbacksDisabled=!1}play(){var e,i,o,r;this.isControlDisabled("PLAY_BUTTON")||(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(o=this.store)!=null&&o.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),(r=this.svelteRootComponent)==null||r.play())}pause(){var e;this.log({message:"pause"}),(e=this.svelteRootComponent)==null||e.pause()}stop(){var e;if(!this.videoConfig)return;this.log({message:"stop"});let i=!!this.interactiveController;i&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),(e=this.mediaSessionApi)==null||e.destroy();let o=this.videoConfig.videos[0];o&&(this.unmountComponent(this.svelteRootComponent),i?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(o))}setMuted(e){var i;this.log({message:`set muted, muted: ${e}`}),(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;this.log({message:"toggle subtitle"}),(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var o;this.log({message:"change subtitle"}),(o=this.svelteRootComponent)==null||o.changeSubtitle(e,i)}hideControls(){var e;this.log({message:"hide controls"}),(e=this.svelteRootComponent)==null||e.hideControls()}showControls(){var e;this.log({message:"show controls"}),(e=this.svelteRootComponent)==null||e.showControls()}setPiPEnabled(e){var i,o;(o=(i=this.store)==null?void 0:i.webApi.pictureInPictureApi)==null||o.setEnabled(e)}setVolume(e){var i;this.log({message:`set volume, volume: ${e}`}),(i=this.svelteRootComponent)==null||i.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,n(Jn)&&(n(Jn).needToRepeatPlaylist=this.needToRepeatPlaylist,n(Jn).showNextPrevButtons=this.needToShowNextPrevButtons(),n(Jn).nextButtonActive=this.isNextButtonActive(),n(Jn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return Dp(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return Dp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe((0,Fi.once)()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Na(e)}};var vd=require("@vkontakte/videoplayer-shared/es2015"),Hp=require("@vkontakte/videoplayer-core/es2015"),VC=()=>{window.customElements.define("vk-video-player",Bp)};
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 Vm(t,e){B(e,!0);let i=h(e,"isSubtitlesEnabled",3,!1),r=ve().ui.t,a=m(()=>i()?r("tooltip_subtitles_on"):r("tooltip_subtitles_off"));Gt(t,{testId:"subtitles-btn",get ariaLabel(){return n(a)},get click(){return e.click},get ariaKeyShortCut(){return hs.KeyC},role:"button",children:(l,d)=>{let s=m(()=>i()?void 0:"outline");ca(l,{get size(){return"24"},get type(){return n(s)}})},$$slots:{default:!0}}),F()}var lx=M('<span class="duration s-23" data-testid="video_duration"> </span>'),dx=M('<div><span class="current s-23" data-testid="current_time"> </span> <!></div>'),cx={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 mc(t,e){B(e,!0),Q(t,cx);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=Rt(),d=de(!1),s=m(()=>nn(e.duration)),u=m(()=>nn(e.position));var f=dx();let p;var v=T(f),$=T(v,!0);S(v);var y=A(v,2);{var g=w=>{var I=lx(),C=T(I,!0);S(I),D(()=>me(C,n(s))),b(w,I)};R(y,w=>{r()&&w(g)})}S(f),Ms(f,()=>ql(o()&&l.features.usePerformanceFix,d,l.disableInvisibleComponentsTimeout)),Ze(f,w=>a(w),()=>a()),D(w=>{p=se(f,1,"time s-23",null,p,w),me($,n(u))},[()=>({mobile:i()})]),b(t,f),F()}var gc=require("@vkontakte/videoplayer-shared/es2015");var ux=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),px=Ce("<path></path>"),fx=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 ua(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(()=>vn(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";Je(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=fx(),v=A(ce(p));{var $=g=>{var w=ux();ui(),b(g,w)},y=g=>{var w=px();D(()=>Me(w,"d",`${d}${n(a)==="max"?s:""}`)),b(g,w)};R(v,g=>{n(a)==="off"?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var Do=require("@vkontakte/videoplayer-shared/es2015");var lp=require("@vkontakte/videoplayer-shared/es2015");var yb=require("@vkontakte/videoplayer-shared/es2015");var mx=M('<div class="overlay"><!></div>');function Rm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(l,"$overlayContainer$",i),l=ve().ui.overlayContainer$,d=K(void 0),s=v=>{!v||!n(d)||!v.contains(n(d))||v.removeChild(n(d))},u=v=>{!v||!n(d)||v.contains(n(d))||v.appendChild(n(d))};Oe(()=>{u(r())}),Vt(()=>(u(r()),()=>s(r())));var f=mx(),p=T(f);si(p,()=>{var v;return(v=e.children)!=null?v:_t}),S(f),Ze(f,v=>O(d,v),()=>n(d)),b(t,f),F(),o()}var vx=M('<div class="tooltip s-1p"><div class="content s-1p"> </div> <div class="tooltip-pointer s-1p"></div></div>'),gx=M("<div><!></div> <!>",1),hx={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 ja(t,e){B(e,!0),Q(t,hx);let[i,o]=Re(),r=()=>x(j,"$overlayContainer$",i),a=()=>x(z,"$containerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"content",3,""),s=h(e,"active",15,!1),u=h(e,"translateX",3,0),f=h(e,"translateY",3,0),p=h(e,"isFullWidthWrapper",3,!1),v=h(e,"maxTooltipWidth",3,void 0),$=h(e,"placement",3,"top"),y=h(e,"onVisibilityChange",3,yb.noop),g=5,w=K(void 0),I=K(void 0),C,N=K(0),L=K(0),E=K(0),P=K(0),q=Rt(),H=ve(),z=H.ui.playerSize,j=H.ui.overlayContainer$;Oe(()=>{It(()=>{y()(s())})});let ae=H.getLogger().createComponentLog("Tooltip component"),X=()=>{if(!r()||!n(I)||!n(w))return;O(L,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.width,ze=n(I).clientWidth,it=a().width,ye=(ke-ze)/2,Ie=Ae.left+u()-U.left,Fe=Ie+ye,Dt=Ae.top+f()-U.top,vt=ze/2-g,Ht=Fe<8,ct=Fe+ze>it-8;Ht&&(Fe=8,vt=Ie+Ae.width/2-2.5*g),ct&&(Fe=it-8-ze,vt=Ae.left-U.left+Ae.width/2-Fe-g),O(E,Fe,!0),O(P,Dt),O(N,vt,!0)},ne=()=>{!r()||!n(I)||!n(w)||O(L,-g)},J=()=>{if(!r()||!n(I)||!n(w))return;O(N,g);let U=r().getBoundingClientRect(),Ae=n(w).getBoundingClientRect(),ke=Ae.height,ze=n(I).clientHeight,it=(ke-ze)/2+ze,ye=Ae.left+u()-U.left-n(I).clientWidth,Ie=2,Fe=ye-g;Fe<8&&(Fe=8);let vt=Ae.top+f()-U.top+it,Ht=Ie-it/2,ct=Ie-g;O(E,Fe,!0),O(P,vt),O(L,Ht),O(N,ct)},we=()=>{!r()||!n(I)||!n(w)||O(N,-g)},pe=()=>{switch($()){case"top":X();break;case"bottom":ne();break;case"left":J();break;default:we()}},re=()=>{try{if(!r()||!n(w))return;pe(),s(!0)}catch(U){ae({message:String(U)})}},_e=()=>{s(!1)},$e=()=>{n(I)&&(C||(C=window.setTimeout(re,q.controls.hideTimeoutTooltips)),s()&&re())},ee=()=>{_e(),window.clearTimeout(C),C=void 0},Ne=(U,Ae,ke)=>{let ze="";switch($()){case"top":ze=`transform: translate(${U}px, ${Ae}px);`;break;case"bottom":ze=`transform: translate(${U}px, ${Ae}px); top: auto; bottom: 100%;`;break;case"left":ze=`transform: translate(${U}px, ${Ae}px); left: 0; right: auto;`;break;default:ze=`transform: translate(${U}px, ${Ae}px);`}return ze+=` max-width: ${v()===void 0?"auto":`${v()}px`};`,ze+=` opacity: ${ke?1:0}; visibility: ${ke?"visible":"hidden"}`,ze},fe=(U,Ae)=>{let ke="";switch($()){case"top":ke=`transform: translate(${U}px, ${Ae}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":ke=`transform: translate(${U}px, ${Ae}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":ke=`transform: translate(${U}px, ${Ae}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:ke=`transform: translate(${U}px, ${Ae}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return ke},k=m(()=>Ne(n(E),n(P),s())),Ke=m(()=>fe(n(N),n(L)));Vt(pe),mn(()=>window.clearTimeout(C));var Te=gx(),Z=ce(Te);let ie;Z.__pointermove=$e,Z.__pointerdown=ee,Z.__pointerup=function(...U){var Ae;(Ae=e.disableMouseupTooltipShow?void 0:$e)==null||Ae.apply(this,U)};var De=T(Z);si(De,()=>{var U;return(U=e.children)!=null?U:_t}),S(Z),Ze(Z,U=>O(w,U),()=>n(w));var Be=A(Z,2);{var ot=U=>{Rm(U,{children:(Ae,ke)=>{var ze=vx(),it=T(ze),ye=T(it,!0);S(it);var Ie=A(it,2);S(ze),Ze(ze,Fe=>O(I,Fe),()=>n(I)),D(()=>{Qe(ze,n(k)),me(ye,d()),Qe(Ie,n(Ke))}),b(Ae,ze)},$$slots:{default:!0}})};R(Be,U=>{d()&&!l()&&U(ot)})}D(U=>ie=se(Z,1,"tooltip-wrapper s-1p",null,ie,U),[()=>({"full-width":p()})]),dt("pointerenter",Z,$e),dt("pointerleave",Z,ee),b(t,Te),F(),o()}je(["pointermove","pointerdown","pointerup"]);var xb=t=>{t.stopPropagation()},_x=M("<div><!></div>"),bx={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 Oo(t,e){B(e,!0),Q(t,bx);let[i,o]=Re(),r=()=>x(u,"$isGraphOpened$",i),a=()=>x(s,"$isMobile",i),l=ve(),d=Co(),s=l.ui.isMobile,u=d.graphIsOpened$,f=l.ui.t,p=h(e,"className",3,""),v=h(e,"disabled",3,!1),$=h(e,"hasTooltip",3,!0),y=h(e,"ref",15,void 0),g=h(e,"width",15,void 0),w=h(e,"isFullWidthTooltip",3,!0),I=h(e,"tooltipContent",3,""),C=h(e,"tooltipVisible",3,!1),N=h(e,"tooltipPlacement",3,"top"),L=h(e,"disabledTooltipContent",19,()=>f("tooltip_button_disabled")),E=h(e,"isAriaHidden",3,!1),P=h(e,"onTooltipVisibilityChange",3,lp.noop),q=h(e,"initialTranslateXPx",3,0),H=h(e,"initialTranslateYPx",19,()=>-18),z=h(e,"mouseEnter",3,lp.noop),j=h(e,"mouseLeave",3,lp.noop),ae=m(()=>v()?r()?f("tooltip_disabled_when_graph_on"):L():I()),X=K(!1);Oe(()=>{C()||O(X,!1)});var ne=_x();ne.__pointerdown=[xb],ne.__click=[xb];var J=T(ne);{var we=re=>{ja(re,{get content(){return n(ae)},get translateX(){return q()},get translateY(){return H()},get isFullWidthWrapper(){return w()},get placement(){return N()},get onVisibilityChange(){return P()},get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get active(){return n(X)},set active(_e){O(X,_e,!0)},children:(_e,$e)=>{var ee=Le(),Ne=ce(ee);si(Ne,()=>{var fe;return(fe=e.children)!=null?fe:_t}),b(_e,ee)},$$slots:{default:!0}})},pe=re=>{var _e=Le(),$e=ce(_e);si($e,()=>{var ee;return(ee=e.children)!=null?ee:_t}),b(re,_e)};R(J,re=>{$()&&n(ae)&&!a()?re(we):re(pe,!1)})}S(ne),Ze(ne,re=>y(re),()=>y()),D(()=>{var re;se(ne,1,`btn-container ${(re=p())!=null?re:""}`,"s-1j"),Me(ne,"aria-hidden",E()||null)}),dt("mouseenter",ne,function(...re){var _e;(_e=z())==null||_e.apply(this,re)}),dt("mouseleave",ne,function(...re){var _e;(_e=j())==null||_e.apply(this,re)}),Ln(ne,"clientWidth",g),b(t,ne),F(),o()}je(["pointerdown","click"]);var $x=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 vc(t,e){let i=m(()=>(e.completed,"interactive-episode-completed-icon"));Je(t,{width:"20",height:"20",fill:"none",get testId(){return n(i)},children:(o,r)=>{var a=$x(),l=ce(a),d=A(l);D(()=>{Me(l,"fill",oa),Me(l,"fill-opacity",e.completed?1:.24),Me(d,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(o,a)},$$slots:{default:!0}})}var yx=M("<div><!></div>"),xx={hash:"s-14",code:".interactive-episode-icon.s-14{cursor:default;height:20px;position:absolute;transform:translateX(-50%);width:20px}.interactive-episode-icon.disabled.s-14{opacity:.4;pointer-events:none}"};function Nm(t,e){B(e,!0),Q(t,xx);let o=ve().ui.t,r=K(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Oo(t,{get tooltipContent(){return n(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return n(r)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(l,d)=>{var s=yx();let u;var f=T(s);let p=m(()=>!!e.videoEpisode.completed);vc(f,{get completed(){return n(p)}}),S(s),D(v=>{u=se(s,1,"interactive-episode-icon s-14",null,u,v),Qe(s,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Ln(s,"clientWidth",v=>O(r,v)),b(l,s)},$$slots:{default:!0}}),F()}var wx=M('<div><div class="video-episode-inner s-15"><div class="video-episode-loaded s-15"></div> <div></div></div></div>'),Sx=M('<div class="video-episodes-wrap s-15"></div>'),Cx={hash:"s-15",code:".video-episodes-wrap.s-15{height:100%;position:absolute;width:100%}.video-episode.s-15{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-15:first-child{padding-left:0}.video-episode.s-15:last-child{padding-right:0}.video-episode.s-15:not(.disabled):where(:hover,:active){transform:scaleY(1.5)}.video-episode-filled.s-15,.video-episode-inner.s-15,.video-episode-loaded.s-15{border-radius:var(--slider-radius);height:var(--slider-height);position:absolute}.video-episode-inner.s-15{background:var(--slider-bg);overflow:hidden;position:absolute;width:calc(100% - var(--slider-video-episode-gap)*2)}.video-episode.s-15:first-child .video-episode-inner:where(.s-15),.video-episode.s-15:last-child .video-episode-inner:where(.s-15){width:calc(100% - var(--slider-video-episode-gap))}.video-episode-loaded.s-15{background:var(--slider-loaded-bg);transition:transform .2s}.video-episode-filled.s-15,.video-episode-loaded.s-15{border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.video-episode-filled.s-15{background-color:var(--slider-filled-bg)}"};function Om(t,e){Q(t,Cx);let i=h(e,"videoEpisodes",19,()=>[]);var o=Sx();xi(o,21,i,r=>r.from,(r,a)=>{var l=wx();let d;var s=T(l),u=T(s),f=A(u,2);let p;S(s),S(l),D((v,$)=>{d=se(l,1,"video-episode s-15",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-15",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 Tx(t,e,i,o,r,a,l){if(t.preventDefault(),e()&&O(i,e().getBoundingClientRect(),!0),o()||n(r)||!e())return;O(r,!0);let d=a(t.clientX,t.clientY);l()(d,t),e().setPointerCapture(t.pointerId)}function Ix(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;O(i,!1);let a=o(t.clientX,t.clientY);r()(a,t)}function Px(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}function kx(t,e,i,o,r,a){let l=e(t.clientX,t.clientY);i()&&o()(l),O(r,!1),a()(l)}var Ax=M("<div></div>"),Lx=M('<div class="bars s-h"><div class="loaded s-h"></div> <div></div></div>'),Mx=M('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),Vx={hash:"s-h",code:'.interactive-icons.s-h{position:absolute;top:-28px;width:calc(100% - 20px)}.interactive-icons.mobile.s-h{top:-10px}.slider.s-h{border-radius:var(--slider-radius);cursor:pointer;height:var(--slider-height);position:relative;touch-action:none;transition:opacity .2s;width:100%;will-change:opacity,transform;-webkit-tap-highlight-color:transparent}.no-handle.s-h{cursor:default}.slider.s-h:before{content:"";height:calc(var(--controls-height)/2);left:0;position:absolute;right:0;top:calc((var(--controls-height)/2 - var(--slider-height))*-1/2)}.bars.s-h{background:var(--slider-bg);overflow:hidden}.bars.s-h,.loaded.s-h{border-radius:var(--slider-radius);height:100%;position:absolute;width:100%}.loaded.s-h{background:var(--slider-loaded-bg);left:-100%;transition:transform .2s;will-change:transform}.filled.s-h{background-color:var(--slider-filled-bg);border-radius:var(--slider-radius);height:100%;left:-100%;position:absolute;width:100%}.slider.square.s-h,.slider.square.s-h .filled:where(.s-h),.slider.square.s-h .loaded:where(.s-h),.slider.square.s-h>.bars:where(.s-h){border-radius:unset}.filled.active-live.s-h{background-color:var(--timeline-slider-filled-active-live-bg)}.filled.ads.s-h{background-color:var(--slider-filled-ads)}.handleWrap.s-h{left:-100%;position:absolute;width:100%}.handle.s-h{background-color:var(--slider-handle-bg);border-radius:50%;height:var(--slider-handle-size);opacity:0;position:absolute;right:calc(var(--slider-handle-size)*-1/2);top:calc((var(--slider-height) - var(--slider-handle-size))/2);transform:scale(0);transition:opacity .2s,transform .2s;visibility:hidden;width:var(--slider-handle-size);will-change:opacity,transform}.handle.active-live.s-h{background-color:var(--timeline-slider-handle-active-live-bg)}.handle-always-visible.s-h .handle:where(.s-h),.slider-dragging.s-h .handle:where(.s-h),.slider.s-h:hover .handle:where(.s-h){opacity:1;transform:scale(1);visibility:visible}.slider-dragging.s-h .handle:where(.s-h){transform:scale(1.3)}.slider-vertical.s-h{left:-8px;position:absolute;top:-18px;transform:rotate(-90deg);transform-origin:0 0}.slider.disabled.s-h{cursor:default;opacity:.4}'};function Xa(t,e){B(e,!0),Q(t,Vx);let i=h(e,"ref",15,void 0),o=h(e,"className",3,""),r=h(e,"testId",3,void 0),a=h(e,"isHidden",3,!1),l=h(e,"isVertical",3,!1),d=h(e,"isActiveLive",3,!1),s=h(e,"isMobile",3,!1),u=h(e,"squareBorders",3,!1),f=h(e,"videoEpisodes",19,()=>[]),p=h(e,"withWheelHandler",3,!1),v=h(e,"isInteractive",3,!1),$=h(e,"disabled",3,!1),y=h(e,"hideHandel",3,!1),g=h(e,"onPointerDown",3,Do.noop),w=h(e,"onHandleMove",3,Do.noop),I=h(e,"onPointerUp",3,Do.noop),C=h(e,"onPointerEnter",3,Do.noop),N=h(e,"onPointerMove",3,Do.noop),L=h(e,"onPointerLeave",3,Do.noop),E=h(e,"onMouseEnter",3,Do.noop),P=h(e,"onMouseLeave",3,Do.noop),q=h(e,"onWheelUp",3,Do.noop),H=h(e,"onWheelDown",3,Do.noop),z=h(e,"onWheelLeft",3,Do.noop),j=h(e,"onWheelRight",3,Do.noop),ae=h(e,"onDisabledClick",3,Do.noop),X=h(e,"loadedProgress",3,0),ne=h(e,"filledProgress",3,0),J=h(e,"handleProgress",3,0),we=h(e,"ariaLabel",3,""),pe=h(e,"ariaValueMin",3,void 0),re=h(e,"ariaValueMax",3,void 0),_e=h(e,"ariaValueNow",3,void 0),$e=h(e,"ariaValueText",3,""),ee=h(e,"onContextMenu",3,Do.noop),Ne=h(e,"handleAlwaysVisible",3,!1),fe=Rt(),k=K(void 0),Ke=K(!1),Te=m(()=>{var he;return(he=re())!=null?he:0}),Z=m(()=>{var he;return(0,Do.isNonNullable)(f())&&((he=f()[f().length-1])==null?void 0:he.time)<n(Te)}),ie=m(()=>(0,Do.isNonNullable)(f())&&f().length&&n(Z)&&n(Te)?it(X()*100,ne()*100):[]);function De(he){if(he.preventDefault(),i()&&O(k,i().getBoundingClientRect(),!0),$())return;let Ve=ke(he.clientX,he.clientY),st=ze(he.clientX);C()(Ve,st,n(k).width)}function Be(he){he.preventDefault(),!$()&&L()()}function ot(){E()()}function U(){P()()}function Ae(he){$()||p()&&(he.preventDefault(),he.deltaY<0?q()():he.deltaY>0?H()():he.deltaX>0?j()():z()())}function ke(he,Ve){return l()?Math.max(0,Math.min(1,(n(k).height-(Ve-n(k).top))/n(k).height)):Math.min(Math.max(he-n(k).x,0),n(k).width)/n(k).width}function ze(he){return Math.min(Math.max(he-n(k).x,0),n(k).width)}function it(he,Ve){let st=fe.features.episodesClustering&&!v()?fe.episodeMinWidthPc:0,mt=[],ue=f()[0].time/n(Te)*100,We=0,Ye=0;for(let Wt=1;Wt<f().length;Wt++)We=f()[Wt].time/n(Te)*100,We-ue>st&&(mt.push({from:ue,width:Math.max(0,We-ue),loadedWidth:Math.max(0,Math.min(We,he)-ue),filledWidth:Math.max(0,Math.min(We,Ve)-ue),interactive:f()[Wt-1].interactive,completed:f()[Wt-1].completed}),ue=f()[Wt].time/n(Te)*100,Ye++);let ut={from:ue,width:Math.max(0,100-ue),loadedWidth:Math.max(0,Math.min(he,100)-ue),filledWidth:Math.max(0,Math.min(Ve,100)-ue),interactive:f()[Ye].interactive,completed:f()[Ye].completed};100-ue<st?(Ye-=1,mt[Ye].width+=100-ue,mt[Ye].loadedWidth+=Math.max(0,Math.min(he,100)-ue),mt[Ye].filledWidth+=Math.max(0,Math.min(Ve,100)-ue)):mt[Ye]=ut;let zt=f()[0].time;if(zt!==0){let Wt=zt/n(Te)*100;mt.unshift({from:0,width:Wt,loadedWidth:Math.min(Wt,he),filledWidth:Math.min(Wt,Ve)})}return mt}function ye(he){return Math.max(0,Math.min(100,he*100))}let Ie=m(()=>ye(X())),Fe=m(()=>ye(ne()));var Dt=Mx(),vt=ce(Dt);{var Ht=he=>{var Ve=Ax();let st;xi(Ve,21,()=>n(ie),mt=>mt.from,(mt,ue)=>{var We=Le(),Ye=ce(We);{var ut=zt=>{Nm(zt,{get videoEpisode(){return n(ue)},get disabled(){return $()}})};R(Ye,zt=>{n(ue).interactive&&zt(ut)})}b(mt,We)}),S(Ve),D(mt=>st=se(Ve,1,"interactive-icons s-h",null,st,mt),[()=>({mobile:s(),hidden:s()&&!n(Ke)})]),b(he,Ve)};R(vt,he=>{v()&&he(Ht)})}var ct=A(vt,2);let St;ct.__pointerdown=[Tx,i,k,$,Ke,ke,g],ct.__pointermove=[Ix,$,ke,ze,N,k,Ke,w],ct.__pointerup=[Ex,$,Ke,ke,I],ct.__click=[Px,$,ae,ke],ct.__contextmenu=[kx,ke,$,ae,Ke,ee];var ni=T(ct);{var At=he=>{Om(he,{get videoEpisodes(){return n(ie)},get disabled(){return $()},get isMobile(){return s()}})},Bt=he=>{var Ve=Lx(),st=T(Ve),mt=A(st,2);let ue;S(Ve),D(We=>{Me(st,"data-value",n(Ie)),Qe(st,`transform: translateX(${n(Ie)}%);`),ue=se(mt,1,"filled s-h",null,ue,We),Me(mt,"data-value",n(Fe)),Qe(mt,`transform: translateX(${n(Fe)}%);`)},[()=>({"active-live":d()})]),b(he,Ve)};R(ni,he=>{n(ie).length?he(At):he(Bt,!1)})}var Ut=A(ni,2);let Y;var Se=T(Ut);let le;S(Ut),S(ct),Ze(ct,he=>i(he),()=>i()),D((he,Ve,st,mt)=>{var ue,We;St=se(ct,1,`slider ${(ue=o())!=null?ue:""}`,"s-h",St,he),Me(ct,"aria-label",we()),Me(ct,"aria-valuemin",pe()),Me(ct,"aria-valuemax",re()),Me(ct,"aria-valuenow",_e()),Me(ct,"aria-valuetext",$e()),Me(ct,"data-testid",(We=r())!=null?We:null),Y=se(Ut,1,"handleWrap s-h",null,Y,Ve),Qe(Ut,st),le=se(Se,1,"handle s-h",null,le,mt)},[()=>({disabled:$(),"slider-dragging":n(Ke),hidden:a(),"handle-always-visible":Ne(),"slider-vertical":l(),"no-handle":y(),square:u()}),()=>({hidden:y()}),()=>`transform: translateX(${ye(J())}%);`,()=>({"active-live":d()})]),dt("pointerenter",ct,De),dt("pointerleave",ct,Be),dt("mouseenter",ct,ot),dt("mouseleave",ct,U),dt("wheel",ct,Ae),b(t,Dt),F()}je(["pointerdown","pointermove","pointerup","click","contextmenu"]);var ro=(t,e)=>Zd[t]>=Zd[e];var Ns=(t,e)=>Zd[t]<=Zd[e],wb=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var Nx=M("<div><!></div>"),Ox=M("<div><!> <!></div>"),Dx={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 Dm(t,e){var ze,it;B(e,!0),Q(t,Dx);let[i,o]=Re(),r=()=>x(N,"$isAudioAvailable$",i),a=()=>x(v,"$muted$",i),l=()=>x(p,"$volume$",i),d=()=>x(w,"$currentGridType$",i),s=()=>x(De,"$controlsVisible",i),u=ve(),f=Rt(),p=u.state.volume$,v=u.state.muted$,{setVolume:$,startVolumeChanging:y,stopVolumeChanging:g}=u.actions.internal,w=u.ui.currentGridType$,I=(ze=u.callbacks)==null?void 0:ze.onAudioDoesNotExistHint,C=(it=u.callbacks)==null?void 0:it.onAudioDisabledHint,N=u.state.isAudioAvailable$,L=u.state.isAudioDisabled,E=u.ui.t,P=K(!1),q,H=m(()=>e.isAds||r()),z=m(()=>!n(H)||a()||l()===0),j=m(()=>Ns(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?!C:r()?!1:!I);function pe(ye){y(),$(ye)}function re(){np(u,l(),f.controls.volumeStepWheel)}function _e(){rp(u,l(),f.controls.volumeStepWheel)}function $e(ye){$(ye)}function ee(ye){$(ye),g()}function Ne(){J=!0}function fe(){J=!1,Te()}function k(){clearTimeout(q),O(P,!0)}function Ke(){Te()}function Te(){q=window.setTimeout(()=>{J||O(P,!1)},f.controls.volumeBarTimeout)}function Z(ye){ye.preventDefault(),ye.deltaY<0?re():ye.deltaY>0&&_e()}let ie=K(!1),De=u.ui.controlsVisible;Oe(()=>{s()||O(ie,!1)});var Be=Ox();let ot;var U=T(Be);ja(U,{get content(){return n(ae)},translateY:-18,get active(){return n(ie)},set active(ye){O(ie,ye,!0)},children:(ye,Ie)=>{let Fe=m(()=>n(j)?"btn-volume-vertical":"btn-volume-horizontal");Gt(ye,{className:"btn-full-opacity",get disabled(){return n(we)},get testId(){return n(Fe)},get ariaLabel(){return n(X)},get click(){return e.click},get ariaKeyShortCut(){return hs.KeyM},role:"button",children:(Dt,vt)=>{ua(Dt,{get size(){return"24"},get volume(){return l()},get muted(){return n(z)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Ae=A(U,2);{var ke=ye=>{var Ie=Nx();let Fe;var Dt=T(Ie);let vt=m(()=>n(j)?"volumeBar-slider-vertical":""),Ht=m(()=>n(j)&&!n(P)),ct=m(()=>n(j)?Ne:gc.noop),St=m(()=>n(j)?fe:gc.noop),ni=m(()=>Math.round(n(ne)*100)),At=m(()=>`${Math.round(n(ne)*100)}%`),Bt=m(()=>n(j)?"volume-slider-vertical":"volume-slider");Xa(Dt,{get className(){return n(vt)},get isHidden(){return n(Ht)},get isVertical(){return n(j)},withWheelHandler:!0,onWheelUp:re,onWheelDown:_e,onPointerDown:pe,onHandleMove:$e,onPointerUp:ee,get onPointerEnter(){return n(ct)},get onPointerLeave(){return n(St)},ariaLabel:"Ползунок громкости",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return n(ni)},get ariaValueText(){return n(At)},get filledProgress(){return n(ne)},get handleProgress(){return n(ne)},get testId(){return n(Bt)}}),S(Ie),D(Ut=>Fe=se(Ie,1,"volumeBar s-29",null,Fe,Ut),[()=>({"volumeBar-vertical":n(j)})]),b(ye,Ie)};R(Ae,ye=>{n(H)&&ye(ke)})}S(Be),D(ye=>ot=se(Be,1,"volumeBar-container s-29",null,ot,ye),[()=>({vertical:n(j)})]),dt("mouseenter",Be,function(...ye){var Ie;(Ie=n(j)?k:gc.noop)==null||Ie.apply(this,ye)}),dt("mouseleave",Be,function(...ye){var Ie;(Ie=n(j)?Ke:gc.noop)==null||Ie.apply(this,ye)}),dt("wheel",Be,Z),b(t,Be),F(),o()}var Sb=require("@vkontakte/videoplayer-shared/es2015");var Bx=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>'),Fx=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 Bm(t,e){let i=h(e,"isFullscreen",8,!1),o=In(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");Je(t,{get testId(){return n(o)},children:(r,a)=>{var l=Le(),d=ce(l);{var s=f=>{var p=Bx();b(f,p)},u=f=>{var p=Fx();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}function hc(t,e){B(e,!0);let i=h(e,"isFullscreen",3,!1),o=h(e,"click",3,Sb.noop),r=ve(),a=r.ui.isFullscreenOpenedByKeyboard,l=r.ui.t,d=m(()=>i()?l("tooltip_fullscreen_on"):l("tooltip_fullscreen_off"));Gt(t,{testId:"fullscreen-btn",get ariaLabel(){return n(d)},click:u=>{let f=aa(u);a.set(f),o()()},get ariaKeyShortCut(){return hs.KeyF},role:"button",children:(u,f)=>{Bm(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),F()}var Hx=Ce('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.26 4.26C3 5.54 3 7.57 3 11.65v.72c0 4.07 0 6.11 1.26 7.38C5.54 21 7.57 21 11.65 21h.72c4.07 0 6.11 0 7.38-1.26C21 18.47 21 16.43 21 12.36v-.72c0-4.07 0-6.11-1.26-7.38C18.47 3 16.43 3 12.36 3h-.72C7.57 3 5.53 3 4.26 4.26M6 8.5c.1 4.68 2.56 7.5 6.61 7.5h.24v-2.68c1.47.15 2.57 1.25 3.02 2.68H18a6 6 0 0 0-3-3.76 5.7 5.7 0 0 0 2.55-3.74h-1.94c-.4 1.49-1.61 2.84-2.77 2.97V8.5h-1.96v5.2c-1.2-.3-2.76-1.76-2.83-5.2z" clip-rule="evenodd"></path></svg>');function Fm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=Hx();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(),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 Hm(t,e){let i=Mn(e,["$$slots","$$events","$$legacy","children"]);var o=Ux();no(o,()=>Ee({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"var(--btn-color, #fff)","fill-rule":"evenodd","aria-hidden":"true","clip-rule":"evenodd",viewBox:"0 0 95 24",role:"img"},i));var r=T(o);si(r,()=>{var a;return(a=e.children)!=null?a:_t}),ui(6),S(o),b(t,o)}var zx={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 Um(t,e){B(e,!0),Q(t,zx);let i=h(e,"short",3,!1),o=h(e,"isCyrillic",3,!0),r=h(e,"logo",19,()=>"vk_video"),a="vk-video-logo-icon--short",l=24,d=m(()=>!o()&&!i()?91:i()?l:95),s=m(()=>!o()&&!i()?"vk-video-logo-icon--en":i()?a:"vk-video-logo-icon"),u=m(()=>`0 0 ${n(d)} 24`);Hm(t,{get width(){return n(d)},height:"24",get viewBox(){return n(u)},get"data-testid"(){return n(s)},get"data-logo"(){return r()}}),F()}function _c(t,e){B(e,!0);let[i,o]=Re(),r=()=>x($,"$isMobile",i),a=()=>x(v,"$currentGridType$",i),l=()=>x(g,"$isCyrillicRelatedInterface$",i),d=h(e,"ref",15,void 0),s=h(e,"logoClickable",3,!1),u=h(e,"targetUrl",3,""),f=Rt(),p=ve(),v=p.ui.currentGridType$,$=p.ui.isMobile,y=p.ui.t,g=p.isCyrillicRelatedInterface$,w=m(()=>f.logoType!=="vk"),I=m(()=>n(w)?y("tooltip_vk_video_logo"):y("tooltip_vk_logo")),C=m(()=>(r()&&Ns(a(),"m")||Ns(a(),"l"))&&n(w)),N=()=>{var P,q;e.click(),(P=p.callbacks)!=null&&P.onLogoClicked?(q=p.callbacks)==null||q.onLogoClicked():u()&&window.open(u(),"_blank")},L=m(()=>!s()),E=m(()=>n(w)?"btn-vk-video-logo":"btn-vk-logo");Gt(t,{className:"btn-full-opacity",get disabled(){return n(L)},click:N,get testId(){return n(E)},get ariaLabel(){return n(I)},get ref(){return d()},set ref(P){d(P)},children:(P,q)=>{var H=Le(),z=ce(H);{var j=X=>{Um(X,{get logo(){return f.logoType},get short(){return n(C)},get isCyrillic(){return l()}})},ae=X=>{Fm(X,{})};R(z,X=>{n(w)?X(j):X(ae,!1)})}b(P,H)},$$slots:{default:!0}}),F(),o()}var Tb=require("@vkontakte/videoplayer-core/es2015");var zm=require("@vkontakte/videoplayer-core/es2015");var Wx=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-1a"></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-1a"></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-1a"></path>',1),Kx=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),qx={hash:"s-1a",code:".animated.s-1a{animation-duration:1s;animation-iteration-count:infinite}.wave1.animated.s-1a{animation-name:s-1a-wave1}.wave2.animated.s-1a{animation-name:s-1a-wave2}.wave3.animated.s-1a{animation-name:s-1a-wave3}@keyframes s-1a-wave1{0%{opacity:.3}33%{opacity:1}66%{opacity:1}to{opacity:1}}@keyframes s-1a-wave2{0%{opacity:.3}33%{opacity:.3}66%{opacity:1}to{opacity:1}}@keyframes s-1a-wave3{0%{opacity:.3}33%{opacity:.3}66%{opacity:.3}to{opacity:1}}"};function bc(t,e){B(e,!0),Q(t,qx);let i=h(e,"isMobile",3,!1),o=m(()=>e.iconState===zm.ChromecastState.CONNECTED),r=m(()=>e.iconState===zm.ChromecastState.CONNECTING),a=m(()=>n(o)?"#2688EB":oa),l=m(()=>e.size?vn(e.size):void 0);var d=Le(),s=ce(d);{var u=p=>{Je(p,{get fill(){return n(a)},get style(){return n(l)},testId:"chromecast-mobile-icon",children:(v,$)=>{var y=Wx();ui(2),b(v,y)},$$slots:{default:!0}})},f=p=>{Je(p,{get style(){return n(l)},testId:"chromecast-icon",children:(v,$)=>{var y=Kx(),g=ce(y);let w;var I=A(g);let C;var N=A(I);let L;var E=A(N);let P;var q=A(E);let H;D((z,j,ae,X,ne)=>{w=se(g,0,"wave2 s-1a",null,w,z),C=se(I,0,"wave3 s-1a",null,C,j),L=se(N,0,"wave1 s-1a",null,L,ae),P=se(E,0,"s-1a",null,P,X),H=se(q,0,"s-1a",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()}var Ib=require("@vkontakte/videoplayer-shared/es2015");function $c(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"click",3,Ib.noop),l=ve().ui.t,d=m(()=>e.state===Tb.ChromecastState.CONNECTED?l("tooltip_chromecast_on"):l("tooltip_chromecast_off"));Gt(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)=>{bc(s,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),F()}var Eb=require("@vkontakte/videoplayer-shared/es2015");var Qx=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 Wm(t){Je(t,{testId:"episodes-icon",children:(e,i)=>{var o=Qx();ui(2),b(e,o)},$$slots:{default:!0}})}var dp=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var Gx=M('<span class="text mobile s-26"> </span> <div class="chevron-episodes s-26" data-testid="btn-episodes_icon"><!></div>',1),Yx=M('<span class="text s-26"> </span>'),jx=M('<span class="text count s-26"> </span>'),Xx=M('<span class="icon s-26"><!></span> <!>',1),Zx={hash:"s-26",code:".icon.s-26{flex-shrink:0}.text.s-26{overflow:hidden;padding:0 8px;text-overflow:ellipsis;white-space:nowrap}.text.count.s-26{overflow:visible}.text.mobile.s-26{padding:0 3px 0 4px}.chevron-episodes.s-26{margin-bottom:-6px;opacity:.7;transform:scale(.8)}"};function yc(t,e){var J,we,pe;B(e,!0),Q(t,Zx);let[i,o]=Re(),r=()=>x(y,"$currentGridType$",i),a=()=>x(g,"$openedByKeyboard$",i),l=()=>x(w,"$panelOpened$",i),d=()=>x(I,"$isMobile",i),s=h(e,"position",3,0),u=h(e,"duration",3,0),f=h(e,"timeCodes",19,()=>[]),p=ve(),v=(we=(J=p.callbacks)==null?void 0:J.onEpisodeChanged)!=null?we:Eb.noop,$=!!((pe=p.callbacks)!=null&&pe.onEpisodeClicked),y=p.ui.currentGridType$,g=p.ui.episodes.openedByKeyboard$,w=p.ui.episodes.panelOpened$,I=p.ui.isMobile,C=p.ui.t,N=K(void 0),L=re=>{var $e,ee,Ne;if(!!(($e=p.callbacks)!=null&&$e.onEpisodeClicked)){let fe=aa(re);g.set(fe),w.set(!0),(Ne=(ee=p.callbacks)==null?void 0:ee.onEpisodeClicked)==null||Ne.call(ee,fe)}},E=K(null),P=m(()=>s()/u());Oe(()=>{var _e;let re=dp(n(P),u(),f());re?((_e=n(E))==null?void 0:_e.time)!==re.time&&(v(re),O(E,re,!0)):O(E,null)});let q=m(()=>{var re;return((re=n(E))==null?void 0:re.text)||""}),H=m(()=>ro(r(),"xl")?"FULL":ro(r(),"m")?"COUNT":"SHORT"),z=m(()=>`${C("tooltip_episodes")}: ${n(q)}`),j=(re,_e,$e)=>ht(null,null,function*(){yield _o(),(re==null?void 0:re.getAttribute("aria-expanded"))==="false"&&_e&&!$e&&It(()=>{g.set(!1),re.focus()})});Oe(()=>{j(n(N),a(),l())});var ae=Le(),X=ce(ae);{var ne=re=>{let _e=m(()=>d()?"px-0":""),$e=m(()=>!$);Gt(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){O(N,ee,!0)},children:(ee,Ne)=>{var fe=Le(),k=ce(fe);{var Ke=Z=>{var ie=Gx(),De=ce(ie),Be=T(De,!0);S(De);var ot=A(De,2),U=T(ot);Nr(U,{direction:"right"}),S(ot),D(()=>me(Be,n(q))),b(Z,ie)},Te=Z=>{var ie=Xx(),De=ce(ie),Be=T(De);Wm(Be,{}),S(De);var ot=A(De,2);{var U=ke=>{var ze=Yx(),it=T(ze,!0);S(ze),D(()=>me(it,n(q))),b(ke,ze)},Ae=(ke,ze)=>{{var it=ye=>{var Ie=jx(),Fe=T(Ie,!0);S(Ie),D(()=>me(Fe,f().length)),b(ye,Ie)};R(ke,ye=>{n(H)==="COUNT"&&ye(it)},ze)}};R(ot,ke=>{n(H)==="FULL"?ke(U):ke(Ae,!1)})}b(Z,ie)};R(k,Z=>{d()?Z(Ke):Z(Te,!1)})}b(ee,fe)},$$slots:{default:!0}})};R(X,re=>{n(E)&&re(ne)})}b(t,ae),F(),o()}var pv=require("@vkontakte/videoplayer-shared/es2015");var gi=require("@vkontakte/videoplayer-core/es2015"),at=require("@vkontakte/videoplayer-shared/es2015"),bs=require("@vkontakte/videoplayer-statistics/es2015");var Ge=require("@vkontakte/videoplayer-shared/es2015"),so=require("@vkontakte/videoplayer-shared/es2015");var Jx="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",cp=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 so.Subject,loadStarted$:new so.Subject,loadEnded$:new so.Subject,loadError$:new so.Subject,ready$:new so.Subject,slotRequested$:new so.Subject,started$:new so.Subject,timeRemained$:new so.Subject,paused$:new so.Subject,resumed$:new so.Subject,ended$:new so.Subject,empty$:new so.Subject,skipped$:new so.Subject,clicked$:new so.Subject,closed$:new so.Subject,error$:new so.Subject};this.loadAdman=e=>(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,Ge.now)()]}),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?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,Ge.now)()]}),o())};(0,so.addScript)(Jx,e,this.loadTimeout).then(()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,Ge.now)()]}),window.AdmanHTML?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,Ge.now)()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout))}).catch(l=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(l)],numbers:[(0,Ge.now)()]}),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?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,Ge.now)()]}),o())},l=()=>{d=!0,o()},d=!1,s=window.setTimeout(()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,Ge.now)()]}),l()},this.loadTimeout);e.addEventListener("abort",l),e.aborted&&(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,Ge.now)()]}),l()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[(0,Ge.now)()]}),!d&&(window.AdmanHTML?(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,Ge.now)()]}),i(),this.events.loadEnded$.next()):(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,Ge.now)()]}),window.admanAsyncInit=a,r=window.setTimeout(a,this.initTimeout)))},l).finally(()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener("abort",l)})});this.onAdsReady=()=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,Ge.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var o;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,Ge.now)(),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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")=>{Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,Ge.now)()]}),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"),Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,Ge.now)()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,o){this.actions=e,this.adsState=i,this.playerState=o}onAdmanLoadingError(){this.onAdError("adman loading error")}initAdman(e){return ht(this,null,function*(){var N,L;if(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,Ge.now)(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:o,isAutoplay:r,adsContainer:a,adsVideoElement:l,slotId:d,params:s={},paramsOverride:u={},duration:f,externalApi:p}=e;this.externalApi=p;let v,$=this.playerState&&ge(this.playerState.vsid);$&&(this.isVsidOriginal?v=$:v=parseInt($,36));let{isEmbed:y,immediateOrigin:g}=(0,Ge.detectEmbed)(),w=(N=y?g:window.location.href)!=null?N:window.location.href,I=Ee(jt(Ee(jt(Ee({},s),{dl:encodeURIComponent(w),autoplay:r?1:0,player_width:i,player_height:o}),v?{request_id:v}:{}),{duration:f}),u);I=Object.fromEntries(Object.entries(I).filter(([E,P])=>(0,Ge.isNonNullable)(P)));let C={slot:d,wrapper:a,videoEl:l,videoQuality:o,params:I,browser:{mobile:!1}};try{let E=new window.AdmanHTML;if(E.onReady(this.onAdsReady),E.onStarted(this.onAdStarted),E.onPlayed(this.onAdPlayed),E.onPaused(this.onAdPaused),E.adMidrollPoint(this.onAdMidrollPoint),E.onClosed(this.onAdClosed),E.onSkipped(this.onAdSkipped),E.onClicked(this.onAdClicked),E.onTimeRemained(this.onAdTimeRemained),E.onCompleted(this.onAdCompleted),E.onError(this.onAdError),E.setDebug(!1),(L=this.externalApi)!=null&&L.videoGetAds){let P=yield this.safeExternalCall(this.externalApi.videoGetAds,I);P&&(delete C.slot,delete C.params,Object.assign(C,{json:P}))}E.init(C),this.adman=E,this.videoElement=l,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(C)}`})}catch(E){Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(E)],numbers:[(0,Ge.now)()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var o,r,a;if(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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(Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[(0,Ge.now)()]}),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;Ge.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,Ge.now)()]}),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&&(0,so.clearVideoElement)(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return ht(this,null,function*(){var o;try{return yield e(...i)}catch(r){return this.onAdError((o=r==null?void 0:r.message)!=null?o:"External call failed"),null}})}};var Pb=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 Km=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 up,{startTime:f,endTime:p}=u.parse(s);l.startTime=f,l.endTime=p}else if(s.trim()!==""){let u=new qm,{texts:f}=u.parse(s);l.texts=[...l.texts,...f]}(l.startTime||l.endTime)&&l.texts.length>0&&o.push(l)}return o}},up=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}},qm=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 up;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}},kb=Km;var fp=require("@vkontakte/videoplayer-shared/es2015"),Za,Ni,Qm=0,Gm=!1,Ab="",Lb=(t,e=0,i=0)=>t<e&&t<i,pp=(t,e=0,i=0)=>t>=e&&t<=i,e2=(t,e=0,i=0)=>t>e&&t>i,Mb=(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})=>pp(t,u,f));let a=t>=Qm,l=t<Qm;if(Qm=t,l&&(Gm=!1),(0,fp.isNonNullable)(Za)&&pp(t,Za.startTime,Za.endTime)&&Ab===e.value)return Za;if(!(0,fp.isNonNullable)(Ni)&&(r!=null&&r.length)&&!Gm){Ni=r.find(({startTime:u,endTime:f})=>pp(t,u,f)||a&&Lb(t,u,f)),Za=void 0,!(0,fp.isNonNullable)(Ni)&&r[r.length-1].endTime<t&&(Gm=!0);return}else{if(pp(t,Ni==null?void 0:Ni.startTime,Ni==null?void 0:Ni.endTime))return Za=Ni,Ni=void 0,Ab=e.value,Za;(a&&e2(t,Ni==null?void 0:Ni.startTime,Ni==null?void 0:Ni.endTime)||l&&Lb(t,Ni==null?void 0:Ni.startTime,Ni==null?void 0:Ni.endTime))&&(Ni=void 0)}};var mp={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"},t2={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"},xc=t=>{var e,i;return(i=(e=mp[t])!=null?e:mp[t2[t]])!=null?i:void 0};var Vb=require("@vkontakte/videoplayer-shared/es2015"),GB=require("@vkontakte/videoplayer-statistics/es2015"),vp=class{constructor(e,i,o,r=new Vb.Subscription){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 wc=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(wc||{});var _s=t=>t!=null?t:0,Os=(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(_s(i==null?void 0:i.top)-_s(o==null?void 0:o.top)),left:Math.round(_s(i==null?void 0:i.left)-_s(o==null?void 0:o.left)),bottom:Math.round(_s(i==null?void 0:i.bottom)-_s(o==null?void 0:o.top)),right:Math.round(_s(i==null?void 0:i.right)-_s(o==null?void 0:o.left))}},ed=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:_s(e==null?void 0:e.width),height:_s(e==null?void 0:e.height)}};var Nn="off";var td=t=>!!(Math.round(Math.abs(t)/90)%2);var Rb=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:r,statAuthToken:a,isAudioDisabled:l,canDownload:d,callbacks:s,webApi:u,videoEpisodes:f,previewThumbsData:p,uiConfig:v,coreConfig:$,player:y,disabledControls:g,isInteractive:w,interactiveRanges$:I,isInteractiveTime$:C,replayInteractive:N,stopPlayer:L,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,additionalButtons:q,additionalSettingsMenuItems:H,additionalContextMenuItems:z,playPrevVideo:j,playNextVideo:ae,onVideoChanged:X,looped:ne=!1,statistics:J,saveRate:we,internalsExposure:pe,playerView:re,playerId:_e})=>{var yg,xg,wg;let $e=jt(Ee({},$),{configName:[...(yg=$.configName)!=null?yg:[],"ui"],isAudioDisabled:l,live:jt(Ee({},(xg=$.live)!=null?xg:{}),{isLiveCatchUpMode:!!r})}),ee=v,Ne=at.TracerFactory.createRootTracer(ee.features.tracer),fe=Ne.createComponentTracer("Store"),k=y||new gi.Player($e,Ne,{playerId:_e,onDevNullLog:s==null?void 0:s.onDevNullLog});pe==null||pe.expose({corePlayer:k});let Ke=new at.Logger,Te=new cp(Ke,{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=Ua.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,De=u==null?void 0:u.annotationsApi,Be=u==null?void 0:u.slotsApi,ot=u==null?void 0:u.focusManager,U=Ke.createComponentLog("Store"),Ae,ke,ze={},it=new Fu,ye=new at.Subscription,Ie="",Fe=de(!1),Dt=J&&J.oneStat?ai(J.oneStat.vsid$):Rr(void 0),vt=de(na()),Ht=de(!1),ct=()=>tb(document,gi.clientChecker.device.isIOS),St=(wg=ie==null?void 0:ie.info.isActive$)!=null?wg:new at.ValueSubject(!1),ni=de(0),At=de(!1),Bt=de(!1),Ut=de([]),Y=(0,at.merge)(k.events.fatalError$,k.events.managedError$).subscribe(c=>Ut.update(_=>[..._,c])),Se=Rr(!1,c=>{let _=k.events.fatalError$.subscribe(()=>c(!0));return()=>_.unsubscribe()}),le=c=>ht(null,null,function*(){var oe;let _=Object.values(at.InterfaceLanguage).includes(c);if(ee.downloadVKLanguages&&(_&&ee.updateBuiltinLanguages||!rm(c))){let xe;try{xe=yield(0,at.loadVKLangPack)(c,p_,f_)}catch(Xe){(oe=J==null?void 0:J.oneStat)==null||oe.logError({errorType:"VKLangPack",fatal:!1}),Z==null||Z.report(Xe,{errorType:"VKLangPack",fatal:!1})}xe&&(nm({language:c,pack:xe,fallback:ee.defaultLanguage}),he.set(c),Ve.update(Xe=>Xe+1))}rm(c)&&he.set(c)}),he=de(t),Ve=de(0),st=de(e);le(t);let mt=(c,_)=>{let V=ge(he);return sm(V,c,_,ee.defaultLanguage)},ue=de("thumb");ue.subscribe(c=>{c==="ads"&&k.info.playbackState$.getValue()&&ut()});let We=(()=>{let c=mi([Se,ue],([_,V])=>_?"crashed":V);return jt(Ee({},c),{is:_=>ge(c)===_})})(),Ye=de(),ut=()=>{Ye.set({muted:k.info.muted$.getValue()})},zt=(()=>{let c=de(new Set(g));return jt(Ee({},c),{add:_=>{c.update(V=>new Set([...V].concat(_)))},remove:_=>{c.update(V=>{let oe=[...V];return new Set(Array.isArray(_)?oe.filter(xe=>!_.includes(xe)):oe.filter(xe=>xe!==_))})},includes:_=>{let V=ge(c);return Array.isArray(_)?_.every(oe=>V.has(oe)):V.has(_)}})})(),Wt=de({width:0,height:0}),ri=null,$i=k.info.isBuffering$,Xi=Rr($i.getValue(),c=>{let _=$i.subscribe(V=>{V&&ri===null?ri=window.setTimeout(()=>{c($i.getValue()),ri=null},ee.loaderDelay):c(V)});return()=>{_.unsubscribe(),ri&&clearTimeout(ri)}});fe.log("create store"),U({message:"create store"});let Nt=c=>{let _=c.container,V=()=>{ii=new MutationObserver(xe=>{let{removedNodes:Xe}=xe[0];Xe.length&&_.append(k.experimental.element$.getValue())}),ii.observe(_,{childList:!0})},oe=k.experimental.element$.getValue();if(oe)_.append(oe),V();else{let xe=k.experimental.element$.pipe((0,at.filter)(Xe=>!!Xe),(0,at.once)()).subscribe(Xe=>{_.append(Xe),V()});ye.add(xe)}},fi=c=>{U({message:`init video, config: ${JSON.stringify(c)}`}),w?Nt(c):(at.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,at.now)()]}),k.initVideo(c)),fe.log("init video",{isInteractive:w}),c.subtitles&&k.setExternalTextTracks(c.subtitles),Ae=c,Ie=c.subtitlesForcedLanguage||""},hi=new at.Subject,bt=c=>hi.next(c),ei=new at.Subject,wi=new at.Subject,Zi=new at.Subject,ii=null,Et={actionRewind$:ei,actionSeek$:wi,inPiP$:St,inFullscreen$:new at.Observable(c=>vt.subscribe(_=>c.next(_))),actionSetSubtitle$:Zi,nextMovie$:hi},qe=new at.Subject,yi=new at.Subject,To={actionSeek$:wi,actionSubtitlesSwitched$:qe,actionQuality$:yi,playerSize$:new at.Observable(c=>Wt.subscribe(_=>c.next(_))),inPiP$:St,inFullscreen$:new at.Observable(c=>vt.subscribe(_=>c.next(_))),isLoaderVisible$:new at.Observable(c=>Xi.subscribe(_=>c.next(_)))};if(J){let{oneStat:c,thinOneStat:_,mediascopePixel:V,statSubscription:oe}=J;c&&(w||oe.add(c.attachTo(k)),oe.add(c.attachToUi(Et)),oe.add(c.attachToAds(Te.events)),c.authorize(a).catch(xe=>{U({message:`onestat auth error ${String(xe)}`})}),V&&V.attachTo(k)),_&&(oe.add(_.attachTo(k,Te.events)),oe.add(_.attachToUi(To)),oe.add(_.attachToAds(Te.events)),_.updateContext({isMobile:ge(Fe)}),_.authorize(a))}if(Z){let c=new at.Subscription,_=(V,oe)=>c.add(V.subscribe(oe));if(_(k.events.managedError$,V=>{Z.logIError(V)}),_(k.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 Bo=()=>{if(gi.clientChecker.device.isIOS&&ke)try{ib(ke)}catch(c){U({message:`exitIosSafariFullscreen failed: ${c}`})}};ye.add(k.experimental.element$.subscribe(c=>{c&&(ke=c,c.classList.add("player-media"),Wa(ie)&&ie.updateVideoElement(),w&&c.setAttribute("pip","false"),re==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(k.events.ended$.subscribe(()=>{var c;Bo(),(c=s==null?void 0:s.onEnded)==null||c.call(s)})).add(k.events.looped$.subscribe(()=>{var c;(c=s==null?void 0:s.onLooped)==null||c.call(s)})).add(k.events.started$.subscribe(()=>ht(null,null,function*(){var _,V;Wa(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=k.info.muted$.getValue();(_=s==null?void 0:s.onStarted)==null||_.call(s),(V=ze.onStarted)==null||V.call(ze,c)}))).add(k.events.willSeek$.subscribe(({from:c,to:_})=>{var V;(V=s==null?void 0:s.onSeek)==null||V.call(s,c,_)})).add(k.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=s==null?void 0:s.onAutoplaySoundProhibited)==null||c.call(s)})).add(k.info.position$.subscribe(c=>{var V;let _=k.info.duration$.getValue();isFinite(_)&&_>0&&((V=s==null?void 0:s.onTimeupdate)==null||V.call(s,_,c),Te.setPosition(c,_))})).add(k.events.fatalError$.subscribe(c=>{var _;(_=s==null?void 0:s.onCrashed)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(k.events.fetcherRecoverableError$.subscribe(c=>{var _;(_=s==null?void 0:s.onRecoverableError)==null||_.call(s,c?`${c.id}: ${c.message}`:void 0)})).add(k.events.loadedMetadata$.subscribe(()=>{At.set(!0)})).add(k.info.is3DVideo$.subscribe(c=>{Bt.set(c)})).add(k.info.isEnded$.subscribe(c=>{w&&(c?(C!=null&&C.getValue()&&zt.add(Xd),zt.add("PLAY_BUTTON")):zt.remove("PLAY_BUTTON"))})).add(k.info.liveTime$.subscribe(c=>{var _;(_=s==null?void 0:s.onLiveTime)==null||_.call(s,c)})).add(k.info.isStalled$.subscribe(c=>{var _;(_=s==null?void 0:s.onStalledChanged)==null||_.call(s,c)})).add(k.info.isLiveEnded$.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onLiveEnded)==null?void 0:_.call(s))})).add(Te.events.loadStarted$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:_.call(c)})).add(Te.events.loadEnded$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:_.call(c)})).add(Te.events.loadError$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onLoadError)==null?void 0:_.call(c)})).add(Te.events.init$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onInit)==null?void 0:_.call(c)})).add(Te.events.ready$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onReady)==null?void 0:_.call(c)})).add(Te.events.started$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onStarted)==null?void 0:V.call(_,c)})).add(Te.events.timeRemained$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onTimeRemained)==null?void 0:V.call(_,c)})).add(Te.events.ended$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onCompleted)==null?void 0:V.call(_,c)})).add(Te.events.empty$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onEmpty)==null?void 0:_.call(c)})).add(Te.events.clicked$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClicked)==null?void 0:V.call(_,c)})).add(Te.events.closed$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onClosed)==null?void 0:V.call(_,c)})).add(Te.events.error$.subscribe(c=>{var _,V;return(V=(_=s==null?void 0:s.adsInfo)==null?void 0:_.onError)==null?void 0:V.call(_,c)})).add(Te.events.paused$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onPaused)==null?void 0:_.call(c)})).add(Te.events.resumed$.subscribe(()=>{var c,_;return(_=(c=s==null?void 0:s.adsInfo)==null?void 0:c.onResumed)==null?void 0:_.call(c)}));let Fo=new at.Subscription,Ct=()=>{var Xe,kt,qt;let{debugLog:c}=ee,_,V="#9df7b7",oe="#efd169";if(c&&c!==!0){let{colors:Jt}=c;_=c.tag,V=(Xe=Jt==null?void 0:Jt[0])!=null?Xe:V,oe=(qt=(kt=Jt==null?void 0:Jt[1])!=null?kt:Jt==null?void 0:Jt[0])!=null?qt:oe}let xe=_?`: ${_}`:"";Fo.add(k.events.log$.subscribe(Jt=>{console.debug(`%c sdk${xe} `,`background:${V};`,`sdk component: ${Jt.component}`,Jt.message)})).add(Ke.log$.subscribe(Jt=>{console.debug(`%c ui${xe} `,`background:${oe};`,`ui component: ${Jt.component}.`,Jt.message)}))},Kt=()=>{Fo.unsubscribe()},W=(c,_)=>{fe.log("start camera manual rotation",{mx:c,my:_}),k.startCameraManualRotation(c,_)},Lt=(c=!1)=>{fe.log("stop camera manual rotation",{immediate:c}),k.stopCameraManualRotation(c)},li=(c,_,V)=>{fe.log("move camera focus px",{xpx:c,ypx:_,dt:V}),k.moveCameraFocusPX(c,_,V)},pt=()=>{k.holdCamera()},Tt=()=>{k.releaseCamera()},Xt=Rr(k.info.position$.getValue(),c=>{let _,V,oe=()=>{let xe=k.info.playbackState$.getValue(),Xe=k.info.isLive$.getValue(),kt=k.info.duration$.getValue(),qt=k.info.position$.getValue();if(xe&&[gi.PlaybackState.PLAYING,gi.PlaybackState.PAUSED].includes(xe)){let Jt=Xe?qt-kt:k.getExactTime();Jt!==V&&c(Jt),V=Jt}_=requestAnimationFrame(oe)};return oe(),()=>cancelAnimationFrame(_)}),rt=ai(k.info.playbackState$),zi=ai(k.info.isBuffering$),Wi=mi([rt,zi],([c,_])=>_?"buffering":c),rn=ai(k.info.currentBuffer$),Ho=ai(k.info.isEnded$),lo=ai(k.info.isLive$),Ri=ee.features.playbackRate?ai(k.info.canChangePlaybackSpeed$):Rr(!1),Dr=ai(k.info.liveBufferTime$),bo=ai(k.info.volume$),$o=ai(k.info.muted$),Li=Hu(k.info.predefinedQualityLimitType$.pipe((0,at.map)(c=>c===gi.PredefinedQualityLimits.TRAFFIC_SAVING)),k.info.predefinedQualityLimitType$.getValue()===gi.PredefinedQualityLimits.TRAFFIC_SAVING),sn=Hu(k.info.predefinedQualityLimitType$.pipe((0,at.map)(c=>c===gi.PredefinedQualityLimits.HIGH_QUALITY)),k.info.predefinedQualityLimitType$.getValue()===gi.PredefinedQualityLimits.HIGH_QUALITY),Uo=ai(k.info.autoQualityLimitingAvailable$),On=ai(k.info.availableQualities$),xr=ai(k.info.availableQualitiesFps$),wr=ai(k.info.chromecastState$),ys=ai(k.info.chromecastDeviceName$),rs=ai(k.info.currentFormat$),ss=ai(k.info.throughputEstimation$),tr=ai(k.info.videoBitrate$),Br=ai(k.info.intrinsicVideoSize$),an=ai(k.info.duration$),Dn=ai(k.info.isAudioAvailable$),Sr=()=>{ri&&clearTimeout(ri),ri=null},zo=mi([an,lo],([c,_])=>_?-c:c),ir=mi([rt],([c])=>c===gi.PlaybackState.PLAYING),or=ai(k.info.atLiveEdge$),Fr=ai(k.info.atLiveDurationEdge$),nr=ai(k.info.position$),co=mi([nr,an],([c,_])=>isFinite(c)&&isFinite(_)&&!!_),Hr=mi([wr],([c])=>c===gi.ChromecastState.CONNECTED),rr=ai(k.info.availableVideoStreams$),hn=ee.features.audioLanguages?ai(k.info.availableAudioStreams$):Rr([]),yo=ai(k.info.currentVideoStream$),Cr=ai(k.info.currentAudioStream$),sr=c=>{c.language&&em(c.language),k.setVideoStream(c)},gt=(c,_)=>{k.setAudioStream(c),cn(_)&&(c.language&&em(c.language),ee.features.userVideoPrefs&&i&&om(ee.userSalt,String(i),{audioTrackId:c.id}))},di=c=>{let _;if(c.length===1&&(_=c.at(0)),_!=null||(_=c.find(oe=>"isDefault"in oe&&oe.isDefault)),ee.features.userVideoPrefs&&i){let oe=qu(ee.userSalt,String(i));if(oe!=null&&oe.audioTrackId){let xe=c.find(Xe=>Xe.id===oe.audioTrackId);_=xe!=null?xe:_}}let V=F_();return V&&(_!=null||(_=c.find(({language:oe})=>V===oe))),_!=null||(_=c.at(0)),_},Ur=c=>{fe.log("change audio stream",{id:c});let _=k.info.availableAudioStreams$.getValue().find(V=>V.id===c);_&&gt(_,!0)},ar=!1;ye.add(k.info.availableAudioStreams$.subscribe(c=>{if(!ar&&c.length){let _=di(c);_&&(k.setAudioStream(_),ar=!0)}})),hn.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})))}),Cr.subscribe(c=>{var _;return c&&((_=s==null?void 0:s.onAudioStreamChanged)==null?void 0:_.call(s,c.id))});let zr=!1;ye.add(k.info.availableVideoStreams$.subscribe(c=>{if(!zr&&c.length){let _=di(c);_&&(k.setVideoStream(_),zr=!0)}}));let Wo=de(void 0),Bn=ai(k.info.isAutoQualityEnabled$,c=>c&&Wo.set(void 0)),_n=ai(k.info.currentQuality$,()=>Wo.set(void 0)),ln=mi([Wo,_n],([c,_])=>c!=null?c:_),bn=mi(rs,c=>c!==gi.VideoFormat.MPEG),Tr=mi([On,xr,Bn,ln,bn],([c,_,V,oe,xe])=>{let Xe=[];xe&&Xe.push({value:"auto",displayValue:mt("auto_quality_option"),selected:V});let kt=c.filter(qt=>!(0,at.isInvariantQuality)(qt));for(let qt of kt){let Jt=_[qt];Xe.push({value:qt,displayValue:`${qt}${Jt?Pb(Jt):""}`,selected:V?!1:qt===oe})}return Xe}),Ko=ai(k.info.currentPlaybackRate$),qo=mi([Ko,or,Fr],([c,_,V])=>{let oe=V||w?1:ee.controls.playbackRateMin,xe=_?1:ee.controls.playbackRateMax,Xe=ee.controls.playbackRateStep,kt=[];for(let qt=oe;qt<=xe;qt+=Xe)kt.push({value:qt,displayValue:qt===1?mt("playback_rate_1"):mt("playback_rate",{multiplier:qt.toString(10)}),selected:c===qt});return kt}),$n=()=>({displayValue:mt("subtitles_off"),value:Nn,language:""}),Ir=de($n()),Si=mi([Ir,Ve],([c],_)=>{c.value===Nn?_($n()):_(c)}),yn=ee.features.subtitles?ai(k.info.availableTextTracks$):Rr([]),Fn=E_(),lr=mi([yn,Si],([c,_],V)=>{var Xe;let oe=[],xe=c.find(({id:kt})=>kt===_.value);if(xe!=null&&xe.url){let[,kt]=(Xe=Fn.find(xe.url))!=null?Xe:[];if(kt){V(kt);return}it.download(xe.url).then(qt=>{if(!qt||it.isDestroyed())return;let Jt=new kb,Qs=xe.language;if(Qs){let R$=!!xe.isAuto,N$=Jt.parse(qt,Qs);oe.push({lang:Qs,subtitles:N$,isAuto:R$,id:xe.id})}Fn.add(xe.url,oe),ge(Si).value===_.value&&V(oe)}).catch(qt=>{var Jt;(Jt=J==null?void 0:J.oneStat)==null||Jt.logError({errorType:"Subtitles download",fatal:!1}),Z==null||Z.report(qt,{errorType:"Subtitles download",fatal:!1})})}V(oe)}),Er=mi([Ko,ir,Si],([c,_,V],oe)=>{let kt;if(k.info.isLive$.getValue()&&_&&V.value!==Nn){let Jt=()=>{let Qs=1e3/(3*c);kt=setTimeout(Jt,Qs),oe(Date.now())};return Jt(),()=>clearTimeout(kt)}}),Hn=mi([yn,Si],([c,_])=>{if(!c.length)return[];let V=[];for(let{language:oe,isAuto:xe,id:Xe}of c){let kt=oe&&xc(oe);oe&&kt&&V.push({displayValue:xe?mt("subtitles_auto",{language:kt}):kt,value:Xe,selected:(_==null?void 0:_.value)===Xe,isAuto:xe,language:oe})}return V.length?(V.unshift(jt(Ee({},$n()),{selected:(_==null?void 0:_.value)===Nn})),V):[]}),dn={available:[],prev:[]},xt=()=>{var _,V;let c=k.experimental.getCurrentTime$.getValue();return(V=(_=c==null?void 0:c())!=null?_:ke==null?void 0:ke.currentTime)!=null?V:0},Pt=mi([Xt,Si,lr,Er],([c,_,V,oe])=>{var Xe;let xe=k.info.isLive$.getValue();if(xe&&dn.prev!==V){let kt=V.find(({id:Jt})=>Jt===_.value),qt=dn.prev.find(({id:Jt})=>Jt===_.value);if(kt){let Jt=jt(Ee({},kt),{subtitles:[...(Xe=qt==null?void 0:qt.subtitles)!=null?Xe:[],...kt.subtitles]});dn.available=[Jt],dn.prev=V}}if(_&&_.value!==Nn){let kt=xe?xt():c,qt=xe?dn.available:V;return Mb(kt,_,qt,xe)}}),uo=mi([Pt],([c])=>c!=null&&c.texts?c.texts:[]);ye.add(Si.subscribe(c=>{var _,V;if(c.value===Nn)(_=s==null?void 0:s.onSubtitleOff)==null||_.call(s);else{let oe=Object.entries(mp).find(([xe,Xe])=>Xe===c.displayValue);(V=s==null?void 0:s.onSubtitleOn)==null||V.call(s,oe?oe[0]:"",c.value)}}));let Io=de(!0),Eo=mi([rn,zo,nr,Dr],([c,_,V,oe])=>{var qt;let xe=(qt=c==null?void 0:c.end)!=null?qt:0;if(!oe)return xe/_;let kt=-V+oe-_;return(xe-kt)/_}),po=ai(k.info.availableSources$),Oi=mi([po],([c])=>Object.keys((c==null?void 0:c[gi.VideoFormat.MPEG])||{}).length>0),Un=()=>{var V,oe,xe;let c=Object.keys(((oe=(V=k.info.availableSources$)==null?void 0:V.getValue())==null?void 0:oe[gi.VideoFormat.MPEG])||{}),_=(0,at.getHighestQuality)(c)||at.VideoQuality.Q_144P;return(xe=Ae.sources[gi.VideoFormat.MPEG])==null?void 0:xe[_]},Ji=()=>{var _;let c=Un();if(c)fe.log("download video",{url:c}),C_(c,((_=Ae==null?void 0:Ae.meta)==null?void 0:_.title)||"video");else{let V="There is no URL for download video";fe.log("download video",{message:V}),U({message:V})}},Wr=()=>{U({message:"toggle muted"});let c=k.info.muted$.getValue();k.info.volume$.getValue()===0&&!c?dr(Pr(),!1):Po(!c,!1)},Mi=()=>{var c;if(Yt.ui.settingsMenu.visible$.set(!1),!ge(Yt.ui.settingsSubMenu.visible$)){let _=ge(Yt.ui.settingsMenu.ref$);if((c=s==null?void 0:s.uiInfo)!=null&&c.onSettingsMenu&&_){let oe=ed(_),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")},xs=(c,_=()=>Promise.resolve())=>ht(null,null,function*(){var xe;Yt.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),Yt.ui.settingsMenu.visible$.set(!0),yield _();let V=ge(Yt.ui.settingsMenu.ref$),oe=_l();if((xe=s==null?void 0:s.uiInfo)!=null&&xe.onSettingsMenu&&V&&oe){let kt=ed(V),qt=Os(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:kt,position:qt,name:"settings"})}fe.log("open settings menu",{wasOpenedByKeyboard:c})}),as=(c,_=!1)=>{var Xe;Yt.ui.settingsSubMenu.visible$.set(!1);let V=ge(Yt.ui.settingsMenu.ref$),oe=_l(),xe=ge(Yt.ui.settingsMenu.visible$);if((Xe=s==null?void 0:s.uiInfo)!=null&&Xe.onSettingsMenu&&V&&oe)if(xe&&!_){let qt=ed(V),Jt=Os(V,oe);s.uiInfo.onSettingsMenu({visible:!0,size:qt,position:Jt,name:"settings"})}else{let qt=ed(c),Jt={top:0,left:0,bottom:0,right:0},Qs=ge(Yt.ui.settingsSubMenu.name$);s.uiInfo.onSettingsMenu({visible:!1,size:qt,position:Jt,name:Qs})}fe.log("close settings sub menu")},ls=(c,_)=>{var oe;Yt.ui.settingsSubMenu.visible$.set(!0),Yt.ui.settingsSubMenu.ref$.set(_),Yt.ui.settingsSubMenu.name$.set(c);let V=_l();if((oe=s==null?void 0:s.uiInfo)!=null&&oe.onSettingsMenu&&_&&V){let Xe=ed(_),kt=Os(_,V);s.uiInfo.onSettingsMenu({visible:!0,name:c,size:Xe,position:kt})}fe.log("open settings sub menu",{name:c})},Pr=()=>{var _;let c=Math.max(ee.volumeMinRestore,(_=Uu())!=null?_:0);return c===0?ee.volumeDefault:c},cn=c=>{let _=ee.features.savePreferredStatesOnUserActionOnly;return!_||_&&!c},dr=(c,_)=>{let V=c===0?Pr():c,oe=k.info.muted$.getValue();U({message:`set volume, volume: ${c}, preferredVolume: ${V}`});let xe=!l||We.is("ads");oe&&c>0&&xe&&(oe=!1,cn(_)&&Zf(!1)),k.setVolume(c,oe),Te.setVolume(c),cn(_)&&Gf(V)},Po=(c,_)=>{let V=k.info.volume$.getValue();U({message:`set muted, currentVolume: ${V}, mute: ${c}`});let oe=We.is("ads");if(k.setMuted(c,oe),Te.setVolume(c?0:V),cn(_)&&(!oe||!c)&&Zf(c),!c&&V===0){let xe=Pr();k.setVolume(xe),cn(_)&&Gf(xe),Te.setVolume(xe)}},ko=de(!1),cr=c=>{var _,V;fe.log("set looped",{isLooped:c}),ko.set(c),k.setLooped(c),(V=(_=s==null?void 0:s.uiInfo)==null?void 0:_.onLoopedChanged)==null||V.call(_,c)};cr(ne);let Ue=()=>{var c,_;(_=(c=s==null?void 0:s.uiInfo)==null?void 0:c.onReportProblem)==null||_.call(c)},Mt=(c,_=!1)=>{var V;U({message:`set autoplayNextEnabled, value: ${c}`}),fe.log("set autoplay next enabled",{autoplayNextEnabled:c}),Yt.ui.autoplayNextEnabled$.set(c),z_(c),_&&((V=s==null?void 0:s.onSetAutoplayNextEnabled)==null||V.call(s,c))},Ci=c=>{U({message:`set timerNextVideoRunning, value: ${c}`}),fe.log("set timer next video running",{timerNextVideoRunning:c}),Yt.ui.timerNextVideoRunning$.set(c)},Qo=(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()},fo=(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()},Ao=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementShow)==null||c.call(s)},mo=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementClick)==null||c.call(s)},Go=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementAuto)==null||c.call(s)},zn=()=>{var c;(c=s==null?void 0:s.onNextVideoAnnouncementCancel)==null||c.call(s)},un=()=>{k.prepare()},xo=()=>{(0,at.assertNonNullable)(Yt);let c=ge(Yt.ui.controls.disabledControls$),_=ge(Yt.playerPhase),V={playerPhase:_,isInteractive:w,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(U({message:"toggle play"}),_==="ads"){V.action="play",fe.log("toggle adman play",V),Te.togglePlay();return}let oe=()=>{var Xe;U({message:"toggle play, call player.play"}),V.action="play",k.play(),(Xe=s==null?void 0:s.onPlay)==null||Xe.call(s)},xe=()=>{var Xe;U({message:"toggle play, call player.pause"}),V.action="pause",k.pause(),(Xe=s==null?void 0:s.onPause)==null||Xe.call(s)};if(k.info.isEnded$.getValue()){if(U({message:"toggle play, video ended, seek to 0"}),ei.next(),wi.next(bs.SeekAction.REWIND),w){N==null||N();return}k.seekTime(0),oe()}else k.info.playbackState$.getValue()!==gi.PlaybackState.PLAYING?oe():xe();fe.log("toggle play",V)},eo=(c,{changeReason:_="default",appliesTo:V="to-video",byUser:oe=!1}={},xe)=>{U({message:`set quality, quality: ${c}`}),fe.log("set quality",{quality:c}),oe&&yi.next(c),k.setAutoQuality(c==="auto");let{qualityDetailsSubMenuEnabled:Xe}=ee.features;zu(),c!=="auto"?(Xe?(Wu({type:"exact_quality",quality:c,videoId:i},V),k.setPredefinedQualityLimits(gi.PredefinedQualityLimits.UNKNOWN)):Yf(i,c),Wo.set(c),k.setQuality(c)):Xe&&_==="default"&&(kr("auto_quality",V,xe),ge(Li)&&Wn(!1,void 0,xe),ge(sn)&&Kn(!1,void 0,xe))},Wn=(c,_="as-default",V)=>{U({message:`set trafficSavingEnabled, value: ${c}`}),fe.log("set traffic saving enabled",{trafficSavingEnabled:c});let oe=c?gi.PredefinedQualityLimits.TRAFFIC_SAVING:gi.PredefinedQualityLimits.UNKNOWN;ee.features.qualityDetailsSubMenuEnabled?(qn(oe,_,V),ec(!1)):(k.setPredefinedQualityLimits(oe),cn(V)&&ec(c))},Kn=(c,_="as-default",V)=>{U({message:`set highQualityEnabled, value: ${c}`}),fe.log("set high quality enabled",{highQualityEnabled:c}),qn(c?gi.PredefinedQualityLimits.HIGH_QUALITY:gi.PredefinedQualityLimits.UNKNOWN,_,V)},qn=(c,_,V)=>{c!==gi.PredefinedQualityLimits.UNKNOWN&&(ge(Uo)&&!ge(Bn)&&eo("auto",{appliesTo:_,changeReason:"limit-changed"},V),kr(c,_,V)),k.setPredefinedQualityLimits(c)},kr=(c,_,V)=>{cn(V)&&(Wu({type:c,videoId:i},_),_==="as-default"&&Wu({type:c,videoId:i},"to-video"))},ur=(c,_=!0)=>{fe.log("set playback rate",{playbackRate:c}),k.setPlaybackRate(c),ee.features.saveRate&&we&&!k.info.isLive$.getValue()&&_&&H_(c)},ws=()=>{let c=ge(Ri),_=ge(qo),V=_.findIndex(({selected:xe})=>xe);if(V===_.length-1||!c)return _[V];let oe=_[V+1];return ur(oe.value),oe},et=()=>{let c=ge(Ri),_=ge(qo),V=_.findIndex(({selected:xe})=>xe);if(V===0||!c)return _[V];let oe=_[V-1];return ur(oe.value),oe},Zt=(c=jt(Ee({},$n()),{selected:!1}),_)=>{fe.log("set subtitles",Ee({},c)),c.value!==Nn&&Zi.next(c.isAuto?c.value+"_auto":c.value),qe.next({enabled:c.value!==Nn,lang:c.language,auto:!!c.isAuto}),Ir.set(c),cn(_)&&(im(c.value===Nn?void 0:c.language),ee.features.userVideoPrefs&&i&&om(ee.userSalt,String(i),{subtitleTrackId:c.value===Nn?void 0:c.value}))},Ei=c=>{fe.log("toggle subtitles");let _=ge(Si);(_==null?void 0:_.value)===Nn?Yo(c):Kr(c)},wo=(c,_)=>{fe.log("change subtitle",{enabled:c}),c?Yo(!0,_):Kr(!0)},Yo=(c,_)=>{fe.log("subtitle on");let V=ge(Hn),oe=ge(he),xe=Ie!=null?Ie:oe,Xe;_&&(Xe=V.find(kt=>kt.value===_)),Xe!=null||(Xe=V.filter(kt=>kt.value!==Nn).find(kt=>kt.language===xe)),Zt(Xe!=null?Xe:V[1],c)},Kr=c=>{fe.log("subtitle off"),Zt(void 0,c)};ye.add(k.info.availableTextTracks$.subscribe(c=>{var V;function _(){let oe=[];for(let{language:xe,isAuto:Xe,id:kt}of c){let qt=xe&&xc(xe);xe&&qt&&oe.push({id:kt,language:xe,title:Xe?mt("subtitles_auto",{language:qt}):qt})}return oe}(V=s==null?void 0:s.onAvailableSubtitlesChanged)==null||V.call(s,_())}));let Lo=de(!0),pr=c=>{Lo.set(c)},Qn=(c,_,V=!0)=>{var oe;if(U({message:`seek to time, time: ${c}`}),fe.log("seek to time",{time:c,action:_,forcePrecise:V}),wi.next(_),k.info.isLive$.getValue()){let xe=k.info.duration$.getValue(),Xe=Math.min(0,xe+c);k.seekTime(Xe,V)}else{if(C!=null&&C.getValue())return;k.info.isEnded$.getValue()&&(U({message:"seek after ended, call callbacks.onPlay"}),(oe=s==null?void 0:s.onPlay)==null||oe.call(s)),k.seekTime(_g(c),V)}},ma=c=>{U({message:`seek to episode start time: ${c}`}),fe.log("seek to episode start time",{time:c}),Qn(c,bs.SeekAction.EPISODE,!0)},zs=(c,_,V=!1)=>{U({message:`seek to percent, percent: ${c}`}),fe.log("seek to percent",{percent:c,action:_});let oe=ge(zo)*c;Qn(oe,_,V)},Ws=c=>{U({message:`seek external, time: ${c}`}),fe.log("seek external",{time:c}),wi.next(bs.SeekAction.UNKNOWN),k.seekTime(k.info.isLive$.getValue()?-c:c)},xn=c=>{var oe,xe;let _=(oe=c.max)!=null?oe:"none",V=(xe=c.min)!=null?xe:"none";U({message:`set auto quality limitation. Max: ${_}. Min: ${V}`}),fe.log("set auto quality limits",{max:_,min:V}),k.setAutoQualityLimits(c)},lt=c=>{U({message:`seek external to episode start time: ${c}`}),fe.log("seek external to episode start time",{time:c}),Qn(c,bs.SeekAction.EPISODE,!0)},pi=c=>{U({message:`set playback rate to: ${c}`}),fe.log("set playback rate external",{playbackRate:c}),k.setPlaybackRate(c)},Di=de(!1),wn=de(!1),qr=mi([zo],([c])=>!!p&&c>=ee.suitableDurationForUsingRichSeek&&ee.features.useRichSeek&&!w),Sn=((p==null?void 0:p.frameWidth)||0)>=((p==null?void 0:p.frameHeight)||0),be=mi([ni],([c])=>{let _=td(c);return Sn?!_:_});ye.add(We.subscribe(c=>{c!=="video"&&Di.set(!1)}));let wt=de(void 0),Ft=de(!1),oi=c=>{U({message:`start scrubbing, progress: ${c}`}),fe.log("start scrubbing",{progress:c}),Ft.set(!0),Pi(c)},Pi=c=>{wt.set(c)},ki,Vi,Ti=()=>{wt.set(void 0),Ft.set(!1)},ds=()=>{clearTimeout(Vi),clearTimeout(ki),ki=window.setTimeout(()=>{Ti()},500),ke==null||ke.removeEventListener("seeked",ds)},Ks=(c,_=!1)=>{U({message:`complete scrubbing, progress: ${c}`}),fe.log("complete scrubbing",{progress:c}),zs(c,bs.SeekAction.SLIDER,_),ge(Yt.ui.isMobile)&&ge(Yt.state.currentFormat$)===gi.VideoFormat.HLS?(ke==null||ke.addEventListener("seeked",ds),Vi=window.setTimeout(()=>{ds()},300)):Ti()},fl=mi([Xt,zo,wt],([c,_,V],oe)=>{oe((0,at.isNonNullable)(V)?V*_:c)}),va=de(!1),ga=()=>{va.set(!0)},cs=()=>{va.set(!1)},Ss=mi([Wt],([{width:c}],_)=>{let V=wb(c);_(V)}),ha=q.filter(c=>T_(c)),_a=mi([Ss,Fe],([c,_])=>_?ha.filter(V=>!V.hideOnMobile):ha.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(c))})),Cn=de(q.filter(c=>I_(c))),Cs=mi([Cn,Ss],([c,_])=>c.filter(V=>{var oe;return!((oe=V.hideOnDesktopGridTypes)!=null&&oe.includes(_))})),ml=mi([Cs,_a],([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}}):[]]),fr=de(H),gd=mi([fr],([c])=>ee.features.additionalSettingsMenuItems?c.map(_=>_.type==="SWITCH"?jt(Ee({},_),{onClick:_.onChangeEnabled}):_):[]),vl=(c,_)=>{let V=ge(Cn).map(oe=>oe.id!==c?oe:Ee(Ee({},oe),_));Cn.set(V)},hd=c=>{let _=ge(Cn);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),Cn.set(_)},ba=c=>{let _=ge(Cn);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),Cn.set(_)},_d=c=>{wi.next(bs.SeekAction.LIVE),U({message:"live switch to low latency "+c}),fe.log("live switch to low latency "+c),k.setLiveLowLatency(c)},gl=(c,_)=>{let V=ge(fr).map(oe=>oe.id!==c?oe:Ee(Ee({},oe),_));fr.set(V)},hl=c=>{let _=ge(fr);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),fr.set(_)},$a=c=>{let _=ge(fr);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),fr.set(_)},nt=de(z),ft=mi([nt],([c])=>ee.features.additionalContextMenuItems?c:[]),to=(c,_)=>{let V=ge(nt).map(oe=>oe.id!==c?oe:Ee(Ee({},oe),_));nt.set(V)},Mo=c=>{let _=ge(nt);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),nt.set(_)},io=c=>{let _=ge(nt);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),nt.set(_)},_i=mi([Fe,Se],([c,_],V)=>{V(c&&_)}),Ki=()=>{wi.next(bs.SeekAction.LIVE),U({message:"switch to active live"}),fe.log("switch to active live"),k.seekTime(0),k.info.playbackState$.getValue()!==gi.PlaybackState.PLAYING&&Yt.actions.internal.togglePlay()},qs=()=>{fe.log("skip adman"),Te.skip()},bd=(c=!0)=>{var oe;(0,at.assertNonNullable)(Yt),U({message:`switch from ads to video, callPlay: ${c}`}),fe.log("switch from ads to video",{callPlay:c}),ue.set("video"),c&&k.play(),l&&Po(!0,!0);let _=(oe=ge(Ye))==null?void 0:oe.muted,V=!k.info.muted$.getValue();_!==void 0&&!V&&Po(_,!0),Ye.set(void 0)},eu=()=>{(0,at.assertNonNullable)(Yt),U({message:"switch from video to ads"}),fe.log("switch from video to ads"),Yt.actions.internal.pause(),Bo(),ue.set("ads")},zp=c=>{(0,at.assertNonNullable)(Yt);let _=c?"LiveWaitingStart":"thumb";fe.log("set live waiting start",{state:c,playerPhase:_}),ue.set(_)},tu=c=>{(0,at.assertNonNullable)(Yt);let _=c?"LiveWaitingRecover":"thumb";fe.log("set live waiting recover",{state:c,playerPhase:_}),ue.set(_)},Wp=c=>{(0,at.assertNonNullable)(Yt);let _=c?"LiveWaitingRecord":"thumb";fe.log("set live waiting record",{state:c,playerPhase:_}),ue.set(_)},iu=()=>((0,at.assertNonNullable)(Yt),fe.log("get debug text data"),w_(k,Ae,Yt,Ne.getTraceId())),ou=()=>((0,at.assertNonNullable)(Yt),JSON.stringify(Ne.getFinishedSpans())),nu=()=>((0,at.assertNonNullable)(Yt),S_(k,Ae,Yt)),_l=()=>ke,ru=()=>{U({message:"toggle chromecast"}),fe.log("toggle chromecast"),k.toggleChromecast()},ya=c=>{var V;if((0,at.assertNonNullable)(Yt),k.info.isEnded$.getValue())return;let _=!c;if(ge(Yt.playerPhase)==="ads"){U({message:`pause ads, internalCall: ${_}`}),fe.log("pause ads",{internalCall:_}),Te.pause();return}U({message:`pause video, internalCall: ${_}`}),fe.log("pause video",{internalCall:_}),_&&((V=s==null?void 0:s.onPause)==null||V.call(s)),k.pause()},xa=c=>{var V;(0,at.assertNonNullable)(Yt);let _=!c;if(ge(Yt.playerPhase)==="ads"){U({message:`play ads, internalCall: ${_}`}),fe.log("play ads",{internalCall:_}),Te.play();return}U({message:`play video, internalCall: ${_}`}),fe.log("play video",{internalCall:_}),_&&((V=s==null?void 0:s.onPlay)==null||V.call(s)),k.play()},Kp=c=>{(0,at.assertNonNullable)(Yt);let _=!c;if(ge(Yt.playerPhase)==="ads"){U({message:"player cannot be stopped during ads via external method"});return}U({message:`player will be stopped, internalCall: ${_}`}),L==null||L()},$d=(c,_)=>{(0,at.assertNonNullable)(Yt),U({message:`first start, show ads: ${c}, internalCall: ${!_}`}),fe.log("first start",{showAds:c,external:_}),c?ue.set("ads"):(ue.set("video"),_?k.play():Yt.actions.internal.togglePlay())},yd=()=>(U({message:"getting time codes"}),f),su=()=>{let c=yd();if(!c||[0,1].includes(c.length))return;let _=k.info.position$.getValue();return c.find(V=>V.time>_)},qp=c=>{let _=c;_||(_=su());let V=k.info.position$.getValue();fe.log("seek to next episode",Ee({currentTime:V},_)),_&&(U({message:"seek to next episode"}),Qn(_.time,bs.SeekAction.EPISODE,!0))},He=()=>{let c=yd();if(!c||[0,1].includes(c.length))return;let _=k.info.position$.getValue(),V=c.findIndex(xe=>xe.time>_),oe=V===-1?c.length-2:V-2;if(!(oe<0))return c[oe]},bi=c=>{let _=c;_||(_=He());let V=k.info.position$.getValue();fe.log("seek to prev episode",Ee({currentTime:V},_)),_&&(U({message:"seek to prev episode"}),Qn(_.time,bs.SeekAction.EPISODE,!0))},jo=()=>(U({message:"getting preview thumbs data"}),fe.log("get preview thumbs data",Ee({},p)),p),Ar=()=>ht(null,null,function*(){let c=ie==null?void 0:ie.isActive(),_="none";ie!=null&&ie.isActive()?(_="exit",yield ie==null?void 0:ie.exit()):(_="request",yield ie==null?void 0:ie.request()),fe.log("toggle picture in picture",{isActive:c,action:_})}),Tn=(c=-90)=>{fe.log("rotate video",{alphaDiff:c}),ni.update(_=>_+c)},au=de([]);I==null||I.subscribe(c=>{let _=[];for(let V=0;V<c.length;V++){let{range:[oe,xe],subjects:Xe}=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?!Xe.length||Xe.every(kt=>kt.isRemoved):!Xe.length}),xe!==1/0&&_.push({time:xe/1e3,text:"",interactive:!1,completed:!0})}au.set(_)});let I$=de(!1);C==null||C.subscribe(c=>{c&&ge(Ft)&&Ti()});let _g=c=>{if(!w)return c;let _=ge(au),V=ge(zo),xe=ge(nr)/V,Xe=_.find(kt=>kt.interactive&&!kt.completed&&kt.time>xe);return typeof(Xe==null?void 0:Xe.time)=="number"?Math.min(c,Xe.time-.05):c},E$=()=>{Yt.ui.episodes.panelOpened$.set(!1)},P$=()=>{fe.log("destroy store"),clearTimeout(Vi),clearTimeout(ki),ye.unsubscribe(),Fo.unsubscribe(),k.destroy(),Te.destroy(),J==null||J.destroy(),Z==null||Z.destroy(),Y.unsubscribe(),ii==null||ii.disconnect(),ii=null,it.destroy()},k$=mi([or,We,Ri],([c,_,V])=>v.features.doubleForwardAvailable&&!c&&_==="video"&&V),Qp=de(!1),bg=2,lu=null,$g=c=>{if(!ge(ir)&&c)return;let _=k.info.currentPlaybackRate$.getValue();c?_!==bg&&(lu=_,ur(bg,!1),Qp.set(!0)):(lu&&ur(lu,!1),Qp.set(!1),lu=null)};We.subscribe(c=>{c!=="video"&&$g(!1)});let A$=()=>{ya(!1),Di.set(!0)},L$=()=>{xa(!1),Di.set(!1)},Gp=!1,M$=()=>{wn.set(!0),Gp=k.info.playbackState$.getValue()===gi.PlaybackState.PLAYING,ya(!1)},V$=()=>{wn.set(!1),!ge(Di)&&Gp&&xa(!1),Gp=!1};k.events.playing$.subscribe(()=>{ge(Di)&&ya(!1)});let Yt={interfaceLanguage$:he,isCyrillicRelatedInterface$:st,initVideo:fi,videoId:i,isClip:o,playerPhase:We,vsid:Dt,state:{positionExact$:Xt,positionWithScrubbing$:fl,duration$:zo,playbackState$:rt,playbackStateRealistic$:Wi,isPlaying$:ir,isLoaderVisible:Xi,bufferedProgress$:Eo,isLive$:lo,canChangePlaybackSpeed$:Ri,isActiveLive$:or,isOldestAvailableLive$:Fr,isRewindableLive$:co,isEnded$:Ho,muted$:$o,volume$:bo,trafficSavingEnabled$:Li,highQualityEnabled$:sn,autoQualityLimitingAvailable$:Uo,availableVideoStreams$:rr,availableAudioStreams$:hn,videoStream$:yo,audioStream$:Cr,currentQuality$:ln,isAutoQualityEnabled$:Bn,availableQualities$:Tr,currentPlaybackRate$:Ko,availablePlaybackRates$:qo,currentSubtitle$:Si,availableTextTracks$:yn,availableSubtitlesList$:Hn,currentSubtitleCaptions$:uo,isAutoSubtitleCaptionVisible$:Io,chromecastState$:wr,chromecastDeviceName$:ys,chromecastConnected$:Hr,currentFormat$:rs,throughputEstimation$:ss,videoBitrate$:tr,videoSize$:Br,errorLog$:Ut,crashed$:Se,isAudioAvailable$:Dn,isAudioDisabled:!!l,canDownload:ee.features.download&&!!d,availableSources$:po,hasMpegSources$:Oi,isInteractive:w,showInteractiveGraph:ee.features.interactiveGraph,showSeekToInteractive:ee.features.seekToInteractive,showPlayPrevChapter:ee.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ee.features.interactiveTimeIndicator&&!!ge(au).length,interactiveEpisodes$:au,isInteractiveTime$:C?ai(C):de(!1),isInteractiveExpectation$:I$,hasInteractiveBranches:E,playPrevChapterDisabledTooltip:P,looped$:ko,loadedMetadata$:At,isAutoQualityAvailable$:bn,previewTrackActive:Di,previewTrackDragInProgress:wn},ui:{t:mt,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$:zt},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:vt,isFullscreenOpenedByKeyboard:Ht,rotateAlpha:ni,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:Wt,isMobile:Fe,mobileNotReportControlHidden$:_i,icon3DVideoVisible:de(!1),scrubbingInProgress:Ft,volumeChangingInProgress:va,is3DVideo:Bt,currentGridType$:Ss,additionalButtonsDeprecated$:_a,additionalDesktopControlPanelRightButtons$:ml,additionalSettingsMenuItems$:gd,additionalContextMenuItems$:ft,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:Lo,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$:Qp,doubleForwardAvailable$:k$,previewTrackNotificationVisible:de(!1),previewTrackActive:Di,previewTrackDragInProgress:wn,previewTrackAvailable:qr,isPreviewTrackHorizontallyAligned:be},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:De,slotsApi:Be,focusManager:ot},actions:{internal:{preload:un,firstStart:c=>$d(c,!1),play:()=>xa(!1),pause:()=>ya(!1),togglePlay:xo,toggleMuted:Wr,openSettingsMenu:xs,closeSettingsMenu:Mi,openSettingsSubMenu:ls,closeSettingsSubMenu:as,setVolume:c=>dr(c,!1),setMuted:c=>Po(c,!1),startVolumeChanging:ga,stopVolumeChanging:cs,setVideoStream:sr,setAudioStream:c=>gt(c,!1),setQuality:(c,_)=>eo(c,_,!1),setTrafficSavingEnabled:(c,_)=>Wn(c,_,!1),setHighQualityEnabled:(c,_)=>Kn(c,_,!1),setPlaybackRate:ur,incrementPlaybackRate:ws,decrementPlaybackRate:et,setSubtitle:c=>Zt(c,!1),toggleSubtitle:()=>Ei(!1),togglePictureInPicture:Ar,startScrubbing:oi,progressScrubbing:Pi,completeScrubbing:Ks,toggleChromecast:ru,switchToActiveLive:Ki,switchFromAdsToVideo:bd,switchFromVideoToAds:eu,skipAd:qs,setLiveWaitingStart:zp,setLiveWaitingRecover:tu,setLiveWaitingRecord:Wp,getDebugTextData:iu,getTraceTextData:ou,getDebugPanelData:nu,getVideoElement:_l,seekTime:(c,_,V)=>Qn(c,_,V),clearDelayedBufferingCheckTimeout:Sr,seekEpisodeStartTime:ma,seekToPercent:zs,getNextEpisode:su,seekToNextEpisode:qp,getPrevEpisode:He,seekToPrevEpisode:bi,startLogging:Ct,stopLogging:Kt,startCameraManualRotation:W,stopCameraManualRotation:Lt,moveCameraFocusPX:li,holdCamera:pt,releaseCamera:Tt,getVideoEpisodes:yd,getPreviewThumbsData:jo,downloadVideo:Ji,addLanguage:nm,setLanguage:le,nextMovie:bt,videoRotate:Tn,correctSeekTimeToInteractive:_g,replayInteractive:N,setLooped:cr,reportProblem:Ue,setAutoplayNextEnabled:Mt,setTimerNextVideoRunning:Ci,prevVideoClick:Qo,nextVideoClick:fo,nextVideoAnnouncementShow:Ao,nextVideoAnnouncementClick:mo,nextVideoAnnouncementAuto:Go,nextVideoAnnouncementCancel:zn,checkFullscreenSupport:ct,changeDoubleForwardOn:$g,closePreviewTrack:L$,previewTrackOpened:A$,previewTrackDragStarted:M$,previewTrackDragFinished:V$},external:{firstStart:c=>$d(c,!0),play:()=>xa(!0),pause:()=>ya(!0),stop:()=>Kp(!0),seekTime:c=>Ws(c),seekEpisodeStartTime:c=>lt(c),setPlaybackRate:c=>pi(c),setAutoQualityLimits:c=>xn(c),setMuted:c=>Po(c,!0),toggleSubtitle:()=>Ei(!0),changeSubtitle:wo,setVolume:c=>dr(c,!0),returnFocusToEpisodes:E$,updateAdditionalSettingsItem:gl,addAdditionalSettingsItem:hl,removeAdditionalSettingsItem:$a,updateAdditionalContextItem:to,addAdditionalContextItem:Mo,removeAdditionalContextItem:io,updateAdditionalButton:vl,addAdditionalButton:hd,removeAdditionalButton:ba,setLiveLowLatency:_d,hideControls:()=>pr(!1),showControls:()=>pr(!0),setQuality:c=>eo(c,{appliesTo:"to-video"},!0),setTrafficSavingEnabled:c=>Wn(c,"to-video",!0),setHighQualityEnabled:c=>Kn(c,"to-video",!0),changeAudioStream:Ur}},callbacks:s,setUiCallbacks:c=>{ze=Ee({},c)},getAdmanWrapper:()=>Te,getLogger:()=>Ke,getPlayer:()=>k,destroy:P$};return Yt};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}=Os(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 i2=["disabledControls$","additionalButtons"],o2=["interactiveTimeIndicator"],od=(t,e,i,o)=>{if(t){for(let[r,a]of Object.entries(e))if(!i2.includes(r)){let l=o||o2.includes(r);a.set(Jn(t,i,r,l))}}};var gp=(t,e,i)=>ht(null,null,function*(){yield _o(),e&&i&&(i.focus(),t.set(!1))});var n2=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 Ym(t){Je(t,{children:(e,i)=>{var o=n2();b(e,o)},$$slots:{default:!0}})}function jm(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(s,"$contextMenuVisible$",i),a=h(e,"disabled",3,!1),l=h(e,"ariaLabel",3,""),d=ve(),s=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,f=d.ui.contextMenu.showContextMenuBtn$,p=d.ui.contextMenu.position$,v=d.ui.contextMenu.btnRef$,$=K(void 0);Oe(()=>{n($)&&It(()=>{v.set(n($))})});let y=C=>{let N=aa(C),L=fb(n($));p.set(L),u.set(N),s.set(!r())},g=()=>{f.set(!0)},w=()=>{f.set(!1)},I=m(()=>r()?"opened":"");Gt(t,{get className(){return n(I)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return l()},click:y,focus:g,blur:w,get ariaExpanded(){return r()},get ref(){return n($)},set ref(C){O($,C,!0)},children:(C,N)=>{Ym(C,{})},$$slots:{default:!0}}),F(),o()}var r2=t=>{t.stopPropagation()},s2=M("<div><!> <div></div> <div></div></div>"),a2={hash:"s-25",code:'.interactive-episode-icon-animated.s-25{height:32px;opacity:1;position:absolute;right:16px;top:16px;transition:.3s;width:32px}.interactive-episode-icon-animated.icon-small.s-25{height:28px;width:28px}.invisible.s-25{opacity:0;visibility:hidden}.fullscreen.s-25:not(.mobile){height:40px;right:23px;top:19px;width:40px}.mobile.s-25{height:28px;right:14px;top:12px;width:28px}.fullscreen.mobile.s-25{height:32px;width:32px}@media screen and (orientation:portrait){.interactive-episode-icon-animated.mobile.fullscreen.s-25{right:16px;top:40px}}@keyframes s-25-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-25{animation:s-25-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-25{animation-play-state:paused}.interactive-episode-icon-animated svg{height:100%;width:100%}.ref-block.s-25{height:100%;position:absolute;top:0;visibility:hidden;width:100%}.hidden.s-25{display:none}'};function Sc(t,e){var Z;B(e,!0),Q(t,a2);let[i,o]=Re(),r=()=>x(w,"$isMobile",i),a=()=>x(L,"$areControlsVisible",i),l=()=>x(P,"$currentGridType$",i),d=()=>x(C,"$isInteractiveTime$",i),s=()=>x(g,"$interactiveControlsOpacity$",i),u=()=>x(N,"$showInteractiveTimeIndicatorTooltip$",i),f=()=>x(I,"$isFullscreen",i),p=h(e,"ref",15,void 0),v=K(void 0),$=ve(),y=Co(),{interactiveControlsOpacity$:g}=y,w=$.ui.isMobile,I=$.ui.isFullscreen,C=$.state.isInteractiveTime$,N=y.showInteractiveTimeIndicatorTooltip$,L=$.ui.controlsVisible,E=(Z=$.callbacks)==null?void 0:Z.onInteractiveTimeIndicatorClick,P=$.ui.currentGridType$,q=m(()=>!r()&&a()),H=m(()=>Ns(l(),"s")),z=m(()=>!d()||!!s()||n(q)),j=K(!1);Oe(()=>{O(j,n(z),!0)});let ae=()=>{O(j,!0)},X=()=>{var ie;ne(),(ie=n(v))==null||ie.addEventListener("animationiteration",ae,{once:!0})},ne=()=>{var ie;O(j,!1),(ie=n(v))==null||ie.removeEventListener("animationiteration",ae)},J=ie=>{N.set(ie)},we=m(()=>u()&&!n(z));Oe(()=>{u()?X():ne()});let pe=()=>{n(z)||(N.set(!0),E==null||E())};mn(()=>{N.clearTimeout(),ne()});let re=()=>{N.set(!1)},_e=G("tooltip_interactive_interaction_time_indicator");var $e=s2();let ee;$e.__mousemove=[r2],$e.__click=pe;var Ne=T($e);Oo(Ne,{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)=>{vc(ie,{completed:!0})},$$slots:{default:!0}});var fe=A(Ne,2);let k;Ze(fe,ie=>p(ie),()=>p());var Ke=A(fe,2);let Te;Ze(Ke,ie=>O(v,ie),()=>n(v)),S($e),D((ie,De,Be)=>{ee=se($e,1,"interactive-episode-icon-animated s-25",null,ee,ie),k=se(fe,1,"ref-block s-25",null,k,De),Te=se(Ke,1,"pulse s-25",null,Te,Be)},[()=>({mobile:r(),fullscreen:f(),invisible:n(z),"icon-small":n(H)}),()=>({hidden:n(z)}),()=>({paused:n(j)})]),dt("mouseleave",$e,re),b(t,$e),F(),o()}je(["mousemove","click"]);function hp(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);Oo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get tooltipVisible(){return l()},get className(){return r()},get ref(){return a()},set ref(d){a(d)},children:(d,s)=>{var u=Le();let f=m(()=>e.buttonComponent);var p=ce(u);Hi(p,()=>n(f),(v,$)=>{$(v,es(()=>{var y;return(y=e.buttonComponentProps)!=null?y:{}}))}),b(d,u)},$$slots:{default:!0}}),F()}var Ds={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var d2=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 pa(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(()=>`${vn(e.size)}${n(o)}`),a=m(()=>i()?"prev-icon":"next-icon");Je(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=d2();b(l,s)},$$slots:{default:!0}}),F()}var c2=M('<div class="icon-background-mobile s-22"><!></div>'),u2={hash:"s-22",code:".icon-background-mobile.s-22{align-items:center;background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);display:flex;height:100%;justify-content:space-around;left:0;position:absolute;top:0;width:100%}"};function Ja(t,e){B(e,!0),Q(t,u2);let i=h(e,"ref",15,void 0),o=h(e,"isMobile",3,!1),r=h(e,"disabled",3,!1),l=ve().ui.t,d=m(()=>e.type==="prev"?l("tooltip_previous"):l("tooltip_next")),s=m(()=>e.type==="prev"?l("hotkey_map_item_prev_video_value"):l("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Gt(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=c2(),C=T(I);let N=m(()=>e.type==="prev");pa(C,{get size(){return"32"},get reversed(){return n(N)}}),S(I),b(w,I)},g=w=>{let I=m(()=>e.type==="prev");pa(w,{get size(){return"24"},get reversed(){return n(I)}})};R($,w=>{o()?w(y):w(g,!1)})}b(f,v)},$$slots:{default:!0}}),F()}var p2=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 Cc(t,e){B(e,!0);let i=m(()=>vn(e.size));Je(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=p2();b(o,a)},$$slots:{default:!0}}),F()}var Nb=require("@vkontakte/videoplayer-shared/es2015");var f2=M('<div class="icon-background-mobile s-27"></div>'),m2=M("<!> <div><!></div>",1),v2={hash:"s-27",code:".mobile.s-27{align-items:center;display:flex;justify-content:center;position:relative}.icon-background-mobile.s-27{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);height:calc(100% - 32px);left:16px;position:absolute;top:16px;width:calc(100% - 32px)}"};function nd(t,e){B(e,!0),Q(t,v2);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,Nb.noop),d=G("tooltip_restart"),s=m(()=>`${o()?"btn-m--play":""} ${a()}`);Gt(t,{get className(){return n(s)},testId:"replay-btn",get ariaLabel(){return d},get disabled(){return r()},get click(){return l()},get ariaKeyShortCut(){return hs.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,f)=>{var p=m2(),v=ce(p);{var $=C=>{var N=f2();b(C,N)};R(v,C=>{o()&&C($)})}var y=A(v,2);let g;var w=T(y);let I=m(()=>o()?"48":"24");Cc(w,{get size(){return n(I)}}),S(y),D(C=>g=se(y,1,"s-27",null,g,C),[()=>({mobile:o()})]),b(u,p)},$$slots:{default:!0}}),F()}var g2=Ce('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Bs(t,e){B(e,!0);let i=m(()=>vn(e.size));Je(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=g2();b(o,a)},$$slots:{default:!0}}),F()}var Ob=require("@vkontakte/videoplayer-shared/es2015");var h2=M('<div class="icon-background-mobile s-21"><!></div>'),_2={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 rd(t,e){B(e,!0),Q(t,_2);let[i,o]=Re(),r=()=>x(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=Co(),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,Ob.noop),$=ve().ui.t,{toggle:y}=a,g=m(()=>y),w=m(()=>r()!==null),I=m(()=>n(w)?r():s()),C=m(()=>n(I)?$("tooltip_pause"):$("tooltip_play")),N=m(()=>n(I)?Bs:Vn),L=m(()=>`${d()?"btn-m--play":""} ${f()}`),E=m(()=>n(w)?n(g):p());Gt(t,{get className(){return n(L)},testId:"play-btn",get click(){return n(E)},get disabled(){return u()},get ariaLabel(){return n(C)},get ariaKeyShortCut(){return hs.KeyK},get ref(){return l()},set ref(P){l(P)},children:(P,q)=>{var H=Le();let z=m(()=>n(N));var j=ce(H);{var ae=ne=>{var J=h2(),we=T(J);Hi(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"48"}})}),S(J),b(ne,J)},X=ne=>{var J=Le(),we=ce(J);Hi(we,()=>n(z),(pe,re)=>{re(pe,{get size(){return"24"}})}),b(ne,J)};R(j,ne=>{d()?ne(ae):ne(X,!1)})}b(P,H)},$$slots:{default:!0}}),F(),o()}var b2=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){Je(t,{testId:"play-prev-chapter-icon",children:(e,i)=>{var o=b2();b(e,o)},$$slots:{default:!0}})}function Tc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_go_back"),l=m(()=>o()?"hidden":"");Gt(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 $2=M('<span class="gutter s-24"><span><!></span></span>'),y2={hash:"s-24",code:".gutter.s-24{--gutterWidth:32px;--gutterHeight:12px;--togglerWidth:18px;--togglerHeight:18px;--togglerGap:calc(var(--togglerWidth)/6);background-color:hsla(0,0%,100%,.3);border-radius:50px;height:var(--gutterHeight);position:relative;width:var(--gutterWidth)}.toggler.s-24{align-items:center;background-color:#626364;border-radius:50%;display:flex;height:var(--togglerHeight);justify-content:center;left:0;position:absolute;top:calc((var(--togglerHeight) - var(--gutterHeight))/2*-1);transform:translateX(calc(var(--togglerGap)*-1));transition-duration:.2s;transition-property:background-color,transform;transition-timing-function:ease;width:var(--togglerWidth)}.toggler.enabled.s-24{background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)))}"};function Ic(t,e){B(e,!0),Q(t,y2);let[i,o]=Re(),r=()=>x(s,"$autoplayNextEnabled$",i),a=h(e,"ref",15,void 0),l=ve(),d=l.ui.t,s=l.ui.autoplayNextEnabled$,u=l.actions.internal.setAutoplayNextEnabled,f=()=>{u(!r(),!0)},p=d("aria_label_autoplay"),v="12",$="#000",y=m(()=>r()?"true":"false");Gt(t,{click:f,get ariaLabel(){return p},role:"switch",get areaChecked(){return n(y)},get ref(){return a()},set ref(g){a(g)},children:(g,w)=>{var I=$2(),C=T(I);let N;var L=T(C);{var E=q=>{Vn(q,{get size(){return v},fill:$})},P=q=>{Bs(q,{get size(){return v},fill:$})};R(L,q=>{r()?q(E):q(P,!1)})}S(C),S(I),D(q=>N=se(C,1,"toggler s-24",null,N,q),[()=>({enabled:r()})]),b(g,I)},$$slots:{default:!0}}),F(),o()}var x2=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 Zm(t){Je(t,{testId:"seek-to-interactive-icon",children:(e,i)=>{var o=x2();ui(),b(e,o)},$$slots:{default:!0}})}function Ec(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=G("tooltip_interactive_seek"),l=m(()=>o()?"hidden":"");Gt(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)=>{Zm(d,{})},$$slots:{default:!0}}),F()}var w2=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>'),S2=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 Jm(t,e){let i=h(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Je(t,{get testId(){return n(o)},children:(r,a)=>{var l=S2(),d=A(ce(l));{var s=u=>{var f=w2();b(u,f)};R(d,u=>{i()&&u(s)})}b(r,l)},$$slots:{default:!0}})}function Pc(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"hidden",3,!1),r=h(e,"disabled",3,!1),a=h(e,"graphIsOpened",3,!1),d=ve().ui.t,s=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Gt(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());Jm(f,{get isOpened(){return n(v)}})},$$slots:{default:!0}}),F()}var ev=require("@vkontakte/videoplayer-core/es2015");function kc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(u,"$playbackState$",i),a=h(e,"isMobile",3,!1),l=h(e,"isLiveActive",3,!1),d=h(e,"ariaLabel",3,""),s=ve(),u=s.state.playbackState$,f=s.actions.internal.switchToActiveLive,p=s.actions.internal.togglePlay,v=m(()=>()=>{if(!l()){f();return}r()===ev.PlaybackState.PAUSED&&p()}),$=m(()=>a()?"":"btn--live btn-full-opacity"),y=m(()=>l()?"btn-live":"btn-live-offset"),g=m(()=>l()&&r()===ev.PlaybackState.PLAYING);Gt(t,{get className(){return n($)},get testId(){return n(y)},get disabled(){return n(g)},get ariaLabel(){return d()},get click(){return n(v)},children:(w,I)=>{rc(w,{get isActive(){return l()}})},$$slots:{default:!0}}),F(),o()}var tv=require("@vkontakte/videoplayer-shared/es2015");var C2=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),T2=M('<img class="icon" aria-hidden="true"/>');function el(t,e){"use strict";let i=K(!1),o=()=>{O(i,!0)};var r=Le(),a=ce(r);{var l=s=>{var u=C2();b(s,u)},d=s=>{var u=T2();D(()=>Me(u,"src",e.icon)),dt("error",u,o),Va(u),b(s,u)};R(a,s=>{n(i)?s(l):s(d,!1)})}b(t,r)}function iv(t,e){B(e,!0);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,tv.noop),r=h(e,"ref",15),a=m(()=>o()===tv.noop),l=m(()=>n(a)||i()),d=m(()=>n(a)?"btn-full-opacity":"");Oo(t,{get disabled(){return n(l)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get disableMouseupTooltipShow(){return e.disableMouseupTooltipShow},get tooltipVisible(){return e.tooltipVisible},get ref(){return r()},set ref(s){r(s)},children:(s,u)=>{let f=m(()=>{var p;return(p=e.testId)!=null?p:e.id});Gt(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)=>{el(p,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),F()}var Db=t=>!!t.buttonComponent;var Fs={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var _p=(t,e,i,o)=>{if(t)for(let[r,a]of Object.entries(e))a.set(Jn(t,i,r,o))};var bp=require("@vkontakte/videoplayer-shared/es2015"),Bb=10,Fb=40,ov=.2,E2=.5,P2=65,k2=114,A2=4,Hb=({onPreviewTrackOpened:t,getTimelineRef:e,isHorizontal:i})=>{let o=m(()=>i?P2:k2),r=K(!1),a=K(0),l=K(0),d=m(()=>n(o)+Bb-Fb-A2),s=m(()=>(0,bp.interpolate)(n(a),[ov,1],[0,-n(d)])),u=m(()=>(0,bp.interpolate)(n(a),[ov,1],[0,Fb])),f=m(()=>(0,bp.interpolate)(n(a),[ov,1],[0,n(o)+Bb]));return{progressBarY:()=>n(s),controlsY:()=>n(u),calculatedHeight:()=>n(f),onPointerDown:g=>{var w;O(l,((w=e())==null?void 0:w.getBoundingClientRect().bottom)||0,!0),O(r,!0)},onPointerMove:g=>{if(!n(r))return;let w=Math.max(Math.min(g.clientY-n(l),0),-n(d));O(a,Math.abs(w/n(d)),!0)},onPointerUp:()=>{O(r,!1),O(a,n(a)>=E2?1:0,!0),n(a)===1&&t()},closePreviewTrack:()=>{O(a,0)}}};var L2=t=>t;function $s(t,{delay:e=0,duration:i=400,easing:o=L2}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*r}`}}var M2=M('<span class="root s-2b"> </span>'),V2={hash:"s-2b",code:".root.s-2b{box-shadow:0 8px 24px 0 rgba(0,0,0,.08);box-shadow:0 0 2px 0 rgba(0,0,0,.08);color:#fff;font-size:13px;font-weight:500;line-height:16px}"};function nv(t,e){Q(t,V2);var i=M2(),o=T(i,!0);S(i),D(()=>me(o,e.time)),b(t,i)}var R2=M('<div class="tooltip-wrapper s-i"><div><!></div></div>'),N2={hash:"s-i",code:'.tooltip-wrapper.s-i{display:block;position:relative}.tooltip.s-i{bottom:100%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .2s;visibility:hidden}.pointer.s-i: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-i{opacity:1;visibility:visible}'};function rv(t,e){Q(t,N2);let i=h(e,"active",3,!1),o=h(e,"pointer",3,!1),r=h(e,"translateXPx",3,0),a=h(e,"translateYPx",3,0),l=h(e,"leftOffset",3,0),d=h(e,"rightOffset",3,0),s=K(void 0),u=K(void 0);function f(w){if(!n(u))return 0;let{width:I}=n(u).getBoundingClientRect(),C=I/2;return w<C?C+l():w>e.containerWidth-C?e.containerWidth-C-d():w}let p=m(()=>f(r()));var v=R2(),$=T(v);let y;var g=T($);si(g,()=>{var w;return(w=e.children)!=null?w:_t}),S($),Ze($,w=>O(u,w),()=>n(u)),S(v),Ze(v,w=>O(s,w),()=>n(s)),D(w=>{Qe(v,`transform: translate(${n(p)}px, ${a()}px);`),y=se($,1,"tooltip s-i",null,y,w),Qe($,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,v)}var Ub=t=>Math.abs(t)/90%4===1;var O2=M('<div class="preview s-j"></div>'),D2=M('<div class="time s-j"> </div>'),B2=M('<div><!> <div class="episode s-j"><!></div> <!></div>'),F2={hash:"s-j",code:".timeline-preview.s-j{border-radius:2px;bottom:18px;pointer-events:none}.timeline-preview.mobile.s-j{bottom:72px}.preview.s-j{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-j{margin-bottom:4px;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.episode.s-j,.time.s-j{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-j{color:var(--white)}"};function sv(t,e){B(e,!0),Q(t,F2);let[i,o]=Re(),r=()=>x(y,"$rotateAlpha",i),a=()=>x(g,"$playerSize",i),l={MOBILE:150,DESKTOP:278},d=h(e,"time",3,""),s=h(e,"isMobile",3,!1),u=h(e,"videoEpisodes",19,()=>[]),f=h(e,"progress",3,0),p=h(e,"duration",3,0),v=h(e,"isInteractive",3,!1),$=ve(),y=$.ui.rotateAlpha,g=$.ui.playerSize,w=K(0),I=K(0),C=K(""),N=K(0),L=K(0),E=K(0),P=K(0),q=m(()=>dp(f(),p(),u())),H=m(()=>td(r())),z=m(()=>Ub(r())),j=m(ne),ae=m(()=>(n(z)?1:-1)*(n(w)/2-n(I)/2)),X=m(()=>n(ae)*-1);Oe(()=>{(Z=>{O(w,Z.width,!0),O(I,Z.height,!0)})(we())}),Oe(()=>{(Z=>{O(C,Z.imgSrc,!0),O(N,Z.imgWidth,!0),O(L,Z.imgHeight,!0),O(E,Z.imgOffsetX,!0),O(P,Z.imgOffsetY,!0)})(pe(f()))});function ne(){var Be;let Z=s()?l.MOBILE:l.DESKTOP,{isVertical:ie}=J(),De=30;return(Be=n(q))!=null&&Be.text&&(De+=16),(ie||n(H))&&(De+=18,De+=50),Math.min(Math.max(a().height-De,0),Z)}function 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:Be}=J();return ie&&(Z=Z/Be*n(j),Be=n(j)),De&&(Be=Be/Z*n(j),Z=n(j)),{width:Be,height:Z}}function pe(Z){let ie;e.previewThumbsData.isUV?ie=Math.floor(p()*Z/e.previewThumbsData.frequency):ie=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*Z)));let De=Math.floor(ie/e.previewThumbsData.countPerImage),Be=Math.floor(ie%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),ot=ie%e.previewThumbsData.countPerRow,U=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(U=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&U++);let Ae=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&De===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Ae=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let ke=n(w)*Ae,ze=n(I)*U,it=-ot*n(w),ye=-Be*n(I);return{imgSrc:e.previewThumbsData.links[De],imgWidth:ke,imgHeight:ze,imgOffsetX:it,imgOffsetY:ye}}var re=B2();let _e;var $e=T(re);{var ee=Z=>{var ie=O2();D(()=>Qe(ie,`width: ${n(w)}px; height: ${n(I)}px; background-image: url(${n(C)}); background-size: ${n(N)}px ${n(L)}px; background-position: ${n(E)}px ${n(P)}px;
61
+ transform: rotate(${r()}deg) ${n(H)?`translate(${n(ae)}px, ${n(X)}px)`:""};
62
+ `)),b(Z,ie)};R($e,Z=>{n(C)&&Z(ee)})}var Ne=A($e,2),fe=T(Ne);{var k=Z=>{var ie=Le(),De=ce(ie);{var Be=U=>{var Ae=gs();D(ke=>me(Ae,ke),[()=>G("tooltip_episode_unfinished")]),b(U,Ae)},ot=U=>{var Ae=gs();D(()=>me(Ae,n(q).text||"")),b(U,Ae)};R(De,U=>{v()&&n(q).completed===!1?U(Be):U(ot,!1)})}b(Z,ie)};R(fe,Z=>{n(q)&&Z(k)})}S(Ne);var Ke=A(Ne,2);{var Te=Z=>{var ie=D2(),De=T(ie,!0);S(ie),D(()=>me(De,d())),b(Z,ie)};R(Ke,Z=>{v()||Z(Te)})}S(re),D(Z=>{_e=se(re,1,"timeline-preview s-j",null,_e,Z),Qe(re,`width: ${n(H)?n(I):n(w)}px;`)},[()=>({mobile:s()})]),b(t,re),F(),o()}var H2=M('<span class="time s-f"> </span>'),U2=M("<!> <!>",1),z2={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 av(t,e){var le,he,Ve,st,mt;B(e,!0),Q(t,z2);let[i,o]=Re(),r=()=>x(X,"$interactiveEpisodes$",i),a=()=>x(P,"$duration$",i),l=()=>x(E,"$position$",i),d=()=>x(we,"$isInteractiveExpectation$",i),s=()=>x(J,"$isInteractiveTime$",i),u=()=>x($e,"$previewTrackActive",i),f=()=>x(q,"$isLive$",i),p=()=>x(_e,"$disabledControls$",i),v=()=>x(z,"$isMobile",i),$=()=>x(H,"$isActiveLive$",i),y=()=>x(L,"$bufferedProgress$",i),g=h(e,"showTimeline",3,!1),w=h(e,"withEpisodes",3,!0),I=h(e,"ref",15,void 0),C=ve(),N=Rt(),L=C.state.bufferedProgress$,E=C.state.positionWithScrubbing$,P=C.state.duration$,q=C.state.isLive$,H=C.state.isActiveLive$,z=C.ui.isMobile,j=N.features.episodes&&w()?C.actions.internal.getVideoEpisodes():void 0,ae=C.actions.internal.getPreviewThumbsData(),X=C.state.interactiveEpisodes$,ne=C.state.isInteractive,J=C.state.isInteractiveTime$,we=C.state.isInteractiveExpectation$,pe=C.actions.internal.correctSeekTimeToInteractive,re=(le=C.callbacks)==null?void 0:le.onDisabledTimelineClick,_e=C.ui.controls.disabledControls$,$e=C.ui.previewTrackActive,ee=(Ve=(he=C.callbacks)==null?void 0:he.uiInfo)==null?void 0:Ve.onTimelineMouseEnter,Ne=(mt=(st=C.callbacks)==null?void 0:st.uiInfo)==null?void 0:mt.onTimelineMouseLeave,fe=C.ui.t,k=N.features.interactiveResponsiveUi,Ke=m(()=>ne?r():j),Te=m(()=>nn(a())),Z=m(()=>nn(l())),ie=m(()=>l()/a()),De=m(()=>d()||s()),Be=K(!1),ot=K(""),U=K(0),Ae=K(0),ke=K(0),ze=m(()=>({containerWidth:n(Ae),translateXPx:n(U),translateYPx:ne&&ae?-36:-16,active:n(Be)&&g()&&!n(De)&&!k&&!u(),pointer:!N.features.timelinePreview||!ae||f()})),it=fe("aria_timeline"),ye=m(()=>fe("aria_timeline_value",{position:n(Z),duration:n(Te)}));function Ie(ue){return!pe||!ne?ue:pe(ue*a())/a()}function Fe(ue,We){var Ye;(Ye=e.onSliderPointerDown)==null||Ye.call(e,We),C.actions.internal.startScrubbing(Ie(ue))}function Dt(ue){s()||C.actions.internal.progressScrubbing(Ie(ue))}function vt(ue){var We;C.actions.internal.completeScrubbing(Ie(ue)),O(Be,!1),(We=e.onSliderPointerUp)==null||We.call(e)}function Ht(ue,We,Ye){var ut;(ut=e.onSliderPointerEnter)==null||ut.call(e,ue),ni(ue,We,Ye),O(Be,!0)}function ct(ue,We,Ye,ut){var zt;(zt=e.onSliderMove)==null||zt.call(e,ut,ue),ni(ue,We,Ye),O(Be,!0)}function St(){var ue;O(Be,!1),(ue=e.onSliderLeave)==null||ue.call(e)}function ni(ue,We,Ye){O(ke,Ie(ue),!0),O(U,We,!0),Ye&&O(Ae,Ye,!0),O(ot,At(ue),!0)}function At(ue){let We=nn((f()?1-ue:ue)*a());return f()?`-${We}`:We}let Bt=m(()=>p().has("TIMELINE"));var Ut=U2(),Y=ce(Ut);rv(Y,es(()=>n(ze),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(ue,We)=>{var Ye=Le(),ut=ce(Ye);{var zt=ri=>{sv(ri,{get time(){return n(ot)},get isMobile(){return v()},get videoEpisodes(){return n(Ke)},get previewThumbsData(){return ae},get progress(){return n(ke)},get duration(){return a()},get isInteractive(){return ne}})},Wt=ri=>{var $i=H2(),Xi=T($i,!0);S($i),D(()=>me(Xi,n(ot))),b(ri,$i)};R(ut,ri=>{N.features.timelinePreview&&ae&&!f()?ri(zt):ri(Wt,!1)})}b(ue,Ye)},$$slots:{default:!0}}));var Se=A(Y,2);Xa(Se,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},get ariaLabel(){return it},ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return l()},get ariaValueText(){return n(ye)},get loadedProgress(){return y()},get filledProgress(){return n(ie)},get handleProgress(){return n(ie)},get videoEpisodes(){return n(Ke)},onPointerDown:Fe,onHandleMove:Dt,onPointerMove:ct,onPointerUp:vt,onPointerEnter:Ht,onPointerLeave:St,get onMouseEnter(){return ee},get onMouseLeave(){return Ne},get onDisabledClick(){return re},get isInteractive(){return ne},get disabled(){return n(Bt)},get handleAlwaysVisible(){return u()},get hideHandel(){return s()},testId:"progress_bar",onContextMenu:vt,get ref(){return I()},set ref(ue){I(ue)}}),b(t,Ut),F(),o()}var W2={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),Q(t,W2);let[i,o]=Re(),r=()=>x(s,"$isMobile",i),a=h(e,"position",3,0),l=h(e,"duration",3,0),d=ve(),s=d.ui.isMobile,u=d.ui.t,f=m(()=>nn(l())),p=m(()=>nn(a())),v=m(()=>a()/l()),$=m(()=>u("aria_timeline_value",{position:n(p),duration:n(f)})),y=m(()=>Math.round(n(v)*100));Xa(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 K2=M("<div><!></div>"),q2=M("<div></div>"),Q2={hash:"s-b",code:".timeline.s-b{align-items:center;bottom:0;box-sizing:border-box;display:flex;min-width:86px;pointer-events:all;position:relative;width:100%}.timeline.mobile.s-b{height:16px;margin-top:6px;padding:6px 12px 7px}.withoutPadding.s-b{padding:0}.timeline-stub.s-b{min-width:20px;width:100%}.timeline-stub.mobile.s-b{height:8px}"};function tl(t,e){B(e,!0),Q(t,Q2);let[i,o]=Re(),r=()=>x(w,"$isLive$",i),a=()=>x(N,"$isMobile",i),l=()=>x(L,"$disabled",i),d=()=>x(C,"$adPosition",i),s=()=>x(I,"$adDuration",i),u=h(e,"isAds",3,!1),f=h(e,"isHidden",3,!1),p=h(e,"timelineNotAvailable",3,!1),v=h(e,"needPadding",3,!0),$=h(e,"ref",15,void 0),y=ve(),g=Rt(),w=y.state.isLive$,I=y.ads.duration,C=y.ads.position,N=y.ui.isMobile,L=de(!1),E=m(()=>!p()&&(!r()||r()&&e.canRewindLive&&e.isRewindableLive||u()));var P=Le(),q=ce(P);{var H=j=>{var ae=K2();let X;var ne=T(ae);{var J=pe=>{Ac(pe,{get position(){return d()},get duration(){return s()}})},we=pe=>{av(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),Ms(ae,()=>ql(f()&&g.features.usePerformanceFix,L,g.disableInvisibleComponentsTimeout)),D(pe=>X=se(ae,1,"timeline s-b",null,X,pe),[()=>({withoutPadding:!v(),mobile:a(),"out-of-flow":l()})]),b(j,ae)},z=j=>{var ae=q2();let X;D(ne=>X=se(ae,1,"timeline-stub s-b",null,X,ne),[()=>({mobile:a()})]),b(j,ae)};R(q,j=>{n(E)?j(H):j(z,!1)})}b(t,P),F(),o()}var zb=require("@vkontakte/videoplayer-shared/es2015");var G2=(t,e,i,o,r,a,l)=>{O(e,!0),O(i,t.clientX,!0),O(o,n(r),!0),a(l())},Y2=M("<div></div>"),j2=M('<div><div class="track s-2d"></div></div>'),X2={hash:"s-2d",code:'.root.s-2d{display:flex;height:var(--preview-track-frame-height-horizontal);overflow:hidden;position:relative;width:100%}.root.is-vertical-video.s-2d,.root.vertically-rotated.s-2d{height:var(--preview-track-frame-height-vertical)}.root.s-2d:after{background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.12);box-shadow:0 0 2px 0 rgba(0,0,0,.06);content:"";height:100%;margin:0 auto;pointer-events:none;width:3px;z-index:1}.track.s-2d{bottom:0;display:flex;left:0;padding:0 50%;top:0}.frame.s-2d,.track.s-2d{position:absolute}.frame.s-2d{background-position-x:calc(var(--column-index)*-1*var(--frame-width));background-position-y:calc(var(--frame-height)*-1*var(--row-index));background-size:calc(var(--frame-width)*var(--column-numbers)) calc(var(--frame-height)*var(--row-numbers));flex-shrink:0;height:var(--frame-height);pointer-events:none;transform-origin:center;width:var(--frame-width)}.vertically-rotated.s-2d .frame:where(.s-2d){transform-origin:0 0}.rotate-1.s-2d{transform:rotate(-90deg) translateX(-100%)}.rotate-2.s-2d{transform:rotate(-180deg)}.rotate-3.s-2d{transform:rotate(-270deg) translateY(-100%)}'};function dv(t,e){B(e,!0),Q(t,X2);let[i,o]=Re(),r=()=>x(N,"$rotateAlpha",i),a=()=>x(g,"$position$",i),l=()=>x(y,"$duration$",i),d=ve(),{countPerImage:s=0,countPerRow:u=0,countTotal:f=0,links:p=[],frameHeight:v=0,frameWidth:$=0}=d.actions.internal.getPreviewThumbsData()||{},{duration$:y,positionWithScrubbing$:g}=d.state,{startScrubbing:w,progressScrubbing:I,completeScrubbing:C}=d.actions.internal,N=d.ui.rotateAlpha,L=K(void 0),E=K(!1),P=K(0),q=K(0),H=K(0),z=K(0),j=m(()=>v<=$),ae=m(()=>td(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);Oe(()=>{O(z,Math.ceil(-n(H)/n(pe))-1),O(H,-n($e)*a()/l())});let Ne=()=>{C(fe(),!0)},fe=()=>l()*-n(H)/n($e)/l(),k=!1,Ke=ye=>{if(!n(E))return!1;let Ie=ye.clientX-n(P);O(H,n(q)+Ie),O(H,Math.max(Math.min(n(H),0),-n($e)),!0),Math.abs(Ie)>1&&(k=!0),I(fe())},Te=ye=>{n(E)&&(O(E,!1),!k&&ye&&O(H,-(ye.offsetX-n(ee)/2)),k=!1,Ne())},Z=()=>{n(E)&&Te()},ie=m(()=>s/u),De=(ye,Ie)=>{if(ye!==p.length-1)return u;let Fe=0,Dt=Ie*u;for(let vt=1;vt<=u;vt++)ye*s+Fe+Dt<f&&Fe++;return Fe},Be=m(()=>Math.floor(n(z)/s)),ot=m(()=>(0,zb.getRangeAroundIndex)(3,n(Be),p.length-1)),U=(ye,Ie,Fe)=>{let Dt=s*n(pe);return ye*Dt+Ie*n(pe)*u+n(ee)/2-we/2+Fe*n(pe)},Ae=m(()=>[`--row-numbers: ${n(ie)}`,`--column-numbers: ${u}`,`--frame-width: ${n(re)}px`,`--frame-height: ${n(_e)}`].join(";"));var ke=j2();let ze;var it=T(ke);it.__pointerdown=[G2,E,P,q,H,w,fe],it.__pointermove=Ke,it.__pointerup=Te,xi(it,20,()=>n(ot),ye=>ye,(ye,Ie)=>{var Fe=Le(),Dt=ce(Fe);xi(Dt,16,()=>Array.from({length:n(ie)},(vt,Ht)=>Ht),vt=>vt,(vt,Ht)=>{var ct=Le(),St=ce(ct);xi(St,16,()=>Array.from({length:De(Ie,Ht)},(ni,At)=>At),ni=>ni,(ni,At)=>{var Bt=Y2();D((Ut,Y)=>{Qe(Bt,Ut),se(Bt,1,Y,"s-2d")},[()=>`--row-index: ${Ht}; --column-index: ${At}; left: ${U(Ie,Ht,At)}px; background-image: url(${p[Ie]});`,()=>`frame rotate-${Math.abs(r())/90%4}`]),b(ni,Bt)}),b(vt,ct)}),b(ye,Fe)}),S(it),S(ke),Ze(ke,ye=>O(L,ye),()=>n(L)),D(ye=>{ze=se(ke,1,"root s-2d",null,ze,ye),Qe(ke,n(Ae)),Qe(it,`transform: translateX(${n(H)}px); width: ${n($e)}px;`)},[()=>({"is-vertical-video":!n(j),"vertically-rotated":n(ae)})]),dt("mouseleave",it,Z),Ln(ke,"clientWidth",ye=>O(ee,ye)),b(t,ke),F(),o()}je(["pointerdown","pointermove","pointerup"]);var Z2=M('<div class="notification s-2c"><span class="description s-2c"> </span></div>'),J2={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 cv(t,e){B(e,!1),Q(t,J2);let i=340,{ui:{t:o}}=ve();So();var r=Z2(),a=T(r),l=T(a,!0);S(a),S(r),D(d=>me(l,d),[()=>o("preview_track_close_tooltip")],In),Jr(3,r,()=>$s,()=>({duration:i})),b(t,r),F()}var Wb=require("@vkontakte/videoplayer-shared/es2015"),ew=M('<div class="preview-track-close tooltip s-28"><!></div>'),tw=M('<div class="preview-track-control s-28"><!> <div class="preview-track-close s-28"><!></div> <!></div>'),iw=M('<div class="wrapper-preview-track s-28"><!></div>'),ow=M('<div class="enriched-timeline s-28"><!> <!> <!></div>'),nw={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 uv(t,e){B(e,!0),Q(t,nw);let[i,o]=Re(),r=()=>x(g,"$playerSize",i),a=()=>x(y,"$duration$",i),l=()=>x(w,"$previewTrackActive",i),d=()=>x(v,"$position$",i),s=()=>x($,"$isRewindableLive$",i),u=h(e,"timelineRef",15,void 0),f=ve(),p=200,{positionWithScrubbing$:v,isRewindableLive$:$,duration$:y}=f.state,{playerSize:g,previewTrackActive:w}=f.ui,{countPerImage:I=0,links:C=[],frequency:N=0}=f.actions.internal.getPreviewThumbsData()||{},L=m(()=>r().width>100),E=K(!Y_()),P=()=>{n(E)&&(G_(),O(E,!1))},q=pe=>{let re=Math.floor(a()*pe/N),_e=Math.floor(re/I),$e=(0,Wb.getRangeAroundIndex)(3,_e,C.length-1);for(let ee of $e){let Ne=new Image;Ne.src=C[ee]}},H=(pe,re)=>{q(re),!l()&&e.onTimelineMove(pe)};var z=ow(),j=T(z);{var ae=pe=>{var re=tw(),_e=T(re);let $e=m(()=>nn(d()));nv(_e,{get time(){return n($e)}});var ee=A(_e,2),Ne=T(ee);Rs(Ne,{onClick:()=>f.actions.internal.closePreviewTrack()}),S(ee);var fe=A(ee,2);{var k=Ke=>{var Te=ew(),Z=T(Te);cv(Z,{}),S(Te),b(Ke,Te)};R(fe,Ke=>{n(E)&&Ke(k)})}S(re),dt("mouseleave",ee,P),Jr(3,re,()=>$s,()=>({duration:p})),b(pe,re)};R(j,pe=>{l()&&pe(ae)})}var X=A(j,2);let ne=m(()=>!n(L));tl(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=iw(),_e=T(re);dv(_e,{}),S(re),D(()=>Qe(re,`height: ${e.animatedPreviewTrackHeight}px;`)),b(pe,re)};R(J,pe=>{e.previewTrackAvailable&&pe(we)})}S(z),D(()=>Qe(z,`transform: translateY(${e.animatedOffsetY}px);`)),b(t,z),F(),o()}var sw=M('<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),aw={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 fv(t,e){var hl,$a;B(e,!0),Q(t,aw);let[i,o]=Re(),r=()=>x(Bo,"$disabledControls$",i),a=()=>x(rt,"$adPlaybackState",i),l=()=>x(Wt,"$playbackState$",i),d=()=>x(To,"$currentSubtitle$",i),s=()=>x(Xi,"$isEnded$",i),u=()=>x(rn,"$currentGridType$",i),f=()=>x(Nt,"$isLive$",i),p=()=>x(qe,"$chromecastState$",i),v=()=>x(bt,"$isPictureInPictureActive",i),$=()=>x(ei,"$pictureInPictureType$",i),y=()=>x(yi,"$availableSubtitlesList$",i),g=()=>x(Kt,"$contextMenuOpenedByKeyboard$",i),w=()=>x(Ct,"$showContextMenuBtn$",i),I=()=>x(hi,"$isRewindableLive$",i),C=()=>x(fi,"$isActiveLive$",i),N=()=>x(ss,"$graphIsOpened$",i),L=()=>x(Fo,"$contextMenuVisible$",i),E=()=>x(zi,"$isFullscreen",i),P=()=>x(lo,"$autoplayNextEnabled",i),q=()=>x(n(Io),"$prevButton",i),H=()=>x(n(Eo),"$replayButton",i),z=()=>x(n(po),"$playButton",i),j=()=>x(n(Oi),"$nextButton",i),ae=()=>x(n(Un),"$playPrevChapterButton",i),X=()=>x(n(Ji),"$seekToInteractiveButton",i),ne=()=>x(n(Wr),"$interactiveGraphButton",i),J=()=>x(n(Mi),"$liveButton",i),we=()=>x(n(xs),"$time",i),pe=()=>x(n(as),"$episodes",i),re=()=>x(n(ls),"$vkLogo",i),_e=()=>x(n(Pr),"$volume",i),$e=()=>x(n(cn),"$subtitles",i),ee=()=>x(n(dr),"$settings",i),Ne=()=>x(n(Po),"$context",i),fe=()=>x(n(ko),"$fullscreen",i),k=()=>x(n(cr),"$chromecast",i),Ke=()=>x(Ho,"$additionalDesktopControlPanelRightButtons$",i),Te=()=>x(Wi,"$playerSize",i),Z=()=>x(sn,"$isInteractiveTime$",i),ie=()=>x(pi,"$previewTrackActive",i),De=()=>x(wi,"$settingsMenuVisible",i),Be=()=>x(mo,"$settingButtonRef$",i),ot=()=>x(W,"$startedByKeyboard$",i),U=()=>x(ri,"$isAudioAvailable$",i),Ae=()=>x(Ut,"$fakeIsPlaying$",i),ke=()=>x(rs,"$seekToInteractiveDisabledTooltip$",i),ze=()=>x(qr,"$isPreviewTrackHorizontallyAligned$",i),it=()=>x(wn,"$previewTrackAvailable",i),ye=()=>x(Di,"$previewTrackDragInProgress",i),Ie=()=>x(Xt,"$adPosition",i),Fe=()=>x(zt,"$position$",i),Dt=()=>x(Tt,"$adDuration",i),vt=()=>x(ut,"$duration$",i),Ht=h(e,"playerControlsWrapperRef",15,void 0),ct=h(e,"playerControlsRef",15,void 0),St=h(e,"isAds",3,!1),ni=h(e,"logoTargetUrl",3,""),At=h(e,"isOneVideoPlaylist",3,!1),Bt=h(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:Ut}=Co(),Y=ve(),Se=Co(),le=Rt(),he=Y.actions.internal.toggleMuted,Ve=Y.actions.internal.togglePlay,st=Y.actions.internal.pause,mt=Y.actions.internal.toggleSubtitle,ue=Y.actions.internal.checkFullscreenSupport,We=(hl=Y.callbacks)==null?void 0:hl.onAudioDoesNotExistHint,Ye=($a=Y.callbacks)==null?void 0:$a.onAudioDisabledHint,ut=Y.state.duration$,zt=Y.state.positionWithScrubbing$,Wt=Y.state.playbackState$,ri=Y.state.isAudioAvailable$,$i=Y.state.isAudioDisabled,Xi=Y.state.isEnded$,Nt=Y.state.isLive$,fi=Y.state.isActiveLive$,hi=Y.state.isRewindableLive$,{isActive$:bt,type$:ei}=Se.pictureInPicture$,wi=Y.ui.settingsMenu.visible$,Zi=Y.ui.settingsMenu.openedByBtnKeyboard$,ii=Y.ui.controls,Et=Y.actions.internal.getVideoEpisodes(),qe=Y.state.chromecastState$,yi=Y.state.availableSubtitlesList$,To=Y.state.currentSubtitle$,Bo=ii.disabledControls$,Fo=Y.ui.contextMenu.visible$,Ct=Y.ui.contextMenu.showContextMenuBtn$,Kt=Y.ui.contextMenu.openedByBtnKeyboard$,W=Y.ui.startedByKeyboard$,Lt=Y.ui.controlBlocks,li=Y.ui.previewTrackNotificationVisible,pt=Y.ui.t,Tt=Y.ads.duration,Xt=Y.ads.position,rt=Y.ads.playbackState,zi=Y.ui.isFullscreen,Wi=Y.ui.playerSize,rn=Y.ui.currentGridType$,Ho=Y.ui.additionalDesktopControlPanelRightButtons$,lo=Y.ui.autoplayNextEnabled$,Ri=Y.actions.internal.getVideoElement,Dr=Y.actions.internal.replayInteractive,bo=Y.actions.internal.prevVideoClick,$o=Y.actions.internal.nextVideoClick,Li=Y.state.isInteractive,sn=Y.state.isInteractiveTime$,Uo=Y.state.showInteractiveGraph,On=Y.state.showSeekToInteractive,xr=Y.state.showPlayPrevChapter,wr=Y.state.showInteractiveTimeIndicator,ys=Y.state.playPrevChapterDisabledTooltip,rs=Se.seekToInteractiveDisabledTooltip$,ss=Se.graphIsOpened$,tr=le.features.interactiveResponsiveUi,Br=m(()=>r().has("EPISODE_BUTTON")),an=m(()=>r().has("GRAPH_BUTTON")),Dn=m(()=>r().has("SEEK_TO_INTERACTIVE_BUTTON")),Sr=m(()=>r().has("PLAY_BUTTON")),zo=m(()=>r().has("REPLAY_BUTTON")),ir=m(()=>r().has("PLAY_PREV_CHAPTER_BUTTON")),or=()=>Y.actions.internal.toggleChromecast(),Fr=m(()=>St()?a()==="playing":l()===il.PlaybackState.PLAYING),nr=m(()=>d().value!=="off"),co=m(()=>s()&&!St()||Li),Hr=m(()=>tr?n(co)&&ro(u(),"m"):n(co)),rr=m(()=>!s()||Li||St()),hn=m(()=>ro(u(),"m")),yo=m(()=>e.showNextPrevButtons&&ro(u(),"m")&&!St()&&e.nextButtonActive),Cr=m(()=>e.showNextPrevButtons&&ro(u(),"m")&&!St()&&e.prevButtonActive),sr=m(()=>!St()&&!!f()),gt=m(()=>p()!==il.ChromecastState.NOT_AVAILABLE&&!(v()&&$()===1)&&ro(u(),"m")&&!Li),di=m(()=>e.showAutoplayNext&&!At()&&ro(u(),"s")),Ur=m(()=>y().length>0&&ro(u(),"m")),ar=m(()=>g()||w()),zr=m(()=>ro(u(),"s")&&!St()),Wo=m(()=>!e.logoHidden&&!St()),Bn=m(()=>le.features.fullscreen&&ue()&&(e.logoHidden||ro(u(),tr?"xs":"s"))&&!(v()&&$()===1)&&(Li?Bt():!0)),_n=m(()=>(!f()||St())&&!(le.features.interactiveHideTime&&Li)),ln=m(()=>Uo&&ro(u(),"m")),bn=m(()=>tr?On&&ro(u(),"s"):On),Tr=m(()=>tr?xr&&ro(u(),"s"):xr),Ko=m(()=>!St()&&!f()&&!!(Et!=null&&Et.length)&&n(hn)&&!n(Br)),qo=m(()=>!I()||!!C()),$n=m(()=>N()?pt("tooltip_interactive_graph_on"):pt("tooltip_interactive_graph_off")),Ir=m(()=>L()?pt("tooltip_context_menu_close"):pt("tooltip_context_menu_open")),Si=(nt,ft)=>nt?ft&&ft===il.PlaybackState.PAUSED?pt("tooltip_play"):"":pt("tooltip_live"),yn=m(()=>Si(n(qo),l())),Fn=m(()=>le.logoType==="vk_video"?pt("tooltip_vk_video_logo"):pt("tooltip_vk_logo")),lr=m(()=>n(nr)?pt("tooltip_subtitles_on"):pt("tooltip_subtitles_off")),Er=m(()=>E()?pt("tooltip_fullscreen_on"):pt("tooltip_fullscreen_off")),Hn=m(()=>p()===il.ChromecastState.CONNECTED?pt("tooltip_chromecast_on"):pt("tooltip_chromecast_off")),dn=m(()=>P()?pt("tooltip_autoplay_on"):pt("tooltip_autoplay_off")),xt=K(0),Pt=ci({}),uo=ci({}),Io=m(()=>ii.prevButton),Eo=m(()=>ii.replayButton),po=m(()=>ii.playButton),Oi=m(()=>ii.nextButton),Un=m(()=>ii.playPrevChapterButton),Ji=m(()=>ii.seekToInteractiveButton),Wr=m(()=>ii.interactiveGraphButton),Mi=m(()=>ii.liveButton),xs=m(()=>ii.time),as=m(()=>ii.episodes),ls=m(()=>ii.vkLogo),Pr=m(()=>ii.volume),cn=m(()=>ii.subtitles),dr=m(()=>ii.settings),Po=m(()=>ii.context),ko=m(()=>ii.fullscreen),cr=m(()=>ii.chromecast),Ue=m(()=>({prevButton:q()?q().right-q().left:0,replayButton:H()?H().right-H().left:0,playButton:z()?z().right-z().left:0,nextButton:j()?j().right-j().left:0,playPrevChapterButton:ae()?ae().right-ae().left:0,seekToInteractiveButton:X()?X().right-X().left:0,interactiveGraphButton:ne()?ne().right-ne().left:0,liveButton: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:Ne()?Ne().right-Ne().left:0,fullscreen:fe()?fe().right-fe().left:0,chromecast:k()?k().right-k().left:0,additionalButtons:Ke().length?Ke().reduce(nt=>[...nt,40],[]):[]})),Mt=K(0);Oe(()=>{(!n(Mt)||n(Mt)<n(Ue).time)&&It(()=>O(Mt,n(Ue).time,!0))});let Ci=K(!1);Oe(()=>{let nt=0;n(Ko)&&(ro(u(),"xl")?nt=n(Ue).time:nt=60);let ft=n(Ue).prevButton+n(Ue).playButton+n(Ue).nextButton+n(Ue).seekToInteractiveButton+n(Ue).interactiveGraphButton+n(Ue).liveButton+n(Mt)+nt;O(Ci,n(_n)&&n(xt)>=ft,!0)});let Qo=m(()=>n(Ci)&&ro(u(),"m")),fo=(0,pv.debounceFn)(od,260),Ao=(0,pv.debounceFn)(_p,260);Oe(()=>{Te(),Z(),ie(),fo(Ri(),ii,Pt,e.showControls),Ao(Ri(),Lt,uo,e.showControls)}),Oe(()=>{uo.bottom=Ht()});let mo=de();Oe(()=>{De(),Be()&&It(()=>Gl(Be(),De(),Zi))});let Go;Oe(()=>{ot(),It(()=>gp(W,ot(),Go))});function zn(){la({isAudioDisabled:$i,isAudioAvailable:U(),isAds:St(),audioIsNotExistHintCallback:We,audioDisabledHintCallback:Ye})&&he()}let un=Li?Dr:Ve,xo=m(()=>Ae()!==null),eo=m(()=>n(xo)?Ae():n(Fr)),Wn=m(()=>n(eo)?pt("tooltip_pause"):pt("tooltip_play")),Kn=pt("tooltip_episodes"),qn=m(()=>{var nt,ft,to,Mo;return n(Cr)?{id:"prevButton",type:"desktop-control-panel-left",weight:Ds.prevButton,buttonComponent:Ja,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:bo.bind(null,!0)},tooltipEnabled:!((ft=(nt=Y.callbacks)==null?void 0:nt.uiInfo)!=null&&ft.onPrevButtonMouseEnter)&&!((Mo=(to=Y.callbacks)==null?void 0:to.uiInfo)!=null&&Mo.onPrevButtonMouseLeave),mouseEnter:()=>{var io,_i,Ki;(Ki=(_i=(io=Y.callbacks)==null?void 0:io.uiInfo)==null?void 0:_i.onPrevButtonMouseEnter)==null||Ki.call(_i,Jn(Ri(),Pt,"prevButton",e.showControls))},mouseLeave:()=>{var io,_i,Ki;(Ki=(_i=(io=Y.callbacks)==null?void 0:io.uiInfo)==null?void 0:_i.onPrevButtonMouseLeave)==null||Ki.call(_i,Jn(Ri(),Pt,"prevButton",e.showControls))},tooltipText:pt("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),kr=m(()=>n(Hr)?{id:"replayButton",type:"desktop-control-panel-left",weight:Ds.replayButton,buttonComponent:nd,buttonComponentProps:{disabled:n(zo),click:un},tooltipText:pt("tooltip_restart"),disabled:n(zo)}:void 0),ur=m(()=>n(rr)?{id:"playButton",type:"desktop-control-panel-left",weight:Ds.playButton,buttonComponent:rd,buttonComponentProps:{disabled:n(Sr),isPlaying:n(Fr),click:Ve},tooltipText:n(Wn),disabled:n(Sr)}:void 0),ws=m(()=>{var nt,ft,to,Mo;return n(yo)?{id:"nextButton",type:"desktop-control-panel-left",weight:Ds.nextButton,buttonComponent:Ja,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:$o.bind(null,!0)},tooltipEnabled:!((ft=(nt=Y.callbacks)==null?void 0:nt.uiInfo)!=null&&ft.onNextButtonMouseEnter)&&!((Mo=(to=Y.callbacks)==null?void 0:to.uiInfo)!=null&&Mo.onNextButtonMouseLeave),mouseEnter:()=>{var io,_i,Ki;(Ki=(_i=(io=Y.callbacks)==null?void 0:io.uiInfo)==null?void 0:_i.onNextButtonMouseEnter)==null||Ki.call(_i,Jn(Ri(),Pt,"nextButton",e.showControls))},mouseLeave:()=>{var io,_i,Ki;(Ki=(_i=(io=Y.callbacks)==null?void 0:io.uiInfo)==null?void 0:_i.onNextButtonMouseLeave)==null||Ki.call(_i,Jn(Ri(),Pt,"nextButton",e.showControls))},tooltipText:pt("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),et=m(()=>Li&&n(Tr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:Ds.playPrevChapterButton,buttonComponent:Tc,buttonComponentProps:{disabled:n(ir),click:e.playPrevChapter},tooltipText:pt("tooltip_interactive_go_back"),disabledTooltipContent:pt(ys),disabled:n(ir)}:void 0),Zt=m(()=>Li&&n(bn)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:Ds.seekToInteractiveButton,buttonComponent:Ec,buttonComponentProps:{disabled:n(Dn),click:e.seekToInteractive},tooltipText:pt("tooltip_interactive_seek"),disabled:n(Dn),disabledTooltipContent:pt(ke())}:void 0),Ei=m(()=>Li&&n(ln)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:Ds.interactiveGraphButton,buttonComponent:Pc,buttonComponentProps:{disabled:n(an),click:ss.toggle,graphIsOpened:N()},tooltipText:n($n)}:void 0),wo=m(()=>n(sr)?{id:"liveButton",type:"desktop-control-panel-left",weight:Ds.liveButton,buttonComponent:kc,buttonComponentProps:{isLiveActive:n(qo),ariaLabel:n(yn)},tooltipText:n(yn),disabled:n(qo)&&l()===il.PlaybackState.PLAYING}:void 0),Yo=m(()=>[n(qn),n(kr),n(ur),n(ws),n(et),n(Zt),n(Ei),n(wo)].filter(nt=>!!nt).sort(qa)),Kr=m(()=>n(Wo)?{id:"vkLogo",type:"desktop-control-panel-right",weight:Fs.vkLogo,buttonComponent:_c,buttonComponentProps:{targetUrl:ni(),logoClickable:e.logoClickable,click:st},tooltipText:n(Fn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Lo=m(()=>n(di)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:Fs.autoplayNext,buttonComponent:Ic,tooltipText:n(dn)}:void 0),pr=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:Fs.volume,buttonComponent:Dm,buttonComponentProps:{click:zn,isAds:St()}})),Qn=m(()=>n(Ur)?{id:"subtitles",type:"desktop-control-panel-right",weight:Fs.subtitles,buttonComponent:Vm,buttonComponentProps:{isSubtitlesEnabled:n(nr),click:mt},tooltipText:n(lr)}:void 0),ma=m(()=>n(zr)?{id:"settings",type:"desktop-control-panel-right",weight:Fs.settings,buttonComponent:Jl,buttonComponentProps:{ref$:mo},tooltipText:De()?void 0:pt("tooltip_settings_off")}:void 0),zs=m(()=>le.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:Fs.context,buttonComponent:jm,buttonComponentProps:{ariaLabel:pt("aria_label_context_menu")},className:n(ar)?"":"out-of-view",tooltipText:n(Ir)}:void 0),Ws=m(()=>n(Bn)?{id:"fullscreen",type:"desktop-control-panel-right",weight:Fs.fullscreen,buttonComponent:hc,buttonComponentProps:{isFullscreen:E(),click:e.toggleFullscreen},tooltipText:n(Er)}:void 0),xn=m(()=>n(gt)?{id:"chromecast",type:"desktop-control-panel-right",weight:Fs.chromecast,buttonComponent:$c,buttonComponentProps:{state:p(),click:or},tooltipText:n(Hn)}:void 0),lt=m(()=>[n(Kr),n(Lo),n(pr),n(Qn),n(ma),n(zs),n(Ws),n(xn),...Ke()].filter(nt=>!!nt).sort(qa)),pi=Y.ui.previewTrackActive,Di=Y.ui.previewTrackDragInProgress,wn=Y.ui.previewTrackAvailable,qr=Y.ui.isPreviewTrackHorizontallyAligned,Sn=m(()=>Hb({onPreviewTrackOpened:Y.actions.internal.previewTrackOpened,getTimelineRef:()=>Pt.timeline,isHorizontal:ze()})),be=m(()=>n(Sn).progressBarY),wt=m(()=>n(Sn).controlsY),Ft=m(()=>n(Sn).onPointerDown),oi=m(()=>n(Sn).onPointerMove),Pi=m(()=>n(Sn).onPointerUp),ki=m(()=>n(Sn).calculatedHeight),Vi=m(()=>n(Sn).closePreviewTrack);Oe(()=>{ie()?li.set(!1):n(Vi)()});let Ti;Vt(()=>()=>Ti&&clearTimeout(Ti));let ds=nt=>{ie()||!it()||(n(Ft)(nt),Ti=setTimeout(()=>{Y.actions.internal.previewTrackDragStarted()},200))},Ks=()=>{ie()||n(Pi)(),Ti&&clearTimeout(Ti),ye()&&Y.actions.internal.previewTrackDragFinished()},fl=nt=>{n(oi)(nt),!ie()&&it()&&!ie()&&li.set(!0)},va=()=>{li.set(!1)};var ga=sw(),cs=ce(ga);let Ss;var ha=T(cs);{var _a=nt=>{let ft=m(()=>n(be)()),to=m(()=>n(ki)());uv(nt,{get animatedOffsetY(){return n(ft)},get animatedPreviewTrackHeight(){return n(to)},get canRewindLive(){return e.canRewindLive},get isAds(){return St()},onTimelineMove:fl,onTimelinePointerDown:ds,onTimelinePointerUp:Ks,onTimelinePointerLeave:va,get previewTrackAvailable(){return it()},get timelineRef(){return Pt.timeline},set timelineRef(Mo){Pt.timeline=Mo}})};R(ha,nt=>{e.showControls&&nt(_a)})}var Cn=A(ha,2),Cs=T(Cn),ml=T(Cs);xi(ml,17,()=>n(Yo),nt=>nt.id,(nt,ft)=>{hp(nt,{get buttonComponent(){return n(ft).buttonComponent},get buttonComponentProps(){return n(ft).buttonComponentProps},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(ft).disabled},get className(){return n(ft).className},get tooltipEnabled(){return n(ft).tooltipEnabled},get mouseEnter(){return n(ft).mouseEnter},get mouseLeave(){return n(ft).mouseLeave},get tooltipVisible(){return e.showControls},get ref(){return Pt[n(ft).id]},set ref(to){Pt[n(ft).id]=to}})});var fr=A(ml,2);{var gd=nt=>{let ft=m(()=>!e.showControls),to=m(()=>St()?Ie():Fe()),Mo=m(()=>St()?Dt():vt());mc(nt,{get isHidden(){return n(ft)},isMobile:!1,get showDuration(){return n(Qo)},get position(){return n(to)},get duration(){return n(Mo)},get ref(){return Pt.time},set ref(io){Pt.time=io}})};R(fr,nt=>{n(_n)&&nt(gd)})}var vl=A(fr,2);let hd=m(()=>!n(Ko));Oo(vl,{className:"w-max",get disabled(){return n(hd)},get tooltipContent(){return Kn},get tooltipVisible(){return e.showControls},get ref(){return Pt.episodes},set ref(nt){Pt.episodes=nt},children:(nt,ft)=>{var to=Le(),Mo=ce(to);{var io=_i=>{yc(_i,{get position(){return Fe()},get duration(){return vt()},get timeCodes(){return Et}})};R(Mo,_i=>{n(Ko)&&_i(io)})}b(nt,to)},$$slots:{default:!0}}),S(Cs);var ba=A(Cs,2);xi(ba,21,()=>n(lt),nt=>nt.id,(nt,ft)=>{var to=Le(),Mo=ce(to);{var io=Ki=>{hp(Ki,{get buttonComponent(){return n(ft).buttonComponent},get buttonComponentProps(){return n(ft).buttonComponentProps},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(ft).disabled},get className(){return n(ft).className},get tooltipVisible(){return e.showControls},get ref(){return Pt[n(ft).id]},set ref(qs){Pt[n(ft).id]=qs}})},_i=Ki=>{let qs=m(()=>!!n(ft).disabled);iv(Ki,{get id(){return n(ft).id},get testId(){return n(ft).testId},get icon(){return n(ft).icon},get ariaLabel(){return n(ft).ariaLabel},get tooltipText(){return n(ft).tooltipText},get disabledTooltipContent(){return n(ft).disabledTooltipContent},get disabled(){return n(qs)},get onClick(){return n(ft).onClick},get disableMouseupTooltipShow(){return n(ft).disableMouseupTooltipShow},get tooltipVisible(){return e.showControls},get ref(){return Pt[n(ft).id]},set ref(bd){Pt[n(ft).id]=bd}})};R(Mo,Ki=>{Db(n(ft))?Ki(io):Ki(_i,!1)})}b(nt,to)}),S(ba),S(Cn),Ze(Cn,nt=>ct(nt),()=>ct()),S(cs),Ze(cs,nt=>Ht(nt),()=>Ht());var _d=A(cs,2);{var gl=nt=>{Sc(nt,{get ref(){return Pt.interactiveTimeIndicator},set ref(ft){Pt.interactiveTimeIndicator=ft}})};R(_d,nt=>{wr&&nt(gl)})}D((nt,ft)=>{Ss=se(cs,1,"wrapper-bottom s-1e",null,Ss,nt),Qe(Cn,ft),Cn.inert=ie()},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth||ye()}),()=>`transform: translateY(${n(wt)()}px);`]),Ln(Cs,"clientWidth",nt=>O(xt,nt)),b(t,ga),F(),o()}var sd=require("@vkontakte/videoplayer-core/es2015");var mv=require("@vkontakte/videoplayer-shared/es2015");var lw=M('<div class="icon icon-error-stub s-1z"><div class="inner s-1z"></div></div>'),dw=M('<img class="icon s-1z" aria-hidden="true"/>'),cw={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 vv(t,e){Q(t,cw);let i=h(e,"disabled",3,!1),o=h(e,"onClick",3,mv.noop),r=m(()=>o()===mv.noop),a=m(()=>n(r)||i()),l=K(!1),d=()=>{O(l,!0)},s=m(()=>n(r)?"btn-full-opacity":"");Gt(t,{get className(){return n(s)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return n(a)},get testId(){return e.testId},children:(u,f)=>{var p=Le(),v=ce(p);{var $=g=>{var w=lw();b(g,w)},y=g=>{var w=dw();D(()=>Me(w,"src",e.iconUrl)),dt("error",w,d),Va(w),b(g,w)};R(v,g=>{n(l)?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}})}var uw=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 gv(t){Je(t,{testId:"muted-icon",children:(e,i)=>{var o=uw();b(e,o)},$$slots:{default:!0}})}var Kb=require("@vkontakte/videoplayer-shared/es2015");function $p(t,e){B(e,!0);let i=h(e,"muted",3,!1),o=h(e,"click",3,Kb.noop),r=h(e,"ref",15,void 0),l=ve().ui.t,d=m(()=>i()?l("tooltip_volume"):l("tooltip_volume_muted")),s=m(()=>i()?"btn-mobile-muted":"btn-mobile-unmuted");Gt(t,{get testId(){return n(s)},get click(){return o()},get ariaLabel(){return n(d)},role:"button",get ref(){return r()},set ref(u){r(u)},children:(u,f)=>{var p=Le(),v=ce(p);{var $=g=>{gv(g,{})},y=g=>{ua(g,{get size(){return"24"}})};R(v,g=>{i()?g($):g(y,!1)})}b(u,p)},$$slots:{default:!0}}),F()}var pw=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>'),fw=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>'),mw=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 hv(t,e){let i=h(e,"isActive",3,!1),o=m(()=>i()?"pip-icon--active":"pip-icon");Je(t,{get testId(){return n(o)},children:(r,a)=>{var l=mw(),d=A(ce(l));{var s=f=>{var p=pw();b(f,p)},u=f=>{var p=fw();b(f,p)};R(d,f=>{i()?f(s):f(u,!1)})}b(r,l)},$$slots:{default:!0}})}var qb=require("@vkontakte/videoplayer-shared/es2015");function _v(t,e){B(e,!0);let i=h(e,"ref",15,void 0),o=h(e,"isPictureInPictureActive",3,!1),r=h(e,"click",3,qb.noop),a=G("menu_pip");Gt(t,{testId:"btn-pip",get ariaLabel(){return a},get click(){return r()},get ref(){return i()},set ref(l){i(l)},children:(l,d)=>{hv(l,{get isActive(){return o()}})},$$slots:{default:!0}}),F()}var bv=require("@vkontakte/videoplayer-shared/es2015");var vw=(t,e,i,o)=>{n(e)&&i.onDisabledPlayPrevChapterClick(n(o))},gw=(t,e,i,o)=>{n(e)&&i.onDisabledSeekToInteractiveClick(n(o))},hw=M("<div><!></div>"),_w=M("<div><!></div>"),bw=M("<div><!></div>"),$w=M("<!> <!> <!>",1),yw=M("<div></div> <div></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),xw=M('<div class="wrapper-middle s-1d"><!></div>'),ww=M("<div><!></div> <!> <div><!></div>",1),Sw=M('<div aria-hidden="true">·</div> <!>',1),Cw=M('<!> <!> <div><div><div class="controls mobile s-1d" data-testid="bottom-controls"><div class="controls-group contain s-1d"><!> <!> <!> <!></div> <div class="controls-group s-1d"><!> <!> <!></div></div> <!></div></div> <!>',1),Tw={hash:"s-1d",code:".wrapper-bottom.s-1d{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-1d>:where(.s-1d){pointer-events:auto}.wrapper-bottom.ads-timeline-mobile.s-1d{height:9px;padding:0 4px 4px}.wrapper-middle.s-1d{align-items:center;left:50%;top:50%;transform:translate(-50%,-50%)}.wrapper-middle.s-1d,.wrapper-top-right.s-1d{display:flex;position:absolute;transition:opacity var(--controls-transition-duration);z-index:var(--controls-container-z-index)}.wrapper-top-right.s-1d{right:8px;top:4px}.wrapper-top-left.s-1d{left:8px;position:absolute;top:4px;z-index:var(--controls-container-z-index)}.wrapper-middle-left.s-1d,.wrapper-middle-left-second.s-1d,.wrapper-middle-right.s-1d{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-1d{left:12px}.wrapper-middle-left-second.s-1d{left:64px}.wrapper-middle-right.s-1d{right:12px}.controls.s-1d{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-1d,.controls-group.s-1d{display:flex}.controls-group.contain.s-1d{min-width:0}.controls-group.s-1d >:not(:first-child){margin-left:8px}.hidden.s-1d{opacity:0;visibility:hidden}.controls-hidden.s-1d{transform:translateY(100%);visibility:visible}.wrapper-bottom.no-smooth.s-1d{transition:none}.overlay-mobile.s-1d{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-1d,.wrapper-top-right.fullscreen.s-1d{top:16px}.controls-wrapper.fullscreen.s-1d{bottom:30px;position:absolute;width:calc(100% - 8px)}}@media screen and (orientation:landscape){.wrapper-top-left.fullscreen.s-1d{left:44px;top:12px}.wrapper-top-right.fullscreen.s-1d{right:44px;top:12px}.wrapper-middle-left.fullscreen.s-1d{left:44px}.wrapper-middle-left-second.fullscreen.s-1d{left:96px}.wrapper-middle-right.fullscreen.s-1d{right:44px}.controls-wrapper.fullscreen.s-1d{bottom:32px;left:36px;position:absolute;right:36px;width:calc(100% - 72px)}}"};function $v(t,e){var ko,cr;B(e,!0),Q(t,Tw);let[i,o]=Re(),r=()=>x(Wi,"$seekToInteractiveDisabledTooltip$",i),a=()=>x(ii,"$disabledControls$",i),l=()=>x(At,"$playbackState$",i),d=()=>x(Bo,"$adPlaybackState",i),s=()=>x(Y,"$isEnded$",i),u=()=>x(Ct,"$playerSize",i),f=()=>x(mt,"$scrubbingInProgress",i),p=()=>x(wi,"$chromecastState$",i),v=()=>x(We,"$isPictureInPictureActive",i),$=()=>x(Ye,"$pictureInPictureType$",i),y=()=>x(ue,"$mobileNotReportControlHidden$",i),g=()=>x(hi,"$chromecastHidden",i),w=()=>x(ct,"$playerPhase",i),I=()=>x(Nt,"$pipHidden",i),C=()=>x(qe,"$currentGridType$",i),N=()=>x($i,"$vkLogoHidden",i),L=()=>x(ri,"$volumeHidden",i),E=()=>x(Se,"$isLive$",i),P=()=>x(ut,"$settingsMenuVisible",i),q=()=>x(st,"$isRewindableLive$",i),H=()=>x(Ve,"$isActiveLive$",i),z=()=>x(Bt,"$isAudioAvailable$",i),j=()=>x(he,"$muted$",i),ae=()=>x(le,"$volume$",i),X=()=>x(pt,"$isInteractiveTime$",i),ne=()=>x(bn,"$settingButtonRef$",i),J=()=>x(Et,"$startedByKeyboard$",i),we=()=>x(Fo,"$isFullscreen",i),pe=()=>x(Kt,"$additionalButtons$",i),re=()=>x(Xi,"$autoplayNextToggleHidden",i),_e=()=>x(Zi,"$crashed$",i),$e=()=>x(fi,"$settingsHidden",i),ee=()=>x(rn,"$graphIsOpened$",i),Ne=()=>x(To,"$adPosition",i),fe=()=>x(yi,"$adDuration",i),k=()=>x(ni,"$position$",i),Ke=()=>x(St,"$duration$",i),Te=h(e,"playerControlsWrapperRef",15,void 0),Z=h(e,"playerControlsRef",15,void 0),ie=h(e,"isAds",3,!1),De=h(e,"logoTargetUrl",3,""),Be=h(e,"isOneVideoPlaylist",3,!1),ot=h(e,"customFullscreenSupported",3,!0),U=ve(),Ae=Co(),ke=Rt(),ze=U.actions.internal.toggleMuted,it=U.actions.internal.togglePlay,ye=U.actions.internal.pause,Ie=U.actions.internal.prevVideoClick,Fe=U.actions.internal.nextVideoClick,Dt=U.actions.internal.checkFullscreenSupport,vt=(ko=U.callbacks)==null?void 0:ko.onAudioDoesNotExistHint,Ht=(cr=U.callbacks)==null?void 0:cr.onAudioDisabledHint,ct=U.playerPhase,St=U.state.duration$,ni=U.state.positionWithScrubbing$,At=U.state.playbackState$,Bt=U.state.isAudioAvailable$,Ut=U.state.isAudioDisabled,Y=U.state.isEnded$,Se=U.state.isLive$,le=U.state.volume$,he=U.state.muted$,Ve=U.state.isActiveLive$,st=U.state.isRewindableLive$,mt=U.ui.scrubbingInProgress,ue=U.ui.mobileNotReportControlHidden$,{isActive$:We,type$:Ye}=Ae.pictureInPicture$,ut=U.ui.settingsMenu.visible$,zt=U.ui.settingsMenu.openedByBtnKeyboard$,Wt=U.ui.controls,{volume:ri,vkLogo:$i,autoplayNextToggle:Xi,pip:Nt,settings:fi,chromecast:hi}=U.ui.hiddenControls,bt=U.actions.internal.getVideoEpisodes(),ei=U.webApi.pictureInPictureApi,wi=U.state.chromecastState$,Zi=U.state.crashed$,ii=Wt.disabledControls$,Et=U.ui.startedByKeyboard$,qe=U.ui.currentGridType$,yi=U.ads.duration,To=U.ads.position,Bo=U.ads.playbackState,Fo=U.ui.isFullscreen,Ct=U.ui.playerSize,Kt=U.ui.additionalButtonsDeprecated$,W=U.actions.internal.getVideoElement,Lt=U.actions.internal.replayInteractive,li=U.state.isInteractive,pt=U.state.isInteractiveTime$,Tt=U.state.showInteractiveGraph,Xt=U.state.showSeekToInteractive,rt=U.state.showPlayPrevChapter,zi=U.state.showInteractiveTimeIndicator,Wi=Ae.seekToInteractiveDisabledTooltip$,rn=Ae.graphIsOpened$,Ho=U.ui.controlBlocks,lo=m(()=>G(U.state.playPrevChapterDisabledTooltip)),Ri=m(()=>G(r())),Dr=m(()=>a().has("EPISODE_BUTTON")),bo=m(()=>a().has("GRAPH_BUTTON")),$o=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Li=m(()=>a().has("PLAY_BUTTON")),sn=m(()=>a().has("REPLAY_BUTTON")),Uo=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),On=m(()=>l()===sd.PlaybackState.PLAYING),xr=m(()=>d()==="paused"),wr=m(()=>s()&&!ie()&&!li),ys=m(()=>!s()||ie()),rs=m(()=>e.showNextPrevButtons&&!ie()&&e.prevButtonActive),ss=m(()=>e.showNextPrevButtons&&!ie()&&e.nextButtonActive),tr=m(()=>u().width>300),Br=m(()=>u().width>400),an=m(f),Dn=m(()=>p()!==sd.ChromecastState.NOT_AVAILABLE&&!(v()&&$()===1)&&!y()&&!li&&!g()),Sr=m(()=>w()==="LiveWaitingStart"),zo=m(()=>!!ei&&p()!==sd.ChromecastState.CONNECTED&&!y()&&($()===1&&n(Sr)||!n(Sr))&&!n(an)&&!li&&!I()),ir=K(!1);Vt(()=>{let Ue=ei==null?void 0:ei.info.isActive$.subscribe(Mt=>O(ir,Mt,!0));return()=>Ue==null?void 0:Ue.unsubscribe()});let or=m(()=>!n(an)&&ro(C(),"s")),Fr=m(()=>!e.logoHidden&&u().width>350&&!N()),nr=m(()=>ke.features.fullscreen&&Dt()&&!(v()&&$()===1)&&(li?ot():!0)&&!n(an)&&!n(ir)),co=m(()=>!L()&&!n(an)),Hr=m(()=>(!E()||ie())&&u().width>260&&!n(an)&&!(ke.features.interactiveHideTime&&li)),rr=m(()=>P()||e.showControls),hn=m(()=>!ie()&&!E()&&!!(bt!=null&&bt.length)&&n(tr)&&!n(Dr)&&!n(an)),yo=m(()=>!q()||!!H()),Cr=m(()=>Tt&&ro(C(),"m")),sr=m(()=>!z()||j()||ae()===0),gt=ci({}),di=ci({}),Ur=(0,bv.debounceFn)(od,260),ar=(0,bv.debounceFn)(_p,260);Oe(()=>{u(),X(),Ur(W(),Wt,gt,e.showControls),ar(W(),Ho,di,e.showControls)});let zr=()=>U.actions.internal.toggleChromecast();function Wo(){return ht(this,null,function*(){ei!=null&&ei.isActive()?yield ei==null?void 0:ei.exit():yield ei==null?void 0:ei.request()})}function Bn(){la({isAudioDisabled:Ut,audioDisabledHintCallback:Ht,isAudioAvailable:z(),audioIsNotExistHintCallback:vt,isAds:ie()})&&ze()}let _n=K(""),ln=(Ue,Mt)=>{if(!Ue){O(_n,G("tooltip_live"),!0);return}Mt&&Mt===sd.PlaybackState.PAUSED&&O(_n,G("tooltip_play"),!0)};Oe(()=>{ln(n(yo),l())});let bn=de();Oe(()=>{ne()&&Gl(ne(),P(),zt)}),Oe(()=>{gp(Et,J(),gt.playButton)});var Tr=Cw(),Ko=ce(Tr);{var qo=Ue=>{var Mt=yw(),Ci=ce(Mt);let Qo;var fo=A(Ci,2);let Ao;Ze(fo,lt=>di.topLeft=lt,()=>di==null?void 0:di.topLeft);var mo=A(fo,2);let Go;var zn=T(mo);xi(zn,1,pe,({iconUrl:lt,ariaLabel:pi,testId:Di,onClick:wn,tooltip:qr})=>lt,(lt,pi)=>{let Di=()=>n(pi).iconUrl,wn=()=>n(pi).ariaLabel,qr=()=>n(pi).testId,Sn=()=>n(pi).onClick,be=()=>n(pi).tooltip,wt=m(()=>{var Ft;return(Ft=wn())!=null?Ft:be()});vv(lt,{get iconUrl(){return Di()},get ariaLabel(){return n(wt)},get testId(){return qr()},get onClick(){return Sn()}})});var un=A(zn,2);{var xo=lt=>{Ic(lt,{get ref(){return gt.autoplayNextToggle},set ref(pi){gt.autoplayNextToggle=pi}})};R(un,lt=>{e.showAutoplayNext&&!Be()&&!re()&&lt(xo)})}var eo=A(un,2);{var Wn=lt=>{$c(lt,{isMobile:!0,click:zr,get state(){return p()},get ref(){return gt.chromecast},set ref(pi){gt.chromecast=pi}})};R(eo,lt=>{n(Dn)&&lt(Wn)})}var Kn=A(eo,2);{var qn=lt=>{_v(lt,{click:Wo,get isPictureInPictureActive(){return v()},get ref(){return gt.pip},set ref(pi){gt.pip=pi}})};R(Kn,lt=>{n(zo)&&lt(qn)})}var kr=A(Kn,2);{var ur=lt=>{Jl(lt,{get ref$(){return bn}})};R(kr,lt=>{_e()&&!$e()&&lt(ur)})}var ws=A(kr,2);{var et=lt=>{_c(lt,{get click(){return ye},get targetUrl(){return De()},get logoClickable(){return e.logoClickable},get ref(){return gt.vkLogo},set ref(pi){gt.vkLogo=pi}})};R(ws,lt=>{n(Fr)&&lt(et)})}S(mo),Ze(mo,lt=>di.topRight=lt,()=>di==null?void 0:di.topRight);var Zt=A(mo,2);let Ei;var wo=T(Zt);{var Yo=lt=>{let pi=m(()=>Ie.bind(null,!0));Ja(lt,{get click(){return n(pi)},type:"prev",isMobile:!0,get ref(){return gt.prevButton},set ref(Di){gt.prevButton=Di}})};R(wo,lt=>{n(rs)&&lt(Yo)})}var Kr=A(wo,2);{var Lo=lt=>{rd(lt,{get disabled(){return n(Li)},get click(){return it},isMobile:!0,get isPlaying(){return n(On)},get ref(){return gt.playButton},set ref(pi){gt.playButton=pi}})};R(Kr,lt=>{n(ys)&&lt(Lo)})}var pr=A(Kr,2);{var Qn=lt=>{nd(lt,{get disabled(){return n(sn)},get click(){return it},isMobile:!0,get ref(){return gt.replayButton},set ref(pi){gt.replayButton=pi}})};R(pr,lt=>{n(wr)&&lt(Qn)})}var ma=A(pr,2);{var zs=lt=>{let pi=m(()=>Fe.bind(null,!0));Ja(lt,{get click(){return n(pi)},type:"next",isMobile:!0,get ref(){return gt.nextButton},set ref(Di){gt.nextButton=Di}})};R(ma,lt=>{n(ss)&&lt(zs)})}S(Zt),Ze(Zt,lt=>di.middle=lt,()=>di==null?void 0:di.middle);var Ws=A(Zt,2);{var xn=lt=>{var pi=$w(),Di=ce(pi);{var wn=Ft=>{var oi=hw();let Pi;oi.__click=[vw,Uo,e,lo];var ki=T(oi);let Vi=m(()=>!e.showControls);Tc(ki,{get hidden(){return n(Vi)},get disabled(){return n(Uo)},get click(){return e.playPrevChapter},get ref(){return gt.playPrevChapterButton},set ref(Ti){gt.playPrevChapterButton=Ti}}),S(oi),D(Ti=>Pi=se(oi,1,"wrapper-middle-left s-1d",null,Pi,Ti),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Ft,oi)};R(Di,Ft=>{rt&&Ft(wn)})}var qr=A(Di,2);{var Sn=Ft=>{var oi=_w();let Pi;var ki=T(oi);let Vi=m(()=>!e.showControls&&!ee());Pc(ki,{get hidden(){return n(Vi)},get disabled(){return n(bo)},get click(){return rn.toggle},get graphIsOpened(){return ee()},get ref(){return gt.interactiveGraphButton},set ref(Ti){gt.interactiveGraphButton=Ti}}),S(oi),D(Ti=>Pi=se(oi,1,Kd(rt?"wrapper-middle-left-second":"wrapper-middle-left"),"s-1d",Pi,Ti),[()=>({fullscreen:we(),hidden:!e.showControls&&!ee()})]),b(Ft,oi)};R(qr,Ft=>{n(Cr)&&Ft(Sn)})}var be=A(qr,2);{var wt=Ft=>{var oi=bw();let Pi;oi.__click=[gw,$o,e,Ri];var ki=T(oi);let Vi=m(()=>!e.showControls);Ec(ki,{get hidden(){return n(Vi)},get disabled(){return n($o)},get click(){return e.seekToInteractive},get ref(){return gt.seekToInteractiveButton},set ref(Ti){gt.seekToInteractiveButton=Ti}}),S(oi),D(Ti=>Pi=se(oi,1,"wrapper-middle-right s-1d",null,Pi,Ti),[()=>({fullscreen:we(),hidden:!e.showControls})]),b(Ft,oi)};R(be,Ft=>{Xt&&Ft(wt)})}b(lt,pi)};R(Ws,lt=>{li&&!f()&&lt(xn)})}D((lt,pi,Di,wn)=>{Qo=se(Ci,1,"overlay-mobile s-1d",null,Qo,lt),Ao=se(fo,1,"wrapper-top-left s-1d",null,Ao,pi),Go=se(mo,1,"wrapper-top-right s-1d",null,Go,Di),Ei=se(Zt,1,"wrapper-middle s-1d",null,Ei,wn)},[()=>({hidden:!n(rr)}),()=>({hidden:!e.showControls,fullscreen:we()}),()=>({hidden:!e.showControls&&!y(),fullscreen:we()}),()=>({hidden:!e.showControls||f()||e.endScreenShown&&e.showNextPrevButtons})]),b(Ue,Mt)};R(Ko,Ue=>{ie()||Ue(qo)})}var $n=A(Ko,2);{var Ir=Ue=>{var Mt=ww(),Ci=ce(Mt);let Qo;var fo=T(Ci);$p(fo,{get muted(){return j()},click:Bn,get ref(){return gt.volume},set ref(xo){gt.volume=xo}}),S(Ci);var Ao=A(Ci,2);{var mo=xo=>{var eo=xw(),Wn=T(eo);let Kn=m(()=>!n(xr));rd(Wn,{get disabled(){return n(Li)},get click(){return it},isMobile:!0,get isPlaying(){return n(Kn)},get ref(){return gt.playButton},set ref(qn){gt.playButton=qn}}),S(eo),b(xo,eo)};R(Ao,xo=>{n(xr)&&xo(mo)})}var Go=A(Ao,2);let zn;var un=T(Go);Ac(un,{get position(){return Ne()},get duration(){return fe()}}),S(Go),D((xo,eo)=>{Qo=se(Ci,1,"wrapper-top-right s-1d",null,Qo,xo),zn=se(Go,1,"wrapper-bottom ads-timeline-mobile s-1d",null,zn,eo)},[()=>({fullscreen:we()}),()=>({fullscreen:we()})]),b(Ue,Mt)};R($n,Ue=>{ie()&&d()!=="inactive"&&Ue(Ir)})}var Si=A($n,2);let yn;var Fn=T(Si);let lr;var Er=T(Fn),Hn=T(Er),dn=T(Hn);{var xt=Ue=>{Oo(Ue,{get disabled(){return n(sn)},get ref(){return gt.replayButton},set ref(Mt){gt.replayButton=Mt},children:(Mt,Ci)=>{nd(Mt,{get disabled(){return n(sn)},get click(){return Lt}})},$$slots:{default:!0}})};R(dn,Ue=>{li&&Ue(xt)})}var Pt=A(dn,2);{var uo=Ue=>{Oo(Ue,{get ref(){return gt.liveButton},set ref(Mt){gt.liveButton=Mt},children:(Mt,Ci)=>{kc(Mt,{get isLiveActive(){return n(yo)},isMobile:!0,get ariaLabel(){return n(_n)}})},$$slots:{default:!0}})};R(Pt,Ue=>{!ie()&&E()&&Ue(uo)})}var Io=A(Pt,2);{var Eo=Ue=>{let Mt=m(()=>ie()?Ne():k()),Ci=m(()=>ie()?fe():Ke()),Qo=m(()=>!e.showControls);mc(Ue,{get showDuration(){return n(Br)},get position(){return n(Mt)},get duration(){return n(Ci)},isMobile:!0,get isHidden(){return n(Qo)},get ref(){return gt.time},set ref(fo){gt.time=fo}})};R(Io,Ue=>{n(Hr)&&Ue(Eo)})}var po=A(Io,2);let Oi=m(()=>!n(hn));Oo(po,{className:"w-max",get disabled(){return n(Oi)},get ref(){return gt.episodes},set ref(Ue){gt.episodes=Ue},children:(Ue,Mt)=>{var Ci=Le(),Qo=ce(Ci);{var fo=Ao=>{var mo=Sw(),Go=A(ce(mo),2);yc(Go,{get position(){return k()},get duration(){return Ke()},get timeCodes(){return bt}}),b(Ao,mo)};R(Qo,Ao=>{n(hn)&&Ao(fo)})}b(Ue,Ci)},$$slots:{default:!0}}),S(Hn),Ze(Hn,Ue=>di.bottomLeft=Ue,()=>di==null?void 0:di.bottomLeft);var Un=A(Hn,2),Ji=T(Un);{var Wr=Ue=>{Oo(Ue,{get ref(){return gt.volume},set ref(Mt){gt.volume=Mt},children:(Mt,Ci)=>{$p(Mt,{get muted(){return n(sr)},click:Bn})},$$slots:{default:!0}})};R(Ji,Ue=>{n(co)&&Ue(Wr)})}var Mi=A(Ji,2);{var xs=Ue=>{Oo(Ue,{get ref(){return gt.settings},set ref(Mt){gt.settings=Mt},children:(Mt,Ci)=>{Jl(Mt,{get ref$(){return bn}})},$$slots:{default:!0}})};R(Mi,Ue=>{n(or)&&Ue(xs)})}var as=A(Mi,2);{var ls=Ue=>{Oo(Ue,{get ref(){return gt.fullscreen},set ref(Mt){gt.fullscreen=Mt},children:(Mt,Ci)=>{hc(Mt,{get click(){return e.toggleFullscreen},get isFullscreen(){return we()}})},$$slots:{default:!0}})};R(as,Ue=>{n(nr)&&Ue(ls)})}S(Un),Ze(Un,Ue=>di.bottomRight=Ue,()=>di==null?void 0:di.bottomRight),S(Er),Ze(Er,Ue=>Z(Ue),()=>Z());var Pr=A(Er,2);let cn=m(()=>!e.showControls);tl(Pr,{get isHidden(){return n(cn)},get isAds(){return ie()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return q()},get ref(){return gt.timeline},set ref(Ue){gt.timeline=Ue}}),S(Fn),Ze(Fn,Ue=>di.bottom=Ue,()=>di==null?void 0:di.bottom),S(Si),Ze(Si,Ue=>Te(Ue),()=>Te());var dr=A(Si,2);{var Po=Ue=>{Sc(Ue,{get ref(){return gt.interactiveTimeIndicator},set ref(Mt){gt.interactiveTimeIndicator=Mt}})};R(dr,Ue=>{zi&&Ue(Po)})}D((Ue,Mt)=>{yn=se(Si,1,"wrapper-bottom mobile s-1d",null,yn,Ue),lr=se(Fn,1,"controls-wrapper s-1d",null,lr,Mt)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth}),()=>({fullscreen:we()})]),b(t,Tr),F(),o()}je(["click"]);function Lc(t,e){B(e,!0);let[i,o]=Re(),r=()=>x(I,"$isMobile",i),a=h(e,"bottomNoSmooth",3,!1),l=h(e,"playerControlsWrapperRef",15,void 0),d=h(e,"playerControlsRef",15,void 0),s=h(e,"isAds",3,!1),u=h(e,"logoTargetUrl",3,""),f=h(e,"showAutoplayNext",3,!1),p=h(e,"isOneVideoPlaylist",3,!1),v=h(e,"customFullscreenSupported",3,!0),$=h(e,"endScreenShown",3,!1),y=h(e,"onDisabledPlayPrevChapterClick",3,yv.noop),g=h(e,"onDisabledSeekToInteractiveClick",3,yv.noop),I=ve().ui.isMobile,C=K(!1);Vt(()=>{let P=setTimeout(()=>O(C,!0),0);return()=>clearTimeout(P)});var N=Le(),L=ce(N);{var E=P=>{var q=Le(),H=ce(q);{var z=ae=>{$v(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get isOneVideoPlaylist(){return p()},get customFullscreenSupported(){return v()},get endScreenShown(){return $()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return y()},get onDisabledSeekToInteractiveClick(){return g()},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})},j=ae=>{fv(ae,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return s()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return p()},get showAutoplayNext(){return f()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return v()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return l()},set playerControlsWrapperRef(X){l(X)},get playerControlsRef(){return d()},set playerControlsRef(X){d(X)}})};R(H,ae=>{r()?ae(z):ae(j,!1)})}b(P,q)};R(L,P=>{n(C)&&P(E)})}b(t,N),F(),o()}var Iw=Ce('<path d="M23.75 31.2v-5.45l-11.84 6.7a1.45 1.45 180 01-2.16-1.25v-14.4a1.45 1.45 180 012.16-1.26l11.84 6.7v-5.44a1.45 1.45 180 012.16-1.26l12.7 7.19a1.45 1.45 180 010 2.52l-12.7 7.2a1.45 1.45 180 01-2.16-1.27Z"></path>');function Mc(t,e){B(e,!0);let i=m(()=>e.reversed?"transform:scaleX(-1);transform-origin:50% 0;":""),o=m(()=>`${vn(e.size)}${n(i)}`);Je(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=Iw();b(r,l)},$$slots:{default:!0}}),F()}var Ew=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 xv(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"}`);Je(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=Ew();b(a,d)},$$slots:{default:!0}}),F()}var Pw=M('<span class="hot-key-helpers-text s-11"> </span>'),kw=M('<div data-testid="hotkey-helper-icon" class="s-11"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Aw=M("<div><!></div>"),Lw={hash:"s-11",code:'.hot-key-helpers-container.s-11{align-items:center;animation:s-11-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-11{left:calc(25% - 100px)}.hot-key-helpers-container--right.s-11{left:calc(75% - 100px)}.hot-key-helpers-text.s-11{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-11{animation:s-11-fadeOut ease var(--controls-transition-duration);height:0;visibility:hidden;width:0}@keyframes s-11-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes s-11-fadeOut{0%{opacity:1}to{opacity:0}}'};function wv(t,e){B(e,!0),Q(t,Lw);let[i,o]=Re(),r=()=>x(e.data,"$data",i),a=ve(),{features:l}=Rt(),d=a.ui.t,s=m(()=>!r()),u=m(()=>{var I;return((I=r())==null?void 0:I.type)==="BACKWARD_SEEK"}),f=m(()=>{var I;return((I=r())==null?void 0:I.type)==="FORWARD_SEEK"}),p=m(()=>{var I;return(I=r())==null?void 0:I.type}),v=m(()=>{var I,C;return(I=r())!=null&&I.t?d(r().t.key,{value:r().t.value||""}):(C=r())==null?void 0:C.text});var $=Aw();let y;var g=T($);{var w=I=>{var C=kw(),N=ce(C),L=T(N);{var E=Z=>{let ie=m(()=>n(p)==="BACKWARD_SEEK");xv(Z,{get reversed(){return n(ie)},shadow:!0})};R(L,Z=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(n(p))&&Z(E)})}var P=A(L,2);{var q=Z=>{Bs(Z,{get size(){return"48"},shadow:!0})};R(P,Z=>{n(p)==="PAUSE"&&!l.playbackStatusShow&&Z(q)})}var H=A(P,2);{var z=Z=>{Vn(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=>{Cc(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=>{ca(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=>{ca(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");Mc(Z,{get size(){return"48"},get reversed(){return n(ie)},testId:"rate-change-icon",shadow:!0})};R(pe,Z=>{["RATE_DOWN","RATE_UP"].includes(n(p))&&Z(re)})}var _e=A(pe,2);{var $e=Z=>{let ie=m(()=>n(p)==="EPISODE_PREV");pa(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 Ne=Z=>{ua(Z,{get size(){return"48"},volume:0,shadow:!0})};R(ee,Z=>{n(p)==="MUTE"&&Z(Ne)})}var fe=A(ee,2);{var k=Z=>{ua(Z,{get size(){return"48"},volume:1,shadow:!0})};R(fe,Z=>{n(p)==="VOLUME"&&Z(k)})}S(N);var Ke=A(N,2);{var Te=Z=>{var ie=Pw(),De=T(ie,!0);S(ie),D(()=>me(De,n(v))),b(Z,ie)};R(Ke,Z=>{n(v)&&Z(Te)})}D(()=>Me(N,"data-type",n(p))),b(I,C)};R(g,I=>{!n(s)&&n(p)&&I(w)})}S($),D(I=>y=se($,1,"hot-key-helpers-container s-11",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 Mw=(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}},Vw=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},Rw=M('<div tabindex="0" role="button"><div class="button-block s-s" aria-hidden="true"><div class="button-row s-s"><div class="button button-up s-s"><!></div> <div class="button button-right s-s"><!></div></div> <div class="button-row s-s"><div class="button button-left s-s"><!></div> <div class="button button-down s-s"><!></div></div></div></div>'),Nw={hash:"s-s",code:".immersive-controls.s-s{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-s{left:20px;top:50px}.button-block.s-s{height:40px;margin:auto;transform:rotate(45deg);width:40px}.button-row.s-s{display:flex;flex-direction:row;position:relative}.button.s-s{cursor:pointer;height:20px;text-align:center;width:20px}.button.s-s svg{opacity:.7;transition:opacity .2s linear}.button.button-up.s-s svg{transform:rotate(-45deg) translate(-1px,-1px)}.button.button-right.s-s svg{transform:rotate(45deg) translate(1px,-1px)}.button.button-down.s-s svg{transform:rotate(135deg) translate(1px,-3px)}.button.button-left.s-s svg{transform:rotate(-135deg) translate(-1px,-3px)}.button.s-s:hover svg{opacity:1}"};function Vc(t,e){B(e,!0),Q(t,Nw);let i=h(e,"isShifted",3,!1),o=ve(),r=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},l=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},s=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),f=G("aria_label_spherical_control");var p=Rw();let v;p.__keydown=[Mw,r,a,l,s,d],p.__keyup=[Vw,r,u];var $=T(p),y=T($),g=T(y);g.__mousedown=a,g.__mouseup=u;var w=T(g);Nr(w,{direction:"up",useBtnColor:!0}),S(g);var I=A(g,2);I.__mousedown=d,I.__mouseup=u;var C=T(I);Nr(C,{direction:"up",useBtnColor:!0}),S(I),S(y);var N=A(y,2),L=T(N);L.__mousedown=s,L.__mouseup=u;var E=T(L);Nr(E,{direction:"up",useBtnColor:!0}),S(L);var P=A(L,2);P.__mousedown=l,P.__mouseup=u;var q=T(P);Nr(q,{direction:"up",useBtnColor:!0}),S(P),S(N),S($),S(p),D(H=>{v=se(p,1,"immersive-controls s-s",null,v,H),Me(p,"aria-label",f)},[()=>({"m-shifted":i()})]),dt("mouseleave",g,u),dt("mouseleave",I,u),dt("mouseleave",L,u),dt("mouseleave",P,u),b(t,p),F()}je(["keydown","keyup","mousedown","mouseup"]);var Hs=require("@vkontakte/videoplayer-shared/es2015");var Qb=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var yp=class{constructor(){this.flickeringTimeout=Qb(1e3);this.subscriptions=new Hs.Subscription;this.isAuto=!1;this.isLive=!1;this.captions$=new Hs.ValueSubject([]);this.captionsPrepared$=new Hs.ValueSubject([])}subscribe(){return this.subscriptions.add(this.captions$.pipe((0,Hs.filter)(()=>this.isEnabled()),(0,Hs.filterChanged)()).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 Ow=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Dw=M('<span class="caption-line s-a"><span class="caption-segment s-a"></span></span>'),Bw=M('<span class="caption-line s-a"><span class="caption-segment s-a"> </span></span>'),Fw=M('<div><span class="caption s-a"><!></span></div>'),Hw=M("<div><!></div>"),Uw={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 nl(t,e){B(e,!0),Q(t,Uw);let[i,o]=Re(),r=()=>x(v,"$currentSubtitle$",i),a=()=>x(y,"$isLive$",i),l=()=>x(g,"$isFullscreen",i),d=()=>x(w,"$previewTrackActive",i),s=()=>x($,"$isAutoSubtitleCaptionVisible$",i),u=h(e,"isMobile",3,!1),f=ve(),p=Rt(),v=f.state.currentSubtitle$,$=f.state.isAutoSubtitleCaptionVisible$,y=f.state.isLive$,g=f.ui.isFullscreen,w=f.ui.previewTrackActive,I=m(()=>!!r().isAuto),C=m(()=>!!a()),N=m(()=>e.playerSize.width*.02),L=m(()=>u()&&!l()||n(N)<=p.minSubtitlesFontSize?p.minSubtitlesFontSize:n(N)),E=K(null);Oe(()=>{var X,ne,J;(X=n(E))==null||X.setIsAuto(n(I)),(ne=n(E))==null||ne.setIsLive(n(C)),(J=n(E))==null||J.setCaptions(e.captions)});let P=K(ci([[]]));Vt(()=>{O(E,new yp().subscribe(),!0);let X=n(E).captionsPrepared$.subscribe(ne=>{O(P,ne,!0)});return()=>{var ne;(ne=n(E))==null||ne.destroy(),X.unsubscribe()}}),Vt(()=>{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=Hw();let z;var j=T(H);{var ae=X=>{var ne=Fw();let J;var we=T(ne),pe=T(we);{var re=$e=>{var ee=Ow(),Ne=T(ee),fe=T(Ne,!0);S(Ne),S(ee),D(k=>{var Ke;Qe(Ne,`font-size: ${(Ke=n(L))!=null?Ke:""}px`),me(fe,k)},[()=>G("subtitles_auto_caption")]),b($e,ee)},_e=($e,ee)=>{{var Ne=k=>{var Ke=Le(),Te=ce(Ke);xi(Te,17,()=>n(P),zd,(Z,ie)=>{var De=Dw(),Be=T(De);xi(Be,21,()=>n(ie),({value:ot,timeAppeared:U})=>U,(ot,U)=>{let Ae=()=>n(U).value,ke=()=>n(U).timeAppeared;var ze=Le(),it=ce(ze);{var ye=Ie=>{var Fe=gs();D(()=>me(Fe,Ae())),b(Ie,Fe)};R(it,Ie=>{(!ke()||ke()<=e.position)&&Ie(ye)})}b(ot,ze)}),S(Be),S(De),D(()=>{var ot;return Qe(Be,`font-size: ${(ot=n(L))!=null?ot:""}px`)}),b(Z,De)}),b(k,Ke)},fe=k=>{var Ke=Le(),Te=ce(Ke);xi(Te,17,()=>e.captions,({value:Z})=>Z,(Z,ie)=>{let De=()=>n(ie).value;var Be=Bw(),ot=T(Be),U=T(ot,!0);S(ot),S(Be),D(()=>{var Ae;Qe(ot,`font-size: ${(Ae=n(L))!=null?Ae:""}px`),me(U,De())}),b(Z,Be)}),b(k,Ke)};R($e,k=>{var Ke;n(I)&&((Ke=n(P))!=null&&Ke.length)?k(Ne):k(fe,!1)},ee)}};R(pe,$e=>{n(I)&&s()?$e(re):$e(_e,!1)})}S(we),S(ne),D($e=>{var ee;J=se(ne,1,"subtitles-caption s-a",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(P))!=null&&ne.length)&&X(ae)})}S(H),D(X=>z=se(H,1,"subtitles-container s-a",null,z,X),[()=>({shifted:e.shifted,"preview-track-active":d(),auto:n(I)&&!n(C)&&!s()})]),b(t,H),F(),o()}var Gb=require("@vkontakte/videoplayer-core/es2015");var zw=M('<div class="text s-t"> </div>'),Ww=M('<div><div class="icon_wrapper s-t"><!></div> <!></div>'),Kw={hash:"s-t",code:".wrapper.s-t{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-t{background-size:cover}.icon_wrapper.s-t{align-items:center;display:flex;flex-direction:column;width:400px}.text.s-t{margin-top:20px}"};function Rc(t,e){B(e,!0),Q(t,Kw);let i=h(e,"chromecastDeviceName",3,"chromecastDeviceName"),o=Rt();var r=Ww();let a;r.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},r.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)},r.__dblclick=function(...f){var p;(p=e.onDblClick)==null||p.apply(this,f)};var l=T(r),d=T(l);bc(d,{get size(){return"48"},get iconState(){return Gb.ChromecastState.CONNECTED}}),S(l);var s=A(l,2);{var u=f=>{var p=zw(),v=T(p);S(p),D(()=>{var $;return me(v,`Видео воспроизводится на ${($=i())!=null?$:""}`)}),b(f,p)};R(s,f=>{i()&&f(u)})}S(r),D(f=>{a=se(r,1,"wrapper s-t",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()}je(["contextmenu","click","dblclick"]);var qw=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 Sv(t){Je(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var o=qw();b(e,o)},$$slots:{default:!0}})}var Qw=M('<div class="container s-4"><!></div>'),Gw={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 rl(t){Q(t,Gw);var e=Qw(),i=T(e);Sv(i,{}),S(e),b(t,e)}var Yw=M('<div class="playButton s-c" tabindex="0" role="button"><div class="playButtonBackground s-c"></div> <!></div>'),jw=M('<div data-testid="unstarted-thumb"><!></div>'),Xw={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 sl(t,e){B(e,!0),Q(t,Xw);let i=h(e,"iconVisible",3,!0),o=ve(),r=Rt(),a=o.ui.startedByKeyboard$,l=G("tooltip_play"),d=$=>{var g;let y=$.code;["Enter","Space"].includes(y)&&($.stopPropagation(),$.preventDefault(),a.set(!0),(g=e.startVideo)==null||g.call(e))},s=$=>{var y,g;$.stopPropagation(),(y=e.startVideo)==null||y.call(e),(g=e.onClick)==null||g.call(e,$)};var u=jw();let f;u.__click=s,u.__contextmenu=function(...$){var y;(y=e.onContextMenu)==null||y.apply(this,$)};var p=T(u);{var v=$=>{var y=Yw();y.__keydown=d;var g=A(T(y),2);Vn(g,{get size(){return"48"}}),S(y),D(()=>Me(y,"aria-label",l)),b($,y)};R(p,$=>{i()&&$(v)})}return S(u),D($=>{f=se(u,1,"container s-c",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})}je(["click","contextmenu","keydown"]);var Zw=M('<span class="text s-r"> </span>'),Jw=(t,e)=>{var i;return(i=e.onTitleClicked)==null?void 0:i.call(e)},eS=M('<a target="_blank" class="link s-r"><!></a>'),tS=M('<div data-testid="video_title"><!></div>'),iS={hash:"s-r",code:".title.s-r{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-r,.title.s-r{color:var(--white)}.link.s-r{pointer-events:auto;text-decoration:none}.link.s-r:hover{text-decoration:underline}.text.s-r{pointer-events:auto}.size-sm.s-r{font-size:14px;font-weight:500;line-height:18px}.hidden.s-r{opacity:0;transform:translateY(calc(var(--controls-gradient-height)*-1));visibility:hidden}"};function Cv(t,e){var y;B(e,!0),Q(t,iS);let i=g=>{var w=Zw(),I=T(w,!0);S(w),Ze(w,C=>l(C),()=>l()),D(()=>me(I,o())),dt("mouseenter",w,function(...C){var N;(N=e.onMouseEnter)==null||N.apply(this,C)}),dt("mouseleave",w,function(...C){var N;(N=e.onMouseLeave)==null||N.apply(this,C)}),b(g,w)},o=h(e,"title",3,""),r=h(e,"isHidden",3,!1),a=h(e,"size",3,"md"),l=h(e,"ref",15),d=K(void 0);Vt(()=>{var w;requestAnimationFrame(()=>{var I;(I=e.onVisibilityChanged)==null||I.call(e,!0)});function g(I){var C;I.propertyName==="transform"&&((C=e.onVisibilityChanged)==null||C.call(e,!r()))}return(w=n(d))==null||w.addEventListener("transitionend",g),()=>{var I;return(I=n(d))==null?void 0:I.removeEventListener("transitionend",g)}});let s=(y=e.getVideoDeeplink)==null?void 0:y.call(e);var u=tS();let f;var p=T(u);{var v=g=>{var w=eS();w.__click=[Jw,e];var I=T(w);i(I),S(w),D(()=>Me(w,"href",s||"")),b(g,w)},$=g=>{i(g)};R(p,g=>{s||e.onTitleClicked?g(v):g($,!1)})}S(u),Ze(u,g=>O(d,g),()=>n(d)),D(g=>f=se(u,1,`title size-${a()}`,"s-r",f,g),[()=>({hidden:r()})]),b(t,u),F()}je(["click"]);var Yb=require("@vkontakte/videoplayer-shared/es2015");var oS=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div> <span class="timer__points s-1c"> </span>',1),nS=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div> <span class="timer__points s-1c"> </span>',1),rS=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div> <span class="timer__points s-1c"> </span>',1),sS=M('<div class="timer__cell cell s-1c"><span class="cell__value s-1c"> </span> <span class="cell__unit s-1c"> </span></div>'),aS=M("<div><!> <!> <!> <!></div>"),lS={hash:"s-1c",code:".timer__container.s-1c{align-items:flex-start;display:flex;justify-content:center}.cell.s-1c{align-items:center;display:flex;flex-direction:column}.cell__value.s-1c{font-size:48px;font-weight:600;line-height:1.2}.small.s-1c .cell__value:where(.s-1c){font-size:24px}.cell__unit.s-1c{font-size:14px;font-weight:400;line-height:1.2}.small.s-1c .cell__unit:where(.s-1c){font-size:12px}.timer__points.s-1c{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}.small.s-1c .timer__points:where(.s-1c){font-size:20px}"};function Tv(t,e){B(e,!0),Q(t,lS);let i=K(""),o=K(""),r=K(""),a=K(""),l,d=32,s=d/2,u=H=>String(H).padStart(2,"0"),f=H=>Math.max(H.length,1),p=H=>`${(e.isSmallSize?s:d)*f(H)}px`,v=H=>{let z=Math.floor(H/86400);z&&(H-=z*86400,O(i,u(z),!0));let j=Math.floor(H/3600);O(o,u(j),!0);let ae=Math.floor(H/60)%60;O(r,u(ae),!0);let X=H%60;O(a,u(X),!0)},$=()=>{let H=Math.floor(Date.now()/1e3),z=e.startTime-H;v(z),z>=1?l=requestAnimationFrame($):e.onTimerOver()};Vt(()=>{l=requestAnimationFrame($)}),mn(()=>{cancelAnimationFrame(l)});var y=aS();let g;var w=T(y);{var I=H=>{var z=oS(),j=ce(z);let ae;var X=T(j),ne=T(X,!0);S(X);var J=A(X,2),we=T(J,!0);S(J),S(j);var pe=A(j,2),re=T(pe,!0);S(pe),D((_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(w,H=>{n(i)&&H(I)})}var C=A(w,2);{var N=H=>{var z=nS(),j=ce(z);let ae;var X=T(j),ne=T(X,!0);S(X);var J=A(X,2),we=T(J,!0);S(J),S(j);var pe=A(j,2),re=T(pe,!0);S(pe),D((_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(C,H=>{n(o)&&H(N)})}var L=A(C,2);{var E=H=>{var z=rS(),j=ce(z);let ae;var X=T(j),ne=T(X,!0);S(X);var J=A(X,2),we=T(J,!0);S(J),S(j);var pe=A(j,2),re=T(pe,!0);S(pe),D((_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 P=A(L,2);{var q=H=>{var z=sS();let j;var ae=T(z),X=T(ae,!0);S(ae);var ne=A(ae,2),J=T(ne,!0);S(ne),S(z),D((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(P,H=>{n(a)&&H(q)})}S(y),D(H=>g=se(y,1,"timer__container s-1c",null,g,H),[()=>({small:e.isSmallSize})]),b(t,y),F()}var dS=M('<div class="waiting s-13"><span> </span></div>'),cS=M('<div class="upcoming-timer timer s-13"><span> </span> <!></div>'),uS=M('<div class="waiting-container s-13"><!></div>'),pS={hash:"s-13",code:'.waiting-container.s-13{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;white-space:nowrap}.waiting-container.s-13,.waiting-container.s-13:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-13:before{backdrop-filter:blur(15px);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-13{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-13{font-size:20px;font-weight:600;line-height:1.2}.upcoming-timer.s-13{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-13{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-13{display:inline-block;font-size:20px;font-weight:600;line-height:1.2;margin-bottom:12px;vertical-align:middle}.small.s-13{font-size:15px}.medium.s-13{font-size:17px}'};function Nc(t,e){B(e,!0),Q(t,pS);let i=h(e,"startTime",3,0),o=m(()=>i()<Math.floor(Date.now()/1e3)),r=K(void 0),a=K(void 0),l=0,d=K(void 0),s=K(void 0),u=m(()=>{var w,I;return((w=n(d))!=null?w:1/0)<=509||((I=n(s))!=null?I:1/0)<=320}),f=m(()=>{var w,I;return!n(u)&&(((w=n(d))!=null?w:1/0)<=699||((I=n(s))!=null?I:1/0)<=599)}),p=e.onUpcomingLiveViewStateChanged?(0,Yb.throttleFn)(()=>{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()}),mn(()=>{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=uS();v.__contextmenu=function(...w){var I;(I=e.onContextMenu)==null||I.apply(this,w)},v.__click=function(...w){var I;(I=e.onClick)==null||I.apply(this,w)};var $=T(v);{var y=w=>{var I=dS(),C=T(I);let N;var L=T(C,!0);S(C),S(I),Ze(I,E=>O(r,E),()=>n(r)),D((E,P)=>{N=se(C,1,"waiting__title s-13",null,N,E),me(L,P)},[()=>({medium:n(f),small:n(u)}),()=>G("waiting_live_upcoming_title")]),b(w,I)},g=w=>{var I=cS(),C=T(I);let N;var L=T(C,!0);S(C);var E=A(C,2);let P=m(()=>n(u)||n(f)),q=m(()=>i()||0);Tv(E,{get isSmallSize(){return n(P)},get startTime(){return n(q)},onTimerOver:()=>O(o,!0)}),S(I),Ze(I,H=>O(a,H),()=>n(a)),D((H,z)=>{N=se(C,1,"timer__title s-13",null,N,H),me(L,z)},[()=>({medium:n(f),small:n(u)}),()=>G("waiting_live_timer_title")]),b(w,I)};R($,w=>{n(o)?w(y):w(g,!1)})}S(v),D(()=>Qe(v,`background-image: url(${e.thumbUrl})`)),Ln(v,"clientWidth",w=>O(d,w)),Ln(v,"clientHeight",w=>O(s,w)),b(t,v),F()}je(["contextmenu","click"]);var fS=M('<div class="waiting-container s-u"><div class="waiting-caption s-u"><!> <p class="waiting-title s-u"> </p></div></div>'),mS={hash:"s-u",code:'.waiting-container.s-u{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-u,.waiting-container.s-u:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-u:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-u{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-u{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function al(t,e){B(e,!0),Q(t,mS);let i=h(e,"thumbUrl",3,""),o={recover:G("waiting_live_recover_title"),record:G("waiting_record_title")},r=m(()=>o[e.kind]||"");var a=fS();a.__contextmenu=function(...f){var p;(p=e.onContextMenu)==null||p.apply(this,f)},a.__click=function(...f){var p;(p=e.onClick)==null||p.apply(this,f)};var l=T(a),d=T(l);Ga(d,{style:"position: static; transform: translate(0, 0)"});var s=A(d,2),u=T(s,!0);S(s),S(l),S(a),D(()=>{Qe(a,`background-image: url('${i()}')`),me(u,n(r))}),b(t,a),F()}je(["contextmenu","click"]);var vS=Ce('<path d="M6 10.2 3.5 7.7a.99.99 0 0 0-1.4 1.4l3.2 3.2a1 1 0 0 0 1.4 0l7.6-7.6a.99.99 0 0 0-1.4-1.4z"></path>');function Iv(t){Je(t,{width:"16",height:"16",testId:"check-mark-icon",children:(e,i)=>{var o=vS();b(e,o)},$$slots:{default:!0}})}var gS=M('<div class="select-icon s-1x"><!></div>'),hS={hash:"s-1x",code:".select-icon.s-1x{margin-right:auto;opacity:.9;padding-right:12px;position:relative;top:3px}"};function Oc(t){Q(t,hS);var e=gS(),i=T(e);Iv(i,{}),S(e),b(t,e)}var _S=(t,e)=>{t.stopPropagation(),e.item.selectItem(e.item.value)},bS=(t,e)=>{Yl(t,()=>e.item.selectItem(e.item.value))},$S=M("<p> </p>"),yS=M('<p class="sublabel s-1u"> </p>'),xS=M('<li role="menuitem" tabindex="0"><!> <div><!> <!></div></li>'),wS={hash:"s-1u",code:".menu-item-value.s-1u{align-items:end;display:flex;flex-direction:column;min-width:0}.menu-item-value[data-selected=false].s-1u{--select-icon-width:16px;--icon-padding:12px;margin-left:calc(var(--icon-padding) + var(--select-icon-width))}.label.s-1u,.sublabel.s-1u{max-width:100%;overflow:hidden;text-overflow:ellipsis}.sublabel.s-1u{opacity:.5}"};function Ev(t,e){B(e,!0),Q(t,wS);let i=h(e,"isMobile",3,!1);var o=xS();let r;o.__click=[_S,e],o.__keydown=[bS,e];var a=T(o);{var l=y=>{Oc(y,{})};R(a,y=>{e.item.selected&&y(l)})}var d=A(a,2);let s;var u=T(d);{var f=y=>{var g=Le(),w=ce(g);Hi(w,()=>e.item.valueComponent,(I,C)=>{C(I,es(()=>{var N;return(N=e.item.valueComponentParams)!=null?N:{}}))}),b(y,g)},p=y=>{var g=$S();let w;var I=T(g,!0);S(g),D(C=>{var N;w=se(g,1,"label s-1u",null,w,C),me(I,(N=e.item.label)!=null?N:e.item.value)},[()=>({mobile:i()})]),b(y,g)};R(u,y=>{e.item.valueComponent?y(f):y(p,!1)})}var v=A(u,2);{var $=y=>{var g=yS(),w=T(g,!0);S(g),D(()=>me(w,e.item.sublabel)),b(y,g)};R(v,y=>{e.item.sublabel&&y($)})}S(d),S(o),D((y,g,w)=>{var I;r=se(o,1,"item",null,r,y),Me(o,"data-value",(I=e.item.dataValue)!=null?I:e.item.value),Me(o,"aria-label",g),Me(o,"data-testid",e.item.dataTestid),s=se(d,1,"menu-item-value s-1u",null,s,w),Me(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var y,g;return(g=(y=e.item.ariaLabel)!=null?y:e.item.label)!=null?g:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),F()}je(["click","keydown"]);var SS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function Pv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"refMenuItems",15),r=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>g=>ip(g,n(r)));var l=SS();let d;l.__click=function(...g){var w;(w=n(r))==null||w.apply(this,g)},l.__keydown=function(...g){var w;(w=n(a))==null||w.apply(this,g)};var s=T(l);{var u=g=>{Oc(g,{})};R(s,g=>{e.item.selected&&g(u)})}var f=A(s,2);let p;var v=T(f);{var $=g=>{var w=Le();let I=m(()=>e.item.valueComponent);var C=ce(w);Hi(C,()=>n(I),(N,L)=>{L(N,es(()=>{var E;return(E=e.item.valueComponentParams)!=null?E:{}}))}),b(g,w)},y=g=>{var w=gs();D(()=>me(w,e.item.label)),b(g,w)};R(v,g=>{e.item.valueComponent?g($):g(y,!1)})}S(f),S(l),Ze(l,g=>o(o()[e.item.id]=g,!0),()=>{var g;return(g=o())==null?void 0:g[e.item.id]}),D((g,w)=>{var I;d=se(l,1,"item",null,d,g),Me(l,"aria-label",(I=e.item.ariaLabel)!=null?I:e.item.label),Me(l,"data-testid",e.item.id),p=se(f,1,"menu-item-value",null,p,w)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,l),F()}je(["click","keydown"]);var ns={"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 TS=(t,e)=>{ub(t,e.returnFromSubMenu,e.closeSettingsMenu)},IS=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},ES=(t,e)=>{lc(t)&&(Or(t),e.returnFromSubMenu())},PS=M('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title s-1m"> </p></li> <!></ul></div>'),kS={hash:"s-1m",code:".sub-menu.s-1m{--item-padding-vertical-mobile:16px;--item-padding-vertical:7px;--item-label-line-height:18px;--edge-item-padding-vertical-mobile:calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical:calc(8px + var(--item-padding-vertical))}.sub-menu.s-1m .item.mobile{font-size:14px;line-height:var(--item-label-line-height);padding:var(--item-padding-vertical-mobile) 17px}.sub-menu.s-1m{padding-top:calc(var(--edge-item-padding-vertical) + var(--item-padding-vertical) + var(--item-label-line-height))}.sub-menu.mobile.s-1m{padding-top:calc(var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) + 1px)}.sub-menu.s-1m .items:where(.s-1m) .item.header:where(.s-1m){border-bottom:var(--divider-border);display:flex;justify-content:space-between;left:0;min-width:max-content;position:absolute;right:0;top:0}.header.s-1m .title:where(.s-1m){margin-left:8px}.sub-menu.s-1m .item{padding:var(--item-padding-vertical) 12px;padding-right:22px}.items.s-1m .item:first-child:not(.mobile){padding-top:var(--edge-item-padding-vertical)}.items.s-1m .item:last-child:not(.mobile){padding-bottom:var(--edge-item-padding-vertical)}.items.s-1m .item.mobile:first-child{padding-top:var(--edge-item-padding-vertical-mobile)}.items.s-1m .item.mobile:last-child{padding-bottom:var(--edge-item-padding-vertical-mobile)}.sub-menu.s-1m .item.bottomBordered{border-bottom:var(--divider-border)}.sub-menu.s-1m .item .sublabel{font-size:12px;line-height:14px}.item.s-1m:not(.mobile) p:where(.s-1m),.sub-menu.s-1m .item:not(.mobile) .label{font-size:13px;line-height:var(--item-label-line-height)}"};function Av(t,e){B(e,!0),Q(t,kS);let[i,o]=Re(),r=()=>x(p,"$isFullscreen",i),a=()=>x(v,"$playerSize",i),l=h(e,"isMobile",3,!1),d=h(e,"playerControlsHeight",3,0),s=h(e,"ariaLabelReturnFromSubMenu",19,()=>G("aria_label_submenu_back")),u=h(e,"listRef",15);Vt(()=>{let X=e.items.findIndex(ne=>ne.selected);u().children[X+1].focus()});let f=ve(),p=f.ui.isFullscreen,v=f.ui.playerSize,$=K(void 0),y=K(0),g=K(0),w=m(()=>l()&&r()?`max-height: ${Math.round(a().height*.6)}px`:l()?"":`max-height: ${a().height-32-n(g)-d()}px; overflow: auto;`),I=m(()=>Math.max(e.minWidth,n(y)));var C=PS();let N;var L=T(C);let E;L.__keydown=[TS,e];var P=T(L);let q;P.__click=[IS,e],P.__keydown=[ES,e];var H=T(P);Nr(H,{direction:"left"});var z=A(H,2),j=T(z,!0);S(z),S(P),Ze(P,X=>O($,X),()=>n($));var ae=A(P,2);xi(ae,17,()=>e.items,zd,(X,ne)=>{var J=Le(),we=ce(J);{var pe=_e=>{Ev(_e,{get item(){return n(ne)},get isMobile(){return l()}})},re=(_e,$e)=>{{var ee=Ne=>{Pv(Ne,{get isMobile(){return l()},get item(){return n(ne)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(_e,Ne=>{n(ne).type==="OPEN_SUB_MENU"&&Ne(ee)},$e)}};R(we,_e=>{n(ne).type==="SELECT_VALUE"?_e(pe):_e(re,!1)})}b(X,J)}),S(L),Ze(L,X=>u(X),()=>u()),S(C),D((X,ne,J)=>{N=se(C,1,"sub-menu menu s-1m",null,N,X),Me(C,"data-testid",`${e.id}-sub-menu`),Qe(C,`min-width: ${n(I)}px`),E=se(L,1,"items s-1m",null,E,ne),Qe(L,n(w)),q=se(P,1,"item header back s-1m",null,q,J),Me(P,"aria-label",s()),me(j,e.title)},[()=>({desktop:!l(),mobile:l()}),()=>({mobile:l()}),()=>({mobile:l()})]),Ln(P,"clientWidth",X=>O(y,X)),Ln(P,"clientHeight",X=>O(g,X)),b(t,C),F(),o()}je(["keydown","click"]);var Xb=require("@vkontakte/videoplayer-shared/es2015");var AS=(t,e)=>ip(t,e()),LS=(t,e)=>{t.stopPropagation(),e()()},MS=M('<div class="value s-1o"> </div>'),VS=M('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),RS={hash:"s-1o",code:".value.s-1o{opacity:.7;overflow:hidden;position:relative;text-overflow:ellipsis}"};function Lv(t,e){B(e,!0),Q(t,RS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,Xb.noop),r=h(e,"valueComponent",3,void 0),a=h(e,"iconProps",19,()=>({})),l=h(e,"ref",15);var d=VS();let s;d.__click=[LS,o],d.__keydown=[AS,o];var u=T(d),f=T(u);{var p=C=>{el(C,{get icon(){return e.icon}})},v=C=>{var N=Le();let L=m(()=>e.icon);var E=ce(N);Hi(E,()=>n(L),(P,q)=>{q(P,es(a))}),b(C,N)};R(f,C=>{typeof e.icon=="string"?C(p):C(v,!1)})}S(u);var $=A(u,2),y=T($,!0);S($);var g=A($,2);{var w=C=>{var N=Le();let L=m(r);var E=ce(N);Hi(E,()=>n(L),(P,q)=>{q(P,{})}),b(C,N)},I=C=>{var N=MS(),L=T(N,!0);S(N),D(()=>me(L,e.value)),b(C,N)};R(g,C=>{r()?C(w):C(I,!1)})}S(d),Ze(d,C=>l(C),()=>l()),D(C=>{s=se(d,1,"item",null,s,C),Me(d,"aria-label",e.ariaLabel),Me(d,"data-testid",e.id),me(y,e.label)},[()=>({mobile:i()})]),b(t,d),F()}je(["click","keydown"]);var Mv=require("@vkontakte/videoplayer-shared/es2015");var NS=(t,e)=>{Yl(t,()=>e())},OS=M('<div class="icon icon-error-stub"><div class="inner"></div></div>'),DS=M('<img class="icon" aria-hidden="true"/>'),BS=M('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label s-1n"> </div></li>'),FS={hash:"s-1n",code:".label.s-1n{overflow:hidden;text-overflow:ellipsis}"};function Vv(t,e){B(e,!0),Q(t,FS);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,Mv.noop),r=h(e,"closeSettings",3,Mv.noop),a=K(!1),l=()=>{O(a,!0)},d=w=>{w==null||w.stopPropagation(),o()(),r()()};var s=BS();let u;s.__click=d,s.__keydown=[NS,d];var f=T(s),p=T(f);{var v=w=>{var I=Le(),C=ce(I);{var N=E=>{var P=OS();b(E,P)},L=E=>{var P=DS();D(()=>Me(P,"src",e.icon)),dt("error",P,l),Va(P),b(E,P)};R(C,E=>{n(a)?E(N):E(L,!1)})}b(w,I)},$=w=>{var I=Le();let C=m(()=>e.icon);var N=ce(I);Hi(N,()=>n(C),(L,E)=>{E(L,{})}),b(w,I)};R(p,w=>{typeof e.icon=="string"?w(v):w($,!1)})}S(f);var y=A(f,2),g=T(y,!0);S(y),S(s),D(w=>{var I;u=se(s,1,"item",null,u,w),Me(s,"aria-label",(I=e.ariaLabel)!=null?I:e.label),Me(s,"data-testid",e.id),me(g,e.label)},[()=>({mobile:i()})]),b(t,s),F()}je(["click","keydown"]);var Zb=require("@vkontakte/videoplayer-shared/es2015");var HS=M('<div class="toggle_wrap s-1t"><div></div> <div class="toggle-label s-1t"></div></div>'),US={hash:"s-1t",code:'.toggle_wrap.s-1t{cursor:pointer;font-size:12px;line-height:15px;min-height:15px;padding:0;user-select:none}.toggle.s-1t{background-color:var(--toggle-color-separator);border-radius:45px;cursor:pointer;float:right;height:9px;margin-top:3px;width:28px}.toggle.s-1t: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-1t:after{background-color:var(--toggle-color-on);left:13px}.toggle-label.s-1t{overflow:hidden}'};function Rv(t,e){Q(t,US);let i=h(e,"enabled",3,!1);var o=HS(),r=T(o);let a;ui(2),S(o),D(l=>a=se(r,1,"toggle s-1t",null,a,l),[()=>({on:i()})]),b(t,o)}var zS=(t,e,i)=>{pb(t,e(),o=>i()(o))},WS=(t,e,i)=>{t.stopPropagation(),e()(!i())},KS=M('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),qS=M('<li role="menuitem" tabindex="0"><!></li>');function Nv(t,e){B(e,!0);let i=h(e,"isMobile",3,!1),o=h(e,"onClick",3,Zb.noop),r=h(e,"enabled",3,!1),a=h(e,"tooltipText",3,void 0),l=h(e,"maxTooltipWidth",3,void 0);var d=qS();let s;d.__click=[WS,o,r],d.__keydown=[zS,r,o];var u=T(d);ja(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return l()},children:(f,p)=>{var v=KS();let $;var y=T(v),g=T(y);{var w=E=>{el(E,{get icon(){return e.icon}})},I=E=>{var P=Le();let q=m(()=>e.icon);var H=ce(P);Hi(H,()=>n(q),(z,j)=>{j(z,{})}),b(E,P)};R(g,E=>{typeof e.icon=="string"?E(w):E(I,!1)})}S(y);var C=A(y,2),N=T(C,!0);S(C);var L=A(C,2);Rv(L,{get enabled(){return r()}}),S(v),D(E=>{$=se(v,1,"switch-wrapper",null,$,E),me(N,e.label)},[()=>({mobile:i()})]),b(f,v)},$$slots:{default:!0}}),S(d),D(f=>{var p;s=se(d,1,"item switch-item",null,s,f),Me(d,"aria-label",(p=e.ariaLabel)!=null?p:e.label),Me(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),F()}je(["click","keydown"]);var Bc=require("@vkontakte/videoplayer-shared/es2015");var Jb=()=>{let t=K(ci([])),e=m(()=>(n(t).length?n(t).at(-1):null)||null);return{get current(){return n(e)},pushSubMenu:i=>{n(t).push(i)},popSubMenu:()=>{O(t,n(t).slice(0,-1),!0)},popAllSubMenus:()=>{O(t,[],!0)}}};var e$=require("@vkontakte/videoplayer-shared/es2015");var QS=M('<div class="quality-icon s-1q"><!></div>'),GS=M('<div class="quality-label s-1q"><span> </span> <!></div>'),YS={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 ll(t,e){B(e,!0),Q(t,YS);let i=h(e,"isSubCase",3,!1),o=m(()=>e.quality?(0,e$.getVideoQualityLabel)(e.quality):""),r=m(()=>ap(e.quality));var a=GS(),l=T(a);let d;var s=T(l,!0);S(l);var u=A(l,2);{var f=p=>{var v=QS();let $=m(()=>n(r));var y=T(v);Hi(y,()=>n($),(g,w)=>{w(g,{})}),S(v),D(()=>Me(v,"data-testid",`${n(o)}-icon`)),b(p,v)};R(u,p=>{n(r)&&!e.isMobile&&p(f)})}S(a),D(p=>{d=se(l,1,"s-1q",null,d,p),me(s,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,a),F()}var n$=require("@vkontakte/videoplayer-shared/es2015");var Ov=require("@vkontakte/videoplayer-core/es2015");var t$=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},i$=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=t$({quality:t,availableQualities:e});return i?t===Ov.VideoQuality.INVARIANT?G("auto_quality_invariant"):G("auto_quality",{actual:o}):o},o$=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===Ov.VideoQuality.INVARIANT?i:`${i}${t$({quality:t,availableQualities:e})}`:"...";var jS=M('<div class="menu-item-value-wrapper s-1s"><!></div>'),XS={hash:"s-1s",code:".menu-item-value-wrapper.s-1s{line-height:normal}"};function ad(t,e){B(e,!0),Q(t,XS);let[i,o]=Re(),r=()=>x(s,"$currentQuality$",i),a=()=>x(u,"$availableQualities$",i),l=()=>x(f,"$isMobile$",i),d=ve(),s=d.state.currentQuality$,u=d.state.availableQualities$,f=d.ui.isMobile,p=" · ",v=m(()=>e.prefix+(e.selected&&r()!==n$.VideoQuality.INVARIANT?p:"")),$=m(()=>o$({prefix:n(v),quality:r(),availableQualities:a(),onlyPrefix:!e.selected}));var y=jS(),g=T(y);let w=m(()=>e.selected?r():void 0);ll(g,{get quality(){return n(w)},get label(){return n($)},get isMobile(){return l()},isSubCase:!0}),S(y),b(t,y),F(),o()}var ZS=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")},JS={br:!0,span:!0},Dv=(t,e={})=>{var d,s,u,f,p,v,$;if(!t)return t;let i=Ee(Ee({},JS),e),o=Object.keys(i);if(!o.length)return t;let r=ZS(o),a=[],l=0;for(let y of t.matchAll(r)){let g=y[0],w=((d=y.groups)==null?void 0:d.keyhtml)||((s=y.groups)==null?void 0:s.keyi18n)||((u=y.groups)==null?void 0:u.keyhtmlself)||((f=y.groups)==null?void 0:f.keyi18nself)||"",{index:I}=y;if(!i[w]){a.push(t.slice(l,I)),l=I+g.length;continue}let C=(p=y.groups)!=null&&p.childrenhtml?Dv(y.groups.childrenhtml,i):"",N=(v=y.groups)!=null&&v.childrenhtml?g.replace(new RegExp(($=y.groups)==null?void 0:$.childrenhtml),()=>C||""):g;a.push(t.slice(l,I),N),l=I+g.length}return l===0?t:(a.push(t.slice(l)),a.join(""))};function Dc(t,e){B(e,!1);let i=h(e,"message",8),o=Dv(i());So();var r=Le(),a=ce(r);{var l=d=>{var s=Le(),u=ce(s);Wd(u,()=>o),b(d,s)};R(a,d=>{o&&d(l)})}b(t,r),F()}var eC=M('<p class="quality-applies sublabel s-1r"><!></p>'),tC={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 Bv(t,e){B(e,!1),Q(t,tC),So();var i=eC(),o=T(i);let r=In(()=>G("quality_applience",{action:`<span>${G("quality_applience_action")}</span>`}));Dc(o,{get message(){return n(r)}}),S(i),b(t,i),F()}var s$=({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:ad,valueComponentParams:{prefix:G("other_quality"),selected:o},children:"quality-other-settings"}},Fv=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"quality-auto",type:"SELECT_VALUE",value:"auto",label:G("auto_quality_limit"),valueComponent:e?ad:void 0,valueComponentParams:{prefix:G("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),a$=()=>({id:"quality-appliance-settings",type:"OPEN_SUB_MENU",valueComponent:Bv,bottomBordered:!0,children:"quality-appliance"}),Hv=({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?ad:void 0,valueComponentParams:{prefix:G("high_quality"),selected:i},sublabel:G("high_quality_description")}),Uv=({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?ad:void 0,valueComponentParams:{prefix:G("traffic_saving_quality"),selected:i},sublabel:G("traffic_saving_quality_description")});var xp=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),wp=(t,e)=>{var l;if(!t)return"";let{language:i,label:o}=t,r;if(i==="und"?r=void 0:i&&(r=(l=xc(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=xp(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=xp(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=xp(t,d);return G("audio_stream_display_language_index",{language:r,index:s})}}let a=xp(t,e);return G("audio_stream_display_unknown",{index:a})};var iC={"quality-settings":t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:r}=t,a=[];return i&&a.push({handler:Fv,selected:e&&!o&&!r||!1}),a.push({handler:Uv,selected:o},{handler:Hv,selected:r}),{title:G("submenu_quality"),id:"quality-settings",items:[a$(t),...a.map(({handler:l,selected:d})=>l({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),s$(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:ll,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:Fv,selected:((i=Ku())==null?void 0:i.type)==="auto_quality"},{handler:Uv,selected:((o=Ku())==null?void 0:o.type)==="traffic_saving"},{handler:Hv,selected:((r=Ku())==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:wp(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===Nn?"sub_off":void 0}))})},l$=({subMenuId:t,context:e})=>t?[iC[t](e)]:[];var oC=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 zv(t){Je(t,{testId:"traffic-saving-icon",children:(e,i)=>{var o=oC();b(e,o)},$$slots:{default:!0}})}var nC=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 Wv(t){Je(t,{width:"18",height:"15",children:(e,i)=>{var o=nC();b(e,o)},$$slots:{default:!0}})}var rC=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 Kv(t){Je(t,{testId:"play-speed-icon",children:(e,i)=>{var o=rC();b(e,o)},$$slots:{default:!0}})}var sC=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 qv(t){Je(t,{testId:"download-icon",children:(e,i)=>{var o=sC();b(e,o)},$$slots:{default:!0}})}var aC=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 Qv(t){Je(t,{testId:"report-icon",children:(e,i)=>{var o=aC();b(e,o)},$$slots:{default:!0}})}var lC=Ce('<path d="M4 12.3V12c0-1.47 0-2.55.08-3.4.07-.9.21-1.48.45-1.95a4.85 4.85 0 0 1 2.12-2.12 5.1 5.1 0 0 1 1.95-.45C9.5 4 10.68 4 12.3 4h4.51c-.03-.16-.09-.33-.17-.49a2.4 2.4 0 0 0-1.05-1.05c-.3-.16-.63-.21-.93-.24-.29-.02-.64-.02-1.03-.02h-1.37c-1.58 0-2.81 0-3.81.08a6.84 6.84 0 0 0-2.62.64 6.65 6.65 0 0 0-2.9 2.91c-.4.76-.57 1.6-.65 2.62-.08 1-.08 2.23-.08 3.81v1.37c0 .4 0 .74.02 1.03.03.3.08.62.24.93A2.4 2.4 0 0 0 4 16.8V12.3ZM10.08 6h-.03c-.53 0-.97 0-1.33.03-.39.03-.76.1-1.12.28a2.9 2.9 0 0 0-1.3 1.3c-.17.35-.24.72-.27 1.1C6 9.09 6 9.53 6 10.06v7.9c0 .53 0 .97.03 1.33.03.39.1.76.28 1.12a2.9 2.9 0 0 0 1.3 1.3c.35.17.72.24 1.1.27.37.03.81.03 1.33.03h6.91c.53 0 .97 0 1.33-.03.39-.03.76-.1 1.12-.28a2.9 2.9 0 0 0 1.3-1.3c.17-.35.24-.72.27-1.1.03-.37.03-.81.03-1.34v-7.9c0-.53 0-.97-.03-1.33-.03-.39-.1-.76-.28-1.12a2.9 2.9 0 0 0-1.3-1.3 2.96 2.96 0 0 0-1.1-.27C17.91 6 17.47 6 16.94 6h-6.87ZM8.41 7.92c.06-.04.18-.07.45-.1.28-.02.65-.02 1.22-.02h6.84c.57 0 .94 0 1.22.02.27.03.39.06.45.1.21.1.39.28.5.49.03.06.06.18.09.45.02.28.02.65.02 1.22v7.84c0 .57 0 .94-.02 1.22-.03.27-.06.39-.1.45-.1.21-.28.39-.49.5-.06.03-.18.06-.45.09-.28.02-.65.02-1.22.02h-6.84c-.57 0-.94 0-1.22-.02a1.23 1.23 0 0 1-.45-.1 1.1 1.1 0 0 1-.5-.49 1.23 1.23 0 0 1-.09-.45c-.02-.28-.02-.65-.02-1.22v-7.84c0-.57 0-.94.02-1.22.03-.27.06-.39.1-.45.1-.21.28-.39.49-.5Z"></path>');function Sp(t){Je(t,{children:(e,i)=>{var o=lC();b(e,o)},$$slots:{default:!0}})}var dC=Ce('<path d="M12 20.1a8.1 8.1 0 1 0 0-16.2 8.1 8.1 0 0 0 0 16.2m0 1.9a10 10 0 1 1 0-20 10 10 0 0 1 0 20m0-12.37A1.32 1.32 0 1 1 12 7a1.32 1.32 0 0 1 0 2.63m-.95 2.82c0-.54.43-.98.95-.98s.95.44.95.98v3.83c0 .54-.43.98-.95.98a.96.96 0 0 1-.95-.98z"></path>');function Gv(t){Je(t,{testId:"info-icon",children:(e,i)=>{var o=dC();b(e,o)},$$slots:{default:!0}})}var cC=M('<div class="menu-item-value-wrapper s-1w"><!></div>'),uC={hash:"s-1w",code:".menu-item-value-wrapper.s-1w{line-height:normal}"};function Yv(t,e){B(e,!0),Q(t,uC);let[i,o]=Re(),r=()=>x(u,"$currentQuality$",i),a=()=>x(f,"$availableQualities$",i),l=()=>x(p,"$isAutoQualityEnabled$",i),d=()=>x(v,"$isMobile$",i),s=ve(),u=s.state.currentQuality$,f=s.state.availableQualities$,p=s.state.isAutoQualityEnabled$,v=s.ui.isMobile,$=m(()=>i$({quality:r(),availableQualities:a(),isAutoQualityEnabled:l()}));var y=cC(),g=T(y);ll(g,{get quality(){return r()},get label(){return n($)},get isMobile(){return d()}}),S(y),b(t,y),F(),o()}var fC={"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:fc,label:G("menu_quality"),value:e,valueComponent:Yv,weight:ns["quality-settings"],children:i?"quality-settings":"quality-other-settings"}},"traffic-saving-switch":({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"traffic-saving-switch",weight:ns["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:G("aria_label_submenu_traffic_saving"),icon:zv,label:G("menu_traffic_saving"),enabled:t,tooltipText:G("traffic_saving_helper_text"),maxTooltipWidth:175}),"audio-tracks-settings":({currentAudioStream:t,availableAudioStreams:e})=>{let i=wp(t,e);return{id:"audio-tracks-settings",weight:ns["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_audio_languages",{actual:i}),icon:Wv,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:ns["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_rate",{actual:i}),icon:Kv,label:G("menu_playback_rate"),value:`${e}x`,children:"playback-rate"}},"subtitles-settings":({currentSubtitle:t})=>({id:"subtitles-settings",weight:ns["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:G("aria_label_menu_subtitle",{actual:t.displayValue}),icon:ca,iconProps:{type:"outline"},label:G("subtitles_caption"),value:t.displayValue,children:"subtitles"}),download:({onDownloadClick:t})=>({id:"download",weight:ns.download,type:"CLICK",onClick:t,label:G("download_video_caption"),ariaLabel:G("aria_label_menu_download"),icon:qv}),"show-support":({onReportProblemClick:t})=>({id:"show-support",weight:ns.report,type:"CLICK",onClick:t,label:G("menu_report"),ariaLabel:`${G("menu_report")}. ${G("aria_label_new_tab_alert")}`,icon:Qv,isHiddenFor:["desktop"]}),"copy-data":({onCopyDataClick:t})=>({id:"copy-data",weight:ns["copy-data"],type:"CLICK",onClick:t,label:G("menu_copy_debug"),ariaLabel:G("menu_copy_debug"),icon:Sp,isHiddenFor:["desktop"]}),"save-trace-info":({onSaveTraceDataClick:t})=>({id:"save-trace-info",weight:ns["save-trace-info"],type:"CLICK",onClick:t,label:G("menu_save_debug"),ariaLabel:G("menu_save_debug"),icon:Sp,isHiddenFor:["desktop"]}),"debug-info":({toggleShowDebugInfo:t})=>({id:"debug-info",weight:ns["debug-info"],type:"CLICK",onClick:t,ariaLabel:G("aria_label_menu_debug_overlay"),label:G("menu_debug_overlay"),icon:Gv,isHiddenFor:["desktop"]})},d$=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(r=>fC[r](e)),...i.map(r=>jt(Ee({},r),{isAdditional:!0}))].filter(r=>{var a,l,d;return!((a=r==null?void 0:r.isHiddenFor)!=null&&a.length)||!((l=r==null?void 0:r.isHiddenFor)!=null&&l.includes("desktop"))&&!o||!((d=r==null?void 0:r.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(qa)};var vC=(t,e)=>{tp(t,e)},gC=M('<div><div> </div> <div class="close s-12"></div></div>'),hC=M('<div data-testid="settings-menu" role="presentation"><!> <ul role="menu"></ul></div>'),_C=M("<div><!> <!></div>"),bC={hash:"s-12",code:'.settings-menu-container.mobile.s-12{width:100%;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.settings-menu-container.s-12 ul{list-style-type:none;margin:0;padding:0}.settings-menu-container.s-12 .menu{background-color:var(--settings-bg);border-radius:var(--settings-radius);overflow:hidden;transition:opacity .2s,visibility .2s}.settings-menu-container.s-12 .menu .item:first-child:not(.mobile){border-top-left-radius:var(--settings-radius);border-top-right-radius:var(--settings-radius)}.settings-menu-container.s-12 .menu .item:last-child{border-bottom-left-radius:var(--settings-radius);border-bottom-right-radius:var(--settings-radius)}.settings-menu-container.s-12 .settings-menu .item:first-child:not(.mobile){padding-top:6px}.settings-menu-container.s-12 .settings-menu .item:last-child:not(.mobile){padding-bottom:6px}.settings-menu-container.s-12 .menu.desktop{bottom:0;max-width:100%;position:absolute;right:0}.settings-menu.s-12{line-height:40px}.settings-menu.desktop.s-12{min-width:300px}.settings-menu-container.s-12 .menu.mobile{background:var(--mobile-settings-bg);font-size:15px;line-height:50px;width:100%}.settings-menu-container.s-12 .menu.mobile.hidden{display:none}.settings-menu-container.s-12 .menu .item:not(.switch-item),.settings-menu-container.s-12 .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-12 .menu .item:hover{background-color:var(--settings-item-bg-hover)}.settings-menu-container.s-12 .menu .item.mobile:hover{background:var(--mobile-settings-bg)}.settings-menu.s-12 .item:not(.switch-item),.settings-menu.s-12 .switch-wrapper{padding:0 32px 0 18px}.settings-menu.s-12 .item.mobile:not(.switch-item),.settings-menu.s-12 .switch-wrapper.mobile{padding:0 14px}.settings-menu.s-12 .icon-wrapper{align-items:center;display:flex;height:24px;justify-content:center;margin-right:16px;min-width:24px;width:24px}.settings-menu.s-12 .label{flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis}.settings-menu.s-12 .item.header.mobile:where(.s-12){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-12 .items::-webkit-scrollbar{width:8px}.settings-menu-container.s-12 .items::-webkit-scrollbar-track{background-color:#3a3a3a;border-radius:4px;box-shadow:none}.settings-menu-container.s-12 .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-12 .items::-webkit-scrollbar-thumb:hover{background-color:#777}.settings-menu-container.s-12 .items.mobile{max-height:160px;overflow-x:hidden;overflow-y:auto;text-align:left}.close.s-12{height:12px;margin-right:-12px;padding:12px;position:relative;width:12px}.close.s-12:after,.close.s-12:before{background-color:var(--white);content:" ";height:12px;left:18px;position:absolute;width:2px}.close.s-12:before{transform:rotate(45deg)}.close.s-12:after{transform:rotate(-45deg)}'};function Fc(t,e){B(e,!0),Q(t,bC);let[i,o]=Re(),r=()=>x(Be,"$settingsMenuVisible",i),a=()=>x(ot,"$settingsMenuOpenedByKeyboard",i),l=()=>x(Fe,"$debugPanelVisible",i),d=()=>x(Ae,"$isMobile",i),s=()=>x(Ie,"$playerSize",i),u=()=>x(De,"$hasMpegSources$",i),f=()=>x(ke,"$mobileNotReportControlHidden$",i),p=()=>x(ee,"$autoQualityLimitingAvailable$",i),v=()=>x(Z,"$availableSubtitlesList$",i),$=()=>x(ze,"$isLiveWithPlaybackSpeed",i),y=()=>x(re,"$availableAudioStreams$",i),g=()=>x(Ke,"$availablePlaybackRates$",i),w=()=>x(pe,"$currentAudioStream$",i),I=()=>x(k,"$currentPlaybackRate$",i),C=()=>x(it,"$trafficSavingEnabled",i),N=()=>x(_e,"$currentQuality$",i),L=()=>x(Ne,"$isAutoQualityEnabled$",i),E=()=>x(Te,"$currentSubtitle$",i),P=()=>x(vt,"$additionalSettingsMenuItems$",i),q=()=>x(fe,"$isAutoQualityAvailable$",i),H=()=>x($e,"$availableQualities$",i),z=()=>x(ye,"$highQualityEnabled",i),j=h(e,"ref",15,void 0),ae=h(e,"playerControlsHeight",3,0),X=ci({}),ne=ci({}),J=ve(),we=Rt(),pe=J.state.audioStream$,re=J.state.availableAudioStreams$,_e=J.state.currentQuality$,$e=J.state.availableQualities$,ee=J.state.autoQualityLimitingAvailable$,Ne=J.state.isAutoQualityEnabled$,fe=J.state.isAutoQualityAvailable$,k=J.state.currentPlaybackRate$,Ke=J.state.availablePlaybackRates$,Te=J.state.currentSubtitle$,Z=J.state.availableSubtitlesList$,ie=J.state.canDownload,De=J.state.hasMpegSources$,Be=J.ui.settingsMenu.visible$,ot=J.ui.settingsMenu.openedByBtnKeyboard$,U=J.ui.settingsMenu.ref$,Ae=J.ui.isMobile,ke=J.ui.mobileNotReportControlHidden$,ze=J.state.canChangePlaybackSpeed$,it=J.state.trafficSavingEnabled$,ye=J.state.highQualityEnabled$,Ie=J.ui.playerSize,Fe=J.ui.debugPanelVisible,Dt=J.state.isInteractiveTime$,vt=J.ui.additionalSettingsMenuItems$,Ht=J.ui.t,ct=J.actions.internal.downloadVideo,St=J.actions.internal.closeSettingsMenu,ni=J.actions.internal.openSettingsSubMenu,At=J.actions.internal.closeSettingsSubMenu,Bt=K(!1),Ut=K(void 0),Y=Jb();Oe(()=>{!r()&&Y.current&&(At(ne[Y.current]),Y.popAllSubMenus())}),Oe(()=>{r()||O(Ut,void 0)}),Oe(()=>{!Y.current&&n(Ut)&&cb(X,n(Ut))}),Oe(()=>{j()&&U.set(j())});function Se(Ct){return ht(this,null,function*(){var W;Y.pushSubMenu(Ct),yield _o(),ni(Ct,ne[Ct]);let Kt=(W=j())==null?void 0:W.firstElementChild;Kt&&mm(Kt)})}function le(Ct){var Kt;Ct==null||Ct.stopPropagation(),a()||(Kt=e.returnFocus)==null||Kt.call(e),St(),O(Bt,!1)}function he(Ct,Kt){J.actions.internal.setQuality(Ct,{appliesTo:Kt,byUser:!0}),le()}function Ve(Ct){J.actions.internal.setAudioStream(Ct),le()}function st(Ct,Kt){J.actions.internal.setTrafficSavingEnabled(Ct,Kt),we.features.qualityDetailsSubMenuEnabled&&le()}function mt(Ct,Kt){J.actions.internal.setHighQualityEnabled(Ct,Kt),le()}function ue(Ct){J.actions.internal.setPlaybackRate(Ct),le()}function We(Ct){J.actions.internal.setSubtitle(Ct),le()}function Ye(){ct()}function ut(){(0,Bc.isValidURL)(e.supportLink)&&window.open(e.supportLink,"_blank"),J.actions.internal.reportProblem(),J.actions.internal.pause()}function zt(){Ql(J.actions.internal.getDebugTextData())}let Wt=()=>{let Ct=J.actions.internal.getTraceTextData(),Kt=new Blob([...Ct],{type:"application/json"}),W=window.URL.createObjectURL(Kt);Fa(W,"vk_player_trace_info","json")};function ri(){Fe.set(!l())}function $i(){O(Bt,!0)}function Xi(){O(Bt,!1)}function Nt(){return d()?`max-height: ${Math.round(s().height*.6)}px`:`max-height: ${s().height-32-ae()}px; overflow: auto;`}let fi=m(()=>ie&&u()&&!f()),hi=m(()=>we.features.trafficSaving&&!f()&&p()&&!we.features.qualityDetailsSubMenuEnabled),bt=m(()=>v().length>0&&!f()),ei=m(()=>!!$()&&!f()),wi=m(()=>we.features.audioLanguages&&y().length>=2&&!f()),Zi=m(()=>!f());Vt(()=>Dt.subscribe(Ct=>{Ct&&!d()&&!n(Bt)&&!a()&&le()}));let ii=m(()=>{let Ct=[n(Zi)&&"quality-settings",n(wi)&&"audio-tracks-settings",n(ei)&&"playback-rate-settings",n(bt)&&"subtitles-settings",n(hi)&&"traffic-saving-switch",n(fi)&&"download",we.showSupport&&"show-support","copy-data",we.features.saveTraceInfoToFile&&"save-trace-info","debug-info"].filter(Kt=>!!Kt);return d$({items:Ct,context:{qualityDetailsSubMenuEnabled:we.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:g(),currentAudioStream:w(),availableAudioStreams:y(),currentPlaybackRate:I(),selectPlaybackRate:ue,trafficSavingEnabled:C(),toggleTrafficSaving:st,currentQuality:N()||Bc.VideoQuality.INVARIANT,isAutoQualityEnabled:L()||!1,currentSubtitle:E(),isMobile:d(),onDownloadClick:Ye,onCopyDataClick:zt,onReportProblemClick:ut,onSaveTraceDataClick:Wt,toggleShowDebugInfo:ri},additionalSettingsMenuItems:P()})}),Et=m(()=>l$({subMenuId:Y.current,context:{availablePlaybackRates:g(),selectPlaybackRate:ue,trafficSavingEnabled:C(),toggleTrafficSaving:st,currentQuality:N()||Bc.VideoQuality.INVARIANT,isAutoQualityEnabled:L()||!1,isAutoQualityAvailable:q()||!1,availableQualities:H(),highQualityEnabled:z(),toggleHighQuality:mt,availableAudioStreams:y(),availableSubtitlesList:v(),closeSettingsMenu:St,currentAudioStream:w(),isMobile:d(),selectAudioLanguage:Ve,selectQuality:he,selectSubtitle:We}}));var qe=_C();let yi;var To=T(qe);{var Bo=Ct=>{var Kt=hC();let W;Kt.__keydown=[vC,St];var Lt=T(Kt);{var li=Xt=>{var rt=gC();let zi;var Wi=T(rt),rn=T(Wi,!0);S(Wi);var Ho=A(Wi,2);Ho.__click=le,S(rt),D((lo,Ri)=>{zi=se(rt,1,"item header s-12",null,zi,lo),me(rn,Ri)},[()=>({mobile:d()}),()=>Ht("submenu_settings")]),b(Xt,rt)};R(Lt,Xt=>{d()&&Xt(li)})}var pt=A(Lt,2);let Tt;xi(pt,21,()=>n(ii),Xt=>Xt.id,(Xt,rt)=>{var zi=Le(),Wi=ce(zi);{var rn=lo=>{Lv(lo,{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:()=>{Se(n(rt).children),O(Ut,n(rt).id,!0)},get ref(){return X[n(rt).id]},set ref(Ri){X[n(rt).id]=Ri}})},Ho=(lo,Ri)=>{{var Dr=$o=>{let Li=m(()=>`${n(rt).id}-menu-item`);Vv($o,{get isMobile(){return d()},get id(){return n(Li)},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:le})},bo=($o,Li)=>{{var sn=Uo=>{let On=m(()=>`${n(rt).id}-menu-item`);Nv(Uo,{get isMobile(){return d()},get id(){return n(On)},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}})};R($o,Uo=>{n(rt).type==="SWITCH"&&Uo(sn)},Li)}};R(lo,$o=>{n(rt).type==="CLICK"?$o(Dr):$o(bo,!1)},Ri)}};R(Wi,lo=>{n(rt).type==="OPEN_SUB_MENU"?lo(rn):lo(Ho,!1)})}b(Xt,zi)}),S(pt),Ze(pt,Xt=>j(Xt),()=>j()),S(Kt),D((Xt,rt,zi)=>{W=se(Kt,1,"settings-menu menu s-12",null,W,Xt),Tt=se(pt,1,"items",null,Tt,rt),Qe(pt,zi)},[()=>({desktop:!d(),mobile:d(),hidden:!!Y.current}),()=>({mobile:d()}),Nt]),dt("mouseenter",Kt,$i),dt("mouseleave",Kt,Xi),b(Ct,Kt)};R(To,Ct=>{r()&&Ct(Bo)})}var Fo=A(To,2);xi(Fo,17,()=>n(Et),Ct=>Ct.id,(Ct,Kt)=>{let W=m(()=>{var Lt;return(Lt=n(Kt).minWidth)!=null?Lt:137});Av(Ct,{get isMobile(){return d()},get playerControlsHeight(){return ae()},get returnFromSubMenu(){return Y.popSubMenu},get id(){return n(Kt).id},get title(){return n(Kt).title},get closeSettingsMenu(){return St},openSubMenuList:Se,get items(){return n(Kt).items},get minWidth(){return n(W)},get refMenuItems(){return X},get listRef(){return ne[n(Kt).id]},set listRef(Lt){ne[n(Kt).id]=Lt}})}),S(qe),D(Ct=>yi=se(qe,1,"settings-menu-container s-12",null,yi,Ct),[()=>({mobile:d(),hidden:!r()})]),b(t,qe),F(),o()}je(["keydown","click"]);var $C=M('<button class="btn s-1f"> </button>'),yC={hash:"s-1f",code:"button.btn.s-1f{background:hsla(0,0%,100%,.1);border-radius:8px;font-size:14px;line-height:18px;margin-top:12px;padding:6px 12px 7px}"};function jv(t,e){Q(t,yC);var i=$C();i.__click=function(...r){var a;(a=e.onClick)==null||a.apply(this,r)};var o=T(i,!0);S(i),D(()=>me(o,e.label)),b(t,i)}je(["click"]);var xC=M('<div class="container s-z"><div class="notification s-z"><div><p class="description s-z"><!></p> <!></div> <!></div></div>'),wC={hash:"s-z",code:".container.s-z{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-z{background:var(--notification-bg);border-radius:var(--notification-radius);display:inline-flex;gap:10px;padding:9px 14px 10px 12px;pointer-events:auto}.description.s-z{font-size:13px;line-height:16px;margin:0;white-space:pre}"};function Hc(t,e){B(e,!0),Q(t,wC);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=Rt(),{ui:{t:r}}=ve(),a=r(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var l=xC(),d=T(l),s=T(d),u=T(s),f=T(u);Dc(f,{get message(){return a}}),S(u);var p=A(u,2);{var v=y=>{let g=m(()=>r("slow_video_notification_button"));jv(y,{get label(){return n(g)},get onClick(){return e.onSelectAutoQuality}})};R(p,y=>{o||y(v)})}S(s);var $=A(s,2);Rs($,{get onClick(){return e.onClose}}),S(d),S(l),Jr(3,d,()=>$s,()=>({duration:i})),b(t,l),F()}var Uc=require("@vkontakte/videoplayer-shared/es2015");var dl="annotation",Cp=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",dl),this.setupSlotStyles(e,o),this.shadowRootContainer.append(e),this.slots.set(r,{rootElement:e,options:i}),a&&this.runHidingControlsWhenIntersected(r,a),l&&((d=this.store)==null||d.ui.isControlsAvailable.set(!1))}setupSlotStyles(e,i){switch(e.style.position="absolute",i){case"over_video":e.style.zIndex="calc(var(--video-container-z-index) + 1)";break;case"over_controls":e.style.zIndex="calc(var(--controls-container-z-index) + 1)";break;default:e.style.zIndex="0"}}runHidingControlsWhenIntersected(r,a){return ht(this,arguments,function*(e,{observedSlotElementId:i,controlsToObserve:o}){var v;let l=this.slots.get(e);if(!l)return;let d=yield this.findSlotElement(l.rootElement,i,e),{controls:s,hiddenControls:u}=((v=this.store)==null?void 0:v.ui)||{},f=new MutationObserver($=>$.forEach(()=>{let y=Os(d,this.shadowRootContainer);o.forEach(g=>{let w=s==null?void 0:s[g],I=w?ge(w):null,C=u==null?void 0:u[g];I&&(C==null||C.set((0,Uc.isIntersecting)(I,y)))})}));f.observe(d,{childList:!0,subtree:!0}),l.observer=f;let p=new Uc.Subscription;o.forEach($=>{s&&p.add(s[$].subscribe(y=>{let g=u==null?void 0:u[$];y&&y.isDisplayed?g==null||g.set((0,Uc.isIntersecting)(y,Os(d,this.shadowRootContainer))):g==null||g.set(!1)}))}),l.subs=p})}findSlotElement(e,i,o){return ht(this,null,function*(){return new Promise(r=>{let a=null,l=new MutationObserver(()=>{if(a=e.querySelector(`#${i}`),a){l.disconnect();let s=this.slots.get(o);s&&(s.observerForFindingSlotElement=void 0),r(a)}});l.observe(e,{childList:!0,subtree:!0});let d=this.slots.get(o);d&&(d.observerForFindingSlotElement=l)})})}remove(e){var u,f;let i=this.slots.get(e);if(!i)return;let{rootElement:o,observer:r,observerForFindingSlotElement:a,subs:l,options:{controlsBehaviour:d,hideAllControls:s}}=i;o&&o.remove(),[r,a].forEach(p=>p==null?void 0:p.disconnect()),l==null||l.unsubscribe(),this.slots.delete(e),s&&((u=this.store)==null||u.ui.isControlsAvailable.set(!0)),(f=d==null?void 0:d.controlsToObserve)==null||f.forEach(p=>{var v,$;($=(v=this.store)==null?void 0:v.ui.hiddenControls[p])==null||$.set(!1)})}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}haveSlots(){return this.slots.size>0}};var SC=M('<div class="container s-5"><!></div>'),CC={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 zc(t,e){B(e,!0),Q(t,CC);let i=h(e,"reversed",3,!1);var o=Le(),r=ce(o);As(r,()=>e.Icon,a=>{var l=SC(),d=T(l);Hi(d,()=>e.Icon,(s,u)=>{u(s,{get size(){return"48"},get reversed(){return i()}})}),S(l),D(()=>Qe(l,`animation-duration: ${e.duration}ms`)),b(a,l)}),b(t,o),F()}var Xv=require("@vkontakte/videoplayer-core/es2015"),TC=M('<div class="container s-v"><!></div>'),IC={hash:"s-v",code:".container.s-v{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;position:absolute;width:100%}"};function Zv(t,e){B(e,!0),Q(t,IC);let[i,o]=Re(),r=()=>x(s,"$playbackState$",i),a=()=>x(f,"$previewTrackActive",i),l=()=>x(p,"$previewTrackDragInProgress",i),d=()=>x(u,"$isPlaying$",i),{state:{playbackState$:s,isPlaying$:u},ui:{previewTrackActive:f,previewTrackDragInProgress:p}}=ve(),{features:{playbackStatusShow:v},playbackStatusAnimationDuration:$}=Rt(),y=0,g=K(null),w=K(!1);Oe(()=>{r()===Xv.PlaybackState.PLAYING?O(g,Vn,!0):r()===Xv.PlaybackState.PAUSED?O(g,Bs,!0):O(g,null)}),Oe(()=>{if(!(!v||a()||l()))return y=window.setTimeout(()=>{y=0,O(g,null)},$),()=>{y&&(window.clearTimeout(y),y=0)}}),Oe(()=>{d()&&!n(w)&&(O(w,!0),O(g,null))});var I=Le(),C=ce(I);{var N=L=>{var E=TC(),P=T(E);zc(P,{get duration(){return $},get Icon(){return n(g)}}),S(E),b(L,E)};R(C,L=>{n(g)&&v&&L(N)})}b(t,I),F(),o()}var EC=M('<div><div data-testid="video-container"></div></div>'),PC={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 cl(t,e){B(e,!0),Q(t,PC);let[i,o]=Re(),r=()=>x(p,"$rotateAlpha",i),a=()=>x(v,"$playerSize",i),l=()=>x(f,"$playerPhase",i),d=()=>x(y,"$chromecastConnected$",i),s=()=>x($,"$isPlaying$",i),u=h(e,"videoContainer",15),{playerPhase:f,ui:{rotateAlpha:p,playerSize:v},state:{isPlaying$:$,chromecastConnected$:y}}=ve(),{isSmoothVideoRotate:g}=Rt(),w=m(()=>u()&&r()%180?a().height/a().width:1);var I=EC();let C;I.__contextmenu=function(...E){var P;(P=e.onContextMenu)==null||P.apply(this,E)},I.__mousedown=function(...E){var P;(P=e.onMouseDown)==null||P.apply(this,E)},I.__mouseup=function(...E){var P;(P=e.onMouseUp)==null||P.apply(this,E)},I.__click=function(...E){var P;(P=e.onClick)==null||P.apply(this,E)},I.__dblclick=function(...E){var P;(P=e.onDblClick)==null||P.apply(this,E)};var N=T(I);let L;Ze(N,E=>u(E),()=>u()),S(I),D((E,P)=>{C=se(I,1,"video-wrapper s-d",null,C,E),L=se(N,1,"video-container s-d",null,L,P),Qe(N,`transform: rotate(${r()}deg) scale(${n(w)})`),Me(N,"data-is-playing",s())},[()=>({hidden:l()!=="video"||d(),nocursor:e.hideCursor}),()=>({"fast-rotate":!g})]),b(t,I),F(),o()}je(["contextmenu","mousedown","mouseup","click","dblclick"]);var kC=M('<div><span class="text s-w"> </span> <!></div>'),AC={hash:"s-w",code:".root.s-w{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-w,.root.visible.s-w{transform:translateX(-50%)}.root.visible.s-w{opacity:1;visibility:visible}.text.s-w{font-size:13px;font-weight:600;line-height:16px}"};function Jv(t,e){B(e,!0),Q(t,AC);let{ui:{t:i}}=ve();var o=kC();let r;var a=T(o),l=T(a,!0);S(a);var d=A(a,2);Mc(d,{get size(){return"16"},fill:"currentColor"}),S(o),D((s,u)=>{r=se(o,1,"root s-w",null,r,s),me(l,u)},[()=>({visible:e.isVisible}),()=>i("double_forward_label")]),b(t,o),F()}var LC=M('<div class="container s-10" role="button" data-testid="preview-track-overlay"><div class="icon s-10"><!></div></div>'),MC={hash:"s-10",code:".container.s-10{background-color:rgba(0,0,0,.48);cursor:pointer;height:100%;position:absolute;width:100%}.container.s-10,.icon.s-10{align-items:center;display:flex;justify-content:center}.icon.s-10{background-color:#00000073;border-radius:100%;height:64px;transition:transform .2s;transition-timing-function:ease-out;width:64px;will-change:transform}.container.s-10:hover .icon:where(.s-10){transform:scale(1.15)}"};function eg(t,e){B(e,!1),Q(t,MC);let o=ve().actions.internal.closePreviewTrack,r=200,a=u=>{u.stopPropagation(),o()};So();var l=LC();l.__click=a;var d=T(l),s=T(d);return Vn(s,{get size(){return"32"}}),S(d),S(l),Jr(3,l,()=>$s,()=>({duration:r})),b(t,l),Df(e,"handleClick",a),F({handleClick:a})}je(["click"]);var VC=M('<div class="container s-x"><div class="notification s-x"><span class="text s-x"> </span></div></div>'),RC={hash:"s-x",code:".container.s-x{display:flex;justify-content:center;left:0;pointer-events:none;position:absolute;right:0;top:20px}.notification.s-x{background-color:var(--black-alpha-40);border-radius:var(--notification-radius);padding:10px 16px}.text.s-x{font-size:14px;font-weight:500;line-height:18px}"};function tg(t,e){B(e,!1),Q(t,RC);let{ui:{t:i}}=ve();So();var o=VC(),r=T(o),a=T(r),l=T(a,!0);S(a),S(r),S(o),D(d=>me(l,d),[()=>i("preview_track_notification_text")],In),Jr(3,r,()=>$s,()=>({duration:340})),b(t,o),F()}var NC=(t,e,i,o,r,a)=>{if(t.stopPropagation(),e()||o()){a();return}},OC=M("<div><!></div>"),DC=M('<div class="spherical-video-icon s-7"><!></div>'),BC=M("<div><!></div>"),FC=M('<div class="settings-menu s-7"><!></div>'),HC=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),UC=M("<!> <!> <!>",1),zC=M('<div class="blocked s-7"></div>'),WC=M('<div class="player-wrapper s-7"><!> <div class="overlay-container"></div></div> <!>',1),KC={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 og(t,e){B(e,!0),Q(t,KC);let[i,o]=Re(),r=()=>x(di,"$notificationsToShow$",i),a=()=>x(fi,"$playerPhase",i),l=()=>x(To,"$isLoaderVisible",i),d=()=>x($i,"$adPlaybackState",i),s=()=>x(li,"$crashed",i),u=()=>x(lo,"$isInteractiveTime$",i),f=()=>x(wi,"$settingsMenuVisible",i),p=()=>x(Ri,"$isInteractiveExpectation$",i),v=()=>x(ei,"$controlsVisible",i),$=()=>x(bo,"$touched",i),y=()=>x(nr,"$graphIsOpened$",i),g=()=>x(hi,"$isFullscreen",i),w=()=>x(rs,"$autoplayNextEnabled$",i),I=()=>x(Kt,"$postrollPassed",i),C=()=>x(Bo,"$isEnded$",i),N=()=>x(Tr,"$cursorInside",i),L=()=>x(tr,"$isControlsAvailable",i),E=()=>x(an,"$doubleForwardOn$",i),P=()=>x(or,"$fakeIsPlaying$",i),q=()=>x(Bn,"$bottomNoSmooth",i),H=()=>x(Uo,"$interactiveTimeIndicator",i),z=()=>x(zi,"$playerSize",i),j=()=>x(Wi,"$is3DVideo",i),ae=()=>x(Dn,"$doubleForwardAvailable$",i),X=()=>x(qe,"$contextMenuVisible$",i),ne=()=>x(ri,"$playbackState$",i),J=()=>x($o,"$hotKeyMapData",i),we=()=>x(ii,"$scrubbingInProgress",i),pe=()=>x(Et,"$volumeChangingInProgress",i),re=()=>x(Fo,"$chromecastConnected$",i),_e=()=>x(ln,"$controlsTimeoutActive",i),$e=()=>x(Zi,"$settingsMenuOpenedByKeyboard",i),ee=()=>x(Zt,"$contextMenuOpenedByKeyboard$",i),Ne=()=>x(Yo,"$contextMenuOpenedByHotKey$",i),fe=()=>x(Ei,"$contextMenuButtonRef$",i),k=()=>x(Kr,"$contextMenuLastActiveElem$",i),Ke=()=>x(bt,"$isFullscreenOpenedByKeyboard",i),Te=()=>x(Wt,"$language$",i),Z=()=>x(pr,"$previewTrackActive$",i),ie=()=>x(rn,"$icon3DVideoVisible",i),De=()=>x(Ct,"$chromecastDeviceName$",i),Be=()=>x(Xt,"$currentSubtitle$",i),ot=()=>x(rt,"$currentSubtitleCaptions$",i),U=()=>x(Xi,"$position$",i),Ae=()=>x(Nt,"$duration$",i),ke=()=>x(W,"$isLive$",i),ze=()=>x(Lt,"$isPlaying$",i),it=()=>x(xr,"$contextMenuPosition$",i),ye=()=>x(Sr,"$previewTrackNotificationVisible$",i),Ie=()=>x(Li,"$showHotKeyMap",i),Fe=()=>x(yi,"$debugPanelVisible",i),Dt=()=>x(ss,"$userActionsDisabled$",i),vt=h(e,"videoContainer",15),Ht=h(e,"adsSlotId",3,void 0),ct=h(e,"adsParams",3,void 0),St=h(e,"adsAutoplayParam",3,void 0),ni=h(e,"duration",3,void 0),At=h(e,"logoTargetUrl",3,""),Bt=h(e,"showNextPrevButtons",3,!1),Ut=h(e,"nextButtonActive",3,!1),Y=h(e,"prevButtonActive",3,!1),Se=h(e,"endScreenVideoTitle",3,void 0),le=h(e,"endScreenVideoThumb",3,void 0),he=h(e,"isOneVideoPlaylist",3,!1),Ve=h(e,"shadowRootContainer",3,void 0),st=h(e,"outerContainerRef",3,void 0),mt=h(e,"playerStarted",3,!1),ue=h(e,"fullScreenTarget",3,void 0),We=h(e,"showMiniTimer",3,!1),Ye=h(e,"showEndScreen",3,!0),ut=h(e,"keyboardControls",15),zt=e.store.getLogger().createComponentLog("Root component"),Wt=e.store.interfaceLanguage$,ri=e.store.state.playbackState$,$i=e.store.ads.playbackState,Xi=e.store.state.positionWithScrubbing$,Nt=e.store.state.duration$,fi=e.store.playerPhase,hi=e.store.ui.isFullscreen,bt=e.store.ui.isFullscreenOpenedByKeyboard,ei=e.store.ui.controlsVisible,wi=e.store.ui.settingsMenu.visible$,Zi=e.store.ui.settingsMenu.openedByBtnKeyboard$,ii=e.store.ui.scrubbingInProgress,Et=e.store.ui.volumeChangingInProgress,qe=e.store.ui.contextMenu.visible$,yi=e.store.ui.debugPanelVisible,To=e.store.state.isLoaderVisible,Bo=e.store.state.isEnded$,Fo=e.store.state.chromecastConnected$,Ct=e.store.state.chromecastDeviceName$,Kt=e.store.ads.postrollPassed,W=e.store.state.isLive$,Lt=e.store.state.isPlaying$,li=e.store.state.crashed$,pt=e.store.webApi.annotationsApi,Tt=e.store.webApi.pictureInPictureApi,Xt=e.store.state.currentSubtitle$,rt=e.store.state.currentSubtitleCaptions$,zi=e.store.ui.playerSize,Wi=e.store.ui.is3DVideo,rn=e.store.ui.icon3DVideoVisible,Ho=e.store.state.isInteractive,lo=e.store.state.isInteractiveTime$,Ri=e.store.state.isInteractiveExpectation$,Dr=e.store.state.hasInteractiveBranches,bo=e.store.ui.touched,$o=e.store.ui.modals.hotKeyMap.data,Li=e.store.ui.modals.hotKeyMap.show,sn=e.store.ui.overlayContainer$,Uo=e.store.ui.controls.interactiveTimeIndicator,On=e.store.state.showInteractiveTimeIndicator,xr=e.store.ui.contextMenu.position$,wr=e.store.actions.internal.setQuality,ys=e.store.actions.internal.closeSettingsMenu,rs=e.store.ui.autoplayNextEnabled$,ss=e.store.ui.userActionsDisabled,tr=e.store.ui.isControlsAvailable,Br=e.store.ui.videoTitleInfo,an=e.store.ui.doubleForwardOn$,Dn=e.store.ui.doubleForwardAvailable$,Sr=e.store.ui.previewTrackNotificationVisible,zo=e.store.actions.internal.getVideoElement,ir=e.store.actions.internal.checkFullscreenSupport,{fakeIsPlaying$:or,notifications$:Fr,graphIsOpened$:nr}=Co(),co=K(void 0),Hr=K(void 0),rr=K(void 0),hn=K(void 0),yo,Cr,sr;$o.set(nb());let{closeNotification:gt,notificationsToShow$:di}=Fr,Ur=m(()=>!!r().slow_video),ar=()=>gt("slow_video"),zr=m(()=>(a()==="video"&&l()||a()==="ads"&&d()==="inactive")&&!s()),Wo=K(void 0),Bn=de(!1),_n,ln=de(!1),bn=de(),Tr=de(!1),Ko=K(!1),qo=K(!1),$n=K(!1),Ir=K(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),Si=m(()=>u()&&!f()&&!(n(Ko)||n(qo))&&!(n($n)&&!p())),yn=!0,Fn=m(()=>e.uiConfig.features.thumbTimer&&We()&&a()==="video"&&!v()&&!s()&&!Ho&&(e.uiConfig.hideThumbTimerAfterTouch&&!$()||!e.uiConfig.hideThumbTimerAfterTouch)),lr=e.uiConfig.titleShowBehaviour,Er=m(()=>!["video","thumb"].includes(a())||lr==="never"||y()?!1:lr==="fullscreen"?g():!0),Hn=m(()=>lr==="always"||a()==="thumb"?!1:!v()),dn=K(!1),xt=m(()=>(Ye()||e.showAutoplayNext&&w())&&!!Se()&&!!le()&&(e.showAds&&I()||!e.showAds)&&C()&&!s()&&!n(dn)),Pt=m(()=>N()&&!(v()||n(xt))&&!u()&&L()&&!E()),uo=K(!1),Io=m(()=>P()!==null),{toggle:Eo}=or,po=!1,Oi=null;Tt==null||Tt.setContext(Id());let Un=()=>{e.autoplay&&!Ho&&e.uiConfig.controls.showOnStartupAtAutoplay&&Mi(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Un});let Ji=()=>{window.clearTimeout(yo),ln.set(!1)},Wr=()=>{window.clearTimeout(Cr),bn.set(null)},Mi=be=>{Ji(),ln.set(!0),yo=window.setTimeout(()=>ln.set(!1),be);let wt=be-100;_n=window.setTimeout(()=>{q()&&Bn.set(!1)},wt>0?wt:be)},xs=(be,wt)=>{Wr(),bn.set(wt),Cr=window.setTimeout(()=>bn.set(null),be)},as=Wi.subscribe(be=>{rn.set(be),be&&(window.clearTimeout(sr),sr=window.setTimeout(()=>rn.set(!1),e.uiConfig.controls.hide360IconTimeout))}),ls=()=>ht(null,null,function*(){var wt,Ft,oi,Pi;let be=na();if(be){let ki=ic(),Vi=dr();be=ki===Vi||ki===Ve()}if(be){Mi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield Tt==null?void 0:Tt.exit()}catch(ki){zt({message:String(ki)})}}hi.set(be),e.store.getAdmanWrapper().setFullscreen(be),g()?(Ft=(wt=e.store.callbacks)==null?void 0:wt.onFullscreenEnter)==null||Ft.call(wt):(Pi=(oi=e.store.callbacks)==null?void 0:oi.onFullscreenExit)==null||Pi.call(oi)}),Pr=be=>{let{width:wt,height:Ft}=be.target;zi.set({width:wt,height:Ft})},cn=()=>{let{width:be,height:wt}=n(co).getBoundingClientRect();zi.set({width:be,height:wt})};Vt(()=>{var wt;return Ju(ls),e.uiConfig.features.annotationsInside&&(pt==null||pt.init(n(co))),Wa(Tt)&&(Tt==null||Tt.assignPlayerContainer(n(co)),Tt==null||Tt.setExternalEventHandlers({resize:Pr,leavepictureinpicture:cn})),e.interactiveContainer&&((wt=vt().parentElement)==null||wt.insertBefore(e.interactiveContainer,vt().nextSibling)),()=>{window.clearTimeout(yo),window.clearTimeout(_n),window.clearTimeout(Cr),window.clearTimeout(sr),as(),Tt==null||Tt.dispose().catch(Ft=>{zt({message:String(Ft)})}),ep(ls)}});let dr=()=>{let be=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!st()?n(co):st(),wt=be.getRootNode(),Ft=wt instanceof ShadowRoot?wt.host:wt,oi=ue()instanceof HTMLElement&&ue().contains(Ft);return e.uiConfig.allowChangingFullscreenTarget&&ue()&&oi?ue():be},Po=()=>{qe.set(!1)},ko=()=>{ys(),Po()},cr=()=>ht(null,null,function*(){if(!ir()){zt({message:"fullscreen disabled"});return}Po(),na()?(yield Zu(document),zt({message:"exit fullscreen"})):(zt({message:"request fullscreen"}),yield Xu(dr()))}),Ue=be=>{y()||(be.preventDefault(),qe.set(!0),xr.set({left:be.clientX,top:be.clientY}))};function Mt(){Tr.set(!0),Ho||Mi(e.uiConfig.controls.hideTimeoutCursor)}function Ci(be){var Pi,ki;let{relatedTarget:wt}=be,oi=!!(wt&&((Pi=n(rr))!=null&&Pi.contains(wt)))&&((ki=ut())==null?void 0:ki.isFocused());!Ho&&!oi&&(Bn.set(!0),Mi(e.uiConfig.controls.hideTimeoutCursor))}function Qo(){Tr.set(!1),O(qo,!1),O(Ko,!1),po=!1,e.store.actions.internal.releaseCamera(),Mi(e.uiConfig.controls.hideTimeout),E()&&eo()}function fo(be){return be?be.offsetTop+fo(be.offsetParent):0}function Ao(be){return be?be.offsetLeft+Ao(be.offsetParent):0}function mo(be){if(H()&&On){let wt=be.currentTarget,Ft=fo(wt),oi=Ao(wt),Pi=be.pageX-oi,ki=be.pageY-Ft,{left:Vi,bottom:Ti,right:ds}=H(),Ks=ds-Vi;return Pi>=Vi-Ks&&ki<=Ti+Ks}}function Go(be){if(n(co)){let wt=fo(be.currentTarget),Ft=z().height,oi=be.pageY-wt;if(mo(be)){O(qo,!1);return}oi<40?O(qo,!0):oi>Ft-40?O(Ko,!0):(O(qo,!1),f()||O(Ko,!1))}}function zn(be){Go(be),!n(Si)&&!E()&&Mi(e.uiConfig.controls.hideTimeoutCursor),j()&&po&&Oi&&e.store.actions.internal.moveCameraFocusPX(Oi.clientX-be.clientX,Oi.clientY-be.clientY,be.timeStamp-Oi.timeStamp),Oi=be}let un=null,xo=()=>{un=window.setTimeout(()=>{e.store.actions.internal.changeDoubleForwardOn(!0),Ji()},e.uiConfig.doubleForwardActivationTime)},eo=()=>{e.store.actions.internal.changeDoubleForwardOn(!1),un&&clearTimeout(un),un=null},Wn=be=>{be.preventDefault(),be.button===0&&(po=!0,e.store.actions.internal.holdCamera(),ae()&&xo()),!po&&Mi(e.uiConfig.controls.hideTimeoutCursor)},Kn=be=>{be.preventDefault(),be.button===0&&(Oi=be,po=!1,e.store.actions.internal.releaseCamera()),!E()&&Mi(e.uiConfig.controls.hideTimeoutCursor)},qn=be=>{be.preventDefault(),yn&&(zt({message:"double click on video"}),cr(),Mi(e.uiConfig.controls.hideTimeoutCursor))},kr=be=>{var wt;if(be.preventDefault(),E()){eo();return}if(un&&eo(),X()||f()){ko();return}if(!(C()&&!Dr)){if(n(Io))return Eo();if((wt=ut())==null||wt.focus(),!mt()){e.firstStart(),Mi(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||ne()!==ig.PlaybackState.PLAYING)&&e.store.actions.internal.togglePlay(),Mi(e.uiConfig.controls.hideTimeoutCursor)}},ur=be=>{ko(),bo.set(!0),Mi(e.uiConfig.controls.hideTimeout),be&&xs(e.uiConfig.controls.hideHotKeyHelpers,be)},ws=()=>{var be,wt;ko(),(be=e.store.callbacks)!=null&&be.onOpenHotKeyMap?(wt=e.store.callbacks)==null||wt.onOpenHotKeyMap(J()):Li.update(Ft=>!Ft)},et=()=>{bo.set(!0)},Zt=e.store.ui.contextMenu.openedByBtnKeyboard$,Ei=e.store.ui.contextMenu.btnRef$,wo=K(void 0),Yo=e.store.ui.contextMenu.openedByHotKey$,Kr=e.store.ui.contextMenu.lastActiveElem$,Lo=K(!1),pr=e.store.ui.previewTrackActive;Oe(()=>{sn.set(n(Wo))}),Oe(()=>{O($n,n(Ir)&&ne()!==ig.PlaybackState.PLAYING,!0),n(Ir)||It(()=>O(Ir,!0))}),Oe(()=>{var wt,Ft;let be=(n($n)||C()||f()||we()||pe()||re()||_e()||n(Lo))&&!n(Si)&&(a()==="video"||a()==="ads")&&!s()&&L();ei.set(be),!be&&!_e()&&((wt=n(rr))!=null&&wt.contains(sp()))&&((Ft=ut())==null||Ft.focus())}),Oe(()=>{!we()&&n(uo)&&!u()&&Mi(e.uiConfig.controls.hideTimeoutCursor),It(()=>O(uo,we(),!0))}),Oe(()=>{n(hn),f(),$e(),It(()=>dc(n(hn),f(),$e()))}),Oe(()=>{n(wo),X(),ee(),Ne(),It(()=>{let be=ee()||Ne();dc(n(wo),X(),be)})}),Oe(()=>{let be=fe();be&&(X(),It(()=>Gl(be,X(),Zt)))}),Oe(()=>{let be=k();be&&(X(),It(()=>db(be,X(),Yo)))}),Oe(()=>{var be;!Ke()&&g()&&(It(()=>bt.set(!1)),(be=ut())==null||be.focus())}),Oe(()=>{y()&&ko()});let Qn=K(void 0),ma=be=>{Br.set(Jn(zo(),{title:n(Qn)},"title",be))},zs=(be,wt)=>{var ki,Vi;let Ft=(Vi=(ki=e.store.callbacks)==null?void 0:ki.uiInfo)==null?void 0:Vi.onUpcomingLiveViewStateChanged;if(!Ft)return;let oi=!!wt,Pi=Ee(Ee({},Jn(n(co),{upcomingLiveScreen:wt},"upcomingLiveScreen",oi)),be);Ft(Pi)};var Ws=WC();dt("blur",ka,ko);var xn=ce(Ws);xn.__mousemove=zn;var lt=T(xn);let pi=m(()=>a()==="ads"),Di=m(()=>n(Io)?Eo:void 0);Ze(xm(lt,{startDoubleForwardActivationTimer:xo,stopDoubleForward:eo,toggleFullscreen:cr,hideContextMenu:ko,showHotKeyHelpers:ur,showKeyMap:ws,get isAds(){return n(pi)},get fakePlayButtonHandler(){return n(Di)},get nextButtonActive(){return Ut()},get prevButtonActive(){return Y()},children:(be,wt)=>{var Ft=UC(),oi=ce(Ft);cl(oi,{get hideCursor(){return n(Pt)},onClick:kr,onContextMenu:Ue,onMouseDown:Wn,onMouseUp:Kn,onDblClick:qn,get videoContainer(){return vt()},set videoContainer(Vi){vt(Vi)}});var Pi=A(oi,2);Na(Pi,()=>"slot",!1,(Vi,Ti)=>{no(Vi,()=>({name:dl}))});var ki=A(Pi,2);As(ki,Te,Vi=>{var Ti=HC(),ds=ce(Ti);let Ks=m(()=>a()!=="thumb"||s()||Ho&&e.autoplay);sl(ds,{get hidden(){return n(Ks)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart},onContextMenu:Ue,onClick:Po});var fl=A(ds,2);{var va=He=>{eg(He,{})};R(fl,He=>{Z()&&He(va)})}var ga=A(fl,2);Zv(ga,{});var cs=A(ga,2);Jv(cs,{get isVisible(){return E()}});var Ss=A(cs,2);{var ha=He=>{let bi=m(()=>{var jo;return(jo=e.live)==null?void 0:jo.startTime});Nc(He,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(bi)},onUpcomingLiveViewStateChanged:zs,onContextMenu:Ue,onClick:Po})};R(Ss,He=>{a()==="LiveWaitingStart"&&He(ha)})}var _a=A(Ss,2);{var Cn=He=>{al(He,{kind:"recover",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:Po})};R(_a,He=>{a()==="LiveWaitingRecover"&&He(Cn)})}var Cs=A(_a,2);{var ml=He=>{al(He,{kind:"record",get thumbUrl(){return e.thumbUrl},onContextMenu:Ue,onClick:Po})};R(Cs,He=>{a()==="LiveWaitingRecord"&&He(ml)})}var fr=A(Cs,2);{var gd=He=>{var bi=OC();let jo;var Ar=T(bi);nc(Ar,{get adsSlotId(){return Ht()},get adsParams(){return ct()},get adsAutoplayParam(){return St()},get duration(){return ni()},get adsExternalApi(){return e.adsExternalApi}}),S(bi),D(Tn=>jo=se(bi,1,"ads-container s-7",null,jo,Tn),[()=>({hidden:a()!=="ads"})]),b(He,bi)};R(fr,He=>{e.showAds&&mt()&&He(gd)})}var vl=A(fr,2);{var hd=He=>{let bi=m(()=>!Ye()&&e.showAutoplayNext&&w());bm(He,{get title(){return Se()},get thumb(){return le()},get isHide(){return n(bi)},clickCloseIcon:()=>O(dn,!0)})};R(vl,He=>{n(xt)&&Se()&&le()&&He(hd)})}var ba=A(vl,2);{var _d=He=>{let bi=m(()=>g()?"md":"sm"),jo=m(()=>{var Ar;return(Ar=e.store.callbacks)==null?void 0:Ar.onTitleClicked});Cv(He,{get title(){return e.title},get getVideoDeeplink(){return e.getVideoDeeplink},get isHidden(){return n(Hn)},onVisibilityChanged:ma,onMouseEnter:()=>{O(Lo,!0)},onMouseLeave:()=>{O(Lo,!1)},get size(){return n(bi)},get onTitleClicked(){return n(jo)},get ref(){return n(Qn)},set ref(Ar){O(Qn,Ar,!0)}})};R(ba,He=>{n(Er)&&He(_d)})}var gl=A(ba,2);{var hl=He=>{let bi=m(()=>a()==="video"&&v());Vc(He,{get isShifted(){return n(bi)}})};R(gl,He=>{j()&&He(hl)})}var $a=A(gl,2);{var nt=He=>{var bi=DC(),jo=T(bi);tc(jo,{}),S(bi),b(He,bi)};R($a,He=>{ie()&&He(nt)})}var ft=A($a,2);{var to=He=>{Rc(He,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return De()},onClick:kr,onContextMenu:Ue,onDblClick:qn})};R(ft,He=>{re()&&He(to)})}var Mo=A(ft,2);{var io=He=>{nl(He,{get shifted(){return v()},get captions(){return ot()},get position(){return U()},get playerSize(){return z()}})};R(Mo,He=>{Be().value!=="off"&&He(io)})}var _i=A(Mo,2);{var Ki=He=>{var bi=BC();bi.__contextmenu=Ue,bi.__click=[NC,X,qe,f,wi,ko];var jo=T(bi);rl(jo,{}),S(bi),b(He,bi)};R(_i,He=>{s()&&He(Ki)})}var qs=A(_i,2);{var bd=He=>{let bi=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),jo=m(()=>a()==="ads"),Ar=m(()=>e.canRewindLive&&Ae()!==0);Lc(He,{get bottomHidden(){return n(bi)},get bottomNoSmooth(){return q()},get showControls(){return v()},get isAds(){return n(jo)},get canRewindLive(){return n(Ar)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return At()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Bt()},get nextButtonActive(){return Ut()},get prevButtonActive(){return Y()},get isOneVideoPlaylist(){return he()},customFullscreenSupported:yn,toggleFullscreen:cr,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return n(Hr)},set playerControlsWrapperRef(Tn){O(Hr,Tn,!0)},get playerControlsRef(){return n(rr)},set playerControlsRef(Tn){O(rr,Tn,!0)}})};R(qs,He=>{mt()&&He(bd)})}var eu=A(qs,2);{var zp=He=>{var bi=FC(),jo=T(bi);let Ar=m(()=>{var Tn;return(Tn=n(rr))==null?void 0:Tn.clientHeight});Fc(jo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return n(Ar)},returnFocus:()=>{var Tn;return(Tn=ut())==null?void 0:Tn.focus()},get ref(){return n(hn)},set ref(Tn){O(hn,Tn,!0)}}),S(bi),b(He,bi)};R(eu,He=>{!re()&&a()!=="ads"&&He(zp)})}var tu=A(eu,2);let Wp=m(()=>!n(Fn));ac(tu,{get isLive(){return ke()},get isHidden(){return n(Wp)},get isPlaying(){return ze()},get position(){return U()},get duration(){return Ae()}});var iu=A(tu,2);wv(iu,{get data(){return bn}});var ou=A(iu,2);hm(ou,{get supportLink(){return e.supportLink},returnFocus:()=>{var He;return(He=ut())==null?void 0:He.focus()},get visible(){return X()},get playerContainerRef(){return n(co)},get position(){return it()},get menuElementRef(){return n(wo)},set menuElementRef(He){O(wo,He,!0)}});var nu=A(ou,2);{var _l=He=>{Hc(He,{onClose:ar,onSelectAutoQuality:()=>{wr("auto"),ar()}})};R(nu,He=>{n(Ur)&&He(_l)})}var ru=A(nu,2);{var ya=He=>{tg(He,{})};R(ru,He=>{ye()&&He(ya)})}var xa=A(ru,2);{var Kp=He=>{Ga(He,{})};R(xa,He=>{n(zr)&&He(Kp)})}var $d=A(xa,2);{var yd=He=>{Cm(He,{})};R($d,He=>{Ie()&&He(yd)})}var su=A($d,2);{var qp=He=>{uc(He,{})};R(su,He=>{Fe()&&He(qp)})}b(Vi,Ti)}),b(be,Ft)},$$slots:{default:!0}}),be=>ut(be),()=>ut());var wn=A(lt,2);Ze(wn,be=>O(Wo,be),()=>n(Wo)),S(xn),Ze(xn,be=>O(co,be),()=>n(co));var qr=A(xn,2);{var Sn=be=>{var wt=zC();b(be,wt)};R(qr,be=>{Dt()&&be(Sn)})}dt("mouseenter",xn,Mt),dt("mouseleave",xn,Qo),dt("click",xn,et,!0),dt("focusin",xn,Ci,!0),b(t,Ws),F(),o()}je(["mousemove","contextmenu","click"]);var fa=require("@vkontakte/videoplayer-core/es2015"),g$=require("@vkontakte/videoplayer-shared/es2015");var qC=M('<div></div> <div class="info s-16"><div class="triangles-wrapper s-16"><div></div> <div></div> <div></div></div> <p class="step-caption s-16"> </p></div>',1),QC=M("<div><!></div>"),GC={hash:"s-16",code:".double-click-area.s-16{height:100%;overflow:hidden;position:absolute;top:0;width:25%}.double-click-area.left.s-16{left:0}.double-click-area.right.s-16{right:0}.semicircle.s-16{background-color:rgba(0,0,0,.5);height:100%;position:absolute;top:0;width:100%}.semicircle.left.s-16{border-bottom-right-radius:50%;border-top-right-radius:50%;left:0}.semicircle.right.s-16{border-bottom-left-radius:50%;border-top-left-radius:50%;right:0}.info.s-16{align-items:center;flex-direction:column;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.info.s-16,.triangles-wrapper.s-16{display:flex;justify-content:center}.triangles-wrapper.s-16{margin-bottom:10px;position:relative}.triangle.s-16{animation:s-16-blink .5s infinite;border-bottom:6px solid transparent;border-top:6px solid transparent;height:0;opacity:0;width:0}.triangle.left.s-16:nth-child(3),.triangle.right.s-16:first-child{animation-delay:0s}.triangle.left.s-16:nth-child(2),.triangle.right.s-16:nth-child(2){animation-delay:.1s}.triangle.left.s-16:first-child,.triangle.right.s-16:nth-child(3){animation-delay:.2s}@keyframes s-16-blink{0%{opacity:0}50%{opacity:1}to{opacity:0}}.triangle.left.s-16{border-right:8px solid var(--white)}.triangle.right.s-16{border-left:8px solid var(--white)}.triangle.s-16:not(:last-child){margin-right:5px}.step-caption.s-16{color:var(--white);font-size:12px;line-height:1;margin:0;text-align:center}"};function Tp(t,e){B(e,!0),Q(t,GC);let i=h(e,"seekStep",3,0),o=K(!1),r=0,a=0,l=K(ci(i())),d=p=>{p.stopPropagation(),a+=1,O(l,i()*(a-1)),a===1?e.handleSingleFirstClick(p):(O(o,!0),e.handleSecondClick()),window.clearTimeout(r),r=window.setTimeout(()=>{a=0,O(o,!1)},300)};mn(()=>{window.clearTimeout(r)});var s=QC();s.__click=d;var u=T(s);{var f=p=>{var v=qC(),$=ce(v),y=A($,2),g=T(y),w=T(g),I=A(w,2),C=A(I,2);S(g);var N=A(g,2),L=T(N,!0);S(N),S(y),D(E=>{var P,q,H,z;se($,1,`semicircle ${(P=e.side)!=null?P:""}`,"s-16"),se(w,1,`triangle ${(q=e.side)!=null?q:""}`,"s-16"),se(I,1,`triangle ${(H=e.side)!=null?H:""}`,"s-16"),se(C,1,`triangle ${(z=e.side)!=null?z:""}`,"s-16"),me(L,E)},[()=>G("doubletap_seek_step",{seconds:n(l).toFixed(0)})]),b(p,v)};R(u,p=>{n(o)&&p(f)})}S(s),D(()=>{var p;return se(s,1,`double-click-area ${(p=e.side)!=null?p:""}`,"s-16")}),b(t,s),F()}je(["click"]);var YC=(t,e,i)=>{e(!1),i()},jC=M('<div class="overlay s-17"></div> <div class="next-video s-17"><div class="top s-17"><div class="caption s-17"> </div> <!></div> <div class="row s-17"><div class="column s-17"><div class="thumb s-17"><div></div> <!></div></div> <div class="column s-17"><div class="title s-17"> </div></div></div></div>',1),XC={hash:"s-17",code:".overlay.s-17{background:rgba(0,0,0,.72);height:100%;position:absolute;width:100%}.next-video.s-17{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-17{display:flex;justify-content:space-between}.caption.s-17{color:var(--white);font-size:11px;font-weight:700;opacity:.8;text-transform:uppercase}.row.s-17{background:rgba(48,48,48,.8);cursor:pointer;display:flex;flex-direction:row;height:102px;margin-top:6px;width:100%}.column.s-17{display:flex;flex-basis:50%;flex-direction:column}.thumb.s-17{align-items:center;background:no-repeat 50%;background-size:cover;display:flex;justify-content:space-around;position:relative}.thumb.s-17,.thumb-overlay.s-17{height:100%;width:100%}.thumb-overlay.s-17{position:absolute}.thumb-overlay.withOpacity.s-17{background:var(--black);opacity:.3}.title.s-17{color:var(--white);font-size:12px;font-weight:700;line-height:1.6;max-height:52px;overflow:hidden;padding:10px 16px}"};function ng(t,e){B(e,!0),Q(t,XC);let[i,o]=Re(),r=()=>x(d,"$autoplayNextEnabled$",i),a=()=>x(s,"$timerNextVideoRunning$",i),l=ve(),d=l.ui.autoplayNextEnabled$,s=l.ui.timerNextVideoRunning$,u=l.actions.internal.nextVideoClick,f=l.actions.internal.nextVideoAnnouncementShow,p=l.actions.internal.nextVideoAnnouncementClick,v=l.actions.internal.nextVideoAnnouncementAuto,$=l.actions.internal.nextVideoAnnouncementCancel,y=()=>{u(!1),v()},g=()=>{e.clickCloseIcon(),$()};Vt(()=>{e.isHide||f(),e.isHide&&r()&&(u(!1),v())});var w=Le(),I=ce(w);{var C=N=>{var L=jC(),E=A(ce(L),2),P=T(E),q=T(P),H=T(q,!0);S(q);var z=A(q,2);Rs(z,{onClick:g}),S(P);var j=A(P,2);j.__click=[YC,u,p];var ae=T(j),X=T(ae),ne=T(X);let J;var we=A(ne,2);{var pe=ee=>{pc(ee,{get isRunning(){return a()},onTimerEnded:y})};R(we,ee=>{r()&&ee(pe)})}S(X),S(ae);var re=A(ae,2),_e=T(re),$e=T(_e,!0);S(_e),S(re),S(j),S(E),D((ee,Ne)=>{me(H,ee),Qe(X,`background-image: url('${e.thumb}')`),J=se(ne,1,"thumb-overlay s-17",null,J,Ne),me($e,e.title)},[()=>r()?G("end_screen_next_video"):G("end_screen_recommended_video"),()=>({withOpacity:r()})]),b(N,L)};R(I,N=>{e.isHide||N(C)})}b(t,w),F(),o()}je(["click"]);var u$=require("@vkontakte/videoplayer-core/es2015");var p$=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Vt(()=>{u$.clientChecker.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))}),mn(()=>{i==null||i(),clearTimeout(o)})};var f$=require("@vkontakte/videoplayer-core/es2015");var Ip=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}};var m$=require("@vkontakte/videoplayer-core/es2015"),v$=({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=()=>m$.clientChecker.device.isIOS&&ge(l)===f$.VideoFormat.DASH_LIVE_CMAF,p=()=>{s==null||s(),s=null},v=$=>{if(p(),!f()||!$)return;let y=u();if(!y)return;let g=new Ip(y),w=ge(d),I=ge(a),C=ge(r);for(let E of w)I.some(q=>q.value===E.id)&&g.attach(E,C.value===E.id);let N=d.subscribe(E=>{for(let P of E)g.updateSrc(P)}),L=()=>{let E=g.getCurrentShowingId();o(ge(a).find(P=>P.value===E))};y.textTracks.addEventListener("change",L),s=()=>{N(),g.detachAll(),y.textTracks.removeEventListener("change",L)}};Vt(()=>i.subscribe(v)),mn(p)};var ZC=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},JC=M("<!> <!>",1),eT=M("<div><!></div>"),tT=M('<div class="spherical-video-icon s-9"><!></div>'),iT=M("<div><!></div>"),oT=M('<div class="settings-mobile s-9"><!></div>'),nT=M("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),rT=M('<div class="player-wrapper s-9" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),sT={hash:"s-9",code:".player-wrapper.s-9{height:100%;position:absolute;width:100%}.player-wrapper.s-9 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.spherical-video-icon.s-9{display:inline-block;left:calc(50% - 38px);position:absolute;top:calc(50% - 23px)}.ads-container.s-9{background:var(--black);height:100%;left:0;position:absolute;top:0;width:100%;z-index:var(--ads-container-z-index)}.settings-mobile.s-9{align-items:center;display:flex;left:50%;max-width:320px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);width:90%;z-index:var(--settings-menu-z-index)}"};function rg(t,e){var Hn,dn;B(e,!0),Q(t,sT);let[i,o]=Re(),r=()=>x(Ve,"$playerPhase",i),a=()=>x($i,"$isLoaderVisible",i),l=()=>x(Se,"$adPlaybackState",i),d=()=>x(ii,"$crashed",i),s=()=>x(rs,"$notificationsToShow$",i),u=()=>x(Y,"$playbackState$",i),f=()=>x(At,"$graphIsOpened$",i),p=()=>x(We,"$interactiveHideMobileControls",i),v=()=>x(Xi,"$isEnded$",i),$=()=>x(pt,"$isInteractiveExpectation$",i),y=()=>x(mt,"$controlsVisible",i),g=()=>x(rt,"$touched",i),w=()=>x(Wi,"$autoplayNextEnabled$",i),I=()=>x(hi,"$postrollPassed",i),C=()=>x(Br,"$bottomNoSmooth",i),N=()=>x(yi,"$videoSize",i),L=()=>x(Ct,"$playerSize",i),E=()=>x(st,"$isFullscreen",i),P=()=>x(le,"$position$",i),q=()=>x(he,"$duration$",i),H=()=>x(rn,"$loadedMetadata",i),z=()=>x(Ye,"$settingsMenuVisible",i),j=()=>x(zt,"$scrubbingInProgress",i),ae=()=>x(Wt,"$volumeChangingInProgress",i),X=()=>x(Nt,"$chromecastConnected$",i),ne=()=>x(ue,"$isControlsAvailable",i),J=()=>x(li,"$isInteractiveTime$",i),we=()=>x(wi,"$isActiveLive",i),pe=()=>x(ut,"$settingsMenuOpenedByKeyboard",i),re=()=>x(Ut,"$language$",i),_e=()=>x(Xt,"$disabledControls$",i),$e=()=>x(Kt,"$is3DVideo",i),ee=()=>x(W,"$icon3DVideoVisible",i),Ne=()=>x(fi,"$chromecastDeviceName$",i),fe=()=>x(To,"$currentSubtitle$",i),k=()=>x(Bo,"$currentSubtitleCaptions$",i),Ke=()=>x(Fo,"$realDuration$",i),Te=()=>x(bt,"$isLive$",i),Z=()=>x(ei,"$isPlaying$",i),ie=()=>x(ri,"$debugPanelVisible",i),De=h(e,"videoContainer",15),Be=h(e,"adsSlotId",3,void 0),ot=h(e,"adsParams",3,void 0),U=h(e,"adsAutoplayParam",3,void 0),Ae=h(e,"duration",3,void 0),ke=h(e,"logoTargetUrl",3,""),ze=h(e,"showNextPrevButtons",3,!1),it=h(e,"nextButtonActive",3,!1),ye=h(e,"prevButtonActive",3,!1),Ie=h(e,"endScreenVideoTitle",3,void 0),Fe=h(e,"endScreenVideoThumb",3,void 0),Dt=h(e,"isOneVideoPlaylist",3,!1),vt=h(e,"showMiniTimer",3,!1),Ht=h(e,"fullScreenTarget",3,void 0),ct=h(e,"playerStarted",3,!1),St=h(e,"showEndScreen",3,!0),{notifications$:ni,graphIsOpened$:At}=Co(),Bt=e.store.getLogger().createComponentLog("Root component"),Ut=e.store.interfaceLanguage$,Y=e.store.state.playbackState$,Se=e.store.ads.playbackState,le=e.store.state.positionWithScrubbing$,he=e.store.state.duration$,Ve=e.store.playerPhase,st=e.store.ui.isFullscreen,mt=e.store.ui.controlsVisible,ue=e.store.ui.isControlsAvailable,We=e.store.ui.interactiveHideMobileControls,Ye=e.store.ui.settingsMenu.visible$,ut=e.store.ui.settingsMenu.openedByBtnKeyboard$,zt=e.store.ui.scrubbingInProgress,Wt=e.store.ui.volumeChangingInProgress,ri=e.store.ui.debugPanelVisible,$i=e.store.state.isLoaderVisible,Xi=e.store.state.isEnded$,Nt=e.store.state.chromecastConnected$,fi=e.store.state.chromecastDeviceName$,hi=e.store.ads.postrollPassed,bt=e.store.state.isLive$,ei=e.store.state.isPlaying$,wi=e.store.state.isActiveLive$,Zi=e.store.state.isRewindableLive$,ii=e.store.state.crashed$,Et=e.store.webApi.annotationsApi,qe=e.store.webApi.pictureInPictureApi,yi=e.store.state.videoSize$,To=e.store.state.currentSubtitle$,Bo=e.store.state.currentSubtitleCaptions$,Fo=e.store.state.duration$,Ct=e.store.ui.playerSize,Kt=e.store.ui.is3DVideo,W=e.store.ui.icon3DVideoVisible,Lt=e.store.state.isInteractive,li=e.store.state.isInteractiveTime$,pt=e.store.state.isInteractiveExpectation$,Tt=e.store.state.hasInteractiveBranches,Xt=e.store.ui.controls.disabledControls$,rt=e.store.ui.touched,zi=e.store.ui.overlayContainer$,Wi=e.store.ui.autoplayNextEnabled$,rn=e.store.state.loadedMetadata$,Ho=e.store.actions.internal.closeSettingsMenu,lo=(Hn=e.store.callbacks)==null?void 0:Hn.onDisabledPlayPrevChapterClick,Ri=(dn=e.store.callbacks)==null?void 0:dn.onDisabledSeekToInteractiveClick,Dr=e.store.actions.internal.setQuality,bo=K(void 0),$o=K(void 0),Li=K(void 0),sn=K(void 0),Uo,On,xr=m(()=>(r()==="video"&&a()||r()==="ads"&&l()==="inactive")&&!d()),wr=K(void 0),{closeNotification:ys,notificationsToShow$:rs}=ni,ss=m(()=>!!s().slow_video),tr=()=>ys("slow_video"),Br=de(!1),an,Dn=K(!1),Sr=m(()=>u()!==fa.PlaybackState.PLAYING),zo=K(!1),ir=m(()=>f()||p()||!n(Dn)&&(v()&&!!Tt||n(Sr)&&$())),or=K(!0),Fr=m(()=>e.uiConfig.features.thumbTimer&&vt()&&r()==="video"&&!y()&&!d()&&!Lt&&(e.uiConfig.hideThumbTimerAfterTouch&&!g()||!e.uiConfig.hideThumbTimerAfterTouch)),nr=K(!1),co=m(()=>(St()||e.showAutoplayNext&&w())&&!!Ie()&&!!Fe()&&(e.showAds&&I()||!e.showAds)&&v()&&!d()&&!n(nr)),Hr=K(!1);qe==null||qe.setContext(Id());let rr=xt=>{xt&&!Lt&&yo(e.uiConfig.controls.hideTimeoutMobile)};e.store.setUiCallbacks({onStarted:rr});let hn=()=>{clearTimeout(Uo),O(Dn,!1),p()&&We.set(!1)},yo=xt=>{hn(),O(Dn,!0),Uo=setTimeout(()=>O(Dn,!1),xt);let Pt=xt-100;an=setTimeout(()=>{C()&&Br.set(!1)},Pt>0?Pt:xt)},Cr=Kt.subscribe(xt=>{W.set(xt),xt&&(clearTimeout(On),On=setTimeout(()=>W.set(!1),e.uiConfig.controls.hide360IconTimeout))}),sr=(...Pt)=>ht(null,[...Pt],function*(xt=na()){var uo,Io,Eo,po,Oi,Un;if(xt&&!fa.clientChecker.device.isIOS){let Ji=ic(),Wr=Wo(),Mi=fa.clientChecker.browser.isSamsungBrowser&&Ji===e.shadowRootContainer;xt=Ji===Wr||Mi}if(xt){yo(e.uiConfig.controls.hideTimeoutFullscreen);try{yield qe==null?void 0:qe.exit()}catch(Ji){Bt({message:String(Ji)})}try{let Ji=(uo=N())!=null&&uo.width&&((Io=N())!=null&&Io.height)?N():L();yield ob(Ji)}catch(Ji){Bt({message:String(Ji)})}}st.set(xt),e.store.getAdmanWrapper().setFullscreen(xt),E()?(po=(Eo=e.store.callbacks)==null?void 0:Eo.onFullscreenEnter)==null||po.call(Eo):(Un=(Oi=e.store.callbacks)==null?void 0:Oi.onFullscreenExit)==null||Un.call(Oi)}),gt=xt=>{let Pt=xt,{width:uo,height:Io}=Pt.target;Ct.set({width:uo,height:Io})},di=()=>{let{width:xt,height:Pt}=n(bo).getBoundingClientRect();Ct.set({width:xt,height:Pt})};Vt(()=>{var xt;return Ju(sr),e.uiConfig.features.annotationsInside&&(Et==null||Et.init(n(bo))),Wa(qe)&&(qe==null||qe.assignPlayerContainer(n(bo)),qe==null||qe.setExternalEventHandlers({resize:gt,leavepictureinpicture:di})),O(or,!fa.clientChecker.device.isIphoneOrOldIpad),e.interactiveContainer&&((xt=De().parentElement)==null||xt.insertBefore(e.interactiveContainer,De().nextSibling)),()=>{clearTimeout(Uo),clearTimeout(an),clearTimeout(On),Cr(),qe==null||qe.dispose().catch(Pt=>{Bt({message:String(Pt)})}),ep(sr)}});let Ur=K(!0),ar=K(!0),zr=xt=>{let Pt=P()+(xt==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Pt<0?(O(Ur,!1),Pt=0):Pt>=q()&&(O(ar,!1),Pt=q()),O(zo,!0),e.seekTime(Pt)},Wo=()=>fa.clientChecker.device.isIOS?n(bo):!e.uiConfig.allowChangingFullscreenTarget||!Ht()?e.outerContainerRef:Ht().contains(e.outerContainerRef)?Ht():e.outerContainerRef,Bn=()=>ht(null,null,function*(){try{if(na())yield Zu(document),Bt({message:"exit fullscreen"});else{if(Bt({message:"request fullscreen"}),fa.clientChecker.device.isIOS&&!H())return;yield Xu(Wo())}}catch(xt){Bt({message:String(xt)})}}),_n=()=>{Ho()},ln=xt=>{if(xt.preventDefault(),z()){_n();return}if(!ct()){e.firstStart(),yo(e.uiConfig.controls.hideTimeoutCursor);return}O(zo,!1),y()?hn():yo(e.uiConfig.controls.hideTimeoutMobile)},bn=()=>{rt.set(!0)},Tr=()=>{Lt||(Br.set(!0),yo(e.uiConfig.controls.hideTimeoutCursor))},Ko=xt=>{lo&&(lo(xt),yo(e.uiConfig.controls.hideTimeoutMobile))},qo=xt=>{Ri&&(Ri(xt),yo(e.uiConfig.controls.hideTimeoutMobile))};Oe(()=>{zi.set(n(wr))}),Oe(()=>{mt.set((n(Sr)||z()||j()||ae()||X()||!n(co)&&(v()||n(Dn)&&!n(zo)))&&!n(ir)&&r()==="video"&&!d()&&ne())}),Oe(()=>{!j()&&n(Hr)&&!J()&&yo(e.uiConfig.controls.hideTimeoutMobile),O(Hr,j(),!0)}),Oe(()=>{O(Ur,P()>0),O(ar,!we()&&P()<q(),!0)}),Oe(()=>{dc(n(sn),z(),pe(),!0)});let $n=G("aria_label_video_player");p$({fullScreenChangeHandler:sr,getFullscreenTarget:Wo}),v$({store:e.store,getFullscreenTarget:Wo});let Ir=(xt,Pt)=>{var po,Oi;let uo=(Oi=(po=e.store.callbacks)==null?void 0:po.uiInfo)==null?void 0:Oi.onUpcomingLiveViewStateChanged;if(!uo)return;let Io=!!Pt,Eo=Ee(Ee({},Jn(n(bo),{upcomingLiveScreen:Pt},"upcomingLiveScreen",Io)),xt);uo(Eo)};var Si=rT();dt("blur",ka,_n);var yn=T(Si);cl(yn,{onClick:ln,get videoContainer(){return De()},set videoContainer(xt){De(xt)}});var Fn=A(yn,2);Na(Fn,()=>"slot",!1,(xt,Pt)=>{no(xt,()=>({name:dl}))});var lr=A(Fn,2);As(lr,re,xt=>{var Pt=nT(),uo=ce(Pt);let Io=m(()=>r()!=="thumb"||d()||Lt&&e.autoplay||e.uiConfig.features.disableThumbUnstartedOnAutoplay&&e.autoplay);sl(uo,{get hidden(){return n(Io)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var Eo=A(uo,2);{var po=et=>{var Zt=JC(),Ei=ce(Zt);{var wo=Lo=>{let pr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);Tp(Lo,{side:"left",get seekStep(){return n(pr)},handleSingleFirstClick:ln,handleSecondClick:()=>zr("backward")})};R(Ei,Lo=>{n(Ur)&&Lo(wo)})}var Yo=A(Ei,2);{var Kr=Lo=>{let pr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);Tp(Lo,{side:"right",get seekStep(){return n(pr)},handleSingleFirstClick:ln,handleSecondClick:()=>zr("forward")})};R(Yo,Lo=>{n(ar)&&Lo(Kr)})}b(et,Zt)};R(Eo,et=>{e.canRewindLive&&Zi&&!_e().has("TIMELINE")&&et(po)})}var Oi=A(Eo,2);{var Un=et=>{let Zt=m(()=>{var Ei;return(Ei=e.live)==null?void 0:Ei.startTime});Nc(et,{get thumbUrl(){return e.thumbUrl},get startTime(){return n(Zt)},onUpcomingLiveViewStateChanged:Ir})};R(Oi,et=>{r()==="LiveWaitingStart"&&et(Un)})}var Ji=A(Oi,2);{var Wr=et=>{al(et,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Ji,et=>{r()==="LiveWaitingRecover"&&et(Wr)})}var Mi=A(Ji,2);{var xs=et=>{al(et,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Mi,et=>{r()==="LiveWaitingRecord"&&et(xs)})}var as=A(Mi,2);{var ls=et=>{var Zt=eT();let Ei;var wo=T(Zt);nc(wo,{get adsSlotId(){return Be()},get adsParams(){return ot()},get adsAutoplayParam(){return U()},get duration(){return Ae()},get adsExternalApi(){return e.adsExternalApi}}),S(Zt),D(Yo=>Ei=se(Zt,1,"ads-container s-9",null,Ei,Yo),[()=>({hidden:r()!=="ads"})]),b(et,Zt)};R(as,et=>{e.showAds&&ct()&&et(ls)})}var Pr=A(as,2);{var cn=et=>{let Zt=m(()=>!St()&&e.showAutoplayNext&&w());ng(et,{get title(){return Ie()},get thumb(){return Fe()},get isHide(){return n(Zt)},clickCloseIcon:()=>O(nr,!0)})};R(Pr,et=>{n(co)&&Ie()&&Fe()&&et(cn)})}var dr=A(Pr,2);{var Po=et=>{Vc(et,{})};R(dr,et=>{$e()&&et(Po)})}var ko=A(dr,2);{var cr=et=>{var Zt=tT(),Ei=T(Zt);tc(Ei,{}),S(Zt),b(et,Zt)};R(ko,et=>{ee()&&et(cr)})}var Ue=A(ko,2);{var Mt=et=>{Rc(et,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ne()},onClick:ln})};R(Ue,et=>{X()&&et(Mt)})}var Ci=A(Ue,2);{var Qo=et=>{nl(et,{get shifted(){return y()},get captions(){return k()},get position(){return P()},get playerSize(){return L()},isMobile:!0})};R(Ci,et=>{fe().value!=="off"&&et(Qo)})}var fo=A(Ci,2);{var Ao=et=>{var Zt=iT();Zt.__click=[ZC,z,Ye,_n];var Ei=T(Zt);rl(Ei,{}),S(Zt),b(et,Zt)};R(fo,et=>{d()&&et(Ao)})}var mo=A(fo,2);{var Go=et=>{let Zt=m(()=>r()==="thumb"||r()==="LiveWaitingStart"||r()==="LiveWaitingRecover"||r()==="LiveWaitingRecord"||r()==="ads"),Ei=m(()=>r()==="ads"),wo=m(()=>e.canRewindLive&&Ke()!==0);Lc(et,{get bottomHidden(){return n(Zt)},get showControls(){return y()},get bottomNoSmooth(){return C()},get isAds(){return n(Ei)},get canRewindLive(){return n(wo)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return ke()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return ze()},get nextButtonActive(){return it()},get prevButtonActive(){return ye()},get isOneVideoPlaylist(){return Dt()},get customFullscreenSupported(){return n(or)},get endScreenShown(){return n(co)},toggleFullscreen:Bn,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Ko,onDisabledSeekToInteractiveClick:qo,get playerControlsWrapperRef(){return n($o)},set playerControlsWrapperRef(Yo){O($o,Yo,!0)},get playerControlsRef(){return n(Li)},set playerControlsRef(Yo){O(Li,Yo,!0)}})};R(mo,et=>{ct()&&et(Go)})}var zn=A(mo,2);{var un=et=>{var Zt=oT(),Ei=T(Zt);Fc(Ei,{get supportLink(){return e.supportLink},get returnFocus(){return g$.noop},get ref(){return n(sn)},set ref(wo){O(sn,wo,!0)}}),S(Zt),b(et,Zt)};R(zn,et=>{z()&&et(un)})}var xo=A(zn,2);let eo=m(()=>!n(Fr));ac(xo,{get isLive(){return Te()},get isHidden(){return n(eo)},get isPlaying(){return Z()},get position(){return P()},get duration(){return q()}});var Wn=A(xo,2);{var Kn=et=>{Ga(et,{})};R(Wn,et=>{n(xr)&&et(Kn)})}var qn=A(Wn,2);{var kr=et=>{uc(et,{})};R(qn,et=>{ie()&&et(kr)})}var ur=A(qn,2);{var ws=et=>{Hc(et,{onClose:tr,onSelectAutoQuality:()=>{Dr("auto"),tr()}})};R(ur,et=>{n(ss)&&et(ws)})}b(xt,Pt)});var Er=A(lr,2);Ze(Er,xt=>O(wr,xt),()=>n(wr)),S(Si),Ze(Si,xt=>O(bo,xt),()=>n(bo)),D(()=>Me(Si,"aria-label",$n)),dt("click",Si,bn,!0),dt("focusin",Si,Tr,!0),b(t,Si),F(),o()}je(["click"]);function Ep(t){let e="";return ao(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),ao(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),ao(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),ao(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),ao(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),ao(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),ao(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),ao(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),ao(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),ao(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),ao(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),ao(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),ao(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),ao(t.focusedOutlineWidth)&&(e+=`--focused-outline-width:${t.focusedOutlineWidth};`),ao(t.focusedOutlineRadius)&&(e+=`--focused-outline-radius:${t.focusedOutlineRadius};`),ao(t.controlsDesktopPaddingHorizontal)&&(e+=`--controls-desktop-padding-horizontal:${t.controlsDesktopPaddingHorizontal};`),ao(t.timelinePaddingHorizontal)&&(e+=`--timeline-padding-horizontal:${t.timelinePaddingHorizontal};`),ao(t.settingsBackgroundColor)&&(e+=`--settings-bg:${t.settingsBackgroundColor};`),ao(t.font)&&(e+=`--font:${t.font};`),ao(t.controlsGradientHeight)&&(e+=`--controls-gradient-height:${t.controlsGradientHeight};`),ao(t.controlsGradient)&&(e+=`--controls-gradient:${t.controlsGradient};`),e.length&&e||void 0}function ao(t){return typeof t=="string"&&!t.includes(";")}var h$=require("@vkontakte/videoplayer-shared/es2015");var aT=M('<div class="time-container s-8"><!></div>'),lT=M('<div class="player-wrapper s-8" role="region"><!> <!> <!> <!> <!> <div><!></div></div>'),dT={hash:"s-8",code:".player-wrapper.s-8{height:100%;position:absolute;width:100%}.player-wrapper.s-8 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}.timeline.s-8{bottom:0;left:0;opacity:0;opacity:1;position:absolute;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);width:100%;z-index:var(--controls-container-z-index)}.visible.s-8{opacity:1}.time-container.s-8{bottom:8px;position:absolute;right:8px;z-index:var(--thumb-timer-z-index)}"};function sg(t,e){B(e,!0),Q(t,dT);let[i,o]=Re(),r=()=>x(J,"$scrubbingInProgress",i),a=()=>x(X,"$playerSize",i),l=()=>x(P,"$isPlaying$",i),d=()=>x(L,"$duration$",i),s=()=>x(z,"$positionWithScrubbing$",i),u=()=>x(C,"$playerPhase",i),f=()=>x(N,"$crashed$",i),p=()=>x(q,"$currentSubtitle$",i),v=()=>x(H,"$currentSubtitleCaptions$",i),$=()=>x(E,"$positionExact$",i),y=()=>x(j,"$isLive$",i),g=()=>x(ae,"$isRewindableLive$",i),w=h(e,"outsideDuration",3,0),I=h(e,"videoContainer",15),{playerPhase:C,state:{crashed$:N,duration$:L,positionExact$:E,isPlaying$:P,currentSubtitle$:q,currentSubtitleCaptions$:H,positionWithScrubbing$:z,isLive$:j,isRewindableLive$:ae},ui:{playerSize:X,controls:ne,scrubbingInProgress:J},actions:{internal:{getVideoElement:we}}}=ve(),pe=8,re=K(!1),_e=ci({}),$e=K(!1),ee=m(()=>!r()&&!n($e)),Ne=()=>{O(re,!0)},fe=()=>{O(re,!1)},k=(0,h$.debounceFn)(od,260);Oe(()=>{a(),k(we(),ne,_e,n(re))});let Ke=m(()=>l()?nn(d()-s()):nn(isFinite(d())?d():w()));var Te=lT(),Z=T(Te);cl(Z,{hideCursor:!1,get videoContainer(){return I()},set videoContainer(Ie){I(Ie)}});var ie=A(Z,2);Na(ie,()=>"slot",!1,(Ie,Fe)=>{no(Ie,()=>({name:dl}))});var De=A(ie,2);let Be=m(()=>u()!=="thumb"||f());sl(De,{get hidden(){return n(Be)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var ot=A(De,2);{var U=Ie=>{nl(Ie,{shifted:!1,get captions(){return v()},get position(){return $()},get playerSize(){return a()}})};R(ot,Ie=>{p().value!=="off"&&n(ee)&&Ie(U)})}var Ae=A(ot,2);{var ke=Ie=>{var Fe=aT(),Dt=T(Fe);sc(Dt,{get isLive(){return y()},get isPlaying(){return l()},get time(){return n(Ke)}}),S(Fe),b(Ie,Fe)};R(Ae,Ie=>{n(ee)&&Ie(ke)})}var ze=A(Ae,2);let it;var ye=T(ze);tl(ye,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return g()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:pe,tooltipRightOffset:pe,get ref(){return _e.timeline},set ref(Ie){_e.timeline=Ie}}),S(ze),S(Te),D(Ie=>it=se(ze,1,"timeline s-8",null,it,Ie),[()=>({visible:n(re)})]),dt("mouseenter",Te,Ne),dt("mouseleave",Te,fe),dt("mouseenter",ze,()=>O($e,!0)),dt("mouseleave",ze,()=>O($e,!1)),b(t,Te),F(),o()}var cT=M("<div><!></div>"),uT={hash:"s-2",code:'.vk-vp-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);background:var(--black);color:var(--white);font-family:var(--vk-vp-custom-font,var(--font));font-size:12px;height:100%;line-height:normal;outline:0;overflow:hidden;position:relative;user-select:none;width:100%}.vk-vp-root.visible-outside.s-2{overflow:visible}.vk-vp-root.s-2 *{-webkit-tap-highlight-color:transparent}.vk-vp-root.s-2 button{background:transparent;border:none;color:inherit;font:inherit;line-height:normal;margin:0;overflow:visible;padding:0;width:auto;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer}.vk-vp-root.s-2 p{margin:0}.vk-vp-root.s-2 svg:not(.interactive-root svg){pointer-events:none}.vk-vp-root.s-2 .interactive-root{font-family:var(--vk-vp-int-custom-font,inherit)}.vk-vp-root.s-2 :focus,.vk-vp-root.s-2 :focus-visible{outline:none}.vk-vp-root.s-2 :focus-visible{border-radius:var(--focused-outline-radius);box-shadow:var(--focused-element-shadow)}.vk-vp-root.s-2 .focus-hidden:focus-visible{box-shadow:none}.vk-vp-root.s-2 .hidden{opacity:0;visibility:hidden}.vk-vp-root.s-2 .out-of-flow{content-visibility:hidden!important}.vk-vp-root.s-2 .overlay-container{height:100%;left:0;pointer-events:none;position:fixed;top:0;width:100%;z-index:var(--overlay-container-z-index)}.vk-vp-root.s-2 .out-of-view{left:-1000vh!important;position:absolute!important}.vk-vp-root.s-2 .icon.icon-error-stub{align-items:center;display:flex;justify-content:center}'};function ag(t,e){B(e,!0),Q(t,uT);let[i,o]=Re(),r=()=>x(ct,"$isLive$",i),a=()=>x(Et,"$availableSubtitlesList$",i),l=()=>x(qe,"$isPreviewTrackHorizontallyAligned$",i),d=h(e,"sources",7),s=h(e,"store",7),u=h(e,"microStoresRoot",7),f=h(e,"videoConfig",7),p=h(e,"uiConfig",7),v=h(e,"title",7),$=h(e,"thumbUrl",7),y=h(e,"interactiveContainer",7),g=h(e,"interactiveController",7),w=h(e,"subtitles",7),I=h(e,"subtitlesForcedLanguage",7),C=h(e,"live",7),N=h(e,"preload",7),L=h(e,"autoplay",7),E=h(e,"volume",7,void 0),P=h(e,"muted",7,void 0),q=h(e,"fromTime",7),H=h(e,"canRewindLive",7),z=h(e,"showAds",7),j=h(e,"adsSlotId",7,void 0),ae=h(e,"adsParams",7,void 0),X=h(e,"adsAutoplayParam",7,void 0),ne=h(e,"duration",7,void 0),J=h(e,"logoClickable",7),we=h(e,"logoHidden",7),pe=h(e,"isMobile",7),re=h(e,"showNextPrevButtons",7,!1),_e=h(e,"nextButtonActive",7,!1),$e=h(e,"prevButtonActive",7,!1),ee=h(e,"endScreenVideoTitle",7,void 0),Ne=h(e,"endScreenVideoThumb",7,void 0),fe=h(e,"isOneVideoPlaylist",7,!1),k=h(e,"supportLink",7),Ke=h(e,"shadowRootContainer",7),Te=h(e,"outerContainerRef",7),Z=h(e,"fullScreenTarget",7,void 0),ie=h(e,"failoverHosts",7,void 0),De=h(e,"showMiniTimer",7,!1),Be=h(e,"saveRate",7),ot=h(e,"seekToInteractive",7,ul.noop),U=h(e,"playPrevChapter",7,ul.noop),Ae=h(e,"volumeMultiplier",7),ke=h(e,"showAutoplayNext",7),ze=h(e,"showEndScreen",7,!0),it=h(e,"keyboardControls",15,void 0),{subscribers:ye,stores:Ie}=u();u_(p());let Fe=Rt(),Dt=p().logoLink,vt=s().ui.debugPanelVisible,Ht=s().ui.playerSize,ct=s().state.isLive$,ni=s().state.isInteractive&&ld.clientChecker.device.isAndroid,At=K(void 0),Bt=null,Ut=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}),x_(s(),Ie),Oe(()=>{var W,Lt;s().ui.isMobile.set(pe()),(Lt=(W=f().callbacks)==null?void 0:W.onDomReady)==null||Lt.call(W)});let Y=(W=!1)=>{O(Ut,!0),W?s().actions.external.firstStart(z()):s().actions.internal.firstStart(z())},Se=()=>{if(Fe.features.qualityDetailsSubMenuEnabled){let W=K_(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{q_(s().videoId),Jf()&&s().actions.internal.setTrafficSavingEnabled(!0);let Lt=jf(s().videoId);Lt&&s().actions.internal.setQuality(Lt)}};function le(W){var Xt,rt,zi;let Lt=d()||W;Lt&&s().initVideo({container:n(At),sources:Lt,failoverHosts:ie(),subtitles:w(),subtitlesForcedLanguage:I(),volumeMultiplier:Ae()});let li=ul.safeStorage.get(Yd)==="true";vt.set(li),q()>0&&s().actions.external.seekTime(q());let pt=pe()?Fe.volumeDefault:(rt=(Xt=E())!=null?Xt:Uu())!=null?rt:Fe.volumeDefault,Tt=(zi=P())!=null?zi:B_();if(s().actions.external.setVolume(pt),s().actions.external.setMuted(Tt),s().getAdmanWrapper().setInitialVolume(Tt?0:pt),Se(),Fe.features.saveRate&&Be()){let Wi=U_();Wi&&!r()&&s().actions.internal.setPlaybackRate(Wi)}if(ke()){let Wi=W_();Wi&&s().actions.internal.setAutoplayNextEnabled(Wi)}s().ui.isAutoplay.set(L()),L()&&Y(),N()&&Fe.features.preload&&s().actions.internal.preload()}let he=W=>{if(window.ResizeObserver){let Lt,li;Bt=new ResizeObserver((0,ul.throttleFn)(pt=>{let Tt=pt[0];if(Tt.contentBoxSize){let Xt=Array.isArray(Tt.contentBoxSize)?Tt.contentBoxSize[0]:Tt.contentBoxSize;Lt=Xt.inlineSize,li=Xt.blockSize}else Tt.contentRect&&(Lt=Tt.contentRect.width,li=Tt.contentRect.height);Ht.set({width:Lt,height:li})},300)),Bt.observe(W)}W.clientWidth&&W.clientHeight&&Ht.set({width:W.clientWidth,height:W.clientHeight})},Ve=()=>{document.hidden&&s().actions.external.stop()};Vt(()=>{var li,pt,Tt,Xt;ni&&document.addEventListener("visibilitychange",Ve),Fe.debugLog&&s().actions.internal.startLogging(),he(n(At));let W=ye.map(rt=>rt.init({store:s(),microStores:Ie,config:f(),interactiveController:g(),uiConfig:p()})),Lt=()=>{ni&&document.removeEventListener("visibilitychange",Ve),Bt==null||Bt.disconnect(),W.forEach(rt=>rt.unsubscribe()),s().destroy()};return((li=C())==null?void 0:li.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),Lt):((pt=C())==null?void 0:pt.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),Lt):(((Tt=C())==null?void 0:Tt.status)==="finished"||((Xt=C())==null?void 0:Xt.status)==="postlive")&&!(d()&&(0,ld.areValidLiveRecordSources)(d()))?(s().actions.internal.setLiveWaitingRecord(!0),Lt):(le(),Lt)});function st(){n(Ut)?s().actions.external.play():Y(!0)}function mt(){s().actions.external.pause()}function ue(W){s().actions.external.setMuted(W)}function We(){s().actions.external.toggleSubtitle()}function Ye(W,Lt){s().actions.external.changeSubtitle(W,Lt)}function ut(W){s().actions.external.changeAudioStream(W)}function zt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.hideControls()}function Wt(){var W;(W=s().webApi.slotsApi)!=null&&W.haveSlots()&&s().actions.external.showControls()}function ri(W){pe()||W>=0&&W<=1&&s().actions.external.setVolume(W)}function $i(W){s().actions.internal.seekTime(W,_$.SeekAction.UNKNOWN)}function Xi(W){s().actions.external.seekEpisodeStartTime(W)}function Nt(){s().actions.external.returnFocusToEpisodes()}function fi(W){s().actions.external.setPlaybackRate(W)}function hi(W){s().actions.external.setAutoQualityLimits(W)}function bt(){s().actions.external.setQuality("auto")}function ei(W){s().actions.external.setTrafficSavingEnabled(W)}function wi(W){s().actions.external.setHighQualityEnabled(W)}let Zi=Ep(Fe.view),ii=f().playerView==="preview",Et=s().state.availableSubtitlesList$;if(Fe.features.initSubtitles){let W=!1;Oe(()=>{var Lt;if(!W&&a().length){W=!0;let li;if(Fe.features.userVideoPrefs&&s().videoId){let Tt=qu(Fe.userSalt,String(s().videoId));Tt!=null&&Tt.subtitleTrackId&&(li=a().find(Xt=>Xt.value===Tt.subtitleTrackId))}let pt=(Lt=I())!=null?Lt:tm();pt&&(li=a().find(Tt=>Tt.language===pt)),s().actions.internal.setSubtitle(li)}})}let qe=s().ui.isPreviewTrackHorizontallyAligned;var yi=cT();let To;var Bo=T(yi);{var Fo=W=>{rg(W,{get store(){return s()},get uiConfig(){return Fe},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return ee()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return fe()},get supportLink(){return k()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Ut)},get seekToInteractive(){return ot()},get playPrevChapter(){return U()},firstStart:Y,seekTime:$i,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get videoContainer(){return n(At)},set videoContainer(Lt){O(At,Lt,!0)}})},Ct=W=>{var Lt=Le(),li=ce(Lt);{var pt=Xt=>{sg(Xt,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return H()},get videoContainer(){return n(At)},set videoContainer(rt){O(At,rt,!0)}})},Tt=Xt=>{og(Xt,{get store(){return s()},get uiConfig(){return Fe},get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return y()},get live(){return C()},get autoplay(){return L()},get canRewindLive(){return H()},get showAds(){return z()},get adsSlotId(){return j()},get adsParams(){return ae()},get adsAutoplayParam(){return X()},get duration(){return ne()},get logoClickable(){return J()},get logoHidden(){return we()},get logoTargetUrl(){return Dt},get nextButtonActive(){return _e()},get prevButtonActive(){return $e()},get endScreenVideoTitle(){return ee()},get endScreenVideoThumb(){return Ne()},get isOneVideoPlaylist(){return fe()},get supportLink(){return k()},get shadowRootContainer(){return Ke()},get outerContainerRef(){return Te()},get fullScreenTarget(){return Z()},get showMiniTimer(){return De()},get playerStarted(){return n(Ut)},get seekToInteractive(){return ot()},get playPrevChapter(){return U()},firstStart:Y,get showEndScreen(){return ze()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return re()},get adsExternalApi(){return e.adsExternalApi},get getVideoDeeplink(){return e.getVideoDeeplink},get videoContainer(){return n(At)},set videoContainer(rt){O(At,rt,!0)},get keyboardControls(){return it()},set keyboardControls(rt){it(rt)}})};R(li,Xt=>{ii?Xt(pt):Xt(Tt,!1)})}b(W,Lt)};R(Bo,W=>{pe()?W(Fo):W(Ct,!1)})}S(yi),D(W=>{To=se(yi,1,"vk-vp-root s-2",null,To,W),Qe(yi,Zi)},[()=>({"root--miui-browser":ld.clientChecker.device.isMobile&&ld.clientChecker.browser.isMiuiBrowser,"visible-outside":ii,"preview-track-horizontally-alinged":l()})]),b(t,yi);var Kt=F({initVideo:le,play:st,pause:mt,setMuted:ue,toggleSubtitle:We,changeSubtitle:Ye,changeAudioStream:ut,hideControls:zt,showControls:Wt,setVolume:ri,seekTime:$i,seekEpisodeStartTime:Xi,returnFocusToEpisodes:Nt,setPlaybackRate:fi,setAutoQualityLimits:hi,setAutoQuality:bt,toggleTrafficSaving:ei,toggleHighQuality:wi,get sources(){return d()},set sources(W){d(W)},get store(){return s()},set store(W){s(W)},get microStoresRoot(){return u()},set microStoresRoot(W){u(W)},get videoConfig(){return f()},set videoConfig(W){f(W)},get uiConfig(){return p()},set uiConfig(W){p(W)},get title(){return v()},set title(W){v(W)},get thumbUrl(){return $()},set thumbUrl(W){$(W)},get interactiveContainer(){return y()},set interactiveContainer(W){y(W)},get interactiveController(){return g()},set interactiveController(W){g(W)},get subtitles(){return w()},set subtitles(W){w(W)},get subtitlesForcedLanguage(){return I()},set subtitlesForcedLanguage(W){I(W)},get live(){return C()},set live(W){C(W)},get preload(){return N()},set preload(W){N(W)},get autoplay(){return L()},set autoplay(W){L(W)},get volume(){return E()},set volume(W){E(W)},get muted(){return P()},set muted(W){P(W)},get fromTime(){return q()},set fromTime(W){q(W)},get canRewindLive(){return H()},set canRewindLive(W){H(W)},get showAds(){return z()},set showAds(W){z(W)},get adsSlotId(){return j()},set adsSlotId(W){j(W)},get adsParams(){return ae()},set adsParams(W){ae(W)},get adsAutoplayParam(){return X()},set adsAutoplayParam(W){X(W)},get duration(){return ne()},set duration(W){ne(W)},get logoClickable(){return 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 Ne()},set endScreenVideoThumb(W){Ne(W)},get isOneVideoPlaylist(){return fe()},set isOneVideoPlaylist(W){fe(W)},get supportLink(){return k()},set supportLink(W){k(W)},get shadowRootContainer(){return Ke()},set shadowRootContainer(W){Ke(W)},get outerContainerRef(){return Te()},set outerContainerRef(W){Te(W)},get fullScreenTarget(){return Z()},set fullScreenTarget(W){Z(W)},get failoverHosts(){return ie()},set failoverHosts(W){ie(W)},get showMiniTimer(){return De()},set showMiniTimer(W){De(W)},get saveRate(){return Be()},set saveRate(W){Be(W)},get showAutoplayNext(){return ke()},set showAutoplayNext(W){ke(W)},get seekToInteractive(){return ot()},set seekToInteractive(W){ot(W)},get playPrevChapter(){return U()},set playPrevChapter(W){U(W)},get volumeMultiplier(){return Ae()},set volumeMultiplier(W){Ae(W)},get showEndScreen(){return ze()},set showEndScreen(W){ze(W)},get keyboardControls(){return it()},set keyboardControls(W){it(W)}});return o(),Kt}var pT=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 lg(t,e){let i=h(e,"isWhite",3,!1),o=m(()=>i()?"#fff":"#909499");Je(t,{width:"57",height:"60",get fill(){return n(o)},testId:"stub-icon",children:(r,a)=>{var l=pT();ui(9),b(r,l)},$$slots:{default:!0}})}var fT=M('<div class="title s-0"> </div>'),mT=M('<div class="playerStub s-0"><!> <!></div>'),vT={hash:"s-0",code:".playerStub.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-0{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function dg(t,e){Q(t,vT);var i=mT(),o=T(i);{var r=d=>{var s=fT(),u=T(s,!0);S(s),D(()=>me(u,e.title)),b(d,s)};R(o,d=>{e.title&&d(r)})}var a=A(o,2);{var l=d=>{let s=m(()=>!!e.thumbUrl);lg(d,{get isWhite(){return n(s)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(l)})}S(i),D(()=>Qe(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}var gT=M('<div class="playerError s-1"><!></div>'),hT={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 cg(t){Q(t,hT);var e=gT(),i=T(e);rl(i,{}),S(e),b(t,e)}var Hp=require("@vkontakte/videoplayer-shared/es2015"),Ui=require("@vkontakte/videoplayer-shared/es2015"),Jc=require("@vkontakte/videoplayer-core/es2015"),md=require("@vkontakte/videoplayer-statistics/es2015");var kp=require("@vkontakte/videoplayer-shared/es2015"),Pp=class{constructor(){this.subscription=new kp.Subscription,this.logger=new kp.Logger,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()}};var cd=require("@vkontakte/videoplayer-shared/es2015");var _T=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),bT=M('<div><div><!></div> <span class="title s-6"> </span></div>'),$T={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 ug(t,e){B(e,!0),Q(t,$T);let[i,o]=Re(),r=()=>x(u,"$interfaceLanguage$",i),a=()=>x(f,"$isMobile$",i),l=ve(),d=Rt(),s=!!l.webApi.pictureInPictureApi,u=l.interfaceLanguage$,f=l.ui.isMobile,p=l.ui.t,v=m(()=>r()&&p("pip_dummy_title")),$=Ep(d.view);var y=bT();let g;var w=T(y);let I;var C=T(w);Je(C,{width:"57",height:"56",testId:"pip-dummy-icon",children:(E,P)=>{var q=_T();ui(),b(E,q)},$$slots:{default:!0}}),S(w);var N=A(w,2),L=T(N,!0);S(N),S(y),D((E,P)=>{g=se(y,1,"player-pip-dummy s-6",null,g,E),Qe(y,$),I=se(w,1,"dummy-image s-6",null,I,P),me(L,n(v))},[()=>({"is-pip-api":s}),()=>({desktop:!a()})]),b(t,y),F(),o()}var yT=Object.defineProperty,xT=(t,e,i)=>e in t?yT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,dd=(t,e,i)=>xT(t,typeof e!="symbol"?e+"":e,i),pg=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),wT=460,ST=280,Wc=class{constructor({enabled:e=!0}={enabled:!0}){dd(this,"playerDomElement"),dd(this,"playerParentShadowRoot"),dd(this,"playerDummyElement"),dd(this,"svelteContext"),dd(this,"pipWindow"),dd(this,"info",{isActive$:new cd.ValueSubject(!1),isEnabled$:new cd.ValueSubject(!1),type:1}),this.info.isEnabled$=new cd.ValueSubject(e)}isSupported(){let{isEmbed:e}=(0,cd.detectEmbed)();return"documentPictureInPicture"in window&&!e}isActive(){return this.info.isActive$.getValue()}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return pg(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:wT,height:ST,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
63
+ `),r=document.createElement("style");r.textContent=o;let a=this.createStretchedContainer(),l=a.attachShadow({mode:"open"});l.append(r),l.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Xr(ug,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||(Ra(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1),this.pipWindow=void 0)})})}exit(){return pg(this,null,function*(){return new Promise(e=>{var i;this.pipWindow&&((i=documentPictureInPicture.window)==null||i.close()),e()})})}dispose(){return pg(this,null,function*(){yield this.exit()})}setEnabled(e){this.info.isEnabled$.next(e)}createStretchedContainer(){let e=document.createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e}};function b$(t){return t instanceof Wc}var Ap=class{static getLatestSupportedVersion(e){let i=new za(e),o=new Wc(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Kc(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 $$="Inner error. Unexpectedly root annotation container null reference exception",y$="Annotation with such name already exists",x$="Annotation with such name does not exist";var ud=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};var pd=require("@vkontakte/videoplayer-shared/es2015"),CT="1",TT=100,Lp=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new pd.Subscription}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=(0,pd.throttleFn)(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},TT);this.subscriptions.add((0,pd.observeElementSize)(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 ud($$);if(this.annotations.has(e))throw new ud(y$);i.style.zIndex=(o=i.style.zIndex)!=null?o:CT,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 ud(x$);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(){}};var pl=require("@vkontakte/videoplayer-shared/es2015"),gn=class{init({store:e,microStores:i,interactiveController:o,config:r}){return(0,pl.assertNonNullable)(e),(0,pl.assertNonNullable)(i),(0,pl.assertNonNullable)(r),r.interactiveData&&(0,pl.assertNonNullable)(o),this.subscription=new pl.Subscription,this.subscription}};var qc=class extends gn{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=jt(Ee({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:r}=i.store.state;return o.add(r.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Qc=class extends gn{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=jt(Ee({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:r,store:a}=i,{fakeIsPlaying$:l}=r,{isInteractiveExpectation$:d,isPlaying$:s}=a.state,{controlsVisible:u,isMobile:f}=a.ui,p=ge(f),v=()=>p&&ge(u);return o.add(u.subscribe($=>{if(!p)return;let y=ge(l);ge(s)?this.state$.set($):y!==null&&this.state$.set(!y||$)})),o.add(s.subscribe($=>{this.state$.set(!$||v())})),o.add(l.subscribe($=>{if($===null)return;let y=ge(d);if(v()){this.state$.set(!0);return}y&&this.state$.set(!$)})),o}};var Gc=class extends gn{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}};var w$=require("@vkontakte/videoplayer-shared/es2015");var fg=de(!1),Mp=null,Yc=class extends gn{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=jt(Ee({},fg),{set:(i,o=!1)=>{i!==ge(fg)&&(this.clearTimeout(),fg.set(i),!i&&Mp&&(Mp=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:r,config:a}=i,{isInteractiveTime$:l,isPlaying$:d}=r.state,s=r.ui.controlsVisible,{interactiveTimeIndicator:u}=r.ui.controls;o.add(s.subscribe(p=>{ge(l)&&p&&this.state$.set(!1)}));let f=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add((0,w$.combine)({isPlaying$:d,isInteractiveTime$:l,interactiveTimeIndicator:u}).subscribe(({isPlaying$:p,isInteractiveTime$:v,interactiveTimeIndicator:$})=>{var y,g;if(!(!p||!($!=null&&$.isDisplayed))){if(!v)return this.state$.set(!1);f.tooltipHelpHintActive&&Mp===null&&(Mp=!0,f.tooltipHelpHintActive=!1,this.state$.set(!0),(g=(y=r.callbacks)==null?void 0:y.onInteractiveTimeIndicatorHintDeactivated)==null||g.call(y))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};var Vp=require("@vkontakte/videoplayer-shared/es2015");var jc=class extends gn{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=jt(Ee({},de(null)),{toggle:Vp.noop});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=()=>ht(this,null,function*(){if(this.checkIfShouldHide(ge(l)))return;let s=ge(this.state$),{isEnded$:u,playbackState$:f}=r.state,{disabledControls$:p}=r.ui.controls,v=ge(u),$=ge(f);if(s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),p.remove(zf),!v&&this.graphMadePause&&r.actions.internal.play()}catch(y){d({message:"Cant hide graph"})}else{this.graphMadePause=$==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),p.add(zf),!v&&this.graphMadePause&&r.actions.internal.pause()}catch(y){d({message:"Cant show graph"})}}}),o.add((0,Vp.combine)({graphIsOpened:this.state$,currentGridType:l}).subscribe(f=>ht(this,[f],function*({graphIsOpened:s,currentGridType:u}){if(this.checkIfShouldHide(u)&&s)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(v){d({message:"Cant hide graph"})}}))),o}};var mg=require("@vkontakte/videoplayer-shared/es2015"),Xc=class extends gn{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 mg.ValueSubject(!1),isEnabled$:new mg.ValueSubject(!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}};var Np=require("@vkontakte/videoplayer-shared/es2015");var Rp=require("@vkontakte/videoplayer-shared/es2015");var S$=({maxShowCount:t,timeout:e})=>{let i=[t!==0?IT({maxCount:t}):void 0,e!==0?ET({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(r=>r.notificationShowed(o)),canShowNotification:o=>i.every(r=>r.canShowNotification(o))}},IT=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,r;e[i]=((o=e[i])!=null?o:0)+1,Rp.safeStorage.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}}},ET=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Rp.safeStorage.get(e)||"{}")}catch(a){return{}}},o=a=>Rp.safeStorage.set(e,JSON.stringify(a)),r=a=>{let l=i();delete l[a],o(l)};return{notificationShowed:a=>{o(jt(Ee({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let l=i()[a];if(l){let d=Date.now()-l.launchTime>t;return d&&r(a),d}else return!0}}};var Zc=class extends gn{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=S$({maxShowCount:a,timeout:l});let u=r.getPlayer();return o.add(u.events.severeStallOccured$.pipe((0,Np.filterChanged)(),(0,Np.filter)(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 C$=()=>[qc,Qc,Gc,Yc,jc,Xc,Zc].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:jt(Ee({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});var fd=require("@vkontakte/videoplayer-shared/es2015");var Op=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 Dp=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 Op(()=>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 PT=M('<div class="root s-3"><!></div>'),kT={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 vg(t,e){B(e,!0),Q(t,kT);let i=null,o=K(null);Oe(()=>(n(o)&&(i=window.setTimeout(()=>{O(o,null)},e.animationDuration)),()=>{i&&clearTimeout(i)}));function r(s){e.playbackStatusShow&&O(o,s?"prev":"next",!0)}var a=Le(),l=ce(a);{var d=s=>{var u=Le(),f=ce(u);As(f,()=>n(o),p=>{var v=PT(),$=T(v);let y=m(()=>n(o)==="prev");zc($,{get duration(){return e.animationDuration},get Icon(){return pa},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 AT=Object.defineProperty,LT=Object.defineProperties,MT=Object.getOwnPropertyDescriptors,T$=Object.getOwnPropertySymbols,VT=Object.prototype.hasOwnProperty,RT=Object.prototype.propertyIsEnumerable,hg=(t,e,i)=>e in t?AT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Us=(t,e)=>{for(var i in e||(e={}))VT.call(e,i)&&hg(t,i,e[i]);if(T$)for(var i of T$(e))RT.call(e,i)&&hg(t,i,e[i]);return t},NT=(t,e)=>LT(t,MT(e)),ti=(t,e,i)=>hg(t,typeof e!="symbol"?e+"":e,i),Bp=(t,e,i)=>new Promise((o,r)=>{var a=s=>{try{d(i.next(s))}catch(u){r(u)}},l=s=>{try{d(i.throw(s))}catch(u){r(u)}},d=s=>s.done?o(s.value):Promise.resolve(s.value).then(a,l);d((i=i.apply(t,e)).next())}),OT={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Ui.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:(0,Jc.isMobile)(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},er=K(void 0),gg=ci({animationDuration:0,playbackStatusShow:!1}),Fp=class extends HTMLElement{constructor(){super(),ti(this,"svelteStubComponent"),ti(this,"svelteRootComponent"),ti(this,"sveltePersistentLayerComponent"),ti(this,"svelteErrorComponent"),ti(this,"store"),ti(this,"microStoresRoot"),ti(this,"statistics"),ti(this,"sentry"),ti(this,"_shadowRoot"),ti(this,"playerContainer"),ti(this,"rootContainer"),ti(this,"stateContainer"),ti(this,"shadowRootContainer"),ti(this,"playerId"),ti(this,"uiConfig"),ti(this,"coreConfig"),ti(this,"statisticsConfig"),ti(this,"interactiveController"),ti(this,"interactiveContainer"),ti(this,"graphMadePause"),ti(this,"currentPlayingVideoIndex",0),ti(this,"needToRepeatPlaylist",!1),ti(this,"videoConfig"),ti(this,"pictureInPictureApi"),ti(this,"mediaSessionApi"),ti(this,"unsubscribePlayerPhaseSubscription"),ti(this,"logger"),ti(this,"log"),ti(this,"subscription"),ti(this,"interactiveSubscription"),ti(this,"annotationsApi"),ti(this,"slotsApi"),ti(this,"focusManager"),ti(this,"prevIsid"),ti(this,"isInited",!1),ti(this,"postponedInitParams",null),ti(this,"internalsExposure",null),ti(this,"shadowDOMCallbacksDisabled",!1),ti(this,"fatalError$",new Hp.ValueSubject(null)),ti(this,"createOneStat",(e,i={})=>{var o,r,a,l;if(!this.videoConfig)return;let{albumId:d,statPlace:s,statUserSalt:u,statTrackCode:f,statVKAppId:p,refreshStatAuthToken:v,autoplay:$,isMobile:y,isTouch:g,refDomain:w,deviceId:I,interactiveData:C}=Kc(this.videoConfig,i),N=(o=C==null?void 0:C.projectInfo)==null?void 0:o.pid,L=(a=(r=this.interactiveController)==null?void 0:r.state.isReplay$.getValue())!=null?a:!1;L&&(this.prevIsid=void 0);let{unitedVideoId:E,isClip:P=!1}=e;if(this.uiConfig.features.statistics&&E)try{return new md.OneStat(Us({movieId:E,albumId:d,place:s,trackCode:f,vkAppId:p,autoplay:(l=$&&!this.interactiveController)!=null?l:!1,mobile:g!=null?g:y,clip:P,refDomain:w,deviceId:I,isPreviewPlayerView:this.videoConfig.playerView==="preview"},N&&(!this.isInited||L)&&{projectId:Number(N)}),Us({refreshAuthToken:v,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}catch(H){console.error(H),this.log({message:H.message})}}),fd.devNull.create("ui"),this.logger=new Ui.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Ui.Subscription,this.interactiveSubscription=new Ui.Subscription,this.graphMadePause=!1,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Xr(cg,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,r=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=ci({title:o,thumbUrl:r}),l={target:this.playerContainer,props:a};this.svelteStubComponent=Xr(dg,l),this.sveltePersistentLayerComponent=Xr(vg,{target:this.playerContainer,props:gg}),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}updatePersistentLayerProps(){if(!this.uiConfig)return;let{playbackStatusNextVideoAnimationDuration:e,features:{playbackStatusShow:i,playbackStatusNextVideoShow:o}}=this.uiConfig;gg.animationDuration=e,gg.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(),fd.devNull.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}=Kc(this.videoConfig,i),{unitedVideoId:l}=e;if(this.uiConfig.features.thinStatistics&&l)return new md.ThinOneStat.ThinOneStat({deviceId:o,movieId:l,preload:r,isPreviewPlayerView:this.videoConfig.playerView==="preview"},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},o){var r,a,l,d,s,u,f,p,v,$;if(!this.videoConfig)return;let{albumId:y,statPlace:g,statAuthToken:w,preload:I,autoplay:C,volume:N,muted:L,fromTime:E,canRewindLive:P,supportLink:q,showAds:H,adsSlotId:z,adsParams:j={},adsAutoplayParam:ae,interfaceLanguage:X,isCyrillicRelatedInterface:ne,logoClickable:J,logoHidden:we,isMobile:pe,isTouch:re,isAudioDisabled:_e,isLiveCatchUpMode:$e,fullScreenTarget:ee,failoverHosts:Ne,canDownload:fe,callbacks:k,interactiveData:Ke,showThumbTimer:Te,additionalButtons:Z=[],additionalSettingsMenuItems:ie=[],additionalContextMenuItems:De=[],repeat:Be,loop:ot,saveRate:U,volumeMultiplier:Ae,showEndScreen:ke,showAutoplayNext:ze,mediascopePixels:it}=Kc(this.videoConfig,i),{sources:ye,title:Ie,thumbUrl:Fe,unitedVideoId:Dt,isClip:vt=!1,duration:Ht,adsParams:ct={},videoEpisodes:St,previewThumbsData:ni,subtitles:At,subtitlesForcedLanguage:Bt,live:Ut,adsExternalApi:Y}=e;if(!ye&&!Ut){let fi=new Error("empty sources and live");this.fatalError$.next(fi),(r=k.onCrashed)==null||r.call(k,fi.message);return}let Se=Us(Us({},j),ct),le=this.getNextVideoInfo(),he={sources:ye,title:Ie,thumbUrl:Fe,subtitles:At,subtitlesForcedLanguage:Bt,unitedVideoId:Dt,isClip:vt,live:Ut,albumId:y,statPlace:g,autoplay:C,muted:L,volume:N,fromTime:E,canRewindLive:P,showAds:H,adsSlotId:z,adsParams:Se,adsAutoplayParam:ae,duration:Ht,logoClickable:J,logoHidden:we,isTouch:re!=null?re:pe,repeat:Be,loop:ot,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:le.nextVideoTitle,endScreenVideoThumb:le.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Ve={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi,slotsApi:this.slotsApi,focusManager:this.focusManager};this.log({message:`create player, props: ${JSON.stringify(he)}`});let st=(a=this.interactiveController)==null?void 0:a.state.statistics$.getValue(),mt=(st==null?void 0:st.oneStat)||this.createOneStat(e,i),ue=this.createThinOneStat(e,i),We;it&&(We=new md.MediascopePixel({pixels:it})),(mt||ue)&&(this.statistics=new vp(mt,ue,We,st==null?void 0:st.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Ua(this.uiConfig.sentry,{version:Ba,env:Bu},{movieId:Dt,albumId:y,place:g,autoplay:(l=C&&!this.interactiveController)!=null?l:!1,mobile:re!=null?re:pe,clip:vt}),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=Us(Us({},this.sentry),Ua.getInstance());let ut=!!Ke,zt=[],Wt="tooltip_interactive_go_back_disabled_first";if(ut&&this.interactiveController){let fi=this.interactiveController.state.isInitialChapter$.getValue(),hi=this.interactiveController.getHistoryState();fi&&zt.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||zt.push("SEEK_TO_INTERACTIVE_BUTTON"),hi.hasPrevChapter$.getValue()||(zt.push("PLAY_PREV_CHAPTER_BUTTON"),fi||(hi.isGoBackLimited$.getValue()?Wt="tooltip_interactive_go_back_disabled_limit":Wt="tooltip_interactive_go_back_disabled"))}let ri=()=>{var fi;this.isInited=!1,this.prevIsid=void 0;let hi=(o==null?void 0:o.info.isEnded$.getValue())&&((fi=this.interactiveController)==null?void 0:fi.state.isEndChapter$.getValue());k.onReplayInteractiveVideo&&!hi?k.onReplayInteractiveVideo():this.replayInteractiveVideo()},$i=Be&&this.videoConfig.videos.length===1;this.store=Rb({player:o,interfaceLanguage:X,isCyrillicRelatedInterface:ne,videoId:Dt,isClip:vt,isLiveCatchUpMode:$e,isAudioDisabled:_e,statAuthToken:w,callbacks:k,webApi:Ve,videoEpisodes:St,previewThumbsData:ni,canDownload:fe,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:zt,isInteractive:ut,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:ri,playPrevChapterDisabledTooltip:Wt,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?Z:[],additionalSettingsMenuItems:ie!=null?ie:[],additionalContextMenuItems:De!=null?De:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),onVideoChanged:fi=>{var hi;return(hi=this.sveltePersistentLayerComponent)==null?void 0:hi.startVideoChangedAnimation(fi)},looped:this.uiConfig.features.useLoopSetting?ot:$i,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView,playerId:this.playerId});let{stores:Xi}=this.microStoresRoot=C$(),Nt=()=>{var fi,hi,bt,ei,wi,Zi;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onCurrentFormatChanged)==null?void 0:qe.call(k,Et)})),this.subscription.add(Xi.interactiveControlsOpacity$.subscribe(Et=>{var qe;Et!==null&&((qe=this==null?void 0:this.interactiveController)==null||qe.setDisabledControls(Et))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onThroughputEstimationChanged)==null?void 0:qe.call(k,Et)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onTrafficSavingEnabledChanged)==null?void 0:qe.call(k,Et)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onHighQualityEnabledChanged)==null?void 0:qe.call(k,Et)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onAutoQualityEnabledChanged)==null?void 0:qe.call(k,!!Et)})),this.subscription.add(new Ui.Observable(Et=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(qe=>Et.next(qe)))}).pipe((0,Ui.skip)(1)).subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onCurrentPlaybackRateChanged)==null?void 0:qe.call(k,Et)})),this.subscription.add(this.store.state.volume$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onVolumeChange)==null?void 0:qe.call(k,Et)})),this.subscription.add(this.store.state.muted$.subscribe(Et=>{var qe,yi,To,Bo;if(Et)(qe=k==null?void 0:k.onMute)==null||qe.call(k);else{let Fo=(To=((yi=this.store)==null?void 0:yi.state.volume$)&&ge(this.store.state.volume$))!=null?To:0;(Bo=k==null?void 0:k.onUnmute)==null||Bo.call(k,Fo)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onVideoBitrateChanged)==null?void 0:qe.call(k,Et)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Et=>{var qe;let yi=(qe=this.store)==null?void 0:qe.ui.controls.disabledControls$;yi&&(Et&&!yi.includes(jd)&&yi.add(jd),Et||yi.remove(jd))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(Et=>Bp(this,null,function*(){var qe;if(!Jc.clientChecker.browser.isSamsungBrowser||!Et||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((qe=this.videoConfig)==null?void 0:qe.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Et=>{var qe;return(qe=k==null?void 0:k.onVSIDChanged)==null?void 0:qe.call(k,Et)})),this.initMediaSession(),O(er,{interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ye,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Ie,thumbUrl:Fe,subtitles:At,subtitlesForcedLanguage:Bt,live:Ut,preload:I,autoplay:C,muted:L,volume:N,fromTime:E,canRewindLive:P,supportLink:q,showAds:H,adsSlotId:z,adsParams:Se,adsAutoplayParam:ae,duration:Ht,logoClickable:J,logoHidden:we,isMobile:re!=null?re:pe,failoverHosts:Ne,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:Ae,showEndScreen:ke,showAutoplayNext:ze,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let ii={target:this.playerContainer,props:n(er)};this.svelteRootComponent=Xr(ag,ii),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(bt=(hi=(fi=this.videoConfig)==null?void 0:fi.callbacks)==null?void 0:hi.onInited)==null||bt.call(hi)),(ei=this.internalsExposure)==null||ei.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Zi=(wi=this.videoConfig)==null?void 0:wi.callbacks)!=null&&Zi.onDevNullLog)?fd.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):fd.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Jc.clientChecker.isInited$.subscribe(fi=>{fi&&(console.log("UI SDK async start"),Nt())}):Nt()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,r=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!r)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var s;return(s=a.onPlayerPhaseChanged)==null?void 0:s.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var s;return d&&((s=a.onPlaybackStateChanged)==null?void 0:s.call(a,d))})).add(o.state.playbackStateRealistic$.subscribe(d=>{d?this.stateContainer.setAttribute("data-playback-state",d):this.stateContainer.removeAttribute("data-playback-state")})).add(o.state.isLive$.subscribe(d=>{var s;return(s=a.onIsLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var s;return(s=a.onIsActiveLiveChanged)==null?void 0:s.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var s;return(s=a.onIsAudioAvailableChanged)==null?void 0:s.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var s;return(s=a.onCurrentQualityChanged)==null?void 0:s.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var s;return(s=a.onAvailableQualitiesChanged)==null?void 0:s.call(a,d.map(({value:u})=>u).filter(u=>u!=="auto"))})).add(o.state.availableAudioStreams$.subscribe(d=>{d.length>1&&a.onAudioLanguagesAvailable&&a.onAudioLanguagesAvailable()})).add(r.pictureInPicture$.isActive$.subscribe(d=>{var s,u;return d?(s=a.onPiPEnter)==null?void 0:s.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let l=a==null?void 0:a.uiInfo;l&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var s;return(s=l.onControlsVisibleChanged)==null?void 0:s.call(l,d)})).add(o.ui.isMobile.subscribe(d=>{var s;return(s=l.onIsMobileChanged)==null?void 0:s.call(l,d)})).add(o.ui.playerSize.subscribe(d=>{var s;return(s=l.onPlayerSizeChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var s;return(s=l.onPrevButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playButton.subscribe(d=>{var s;return(s=l.onPlayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var s;return(s=l.onReplayButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var s;return(s=l.onNextButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var s;return(s=l.onPlayPrevChapterChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var s;return(s=l.onSeekToInteractiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var s;return(s=l.onGraphButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var s;return(s=l.onLiveButtonChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.time.subscribe(d=>{var s;return(s=l.onTimeUpdateChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.episodes.subscribe(d=>{var s;return(s=l.onEpisodesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var s;return(s=l.onSubtitlesChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topLeft.subscribe(d=>{var s;return(s=l.onTopLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.topRight.subscribe(d=>{var s;return(s=l.onTopRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomLeft.subscribe(d=>{var s;return(s=l.onBottomLeftControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottomRight.subscribe(d=>{var s;return(s=l.onBottomRightControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.middle.subscribe(d=>{var s;return(s=l.onMiddleControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.controlBlocks.bottom.subscribe(d=>{var s;return(s=l.onBottomControlBlockChanged)==null?void 0:s.call(l,d)})).add(o.ui.videoTitleInfo.subscribe(d=>{var s;return(s=l.onTitleChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.settings.subscribe(d=>{var s;return(s=l.onSettingsChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var s;return(s=l.onFullscreenChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var s;return(s=l.onChromecastChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.pip.subscribe(d=>{var s;return(s=l.onPipChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var s;return(s=l.onVkLogoChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var s;return(s=l.onInteractiveTimeIndicatorChanged)==null?void 0:s.call(l,d)})).add(o.ui.controls.timeline.subscribe(d=>{var s;return(s=l.onTimelineChanged)==null?void 0:s.call(l,d)}))}playNextVideo(){this.videoConfig&&(this.currentPlayingVideoIndex++,this.currentPlayingVideoIndex>=this.videoConfig.videos.length&&(this.currentPlayingVideoIndex=0),this.log({message:`play next video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}playPrevVideo(){this.videoConfig&&(this.currentPlayingVideoIndex--,this.currentPlayingVideoIndex<0&&(this.currentPlayingVideoIndex=this.videoConfig.videos.length-1),this.log({message:`play prev video, index: ${this.currentPlayingVideoIndex}`}),this.createPlayerWithCurrentVideo())}createPlayerWithCurrentVideo(e,i=!0){var o;if(!this.videoConfig)return;let r=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!r){this.log({message:"no next video"});return}this.isInited&&(0,Ui.isNonNullable)(r.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(r.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(r,{autoplay:i,fromTime:0},e)}playPrevChapter(){var e;(e=this.interactiveController)==null||e.playPrevChapter()}seekToInteractive(){var e;let i=(e=this.interactiveController)==null?void 0:e.getNextInteractiveStartTime();typeof i=="number"&&this.seekTime(i/1e3)}initInteractives(){return Bp(this,null,function*(){var e,i,o,r,a,l;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:d}=yield import("@vkontakte/videoplayer-interactive/es2015");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let s=(i=this.store)==null?void 0:i.interfaceLanguage$,u=s?ge(s):this.videoConfig.interfaceLanguage,{projectInfo:f,initChapterId:p,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new d({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:u,graph:this.uiConfig.features.interactiveGraph,projectInfo:f,initChapterId:p,historyApi:v,vkVideoLoader:$,lastFrame:this.uiConfig.features.interactiveLastFrame,permanentTextControls:this.uiConfig.features.interactiveTextPermanent,interactiveTimeOpenUri:this.uiConfig.features.interactiveTimeOpenUri,initSeamless:!0,config:this.uiConfig.interactive,coreConfig:this.coreConfig,createOneStat:this.createOneStat,isTouch:this.videoConfig.isTouch,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation,controlsTapPlace:this.uiConfig.features.interactiveControlsTapPlace,controlsFillAnimation:this.uiConfig.features.interactiveControlsFillAnimation,controlsHideAnimation:this.uiConfig.features.interactiveControlsHideAnimation},endChapterHistoryFix:this.uiConfig.features.interactiveHistoryEndChapterFix});let{isInteractiveExpectation$:y,isSeekable$:g}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(g.subscribe(I=>{if(!this.isInited)return;let C=this.store;I?C.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):C.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(y.subscribe(I=>{this.store&&this.store.state.isInteractiveExpectation$.set(I)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(I=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=NT(Us({},I.config),{title:(f==null?void 0:f.title)||I.config.title});let C=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(I.player,C),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:I,actionType:C})=>{var N,L,E,P,q,H;if(!this.store||!this.microStoresRoot)return;let z=y.getValue();if(I==="action-choice"&&C==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Xd)),I==="action-choice-canceled"){let j=ge(this.store.state.isPlaying$)||z;if(((E=(N=this.videoConfig)==null?void 0:N.isTouch)!=null?E:(L=this.videoConfig)!=null&&L.isMobile)&&j){this.store.ui.interactiveHideMobileControls.set(!0);return}(H=(P=this.videoConfig)==null?void 0:(q=P.callbacks).onDisabledInteractiveClick)==null||H.call(q)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:I,removeAllOpenURI:C})=>{this.store&&I==="container-fake-removed"&&C&&this.store.ui.controls.disabledControls$.remove(Xd)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(r=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&r.onInteractiveHistoryChanged){let I=this.interactiveController.getHistoryState();this.subscription.add(I.history$.subscribe(C=>{var N,L,E;C.length&&((E=(L=(N=this.videoConfig)==null?void 0:N.callbacks)==null?void 0:L.onInteractiveHistoryChanged)==null||E.call(L,C))}))}(l=(a=this.videoConfig)==null?void 0:a.callbacks)!=null&&l.onInteractiveChapterChanged&&this.subscription.add(this.interactiveController.events.chapterChanged$.subscribe(I=>{var C,N,L;(L=(C=this.videoConfig)==null?void 0:(N=C.callbacks).onInteractiveChapterChanged)==null||L.call(N,I.chapter,I.manifestVideo)})),this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var I,C,N,L;(I=this.microStoresRoot)==null||I.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(L=(C=this.videoConfig)==null?void 0:(N=C.callbacks).onInteractiveTimeIndicatorClick)==null||L.call(N)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(I=>{this.log({message:I.toString()})}))}catch(d){this.log({message:d.message})}})}initPlayer(e,i={}){var o,r,a,l,d,s,u,f,p,v,$,y,g,w,I,C,N,L,E,P,q,H,z,j,ae;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData){let X=new Error("empty videos");this.fatalError$.next(X),(r=(o=e.callbacks)==null?void 0:o.onCrashed)==null||r.call(o,X.message);return}else this.fatalError$.next(null);if(this.videoConfig=Kc(OT,(0,Ui.cloneDeepWith)(e,X=>X instanceof HTMLElement?X:void 0)),this.playerId=(0,Ui.getPlayerId)(e.playerId),this.uiConfig=c_((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 Ui.InternalsExposure("ui",this.playerId))),fd.devNull.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:[(0,Hp.now)()]}),(0,Ui.isNonNullable)(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(p=this.uiConfig.features.mediaSession)!=null?p:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),(0,Ui.isNonNullable)(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(y=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?y:!0,this.uiConfig.features.dpip=(w=(g=this.uiConfig.features.dpip)!=null?g:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.uiConfig.ads.paramsOverride=Us({preview:(I=this.uiConfig.ads.preview)!=null?I:this.videoConfig.adsPreviewParam},this.uiConfig.ads.paramsOverride),this.videoConfig.isTouch=(N=(C=this.uiConfig.isMobile)!=null?C:this.videoConfig.isTouch)!=null?N:this.videoConfig.isMobile,(L=this.videoConfig).autoplay&&(L.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(E=this.uiConfig.ads.enable)!=null?E:this.videoConfig.showAds,this.videoConfig.adsSlotId=(P=this.uiConfig.ads.slot)!=null?P:this.videoConfig.adsSlotId,this.videoConfig.logoHidden=!((q=this.uiConfig.showLogo)!=null?q:!this.videoConfig.logoHidden),(H=this.videoConfig).canRewindLive&&(H.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(z=this.videoConfig.supportLink)!=null?z:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext&&this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons&&this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((j=this.videoConfig.videos)!=null&&j[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let X={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=Ap.getLatestSupportedVersion(X):this.pictureInPictureApi=new za(X)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new Pp:void 0,this.slotsApi=this.uiConfig.features.slots?new Cp:void 0,this.annotationsApi=this.uiConfig.features.annotations?new Lp(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.focusManager=this._shadowRoot?new Dp(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]),b$(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(er)&&(n(er).showNextPrevButtons=this.needToShowNextPrevButtons(),n(er).nextButtonActive=this.isNextButtonActive(),n(er).prevButtonActive=this.isPrevButtonActive(),n(er).endScreenVideoTitle=o.nextVideoTitle,n(er).endScreenVideoThumb=o.nextVideoThumb,n(er).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}=Us({},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(er)&&(n(er).needToRepeatPlaylist=this.needToRepeatPlaylist,n(er).showNextPrevButtons=this.needToShowNextPrevButtons(),n(er).nextButtonActive=this.isNextButtonActive(),n(er).prevButtonActive=this.isPrevButtonActive())}seekTime(e){var i;this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekTime(e))}seekEpisodeStartTime(e){var i;this.log({message:`seek episode start time, time: ${e}`}),(i=this.svelteRootComponent)==null||i.seekEpisodeStartTime(e)}returnFocusToEpisodes(){var e;this.log({message:"return focus to episodes button"}),(e=this.svelteRootComponent)==null||e.returnFocusToEpisodes()}setPlaybackRate(e){var i;this.log({message:`set playback rate to: ${e}`}),(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i,o,r;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(r=this.svelteRootComponent)==null||r.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return Bp(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;let r=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${r}`}),r||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(o=this.store)==null||o.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:o}=i;return o.canPlayLiveTailBuffer$.getValue()&&!o.isStalled$.getValue()&&!o.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let o=this.isLiveTailPlaying(),r=e||!o;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${o}`});let a=()=>{var l;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!0)};r&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var l;r||a(),(l=this.store)==null||l.destroy()})}setLiveWaitingRecord(){var e;let i=this.isLiveTailPlaying(),o=!i;this.log({message:`live waiting record: liveTailPlaying = ${i}`});let r=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};o&&r(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;o||r(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=this.isLiveTailPlaying(),r=!o;this.log({message:`live ended: liveTailPlaying = ${o}`});let a=()=>{var l,d;(l=this.store)==null||l.actions.internal.setLiveWaitingRecover(!1),(d=this.store)==null||d.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(r){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;this.log({message:"live switch to low latency "+e}),(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,o;return(o=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?o:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return Bp(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let r=ge(this.store.state.positionExact$),l=ge(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe((0,Ui.once)()).subscribe(()=>{l&&r>=l.time?this.seekTime(l.time):this.seekTime(r),e==null||e()});let d=this.interactiveController.getCurrentChapter();yield this.interactiveController.setChapter({chapterId:(o=d==null?void 0:d.chapter)==null?void 0:o.id,pushToHistory:!1})}})}showInteractiveIndicatorTooltip(e,i=!1){var o;(o=this.microStoresRoot)==null||o.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){var o;(o=this.store)==null||o.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){var i;(i=this.store)==null||i.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}togglePictureInPicture(){var e;(e=this.store)==null||e.actions.internal.togglePictureInPicture()}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}handleExternalKeyboardEvent(e){var i,o;return!!((o=(i=this.svelteRootComponent)==null?void 0:i.keyboardControls)!=null&&o.handleExternalKeyboardEvent(e))}setAutoplayNext(e){var i;(i=this.store)==null||i.actions.internal.setAutoplayNextEnabled(e)}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Ra(e)}};var vd=require("@vkontakte/videoplayer-shared/es2015"),Up=require("@vkontakte/videoplayer-core/es2015"),DT=()=>{window.customElements.define("vk-video-player",Fp)};