@vkontakte/videoplayer 1.1.63-beta.2 → 1.1.64-dev.1ed690e2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2015.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @vkontakte/videoplayer v1.1.63-beta.2
3
- * Mon, 02 Jun 2025 14:19:50 GMT
4
- * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-63/doc/
2
+ * @vkontakte/videoplayer v1.1.64-dev.1ed690e2.0
3
+ * Mon, 09 Jun 2025 13:41:52 GMT
4
+ * https://st.mycdn.me/static/vkontakte-videoplayer/1-1-64/doc/
5
5
  */
6
6
  var z1=Object.defineProperty,q1=Object.defineProperties;var W1=Object.getOwnPropertyDescriptors;var Qm=Object.getOwnPropertySymbols;var K1=Object.prototype.hasOwnProperty,Q1=Object.prototype.propertyIsEnumerable;var Gm=t=>{throw TypeError(t)};var yu=(t,e,i)=>e in t?z1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,q=(t,e)=>{for(var i in e||(e={}))K1.call(e,i)&&yu(t,i,e[i]);if(Qm)for(var i of Qm(e))Q1.call(e,i)&&yu(t,i,e[i]);return t},Dt=(t,e)=>q1(t,W1(e));var Nn=(t,e,i)=>yu(t,typeof e!="symbol"?e+"":e,i),xu=(t,e,i)=>e.has(t)||Gm("Cannot "+i);var Ri=(t,e,i)=>(xu(t,e,"read from private field"),i?i.call(t):e.get(t)),us=(t,e,i)=>e.has(t)?Gm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),wa=(t,e,i,o)=>(xu(t,e,"write to private field"),o?o.call(t,i):e.set(t,i),i),jm=(t,e,i)=>(xu(t,e,"access private method"),i);var kt=(t,e,i)=>new Promise((o,n)=>{var a=l=>{try{d(i.next(l))}catch(u){n(u)}},s=l=>{try{d(i.throw(l))}catch(u){n(u)}},d=l=>l.done?o(l.value):Promise.resolve(l.value).then(a,s);d((i=i.apply(t,e)).next())});var ps="[",Vs="[!",Rs="]",Kr={};var Di=Symbol(),_i=Symbol("filename"),Ym=Symbol("hmr"),Zm="http://www.w3.org/1999/xhtml",wu="http://www.w3.org/2000/svg";var Gd=!0;var Jm,ev,Xm=(ev=(Jm=globalThis.process)==null?void 0:Jm.env)==null?void 0:ev.NODE_ENV,Pe=Xm&&!Xm.toLowerCase().startsWith("prod");var Ho=Symbol("$state"),Qr=Symbol("$state metadata"),fl=Symbol("legacy props"),tv=Symbol("");var gr=Array.isArray,iv=Array.prototype.indexOf,ml=Array.from,Su=Object.keys,ao=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,jd=Object.getOwnPropertyDescriptors,Cu=Object.prototype,ov=Array.prototype,Gr=Object.getPrototypeOf;function fs(t){return typeof t=="function"}var oe=()=>{};function nv(t){return t()}function ms(t){for(var e=0;e<t.length;e++)t[e]()}var vl=[],Tu=[];function rv(){var t=vl;vl=[],ms(t)}function G1(){var t=Tu;Tu=[],ms(t)}function Zo(t){vl.length===0&&queueMicrotask(rv),vl.push(t)}function Iu(){vl.length>0&&rv(),Tu.length>0&&G1()}function Yd(t){return t===this.v}function Sa(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function sv(t,e){return t!==e}function Ca(t){return!Sa(t,this.v)}function av(){if(Pe){let t=new Error(`derived_references_self
7
7
  A derived value cannot reference itself recursively
@@ -45,7 +45,7 @@ ${l}in ${p}`).join("")}
45
45
  `)){let n=(i=r0.exec(o))!=null?i:s0.exec(o);n&&e.push({file:n[1],line:+n[2],column:+n[3]})}return e}function Qv(){var e;let t=(e=a0())==null?void 0:e.slice(4);if(!t)return null;for(let i=0;i<t.length;i++){let o=t[i],n=n0[o.file];if(!n){if(i===0)return null;continue}for(let a of n){if(a.end==null)return null;if(a.start.line<o.line&&a.end.line>o.line)return a.component}}return null}var uc=Symbol("ADD_OWNER");function Ku(t,e,i=!1,o=!1){if(t&&!i){let n=nn,a=t[Qr];if(a&&!Qu(a,n)){let s=Gu(a);e&&e[_i]!==n[_i]&&!o&&Ev(n[_i],e[_i],s[_i])}}pc(t,e,new Set)}function Du(t,e){if(e.owners!==null)for(;t;){if(t.owners===null){e.owners=null;break}for(let i of t.owners)e.owners.add(i);t=t.parent}}function pc(t,e,i){var a;let o=t==null?void 0:t[Qr];if(o)"owners"in o&&o.owners!=null&&(e?o.owners.add(e):o.owners=null);else if(t&&typeof t=="object"){if(i.has(t))return;if(i.add(t),uc in t&&t[uc])yo(()=>{t[uc](e)});else{var n=Gr(t);if(n===Object.prototype)for(let s in t)if((a=Object.getOwnPropertyDescriptor(t,s))!=null&&a.get){let d=Di;yo(()=>{let l=t[s];d!==l&&(d=l,pc(l,e,i))})}else pc(t[s],e,i);else if(n===Array.prototype)for(let s=0;s<t.length;s+=1)pc(t[s],e,i)}}}function Qu(t,e){return t.owners===null?!0:t.owners.has(e)||_i in e&&[...t.owners].some(i=>i[_i]===e[_i])||t.parent!==null&&Qu(t.parent,e)}function Gu(t){var e,i;return(i=(e=t==null?void 0:t.owners)==null?void 0:e.values().next().value)!=null?i:Gu(t.parent)}var l0=!1;function Av(t){if(l0)return;let e=Qv();if(e&&!Qu(t,e)){let i=Gu(t);i[_i]!==e[_i]?Ru(e[_i],i[_i]):Ru()}}function Ra(t){if(Pe){let e=new Error(`lifecycle_outside_component
46
46
  \`${t}(...)\` can only be used during component initialisation
47
47
  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 Mt=null;function Cl(t){Mt=t}var nn=null;function Tl(t){nn=t}function Da(t){return ju("getContext").get(t)}function Na(t,e){let i=ju("setContext");return Pe&&bt(()=>Ku(e,null,!0)),i.set(t,e),e}function kl(){return ju("getAllContexts")}function U(t,e=!1,i){var o=Mt={p:Mt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};Rr&&!e&&(Mt.l={s:null,u:null,r1:[],r2:Ki(!1)}),rn(()=>{o.d=!0}),Pe&&(Mt.function=i,nn=i)}function z(t){var s,d;let e=Mt;if(e!==null){t!==void 0&&(e.x=t);let l=e.e;if(l!==null){var i=Ct,o=Ot;e.e=null;try{for(var n=0;n<l.length;n++){var a=l[n];lo(a.effect),bo(a.reaction),bn(a.fn)}}finally{lo(i),bo(o)}}Mt=e.p,Pe&&(nn=(d=(s=e.p)==null?void 0:s.function)!=null?d:null),e.m=!0}return t||{}}function Nr(){return!Rr||Mt!==null&&Mt.l===null}function ju(t){var e;return Mt===null&&Ra(t),(e=Mt.c)!=null?e:Mt.c=new Map(c0(Mt)||void 0)}function c0(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var u0=/\r/g;function Gv(t){t=t.replace(u0,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function jv(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var p0=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Yv(t){return p0.includes(t)}var f0=["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 m0={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 Zv(t){var e;return t=t.toLowerCase(),(e=m0[t])!=null?e:t}var L6=[...f0,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var v0=["touchstart","touchmove"];function Xv(t){return v0.includes(t)}var g0=["textarea","script","style","title"];function Jv(t){return g0.includes(t)}function Yu(t){return t==null?void 0:t.replace(/\//g,"/\u200B")}var eg=new Map;function tg(t,e){var i=eg.get(t);i||(i=new Set,eg.set(t,i)),i.add(e)}function Zu(t,e){if(e){let i=document.body;t.autofocus=!0,Zo(()=>{document.activeElement===i&&t.focus()})}}function El(t){var e=Ot,i=Ct;bo(null),lo(null);try{return t()}finally{bo(e),lo(i)}}var Xu=new Set,fc=new Set;function Ws(t){if(!je)return;t.onload&&t.removeAttribute("onload"),t.onerror&&t.removeAttribute("onerror");let e=t.__e;e!==void 0&&(t.__e=void 0,queueMicrotask(()=>{t.isConnected&&t.dispatchEvent(e)}))}function Ju(t,e,i,o={}){function n(a){if(o.capture||Ba.call(e,a),!a.cancelBubble)return El(()=>i==null?void 0:i.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Zo(()=>{e.addEventListener(t,n,o)}):e.addEventListener(t,n,o),n}function St(t,e,i,o,n){var a={capture:o,passive:n},s=Ju(t,e,i,a);(e===document.body||e===window||e===document)&&rn(()=>{e.removeEventListener(t,s,a)})}function lt(t){for(var e=0;e<t.length;e++)Xu.add(t[e]);for(var i of fc)i(t)}function Ba(t){var E;var e=this,i=e.ownerDocument,o=t.type,n=((E=t.composedPath)==null?void 0:E.call(t))||[],a=n[0]||t.target,s=0,d=t.__root;if(d){var l=n.indexOf(d);if(l!==-1&&(e===document||e===window)){t.__root=e;return}var u=n.indexOf(e);if(u===-1)return;l<=u&&(s=l)}if(a=n[s]||t.target,a!==e){ao(t,"currentTarget",{configurable:!0,get(){return a||i}});var v=Ot,$=Ct;bo(null),lo(null);try{for(var p,_=[];a!==null;){var w=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+o];if(y!=null&&(!a.disabled||t.target===a))if(gr(y)){var[C,...T]=y;C.apply(a,[t,...T])}else y.call(a,t)}catch(P){p?_.push(P):p=P}if(t.cancelBubble||w===e||w===null)break;a=w}if(p){for(let P of _)queueMicrotask(()=>{throw P});throw p}}finally{t.__root=e,delete t.currentTarget,bo(v),lo($)}}}var _0;function ig(){_0=void 0}function Oa(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function xo(t,e){var i=Ct;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function L(t,e){var i=(e&1)!==0,o=(e&2)!==0,n,a=!t.startsWith("<!>");return()=>{if(je)return xo(vt,null),vt;n===void 0&&(n=Oa(a?t:"<!>"+t),i||(n=$i(n)));var s=o||bl?document.importNode(n,!0):n.cloneNode(!0);if(i){var d=$i(s),l=s.lastChild;xo(d,l)}else xo(s,s);return s}}function ye(t,e,i="svg"){var o=!t.startsWith("<!>"),n=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,s;return()=>{if(je)return xo(vt,null),vt;if(!s){var d=Oa(a),l=$i(d);if(n)for(s=document.createDocumentFragment();$i(l);)s.appendChild($i(l));else s=$i(l)}var u=s.cloneNode(!0);if(n){var v=$i(u),$=u.lastChild;xo(v,$)}else xo(u,u);return u}}function Br(t=""){if(!je){var e=tn(t+"");return xo(e,e),e}var i=vt;return i.nodeType!==3&&(i.before(i=tn()),bi(i)),xo(i,i),i}function ze(){if(je)return xo(vt,null),vt;var t=document.createDocumentFragment(),e=document.createComment(""),i=tn();return t.append(e,i),xo(e,i),t}function b(t,e){if(je){Ct.nodes_end=vt,Fi();return}t!==null&&t.before(e)}var Pl=!0;function mc(t){Pl=t}function ge(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 es(t,e){return ng(t,e)}function tp(t,e){var s;tc(),e.intro=(s=e.intro)!=null?s:!1;let i=e.target,o=je,n=vt;try{for(var a=$i(i);a&&(a.nodeType!==8||a.data!==ps);)a=Lo(a);if(!a)throw Kr;uo(!0),bi(a),Fi();let d=ng(t,Dt(q({},e),{anchor:a}));if(vt===null||vt.nodeType!==8||vt.data!==Rs)throw Fs(),Kr;return uo(!1),d}catch(d){if(d===Kr)return e.recover===!1&&pv(),tc(),$l(i),uo(!1),es(t,e);throw d}finally{uo(o),bi(n),ig()}}var Ha=new Map;function ng(t,{target:e,anchor:i,props:o={},events:n,context:a,intro:s=!0}){tc();var d=new Set,l=$=>{for(var p=0;p<$.length;p++){var _=$[p];if(!d.has(_)){d.add(_);var w=Xv(_);e.addEventListener(_,Ba,{passive:w});var y=Ha.get(_);y===void 0?(document.addEventListener(_,Ba,{passive:w}),Ha.set(_,1)):Ha.set(_,y+1)}}};l(ml(Xu)),fc.add(l);var u=void 0,v=Wv(()=>{var $=i!=null?i:e.appendChild(tn());return Qi(()=>{if(a){U({});var p=Mt;p.c=a}n&&(o.$$events=n),je&&xo($,null),Pl=s,u=t($,o)||{},Pl=!0,je&&(Ct.nodes_end=vt),a&&z()}),()=>{var w;for(var p of d){e.removeEventListener(p,Ba);var _=Ha.get(p);--_===0?(document.removeEventListener(p,Ba),Ha.delete(p)):Ha.set(p,_)}fc.delete(l),$!==i&&((w=$.parentNode)==null||w.removeChild($))}});return ep.set(u,v),u}var ep=new WeakMap;function Ks(t,e){let i=ep.get(t);return i?(ep.delete(t),i(e)):(Pe&&kv(),Promise.resolve())}function R(t,e,[i,o]=[0,0]){je&&i===0&&Fi();var n=t,a=null,s=null,d=Di,l=i>0?65536:0,u=!1;let v=(p,_=!0)=>{u=!0,$(_,p)},$=(p,_)=>{if(d===(d=p))return;let w=!1;if(je&&o!==-1){if(i===0){let C=n.data;C===ps?o=0:C===Vs?o=1/0:(o=parseInt(C.substring(1)),o!==o&&(o=d?1/0:-1))}let y=o>i;!!d===y&&(n=Pa(),bi(n),uo(!1),w=!0,o=-1)}d?(a?Jr(a):_&&(a=Qi(()=>_(n))),s&&$n(s,()=>{s=null})):(s?Jr(s):_&&(s=Qi(()=>_(n,[i+1,o]))),a&&$n(a,()=>{a=null})),w&&uo(!0)};po(()=>{u=!1,e(v),u||$(null,null)},l),je&&(n=vt)}function Qs(t,e,i){je&&Fi();var o=t,n=Di,a,s=Nr()?sv:Sa;po(()=>{s(n,n=e())&&(a&&$n(a),a=Qi(()=>i(o)))}),je&&(o=vt)}var hs=null;function np(t){hs=t}function Al(t,e){return e}function x0(t,e,i,o){for(var n=[],a=e.length,s=0;s<a;s++)cc(e[s].e,n,!0);var d=a>0&&n.length===0&&i!==null;if(d){var l=i.parentNode;$l(l),l.append(i),o.clear(),gs(t,e[0].prev,e[a-1].next)}Wu(n,()=>{for(var u=0;u<a;u++){var v=e[u];d||(o.delete(v.k),gs(t,v.prev,v.next)),co(v.e,!d)}})}function Ii(t,e,i,o,n,a=null){var s=t,d={flags:e,items:new Map,first:null},l=(e&4)!==0;if(l){var u=t;s=je?bi($i(u)):u.appendChild(tn())}je&&Fi();var v=null,$=!1,p=br(()=>{var _=i();return gr(_)?_:_==null?[]:ml(_)});po(()=>{var _=r(p),w=_.length;if($&&w===0)return;$=w===0;let y=!1;if(je){var C=s.data===Vs;C!==(w===0)&&(s=Pa(),bi(s),uo(!1),y=!0)}if(je){for(var T=null,E,P=0;P<w;P++){if(vt.nodeType===8&&vt.data===Rs){s=vt,y=!0,uo(!1);break}var A=_[P],I=o(A,P);E=ag(vt,d,T,null,A,I,P,n,e,i),d.items.set(I,E),T=E}w>0&&bi(Pa())}je||w0(_,d,s,n,e,o,i),a!==null&&(w===0?v?Jr(v):v=Qi(()=>a(s)):v!==null&&$n(v,()=>{v=null})),y&&uo(!0),r(p)}),je&&(s=vt)}function w0(t,e,i,o,n,a,s){var le,Ve,Me,be;var d=(n&8)!==0,l=(n&3)!==0,u=t.length,v=e.items,$=e.first,p=$,_,w=null,y,C=[],T=[],E,P,A,I;if(d)for(I=0;I<u;I+=1)E=t[I],P=a(E,I),A=v.get(P),A!==void 0&&((le=A.a)==null||le.measure(),(y!=null?y:y=new Set).add(A));for(I=0;I<u;I+=1){if(E=t[I],P=a(E,I),A=v.get(P),A===void 0){var V=p?p.e.nodes_start:i;w=ag(V,e,w,w===null?e.first:w.next,E,P,I,o,n,s),v.set(P,w),C=[],T=[],p=w.next;continue}if(l&&S0(A,E,I,n),(A.e.f&8192)!==0&&(Jr(A.e),d&&((Ve=A.a)==null||Ve.unfix(),(y!=null?y:y=new Set).delete(A))),A!==p){if(_!==void 0&&_.has(A)){if(C.length<T.length){var H=T[0],Y;w=H.prev;var O=C[0],J=C[C.length-1];for(Y=0;Y<C.length;Y+=1)rg(C[Y],H,i);for(Y=0;Y<T.length;Y+=1)_.delete(T[Y]);gs(e,O.prev,J.next),gs(e,w,O),gs(e,J,H),p=H,w=J,I-=1,C=[],T=[]}else _.delete(A),rg(A,p,i),gs(e,A.prev,A.next),gs(e,A,w===null?e.first:w.next),gs(e,w,A),w=A;continue}for(C=[],T=[];p!==null&&p.k!==P;)(p.e.f&8192)===0&&(_!=null?_:_=new Set).add(p),T.push(p),p=p.next;if(p===null)continue;A=p}C.push(A),w=A,p=A.next}if(p!==null||_!==void 0){for(var ne=_===void 0?[]:ml(_);p!==null;)(p.e.f&8192)===0&&ne.push(p),p=p.next;var Z=ne.length;if(Z>0){var me=(n&4)!==0&&u===0?i:null;if(d){for(I=0;I<Z;I+=1)(Me=ne[I].a)==null||Me.measure();for(I=0;I<Z;I+=1)(be=ne[I].a)==null||be.fix()}x0(e,ne,me,v)}}d&&Zo(()=>{var ae;if(y!==void 0)for(A of y)(ae=A.a)==null||ae.apply()}),Ct.first=e.first&&e.first.e,Ct.last=w&&w.e}function S0(t,e,i,o){(o&1)!==0&&Ia(t.v,e),(o&2)!==0?Ia(t.i,i):t.i=i}function ag(t,e,i,o,n,a,s,d,l,u){var v=hs,$=(l&1)!==0,p=(l&16)===0,_=$?p?Zr(n):Ki(n):n,w=(l&2)===0?s:Ki(s);Pe&&$&&(_.debug=()=>{var C=typeof w=="number"?s:w.v;u()[C]});var y={i:w,v:_,k:a,a:null,e:null,prev:i,next:o};hs=y;try{return y.e=Qi(()=>d(t,_,w,u),je),y.e.prev=i&&i.e,y.e.next=o&&o.e,i===null?e.first=y:(i.next=y,i.e.next=y.e),o!==null&&(o.prev=y,o.e.prev=y.e),y}finally{hs=v}}function rg(t,e,i){for(var o=t.next?t.next.e.nodes_start:i,n=e?e.e.nodes_start:i,a=t.e.nodes_start;a!==o;){var s=Lo(a);n.before(a),a=s}}function gs(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 C0(t,e,i){var a,s;if(!e||e===Gv(String(i!=null?i:"")))return;let o,n=(a=t.__svelte_meta)==null?void 0:a.loc;n?o=`near ${n.file}:${n.line}:${n.column}`:(s=nn)!=null&&s[_i]&&(o=`in ${nn[_i]}`),Iv(Yu(o))}function Ml(t,e,i,o,n){var a=t,s="",d;po(()=>{var l;if(s===(s=(l=e())!=null?l:"")){je&&Fi();return}d!==void 0&&(co(d),d=void 0),s!==""&&(d=Qi(()=>{if(je){for(var u=vt.data,v=Fi(),$=v;v!==null&&(v.nodeType!==8||v.data!=="");)$=v,v=Lo(v);if(v===null)throw Fs(),Kr;Pe&&!n&&C0(v.parentNode,u,s),xo(vt,$),a=bi(v);return}var p=s+"";i?p=`<svg>${p}</svg>`:o&&(p=`<math>${p}</math>`);var _=Oa(p);if((i||o)&&(_=$i(_)),xo($i(_),_.lastChild),i||o)for(;$i(_);)a.before($i(_));else a.before(_)}))})}function he(t,e,...i){var o=t,n=oe,a;po(()=>{n!==(n=e())&&(a&&(co(a),a=null),Pe&&n==null&&fv(),a=Qi(()=>n(o,...i)))},65536),je&&(o=vt)}function ki(t,e,i){je&&Fi();var o=t,n,a;po(()=>{n!==(n=e())&&(a&&($n(a),a=null),n&&(a=Qi(()=>i(o,n))))},65536),je&&(o=vt)}function Gs(t,e,i,o,n,a){var w;let s=je;je&&Fi();var d=Pe&&a&&((w=Mt)==null?void 0:w.function[_i]),l,u,v=null;je&&vt.nodeType===1&&(v=vt,Fi());var $=je?vt:t,p,_=hs;po(()=>{let y=e()||null;var C=n?n():i||y==="svg"?wu:null;if(y!==l){var T=hs;np(_),p&&(y===null?$n(p,()=>{p=null,u=null}):y===u?Jr(p):(co(p),mc(!1))),y&&y!==u&&(p=Qi(()=>{if(v=je?v:C?document.createElementNS(C,y):document.createElement(y),Pe&&a&&(v.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),xo(v,v),o){je&&Jv(y)&&v.append(document.createComment(""));var E=je?$i(v):v.appendChild(tn());je&&(E===null?uo(!1):bi(E)),o(v,E)}Ct.nodes_end=v,$.before(v)})),l=y,l&&(u=l),mc(!0),np(T)}},65536),s&&(uo(!0),bi($))}var sp;function lg(t){return sp=t.target,new rp(t)}var ts,rr,rp=class{constructor(e){us(this,ts);us(this,rr);var a,s;var i=new Map,o=(d,l)=>{var u=Zr(l);return i.set(d,u),u};let n=new Proxy(Dt(q({},e.props||{}),{$$events:{}}),{get(d,l){var u;return r((u=i.get(l))!=null?u:o(l,Reflect.get(d,l)))},has(d,l){var u;return l===fl?!0:(r((u=i.get(l))!=null?u:o(l,Reflect.get(d,l))),Reflect.has(d,l))},set(d,l,u){var v;return B((v=i.get(l))!=null?v:o(l,u),u),Reflect.set(d,l,u)}});wa(this,rr,(e.hydrate?tp:es)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&La(),wa(this,ts,n.$$events);for(let d of Object.keys(Ri(this,rr)))d==="$set"||d==="$destroy"||d==="$on"||ao(this,d,{get(){return Ri(this,rr)[d]},set(l){Ri(this,rr)[d]=l},enumerable:!0});Ri(this,rr).$set=d=>{Object.assign(n,d)},Ri(this,rr).$destroy=()=>{Ks(Ri(this,rr))}}$set(e){Ri(this,rr).$set(e)}$on(e,i){Ri(this,ts)[e]=Ri(this,ts)[e]||[];let o=(...n)=>i.call(this,...n);return Ri(this,ts)[e].push(o),()=>{Ri(this,ts)[e]=Ri(this,ts)[e].filter(n=>n!==o)}}$destroy(){Ri(this,rr).$destroy()}};ts=new WeakMap,rr=new WeakMap;function W(t,e){Zo(()=>{var n,a,s;var i=t.getRootNode(),o=i.host?i:(s=(n=i.head)!=null?n:i.ownerDocument.head)!=null?s:(a=sp)==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&&tg(e.hash,d)}})}function dg(t){var e,i,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(i=dg(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function cg(){for(var t,e,i=0,o="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=dg(t))&&(o&&(o+=" "),o+=e);return o}function Ll(t){return typeof t=="object"?cg(t):t!=null?t:""}var ug=[...`
48
- \r\f\xA0\v\uFEFF`];function fg(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var n in i)if(i[n])o=o?o+" "+n:n;else if(o.length)for(var a=n.length,s=0;(s=o.indexOf(n,s))>=0;){var d=s+a;(s===0||ug.includes(o[s-1]))&&(d===o.length||ug.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function pg(t,e=!1){var i=e?" !important;":";",o="";for(var n in t){var a=t[n];a!=null&&a!==""&&(o+=" "+n+": "+a+i)}return o}function ap(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function mg(t,e){if(e){var i="",o,n;if(Array.isArray(e)?(o=e[0],n=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,s=0,d=!1,l=[];o&&l.push(...Object.keys(o).map(ap)),n&&l.push(...Object.keys(n).map(ap));var u=0,v=-1;let y=t.length;for(var $=0;$<y;$++){var p=t[$];if(d?p==="/"&&t[$-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[$+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!d&&a===!1&&s===0){if(p===":"&&v===-1)v=$;else if(p===";"||$===y-1){if(v!==-1){var _=ap(t.substring(u,v).trim());if(!l.includes(_)){p!==";"&&$++;var w=t.substring(u,$).trim();i+=" "+w+";"}}u=$+1,v=-1}}}}return o&&(i+=pg(o)),n&&(i+=pg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function te(t,e,i,o,n,a){var s=t.__className;if(je||s!==i){var d=fg(i,o,a);(!je||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var u=!!a[l];(n==null||u!==!!n[l])&&t.classList.toggle(l,u)}return a}function lp(t,e={},i,o){for(var n in i){var a=i[n];e[n]!==a&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,a,o))}}function it(t,e,i,o){var n=t.__style;if(je||n!==e){var a=mg(e,o);(!je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(lp(t,i==null?void 0:i[0],o[0]),lp(t,i==null?void 0:i[1],o[1],"important")):lp(t,i,o));return o}var Fa=Symbol("class"),Ua=Symbol("style"),hg=Symbol("is custom element"),_g=Symbol("is html");function bg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Fe(t,e,i,o){var n=$g(t);if(je&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||M0(t,e,i!=null?i:"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[tv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&yg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ke(t,e,i,o,n=!1){var A;var a=$g(t),s=a[hg],d=!a[_g];let l=je&&s;l&&uo(!1);var u=e||{},v=t.tagName==="OPTION";for(var $ in e)$ in i||(i[$]=null);i.class?i.class=Ll(i.class):(o||i[Fa])&&(i.class=null),i[Ua]&&((A=i.style)!=null||(i.style=null));var p=yg(t);for(let I in i){let V=i[I];if(v&&I==="value"&&V==null){t.value=t.__value="",u[I]=V;continue}if(I==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";te(t,_,V,o,e==null?void 0:e[Fa],i[Fa]),u[I]=V,u[Fa]=i[Fa];continue}if(I==="style"){it(t,V,e==null?void 0:e[Ua],i[Ua]),u[I]=V,u[Ua]=i[Ua];continue}var w=u[I];if(V!==w){u[I]=V;var y=I[0]+I[1];if(y!=="$$")if(y==="on"){let H={},Y="$$"+I,O=I.slice(2);var C=Yv(O);if(jv(O)&&(O=O.slice(0,-7),H.capture=!0),!C&&w){if(V!=null)continue;t.removeEventListener(O,u[Y],H),u[Y]=null}if(V!=null)if(C)t[`__${O}`]=V,lt([O]);else{let J=function(ne){u[I].call(this,ne)};var P=J;u[Y]=Ju(O,t,J,H)}else C&&(t[`__${O}`]=void 0)}else if(I==="style")Fe(t,I,V);else if(I==="autofocus")Zu(t,!!V);else if(!s&&(I==="__value"||I==="value"&&V!=null))t.value=t.__value=V;else if(I==="selected"&&v)bg(t,V);else{var T=I;d||(T=Zv(T));var E=T==="defaultValue"||T==="defaultChecked";if(V==null&&!s&&!E)if(a[I]=null,T==="value"||T==="checked"){let H=t,Y=e===void 0;if(T==="value"){let O=H.defaultValue;H.removeAttribute(T),H.defaultValue=O,H.value=H.__value=Y?O:null}else{let O=H.defaultChecked;H.removeAttribute(T),H.defaultChecked=O,H.checked=Y?O:!1}}else t.removeAttribute(I);else E||p.includes(T)&&(s||typeof V!="string")?t[T]=V:typeof V!="function"&&Fe(t,T,V,n)}}}return l&&uo(!0),u}function $g(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[hg]:t.nodeName.includes("-"),[_g]:t.namespaceURI===Zm}}var vg=new Map;function yg(t){var e=vg.get(t.nodeName);if(e)return e;vg.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=jd(o);for(var a in i)i[a].set&&e.push(a);o=Gr(o)}return e}function M0(t,e,i){var o;Pe&&(e==="srcset"&&L0(t,i)||dp((o=t.getAttribute(e))!=null?o:"",i)||Tv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function dp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function gg(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function L0(t,e){var i=gg(t.srcset),o=gg(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(dp(i[s][0],n)||dp(n,i[s][0])))}var V0=Gd?()=>performance.now():()=>Date.now(),yr={tick:t=>(Gd?requestAnimationFrame:oe)(t),now:()=>V0(),tasks:new Set};function xg(){let t=yr.now();yr.tasks.forEach(e=>{e.c(t)||(yr.tasks.delete(e),e.f())}),yr.tasks.size!==0&&yr.tick(xg)}function wg(t){let e;return yr.tasks.size===0&&yr.tick(xg),{promise:new Promise(i=>{yr.tasks.add(e={c:t,f:i})}),abort(){yr.tasks.delete(e)}}}function vc(t,e){El(()=>{t.dispatchEvent(new CustomEvent(e))})}function B0(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 Sg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=B0(n.trim());e[s]=a.trim()}return e}var O0=t=>t;function up(t,e,i,o){var P;var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",u,v=e.inert,$=e.style.overflow,p,_;function w(){var V;var A=Ot,I=Ct;bo(null),lo(null);try{return u!=null?u:u=i()(e,(V=o==null?void 0:o())!=null?V:{},{direction:l})}finally{bo(A),lo(I)}}var y={is_global:d,in(){var A;if(e.inert=v,!n){_==null||_.abort(),(A=_==null?void 0:_.reset)==null||A.call(_);return}a||p==null||p.abort(),vc(e,"introstart"),p=cp(e,w(),_,1,()=>{vc(e,"introend"),p==null||p.abort(),p=u=void 0,e.style.overflow=$})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,vc(e,"outrostart"),_=cp(e,w(),p,0,()=>{vc(e,"outroend"),A==null||A()})},stop:()=>{p==null||p.abort(),_==null||_.abort()}},C=Ct;if(((P=C.transitions)!=null?P:C.transitions=[]).push(y),n&&Pl){var T=d;if(!T){for(var E=C.parent;E&&(E.f&65536)!==0;)for(;(E=E.parent)&&(E.f&16)===0;);T=!E||(E.f&32768)!==0}T&&bn(()=>{bt(()=>y.in())})}}function cp(t,e,i,o,n){var a=o===1;if(fs(e)){var s,d=!1;return Zo(()=>{if(!d){var C=e({direction:a?"in":"out"});s=cp(t,C,i,o,n)}}),{abort:()=>{d=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return n(),{abort:oe,deactivate:oe,reset:oe,t:()=>o};let{delay:l=0,css:u,tick:v,easing:$=O0}=e;var p=[];if(a&&i===void 0&&(v&&v(0,1),u)){var _=Sg(u(0,1));p.push(_,_)}var w=()=>1-o,y=t.animate(p,{duration:l});return y.onfinish=()=>{var O;var C=(O=i==null?void 0:i.t())!=null?O:1-o;i==null||i.abort();var T=o-C,E=e.duration*Math.abs(T),P=[];if(E>0){var A=!1;if(u)for(var I=Math.ceil(E/16.666666666666668),V=0;V<=I;V+=1){var H=C+T*$(V/I),Y=Sg(u(H,1-H));P.push(Y),A||(A=Y.overflow==="hidden")}A&&(t.style.overflow="hidden"),w=()=>{var J=y.currentTime;return C+T*$(J/E)},v&&wg(()=>{if(y.playState!=="running")return!1;var J=w();return v(J,1-J),!0})}y=t.animate(P,{duration:E,fill:"forwards"}),y.onfinish=()=>{w=()=>o,v==null||v(o,1-o),n()}},{abort:()=>{y&&(y.cancel(),y.effect=null,y.onfinish=oe)},deactivate:()=>{n=oe},reset:()=>{o===0&&(v==null||v(1,0))},t:()=>w()}}var _s,za,Vl,hc,Cg,_c=class _c{constructor(e){us(this,hc);us(this,_s,new WeakMap);us(this,za);us(this,Vl);wa(this,Vl,e)}observe(e,i){var o=Ri(this,_s).get(e)||new Set;return o.add(i),Ri(this,_s).set(e,o),jm(this,hc,Cg).call(this).observe(e,Ri(this,Vl)),()=>{var n=Ri(this,_s).get(e);n.delete(i),n.size===0&&(Ri(this,_s).delete(e),Ri(this,za).unobserve(e))}}};_s=new WeakMap,za=new WeakMap,Vl=new WeakMap,hc=new WeakSet,Cg=function(){var e;return(e=Ri(this,za))!=null?e:wa(this,za,new ResizeObserver(i=>{for(var o of i){_c.entries.set(o.target,o);for(var n of Ri(this,_s).get(o.target)||[])n(o)}}))},Nn(_c,"entries",new WeakMap);var pp=_c;var U0=new pp({box:"border-box"});function Or(t,e,i){var o=U0.observe(t,()=>i(t[e]));bn(()=>(bt(()=>i(t[e])),o))}function Tg(t,e){return t===e||(t==null?void 0:t[Ho])===e}function pt(t={},e,i,o){return bn(()=>{var n,a;return yo(()=>{n=a,a=(o==null?void 0:o())||[],bt(()=>{t!==i(...a)&&(e(t,...a),n&&Tg(i(...n),t)&&e(null,...n))})}),()=>{Zo(()=>{a&&Tg(i(...a),t)&&e(null,...a)})}}),t}function xr(t=!1){let e=Mt,i=e.l.u;if(!i)return;let o=()=>ac(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let u in l)l[u]!==a[u]&&(a[u]=l[u],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&Va(()=>{Ig(e,o),ms(i.b)}),We(()=>{let n=bt(()=>i.m.map(nv));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&We(()=>{Ig(e,o),ms(i.a)})}function Ig(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}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;gv(e)},set:o=>{i=o}})}};q0=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var q0;function Ut(t){Mt===null&&Ra("onMount"),Rr&&Mt.l!==null?z0(Mt).m.push(t):We(()=>{let e=bt(t);if(typeof e=="function")return e})}function yn(t){Mt===null&&Ra("onDestroy"),Ut(()=>()=>bt(t))}function z0(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}function Rl(t,e,i){if(t==null)return e(void 0),i&&i(void 0),oe;let o=bt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var qa=[];function sr(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=oe){let i=null,o=new Set;function n(d){if(Sa(t,d)&&(t=d,i)){let l=!qa.length;for(let u of o)u[1](),qa.push(u,t);if(l){for(let u=0;u<qa.length;u+=2)qa[u][0](qa[u+1]);qa.length=0}}}function a(d){n(d(t))}function s(d,l=oe){let u=[d,l];return o.add(u),o.size===1&&(i=e(n,a)||oe),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function yi(t,e,i){let o=!Array.isArray(t),n=o?[t]:t;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return sr(i,(s,d)=>{let l=!1,u=[],v=0,$=oe,p=()=>{if(v)return;$();let w=e(o?u[0]:u,s,d);a?s(w):$=typeof w=="function"?w:oe},_=n.map((w,y)=>Rl(w,C=>{u[y]=C,v&=~(1<<y),l&&p()},()=>{v|=1<<y}));return l=!0,p(),function(){ms(_),$(),l=!1}})}function Te(t){let e;return Rl(t,i=>e=i)(),e}var bc=!1,fp=Symbol();function S(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:Zr(void 0),unsubscribe:oe};if(o.store!==t&&!(fp in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=oe;else{var n=!0;o.unsubscribe=Rl(t,s=>{n?o.source.v=s:B(o.source,s)}),n=!1}return t&&fp in i?Te(t):r(o.source)}function Be(){let t={};function e(){rn(()=>{for(var i in t)t[i].unsubscribe();ao(t,fp,{enumerable:!1,value:!0})})}return[t,e]}function mp(t){var e=bc;try{return bc=!1,[t(),bc]}finally{bc=e}}var Z0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Pe&&vv(`${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 Ae(t,e,i){return new Proxy(Pe?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},Z0)}var X0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(fs(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 n=t.props[o];fs(n)&&(n=n());let a=Bn(n,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(fs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=Bn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===Ho||e===fl)return!1;for(let i of t.props)if(fs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){fs(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function is(...t){return new Proxy({props:t},X0)}function kg(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function f(t,e,i,o){var H,Y;var n=(i&1)!==0,a=!Rr||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,u;s?[u,l]=mp(()=>t[e]):u=t[e];var v=Ho in t||fl in t,$=s&&((Y=(H=Bn(t,e))==null?void 0:H.set)!=null?Y:v&&e in t&&(O=>t[e]=O))||void 0,p=o,_=!0,w=!1,y=()=>(w=!0,_&&(_=!1,d?p=bt(o):p=o),p);u===void 0&&o!==void 0&&($&&a&&mv(e),u=y(),$&&$(u));var C;if(a)C=()=>{var O=t[e];return O===void 0?y():(_=!0,w=!1,O)};else{var T=(n?m:br)(()=>t[e]);T.f|=131072,C=()=>{var O=r(T);return O!==void 0&&(p=void 0),O===void 0?p:O}}if((i&4)===0)return C;if($){var E=t.$$legacy;return function(O,J){return arguments.length>0?((!a||!J||E||l)&&$(J?C():O),O):C()}}var P=!1,A=!1,I=Zr(u),V=m(()=>{var O=C(),J=r(I);return P?(P=!1,A=!0,J):(A=!1,I.v=O)});return s&&r(V),n||(V.equals=Ca),function(O,J){if(hl!==null&&(P=A,C(),r(I)),arguments.length>0){let ne=J?r(V):a&&s?fe(O):O;if(!V.equals(ne)){if(P=!0,B(I,ne),w&&p!==void 0&&(p=ne),kg(V))return O;bt(()=>r(V))}return O}return kg(V)?V.v:r(V)}}var J0;typeof HTMLElement=="function"&&(J0=class extends HTMLElement{constructor(e,i,o){super();Nn(this,"$$ctor");Nn(this,"$$s");Nn(this,"$$c");Nn(this,"$$cn",!1);Nn(this,"$$d",{});Nn(this,"$$r",!1);Nn(this,"$$p_d",{});Nn(this,"$$l",{});Nn(this,"$$l_u",new Map);Nn(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 n=this.$$c.$on(e,i);this.$$l_u.set(i,n)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let n=this.$$l_u.get(i);n&&(n(),this.$$l_u.delete(i))}}connectedCallback(){return kt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return s=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(s,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},n=e_(this);for(let a of this.$$s)a in n&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let s=this.$$g_p(a.name);s in this.$$d||(this.$$d[s]=vp(s,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=lg({component:this.$$ctor,target:this.shadowRoot||this,props:Dt(q({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=dc(()=>{yo(()=>{var a;this.$$r=!0;for(let s of Su(this.$$c)){if(!((a=this.$$p_d[s])!=null&&a.reflect))continue;this.$$d[s]=this.$$c[s];let d=vp(s,this.$$d[s],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,d)}this.$$r=!1})});for(let a in this.$$l)for(let s of this.$$l[a]){let d=this.$$c.$on(a,s);this.$$l_u.set(s,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var n;this.$$r||(e=this.$$g_p(e),this.$$d[e]=vp(e,o,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$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 Su(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function vp(t,e,i,o){var a;let n=(a=i[t])==null?void 0:a.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(n){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(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function e_(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Eg="5";var Pg,Ag,Mg;typeof window!="undefined"&&((Mg=(Ag=(Pg=window.__svelte)!=null?Pg:window.__svelte={}).v)!=null?Mg:Ag.v=new Set).add(Eg);import{clientChecker as Pm}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as I1,safeStorage as Bx,throttleFn as Ox}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Hx}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as i_,fillWithDefault as o_,VideoQuality as Lg}from"@vkontakte/videoplayer-shared/es2015";var n_={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:i_.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:Lg.Q_480P,highQualityLimit:Lg.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,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,interactiveGraph:!1,interactiveResponsiveUi:!1,seekToInteractive:!0,interactiveLastFrame:!1,interactiveTextPermanent:!0,interactiveHideTime:!0,interactivePlayPrevChapter:!0,interactiveTimeIndicator:!0,interactiveTimeOpenUri:!1,interactiveAreaControlShadow:!1,interactiveControlsExpectTimeBlinkAnimation:!1,interactiveControlsTapPlace:!1,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,skipInitialPlaybackRateValue:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusAnimationDuration:1e3,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,playbackStatusNextVideoAnimationDuration:1e3},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,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}},Vg=t=>o_(t,n_),Rg=t=>Na("ui-config",t),zt=()=>Da("ui-config");var Dl="vk_player_debug_panel_opened";var Dg="videoplayer",Ng="videoplayer";var Hr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Bg=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Og=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Hg=new Set(["ShiftRight","ShiftLeft"]);var Fg=["TIMELINE"],Nl=[...Fg,"GRAPH_BUTTON"],gp=[...Fg,"PLAY_BUTTON"],Bl=[...Nl,"PLAY_BUTTON"];var Fr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(Fr||{}),Ys={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Ug,VERSION as r_}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as s_}from"@vkontakte/videoplayer-core/es2015";import{VERSION as a_}from"@vkontakte/videoplayer-statistics/es2015";var $c="prod",Wa="1.1.63-beta.2";var Zs=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var zg=Symbol("storeContext"),qg=Symbol("microStoresContext"),Wg=(t,e)=>{Na(zg,t),Na(qg,e),$c==="dev"&&(window.app={store:t,microStores:e})},Ie=()=>{let t=Da(zg);return Ug(t,"Store context is empty!"),t},fo=()=>{let t=Da(qg);return Ug(t,"MicroStores context is empty!"),t},Jt=(t,e)=>xc(t,t.getValue(),e),xc=(t,e,i)=>sr(e,o=>{let n=t.subscribe(a=>{o(a),i==null||i(a)});return()=>n.unsubscribe()}),Kg=(t,e,i)=>{var T,E,P,A,I,V;let o=t.info,{width:n,height:a}=Te(i.ui.playerSize),s=(E=(T=o.throughputEstimation$.getValue())==null?void 0:T.toFixed(0))!=null?E:0,d=(A=(P=o.rttEstimation$.getValue())==null?void 0:P.toFixed(0))!=null?A:0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",u=`${Wa} (core: ${s_}, stat: ${a_}, shared: ${r_})`,v=Te(i.state.errorLog$),$=v.length?`
48
+ \r\f\xA0\v\uFEFF`];function fg(t,e,i){var o=t==null?"":""+t;if(e&&(o=o?o+" "+e:e),i){for(var n in i)if(i[n])o=o?o+" "+n:n;else if(o.length)for(var a=n.length,s=0;(s=o.indexOf(n,s))>=0;){var d=s+a;(s===0||ug.includes(o[s-1]))&&(d===o.length||ug.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function pg(t,e=!1){var i=e?" !important;":";",o="";for(var n in t){var a=t[n];a!=null&&a!==""&&(o+=" "+n+": "+a+i)}return o}function ap(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function mg(t,e){if(e){var i="",o,n;if(Array.isArray(e)?(o=e[0],n=e[1]):o=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,s=0,d=!1,l=[];o&&l.push(...Object.keys(o).map(ap)),n&&l.push(...Object.keys(n).map(ap));var u=0,v=-1;let y=t.length;for(var $=0;$<y;$++){var p=t[$];if(d?p==="/"&&t[$-1]==="*"&&(d=!1):a?a===p&&(a=!1):p==="/"&&t[$+1]==="*"?d=!0:p==='"'||p==="'"?a=p:p==="("?s++:p===")"&&s--,!d&&a===!1&&s===0){if(p===":"&&v===-1)v=$;else if(p===";"||$===y-1){if(v!==-1){var _=ap(t.substring(u,v).trim());if(!l.includes(_)){p!==";"&&$++;var w=t.substring(u,$).trim();i+=" "+w+";"}}u=$+1,v=-1}}}}return o&&(i+=pg(o)),n&&(i+=pg(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function te(t,e,i,o,n,a){var s=t.__className;if(je||s!==i){var d=fg(i,o,a);(!je||d!==t.getAttribute("class"))&&(d==null?t.removeAttribute("class"):e?t.className=d:t.setAttribute("class",d)),t.__className=i}else if(a&&n!==a)for(var l in a){var u=!!a[l];(n==null||u!==!!n[l])&&t.classList.toggle(l,u)}return a}function lp(t,e={},i,o){for(var n in i){var a=i[n];e[n]!==a&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,a,o))}}function it(t,e,i,o){var n=t.__style;if(je||n!==e){var a=mg(e,o);(!je||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(lp(t,i==null?void 0:i[0],o[0]),lp(t,i==null?void 0:i[1],o[1],"important")):lp(t,i,o));return o}var Fa=Symbol("class"),Ua=Symbol("style"),hg=Symbol("is custom element"),_g=Symbol("is html");function bg(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Oe(t,e,i,o){var n=$g(t);if(je&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||M0(t,e,i!=null?i:"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[tv]=i),i==null?t.removeAttribute(e):typeof i!="string"&&yg(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function ke(t,e,i,o,n=!1){var A;var a=$g(t),s=a[hg],d=!a[_g];let l=je&&s;l&&uo(!1);var u=e||{},v=t.tagName==="OPTION";for(var $ in e)$ in i||(i[$]=null);i.class?i.class=Ll(i.class):(o||i[Fa])&&(i.class=null),i[Ua]&&((A=i.style)!=null||(i.style=null));var p=yg(t);for(let I in i){let V=i[I];if(v&&I==="value"&&V==null){t.value=t.__value="",u[I]=V;continue}if(I==="class"){var _=t.namespaceURI==="http://www.w3.org/1999/xhtml";te(t,_,V,o,e==null?void 0:e[Fa],i[Fa]),u[I]=V,u[Fa]=i[Fa];continue}if(I==="style"){it(t,V,e==null?void 0:e[Ua],i[Ua]),u[I]=V,u[Ua]=i[Ua];continue}var w=u[I];if(V!==w){u[I]=V;var y=I[0]+I[1];if(y!=="$$")if(y==="on"){let H={},Y="$$"+I,O=I.slice(2);var C=Yv(O);if(jv(O)&&(O=O.slice(0,-7),H.capture=!0),!C&&w){if(V!=null)continue;t.removeEventListener(O,u[Y],H),u[Y]=null}if(V!=null)if(C)t[`__${O}`]=V,lt([O]);else{let J=function(ne){u[I].call(this,ne)};var P=J;u[Y]=Ju(O,t,J,H)}else C&&(t[`__${O}`]=void 0)}else if(I==="style")Oe(t,I,V);else if(I==="autofocus")Zu(t,!!V);else if(!s&&(I==="__value"||I==="value"&&V!=null))t.value=t.__value=V;else if(I==="selected"&&v)bg(t,V);else{var T=I;d||(T=Zv(T));var E=T==="defaultValue"||T==="defaultChecked";if(V==null&&!s&&!E)if(a[I]=null,T==="value"||T==="checked"){let H=t,Y=e===void 0;if(T==="value"){let O=H.defaultValue;H.removeAttribute(T),H.defaultValue=O,H.value=H.__value=Y?O:null}else{let O=H.defaultChecked;H.removeAttribute(T),H.defaultChecked=O,H.checked=Y?O:!1}}else t.removeAttribute(I);else E||p.includes(T)&&(s||typeof V!="string")?t[T]=V:typeof V!="function"&&Oe(t,T,V,n)}}}return l&&uo(!0),u}function $g(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[hg]:t.nodeName.includes("-"),[_g]:t.namespaceURI===Zm}}var vg=new Map;function yg(t){var e=vg.get(t.nodeName);if(e)return e;vg.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=jd(o);for(var a in i)i[a].set&&e.push(a);o=Gr(o)}return e}function M0(t,e,i){var o;Pe&&(e==="srcset"&&L0(t,i)||dp((o=t.getAttribute(e))!=null?o:"",i)||Tv(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function dp(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function gg(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function L0(t,e){var i=gg(t.srcset),o=gg(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(dp(i[s][0],n)||dp(n,i[s][0])))}var V0=Gd?()=>performance.now():()=>Date.now(),yr={tick:t=>(Gd?requestAnimationFrame:oe)(t),now:()=>V0(),tasks:new Set};function xg(){let t=yr.now();yr.tasks.forEach(e=>{e.c(t)||(yr.tasks.delete(e),e.f())}),yr.tasks.size!==0&&yr.tick(xg)}function wg(t){let e;return yr.tasks.size===0&&yr.tick(xg),{promise:new Promise(i=>{yr.tasks.add(e={c:t,f:i})}),abort(){yr.tasks.delete(e)}}}function vc(t,e){El(()=>{t.dispatchEvent(new CustomEvent(e))})}function B0(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 Sg(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=B0(n.trim());e[s]=a.trim()}return e}var O0=t=>t;function up(t,e,i,o){var P;var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",u,v=e.inert,$=e.style.overflow,p,_;function w(){var V;var A=Ot,I=Ct;bo(null),lo(null);try{return u!=null?u:u=i()(e,(V=o==null?void 0:o())!=null?V:{},{direction:l})}finally{bo(A),lo(I)}}var y={is_global:d,in(){var A;if(e.inert=v,!n){_==null||_.abort(),(A=_==null?void 0:_.reset)==null||A.call(_);return}a||p==null||p.abort(),vc(e,"introstart"),p=cp(e,w(),_,1,()=>{vc(e,"introend"),p==null||p.abort(),p=u=void 0,e.style.overflow=$})},out(A){if(!a){A==null||A(),u=void 0;return}e.inert=!0,vc(e,"outrostart"),_=cp(e,w(),p,0,()=>{vc(e,"outroend"),A==null||A()})},stop:()=>{p==null||p.abort(),_==null||_.abort()}},C=Ct;if(((P=C.transitions)!=null?P:C.transitions=[]).push(y),n&&Pl){var T=d;if(!T){for(var E=C.parent;E&&(E.f&65536)!==0;)for(;(E=E.parent)&&(E.f&16)===0;);T=!E||(E.f&32768)!==0}T&&bn(()=>{bt(()=>y.in())})}}function cp(t,e,i,o,n){var a=o===1;if(fs(e)){var s,d=!1;return Zo(()=>{if(!d){var C=e({direction:a?"in":"out"});s=cp(t,C,i,o,n)}}),{abort:()=>{d=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return n(),{abort:oe,deactivate:oe,reset:oe,t:()=>o};let{delay:l=0,css:u,tick:v,easing:$=O0}=e;var p=[];if(a&&i===void 0&&(v&&v(0,1),u)){var _=Sg(u(0,1));p.push(_,_)}var w=()=>1-o,y=t.animate(p,{duration:l});return y.onfinish=()=>{var O;var C=(O=i==null?void 0:i.t())!=null?O:1-o;i==null||i.abort();var T=o-C,E=e.duration*Math.abs(T),P=[];if(E>0){var A=!1;if(u)for(var I=Math.ceil(E/16.666666666666668),V=0;V<=I;V+=1){var H=C+T*$(V/I),Y=Sg(u(H,1-H));P.push(Y),A||(A=Y.overflow==="hidden")}A&&(t.style.overflow="hidden"),w=()=>{var J=y.currentTime;return C+T*$(J/E)},v&&wg(()=>{if(y.playState!=="running")return!1;var J=w();return v(J,1-J),!0})}y=t.animate(P,{duration:E,fill:"forwards"}),y.onfinish=()=>{w=()=>o,v==null||v(o,1-o),n()}},{abort:()=>{y&&(y.cancel(),y.effect=null,y.onfinish=oe)},deactivate:()=>{n=oe},reset:()=>{o===0&&(v==null||v(1,0))},t:()=>w()}}var _s,za,Vl,hc,Cg,_c=class _c{constructor(e){us(this,hc);us(this,_s,new WeakMap);us(this,za);us(this,Vl);wa(this,Vl,e)}observe(e,i){var o=Ri(this,_s).get(e)||new Set;return o.add(i),Ri(this,_s).set(e,o),jm(this,hc,Cg).call(this).observe(e,Ri(this,Vl)),()=>{var n=Ri(this,_s).get(e);n.delete(i),n.size===0&&(Ri(this,_s).delete(e),Ri(this,za).unobserve(e))}}};_s=new WeakMap,za=new WeakMap,Vl=new WeakMap,hc=new WeakSet,Cg=function(){var e;return(e=Ri(this,za))!=null?e:wa(this,za,new ResizeObserver(i=>{for(var o of i){_c.entries.set(o.target,o);for(var n of Ri(this,_s).get(o.target)||[])n(o)}}))},Nn(_c,"entries",new WeakMap);var pp=_c;var U0=new pp({box:"border-box"});function Or(t,e,i){var o=U0.observe(t,()=>i(t[e]));bn(()=>(bt(()=>i(t[e])),o))}function Tg(t,e){return t===e||(t==null?void 0:t[Ho])===e}function pt(t={},e,i,o){return bn(()=>{var n,a;return yo(()=>{n=a,a=(o==null?void 0:o())||[],bt(()=>{t!==i(...a)&&(e(t,...a),n&&Tg(i(...n),t)&&e(null,...n))})}),()=>{Zo(()=>{a&&Tg(i(...a),t)&&e(null,...a)})}}),t}function xr(t=!1){let e=Mt,i=e.l.u;if(!i)return;let o=()=>ac(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let u in l)l[u]!==a[u]&&(a[u]=l[u],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&Va(()=>{Ig(e,o),ms(i.b)}),We(()=>{let n=bt(()=>i.m.map(nv));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&We(()=>{Ig(e,o),ms(i.a)})}function Ig(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}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;gv(e)},set:o=>{i=o}})}};q0=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var q0;function Ut(t){Mt===null&&Ra("onMount"),Rr&&Mt.l!==null?z0(Mt).m.push(t):We(()=>{let e=bt(t);if(typeof e=="function")return e})}function yn(t){Mt===null&&Ra("onDestroy"),Ut(()=>()=>bt(t))}function z0(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}function Rl(t,e,i){if(t==null)return e(void 0),i&&i(void 0),oe;let o=bt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var qa=[];function sr(t,e){return{subscribe:de(t,e).subscribe}}function de(t,e=oe){let i=null,o=new Set;function n(d){if(Sa(t,d)&&(t=d,i)){let l=!qa.length;for(let u of o)u[1](),qa.push(u,t);if(l){for(let u=0;u<qa.length;u+=2)qa[u][0](qa[u+1]);qa.length=0}}}function a(d){n(d(t))}function s(d,l=oe){let u=[d,l];return o.add(u),o.size===1&&(i=e(n,a)||oe),d(t),()=>{o.delete(u),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function yi(t,e,i){let o=!Array.isArray(t),n=o?[t]:t;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return sr(i,(s,d)=>{let l=!1,u=[],v=0,$=oe,p=()=>{if(v)return;$();let w=e(o?u[0]:u,s,d);a?s(w):$=typeof w=="function"?w:oe},_=n.map((w,y)=>Rl(w,C=>{u[y]=C,v&=~(1<<y),l&&p()},()=>{v|=1<<y}));return l=!0,p(),function(){ms(_),$(),l=!1}})}function Te(t){let e;return Rl(t,i=>e=i)(),e}var bc=!1,fp=Symbol();function S(t,e,i){var a;let o=(a=i[e])!=null?a:i[e]={store:null,source:Zr(void 0),unsubscribe:oe};if(o.store!==t&&!(fp in i))if(o.unsubscribe(),o.store=t!=null?t:null,t==null)o.source.v=void 0,o.unsubscribe=oe;else{var n=!0;o.unsubscribe=Rl(t,s=>{n?o.source.v=s:B(o.source,s)}),n=!1}return t&&fp in i?Te(t):r(o.source)}function Be(){let t={};function e(){rn(()=>{for(var i in t)t[i].unsubscribe();ao(t,fp,{enumerable:!1,value:!0})})}return[t,e]}function mp(t){var e=bc;try{return bc=!1,[t(),bc]}finally{bc=e}}var Z0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return Pe&&vv(`${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 Ae(t,e,i){return new Proxy(Pe?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},Z0)}var X0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(fs(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 n=t.props[o];fs(n)&&(n=n());let a=Bn(n,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(fs(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=Bn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===Ho||e===fl)return!1;for(let i of t.props)if(fs(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){fs(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function is(...t){return new Proxy({props:t},X0)}function kg(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function f(t,e,i,o){var H,Y;var n=(i&1)!==0,a=!Rr||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,u;s?[u,l]=mp(()=>t[e]):u=t[e];var v=Ho in t||fl in t,$=s&&((Y=(H=Bn(t,e))==null?void 0:H.set)!=null?Y:v&&e in t&&(O=>t[e]=O))||void 0,p=o,_=!0,w=!1,y=()=>(w=!0,_&&(_=!1,d?p=bt(o):p=o),p);u===void 0&&o!==void 0&&($&&a&&mv(e),u=y(),$&&$(u));var C;if(a)C=()=>{var O=t[e];return O===void 0?y():(_=!0,w=!1,O)};else{var T=(n?m:br)(()=>t[e]);T.f|=131072,C=()=>{var O=r(T);return O!==void 0&&(p=void 0),O===void 0?p:O}}if((i&4)===0)return C;if($){var E=t.$$legacy;return function(O,J){return arguments.length>0?((!a||!J||E||l)&&$(J?C():O),O):C()}}var P=!1,A=!1,I=Zr(u),V=m(()=>{var O=C(),J=r(I);return P?(P=!1,A=!0,J):(A=!1,I.v=O)});return s&&r(V),n||(V.equals=Ca),function(O,J){if(hl!==null&&(P=A,C(),r(I)),arguments.length>0){let ne=J?r(V):a&&s?fe(O):O;if(!V.equals(ne)){if(P=!0,B(I,ne),w&&p!==void 0&&(p=ne),kg(V))return O;bt(()=>r(V))}return O}return kg(V)?V.v:r(V)}}var J0;typeof HTMLElement=="function"&&(J0=class extends HTMLElement{constructor(e,i,o){super();Nn(this,"$$ctor");Nn(this,"$$s");Nn(this,"$$c");Nn(this,"$$cn",!1);Nn(this,"$$d",{});Nn(this,"$$r",!1);Nn(this,"$$p_d",{});Nn(this,"$$l",{});Nn(this,"$$l_u",new Map);Nn(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 n=this.$$c.$on(e,i);this.$$l_u.set(i,n)}super.addEventListener(e,i,o)}removeEventListener(e,i,o){if(super.removeEventListener(e,i,o),this.$$c){let n=this.$$l_u.get(i);n&&(n(),this.$$l_u.delete(i))}}connectedCallback(){return kt(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return s=>{let d=document.createElement("slot");a!=="default"&&(d.name=a),b(s,d)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let o={},n=e_(this);for(let a of this.$$s)a in n&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),o.default=!0):o[a]=i(a));for(let a of this.attributes){let s=this.$$g_p(a.name);s in this.$$d||(this.$$d[s]=vp(s,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=lg({component:this.$$ctor,target:this.shadowRoot||this,props:Dt(q({},this.$$d),{$$slots:o,$$host:this})}),this.$$me=dc(()=>{yo(()=>{var a;this.$$r=!0;for(let s of Su(this.$$c)){if(!((a=this.$$p_d[s])!=null&&a.reflect))continue;this.$$d[s]=this.$$c[s];let d=vp(s,this.$$d[s],this.$$p_d,"toAttribute");d==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,d)}this.$$r=!1})});for(let a in this.$$l)for(let s of this.$$l[a]){let d=this.$$c.$on(a,s);this.$$l_u.set(s,d)}this.$$l={}}})}attributeChangedCallback(e,i,o){var n;this.$$r||(e=this.$$g_p(e),this.$$d[e]=vp(e,o,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$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 Su(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function vp(t,e,i,o){var a;let n=(a=i[t])==null?void 0:a.type;if(e=n==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!i[t])return e;if(o==="toAttribute")switch(n){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(n){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function e_(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Eg="5";var Pg,Ag,Mg;typeof window!="undefined"&&((Mg=(Ag=(Pg=window.__svelte)!=null?Pg:window.__svelte={}).v)!=null?Mg:Ag.v=new Set).add(Eg);import{clientChecker as Pm}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{noop as I1,safeStorage as Bx,throttleFn as Ox}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Hx}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as i_,fillWithDefault as o_,VideoQuality as Lg}from"@vkontakte/videoplayer-shared/es2015";var n_={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:i_.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:Lg.Q_480P,highQualityLimit:Lg.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,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,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,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,skipInitialPlaybackRateValue:!1,qualityDetailsSubMenuEnabled:!1,showSlowVideoNotification:!1,forceAutoQualityWhenSevereStallHappens:!1,timeoutShowSlowVideoNotification:0,maxCountShowSlowVideoNotification:1,forcePlayerDisplayBlock:!1,playbackStatusAnimationDuration:1e3,playbackStatusShow:!1,playbackStatusNextVideoShow:!1,playbackStatusNextVideoAnimationDuration:1e3},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,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}},Vg=t=>o_(t,n_),Rg=t=>Na("ui-config",t),zt=()=>Da("ui-config");var Dl="vk_player_debug_panel_opened";var Dg="videoplayer",Ng="videoplayer";var Hr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Bg=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Og=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Hg=new Set(["ShiftRight","ShiftLeft"]);var Fg=["TIMELINE"],Nl=[...Fg,"GRAPH_BUTTON"],gp=[...Fg,"PLAY_BUTTON"],Bl=[...Nl,"PLAY_BUTTON"];var Fr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(Fr||{}),Ys={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as Ug,VERSION as r_}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as s_}from"@vkontakte/videoplayer-core/es2015";import{VERSION as a_}from"@vkontakte/videoplayer-statistics/es2015";var $c="prod",Wa="1.1.64-dev.1ed690e2.0";var Zs=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var zg=Symbol("storeContext"),qg=Symbol("microStoresContext"),Wg=(t,e)=>{Na(zg,t),Na(qg,e),$c==="dev"&&(window.app={store:t,microStores:e})},Ie=()=>{let t=Da(zg);return Ug(t,"Store context is empty!"),t},fo=()=>{let t=Da(qg);return Ug(t,"MicroStores context is empty!"),t},Jt=(t,e)=>xc(t,t.getValue(),e),xc=(t,e,i)=>sr(e,o=>{let n=t.subscribe(a=>{o(a),i==null||i(a)});return()=>n.unsubscribe()}),Kg=(t,e,i)=>{var T,E,P,A,I,V;let o=t.info,{width:n,height:a}=Te(i.ui.playerSize),s=(E=(T=o.throughputEstimation$.getValue())==null?void 0:T.toFixed(0))!=null?E:0,d=(A=(P=o.rttEstimation$.getValue())==null?void 0:P.toFixed(0))!=null?A:0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",u=`${Wa} (core: ${s_}, stat: ${a_}, shared: ${r_})`,v=Te(i.state.errorLog$),$=v.length?`
49
49
  `+v.map((H,Y)=>{var Z;let O=`${Y}) Type: ${H.id}
50
50
  `,J=`Message: ${H.message} (${H.thrown})
51
51
  `,ne=`Trace: ${(Z=H.thrown)==null?void 0:Z.stack}
@@ -139,9 +139,9 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
139
139
  transform: scaleY(0.6);
140
140
  }
141
141
  }.text.svelte-1s15d2i {font-size:13px;line-height:16px;color:var(--controls-time);font-weight:500;}`};function Wl(t,e){W(t,O_);let i=f(e,"withEqualizer",3,!1),o=f(e,"isLive",3,!1),n=f(e,"isPlaying",3,!1);var a=B_();let s;var d=h(a);{var l=p=>{var _=R_();b(p,_)};R(d,p=>{i()&&p(l)})}var u=M(d,2);{var v=p=>{var _=D_(),w=h(_);ql(w,{isActive:!0}),g(_),b(p,_)},$=p=>{var _=N_(),w=h(_,!0);g(_),k(()=>ge(w,e.time)),b(p,_)};R(u,p=>{o()?p(v):p($,!1)})}g(a),k(p=>s=te(a,1,"wrapper svelte-1s15d2i",null,s,p),[()=>({live:o(),playing:n()})]),b(t,a)}var H_=L('<div role="timer" data-testid="thumb-timer"><!></div>'),F_={hash:"svelte-1b40w20",code:`.thumb-timer.svelte-1b40w20 {position:absolute;z-index:var(--thumb-timer-z-index);bottom:0;right:0;margin:8px;transition:visibility var(--controls-transition-duration),
142
- opacity var(--controls-transition-duration);}.thumb-timer.hidden.svelte-1b40w20 {visibility:hidden;opacity:0;}`};function Kl(t,e){U(e,!0),W(t,F_);let i=f(e,"isHidden",3,!1),o=f(e,"isLive",3,!1),n=f(e,"isPlaying",3,!1),a=m(()=>sn(e.duration-e.position));var s=H_();let d;var l=h(s);Wl(l,{get time(){return r(a)},get isLive(){return o()},get isPlaying(){return n()},withEqualizer:!0}),g(s),k(u=>d=te(s,1,"thumb-timer svelte-1b40w20",null,d,u),[()=>({hidden:i()})]),b(t,s),z()}var Qa=t=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}};import{ChromecastState as X_}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as Th}from"@vkontakte/videoplayer-core/es2015";var ar=t=>{t.stopPropagation(),t.preventDefault()},z_=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},q_=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},W_=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},K_=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},Ih=t=>t.code==="Escape",Q_=t=>t.code==="ArrowLeft",Ql=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},kh=t=>{if(W_(t)){ar(t),q_(t.target);return}K_(t)&&(ar(t),z_(t.target))},xs=t=>!Th.device.isAndroid&&(t==null?void 0:t.detail)===0||Th.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ga=(t,e,i)=>kt(void 0,null,function*(){yield $o(),t&&!t.classList.contains("opened")&&!e&&Te(i)&&(yield $o(),i.set(!1),t.focus())}),Eh=(t,e,i)=>kt(void 0,null,function*(){yield $o(),t&&!e&&Te(i)&&(i.set(!1),t.focus())}),ja=(t,e,i)=>kt(void 0,null,function*(){var n;yield $o(),!!t&&e&&i&&((n=t.children[0])==null||n.focus())}),Ph=(t,e)=>kt(void 0,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Rc=(t,e)=>{kh(t),Ih(t)&&(ar(t),e())},Dc=(t,e)=>kt(void 0,null,function*(){Ql(t,["ArrowRight"])&&(ar(t),e())}),Ah=(t,e,i)=>kt(void 0,null,function*(){if(kh(t),Q_(t)){ar(t),e();return}Ih(t)&&(ar(t),i())}),Ya=(t,e)=>{Ql(t)&&(ar(t),e())},Mh=(t,e,i)=>{if(Ql(t))ar(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),ar(t);return}o==="ArrowRight"&&!e&&(i(!0),ar(t))}},Lh=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,n=e.top+i;return{right:o,bottom:n}},Vh=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,n=e.left+o;return{bottom:e.bottom+i,left:n}};import{isNullable as Nc,isValidURL as J_}from"@vkontakte/videoplayer-shared/es2015";var wr={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as Rh}from"@vkontakte/videoplayer-shared/es2015";var j_=(t,e)=>{Ya(t,()=>e())},Y_=L('<li class="item svelte-1hm4mm9" role="menuitem" tabindex="0"> </li>'),Z_={hash:"svelte-1hm4mm9",code:".item.svelte-1hm4mm9 {padding:8px 16px;cursor:pointer;position:relative;display:block;color:rgba(255, 255, 255, 0.72);font-size:13px;line-height:18px;letter-spacing:-0.14px;white-space:nowrap;}.item.svelte-1hm4mm9:hover {background:rgba(66, 66, 66, .5);color:var(--white);}"};function Hp(t,e){U(e,!0),W(t,Z_);let i=f(e,"onClick",3,Rh),o=f(e,"closeContextMenu",3,Rh),n=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=Y_();a.__click=n,a.__keydown=[j_,n];var s=h(a,!0);g(a),k(()=>{var d;Fe(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Fe(a,"data-testid",e.id),ge(s,e.label)}),b(t,a),z()}lt(["click","keydown"]);var ia=(t,e)=>t.weight-e.weight;var Gl=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Gl||{});var eb=(t,e)=>{Rc(t,e)},tb=t=>{t.preventDefault()},ib=L('<ul role="menu" class="svelte-1p5ukkp"></ul>'),ob={hash:"svelte-1p5ukkp",code:"ul.svelte-1p5ukkp {position:absolute;z-index:var(--context-menu-z-index);border-radius:8px;background:rgba(0, 0, 0, 0.72);transition:visibility .1s,opacity .1s;list-style:none;margin:0;padding:6px 0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;}"};function Fp(t,e){U(e,!0),W(t,ob);let[i,o]=Be(),n=()=>S(Z,"$isLive$",i),a=()=>S(Me,"$isPiPEnabled$",i),s=()=>S(ne,"$chromecastState$",i),d=()=>S(be,"$pictureInPictureApiIsActive$",i),l=()=>S(Ve,"$isLooped$",i),u=()=>S(me,"$positionExact$",i),v=()=>S(H,"$debugPanelVisible",i),$=()=>S(Y,"$additionalContextMenuItems$",i),p=f(e,"visible",3,!1),_=f(e,"position",19,()=>({top:0,left:0})),w=f(e,"playerContainerRef",3,void 0),y=f(e,"controlsContainerRef",3,void 0),C=f(e,"menuElementRef",15,void 0),T=ee(0),E=ee(0),P=Ie(),{pictureInPicture$:A}=fo(),I=zt(),V=P.ui.contextMenu.visible$,H=P.ui.debugPanelVisible,Y=P.ui.additionalContextMenuItems$,O=P.ui.t,J=P.actions.internal.togglePictureInPicture,ne=P.state.chromecastState$,Z=P.state.isLive$,me=P.state.positionExact$,le=P.state.isInteractive,Ve=P.state.looped$,{isEnabled$:Me,isActive$:be}=A,ae=m(()=>{var Ye;return I.features.copyVideoLink&&((Ye=P.callbacks)==null?void 0:Ye.onCopyVideoLink)}),Le=m(()=>r(ae)&&!n()&&!le),re=m(()=>{var Ye;return!!((Ye=P.callbacks)!=null&&Ye.onCopyEmbedCodeClicked)}),N=m(()=>a()&&s()!==X_.CONNECTED&&!le),pe=m(()=>I.features.videoRotate&&!le),_e=m(()=>I.showSupport&&!d()),Ge=m(()=>I.features.saveTraceInfoToFile),ie=()=>{var Ye;V.set(!1),(Ye=e.returnFocus)==null||Ye.call(e)},G=(Ye,Ze)=>{if(!C()||!w()||!y())return;let nt=C().getBoundingClientRect(),He=w().getBoundingClientRect();B(T,Ye-He.left),B(E,Ze-He.top),r(T)+nt.width>He.width&&B(T,He.width-nt.width),r(E)+nt.height>He.height&&B(E,He.height-nt.height),B(T,fe(Math.max(r(T),0))),B(E,fe(Math.max(r(E),0)))};We(()=>{kt(this,null,function*(){if(C()&&w()&&y()){yield $o();let{top:Ze,left:nt,bottom:He,right:$t}=_(),qe=nt!=null?nt:0,dt=Ze!=null?Ze:0,Xt=C().getBoundingClientRect();Nc(nt)&&!Nc($t)&&(qe=$t-Xt.width),Nc(Ze)&&!Nc(He)&&(dt=He-Xt.height),qe=Math.max(qe,0),dt=Math.max(dt,0),G(qe,dt)}})});let K=()=>{P.actions.internal.videoRotate()},Re=()=>{J_(e.supportLink)&&window.open(e.supportLink,"_blank"),P.actions.internal.reportProblem(),P.actions.internal.pause()},Ne=()=>{let Ye=P.actions.internal.getDebugTextData();if(I.features.saveDebugInfoToFile){let Ze=new Blob([...Ye],{type:"plain/text"}),nt=window.URL.createObjectURL(Ze);Zs(nt,"vk_player_debug_info","txt")}else Qa(P.actions.internal.getDebugTextData())},et=()=>{let Ye=P.actions.internal.getTraceTextData(),Ze=new Blob([...Ye],{type:"application/json"}),nt=window.URL.createObjectURL(Ze);Zs(nt,"vk_player_trace_info","json")},we=()=>{H.set(!0)},Se=()=>kt(this,null,function*(){var Ye;try{J()}finally{(Ye=e.returnFocus)==null||Ye.call(e)}}),De=()=>{P.actions.internal.setLooped(!l())},Xe=()=>{var Ye,Ze;if(r(re)){let nt=(Ze=(Ye=P.callbacks)==null?void 0:Ye.onCopyEmbedCodeClicked)==null?void 0:Ze.call(Ye);nt&&Qa(nt)}},ot=(Ye=!1)=>{var Ze,nt;if((Ze=P.callbacks)!=null&&Ze.onCopyVideoLink){let He=(nt=P.callbacks)==null?void 0:nt.onCopyVideoLink(Ye,u());He&&Qa(He)}},ft=m(()=>I.features.saveDebugInfoToFile?O("menu_save_debug"):O("menu_copy_debug")),Je=m(()=>r(ae)?{id:"copy-link",weight:wr["copy-link"],label:O("menu_copy_video_link"),onClick:()=>ot()}:void 0),gt=m(()=>r(Le)?{id:"copy-link-timestamp",weight:wr["copy-link-timestamp"],label:O("menu_copy_video_link_with_timestamp"),onClick:()=>ot(!0)}:void 0),Et=m(()=>r(re)?{id:"copy-embed-code",weight:wr["copy-embed-code"],label:O("menu_copy_embed_code"),onClick:Xe}:void 0),jt=m(()=>r(N)?{id:"pip",weight:wr.pip,label:O("menu_pip"),onClick:Se}:void 0),qt=m(()=>({id:"video-loop",weight:wr["video-loop"],label:l()?O("menu_video_loop_off"):O("menu_video_loop_on"),ariaLabel:O("aria_label_menu_loop"),onClick:De})),Wt=m(()=>r(pe)?{id:"rotate",weight:wr.rotate,label:O("menu_video_rotate"),ariaLabel:O("aria_label_menu_rotate"),onClick:K}:void 0),ve=m(()=>r(_e)?{id:"report",weight:wr.report,label:O("menu_report"),ariaLabel:`${O("menu_report")}. ${O("aria_label_new_tab_alert")}`,onClick:Re}:void 0),j=m(()=>({id:"save-debug",weight:wr["save-debug"],label:r(ft),onClick:Ne})),Ce=m(()=>r(Ge)?{id:"save-trace",weight:wr["save-trace"],label:O("menu_save_debug"),onClick:et}:void 0),se=m(()=>({id:"debug-info",weight:wr["debug-info"],label:O("menu_debug_overlay"),ariaLabel:v()?O("aria_label_menu_debug_overlay_disable"):O("aria_label_menu_debug_overlay_enable"),onClick:we})),Oe=m(()=>[r(Je),r(gt),r(Et),r(jt),r(qt),r(Wt),r(ve),r(j),r(Ce),r(se),...$()].filter(Ye=>!!Ye).sort(ia));var Ue=ze(),tt=ue(Ue);{var ct=Ye=>{var Ze=ib();Ze.__contextmenu=[tb],Ze.__keydown=[eb,ie],Ii(Ze,21,()=>r(Oe),nt=>nt.id,(nt,He)=>{Hp(nt,{get id(){return r(He).id},get label(){return r(He).label},get ariaLabel(){return r(He).ariaLabel},get onClick(){return r(He).onClick},closeContextMenu:ie})}),g(Ze),pt(Ze,nt=>C(nt),()=>C()),k(()=>{var nt,He;return it(Ze,`top: ${(nt=r(E))!=null?nt:""}px; left: ${(He=r(T))!=null?He:""}px;`)}),b(Ye,Ze)};R(tt,Ye=>{p()&&Ye(ct)})}b(t,Ue),z(),o()}lt(["contextmenu","keydown"]);var Bc=class{constructor(e){this.value=e,this.next=null}};var Za=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Bc(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 nb=L('<div class="container svelte-1ssl9eb"><canvas class="svelte-1ssl9eb"></canvas></div>'),rb={hash:"svelte-1ssl9eb",code:".container.svelte-1ssl9eb {display:inline-block;width:120px;height:16px;}canvas.svelte-1ssl9eb {transform:scale(1, -1);margin-top:2px;}"};function jl(t,e){U(e,!0),W(t,rb);let i=f(e,"values",19,()=>[]),o=ee(void 0),n=ee(null),a=16,s=120,d=60,l=s/d;Ut(()=>{r(o).width=s,r(o).height=a,B(n,fe(r(o).getContext("2d")))});function u(p,_,w,y,C){C===0&&(C=1),p.fillStyle="#fff",p.fillRect(_,w,y,C)}We(()=>{let p="";if(r(n)){let _=i()[0];for(let y=1;y<i().length;y++)i()[y]>_&&(_=i()[y]);r(n).clearRect(0,0,s,a);let w=d-1;for(let y=i().length-1;y>=0;y--){let C=w*l,T=_>0?a*(i()[y]/_):0;u(r(n),C,0,l,T),p=T+" "+p,w--}}});var v=nb(),$=h(v);pt($,p=>B(o,p),()=>r(o)),g(v),b(t,v),z()}import{safeStorage as Dh}from"@vkontakte/videoplayer-shared/es2015";var sb=(t,e)=>{t.stopPropagation(),Dh.remove(Dl),e.set(!1)},ab=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Video id</div> <span> </span></div>'),lb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">VSID</div> <span> </span></div>'),db=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Provider</div> <span> </span></div>'),cb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Streams</div> <span> </span></div>'),ub=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Viewport</div> <span> </span></div>'),pb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Video size</div> <span> </span></div>'),fb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">CDN host</div> <span> </span></div>'),mb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Volume</div> <span> </span></div>'),vb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Buffer</div> <span> </span></div>'),gb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Live latency</div> <span> </span></div>'),hb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Segment</div> <span> </span></div>'),_b=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Network</div> <!> <span> </span></div>'),bb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">V bitrate</div> <!> <span> </span></div>'),$b=L('<div role="region"><button class="close svelte-4deykz" title="\u0437\u0430\u043A\u0440\u044B\u0442\u044C">[x]</button> <div class="content svelte-4deykz"><div class="svelte-4deykz"><div class="svelte-4deykz">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">Dropped</div> <span> </span></div> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">FPS</div> <!> <span> </span></div></div></div>'),yb={hash:"svelte-4deykz",code:".container.svelte-4deykz {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}.container-mobile.svelte-4deykz {top:16px;left:16px;}button.svelte-4deykz {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.svelte-4deykz {padding:5px;}.content.svelte-4deykz > div:where(.svelte-4deykz) > div:where(.svelte-4deykz) {display:inline-block;text-align:right;width:60px;padding:0 5px;}"};function Yl(t,e){U(e,!0),W(t,yb);let[i,o]=Be(),n=()=>S(d,"$isMobile",i),a=Ie(),s=a.ui.debugPanelVisible,d=a.ui.isMobile,l=ee(fe(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),v=ee(0),$=ee(0),p=ee(0),_=new Za(60),w=new Za(60),y=new Za(60),C=ee(fe([])),T=ee(fe([])),E=ee(fe([])),P=F("aria_label_debug_panel");Ut(()=>{Dh.set(Dl,"true"),a.actions.internal.startLogging(),u&&(B($,fe(u.getVideoPlaybackQuality().droppedVideoFrames)),B(v,fe(u.getVideoPlaybackQuality().totalVideoFrames)));let j=window.setInterval(()=>{B(l,fe(a.actions.internal.getDebugPanelData()))},500),Ce;return u&&(Ce=window.setInterval(()=>{if(u){B($,fe(u.getVideoPlaybackQuality().droppedVideoFrames));let se=u.getVideoPlaybackQuality().totalVideoFrames;B(p,se-r(v)),B(v,fe(se)),_.push(r(p)),r(l).speed&&w.push(r(l).speed),r(l).bitrate&&y.push(r(l).bitrate),B(C,fe(_.getValuesFromBottom())),B(T,fe(w.getValuesFromBottom())),B(E,fe(y.getValuesFromBottom()))}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(j),Ce&&clearInterval(Ce)}});var A=$b();let I;Fe(A,"aria-label",P);var V=h(A);V.__click=[sb,s];var H=M(V,2),Y=h(H),O=M(h(Y),2),J=h(O,!0);g(O),g(Y);var ne=M(Y,2);{var Z=j=>{var Ce=ab(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(()=>ge(Oe,r(l).id)),b(j,Ce)};R(ne,j=>{r(l).id&&j(Z)})}var me=M(ne,2);{var le=j=>{var Ce=lb(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(()=>ge(Oe,r(l).vsid)),b(j,Ce)};R(me,j=>{r(l).vsid&&j(le)})}var Ve=M(me,2);{var Me=j=>{var Ce=db(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(()=>ge(Oe,r(l).provider)),b(j,Ce)};R(Ve,j=>{r(l).provider&&j(Me)})}var be=M(Ve,2);{var ae=j=>{var Ce=cb(),se=M(h(Ce),2),Oe=h(se);g(se),g(Ce),k(()=>{var Ue,tt;return ge(Oe,`Video: ${r(l).videoCodec||""} ${(Ue=r(l).hdr?"(HDR)":"")!=null?Ue:""}
142
+ opacity var(--controls-transition-duration);}.thumb-timer.hidden.svelte-1b40w20 {visibility:hidden;opacity:0;}`};function Kl(t,e){U(e,!0),W(t,F_);let i=f(e,"isHidden",3,!1),o=f(e,"isLive",3,!1),n=f(e,"isPlaying",3,!1),a=m(()=>sn(e.duration-e.position));var s=H_();let d;var l=h(s);Wl(l,{get time(){return r(a)},get isLive(){return o()},get isPlaying(){return n()},withEqualizer:!0}),g(s),k(u=>d=te(s,1,"thumb-timer svelte-1b40w20",null,d,u),[()=>({hidden:i()})]),b(t,s),z()}var Qa=t=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy")){let e=document.createElement("textarea");e.textContent=t,e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e),e.select();try{document.execCommand("copy")}finally{document.body.removeChild(e)}}};import{ChromecastState as X_}from"@vkontakte/videoplayer-core/es2015";import{clientChecker as Th}from"@vkontakte/videoplayer-core/es2015";var ar=t=>{t.stopPropagation(),t.preventDefault()},z_=t=>{var i;let e=t.previousElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.lastElementChild),e==null||e.focus()},q_=t=>{var i;let e=t.nextElementSibling;e||(e=(i=t.parentNode)==null?void 0:i.firstElementChild),e==null||e.focus()},W_=t=>{let e=t.code;return e==="Tab"&&!t.shiftKey||e==="ArrowDown"},K_=t=>{let e=t.code;return e==="Tab"||e==="ArrowUp"},Ih=t=>t.code==="Escape",Q_=t=>t.code==="ArrowLeft",Ql=(t,e=[])=>{let i=t.code;return["Enter","Space",...e].includes(i)},kh=t=>{if(W_(t)){ar(t),q_(t.target);return}K_(t)&&(ar(t),z_(t.target))},xs=t=>!Th.device.isAndroid&&(t==null?void 0:t.detail)===0||Th.device.isAndroid&&(t==null?void 0:t.pointerType)==="",Ga=(t,e,i)=>kt(void 0,null,function*(){yield $o(),t&&!t.classList.contains("opened")&&!e&&Te(i)&&(yield $o(),i.set(!1),t.focus())}),Eh=(t,e,i)=>kt(void 0,null,function*(){yield $o(),t&&!e&&Te(i)&&(i.set(!1),t.focus())}),ja=(t,e,i)=>kt(void 0,null,function*(){var n;yield $o(),!!t&&e&&i&&((n=t.children[0])==null||n.focus())}),Ph=(t,e)=>kt(void 0,null,function*(){setTimeout(()=>{let i=t[e];!!i&&i.focus()},100)}),Rc=(t,e)=>{kh(t),Ih(t)&&(ar(t),e())},Dc=(t,e)=>kt(void 0,null,function*(){Ql(t,["ArrowRight"])&&(ar(t),e())}),Ah=(t,e,i)=>kt(void 0,null,function*(){if(kh(t),Q_(t)){ar(t),e();return}Ih(t)&&(ar(t),i())}),Ya=(t,e)=>{Ql(t)&&(ar(t),e())},Mh=(t,e,i)=>{if(Ql(t))ar(t),i(!e);else{let o=t.code;if(o==="ArrowLeft"&&e){i(!1),ar(t);return}o==="ArrowRight"&&!e&&(i(!0),ar(t))}},Lh=t=>{let e=t.getBoundingClientRect(),i=-14,o=e.left+e.width,n=e.top+i;return{right:o,bottom:n}},Vh=t=>{if(!t)return{top:0,left:0};let e=t.getBoundingClientRect(),i=-58,o=8,n=e.left+o;return{bottom:e.bottom+i,left:n}};import{isNullable as Nc,isValidURL as J_}from"@vkontakte/videoplayer-shared/es2015";var wr={"copy-link":100,"copy-link-timestamp":200,"copy-embed-code":300,pip:400,"video-loop":500,rotate:600,report:700,"save-debug":800,"save-trace":900,"debug-info":1e3};import{noop as Rh}from"@vkontakte/videoplayer-shared/es2015";var j_=(t,e)=>{Ya(t,()=>e())},Y_=L('<li class="item svelte-1hm4mm9" role="menuitem" tabindex="0"> </li>'),Z_={hash:"svelte-1hm4mm9",code:".item.svelte-1hm4mm9 {padding:8px 16px;cursor:pointer;position:relative;display:block;color:rgba(255, 255, 255, 0.72);font-size:13px;line-height:18px;letter-spacing:-0.14px;white-space:nowrap;}.item.svelte-1hm4mm9:hover {background:rgba(66, 66, 66, .5);color:var(--white);}"};function Hp(t,e){U(e,!0),W(t,Z_);let i=f(e,"onClick",3,Rh),o=f(e,"closeContextMenu",3,Rh),n=d=>{d==null||d.stopPropagation(),i()(),o()()};var a=Y_();a.__click=n,a.__keydown=[j_,n];var s=h(a,!0);g(a),k(()=>{var d;Oe(a,"aria-label",(d=e.ariaLabel)!=null?d:e.label),Oe(a,"data-testid",e.id),ge(s,e.label)}),b(t,a),z()}lt(["click","keydown"]);var ia=(t,e)=>t.weight-e.weight;var Gl=(o=>(o.OPEN_SUB_MENU="OPEN_SUB_MENU",o.CLICK="CLICK",o.SWITCH="SWITCH",o))(Gl||{});var eb=(t,e)=>{Rc(t,e)},tb=t=>{t.preventDefault()},ib=L('<ul role="menu" class="svelte-1p5ukkp"></ul>'),ob={hash:"svelte-1p5ukkp",code:"ul.svelte-1p5ukkp {position:absolute;z-index:var(--context-menu-z-index);border-radius:8px;background:rgba(0, 0, 0, 0.72);transition:visibility .1s,opacity .1s;list-style:none;margin:0;padding:6px 0;max-height:100%;max-width:100%;overflow-x:hidden;overflow-y:auto;}"};function Fp(t,e){U(e,!0),W(t,ob);let[i,o]=Be(),n=()=>S(Z,"$isLive$",i),a=()=>S(Me,"$isPiPEnabled$",i),s=()=>S(ne,"$chromecastState$",i),d=()=>S(be,"$pictureInPictureApiIsActive$",i),l=()=>S(Ve,"$isLooped$",i),u=()=>S(me,"$positionExact$",i),v=()=>S(H,"$debugPanelVisible",i),$=()=>S(Y,"$additionalContextMenuItems$",i),p=f(e,"visible",3,!1),_=f(e,"position",19,()=>({top:0,left:0})),w=f(e,"playerContainerRef",3,void 0),y=f(e,"controlsContainerRef",3,void 0),C=f(e,"menuElementRef",15,void 0),T=ee(0),E=ee(0),P=Ie(),{pictureInPicture$:A}=fo(),I=zt(),V=P.ui.contextMenu.visible$,H=P.ui.debugPanelVisible,Y=P.ui.additionalContextMenuItems$,O=P.ui.t,J=P.actions.internal.togglePictureInPicture,ne=P.state.chromecastState$,Z=P.state.isLive$,me=P.state.positionExact$,le=P.state.isInteractive,Ve=P.state.looped$,{isEnabled$:Me,isActive$:be}=A,ae=m(()=>{var Ye;return I.features.copyVideoLink&&((Ye=P.callbacks)==null?void 0:Ye.onCopyVideoLink)}),Le=m(()=>r(ae)&&!n()&&!le),re=m(()=>{var Ye;return!!((Ye=P.callbacks)!=null&&Ye.onCopyEmbedCodeClicked)}),N=m(()=>a()&&s()!==X_.CONNECTED&&!le),pe=m(()=>I.features.videoRotate&&!le),_e=m(()=>I.showSupport&&!d()),Ge=m(()=>I.features.saveTraceInfoToFile),ie=()=>{var Ye;V.set(!1),(Ye=e.returnFocus)==null||Ye.call(e)},G=(Ye,Ze)=>{if(!C()||!w()||!y())return;let nt=C().getBoundingClientRect(),Fe=w().getBoundingClientRect();B(T,Ye-Fe.left),B(E,Ze-Fe.top),r(T)+nt.width>Fe.width&&B(T,Fe.width-nt.width),r(E)+nt.height>Fe.height&&B(E,Fe.height-nt.height),B(T,fe(Math.max(r(T),0))),B(E,fe(Math.max(r(E),0)))};We(()=>{kt(this,null,function*(){if(C()&&w()&&y()){yield $o();let{top:Ze,left:nt,bottom:Fe,right:$t}=_(),qe=nt!=null?nt:0,dt=Ze!=null?Ze:0,Xt=C().getBoundingClientRect();Nc(nt)&&!Nc($t)&&(qe=$t-Xt.width),Nc(Ze)&&!Nc(Fe)&&(dt=Fe-Xt.height),qe=Math.max(qe,0),dt=Math.max(dt,0),G(qe,dt)}})});let K=()=>{P.actions.internal.videoRotate()},Re=()=>{J_(e.supportLink)&&window.open(e.supportLink,"_blank"),P.actions.internal.reportProblem(),P.actions.internal.pause()},Ne=()=>{let Ye=P.actions.internal.getDebugTextData();if(I.features.saveDebugInfoToFile){let Ze=new Blob([...Ye],{type:"plain/text"}),nt=window.URL.createObjectURL(Ze);Zs(nt,"vk_player_debug_info","txt")}else Qa(P.actions.internal.getDebugTextData())},et=()=>{let Ye=P.actions.internal.getTraceTextData(),Ze=new Blob([...Ye],{type:"application/json"}),nt=window.URL.createObjectURL(Ze);Zs(nt,"vk_player_trace_info","json")},we=()=>{H.set(!0)},Se=()=>kt(this,null,function*(){var Ye;try{J()}finally{(Ye=e.returnFocus)==null||Ye.call(e)}}),De=()=>{P.actions.internal.setLooped(!l())},Xe=()=>{var Ye,Ze;if(r(re)){let nt=(Ze=(Ye=P.callbacks)==null?void 0:Ye.onCopyEmbedCodeClicked)==null?void 0:Ze.call(Ye);nt&&Qa(nt)}},ot=(Ye=!1)=>{var Ze,nt;if((Ze=P.callbacks)!=null&&Ze.onCopyVideoLink){let Fe=(nt=P.callbacks)==null?void 0:nt.onCopyVideoLink(Ye,u());Fe&&Qa(Fe)}},ft=m(()=>I.features.saveDebugInfoToFile?O("menu_save_debug"):O("menu_copy_debug")),Je=m(()=>r(ae)?{id:"copy-link",weight:wr["copy-link"],label:O("menu_copy_video_link"),onClick:()=>ot()}:void 0),gt=m(()=>r(Le)?{id:"copy-link-timestamp",weight:wr["copy-link-timestamp"],label:O("menu_copy_video_link_with_timestamp"),onClick:()=>ot(!0)}:void 0),Et=m(()=>r(re)?{id:"copy-embed-code",weight:wr["copy-embed-code"],label:O("menu_copy_embed_code"),onClick:Xe}:void 0),jt=m(()=>r(N)?{id:"pip",weight:wr.pip,label:O("menu_pip"),onClick:Se}:void 0),qt=m(()=>({id:"video-loop",weight:wr["video-loop"],label:l()?O("menu_video_loop_off"):O("menu_video_loop_on"),ariaLabel:O("aria_label_menu_loop"),onClick:De})),Wt=m(()=>r(pe)?{id:"rotate",weight:wr.rotate,label:O("menu_video_rotate"),ariaLabel:O("aria_label_menu_rotate"),onClick:K}:void 0),ve=m(()=>r(_e)?{id:"report",weight:wr.report,label:O("menu_report"),ariaLabel:`${O("menu_report")}. ${O("aria_label_new_tab_alert")}`,onClick:Re}:void 0),j=m(()=>({id:"save-debug",weight:wr["save-debug"],label:r(ft),onClick:Ne})),Ce=m(()=>r(Ge)?{id:"save-trace",weight:wr["save-trace"],label:O("menu_save_debug"),onClick:et}:void 0),se=m(()=>({id:"debug-info",weight:wr["debug-info"],label:O("menu_debug_overlay"),ariaLabel:v()?O("aria_label_menu_debug_overlay_disable"):O("aria_label_menu_debug_overlay_enable"),onClick:we})),He=m(()=>[r(Je),r(gt),r(Et),r(jt),r(qt),r(Wt),r(ve),r(j),r(Ce),r(se),...$()].filter(Ye=>!!Ye).sort(ia));var Ue=ze(),tt=ue(Ue);{var ct=Ye=>{var Ze=ib();Ze.__contextmenu=[tb],Ze.__keydown=[eb,ie],Ii(Ze,21,()=>r(He),nt=>nt.id,(nt,Fe)=>{Hp(nt,{get id(){return r(Fe).id},get label(){return r(Fe).label},get ariaLabel(){return r(Fe).ariaLabel},get onClick(){return r(Fe).onClick},closeContextMenu:ie})}),g(Ze),pt(Ze,nt=>C(nt),()=>C()),k(()=>{var nt,Fe;return it(Ze,`top: ${(nt=r(E))!=null?nt:""}px; left: ${(Fe=r(T))!=null?Fe:""}px;`)}),b(Ye,Ze)};R(tt,Ye=>{p()&&Ye(ct)})}b(t,Ue),z(),o()}lt(["contextmenu","keydown"]);var Bc=class{constructor(e){this.value=e,this.next=null}};var Za=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Bc(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 nb=L('<div class="container svelte-1ssl9eb"><canvas class="svelte-1ssl9eb"></canvas></div>'),rb={hash:"svelte-1ssl9eb",code:".container.svelte-1ssl9eb {display:inline-block;width:120px;height:16px;}canvas.svelte-1ssl9eb {transform:scale(1, -1);margin-top:2px;}"};function jl(t,e){U(e,!0),W(t,rb);let i=f(e,"values",19,()=>[]),o=ee(void 0),n=ee(null),a=16,s=120,d=60,l=s/d;Ut(()=>{r(o).width=s,r(o).height=a,B(n,fe(r(o).getContext("2d")))});function u(p,_,w,y,C){C===0&&(C=1),p.fillStyle="#fff",p.fillRect(_,w,y,C)}We(()=>{let p="";if(r(n)){let _=i()[0];for(let y=1;y<i().length;y++)i()[y]>_&&(_=i()[y]);r(n).clearRect(0,0,s,a);let w=d-1;for(let y=i().length-1;y>=0;y--){let C=w*l,T=_>0?a*(i()[y]/_):0;u(r(n),C,0,l,T),p=T+" "+p,w--}}});var v=nb(),$=h(v);pt($,p=>B(o,p),()=>r(o)),g(v),b(t,v),z()}import{safeStorage as Dh}from"@vkontakte/videoplayer-shared/es2015";var sb=(t,e)=>{t.stopPropagation(),Dh.remove(Dl),e.set(!1)},ab=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Video id</div> <span> </span></div>'),lb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">VSID</div> <span> </span></div>'),db=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Provider</div> <span> </span></div>'),cb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Streams</div> <span> </span></div>'),ub=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Viewport</div> <span> </span></div>'),pb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Video size</div> <span> </span></div>'),fb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">CDN host</div> <span> </span></div>'),mb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Volume</div> <span> </span></div>'),vb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Buffer</div> <span> </span></div>'),gb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Live latency</div> <span> </span></div>'),hb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Segment</div> <span> </span></div>'),_b=L('<div class="svelte-4deykz"><div class="svelte-4deykz">Network</div> <!> <span> </span></div>'),bb=L('<div class="svelte-4deykz"><div class="svelte-4deykz">V bitrate</div> <!> <span> </span></div>'),$b=L('<div role="region"><button class="close svelte-4deykz" title="\u0437\u0430\u043A\u0440\u044B\u0442\u044C">[x]</button> <div class="content svelte-4deykz"><div class="svelte-4deykz"><div class="svelte-4deykz">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">Dropped</div> <span> </span></div> <!> <!> <div class="svelte-4deykz"><div class="svelte-4deykz">FPS</div> <!> <span> </span></div></div></div>'),yb={hash:"svelte-4deykz",code:".container.svelte-4deykz {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}.container-mobile.svelte-4deykz {top:16px;left:16px;}button.svelte-4deykz {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.svelte-4deykz {padding:5px;}.content.svelte-4deykz > div:where(.svelte-4deykz) > div:where(.svelte-4deykz) {display:inline-block;text-align:right;width:60px;padding:0 5px;}"};function Yl(t,e){U(e,!0),W(t,yb);let[i,o]=Be(),n=()=>S(d,"$isMobile",i),a=Ie(),s=a.ui.debugPanelVisible,d=a.ui.isMobile,l=ee(fe(a.actions.internal.getDebugPanelData())),u=a.actions.internal.getVideoElement(),v=ee(0),$=ee(0),p=ee(0),_=new Za(60),w=new Za(60),y=new Za(60),C=ee(fe([])),T=ee(fe([])),E=ee(fe([])),P=F("aria_label_debug_panel");Ut(()=>{Dh.set(Dl,"true"),a.actions.internal.startLogging(),u&&(B($,fe(u.getVideoPlaybackQuality().droppedVideoFrames)),B(v,fe(u.getVideoPlaybackQuality().totalVideoFrames)));let j=window.setInterval(()=>{B(l,fe(a.actions.internal.getDebugPanelData()))},500),Ce;return u&&(Ce=window.setInterval(()=>{if(u){B($,fe(u.getVideoPlaybackQuality().droppedVideoFrames));let se=u.getVideoPlaybackQuality().totalVideoFrames;B(p,se-r(v)),B(v,fe(se)),_.push(r(p)),r(l).speed&&w.push(r(l).speed),r(l).bitrate&&y.push(r(l).bitrate),B(C,fe(_.getValuesFromBottom())),B(T,fe(w.getValuesFromBottom())),B(E,fe(y.getValuesFromBottom()))}},1e3)),()=>{a.actions.internal.stopLogging(),clearInterval(j),Ce&&clearInterval(Ce)}});var A=$b();let I;Oe(A,"aria-label",P);var V=h(A);V.__click=[sb,s];var H=M(V,2),Y=h(H),O=M(h(Y),2),J=h(O,!0);g(O),g(Y);var ne=M(Y,2);{var Z=j=>{var Ce=ab(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(()=>ge(He,r(l).id)),b(j,Ce)};R(ne,j=>{r(l).id&&j(Z)})}var me=M(ne,2);{var le=j=>{var Ce=lb(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(()=>ge(He,r(l).vsid)),b(j,Ce)};R(me,j=>{r(l).vsid&&j(le)})}var Ve=M(me,2);{var Me=j=>{var Ce=db(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(()=>ge(He,r(l).provider)),b(j,Ce)};R(Ve,j=>{r(l).provider&&j(Me)})}var be=M(Ve,2);{var ae=j=>{var Ce=cb(),se=M(h(Ce),2),He=h(se);g(se),g(Ce),k(()=>{var Ue,tt;return ge(He,`Video: ${r(l).videoCodec||""} ${(Ue=r(l).hdr?"(HDR)":"")!=null?Ue:""}
143
143
  &
144
- Audio: ${r(l).audioCodec||""} ${(tt=r(l).audioLanguage?`(${r(l).audioLanguage})`:"")!=null?tt:""}`)}),b(j,Ce)};R(be,j=>{(r(l).videoCodec||r(l).audioCodec)&&j(ae)})}var Le=M(be,2);{var re=j=>{var Ce=ub(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(()=>ge(Oe,r(l).viewport)),b(j,Ce)};R(Le,j=>{r(l).viewport&&j(re)})}var N=M(Le,2);{var pe=j=>{var Ce=pb(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(()=>ge(Oe,r(l).videoSize)),b(j,Ce)};R(N,j=>{r(l).videoSize&&j(pe)})}var _e=M(N,2);{var Ge=j=>{var Ce=fb(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(()=>ge(Oe,r(l).cdn)),b(j,Ce)};R(_e,j=>{r(l).cdn&&j(Ge)})}var ie=M(_e,2);{var G=j=>{var Ce=mb(),se=M(h(Ce),2),Oe=h(se);g(se),g(Ce),k(()=>{var Ue;return ge(Oe,`${(Ue=r(l).volume)!=null?Ue:""} %`)}),b(j,Ce)};R(ie,j=>{r(l).volume&&j(G)})}var K=M(ie,2);{var Re=j=>{var Ce=vb(),se=M(h(Ce),2),Oe=h(se);g(se),g(Ce),k(Ue=>ge(Oe,`${Ue!=null?Ue:""} s`),[()=>r(l).buffer.toFixed(2)]),b(j,Ce)};R(K,j=>{r(l).buffer&&j(Re)})}var Ne=M(K,2);{var et=j=>{var Ce=gb(),se=M(h(Ce),2),Oe=h(se);g(se),g(Ce),k(Ue=>ge(Oe,`${Ue!=null?Ue:""} s`),[()=>r(l).liveLatency.toFixed(2)]),b(j,Ce)};R(Ne,j=>{r(l).liveLatency&&j(et)})}var we=M(Ne,2);{var Se=j=>{var Ce=hb(),se=M(h(Ce),2),Oe=h(se,!0);g(se),g(Ce),k(Ue=>ge(Oe,Ue),[()=>[{value:r(l).currentVideoSegmentLength,title:"Video:"},{value:r(l).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ue})=>Ue).map(({value:Ue,title:tt})=>`${tt} ${((Ue!=null?Ue:0)/1e3).toFixed(2)} s`).join(" & ")]),b(j,Ce)};R(we,j=>{(r(l).currentVideoSegmentLength||r(l).currentAudioSegmentLength)&&j(Se)})}var De=M(we,2),Xe=M(h(De),2),ot=h(Xe);g(Xe),g(De);var ft=M(De,2);{var Je=j=>{var Ce=_b(),se=M(h(Ce),2);jl(se,{get values(){return r(T)}});var Oe=M(se,2),Ue=h(Oe);g(Oe),g(Ce),k(tt=>ge(Ue,`${tt!=null?tt:""} Kbps`),[()=>r(l).speed.toFixed(2)]),b(j,Ce)};R(ft,j=>{r(l).speed&&j(Je)})}var gt=M(ft,2);{var Et=j=>{var Ce=bb(),se=M(h(Ce),2);jl(se,{get values(){return r(E)}});var Oe=M(se,2),Ue=h(Oe);g(Oe),g(Ce),k(tt=>ge(Ue,`${tt!=null?tt:""} Kbps`),[()=>r(l).bitrate.toFixed(2)]),b(j,Ce)};R(gt,j=>{r(l).bitrate&&j(Et)})}var jt=M(gt,2),qt=M(h(jt),2);jl(qt,{get values(){return r(C)}});var Wt=M(qt,2),ve=h(Wt,!0);g(Wt),g(jt),g(H),g(A),k(j=>{var Ce,se;I=te(A,1,"container svelte-4deykz",null,I,j),ge(J,r(l).version),ge(ot,`${(Ce=r($))!=null?Ce:""} / ${(se=r(v))!=null?se:""} frames`),ge(ve,r(p))},[()=>({"container-mobile":n()})]),b(t,A),z(),o()}lt(["click"]);import{noop as xb}from"@vkontakte/videoplayer-shared/es2015";var wb=(t,e)=>{t.stopPropagation(),e()()},Sb=L('<div class="close svelte-1ome55p"></div>'),Cb={hash:"svelte-1ome55p",code:".close.svelte-1ome55p {cursor:pointer;opacity:0.8;transition:opacity 0.2s;position:relative;width:16px;height:16px;}.close.svelte-1ome55p:hover {opacity:1;}.close.svelte-1ome55p:before, .close.svelte-1ome55p:after {position:absolute;left:8px;content:' ';height:16px;width:2px;background-color:var(--white);}.close.svelte-1ome55p:before {transform:rotate(45deg);}.close.svelte-1ome55p:after {transform:rotate(-45deg);}"};function oa(t,e){U(e,!0),W(t,Cb);let i=f(e,"onClick",3,xb);var o=Sb();o.__click=[wb,i],b(t,o),z()}lt(["click"]);import{noop as Tb}from"@vkontakte/videoplayer-shared/es2015";var Ib=L('<div class="timer svelte-8jhsry"><canvas class="timer-canvas svelte-8jhsry" width="100" height="100"></canvas> <svg class="timer-play-icon svelte-8jhsry" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path class="_play" d="m8.13340613 5.10548415 10.49681277 6.24354325c.3559987.2117494.472936.6720001.2611866 1.0279989-.0638111.1072809-.1533894.1969388-.2606135.2608453l-10.4968128 6.256187c-.35581027.2120659-.81616483.095538-1.02823068-.2602722-.06921066-.1161237-.10574852-.2487949-.10574852-.3839792v-12.49973035c0-.41421357.33578644-.75.75-.75.13495801 0 .26741554.03641567.38340613.1054073z" fill="var(--btn-color, #fff)"></path></g></g></svg></div>'),kb={hash:"svelte-8jhsry",code:".timer.svelte-8jhsry {border-radius:50%;transition:background .2s;background:rgba(31, 31, 31, .65);width:50px;height:50px;display:flex;align-items:center;justify-content:space-around;}.timer.svelte-8jhsry:hover {background:rgba(31, 31, 31, .85)}.timer-canvas.svelte-8jhsry {width:50px;height:50px;position:absolute;}.timer-play-icon.svelte-8jhsry {width:22px;height:26px;}"};function Zl(t,e){U(e,!0),W(t,kb);let i=f(e,"isRunning",3,!0),o=f(e,"onTimerEnded",3,Tb),n=5e3,a=ee(void 0),s,d,l=ee(0),u;We(()=>{i()&&(d=Date.now(),B(l,fe(requestAnimationFrame($))))});let v=()=>{r(l)&&(cancelAnimationFrame(r(l)),B(l,0))},$=()=>{if(!i()){v();return}u=(Date.now()-d)/n,u<1?(s==null||s.clearRect(0,0,100,100),s==null||s.beginPath(),s==null||s.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),s==null||s.stroke(),B(l,fe(requestAnimationFrame($)))):o()()};Ut(()=>{if(s=r(a).getContext("2d"),!!s)return s.lineWidth=6,s.lineCap="round",s.strokeStyle="#fff",()=>{v()}}),yn(()=>{v()});var p=Ib(),_=h(p);pt(_,w=>B(a,w),()=>r(a)),$e(2),g(p),b(t,p),z()}var Eb=(t,e,i)=>{e(!1),i()},Pb=L('<div class="overlay svelte-jfbaax"></div> <div class="next-video svelte-jfbaax"><div class="top svelte-jfbaax"><div class="caption svelte-jfbaax"> </div> <!></div> <div class="row svelte-jfbaax"><div class="column svelte-jfbaax"><div class="thumb svelte-jfbaax"><div></div> <!></div></div> <div class="column svelte-jfbaax"><div class="title svelte-jfbaax"> </div></div></div></div>',1),Ab={hash:"svelte-jfbaax",code:".overlay.svelte-jfbaax {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-jfbaax {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;width:362px;flex-direction:column;}.top.svelte-jfbaax {display:flex;justify-content:space-between;}.caption.svelte-jfbaax {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-jfbaax {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-jfbaax {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-jfbaax {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-jfbaax {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-jfbaax {background:var(--black);opacity:0.3;}.title.svelte-jfbaax {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function Up(t,e){U(e,!0),W(t,Ab);let[i,o]=Be(),n=()=>S(d,"$autoplayNextEnabled$",i),a=()=>S(l,"$timerNextVideoRunning$",i),s=Ie(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,u=s.actions.internal.nextVideoClick,v=s.actions.internal.nextVideoAnnouncementShow,$=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,_=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{n()&&(u(!1),p())},y=()=>{e.clickCloseIcon(),_()};Ut(()=>{e.isHide||v(),e.isHide&&n()&&(u(!1),p())});var C=ze(),T=ue(C);{var E=P=>{var A=Pb(),I=M(ue(A),2),V=h(I),H=h(V),Y=h(H,!0);g(H);var O=M(H,2);oa(O,{onClick:y}),g(V);var J=M(V,2);J.__click=[Eb,u,$];var ne=h(J),Z=h(ne),me=h(Z);let le;var Ve=M(me,2);{var Me=re=>{let N=m(()=>a()&&n());Zl(re,{get isRunning(){return r(N)},onTimerEnded:w})};R(Ve,re=>{n()&&re(Me)})}g(Z),g(ne);var be=M(ne,2),ae=h(be),Le=h(ae,!0);g(ae),g(be),g(J),g(I),k((re,N)=>{ge(Y,re),it(Z,`background-image: url('${e.thumb}')`),le=te(me,1,"thumb-overlay svelte-jfbaax",null,le,N),ge(Le,e.title)},[()=>F("end_screen_next_video"),()=>({withOpacity:n()})]),b(P,A)};R(T,P=>{e.isHide||P(E)})}b(t,C),z(),o()}lt(["click"]);import{PlaybackState as na}from"@vkontakte/videoplayer-core/es2015";import{checkNever as Lb}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as xn}from"@vkontakte/videoplayer-statistics/es2015";var zp=(t,e)=>Math.min(+(t+e).toFixed(2),1),qp=(t,e)=>Math.max(+(t-e).toFixed(2),0),Oc=(t,e,i)=>{let o=zp(e,i);e<1&&t.actions.internal.setVolume(o)},Hc=(t,e,i)=>{let o=qp(e,i);e>0&&t.actions.internal.setVolume(o)};var ws=({isAudioDisabled:t,audioDisabledHintCallback:e,isAudioAvailable:i,audioIsNotExistHintCallback:o})=>t?(e==null||e(),!1):i?!0:(o==null||o(),!1);var Vb=L('<div class="keyboard-controls svelte-10kkmxz" tabindex="-1" role="region"><!></div>'),Rb={hash:"svelte-10kkmxz",code:".keyboard-controls.svelte-10kkmxz {position:absolute;left:0;right:0;top:0;bottom:0;}"};function Wp(t,e){var qt,Wt;U(e,!0),W(t,Rb);let[i,o]=Be(),n=()=>S(Y,"$playbackState$",i),a=()=>S(O,"$adPlaybackState",i),s=()=>S(me,"$disabledControls$",i),d=()=>S(J,"$positionExact$",i),l=()=>S(ne,"$duration$",i),u=()=>S(G,"$isAudioAvailable$",i),v=()=>S(Z,"$volume$",i),$=()=>S(be,"$availablePlaybackRates$",i),p=()=>S(Me,"$currentPlaybackRate$",i),_=()=>S(Re,"$isInteractiveTime$",i),w=()=>S(Ne,"$showInteractiveTimeIndicatorTooltip$",i),y=()=>S(pe,"$isEnded$",i),C=()=>S(le,"$muted$",i),T=()=>S(Ve,"$currentSubtitle$",i),E=()=>S(_e,"$overlayContainer$",i),P=f(e,"nextButtonActive",3,!1),A=f(e,"prevButtonActive",3,!1),I=Ie(),V=zt(),H=I.getLogger().createComponentLog("KeyboardControls component"),Y=I.state.playbackState$,O=I.ads.playbackState,J=I.state.positionExact$,ne=I.state.duration$,Z=I.state.volume$,me=I.ui.controls.disabledControls$,le=I.state.muted$,Ve=I.state.currentSubtitle$,Me=I.state.currentPlaybackRate$,be=I.state.availablePlaybackRates$,ae=I.ui.contextMenu.openedByHotKey$,Le=I.ui.contextMenu.lastActiveElem$,re=I.ui.contextMenu.visible$,N=I.ui.contextMenu.position$,pe=I.state.isEnded$,_e=I.ui.overlayContainer$,Ge=(qt=I.callbacks)==null?void 0:qt.onAudioDoesNotExistHint,ie=(Wt=I.callbacks)==null?void 0:Wt.onAudioDisabledHint,G=I.state.isAudioAvailable$,K=I.state.isAudioDisabled,Re=I.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:Ne}=fo(),et=0,we=!0,Se=ee(void 0),De=()=>{var ve;return(ve=r(Se))==null?void 0:ve.focus()},Xe=ve=>(ve!==we&&(we=ve,et=0),et+=1,(V.controls.seekStepKeyboard+V.controls.seekStepKeyboard*et)/1e3),ot=ve=>{var He,$t;let j=ve.target,Ce=(He=j==null?void 0:j.getAttribute("role"))==null?void 0:He.includes("menuitem"),se=j.classList.contains("btn"),Oe=ve.code;if(se&&Oe==="Space")return;let Ue=Og.has(Oe);if(Ce&&Ue)return;let tt=!Bg.has(Oe);if(ve.ctrlKey&&tt||ve.altKey&&tt||ve.metaKey)return;let ct=Ce&&Oe==="Escape";Hg.has(Oe)||ct||e.hideContextMenu();let Ye=n()===na.PLAYING||n()===na.PAUSED,Ze=e.isAds&&(a()==="paused"||a()==="playing"),nt=!Ze&&!s().has("TIMELINE");if(Ye||Ze)switch(H({message:`key down, code: ${Oe}`}),Oe){case"KeyJ":case"ArrowLeft":{if(!nt)break;if(ve.ctrlKey||ve.altKey){let qe=I.actions.internal.getPrevEpisode();I.actions.internal.seekToPrevEpisode(qe),qe&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:qe.text}),ve.preventDefault()}else{let qe=ve.shiftKey?Xe(!1):V.controls.seekStepKeyboard/1e3,dt=Math.max(d()-qe,0);d()>0&&(I.actions.internal.seekTime(dt,xn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:qe.toString()}),ve.preventDefault())}break}case"KeyL":case"ArrowRight":{if(!nt)break;if(ve.ctrlKey||ve.altKey){let qe=I.actions.internal.getNextEpisode();I.actions.internal.seekToNextEpisode(qe),qe&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:qe.text}),ve.preventDefault()}else{let qe=ve.shiftKey?Xe(!0):V.controls.seekStepKeyboard/1e3,dt=Math.min(d()+qe,l());Math.round(d())<Math.round(l())&&(I.actions.internal.seekTime(dt,xn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:qe.toString()}),ve.preventDefault())}break}case"ArrowUp":{if(ws({isAudioDisabled:K,audioDisabledHintCallback:ie,isAudioAvailable:u(),audioIsNotExistHintCallback:Ge})){let qe=v(),dt=V.controls.volumeStepKeyboard,Xt=qe<=1;if(Oc(I,qe,dt),Xt){let Ni=Math.round(zp(qe,dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Ni}})}}ve.preventDefault();break}case"ArrowDown":{if(ws({isAudioDisabled:K,audioDisabledHintCallback:ie,isAudioAvailable:u(),audioIsNotExistHintCallback:Ge})){let qe=v(),dt=V.controls.volumeStepKeyboard,Xt=qe>=0;if(Hc(I,qe,dt),Xt){let Ni=Math.round(qp(qe,dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Ni}})}}ve.preventDefault();break}case"Comma":{if(ve.shiftKey){I.actions.internal.decrementPlaybackRate();let qe=$().find(dt=>dt.value===p());e.showHotKeyHelpers({type:"RATE_DOWN",text:qe==null?void 0:qe.displayValue}),ve.preventDefault()}else{if(Ze||n()!==na.PAUSED)break;let qe=Math.max(d()-V.controls.seekStepFrame/1e3,0);d()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(qe,xn.DOUBLE_TAP),ve.preventDefault())}break}case"Period":{if(ve.shiftKey){I.actions.internal.incrementPlaybackRate();let qe=$().find(dt=>dt.value===p());e.showHotKeyHelpers({type:"RATE_UP",text:qe==null?void 0:qe.displayValue}),ve.preventDefault()}else{if(Ze||n()!==na.PAUSED)break;let qe=Math.min(d()+V.controls.seekStepFrame/1e3,l());d()<l()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(qe,xn.DOUBLE_TAP),ve.preventDefault())}break}case"KeyK":case"Space":if(!s().has("PLAY_BUTTON"))if(_()&&w()&&Ne.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{I.actions.internal.togglePlay();let qe="PLAY";n()===na.PAUSED?qe="PAUSE":y()&&(qe="REPLAY"),e.showHotKeyHelpers({type:qe})}ve.preventDefault();break;case"KeyM":{ws({isAudioDisabled:K,audioDisabledHintCallback:ie,isAudioAvailable:u(),audioIsNotExistHintCallback:Ge})&&(e.showHotKeyHelpers({type:C()?"VOLUME":"MUTE"}),I.actions.internal.toggleMuted()),ve.preventDefault();break}case"KeyF":e.toggleFullscreen(),ve.preventDefault();break;case"KeyC":I.actions.internal.toggleSubtitle(),T().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:($t=T())==null?void 0:$t.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),ve.preventDefault();break;case"KeyI":I.actions.internal.togglePictureInPicture(),ve.preventDefault();break;case"Digit1":case"Numpad1":if(ve.shiftKey){let qe=Vh(E());N.set(qe),Le.set(j),ae.set(!0),re.set(!0),ve.preventDefault();break}e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.1,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.2,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.3,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.4,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.5,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.6,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.7,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.8,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.9,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(0,xn.DOUBLE_TAP),ve.preventDefault();break;case"Slash":{ve.shiftKey&&V.features.hotKeyMapModal&&(e.showKeyMap(),ve.preventDefault());break}case"KeyN":ve.shiftKey&&P()&&I.actions.internal.nextVideoClick();break;case"KeyP":ve.shiftKey&&A()&&I.actions.internal.prevVideoClick();break;case"ShiftLeft":case"ShiftRight":ve.preventDefault();break;case"Tab":case"Escape":case"Enter":break;default:Lb(Oe);break}},ft=ve=>{let j=ve.code;if(ve.ctrlKey||ve.altKey||ve.metaKey)return;let Ce=n()===na.PLAYING||n()===na.PAUSED,se=e.isAds&&(a()==="paused"||a()==="playing");if(Ce||se)switch(j){case"ShiftLeft":case"ShiftRight":et=0;break}},Je=F("aria_label_video_player");var gt=Vb();gt.__keyup=ft,gt.__keydown=ot,Fe(gt,"aria-label",Je);var Et=h(gt);he(Et,()=>{var ve;return(ve=e.children)!=null?ve:oe}),g(gt),pt(gt,ve=>B(Se,ve),()=>r(Se)),b(t,gt);var jt=z({focus:De});return o(),jt}lt(["keyup","keydown"]);var Db=L('<div class="container svelte-1dbnjb1"><div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div></div>'),Nb={hash:"svelte-1dbnjb1",code:`.container.svelte-1dbnjb1 {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex;}.dot.svelte-1dbnjb1:nth-child(1) {animation-delay:calc(0 * 180ms);}.dot.svelte-1dbnjb1:nth-child(2) {animation-delay:calc(1 * 180ms);}.dot.svelte-1dbnjb1:nth-child(3) {animation-delay:calc(2 * 180ms);}
144
+ Audio: ${r(l).audioCodec||""} ${(tt=r(l).audioLanguage?`(${r(l).audioLanguage})`:"")!=null?tt:""}`)}),b(j,Ce)};R(be,j=>{(r(l).videoCodec||r(l).audioCodec)&&j(ae)})}var Le=M(be,2);{var re=j=>{var Ce=ub(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(()=>ge(He,r(l).viewport)),b(j,Ce)};R(Le,j=>{r(l).viewport&&j(re)})}var N=M(Le,2);{var pe=j=>{var Ce=pb(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(()=>ge(He,r(l).videoSize)),b(j,Ce)};R(N,j=>{r(l).videoSize&&j(pe)})}var _e=M(N,2);{var Ge=j=>{var Ce=fb(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(()=>ge(He,r(l).cdn)),b(j,Ce)};R(_e,j=>{r(l).cdn&&j(Ge)})}var ie=M(_e,2);{var G=j=>{var Ce=mb(),se=M(h(Ce),2),He=h(se);g(se),g(Ce),k(()=>{var Ue;return ge(He,`${(Ue=r(l).volume)!=null?Ue:""} %`)}),b(j,Ce)};R(ie,j=>{r(l).volume&&j(G)})}var K=M(ie,2);{var Re=j=>{var Ce=vb(),se=M(h(Ce),2),He=h(se);g(se),g(Ce),k(Ue=>ge(He,`${Ue!=null?Ue:""} s`),[()=>r(l).buffer.toFixed(2)]),b(j,Ce)};R(K,j=>{r(l).buffer&&j(Re)})}var Ne=M(K,2);{var et=j=>{var Ce=gb(),se=M(h(Ce),2),He=h(se);g(se),g(Ce),k(Ue=>ge(He,`${Ue!=null?Ue:""} s`),[()=>r(l).liveLatency.toFixed(2)]),b(j,Ce)};R(Ne,j=>{r(l).liveLatency&&j(et)})}var we=M(Ne,2);{var Se=j=>{var Ce=hb(),se=M(h(Ce),2),He=h(se,!0);g(se),g(Ce),k(Ue=>ge(He,Ue),[()=>[{value:r(l).currentVideoSegmentLength,title:"Video:"},{value:r(l).currentAudioSegmentLength,title:"Audio:"}].filter(({value:Ue})=>Ue).map(({value:Ue,title:tt})=>`${tt} ${((Ue!=null?Ue:0)/1e3).toFixed(2)} s`).join(" & ")]),b(j,Ce)};R(we,j=>{(r(l).currentVideoSegmentLength||r(l).currentAudioSegmentLength)&&j(Se)})}var De=M(we,2),Xe=M(h(De),2),ot=h(Xe);g(Xe),g(De);var ft=M(De,2);{var Je=j=>{var Ce=_b(),se=M(h(Ce),2);jl(se,{get values(){return r(T)}});var He=M(se,2),Ue=h(He);g(He),g(Ce),k(tt=>ge(Ue,`${tt!=null?tt:""} Kbps`),[()=>r(l).speed.toFixed(2)]),b(j,Ce)};R(ft,j=>{r(l).speed&&j(Je)})}var gt=M(ft,2);{var Et=j=>{var Ce=bb(),se=M(h(Ce),2);jl(se,{get values(){return r(E)}});var He=M(se,2),Ue=h(He);g(He),g(Ce),k(tt=>ge(Ue,`${tt!=null?tt:""} Kbps`),[()=>r(l).bitrate.toFixed(2)]),b(j,Ce)};R(gt,j=>{r(l).bitrate&&j(Et)})}var jt=M(gt,2),qt=M(h(jt),2);jl(qt,{get values(){return r(C)}});var Wt=M(qt,2),ve=h(Wt,!0);g(Wt),g(jt),g(H),g(A),k(j=>{var Ce,se;I=te(A,1,"container svelte-4deykz",null,I,j),ge(J,r(l).version),ge(ot,`${(Ce=r($))!=null?Ce:""} / ${(se=r(v))!=null?se:""} frames`),ge(ve,r(p))},[()=>({"container-mobile":n()})]),b(t,A),z(),o()}lt(["click"]);import{noop as xb}from"@vkontakte/videoplayer-shared/es2015";var wb=(t,e)=>{t.stopPropagation(),e()()},Sb=L('<div class="close svelte-1ome55p"></div>'),Cb={hash:"svelte-1ome55p",code:".close.svelte-1ome55p {cursor:pointer;opacity:0.8;transition:opacity 0.2s;position:relative;width:16px;height:16px;}.close.svelte-1ome55p:hover {opacity:1;}.close.svelte-1ome55p:before, .close.svelte-1ome55p:after {position:absolute;left:8px;content:' ';height:16px;width:2px;background-color:var(--white);}.close.svelte-1ome55p:before {transform:rotate(45deg);}.close.svelte-1ome55p:after {transform:rotate(-45deg);}"};function oa(t,e){U(e,!0),W(t,Cb);let i=f(e,"onClick",3,xb);var o=Sb();o.__click=[wb,i],b(t,o),z()}lt(["click"]);import{noop as Tb}from"@vkontakte/videoplayer-shared/es2015";var Ib=L('<div class="timer svelte-8jhsry"><canvas class="timer-canvas svelte-8jhsry" width="100" height="100"></canvas> <svg class="timer-play-icon svelte-8jhsry" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path class="_play" d="m8.13340613 5.10548415 10.49681277 6.24354325c.3559987.2117494.472936.6720001.2611866 1.0279989-.0638111.1072809-.1533894.1969388-.2606135.2608453l-10.4968128 6.256187c-.35581027.2120659-.81616483.095538-1.02823068-.2602722-.06921066-.1161237-.10574852-.2487949-.10574852-.3839792v-12.49973035c0-.41421357.33578644-.75.75-.75.13495801 0 .26741554.03641567.38340613.1054073z" fill="var(--btn-color, #fff)"></path></g></g></svg></div>'),kb={hash:"svelte-8jhsry",code:".timer.svelte-8jhsry {border-radius:50%;transition:background .2s;background:rgba(31, 31, 31, .65);width:50px;height:50px;display:flex;align-items:center;justify-content:space-around;}.timer.svelte-8jhsry:hover {background:rgba(31, 31, 31, .85)}.timer-canvas.svelte-8jhsry {width:50px;height:50px;position:absolute;}.timer-play-icon.svelte-8jhsry {width:22px;height:26px;}"};function Zl(t,e){U(e,!0),W(t,kb);let i=f(e,"isRunning",3,!0),o=f(e,"onTimerEnded",3,Tb),n=5e3,a=ee(void 0),s,d,l=ee(0),u;We(()=>{i()&&(d=Date.now(),B(l,fe(requestAnimationFrame($))))});let v=()=>{r(l)&&(cancelAnimationFrame(r(l)),B(l,0))},$=()=>{if(!i()){v();return}u=(Date.now()-d)/n,u<1?(s==null||s.clearRect(0,0,100,100),s==null||s.beginPath(),s==null||s.arc(50,50,47,-Math.PI/2,-Math.PI/2+Math.PI*2*u),s==null||s.stroke(),B(l,fe(requestAnimationFrame($)))):o()()};Ut(()=>{if(s=r(a).getContext("2d"),!!s)return s.lineWidth=6,s.lineCap="round",s.strokeStyle="#fff",()=>{v()}}),yn(()=>{v()});var p=Ib(),_=h(p);pt(_,w=>B(a,w),()=>r(a)),$e(2),g(p),b(t,p),z()}var Eb=(t,e,i)=>{e(!1),i()},Pb=L('<div class="overlay svelte-jfbaax"></div> <div class="next-video svelte-jfbaax"><div class="top svelte-jfbaax"><div class="caption svelte-jfbaax"> </div> <!></div> <div class="row svelte-jfbaax"><div class="column svelte-jfbaax"><div class="thumb svelte-jfbaax"><div></div> <!></div></div> <div class="column svelte-jfbaax"><div class="title svelte-jfbaax"> </div></div></div></div>',1),Ab={hash:"svelte-jfbaax",code:".overlay.svelte-jfbaax {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-jfbaax {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;width:362px;flex-direction:column;}.top.svelte-jfbaax {display:flex;justify-content:space-between;}.caption.svelte-jfbaax {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-jfbaax {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-jfbaax {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-jfbaax {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-jfbaax {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-jfbaax {background:var(--black);opacity:0.3;}.title.svelte-jfbaax {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function Up(t,e){U(e,!0),W(t,Ab);let[i,o]=Be(),n=()=>S(d,"$autoplayNextEnabled$",i),a=()=>S(l,"$timerNextVideoRunning$",i),s=Ie(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,u=s.actions.internal.nextVideoClick,v=s.actions.internal.nextVideoAnnouncementShow,$=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,_=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{n()&&(u(!1),p())},y=()=>{e.clickCloseIcon(),_()};Ut(()=>{e.isHide||v(),e.isHide&&n()&&(u(!1),p())});var C=ze(),T=ue(C);{var E=P=>{var A=Pb(),I=M(ue(A),2),V=h(I),H=h(V),Y=h(H,!0);g(H);var O=M(H,2);oa(O,{onClick:y}),g(V);var J=M(V,2);J.__click=[Eb,u,$];var ne=h(J),Z=h(ne),me=h(Z);let le;var Ve=M(me,2);{var Me=re=>{let N=m(()=>a()&&n());Zl(re,{get isRunning(){return r(N)},onTimerEnded:w})};R(Ve,re=>{n()&&re(Me)})}g(Z),g(ne);var be=M(ne,2),ae=h(be),Le=h(ae,!0);g(ae),g(be),g(J),g(I),k((re,N)=>{ge(Y,re),it(Z,`background-image: url('${e.thumb}')`),le=te(me,1,"thumb-overlay svelte-jfbaax",null,le,N),ge(Le,e.title)},[()=>F("end_screen_next_video"),()=>({withOpacity:n()})]),b(P,A)};R(T,P=>{e.isHide||P(E)})}b(t,C),z(),o()}lt(["click"]);import{PlaybackState as na}from"@vkontakte/videoplayer-core/es2015";import{checkNever as Lb}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as xn}from"@vkontakte/videoplayer-statistics/es2015";var zp=(t,e)=>Math.min(+(t+e).toFixed(2),1),qp=(t,e)=>Math.max(+(t-e).toFixed(2),0),Oc=(t,e,i)=>{let o=zp(e,i);e<1&&t.actions.internal.setVolume(o)},Hc=(t,e,i)=>{let o=qp(e,i);e>0&&t.actions.internal.setVolume(o)};var ws=({isAudioDisabled:t,audioDisabledHintCallback:e,isAudioAvailable:i,audioIsNotExistHintCallback:o})=>t?(e==null||e(),!1):i?!0:(o==null||o(),!1);var Vb=L('<div class="keyboard-controls svelte-10kkmxz" tabindex="-1" role="region"><!></div>'),Rb={hash:"svelte-10kkmxz",code:".keyboard-controls.svelte-10kkmxz {position:absolute;left:0;right:0;top:0;bottom:0;}"};function Wp(t,e){var qt,Wt;U(e,!0),W(t,Rb);let[i,o]=Be(),n=()=>S(Y,"$playbackState$",i),a=()=>S(O,"$adPlaybackState",i),s=()=>S(me,"$disabledControls$",i),d=()=>S(J,"$positionExact$",i),l=()=>S(ne,"$duration$",i),u=()=>S(G,"$isAudioAvailable$",i),v=()=>S(Z,"$volume$",i),$=()=>S(be,"$availablePlaybackRates$",i),p=()=>S(Me,"$currentPlaybackRate$",i),_=()=>S(Re,"$isInteractiveTime$",i),w=()=>S(Ne,"$showInteractiveTimeIndicatorTooltip$",i),y=()=>S(pe,"$isEnded$",i),C=()=>S(le,"$muted$",i),T=()=>S(Ve,"$currentSubtitle$",i),E=()=>S(_e,"$overlayContainer$",i),P=f(e,"nextButtonActive",3,!1),A=f(e,"prevButtonActive",3,!1),I=Ie(),V=zt(),H=I.getLogger().createComponentLog("KeyboardControls component"),Y=I.state.playbackState$,O=I.ads.playbackState,J=I.state.positionExact$,ne=I.state.duration$,Z=I.state.volume$,me=I.ui.controls.disabledControls$,le=I.state.muted$,Ve=I.state.currentSubtitle$,Me=I.state.currentPlaybackRate$,be=I.state.availablePlaybackRates$,ae=I.ui.contextMenu.openedByHotKey$,Le=I.ui.contextMenu.lastActiveElem$,re=I.ui.contextMenu.visible$,N=I.ui.contextMenu.position$,pe=I.state.isEnded$,_e=I.ui.overlayContainer$,Ge=(qt=I.callbacks)==null?void 0:qt.onAudioDoesNotExistHint,ie=(Wt=I.callbacks)==null?void 0:Wt.onAudioDisabledHint,G=I.state.isAudioAvailable$,K=I.state.isAudioDisabled,Re=I.state.isInteractiveTime$,{showInteractiveTimeIndicatorTooltip$:Ne}=fo(),et=0,we=!0,Se=ee(void 0),De=()=>{var ve;return(ve=r(Se))==null?void 0:ve.focus()},Xe=ve=>(ve!==we&&(we=ve,et=0),et+=1,(V.controls.seekStepKeyboard+V.controls.seekStepKeyboard*et)/1e3),ot=ve=>{var Fe,$t;let j=ve.target,Ce=(Fe=j==null?void 0:j.getAttribute("role"))==null?void 0:Fe.includes("menuitem"),se=j.classList.contains("btn"),He=ve.code;if(se&&He==="Space")return;let Ue=Og.has(He);if(Ce&&Ue)return;let tt=!Bg.has(He);if(ve.ctrlKey&&tt||ve.altKey&&tt||ve.metaKey)return;let ct=Ce&&He==="Escape";Hg.has(He)||ct||e.hideContextMenu();let Ye=n()===na.PLAYING||n()===na.PAUSED,Ze=e.isAds&&(a()==="paused"||a()==="playing"),nt=!Ze&&!s().has("TIMELINE");if(Ye||Ze)switch(H({message:`key down, code: ${He}`}),He){case"KeyJ":case"ArrowLeft":{if(!nt)break;if(ve.ctrlKey||ve.altKey){let qe=I.actions.internal.getPrevEpisode();I.actions.internal.seekToPrevEpisode(qe),qe&&e.showHotKeyHelpers({type:"EPISODE_PREV",text:qe.text}),ve.preventDefault()}else{let qe=ve.shiftKey?Xe(!1):V.controls.seekStepKeyboard/1e3,dt=Math.max(d()-qe,0);d()>0&&(I.actions.internal.seekTime(dt,xn.DOUBLE_TAP),e.showHotKeyHelpers({type:"BACKWARD_SEEK",text:qe.toString()}),ve.preventDefault())}break}case"KeyL":case"ArrowRight":{if(!nt)break;if(ve.ctrlKey||ve.altKey){let qe=I.actions.internal.getNextEpisode();I.actions.internal.seekToNextEpisode(qe),qe&&e.showHotKeyHelpers({type:"EPISODE_NEXT",text:qe.text}),ve.preventDefault()}else{let qe=ve.shiftKey?Xe(!0):V.controls.seekStepKeyboard/1e3,dt=Math.min(d()+qe,l());Math.round(d())<Math.round(l())&&(I.actions.internal.seekTime(dt,xn.DOUBLE_TAP),e.showHotKeyHelpers({type:"FORWARD_SEEK",text:qe.toString()}),ve.preventDefault())}break}case"ArrowUp":{if(ws({isAudioDisabled:K,audioDisabledHintCallback:ie,isAudioAvailable:u(),audioIsNotExistHintCallback:Ge})){let qe=v(),dt=V.controls.volumeStepKeyboard,Xt=qe<=1;if(Oc(I,qe,dt),Xt){let Ni=Math.round(zp(qe,dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Ni}})}}ve.preventDefault();break}case"ArrowDown":{if(ws({isAudioDisabled:K,audioDisabledHintCallback:ie,isAudioAvailable:u(),audioIsNotExistHintCallback:Ge})){let qe=v(),dt=V.controls.volumeStepKeyboard,Xt=qe>=0;if(Hc(I,qe,dt),Xt){let Ni=Math.round(qp(qe,dt)*100).toString();e.showHotKeyHelpers({type:"VOLUME",t:{key:"hotkey_helper_current_volume",value:Ni}})}}ve.preventDefault();break}case"Comma":{if(ve.shiftKey){I.actions.internal.decrementPlaybackRate();let qe=$().find(dt=>dt.value===p());e.showHotKeyHelpers({type:"RATE_DOWN",text:qe==null?void 0:qe.displayValue}),ve.preventDefault()}else{if(Ze||n()!==na.PAUSED)break;let qe=Math.max(d()-V.controls.seekStepFrame/1e3,0);d()>0&&(e.showHotKeyHelpers({type:"BACKWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(qe,xn.DOUBLE_TAP),ve.preventDefault())}break}case"Period":{if(ve.shiftKey){I.actions.internal.incrementPlaybackRate();let qe=$().find(dt=>dt.value===p());e.showHotKeyHelpers({type:"RATE_UP",text:qe==null?void 0:qe.displayValue}),ve.preventDefault()}else{if(Ze||n()!==na.PAUSED)break;let qe=Math.min(d()+V.controls.seekStepFrame/1e3,l());d()<l()&&(e.showHotKeyHelpers({type:"FORWARD_SEEK"}),I.actions.internal.clearDelayedBufferingCheckTimeout(),I.actions.internal.seekTime(qe,xn.DOUBLE_TAP),ve.preventDefault())}break}case"KeyK":case"Space":if(!s().has("PLAY_BUTTON"))if(_()&&w()&&Ne.set(!1),e.fakePlayButtonHandler)e.fakePlayButtonHandler();else{I.actions.internal.togglePlay();let qe="PLAY";n()===na.PAUSED?qe="PAUSE":y()&&(qe="REPLAY"),e.showHotKeyHelpers({type:qe})}ve.preventDefault();break;case"KeyM":{ws({isAudioDisabled:K,audioDisabledHintCallback:ie,isAudioAvailable:u(),audioIsNotExistHintCallback:Ge})&&(e.showHotKeyHelpers({type:C()?"VOLUME":"MUTE"}),I.actions.internal.toggleMuted()),ve.preventDefault();break}case"KeyF":e.toggleFullscreen(),ve.preventDefault();break;case"KeyC":I.actions.internal.toggleSubtitle(),T().value!=="off"?e.showHotKeyHelpers({type:"SUBTITLES_ON",text:($t=T())==null?void 0:$t.displayValue}):e.showHotKeyHelpers({type:"SUBTITLES_OFF"}),ve.preventDefault();break;case"KeyI":I.actions.internal.togglePictureInPicture(),ve.preventDefault();break;case"Digit1":case"Numpad1":if(ve.shiftKey){let qe=Vh(E());N.set(qe),Le.set(j),ae.set(!0),re.set(!0),ve.preventDefault();break}e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.1,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit2":case"Numpad2":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.2,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit3":case"Numpad3":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.3,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit4":case"Numpad4":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.4,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit5":case"Numpad5":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.5,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit6":case"Numpad6":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.6,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit7":case"Numpad7":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.7,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit8":case"Numpad8":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.8,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit9":case"Numpad9":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(.9,xn.DOUBLE_TAP),ve.preventDefault();break;case"Digit0":case"Numpad0":e.showHotKeyHelpers(),I.actions.internal.seekToPercent(0,xn.DOUBLE_TAP),ve.preventDefault();break;case"Slash":{ve.shiftKey&&V.features.hotKeyMapModal&&(e.showKeyMap(),ve.preventDefault());break}case"KeyN":ve.shiftKey&&P()&&I.actions.internal.nextVideoClick();break;case"KeyP":ve.shiftKey&&A()&&I.actions.internal.prevVideoClick();break;case"ShiftLeft":case"ShiftRight":ve.preventDefault();break;case"Tab":case"Escape":case"Enter":break;default:Lb(He);break}},ft=ve=>{let j=ve.code;if(ve.ctrlKey||ve.altKey||ve.metaKey)return;let Ce=n()===na.PLAYING||n()===na.PAUSED,se=e.isAds&&(a()==="paused"||a()==="playing");if(Ce||se)switch(j){case"ShiftLeft":case"ShiftRight":et=0;break}},Je=F("aria_label_video_player");var gt=Vb();gt.__keyup=ft,gt.__keydown=ot,Oe(gt,"aria-label",Je);var Et=h(gt);he(Et,()=>{var ve;return(ve=e.children)!=null?ve:oe}),g(gt),pt(gt,ve=>B(Se,ve),()=>r(Se)),b(t,gt);var jt=z({focus:De});return o(),jt}lt(["keyup","keydown"]);var Db=L('<div class="container svelte-1dbnjb1"><div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div> <div class="dot svelte-1dbnjb1"></div></div>'),Nb={hash:"svelte-1dbnjb1",code:`.container.svelte-1dbnjb1 {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex;}.dot.svelte-1dbnjb1:nth-child(1) {animation-delay:calc(0 * 180ms);}.dot.svelte-1dbnjb1:nth-child(2) {animation-delay:calc(1 * 180ms);}.dot.svelte-1dbnjb1:nth-child(3) {animation-delay:calc(2 * 180ms);}
145
145
 
146
146
  @keyframes svelte-1dbnjb1-dot_animation {
147
147
  0% {
@@ -162,18 +162,18 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
162
162
  /* mobile */
163
163
  /* container mobile */.btn-m.svelte-wr0kwr {position:absolute;left:12px;top:50%;transform:translateY(-50%);height:44px;width:44px;border-radius:12px;background-color:rgba(0, 0, 0, 0.56);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;justify-content:center;}.btn-m--play.svelte-wr0kwr {width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;position:relative;padding:16px;}.btn-m--play.svelte-wr0kwr svg {transform:scale(2);}.btn-m--prev.svelte-wr0kwr,
164
164
  .btn-m--next.svelte-wr0kwr {position:absolute;width:50px;height:50px;}.btn-m--prev.svelte-wr0kwr {right:calc(100% + 35px);}.btn-m--next.svelte-wr0kwr {left:calc(100% + 35px);}.btn.svelte-wr0kwr:disabled {cursor:default;
165
- /* \u043D\u0443\u0436\u043D\u043E \u0434\u043B\u044F \u0442\u043E\u0433\u043E, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0434\u0430\u0432\u0430\u0442\u044C \u0441\u043E\u0431\u044B\u0442\u0438\u044F\u043C \u043A\u043B\u0438\u043A\u0430 \u043E\u0442\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0442\u044C \u043D\u0430 \u0437\u0430\u0431\u043B\u043E\u0447\u0435\u043D\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 */pointer-events:none;}.btn.svelte-wr0kwr:not(.btn-full-opacity):disabled {opacity:0.4;}.btn.svelte-wr0kwr:not(:disabled):hover {opacity:0.8;}.pr-0.svelte-wr0kwr {padding-right:0;}.pl-0.svelte-wr0kwr {padding-left:0;}`};function Vt(t,e){U(e,!0),W(t,Fb);let i=f(e,"className",3,""),o=f(e,"style",3,""),n=f(e,"disabled",3,void 0),a=f(e,"testId",3,void 0),s=f(e,"ariaHidden",3,void 0),d=f(e,"ariaLabel",3,void 0),l=f(e,"ref",15,void 0),u=f(e,"ariaKeyShortCut",3,void 0),v=f(e,"ariaExpanded",3,void 0),$=f(e,"tabIndex",3,0),p=f(e,"click",3,Xa),_=f(e,"focus",3,Xa),w=f(e,"blur",3,Xa),y=m(()=>p()===Xa?null:A=>{A.stopPropagation(),p()(A)}),C=m(()=>_()===Xa?null:A=>{A.preventDefault(),_()()}),T=m(()=>w()===Xa?null:A=>{A.preventDefault(),w()()});var E=Hb();E.__pointerdown=[Ob],E.__click=function(...A){var I;(I=r(y))==null||I.apply(this,A)};var P=h(E);he(P,()=>{var A;return(A=e.children)!=null?A:oe}),g(E),pt(E,A=>l(A),()=>l()),k(()=>{var A,I,V,H,Y,O,J;te(E,1,`btn ${(A=i())!=null?A:""}`,"svelte-wr0kwr"),it(E,o()||null),E.disabled=(I=n())!=null?I:null,Fe(E,"aria-hidden",(V=s())!=null?V:null),Fe(E,"aria-label",(H=d())!=null?H:null),Fe(E,"aria-keyshortcuts",(Y=u())!=null?Y:null),Fe(E,"aria-expanded",(O=v())!=null?O:null),Fe(E,"data-testid",(J=a())!=null?J:null),Fe(E,"tabindex",$())}),St("focus",E,function(...A){var I;(I=r(C))==null||I.apply(this,A)}),St("blur",E,function(...A){var I;(I=r(T))==null||I.apply(this,A)}),b(t,E),z()}lt(["pointerdown","click"]);var Ub=L('<div class="modal-header svelte-1witlsj"><h3 class="modal-title svelte-1witlsj"> </h3> <!></div>'),zb=L('<div class="modal-overlay svelte-1witlsj"><div class="modal-container svelte-1witlsj"><!> <div class="modal-scroll svelte-1witlsj"><div class="modal-main svelte-1witlsj"><!></div></div></div></div>'),qb={hash:"svelte-1witlsj",code:".modal-overlay.svelte-1witlsj {position:absolute;top:0;bottom:0;left:0;right:0;background:transparent;display:flex;align-items:center;justify-content:center;}.modal-container.svelte-1witlsj {display:flex;flex-direction:column;width:calc(100% - 32px);max-width:600px;height:calc(100% - 24px);max-height:490px;background:var(--mobile-settings-bg);color:var(--white);border-radius:8px;}.modal-header.svelte-1witlsj {box-sizing:border-box;display:flex;justify-content:space-between;align-items:start;height:40px;padding:8px 10px;border-bottom:1px solid var(--white-alpha-24);}.modal-title.svelte-1witlsj {margin:3px 0 0 6px;color:var(--white);font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;}.modal-scroll.svelte-1witlsj {overflow-y:auto;overflow-x:hidden;margin:8px 4px 8px 0;height:100%;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar {width:8px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-track {box-shadow:none;background-color:transparent;border-radius:4px;margin-right:2px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb:hover {background-color:#777;}.modal-main.svelte-1witlsj {margin:-8px -4px 0 0;}"};function Qp(t,e){U(e,!0),W(t,qb);let i=f(e,"showHeader",3,!0),o=f(e,"showCloseCross",3,!0),n=F("hotkey_map_modal_close_btn_text");var a=zb(),s=h(a),d=h(s);{var l=p=>{var _=Ub(),w=h(_),y=h(w,!0);g(w);var C=M(w,2);{var T=E=>{Vt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",ariaLabel:n,children:(P,A)=>{Kp(P,{})},$$slots:{default:!0}})};R(C,E=>{o()&&E(T)})}g(_),k(()=>ge(y,e.title)),b(p,_)};R(d,p=>{i()&&p(l)})}var u=M(d,2),v=h(u),$=h(v);he($,()=>{var p;return(p=e.children)!=null?p:oe}),g(v),g(u),g(s),g(a),b(t,a),z()}var Wb=new Set(["BR"]),Nh=t=>{var n;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],s=a.tagName;Wb.has(s)||(n=a.parentElement)==null||n.removeChild(a)}return e.innerHTML};var Kb=L('<li class="hot-key-map-item svelte-quklnq"><span class="hot-key-map-item-description svelte-quklnq"><!></span> <span class="hot-key-map-item-value svelte-quklnq"> </span></li>'),Qb=L('<div class="hot-key-map-group svelte-quklnq"><h5 class="hot-key-map-group-title svelte-quklnq"> </h5> <ul class="hot-key-map-group-items svelte-quklnq"></ul></div>'),Gb=L('<div class="hot-key-map svelte-quklnq"></div>'),jb={hash:"svelte-quklnq",code:`.hot-key-map.svelte-quklnq {color:var(--black);box-sizing:border-box;overflow-x:hidden;}.hot-key-map-group.svelte-quklnq {border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px;}.hot-key-map-group.svelte-quklnq:last-child {border-bottom:none;}.hot-key-map-group-title.svelte-quklnq {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.svelte-quklnq,
165
+ /* \u043D\u0443\u0436\u043D\u043E \u0434\u043B\u044F \u0442\u043E\u0433\u043E, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0434\u0430\u0432\u0430\u0442\u044C \u0441\u043E\u0431\u044B\u0442\u0438\u044F\u043C \u043A\u043B\u0438\u043A\u0430 \u043E\u0442\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0442\u044C \u043D\u0430 \u0437\u0430\u0431\u043B\u043E\u0447\u0435\u043D\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 */pointer-events:none;}.btn.svelte-wr0kwr:not(.btn-full-opacity):disabled {opacity:0.4;}.btn.svelte-wr0kwr:not(:disabled):hover {opacity:0.8;}.pr-0.svelte-wr0kwr {padding-right:0;}.pl-0.svelte-wr0kwr {padding-left:0;}`};function Vt(t,e){U(e,!0),W(t,Fb);let i=f(e,"className",3,""),o=f(e,"style",3,""),n=f(e,"disabled",3,void 0),a=f(e,"testId",3,void 0),s=f(e,"ariaHidden",3,void 0),d=f(e,"ariaLabel",3,void 0),l=f(e,"ref",15,void 0),u=f(e,"ariaKeyShortCut",3,void 0),v=f(e,"ariaExpanded",3,void 0),$=f(e,"tabIndex",3,0),p=f(e,"click",3,Xa),_=f(e,"focus",3,Xa),w=f(e,"blur",3,Xa),y=m(()=>p()===Xa?null:A=>{A.stopPropagation(),p()(A)}),C=m(()=>_()===Xa?null:A=>{A.preventDefault(),_()()}),T=m(()=>w()===Xa?null:A=>{A.preventDefault(),w()()});var E=Hb();E.__pointerdown=[Ob],E.__click=function(...A){var I;(I=r(y))==null||I.apply(this,A)};var P=h(E);he(P,()=>{var A;return(A=e.children)!=null?A:oe}),g(E),pt(E,A=>l(A),()=>l()),k(()=>{var A,I,V,H,Y,O,J;te(E,1,`btn ${(A=i())!=null?A:""}`,"svelte-wr0kwr"),it(E,o()||null),E.disabled=(I=n())!=null?I:null,Oe(E,"aria-hidden",(V=s())!=null?V:null),Oe(E,"aria-label",(H=d())!=null?H:null),Oe(E,"aria-keyshortcuts",(Y=u())!=null?Y:null),Oe(E,"aria-expanded",(O=v())!=null?O:null),Oe(E,"data-testid",(J=a())!=null?J:null),Oe(E,"tabindex",$())}),St("focus",E,function(...A){var I;(I=r(C))==null||I.apply(this,A)}),St("blur",E,function(...A){var I;(I=r(T))==null||I.apply(this,A)}),b(t,E),z()}lt(["pointerdown","click"]);var Ub=L('<div class="modal-header svelte-1witlsj"><h3 class="modal-title svelte-1witlsj"> </h3> <!></div>'),zb=L('<div class="modal-overlay svelte-1witlsj"><div class="modal-container svelte-1witlsj"><!> <div class="modal-scroll svelte-1witlsj"><div class="modal-main svelte-1witlsj"><!></div></div></div></div>'),qb={hash:"svelte-1witlsj",code:".modal-overlay.svelte-1witlsj {position:absolute;top:0;bottom:0;left:0;right:0;background:transparent;display:flex;align-items:center;justify-content:center;}.modal-container.svelte-1witlsj {display:flex;flex-direction:column;width:calc(100% - 32px);max-width:600px;height:calc(100% - 24px);max-height:490px;background:var(--mobile-settings-bg);color:var(--white);border-radius:8px;}.modal-header.svelte-1witlsj {box-sizing:border-box;display:flex;justify-content:space-between;align-items:start;height:40px;padding:8px 10px;border-bottom:1px solid var(--white-alpha-24);}.modal-title.svelte-1witlsj {margin:3px 0 0 6px;color:var(--white);font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:600;line-height:16px;}.modal-scroll.svelte-1witlsj {overflow-y:auto;overflow-x:hidden;margin:8px 4px 8px 0;height:100%;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar {width:8px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-track {box-shadow:none;background-color:transparent;border-radius:4px;margin-right:2px;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.modal-scroll.svelte-1witlsj::-webkit-scrollbar-thumb:hover {background-color:#777;}.modal-main.svelte-1witlsj {margin:-8px -4px 0 0;}"};function Qp(t,e){U(e,!0),W(t,qb);let i=f(e,"showHeader",3,!0),o=f(e,"showCloseCross",3,!0),n=F("hotkey_map_modal_close_btn_text");var a=zb(),s=h(a),d=h(s);{var l=p=>{var _=Ub(),w=h(_),y=h(w,!0);g(w);var C=M(w,2);{var T=E=>{Vt(E,{get click(){return e.onClose},testId:"close-modal",style:"padding: 0; height: 24px; width: 24px",ariaLabel:n,children:(P,A)=>{Kp(P,{})},$$slots:{default:!0}})};R(C,E=>{o()&&E(T)})}g(_),k(()=>ge(y,e.title)),b(p,_)};R(d,p=>{i()&&p(l)})}var u=M(d,2),v=h(u),$=h(v);he($,()=>{var p;return(p=e.children)!=null?p:oe}),g(v),g(u),g(s),g(a),b(t,a),z()}var Wb=new Set(["BR"]),Nh=t=>{var n;let e=document.createElement("DIV");e.innerHTML=t;let i=e.querySelectorAll("*"),o=i.length;for(;o--;){let a=i[o],s=a.tagName;Wb.has(s)||(n=a.parentElement)==null||n.removeChild(a)}return e.innerHTML};var Kb=L('<li class="hot-key-map-item svelte-quklnq"><span class="hot-key-map-item-description svelte-quklnq"><!></span> <span class="hot-key-map-item-value svelte-quklnq"> </span></li>'),Qb=L('<div class="hot-key-map-group svelte-quklnq"><h5 class="hot-key-map-group-title svelte-quklnq"> </h5> <ul class="hot-key-map-group-items svelte-quklnq"></ul></div>'),Gb=L('<div class="hot-key-map svelte-quklnq"></div>'),jb={hash:"svelte-quklnq",code:`.hot-key-map.svelte-quklnq {color:var(--black);box-sizing:border-box;overflow-x:hidden;}.hot-key-map-group.svelte-quklnq {border-bottom:1px solid var(--white-alpha-24);margin:0 20px 0 16px;}.hot-key-map-group.svelte-quklnq:last-child {border-bottom:none;}.hot-key-map-group-title.svelte-quklnq {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.svelte-quklnq,
166
166
  .hot-key-map-item.svelte-quklnq {padding:12px 0;margin:0;width:100%;}.hot-key-map-group-items.svelte-quklnq {box-sizing:border-box;list-style:none;padding:0;margin:0;}.hot-key-map-item.svelte-quklnq {box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;--videoplayer-hotkey-item-value-width: 156px;--videoplayer-hotkey-item-value-padding-left: 24px;}.hot-key-map-item-description.svelte-quklnq {color:var(--white-alpha-72);width:calc(100% - var(--videoplayer-hotkey-item-value-width) - var(--videoplayer-hotkey-item-value-padding-left));max-width:388px;}.hot-key-map-item-value.svelte-quklnq {color:var(--white);width:var(--videoplayer-hotkey-item-value-width);padding-left:var(--videoplayer-hotkey-item-value-padding-left);letter-spacing:-0.14px;}.hot-key-map-item-description.svelte-quklnq,
167
- .hot-key-map-item-value.svelte-quklnq {font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:400;line-height:16px;}`};function Gp(t,e){U(e,!1),W(t,jb);let[i,o]=Be(),n=()=>S(s,"$data",i),a=Ie(),{data:s,show:d}=a.ui.modals.hotKeyMap,l=()=>{d.set(!1)};xr(),Qp(t,{get title(){return n().title},onClose:l,children:(u,v)=>{var $=Gb();Ii($,5,()=>n().groups,({title:p,items:_})=>p,(p,_)=>{let w=()=>r(_).title,y=()=>r(_).items;var C=Qb(),T=h(C),E=h(T,!0);g(T);var P=M(T,2);Ii(P,5,y,({description:A,value:I})=>I,(A,I)=>{let V=()=>r(I).description,H=()=>r(I).value;var Y=Kb(),O=h(Y),J=h(O);Ml(J,()=>Nh(V()),!1,!1),g(O);var ne=M(O,2),Z=h(ne,!0);g(ne),g(Y),k(()=>ge(Z,H())),b(A,Y)}),g(P),g(C),k(()=>ge(E,w())),b(p,C)}),g($),b(u,$)},$$slots:{default:!0}}),z(),o()}import{noop as s1}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as i1,PlaybackState as Vf}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-shared/es2015";var Yb=L('<div class="pillow svelte-1oe0j8n"><!></div>'),Zb={hash:"svelte-1oe0j8n",code:".pillow.svelte-1oe0j8n {background-color:#679FF8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;padding:2px 4px;border-radius:12px;}"};function jp(t,e){W(t,Zb);var i=Yb(),o=h(i);he(o,()=>{var n;return(n=e.children)!=null?n:oe}),g(i),b(t,i)}import{VideoQuality as ed}from"@vkontakte/videoplayer-shared/es2015";var Xb=ye('<svg><!><path fill="currentColor" d="M5.517 5c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.283.516.283A.49.49 0 0 0 9 4.501c0-.14-.068-.287-.222-.478l-1.47-1.73L8.818.868C8.949.731 9 .618 9 .475A.474.474 0 0 0 8.515 0c-.171 0-.301.065-.445.222L6.064 2.25h-.03V.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.536.516.536"></path><path fill="currentColor" fill-rule="evenodd" d="m2.551 1.052-1.51 2.052h1.51zM3.5 3.104V.832c0-.81-1.089-1.14-1.556-.48L.139 2.821a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 0 0 0-.9z" clip-rule="evenodd"></path></svg>');function Yp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Xb();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img"},i))),b(t,o)}var Jb=ye('<svg><!><path fill="currentColor" d="M5.513 5c.323 0 .513-.198.513-.537v-.97l.49-.516L7.99 4.715c.16.205.302.284.513.284A.49.49 0 0 0 9 4.5c0-.14-.068-.287-.22-.478L7.293 2.293 8.82.868C8.949.731 9 .618 9 .475A.473.473 0 0 0 8.517 0c-.17 0-.299.065-.441.222L6.056 2.25h-.03V.54c0-.342-.19-.54-.513-.54S5 .198 5 .54v3.923c0 .339.19.537.513.537"></path><path fill="currentColor" fill-rule="evenodd" d="M2 0q-.53 0-.952.173a1.5 1.5 0 0 0-.654.484q-.23.312-.23.71c0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44q-.23.305-.23.71 0 .432.252.778l.001.001q.26.336.712.523Q1.418 5.001 2 5q.582 0 1.035-.186.451-.187.705-.524.26-.346.26-.777 0-.406-.23-.711a1.45 1.45 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.44 1.44 0 0 0-.653-.484A2.4 2.4 0 0 0 2 0m-.573.964C1.563.86 1.75.804 2 .804s.434.055.564.16h.001a.51.51 0 0 1 .204.43.52.52 0 0 1-.204.437c-.13.105-.315.161-.565.161s-.437-.056-.573-.161a.52.52 0 0 1-.203-.437q.002-.276.203-.43m-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188s.522.066.677.188q.24.181.24.503a.63.63 0 0 1-.24.523c-.155.122-.377.188-.677.188s-.524-.065-.684-.187a.64.64 0 0 1-.234-.524" clip-rule="evenodd"></path></svg>');function Zp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Jb();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img"},i))),b(t,o)}var e$=ye('<svg><!><path fill="currentColor" d="M5.516 5h1.107C8.103 5 9 4.065 9 2.5S8.103 0 6.623 0H5.516C5.191 0 5 .2 5 .537V4.46c0 .342.191.54.516.54m.516-.854V.852H6.5C7.41.852 8 1.468 8 2.5c0 1.066-.577 1.646-1.5 1.646zM.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S4 4.802 4 4.464V.54C4 .198 3.809 0 3.484 0s-.516.198-.516.54v1.531H1.032V.54C1.032.198.841 0 .516 0S0 .198 0 .54v3.989C0 4.867.191 5 .516 5"></path></svg>');function Xp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=e$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img"},i))),b(t,o)}var t$=ye('<svg><!><path fill="currentColor" d="M9.516 5h1.107C12.103 5 13 4.065 13 2.5S12.103 0 10.623 0H9.516C9.191 0 9 .2 9 .537V4.46c0 .342.191.54.516.54m.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zM4.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S8 4.802 8 4.464V.54C8 .198 7.809 0 7.484 0s-.516.198-.516.54v1.531H5.032V.54c0-.342-.191-.54-.516-.54S4 .198 4 .54v3.989c0 .338.191.471.516.471m-4 0c.325 0 .516-.198.516-.537V3h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407H1.031V.854h1.5c.28 0 .468-.16.468-.427C3 .161 2.815 0 2.532 0H.516C.191 0 0 .198 0 .537v3.926C0 4.802.191 5 .516 5"></path></svg>');function Xl(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=t$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"none",role:"img"},i))),b(t,o)}var i$=ye('<svg><!><path fill="currentColor" d="M11.516 5.75h1.107c1.48 0 2.377-.935 2.377-2.5s-.897-2.5-2.377-2.5h-1.107c-.325 0-.516.199-.516.537V5.21c0 .342.191.54.516.54m.516-.854V1.602h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zm-5.516.854c.325 0 .516-.198.516-.536V3.672h1.936v1.542c0 .338.191.536.516.536S10 5.552 10 5.214V1.29c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531H7.032V1.29c0-.342-.191-.54-.516-.54S6 .948 6 1.29v3.989c0 .338.191.471.516.471"></path><path fill="currentColor" fill-rule="evenodd" d="M3.338 5.659a4 4 0 0 1-.838.091C1.037 5.75 0 4.885 0 3.303 0 1.733 1.037.75 2.5.75 3.96.75 5 1.734 5 3.303c0 .863-.274 1.46-.778 1.88l.194.29a.5.5 0 0 1-.832.554zm-.52-.78-.234-.352a.5.5 0 1 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037 0-1.036-.64-1.653-1.447-1.653-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02" clip-rule="evenodd"></path></svg>');function Jl(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=i$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"none",role:"img"},i))),b(t,o)}var Fc=t=>{switch(t){case ed.Q_720P:return Xp;case ed.Q_1080P:return Xl;case ed.Q_1440P:return Jl;case ed.Q_2160P:return Yp;case ed.Q_4320P:return Zp}};var o$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12.722 2.213c1.208.037 1.994.702 2.408 1.954l.065.215.051.191q.027.111.068.235l.058.159.034.017.069-.023.133-.051.156-.068c1.414-.658 2.502-.536 3.387.437l.125.145.82 1.017c.732.962.71 1.99-.004 3.1l-.125.187-.117.16a3 3 0 0 0-.142.205l-.07.115-.034.057.004.02.091.06.127.077.153.083c1.39.71 1.963 1.641 1.742 2.936l-.038.188-.244 1.058c-.158.685-.282 1.01-.77 1.454-.475.432-1.016.61-1.732.67l-.22.014-.198.006q-.116.002-.246.015l-.181.021.013.142.013.096.033.179c.323 1.526-.04 2.558-1.188 3.202l-.17.09-1.175.57c-1.102.495-2.099.242-3.02-.702l-.153-.164-.13-.15a3 3 0 0 0-.17-.186l-.097-.096-.05-.046-.09.087-.106.108-.118.133c-.952 1.134-1.957 1.54-3.176 1.067l-.175-.074-1.052-.51-.312-.16c-.476-.26-.743-.51-1.004-1.061-.275-.58-.294-1.15-.16-1.883l.044-.225q.024-.114.041-.242l.019-.172-.004-.004-.104-.014-.146-.013-.174-.008c-1.56-.028-2.484-.614-2.853-1.877l-.049-.185-.292-1.274c-.235-1.185.236-2.1 1.364-2.785l.194-.112.175-.093a3 3 0 0 0 .216-.12l.155-.102.004-.019-.063-.108-.08-.125-.103-.143c-.937-1.246-1.044-2.335-.276-3.404l.115-.153.824-1.013c.79-.915 1.8-1.107 3.034-.64l.208.083.181.081q.103.048.222.093l.136.048.036-.017.033-.089.045-.138.046-.166c.36-1.436 1.085-2.242 2.39-2.35l.19-.011h1.39Zm-.056 1.799h-1.333l-.14.01c-.285.037-.472.191-.652.832l-.041.156-.057.206a6.3 6.3 0 0 1-.468 1.134 6 6 0 0 0-1.147.558 6.5 6.5 0 0 1-1.16-.35l-.35-.154c-.248-.107-.435-.161-.583-.175l-.084-.003a.55.55 0 0 0-.408.193l-.068.074-.789.973-.095.125c-.183.264-.21.5.195 1.075l.228.316c.212.31.425.692.598 1.102q-.195.577-.27 1.201c-.334.29-.69.537-1.013.72l-.343.184c-.617.34-.695.563-.646.881l.013.075.28 1.22.04.152c.096.308.265.475.968.509l.388.014c.37.024.798.09 1.223.204q.337.526.776.968a6.3 6.3 0 0 1-.118 1.445c-.201.95-.014 1.102.383 1.3l1.126.547a.8.8 0 0 0 .337.089l.067-.006c.181-.028.382-.162.67-.485l.258-.295a6.5 6.5 0 0 1 .949-.837l.298.023L12 18l.302-.008.298-.022c.363.263.691.559.948.837l.258.295c.325.364.538.488.737.49l.066-.003a.8.8 0 0 0 .178-.046l.093-.039 1.126-.548.139-.073c.3-.175.42-.395.245-1.226a6.2 6.2 0 0 1-.117-1.445q.436-.442.775-.97a6.5 6.5 0 0 1 1.223-.202l.387-.014c.812-.04.912-.256 1.008-.66l.264-1.142c.09-.406.095-.643-.617-1.035l-.342-.183a6.4 6.4 0 0 1-1.014-.722 6 6 0 0 0-.27-1.201c.174-.41.386-.791.598-1.1l.228-.317c.406-.575.378-.81.195-1.075l-.045-.062-.787-.974c-.14-.171-.259-.294-.452-.322l-.076-.007c-.16-.003-.368.05-.667.178l-.35.155a6.4 6.4 0 0 1-1.158.348 6 6 0 0 0-1.15-.556 6.5 6.5 0 0 1-.454-1.093l-.113-.414c-.192-.678-.393-.805-.714-.828zM12 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></svg>');function Jp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=o$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"settings-mobile-icon",role:"img"},i))),b(t,o)}var n$=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.5.5 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.5.5 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.5.5 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438q.063.016.12.05c1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.5.5 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.6.6 0 0 0-.413-.519 7.5 7.5 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.58.58 0 0 0 .633-.44 7.5 7.5 0 0 1 .749-1.967" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M13.25 2.833c.225.751.383 1.502 1.63 2.222 1.399.38 2.082.003 2.718-.42.663-.443.86-.315 1.124-.054l.644.643c.294.294.412.412 0 1.178-.372.69-.792 1.333-.418 2.726.72 1.255 1.47 1.472 2.219 1.622.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.751.225-1.502.383-2.222 1.63-.38 1.399-.003 2.082.42 2.718.443.663.315.86.054 1.124l-.643.644c-.294.294-.412.412-1.178 0-.69-.372-1.333-.792-2.726-.418-1.255.72-1.472 1.47-1.622 2.219-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.225-.751-.383-1.502-1.63-2.222-1.399-.38-2.082-.003-2.718.42-.663.443-.86.315-1.124.054l-.644-.643c-.294-.294-.412-.412 0-1.178.372-.69.792-1.333.418-2.726-.72-1.255-1.47-1.472-2.219-1.622-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.751-.225 1.502-.383 2.222-1.63.38-1.399.003-2.082-.42-2.718-.443-.663-.315-.86-.054-1.124l.643-.644c.294-.294.412-.412 1.178 0 .69.372 1.333.792 2.726.418 1.255-.72 1.472-1.47 1.622-2.219.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5" class="_full"></path></svg>');function ef(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=n$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"settings-icon",role:"img"},i))),b(t,o)}var r$=L('<div aria-hidden="true"><!> <!></div>'),s$={hash:"svelte-8t5w85",code:'.icon.svelte-8t5w85 {display:flex;position:relative;width:24px;height:24px;}.icon.svelte-8t5w85 .pillow {position:absolute;top:1px;right:-9px;}.icon.triple.svelte-8t5w85 .pillow {right:-13px;}.icon.svelte-8t5w85 svg[data-testid="settings-icon--labeled"] ._full {visibility:hidden;opacity:0;}'};function td(t,e){U(e,!0),W(t,s$);let i=f(e,"isMobile",3,!1),o=f(e,"currentQuality",3,void 0),n=m(()=>Fc(o())),a=m(()=>!!r(n)&&[Xl,Jl].includes(r(n)));var s=ze(),d=ue(s);{var l=v=>{Jp(v,{})},u=v=>{var $=r$();let p;var _=h($);{var w=T=>{jp(T,{children:(E,P)=>{var A=ze(),I=ue(A);ki(I,()=>r(n),(V,H)=>{H(V,{})}),b(E,A)},$$slots:{default:!0}})};R(_,T=>{r(n)&&T(w)})}var y=M(_,2);let C=m(()=>r(n)?"settings-icon--labeled":"settings-icon");ef(y,{get"data-testid"(){return r(C)},fill:"var(--btn-color, #fff)"}),g($),k(T=>p=te($,1,"icon svelte-8t5w85",null,p,T),[()=>({triple:r(a)})]),b(v,$)};R(d,v=>{i()?v(l):v(u,!1)})}b(t,s),z()}var a$=L('<span class="settings-icon-wrapper svelte-d9t49t"><!></span>'),l$={hash:"svelte-d9t49t",code:".settings-icon-wrapper.svelte-d9t49t {position:relative;width:24px;}"};function Ja(t,e){U(e,!0),W(t,l$);let[i,o]=Be(),n=()=>S(e.ref$,"$ref$",i),a=()=>S(v,"$settingsMenuVisible",i),s=()=>S(_,"$isMobile",i),d=()=>S(u,"$currentQuality",i),l=Ie(),u=l.state.currentQuality$,v=l.ui.settingsMenu.visible$,$=l.actions.internal.openSettingsMenu,p=l.actions.internal.closeSettingsMenu,_=l.ui.isMobile,w=l.ui.t,y=ee(void 0);We(()=>{n()&&bt(()=>{e.ref$.set(r(y))})});let C=m(()=>a()?w("tooltip_settings_on"):w("tooltip_settings_off"));function T(P){return kt(this,null,function*(){let A=xs(P);a()?p():$(A,$o)})}let E=m(()=>a()?"opened":"");Vt(t,{get className(){return r(E)},testId:"btn-settings",click:T,get ariaLabel(){return r(C)},get ariaExpanded(){return a()},get ref(){return r(y)},set ref(P){B(y,fe(P))},children:(P,A)=>{var I=a$(),V=h(I);td(V,{get isMobile(){return s()},get currentQuality(){return d()}}),g(I),b(P,I)},$$slots:{default:!0}}),z(),o()}var d$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M3 0h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3m1 9h2a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2m5 0h7a1 1 0 1 0 0-2H9a1 1 0 0 0 0 2m-5 4h7a1 1 0 1 0 0-2H4a1 1 0 1 0 0 2m10 0h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2"></path></svg>');function tf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=d$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"22",height:"16",fill:"none","aria-hidden":"true","data-testid":"subtitle-pained-icon",role:"img"},i))),b(t,o)}var c$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M14.692.428c2.293 0 3.124.24 3.962.687a4.67 4.67 0 0 1 1.944 1.944c.449.839.687 1.67.687 3.962v3.958c0 2.292-.238 3.123-.687 3.961a4.67 4.67 0 0 1-1.944 1.944c-.838.449-1.67.687-3.962.687H7.307c-2.293 0-3.124-.238-3.962-.687A4.67 4.67 0 0 1 1.4 14.94c-.448-.838-.687-1.669-.687-3.961V7.02c0-2.292.239-3.123.687-3.962a4.67 4.67 0 0 1 1.944-1.944C4.183.667 5.015.428 7.307.428zm.243 1.716-7.628-.001c-1.832 0-2.484.126-3.154.484a2.96 2.96 0 0 0-1.24 1.24c-.343.64-.473 1.264-.484 2.912v4.2c0 1.83.125 2.483.483 3.153q.433.809 1.241 1.24c.67.36 1.322.485 3.154.485h7.385c1.832 0 2.484-.126 3.154-.484a2.96 2.96 0 0 0 1.24-1.241c.36-.67.485-1.322.485-3.153V7.02c0-1.831-.126-2.483-.484-3.153a2.96 2.96 0 0 0-1.241-1.24c-.64-.343-1.263-.473-2.911-.484ZM11 10.714a.857.857 0 1 1 0 1.714H5.857a.857.857 0 0 1 0-1.714zm5.142 0a.857.857 0 1 1 0 1.714h-1.714a.857.857 0 0 1 0-1.714zm0-3.428a.857.857 0 1 1 0 1.714H11a.857.857 0 1 1 0-1.714zm-8.571 0a.857.857 0 0 1 0 1.714H5.857a.857.857 0 0 1 0-1.714z"></path></svg>');function id(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=c$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"22",height:"18",fill:"none","aria-hidden":"true","data-testid":"subtitle-empty-icon",role:"img"},i))),b(t,o)}function of(t,e){U(e,!0);let i=f(e,"isSubtitlesEnabled",3,!1),n=Ie().ui.t,a=m(()=>i()?n("tooltip_subtitles_on"):n("tooltip_subtitles_off"));Vt(t,{testId:"btn-Subtitles",get ariaLabel(){return r(a)},get click(){return e.click},get ariaKeyShortCut(){return Hr.KeyC},children:(s,d)=>{var l=ze(),u=ue(l);{var v=p=>{tf(p,{})},$=p=>{id(p,{})};R(u,p=>{i()?p(v):p($,!1)})}b(s,l)},$$slots:{default:!0}}),z()}var u$=L('<span class="duration svelte-sz9er7"> </span>'),p$=L('<div><span class="current svelte-sz9er7"> </span> <!></div>'),f$={hash:"svelte-sz9er7",code:".time.svelte-sz9er7 {display:flex;align-items:center;font-weight:500;font-variant-numeric:tabular-nums;padding:12px 6px;color:var(--controls-time);}.time.mobile.svelte-sz9er7 {padding:0 0 0 8px;}.current.svelte-sz9er7 {position:relative;}.duration.svelte-sz9er7 {opacity:0.7;}.duration.svelte-sz9er7:before {content:' / ';white-space:pre;}"};function od(t,e){U(e,!0),W(t,f$);let i=f(e,"isMobile",3,!1),o=f(e,"showDuration",3,!0),n=f(e,"ref",15),a=m(()=>sn(e.duration)),s=m(()=>sn(e.position));var d=p$();let l;var u=h(d),v=h(u,!0);g(u);var $=M(u,2);{var p=_=>{var w=u$(),y=h(w,!0);g(w),k(()=>ge(y,r(a))),b(_,w)};R($,_=>{o()&&_(p)})}g(d),pt(d,_=>n(_),()=>n()),k(_=>{l=te(d,1,"time svelte-sz9er7",null,l,_),ge(v,r(s))},[()=>({mobile:i()})]),b(t,d),z()}import{noop as Uc}from"@vkontakte/videoplayer-shared/es2015";var m$=ye('<svg xmlns="http://www.w3.org/2000/svg" class="icon svelte-1n5yyua" aria-hidden="true"><g fill="var(--btn-color, #fff)" fill-rule="evenodd"><path class="wave2 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503zm3-2A.875.875 0 1 1 20.12 6.88c.263.264.62.74.966 1.432.517 1.033.843 2.255.89 3.716-.047 1.403-.373 2.625-.89 3.658-.346.692-.703 1.168-.966 1.432a.875.875 0 1 1-1.238-1.238c.138-.137.383-.464.639-.976.407-.814.667-1.79.705-2.876-.038-1.144-.298-2.12-.705-2.934-.256-.512-.501-.839-.639-.976z"></path><path class="wave1 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503z"></path><path class="cross svelte-1n5yyua" d="m20 10.763 2.381-2.382A.875.875 0 1 1 23.62 9.62L21.237 12l2.382 2.381a.875.875 0 1 1-1.238 1.238L20 13.237l-2.381 2.382a.875.875 0 1 1-1.238-1.238L18.763 12 16.38 9.619A.875.875 0 1 1 17.62 8.38zm-7.02 8.06c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963z"></path></g></svg>'),v$={hash:"svelte-1n5yyua",code:`.icon.svelte-1n5yyua {display:block;width:24px;height:24px;}.icon.svelte-1n5yyua .cross:where(.svelte-1n5yyua) {visibility:hidden;}.icon[data-value='off'].svelte-1n5yyua .wave1:where(.svelte-1n5yyua),
167
+ .hot-key-map-item-value.svelte-quklnq {font-feature-settings:'clig' off, 'liga' off;font-size:13px;font-style:normal;font-weight:400;line-height:16px;}`};function Gp(t,e){U(e,!1),W(t,jb);let[i,o]=Be(),n=()=>S(s,"$data",i),a=Ie(),{data:s,show:d}=a.ui.modals.hotKeyMap,l=()=>{d.set(!1)};xr(),Qp(t,{get title(){return n().title},onClose:l,children:(u,v)=>{var $=Gb();Ii($,5,()=>n().groups,({title:p,items:_})=>p,(p,_)=>{let w=()=>r(_).title,y=()=>r(_).items;var C=Qb(),T=h(C),E=h(T,!0);g(T);var P=M(T,2);Ii(P,5,y,({description:A,value:I})=>I,(A,I)=>{let V=()=>r(I).description,H=()=>r(I).value;var Y=Kb(),O=h(Y),J=h(O);Ml(J,()=>Nh(V()),!1,!1),g(O);var ne=M(O,2),Z=h(ne,!0);g(ne),g(Y),k(()=>ge(Z,H())),b(A,Y)}),g(P),g(C),k(()=>ge(E,w())),b(p,C)}),g($),b(u,$)},$$slots:{default:!0}}),z(),o()}import{noop as s1}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as i1,PlaybackState as Vf}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-shared/es2015";var Yb=L('<div class="pillow svelte-1oe0j8n"><!></div>'),Zb={hash:"svelte-1oe0j8n",code:".pillow.svelte-1oe0j8n {background-color:#679FF8;color:var(--white);font-size:6px;font-weight:600;-webkit-font-smoothing:antialiased;padding:2px 4px;border-radius:12px;}"};function jp(t,e){W(t,Zb);var i=Yb(),o=h(i);he(o,()=>{var n;return(n=e.children)!=null?n:oe}),g(i),b(t,i)}import{VideoQuality as ed}from"@vkontakte/videoplayer-shared/es2015";var Xb=ye('<svg><!><path fill="currentColor" d="M5.517 5c.325 0 .516-.198.516-.536v-.97l.492-.517 1.46 1.74c.16.205.304.283.516.283A.49.49 0 0 0 9 4.501c0-.14-.068-.287-.222-.478l-1.47-1.73L8.818.868C8.949.731 9 .618 9 .475A.474.474 0 0 0 8.515 0c-.171 0-.301.065-.445.222L6.064 2.25h-.03V.54c0-.342-.192-.54-.517-.54s-.516.198-.516.54v3.924c0 .338.191.536.516.536"></path><path fill="currentColor" fill-rule="evenodd" d="m2.551 1.052-1.51 2.052h1.51zM3.5 3.104V.832c0-.81-1.089-1.14-1.556-.48L.139 2.821a.75.75 0 0 0 .612 1.183h1.8v.55c0 .248.25.45.499.45a.45.45 0 0 0 .45-.45v-.55h.052a.45.45 0 0 0 0-.9z" clip-rule="evenodd"></path></svg>');function Yp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Xb();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img"},i))),b(t,o)}var Jb=ye('<svg><!><path fill="currentColor" d="M5.513 5c.323 0 .513-.198.513-.537v-.97l.49-.516L7.99 4.715c.16.205.302.284.513.284A.49.49 0 0 0 9 4.5c0-.14-.068-.287-.22-.478L7.293 2.293 8.82.868C8.949.731 9 .618 9 .475A.473.473 0 0 0 8.517 0c-.17 0-.299.065-.441.222L6.056 2.25h-.03V.54c0-.342-.19-.54-.513-.54S5 .198 5 .54v3.923c0 .339.19.537.513.537"></path><path fill="currentColor" fill-rule="evenodd" d="M2 0q-.53 0-.952.173a1.5 1.5 0 0 0-.654.484q-.23.312-.23.71c0 .423.208.756.613.995a1.46 1.46 0 0 0-.547.44q-.23.305-.23.71 0 .432.252.778l.001.001q.26.336.712.523Q1.418 5.001 2 5q.582 0 1.035-.186.451-.187.705-.524.26-.346.26-.777 0-.406-.23-.711a1.45 1.45 0 0 0-.552-.44c.409-.235.618-.569.618-.994a1.14 1.14 0 0 0-.238-.711 1.44 1.44 0 0 0-.653-.484A2.4 2.4 0 0 0 2 0m-.573.964C1.563.86 1.75.804 2 .804s.434.055.564.16h.001a.51.51 0 0 1 .204.43.52.52 0 0 1-.204.437c-.13.105-.315.161-.565.161s-.437-.056-.573-.161a.52.52 0 0 1-.203-.437q.002-.276.203-.43m-.345 2.522c0-.217.08-.381.233-.503.16-.122.385-.188.685-.188s.522.066.677.188q.24.181.24.503a.63.63 0 0 1-.24.523c-.155.122-.377.188-.677.188s-.524-.065-.684-.187a.64.64 0 0 1-.234-.524" clip-rule="evenodd"></path></svg>');function Zp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Jb();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img"},i))),b(t,o)}var e$=ye('<svg><!><path fill="currentColor" d="M5.516 5h1.107C8.103 5 9 4.065 9 2.5S8.103 0 6.623 0H5.516C5.191 0 5 .2 5 .537V4.46c0 .342.191.54.516.54m.516-.854V.852H6.5C7.41.852 8 1.468 8 2.5c0 1.066-.577 1.646-1.5 1.646zM.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S4 4.802 4 4.464V.54C4 .198 3.809 0 3.484 0s-.516.198-.516.54v1.531H1.032V.54C1.032.198.841 0 .516 0S0 .198 0 .54v3.989C0 4.867.191 5 .516 5"></path></svg>');function Xp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=e$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"9",height:"5",fill:"none",role:"img"},i))),b(t,o)}var t$=ye('<svg><!><path fill="currentColor" d="M9.516 5h1.107C12.103 5 13 4.065 13 2.5S12.103 0 10.623 0H9.516C9.191 0 9 .2 9 .537V4.46c0 .342.191.54.516.54m.516-.854V.852h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zM4.516 5c.325 0 .516-.198.516-.536V2.922h1.936v1.542c0 .338.191.536.516.536S8 4.802 8 4.464V.54C8 .198 7.809 0 7.484 0s-.516.198-.516.54v1.531H5.032V.54c0-.342-.191-.54-.516-.54S4 .198 4 .54v3.989c0 .338.191.471.516.471m-4 0c.325 0 .516-.198.516-.537V3h1.332c.27 0 .441-.154.441-.41 0-.253-.174-.407-.44-.407H1.031V.854h1.5c.28 0 .468-.16.468-.427C3 .161 2.815 0 2.532 0H.516C.191 0 0 .198 0 .537v3.926C0 4.802.191 5 .516 5"></path></svg>');function Xl(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=t$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"13",height:"5",fill:"none",role:"img"},i))),b(t,o)}var i$=ye('<svg><!><path fill="currentColor" d="M11.516 5.75h1.107c1.48 0 2.377-.935 2.377-2.5s-.897-2.5-2.377-2.5h-1.107c-.325 0-.516.199-.516.537V5.21c0 .342.191.54.516.54m.516-.854V1.602h.468c.91 0 1.5.616 1.5 1.648 0 1.066-.577 1.646-1.5 1.646zm-5.516.854c.325 0 .516-.198.516-.536V3.672h1.936v1.542c0 .338.191.536.516.536S10 5.552 10 5.214V1.29c0-.342-.191-.54-.516-.54s-.516.198-.516.54v1.531H7.032V1.29c0-.342-.191-.54-.516-.54S6 .948 6 1.29v3.989c0 .338.191.471.516.471"></path><path fill="currentColor" fill-rule="evenodd" d="M3.338 5.659a4 4 0 0 1-.838.091C1.037 5.75 0 4.885 0 3.303 0 1.733 1.037.75 2.5.75 3.96.75 5 1.734 5 3.303c0 .863-.274 1.46-.778 1.88l.194.29a.5.5 0 0 1-.832.554zm-.52-.78-.234-.352a.5.5 0 1 1 .832-.554l.245.367c.184-.26.286-.615.286-1.037 0-1.036-.64-1.653-1.447-1.653-.81 0-1.447.617-1.447 1.653 0 1.032.637 1.596 1.447 1.596.08 0 .208-.007.318-.02" clip-rule="evenodd"></path></svg>');function Jl(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=i$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"7",fill:"none",role:"img"},i))),b(t,o)}var Fc=t=>{switch(t){case ed.Q_720P:return Xp;case ed.Q_1080P:return Xl;case ed.Q_1440P:return Jl;case ed.Q_2160P:return Yp;case ed.Q_4320P:return Zp}};var o$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12.722 2.213c1.208.037 1.994.702 2.408 1.954l.065.215.051.191q.027.111.068.235l.058.159.034.017.069-.023.133-.051.156-.068c1.414-.658 2.502-.536 3.387.437l.125.145.82 1.017c.732.962.71 1.99-.004 3.1l-.125.187-.117.16a3 3 0 0 0-.142.205l-.07.115-.034.057.004.02.091.06.127.077.153.083c1.39.71 1.963 1.641 1.742 2.936l-.038.188-.244 1.058c-.158.685-.282 1.01-.77 1.454-.475.432-1.016.61-1.732.67l-.22.014-.198.006q-.116.002-.246.015l-.181.021.013.142.013.096.033.179c.323 1.526-.04 2.558-1.188 3.202l-.17.09-1.175.57c-1.102.495-2.099.242-3.02-.702l-.153-.164-.13-.15a3 3 0 0 0-.17-.186l-.097-.096-.05-.046-.09.087-.106.108-.118.133c-.952 1.134-1.957 1.54-3.176 1.067l-.175-.074-1.052-.51-.312-.16c-.476-.26-.743-.51-1.004-1.061-.275-.58-.294-1.15-.16-1.883l.044-.225q.024-.114.041-.242l.019-.172-.004-.004-.104-.014-.146-.013-.174-.008c-1.56-.028-2.484-.614-2.853-1.877l-.049-.185-.292-1.274c-.235-1.185.236-2.1 1.364-2.785l.194-.112.175-.093a3 3 0 0 0 .216-.12l.155-.102.004-.019-.063-.108-.08-.125-.103-.143c-.937-1.246-1.044-2.335-.276-3.404l.115-.153.824-1.013c.79-.915 1.8-1.107 3.034-.64l.208.083.181.081q.103.048.222.093l.136.048.036-.017.033-.089.045-.138.046-.166c.36-1.436 1.085-2.242 2.39-2.35l.19-.011h1.39Zm-.056 1.799h-1.333l-.14.01c-.285.037-.472.191-.652.832l-.041.156-.057.206a6.3 6.3 0 0 1-.468 1.134 6 6 0 0 0-1.147.558 6.5 6.5 0 0 1-1.16-.35l-.35-.154c-.248-.107-.435-.161-.583-.175l-.084-.003a.55.55 0 0 0-.408.193l-.068.074-.789.973-.095.125c-.183.264-.21.5.195 1.075l.228.316c.212.31.425.692.598 1.102q-.195.577-.27 1.201c-.334.29-.69.537-1.013.72l-.343.184c-.617.34-.695.563-.646.881l.013.075.28 1.22.04.152c.096.308.265.475.968.509l.388.014c.37.024.798.09 1.223.204q.337.526.776.968a6.3 6.3 0 0 1-.118 1.445c-.201.95-.014 1.102.383 1.3l1.126.547a.8.8 0 0 0 .337.089l.067-.006c.181-.028.382-.162.67-.485l.258-.295a6.5 6.5 0 0 1 .949-.837l.298.023L12 18l.302-.008.298-.022c.363.263.691.559.948.837l.258.295c.325.364.538.488.737.49l.066-.003a.8.8 0 0 0 .178-.046l.093-.039 1.126-.548.139-.073c.3-.175.42-.395.245-1.226a6.2 6.2 0 0 1-.117-1.445q.436-.442.775-.97a6.5 6.5 0 0 1 1.223-.202l.387-.014c.812-.04.912-.256 1.008-.66l.264-1.142c.09-.406.095-.643-.617-1.035l-.342-.183a6.4 6.4 0 0 1-1.014-.722 6 6 0 0 0-.27-1.201c.174-.41.386-.791.598-1.1l.228-.317c.406-.575.378-.81.195-1.075l-.045-.062-.787-.974c-.14-.171-.259-.294-.452-.322l-.076-.007c-.16-.003-.368.05-.667.178l-.35.155a6.4 6.4 0 0 1-1.158.348 6 6 0 0 0-1.15-.556 6.5 6.5 0 0 1-.454-1.093l-.113-.414c-.192-.678-.393-.805-.714-.828zM12 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></svg>');function Jp(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=o$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"settings-mobile-icon",role:"img"},i))),b(t,o)}var n$=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M13.933 4.875a.6.6 0 0 0-.07-.658c-.327-.413-.45-.833-.574-1.253l-.039-.13C13 2 12.833 2 12.417 2h-.91c-.371.003-.6.052-.757.833-.148.738-.36 1.476-1.566 2.186a.5.5 0 0 1-.12.05c-1.27.324-1.905-.023-2.542-.37l-.12-.065c-.766-.412-.884-.294-1.178 0l-.643.644c-.26.264-.389.461.053 1.124.418.626.789 1.299.438 2.654a.5.5 0 0 1-.05.12c-.668 1.126-1.362 1.33-2.058 1.535l-.13.039C2 11 2 11.167 2 11.583v.91c.003.371.052.6.833.757.738.148 1.476.36 2.186 1.566a.5.5 0 0 1 .05.12c.324 1.27-.023 1.905-.37 2.542l-.065.12c-.412.766-.294.884 0 1.178l.644.643c.264.26.461.389 1.124-.053.626-.418 1.299-.789 2.654-.438q.063.016.12.05c1.126.668 1.33 1.362 1.535 2.058l.039.13c.25.834.417.834.833.834h.91c.371-.003.6-.052.757-.833.148-.738.36-1.476 1.566-2.186a.5.5 0 0 1 .12-.05c1.27-.324 1.905.023 2.542.37l.12.065c.766.412.884.294 1.178 0l.643-.644c.26-.264.389-.461-.053-1.124-.26-.39-.503-.799-.563-1.38a.6.6 0 0 0-.413-.519 7.5 7.5 0 0 1-1.918-.871.58.58 0 0 0-.758.134 4.75 4.75 0 1 1-3.163-7.68.58.58 0 0 0 .633-.44 7.5 7.5 0 0 1 .749-1.967" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M13.25 2.833c.225.751.383 1.502 1.63 2.222 1.399.38 2.082.003 2.718-.42.663-.443.86-.315 1.124-.054l.644.643c.294.294.412.412 0 1.178-.372.69-.792 1.333-.418 2.726.72 1.255 1.47 1.472 2.219 1.622.78.156.83.386.833.757v.91c0 .416 0 .583-.833.833-.751.225-1.502.383-2.222 1.63-.38 1.399-.003 2.082.42 2.718.443.663.315.86.054 1.124l-.643.644c-.294.294-.412.412-1.178 0-.69-.372-1.333-.792-2.726-.418-1.255.72-1.472 1.47-1.622 2.219-.156.78-.386.83-.757.833h-.91c-.416 0-.583 0-.833-.833-.225-.751-.383-1.502-1.63-2.222-1.399-.38-2.082-.003-2.718.42-.663.443-.86.315-1.124.054l-.644-.643c-.294-.294-.412-.412 0-1.178.372-.69.792-1.333.418-2.726-.72-1.255-1.47-1.472-2.219-1.622-.78-.156-.83-.386-.833-.757v-.91c0-.416 0-.583.833-.833.751-.225 1.502-.383 2.222-1.63.38-1.399.003-2.082-.42-2.718-.443-.663-.315-.86-.054-1.124l.643-.644c.294-.294.412-.412 1.178 0 .69.372 1.333.792 2.726.418 1.255-.72 1.472-1.47 1.622-2.219.156-.78.386-.83.757-.833h.91c.416 0 .583 0 .833.833M12 7.25a4.75 4.75 0 1 0 0 9.5 4.75 4.75 0 0 0 0-9.5" class="_full"></path></svg>');function ef(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=n$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"settings-icon",role:"img"},i))),b(t,o)}var r$=L('<div aria-hidden="true"><!> <!></div>'),s$={hash:"svelte-8t5w85",code:'.icon.svelte-8t5w85 {display:flex;position:relative;width:24px;height:24px;}.icon.svelte-8t5w85 .pillow {position:absolute;top:1px;right:-9px;}.icon.triple.svelte-8t5w85 .pillow {right:-13px;}.icon.svelte-8t5w85 svg[data-testid="settings-icon--labeled"] ._full {visibility:hidden;opacity:0;}'};function td(t,e){U(e,!0),W(t,s$);let i=f(e,"isMobile",3,!1),o=f(e,"currentQuality",3,void 0),n=m(()=>Fc(o())),a=m(()=>!!r(n)&&[Xl,Jl].includes(r(n)));var s=ze(),d=ue(s);{var l=v=>{Jp(v,{})},u=v=>{var $=r$();let p;var _=h($);{var w=T=>{jp(T,{children:(E,P)=>{var A=ze(),I=ue(A);ki(I,()=>r(n),(V,H)=>{H(V,{})}),b(E,A)},$$slots:{default:!0}})};R(_,T=>{r(n)&&T(w)})}var y=M(_,2);let C=m(()=>r(n)?"settings-icon--labeled":"settings-icon");ef(y,{get"data-testid"(){return r(C)},fill:"var(--btn-color, #fff)"}),g($),k(T=>p=te($,1,"icon svelte-8t5w85",null,p,T),[()=>({triple:r(a)})]),b(v,$)};R(d,v=>{i()?v(l):v(u,!1)})}b(t,s),z()}var a$=L('<span class="settings-icon-wrapper svelte-d9t49t"><!></span>'),l$={hash:"svelte-d9t49t",code:".settings-icon-wrapper.svelte-d9t49t {position:relative;width:24px;}"};function Ja(t,e){U(e,!0),W(t,l$);let[i,o]=Be(),n=()=>S(e.ref$,"$ref$",i),a=()=>S(v,"$settingsMenuVisible",i),s=()=>S(_,"$isMobile",i),d=()=>S(u,"$currentQuality",i),l=Ie(),u=l.state.currentQuality$,v=l.ui.settingsMenu.visible$,$=l.actions.internal.openSettingsMenu,p=l.actions.internal.closeSettingsMenu,_=l.ui.isMobile,w=l.ui.t,y=ee(void 0);We(()=>{n()&&bt(()=>{e.ref$.set(r(y))})});let C=m(()=>a()?w("tooltip_settings_on"):w("tooltip_settings_off"));function T(P){return kt(this,null,function*(){let A=xs(P);a()?p():$(A,$o)})}let E=m(()=>a()?"opened":"");Vt(t,{get className(){return r(E)},testId:"btn-settings",click:T,get ariaLabel(){return r(C)},get ariaExpanded(){return a()},get ref(){return r(y)},set ref(P){B(y,fe(P))},children:(P,A)=>{var I=a$(),V=h(I);td(V,{get isMobile(){return s()},get currentQuality(){return d()}}),g(I),b(P,I)},$$slots:{default:!0}}),z(),o()}var d$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M3 0h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3m1 9h2a1 1 0 0 0 0-2H4a1 1 0 0 0 0 2m5 0h7a1 1 0 1 0 0-2H9a1 1 0 0 0 0 2m-5 4h7a1 1 0 1 0 0-2H4a1 1 0 1 0 0 2m10 0h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2"></path></svg>');function tf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=d$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"22",height:"16",fill:"none","aria-hidden":"true","data-testid":"subtitle-pained-icon",role:"img"},i))),b(t,o)}var c$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M14.692.428c2.293 0 3.124.24 3.962.687a4.67 4.67 0 0 1 1.944 1.944c.449.839.687 1.67.687 3.962v3.958c0 2.292-.238 3.123-.687 3.961a4.67 4.67 0 0 1-1.944 1.944c-.838.449-1.67.687-3.962.687H7.307c-2.293 0-3.124-.238-3.962-.687A4.67 4.67 0 0 1 1.4 14.94c-.448-.838-.687-1.669-.687-3.961V7.02c0-2.292.239-3.123.687-3.962a4.67 4.67 0 0 1 1.944-1.944C4.183.667 5.015.428 7.307.428zm.243 1.716-7.628-.001c-1.832 0-2.484.126-3.154.484a2.96 2.96 0 0 0-1.24 1.24c-.343.64-.473 1.264-.484 2.912v4.2c0 1.83.125 2.483.483 3.153q.433.809 1.241 1.24c.67.36 1.322.485 3.154.485h7.385c1.832 0 2.484-.126 3.154-.484a2.96 2.96 0 0 0 1.24-1.241c.36-.67.485-1.322.485-3.153V7.02c0-1.831-.126-2.483-.484-3.153a2.96 2.96 0 0 0-1.241-1.24c-.64-.343-1.263-.473-2.911-.484ZM11 10.714a.857.857 0 1 1 0 1.714H5.857a.857.857 0 0 1 0-1.714zm5.142 0a.857.857 0 1 1 0 1.714h-1.714a.857.857 0 0 1 0-1.714zm0-3.428a.857.857 0 1 1 0 1.714H11a.857.857 0 1 1 0-1.714zm-8.571 0a.857.857 0 0 1 0 1.714H5.857a.857.857 0 0 1 0-1.714z"></path></svg>');function id(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=c$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"22",height:"18",fill:"none","aria-hidden":"true","data-testid":"subtitle-empty-icon",role:"img"},i))),b(t,o)}function of(t,e){U(e,!0);let i=f(e,"isSubtitlesEnabled",3,!1),n=Ie().ui.t,a=m(()=>i()?n("tooltip_subtitles_on"):n("tooltip_subtitles_off"));Vt(t,{testId:"btn-Subtitles",get ariaLabel(){return r(a)},get click(){return e.click},get ariaKeyShortCut(){return Hr.KeyC},children:(s,d)=>{var l=ze(),u=ue(l);{var v=p=>{tf(p,{})},$=p=>{id(p,{})};R(u,p=>{i()?p(v):p($,!1)})}b(s,l)},$$slots:{default:!0}}),z()}var u$=L('<span class="duration svelte-sz9er7" data-testid="duration"> </span>'),p$=L('<div><span class="current svelte-sz9er7" data-testid="current"> </span> <!></div>'),f$={hash:"svelte-sz9er7",code:".time.svelte-sz9er7 {display:flex;align-items:center;font-weight:500;font-variant-numeric:tabular-nums;padding:12px 6px;color:var(--controls-time);}.time.mobile.svelte-sz9er7 {padding:0 0 0 8px;}.current.svelte-sz9er7 {position:relative;}.duration.svelte-sz9er7 {opacity:0.7;}.duration.svelte-sz9er7:before {content:' / ';white-space:pre;}"};function od(t,e){U(e,!0),W(t,f$);let i=f(e,"isMobile",3,!1),o=f(e,"showDuration",3,!0),n=f(e,"ref",15),a=m(()=>sn(e.duration)),s=m(()=>sn(e.position));var d=p$();let l;var u=h(d),v=h(u,!0);g(u);var $=M(u,2);{var p=_=>{var w=u$(),y=h(w,!0);g(w),k(()=>ge(y,r(a))),b(_,w)};R($,_=>{o()&&_(p)})}g(d),pt(d,_=>n(_),()=>n()),k(_=>{l=te(d,1,"time svelte-sz9er7",null,l,_),ge(v,r(s))},[()=>({mobile:i()})]),b(t,d),z()}import{noop as Uc}from"@vkontakte/videoplayer-shared/es2015";var m$=ye('<svg xmlns="http://www.w3.org/2000/svg" class="icon svelte-1n5yyua" aria-hidden="true"><g fill="var(--btn-color, #fff)" fill-rule="evenodd"><path class="wave2 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503zm3-2A.875.875 0 1 1 20.12 6.88c.263.264.62.74.966 1.432.517 1.033.843 2.255.89 3.716-.047 1.403-.373 2.625-.89 3.658-.346.692-.703 1.168-.966 1.432a.875.875 0 1 1-1.238-1.238c.138-.137.383-.464.639-.976.407-.814.667-1.79.705-2.876-.038-1.144-.298-2.12-.705-2.934-.256-.512-.501-.839-.639-.976z"></path><path class="wave1 svelte-1n5yyua" d="M12.98 18.823c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963zm2.901-8.704A.875.875 0 1 1 17.12 8.88c.176.177.41.47.64.872.384.671.616 1.425.616 2.247s-.232 1.576-.615 2.247a4.23 4.23 0 0 1-.641.872.875.875 0 1 1-1.238-1.238c.074-.073.214-.249.36-.503.241-.423.384-.887.384-1.378s-.143-.955-.385-1.378a2.597 2.597 0 0 0-.359-.503z"></path><path class="cross svelte-1n5yyua" d="m20 10.763 2.381-2.382A.875.875 0 1 1 23.62 9.62L21.237 12l2.382 2.381a.875.875 0 1 1-1.238 1.238L20 13.237l-2.381 2.382a.875.875 0 1 1-1.238-1.238L18.763 12 16.38 9.619A.875.875 0 1 1 17.62 8.38zm-7.02 8.06c-.031 1.207-.67 1.609-1.828.62-1.719-1.469-3.609-3.194-4.242-3.721-.632-.529-1.645-.62-3.073-.62-1.427 0-1.815-.621-1.815-1.241s-.014-1.83-.014-2.001c0-.055.005-.086.014-.13.02-.095-.058-.973 0-1.59.085-.906.388-1.241 1.815-1.241 1.428 0 2.44-.092 3.073-.62.633-.529 2.523-2.253 4.242-3.722 1.158-.989 1.797-.587 1.829.62.043 1.607 0 3.85 0 6.683 0 2.83.043 5.356 0 6.963z"></path></g></svg>'),v$={hash:"svelte-1n5yyua",code:`.icon.svelte-1n5yyua {display:block;width:24px;height:24px;}.icon.svelte-1n5yyua .cross:where(.svelte-1n5yyua) {visibility:hidden;}.icon[data-value='off'].svelte-1n5yyua .wave1:where(.svelte-1n5yyua),
168
168
  .icon[data-value='off'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua) {visibility:hidden;}.icon[data-value='off'].svelte-1n5yyua .cross:where(.svelte-1n5yyua) {visibility:visible;}.icon[data-value='mid'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua),
169
- .icon[data-value='min'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua) {visibility:hidden;}`};function Ss(t,e){W(t,v$);let i=f(e,"volume",3,1),o=f(e,"muted",3,!1),n=(d,l)=>l?"off":d>.5?"max":d>.2?"mid":d>0?"min":"off",a=m(()=>n(i(),o()));var s=m$();k(()=>{var d;Fe(s,"data-value",r(a)),Fe(s,"data-testid",`volume-${(d=r(a))!=null?d:""}-icon`)}),b(t,s)}import{isNonNullable as Oh,noop as zn}from"@vkontakte/videoplayer-shared/es2015";import{noop as rf}from"@vkontakte/videoplayer-shared/es2015";import{noop as h$}from"@vkontakte/videoplayer-shared/es2015";var g$=L('<div class="overlay"><!></div>');function nf(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(s,"$overlayContainer$",i),s=Ie().ui.overlayContainer$,d=ee(void 0),l=p=>{!p||!r(d)||!p.contains(r(d))||p.removeChild(r(d))},u=p=>{!p||!r(d)||p.contains(r(d))||p.appendChild(r(d))};We(()=>{u(n())}),Ut(()=>(u(n()),()=>l(n())));var v=g$(),$=h(v);he($,()=>{var p;return(p=e.children)!=null?p:oe}),g(v),pt(v,p=>B(d,p),()=>r(d)),b(t,v),z(),o()}var _$=L('<div class="tooltip svelte-hxlyne"><div class="content svelte-hxlyne"> </div> <div class="tooltip-pointer svelte-hxlyne"></div></div>'),b$=L("<div><!></div> <!>",1),$$={hash:"svelte-hxlyne",code:'.tooltip-wrapper.svelte-hxlyne {display:flex;flex-direction:column;min-width:0;}.full-width.svelte-hxlyne {width:100%;}.tooltip.svelte-hxlyne {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;left:0;}.content.svelte-hxlyne {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.tooltip-pointer.svelte-hxlyne {position:absolute;bottom:0;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;}'};function sa(t,e){U(e,!0),W(t,$$);let[i,o]=Be(),n=()=>S(J,"$overlayContainer$",i),a=()=>S(O,"$containerSize",i),s=f(e,"isMobile",3,!1),d=f(e,"content",3,""),l=f(e,"active",15,!1),u=f(e,"translateX",3,0),v=f(e,"translateY",3,0),$=f(e,"isFullWidthWrapper",3,!1),p=f(e,"maxTooltipWidth",3,void 0),_=f(e,"placement",3,"top"),w=f(e,"onVisibilityChange",3,h$),y=5,C=ee(void 0),T=ee(void 0),E,P=ee(0),A=ee(0),I=ee(0),V=ee(0),H=zt(),Y=Ie(),O=Y.ui.playerSize,J=Y.ui.overlayContainer$;We(()=>{bt(()=>{w()(l())})});let ne=Y.getLogger().createComponentLog("Tooltip component"),Z=()=>{if(!n()||!r(T)||!r(C))return;B(A,y);let we=n().getBoundingClientRect(),Se=r(C).getBoundingClientRect(),De=Se.width,Xe=r(T).clientWidth,ot=a().width,ft=(De-Xe)/2,Je=Se.left+u()-we.left,gt=Je+ft,Et=Se.top+v()-we.top,jt=Xe/2-y,qt=gt<8,Wt=gt+Xe>ot-8;qt&&(gt=8,jt=Je+Se.width/2-2.5*y),Wt&&(gt=ot-8-Xe,jt=Se.left-we.left+Se.width/2-gt-y),B(I,fe(gt)),B(V,Et),B(P,fe(jt))},me=()=>{!n()||!r(T)||!r(C)||B(A,-y)},le=()=>{if(!n()||!r(T)||!r(C))return;B(P,y);let we=n().getBoundingClientRect(),Se=r(C).getBoundingClientRect(),De=Se.height,Xe=r(T).clientHeight,ot=(De-Xe)/2+Xe,ft=Se.left+u()-we.left-r(T).clientWidth,Je=2,gt=ft-y;gt<8&&(gt=8);let jt=Se.top+v()-we.top+ot,qt=Je-ot/2,Wt=Je-y;B(I,fe(gt)),B(V,jt),B(A,qt),B(P,Wt)},Ve=()=>{!n()||!r(T)||!r(C)||B(P,-y)},Me=()=>{switch(_()){case"top":Z();break;case"bottom":me();break;case"left":le();break;default:Ve()}},be=()=>{try{if(!n()||!r(C))return;Me(),l(!0)}catch(we){ne({message:String(we)})}},ae=()=>{l(!1)},Le=()=>{r(T)&&(E||(E=window.setTimeout(be,H.controls.hideTimeoutTooltips)),l()&&be())},re=()=>{ae(),window.clearTimeout(E),E=void 0},N=(we,Se,De)=>{let Xe="";switch(_()){case"top":Xe=`transform: translate(${we}px, ${Se}px);`;break;case"bottom":Xe=`transform: translate(${we}px, ${Se}px); top: auto; bottom: 100%;`;break;case"left":Xe=`transform: translate(${we}px, ${Se}px); left: 0; right: auto;`;break;default:Xe=`transform: translate(${we}px, ${Se}px);`}return Xe+=` max-width: ${p()===void 0?"auto":`${p()}px`};`,Xe+=` opacity: ${De?1:0}; visibility: ${De?"visible":"hidden"}`,Xe},pe=(we,Se)=>{let De="";switch(_()){case"top":De=`transform: translate(${we}px, ${Se}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":De=`transform: translate(${we}px, ${Se}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":De=`transform: translate(${we}px, ${Se}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:De=`transform: translate(${we}px, ${Se}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return De},_e=m(()=>N(r(I),r(V),l())),Ge=m(()=>pe(r(P),r(A)));Ut(Me),yn(()=>window.clearTimeout(E));var ie=b$(),G=ue(ie);let K;G.__mousemove=Le,G.__mousedown=re,G.__mouseup=Le;var Re=h(G);he(Re,()=>{var we;return(we=e.children)!=null?we:oe}),g(G),pt(G,we=>B(C,we),()=>r(C));var Ne=M(G,2);{var et=we=>{nf(we,{children:(Se,De)=>{var Xe=_$(),ot=h(Xe),ft=h(ot,!0);g(ot);var Je=M(ot,2);g(Xe),pt(Xe,gt=>B(T,gt),()=>r(T)),k(()=>{it(Xe,r(_e)),ge(ft,d()),it(Je,r(Ge))}),b(Se,Xe)},$$slots:{default:!0}})};R(Ne,we=>{d()&&!s()&&we(et)})}k(we=>K=te(G,1,"tooltip-wrapper svelte-hxlyne",null,K,we),[()=>({"full-width":$()})]),St("mouseenter",G,Le),St("mouseleave",G,re),b(t,ie),z(),o()}lt(["mousemove","mousedown","mouseup"]);var Bh=t=>{t.stopPropagation()},y$=L("<div><!></div>"),x$={hash:"svelte-p9r045",code:".btn-container.svelte-p9r045 {position:relative;display:flex;align-items:center;height:100%;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent;}.w-max.svelte-p9r045 {width:100%;min-width:0;}"};function Vo(t,e){U(e,!0),W(t,x$);let[i,o]=Be(),n=()=>S(u,"$isGraphOpened$",i),a=()=>S(l,"$isMobile",i),s=Ie(),d=fo(),l=s.ui.isMobile,u=d.graphIsOpened$,v=s.ui.t,$=f(e,"className",3,""),p=f(e,"disabled",3,!1),_=f(e,"hasTooltip",3,!0),w=f(e,"ref",15,void 0),y=f(e,"width",15,void 0),C=f(e,"isFullWidthTooltip",3,!0),T=f(e,"tooltipContent",3,""),E=f(e,"tooltipActive",3,!1),P=f(e,"tooltipPlacement",3,"top"),A=f(e,"disabledTooltipContent",19,()=>v("tooltip_button_disabled")),I=f(e,"isAriaHidden",3,!1),V=f(e,"onTooltipVisibilityChange",3,rf),H=f(e,"initialTranslateXPx",3,0),Y=f(e,"initialTranslateYPx",19,()=>-18),O=f(e,"mouseEnter",3,rf),J=f(e,"mouseLeave",3,rf),ne=m(()=>p()?n()?v("tooltip_disabled_when_graph_on"):A():T());var Z=y$();Z.__pointerdown=[Bh],Z.__click=[Bh];var me=h(Z);{var le=Me=>{sa(Me,{get content(){return r(ne)},get translateX(){return H()},get translateY(){return Y()},get isFullWidthWrapper(){return C()},get active(){return E()},get placement(){return P()},get onVisibilityChange(){return V()},children:(be,ae)=>{var Le=ze(),re=ue(Le);he(re,()=>{var N;return(N=e.children)!=null?N:oe}),b(be,Le)},$$slots:{default:!0}})},Ve=Me=>{var be=ze(),ae=ue(be);he(ae,()=>{var Le;return(Le=e.children)!=null?Le:oe}),b(Me,be)};R(me,Me=>{_()&&r(ne)&&!a()?Me(le):Me(Ve,!1)})}g(Z),pt(Z,Me=>w(Me),()=>w()),k(()=>{var Me;te(Z,1,`btn-container ${(Me=$())!=null?Me:""}`,"svelte-p9r045"),Fe(Z,"aria-hidden",I()||null)}),St("mouseenter",Z,function(...Me){var be;(be=O())==null||be.apply(this,Me)}),St("mouseleave",Z,function(...Me){var be;(be=J())==null||be.apply(this,Me)}),Or(Z,"clientWidth",y),b(t,Z),z(),o()}lt(["pointerdown","click"]);var w$=ye('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="20" height="20" rx="10" fill="var(--btn-color, #fff)"></rect><path d="M12.5259 8.68864L12.587 8.87536L12.3702 8.23648C12.236 7.84095 11.8295 7.60563 11.4192 7.68593C10.9471 7.77831 10.6508 8.24892 10.7718 8.71381L10.8968 9.19361L10.6671 8.33855C10.5566 7.92714 10.1475 7.67011 9.72832 7.74872C9.32282 7.82476 9.04808 8.18606 9.06319 8.57993L8.34064 5.64592C8.21338 5.12912 7.64646 4.85578 7.1621 5.07767C6.79216 5.24715 6.59467 5.65495 6.69131 6.0498L7.98547 11.3373L6.87 10.178C6.52545 9.81987 5.94024 9.86103 5.64933 10.2638C5.44455 10.5474 5.44907 10.9312 5.66048 11.2098L7.89246 14.1518C7.89246 14.1518 9.12075 15.9833 12.1932 15.3769C14.6243 14.8972 15.4434 12.7097 14.7748 10.4997L14.2213 8.20869C14.0975 7.69621 13.5537 7.40646 13.0585 7.58916C12.614 7.75319 12.3788 8.23875 12.5259 8.68864Z"></path></svg>');function nd(t,e){"use strict";var i=w$(),o=h(i),n=M(o);g(i),k(()=>{Fe(i,"data-testid",(e.completed,"interactive-episode-completed-icon")),Fe(o,"fill-opacity",e.completed?1:.24),Fe(n,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(t,i)}var S$=L("<div><!></div>"),C$={hash:"svelte-bklhpe",code:".interactive-episode-icon.svelte-bklhpe {width:20px;height:20px;position:absolute;transform:translateX(-50%);cursor:default;}.interactive-episode-icon.disabled.svelte-bklhpe {pointer-events:none;opacity:0.4;}"};function sf(t,e){U(e,!0),W(t,C$);let o=Ie().ui.t,n=ee(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Vo(t,{get tooltipContent(){return r(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return r(n)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(s,d)=>{var l=S$();let u;var v=h(l);let $=m(()=>!!e.videoEpisode.completed);nd(v,{get completed(){return r($)}}),g(l),k(p=>{u=te(l,1,"interactive-episode-icon svelte-bklhpe",null,u,p),it(l,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Or(l,"clientWidth",p=>B(n,p)),b(s,l)},$$slots:{default:!0}}),z()}var T$=L('<div><div class="video-episode-inner svelte-1u6kv8l"><div class="video-episode-loaded svelte-1u6kv8l"></div> <div></div></div></div>'),I$=L('<div class="video-episodes-wrap svelte-1u6kv8l"></div>'),k$={hash:"svelte-1u6kv8l",code:`.video-episodes-wrap.svelte-1u6kv8l {position:absolute;width:100%;height:100%;}.video-episode.svelte-1u6kv8l {position:absolute;height:calc(3 * var(--slider-height));box-sizing:border-box;margin-top:calc(-1 * var(--slider-height));padding:var(--slider-height) var(--slider-video-episode-gap);transition:transform 0.2s;}.video-episode.svelte-1u6kv8l:not(.disabled):where(:hover, :active) {transform:scaleY(1.5);}.video-episode-inner.svelte-1u6kv8l,
169
+ .icon[data-value='min'].svelte-1n5yyua .wave2:where(.svelte-1n5yyua) {visibility:hidden;}`};function Ss(t,e){W(t,v$);let i=f(e,"volume",3,1),o=f(e,"muted",3,!1),n=(d,l)=>l?"off":d>.5?"max":d>.2?"mid":d>0?"min":"off",a=m(()=>n(i(),o()));var s=m$();k(()=>{var d;Oe(s,"data-value",r(a)),Oe(s,"data-testid",`volume-${(d=r(a))!=null?d:""}-icon`)}),b(t,s)}import{isNonNullable as Oh,noop as zn}from"@vkontakte/videoplayer-shared/es2015";import{noop as rf}from"@vkontakte/videoplayer-shared/es2015";import{noop as h$}from"@vkontakte/videoplayer-shared/es2015";var g$=L('<div class="overlay"><!></div>');function nf(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(s,"$overlayContainer$",i),s=Ie().ui.overlayContainer$,d=ee(void 0),l=p=>{!p||!r(d)||!p.contains(r(d))||p.removeChild(r(d))},u=p=>{!p||!r(d)||p.contains(r(d))||p.appendChild(r(d))};We(()=>{u(n())}),Ut(()=>(u(n()),()=>l(n())));var v=g$(),$=h(v);he($,()=>{var p;return(p=e.children)!=null?p:oe}),g(v),pt(v,p=>B(d,p),()=>r(d)),b(t,v),z(),o()}var _$=L('<div class="tooltip svelte-hxlyne"><div class="content svelte-hxlyne"> </div> <div class="tooltip-pointer svelte-hxlyne"></div></div>'),b$=L("<div><!></div> <!>",1),$$={hash:"svelte-hxlyne",code:'.tooltip-wrapper.svelte-hxlyne {display:flex;flex-direction:column;min-width:0;}.full-width.svelte-hxlyne {width:100%;}.tooltip.svelte-hxlyne {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;left:0;}.content.svelte-hxlyne {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.tooltip-pointer.svelte-hxlyne {position:absolute;bottom:0;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;}'};function sa(t,e){U(e,!0),W(t,$$);let[i,o]=Be(),n=()=>S(J,"$overlayContainer$",i),a=()=>S(O,"$containerSize",i),s=f(e,"isMobile",3,!1),d=f(e,"content",3,""),l=f(e,"active",15,!1),u=f(e,"translateX",3,0),v=f(e,"translateY",3,0),$=f(e,"isFullWidthWrapper",3,!1),p=f(e,"maxTooltipWidth",3,void 0),_=f(e,"placement",3,"top"),w=f(e,"onVisibilityChange",3,h$),y=5,C=ee(void 0),T=ee(void 0),E,P=ee(0),A=ee(0),I=ee(0),V=ee(0),H=zt(),Y=Ie(),O=Y.ui.playerSize,J=Y.ui.overlayContainer$;We(()=>{bt(()=>{w()(l())})});let ne=Y.getLogger().createComponentLog("Tooltip component"),Z=()=>{if(!n()||!r(T)||!r(C))return;B(A,y);let we=n().getBoundingClientRect(),Se=r(C).getBoundingClientRect(),De=Se.width,Xe=r(T).clientWidth,ot=a().width,ft=(De-Xe)/2,Je=Se.left+u()-we.left,gt=Je+ft,Et=Se.top+v()-we.top,jt=Xe/2-y,qt=gt<8,Wt=gt+Xe>ot-8;qt&&(gt=8,jt=Je+Se.width/2-2.5*y),Wt&&(gt=ot-8-Xe,jt=Se.left-we.left+Se.width/2-gt-y),B(I,fe(gt)),B(V,Et),B(P,fe(jt))},me=()=>{!n()||!r(T)||!r(C)||B(A,-y)},le=()=>{if(!n()||!r(T)||!r(C))return;B(P,y);let we=n().getBoundingClientRect(),Se=r(C).getBoundingClientRect(),De=Se.height,Xe=r(T).clientHeight,ot=(De-Xe)/2+Xe,ft=Se.left+u()-we.left-r(T).clientWidth,Je=2,gt=ft-y;gt<8&&(gt=8);let jt=Se.top+v()-we.top+ot,qt=Je-ot/2,Wt=Je-y;B(I,fe(gt)),B(V,jt),B(A,qt),B(P,Wt)},Ve=()=>{!n()||!r(T)||!r(C)||B(P,-y)},Me=()=>{switch(_()){case"top":Z();break;case"bottom":me();break;case"left":le();break;default:Ve()}},be=()=>{try{if(!n()||!r(C))return;Me(),l(!0)}catch(we){ne({message:String(we)})}},ae=()=>{l(!1)},Le=()=>{r(T)&&(E||(E=window.setTimeout(be,H.controls.hideTimeoutTooltips)),l()&&be())},re=()=>{ae(),window.clearTimeout(E),E=void 0},N=(we,Se,De)=>{let Xe="";switch(_()){case"top":Xe=`transform: translate(${we}px, ${Se}px);`;break;case"bottom":Xe=`transform: translate(${we}px, ${Se}px); top: auto; bottom: 100%;`;break;case"left":Xe=`transform: translate(${we}px, ${Se}px); left: 0; right: auto;`;break;default:Xe=`transform: translate(${we}px, ${Se}px);`}return Xe+=` max-width: ${p()===void 0?"auto":`${p()}px`};`,Xe+=` opacity: ${De?1:0}; visibility: ${De?"visible":"hidden"}`,Xe},pe=(we,Se)=>{let De="";switch(_()){case"top":De=`transform: translate(${we}px, ${Se}px) rotate(0); top: auto; bottom: 0;`;break;case"bottom":De=`transform: translate(${we}px, ${Se}px) rotate(180deg); top: 0; bottom: auto;`;break;case"left":De=`transform: translate(${we}px, ${Se}px) rotate(-90deg); left: 100%; top: auto; bottom: 0;`;break;default:De=`transform: translate(${we}px, ${Se}px) rotate(90deg); right: 100%; top: auto; bottom: 0;`}return De},_e=m(()=>N(r(I),r(V),l())),Ge=m(()=>pe(r(P),r(A)));Ut(Me),yn(()=>window.clearTimeout(E));var ie=b$(),G=ue(ie);let K;G.__mousemove=Le,G.__mousedown=re,G.__mouseup=Le;var Re=h(G);he(Re,()=>{var we;return(we=e.children)!=null?we:oe}),g(G),pt(G,we=>B(C,we),()=>r(C));var Ne=M(G,2);{var et=we=>{nf(we,{children:(Se,De)=>{var Xe=_$(),ot=h(Xe),ft=h(ot,!0);g(ot);var Je=M(ot,2);g(Xe),pt(Xe,gt=>B(T,gt),()=>r(T)),k(()=>{it(Xe,r(_e)),ge(ft,d()),it(Je,r(Ge))}),b(Se,Xe)},$$slots:{default:!0}})};R(Ne,we=>{d()&&!s()&&we(et)})}k(we=>K=te(G,1,"tooltip-wrapper svelte-hxlyne",null,K,we),[()=>({"full-width":$()})]),St("mouseenter",G,Le),St("mouseleave",G,re),b(t,ie),z(),o()}lt(["mousemove","mousedown","mouseup"]);var Bh=t=>{t.stopPropagation()},y$=L("<div><!></div>"),x$={hash:"svelte-p9r045",code:".btn-container.svelte-p9r045 {position:relative;display:flex;align-items:center;height:100%;transition:var(--button-hover-transition);will-change:opacity;-webkit-tap-highlight-color:transparent;}.w-max.svelte-p9r045 {width:100%;min-width:0;}"};function Vo(t,e){U(e,!0),W(t,x$);let[i,o]=Be(),n=()=>S(u,"$isGraphOpened$",i),a=()=>S(l,"$isMobile",i),s=Ie(),d=fo(),l=s.ui.isMobile,u=d.graphIsOpened$,v=s.ui.t,$=f(e,"className",3,""),p=f(e,"disabled",3,!1),_=f(e,"hasTooltip",3,!0),w=f(e,"ref",15,void 0),y=f(e,"width",15,void 0),C=f(e,"isFullWidthTooltip",3,!0),T=f(e,"tooltipContent",3,""),E=f(e,"tooltipActive",3,!1),P=f(e,"tooltipPlacement",3,"top"),A=f(e,"disabledTooltipContent",19,()=>v("tooltip_button_disabled")),I=f(e,"isAriaHidden",3,!1),V=f(e,"onTooltipVisibilityChange",3,rf),H=f(e,"initialTranslateXPx",3,0),Y=f(e,"initialTranslateYPx",19,()=>-18),O=f(e,"mouseEnter",3,rf),J=f(e,"mouseLeave",3,rf),ne=m(()=>p()?n()?v("tooltip_disabled_when_graph_on"):A():T());var Z=y$();Z.__pointerdown=[Bh],Z.__click=[Bh];var me=h(Z);{var le=Me=>{sa(Me,{get content(){return r(ne)},get translateX(){return H()},get translateY(){return Y()},get isFullWidthWrapper(){return C()},get active(){return E()},get placement(){return P()},get onVisibilityChange(){return V()},children:(be,ae)=>{var Le=ze(),re=ue(Le);he(re,()=>{var N;return(N=e.children)!=null?N:oe}),b(be,Le)},$$slots:{default:!0}})},Ve=Me=>{var be=ze(),ae=ue(be);he(ae,()=>{var Le;return(Le=e.children)!=null?Le:oe}),b(Me,be)};R(me,Me=>{_()&&r(ne)&&!a()?Me(le):Me(Ve,!1)})}g(Z),pt(Z,Me=>w(Me),()=>w()),k(()=>{var Me;te(Z,1,`btn-container ${(Me=$())!=null?Me:""}`,"svelte-p9r045"),Oe(Z,"aria-hidden",I()||null)}),St("mouseenter",Z,function(...Me){var be;(be=O())==null||be.apply(this,Me)}),St("mouseleave",Z,function(...Me){var be;(be=J())==null||be.apply(this,Me)}),Or(Z,"clientWidth",y),b(t,Z),z(),o()}lt(["pointerdown","click"]);var w$=ye('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><rect width="20" height="20" rx="10" fill="var(--btn-color, #fff)"></rect><path d="M12.5259 8.68864L12.587 8.87536L12.3702 8.23648C12.236 7.84095 11.8295 7.60563 11.4192 7.68593C10.9471 7.77831 10.6508 8.24892 10.7718 8.71381L10.8968 9.19361L10.6671 8.33855C10.5566 7.92714 10.1475 7.67011 9.72832 7.74872C9.32282 7.82476 9.04808 8.18606 9.06319 8.57993L8.34064 5.64592C8.21338 5.12912 7.64646 4.85578 7.1621 5.07767C6.79216 5.24715 6.59467 5.65495 6.69131 6.0498L7.98547 11.3373L6.87 10.178C6.52545 9.81987 5.94024 9.86103 5.64933 10.2638C5.44455 10.5474 5.44907 10.9312 5.66048 11.2098L7.89246 14.1518C7.89246 14.1518 9.12075 15.9833 12.1932 15.3769C14.6243 14.8972 15.4434 12.7097 14.7748 10.4997L14.2213 8.20869C14.0975 7.69621 13.5537 7.40646 13.0585 7.58916C12.614 7.75319 12.3788 8.23875 12.5259 8.68864Z"></path></svg>');function nd(t,e){"use strict";var i=w$(),o=h(i),n=M(o);g(i),k(()=>{Oe(i,"data-testid",(e.completed,"interactive-episode-completed-icon")),Oe(o,"fill-opacity",e.completed?1:.24),Oe(n,"fill",e.completed?"var(--interactive-episode-complete)":"white")}),b(t,i)}var S$=L("<div><!></div>"),C$={hash:"svelte-bklhpe",code:".interactive-episode-icon.svelte-bklhpe {width:20px;height:20px;position:absolute;transform:translateX(-50%);cursor:default;}.interactive-episode-icon.disabled.svelte-bklhpe {pointer-events:none;opacity:0.4;}"};function sf(t,e){U(e,!0),W(t,C$);let o=Ie().ui.t,n=ee(0),a=m(()=>o(e.videoEpisode.completed?"tooltip_episode_finished":"tooltip_episode_unfinished"));Vo(t,{get tooltipContent(){return r(a)},initialTranslateXPx:-10,initialTranslateYPx:-10,get disabled(){return e.disabled},get width(){return r(n)},isAriaHidden:!0,isFullWidthTooltip:!1,children:(s,d)=>{var l=S$();let u;var v=h(l);let $=m(()=>!!e.videoEpisode.completed);nd(v,{get completed(){return r($)}}),g(l),k(p=>{u=te(l,1,"interactive-episode-icon svelte-bklhpe",null,u,p),it(l,`left: ${e.videoEpisode.from+e.videoEpisode.width/2}%`)},[()=>({disabled:e.disabled})]),Or(l,"clientWidth",p=>B(n,p)),b(s,l)},$$slots:{default:!0}}),z()}var T$=L('<div><div class="video-episode-inner svelte-1u6kv8l"><div class="video-episode-loaded svelte-1u6kv8l"></div> <div></div></div></div>'),I$=L('<div class="video-episodes-wrap svelte-1u6kv8l"></div>'),k$={hash:"svelte-1u6kv8l",code:`.video-episodes-wrap.svelte-1u6kv8l {position:absolute;width:100%;height:100%;}.video-episode.svelte-1u6kv8l {position:absolute;height:calc(3 * var(--slider-height));box-sizing:border-box;margin-top:calc(-1 * var(--slider-height));padding:var(--slider-height) var(--slider-video-episode-gap);transition:transform 0.2s;}.video-episode.svelte-1u6kv8l:not(.disabled):where(:hover, :active) {transform:scaleY(1.5);}.video-episode-inner.svelte-1u6kv8l,
170
170
  .video-episode-loaded.svelte-1u6kv8l,
171
171
  .video-episode-filled.svelte-1u6kv8l {position:absolute;height:var(--slider-height);border-radius:var(--slider-radius);}.video-episode-inner.svelte-1u6kv8l {position:absolute;overflow:hidden;width:calc(100% - 2 * var(--slider-video-episode-gap));background:var(--slider-bg);}.video-episode-loaded.svelte-1u6kv8l {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background:var(--slider-loaded-bg);transition:transform 0.2s;}.video-episode-filled.svelte-1u6kv8l {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background-color:var(--slider-filled-bg);}`};function af(t,e){W(t,k$);let i=f(e,"videoEpisodes",19,()=>[]);var o=I$();Ii(o,21,i,n=>n.from,(n,a)=>{var s=T$();let d;var l=h(s),u=h(l),v=M(u,2);let $;g(l),g(s),k((p,_)=>{d=te(s,1,"video-episode svelte-1u6kv8l",null,d,p),it(s,`left: ${r(a).from}%; width: ${r(a).width}%`),it(u,`transform: translateX(${r(a).loadedWidth/r(a).width*100}%)`),$=te(v,1,"video-episode-filled svelte-1u6kv8l",null,$,_),it(v,`transform: translateX(${r(a).filledWidth/r(a).width*100}%)`)},[()=>({disabled:e.disabled,mobile:e.isMobile}),()=>({mobile:e.isMobile})]),b(n,s)}),g(o),b(t,o)}function E$(t,e,i,o,n,a,s){if(t.preventDefault(),e()&&B(i,fe(e().getBoundingClientRect())),o()||r(n)||!e())return;B(n,!0);let d=a(t.clientX,t.clientY);s()(d),e().setPointerCapture(t.pointerId)}function P$(t,e,i,o,n,a,s,d){if(t.preventDefault(),e())return;let l=i(t.clientX,t.clientY),u=o(t.clientX);n()(l,u,r(a).width),r(s)&&d()(l)}function A$(t,e,i,o,n){if(t.preventDefault(),e()||!r(i))return;B(i,!1);let a=o(t.clientX,t.clientY);n()(a)}function M$(t,e,i,o){t.stopPropagation(),t.preventDefault(),e()&&i()(o(t.clientX,t.clientY))}var L$=L("<div></div>"),V$=L('<div class="bars svelte-1tpemng"><div class="loaded svelte-1tpemng"></div> <div></div></div>'),R$=L('<!> <div role="slider" tabindex="0"><!> <div><div></div></div></div>',1),D$={hash:"svelte-1tpemng",code:`.interactive-icons.svelte-1tpemng {position:absolute;width:calc(100% - 20px);top:-28px;}.interactive-icons.mobile.svelte-1tpemng {top:-10px;}.slider.svelte-1tpemng {position:relative;height:var(--slider-height);border-radius:var(--slider-radius);cursor:pointer;transition:visibility 0.2s, opacity 0.2s;will-change:opacity, transform;width:100%;touch-action:none;-webkit-tap-highlight-color:transparent;}.no-handle.svelte-1tpemng {cursor:default;}.slider.svelte-1tpemng:before {
172
172
  /* hit area */content:'';position:absolute;left:0;right:0;top:calc(-1 * (var(--controls-height) / 2 - var(--slider-height)) / 2);height:calc(var(--controls-height) / 2);}.bars.svelte-1tpemng {position:absolute;width:100%;height:100%;border-radius:var(--slider-radius);overflow:hidden;background:var(--slider-bg);}.loaded.svelte-1tpemng {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background:var(--slider-loaded-bg);transition:transform 0.2s;will-change:transform;}.filled.svelte-1tpemng {position:absolute;left:-100%;width:100%;height:100%;border-radius:var(--slider-radius);background-color:var(--slider-filled-bg);}.slider.square.svelte-1tpemng,
173
173
  .slider.square.svelte-1tpemng > .bars:where(.svelte-1tpemng),
174
174
  .slider.square.svelte-1tpemng .loaded:where(.svelte-1tpemng),
175
175
  .slider.square.svelte-1tpemng .filled:where(.svelte-1tpemng) {border-radius:unset;}.filled.active-live.svelte-1tpemng {background-color:var(--timeline-slider-filled-active-live-bg);}.filled.ads.svelte-1tpemng {background-color:var(--slider-filled-ads);}.handleWrap.svelte-1tpemng {position:absolute;left:-100%;width:100%;}.handle.svelte-1tpemng {position:absolute;width:var(--slider-handle-size);height:var(--slider-handle-size);right:calc(-1 * var(--slider-handle-size) / 2);top:calc((var(--slider-height) - var(--slider-handle-size)) / 2);border-radius:50%;background-color:var(--slider-handle-bg);visibility:hidden;opacity:0;transform:scale(0);transition:opacity 0.2s, transform 0.2s, visibility 0.2s;will-change:opacity, transform;}.handle.active-live.svelte-1tpemng {background-color:var(--timeline-slider-handle-active-live-bg);}.slider.svelte-1tpemng:hover .handle:where(.svelte-1tpemng),
176
- .slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {visibility:visible;opacity:1;transform:scale(1);}.slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {transform:scale(1.3);}.slider-vertical.svelte-1tpemng {position:absolute;left:-8px;top:-18px;transform-origin:0 0;transform:rotate(-90deg);}.slider.disabled.svelte-1tpemng {cursor:default;opacity:0.4;}`};function aa(t,e){U(e,!0),W(t,D$);let i=f(e,"ref",15,void 0),o=f(e,"className",3,""),n=f(e,"testId",3,void 0),a=f(e,"isHidden",3,!1),s=f(e,"isVertical",3,!1),d=f(e,"isActiveLive",3,!1),l=f(e,"isMobile",3,!1),u=f(e,"squareBorders",3,!1),v=f(e,"videoEpisodes",19,()=>[]),$=f(e,"withWheelHandler",3,!1),p=f(e,"isInteractive",3,!1),_=f(e,"disabled",3,!1),w=f(e,"hideHandel",3,!1),y=f(e,"onPointerDown",3,zn),C=f(e,"onHandleMove",3,zn),T=f(e,"onPointerUp",3,zn),E=f(e,"onPointerEnter",3,zn),P=f(e,"onPointerMove",3,zn),A=f(e,"onPointerLeave",3,zn),I=f(e,"onMouseEnter",3,zn),V=f(e,"onMouseLeave",3,zn),H=f(e,"onWheelUp",3,zn),Y=f(e,"onWheelDown",3,zn),O=f(e,"onWheelLeft",3,zn),J=f(e,"onWheelRight",3,zn),ne=f(e,"onDisabledClick",3,zn),Z=f(e,"loadedProgress",3,0),me=f(e,"filledProgress",3,0),le=f(e,"handleProgress",3,0),Ve=f(e,"ariaLabel",3,""),Me=f(e,"ariaValueMin",3,void 0),be=f(e,"ariaValueMax",3,void 0),ae=f(e,"ariaValueNow",3,void 0),Le=f(e,"ariaValueText",3,""),re=zt(),N=ee(void 0),pe=ee(!1),_e=m(()=>{var se;return(se=be())!=null?se:0}),Ge=m(()=>{var se;return Oh(v())&&((se=v()[v().length-1])==null?void 0:se.time)<r(_e)}),ie=m(()=>Oh(v())&&v().length&&r(Ge)&&r(_e)?De(Z()*100,me()*100):[]);function G(se){if(se.preventDefault(),i()&&B(N,fe(i().getBoundingClientRect())),_())return;let Oe=we(se.clientX,se.clientY),Ue=Se(se.clientX);E()(Oe,Ue,r(N).width)}function K(se){se.preventDefault(),!_()&&A()()}function Re(){I()()}function Ne(){V()()}function et(se){_()||$()&&(se.preventDefault(),se.deltaY<0?H()():se.deltaY>0?Y()():se.deltaX>0?J()():O()())}function we(se,Oe){return s()?Math.max(0,Math.min(1,(r(N).height-(Oe-r(N).top))/r(N).height)):Math.min(Math.max(se-r(N).x,0),r(N).width)/r(N).width}function Se(se){return Math.min(Math.max(se-r(N).x,0),r(N).width)}function De(se,Oe){let Ue=re.features.episodesClustering&&!p()?re.episodeMinWidthPc:0,tt=[],ct=v()[0].time/r(_e)*100,Ye=0,Ze=0;for(let $t=1;$t<v().length;$t++)Ye=v()[$t].time/r(_e)*100,Ye-ct>Ue&&(tt.push({from:ct,width:Math.max(0,Ye-ct),loadedWidth:Math.max(0,Math.min(Ye,se)-ct),filledWidth:Math.max(0,Math.min(Ye,Oe)-ct),interactive:v()[$t-1].interactive,completed:v()[$t-1].completed}),ct=v()[$t].time/r(_e)*100,Ze++);let nt={from:ct,width:Math.max(0,100-ct),loadedWidth:Math.max(0,Math.min(se,100)-ct),filledWidth:Math.max(0,Math.min(Oe,100)-ct),interactive:v()[Ze].interactive,completed:v()[Ze].completed};100-ct<Ue?(Ze-=1,tt[Ze].width+=100-ct,tt[Ze].loadedWidth+=Math.max(0,Math.min(se,100)-ct),tt[Ze].filledWidth+=Math.max(0,Math.min(Oe,100)-ct)):tt[Ze]=nt;let He=v()[0].time;if(He!==0){let $t=He/r(_e)*100;tt.unshift({from:0,width:$t,loadedWidth:Math.min($t,se),filledWidth:Math.min($t,Oe)})}return tt}var Xe=R$(),ot=ue(Xe);{var ft=se=>{var Oe=L$();let Ue;Ii(Oe,21,()=>r(ie),tt=>tt.from,(tt,ct)=>{var Ye=ze(),Ze=ue(Ye);{var nt=He=>{sf(He,{get videoEpisode(){return r(ct)},get disabled(){return _()}})};R(Ze,He=>{r(ct).interactive&&He(nt)})}b(tt,Ye)}),g(Oe),k(tt=>Ue=te(Oe,1,"interactive-icons svelte-1tpemng",null,Ue,tt),[()=>({mobile:l(),hidden:l()&&!r(pe)})]),b(se,Oe)};R(ot,se=>{p()&&se(ft)})}var Je=M(ot,2);let gt;Je.__pointerdown=[E$,i,N,_,pe,we,y],Je.__pointermove=[P$,_,we,Se,P,N,pe,C],Je.__pointerup=[A$,_,pe,we,T],Je.__click=[M$,_,ne,we];var Et=h(Je);{var jt=se=>{af(se,{get videoEpisodes(){return r(ie)},get disabled(){return _()},get isMobile(){return l()}})},qt=se=>{var Oe=V$(),Ue=h(Oe),tt=M(Ue,2);let ct;g(Oe),k(Ye=>{it(Ue,`transform: translateX(${Z()*100}%);`),ct=te(tt,1,"filled svelte-1tpemng",null,ct,Ye),it(tt,`transform: translateX(${me()*100}%);`)},[()=>({"active-live":d()})]),b(se,Oe)};R(Et,se=>{r(ie).length?se(jt):se(qt,!1)})}var Wt=M(Et,2);let ve;var j=h(Wt);let Ce;g(Wt),g(Je),pt(Je,se=>i(se),()=>i()),k((se,Oe,Ue)=>{var tt,ct;gt=te(Je,1,`slider ${(tt=o())!=null?tt:""}`,"svelte-1tpemng",gt,se),Fe(Je,"aria-label",Ve()),Fe(Je,"aria-valuemin",Me()),Fe(Je,"aria-valuemax",be()),Fe(Je,"aria-valuenow",ae()),Fe(Je,"aria-valuetext",Le()),Fe(Je,"data-testid",(ct=n())!=null?ct:null),ve=te(Wt,1,"handleWrap svelte-1tpemng",null,ve,Oe),it(Wt,`transform: translateX(${le()*100}%);`),Ce=te(j,1,"handle svelte-1tpemng",null,Ce,Ue)},[()=>({disabled:_(),"slider-dragging":r(pe),hidden:a(),"slider-vertical":s(),"no-handle":w(),square:u()}),()=>({hidden:w()}),()=>({"active-live":d()})]),St("pointerenter",Je,G),St("pointerleave",Je,K),St("mouseenter",Je,Re),St("mouseleave",Je,Ne),St("wheel",Je,et),b(t,Xe),z()}lt(["pointerdown","pointermove","pointerup","click"]);var Gi=(t,e)=>Ys[t]>=Ys[e],Hh=(t,e)=>Ys[t]<Ys[e],Cs=(t,e)=>Ys[t]<=Ys[e],Fh=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var N$=L("<div><!></div>"),B$=L("<div><!> <!></div>"),O$={hash:"svelte-1auih1j",code:".volumeBar-container.svelte-1auih1j {display:flex;align-items:center;}.volumeBar-container.vertical.svelte-1auih1j, .vertical.svelte-1auih1j .tooltip-wrapper, .vertical.svelte-1auih1j .btn {width:40px;}.volumeBar.svelte-1auih1j {display:flex;align-items:center;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.svelte-1auih1j {padding:0 8px 0 0;width:0;}"};function lf(t,e){var et,we;U(e,!0),W(t,O$);let[i,o]=Be(),n=()=>S(E,"$isAudioAvailable$",i),a=()=>S($,"$muted$",i),s=()=>S(v,"$volume$",i),d=()=>S(y,"$currentGridType$",i),l=Ie(),u=zt(),v=l.state.volume$,$=l.state.muted$,{setVolume:p,startVolumeChanging:_,stopVolumeChanging:w}=l.actions.internal,y=l.ui.currentGridType$,C=(et=l.callbacks)==null?void 0:et.onAudioDoesNotExistHint,T=(we=l.callbacks)==null?void 0:we.onAudioDisabledHint,E=l.state.isAudioAvailable$,P=l.state.isAudioDisabled,A=l.ui.t,I=ee(!1),V,H=m(()=>!n()||a()||s()===0),Y=m(()=>Cs(d(),"s")),O=m(()=>r(Y)?"":r(H)?!n()||P?A("tooltip_sound_unavailable"):A("tooltip_volume"):A("tooltip_volume_muted")),J=m(()=>r(H)?A("tooltip_volume"):A("tooltip_volume_muted")),ne=m(()=>r(H)?0:s()),Z=!1,me=m(()=>n()?P&&!T:!C);function le(Se){_(),p(Se)}function Ve(){Oc(l,s(),u.controls.volumeStepWheel)}function Me(){Hc(l,s(),u.controls.volumeStepWheel)}function be(Se){p(Se)}function ae(Se){p(Se),w()}function Le(){Z=!0}function re(){Z=!1,_e()}function N(){clearTimeout(V),B(I,!0)}function pe(){_e()}function _e(){V=window.setTimeout(()=>{Z||B(I,!1)},u.controls.volumeBarTimeout)}function Ge(Se){Se.preventDefault(),Se.deltaY<0?Ve():Se.deltaY>0&&Me()}var ie=B$();let G;var K=h(ie);sa(K,{get content(){return r(O)},translateY:-18,children:(Se,De)=>{let Xe=m(()=>r(Y)?"btn-volume-vertical":"btn-volume-horizontal");Vt(Se,{className:"btn-full-opacity",get disabled(){return r(me)},get testId(){return r(Xe)},get ariaLabel(){return r(J)},get click(){return e.click},get ariaKeyShortCut(){return Hr.KeyM},children:(ot,ft)=>{Ss(ot,{get volume(){return s()},get muted(){return r(H)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Re=M(K,2);{var Ne=Se=>{var De=N$();let Xe;var ot=h(De);let ft=m(()=>r(Y)?"volumeBar-slider-vertical":""),Je=m(()=>r(Y)&&!r(I)),gt=m(()=>r(Y)?Le:Uc),Et=m(()=>r(Y)?re:Uc),jt=m(()=>Math.round(r(ne)*100)),qt=m(()=>`${Math.round(r(ne)*100)}%`),Wt=m(()=>r(Y)?"volume-slider-vertical":"volume-slider");aa(ot,{get className(){return r(ft)},get isHidden(){return r(Je)},get isVertical(){return r(Y)},withWheelHandler:!0,onWheelUp:Ve,onWheelDown:Me,onPointerDown:le,onHandleMove:be,onPointerUp:ae,get onPointerEnter(){return r(gt)},get onPointerLeave(){return r(Et)},ariaLabel:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A \u0433\u0440\u043E\u043C\u043A\u043E\u0441\u0442\u0438",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return r(jt)},get ariaValueText(){return r(qt)},get filledProgress(){return r(ne)},get handleProgress(){return r(ne)},get testId(){return r(Wt)}}),g(De),k(ve=>Xe=te(De,1,"volumeBar svelte-1auih1j",null,Xe,ve),[()=>({"volumeBar-vertical":r(Y)})]),b(Se,De)};R(Re,Se=>{n()&&Se(Ne)})}g(ie),k(Se=>G=te(ie,1,"volumeBar-container svelte-1auih1j",null,G,Se),[()=>({vertical:r(Y)})]),St("mouseenter",ie,function(...Se){var De;(De=r(Y)?N:Uc)==null||De.apply(this,Se)}),St("mouseleave",ie,function(...Se){var De;(De=r(Y)?pe:Uc)==null||De.apply(this,Se)}),St("wheel",ie,Ge),b(t,ie),z(),o()}import{noop as U$}from"@vkontakte/videoplayer-shared/es2015";var H$=ye('<svg><!><g fill-rule="evenodd"><path d="M4.58 13.979a.99.99 0 0 1 .99-.99h4.451a.99.99 0 0 1 .99.99v4.452a.99.99 0 0 1-1.98 0v-2.05l-3.319 3.322a1 1 0 0 1-1.414 0v-.001a1 1 0 0 1 0-1.414l3.32-3.32H5.57a.99.99 0 0 1-.99-.99m10.388-6.36 3.32-3.322a1 1 0 0 1 1.414 0v.001a1 1 0 0 1 0 1.414l-3.32 3.32h2.049a.99.99 0 0 1 0 1.979h-4.442a1 1 0 0 1-1-1V5.569a.99.99 0 1 1 1.98 0z" class="_exit"></path><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.072l3.363-3.365a1 1 0 0 1 1.414 0l.016.016a1 1 0 0 1 0 1.414L7.429 18H9.5a1 1 0 0 1 1 1M18 7.429l-3.363 3.364a1 1 0 0 1-1.414 0l-.016-.016a1 1 0 0 1 0-1.414L16.571 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z" class="_enter"></path></g></svg>');function df(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=H$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"var(--btn-color, #fff)","aria-hidden":"true",role:"img"},i))),b(t,o)}var F$={hash:"svelte-17t966y",code:`svg[data-testid="close-fullscreen-icon"] ._enter,
176
+ .slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {visibility:visible;opacity:1;transform:scale(1);}.slider-dragging.svelte-1tpemng .handle:where(.svelte-1tpemng) {transform:scale(1.3);}.slider-vertical.svelte-1tpemng {position:absolute;left:-8px;top:-18px;transform-origin:0 0;transform:rotate(-90deg);}.slider.disabled.svelte-1tpemng {cursor:default;opacity:0.4;}`};function aa(t,e){U(e,!0),W(t,D$);let i=f(e,"ref",15,void 0),o=f(e,"className",3,""),n=f(e,"testId",3,void 0),a=f(e,"isHidden",3,!1),s=f(e,"isVertical",3,!1),d=f(e,"isActiveLive",3,!1),l=f(e,"isMobile",3,!1),u=f(e,"squareBorders",3,!1),v=f(e,"videoEpisodes",19,()=>[]),$=f(e,"withWheelHandler",3,!1),p=f(e,"isInteractive",3,!1),_=f(e,"disabled",3,!1),w=f(e,"hideHandel",3,!1),y=f(e,"onPointerDown",3,zn),C=f(e,"onHandleMove",3,zn),T=f(e,"onPointerUp",3,zn),E=f(e,"onPointerEnter",3,zn),P=f(e,"onPointerMove",3,zn),A=f(e,"onPointerLeave",3,zn),I=f(e,"onMouseEnter",3,zn),V=f(e,"onMouseLeave",3,zn),H=f(e,"onWheelUp",3,zn),Y=f(e,"onWheelDown",3,zn),O=f(e,"onWheelLeft",3,zn),J=f(e,"onWheelRight",3,zn),ne=f(e,"onDisabledClick",3,zn),Z=f(e,"loadedProgress",3,0),me=f(e,"filledProgress",3,0),le=f(e,"handleProgress",3,0),Ve=f(e,"ariaLabel",3,""),Me=f(e,"ariaValueMin",3,void 0),be=f(e,"ariaValueMax",3,void 0),ae=f(e,"ariaValueNow",3,void 0),Le=f(e,"ariaValueText",3,""),re=zt(),N=ee(void 0),pe=ee(!1),_e=m(()=>{var se;return(se=be())!=null?se:0}),Ge=m(()=>{var se;return Oh(v())&&((se=v()[v().length-1])==null?void 0:se.time)<r(_e)}),ie=m(()=>Oh(v())&&v().length&&r(Ge)&&r(_e)?De(Z()*100,me()*100):[]);function G(se){if(se.preventDefault(),i()&&B(N,fe(i().getBoundingClientRect())),_())return;let He=we(se.clientX,se.clientY),Ue=Se(se.clientX);E()(He,Ue,r(N).width)}function K(se){se.preventDefault(),!_()&&A()()}function Re(){I()()}function Ne(){V()()}function et(se){_()||$()&&(se.preventDefault(),se.deltaY<0?H()():se.deltaY>0?Y()():se.deltaX>0?J()():O()())}function we(se,He){return s()?Math.max(0,Math.min(1,(r(N).height-(He-r(N).top))/r(N).height)):Math.min(Math.max(se-r(N).x,0),r(N).width)/r(N).width}function Se(se){return Math.min(Math.max(se-r(N).x,0),r(N).width)}function De(se,He){let Ue=re.features.episodesClustering&&!p()?re.episodeMinWidthPc:0,tt=[],ct=v()[0].time/r(_e)*100,Ye=0,Ze=0;for(let $t=1;$t<v().length;$t++)Ye=v()[$t].time/r(_e)*100,Ye-ct>Ue&&(tt.push({from:ct,width:Math.max(0,Ye-ct),loadedWidth:Math.max(0,Math.min(Ye,se)-ct),filledWidth:Math.max(0,Math.min(Ye,He)-ct),interactive:v()[$t-1].interactive,completed:v()[$t-1].completed}),ct=v()[$t].time/r(_e)*100,Ze++);let nt={from:ct,width:Math.max(0,100-ct),loadedWidth:Math.max(0,Math.min(se,100)-ct),filledWidth:Math.max(0,Math.min(He,100)-ct),interactive:v()[Ze].interactive,completed:v()[Ze].completed};100-ct<Ue?(Ze-=1,tt[Ze].width+=100-ct,tt[Ze].loadedWidth+=Math.max(0,Math.min(se,100)-ct),tt[Ze].filledWidth+=Math.max(0,Math.min(He,100)-ct)):tt[Ze]=nt;let Fe=v()[0].time;if(Fe!==0){let $t=Fe/r(_e)*100;tt.unshift({from:0,width:$t,loadedWidth:Math.min($t,se),filledWidth:Math.min($t,He)})}return tt}var Xe=R$(),ot=ue(Xe);{var ft=se=>{var He=L$();let Ue;Ii(He,21,()=>r(ie),tt=>tt.from,(tt,ct)=>{var Ye=ze(),Ze=ue(Ye);{var nt=Fe=>{sf(Fe,{get videoEpisode(){return r(ct)},get disabled(){return _()}})};R(Ze,Fe=>{r(ct).interactive&&Fe(nt)})}b(tt,Ye)}),g(He),k(tt=>Ue=te(He,1,"interactive-icons svelte-1tpemng",null,Ue,tt),[()=>({mobile:l(),hidden:l()&&!r(pe)})]),b(se,He)};R(ot,se=>{p()&&se(ft)})}var Je=M(ot,2);let gt;Je.__pointerdown=[E$,i,N,_,pe,we,y],Je.__pointermove=[P$,_,we,Se,P,N,pe,C],Je.__pointerup=[A$,_,pe,we,T],Je.__click=[M$,_,ne,we];var Et=h(Je);{var jt=se=>{af(se,{get videoEpisodes(){return r(ie)},get disabled(){return _()},get isMobile(){return l()}})},qt=se=>{var He=V$(),Ue=h(He),tt=M(Ue,2);let ct;g(He),k(Ye=>{it(Ue,`transform: translateX(${Z()*100}%);`),ct=te(tt,1,"filled svelte-1tpemng",null,ct,Ye),it(tt,`transform: translateX(${me()*100}%);`)},[()=>({"active-live":d()})]),b(se,He)};R(Et,se=>{r(ie).length?se(jt):se(qt,!1)})}var Wt=M(Et,2);let ve;var j=h(Wt);let Ce;g(Wt),g(Je),pt(Je,se=>i(se),()=>i()),k((se,He,Ue)=>{var tt,ct;gt=te(Je,1,`slider ${(tt=o())!=null?tt:""}`,"svelte-1tpemng",gt,se),Oe(Je,"aria-label",Ve()),Oe(Je,"aria-valuemin",Me()),Oe(Je,"aria-valuemax",be()),Oe(Je,"aria-valuenow",ae()),Oe(Je,"aria-valuetext",Le()),Oe(Je,"data-testid",(ct=n())!=null?ct:null),ve=te(Wt,1,"handleWrap svelte-1tpemng",null,ve,He),it(Wt,`transform: translateX(${le()*100}%);`),Ce=te(j,1,"handle svelte-1tpemng",null,Ce,Ue)},[()=>({disabled:_(),"slider-dragging":r(pe),hidden:a(),"slider-vertical":s(),"no-handle":w(),square:u()}),()=>({hidden:w()}),()=>({"active-live":d()})]),St("pointerenter",Je,G),St("pointerleave",Je,K),St("mouseenter",Je,Re),St("mouseleave",Je,Ne),St("wheel",Je,et),b(t,Xe),z()}lt(["pointerdown","pointermove","pointerup","click"]);var Gi=(t,e)=>Ys[t]>=Ys[e],Hh=(t,e)=>Ys[t]<Ys[e],Cs=(t,e)=>Ys[t]<=Ys[e],Fh=t=>t>699?"xl":t>599?"l":t>509?"m":t>320?"s":"xs";var N$=L("<div><!></div>"),B$=L("<div><!> <!></div>"),O$={hash:"svelte-1auih1j",code:".volumeBar-container.svelte-1auih1j {display:flex;align-items:center;}.volumeBar-container.vertical.svelte-1auih1j, .vertical.svelte-1auih1j .tooltip-wrapper, .vertical.svelte-1auih1j .btn {width:40px;}.volumeBar.svelte-1auih1j {display:flex;align-items:center;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.svelte-1auih1j {padding:0 8px 0 0;width:0;}"};function lf(t,e){var et,we;U(e,!0),W(t,O$);let[i,o]=Be(),n=()=>S(E,"$isAudioAvailable$",i),a=()=>S($,"$muted$",i),s=()=>S(v,"$volume$",i),d=()=>S(y,"$currentGridType$",i),l=Ie(),u=zt(),v=l.state.volume$,$=l.state.muted$,{setVolume:p,startVolumeChanging:_,stopVolumeChanging:w}=l.actions.internal,y=l.ui.currentGridType$,C=(et=l.callbacks)==null?void 0:et.onAudioDoesNotExistHint,T=(we=l.callbacks)==null?void 0:we.onAudioDisabledHint,E=l.state.isAudioAvailable$,P=l.state.isAudioDisabled,A=l.ui.t,I=ee(!1),V,H=m(()=>!n()||a()||s()===0),Y=m(()=>Cs(d(),"s")),O=m(()=>r(Y)?"":r(H)?!n()||P?A("tooltip_sound_unavailable"):A("tooltip_volume"):A("tooltip_volume_muted")),J=m(()=>r(H)?A("tooltip_volume"):A("tooltip_volume_muted")),ne=m(()=>r(H)?0:s()),Z=!1,me=m(()=>n()?P&&!T:!C);function le(Se){_(),p(Se)}function Ve(){Oc(l,s(),u.controls.volumeStepWheel)}function Me(){Hc(l,s(),u.controls.volumeStepWheel)}function be(Se){p(Se)}function ae(Se){p(Se),w()}function Le(){Z=!0}function re(){Z=!1,_e()}function N(){clearTimeout(V),B(I,!0)}function pe(){_e()}function _e(){V=window.setTimeout(()=>{Z||B(I,!1)},u.controls.volumeBarTimeout)}function Ge(Se){Se.preventDefault(),Se.deltaY<0?Ve():Se.deltaY>0&&Me()}var ie=B$();let G;var K=h(ie);sa(K,{get content(){return r(O)},translateY:-18,children:(Se,De)=>{let Xe=m(()=>r(Y)?"btn-volume-vertical":"btn-volume-horizontal");Vt(Se,{className:"btn-full-opacity",get disabled(){return r(me)},get testId(){return r(Xe)},get ariaLabel(){return r(J)},get click(){return e.click},get ariaKeyShortCut(){return Hr.KeyM},children:(ot,ft)=>{Ss(ot,{get volume(){return s()},get muted(){return r(H)}})},$$slots:{default:!0}})},$$slots:{default:!0}});var Re=M(K,2);{var Ne=Se=>{var De=N$();let Xe;var ot=h(De);let ft=m(()=>r(Y)?"volumeBar-slider-vertical":""),Je=m(()=>r(Y)&&!r(I)),gt=m(()=>r(Y)?Le:Uc),Et=m(()=>r(Y)?re:Uc),jt=m(()=>Math.round(r(ne)*100)),qt=m(()=>`${Math.round(r(ne)*100)}%`),Wt=m(()=>r(Y)?"volume-slider-vertical":"volume-slider");aa(ot,{get className(){return r(ft)},get isHidden(){return r(Je)},get isVertical(){return r(Y)},withWheelHandler:!0,onWheelUp:Ve,onWheelDown:Me,onPointerDown:le,onHandleMove:be,onPointerUp:ae,get onPointerEnter(){return r(gt)},get onPointerLeave(){return r(Et)},ariaLabel:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A \u0433\u0440\u043E\u043C\u043A\u043E\u0441\u0442\u0438",ariaValueMin:0,ariaValueMax:100,get ariaValueNow(){return r(jt)},get ariaValueText(){return r(qt)},get filledProgress(){return r(ne)},get handleProgress(){return r(ne)},get testId(){return r(Wt)}}),g(De),k(ve=>Xe=te(De,1,"volumeBar svelte-1auih1j",null,Xe,ve),[()=>({"volumeBar-vertical":r(Y)})]),b(Se,De)};R(Re,Se=>{n()&&Se(Ne)})}g(ie),k(Se=>G=te(ie,1,"volumeBar-container svelte-1auih1j",null,G,Se),[()=>({vertical:r(Y)})]),St("mouseenter",ie,function(...Se){var De;(De=r(Y)?N:Uc)==null||De.apply(this,Se)}),St("mouseleave",ie,function(...Se){var De;(De=r(Y)?pe:Uc)==null||De.apply(this,Se)}),St("wheel",ie,Ge),b(t,ie),z(),o()}import{noop as U$}from"@vkontakte/videoplayer-shared/es2015";var H$=ye('<svg><!><g fill-rule="evenodd"><path d="M4.58 13.979a.99.99 0 0 1 .99-.99h4.451a.99.99 0 0 1 .99.99v4.452a.99.99 0 0 1-1.98 0v-2.05l-3.319 3.322a1 1 0 0 1-1.414 0v-.001a1 1 0 0 1 0-1.414l3.32-3.32H5.57a.99.99 0 0 1-.99-.99m10.388-6.36 3.32-3.322a1 1 0 0 1 1.414 0v.001a1 1 0 0 1 0 1.414l-3.32 3.32h2.049a.99.99 0 0 1 0 1.979h-4.442a1 1 0 0 1-1-1V5.569a.99.99 0 1 1 1.98 0z" class="_exit"></path><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.072l3.363-3.365a1 1 0 0 1 1.414 0l.016.016a1 1 0 0 1 0 1.414L7.429 18H9.5a1 1 0 0 1 1 1M18 7.429l-3.363 3.364a1 1 0 0 1-1.414 0l-.016-.016a1 1 0 0 1 0-1.414L16.571 6H14.5a1 1 0 0 1 0-2H19a1 1 0 0 1 1 1v4.5a1 1 0 0 1-2 0z" class="_enter"></path></g></svg>');function df(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=H$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"var(--btn-color, #fff)","aria-hidden":"true",role:"img"},i))),b(t,o)}var F$={hash:"svelte-17t966y",code:`svg[data-testid="close-fullscreen-icon"] ._enter,
177
177
  svg[data-testid="open-fullscreen-icon"] ._exit {visibility:hidden;opacity:0;}`};function cf(t,e){W(t,F$);let i=f(e,"isFullscreen",8,!1),o=br(()=>i()?"close-fullscreen-icon":"open-fullscreen-icon");df(t,{get"data-testid"(){return r(o)},fill:"var(--btn-color, #fff)"})}function rd(t,e){U(e,!0);let i=f(e,"isFullscreen",3,!1),o=f(e,"click",3,U$),n=Ie(),a=n.ui.isFullscreenOpenedByKeyboard,s=n.ui.t,d=m(()=>i()?s("tooltip_fullscreen_on"):s("tooltip_fullscreen_off"));Vt(t,{testId:"btn-fullscreen",get ariaLabel(){return r(d)},click:u=>{let v=xs(u);a.set(v),o()()},get ariaKeyShortCut(){return Hr.KeyF},children:(u,v)=>{cf(u,{get isFullscreen(){return i()}})},$$slots:{default:!0}}),z()}var z$=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.265 4.265C3 5.531 3 7.567 3 11.64v.72c0 4.073 0 6.11 1.265 7.375C5.531 21 7.567 21 11.64 21h.72c4.073 0 6.11 0 7.375-1.265C21 18.469 21 16.433 21 12.36v-.72c0-4.073 0-6.11-1.265-7.375C18.469 3 16.433 3 12.36 3h-.72C7.567 3 5.53 3 4.265 4.265M6 8.5c.096 4.682 2.556 7.5 6.61 7.5h.235v-2.679c1.476.15 2.577 1.254 3.026 2.679H18c-.578-2.132-2.075-3.31-3.005-3.76.93-.558 2.246-1.908 2.556-3.74h-1.937c-.406 1.49-1.615 2.84-2.77 2.968V8.5h-1.968v5.197c-1.197-.3-2.759-1.757-2.823-5.197z" clip-rule="evenodd"></path></svg>');function uf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=z$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"vk-logo-icon",role:"img"},i))),b(t,o)}var q$=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M32.55 17.042h2.494L38.707 7h-1.81l-2.936 8.276h-.286L30.84 7H29zM48.075 17.042l-4.619-5.199L47.718 7h-2.11l-3.563 4.088h-.413V7h-1.71v10.042h1.71V12.74h.427l3.764 4.302z"></path><path fill="var(--btn-color, #fff)" d="M57.888 11.886c.883-.342 1.44-1.125 1.44-2.151C59.327 8.14 58.001 7 56.062 7h-3.92v10.042h4.205c1.953 0 3.279-1.14 3.279-2.806 0-1.168-.656-2.037-1.74-2.35m-4.034-3.39h2.21c.911 0 1.539.555 1.539 1.381 0 .812-.628 1.368-1.54 1.368h-2.21zm2.494 7.05h-2.494V12.74h2.494c.898 0 1.525.57 1.525 1.396 0 .84-.627 1.41-1.525 1.41M61.188 17.042h2.323l2.766-5.498h.228v5.498h1.568V9.635h-2.324l-2.765 5.498h-.228V9.635h-1.568zM69.146 19.25h1.64v-2.208h5.33v2.208h1.64v-3.703h-1.283V9.635h-5.431l-.37 3.79c-.13 1.338-.528 2.121-1.34 2.121h-.186zm2.494-3.703c.4-.385.57-1.04.685-2.151l.228-2.265h2.28v4.416zM86.025 13.253c0-2.136-1.597-3.76-3.849-3.76s-3.848 1.61-3.848 3.846 1.596 3.846 3.848 3.846c1.54 0 2.994-.727 3.55-2.137l-1.54-.256c-.356.527-1.04.897-1.91.897-1.254 0-2.081-.77-2.238-1.909h5.958c.015-.156.029-.327.029-.527m-3.849-2.336c1.027 0 1.796.655 2.067 1.581h-4.105c.27-.954 1.04-1.58 2.038-1.58M90.837 17.185c2.324 0 3.963-1.596 3.963-3.846s-1.64-3.846-3.963-3.846-3.962 1.595-3.962 3.846c0 2.25 1.639 3.846 3.962 3.846m0-1.496c-1.34 0-2.252-.954-2.252-2.35s.912-2.35 2.252-2.35 2.252.954 2.252 2.35-.912 2.35-2.252 2.35" class="_ru"></path><path fill="var(--btn-color, #fff)" d="M35.02 17.36h-2.484L29 7.422h1.832l2.826 8.188h.284l2.925-8.188h1.803zM43.43 12.215l4.6 5.144h-2.243l-3.749-4.256h-.426v4.256h-1.704V7.423h1.704v4.045h.412l3.55-4.045h2.101zM56.808 17.36h-2.485l-3.536-9.937h1.832l2.826 8.188h.284l2.925-8.188h1.803zM63.257 17.36h-1.633v-7.33h1.633zm-.809-8.373q-.455 0-.738-.268a.97.97 0 0 1-.284-.718.97.97 0 0 1 .284-.72q.297-.28.738-.281.44 0 .724.282a.97.97 0 0 1 .284.719.97.97 0 0 1-.284.718q-.284.268-.724.268M68.382 17.5q-1.037 0-1.86-.48a3.5 3.5 0 0 1-1.293-1.352q-.454-.874-.454-1.973t.454-1.96a3.37 3.37 0 0 1 1.293-1.352 3.55 3.55 0 0 1 1.86-.494q.894 0 1.59.367.696.352 1.136.888V7.423h1.633v9.936h-1.22l-.342-1.184a4 4 0 0 1-1.164.944q-.71.381-1.633.381m.397-1.452q1.038 0 1.676-.648.654-.663.653-1.705 0-1.044-.653-1.692-.639-.662-1.675-.662-1.023 0-1.662.662-.639.649-.639 1.692t.64 1.705q.638.648 1.66.648M81.929 13.61q0 .211-.029.522h-5.935q.113.86.71 1.38.597.508 1.52.508.624 0 1.121-.24.51-.24.781-.648l1.534.254a3 3 0 0 1-1.378 1.564q-.965.55-2.158.55-1.108 0-1.988-.48a3.6 3.6 0 0 1-1.363-1.352q-.483-.874-.483-1.973t.483-1.96a3.5 3.5 0 0 1 1.363-1.352q.88-.495 1.988-.494 1.107 0 1.974.494.88.478 1.363 1.339.497.845.497 1.888M78.095 11.3q-.738 0-1.292.423-.54.422-.739 1.141h4.09a2.17 2.17 0 0 0-.767-1.127q-.54-.437-1.292-.437M86.751 17.5q-1.136 0-2.044-.48a3.66 3.66 0 0 1-1.406-1.352q-.497-.874-.497-1.973t.497-1.96q.511-.873 1.406-1.352.909-.495 2.044-.494 1.137 0 2.031.494a3.4 3.4 0 0 1 1.406 1.353q.51.86.511 1.959 0 1.098-.511 1.973a3.53 3.53 0 0 1-1.406 1.353q-.894.48-2.03.479m0-1.48q.995 0 1.62-.634.624-.648.624-1.691t-.625-1.678q-.624-.648-1.619-.648-.993 0-1.618.648-.625.634-.625 1.678 0 1.043.625 1.69.625.636 1.618.635" class="_en"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M7 8.6c0-1.96 0-2.94.381-3.689a3.5 3.5 0 0 1 1.53-1.53C9.66 3 10.64 3 12.6 3h1.36c2.464 0 3.696 0 4.638.48a4.4 4.4 0 0 1 1.922 1.922c.48.942.48 2.174.48 4.638v3.92c0 2.464 0 3.696-.48 4.638a4.4 4.4 0 0 1-1.922 1.922c-.942.48-2.174.48-4.638.48H12.6c-1.96 0-2.94 0-3.689-.381a3.5 3.5 0 0 1-1.53-1.53C7 18.34 7 17.36 7 15.4zm9.265 1.744c.901.539 1.352.808 1.505 1.157.133.304.133.65 0 .954-.153.349-.604.618-1.505 1.157l-2.386 1.425c-.943.563-1.414.844-1.802.807a1.2 1.2 0 0 1-.847-.48C11 15.05 11 14.5 11 13.403v-2.85c0-1.098 0-1.647.23-1.96.201-.274.51-.45.847-.481.388-.037.86.244 1.802.807zM5 9.04c0-2.464 0-3.696.48-4.638a4.4 4.4 0 0 1 .955-1.253 3.7 3.7 0 0 0-1.033.33A4.4 4.4 0 0 0 3.48 5.403C3 6.344 3 7.576 3 10.04v3.92c0 2.464 0 3.696.48 4.638a4.4 4.4 0 0 0 1.922 1.922c.304.155.637.26 1.033.33a4.4 4.4 0 0 1-.955-1.252C5 18.656 5 17.424 5 14.96z" clip-rule="evenodd"></path></svg>');function pf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=q$();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(4),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"95",height:"24",fill:"none","aria-hidden":"true",role:"img"},i))),b(t,o)}var W$={hash:"svelte-1nhjml",code:`svg[data-testid="vk-video-logo-icon--short"] ._ru,
178
178
  svg[data-testid="vk-video-logo-icon--short"] ._en,
179
179
  svg[data-testid="vk-video-logo-icon"] ._en,
@@ -225,9 +225,9 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
225
225
  100% {
226
226
  opacity: 1;
227
227
  }
228
- }`};function mf(t,e){U(e,!0),W(t,j$);let i=f(e,"isMobile",3,!1),o=m(()=>e.iconState===Uh.CONNECTED),n=m(()=>e.iconState===Uh.CONNECTING);var a=ze(),s=ue(a);{var d=u=>{var v=Q$(),$=h(v),p=h($),_=h(p);$e(),g(p);var w=M(p);$e(),g($);var y=M($),C=h(y),T=h(C);g(C),$e(),g(y),g(v),k(()=>{Fe(_,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Fe(w,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Fe(T,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)")}),b(u,v)},l=u=>{var v=G$();let $;var p=h(v),_=M(h(p),5);let w;g(p),g(v),k((y,C)=>{$=te(v,0,"svelte-8z1bf5",null,$,y),w=te(_,0,"svelte-8z1bf5",null,w,C)},[()=>({connecting:r(n)}),()=>({hidden:!r(o)})]),b(u,v)};R(s,u=>{i()?u(d):u(l,!1)})}b(t,a),z()}import{noop as Z$}from"@vkontakte/videoplayer-shared/es2015";function ad(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"isMobile",3,!1),n=f(e,"click",3,Z$),s=Ie().ui.t,d=m(()=>e.state===Y$.CONNECTED?s("tooltip_chromecast_on"):s("tooltip_chromecast_off"));Vt(t,{get ariaLabel(){return r(d)},get click(){return n()},testId:"btn-chromecast",get ref(){return i()},set ref(l){i(l)},children:(l,u)=>{mf(l,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),z()}var X$=L('<div class="tooltip-wrapper svelte-5ygsa2"><div><!></div></div>'),J$={hash:"svelte-5ygsa2",code:'.tooltip-wrapper.svelte-5ygsa2 {position:relative;display:block;}.tooltip.svelte-5ygsa2 {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;transform:translateX(-50%);}.pointer.svelte-5ygsa2:after {position:absolute;bottom:0;left:50%;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;transform:translate(-50%, 5px);}.tooltip.active.svelte-5ygsa2 {opacity:1;visibility:visible;}'};function vf(t,e){W(t,J$);let i=f(e,"active",3,!1),o=f(e,"pointer",3,!1),n=f(e,"translateXPx",3,0),a=f(e,"translateYPx",3,0),s=f(e,"leftOffset",3,0),d=f(e,"rightOffset",3,0),l=ee(void 0),u=ee(void 0);function v(C){if(!r(u))return 0;let{width:T}=r(u).getBoundingClientRect(),E=T/2;return C<E?E+s():C>e.containerWidth-E?e.containerWidth-E-d():C}let $=m(()=>v(n()));var p=X$(),_=h(p);let w;var y=h(_);he(y,()=>{var C;return(C=e.children)!=null?C:oe}),g(_),pt(_,C=>B(u,C),()=>r(u)),g(p),pt(p,C=>B(l,C),()=>r(l)),k(C=>{it(p,`transform: translate(${r($)}px, ${a()}px);`),w=te(_,1,"tooltip svelte-5ygsa2",null,w,C),it(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,p)}var zc=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var zh=t=>!!(Math.round(Math.abs(t)/90)%2),qh=t=>Math.abs(t)/90%4===1;var e2=L('<div class="preview svelte-1wqg760"></div>'),t2=L('<div class="time svelte-1wqg760"> </div>'),i2=L('<div><!> <div class="episode svelte-1wqg760"><!></div> <!></div>'),o2={hash:"svelte-1wqg760",code:".timeline-preview.svelte-1wqg760 {bottom:18px;border-radius:2px;pointer-events:none;}.timeline-preview.mobile.svelte-1wqg760 {bottom:72px;}.preview.svelte-1wqg760 {background-color:var(--timeline-preview-bg);box-shadow:0 0 2px var(--timeline-preview-shadow), 0 8px 24px var(--timeline-preview-shadow);border-radius:8px;border:1px solid var(--white);}.episode.svelte-1wqg760 {margin-top:10px;margin-bottom:4px;font-size:13px;line-height:16px;text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-weight:500;}.time.svelte-1wqg760 {font-size:13px;line-height:16px;text-align:center;color:var(--white);text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);font-weight:500;}"};function gf(t,e){U(e,!0),W(t,o2);let[i,o]=Be(),n=()=>S(w,"$rotateAlpha",i),a=()=>S(y,"$playerSize",i),s={MOBILE:150,DESKTOP:278},d=f(e,"time",3,""),l=f(e,"isMobile",3,!1),u=f(e,"videoEpisodes",19,()=>[]),v=f(e,"progress",3,0),$=f(e,"duration",3,0),p=f(e,"isInteractive",3,!1),_=Ie(),w=_.ui.rotateAlpha,y=_.ui.playerSize,C=ee(0),T=ee(0),E=ee(""),P=ee(0),A=ee(0),I=ee(0),V=ee(0),H=m(()=>zc(v(),$(),u())),Y=m(()=>zh(n())),O=m(()=>qh(n())),J=m(me),ne=m(()=>(r(O)?1:-1)*(r(C)/2-r(T)/2)),Z=m(()=>r(ne)*-1);We(()=>{(G=>(B(C,fe(G.width)),B(T,fe(G.height))))(Ve())}),We(()=>{(G=>(B(E,fe(G.imgSrc)),B(P,fe(G.imgWidth)),B(A,fe(G.imgHeight)),B(I,fe(G.imgOffsetX)),B(V,fe(G.imgOffsetY))))(Me(v()))});function me(){var Ne;let G=l()?s.MOBILE:s.DESKTOP,{isVertical:K}=le(),Re=30;return(Ne=r(H))!=null&&Ne.text&&(Re+=16),(K||r(Y))&&(Re+=18,Re+=50),Math.min(Math.max(a().height-Re,0),G)}function le(){let G=e.previewThumbsData.frameWidth,K=e.previewThumbsData.frameHeight,Re=K>G;return{width:G,height:K,isHorizontal:!Re,isVertical:Re}}function Ve(){let{height:G,isHorizontal:K,isVertical:Re,width:Ne}=le();return K&&(G=G/Ne*r(J),Ne=r(J)),Re&&(Ne=Ne/G*r(J),G=r(J)),{width:Ne,height:G}}function Me(G){let K;e.previewThumbsData.isUV?K=Math.floor($()*G/e.previewThumbsData.frequency):K=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*G)));let Re=Math.floor(K/e.previewThumbsData.countPerImage),Ne=Math.floor(K%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),et=K%e.previewThumbsData.countPerRow,we=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Re===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(we=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&we++);let Se=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Re===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Se=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let De=r(C)*Se,Xe=r(T)*we,ot=-et*r(C),ft=-Ne*r(T);return{imgSrc:e.previewThumbsData.links[Re],imgWidth:De,imgHeight:Xe,imgOffsetX:ot,imgOffsetY:ft}}var be=i2();let ae;var Le=h(be);{var re=G=>{var K=e2();k(()=>it(K,`width: ${r(C)}px; height: ${r(T)}px; background-image: url(${r(E)}); background-size: ${r(P)}px ${r(A)}px; background-position: ${r(I)}px ${r(V)}px;
228
+ }`};function mf(t,e){U(e,!0),W(t,j$);let i=f(e,"isMobile",3,!1),o=m(()=>e.iconState===Uh.CONNECTED),n=m(()=>e.iconState===Uh.CONNECTING);var a=ze(),s=ue(a);{var d=u=>{var v=Q$(),$=h(v),p=h($),_=h(p);$e(),g(p);var w=M(p);$e(),g($);var y=M($),C=h(y),T=h(C);g(C),$e(),g(y),g(v),k(()=>{Oe(_,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Oe(w,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)"),Oe(T,"fill",r(o)?"#2688EB":"var(--btn-color, #fff)")}),b(u,v)},l=u=>{var v=G$();let $;var p=h(v),_=M(h(p),5);let w;g(p),g(v),k((y,C)=>{$=te(v,0,"svelte-8z1bf5",null,$,y),w=te(_,0,"svelte-8z1bf5",null,w,C)},[()=>({connecting:r(n)}),()=>({hidden:!r(o)})]),b(u,v)};R(s,u=>{i()?u(d):u(l,!1)})}b(t,a),z()}import{noop as Z$}from"@vkontakte/videoplayer-shared/es2015";function ad(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"isMobile",3,!1),n=f(e,"click",3,Z$),s=Ie().ui.t,d=m(()=>e.state===Y$.CONNECTED?s("tooltip_chromecast_on"):s("tooltip_chromecast_off"));Vt(t,{get ariaLabel(){return r(d)},get click(){return n()},testId:"btn-chromecast",get ref(){return i()},set ref(l){i(l)},children:(l,u)=>{mf(l,{get isMobile(){return o()},get iconState(){return e.state}})},$$slots:{default:!0}}),z()}var X$=L('<div class="tooltip-wrapper svelte-5ygsa2"><div><!></div></div>'),J$={hash:"svelte-5ygsa2",code:'.tooltip-wrapper.svelte-5ygsa2 {position:relative;display:block;}.tooltip.svelte-5ygsa2 {position:absolute;opacity:0;visibility:hidden;transition:opacity 200ms, visibility 200ms;bottom:100%;transform:translateX(-50%);}.pointer.svelte-5ygsa2:after {position:absolute;bottom:0;left:50%;width:0;border-top:5px solid rgba(41, 41, 41, .8);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0;transform:translate(-50%, 5px);}.tooltip.active.svelte-5ygsa2 {opacity:1;visibility:visible;}'};function vf(t,e){W(t,J$);let i=f(e,"active",3,!1),o=f(e,"pointer",3,!1),n=f(e,"translateXPx",3,0),a=f(e,"translateYPx",3,0),s=f(e,"leftOffset",3,0),d=f(e,"rightOffset",3,0),l=ee(void 0),u=ee(void 0);function v(C){if(!r(u))return 0;let{width:T}=r(u).getBoundingClientRect(),E=T/2;return C<E?E+s():C>e.containerWidth-E?e.containerWidth-E-d():C}let $=m(()=>v(n()));var p=X$(),_=h(p);let w;var y=h(_);he(y,()=>{var C;return(C=e.children)!=null?C:oe}),g(_),pt(_,C=>B(u,C),()=>r(u)),g(p),pt(p,C=>B(l,C),()=>r(l)),k(C=>{it(p,`transform: translate(${r($)}px, ${a()}px);`),w=te(_,1,"tooltip svelte-5ygsa2",null,w,C),it(_,`opacity: ${i()?1:0}; visibility: ${i()?"visible":"hidden"}`)},[()=>({active:i(),pointer:o()})]),b(t,p)}var zc=(t,e,i)=>i.filter(o=>o.time<=t*e).pop();var zh=t=>!!(Math.round(Math.abs(t)/90)%2),qh=t=>Math.abs(t)/90%4===1;var e2=L('<div class="preview svelte-1wqg760"></div>'),t2=L('<div class="time svelte-1wqg760"> </div>'),i2=L('<div><!> <div class="episode svelte-1wqg760"><!></div> <!></div>'),o2={hash:"svelte-1wqg760",code:".timeline-preview.svelte-1wqg760 {bottom:18px;border-radius:2px;pointer-events:none;}.timeline-preview.mobile.svelte-1wqg760 {bottom:72px;}.preview.svelte-1wqg760 {background-color:var(--timeline-preview-bg);box-shadow:0 0 2px var(--timeline-preview-shadow), 0 8px 24px var(--timeline-preview-shadow);border-radius:8px;border:1px solid var(--white);}.episode.svelte-1wqg760 {margin-top:10px;margin-bottom:4px;font-size:13px;line-height:16px;text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-weight:500;}.time.svelte-1wqg760 {font-size:13px;line-height:16px;text-align:center;color:var(--white);text-shadow:0 8px 24px var(--timeline-preview-shadow), 0 0 2px var(--timeline-preview-shadow);font-weight:500;}"};function gf(t,e){U(e,!0),W(t,o2);let[i,o]=Be(),n=()=>S(w,"$rotateAlpha",i),a=()=>S(y,"$playerSize",i),s={MOBILE:150,DESKTOP:278},d=f(e,"time",3,""),l=f(e,"isMobile",3,!1),u=f(e,"videoEpisodes",19,()=>[]),v=f(e,"progress",3,0),$=f(e,"duration",3,0),p=f(e,"isInteractive",3,!1),_=Ie(),w=_.ui.rotateAlpha,y=_.ui.playerSize,C=ee(0),T=ee(0),E=ee(""),P=ee(0),A=ee(0),I=ee(0),V=ee(0),H=m(()=>zc(v(),$(),u())),Y=m(()=>zh(n())),O=m(()=>qh(n())),J=m(me),ne=m(()=>(r(O)?1:-1)*(r(C)/2-r(T)/2)),Z=m(()=>r(ne)*-1);We(()=>{(G=>(B(C,fe(G.width)),B(T,fe(G.height))))(Ve())}),We(()=>{(G=>(B(E,fe(G.imgSrc)),B(P,fe(G.imgWidth)),B(A,fe(G.imgHeight)),B(I,fe(G.imgOffsetX)),B(V,fe(G.imgOffsetY))))(Me(v()))});function me(){var Ne;let G=l()?s.MOBILE:s.DESKTOP,{isVertical:K}=le(),Re=30;return(Ne=r(H))!=null&&Ne.text&&(Re+=16),(K||r(Y))&&(Re+=18,Re+=50),Math.min(Math.max(a().height-Re,0),G)}function le(){let G=e.previewThumbsData.frameWidth,K=e.previewThumbsData.frameHeight,Re=K>G;return{width:G,height:K,isHorizontal:!Re,isVertical:Re}}function Ve(){let{height:G,isHorizontal:K,isVertical:Re,width:Ne}=le();return K&&(G=G/Ne*r(J),Ne=r(J)),Re&&(Ne=Ne/G*r(J),G=r(J)),{width:Ne,height:G}}function Me(G){let K;e.previewThumbsData.isUV?K=Math.floor($()*G/e.previewThumbsData.frequency):K=Math.min(e.previewThumbsData.countTotal,Math.max(0,Math.floor(e.previewThumbsData.countTotal*G)));let Re=Math.floor(K/e.previewThumbsData.countPerImage),Ne=Math.floor(K%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),et=K%e.previewThumbsData.countPerRow,we=Math.floor(e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow);!e.previewThumbsData.isUV&&Re===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&(we=Math.floor(e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage/e.previewThumbsData.countPerRow),e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage%e.previewThumbsData.countPerRow>0&&we++);let Se=e.previewThumbsData.countPerRow;!e.previewThumbsData.isUV&&Re===Math.floor(e.previewThumbsData.countTotal/e.previewThumbsData.countPerImage)&&e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage>0&&(Se=Math.min(e.previewThumbsData.countPerRow,e.previewThumbsData.countTotal%e.previewThumbsData.countPerImage));let De=r(C)*Se,Xe=r(T)*we,ot=-et*r(C),ft=-Ne*r(T);return{imgSrc:e.previewThumbsData.links[Re],imgWidth:De,imgHeight:Xe,imgOffsetX:ot,imgOffsetY:ft}}var be=i2();let ae;var Le=h(be);{var re=G=>{var K=e2();k(()=>it(K,`width: ${r(C)}px; height: ${r(T)}px; background-image: url(${r(E)}); background-size: ${r(P)}px ${r(A)}px; background-position: ${r(I)}px ${r(V)}px;
229
229
  transform: rotate(${n()}deg) ${r(Y)?`translate(${r(ne)}px, ${r(Z)}px)`:""};
230
- `)),b(G,K)};R(Le,G=>{r(E)&&G(re)})}var N=M(Le,2),pe=h(N);{var _e=G=>{var K=ze(),Re=ue(K);{var Ne=we=>{var Se=Br();k(De=>ge(Se,De),[()=>F("tooltip_episode_unfinished")]),b(we,Se)},et=we=>{var Se=Br();k(()=>ge(Se,r(H).text||"")),b(we,Se)};R(Re,we=>{p()&&r(H).completed===!1?we(Ne):we(et,!1)})}b(G,K)};R(pe,G=>{r(H)&&G(_e)})}g(N);var Ge=M(N,2);{var ie=G=>{var K=t2(),Re=h(K,!0);g(K),k(()=>ge(Re,d())),b(G,K)};R(Ge,G=>{p()||G(ie)})}g(be),k(G=>{ae=te(be,1,"timeline-preview svelte-1wqg760",null,ae,G),it(be,`width: ${r(Y)?r(T):r(C)}px;`)},[()=>({mobile:l()})]),b(t,be),z(),o()}var n2=L('<span class="time svelte-1jr6obn"> </span>'),r2=L("<!> <!>",1),s2={hash:"svelte-1jr6obn",code:".time.svelte-1jr6obn {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.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 hf(t,e){var tt,ct,Ye,Ze,nt;U(e,!0),W(t,s2);let[i,o]=Be(),n=()=>S(ne,"$interactiveEpisodes$",i),a=()=>S(I,"$duration$",i),s=()=>S(A,"$position$",i),d=()=>S(le,"$isInteractiveExpectation$",i),l=()=>S(me,"$isInteractiveTime$",i),u=()=>S(V,"$isLive$",i),v=()=>S(Y,"$isMobile",i),$=()=>S(H,"$isActiveLive$",i),p=()=>S(P,"$bufferedProgress$",i),_=()=>S(be,"$disabledControls$",i),w=f(e,"showTimeline",3,!1),y=f(e,"withEpisodes",3,!0),C=f(e,"ref",15,void 0),T=Ie(),E=zt(),P=T.state.bufferedProgress$,A=T.state.positionWithScrubbing$,I=T.state.duration$,V=T.state.isLive$,H=T.state.isActiveLive$,Y=T.ui.isMobile,O=E.features.episodes&&y()?T.actions.internal.getVideoEpisodes():void 0,J=T.actions.internal.getPreviewThumbsData(),ne=T.state.interactiveEpisodes$,Z=T.state.isInteractive,me=T.state.isInteractiveTime$,le=T.state.isInteractiveExpectation$,Ve=T.actions.internal.correctSeekTimeToInteractive,Me=(tt=T.callbacks)==null?void 0:tt.onDisabledTimelineClick,be=T.ui.controls.disabledControls$,ae=(Ye=(ct=T.callbacks)==null?void 0:ct.uiInfo)==null?void 0:Ye.onTimelineMouseEnter,Le=(nt=(Ze=T.callbacks)==null?void 0:Ze.uiInfo)==null?void 0:nt.onTimelineMouseLeave,re=T.ui.t,N=E.features.interactiveResponsiveUi,pe=m(()=>Z?n():O),_e=m(()=>sn(a())),Ge=m(()=>sn(s())),ie=m(()=>s()/a()),G=m(()=>d()||l()),K=ee(!1),Re=ee(""),Ne=ee(0),et=ee(0),we=ee(0),Se=m(()=>({containerWidth:r(et),translateXPx:r(Ne),translateYPx:Z&&J?-36:-16,active:r(K)&&w()&&!r(G)&&!N,pointer:!E.features.timelinePreview||!J||u()})),De=re("aria_timeline"),Xe=m(()=>re("aria_timeline_value",{position:r(Ge),duration:r(_e)}));function ot(He){return!Ve||!Z?He:Ve(He*a())/a()}function ft(He){T.actions.internal.startScrubbing(ot(He))}function Je(He){l()||T.actions.internal.progressScrubbing(ot(He))}function gt(He){T.actions.internal.completeScrubbing(ot(He)),B(K,!1)}function Et(He,$t,qe){Wt(He,$t,qe),B(K,!0)}function jt(He,$t,qe){Wt(He,$t,qe),B(K,!0)}function qt(){B(K,!1)}function Wt(He,$t,qe){B(we,fe(ot(He))),B(Ne,fe($t)),qe&&B(et,fe(qe)),B(Re,fe(ve(He)))}function ve(He){let $t=sn((u()?1-He:He)*a());return u()?`-${$t}`:$t}var j=r2(),Ce=ue(j);vf(Ce,is(()=>r(Se),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(He,$t)=>{var qe=ze(),dt=ue(qe);{var Xt=Pi=>{gf(Pi,{get time(){return r(Re)},get isMobile(){return v()},get videoEpisodes(){return r(pe)},previewThumbsData:J,get progress(){return r(we)},get duration(){return a()},isInteractive:Z})},Ni=Pi=>{var Ui=n2(),ji=h(Ui,!0);g(Ui),k(()=>ge(ji,r(Re))),b(Pi,Ui)};R(dt,Pi=>{E.features.timelinePreview&&J&&!u()?Pi(Xt):Pi(Ni,!1)})}b(He,qe)},$$slots:{default:!0}}));var se=M(Ce,2);let Oe=m(()=>Math.round(r(ie)*100)),Ue=m(()=>_().has("TIMELINE"));aa(se,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},ariaLabel:De,ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return r(Oe)},get ariaValueText(){return r(Xe)},get loadedProgress(){return p()},get filledProgress(){return r(ie)},get handleProgress(){return r(ie)},get videoEpisodes(){return r(pe)},onPointerDown:ft,onHandleMove:Je,onPointerMove:jt,onPointerUp:gt,onPointerEnter:Et,onPointerLeave:qt,onMouseEnter:ae,onMouseLeave:Le,onDisabledClick:Me,isInteractive:Z,get disabled(){return r(Ue)},get hideHandel(){return l()},get ref(){return C()},set ref(He){C(He)}}),b(t,j),z(),o()}var a2={hash:"svelte-1yate8h",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 ld(t,e){U(e,!0),W(t,a2);let[i,o]=Be(),n=()=>S(l,"$isMobile",i),a=f(e,"position",3,0),s=f(e,"duration",3,0),d=Ie(),l=d.ui.isMobile,u=d.ui.t,v=m(()=>sn(s())),$=m(()=>sn(a())),p=m(()=>a()/s()),_=m(()=>u("aria_timeline_value",{position:r($),duration:r(v)})),w=m(()=>Math.round(r(p)*100));aa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return s()},get ariaValueNow(){return r(w)},get ariaValueText(){return r(_)},get filledProgress(){return r(p)},hideHandel:!0,get squareBorders(){return n()}}),z(),o()}var l2=L("<div><!></div>"),d2=L("<div></div>"),c2={hash:"svelte-1h5wsmk",code:".timeline.svelte-1h5wsmk {position:relative;pointer-events:all;display:flex;align-items:center;bottom:0;width:100%;min-width:86px;padding:3px 10px 4px;box-sizing:border-box;}.timeline.mobile.svelte-1h5wsmk {height:16px;padding:6px 12px 7px;margin-top:6px;}.withoutPadding.svelte-1h5wsmk {padding:0;}.timeline-stub.svelte-1h5wsmk {width:100%;min-width:20px;}.timeline-stub.mobile.svelte-1h5wsmk {height:8px;}"};function la(t,e){U(e,!0),W(t,c2);let[i,o]=Be(),n=()=>S(_,"$isLive$",i),a=()=>S(C,"$isMobile",i),s=()=>S(y,"$adPosition",i),d=()=>S(w,"$adDuration",i),l=f(e,"isAds",3,!1),u=f(e,"isHidden",3,!1),v=f(e,"needPadding",3,!0),$=f(e,"ref",15,void 0),p=Ie(),_=p.state.isLive$,w=p.ads.duration,y=p.ads.position,C=p.ui.isMobile,T=m(()=>!u()&&(!n()||n()&&e.canRewindLive&&e.isRewindableLive||l()));var E=ze(),P=ue(E);{var A=V=>{var H=l2();let Y;var O=h(H);{var J=Z=>{ld(Z,{get position(){return s()},get duration(){return d()}})},ne=Z=>{hf(Z,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return r(T)},get withEpisodes(){return e.withEpisodes},get ref(){return $()},set ref(me){$(me)}})};R(O,Z=>{l()?Z(J):Z(ne,!1)})}g(H),k(Z=>Y=te(H,1,"timeline svelte-1h5wsmk",null,Y,Z),[()=>({withoutPadding:!v(),mobile:a()})]),b(V,H)},I=V=>{var H=d2();let Y;k(O=>Y=te(H,1,"timeline-stub svelte-1h5wsmk",null,Y,O),[()=>({mobile:a()})]),b(V,H)};R(P,V=>{r(T)?V(A):V(I,!1)})}b(t,E),z(),o()}import{noop as f2}from"@vkontakte/videoplayer-shared/es2015";var u2=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="m21.616 16.495-.012.07c-.156.852-.282 1.541-.427 2.093-.148.569-.333 1.063-.64 1.5a4.4 4.4 0 0 1-2.507 1.732c-.52.133-1.046.131-1.63.069-.568-.06-1.257-.187-2.11-.343l-4.34-.794c-.853-.156-1.542-.282-2.094-.426-.568-.149-1.062-.334-1.5-.642a4.4 4.4 0 0 1-1.731-2.507c-.133-.518-.131-1.045-.069-1.63.06-.567.187-1.257.343-2.11l.012-.068c.156-.853.282-1.542.427-2.095.148-.568.333-1.062.641-1.5a4.4 4.4 0 0 1 2.507-1.731c.518-.133 1.045-.131 1.63-.069.567.06 1.256.187 2.109.343l4.34.794c.853.156 1.542.282 2.094.426.568.149 1.062.334 1.5.642a4.4 4.4 0 0 1 1.731 2.506c.133.52.131 1.046.069 1.63-.06.568-.187 1.258-.343 2.11m-1.446-2.3c.052-.483.035-.769-.022-.993a2.6 2.6 0 0 0-1.023-1.481c-.19-.133-.45-.25-.921-.373-.48-.125-1.102-.24-1.997-.404l-4.272-.781c-.895-.164-1.518-.277-2.01-.33-.483-.051-.769-.035-.993.023-.6.153-1.125.516-1.481 1.023-.133.19-.25.45-.373.92-.125.48-.24 1.103-.403 1.998s-.277 1.518-.33 2.01c-.051.484-.035.77.023.994.153.6.516 1.125 1.023 1.481.189.133.45.25.92.373.48.125 1.102.24 1.997.404l4.272.781c.895.164 1.518.277 2.01.33.483.051.77.035.993-.023a2.6 2.6 0 0 0 1.481-1.023c.133-.19.25-.45.373-.92.125-.48.24-1.103.403-1.998s.278-1.518.33-2.01Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M18.187 7.488a.9.9 0 0 1-1.045-.727c-.145-.807-.199-1.086-.28-1.296A2.6 2.6 0 0 0 14.504 3.8c-.224-.006-.505.036-1.315.169l-5.846.962c-1.366.224-1.834.313-2.174.492A2.6 2.6 0 0 0 3.837 7.18c-.08.376-.039.85.114 2.226l.011.1a.9.9 0 1 1-1.787.198l-.01-.093-.019-.17c-.129-1.147-.217-1.937-.068-2.636A4.4 4.4 0 0 1 4.332 3.83c.633-.333 1.417-.461 2.556-.648l.163-.027 5.846-.961.098-.016c.674-.111 1.138-.188 1.556-.177a4.4 4.4 0 0 1 3.99 2.819c.15.39.234.853.355 1.526l.017.097a.9.9 0 0 1-.726 1.045" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M12.724 12.414a.415.415 0 0 0-.69.231l-.72 4.18a.4.4 0 0 0 .025.221c.085.21.327.311.539.226l3.669-1.467a.406.406 0 0 0 .127-.68z"></path></svg>');function _f(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=u2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(3),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"episodes-icon",style:"flex-shrink:0",role:"img"},i))),b(t,o)}var p2=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.146 3.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L6.793 6.5 4.146 3.854a.5.5 0 0 1 0-.708" clip-rule="evenodd" opacity=".7"></path></svg>');function bf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=p2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"12",height:"13",fill:"none","aria-hidden":"true","data-testid":"chevron-light-icon",role:"img"},i))),b(t,o)}var m2=L('<span class="text mobile svelte-1yhs2ga"> </span> <div class="chevron-episodes svelte-1yhs2ga"><!></div>',1),v2=L('<span class="text svelte-1yhs2ga"> </span>'),g2=L('<span class="text count svelte-1yhs2ga"> </span>'),h2=L("<!> <!>",1),_2={hash:"svelte-1yhs2ga",code:".text.svelte-1yhs2ga {padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.text.count.svelte-1yhs2ga {overflow:visible;}.text.mobile.svelte-1yhs2ga {padding:0 3px 0 4px;}.chevron-episodes.svelte-1yhs2ga {margin-bottom:-4px;}"};function dd(t,e){var le,Ve,Me;U(e,!0),W(t,_2);let[i,o]=Be(),n=()=>S(w,"$currentGridType$",i),a=()=>S(y,"$openedByKeyboard$",i),s=()=>S(C,"$panelOpened$",i),d=()=>S(T,"$isMobile",i),l=f(e,"position",3,0),u=f(e,"duration",3,0),v=f(e,"timeCodes",19,()=>[]),$=Ie(),p=(Ve=(le=$.callbacks)==null?void 0:le.onEpisodeChanged)!=null?Ve:f2,_=!!((Me=$.callbacks)!=null&&Me.onEpisodeClicked),w=$.ui.currentGridType$,y=$.ui.episodes.openedByKeyboard$,C=$.ui.episodes.panelOpened$,T=$.ui.isMobile,E=$.ui.t,P=ee(void 0),A=be=>{var Le,re,N;if(!!((Le=$.callbacks)!=null&&Le.onEpisodeClicked)){let pe=xs(be);y.set(pe),C.set(!0),(N=(re=$.callbacks)==null?void 0:re.onEpisodeClicked)==null||N.call(re,pe)}},I=ee(null),V=m(()=>l()/u());We(()=>{var ae;let be=zc(r(V),u(),v());be?((ae=r(I))==null?void 0:ae.time)!==be.time&&(p(be),B(I,fe(be))):B(I,null)});let H=m(()=>{var be;return((be=r(I))==null?void 0:be.text)||""}),Y=m(()=>Gi(n(),"xl")?"FULL":Gi(n(),"m")&&Hh(n(),"xl")?"COUNT":"SHORT"),O=m(()=>`${E("tooltip_episodes")}: ${r(H)}`),J=(be,ae,Le)=>kt(this,null,function*(){yield $o(),(be==null?void 0:be.getAttribute("aria-expanded"))==="false"&&ae&&!Le&&bt(()=>{y.set(!1),be.focus()})});We(()=>{J(r(P),a(),s())});var ne=ze(),Z=ue(ne);{var me=be=>{let ae=m(()=>d()?"px-0":"");Vt(be,{get className(){var Le;return`w-max btn-full-opacity btn-jc-l ${(Le=r(ae))!=null?Le:""}`},testId:"btn-episodes",click:A,disabled:!_,get ariaExpanded(){return s()},get ariaLabel(){return r(O)},get ref(){return r(P)},set ref(Le){B(P,fe(Le))},children:(Le,re)=>{var N=ze(),pe=ue(N);{var _e=ie=>{var G=m2(),K=ue(G),Re=h(K,!0);g(K);var Ne=M(K,2),et=h(Ne);bf(et,{}),g(Ne),k(()=>ge(Re,r(H))),b(ie,G)},Ge=ie=>{var G=h2(),K=ue(G);_f(K,{});var Re=M(K,2);{var Ne=we=>{var Se=v2(),De=h(Se,!0);g(Se),k(()=>ge(De,r(H))),b(we,Se)},et=(we,Se)=>{{var De=Xe=>{var ot=g2(),ft=h(ot,!0);g(ot),k(()=>ge(ft,v().length)),b(Xe,ot)};R(we,Xe=>{r(Y)==="COUNT"&&Xe(De)},Se)}};R(Re,we=>{r(Y)==="FULL"?we(Ne):we(et,!1)})}b(ie,G)};R(pe,ie=>{d()?ie(_e):ie(Ge,!1)})}b(Le,N)},$$slots:{default:!0}})};R(Z,be=>{r(I)&&be(me)})}b(t,ne),z(),o()}import{debounceFn as _y}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as T2,PlaybackState as cd,Player as I2,PredefinedQualityLimits as zr,VideoFormat as ud,clientChecker as k2}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as qn,getHighestQuality as E2,InterfaceLanguage as P2,isInvariantQuality as A2,isNonNullable as M2,loadVKLangPack as L2,Logger as V2,map as Zh,merge as R2,Observable as D2,Subject as Zc,Subscription as Cf,Tracer as N2,ValueSubject as B2,VideoQuality as O2,devNull as H2,now as F2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as rs}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as b2,devNull as Yt,now as Zt}from"@vkontakte/videoplayer-shared/es2015";import{addScript as $2,Subject as Fo,clearVideoElement as y2}from"@vkontakte/videoplayer-shared/es2015";var Wh=(t,e)=>t<400||e<225?5:t<640||e<360?0:t<960||e<540?1:t<1280||e<720?2:3;var x2="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",qc=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 Fo,loadStarted$:new Fo,loadEnded$:new Fo,loadError$:new Fo,ready$:new Fo,slotRequested$:new Fo,started$:new Fo,timeRemained$:new Fo,paused$:new Fo,resumed$:new Fo,ended$:new Fo,empty$:new Fo,skipped$:new Fo,clicked$:new Fo,closed$:new Fo,error$:new Fo};this.loadAdman=e=>(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[Zt()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[Zt()]}),o())};$2(x2,e,this.loadTimeout).then(()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[Zt()]}),window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[Zt()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout))}).catch(s=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[Zt()]}),o(),clearTimeout(n)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[Zt()]}),o())},s=()=>{d=!0,o()},d=!1,l=window.setTimeout(()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[Zt()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[Zt()]}),s()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[Zt()]}),!d&&(window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[Zt()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout)))},s).finally(()=>{clearTimeout(n),clearTimeout(l),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[Zt()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[Zt(),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"}),Te(this.playerState.isMobile)&&this.playerState.mobileUnmuteButtonVisible.set(!0)),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()):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{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;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[Zt()]}),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;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.log({message:"ad completed"}),this.currentAdSection?this.events.ended$.next(this.currentAdSection):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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")=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[Zt()]}),this.log({message:e}),this.events.error$.next(e),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[Zt()]}),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){var P;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[Zt(),e.slotId]}),this.adman)return;this.events.init$.next(),this.startWatchDog();let{width:i,height:o,isFullscreen:n,isAutoplay:a,adsContainer:s,adsVideoElement:d,slotId:l,params:u={},duration:v,previewParam:$}=e,p,_=this.playerState&&Te(this.playerState.vsid);_&&(this.isVsidOriginal?p=_:p=parseInt(_,36));let{isEmbed:w,immediateOrigin:y}=b2(),C=(P=w?y:window.location.href)!=null?P:window.location.href,T=Dt(q(Dt(q({},u),{dl:encodeURIComponent(C),autoplay:a?1:0,player_width:i,player_height:o,preview:$}),p?{request_id:p}:{}),{duration:v,puid10:Wh(i,o),puid11:n?0:1});$||delete T.preview;let E={slot:l,wrapper:s,videoEl:d,videoQuality:o,params:T,browser:{mobile:!1}};try{let A=new window.AdmanHTML;A.setDebug(!1),A.onReady(this.onAdsReady),A.onStarted(this.onAdStarted),A.onPlayed(this.onAdPlayed),A.onPaused(this.onAdPaused),A.adMidrollPoint(this.onAdMidrollPoint),A.onClosed(this.onAdClosed),A.onSkipped(this.onAdSkipped),A.onClicked(this.onAdClicked),A.onTimeRemained(this.onAdTimeRemained),A.onCompleted(this.onAdCompleted),A.onError(this.onAdError),A.init(E),this.adman=A,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(E)}`})}catch(A){Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[Zt()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,n,a;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[Zt()]}),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.playerState.mobileUnmuteButtonVisible.set(!1),this.log({message:`switch to video, isPostroll: ${i}`}),i&&(this.adsState.postrollPassed.set(!0),this.log({message:"postroll passed"}));else{let s="Switch to video: Adman state was not updated correctly";this.log({message:s}),this.events.error$.next(s)}(a=(n=this.actions).switchFromAdsToVideo)==null||a.call(n,!i)}}togglePlay(){var e;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.adsState){this.log({message:"toggle play"});let i=Te(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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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&&clearTimeout(this.watchDogTimeout),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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,n,a,s,d,l,u,v,$,p;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[Zt()]}),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),(n=this.adman)==null||n.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(s=this.adman)==null||s.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(l=this.adman)==null||l.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(v=this.adman)==null||v.onCompleted(void 0),($=this.adman)==null||$.onError(void 0),(p=this.adman)==null||p.destroy(),this.videoElement&&y2(this.videoElement),this.isDestroyed=!0}};var Kh=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 $f=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],n=e.split(this.twoLinesRegExp);for(let a of n){let s={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let l of d)if(!s.startTime&&!s.endTime){let u=new Wc,{startTime:v,endTime:$}=u.parse(l);s.startTime=v,s.endTime=$}else if(l.trim()!==""){let u=new yf,{texts:v}=u.parse(l);s.texts=[...s.texts,...v]}(s.startTime||s.endTime)&&s.texts.length>0&&o.push(s)}return o}},Wc=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",n="0"){let a=Number(e)*60*60,s=Number(i)*60,d=Number(o),l=+`0.${n}`;return a+s+d+l}},yf=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let d=0,l=[];for(;d<s.length;){let u=["<",">"].reduce((v,$)=>{let p=s.indexOf($,d);return v===-1||v>p?p:v},-1);if(u===-1){l.push(s.substring(d));break}l.push(s.substring(d,u)),d=u+1}return l}}),a=new Wc;for(let s of n)a.isTime(s)?i.texts.push({type:"timestamp",value:a.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Qh=$f;import{isNonNullable as xf}from"@vkontakte/videoplayer-shared/es2015";var da,Ei,wf=0,Sf=!1,Gh="",jh=(t,e=0,i=0)=>t<e&&t<i,Kc=(t,e=0,i=0)=>t>=e&&t<=i,w2=(t,e=0,i=0)=>t>e&&t>i,Yh=(t,e,i,o=!1)=>{var d;let n=(d=i.find(({id:l})=>l===e.value))==null?void 0:d.subtitles;if(o)return n==null?void 0:n.find(({startTime:u,endTime:v})=>Kc(t,u,v));let a=t>=wf,s=t<wf;if(wf=t,s&&(Sf=!1),xf(da)&&Kc(t,da.startTime,da.endTime)&&Gh===e.value)return da;if(!xf(Ei)&&(n!=null&&n.length)&&!Sf){Ei=n.find(({startTime:u,endTime:v})=>Kc(t,u,v)||a&&jh(t,u,v)),da=void 0,!xf(Ei)&&n[n.length-1].endTime<t&&(Sf=!0);return}else{if(Kc(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))return da=Ei,Ei=void 0,Gh=e.value,da;(a&&w2(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime)||s&&jh(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))&&(Ei=void 0)}};var Qc={ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",be:"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F (\u0442\u0430\u0440\u0430\u0448\u043A\u0435\u0432i\u0446\u0430)",es:"Espa\xF1ol",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",hr:"Hrvatski",hu:"Magyar",sr:"\u0421\u0440\u043F\u0441\u043A\u0438",pt:"Portugu\xEAs",el:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",pl:"Polski",fr:"Fran\xE7ais",ko:"\uD55C\uAD6D\uC5B4","zh-CN":"\u6C49\u8BED",lt:"Lietuvi\u0173",ja:"\u65E5\u672C\u8A9E",cs:"\u010Ce\u0161tina",et:"Eesti",tt:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",ba:"\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430",cv:"\u0427\u0103\u0432\u0430\u0448\u043B\u0430",sk:"Sloven\u010Dina",ro:"Rom\xE2n\u0103",no:"Norsk",lv:"Latvie\u0161u",az:"Az\u0259rbaycan dili",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",sv:"Svenska",nl:"Nederlands",tk:"T\xFCrkmen",ka:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8",da:"Dansk",uz:"O\u2018zbek",th:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",id:"Bahasa Indonesia",tg:"\u0422\u043E\u04B7\u0438\u043A\u04E3",sl:"Sloven\u0161\u010Dina",bs:"Bosanski","pt-BR":"Portugu\xEAs brasileiro",fa:"\u0641\u0627\u0631\u0633\u06CC",vi:"Ti\u1EBFng Vi\u1EC7t",hi:"\u0939\u093F\u0928\u094D\u0926\u0940",si:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD",bn:"\u09AC\u09BE\u0982\u09B2\u09BE",tl:"Tagalog",mn:"\u041C\u043E\u043D\u0433\u043E\u043B",my:"\u1017\u1019\u102C\u1005\u102C",tr:"T\xFCrk\xE7e",ne:"\u0928\u0947\u092A\u093E\u0932\u0940",ur:"\u0627\u0631\u062F\u0648",ky:"\u041A\u044B\u0440\u0433\u044B\u0437 \u0442\u0438\u043B\u0438",pa:"\u067E\u0646\u062C\u0627\u0628\u06CC",os:"\u0418\u0440\u043E\u043D",kn:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1",sw:"Kiswahili",kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",he:"\u05E2\u05D1\u05E8\u05D9\u05EA",ab:"\u0410\u04A7\u0441\u0448\u04D9\u0430",eu:"Euskara",eo:"Esperanto"},S2={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"},Gc=t=>{var e,i;return(i=(e=Qc[t])!=null?e:Qc[S2[t]])!=null?i:void 0};import{Subscription as C2}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var jc=class{constructor(e,i=new C2){this.oneStat=e;this.statSubscription=i}destroy(){this.oneStat.destroy(),this.statSubscription.unsubscribe()}};var Yc=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yc||{});var Ur=t=>t!=null?t:0,el=(t,e)=>{var n,a;let i=(n=t==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(Ur(i==null?void 0:i.top)-Ur(o==null?void 0:o.top)),left:Math.round(Ur(i==null?void 0:i.left)-Ur(o==null?void 0:o.left)),bottom:Math.round(Ur(i==null?void 0:i.bottom)-Ur(o==null?void 0:o.top)),right:Math.round(Ur(i==null?void 0:i.right)-Ur(o==null?void 0:o.left))}},tl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:Ur(e==null?void 0:e.width),height:Ur(e==null?void 0:e.height)}};var Xh=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:n,statAuthToken:a,isAudioDisabled:s,canDownload:d,callbacks:l,webApi:u,videoEpisodes:v,previewThumbsData:$,uiConfig:p,coreConfig:_,player:w,disabledControls:y,isInteractive:C,interactiveRanges$:T,isInteractiveTime$:E,replayInteractive:P,stopPlayer:A,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:V,additionalButtons:H,additionalSettingsMenuItems:Y,additionalContextMenuItems:O,playPrevVideo:J,playNextVideo:ne,looped:Z=!1,statistics:me,saveRate:le,internalsExposure:Ve,playerView:Me})=>{var qm,Wm,Km;let be=Dt(q({},_),{configName:[...(qm=_.configName)!=null?qm:[],"ui"],isAudioDisabled:s,live:Dt(q({},(Wm=_.live)!=null?Wm:{}),{isLiveCatchUpMode:!!n})}),ae=p,Le=N2.createRootTracer(ae.features.saveTraceInfoToFile),re=Le.createComponentTracer("Store"),N=w||new I2(be,Le);Ve==null||Ve.expose({corePlayer:N});let pe=new V2,_e=new qc(pe,{loadTimeout:ae.ads.loadTimeout,initTimeout:ae.ads.initTimeout,runtimeTimeout:ae.ads.runtimeTimeout,useAdmanFromNPM:ae.ads.useAdmanFromNPM,volumeMultiplier:ae.ads.volumeMultiplier,isVsidOriginal:ae.ads.isVsidOriginal}),Ge=Xs.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,G=u==null?void 0:u.annotationsApi,K=pe.createComponentLog("Store"),Re,Ne,et={},we=new yc,Se=me?Jt(me.oneStat.vsid$):sr(void 0),De=de(bs()),Xe=de(!1),ot=(Km=ie==null?void 0:ie.info.isActive$)!=null?Km:new B2(!1),ft=de(0),Je=de([]),gt=R2(N.events.fatalError$,N.events.managedError$).subscribe(c=>Je.update(x=>[...x,c])),Et=sr(!1,c=>{let x=N.events.fatalError$.subscribe(()=>c(!0));return()=>x.unsubscribe()}),jt=c=>kt(void 0,null,function*(){var ce;let x=Object.values(P2).includes(c);if(ae.downloadVKLanguages&&(x&&ae.updateBuiltinLanguages||!Pp(c))){let Qe;try{Qe=yield L2(c,Dg,Ng)}catch(wt){(ce=me==null?void 0:me.oneStat)==null||ce.logError({errorType:"VKLangPack",fatal:!1}),Ge==null||Ge.report(wt,{errorType:"VKLangPack",fatal:!1})}Qe&&(Ep({language:c,pack:Qe,fallback:ae.defaultLanguage}),qt.set(c))}Pp(c)&&qt.set(c)}),qt=de(t),Wt=de(e);jt(t);let ve=(c,x)=>{let D=Te(qt);return Ap(D,c,x,ae.defaultLanguage)},j=de("thumb"),Ce=(()=>{let c=yi([Et,j],([x,D])=>x?"crashed":D);return Dt(q({},c),{is:x=>Te(c)===x})})(),se=(()=>{let c=de(new Set(y));return Dt(q({},c),{add:x=>{c.update(D=>new Set([...D].concat(x)))},remove:x=>{c.update(D=>{let ce=[...D];return new Set(Array.isArray(x)?ce.filter(Qe=>!x.includes(Qe)):ce.filter(Qe=>Qe!==x))})},includes:x=>{let D=Te(c);return Array.isArray(x)?x.every(ce=>D.has(ce)):D.has(x)}})})();re.log("create store"),K({message:"create store"});let Oe=c=>{let x=c.container;x.append(N.experimental.element$.getValue()),He=new MutationObserver(D=>{let{removedNodes:ce}=D[0];ce.length&&x.append(N.experimental.element$.getValue())}),He.observe(x,{childList:!0})},Ue=c=>{K({message:`init video, config: ${JSON.stringify(c)}`}),C?Oe(c):(H2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[F2()]}),N.initVideo(c)),re.log("init video",{isInteractive:C}),c.subtitles&&N.setExternalTextTracks(c.subtitles),Re=c},tt=new Zc,ct=c=>tt.next(c),Ye=new Zc,Ze=new Zc,nt=new Zc,He=null,$t={actionRewind$:Ye,actionSeek$:Ze,inPiP$:ot,inFullscreen$:new D2(c=>De.subscribe(x=>c.next(x))),actionSetSubtitle$:nt,nextMovie$:tt};if(me){let{oneStat:c,statSubscription:x}=me;C||x.add(c.attachTo(N)),x.add(c.attachToUi($t)),x.add(c.attachToAds(_e.events)),c.authorize(a).catch(D=>{K({message:`onestat auth error ${String(D)}`})})}if(Ge){let c=new Cf,x=(D,ce)=>c.add(D.subscribe(ce));if(x(N.events.managedError$,D=>{Ge.logIError(D)}),x(N.events.fatalError$,D=>{Ge.logIError(D,!0)}),me){let{oneStat:D}=me;x(D.experimental.error$,ce=>{Ge.logIError(ce)})}Ge.sentrySubscription.add(c)}let qe=()=>{k2.device.isIOS&&Ne&&$h(Ne).catch(c=>{K({message:`exitIosSafariFullscreen failed: ${c}`})})},dt=new Cf().add(N.experimental.element$.subscribe(c=>{c&&(Ne=c,c.classList.add("player-media"),ea(ie)&&(ie.updateVideoElement(),ie.registryEventHandlers()),C&&c.setAttribute("pip","false"),Me==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(N.events.ended$.subscribe(()=>{var c;qe(),(c=l==null?void 0:l.onEnded)==null||c.call(l)})).add(N.events.looped$.subscribe(()=>{var c;(c=l==null?void 0:l.onLooped)==null||c.call(l)})).add(N.events.started$.subscribe(()=>kt(void 0,null,function*(){var x,D;ea(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=N.info.muted$.getValue();(x=l==null?void 0:l.onStarted)==null||x.call(l),(D=et.onStarted)==null||D.call(et,c)}))).add(N.events.willSeek$.subscribe(({from:c,to:x})=>{var D;(D=l==null?void 0:l.onSeek)==null||D.call(l,c,x)})).add(N.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=l==null?void 0:l.onAutoplaySoundProhibited)==null||c.call(l)})).add(N.info.position$.subscribe(c=>{var D;let x=N.info.duration$.getValue();isFinite(x)&&x>0&&((D=l==null?void 0:l.onTimeupdate)==null||D.call(l,x,c),_e.setPosition(c,x))})).add(N.events.fatalError$.subscribe(c=>{var x;(x=l==null?void 0:l.onCrashed)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.fetcherRecoverableError$.subscribe(c=>{var x;(x=l==null?void 0:l.onRecoverableError)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.loadedMetadata$.subscribe(()=>{At.state.loadedMetadata$.set(!0)})).add(N.info.is3DVideo$.subscribe(c=>{At.ui.is3DVideo.set(c)})).add(N.info.isEnded$.subscribe(c=>{C&&(c?(E!=null&&E.getValue()&&se.add(Bl),se.add("PLAY_BUTTON")):se.remove("PLAY_BUTTON"))})).add(N.info.liveTime$.subscribe(c=>{var x;(x=l==null?void 0:l.onLiveTime)==null||x.call(l,c)})).add(N.info.isStalled$.subscribe(c=>{var x;(x=l==null?void 0:l.onStalledChanged)==null||x.call(l,c)})).add(N.info.isLiveEnded$.subscribe(c=>{var x;return c&&((x=l==null?void 0:l.onLiveEnded)==null?void 0:x.call(l))})).add(_e.events.loadStarted$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:x.call(c)})).add(_e.events.loadEnded$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:x.call(c)})).add(_e.events.loadError$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadError)==null?void 0:x.call(c)})).add(_e.events.init$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onInit)==null?void 0:x.call(c)})).add(_e.events.ready$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onReady)==null?void 0:x.call(c)})).add(_e.events.started$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onStarted)==null?void 0:D.call(x,c)})).add(_e.events.timeRemained$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onTimeRemained)==null?void 0:D.call(x,c)})).add(_e.events.ended$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onCompleted)==null?void 0:D.call(x,c)})).add(_e.events.empty$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onEmpty)==null?void 0:x.call(c)})).add(_e.events.clicked$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClicked)==null?void 0:D.call(x,c)})).add(_e.events.closed$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClosed)==null?void 0:D.call(x,c)})).add(_e.events.error$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onError)==null?void 0:D.call(x,c)})).add(_e.events.paused$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onPaused)==null?void 0:x.call(c)})).add(_e.events.resumed$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onResumed)==null?void 0:x.call(c)})),Xt=new Cf,Ni=()=>{var wt,Nt,Gt;let{debugLog:c}=ae,x,D="#9df7b7",ce="#efd169";if(c&&c!==!0){let{colors:Bt}=c;x=c.tag,D=(wt=Bt==null?void 0:Bt[0])!=null?wt:D,ce=(Gt=(Nt=Bt==null?void 0:Bt[1])!=null?Nt:Bt==null?void 0:Bt[0])!=null?Gt:ce}let Qe=x?`: ${x}`:"";Xt.add(N.events.log$.subscribe(Bt=>{console.debug(`%c sdk${Qe} `,`background:${D};`,`sdk component: ${Bt.component}`,Bt.message)})).add(pe.log$.subscribe(Bt=>{console.debug(`%c ui${Qe} `,`background:${ce};`,`ui component: ${Bt.component}.`,Bt.message)}))},Pi=()=>{Xt.unsubscribe()},Ui=(c,x)=>{re.log("start camera manual rotation",{mx:c,my:x}),N.startCameraManualRotation(c,x)},ji=(c=!1)=>{re.log("stop camera manual rotation",{immediate:c}),N.stopCameraManualRotation(c)},Yi=(c,x,D)=>{re.log("move camera focus px",{xpx:c,ypx:x,dt:D}),N.moveCameraFocusPX(c,x,D)},Lt=()=>{N.holdCamera()},yt=()=>{N.releaseCamera()},Rt=sr(N.info.position$.getValue(),c=>{let x,D,ce=()=>{let Qe=N.info.playbackState$.getValue(),wt=N.info.isLive$.getValue(),Nt=N.info.duration$.getValue(),Gt=N.info.position$.getValue();if(Qe&&[cd.PLAYING,cd.PAUSED].includes(Qe)){let Bt=wt?Gt-Nt:N.getExactTime();Bt!==D&&c(Bt),D=Bt}x=requestAnimationFrame(ce)};return ce(),()=>cancelAnimationFrame(x)}),So=Jt(N.info.playbackState$),an=Jt(N.info.currentBuffer$),X=Jt(N.info.isEnded$),ii=Jt(N.info.isLive$),pi=ae.features.playbackRate?Jt(N.info.canChangePlaybackSpeed$):sr(!1),zi=Jt(N.info.liveBufferTime$),ri=Jt(N.info.volume$),fi=Jt(N.info.muted$),si=xc(N.info.predefinedQualityLimitType$.pipe(Zh(c=>c===zr.TRAFFIC_SAVING)),N.info.predefinedQualityLimitType$.getValue()===zr.TRAFFIC_SAVING),ut=xc(N.info.predefinedQualityLimitType$.pipe(Zh(c=>c===zr.HIGH_QUALITY)),N.info.predefinedQualityLimitType$.getValue()===zr.HIGH_QUALITY),mo=Jt(N.info.autoQualityLimitingAvailable$),Tt=Jt(N.info.availableQualities$),Kt=Jt(N.info.availableQualitiesFps$),oi=Jt(N.info.chromecastState$),vo=Jt(N.info.chromecastDeviceName$),Sn=Jt(N.info.currentFormat$),Zi=Jt(N.info.throughputEstimation$),Co=Jt(N.info.videoBitrate$),di=Jt(N.info.intrinsicVideoSize$),xt=Jt(N.info.duration$),To=Jt(N.info.isAudioAvailable$),Ai=null,Si=N.info.isBuffering$,zo=sr(Si.getValue(),c=>{let x=Si.subscribe(D=>{D&&Ai===null?Ai=window.setTimeout(()=>{c(Si.getValue()),Ai=null},ae.loaderDelay):c(D)});return()=>{x.unsubscribe(),Ai&&clearTimeout(Ai)}}),oo=()=>{Ai&&clearTimeout(Ai),Ai=null},qi=yi([xt,ii],([c,x])=>x?-c:c),Cn=yi([So],([c])=>c===cd.PLAYING),Tn=Jt(N.info.atLiveEdge$),Bi=Jt(N.info.atLiveDurationEdge$),ln=Jt(N.info.position$),Io=yi([ln,xt],([c,x])=>isFinite(c)&&isFinite(x)&&!!x),ko=yi([oi],([c])=>c===T2.CONNECTED),Tr=Jt(N.info.availableVideoStreams$),lr=ae.features.audioLanguages?Jt(N.info.availableAudioStreams$):sr([]),In=Jt(N.info.currentVideoStream$),Kn=Jt(N.info.currentAudioStream$),Qn=c=>{c.language&&kp(c.language),N.setVideoStream(c)},go=c=>{c.language&&kp(c.language),N.setAudioStream(c)},qo=c=>{let x;if(c.length===1&&(x=c.at(0)),x!=null||(x=c.find(ce=>"isDefault"in ce&&ce.isDefault)),x)return x;let D=sh();return D&&(x=c.find(({language:ce})=>D===ce)),x!=null||(x=c.at(0)),x},kn=!1;dt.add(N.info.availableAudioStreams$.subscribe(c=>{if(!kn&&c.length){let x=qo(c);x&&(N.setAudioStream(x),kn=!0)}}));let rt=!1;dt.add(N.info.availableVideoStreams$.subscribe(c=>{if(!rt&&c.length){let x=qo(c);x&&(N.setVideoStream(x),rt=!0)}}));let Wo=de(void 0),dn=Jt(N.info.isAutoQualityEnabled$,c=>c&&Wo.set(void 0)),En=Jt(N.info.currentQuality$,()=>Wo.set(void 0)),dr=yi([Wo,En],([c,x])=>c!=null?c:x),Ko=yi(Sn,c=>c!==ud.MPEG),Gn=yi([Tt,Kt,dn,dr,Ko],([c,x,D,ce,Qe])=>{let wt=[];Qe&&wt.push({value:"auto",displayValue:ve("auto_quality_option"),selected:D});let Nt=c.filter(Gt=>!A2(Gt));for(let Gt of Nt){let Bt=x[Gt];wt.push({value:Gt,displayValue:`${Gt}${Bt?Kh(Bt):""}`,selected:D?!1:Gt===ce})}return wt}),cn=Jt(N.info.currentPlaybackRate$),Pn=yi([cn,Tn,Bi],([c,x,D])=>{let ce=D||C?1:ae.controls.playbackRateMin,Qe=x?1:ae.controls.playbackRateMax,wt=ae.controls.playbackRateStep,Nt=[];for(let Gt=ce;Gt<=Qe;Gt+=wt)Nt.push({value:Gt,displayValue:Gt===1?ve("playback_rate_1"):ve("playback_rate",{multiplier:Gt.toString(10)}),selected:c===Gt});return Nt}),Oi={displayValue:ve("subtitles_off"),value:"off"},Xi=de(q({},Oi)),An=ae.features.subtitles?Jt(N.info.availableTextTracks$):sr([]),Ro=Zg(),Mn=yi([An,Xi],([c,x],D)=>{var wt;let ce=[],Qe=c.find(({id:Nt})=>Nt===x.value);if(Qe!=null&&Qe.url){let[,Nt]=(wt=Ro.find(Qe.url))!=null?wt:[];if(Nt){D(Nt);return}we.download(Qe.url).then(Gt=>{if(!Gt||we.isDestroyed())return;let Bt=new Qh,cs=Qe.language;if(cs){let F1=!!Qe.isAuto,U1=Bt.parse(Gt,cs);ce.push({lang:cs,subtitles:U1,isAuto:F1,id:Qe.id})}Ro.add(Qe.url,ce),Te(Xi).value===x.value&&D(ce)}).catch(Gt=>{var Bt;(Bt=me==null?void 0:me.oneStat)==null||Bt.logError({errorType:"Subtitles download",fatal:!1}),Ge==null||Ge.report(Gt,{errorType:"Subtitles download",fatal:!1})})}D(ce)}),Qo=yi([cn,Cn,Xi],([c,x,D],ce)=>{let Nt;if(N.info.isLive$.getValue()&&x&&D.value!==Oi.value){let Bt=()=>{let cs=1e3/(3*c);Nt=setTimeout(Bt,cs),ce(Date.now())};return Bt(),()=>clearTimeout(Nt)}}),Do=yi([An,Xi],([c,x])=>{if(!c.length)return[];let D=[];for(let{language:ce,isAuto:Qe,id:wt}of c){let Nt=ce&&Gc(ce);ce&&Nt&&D.push({displayValue:Qe?ve("subtitles_auto",{language:Nt}):Nt,value:wt,selected:(x==null?void 0:x.value)===wt,isAuto:Qe})}return D.length?(D.unshift(Dt(q({},Oi),{selected:(x==null?void 0:x.value)===Oi.value})),D):[]}),gi={available:[],prev:[]},jn=()=>{var x,D;let c=N.experimental.getCurrentTime$.getValue();return(D=(x=c==null?void 0:c())!=null?x:Ne==null?void 0:Ne.currentTime)!=null?D:0},Eo=yi([Rt,Xi,Mn,Qo],([c,x,D,ce])=>{var wt;let Qe=N.info.isLive$.getValue();if(Qe&&gi.prev!==D){let Nt=D.find(({id:Bt})=>Bt===x.value),Gt=gi.prev.find(({id:Bt})=>Bt===x.value);if(Nt){let Bt=Dt(q({},Nt),{subtitles:[...(wt=Gt==null?void 0:Gt.subtitles)!=null?wt:[],...Nt.subtitles]});gi.available=[Bt],gi.prev=D}}if(x&&x.value!==Oi.value){let Nt=Qe?jn():c,Gt=Qe?gi.available:D;return Yh(Nt,x,Gt,Qe)}}),cr=yi([Eo],([c])=>c!=null&&c.texts?c.texts:[]);dt.add(Xi.subscribe(c=>{var x,D;if(c.value===Oi.value)(x=l==null?void 0:l.onSubtitleOff)==null||x.call(l);else{let ce=Object.entries(Qc).find(([Qe,wt])=>wt===c.displayValue);(D=l==null?void 0:l.onSubtitleOn)==null||D.call(l,ce?ce[0]:"")}}));let un=de(!0),pn=yi([an,qi,ln,zi],([c,x,D,ce])=>{var Gt;let Qe=(Gt=c==null?void 0:c.end)!=null?Gt:0;if(!ce)return Qe/x;let Nt=-D+ce-x;return(Qe-Nt)/x}),ur=Jt(N.info.availableSources$),Go=yi([ur],([c])=>Object.keys((c==null?void 0:c[ud.MPEG])||{}).length>0),Ir=()=>{var D,ce,Qe;let c=Object.keys(((ce=(D=N.info.availableSources$)==null?void 0:D.getValue())==null?void 0:ce[ud.MPEG])||{}),x=E2(c)||O2.Q_144P;return(Qe=Re.sources[ud.MPEG])==null?void 0:Qe[x]},Ln=()=>{var x;let c=Ir();if(c)re.log("download video",{url:c}),Gg(c,((x=Re==null?void 0:Re.meta)==null?void 0:x.title)||"video");else{let D="There is no URL for download video";re.log("download video",{message:D}),K({message:D})}},Yn=()=>{K({message:"toggle muted"});let c=N.info.muted$.getValue();N.info.volume$.getValue()===0&&!c?ci(Xn()):No(!c)},pr=()=>{var c;if(At.ui.settingsMenu.visible$.set(!1),!Te(At.ui.settingsSubMenu.visible$)){let x=Te(At.ui.settingsMenu.ref$);if((c=l==null?void 0:l.uiInfo)!=null&&c.onSettingsMenu&&x){let ce=tl(x),Qe={top:0,left:0,bottom:0,right:0};l.uiInfo.onSettingsMenu({visible:!1,size:ce,position:Qe,name:"settings"})}}re.log("close settings menu")},kr=(c,x=()=>Promise.resolve())=>kt(void 0,null,function*(){var Qe;At.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),At.ui.settingsMenu.visible$.set(!0),yield x();let D=Te(At.ui.settingsMenu.ref$),ce=Ms();if((Qe=l==null?void 0:l.uiInfo)!=null&&Qe.onSettingsMenu&&D&&ce){let Nt=tl(D),Gt=el(D,ce);l.uiInfo.onSettingsMenu({visible:!0,size:Nt,position:Gt,name:"settings"})}re.log("open settings menu",{wasOpenedByKeyboard:c})}),Zn=(c,x=!1)=>{var wt;At.ui.settingsSubMenu.visible$.set(!1);let D=Te(At.ui.settingsMenu.ref$),ce=Ms(),Qe=Te(At.ui.settingsMenu.visible$);if((wt=l==null?void 0:l.uiInfo)!=null&&wt.onSettingsMenu&&D&&ce)if(Qe&&!x){let Gt=tl(D),Bt=el(D,ce);l.uiInfo.onSettingsMenu({visible:!0,size:Gt,position:Bt,name:"settings"})}else{let Gt=tl(c),Bt={top:0,left:0,bottom:0,right:0},cs=Te(At.ui.settingsSubMenu.name$);l.uiInfo.onSettingsMenu({visible:!1,size:Gt,position:Bt,name:cs})}re.log("close settings sub menu")},fn=(c,x)=>{var ce;At.ui.settingsSubMenu.visible$.set(!0),At.ui.settingsSubMenu.ref$.set(x),At.ui.settingsSubMenu.name$.set(c);let D=Ms();if((ce=l==null?void 0:l.uiInfo)!=null&&ce.onSettingsMenu&&x&&D){let wt=tl(x),Nt=el(x,D);l.uiInfo.onSettingsMenu({visible:!0,name:c,size:wt,position:Nt})}re.log("open settings sub menu",{name:c})},Xn=()=>{var x;let c=Math.max(ae.volumeMinRestore,(x=wc())!=null?x:0);return c===0?ae.volumeDefault:c},ci=c=>{let x=c===0?Xn():c,D=N.info.muted$.getValue();K({message:`set volume, volume: ${c}, preferredVolume: ${x}`}),D&&c>0&&!s&&(D=!1,Tp(!1)),N.setVolume(c,D),_e.setVolume(c),yp(x)},No=c=>{let x=N.info.volume$.getValue();if(K({message:`set muted, currentVolume: ${x}, mute: ${c}`}),N.setMuted(c),_e.setVolume(c?0:x),Tp(c),!c&&x===0){let D=Xn();N.setVolume(D),yp(D),_e.setVolume(D)}},Ci=de(!1),Jn=c=>{var x,D;re.log("set looped",{isLooped:c}),Ci.set(c),N.setLooped(c),(D=(x=l==null?void 0:l.uiInfo)==null?void 0:x.onLoopedChanged)==null||D.call(x,c)};Jn(Z);let mt=()=>{var c,x;(x=(c=l==null?void 0:l.uiInfo)==null?void 0:c.onReportProblem)==null||x.call(c)},Ht=(c,x=!1)=>{var D;K({message:`set autoplayNextEnabled, value: ${c}`}),re.log("set autoplay next enabled",{autoplayNextEnabled:c}),At.ui.autoplayNextEnabled$.set(c),dh(c),x&&((D=l==null?void 0:l.onSetAutoplayNextEnabled)==null||D.call(l,c))},Mi=c=>{K({message:`set timerNextVideoRunning, value: ${c}`}),re.log("set timer next video running",{timerNextVideoRunning:c}),At.ui.timerNextVideoRunning$.set(c)},Po=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onPrevVideoClick))try{x=(ce=l==null?void 0:l.onPrevVideoClick)==null?void 0:ce.call(l)}catch(Qe){K({message:"onPrevVideoClick callback failed to execute"})}if(!x)return;c&&Qt("prev")||J()},st=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onNextVideoClick))try{x=(ce=l==null?void 0:l.onNextVideoClick)==null?void 0:ce.call(l)}catch(Qe){K({message:"onNextVideoClick callback failed to execute"})}if(!x)return;c&&Qt("next")||ne()},Qt=c=>{let{isMobile:x,features:{playbackStatusNextVideoShow:D,playbackStatusShow:ce}}=ae;return D&&ce&&!x?(At.ui.aboutToGoNextVideo.set(c),At.ui.userActionsDisabled.set(!0),!0):!1},mi=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementShow)==null||c.call(l)},Ji=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementClick)==null||c.call(l)},eo=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementAuto)==null||c.call(l)},Li=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementCancel)==null||c.call(l)},xi=()=>{N.prepare()},to=()=>{qn(At);let c=Te(At.ui.controls.disabledControls$),x=Te(At.playerPhase),D={playerPhase:x,isInteractive:C,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(K({message:"toggle play"}),x==="ads"){D.action="play",re.log("toggle adman play",D),_e.togglePlay();return}let ce=()=>{var wt;K({message:"toggle play, call player.play"}),D.action="play",N.play(),(wt=l==null?void 0:l.onPlay)==null||wt.call(l)},Qe=()=>{var wt;K({message:"toggle play, call player.pause"}),D.action="pause",N.pause(),(wt=l==null?void 0:l.onPause)==null||wt.call(l)};if(N.info.isEnded$.getValue()){if(K({message:"toggle play, video ended, seek to 0"}),Ye.next(),Ze.next(rs.REWIND),C){P==null||P();return}N.seekTime(0),ce()}else N.info.playbackState$.getValue()!==cd.PLAYING?ce():Qe();re.log("toggle play",D)},wi=(c,{changeReason:x="default",appliesTo:D="to-video"}={})=>{K({message:`set quality, quality: ${c}`}),re.log("set quality",{quality:c}),N.setAutoQuality(c==="auto"),c!=="auto"?(ae.features.qualityDetailsSubMenuEnabled?(Sc({type:"exact_quality",quality:c,videoId:i},D),Hl(),N.setPredefinedQualityLimits(zr.UNKNOWN)):xp(i,c),Wo.set(c),N.setQuality(c)):ae.features.qualityDetailsSubMenuEnabled?x==="default"&&(er("auto_quality",D),Te(si)&&no(!1),Te(ut)&&Wi(!1)):Hl()},no=(c,x="as-default")=>{K({message:`set trafficSavingEnabled, value: ${c}`}),re.log("set traffic saving enabled",{trafficSavingEnabled:c});let D=c?zr.TRAFFIC_SAVING:zr.UNKNOWN;ae.features.qualityDetailsSubMenuEnabled?(mn(D,x),Ol(!1)):(N.setPredefinedQualityLimits(D),Ol(c))},Wi=(c,x="as-default")=>{K({message:`set highQualityEnabled, value: ${c}`}),re.log("set high quality enabled",{highQualityEnabled:c}),mn(c?zr.HIGH_QUALITY:zr.UNKNOWN,x)},mn=(c,x)=>{c!==zr.UNKNOWN&&(Te(mo)&&!Te(dn)&&wi("auto",{appliesTo:x,changeReason:"limit-changed"}),er(c,x)),N.setPredefinedQualityLimits(c)},er=(c,x)=>{Sc({type:c,videoId:i},x),x==="as-default"&&Sc({type:c,videoId:i},"to-video")},tr=c=>{re.log("set playback rate",{playbackRate:c}),N.setPlaybackRate(c),ae.features.saveRate&&le&&!N.info.isLive$.getValue()&&ah(c)},Er=()=>{let c=Te(Pn),x=c.findIndex(({selected:ce})=>ce);if(x===c.length-1)return;let D=c[x+1];tr(D.value)},Pr=()=>{let c=Te(Pn),x=c.findIndex(({selected:ce})=>ce);if(x===0)return;let D=c[x-1];tr(D.value)},Vn=(c=Dt(q({},Oi),{selected:!1}))=>{re.log("set subtitles",q({},c)),c&&c.value!==Oi.value&&nt.next(c.isAuto?c.value+"_auto":c.value),Xi.set(c)},Rn=()=>{re.log("toggle subtitles");let c=Te(Do),x=Te(Xi),D=Te(qt);if((x==null?void 0:x.value)===Oi.value){let ce=c.filter(Qe=>Qe.value!==Oi.value).find(Qe=>Qe.value===D)||c[1];Vn(ce)}else Vn()},Ao=(c,x,D=!0)=>{var ce;if(K({message:`seek to time, time: ${c}`}),re.log("seek to time",{time:c,action:x,forcePrecise:D}),Ze.next(x),N.info.isLive$.getValue()){let Qe=N.info.duration$.getValue(),wt=Math.min(0,Qe+c);N.seekTime(wt,D)}else{if(E!=null&&E.getValue())return;N.info.isEnded$.getValue()&&(K({message:"seek after ended, call callbacks.onPlay"}),(ce=l==null?void 0:l.onPlay)==null||ce.call(l)),N.seekTime(zm(c),D)}},Ar=c=>{K({message:`seek to episode start time: ${c}`}),re.log("seek to episode start time",{time:c}),Ao(c,rs.EPISODE,!0)},Bo=(c,x)=>{K({message:`seek to percent, percent: ${c}`}),re.log("seek to percent",{percent:c,action:x});let D=Te(qi)*c;Ao(D,x,!1)},fr=c=>{K({message:`seek external, time: ${c}`}),re.log("seek external",{time:c}),Ze.next(rs.UNKNOWN),N.seekTime(N.info.isLive$.getValue()?-c:c)},Mr=c=>{var ce,Qe;let x=(ce=c.max)!=null?ce:"none",D=(Qe=c.min)!=null?Qe:"none";K({message:`set auto quality limitation. Max: ${x}. Min: ${D}`}),re.log("set auto quality limits",{max:x,min:D}),N.setAutoQualityLimits(c)},Lr=c=>{K({message:`seek external to episode start time: ${c}`}),re.log("seek external to episode start time",{time:c}),Ao(c,rs.EPISODE,!0)},mr=c=>{K({message:`set playback rate to: ${c}`}),re.log("set playback rate external",{playbackRate:c}),N.setPlaybackRate(c)},io=de(void 0),vn=de(!1),qr=c=>{K({message:`start scrubbing, progress: ${c}`}),re.log("start scrubbing",{progress:c}),vn.set(!0),vr(c)},vr=c=>{io.set(c)},at,Ft,Vi=()=>{io.set(void 0),vn.set(!1)},xe=()=>{clearTimeout(Ft),clearTimeout(at),at=window.setTimeout(()=>{Vi()},500),Ne==null||Ne.removeEventListener("seeked",xe)},Pt=c=>{K({message:`complete scrubbing, progress: ${c}`}),re.log("complete scrubbing",{progress:c}),Bo(c,rs.SLIDER),Te(At.ui.isMobile)&&Te(At.state.currentFormat$)===ud.HLS?(Ne==null||Ne.addEventListener("seeked",xe),Ft=window.setTimeout(()=>{xe()},300)):Vi()},vi=yi([Rt,qi,io],([c,x,D],ce)=>{ce(M2(D)?D*x:c)}),hi=de(!1),Mo=()=>{hi.set(!0)},ui=()=>{hi.set(!1)},Ee=de({width:0,height:0}),It=yi([Ee],([{width:c}],x)=>{let D=Fh(c);x(D)}),ei=de(!1),Ti=H.filter(c=>jg(c)),ni=yi([It,ei],([c,x])=>x?Ti.filter(D=>!D.hideOnMobile):Ti.filter(D=>{var ce;return!((ce=D.hideOnDesktopGridTypes)!=null&&ce.includes(c))})),jo=de(H.filter(c=>Yg(c))),gn=yi([jo,It],([c,x])=>c.filter(D=>{var ce;return!((ce=D.hideOnDesktopGridTypes)!=null&&ce.includes(x))})),Vr=yi([gn,ni],([c,x])=>[...ae.features.additionalButtonsDesktopControlPanelRight?c.filter(D=>D.type==="desktop-control-panel-right"):[],...ae.features.additionalButtons?x.map((D,ce)=>{var Qe;return{id:ce,weight:ce,type:"desktop-control-panel-right",testId:D.testId,icon:D.iconUrl,onClick:D.onClick,ariaLabel:(Qe=D.ariaLabel)!=null?Qe:D.tooltip,tooltipText:D.tooltip}}):[]]),Dn=de(Y),Wr=yi([Dn],([c])=>ae.features.additionalSettingsMenuItems?c.map(x=>x.type==="SWITCH"?Dt(q({},x),{onClick:x.onChangeEnabled}):x):[]),ba=(c,x)=>{let D=Te(jo).map(ce=>ce.id!==c?ce:q(q({},ce),x));jo.set(D)},Es=c=>{let x=Te(jo);if(x.some(D=>D.id===c.id)){K({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),jo.set(x)},ll=c=>{let x=Te(jo);if(!x.some(D=>D.id===c)){K({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}x=x.filter(D=>D.id!==c),jo.set(x)},$a=c=>{Ze.next(rs.LIVE),K({message:"live switch to low latency "+c}),re.log("live switch to low latency "+c),N.setLiveLowLatency(c)},dl=(c,x)=>{let D=Te(Dn).map(ce=>ce.id!==c?ce:q(q({},ce),x));Dn.set(D)},Ps=c=>{let x=Te(Dn);if(x.some(D=>D.id===c.id)){K({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),Dn.set(x)},cl=c=>{let x=Te(Dn);if(!x.some(D=>D.id===c)){K({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(D=>D.id!==c),Dn.set(x)},ir=de(O),ya=yi([ir],([c])=>ae.features.additionalContextMenuItems?c:[]),As=(c,x)=>{let D=Te(ir).map(ce=>ce.id!==c?ce:q(q({},ce),x));ir.set(D)},_t=c=>{let x=Te(ir);if(x.some(D=>D.id===c.id)){K({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),ir.set(x)},ht=c=>{let x=Te(ir);if(!x.some(D=>D.id===c)){K({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(D=>D.id!==c),ir.set(x)},ro=yi([ei,Et],([c,x],D)=>{D(c&&x)}),Oo=()=>{Ze.next(rs.LIVE),K({message:"switch to active live"}),re.log("switch to active live"),N.seekTime(0),N.info.playbackState$.getValue()!==cd.PLAYING&&At.actions.internal.togglePlay()},so=()=>{re.log("skip adman"),_e.skip()},ai=(c=!0)=>{qn(At),K({message:`switch from ads to video, callPlay: ${c}`}),re.log("switch from ads to video",{callPlay:c}),j.set("video"),c&&N.play()},Hi=()=>{qn(At),K({message:"switch from video to ads"}),re.log("switch from video to ads"),At.actions.internal.pause(),qe(),j.set("ads")},ds=c=>{qn(At);let x=c?"LiveWaitingStart":"thumb";re.log("set live waiting start",{state:c,playerPhase:x}),j.set(x)},ul=c=>{qn(At);let x=c?"LiveWaitingRecover":"thumb";re.log("set live waiting recover",{state:c,playerPhase:x}),j.set(x)},Hd=c=>{qn(At);let x=c?"LiveWaitingRecord":"thumb";re.log("set live waiting record",{state:c,playerPhase:x}),j.set(x)},_u=()=>(qn(At),re.log("get debug text data"),Kg(N,Re,At)),Fd=()=>(qn(At),JSON.stringify(Le.getFinishedSpans())),bu=()=>(qn(At),Qg(N,Re,At)),Ms=()=>Ne,Ud=()=>{K({message:"toggle chromecast"}),re.log("toggle chromecast"),N.toggleChromecast()},pl=c=>{var D;if(qn(At),N.info.isEnded$.getValue())return;let x=!c;if(Te(At.playerPhase)==="ads"){K({message:`pause ads, internalCall: ${x}`}),re.log("pause ads",{internalCall:x}),_e.pause();return}K({message:`pause video, internalCall: ${x}`}),re.log("pause video",{internalCall:x}),x&&((D=l==null?void 0:l.onPause)==null||D.call(l)),N.pause()},zd=c=>{var D;qn(At);let x=!c;if(Te(At.playerPhase)==="ads"){K({message:`play ads, internalCall: ${x}`}),re.log("play ads",{internalCall:x}),_e.play();return}K({message:`play video, internalCall: ${x}`}),re.log("play video",{internalCall:x}),x&&((D=l==null?void 0:l.onPlay)==null||D.call(l)),N.play()},qd=c=>{qn(At);let x=!c;if(Te(At.playerPhase)==="ads"){K({message:"player cannot be stopped during ads via external method"});return}K({message:`player will be stopped, internalCall: ${x}`}),A==null||A()},Wd=(c,x)=>{qn(At),K({message:`first start, show ads: ${c}, internalCall: ${!x}`}),re.log("first start",{showAds:c,external:x}),c?j.set("ads"):(j.set("video"),x?N.play():At.actions.internal.togglePlay())},xa=()=>(K({message:"getting time codes"}),v),Kd=()=>{let c=xa();if(!c||[0,1].includes(c.length))return;let x=N.info.position$.getValue();return c.find(D=>D.time>x)},$u=c=>{let x=c;x||(x=Kd());let D=N.info.position$.getValue();re.log("seek to next episode",q({currentTime:D},x)),x&&(K({message:"seek to next episode"}),Ao(x.time,rs.EPISODE,!0))},Qd=()=>{let c=xa();if(!c||[0,1].includes(c.length))return;let x=N.info.position$.getValue(),D=c.findIndex(Qe=>Qe.time>x),ce=D===-1?c.length-2:D-2;if(!(ce<0))return c[ce]},Ke=c=>{let x=c;x||(x=Qd());let D=N.info.position$.getValue();re.log("seek to prev episode",q({currentTime:D},x)),x&&(K({message:"seek to prev episode"}),Ao(x.time,rs.EPISODE,!0))},li=()=>(K({message:"getting preview thumbs data"}),re.log("get preview thumbs data",q({},$)),$),Yo=()=>kt(void 0,null,function*(){let c=ie==null?void 0:ie.isActive(),x="none";ie!=null&&ie.isActive()?(x="remove",yield ie==null?void 0:ie.remove()):(x="request",yield ie==null?void 0:ie.request()),re.log("toggle picture in picture",{isActive:c,action:x})}),Ls=(c=-90)=>{re.log("rotate video",{alphaDiff:c}),ft.update(x=>x+c)},ho=de([]);T==null||T.subscribe(c=>{let x=[];for(let D=0;D<c.length;D++){let{range:[ce,Qe],subjects:wt}=c[D];D===0&&ce!==0&&x.push({time:0,text:"",interactive:!1,completed:!0}),x.push({time:ce/1e3,text:"",interactive:!0,completed:ae.features.interactiveTimeOpenUri?!wt.length||wt.every(Nt=>Nt.isRemoved):!wt.length}),Qe!==1/0&&x.push({time:Qe/1e3,text:"",interactive:!1,completed:!0})}ho.set(x)});let B1=de(!1);E==null||E.subscribe(c=>{c&&Te(vn)&&Vi()});let zm=c=>{if(!C)return c;let x=Te(ho),D=Te(qi),Qe=Te(ln)/D,wt=x.find(Nt=>Nt.interactive&&!Nt.completed&&Nt.time>Qe);return typeof(wt==null?void 0:wt.time)=="number"?Math.min(c,wt.time-.05):c},O1=()=>{At.ui.episodes.panelOpened$.set(!1)},H1=()=>{re.log("destroy store"),clearTimeout(Ft),clearTimeout(at),dt.unsubscribe(),Xt.unsubscribe(),N.destroy(),_e.destroy(),me==null||me.destroy(),Ge==null||Ge.destroy(),gt.unsubscribe(),He==null||He.disconnect(),He=null,we.destroy()},At={interfaceLanguage$:qt,isCyrillicRelatedInterface$:Wt,initVideo:Ue,videoId:i,isClip:o,playerPhase:Ce,vsid:Se,state:{positionExact$:Rt,positionWithScrubbing$:vi,duration$:qi,playbackState$:So,isPlaying$:Cn,isLoaderVisible:zo,bufferedProgress$:pn,isLive$:ii,canChangePlaybackSpeed$:pi,isActiveLive$:Tn,isOldestAvailableLive$:Bi,isRewindableLive$:Io,isEnded$:X,muted$:fi,volume$:ri,trafficSavingEnabled$:si,highQualityEnabled$:ut,autoQualityLimitingAvailable$:mo,availableVideoStreams$:Tr,availableAudioStreams$:lr,videoStream$:In,audioStream$:Kn,currentQuality$:dr,isAutoQualityEnabled$:dn,availableQualities$:Gn,currentPlaybackRate$:cn,availablePlaybackRates$:Pn,currentSubtitle$:Xi,availableTextTracks$:An,availableSubtitlesList$:Do,currentSubtitleCaptions$:cr,isAutoSubtitleCaptionVisible$:un,chromecastState$:oi,chromecastDeviceName$:vo,chromecastConnected$:ko,currentFormat$:Sn,throughputEstimation$:Zi,videoBitrate$:Co,videoSize$:di,errorLog$:Je,crashed$:Et,isAudioAvailable$:To,isAudioDisabled:!!s,canDownload:ae.features.download&&!!d,availableSources$:ur,hasMpegSources$:Go,isInteractive:C,showInteractiveGraph:ae.features.interactiveGraph,showSeekToInteractive:ae.features.seekToInteractive,showPlayPrevChapter:ae.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ae.features.interactiveTimeIndicator&&!!Te(ho).length,interactiveEpisodes$:ho,isInteractiveTime$:E?Jt(E):de(!1),isInteractiveExpectation$:B1,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:V,looped$:Ci,loadedMetadata$:de(!1),isAutoQualityAvailable$:Ko},ui:{t:ve,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:H.length?H.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:se},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:De,isFullscreenOpenedByKeyboard:Xe,rotateAlpha:ft,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:Ee,isMobile:ei,mobileNotReportControlHidden$:ro,mobileUnmuteButtonExpanded:de(!1),mobileUnmuteButtonVisible:de(!1),icon3DVideoVisible:de(!1),scrubbingInProgress:vn,volumeChangingInProgress:hi,is3DVideo:de(!1),currentGridType$:It,additionalButtonsDeprecated$:ni,additionalDesktopControlPanelRightButtons$:Vr,additionalSettingsMenuItems$:Wr,additionalContextMenuItems$:ya,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)},aboutToGoNextVideo:de(void 0),userActionsDisabled:de(!1)},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:G},actions:{internal:{preload:xi,firstStart:c=>Wd(c,!1),play:()=>zd(!1),pause:()=>pl(!1),togglePlay:to,toggleMuted:Yn,openSettingsMenu:kr,closeSettingsMenu:pr,openSettingsSubMenu:fn,closeSettingsSubMenu:Zn,setVolume:ci,startVolumeChanging:Mo,stopVolumeChanging:ui,setVideoStream:Qn,setAudioStream:go,setQuality:wi,setTrafficSavingEnabled:no,setHighQualityEnabled:Wi,setPlaybackRate:tr,incrementPlaybackRate:Er,decrementPlaybackRate:Pr,setSubtitle:Vn,toggleSubtitle:Rn,togglePictureInPicture:Yo,startScrubbing:qr,progressScrubbing:vr,completeScrubbing:Pt,toggleChromecast:Ud,switchToActiveLive:Oo,switchFromAdsToVideo:ai,switchFromVideoToAds:Hi,skipAd:so,setLiveWaitingStart:ds,setLiveWaitingRecover:ul,setLiveWaitingRecord:Hd,getDebugTextData:_u,getTraceTextData:Fd,getDebugPanelData:bu,getVideoElement:Ms,seekTime:(c,x,D)=>Ao(c,x,D),clearDelayedBufferingCheckTimeout:oo,seekEpisodeStartTime:Ar,seekToPercent:Bo,getNextEpisode:Kd,seekToNextEpisode:$u,getPrevEpisode:Qd,seekToPrevEpisode:Ke,startLogging:Ni,stopLogging:Pi,startCameraManualRotation:Ui,stopCameraManualRotation:ji,moveCameraFocusPX:Yi,holdCamera:Lt,releaseCamera:yt,getVideoEpisodes:xa,getPreviewThumbsData:li,downloadVideo:Ln,addLanguage:Ep,setLanguage:jt,nextMovie:ct,videoRotate:Ls,correctSeekTimeToInteractive:zm,replayInteractive:P,setLooped:Jn,reportProblem:mt,setAutoplayNextEnabled:Ht,setTimerNextVideoRunning:Mi,prevVideoClick:Po,nextVideoClick:st,nextVideoAnnouncementShow:mi,nextVideoAnnouncementClick:Ji,nextVideoAnnouncementAuto:eo,nextVideoAnnouncementCancel:Li},external:{firstStart:c=>Wd(c,!0),play:()=>zd(!0),pause:()=>pl(!0),stop:()=>qd(!0),seekTime:c=>fr(c),seekEpisodeStartTime:c=>Lr(c),setPlaybackRate:c=>mr(c),setAutoQualityLimits:c=>Mr(c),setMuted:No,toggleSubtitle:Rn,setVolume:ci,returnFocusToEpisodes:O1,updateAdditionalSettingsItem:dl,addAdditionalSettingsItem:Ps,removeAdditionalSettingsItem:cl,updateAdditionalContextItem:As,addAdditionalContextItem:_t,removeAdditionalContextItem:ht,updateAdditionalButton:ba,addAdditionalButton:Es,removeAdditionalButton:ll,setLiveLowLatency:$a}},callbacks:l,setUiCallbacks:c=>{et=q({},c)},getAdmanWrapper:()=>_e,getLogger:()=>pe,getPlayer:()=>N,destroy:H1};return At};function ca(t,e,i,o){var $;let n=["interactiveTimeIndicator"],a=($=e[i])==null?void 0:$.getBoundingClientRect(),s=(o||n.includes(i))&&!!a&&!!(a.right-a.left),{top:d,left:l,bottom:u,right:v}=el(e[i],t||void 0);return{left:s?l:0,right:s?v:0,top:s?d:0,bottom:s?u:0,isDisplayed:s}}var il=(t,e,i,o)=>{if(t)for(let[n,a]of Object.entries(e))["tooltipPointerOffsetX","disabledControls$","additionalButtons"].includes(n)||a.set(ca(t,i,n,o))};var Xc=(t,e,i)=>kt(void 0,null,function*(){yield $o(),e&&i&&(i.focus(),t.set(!1))});var U2=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"></path></svg>');function Tf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=U2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"dots-icon",role:"img"},i))),b(t,o)}function If(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(l,"$contextMenuVisible$",i),a=f(e,"disabled",3,!1),s=f(e,"ariaLabel",3,""),d=Ie(),l=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,v=d.ui.contextMenu.showContextMenuBtn$,$=d.ui.contextMenu.position$,p=d.ui.contextMenu.btnRef$,_=ee(void 0);We(()=>{r(_)&&bt(()=>{p.set(r(_))})});let w=E=>{let P=xs(E),A=Lh(r(_));$.set(A),u.set(P),l.set(!n())},y=()=>{v.set(!0)},C=()=>{v.set(!1)},T=m(()=>n()?"opened":"");Vt(t,{get className(){return r(T)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return s()},click:w,focus:y,blur:C,get ariaExpanded(){return n()},get ref(){return r(_)},set ref(E){B(_,fe(E))},children:(E,P)=>{Tf(E,{})},$$slots:{default:!0}}),z(),o()}var z2=t=>{t.stopPropagation()},q2=L("<div><!> <div></div> <div></div></div>"),W2={hash:"svelte-od3veb",code:`.interactive-episode-icon-animated.svelte-od3veb {position:absolute;top:16px;right:16px;width:32px;height:32px;transition:0.3s;opacity:1;}.interactive-episode-icon-animated.icon-small.svelte-od3veb {width:28px;height:28px;}.invisible.svelte-od3veb {opacity:0;visibility:hidden;}.fullscreen.svelte-od3veb:not(.mobile) {width:40px;top:19px;right:23px;height:40px;}.mobile.svelte-od3veb {width:28px;height:28px;top:12px;right:14px;}.fullscreen.mobile.svelte-od3veb {width:32px;height:32px;}
230
+ `)),b(G,K)};R(Le,G=>{r(E)&&G(re)})}var N=M(Le,2),pe=h(N);{var _e=G=>{var K=ze(),Re=ue(K);{var Ne=we=>{var Se=Br();k(De=>ge(Se,De),[()=>F("tooltip_episode_unfinished")]),b(we,Se)},et=we=>{var Se=Br();k(()=>ge(Se,r(H).text||"")),b(we,Se)};R(Re,we=>{p()&&r(H).completed===!1?we(Ne):we(et,!1)})}b(G,K)};R(pe,G=>{r(H)&&G(_e)})}g(N);var Ge=M(N,2);{var ie=G=>{var K=t2(),Re=h(K,!0);g(K),k(()=>ge(Re,d())),b(G,K)};R(Ge,G=>{p()||G(ie)})}g(be),k(G=>{ae=te(be,1,"timeline-preview svelte-1wqg760",null,ae,G),it(be,`width: ${r(Y)?r(T):r(C)}px;`)},[()=>({mobile:l()})]),b(t,be),z(),o()}var n2=L('<span class="time svelte-1jr6obn"> </span>'),r2=L("<!> <!>",1),s2={hash:"svelte-1jr6obn",code:".time.svelte-1jr6obn {display:inline-block;padding:6px 10px;border-radius:3px;color:var(--white);background-color:rgba(41, 41, 41, .8);}.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 hf(t,e){var tt,ct,Ye,Ze,nt;U(e,!0),W(t,s2);let[i,o]=Be(),n=()=>S(ne,"$interactiveEpisodes$",i),a=()=>S(I,"$duration$",i),s=()=>S(A,"$position$",i),d=()=>S(le,"$isInteractiveExpectation$",i),l=()=>S(me,"$isInteractiveTime$",i),u=()=>S(V,"$isLive$",i),v=()=>S(Y,"$isMobile",i),$=()=>S(H,"$isActiveLive$",i),p=()=>S(P,"$bufferedProgress$",i),_=()=>S(be,"$disabledControls$",i),w=f(e,"showTimeline",3,!1),y=f(e,"withEpisodes",3,!0),C=f(e,"ref",15,void 0),T=Ie(),E=zt(),P=T.state.bufferedProgress$,A=T.state.positionWithScrubbing$,I=T.state.duration$,V=T.state.isLive$,H=T.state.isActiveLive$,Y=T.ui.isMobile,O=E.features.episodes&&y()?T.actions.internal.getVideoEpisodes():void 0,J=T.actions.internal.getPreviewThumbsData(),ne=T.state.interactiveEpisodes$,Z=T.state.isInteractive,me=T.state.isInteractiveTime$,le=T.state.isInteractiveExpectation$,Ve=T.actions.internal.correctSeekTimeToInteractive,Me=(tt=T.callbacks)==null?void 0:tt.onDisabledTimelineClick,be=T.ui.controls.disabledControls$,ae=(Ye=(ct=T.callbacks)==null?void 0:ct.uiInfo)==null?void 0:Ye.onTimelineMouseEnter,Le=(nt=(Ze=T.callbacks)==null?void 0:Ze.uiInfo)==null?void 0:nt.onTimelineMouseLeave,re=T.ui.t,N=E.features.interactiveResponsiveUi,pe=m(()=>Z?n():O),_e=m(()=>sn(a())),Ge=m(()=>sn(s())),ie=m(()=>s()/a()),G=m(()=>d()||l()),K=ee(!1),Re=ee(""),Ne=ee(0),et=ee(0),we=ee(0),Se=m(()=>({containerWidth:r(et),translateXPx:r(Ne),translateYPx:Z&&J?-36:-16,active:r(K)&&w()&&!r(G)&&!N,pointer:!E.features.timelinePreview||!J||u()})),De=re("aria_timeline"),Xe=m(()=>re("aria_timeline_value",{position:r(Ge),duration:r(_e)}));function ot(Fe){return!Ve||!Z?Fe:Ve(Fe*a())/a()}function ft(Fe){T.actions.internal.startScrubbing(ot(Fe))}function Je(Fe){l()||T.actions.internal.progressScrubbing(ot(Fe))}function gt(Fe){T.actions.internal.completeScrubbing(ot(Fe)),B(K,!1)}function Et(Fe,$t,qe){Wt(Fe,$t,qe),B(K,!0)}function jt(Fe,$t,qe){Wt(Fe,$t,qe),B(K,!0)}function qt(){B(K,!1)}function Wt(Fe,$t,qe){B(we,fe(ot(Fe))),B(Ne,fe($t)),qe&&B(et,fe(qe)),B(Re,fe(ve(Fe)))}function ve(Fe){let $t=sn((u()?1-Fe:Fe)*a());return u()?`-${$t}`:$t}var j=r2(),Ce=ue(j);vf(Ce,is(()=>r(Se),{get leftOffset(){return e.tooltipLeftOffset},get rightOffset(){return e.tooltipRightOffset},children:(Fe,$t)=>{var qe=ze(),dt=ue(qe);{var Xt=Pi=>{gf(Pi,{get time(){return r(Re)},get isMobile(){return v()},get videoEpisodes(){return r(pe)},previewThumbsData:J,get progress(){return r(we)},get duration(){return a()},isInteractive:Z})},Ni=Pi=>{var Ui=n2(),ji=h(Ui,!0);g(Ui),k(()=>ge(ji,r(Re))),b(Pi,Ui)};R(dt,Pi=>{E.features.timelinePreview&&J&&!u()?Pi(Xt):Pi(Ni,!1)})}b(Fe,qe)},$$slots:{default:!0}}));var se=M(Ce,2);let He=m(()=>Math.round(r(ie)*100)),Ue=m(()=>_().has("TIMELINE"));aa(se,{className:"timeline-slider",get isActiveLive(){return $()},get isMobile(){return v()},ariaLabel:De,ariaValueMin:0,get ariaValueMax(){return a()},get ariaValueNow(){return r(He)},get ariaValueText(){return r(Xe)},get loadedProgress(){return p()},get filledProgress(){return r(ie)},get handleProgress(){return r(ie)},get videoEpisodes(){return r(pe)},onPointerDown:ft,onHandleMove:Je,onPointerMove:jt,onPointerUp:gt,onPointerEnter:Et,onPointerLeave:qt,onMouseEnter:ae,onMouseLeave:Le,onDisabledClick:Me,isInteractive:Z,get disabled(){return r(Ue)},get hideHandel(){return l()},testId:"slider",get ref(){return C()},set ref(Fe){C(Fe)}}),b(t,j),z(),o()}var a2={hash:"svelte-1yate8h",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 ld(t,e){U(e,!0),W(t,a2);let[i,o]=Be(),n=()=>S(l,"$isMobile",i),a=f(e,"position",3,0),s=f(e,"duration",3,0),d=Ie(),l=d.ui.isMobile,u=d.ui.t,v=m(()=>sn(s())),$=m(()=>sn(a())),p=m(()=>a()/s()),_=m(()=>u("aria_timeline_value",{position:r($),duration:r(v)})),w=m(()=>Math.round(r(p)*100));aa(t,{className:"timeline-ads-slider",ariaValueMin:0,get ariaValueMax(){return s()},get ariaValueNow(){return r(w)},get ariaValueText(){return r(_)},get filledProgress(){return r(p)},hideHandel:!0,get squareBorders(){return n()}}),z(),o()}var l2=L("<div><!></div>"),d2=L("<div></div>"),c2={hash:"svelte-1h5wsmk",code:".timeline.svelte-1h5wsmk {position:relative;pointer-events:all;display:flex;align-items:center;bottom:0;width:100%;min-width:86px;padding:3px 10px 4px;box-sizing:border-box;}.timeline.mobile.svelte-1h5wsmk {height:16px;padding:6px 12px 7px;margin-top:6px;}.withoutPadding.svelte-1h5wsmk {padding:0;}.timeline-stub.svelte-1h5wsmk {width:100%;min-width:20px;}.timeline-stub.mobile.svelte-1h5wsmk {height:8px;}"};function la(t,e){U(e,!0),W(t,c2);let[i,o]=Be(),n=()=>S(_,"$isLive$",i),a=()=>S(C,"$isMobile",i),s=()=>S(y,"$adPosition",i),d=()=>S(w,"$adDuration",i),l=f(e,"isAds",3,!1),u=f(e,"isHidden",3,!1),v=f(e,"needPadding",3,!0),$=f(e,"ref",15,void 0),p=Ie(),_=p.state.isLive$,w=p.ads.duration,y=p.ads.position,C=p.ui.isMobile,T=m(()=>!u()&&(!n()||n()&&e.canRewindLive&&e.isRewindableLive||l()));var E=ze(),P=ue(E);{var A=V=>{var H=l2();let Y;var O=h(H);{var J=Z=>{ld(Z,{get position(){return s()},get duration(){return d()}})},ne=Z=>{hf(Z,{get tooltipLeftOffset(){return e.tooltipLeftOffset},get tooltipRightOffset(){return e.tooltipRightOffset},get showTimeline(){return r(T)},get withEpisodes(){return e.withEpisodes},get ref(){return $()},set ref(me){$(me)}})};R(O,Z=>{l()?Z(J):Z(ne,!1)})}g(H),k(Z=>Y=te(H,1,"timeline svelte-1h5wsmk",null,Y,Z),[()=>({withoutPadding:!v(),mobile:a()})]),b(V,H)},I=V=>{var H=d2();let Y;k(O=>Y=te(H,1,"timeline-stub svelte-1h5wsmk",null,Y,O),[()=>({mobile:a()})]),b(V,H)};R(P,V=>{r(T)?V(A):V(I,!1)})}b(t,E),z(),o()}import{noop as f2}from"@vkontakte/videoplayer-shared/es2015";var u2=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="m21.616 16.495-.012.07c-.156.852-.282 1.541-.427 2.093-.148.569-.333 1.063-.64 1.5a4.4 4.4 0 0 1-2.507 1.732c-.52.133-1.046.131-1.63.069-.568-.06-1.257-.187-2.11-.343l-4.34-.794c-.853-.156-1.542-.282-2.094-.426-.568-.149-1.062-.334-1.5-.642a4.4 4.4 0 0 1-1.731-2.507c-.133-.518-.131-1.045-.069-1.63.06-.567.187-1.257.343-2.11l.012-.068c.156-.853.282-1.542.427-2.095.148-.568.333-1.062.641-1.5a4.4 4.4 0 0 1 2.507-1.731c.518-.133 1.045-.131 1.63-.069.567.06 1.256.187 2.109.343l4.34.794c.853.156 1.542.282 2.094.426.568.149 1.062.334 1.5.642a4.4 4.4 0 0 1 1.731 2.506c.133.52.131 1.046.069 1.63-.06.568-.187 1.258-.343 2.11m-1.446-2.3c.052-.483.035-.769-.022-.993a2.6 2.6 0 0 0-1.023-1.481c-.19-.133-.45-.25-.921-.373-.48-.125-1.102-.24-1.997-.404l-4.272-.781c-.895-.164-1.518-.277-2.01-.33-.483-.051-.769-.035-.993.023-.6.153-1.125.516-1.481 1.023-.133.19-.25.45-.373.92-.125.48-.24 1.103-.403 1.998s-.277 1.518-.33 2.01c-.051.484-.035.77.023.994.153.6.516 1.125 1.023 1.481.189.133.45.25.92.373.48.125 1.102.24 1.997.404l4.272.781c.895.164 1.518.277 2.01.33.483.051.77.035.993-.023a2.6 2.6 0 0 0 1.481-1.023c.133-.19.25-.45.373-.92.125-.48.24-1.103.403-1.998s.278-1.518.33-2.01Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M18.187 7.488a.9.9 0 0 1-1.045-.727c-.145-.807-.199-1.086-.28-1.296A2.6 2.6 0 0 0 14.504 3.8c-.224-.006-.505.036-1.315.169l-5.846.962c-1.366.224-1.834.313-2.174.492A2.6 2.6 0 0 0 3.837 7.18c-.08.376-.039.85.114 2.226l.011.1a.9.9 0 1 1-1.787.198l-.01-.093-.019-.17c-.129-1.147-.217-1.937-.068-2.636A4.4 4.4 0 0 1 4.332 3.83c.633-.333 1.417-.461 2.556-.648l.163-.027 5.846-.961.098-.016c.674-.111 1.138-.188 1.556-.177a4.4 4.4 0 0 1 3.99 2.819c.15.39.234.853.355 1.526l.017.097a.9.9 0 0 1-.726 1.045" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M12.724 12.414a.415.415 0 0 0-.69.231l-.72 4.18a.4.4 0 0 0 .025.221c.085.21.327.311.539.226l3.669-1.467a.406.406 0 0 0 .127-.68z"></path></svg>');function _f(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=u2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(3),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"episodes-icon",style:"flex-shrink:0",role:"img"},i))),b(t,o)}var p2=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4.146 3.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L6.793 6.5 4.146 3.854a.5.5 0 0 1 0-.708" clip-rule="evenodd" opacity=".7"></path></svg>');function bf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=p2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"12",height:"13",fill:"none","aria-hidden":"true","data-testid":"chevron-light-icon",role:"img"},i))),b(t,o)}var m2=L('<span class="text mobile svelte-1yhs2ga"> </span> <div class="chevron-episodes svelte-1yhs2ga"><!></div>',1),v2=L('<span class="text svelte-1yhs2ga"> </span>'),g2=L('<span class="text count svelte-1yhs2ga"> </span>'),h2=L("<!> <!>",1),_2={hash:"svelte-1yhs2ga",code:".text.svelte-1yhs2ga {padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.text.count.svelte-1yhs2ga {overflow:visible;}.text.mobile.svelte-1yhs2ga {padding:0 3px 0 4px;}.chevron-episodes.svelte-1yhs2ga {margin-bottom:-4px;}"};function dd(t,e){var le,Ve,Me;U(e,!0),W(t,_2);let[i,o]=Be(),n=()=>S(w,"$currentGridType$",i),a=()=>S(y,"$openedByKeyboard$",i),s=()=>S(C,"$panelOpened$",i),d=()=>S(T,"$isMobile",i),l=f(e,"position",3,0),u=f(e,"duration",3,0),v=f(e,"timeCodes",19,()=>[]),$=Ie(),p=(Ve=(le=$.callbacks)==null?void 0:le.onEpisodeChanged)!=null?Ve:f2,_=!!((Me=$.callbacks)!=null&&Me.onEpisodeClicked),w=$.ui.currentGridType$,y=$.ui.episodes.openedByKeyboard$,C=$.ui.episodes.panelOpened$,T=$.ui.isMobile,E=$.ui.t,P=ee(void 0),A=be=>{var Le,re,N;if(!!((Le=$.callbacks)!=null&&Le.onEpisodeClicked)){let pe=xs(be);y.set(pe),C.set(!0),(N=(re=$.callbacks)==null?void 0:re.onEpisodeClicked)==null||N.call(re,pe)}},I=ee(null),V=m(()=>l()/u());We(()=>{var ae;let be=zc(r(V),u(),v());be?((ae=r(I))==null?void 0:ae.time)!==be.time&&(p(be),B(I,fe(be))):B(I,null)});let H=m(()=>{var be;return((be=r(I))==null?void 0:be.text)||""}),Y=m(()=>Gi(n(),"xl")?"FULL":Gi(n(),"m")&&Hh(n(),"xl")?"COUNT":"SHORT"),O=m(()=>`${E("tooltip_episodes")}: ${r(H)}`),J=(be,ae,Le)=>kt(this,null,function*(){yield $o(),(be==null?void 0:be.getAttribute("aria-expanded"))==="false"&&ae&&!Le&&bt(()=>{y.set(!1),be.focus()})});We(()=>{J(r(P),a(),s())});var ne=ze(),Z=ue(ne);{var me=be=>{let ae=m(()=>d()?"px-0":"");Vt(be,{get className(){var Le;return`w-max btn-full-opacity btn-jc-l ${(Le=r(ae))!=null?Le:""}`},testId:"btn-episodes",click:A,disabled:!_,get ariaExpanded(){return s()},get ariaLabel(){return r(O)},get ref(){return r(P)},set ref(Le){B(P,fe(Le))},children:(Le,re)=>{var N=ze(),pe=ue(N);{var _e=ie=>{var G=m2(),K=ue(G),Re=h(K,!0);g(K);var Ne=M(K,2),et=h(Ne);bf(et,{}),g(Ne),k(()=>ge(Re,r(H))),b(ie,G)},Ge=ie=>{var G=h2(),K=ue(G);_f(K,{});var Re=M(K,2);{var Ne=we=>{var Se=v2(),De=h(Se,!0);g(Se),k(()=>ge(De,r(H))),b(we,Se)},et=(we,Se)=>{{var De=Xe=>{var ot=g2(),ft=h(ot,!0);g(ot),k(()=>ge(ft,v().length)),b(Xe,ot)};R(we,Xe=>{r(Y)==="COUNT"&&Xe(De)},Se)}};R(Re,we=>{r(Y)==="FULL"?we(Ne):we(et,!1)})}b(ie,G)};R(pe,ie=>{d()?ie(_e):ie(Ge,!1)})}b(Le,N)},$$slots:{default:!0}})};R(Z,be=>{r(I)&&be(me)})}b(t,ne),z(),o()}import{debounceFn as _y}from"@vkontakte/videoplayer-shared/es2015";import{ChromecastState as T2,PlaybackState as cd,Player as I2,PredefinedQualityLimits as zr,VideoFormat as ud,clientChecker as k2}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as qn,getHighestQuality as E2,InterfaceLanguage as P2,isInvariantQuality as A2,isNonNullable as M2,loadVKLangPack as L2,Logger as V2,map as Zh,merge as R2,Observable as D2,Subject as Zc,Subscription as Cf,Tracer as N2,ValueSubject as B2,VideoQuality as O2,devNull as H2,now as F2}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as rs}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as b2,devNull as Yt,now as Zt}from"@vkontakte/videoplayer-shared/es2015";import{addScript as $2,Subject as Fo,clearVideoElement as y2}from"@vkontakte/videoplayer-shared/es2015";var Wh=(t,e)=>t<400||e<225?5:t<640||e<360?0:t<960||e<540?1:t<1280||e<720?2:3;var x2="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",qc=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 Fo,loadStarted$:new Fo,loadEnded$:new Fo,loadError$:new Fo,ready$:new Fo,slotRequested$:new Fo,started$:new Fo,timeRemained$:new Fo,paused$:new Fo,resumed$:new Fo,ended$:new Fo,empty$:new Fo,skipped$:new Fo,clicked$:new Fo,closed$:new Fo,error$:new Fo};this.loadAdman=e=>(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[Zt()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[Zt()]}),o())};$2(x2,e,this.loadTimeout).then(()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[Zt()]}),window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[Zt()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout))}).catch(s=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[Zt()]}),o(),clearTimeout(n)})});this.loadAdmanNPM=e=>new Promise((i,o)=>{let n;this.events.loadStarted$.next();let a=()=>{clearTimeout(n),delete window.admanAsyncInit,window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[Zt()]}),o())},s=()=>{d=!0,o()},d=!1,l=window.setTimeout(()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[Zt()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[Zt()]}),s()),window.AdmanHTML=window.AdmanHTML||null,import("@adtech/rbadman/out/rbadman-html5.min.js").then(()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(d)],numbers:[Zt()]}),!d&&(window.AdmanHTML?(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[Zt()]}),i(),this.events.loadEnded$.next()):(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[Zt()]}),window.admanAsyncInit=a,n=window.setTimeout(a,this.initTimeout)))},s).finally(()=>{clearTimeout(n),clearTimeout(l),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[Zt()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[Zt(),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"}),Te(this.playerState.isMobile)&&this.playerState.mobileUnmuteButtonVisible.set(!0)),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()):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{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;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[Zt()]}),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;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.log({message:"ad completed"}),this.currentAdSection?this.events.ended$.next(this.currentAdSection):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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")=>{Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[Zt()]}),this.log({message:e}),this.events.error$.next(e),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[Zt()]}),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){var P;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[Zt(),e.slotId]}),this.adman)return;this.events.init$.next(),this.startWatchDog();let{width:i,height:o,isFullscreen:n,isAutoplay:a,adsContainer:s,adsVideoElement:d,slotId:l,params:u={},duration:v,previewParam:$}=e,p,_=this.playerState&&Te(this.playerState.vsid);_&&(this.isVsidOriginal?p=_:p=parseInt(_,36));let{isEmbed:w,immediateOrigin:y}=b2(),C=(P=w?y:window.location.href)!=null?P:window.location.href,T=Dt(q(Dt(q({},u),{dl:encodeURIComponent(C),autoplay:a?1:0,player_width:i,player_height:o,preview:$}),p?{request_id:p}:{}),{duration:v,puid10:Wh(i,o),puid11:n?0:1});$||delete T.preview;let E={slot:l,wrapper:s,videoEl:d,videoQuality:o,params:T,browser:{mobile:!1}};try{let A=new window.AdmanHTML;A.setDebug(!1),A.onReady(this.onAdsReady),A.onStarted(this.onAdStarted),A.onPlayed(this.onAdPlayed),A.onPaused(this.onAdPaused),A.adMidrollPoint(this.onAdMidrollPoint),A.onClosed(this.onAdClosed),A.onSkipped(this.onAdSkipped),A.onClicked(this.onAdClicked),A.onTimeRemained(this.onAdTimeRemained),A.onCompleted(this.onAdCompleted),A.onError(this.onAdError),A.init(E),this.adman=A,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(E)}`})}catch(A){Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[Zt()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var o,n,a;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(o=this.currentAdSection)!=null?o:"","force: "+e],numbers:[Zt()]}),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.playerState.mobileUnmuteButtonVisible.set(!1),this.log({message:`switch to video, isPostroll: ${i}`}),i&&(this.adsState.postrollPassed.set(!0),this.log({message:"postroll passed"}));else{let s="Switch to video: Adman state was not updated correctly";this.log({message:s}),this.events.error$.next(s)}(a=(n=this.actions).switchFromAdsToVideo)==null||a.call(n,!i)}}togglePlay(){var e;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),this.adsState){this.log({message:"toggle play"});let i=Te(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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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&&clearTimeout(this.watchDogTimeout),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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(Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[Zt()]}),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,n,a,s,d,l,u,v,$,p;Yt.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[Zt()]}),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),(n=this.adman)==null||n.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(s=this.adman)==null||s.onClosed(void 0),(d=this.adman)==null||d.onSkipped(void 0),(l=this.adman)==null||l.onClicked(void 0),(u=this.adman)==null||u.onTimeRemained(void 0),(v=this.adman)==null||v.onCompleted(void 0),($=this.adman)==null||$.onError(void 0),(p=this.adman)==null||p.destroy(),this.videoElement&&y2(this.videoElement),this.isDestroyed=!0}};var Kh=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 $f=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let o=[],n=e.split(this.twoLinesRegExp);for(let a of n){let s={startTime:0,endTime:0,texts:[],lang:i},d=a.split(this.oneLineRegExp);for(let l of d)if(!s.startTime&&!s.endTime){let u=new Wc,{startTime:v,endTime:$}=u.parse(l);s.startTime=v,s.endTime=$}else if(l.trim()!==""){let u=new yf,{texts:v}=u.parse(l);s.texts=[...s.texts,...v]}(s.startTime||s.endTime)&&s.texts.length>0&&o.push(s)}return o}},Wc=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",n="0"){let a=Number(e)*60*60,s=Number(i)*60,d=Number(o),l=+`0.${n}`;return a+s+d+l}},yf=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let d=0,l=[];for(;d<s.length;){let u=["<",">"].reduce((v,$)=>{let p=s.indexOf($,d);return v===-1||v>p?p:v},-1);if(u===-1){l.push(s.substring(d));break}l.push(s.substring(d,u)),d=u+1}return l}}),a=new Wc;for(let s of n)a.isTime(s)?i.texts.push({type:"timestamp",value:a.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Qh=$f;import{isNonNullable as xf}from"@vkontakte/videoplayer-shared/es2015";var da,Ei,wf=0,Sf=!1,Gh="",jh=(t,e=0,i=0)=>t<e&&t<i,Kc=(t,e=0,i=0)=>t>=e&&t<=i,w2=(t,e=0,i=0)=>t>e&&t>i,Yh=(t,e,i,o=!1)=>{var d;let n=(d=i.find(({id:l})=>l===e.value))==null?void 0:d.subtitles;if(o)return n==null?void 0:n.find(({startTime:u,endTime:v})=>Kc(t,u,v));let a=t>=wf,s=t<wf;if(wf=t,s&&(Sf=!1),xf(da)&&Kc(t,da.startTime,da.endTime)&&Gh===e.value)return da;if(!xf(Ei)&&(n!=null&&n.length)&&!Sf){Ei=n.find(({startTime:u,endTime:v})=>Kc(t,u,v)||a&&jh(t,u,v)),da=void 0,!xf(Ei)&&n[n.length-1].endTime<t&&(Sf=!0);return}else{if(Kc(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))return da=Ei,Ei=void 0,Gh=e.value,da;(a&&w2(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime)||s&&jh(t,Ei==null?void 0:Ei.startTime,Ei==null?void 0:Ei.endTime))&&(Ei=void 0)}};var Qc={ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",en:"English",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",be:"\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F (\u0442\u0430\u0440\u0430\u0448\u043A\u0435\u0432i\u0446\u0430)",es:"Espa\xF1ol",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438",hr:"Hrvatski",hu:"Magyar",sr:"\u0421\u0440\u043F\u0441\u043A\u0438",pt:"Portugu\xEAs",el:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",pl:"Polski",fr:"Fran\xE7ais",ko:"\uD55C\uAD6D\uC5B4","zh-CN":"\u6C49\u8BED",lt:"Lietuvi\u0173",ja:"\u65E5\u672C\u8A9E",cs:"\u010Ce\u0161tina",et:"Eesti",tt:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",ba:"\u0411\u0430\u0448\u04A1\u043E\u0440\u0442\u0441\u0430",cv:"\u0427\u0103\u0432\u0430\u0448\u043B\u0430",sk:"Sloven\u010Dina",ro:"Rom\xE2n\u0103",no:"Norsk",lv:"Latvie\u0161u",az:"Az\u0259rbaycan dili",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",sv:"Svenska",nl:"Nederlands",tk:"T\xFCrkmen",ka:"\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8",da:"Dansk",uz:"O\u2018zbek",th:"\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",id:"Bahasa Indonesia",tg:"\u0422\u043E\u04B7\u0438\u043A\u04E3",sl:"Sloven\u0161\u010Dina",bs:"Bosanski","pt-BR":"Portugu\xEAs brasileiro",fa:"\u0641\u0627\u0631\u0633\u06CC",vi:"Ti\u1EBFng Vi\u1EC7t",hi:"\u0939\u093F\u0928\u094D\u0926\u0940",si:"\u0DC3\u0DD2\u0D82\u0DC4\u0DBD",bn:"\u09AC\u09BE\u0982\u09B2\u09BE",tl:"Tagalog",mn:"\u041C\u043E\u043D\u0433\u043E\u043B",my:"\u1017\u1019\u102C\u1005\u102C",tr:"T\xFCrk\xE7e",ne:"\u0928\u0947\u092A\u093E\u0932\u0940",ur:"\u0627\u0631\u062F\u0648",ky:"\u041A\u044B\u0440\u0433\u044B\u0437 \u0442\u0438\u043B\u0438",pa:"\u067E\u0646\u062C\u0627\u0628\u06CC",os:"\u0418\u0440\u043E\u043D",kn:"\u0C95\u0CA8\u0CCD\u0CA8\u0CA1",sw:"Kiswahili",kk:"\u049A\u0430\u0437\u0430\u049B\u0448\u0430",ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",he:"\u05E2\u05D1\u05E8\u05D9\u05EA",ab:"\u0410\u04A7\u0441\u0448\u04D9\u0430",eu:"Euskara",eo:"Esperanto"},S2={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"},Gc=t=>{var e,i;return(i=(e=Qc[t])!=null?e:Qc[S2[t]])!=null?i:void 0};import{Subscription as C2}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var jc=class{constructor(e,i=new C2){this.oneStat=e;this.statSubscription=i}destroy(){this.oneStat.destroy(),this.statSubscription.unsubscribe()}};var Yc=(i=>(i.DESKTOP_CONTROL_PANEL_LEFT="desktop-control-panel-left",i.DESKTOP_CONTROL_PANEL_RIGHT="desktop-control-panel-right",i))(Yc||{});var Ur=t=>t!=null?t:0,el=(t,e)=>{var n,a;let i=(n=t==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t),o=(a=e==null?void 0:e.getBoundingClientRect)==null?void 0:a.call(e);return{top:Math.round(Ur(i==null?void 0:i.top)-Ur(o==null?void 0:o.top)),left:Math.round(Ur(i==null?void 0:i.left)-Ur(o==null?void 0:o.left)),bottom:Math.round(Ur(i==null?void 0:i.bottom)-Ur(o==null?void 0:o.top)),right:Math.round(Ur(i==null?void 0:i.right)-Ur(o==null?void 0:o.left))}},tl=t=>{var i;let e=(i=t==null?void 0:t.getBoundingClientRect)==null?void 0:i.call(t);return{width:Ur(e==null?void 0:e.width),height:Ur(e==null?void 0:e.height)}};var Xh=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isClip:o,isLiveCatchUpMode:n,statAuthToken:a,isAudioDisabled:s,canDownload:d,callbacks:l,webApi:u,videoEpisodes:v,previewThumbsData:$,uiConfig:p,coreConfig:_,player:w,disabledControls:y,isInteractive:C,interactiveRanges$:T,isInteractiveTime$:E,replayInteractive:P,stopPlayer:A,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:V,additionalButtons:H,additionalSettingsMenuItems:Y,additionalContextMenuItems:O,playPrevVideo:J,playNextVideo:ne,looped:Z=!1,statistics:me,saveRate:le,internalsExposure:Ve,playerView:Me})=>{var qm,Wm,Km;let be=Dt(q({},_),{configName:[...(qm=_.configName)!=null?qm:[],"ui"],isAudioDisabled:s,live:Dt(q({},(Wm=_.live)!=null?Wm:{}),{isLiveCatchUpMode:!!n})}),ae=p,Le=N2.createRootTracer(ae.features.saveTraceInfoToFile),re=Le.createComponentTracer("Store"),N=w||new I2(be,Le);Ve==null||Ve.expose({corePlayer:N});let pe=new V2,_e=new qc(pe,{loadTimeout:ae.ads.loadTimeout,initTimeout:ae.ads.initTimeout,runtimeTimeout:ae.ads.runtimeTimeout,useAdmanFromNPM:ae.ads.useAdmanFromNPM,volumeMultiplier:ae.ads.volumeMultiplier,isVsidOriginal:ae.ads.isVsidOriginal}),Ge=Xs.getInstance(),ie=u==null?void 0:u.pictureInPictureApi,G=u==null?void 0:u.annotationsApi,K=pe.createComponentLog("Store"),Re,Ne,et={},we=new yc,Se=me?Jt(me.oneStat.vsid$):sr(void 0),De=de(bs()),Xe=de(!1),ot=(Km=ie==null?void 0:ie.info.isActive$)!=null?Km:new B2(!1),ft=de(0),Je=de([]),gt=R2(N.events.fatalError$,N.events.managedError$).subscribe(c=>Je.update(x=>[...x,c])),Et=sr(!1,c=>{let x=N.events.fatalError$.subscribe(()=>c(!0));return()=>x.unsubscribe()}),jt=c=>kt(void 0,null,function*(){var ce;let x=Object.values(P2).includes(c);if(ae.downloadVKLanguages&&(x&&ae.updateBuiltinLanguages||!Pp(c))){let Qe;try{Qe=yield L2(c,Dg,Ng)}catch(wt){(ce=me==null?void 0:me.oneStat)==null||ce.logError({errorType:"VKLangPack",fatal:!1}),Ge==null||Ge.report(wt,{errorType:"VKLangPack",fatal:!1})}Qe&&(Ep({language:c,pack:Qe,fallback:ae.defaultLanguage}),qt.set(c))}Pp(c)&&qt.set(c)}),qt=de(t),Wt=de(e);jt(t);let ve=(c,x)=>{let D=Te(qt);return Ap(D,c,x,ae.defaultLanguage)},j=de("thumb"),Ce=(()=>{let c=yi([Et,j],([x,D])=>x?"crashed":D);return Dt(q({},c),{is:x=>Te(c)===x})})(),se=(()=>{let c=de(new Set(y));return Dt(q({},c),{add:x=>{c.update(D=>new Set([...D].concat(x)))},remove:x=>{c.update(D=>{let ce=[...D];return new Set(Array.isArray(x)?ce.filter(Qe=>!x.includes(Qe)):ce.filter(Qe=>Qe!==x))})},includes:x=>{let D=Te(c);return Array.isArray(x)?x.every(ce=>D.has(ce)):D.has(x)}})})();re.log("create store"),K({message:"create store"});let He=c=>{let x=c.container;x.append(N.experimental.element$.getValue()),Fe=new MutationObserver(D=>{let{removedNodes:ce}=D[0];ce.length&&x.append(N.experimental.element$.getValue())}),Fe.observe(x,{childList:!0})},Ue=c=>{K({message:`init video, config: ${JSON.stringify(c)}`}),C?He(c):(H2.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[F2()]}),N.initVideo(c)),re.log("init video",{isInteractive:C}),c.subtitles&&N.setExternalTextTracks(c.subtitles),Re=c},tt=new Zc,ct=c=>tt.next(c),Ye=new Zc,Ze=new Zc,nt=new Zc,Fe=null,$t={actionRewind$:Ye,actionSeek$:Ze,inPiP$:ot,inFullscreen$:new D2(c=>De.subscribe(x=>c.next(x))),actionSetSubtitle$:nt,nextMovie$:tt};if(me){let{oneStat:c,statSubscription:x}=me;C||x.add(c.attachTo(N)),x.add(c.attachToUi($t)),x.add(c.attachToAds(_e.events)),c.authorize(a).catch(D=>{K({message:`onestat auth error ${String(D)}`})})}if(Ge){let c=new Cf,x=(D,ce)=>c.add(D.subscribe(ce));if(x(N.events.managedError$,D=>{Ge.logIError(D)}),x(N.events.fatalError$,D=>{Ge.logIError(D,!0)}),me){let{oneStat:D}=me;x(D.experimental.error$,ce=>{Ge.logIError(ce)})}Ge.sentrySubscription.add(c)}let qe=()=>{k2.device.isIOS&&Ne&&$h(Ne).catch(c=>{K({message:`exitIosSafariFullscreen failed: ${c}`})})},dt=new Cf().add(N.experimental.element$.subscribe(c=>{c&&(Ne=c,c.classList.add("player-media"),ea(ie)&&(ie.updateVideoElement(),ie.registryEventHandlers()),C&&c.setAttribute("pip","false"),Me==="preview"&&(c.setAttribute("disablePictureInPicture","true"),c.setAttribute("x-yandex-pip","false")))})).add(N.events.ended$.subscribe(()=>{var c;qe(),(c=l==null?void 0:l.onEnded)==null||c.call(l)})).add(N.events.looped$.subscribe(()=>{var c;(c=l==null?void 0:l.onLooped)==null||c.call(l)})).add(N.events.started$.subscribe(()=>kt(void 0,null,function*(){var x,D;ea(ie)&&(yield ie==null?void 0:ie.revealPictureInPicture());let c=N.info.muted$.getValue();(x=l==null?void 0:l.onStarted)==null||x.call(l),(D=et.onStarted)==null||D.call(et,c)}))).add(N.events.willSeek$.subscribe(({from:c,to:x})=>{var D;(D=l==null?void 0:l.onSeek)==null||D.call(l,c,x)})).add(N.events.autoplaySoundProhibited$.subscribe(()=>{var c;(c=l==null?void 0:l.onAutoplaySoundProhibited)==null||c.call(l)})).add(N.info.position$.subscribe(c=>{var D;let x=N.info.duration$.getValue();isFinite(x)&&x>0&&((D=l==null?void 0:l.onTimeupdate)==null||D.call(l,x,c),_e.setPosition(c,x))})).add(N.events.fatalError$.subscribe(c=>{var x;(x=l==null?void 0:l.onCrashed)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.fetcherRecoverableError$.subscribe(c=>{var x;(x=l==null?void 0:l.onRecoverableError)==null||x.call(l,c?`${c.id}: ${c.message}`:void 0)})).add(N.events.loadedMetadata$.subscribe(()=>{At.state.loadedMetadata$.set(!0)})).add(N.info.is3DVideo$.subscribe(c=>{At.ui.is3DVideo.set(c)})).add(N.info.isEnded$.subscribe(c=>{C&&(c?(E!=null&&E.getValue()&&se.add(Bl),se.add("PLAY_BUTTON")):se.remove("PLAY_BUTTON"))})).add(N.info.liveTime$.subscribe(c=>{var x;(x=l==null?void 0:l.onLiveTime)==null||x.call(l,c)})).add(N.info.isStalled$.subscribe(c=>{var x;(x=l==null?void 0:l.onStalledChanged)==null||x.call(l,c)})).add(N.info.isLiveEnded$.subscribe(c=>{var x;return c&&((x=l==null?void 0:l.onLiveEnded)==null?void 0:x.call(l))})).add(_e.events.loadStarted$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadStarted)==null?void 0:x.call(c)})).add(_e.events.loadEnded$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadEnded)==null?void 0:x.call(c)})).add(_e.events.loadError$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onLoadError)==null?void 0:x.call(c)})).add(_e.events.init$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onInit)==null?void 0:x.call(c)})).add(_e.events.ready$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onReady)==null?void 0:x.call(c)})).add(_e.events.started$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onStarted)==null?void 0:D.call(x,c)})).add(_e.events.timeRemained$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onTimeRemained)==null?void 0:D.call(x,c)})).add(_e.events.ended$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onCompleted)==null?void 0:D.call(x,c)})).add(_e.events.empty$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onEmpty)==null?void 0:x.call(c)})).add(_e.events.clicked$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClicked)==null?void 0:D.call(x,c)})).add(_e.events.closed$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onClosed)==null?void 0:D.call(x,c)})).add(_e.events.error$.subscribe(c=>{var x,D;return(D=(x=l==null?void 0:l.adsInfo)==null?void 0:x.onError)==null?void 0:D.call(x,c)})).add(_e.events.paused$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onPaused)==null?void 0:x.call(c)})).add(_e.events.resumed$.subscribe(()=>{var c,x;return(x=(c=l==null?void 0:l.adsInfo)==null?void 0:c.onResumed)==null?void 0:x.call(c)})),Xt=new Cf,Ni=()=>{var wt,Nt,Gt;let{debugLog:c}=ae,x,D="#9df7b7",ce="#efd169";if(c&&c!==!0){let{colors:Bt}=c;x=c.tag,D=(wt=Bt==null?void 0:Bt[0])!=null?wt:D,ce=(Gt=(Nt=Bt==null?void 0:Bt[1])!=null?Nt:Bt==null?void 0:Bt[0])!=null?Gt:ce}let Qe=x?`: ${x}`:"";Xt.add(N.events.log$.subscribe(Bt=>{console.debug(`%c sdk${Qe} `,`background:${D};`,`sdk component: ${Bt.component}`,Bt.message)})).add(pe.log$.subscribe(Bt=>{console.debug(`%c ui${Qe} `,`background:${ce};`,`ui component: ${Bt.component}.`,Bt.message)}))},Pi=()=>{Xt.unsubscribe()},Ui=(c,x)=>{re.log("start camera manual rotation",{mx:c,my:x}),N.startCameraManualRotation(c,x)},ji=(c=!1)=>{re.log("stop camera manual rotation",{immediate:c}),N.stopCameraManualRotation(c)},Yi=(c,x,D)=>{re.log("move camera focus px",{xpx:c,ypx:x,dt:D}),N.moveCameraFocusPX(c,x,D)},Lt=()=>{N.holdCamera()},yt=()=>{N.releaseCamera()},Rt=sr(N.info.position$.getValue(),c=>{let x,D,ce=()=>{let Qe=N.info.playbackState$.getValue(),wt=N.info.isLive$.getValue(),Nt=N.info.duration$.getValue(),Gt=N.info.position$.getValue();if(Qe&&[cd.PLAYING,cd.PAUSED].includes(Qe)){let Bt=wt?Gt-Nt:N.getExactTime();Bt!==D&&c(Bt),D=Bt}x=requestAnimationFrame(ce)};return ce(),()=>cancelAnimationFrame(x)}),So=Jt(N.info.playbackState$),an=Jt(N.info.currentBuffer$),X=Jt(N.info.isEnded$),ii=Jt(N.info.isLive$),pi=ae.features.playbackRate?Jt(N.info.canChangePlaybackSpeed$):sr(!1),zi=Jt(N.info.liveBufferTime$),ri=Jt(N.info.volume$),fi=Jt(N.info.muted$),si=xc(N.info.predefinedQualityLimitType$.pipe(Zh(c=>c===zr.TRAFFIC_SAVING)),N.info.predefinedQualityLimitType$.getValue()===zr.TRAFFIC_SAVING),ut=xc(N.info.predefinedQualityLimitType$.pipe(Zh(c=>c===zr.HIGH_QUALITY)),N.info.predefinedQualityLimitType$.getValue()===zr.HIGH_QUALITY),mo=Jt(N.info.autoQualityLimitingAvailable$),Tt=Jt(N.info.availableQualities$),Kt=Jt(N.info.availableQualitiesFps$),oi=Jt(N.info.chromecastState$),vo=Jt(N.info.chromecastDeviceName$),Sn=Jt(N.info.currentFormat$),Zi=Jt(N.info.throughputEstimation$),Co=Jt(N.info.videoBitrate$),di=Jt(N.info.intrinsicVideoSize$),xt=Jt(N.info.duration$),To=Jt(N.info.isAudioAvailable$),Ai=null,Si=N.info.isBuffering$,zo=sr(Si.getValue(),c=>{let x=Si.subscribe(D=>{D&&Ai===null?Ai=window.setTimeout(()=>{c(Si.getValue()),Ai=null},ae.loaderDelay):c(D)});return()=>{x.unsubscribe(),Ai&&clearTimeout(Ai)}}),oo=()=>{Ai&&clearTimeout(Ai),Ai=null},qi=yi([xt,ii],([c,x])=>x?-c:c),Cn=yi([So],([c])=>c===cd.PLAYING),Tn=Jt(N.info.atLiveEdge$),Bi=Jt(N.info.atLiveDurationEdge$),ln=Jt(N.info.position$),Io=yi([ln,xt],([c,x])=>isFinite(c)&&isFinite(x)&&!!x),ko=yi([oi],([c])=>c===T2.CONNECTED),Tr=Jt(N.info.availableVideoStreams$),lr=ae.features.audioLanguages?Jt(N.info.availableAudioStreams$):sr([]),In=Jt(N.info.currentVideoStream$),Kn=Jt(N.info.currentAudioStream$),Qn=c=>{c.language&&kp(c.language),N.setVideoStream(c)},go=c=>{c.language&&kp(c.language),N.setAudioStream(c)},qo=c=>{let x;if(c.length===1&&(x=c.at(0)),x!=null||(x=c.find(ce=>"isDefault"in ce&&ce.isDefault)),x)return x;let D=sh();return D&&(x=c.find(({language:ce})=>D===ce)),x!=null||(x=c.at(0)),x},kn=!1;dt.add(N.info.availableAudioStreams$.subscribe(c=>{if(!kn&&c.length){let x=qo(c);x&&(N.setAudioStream(x),kn=!0)}}));let rt=!1;dt.add(N.info.availableVideoStreams$.subscribe(c=>{if(!rt&&c.length){let x=qo(c);x&&(N.setVideoStream(x),rt=!0)}}));let Wo=de(void 0),dn=Jt(N.info.isAutoQualityEnabled$,c=>c&&Wo.set(void 0)),En=Jt(N.info.currentQuality$,()=>Wo.set(void 0)),dr=yi([Wo,En],([c,x])=>c!=null?c:x),Ko=yi(Sn,c=>c!==ud.MPEG),Gn=yi([Tt,Kt,dn,dr,Ko],([c,x,D,ce,Qe])=>{let wt=[];Qe&&wt.push({value:"auto",displayValue:ve("auto_quality_option"),selected:D});let Nt=c.filter(Gt=>!A2(Gt));for(let Gt of Nt){let Bt=x[Gt];wt.push({value:Gt,displayValue:`${Gt}${Bt?Kh(Bt):""}`,selected:D?!1:Gt===ce})}return wt}),cn=Jt(N.info.currentPlaybackRate$),Pn=yi([cn,Tn,Bi],([c,x,D])=>{let ce=D||C?1:ae.controls.playbackRateMin,Qe=x?1:ae.controls.playbackRateMax,wt=ae.controls.playbackRateStep,Nt=[];for(let Gt=ce;Gt<=Qe;Gt+=wt)Nt.push({value:Gt,displayValue:Gt===1?ve("playback_rate_1"):ve("playback_rate",{multiplier:Gt.toString(10)}),selected:c===Gt});return Nt}),Oi={displayValue:ve("subtitles_off"),value:"off"},Xi=de(q({},Oi)),An=ae.features.subtitles?Jt(N.info.availableTextTracks$):sr([]),Ro=Zg(),Mn=yi([An,Xi],([c,x],D)=>{var wt;let ce=[],Qe=c.find(({id:Nt})=>Nt===x.value);if(Qe!=null&&Qe.url){let[,Nt]=(wt=Ro.find(Qe.url))!=null?wt:[];if(Nt){D(Nt);return}we.download(Qe.url).then(Gt=>{if(!Gt||we.isDestroyed())return;let Bt=new Qh,cs=Qe.language;if(cs){let F1=!!Qe.isAuto,U1=Bt.parse(Gt,cs);ce.push({lang:cs,subtitles:U1,isAuto:F1,id:Qe.id})}Ro.add(Qe.url,ce),Te(Xi).value===x.value&&D(ce)}).catch(Gt=>{var Bt;(Bt=me==null?void 0:me.oneStat)==null||Bt.logError({errorType:"Subtitles download",fatal:!1}),Ge==null||Ge.report(Gt,{errorType:"Subtitles download",fatal:!1})})}D(ce)}),Qo=yi([cn,Cn,Xi],([c,x,D],ce)=>{let Nt;if(N.info.isLive$.getValue()&&x&&D.value!==Oi.value){let Bt=()=>{let cs=1e3/(3*c);Nt=setTimeout(Bt,cs),ce(Date.now())};return Bt(),()=>clearTimeout(Nt)}}),Do=yi([An,Xi],([c,x])=>{if(!c.length)return[];let D=[];for(let{language:ce,isAuto:Qe,id:wt}of c){let Nt=ce&&Gc(ce);ce&&Nt&&D.push({displayValue:Qe?ve("subtitles_auto",{language:Nt}):Nt,value:wt,selected:(x==null?void 0:x.value)===wt,isAuto:Qe})}return D.length?(D.unshift(Dt(q({},Oi),{selected:(x==null?void 0:x.value)===Oi.value})),D):[]}),gi={available:[],prev:[]},jn=()=>{var x,D;let c=N.experimental.getCurrentTime$.getValue();return(D=(x=c==null?void 0:c())!=null?x:Ne==null?void 0:Ne.currentTime)!=null?D:0},Eo=yi([Rt,Xi,Mn,Qo],([c,x,D,ce])=>{var wt;let Qe=N.info.isLive$.getValue();if(Qe&&gi.prev!==D){let Nt=D.find(({id:Bt})=>Bt===x.value),Gt=gi.prev.find(({id:Bt})=>Bt===x.value);if(Nt){let Bt=Dt(q({},Nt),{subtitles:[...(wt=Gt==null?void 0:Gt.subtitles)!=null?wt:[],...Nt.subtitles]});gi.available=[Bt],gi.prev=D}}if(x&&x.value!==Oi.value){let Nt=Qe?jn():c,Gt=Qe?gi.available:D;return Yh(Nt,x,Gt,Qe)}}),cr=yi([Eo],([c])=>c!=null&&c.texts?c.texts:[]);dt.add(Xi.subscribe(c=>{var x,D;if(c.value===Oi.value)(x=l==null?void 0:l.onSubtitleOff)==null||x.call(l);else{let ce=Object.entries(Qc).find(([Qe,wt])=>wt===c.displayValue);(D=l==null?void 0:l.onSubtitleOn)==null||D.call(l,ce?ce[0]:"")}}));let un=de(!0),pn=yi([an,qi,ln,zi],([c,x,D,ce])=>{var Gt;let Qe=(Gt=c==null?void 0:c.end)!=null?Gt:0;if(!ce)return Qe/x;let Nt=-D+ce-x;return(Qe-Nt)/x}),ur=Jt(N.info.availableSources$),Go=yi([ur],([c])=>Object.keys((c==null?void 0:c[ud.MPEG])||{}).length>0),Ir=()=>{var D,ce,Qe;let c=Object.keys(((ce=(D=N.info.availableSources$)==null?void 0:D.getValue())==null?void 0:ce[ud.MPEG])||{}),x=E2(c)||O2.Q_144P;return(Qe=Re.sources[ud.MPEG])==null?void 0:Qe[x]},Ln=()=>{var x;let c=Ir();if(c)re.log("download video",{url:c}),Gg(c,((x=Re==null?void 0:Re.meta)==null?void 0:x.title)||"video");else{let D="There is no URL for download video";re.log("download video",{message:D}),K({message:D})}},Yn=()=>{K({message:"toggle muted"});let c=N.info.muted$.getValue();N.info.volume$.getValue()===0&&!c?ci(Xn()):No(!c)},pr=()=>{var c;if(At.ui.settingsMenu.visible$.set(!1),!Te(At.ui.settingsSubMenu.visible$)){let x=Te(At.ui.settingsMenu.ref$);if((c=l==null?void 0:l.uiInfo)!=null&&c.onSettingsMenu&&x){let ce=tl(x),Qe={top:0,left:0,bottom:0,right:0};l.uiInfo.onSettingsMenu({visible:!1,size:ce,position:Qe,name:"settings"})}}re.log("close settings menu")},kr=(c,x=()=>Promise.resolve())=>kt(void 0,null,function*(){var Qe;At.ui.settingsMenu.openedByBtnKeyboard$.set(!!c),At.ui.settingsMenu.visible$.set(!0),yield x();let D=Te(At.ui.settingsMenu.ref$),ce=Ms();if((Qe=l==null?void 0:l.uiInfo)!=null&&Qe.onSettingsMenu&&D&&ce){let Nt=tl(D),Gt=el(D,ce);l.uiInfo.onSettingsMenu({visible:!0,size:Nt,position:Gt,name:"settings"})}re.log("open settings menu",{wasOpenedByKeyboard:c})}),Zn=(c,x=!1)=>{var wt;At.ui.settingsSubMenu.visible$.set(!1);let D=Te(At.ui.settingsMenu.ref$),ce=Ms(),Qe=Te(At.ui.settingsMenu.visible$);if((wt=l==null?void 0:l.uiInfo)!=null&&wt.onSettingsMenu&&D&&ce)if(Qe&&!x){let Gt=tl(D),Bt=el(D,ce);l.uiInfo.onSettingsMenu({visible:!0,size:Gt,position:Bt,name:"settings"})}else{let Gt=tl(c),Bt={top:0,left:0,bottom:0,right:0},cs=Te(At.ui.settingsSubMenu.name$);l.uiInfo.onSettingsMenu({visible:!1,size:Gt,position:Bt,name:cs})}re.log("close settings sub menu")},fn=(c,x)=>{var ce;At.ui.settingsSubMenu.visible$.set(!0),At.ui.settingsSubMenu.ref$.set(x),At.ui.settingsSubMenu.name$.set(c);let D=Ms();if((ce=l==null?void 0:l.uiInfo)!=null&&ce.onSettingsMenu&&x&&D){let wt=tl(x),Nt=el(x,D);l.uiInfo.onSettingsMenu({visible:!0,name:c,size:wt,position:Nt})}re.log("open settings sub menu",{name:c})},Xn=()=>{var x;let c=Math.max(ae.volumeMinRestore,(x=wc())!=null?x:0);return c===0?ae.volumeDefault:c},ci=c=>{let x=c===0?Xn():c,D=N.info.muted$.getValue();K({message:`set volume, volume: ${c}, preferredVolume: ${x}`}),D&&c>0&&!s&&(D=!1,Tp(!1)),N.setVolume(c,D),_e.setVolume(c),yp(x)},No=c=>{let x=N.info.volume$.getValue();if(K({message:`set muted, currentVolume: ${x}, mute: ${c}`}),N.setMuted(c),_e.setVolume(c?0:x),Tp(c),!c&&x===0){let D=Xn();N.setVolume(D),yp(D),_e.setVolume(D)}},Ci=de(!1),Jn=c=>{var x,D;re.log("set looped",{isLooped:c}),Ci.set(c),N.setLooped(c),(D=(x=l==null?void 0:l.uiInfo)==null?void 0:x.onLoopedChanged)==null||D.call(x,c)};Jn(Z);let mt=()=>{var c,x;(x=(c=l==null?void 0:l.uiInfo)==null?void 0:c.onReportProblem)==null||x.call(c)},Ht=(c,x=!1)=>{var D;K({message:`set autoplayNextEnabled, value: ${c}`}),re.log("set autoplay next enabled",{autoplayNextEnabled:c}),At.ui.autoplayNextEnabled$.set(c),dh(c),x&&((D=l==null?void 0:l.onSetAutoplayNextEnabled)==null||D.call(l,c))},Mi=c=>{K({message:`set timerNextVideoRunning, value: ${c}`}),re.log("set timer next video running",{timerNextVideoRunning:c}),At.ui.timerNextVideoRunning$.set(c)},Po=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onPrevVideoClick))try{x=(ce=l==null?void 0:l.onPrevVideoClick)==null?void 0:ce.call(l)}catch(Qe){K({message:"onPrevVideoClick callback failed to execute"})}if(!x)return;c&&Qt("prev")||J()},st=(c=!0)=>{var ce;let x=!0;if(c&&(l!=null&&l.onNextVideoClick))try{x=(ce=l==null?void 0:l.onNextVideoClick)==null?void 0:ce.call(l)}catch(Qe){K({message:"onNextVideoClick callback failed to execute"})}if(!x)return;c&&Qt("next")||ne()},Qt=c=>{let{isMobile:x,features:{playbackStatusNextVideoShow:D,playbackStatusShow:ce}}=ae;return D&&ce&&!x?(At.ui.aboutToGoNextVideo.set(c),At.ui.userActionsDisabled.set(!0),!0):!1},mi=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementShow)==null||c.call(l)},Ji=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementClick)==null||c.call(l)},eo=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementAuto)==null||c.call(l)},Li=()=>{var c;(c=l==null?void 0:l.onNextVideoAnnouncementCancel)==null||c.call(l)},xi=()=>{N.prepare()},to=()=>{qn(At);let c=Te(At.ui.controls.disabledControls$),x=Te(At.playerPhase),D={playerPhase:x,isInteractive:C,isVideoEnded:!1,action:"none"};if(c.has("PLAY_BUTTON"))return;if(K({message:"toggle play"}),x==="ads"){D.action="play",re.log("toggle adman play",D),_e.togglePlay();return}let ce=()=>{var wt;K({message:"toggle play, call player.play"}),D.action="play",N.play(),(wt=l==null?void 0:l.onPlay)==null||wt.call(l)},Qe=()=>{var wt;K({message:"toggle play, call player.pause"}),D.action="pause",N.pause(),(wt=l==null?void 0:l.onPause)==null||wt.call(l)};if(N.info.isEnded$.getValue()){if(K({message:"toggle play, video ended, seek to 0"}),Ye.next(),Ze.next(rs.REWIND),C){P==null||P();return}N.seekTime(0),ce()}else N.info.playbackState$.getValue()!==cd.PLAYING?ce():Qe();re.log("toggle play",D)},wi=(c,{changeReason:x="default",appliesTo:D="to-video"}={})=>{K({message:`set quality, quality: ${c}`}),re.log("set quality",{quality:c}),N.setAutoQuality(c==="auto"),c!=="auto"?(ae.features.qualityDetailsSubMenuEnabled?(Sc({type:"exact_quality",quality:c,videoId:i},D),Hl(),N.setPredefinedQualityLimits(zr.UNKNOWN)):xp(i,c),Wo.set(c),N.setQuality(c)):ae.features.qualityDetailsSubMenuEnabled?x==="default"&&(er("auto_quality",D),Te(si)&&no(!1),Te(ut)&&Wi(!1)):Hl()},no=(c,x="as-default")=>{K({message:`set trafficSavingEnabled, value: ${c}`}),re.log("set traffic saving enabled",{trafficSavingEnabled:c});let D=c?zr.TRAFFIC_SAVING:zr.UNKNOWN;ae.features.qualityDetailsSubMenuEnabled?(mn(D,x),Ol(!1)):(N.setPredefinedQualityLimits(D),Ol(c))},Wi=(c,x="as-default")=>{K({message:`set highQualityEnabled, value: ${c}`}),re.log("set high quality enabled",{highQualityEnabled:c}),mn(c?zr.HIGH_QUALITY:zr.UNKNOWN,x)},mn=(c,x)=>{c!==zr.UNKNOWN&&(Te(mo)&&!Te(dn)&&wi("auto",{appliesTo:x,changeReason:"limit-changed"}),er(c,x)),N.setPredefinedQualityLimits(c)},er=(c,x)=>{Sc({type:c,videoId:i},x),x==="as-default"&&Sc({type:c,videoId:i},"to-video")},tr=c=>{re.log("set playback rate",{playbackRate:c}),N.setPlaybackRate(c),ae.features.saveRate&&le&&!N.info.isLive$.getValue()&&ah(c)},Er=()=>{let c=Te(Pn),x=c.findIndex(({selected:ce})=>ce);if(x===c.length-1)return;let D=c[x+1];tr(D.value)},Pr=()=>{let c=Te(Pn),x=c.findIndex(({selected:ce})=>ce);if(x===0)return;let D=c[x-1];tr(D.value)},Vn=(c=Dt(q({},Oi),{selected:!1}))=>{re.log("set subtitles",q({},c)),c&&c.value!==Oi.value&&nt.next(c.isAuto?c.value+"_auto":c.value),Xi.set(c)},Rn=()=>{re.log("toggle subtitles");let c=Te(Do),x=Te(Xi),D=Te(qt);if((x==null?void 0:x.value)===Oi.value){let ce=c.filter(Qe=>Qe.value!==Oi.value).find(Qe=>Qe.value===D)||c[1];Vn(ce)}else Vn()},Ao=(c,x,D=!0)=>{var ce;if(K({message:`seek to time, time: ${c}`}),re.log("seek to time",{time:c,action:x,forcePrecise:D}),Ze.next(x),N.info.isLive$.getValue()){let Qe=N.info.duration$.getValue(),wt=Math.min(0,Qe+c);N.seekTime(wt,D)}else{if(E!=null&&E.getValue())return;N.info.isEnded$.getValue()&&(K({message:"seek after ended, call callbacks.onPlay"}),(ce=l==null?void 0:l.onPlay)==null||ce.call(l)),N.seekTime(zm(c),D)}},Ar=c=>{K({message:`seek to episode start time: ${c}`}),re.log("seek to episode start time",{time:c}),Ao(c,rs.EPISODE,!0)},Bo=(c,x)=>{K({message:`seek to percent, percent: ${c}`}),re.log("seek to percent",{percent:c,action:x});let D=Te(qi)*c;Ao(D,x,!1)},fr=c=>{K({message:`seek external, time: ${c}`}),re.log("seek external",{time:c}),Ze.next(rs.UNKNOWN),N.seekTime(N.info.isLive$.getValue()?-c:c)},Mr=c=>{var ce,Qe;let x=(ce=c.max)!=null?ce:"none",D=(Qe=c.min)!=null?Qe:"none";K({message:`set auto quality limitation. Max: ${x}. Min: ${D}`}),re.log("set auto quality limits",{max:x,min:D}),N.setAutoQualityLimits(c)},Lr=c=>{K({message:`seek external to episode start time: ${c}`}),re.log("seek external to episode start time",{time:c}),Ao(c,rs.EPISODE,!0)},mr=c=>{K({message:`set playback rate to: ${c}`}),re.log("set playback rate external",{playbackRate:c}),N.setPlaybackRate(c)},io=de(void 0),vn=de(!1),qr=c=>{K({message:`start scrubbing, progress: ${c}`}),re.log("start scrubbing",{progress:c}),vn.set(!0),vr(c)},vr=c=>{io.set(c)},at,Ft,Vi=()=>{io.set(void 0),vn.set(!1)},xe=()=>{clearTimeout(Ft),clearTimeout(at),at=window.setTimeout(()=>{Vi()},500),Ne==null||Ne.removeEventListener("seeked",xe)},Pt=c=>{K({message:`complete scrubbing, progress: ${c}`}),re.log("complete scrubbing",{progress:c}),Bo(c,rs.SLIDER),Te(At.ui.isMobile)&&Te(At.state.currentFormat$)===ud.HLS?(Ne==null||Ne.addEventListener("seeked",xe),Ft=window.setTimeout(()=>{xe()},300)):Vi()},vi=yi([Rt,qi,io],([c,x,D],ce)=>{ce(M2(D)?D*x:c)}),hi=de(!1),Mo=()=>{hi.set(!0)},ui=()=>{hi.set(!1)},Ee=de({width:0,height:0}),It=yi([Ee],([{width:c}],x)=>{let D=Fh(c);x(D)}),ei=de(!1),Ti=H.filter(c=>jg(c)),ni=yi([It,ei],([c,x])=>x?Ti.filter(D=>!D.hideOnMobile):Ti.filter(D=>{var ce;return!((ce=D.hideOnDesktopGridTypes)!=null&&ce.includes(c))})),jo=de(H.filter(c=>Yg(c))),gn=yi([jo,It],([c,x])=>c.filter(D=>{var ce;return!((ce=D.hideOnDesktopGridTypes)!=null&&ce.includes(x))})),Vr=yi([gn,ni],([c,x])=>[...ae.features.additionalButtonsDesktopControlPanelRight?c.filter(D=>D.type==="desktop-control-panel-right"):[],...ae.features.additionalButtons?x.map((D,ce)=>{var Qe;return{id:ce,weight:ce,type:"desktop-control-panel-right",testId:D.testId,icon:D.iconUrl,onClick:D.onClick,ariaLabel:(Qe=D.ariaLabel)!=null?Qe:D.tooltip,tooltipText:D.tooltip}}):[]]),Dn=de(Y),Wr=yi([Dn],([c])=>ae.features.additionalSettingsMenuItems?c.map(x=>x.type==="SWITCH"?Dt(q({},x),{onClick:x.onChangeEnabled}):x):[]),ba=(c,x)=>{let D=Te(jo).map(ce=>ce.id!==c?ce:q(q({},ce),x));jo.set(D)},Es=c=>{let x=Te(jo);if(x.some(D=>D.id===c.id)){K({message:`Additional button with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),jo.set(x)},ll=c=>{let x=Te(jo);if(!x.some(D=>D.id===c)){K({message:`Can't find additional button with id: "${c}"! Can't remove item with this id`});return}x=x.filter(D=>D.id!==c),jo.set(x)},$a=c=>{Ze.next(rs.LIVE),K({message:"live switch to low latency "+c}),re.log("live switch to low latency "+c),N.setLiveLowLatency(c)},dl=(c,x)=>{let D=Te(Dn).map(ce=>ce.id!==c?ce:q(q({},ce),x));Dn.set(D)},Ps=c=>{let x=Te(Dn);if(x.some(D=>D.id===c.id)){K({message:`Settings menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),Dn.set(x)},cl=c=>{let x=Te(Dn);if(!x.some(D=>D.id===c)){K({message:`Can't find settings menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(D=>D.id!==c),Dn.set(x)},ir=de(O),ya=yi([ir],([c])=>ae.features.additionalContextMenuItems?c:[]),As=(c,x)=>{let D=Te(ir).map(ce=>ce.id!==c?ce:q(q({},ce),x));ir.set(D)},_t=c=>{let x=Te(ir);if(x.some(D=>D.id===c.id)){K({message:`Context menu item with id: "${c.id}" was exist! Can't add more with the same id`});return}x.push(c),ir.set(x)},ht=c=>{let x=Te(ir);if(!x.some(D=>D.id===c)){K({message:`Can't find context menu item with id: "${c}"! Can't remove item with this id`});return}x=x.filter(D=>D.id!==c),ir.set(x)},ro=yi([ei,Et],([c,x],D)=>{D(c&&x)}),Oo=()=>{Ze.next(rs.LIVE),K({message:"switch to active live"}),re.log("switch to active live"),N.seekTime(0),N.info.playbackState$.getValue()!==cd.PLAYING&&At.actions.internal.togglePlay()},so=()=>{re.log("skip adman"),_e.skip()},ai=(c=!0)=>{qn(At),K({message:`switch from ads to video, callPlay: ${c}`}),re.log("switch from ads to video",{callPlay:c}),j.set("video"),c&&N.play()},Hi=()=>{qn(At),K({message:"switch from video to ads"}),re.log("switch from video to ads"),At.actions.internal.pause(),qe(),j.set("ads")},ds=c=>{qn(At);let x=c?"LiveWaitingStart":"thumb";re.log("set live waiting start",{state:c,playerPhase:x}),j.set(x)},ul=c=>{qn(At);let x=c?"LiveWaitingRecover":"thumb";re.log("set live waiting recover",{state:c,playerPhase:x}),j.set(x)},Hd=c=>{qn(At);let x=c?"LiveWaitingRecord":"thumb";re.log("set live waiting record",{state:c,playerPhase:x}),j.set(x)},_u=()=>(qn(At),re.log("get debug text data"),Kg(N,Re,At)),Fd=()=>(qn(At),JSON.stringify(Le.getFinishedSpans())),bu=()=>(qn(At),Qg(N,Re,At)),Ms=()=>Ne,Ud=()=>{K({message:"toggle chromecast"}),re.log("toggle chromecast"),N.toggleChromecast()},pl=c=>{var D;if(qn(At),N.info.isEnded$.getValue())return;let x=!c;if(Te(At.playerPhase)==="ads"){K({message:`pause ads, internalCall: ${x}`}),re.log("pause ads",{internalCall:x}),_e.pause();return}K({message:`pause video, internalCall: ${x}`}),re.log("pause video",{internalCall:x}),x&&((D=l==null?void 0:l.onPause)==null||D.call(l)),N.pause()},zd=c=>{var D;qn(At);let x=!c;if(Te(At.playerPhase)==="ads"){K({message:`play ads, internalCall: ${x}`}),re.log("play ads",{internalCall:x}),_e.play();return}K({message:`play video, internalCall: ${x}`}),re.log("play video",{internalCall:x}),x&&((D=l==null?void 0:l.onPlay)==null||D.call(l)),N.play()},qd=c=>{qn(At);let x=!c;if(Te(At.playerPhase)==="ads"){K({message:"player cannot be stopped during ads via external method"});return}K({message:`player will be stopped, internalCall: ${x}`}),A==null||A()},Wd=(c,x)=>{qn(At),K({message:`first start, show ads: ${c}, internalCall: ${!x}`}),re.log("first start",{showAds:c,external:x}),c?j.set("ads"):(j.set("video"),x?N.play():At.actions.internal.togglePlay())},xa=()=>(K({message:"getting time codes"}),v),Kd=()=>{let c=xa();if(!c||[0,1].includes(c.length))return;let x=N.info.position$.getValue();return c.find(D=>D.time>x)},$u=c=>{let x=c;x||(x=Kd());let D=N.info.position$.getValue();re.log("seek to next episode",q({currentTime:D},x)),x&&(K({message:"seek to next episode"}),Ao(x.time,rs.EPISODE,!0))},Qd=()=>{let c=xa();if(!c||[0,1].includes(c.length))return;let x=N.info.position$.getValue(),D=c.findIndex(Qe=>Qe.time>x),ce=D===-1?c.length-2:D-2;if(!(ce<0))return c[ce]},Ke=c=>{let x=c;x||(x=Qd());let D=N.info.position$.getValue();re.log("seek to prev episode",q({currentTime:D},x)),x&&(K({message:"seek to prev episode"}),Ao(x.time,rs.EPISODE,!0))},li=()=>(K({message:"getting preview thumbs data"}),re.log("get preview thumbs data",q({},$)),$),Yo=()=>kt(void 0,null,function*(){let c=ie==null?void 0:ie.isActive(),x="none";ie!=null&&ie.isActive()?(x="remove",yield ie==null?void 0:ie.remove()):(x="request",yield ie==null?void 0:ie.request()),re.log("toggle picture in picture",{isActive:c,action:x})}),Ls=(c=-90)=>{re.log("rotate video",{alphaDiff:c}),ft.update(x=>x+c)},ho=de([]);T==null||T.subscribe(c=>{let x=[];for(let D=0;D<c.length;D++){let{range:[ce,Qe],subjects:wt}=c[D];D===0&&ce!==0&&x.push({time:0,text:"",interactive:!1,completed:!0}),x.push({time:ce/1e3,text:"",interactive:!0,completed:ae.features.interactiveTimeOpenUri?!wt.length||wt.every(Nt=>Nt.isRemoved):!wt.length}),Qe!==1/0&&x.push({time:Qe/1e3,text:"",interactive:!1,completed:!0})}ho.set(x)});let B1=de(!1);E==null||E.subscribe(c=>{c&&Te(vn)&&Vi()});let zm=c=>{if(!C)return c;let x=Te(ho),D=Te(qi),Qe=Te(ln)/D,wt=x.find(Nt=>Nt.interactive&&!Nt.completed&&Nt.time>Qe);return typeof(wt==null?void 0:wt.time)=="number"?Math.min(c,wt.time-.05):c},O1=()=>{At.ui.episodes.panelOpened$.set(!1)},H1=()=>{re.log("destroy store"),clearTimeout(Ft),clearTimeout(at),dt.unsubscribe(),Xt.unsubscribe(),N.destroy(),_e.destroy(),me==null||me.destroy(),Ge==null||Ge.destroy(),gt.unsubscribe(),Fe==null||Fe.disconnect(),Fe=null,we.destroy()},At={interfaceLanguage$:qt,isCyrillicRelatedInterface$:Wt,initVideo:Ue,videoId:i,isClip:o,playerPhase:Ce,vsid:Se,state:{positionExact$:Rt,positionWithScrubbing$:vi,duration$:qi,playbackState$:So,isPlaying$:Cn,isLoaderVisible:zo,bufferedProgress$:pn,isLive$:ii,canChangePlaybackSpeed$:pi,isActiveLive$:Tn,isOldestAvailableLive$:Bi,isRewindableLive$:Io,isEnded$:X,muted$:fi,volume$:ri,trafficSavingEnabled$:si,highQualityEnabled$:ut,autoQualityLimitingAvailable$:mo,availableVideoStreams$:Tr,availableAudioStreams$:lr,videoStream$:In,audioStream$:Kn,currentQuality$:dr,isAutoQualityEnabled$:dn,availableQualities$:Gn,currentPlaybackRate$:cn,availablePlaybackRates$:Pn,currentSubtitle$:Xi,availableTextTracks$:An,availableSubtitlesList$:Do,currentSubtitleCaptions$:cr,isAutoSubtitleCaptionVisible$:un,chromecastState$:oi,chromecastDeviceName$:vo,chromecastConnected$:ko,currentFormat$:Sn,throughputEstimation$:Zi,videoBitrate$:Co,videoSize$:di,errorLog$:Je,crashed$:Et,isAudioAvailable$:To,isAudioDisabled:!!s,canDownload:ae.features.download&&!!d,availableSources$:ur,hasMpegSources$:Go,isInteractive:C,showInteractiveGraph:ae.features.interactiveGraph,showSeekToInteractive:ae.features.seekToInteractive,showPlayPrevChapter:ae.features.interactivePlayPrevChapter,showInteractiveTimeIndicator:ae.features.interactiveTimeIndicator&&!!Te(ho).length,interactiveEpisodes$:ho,isInteractiveTime$:E?Jt(E):de(!1),isInteractiveExpectation$:B1,hasInteractiveBranches:I,playPrevChapterDisabledTooltip:V,looped$:Ci,loadedMetadata$:de(!1),isAutoQualityAvailable$:Ko},ui:{t:ve,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:H.length?H.reduce(c=>[...c,de(void 0)],[]):[],disabledControls$:se},modals:{hotKeyMap:{show:de(!1),data:de({title:"",closeBtnText:"",groups:[]})}},isFullscreen:De,isFullscreenOpenedByKeyboard:Xe,rotateAlpha:ft,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:Ee,isMobile:ei,mobileNotReportControlHidden$:ro,mobileUnmuteButtonExpanded:de(!1),mobileUnmuteButtonVisible:de(!1),icon3DVideoVisible:de(!1),scrubbingInProgress:vn,volumeChangingInProgress:hi,is3DVideo:de(!1),currentGridType$:It,additionalButtonsDeprecated$:ni,additionalDesktopControlPanelRightButtons$:Vr,additionalSettingsMenuItems$:Wr,additionalContextMenuItems$:ya,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)},aboutToGoNextVideo:de(void 0),userActionsDisabled:de(!1)},ads:{position:de(0),duration:de(0),playbackState:de("inactive"),canSkip:de(!1),secondsToWatchBeforeSkip:de(0),postrollPassed:de(!1)},webApi:{pictureInPictureApi:ie,annotationsApi:G},actions:{internal:{preload:xi,firstStart:c=>Wd(c,!1),play:()=>zd(!1),pause:()=>pl(!1),togglePlay:to,toggleMuted:Yn,openSettingsMenu:kr,closeSettingsMenu:pr,openSettingsSubMenu:fn,closeSettingsSubMenu:Zn,setVolume:ci,startVolumeChanging:Mo,stopVolumeChanging:ui,setVideoStream:Qn,setAudioStream:go,setQuality:wi,setTrafficSavingEnabled:no,setHighQualityEnabled:Wi,setPlaybackRate:tr,incrementPlaybackRate:Er,decrementPlaybackRate:Pr,setSubtitle:Vn,toggleSubtitle:Rn,togglePictureInPicture:Yo,startScrubbing:qr,progressScrubbing:vr,completeScrubbing:Pt,toggleChromecast:Ud,switchToActiveLive:Oo,switchFromAdsToVideo:ai,switchFromVideoToAds:Hi,skipAd:so,setLiveWaitingStart:ds,setLiveWaitingRecover:ul,setLiveWaitingRecord:Hd,getDebugTextData:_u,getTraceTextData:Fd,getDebugPanelData:bu,getVideoElement:Ms,seekTime:(c,x,D)=>Ao(c,x,D),clearDelayedBufferingCheckTimeout:oo,seekEpisodeStartTime:Ar,seekToPercent:Bo,getNextEpisode:Kd,seekToNextEpisode:$u,getPrevEpisode:Qd,seekToPrevEpisode:Ke,startLogging:Ni,stopLogging:Pi,startCameraManualRotation:Ui,stopCameraManualRotation:ji,moveCameraFocusPX:Yi,holdCamera:Lt,releaseCamera:yt,getVideoEpisodes:xa,getPreviewThumbsData:li,downloadVideo:Ln,addLanguage:Ep,setLanguage:jt,nextMovie:ct,videoRotate:Ls,correctSeekTimeToInteractive:zm,replayInteractive:P,setLooped:Jn,reportProblem:mt,setAutoplayNextEnabled:Ht,setTimerNextVideoRunning:Mi,prevVideoClick:Po,nextVideoClick:st,nextVideoAnnouncementShow:mi,nextVideoAnnouncementClick:Ji,nextVideoAnnouncementAuto:eo,nextVideoAnnouncementCancel:Li},external:{firstStart:c=>Wd(c,!0),play:()=>zd(!0),pause:()=>pl(!0),stop:()=>qd(!0),seekTime:c=>fr(c),seekEpisodeStartTime:c=>Lr(c),setPlaybackRate:c=>mr(c),setAutoQualityLimits:c=>Mr(c),setMuted:No,toggleSubtitle:Rn,setVolume:ci,returnFocusToEpisodes:O1,updateAdditionalSettingsItem:dl,addAdditionalSettingsItem:Ps,removeAdditionalSettingsItem:cl,updateAdditionalContextItem:As,addAdditionalContextItem:_t,removeAdditionalContextItem:ht,updateAdditionalButton:ba,addAdditionalButton:Es,removeAdditionalButton:ll,setLiveLowLatency:$a}},callbacks:l,setUiCallbacks:c=>{et=q({},c)},getAdmanWrapper:()=>_e,getLogger:()=>pe,getPlayer:()=>N,destroy:H1};return At};function ca(t,e,i,o){var $;let n=["interactiveTimeIndicator"],a=($=e[i])==null?void 0:$.getBoundingClientRect(),s=(o||n.includes(i))&&!!a&&!!(a.right-a.left),{top:d,left:l,bottom:u,right:v}=el(e[i],t||void 0);return{left:s?l:0,right:s?v:0,top:s?d:0,bottom:s?u:0,isDisplayed:s}}var il=(t,e,i,o)=>{if(t)for(let[n,a]of Object.entries(e))["tooltipPointerOffsetX","disabledControls$","additionalButtons"].includes(n)||a.set(ca(t,i,n,o))};var Xc=(t,e,i)=>kt(void 0,null,function*(){yield $o(),e&&i&&(i.focus(),t.set(!1))});var U2=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M18 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m-6 4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m-6 0c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"></path></svg>');function Tf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=U2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"dots-icon",role:"img"},i))),b(t,o)}function If(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(l,"$contextMenuVisible$",i),a=f(e,"disabled",3,!1),s=f(e,"ariaLabel",3,""),d=Ie(),l=d.ui.contextMenu.visible$,u=d.ui.contextMenu.openedByBtnKeyboard$,v=d.ui.contextMenu.showContextMenuBtn$,$=d.ui.contextMenu.position$,p=d.ui.contextMenu.btnRef$,_=ee(void 0);We(()=>{r(_)&&bt(()=>{p.set(r(_))})});let w=E=>{let P=xs(E),A=Lh(r(_));$.set(A),u.set(P),l.set(!n())},y=()=>{v.set(!0)},C=()=>{v.set(!1)},T=m(()=>n()?"opened":"");Vt(t,{get className(){return r(T)},testId:"btn-context-menu",get disabled(){return a()},get ariaLabel(){return s()},click:w,focus:y,blur:C,get ariaExpanded(){return n()},get ref(){return r(_)},set ref(E){B(_,fe(E))},children:(E,P)=>{Tf(E,{})},$$slots:{default:!0}}),z(),o()}var z2=t=>{t.stopPropagation()},q2=L("<div><!> <div></div> <div></div></div>"),W2={hash:"svelte-od3veb",code:`.interactive-episode-icon-animated.svelte-od3veb {position:absolute;top:16px;right:16px;width:32px;height:32px;transition:0.3s;opacity:1;}.interactive-episode-icon-animated.icon-small.svelte-od3veb {width:28px;height:28px;}.invisible.svelte-od3veb {opacity:0;visibility:hidden;}.fullscreen.svelte-od3veb:not(.mobile) {width:40px;top:19px;right:23px;height:40px;}.mobile.svelte-od3veb {width:28px;height:28px;top:12px;right:14px;}.fullscreen.mobile.svelte-od3veb {width:32px;height:32px;}
231
231
 
232
232
  @media screen and (orientation: portrait) {.interactive-episode-icon-animated.mobile.fullscreen.svelte-od3veb {top:40px;right:16px;}
233
233
  }
@@ -252,7 +252,7 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
252
252
  opacity: 0;
253
253
  }
254
254
  }.pulse.svelte-od3veb {display:block;content:'';border:1px solid #fff;position:absolute;top:0;left:0;right:0;bottom:0;border-radius:100%;transform:scale(1.8);
255
- animation: 1s svelte-od3veb-pulse infinite;transition:0.3s;pointer-events:none;}.pulse.paused.svelte-od3veb {animation-play-state:paused;}.interactive-episode-icon-animated svg {width:100%;height:100%;}.ref-block.svelte-od3veb {position:absolute;top:0;width:100%;height:100%;visibility:hidden;}.hidden.svelte-od3veb {display:none;}`};function fd(t,e){var G;U(e,!0),W(t,W2);let[i,o]=Be(),n=()=>S(C,"$isMobile",i),a=()=>S(A,"$areControlsVisible",i),s=()=>S(V,"$currentGridType$",i),d=()=>S(E,"$isInteractiveTime$",i),l=()=>S(y,"$interactiveControlsOpacity$",i),u=()=>S(P,"$showInteractiveTimeIndicatorTooltip$",i),v=()=>S(T,"$isFullscreen",i),$=f(e,"ref",15,void 0),p=ee(void 0),_=Ie(),w=fo(),{interactiveControlsOpacity$:y}=w,C=_.ui.isMobile,T=_.ui.isFullscreen,E=_.state.isInteractiveTime$,P=w.showInteractiveTimeIndicatorTooltip$,A=_.ui.controlsVisible,I=(G=_.callbacks)==null?void 0:G.onInteractiveTimeIndicatorClick,V=_.ui.currentGridType$,H=m(()=>!n()&&a()),Y=m(()=>Cs(s(),"s")),O=m(()=>!d()||!!l()||r(H)),J=ee(!1);We(()=>{B(J,fe(r(O)))});let ne=()=>{B(J,!0)},Z=()=>{var K;me(),(K=r(p))==null||K.addEventListener("animationiteration",ne,{once:!0})},me=()=>{var K;B(J,!1),(K=r(p))==null||K.removeEventListener("animationiteration",ne)},le=K=>{P.set(K)},Ve=m(()=>u()&&!r(O));We(()=>{u()?Z():me()});let Me=()=>{r(O)||(P.set(!0),I==null||I())};yn(()=>{P.clearTimeout(),me()});let be=()=>{P.set(!1)},ae=F("tooltip_interactive_interaction_time_indicator");var Le=q2();let re;Le.__mousemove=[z2],Le.__click=Me;var N=h(Le);Vo(N,{tooltipContent:ae,get tooltipActive(){return r(Ve)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:le,get ref(){return $()},set ref(K){$(K)},children:(K,Re)=>{nd(K,{completed:!0})},$$slots:{default:!0}});var pe=M(N,2);let _e;pt(pe,K=>$(K),()=>$());var Ge=M(pe,2);let ie;pt(Ge,K=>B(p,K),()=>r(p)),g(Le),k((K,Re,Ne)=>{re=te(Le,1,"interactive-episode-icon-animated svelte-od3veb",null,re,K),_e=te(pe,1,"ref-block svelte-od3veb",null,_e,Re),ie=te(Ge,1,"pulse svelte-od3veb",null,ie,Ne)},[()=>({mobile:n(),fullscreen:v(),invisible:r(O),"icon-small":r(Y)}),()=>({hidden:r(O)}),()=>({paused:r(J)})]),St("mouseleave",Le,be),b(t,Le),z(),o()}lt(["mousemove","click"]);function Jc(t,e){U(e,!0);let i=f(e,"tooltipEnabled",3,!0),o=f(e,"disabled",3,!1),n=f(e,"className",3,void 0),a=f(e,"ref",15);Vo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get className(){return n()},get ref(){return a()},set ref(s){a(s)},children:(s,d)=>{var l=ze();let u=m(()=>e.buttonComponent);var v=ue(l);ki(v,()=>r(u),($,p)=>{p($,is(()=>{var _;return(_=e.buttonComponentProps)!=null?_:{}}))}),b(s,l)},$$slots:{default:!0}}),z()}var ss={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var Q2=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M16 10.835V7.5a1 1 0 1 1 2 0v9a1 1 0 0 1-2 0v-3.335l-8.149 4.67C7.03 18.304 6 17.715 6 16.772V7.227c0-.943 1.029-1.533 1.851-1.061L16 10.834z"></path></svg>');function kf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Q2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"26",height:"24",fill:"none","aria-hidden":"true",role:"img"},i))),b(t,o)}function Ts(t,e){let i=f(e,"isPrev",3,!1),o=f(e,"isMobile",3,!1),n=f(e,"width",3,"24"),a=f(e,"height",3,"24"),s=m(()=>i()&&o()?"transform: scaleX(-1) scale(1.3333);":i()?"transform: scaleX(-1);":o()?"transform: scale(1.3333);":void 0),d=m(()=>i()?"prev-icon":"next-icon");kf(t,{get style(){return r(s)},get width(){return n()},get height(){return a()},get viewBox(){return e.viewBox},get"data-testid"(){return r(d)}})}var G2=L('<div class="icon-background-mobile svelte-xtk2k4"></div>'),j2=L("<!> <!>",1),Y2={hash:"svelte-xtk2k4",code:".icon-background-mobile.svelte-xtk2k4 {position:absolute;top:0;left:0;width:100%;height:100%;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);}"};function ua(t,e){U(e,!0),W(t,Y2);let i=f(e,"ref",15,void 0),o=f(e,"isMobile",3,!1),n=f(e,"disabled",3,!1),s=Ie().ui.t,d=m(()=>e.type==="prev"?s("tooltip_previous"):s("tooltip_next")),l=m(()=>e.type==="prev"?s("hotkey_map_item_prev_video_value"):s("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Vt(t,{get className(){return r(u)},get testId(){var v;return`btn-${(v=e.type)!=null?v:""}`},get disabled(){return n()},get ariaLabel(){return r(d)},get click(){return e.click},get ariaKeyShortCut(){return r(l)},get ref(){return i()},set ref(v){i(v)},children:(v,$)=>{var p=j2(),_=ue(p);{var w=T=>{var E=G2();b(T,E)};R(_,T=>{o()&&T(w)})}var y=M(_,2);let C=m(()=>e.type==="prev");Ts(y,{get isMobile(){return o()},get isPrev(){return r(C)}}),b(v,p)},$$slots:{default:!0}}),z()}var Z2=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12 10.096a.4.4 0 0 1-.67.296L7.044 6.493a.67.67 0 0 1 0-.986l4.288-3.899a.4.4 0 0 1 .669.296V5a8 8 0 1 1-8 8 1 1 0 1 1 2 0 6 6 0 1 0 6-6z"></path></svg>');function md(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Z2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"replay-icon",role:"img"},i))),b(t,o)}import{noop as X2}from"@vkontakte/videoplayer-shared/es2015";var J2=L('<div class="icon-background-mobile svelte-1ot3duq"></div>'),ey=L("<!> <div><!></div>",1),ty={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function ol(t,e){U(e,!0),W(t,ty);let i=f(e,"ref",15,void 0),o=f(e,"isMobile",3,!1),n=f(e,"disabled",3,!1),a=f(e,"className",3,""),s=f(e,"click",3,X2),d=F("tooltip_restart"),l=m(()=>`${o()?"btn-m--play":""} ${a()}`);Vt(t,{get className(){return r(l)},testId:"btn-replay",ariaLabel:d,get disabled(){return n()},get click(){return s()},get ariaKeyShortCut(){return Hr.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,v)=>{var $=ey(),p=ue($);{var _=T=>{var E=J2();b(T,E)};R(p,T=>{o()&&T(_)})}var w=M(p,2);let y;var C=h(w);md(C,{}),g(w),k(T=>y=te(w,1,"svelte-1ot3duq",null,y,T),[()=>({mobile:o()})]),b(u,$)},$$slots:{default:!0}}),z()}var iy=ye('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="play-icon"><path d="M17.671 10.923c.82.483.82 1.67 0 2.154l-8.787 5.175A1.25 1.25 0 0 1 7 17.174V6.826a1.25 1.25 0 0 1 1.884-1.078l8.787 5.175z"></path></svg>');function Sr(t,e){"use strict";let i=f(e,"width",3,"24"),o=f(e,"height",3,"24"),n=f(e,"viewBox",3,"0 0 24 24"),a=f(e,"fill",3,"var(--btn-color)");var s=iy(),d=h(s);g(s),k(()=>{Fe(s,"width",i()),Fe(s,"height",o()),Fe(s,"viewBox",n()),Fe(d,"fill",a())}),b(t,s)}var oy=ye('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="pause-icon"><path d="M8.712 5c.448 0 .61.047.774.134a.913.913 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134H6.788c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.913.913 0 0 1 .38-.38C6.178 5.047 6.34 5 6.788 5h1.924zm8 0c.448 0 .61.047.774.134a.914.914 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134h-1.924c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.914.914 0 0 1 .38-.38c.164-.087.326-.134.774-.134h1.924z"></path></svg>');function as(t,e){"use strict";let i=f(e,"width",3,"24"),o=f(e,"height",3,"24"),n=f(e,"viewBox",3,"0 0 24 24"),a=f(e,"fill",3,"var(--btn-color)");var s=oy(),d=h(s);g(s),k(()=>{Fe(s,"width",i()),Fe(s,"height",o()),Fe(s,"viewBox",n()),Fe(d,"fill",a())}),b(t,s)}import{noop as ny}from"@vkontakte/videoplayer-shared/es2015";var ry=L('<div class="icon-background-mobile svelte-1ot3duq"></div>'),sy=L("<!> <div><!></div>",1),ay={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function nl(t,e){U(e,!0),W(t,ay);let[i,o]=Be(),n=()=>S(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=fo(),s=f(e,"ref",15,void 0),d=f(e,"isMobile",3,!1),l=f(e,"isPlaying",3,!1),u=f(e,"disabled",3,!1),v=f(e,"className",3,""),$=f(e,"click",3,ny),_=Ie().ui.t,{toggle:w}=a,y=m(()=>w),C=m(()=>n()!==null),T=m(()=>r(C)?n():l()),E=m(()=>r(T)?_("tooltip_pause"):_("tooltip_play")),P=m(()=>r(T)?as:Sr),A=m(()=>`${d()?"btn-m--play":""} ${v()}`),I=m(()=>r(C)?r(y):$());Vt(t,{get className(){return r(A)},testId:"btn-play",get click(){return r(I)},get disabled(){return u()},get ariaLabel(){return r(E)},get ariaKeyShortCut(){return Hr.KeyK},get ref(){return s()},set ref(V){s(V)},children:(V,H)=>{var Y=sy();let O=m(()=>r(P));var J=ue(Y);{var ne=Ve=>{var Me=ry();b(Ve,Me)};R(J,Ve=>{d()&&Ve(ne)})}var Z=M(J,2);let me;var le=h(Z);ki(le,()=>r(O),(Ve,Me)=>{Me(Ve,{})}),g(Z),k(Ve=>me=te(Z,1,"svelte-1ot3duq",null,me,Ve),[()=>({mobile:d()})]),b(V,Y)},$$slots:{default:!0}}),z(),o()}var ly=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12.583 12.917v2.496a1 1 0 0 1-1.522.853l-5.583-3.413a1 1 0 0 1 0-1.706l5.583-3.413a1 1 0 0 1 1.522.853v2.496l5.478-3.349a1 1 0 0 1 1.522.853v6.826a1 1 0 0 1-1.522.853z"></path></svg>');function Ef(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=ly();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"play-prev-chapter-icon",role:"img"},i))),b(t,o)}function vd(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"hidden",3,!1),n=f(e,"disabled",3,!1),a=F("tooltip_interactive_go_back"),s=m(()=>o()?"hidden":"");Vt(t,{get className(){return r(s)},testId:"btn-play-prev-chapter",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Ef(d,{})},$$slots:{default:!0}}),z()}var dy=L('<span class="gutter svelte-et3q1q"><span><!></span></span>'),cy={hash:"svelte-et3q1q",code:".gutter.svelte-et3q1q {--gutterWidth: 32px;--gutterHeight: 12px;--togglerWidth: 18px;--togglerHeight: 18px;--togglerGap: calc(var(--togglerWidth) / 6);position:relative;width:var(--gutterWidth);height:var(--gutterHeight);background-color:rgba(255, 255, 255, 0.3);border-radius:50px;}.toggler.svelte-et3q1q {position:absolute;top:calc(((var(--togglerHeight) - var(--gutterHeight)) / 2) * -1);left:0;display:flex;align-items:center;justify-content:center;width:var(--togglerWidth);height:var(--togglerHeight);background-color:rgba(98, 99, 100, 1);border-radius:50%;transform:translateX(calc(var(--togglerGap) * -1));transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:ease;}.toggler.enabled.svelte-et3q1q {background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)));}"};function gd(t,e){U(e,!0),W(t,cy);let[i,o]=Be(),n=()=>S(d,"$autoplayNextEnabled$",i),a=f(e,"ref",15,void 0),s=Ie(),d=s.ui.autoplayNextEnabled$,l=s.actions.internal.setAutoplayNextEnabled;Vt(t,{click:()=>{l(!n(),!0)},get ref(){return a()},set ref(v){a(v)},children:(v,$)=>{var p=dy(),_=h(p);let w;var y=h(_);{var C=E=>{Sr(E,{width:"14",height:"14",fill:"#000"})},T=E=>{as(E,{width:"14",height:"14",fill:"#000"})};R(y,E=>{n()?E(C):E(T,!1)})}g(_),g(p),k(E=>w=te(_,1,"toggler svelte-et3q1q",null,w,E),[()=>({enabled:n()})]),b(v,p)},$$slots:{default:!0}}),z(),o()}var uy=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.726 4.845C16.187 4.8 15.496 4.8 14.5 4.8H7.9a.9.9 0 1 1 0-1.8h6.639c.947 0 1.713 0 2.333.05.64.053 1.204.163 1.726.43a4.4 4.4 0 0 1 1.923 1.922c.266.523.377 1.087.429 1.726.05.62.05 1.386.05 2.334v5.076c0 .948 0 1.714-.05 2.334-.052.64-.163 1.203-.43 1.726a4.4 4.4 0 0 1-1.922 1.922c-.522.267-1.086.377-1.726.43-.62.05-1.386.05-2.333.05H7.9a.9.9 0 1 1 0-1.8h6.6c.995 0 1.687 0 2.226-.045.528-.043.828-.123 1.055-.238a2.6 2.6 0 0 0 1.136-1.137c.115-.226.195-.527.239-1.055.044-.538.044-1.23.044-2.225v-5c0-.995 0-1.687-.044-2.226-.043-.527-.124-.828-.239-1.054a2.6 2.6 0 0 0-1.136-1.137c-.227-.115-.527-.195-1.055-.238" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M7.76 11.169V8.908c0-.708.704-1.143 1.252-.774l4.594 3.093c.525.353.525 1.193 0 1.546l-4.594 3.093c-.548.369-1.252-.066-1.252-.774v-2.261l-4.508 3.035C2.704 16.235 2 15.8 2 15.091V8.908c0-.708.704-1.143 1.252-.774z"></path></svg>');function Pf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=uy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"seek-to-interactive-icon",role:"img"},i))),b(t,o)}function hd(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"hidden",3,!1),n=f(e,"disabled",3,!1),a=F("tooltip_interactive_seek"),s=m(()=>o()?"hidden":"");Vt(t,{get className(){return r(s)},testId:"btn-seek-to-interactive",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Pf(d,{})},$$slots:{default:!0}}),z()}var py=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.777 3h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.2.72.523.923.918.141.277.19.557.21.814.02.237.02.521.02.83V7.19c0 .31 0 .594-.02.831-.02.256-.069.537-.21.813a2.1 2.1 0 0 1-.923.92c-.278.14-.56.188-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.919 2.1 2.1 0 0 1-.21-.813 8 8 0 0 1-.02-.63l-2.198-.002c-.495-.001-.81 0-1.05.018-.23.019-.309.05-.343.067a.8.8 0 0 0-.352.35c-.017.034-.049.113-.068.341-.02.24-.02.554-.02 1.046v5.57c0 .49 0 .804.02 1.043.019.228.05.306.068.34.077.15.2.273.35.35.035.017.113.049.342.067.24.02.555.021 1.048.022l2.203.003a8 8 0 0 1 .02-.627c.02-.256.069-.537.21-.813.203-.396.526-.718.923-.92.278-.14.56-.189.817-.21.238-.019.524-.019.834-.019h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.201.72.523.923.919.141.276.19.557.21.813.02.237.02.522.02.831v1.397c0 .31 0 .594-.02.831-.02.256-.069.537-.21.814a2.1 2.1 0 0 1-.923.919c-.278.14-.56.189-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.918 2.1 2.1 0 0 1-.21-.814 8 8 0 0 1-.02-.63l-2.24-.002c-.449 0-.839-.001-1.16-.028-.341-.028-.684-.09-1.016-.259a2.6 2.6 0 0 1-1.14-1.137c-.17-.33-.231-.672-.259-1.011-.026-.321-.026-.71-.026-1.156v-1.921H2.905A.903.903 0 0 1 2 11.992c0-.498.405-.901.905-.901h5.227V9.177c0-.448 0-.837.026-1.159.028-.34.09-.682.26-1.013a2.6 2.6 0 0 1 1.144-1.138c.332-.168.676-.23 1.017-.257.323-.025.714-.025 1.164-.024l2.23.003a8 8 0 0 1 .02-.627c.02-.257.069-.537.21-.814.203-.395.526-.717.923-.919.278-.14.56-.189.817-.21C16.18 3 16.467 3 16.777 3m-.833 1.837a1 1 0 0 1 .146-.02 10 10 0 0 1 .72-.014h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.021.3.3 0 0 1 .126.126 1 1 0 0 1 .021.145c.013.156.014.365.014.716v1.334c0 .352 0 .561-.014.716a1 1 0 0 1-.02.146.3.3 0 0 1-.127.125 1 1 0 0 1-.146.022c-.156.012-.366.013-.719.013H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.022.3.3 0 0 1-.126-.125 1 1 0 0 1-.021-.146 10 10 0 0 1-.014-.716V5.824c0-.351.001-.56.014-.716a1 1 0 0 1 .021-.145.3.3 0 0 1 .126-.126Zm0 11.018a1 1 0 0 1 .146-.022c.156-.012.366-.013.72-.013h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.022.3.3 0 0 1 .126.125 1 1 0 0 1 .021.146c.013.155.014.364.014.716v1.334c0 .351 0 .56-.014.716a1 1 0 0 1-.02.145.3.3 0 0 1-.127.126 1 1 0 0 1-.146.02c-.156.014-.366.014-.719.014H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.021.3.3 0 0 1-.126-.126 1 1 0 0 1-.021-.145 10 10 0 0 1-.014-.716v-1.334c0-.352.001-.561.014-.716a1 1 0 0 1 .021-.146.3.3 0 0 1 .126-.125Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M15.2 5.899v1.203c0 .594 0 .892.115 1.119.102.2.265.362.464.463.227.116.525.116 1.12.116H18.1c.595 0 .892 0 1.12-.116.199-.101.361-.264.463-.463.116-.227.116-.525.116-1.12V5.9c0-.595 0-.892-.116-1.12a1.06 1.06 0 0 0-.464-.463c-.227-.116-.524-.116-1.119-.116h-1.203c-.594 0-.892 0-1.119.116-.2.102-.362.264-.464.464-.115.227-.115.524-.115 1.119Zm-.051 11.03v1.143c0 .605 0 .908.118 1.139.103.203.268.368.472.472.23.117.533.117 1.138.117H18.1c.605 0 .907 0 1.138-.117a1.08 1.08 0 0 0 .472-.472c.118-.231.118-.534.118-1.139v-1.144c0-.605 0-.907-.118-1.138a1.08 1.08 0 0 0-.472-.472c-.231-.118-.534-.118-1.138-.118h-1.224c-.605 0-.907 0-1.138.118a1.08 1.08 0 0 0-.472.472c-.118.23-.118.533-.118 1.138Z" class="_closed" clip-rule="evenodd"></path></svg>');function Af(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=py();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true",role:"img"},i))),b(t,o)}var fy={hash:"svelte-17ceof5",code:'svg[data-testid="graph-open-icon"] ._closed {visibility:hidden;opacity:0;}'};function Mf(t,e){W(t,fy);let i=f(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Af(t,{get"data-testid"(){return r(o)}})}function _d(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"hidden",3,!1),n=f(e,"disabled",3,!1),a=f(e,"graphIsOpened",3,!1),d=Ie().ui.t,l=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Vt(t,{get className(){return r(u)},testId:"btn-graph",get disabled(){return n()},get ariaLabel(){return r(l)},get click(){return e.click},get ref(){return i()},set ref(v){i(v)},children:(v,$)=>{let p=m(()=>!!a());Mf(v,{get isOpened(){return r(p)}})},$$slots:{default:!0}}),z()}import{PlaybackState as Jh}from"@vkontakte/videoplayer-core/es2015";function bd(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(u,"$playbackState$",i),a=f(e,"isMobile",3,!1),s=f(e,"isLiveActive",3,!1),d=f(e,"ariaLabel",3,""),l=Ie(),u=l.state.playbackState$,v=l.actions.internal.switchToActiveLive,$=l.actions.internal.togglePlay,p=m(()=>()=>{if(!s()){v();return}n()===Jh.PAUSED&&$()}),_=m(()=>a()?"":"btn--live btn-full-opacity"),w=m(()=>s()?"btn-live":"btn-live-offset"),y=m(()=>s()&&n()===Jh.PLAYING);Vt(t,{get className(){return r(_)},get testId(){return r(w)},get disabled(){return r(y)},get ariaLabel(){return d()},get click(){return r(p)},children:(C,T)=>{ql(C,{get isActive(){return s()}})},$$slots:{default:!0}}),z(),o()}import{noop as e1}from"@vkontakte/videoplayer-shared/es2015";var my=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),vy=L('<img class="icon" aria-hidden="true">');function pa(t,e){"use strict";let i=ee(!1),o=()=>{B(i,!0)};var n=ze(),a=ue(n);{var s=l=>{var u=my();b(l,u)},d=l=>{var u=vy();k(()=>Fe(u,"src",e.icon)),St("error",u,o),Ws(u),b(l,u)};R(a,l=>{r(i)?l(s):l(d,!1)})}b(t,n)}function Lf(t,e){U(e,!0);let i=f(e,"disabled",3,!1),o=f(e,"onClick",3,e1),n=f(e,"ref",15),a=m(()=>o()===e1),s=m(()=>r(a)||i()),d=m(()=>r(a)?"btn-full-opacity":"");Vo(t,{get disabled(){return r(s)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get ref(){return n()},set ref(l){n(l)},children:(l,u)=>{let v=m(()=>{var $;return($=e.testId)!=null?$:e.id});Vt(l,{get className(){return r(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(s)},get testId(){return r(v)},children:($,p)=>{pa($,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),z()}var t1=t=>!!t.buttonComponent;var ls={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var by=L('<div><!> <div class="controls svelte-1iedtj3"><div class="controls-left svelte-1iedtj3"><!> <!> <!></div> <div class="controls-right svelte-1iedtj3"></div></div></div> <!>',1),$y={hash:"svelte-1iedtj3",code:".wrapper-bottom.svelte-1iedtj3 {pointer-events:none;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;height:var(--controls-gradient-height);background:var(--controls-gradient);transition:transform var(--controls-transition-duration) var(--controls-transition-fn);display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;}.wrapper-bottom.svelte-1iedtj3 > :where(.svelte-1iedtj3) {pointer-events:auto;}.controls.svelte-1iedtj3 {width:100%;display:flex;align-items:center;justify-content:space-between;height:var(--controls-height);white-space:nowrap;font-size:13px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);will-change:transform;padding:0 8px 4px;box-sizing:border-box;}.controls-left.svelte-1iedtj3, .controls-right.svelte-1iedtj3 {display:flex;align-content:center;}.controls-left.svelte-1iedtj3 {flex-grow:1;min-width:0;overflow:hidden;}.controls-left.svelte-1iedtj3 > *:not(:first-child), .controls-right.svelte-1iedtj3 > * {margin-left:var(--controls-desktop-item-margin-left);}.controls-hidden.svelte-1iedtj3 {visibility:visible; /* if hidden then slider will lose focus (if was focused) */transform:translateY(100%);}.wrapper-bottom.no-smooth.svelte-1iedtj3 {transition:none;}"};function Rf(t,e){var ya,As;U(e,!0),W(t,$y);let[i,o]=Be(),n=()=>S(pi,"$disabledControls$",i),a=()=>S(Kt,"$adPlaybackState",i),s=()=>S($t,"$playbackState$",i),d=()=>S(ii,"$currentSubtitle$",i),l=()=>S(Xt,"$isEnded$",i),u=()=>S(Sn,"$currentGridType$",i),v=()=>S(Ni,"$isLive$",i),$=()=>S(an,"$chromecastState$",i),p=()=>S(ji,"$isPictureInPictureActive",i),_=()=>S(Yi,"$pictureInPictureType$",i),w=()=>S(X,"$availableSubtitlesList$",i),y=()=>S(fi,"$contextMenuOpenedByKeyboard$",i),C=()=>S(ri,"$showContextMenuBtn$",i),T=()=>S(vo,"$playerSize",i),E=()=>S(Ui,"$isRewindableLive$",i),P=()=>S(Pi,"$isActiveLive$",i),A=()=>S(Io,"$graphIsOpened$",i),I=()=>S(zi,"$contextMenuVisible$",i),V=()=>S(oi,"$isFullscreen",i),H=()=>S(Co,"$autoplayNextEnabled",i),Y=()=>S(r(No),"$prevButton",i),O=()=>S(r(Ci),"$replayButton",i),J=()=>S(r(Jn),"$playButton",i),ne=()=>S(r(mt),"$nextButton",i),Z=()=>S(r(Ht),"$playPrevChapterButton",i),me=()=>S(r(Mi),"$seekToInteractiveButton",i),le=()=>S(r(Po),"$interactiveGraphButton",i),Ve=()=>S(r(st),"$liveButton",i),Me=()=>S(r(Qt),"$time",i),be=()=>S(r(mi),"$episodes",i),ae=()=>S(r(Ji),"$vkLogo",i),Le=()=>S(r(eo),"$volume",i),re=()=>S(r(Li),"$subtitles",i),N=()=>S(r(xi),"$settings",i),pe=()=>S(r(to),"$context",i),_e=()=>S(r(wi),"$fullscreen",i),Ge=()=>S(r(no),"$chromecast",i),ie=()=>S(Zi,"$additionalDesktopControlPanelRightButtons$",i),G=()=>S(zo,"$isInteractiveTime$",i),K=()=>S(Lt,"$settingsMenuVisible",i),Re=()=>S(Pr,"$settingButtonRef$",i),Ne=()=>S(si,"$startedByKeyboard$",i),et=()=>S(qe,"$isAudioAvailable$",i),we=()=>S(ve,"$fakeIsPlaying$",i),Se=()=>S(ln,"$seekToInteractiveDisabledTooltip$",i),De=()=>S(Tt,"$adPosition",i),Xe=()=>S(He,"$position$",i),ot=()=>S(mo,"$adDuration",i),ft=()=>S(nt,"$duration$",i),Je=f(e,"playerControlsWrapperRef",15,void 0),gt=f(e,"playerControlsRef",15,void 0),Et=f(e,"isAds",3,!1),jt=f(e,"logoTargetUrl",3,""),qt=f(e,"isOneVideoPlaylist",3,!1),Wt=f(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:ve}=fo(),j=Ie(),Ce=fo(),se=zt(),Oe=j.actions.internal.toggleMuted,Ue=j.actions.internal.togglePlay,tt=j.actions.internal.pause,ct=j.actions.internal.toggleSubtitle,Ye=(ya=j.callbacks)==null?void 0:ya.onAudioDoesNotExistHint,Ze=(As=j.callbacks)==null?void 0:As.onAudioDisabledHint,nt=j.state.duration$,He=j.state.positionWithScrubbing$,$t=j.state.playbackState$,qe=j.state.isAudioAvailable$,dt=j.state.isAudioDisabled,Xt=j.state.isEnded$,Ni=j.state.isLive$,Pi=j.state.isActiveLive$,Ui=j.state.isRewindableLive$,{isActive$:ji,type$:Yi}=Ce.pictureInPicture$,Lt=j.ui.settingsMenu.visible$,yt=j.ui.settingsMenu.openedByBtnKeyboard$,Rt=j.ui.controls,So=j.actions.internal.getVideoEpisodes(),an=j.state.chromecastState$,X=j.state.availableSubtitlesList$,ii=j.state.currentSubtitle$,pi=Rt.disabledControls$,zi=j.ui.contextMenu.visible$,ri=j.ui.contextMenu.showContextMenuBtn$,fi=j.ui.contextMenu.openedByBtnKeyboard$,si=j.ui.startedByKeyboard$,ut=j.ui.t,mo=j.ads.duration,Tt=j.ads.position,Kt=j.ads.playbackState,oi=j.ui.isFullscreen,vo=j.ui.playerSize,Sn=j.ui.currentGridType$,Zi=j.ui.additionalDesktopControlPanelRightButtons$,Co=j.ui.autoplayNextEnabled$,di=j.actions.internal.getVideoElement,xt=j.actions.internal.replayInteractive,To=j.actions.internal.prevVideoClick,Ai=j.actions.internal.nextVideoClick,Si=j.state.isInteractive,zo=j.state.isInteractiveTime$,oo=j.state.showInteractiveGraph,qi=j.state.showSeekToInteractive,Cn=j.state.showPlayPrevChapter,Tn=j.state.showInteractiveTimeIndicator,Bi=j.state.playPrevChapterDisabledTooltip,ln=Ce.seekToInteractiveDisabledTooltip$,Io=Ce.graphIsOpened$,ko=se.features.interactiveResponsiveUi,Tr=m(()=>n().has("EPISODE_BUTTON")),lr=m(()=>n().has("GRAPH_BUTTON")),In=m(()=>n().has("SEEK_TO_INTERACTIVE_BUTTON")),Kn=m(()=>n().has("PLAY_BUTTON")),Qn=m(()=>n().has("REPLAY_BUTTON")),go=m(()=>n().has("PLAY_PREV_CHAPTER_BUTTON")),qo=()=>j.actions.internal.toggleChromecast(),kn=m(()=>Et()?a()==="playing":s()===Vf.PLAYING),rt=m(()=>d().value!=="off"),Wo=m(()=>l()&&!Et()||Si),dn=m(()=>ko?r(Wo)&&Gi(u(),"m"):r(Wo)),En=m(()=>!l()||Si||Et()),dr=m(()=>Gi(u(),"m")),Ko=m(()=>e.showNextPrevButtons&&Gi(u(),"m")&&!Et()&&e.nextButtonActive),Gn=m(()=>e.showNextPrevButtons&&Gi(u(),"m")&&!Et()&&e.prevButtonActive),cn=m(()=>!Et()&&!!v()),Pn=m(()=>$()!==i1.NOT_AVAILABLE&&!(p()&&_()===1)&&Gi(u(),"m")&&!Si),Oi=m(()=>e.showAutoplayNext&&!qt()&&Gi(u(),"s")),Xi=m(()=>w().length>0&&Gi(u(),"m")),An=m(()=>y()||C()),Ro=m(()=>Gi(u(),"s")&&!Et()),Mn=m(()=>!e.logoHidden&&!Et()),Qo=m(()=>se.features.fullscreen&&(e.logoHidden||Gi(u(),ko?"xs":"s"))&&!(p()&&_()===1)&&(Si?Wt():!0)),Do=m(()=>(!v()||Et())&&!(se.features.interactiveHideTime&&Si)),gi=m(()=>T().width>100),jn=m(()=>oo&&Gi(u(),"m")),Eo=m(()=>ko?qi&&Gi(u(),"s"):qi),cr=m(()=>ko?Cn&&Gi(u(),"s"):Cn),un=m(()=>!Et()&&!v()&&!!(So!=null&&So.length)&&r(dr)&&!r(Tr)),pn=m(()=>!E()||!!P()),ur=m(()=>A()?ut("tooltip_interactive_graph_on"):ut("tooltip_interactive_graph_off")),Go=m(()=>I()?ut("aria_label_context_menu_close"):ut("aria_label_context_menu_open")),Ir=(_t,ht)=>_t?ht&&ht===Vf.PAUSED?ut("tooltip_play"):"":ut("tooltip_live"),Ln=m(()=>Ir(r(pn),s())),Yn=m(()=>se.logoType==="vk_video"?ut("tooltip_vk_video_logo"):ut("tooltip_vk_logo")),pr=m(()=>r(rt)?ut("tooltip_subtitles_on"):ut("tooltip_subtitles_off")),kr=m(()=>V()?ut("tooltip_fullscreen_on"):ut("tooltip_fullscreen_off")),Zn=m(()=>$()===i1.CONNECTED?ut("tooltip_chromecast_on"):ut("tooltip_chromecast_off")),fn=m(()=>H()?ut("tooltip_autoplay_on"):ut("tooltip_autoplay_off")),Xn=ee(0),ci=fe({}),No=m(()=>Rt.prevButton),Ci=m(()=>Rt.replayButton),Jn=m(()=>Rt.playButton),mt=m(()=>Rt.nextButton),Ht=m(()=>Rt.playPrevChapterButton),Mi=m(()=>Rt.seekToInteractiveButton),Po=m(()=>Rt.interactiveGraphButton),st=m(()=>Rt.liveButton),Qt=m(()=>Rt.time),mi=m(()=>Rt.episodes),Ji=m(()=>Rt.vkLogo),eo=m(()=>Rt.volume),Li=m(()=>Rt.subtitles),xi=m(()=>Rt.settings),to=m(()=>Rt.context),wi=m(()=>Rt.fullscreen),no=m(()=>Rt.chromecast),Wi=m(()=>({prevButton:Y()?Y().right-Y().left:0,replayButton:O()?O().right-O().left:0,playButton:J()?J().right-J().left:0,nextButton:ne()?ne().right-ne().left:0,playPrevChapterButton:Z()?Z().right-Z().left:0,seekToInteractiveButton:me()?me().right-me().left:0,interactiveGraphButton:le()?le().right-le().left:0,liveButton:Ve()?Ve().right-Ve().left:0,time:Me()?Me().right-Me().left:0,episodes:be()?be().right-be().left:0,vkLogo:ae()?ae().right-ae().left:0,volume:Le()?Le().right-Le().left:0,subtitles:re()?re().right-re().left:0,settings:N()?N().right-N().left:0,context:pe()?pe().right-pe().left:0,fullscreen:_e()?_e().right-_e().left:0,chromecast:Ge()?Ge().right-Ge().left:0,additionalButtons:ie().length?ie().reduce(_t=>[..._t,40],[]):[]})),mn=ee(0);We(()=>{(!r(mn)||r(mn)<r(Wi).time)&&bt(()=>B(mn,fe(r(Wi).time)))});let er=ee(!1);We(()=>{let _t=0;r(un)&&(Gi(u(),"xl")?_t=r(Wi).time:_t=60);let ht=r(Wi).prevButton+r(Wi).playButton+r(Wi).nextButton+r(Wi).seekToInteractiveButton+r(Wi).interactiveGraphButton+r(Wi).liveButton+r(mn)+_t;B(er,fe(r(Do)&&r(Xn)>=ht))});let tr=m(()=>r(er)&&Gi(u(),"m")),Er=_y(il,260);We(()=>{T(),G(),Er(di(),Rt,ci,e.showControls)});let Pr=de();We(()=>{K(),Re()&&bt(()=>Ga(Re(),K(),yt))});let Vn;We(()=>{Ne(),bt(()=>Xc(si,Ne(),Vn))});function Rn(){ws({isAudioDisabled:dt,audioDisabledHintCallback:Ze,isAudioAvailable:et(),audioIsNotExistHintCallback:Ye})&&Oe()}let Ao=Si?xt:Ue,Ar=m(()=>we()!==null),Bo=m(()=>r(Ar)?we():r(kn)),fr=m(()=>r(Bo)?ut("tooltip_pause"):ut("tooltip_play")),Mr=ut("tooltip_episodes"),Lr=m(()=>{var _t,ht,ro,Oo;return r(Gn)?{id:"prevButton",type:"desktop-control-panel-left",weight:ss.prevButton,buttonComponent:ua,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:To.bind(null,!0)},tooltipEnabled:!((ht=(_t=j.callbacks)==null?void 0:_t.uiInfo)!=null&&ht.onPrevButtonMouseEnter)&&!((Oo=(ro=j.callbacks)==null?void 0:ro.uiInfo)!=null&&Oo.onPrevButtonMouseLeave),mouseEnter:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onPrevButtonMouseEnter)==null||Hi.call(ai,ca(di(),ci,"prevButton",e.showControls))},mouseLeave:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onPrevButtonMouseLeave)==null||Hi.call(ai,ca(di(),ci,"prevButton",e.showControls))},tooltipText:ut("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),mr=m(()=>r(dn)?{id:"replayButton",type:"desktop-control-panel-left",weight:ss.replayButton,buttonComponent:ol,buttonComponentProps:{disabled:r(Qn),click:Ao},tooltipText:ut("tooltip_restart"),disabled:r(Qn)}:void 0),io=m(()=>r(En)?{id:"playButton",type:"desktop-control-panel-left",weight:ss.playButton,buttonComponent:nl,buttonComponentProps:{disabled:r(Kn),isPlaying:r(kn),click:Ue},tooltipText:r(fr),disabled:r(Kn)}:void 0),vn=m(()=>{var _t,ht,ro,Oo;return r(Ko)?{id:"nextButton",type:"desktop-control-panel-left",weight:ss.nextButton,buttonComponent:ua,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:Ai.bind(null,!0)},tooltipEnabled:!((ht=(_t=j.callbacks)==null?void 0:_t.uiInfo)!=null&&ht.onNextButtonMouseEnter)&&!((Oo=(ro=j.callbacks)==null?void 0:ro.uiInfo)!=null&&Oo.onNextButtonMouseLeave),mouseEnter:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onNextButtonMouseEnter)==null||Hi.call(ai,ca(di(),ci,"nextButton",e.showControls))},mouseLeave:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onNextButtonMouseLeave)==null||Hi.call(ai,ca(di(),ci,"nextButton",e.showControls))},tooltipText:ut("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),qr=m(()=>Si&&r(cr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:ss.playPrevChapterButton,buttonComponent:vd,buttonComponentProps:{disabled:r(go),click:e.playPrevChapter},tooltipText:ut("tooltip_interactive_go_back"),disabledTooltipContent:ut(Bi),disabled:r(go)}:void 0),vr=m(()=>Si&&r(Eo)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:ss.seekToInteractiveButton,buttonComponent:hd,buttonComponentProps:{disabled:r(In),click:e.seekToInteractive},tooltipText:ut("tooltip_interactive_seek"),disabled:r(In),disabledTooltipContent:ut(Se())}:void 0),at=m(()=>Si&&r(jn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:ss.interactiveGraphButton,buttonComponent:_d,buttonComponentProps:{disabled:r(lr),click:Io.toggle,graphIsOpened:A()},tooltipText:r(ur)}:void 0),Ft=m(()=>r(cn)?{id:"liveButton",type:"desktop-control-panel-left",weight:ss.liveButton,buttonComponent:bd,buttonComponentProps:{isLiveActive:r(pn),ariaLabel:r(Ln)},tooltipText:r(Ln),disabled:r(pn)&&s()===Vf.PLAYING}:void 0),Vi=m(()=>[r(Lr),r(mr),r(io),r(vn),r(qr),r(vr),r(at),r(Ft)].filter(_t=>!!_t).sort(ia)),xe=m(()=>r(Mn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:ls.vkLogo,buttonComponent:sd,buttonComponentProps:{targetUrl:jt(),logoClickable:e.logoClickable,click:tt},tooltipText:r(Yn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Pt=m(()=>r(Oi)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:ls.autoplayNext,buttonComponent:gd,tooltipText:r(fn)}:void 0),vi=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:ls.volume,buttonComponent:lf,buttonComponentProps:{click:Rn}})),hi=m(()=>r(Xi)?{id:"subtitles",type:"desktop-control-panel-right",weight:ls.subtitles,buttonComponent:of,buttonComponentProps:{isSubtitlesEnabled:r(rt),click:ct},tooltipText:r(pr)}:void 0),Mo=m(()=>r(Ro)?{id:"settings",type:"desktop-control-panel-right",weight:ls.settings,buttonComponent:Ja,buttonComponentProps:{ref$:Pr},tooltipText:K()?void 0:ut("tooltip_settings_off")}:void 0),ui=m(()=>se.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:ls.context,buttonComponent:If,buttonComponentProps:{click:e.toggleFullscreen,ariaLabel:r(Go)},className:r(An)?"":"out-of-view",tooltipText:r(Go)}:void 0),Ee=m(()=>r(Qo)?{id:"fullscreen",type:"desktop-control-panel-right",weight:ls.fullscreen,buttonComponent:rd,buttonComponentProps:{isFullscreen:V(),click:e.toggleFullscreen},tooltipText:r(kr)}:void 0),It=m(()=>r(Pn)?{id:"chromecast",type:"desktop-control-panel-right",weight:ls.chromecast,buttonComponent:ad,buttonComponentProps:{state:$(),click:qo},tooltipText:r(Zn)}:void 0),ei=m(()=>[r(xe),r(Pt),r(vi),r(hi),r(Mo),r(ui),r(Ee),r(It),...ie()].filter(_t=>!!_t).sort(ia));var Ti=by(),ni=ue(Ti);let jo;var gn=h(ni);let Vr=m(()=>!r(gi));la(gn,{get isHidden(){return r(Vr)},get isAds(){return Et()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return E()},get ref(){return ci.timeline},set ref(_t){ci.timeline=_t}});var Dn=M(gn,2),Wr=h(Dn),ba=h(Wr);Ii(ba,17,()=>r(Vi),_t=>_t.id,(_t,ht)=>{Jc(_t,{get buttonComponent(){return r(ht).buttonComponent},get buttonComponentProps(){return r(ht).buttonComponentProps},get tooltipText(){return r(ht).tooltipText},get disabledTooltipContent(){return r(ht).disabledTooltipContent},get disabled(){return r(ht).disabled},get className(){return r(ht).className},get tooltipEnabled(){return r(ht).tooltipEnabled},get mouseEnter(){return r(ht).mouseEnter},get mouseLeave(){return r(ht).mouseLeave},get ref(){return ci[r(ht).id]},set ref(ro){ci[r(ht).id]=ro}})});var Es=M(ba,2);{var ll=_t=>{let ht=m(()=>Et()?De():Xe()),ro=m(()=>Et()?ot():ft());od(_t,{isMobile:!1,get showDuration(){return r(tr)},get position(){return r(ht)},get duration(){return r(ro)},get ref(){return ci.time},set ref(Oo){ci.time=Oo}})};R(Es,_t=>{r(Do)&&_t(ll)})}var $a=M(Es,2);let dl=m(()=>!r(un));Vo($a,{className:"w-max",get disabled(){return r(dl)},tooltipContent:Mr,get ref(){return ci.episodes},set ref(_t){ci.episodes=_t},children:(_t,ht)=>{var ro=ze(),Oo=ue(ro);{var so=ai=>{dd(ai,{get position(){return Xe()},get duration(){return ft()},timeCodes:So})};R(Oo,ai=>{r(un)&&ai(so)})}b(_t,ro)},$$slots:{default:!0}}),g(Wr);var Ps=M(Wr,2);Ii(Ps,21,()=>r(ei),_t=>_t.id,(_t,ht)=>{var ro=ze(),Oo=ue(ro);{var so=Hi=>{Jc(Hi,{get buttonComponent(){return r(ht).buttonComponent},get buttonComponentProps(){return r(ht).buttonComponentProps},get tooltipText(){return r(ht).tooltipText},get disabledTooltipContent(){return r(ht).disabledTooltipContent},get disabled(){return r(ht).disabled},get className(){return r(ht).className},get ref(){return ci[r(ht).id]},set ref(ds){ci[r(ht).id]=ds}})},ai=Hi=>{let ds=m(()=>!!r(ht).disabled);Lf(Hi,{get id(){return r(ht).id},get testId(){return r(ht).testId},get icon(){return r(ht).icon},get ariaLabel(){return r(ht).ariaLabel},get tooltipText(){return r(ht).tooltipText},get disabledTooltipContent(){return r(ht).disabledTooltipContent},get disabled(){return r(ds)},get onClick(){return r(ht).onClick},get ref(){return ci[r(ht).id]},set ref(ul){ci[r(ht).id]=ul}})};R(Oo,Hi=>{t1(r(ht))?Hi(so):Hi(ai,!1)})}b(_t,ro)}),g(Ps),g(Dn),pt(Dn,_t=>gt(_t),()=>gt()),g(ni),pt(ni,_t=>Je(_t),()=>Je());var cl=M(ni,2);{var ir=_t=>{fd(_t,{get ref(){return ci.interactiveTimeIndicator},set ref(ht){ci.interactiveTimeIndicator=ht}})};R(cl,_t=>{Tn&&_t(ir)})}k(_t=>jo=te(ni,1,"wrapper-bottom svelte-1iedtj3",null,jo,_t),[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth})]),Or(Wr,"clientWidth",_t=>B(Xn,_t)),b(t,Ti),z(),o()}import{ChromecastState as n1,PlaybackState as r1}from"@vkontakte/videoplayer-core/es2015";import{noop as o1}from"@vkontakte/videoplayer-shared/es2015";var yy=L('<div class="icon icon-error-stub svelte-167ouw6"><div class="inner svelte-167ouw6"></div></div>'),xy=L('<img class="icon svelte-167ouw6" aria-hidden="true">'),wy={hash:"svelte-167ouw6",code:".icon.svelte-167ouw6 {width:24px !important;height:24px !important;}.inner.svelte-167ouw6 {width:16px;height:16px;background-color:var(--white);}"};function Df(t,e){W(t,wy);let i=f(e,"disabled",3,!1),o=f(e,"onClick",3,o1),n=m(()=>o()===o1),a=m(()=>r(n)||i()),s=ee(!1),d=()=>{B(s,!0)},l=m(()=>r(n)?"btn-full-opacity":"");Vt(t,{get className(){return r(l)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(a)},get testId(){return e.testId},children:(u,v)=>{var $=ze(),p=ue($);{var _=y=>{var C=yy();b(y,C)},w=y=>{var C=xy();k(()=>Fe(C,"src",e.iconUrl)),St("error",C,d),Ws(C),b(y,C)};R(p,y=>{r(s)?y(_):y(w,!1)})}b(u,$)},$$slots:{default:!0}})}var Sy=ye('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" d="M8.695 8.105 5.301 4.71a1 1 0 0 1 1.414-1.415L20.7 17.285a1 1 0 0 1-1.414 1.415L16 15.41V20a1 1 0 0 1-1 1c-.641 0-1.258-.25-1.72-.695L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.765zm2.88-2.77 1.704-1.642A2.48 2.48 0 0 1 15 3a1 1 0 0 1 1 1v5.76l-4.426-4.426Z"></path></g></svg>');function Nf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Sy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"muted-icon",role:"img"},i))),b(t,o)}import{noop as Cy}from"@vkontakte/videoplayer-shared/es2015";var Ty=L('<span class="text svelte-6gmlbk"> </span>'),Iy=L('<div aria-hidden="true"><!> <!></div>'),ky={hash:"svelte-6gmlbk",code:".container.svelte-6gmlbk {display:flex;align-items:center;}.expanded.svelte-6gmlbk {background-color:rgba(0, 0, 0, 0.56);border-radius:6px;}.text.svelte-6gmlbk {font-size:15px;margin-left:8px;}"};function eu(t,e){U(e,!0),W(t,ky);let i=f(e,"muted",3,!1),o=f(e,"expanded",3,!1),n=f(e,"click",3,Cy),a=f(e,"ref",15,void 0),d=Ie().ui.t,l=m(()=>i()?d("tooltip_volume"):d("tooltip_volume_muted")),u=m(()=>o()?Ss:Nf),v=m(()=>o()?"btn-mobile-unmuted":"btn-mobile-muted");Vt(t,{get testId(){return r(v)},get click(){return n()},get ariaLabel(){return r(l)},get ref(){return a()},set ref($){a($)},children:($,p)=>{var _=Iy();let w=m(()=>r(u)),y;var C=h(_);ki(C,()=>r(w),(P,A)=>{A(P,{})});var T=M(C,2);{var E=P=>{var A=Ty(),I=h(A,!0);g(A),k(V=>ge(I,V),[()=>d("mobile_unmute")]),b(P,A)};R(T,P=>{o()&&P(E)})}g(_),k(P=>y=te(_,1,"container svelte-6gmlbk",null,y,P),[()=>({expanded:o()})]),b($,_)},$$slots:{default:!0}}),z()}var Ey=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M7.662 4h6.676c.808 0 1.469 0 2.006.044.556.045 1.058.142 1.526.381a3.9 3.9 0 0 1 1.705 1.704c.239.47.336.971.381 1.527C20 8.193 20 8.854 20 9.662V11.1a.9.9 0 0 1-1.8 0V9.7c0-.855 0-1.442-.038-1.897-.036-.445-.103-.684-.19-.856a2.1 2.1 0 0 0-.919-.918c-.172-.088-.411-.155-.856-.191C15.742 5.8 15.155 5.8 14.3 5.8H7.7c-.855 0-1.442 0-1.897.038-.445.036-.684.103-.856.19a2.1 2.1 0 0 0-.918.919c-.088.172-.155.411-.191.856C3.8 8.258 3.8 8.845 3.8 9.7v2.646c0 .855 0 1.442.038 1.897.036.445.103.683.19.856a2.1 2.1 0 0 0 .919.918c.172.088.411.155.856.191.455.037 1.042.038 1.897.038h2.4a.9.9 0 0 1 0 1.8H7.662c-.808 0-1.469 0-2.006-.044-.556-.045-1.058-.142-1.527-.381a3.9 3.9 0 0 1-1.704-1.704c-.239-.47-.336-.972-.381-1.527C2 13.852 2 13.192 2 12.384V9.662c0-.808 0-1.469.044-2.006.045-.556.142-1.058.381-1.527A3.9 3.9 0 0 1 4.13 4.425c.47-.239.971-.336 1.527-.381C6.193 4 6.854 4 7.662 4M13 16.8c0-.98 0-1.47.19-1.845a1.75 1.75 0 0 1 .766-.764C14.33 14 14.82 14 15.8 14h3.4c.98 0 1.47 0 1.845.19.329.168.596.436.764.766.191.374.191.864.191 1.844v.4c0 .98 0 1.47-.19 1.845a1.75 1.75 0 0 1-.765.764C20.67 20 20.18 20 19.2 20h-3.4c-.98 0-1.47 0-1.845-.19a1.75 1.75 0 0 1-.764-.765C13 18.67 13 18.18 13 17.2z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="m11.643 12.37-.007-.006L9.073 9.8H10.1a.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.022l2.53 2.524.134.134a.9.9 0 0 0 1.272-1.272z" class="hidden-not-active"></path><path fill="var(--btn-color, #fff)" d="m6.357 9.63.007.006L8.927 12.2H7.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.022L7.67 8.397l-.134-.133a.9.9 0 0 0-1.272 1.272z" class="hidden-active"></path></svg>');function Bf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Ey();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(3),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",role:"img"},i))),b(t,o)}var Py={hash:"svelte-tmam00",code:`svg[data-testid="pip-icon--active"] .hidden-active,
255
+ animation: 1s svelte-od3veb-pulse infinite;transition:0.3s;pointer-events:none;}.pulse.paused.svelte-od3veb {animation-play-state:paused;}.interactive-episode-icon-animated svg {width:100%;height:100%;}.ref-block.svelte-od3veb {position:absolute;top:0;width:100%;height:100%;visibility:hidden;}.hidden.svelte-od3veb {display:none;}`};function fd(t,e){var G;U(e,!0),W(t,W2);let[i,o]=Be(),n=()=>S(C,"$isMobile",i),a=()=>S(A,"$areControlsVisible",i),s=()=>S(V,"$currentGridType$",i),d=()=>S(E,"$isInteractiveTime$",i),l=()=>S(y,"$interactiveControlsOpacity$",i),u=()=>S(P,"$showInteractiveTimeIndicatorTooltip$",i),v=()=>S(T,"$isFullscreen",i),$=f(e,"ref",15,void 0),p=ee(void 0),_=Ie(),w=fo(),{interactiveControlsOpacity$:y}=w,C=_.ui.isMobile,T=_.ui.isFullscreen,E=_.state.isInteractiveTime$,P=w.showInteractiveTimeIndicatorTooltip$,A=_.ui.controlsVisible,I=(G=_.callbacks)==null?void 0:G.onInteractiveTimeIndicatorClick,V=_.ui.currentGridType$,H=m(()=>!n()&&a()),Y=m(()=>Cs(s(),"s")),O=m(()=>!d()||!!l()||r(H)),J=ee(!1);We(()=>{B(J,fe(r(O)))});let ne=()=>{B(J,!0)},Z=()=>{var K;me(),(K=r(p))==null||K.addEventListener("animationiteration",ne,{once:!0})},me=()=>{var K;B(J,!1),(K=r(p))==null||K.removeEventListener("animationiteration",ne)},le=K=>{P.set(K)},Ve=m(()=>u()&&!r(O));We(()=>{u()?Z():me()});let Me=()=>{r(O)||(P.set(!0),I==null||I())};yn(()=>{P.clearTimeout(),me()});let be=()=>{P.set(!1)},ae=F("tooltip_interactive_interaction_time_indicator");var Le=q2();let re;Le.__mousemove=[z2],Le.__click=Me;var N=h(Le);Vo(N,{tooltipContent:ae,get tooltipActive(){return r(Ve)},initialTranslateYPx:72,tooltipPlacement:"bottom",onTooltipVisibilityChange:le,get ref(){return $()},set ref(K){$(K)},children:(K,Re)=>{nd(K,{completed:!0})},$$slots:{default:!0}});var pe=M(N,2);let _e;pt(pe,K=>$(K),()=>$());var Ge=M(pe,2);let ie;pt(Ge,K=>B(p,K),()=>r(p)),g(Le),k((K,Re,Ne)=>{re=te(Le,1,"interactive-episode-icon-animated svelte-od3veb",null,re,K),_e=te(pe,1,"ref-block svelte-od3veb",null,_e,Re),ie=te(Ge,1,"pulse svelte-od3veb",null,ie,Ne)},[()=>({mobile:n(),fullscreen:v(),invisible:r(O),"icon-small":r(Y)}),()=>({hidden:r(O)}),()=>({paused:r(J)})]),St("mouseleave",Le,be),b(t,Le),z(),o()}lt(["mousemove","click"]);function Jc(t,e){U(e,!0);let i=f(e,"tooltipEnabled",3,!0),o=f(e,"disabled",3,!1),n=f(e,"className",3,void 0),a=f(e,"ref",15);Vo(t,{get disabled(){return o()},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},get hasTooltip(){return i()},get mouseEnter(){return e.mouseEnter},get mouseLeave(){return e.mouseLeave},get className(){return n()},get ref(){return a()},set ref(s){a(s)},children:(s,d)=>{var l=ze();let u=m(()=>e.buttonComponent);var v=ue(l);ki(v,()=>r(u),($,p)=>{p($,is(()=>{var _;return(_=e.buttonComponentProps)!=null?_:{}}))}),b(s,l)},$$slots:{default:!0}}),z()}var ss={prevButton:100,replayButton:200,playButton:300,nextButton:400,playPrevChapterButton:500,seekToInteractiveButton:600,interactiveGraphButton:700,liveButton:800};var Q2=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M16 10.835V7.5a1 1 0 1 1 2 0v9a1 1 0 0 1-2 0v-3.335l-8.149 4.67C7.03 18.304 6 17.715 6 16.772V7.227c0-.943 1.029-1.533 1.851-1.061L16 10.834z"></path></svg>');function kf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Q2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"26",height:"24",fill:"none","aria-hidden":"true",role:"img"},i))),b(t,o)}function Ts(t,e){let i=f(e,"isPrev",3,!1),o=f(e,"isMobile",3,!1),n=f(e,"width",3,"24"),a=f(e,"height",3,"24"),s=m(()=>i()&&o()?"transform: scaleX(-1) scale(1.3333);":i()?"transform: scaleX(-1);":o()?"transform: scale(1.3333);":void 0),d=m(()=>i()?"prev-icon":"next-icon");kf(t,{get style(){return r(s)},get width(){return n()},get height(){return a()},get viewBox(){return e.viewBox},get"data-testid"(){return r(d)}})}var G2=L('<div class="icon-background-mobile svelte-xtk2k4"></div>'),j2=L("<!> <!>",1),Y2={hash:"svelte-xtk2k4",code:".icon-background-mobile.svelte-xtk2k4 {position:absolute;top:0;left:0;width:100%;height:100%;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);}"};function ua(t,e){U(e,!0),W(t,Y2);let i=f(e,"ref",15,void 0),o=f(e,"isMobile",3,!1),n=f(e,"disabled",3,!1),s=Ie().ui.t,d=m(()=>e.type==="prev"?s("tooltip_previous"):s("tooltip_next")),l=m(()=>e.type==="prev"?s("hotkey_map_item_prev_video_value"):s("hotkey_map_item_next_video_value")),u=m(()=>`btn-${o()?"m":"d"}--${e.type}`);Vt(t,{get className(){return r(u)},get testId(){var v;return`btn-${(v=e.type)!=null?v:""}`},get disabled(){return n()},get ariaLabel(){return r(d)},get click(){return e.click},get ariaKeyShortCut(){return r(l)},get ref(){return i()},set ref(v){i(v)},children:(v,$)=>{var p=j2(),_=ue(p);{var w=T=>{var E=G2();b(T,E)};R(_,T=>{o()&&T(w)})}var y=M(_,2);let C=m(()=>e.type==="prev");Ts(y,{get isMobile(){return o()},get isPrev(){return r(C)}}),b(v,p)},$$slots:{default:!0}}),z()}var Z2=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12 10.096a.4.4 0 0 1-.67.296L7.044 6.493a.67.67 0 0 1 0-.986l4.288-3.899a.4.4 0 0 1 .669.296V5a8 8 0 1 1-8 8 1 1 0 1 1 2 0 6 6 0 1 0 6-6z"></path></svg>');function md(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Z2();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"replay-icon",role:"img"},i))),b(t,o)}import{noop as X2}from"@vkontakte/videoplayer-shared/es2015";var J2=L('<div class="icon-background-mobile svelte-1ot3duq"></div>'),ey=L("<!> <div><!></div>",1),ty={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function ol(t,e){U(e,!0),W(t,ty);let i=f(e,"ref",15,void 0),o=f(e,"isMobile",3,!1),n=f(e,"disabled",3,!1),a=f(e,"className",3,""),s=f(e,"click",3,X2),d=F("tooltip_restart"),l=m(()=>`${o()?"btn-m--play":""} ${a()}`);Vt(t,{get className(){return r(l)},testId:"btn-replay",ariaLabel:d,get disabled(){return n()},get click(){return s()},get ariaKeyShortCut(){return Hr.KeyK},get ref(){return i()},set ref(u){i(u)},children:(u,v)=>{var $=ey(),p=ue($);{var _=T=>{var E=J2();b(T,E)};R(p,T=>{o()&&T(_)})}var w=M(p,2);let y;var C=h(w);md(C,{}),g(w),k(T=>y=te(w,1,"svelte-1ot3duq",null,y,T),[()=>({mobile:o()})]),b(u,$)},$$slots:{default:!0}}),z()}var iy=ye('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="play-icon"><path d="M17.671 10.923c.82.483.82 1.67 0 2.154l-8.787 5.175A1.25 1.25 0 0 1 7 17.174V6.826a1.25 1.25 0 0 1 1.884-1.078l8.787 5.175z"></path></svg>');function Sr(t,e){"use strict";let i=f(e,"width",3,"24"),o=f(e,"height",3,"24"),n=f(e,"viewBox",3,"0 0 24 24"),a=f(e,"fill",3,"var(--btn-color)");var s=iy(),d=h(s);g(s),k(()=>{Oe(s,"width",i()),Oe(s,"height",o()),Oe(s,"viewBox",n()),Oe(d,"fill",a())}),b(t,s)}var oy=ye('<svg fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-testid="pause-icon"><path d="M8.712 5c.448 0 .61.047.774.134a.913.913 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134H6.788c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.913.913 0 0 1 .38-.38C6.178 5.047 6.34 5 6.788 5h1.924zm8 0c.448 0 .61.047.774.134a.914.914 0 0 1 .38.38c.087.164.134.326.134.774v11.424c0 .448-.047.61-.134.774a.914.914 0 0 1-.38.38c-.164.087-.326.134-.774.134h-1.924c-.448 0-.61-.047-.774-.134a.914.914 0 0 1-.38-.38c-.087-.164-.134-.326-.134-.774V6.288c0-.448.047-.61.134-.774a.914.914 0 0 1 .38-.38c.164-.087.326-.134.774-.134h1.924z"></path></svg>');function as(t,e){"use strict";let i=f(e,"width",3,"24"),o=f(e,"height",3,"24"),n=f(e,"viewBox",3,"0 0 24 24"),a=f(e,"fill",3,"var(--btn-color)");var s=oy(),d=h(s);g(s),k(()=>{Oe(s,"width",i()),Oe(s,"height",o()),Oe(s,"viewBox",n()),Oe(d,"fill",a())}),b(t,s)}import{noop as ny}from"@vkontakte/videoplayer-shared/es2015";var ry=L('<div class="icon-background-mobile svelte-1ot3duq"></div>'),sy=L("<!> <div><!></div>",1),ay={hash:"svelte-1ot3duq",code:".mobile.svelte-1ot3duq {position:relative;display:flex;align-items:center;justify-content:center;}.mobile.svelte-1ot3duq svg {transform:scale(2);}.icon-background-mobile.svelte-1ot3duq {position:absolute;top:16px;left:16px;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);width:calc(100% - 32px);height:calc(100% - 32px);}"};function nl(t,e){U(e,!0),W(t,ay);let[i,o]=Be(),n=()=>S(a,"$fakeIsPlaying$",i),{fakeIsPlaying$:a}=fo(),s=f(e,"ref",15,void 0),d=f(e,"isMobile",3,!1),l=f(e,"isPlaying",3,!1),u=f(e,"disabled",3,!1),v=f(e,"className",3,""),$=f(e,"click",3,ny),_=Ie().ui.t,{toggle:w}=a,y=m(()=>w),C=m(()=>n()!==null),T=m(()=>r(C)?n():l()),E=m(()=>r(T)?_("tooltip_pause"):_("tooltip_play")),P=m(()=>r(T)?as:Sr),A=m(()=>`${d()?"btn-m--play":""} ${v()}`),I=m(()=>r(C)?r(y):$());Vt(t,{get className(){return r(A)},testId:"btn-play",get click(){return r(I)},get disabled(){return u()},get ariaLabel(){return r(E)},get ariaKeyShortCut(){return Hr.KeyK},get ref(){return s()},set ref(V){s(V)},children:(V,H)=>{var Y=sy();let O=m(()=>r(P));var J=ue(Y);{var ne=Ve=>{var Me=ry();b(Ve,Me)};R(J,Ve=>{d()&&Ve(ne)})}var Z=M(J,2);let me;var le=h(Z);ki(le,()=>r(O),(Ve,Me)=>{Me(Ve,{})}),g(Z),k(Ve=>me=te(Z,1,"svelte-1ot3duq",null,me,Ve),[()=>({mobile:d()})]),b(V,Y)},$$slots:{default:!0}}),z(),o()}var ly=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12.583 12.917v2.496a1 1 0 0 1-1.522.853l-5.583-3.413a1 1 0 0 1 0-1.706l5.583-3.413a1 1 0 0 1 1.522.853v2.496l5.478-3.349a1 1 0 0 1 1.522.853v6.826a1 1 0 0 1-1.522.853z"></path></svg>');function Ef(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=ly();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","data-testid":"play-prev-chapter-icon",role:"img"},i))),b(t,o)}function vd(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"hidden",3,!1),n=f(e,"disabled",3,!1),a=F("tooltip_interactive_go_back"),s=m(()=>o()?"hidden":"");Vt(t,{get className(){return r(s)},testId:"btn-play-prev-chapter",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Ef(d,{})},$$slots:{default:!0}}),z()}var dy=L('<span class="gutter svelte-et3q1q"><span><!></span></span>'),cy={hash:"svelte-et3q1q",code:".gutter.svelte-et3q1q {--gutterWidth: 32px;--gutterHeight: 12px;--togglerWidth: 18px;--togglerHeight: 18px;--togglerGap: calc(var(--togglerWidth) / 6);position:relative;width:var(--gutterWidth);height:var(--gutterHeight);background-color:rgba(255, 255, 255, 0.3);border-radius:50px;}.toggler.svelte-et3q1q {position:absolute;top:calc(((var(--togglerHeight) - var(--gutterHeight)) / 2) * -1);left:0;display:flex;align-items:center;justify-content:center;width:var(--togglerWidth);height:var(--togglerHeight);background-color:rgba(98, 99, 100, 1);border-radius:50%;transform:translateX(calc(var(--togglerGap) * -1));transition-property:background-color, transform;transition-duration:0.2s;transition-timing-function:ease;}.toggler.enabled.svelte-et3q1q {background-color:var(--toggle-color-autoplay-on);transform:translateX(calc(var(--gutterWidth) - var(--togglerWidth) + var(--togglerGap)));}"};function gd(t,e){U(e,!0),W(t,cy);let[i,o]=Be(),n=()=>S(d,"$autoplayNextEnabled$",i),a=f(e,"ref",15,void 0),s=Ie(),d=s.ui.autoplayNextEnabled$,l=s.actions.internal.setAutoplayNextEnabled;Vt(t,{click:()=>{l(!n(),!0)},get ref(){return a()},set ref(v){a(v)},children:(v,$)=>{var p=dy(),_=h(p);let w;var y=h(_);{var C=E=>{Sr(E,{width:"14",height:"14",fill:"#000"})},T=E=>{as(E,{width:"14",height:"14",fill:"#000"})};R(y,E=>{n()?E(C):E(T,!1)})}g(_),g(p),k(E=>w=te(_,1,"toggler svelte-et3q1q",null,w,E),[()=>({enabled:n()})]),b(v,p)},$$slots:{default:!0}}),z(),o()}var uy=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.726 4.845C16.187 4.8 15.496 4.8 14.5 4.8H7.9a.9.9 0 1 1 0-1.8h6.639c.947 0 1.713 0 2.333.05.64.053 1.204.163 1.726.43a4.4 4.4 0 0 1 1.923 1.922c.266.523.377 1.087.429 1.726.05.62.05 1.386.05 2.334v5.076c0 .948 0 1.714-.05 2.334-.052.64-.163 1.203-.43 1.726a4.4 4.4 0 0 1-1.922 1.922c-.522.267-1.086.377-1.726.43-.62.05-1.386.05-2.333.05H7.9a.9.9 0 1 1 0-1.8h6.6c.995 0 1.687 0 2.226-.045.528-.043.828-.123 1.055-.238a2.6 2.6 0 0 0 1.136-1.137c.115-.226.195-.527.239-1.055.044-.538.044-1.23.044-2.225v-5c0-.995 0-1.687-.044-2.226-.043-.527-.124-.828-.239-1.054a2.6 2.6 0 0 0-1.136-1.137c-.227-.115-.527-.195-1.055-.238" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M7.76 11.169V8.908c0-.708.704-1.143 1.252-.774l4.594 3.093c.525.353.525 1.193 0 1.546l-4.594 3.093c-.548.369-1.252-.066-1.252-.774v-2.261l-4.508 3.035C2.704 16.235 2 15.8 2 15.091V8.908c0-.708.704-1.143 1.252-.774z"></path></svg>');function Pf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=uy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"seek-to-interactive-icon",role:"img"},i))),b(t,o)}function hd(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"hidden",3,!1),n=f(e,"disabled",3,!1),a=F("tooltip_interactive_seek"),s=m(()=>o()?"hidden":"");Vt(t,{get className(){return r(s)},testId:"btn-seek-to-interactive",ariaLabel:a,get disabled(){return n()},get click(){return e.click},get ref(){return i()},set ref(d){i(d)},children:(d,l)=>{Pf(d,{})},$$slots:{default:!0}}),z()}var py=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M16.777 3h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.2.72.523.923.918.141.277.19.557.21.814.02.237.02.521.02.83V7.19c0 .31 0 .594-.02.831-.02.256-.069.537-.21.813a2.1 2.1 0 0 1-.923.92c-.278.14-.56.188-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.919 2.1 2.1 0 0 1-.21-.813 8 8 0 0 1-.02-.63l-2.198-.002c-.495-.001-.81 0-1.05.018-.23.019-.309.05-.343.067a.8.8 0 0 0-.352.35c-.017.034-.049.113-.068.341-.02.24-.02.554-.02 1.046v5.57c0 .49 0 .804.02 1.043.019.228.05.306.068.34.077.15.2.273.35.35.035.017.113.049.342.067.24.02.555.021 1.048.022l2.203.003a8 8 0 0 1 .02-.627c.02-.256.069-.537.21-.813.203-.396.526-.718.923-.92.278-.14.56-.189.817-.21.238-.019.524-.019.834-.019h1.419c.31 0 .596 0 .834.02.258.02.539.068.817.21.397.201.72.523.923.919.141.276.19.557.21.813.02.237.02.522.02.831v1.397c0 .31 0 .594-.02.831-.02.256-.069.537-.21.814a2.1 2.1 0 0 1-.923.919c-.278.14-.56.189-.817.21-.238.019-.524.019-.834.019h-1.419c-.31 0-.596 0-.834-.02a2.15 2.15 0 0 1-.817-.21 2.1 2.1 0 0 1-.923-.918 2.1 2.1 0 0 1-.21-.814 8 8 0 0 1-.02-.63l-2.24-.002c-.449 0-.839-.001-1.16-.028-.341-.028-.684-.09-1.016-.259a2.6 2.6 0 0 1-1.14-1.137c-.17-.33-.231-.672-.259-1.011-.026-.321-.026-.71-.026-1.156v-1.921H2.905A.903.903 0 0 1 2 11.992c0-.498.405-.901.905-.901h5.227V9.177c0-.448 0-.837.026-1.159.028-.34.09-.682.26-1.013a2.6 2.6 0 0 1 1.144-1.138c.332-.168.676-.23 1.017-.257.323-.025.714-.025 1.164-.024l2.23.003a8 8 0 0 1 .02-.627c.02-.257.069-.537.21-.814.203-.395.526-.717.923-.919.278-.14.56-.189.817-.21C16.18 3 16.467 3 16.777 3m-.833 1.837a1 1 0 0 1 .146-.02 10 10 0 0 1 .72-.014h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.021.3.3 0 0 1 .126.126 1 1 0 0 1 .021.145c.013.156.014.365.014.716v1.334c0 .352 0 .561-.014.716a1 1 0 0 1-.02.146.3.3 0 0 1-.127.125 1 1 0 0 1-.146.022c-.156.012-.366.013-.719.013H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.022.3.3 0 0 1-.126-.125 1 1 0 0 1-.021-.146 10 10 0 0 1-.014-.716V5.824c0-.351.001-.56.014-.716a1 1 0 0 1 .021-.145.3.3 0 0 1 .126-.126Zm0 11.018a1 1 0 0 1 .146-.022c.156-.012.366-.013.72-.013h1.354c.353 0 .563 0 .719.013a1 1 0 0 1 .146.022.3.3 0 0 1 .126.125 1 1 0 0 1 .021.146c.013.155.014.364.014.716v1.334c0 .351 0 .56-.014.716a1 1 0 0 1-.02.145.3.3 0 0 1-.127.126 1 1 0 0 1-.146.02c-.156.014-.366.014-.719.014H16.81c-.353 0-.563 0-.719-.013a1 1 0 0 1-.146-.021.3.3 0 0 1-.126-.126 1 1 0 0 1-.021-.145 10 10 0 0 1-.014-.716v-1.334c0-.352.001-.561.014-.716a1 1 0 0 1 .021-.146.3.3 0 0 1 .126-.125Z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M15.2 5.899v1.203c0 .594 0 .892.115 1.119.102.2.265.362.464.463.227.116.525.116 1.12.116H18.1c.595 0 .892 0 1.12-.116.199-.101.361-.264.463-.463.116-.227.116-.525.116-1.12V5.9c0-.595 0-.892-.116-1.12a1.06 1.06 0 0 0-.464-.463c-.227-.116-.524-.116-1.119-.116h-1.203c-.594 0-.892 0-1.119.116-.2.102-.362.264-.464.464-.115.227-.115.524-.115 1.119Zm-.051 11.03v1.143c0 .605 0 .908.118 1.139.103.203.268.368.472.472.23.117.533.117 1.138.117H18.1c.605 0 .907 0 1.138-.117a1.08 1.08 0 0 0 .472-.472c.118-.231.118-.534.118-1.139v-1.144c0-.605 0-.907-.118-1.138a1.08 1.08 0 0 0-.472-.472c-.231-.118-.534-.118-1.138-.118h-1.224c-.605 0-.907 0-1.138.118a1.08 1.08 0 0 0-.472.472c-.118.23-.118.533-.118 1.138Z" class="_closed" clip-rule="evenodd"></path></svg>');function Af(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=py();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true",role:"img"},i))),b(t,o)}var fy={hash:"svelte-17ceof5",code:'svg[data-testid="graph-open-icon"] ._closed {visibility:hidden;opacity:0;}'};function Mf(t,e){W(t,fy);let i=f(e,"isOpened",3,!1),o=m(()=>i()?"graph-close-icon":"graph-open-icon");Af(t,{get"data-testid"(){return r(o)}})}function _d(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"hidden",3,!1),n=f(e,"disabled",3,!1),a=f(e,"graphIsOpened",3,!1),d=Ie().ui.t,l=m(()=>a()?d("tooltip_interactive_graph_on"):d("tooltip_interactive_graph_off")),u=m(()=>o()?"hidden":"");Vt(t,{get className(){return r(u)},testId:"btn-graph",get disabled(){return n()},get ariaLabel(){return r(l)},get click(){return e.click},get ref(){return i()},set ref(v){i(v)},children:(v,$)=>{let p=m(()=>!!a());Mf(v,{get isOpened(){return r(p)}})},$$slots:{default:!0}}),z()}import{PlaybackState as Jh}from"@vkontakte/videoplayer-core/es2015";function bd(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(u,"$playbackState$",i),a=f(e,"isMobile",3,!1),s=f(e,"isLiveActive",3,!1),d=f(e,"ariaLabel",3,""),l=Ie(),u=l.state.playbackState$,v=l.actions.internal.switchToActiveLive,$=l.actions.internal.togglePlay,p=m(()=>()=>{if(!s()){v();return}n()===Jh.PAUSED&&$()}),_=m(()=>a()?"":"btn--live btn-full-opacity"),w=m(()=>s()?"btn-live":"btn-live-offset"),y=m(()=>s()&&n()===Jh.PLAYING);Vt(t,{get className(){return r(_)},get testId(){return r(w)},get disabled(){return r(y)},get ariaLabel(){return d()},get click(){return r(p)},children:(C,T)=>{ql(C,{get isActive(){return s()}})},$$slots:{default:!0}}),z(),o()}import{noop as e1}from"@vkontakte/videoplayer-shared/es2015";var my=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),vy=L('<img class="icon" aria-hidden="true">');function pa(t,e){"use strict";let i=ee(!1),o=()=>{B(i,!0)};var n=ze(),a=ue(n);{var s=l=>{var u=my();b(l,u)},d=l=>{var u=vy();k(()=>Oe(u,"src",e.icon)),St("error",u,o),Ws(u),b(l,u)};R(a,l=>{r(i)?l(s):l(d,!1)})}b(t,n)}function Lf(t,e){U(e,!0);let i=f(e,"disabled",3,!1),o=f(e,"onClick",3,e1),n=f(e,"ref",15),a=m(()=>o()===e1),s=m(()=>r(a)||i()),d=m(()=>r(a)?"btn-full-opacity":"");Vo(t,{get disabled(){return r(s)},get tooltipContent(){return e.tooltipText},get disabledTooltipContent(){return e.disabledTooltipContent},width:40,get ref(){return n()},set ref(l){n(l)},children:(l,u)=>{let v=m(()=>{var $;return($=e.testId)!=null?$:e.id});Vt(l,{get className(){return r(d)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(s)},get testId(){return r(v)},children:($,p)=>{pa($,{get icon(){return e.icon}})},$$slots:{default:!0}})},$$slots:{default:!0}}),z()}var t1=t=>!!t.buttonComponent;var ls={vkLogo:100,autoplayNext:200,volume:300,subtitles:400,settings:500,context:600,fullscreen:700,chromecast:800};var by=L('<div><!> <div class="controls svelte-1iedtj3" data-testid="controls"><div class="controls-left svelte-1iedtj3"><!> <!> <!></div> <div class="controls-right svelte-1iedtj3"></div></div></div> <!>',1),$y={hash:"svelte-1iedtj3",code:".wrapper-bottom.svelte-1iedtj3 {pointer-events:none;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;height:var(--controls-gradient-height);background:var(--controls-gradient);transition:transform var(--controls-transition-duration) var(--controls-transition-fn);display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;}.wrapper-bottom.svelte-1iedtj3 > :where(.svelte-1iedtj3) {pointer-events:auto;}.controls.svelte-1iedtj3 {width:100%;display:flex;align-items:center;justify-content:space-between;height:var(--controls-height);white-space:nowrap;font-size:13px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);will-change:transform;padding:0 8px 4px;box-sizing:border-box;}.controls-left.svelte-1iedtj3, .controls-right.svelte-1iedtj3 {display:flex;align-content:center;}.controls-left.svelte-1iedtj3 {flex-grow:1;min-width:0;overflow:hidden;}.controls-left.svelte-1iedtj3 > *:not(:first-child), .controls-right.svelte-1iedtj3 > * {margin-left:var(--controls-desktop-item-margin-left);}.controls-hidden.svelte-1iedtj3 {visibility:visible; /* if hidden then slider will lose focus (if was focused) */transform:translateY(100%);}.wrapper-bottom.no-smooth.svelte-1iedtj3 {transition:none;}"};function Rf(t,e){var ya,As;U(e,!0),W(t,$y);let[i,o]=Be(),n=()=>S(pi,"$disabledControls$",i),a=()=>S(Kt,"$adPlaybackState",i),s=()=>S($t,"$playbackState$",i),d=()=>S(ii,"$currentSubtitle$",i),l=()=>S(Xt,"$isEnded$",i),u=()=>S(Sn,"$currentGridType$",i),v=()=>S(Ni,"$isLive$",i),$=()=>S(an,"$chromecastState$",i),p=()=>S(ji,"$isPictureInPictureActive",i),_=()=>S(Yi,"$pictureInPictureType$",i),w=()=>S(X,"$availableSubtitlesList$",i),y=()=>S(fi,"$contextMenuOpenedByKeyboard$",i),C=()=>S(ri,"$showContextMenuBtn$",i),T=()=>S(vo,"$playerSize",i),E=()=>S(Ui,"$isRewindableLive$",i),P=()=>S(Pi,"$isActiveLive$",i),A=()=>S(Io,"$graphIsOpened$",i),I=()=>S(zi,"$contextMenuVisible$",i),V=()=>S(oi,"$isFullscreen",i),H=()=>S(Co,"$autoplayNextEnabled",i),Y=()=>S(r(No),"$prevButton",i),O=()=>S(r(Ci),"$replayButton",i),J=()=>S(r(Jn),"$playButton",i),ne=()=>S(r(mt),"$nextButton",i),Z=()=>S(r(Ht),"$playPrevChapterButton",i),me=()=>S(r(Mi),"$seekToInteractiveButton",i),le=()=>S(r(Po),"$interactiveGraphButton",i),Ve=()=>S(r(st),"$liveButton",i),Me=()=>S(r(Qt),"$time",i),be=()=>S(r(mi),"$episodes",i),ae=()=>S(r(Ji),"$vkLogo",i),Le=()=>S(r(eo),"$volume",i),re=()=>S(r(Li),"$subtitles",i),N=()=>S(r(xi),"$settings",i),pe=()=>S(r(to),"$context",i),_e=()=>S(r(wi),"$fullscreen",i),Ge=()=>S(r(no),"$chromecast",i),ie=()=>S(Zi,"$additionalDesktopControlPanelRightButtons$",i),G=()=>S(zo,"$isInteractiveTime$",i),K=()=>S(Lt,"$settingsMenuVisible",i),Re=()=>S(Pr,"$settingButtonRef$",i),Ne=()=>S(si,"$startedByKeyboard$",i),et=()=>S(qe,"$isAudioAvailable$",i),we=()=>S(ve,"$fakeIsPlaying$",i),Se=()=>S(ln,"$seekToInteractiveDisabledTooltip$",i),De=()=>S(Tt,"$adPosition",i),Xe=()=>S(Fe,"$position$",i),ot=()=>S(mo,"$adDuration",i),ft=()=>S(nt,"$duration$",i),Je=f(e,"playerControlsWrapperRef",15,void 0),gt=f(e,"playerControlsRef",15,void 0),Et=f(e,"isAds",3,!1),jt=f(e,"logoTargetUrl",3,""),qt=f(e,"isOneVideoPlaylist",3,!1),Wt=f(e,"customFullscreenSupported",3,!0),{fakeIsPlaying$:ve}=fo(),j=Ie(),Ce=fo(),se=zt(),He=j.actions.internal.toggleMuted,Ue=j.actions.internal.togglePlay,tt=j.actions.internal.pause,ct=j.actions.internal.toggleSubtitle,Ye=(ya=j.callbacks)==null?void 0:ya.onAudioDoesNotExistHint,Ze=(As=j.callbacks)==null?void 0:As.onAudioDisabledHint,nt=j.state.duration$,Fe=j.state.positionWithScrubbing$,$t=j.state.playbackState$,qe=j.state.isAudioAvailable$,dt=j.state.isAudioDisabled,Xt=j.state.isEnded$,Ni=j.state.isLive$,Pi=j.state.isActiveLive$,Ui=j.state.isRewindableLive$,{isActive$:ji,type$:Yi}=Ce.pictureInPicture$,Lt=j.ui.settingsMenu.visible$,yt=j.ui.settingsMenu.openedByBtnKeyboard$,Rt=j.ui.controls,So=j.actions.internal.getVideoEpisodes(),an=j.state.chromecastState$,X=j.state.availableSubtitlesList$,ii=j.state.currentSubtitle$,pi=Rt.disabledControls$,zi=j.ui.contextMenu.visible$,ri=j.ui.contextMenu.showContextMenuBtn$,fi=j.ui.contextMenu.openedByBtnKeyboard$,si=j.ui.startedByKeyboard$,ut=j.ui.t,mo=j.ads.duration,Tt=j.ads.position,Kt=j.ads.playbackState,oi=j.ui.isFullscreen,vo=j.ui.playerSize,Sn=j.ui.currentGridType$,Zi=j.ui.additionalDesktopControlPanelRightButtons$,Co=j.ui.autoplayNextEnabled$,di=j.actions.internal.getVideoElement,xt=j.actions.internal.replayInteractive,To=j.actions.internal.prevVideoClick,Ai=j.actions.internal.nextVideoClick,Si=j.state.isInteractive,zo=j.state.isInteractiveTime$,oo=j.state.showInteractiveGraph,qi=j.state.showSeekToInteractive,Cn=j.state.showPlayPrevChapter,Tn=j.state.showInteractiveTimeIndicator,Bi=j.state.playPrevChapterDisabledTooltip,ln=Ce.seekToInteractiveDisabledTooltip$,Io=Ce.graphIsOpened$,ko=se.features.interactiveResponsiveUi,Tr=m(()=>n().has("EPISODE_BUTTON")),lr=m(()=>n().has("GRAPH_BUTTON")),In=m(()=>n().has("SEEK_TO_INTERACTIVE_BUTTON")),Kn=m(()=>n().has("PLAY_BUTTON")),Qn=m(()=>n().has("REPLAY_BUTTON")),go=m(()=>n().has("PLAY_PREV_CHAPTER_BUTTON")),qo=()=>j.actions.internal.toggleChromecast(),kn=m(()=>Et()?a()==="playing":s()===Vf.PLAYING),rt=m(()=>d().value!=="off"),Wo=m(()=>l()&&!Et()||Si),dn=m(()=>ko?r(Wo)&&Gi(u(),"m"):r(Wo)),En=m(()=>!l()||Si||Et()),dr=m(()=>Gi(u(),"m")),Ko=m(()=>e.showNextPrevButtons&&Gi(u(),"m")&&!Et()&&e.nextButtonActive),Gn=m(()=>e.showNextPrevButtons&&Gi(u(),"m")&&!Et()&&e.prevButtonActive),cn=m(()=>!Et()&&!!v()),Pn=m(()=>$()!==i1.NOT_AVAILABLE&&!(p()&&_()===1)&&Gi(u(),"m")&&!Si),Oi=m(()=>e.showAutoplayNext&&!qt()&&Gi(u(),"s")),Xi=m(()=>w().length>0&&Gi(u(),"m")),An=m(()=>y()||C()),Ro=m(()=>Gi(u(),"s")&&!Et()),Mn=m(()=>!e.logoHidden&&!Et()),Qo=m(()=>se.features.fullscreen&&(e.logoHidden||Gi(u(),ko?"xs":"s"))&&!(p()&&_()===1)&&(Si?Wt():!0)),Do=m(()=>(!v()||Et())&&!(se.features.interactiveHideTime&&Si)),gi=m(()=>T().width>100),jn=m(()=>oo&&Gi(u(),"m")),Eo=m(()=>ko?qi&&Gi(u(),"s"):qi),cr=m(()=>ko?Cn&&Gi(u(),"s"):Cn),un=m(()=>!Et()&&!v()&&!!(So!=null&&So.length)&&r(dr)&&!r(Tr)),pn=m(()=>!E()||!!P()),ur=m(()=>A()?ut("tooltip_interactive_graph_on"):ut("tooltip_interactive_graph_off")),Go=m(()=>I()?ut("aria_label_context_menu_close"):ut("aria_label_context_menu_open")),Ir=(_t,ht)=>_t?ht&&ht===Vf.PAUSED?ut("tooltip_play"):"":ut("tooltip_live"),Ln=m(()=>Ir(r(pn),s())),Yn=m(()=>se.logoType==="vk_video"?ut("tooltip_vk_video_logo"):ut("tooltip_vk_logo")),pr=m(()=>r(rt)?ut("tooltip_subtitles_on"):ut("tooltip_subtitles_off")),kr=m(()=>V()?ut("tooltip_fullscreen_on"):ut("tooltip_fullscreen_off")),Zn=m(()=>$()===i1.CONNECTED?ut("tooltip_chromecast_on"):ut("tooltip_chromecast_off")),fn=m(()=>H()?ut("tooltip_autoplay_on"):ut("tooltip_autoplay_off")),Xn=ee(0),ci=fe({}),No=m(()=>Rt.prevButton),Ci=m(()=>Rt.replayButton),Jn=m(()=>Rt.playButton),mt=m(()=>Rt.nextButton),Ht=m(()=>Rt.playPrevChapterButton),Mi=m(()=>Rt.seekToInteractiveButton),Po=m(()=>Rt.interactiveGraphButton),st=m(()=>Rt.liveButton),Qt=m(()=>Rt.time),mi=m(()=>Rt.episodes),Ji=m(()=>Rt.vkLogo),eo=m(()=>Rt.volume),Li=m(()=>Rt.subtitles),xi=m(()=>Rt.settings),to=m(()=>Rt.context),wi=m(()=>Rt.fullscreen),no=m(()=>Rt.chromecast),Wi=m(()=>({prevButton:Y()?Y().right-Y().left:0,replayButton:O()?O().right-O().left:0,playButton:J()?J().right-J().left:0,nextButton:ne()?ne().right-ne().left:0,playPrevChapterButton:Z()?Z().right-Z().left:0,seekToInteractiveButton:me()?me().right-me().left:0,interactiveGraphButton:le()?le().right-le().left:0,liveButton:Ve()?Ve().right-Ve().left:0,time:Me()?Me().right-Me().left:0,episodes:be()?be().right-be().left:0,vkLogo:ae()?ae().right-ae().left:0,volume:Le()?Le().right-Le().left:0,subtitles:re()?re().right-re().left:0,settings:N()?N().right-N().left:0,context:pe()?pe().right-pe().left:0,fullscreen:_e()?_e().right-_e().left:0,chromecast:Ge()?Ge().right-Ge().left:0,additionalButtons:ie().length?ie().reduce(_t=>[..._t,40],[]):[]})),mn=ee(0);We(()=>{(!r(mn)||r(mn)<r(Wi).time)&&bt(()=>B(mn,fe(r(Wi).time)))});let er=ee(!1);We(()=>{let _t=0;r(un)&&(Gi(u(),"xl")?_t=r(Wi).time:_t=60);let ht=r(Wi).prevButton+r(Wi).playButton+r(Wi).nextButton+r(Wi).seekToInteractiveButton+r(Wi).interactiveGraphButton+r(Wi).liveButton+r(mn)+_t;B(er,fe(r(Do)&&r(Xn)>=ht))});let tr=m(()=>r(er)&&Gi(u(),"m")),Er=_y(il,260);We(()=>{T(),G(),Er(di(),Rt,ci,e.showControls)});let Pr=de();We(()=>{K(),Re()&&bt(()=>Ga(Re(),K(),yt))});let Vn;We(()=>{Ne(),bt(()=>Xc(si,Ne(),Vn))});function Rn(){ws({isAudioDisabled:dt,audioDisabledHintCallback:Ze,isAudioAvailable:et(),audioIsNotExistHintCallback:Ye})&&He()}let Ao=Si?xt:Ue,Ar=m(()=>we()!==null),Bo=m(()=>r(Ar)?we():r(kn)),fr=m(()=>r(Bo)?ut("tooltip_pause"):ut("tooltip_play")),Mr=ut("tooltip_episodes"),Lr=m(()=>{var _t,ht,ro,Oo;return r(Gn)?{id:"prevButton",type:"desktop-control-panel-left",weight:ss.prevButton,buttonComponent:ua,buttonComponentProps:{disabled:!e.prevButtonActive,type:"prev",click:To.bind(null,!0)},tooltipEnabled:!((ht=(_t=j.callbacks)==null?void 0:_t.uiInfo)!=null&&ht.onPrevButtonMouseEnter)&&!((Oo=(ro=j.callbacks)==null?void 0:ro.uiInfo)!=null&&Oo.onPrevButtonMouseLeave),mouseEnter:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onPrevButtonMouseEnter)==null||Hi.call(ai,ca(di(),ci,"prevButton",e.showControls))},mouseLeave:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onPrevButtonMouseLeave)==null||Hi.call(ai,ca(di(),ci,"prevButton",e.showControls))},tooltipText:ut("tooltip_previous"),disabled:!e.prevButtonActive}:void 0}),mr=m(()=>r(dn)?{id:"replayButton",type:"desktop-control-panel-left",weight:ss.replayButton,buttonComponent:ol,buttonComponentProps:{disabled:r(Qn),click:Ao},tooltipText:ut("tooltip_restart"),disabled:r(Qn)}:void 0),io=m(()=>r(En)?{id:"playButton",type:"desktop-control-panel-left",weight:ss.playButton,buttonComponent:nl,buttonComponentProps:{disabled:r(Kn),isPlaying:r(kn),click:Ue},tooltipText:r(fr),disabled:r(Kn)}:void 0),vn=m(()=>{var _t,ht,ro,Oo;return r(Ko)?{id:"nextButton",type:"desktop-control-panel-left",weight:ss.nextButton,buttonComponent:ua,buttonComponentProps:{disabled:!e.nextButtonActive,type:"next",click:Ai.bind(null,!0)},tooltipEnabled:!((ht=(_t=j.callbacks)==null?void 0:_t.uiInfo)!=null&&ht.onNextButtonMouseEnter)&&!((Oo=(ro=j.callbacks)==null?void 0:ro.uiInfo)!=null&&Oo.onNextButtonMouseLeave),mouseEnter:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onNextButtonMouseEnter)==null||Hi.call(ai,ca(di(),ci,"nextButton",e.showControls))},mouseLeave:()=>{var so,ai,Hi;(Hi=(ai=(so=j.callbacks)==null?void 0:so.uiInfo)==null?void 0:ai.onNextButtonMouseLeave)==null||Hi.call(ai,ca(di(),ci,"nextButton",e.showControls))},tooltipText:ut("tooltip_next"),disabled:!e.nextButtonActive}:void 0}),qr=m(()=>Si&&r(cr)?{id:"playPrevChapterButton",type:"desktop-control-panel-left",weight:ss.playPrevChapterButton,buttonComponent:vd,buttonComponentProps:{disabled:r(go),click:e.playPrevChapter},tooltipText:ut("tooltip_interactive_go_back"),disabledTooltipContent:ut(Bi),disabled:r(go)}:void 0),vr=m(()=>Si&&r(Eo)?{id:"seekToInteractiveButton",type:"desktop-control-panel-left",weight:ss.seekToInteractiveButton,buttonComponent:hd,buttonComponentProps:{disabled:r(In),click:e.seekToInteractive},tooltipText:ut("tooltip_interactive_seek"),disabled:r(In),disabledTooltipContent:ut(Se())}:void 0),at=m(()=>Si&&r(jn)?{id:"interactiveGraphButton",type:"desktop-control-panel-left",weight:ss.interactiveGraphButton,buttonComponent:_d,buttonComponentProps:{disabled:r(lr),click:Io.toggle,graphIsOpened:A()},tooltipText:r(ur)}:void 0),Ft=m(()=>r(cn)?{id:"liveButton",type:"desktop-control-panel-left",weight:ss.liveButton,buttonComponent:bd,buttonComponentProps:{isLiveActive:r(pn),ariaLabel:r(Ln)},tooltipText:r(Ln),disabled:r(pn)&&s()===Vf.PLAYING}:void 0),Vi=m(()=>[r(Lr),r(mr),r(io),r(vn),r(qr),r(vr),r(at),r(Ft)].filter(_t=>!!_t).sort(ia)),xe=m(()=>r(Mn)?{id:"vkLogo",type:"desktop-control-panel-right",weight:ls.vkLogo,buttonComponent:sd,buttonComponentProps:{targetUrl:jt(),logoClickable:e.logoClickable,click:tt},tooltipText:r(Yn),disabledTooltipContent:"",disabled:!e.logoClickable}:void 0),Pt=m(()=>r(Oi)?{id:"autoplayNext",type:"desktop-control-panel-right",weight:ls.autoplayNext,buttonComponent:gd,tooltipText:r(fn)}:void 0),vi=m(()=>({id:"volume",type:"desktop-control-panel-right",weight:ls.volume,buttonComponent:lf,buttonComponentProps:{click:Rn}})),hi=m(()=>r(Xi)?{id:"subtitles",type:"desktop-control-panel-right",weight:ls.subtitles,buttonComponent:of,buttonComponentProps:{isSubtitlesEnabled:r(rt),click:ct},tooltipText:r(pr)}:void 0),Mo=m(()=>r(Ro)?{id:"settings",type:"desktop-control-panel-right",weight:ls.settings,buttonComponent:Ja,buttonComponentProps:{ref$:Pr},tooltipText:K()?void 0:ut("tooltip_settings_off")}:void 0),ui=m(()=>se.features.contextMenuButton?{id:"context",type:"desktop-control-panel-right",weight:ls.context,buttonComponent:If,buttonComponentProps:{click:e.toggleFullscreen,ariaLabel:r(Go)},className:r(An)?"":"out-of-view",tooltipText:r(Go)}:void 0),Ee=m(()=>r(Qo)?{id:"fullscreen",type:"desktop-control-panel-right",weight:ls.fullscreen,buttonComponent:rd,buttonComponentProps:{isFullscreen:V(),click:e.toggleFullscreen},tooltipText:r(kr)}:void 0),It=m(()=>r(Pn)?{id:"chromecast",type:"desktop-control-panel-right",weight:ls.chromecast,buttonComponent:ad,buttonComponentProps:{state:$(),click:qo},tooltipText:r(Zn)}:void 0),ei=m(()=>[r(xe),r(Pt),r(vi),r(hi),r(Mo),r(ui),r(Ee),r(It),...ie()].filter(_t=>!!_t).sort(ia));var Ti=by(),ni=ue(Ti);let jo;var gn=h(ni);let Vr=m(()=>!r(gi));la(gn,{get isHidden(){return r(Vr)},get isAds(){return Et()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return E()},get ref(){return ci.timeline},set ref(_t){ci.timeline=_t}});var Dn=M(gn,2),Wr=h(Dn),ba=h(Wr);Ii(ba,17,()=>r(Vi),_t=>_t.id,(_t,ht)=>{Jc(_t,{get buttonComponent(){return r(ht).buttonComponent},get buttonComponentProps(){return r(ht).buttonComponentProps},get tooltipText(){return r(ht).tooltipText},get disabledTooltipContent(){return r(ht).disabledTooltipContent},get disabled(){return r(ht).disabled},get className(){return r(ht).className},get tooltipEnabled(){return r(ht).tooltipEnabled},get mouseEnter(){return r(ht).mouseEnter},get mouseLeave(){return r(ht).mouseLeave},get ref(){return ci[r(ht).id]},set ref(ro){ci[r(ht).id]=ro}})});var Es=M(ba,2);{var ll=_t=>{let ht=m(()=>Et()?De():Xe()),ro=m(()=>Et()?ot():ft());od(_t,{isMobile:!1,get showDuration(){return r(tr)},get position(){return r(ht)},get duration(){return r(ro)},get ref(){return ci.time},set ref(Oo){ci.time=Oo}})};R(Es,_t=>{r(Do)&&_t(ll)})}var $a=M(Es,2);let dl=m(()=>!r(un));Vo($a,{className:"w-max",get disabled(){return r(dl)},tooltipContent:Mr,get ref(){return ci.episodes},set ref(_t){ci.episodes=_t},children:(_t,ht)=>{var ro=ze(),Oo=ue(ro);{var so=ai=>{dd(ai,{get position(){return Xe()},get duration(){return ft()},timeCodes:So})};R(Oo,ai=>{r(un)&&ai(so)})}b(_t,ro)},$$slots:{default:!0}}),g(Wr);var Ps=M(Wr,2);Ii(Ps,21,()=>r(ei),_t=>_t.id,(_t,ht)=>{var ro=ze(),Oo=ue(ro);{var so=Hi=>{Jc(Hi,{get buttonComponent(){return r(ht).buttonComponent},get buttonComponentProps(){return r(ht).buttonComponentProps},get tooltipText(){return r(ht).tooltipText},get disabledTooltipContent(){return r(ht).disabledTooltipContent},get disabled(){return r(ht).disabled},get className(){return r(ht).className},get ref(){return ci[r(ht).id]},set ref(ds){ci[r(ht).id]=ds}})},ai=Hi=>{let ds=m(()=>!!r(ht).disabled);Lf(Hi,{get id(){return r(ht).id},get testId(){return r(ht).testId},get icon(){return r(ht).icon},get ariaLabel(){return r(ht).ariaLabel},get tooltipText(){return r(ht).tooltipText},get disabledTooltipContent(){return r(ht).disabledTooltipContent},get disabled(){return r(ds)},get onClick(){return r(ht).onClick},get ref(){return ci[r(ht).id]},set ref(ul){ci[r(ht).id]=ul}})};R(Oo,Hi=>{t1(r(ht))?Hi(so):Hi(ai,!1)})}b(_t,ro)}),g(Ps),g(Dn),pt(Dn,_t=>gt(_t),()=>gt()),g(ni),pt(ni,_t=>Je(_t),()=>Je());var cl=M(ni,2);{var ir=_t=>{fd(_t,{get ref(){return ci.interactiveTimeIndicator},set ref(ht){ci.interactiveTimeIndicator=ht}})};R(cl,_t=>{Tn&&_t(ir)})}k(_t=>jo=te(ni,1,"wrapper-bottom svelte-1iedtj3",null,jo,_t),[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth})]),Or(Wr,"clientWidth",_t=>B(Xn,_t)),b(t,Ti),z(),o()}import{ChromecastState as n1,PlaybackState as r1}from"@vkontakte/videoplayer-core/es2015";import{noop as o1}from"@vkontakte/videoplayer-shared/es2015";var yy=L('<div class="icon icon-error-stub svelte-167ouw6"><div class="inner svelte-167ouw6"></div></div>'),xy=L('<img class="icon svelte-167ouw6" aria-hidden="true">'),wy={hash:"svelte-167ouw6",code:".icon.svelte-167ouw6 {width:24px !important;height:24px !important;}.inner.svelte-167ouw6 {width:16px;height:16px;background-color:var(--white);}"};function Df(t,e){W(t,wy);let i=f(e,"disabled",3,!1),o=f(e,"onClick",3,o1),n=m(()=>o()===o1),a=m(()=>r(n)||i()),s=ee(!1),d=()=>{B(s,!0)},l=m(()=>r(n)?"btn-full-opacity":"");Vt(t,{get className(){return r(l)},get ariaLabel(){return e.ariaLabel},get click(){return o()},get disabled(){return r(a)},get testId(){return e.testId},children:(u,v)=>{var $=ze(),p=ue($);{var _=y=>{var C=yy();b(y,C)},w=y=>{var C=xy();k(()=>Oe(C,"src",e.iconUrl)),St("error",C,d),Ws(C),b(y,C)};R(p,y=>{r(s)?y(_):y(w,!1)})}b(u,$)},$$slots:{default:!0}})}var Sy=ye('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" d="M8.695 8.105 5.301 4.71a1 1 0 0 1 1.414-1.415L20.7 17.285a1 1 0 0 1-1.414 1.415L16 15.41V20a1 1 0 0 1-1 1c-.641 0-1.258-.25-1.72-.695L7.79 15H5a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2.765zm2.88-2.77 1.704-1.642A2.48 2.48 0 0 1 15 3a1 1 0 0 1 1 1v5.76l-4.426-4.426Z"></path></g></svg>');function Nf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Sy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"muted-icon",role:"img"},i))),b(t,o)}import{noop as Cy}from"@vkontakte/videoplayer-shared/es2015";var Ty=L('<span class="text svelte-6gmlbk"> </span>'),Iy=L('<div aria-hidden="true"><!> <!></div>'),ky={hash:"svelte-6gmlbk",code:".container.svelte-6gmlbk {display:flex;align-items:center;}.expanded.svelte-6gmlbk {background-color:rgba(0, 0, 0, 0.56);border-radius:6px;}.text.svelte-6gmlbk {font-size:15px;margin-left:8px;}"};function eu(t,e){U(e,!0),W(t,ky);let i=f(e,"muted",3,!1),o=f(e,"expanded",3,!1),n=f(e,"click",3,Cy),a=f(e,"ref",15,void 0),d=Ie().ui.t,l=m(()=>i()?d("tooltip_volume"):d("tooltip_volume_muted")),u=m(()=>o()?Ss:Nf),v=m(()=>o()?"btn-mobile-unmuted":"btn-mobile-muted");Vt(t,{get testId(){return r(v)},get click(){return n()},get ariaLabel(){return r(l)},get ref(){return a()},set ref($){a($)},children:($,p)=>{var _=Iy();let w=m(()=>r(u)),y;var C=h(_);ki(C,()=>r(w),(P,A)=>{A(P,{})});var T=M(C,2);{var E=P=>{var A=Ty(),I=h(A,!0);g(A),k(V=>ge(I,V),[()=>d("mobile_unmute")]),b(P,A)};R(T,P=>{o()&&P(E)})}g(_),k(P=>y=te(_,1,"container svelte-6gmlbk",null,y,P),[()=>({expanded:o()})]),b($,_)},$$slots:{default:!0}}),z()}var Ey=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M7.662 4h6.676c.808 0 1.469 0 2.006.044.556.045 1.058.142 1.526.381a3.9 3.9 0 0 1 1.705 1.704c.239.47.336.971.381 1.527C20 8.193 20 8.854 20 9.662V11.1a.9.9 0 0 1-1.8 0V9.7c0-.855 0-1.442-.038-1.897-.036-.445-.103-.684-.19-.856a2.1 2.1 0 0 0-.919-.918c-.172-.088-.411-.155-.856-.191C15.742 5.8 15.155 5.8 14.3 5.8H7.7c-.855 0-1.442 0-1.897.038-.445.036-.684.103-.856.19a2.1 2.1 0 0 0-.918.919c-.088.172-.155.411-.191.856C3.8 8.258 3.8 8.845 3.8 9.7v2.646c0 .855 0 1.442.038 1.897.036.445.103.683.19.856a2.1 2.1 0 0 0 .919.918c.172.088.411.155.856.191.455.037 1.042.038 1.897.038h2.4a.9.9 0 0 1 0 1.8H7.662c-.808 0-1.469 0-2.006-.044-.556-.045-1.058-.142-1.527-.381a3.9 3.9 0 0 1-1.704-1.704c-.239-.47-.336-.972-.381-1.527C2 13.852 2 13.192 2 12.384V9.662c0-.808 0-1.469.044-2.006.045-.556.142-1.058.381-1.527A3.9 3.9 0 0 1 4.13 4.425c.47-.239.971-.336 1.527-.381C6.193 4 6.854 4 7.662 4M13 16.8c0-.98 0-1.47.19-1.845a1.75 1.75 0 0 1 .766-.764C14.33 14 14.82 14 15.8 14h3.4c.98 0 1.47 0 1.845.19.329.168.596.436.764.766.191.374.191.864.191 1.844v.4c0 .98 0 1.47-.19 1.845a1.75 1.75 0 0 1-.765.764C20.67 20 20.18 20 19.2 20h-3.4c-.98 0-1.47 0-1.845-.19a1.75 1.75 0 0 1-.764-.765C13 18.67 13 18.18 13 17.2z" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="m11.643 12.37-.007-.006L9.073 9.8H10.1a.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.022l2.53 2.524.134.134a.9.9 0 0 0 1.272-1.272z" class="hidden-not-active"></path><path fill="var(--btn-color, #fff)" d="m6.357 9.63.007.006L8.927 12.2H7.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.022L7.67 8.397l-.134-.133a.9.9 0 0 0-1.272 1.272z" class="hidden-active"></path></svg>');function Bf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Ey();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(3),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",role:"img"},i))),b(t,o)}var Py={hash:"svelte-tmam00",code:`svg[data-testid="pip-icon--active"] .hidden-active,
256
256
  svg[data-testid="pip-icon"] .hidden-not-active {visibility:hidden;opacity:0;}`};function Of(t,e){W(t,Py);let i=f(e,"isActive",3,!1),o=m(()=>i()?"color: #2688EB;":"color: #fff;"),n=m(()=>i()?"pip-icon--active":"pip-icon");Bf(t,{get style(){return r(o)},get"data-testid"(){return r(n)}})}import{noop as Ay}from"@vkontakte/videoplayer-shared/es2015";function Hf(t,e){U(e,!0);let i=f(e,"ref",15,void 0),o=f(e,"isPictureInPictureActive",3,!1),n=f(e,"click",3,Ay),a=F("menu_pip");Vt(t,{testId:"btn-pip",ariaLabel:a,get click(){return n()},get ref(){return i()},set ref(s){i(s)},children:(s,d)=>{Of(s,{get isActive(){return o()}})},$$slots:{default:!0}}),z()}import{debounceFn as My}from"@vkontakte/videoplayer-shared/es2015";var Ly=(t,e,i,o)=>{r(e)&&i.onDisabledPlayPrevChapterClick(r(o))},Vy=(t,e,i,o)=>{r(e)&&i.onDisabledSeekToInteractiveClick(r(o))},Ry=L("<div><!></div>"),Dy=L("<div><!></div>"),Ny=L("<div><!></div>"),By=L("<!> <!> <!>",1),Oy=L("<div></div> <div><!></div> <div><!> <!> <!> <!> <!> <!></div> <div><!> <!> <!> <!></div> <!>",1),Hy=L("<div><!></div>"),Fy=L('<div class="wrapper-middle svelte-1afsgkw"><!></div>'),Uy=L("<!> <!> <div><!></div>",1),zy=L('<div aria-hidden="true">\xB7</div> <!>',1),qy=L("<!> <!> <div><div><div><!> <!> <!> <!> <!> <!></div> <!></div></div> <!>",1),Wy={hash:"svelte-1afsgkw",code:`.wrapper-bottom.svelte-1afsgkw {pointer-events:none;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;height:var(--controls-gradient-height);background:var(--controls-gradient);transition:transform var(--controls-transition-duration) var(--controls-transition-fn);display:flex;flex-direction:column;justify-content:flex-end;box-sizing:border-box;padding:0 4px 8px;}.wrapper-bottom.svelte-1afsgkw > :where(.svelte-1afsgkw) {pointer-events:auto;}.wrapper-bottom.ads-timeline-mobile.svelte-1afsgkw {height:9px;padding:0 4px 4px;}.wrapper-middle.svelte-1afsgkw {position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;z-index:var(--controls-container-z-index);}.wrapper-top-right.svelte-1afsgkw {position:absolute;top:4px;right:8px;transition:opacity var(--controls-transition-duration);display:flex;z-index:var(--controls-container-z-index);}.wrapper-top-left.svelte-1afsgkw {position:absolute;top:4px;left:8px;z-index:var(--controls-container-z-index);}.wrapper-middle-left.svelte-1afsgkw,
257
257
  .wrapper-middle-left-second.svelte-1afsgkw,
258
258
  .wrapper-middle-right.svelte-1afsgkw {position:absolute;top:50%;transform:translateY(-50%);height:44px;width:44px;border-radius:12px;background-color:rgba(0, 0, 0, 0.56);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;justify-content:center;}.wrapper-middle-left.svelte-1afsgkw {left:12px;}.wrapper-middle-left-second.svelte-1afsgkw {left:64px;}.wrapper-middle-right.svelte-1afsgkw {right:12px;}.controls.svelte-1afsgkw {width:100%;display:flex;align-items:center;height:var(--controls-height);white-space:nowrap;font-size:13px;transition:transform var(--controls-transition-duration) var(--controls-transition-fn);will-change:transform;padding:0 4px;box-sizing:border-box;}.controls.svelte-1afsgkw > *:not(:first-child) {margin-left:8px;}.hidden.svelte-1afsgkw {visibility:hidden;opacity:0;}.controls-hidden.svelte-1afsgkw {visibility:visible; /* if hidden then slider will lose focus (if was focused) */transform:translateY(100%);}.wrapper-bottom.no-smooth.svelte-1afsgkw {transition:none;}.overlay-mobile.svelte-1afsgkw {position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, .3);pointer-events:none;transition:opacity var(--controls-transition-duration);}
@@ -261,7 +261,7 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
261
261
  }
262
262
 
263
263
  @media screen and (orientation: landscape) {.wrapper-top-left.fullscreen.svelte-1afsgkw {top:12px;left:44px;}.wrapper-top-right.fullscreen.svelte-1afsgkw {top:12px;right:44px;}.wrapper-middle-left.fullscreen.svelte-1afsgkw {left:44px;}.wrapper-middle-left-second.fullscreen.svelte-1afsgkw {left:96px;}.wrapper-middle-right.fullscreen.svelte-1afsgkw {right:44px;}.controls-wrapper.fullscreen.svelte-1afsgkw {position:absolute;left:36px;right:36px;bottom:32px;width:calc(100% - 72px);}
264
- }`};function Ff(t,e){var Ci,Jn;U(e,!0),W(t,Wy);let[i,o]=Be(),n=()=>S(mo,"$seekToInteractiveDisabledTooltip$",i),a=()=>S(Pi,"$disabledControls$",i),s=()=>S(Et,"$playbackState$",i),d=()=>S(yt,"$adPlaybackState",i),l=()=>S(Wt,"$isEnded$",i),u=()=>S(So,"$playerSize",i),v=()=>S(Oe,"$scrubbingInProgress",i),$=()=>S(Xt,"$chromecastState$",i),p=()=>S(tt,"$isPictureInPictureActive",i),_=()=>S(ct,"$pictureInPictureType$",i),w=()=>S(Ue,"$mobileNotReportControlHidden$",i),y=()=>S(ft,"$playerPhase",i),C=()=>S(ji,"$currentGridType$",i),T=()=>S(ve,"$isLive$",i),E=()=>S(nt,"$settingsMenuVisible",i),P=()=>S(se,"$isRewindableLive$",i),A=()=>S(Ce,"$isActiveLive$",i),I=()=>S(zi,"$isInteractiveTime$",i),V=()=>S(jt,"$isAudioAvailable$",i),H=()=>S(Pn,"$settingButtonRef$",i),Y=()=>S(Ui,"$startedByKeyboard$",i),O=()=>S(Rt,"$isFullscreen",i),J=()=>S(Ze,"$mobileUnmuteButtonVisible",i),ne=()=>S(j,"$muted$",i),Z=()=>S(Ye,"$mobileUnmuteButtonExpanded",i),me=()=>S(an,"$additionalButtons$",i),le=()=>S(Ni,"$crashed$",i),Ve=()=>S(Tt,"$graphIsOpened$",i),Me=()=>S(Lt,"$adPosition",i),be=()=>S(Yi,"$adDuration",i),ae=()=>S(gt,"$position$",i),Le=()=>S(Je,"$duration$",i),re=f(e,"playerControlsWrapperRef",15,void 0),N=f(e,"playerControlsRef",15,void 0),pe=f(e,"isAds",3,!1),_e=f(e,"logoTargetUrl",3,""),Ge=f(e,"isOneVideoPlaylist",3,!1),ie=f(e,"customFullscreenSupported",3,!0),G=Ie(),K=fo(),Re=zt(),Ne=G.actions.internal.toggleMuted,et=G.actions.internal.togglePlay,we=G.actions.internal.pause,Se=G.actions.internal.prevVideoClick,De=G.actions.internal.nextVideoClick,Xe=(Ci=G.callbacks)==null?void 0:Ci.onAudioDoesNotExistHint,ot=(Jn=G.callbacks)==null?void 0:Jn.onAudioDisabledHint,ft=G.playerPhase,Je=G.state.duration$,gt=G.state.positionWithScrubbing$,Et=G.state.playbackState$,jt=G.state.isAudioAvailable$,qt=G.state.isAudioDisabled,Wt=G.state.isEnded$,ve=G.state.isLive$,j=G.state.muted$,Ce=G.state.isActiveLive$,se=G.state.isRewindableLive$,Oe=G.ui.scrubbingInProgress,Ue=G.ui.mobileNotReportControlHidden$,{isActive$:tt,type$:ct}=K.pictureInPicture$,Ye=G.ui.mobileUnmuteButtonExpanded,Ze=G.ui.mobileUnmuteButtonVisible,nt=G.ui.settingsMenu.visible$,He=G.ui.settingsMenu.openedByBtnKeyboard$,$t=G.ui.controls,qe=G.actions.internal.getVideoEpisodes(),dt=G.webApi.pictureInPictureApi,Xt=G.state.chromecastState$,Ni=G.state.crashed$,Pi=$t.disabledControls$,Ui=G.ui.startedByKeyboard$,ji=G.ui.currentGridType$,Yi=G.ads.duration,Lt=G.ads.position,yt=G.ads.playbackState,Rt=G.ui.isFullscreen,So=G.ui.playerSize,an=G.ui.additionalButtonsDeprecated$,X=G.actions.internal.getVideoElement,ii=G.actions.internal.replayInteractive,pi=G.state.isInteractive,zi=G.state.isInteractiveTime$,ri=G.state.showInteractiveGraph,fi=G.state.showSeekToInteractive,si=G.state.showPlayPrevChapter,ut=G.state.showInteractiveTimeIndicator,mo=K.seekToInteractiveDisabledTooltip$,Tt=K.graphIsOpened$,Kt=m(()=>F(G.state.playPrevChapterDisabledTooltip)),oi=m(()=>F(n())),vo=m(()=>a().has("EPISODE_BUTTON")),Sn=m(()=>a().has("GRAPH_BUTTON")),Zi=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Co=m(()=>a().has("PLAY_BUTTON")),di=m(()=>a().has("REPLAY_BUTTON")),xt=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),To=m(()=>s()===r1.PLAYING),Ai=m(()=>d()==="paused"),Si=m(()=>l()&&!pe()&&!pi),zo=m(()=>!l()||pe()),oo=m(()=>e.showNextPrevButtons&&!pe()&&e.prevButtonActive),qi=m(()=>e.showNextPrevButtons&&!pe()&&e.nextButtonActive),Cn=m(()=>u().width>300),Tn=m(()=>u().width>400),Bi=m(v),ln=m(()=>$()!==n1.NOT_AVAILABLE&&!(p()&&_()===1)&&!w()&&!pi),Io=m(()=>y()==="LiveWaitingStart"),ko=m(()=>!!dt&&$()!==n1.CONNECTED&&!w()&&(_()===1&&r(Io)||!r(Io))&&!r(Bi)&&!pi),Tr=m(()=>!r(Bi)&&Gi(C(),"s")),lr=m(()=>!e.logoHidden&&u().width>350),In=m(()=>Re.features.fullscreen&&!(p()&&_()===1)&&(pi?ie():!0)&&!r(Bi)),Kn=m(()=>(!T()||pe())&&u().width>260&&!r(Bi)&&!(Re.features.interactiveHideTime&&pi)),Qn=m(()=>E()||e.showControls),go=m(()=>!pe()&&!T()&&!!(qe!=null&&qe.length)&&r(Cn)&&!r(vo)&&!r(Bi)),qo=m(()=>!P()||!!A()),kn=m(()=>ri&&Gi(C(),"m")),rt=fe({}),Wo=My(il,260);We(()=>{u(),I(),Wo(X(),$t,rt,e.showControls)});let dn=()=>G.actions.internal.toggleChromecast();function En(){ws({isAudioDisabled:qt,audioDisabledHintCallback:ot,isAudioAvailable:V(),audioIsNotExistHintCallback:Xe})&&Ne()}function dr(){return kt(this,null,function*(){dt!=null&&dt.isActive()?yield dt==null?void 0:dt.remove():yield dt==null?void 0:dt.request()})}function Ko(){!qt&&V()&&Ze.set(!1),En()}let Gn=ee(""),cn=(mt,Ht)=>{if(!mt){B(Gn,fe(F("tooltip_live")));return}Ht&&Ht===r1.PAUSED&&B(Gn,fe(F("tooltip_play")))};We(()=>{cn(r(qo),s())});let Pn=de();We(()=>{H()&&Ga(H(),E(),He)}),We(()=>{Xc(Ui,Y(),rt.playButton)});var Oi=qy(),Xi=ue(Oi);{var An=mt=>{var Ht=Oy(),Mi=ue(Ht);let Po;var st=M(Mi,2);let Qt;var mi=h(st);{var Ji=at=>{let Ft=m(()=>V()&&!qt&&Z());eu(at,{get muted(){return ne()},get expanded(){return r(Ft)},click:Ko,get ref(){return rt.volume},set ref(Vi){rt.volume=Vi}})};R(mi,at=>{(!V()||J())&&at(Ji)})}g(st);var eo=M(st,2);let Li;var xi=h(eo);Ii(xi,1,me,({iconUrl:at,ariaLabel:Ft,testId:Vi,onClick:xe,tooltip:Pt})=>at,(at,Ft)=>{let Vi=()=>r(Ft).iconUrl,xe=()=>r(Ft).ariaLabel,Pt=()=>r(Ft).testId,vi=()=>r(Ft).onClick,hi=()=>r(Ft).tooltip,Mo=m(()=>{var ui;return(ui=xe())!=null?ui:hi()});Df(at,{get iconUrl(){return Vi()},get ariaLabel(){return r(Mo)},get testId(){return Pt()},get onClick(){return vi()}})});var to=M(xi,2);{var wi=at=>{gd(at,{get ref(){return rt.autoplayNextToggle},set ref(Ft){rt.autoplayNextToggle=Ft}})};R(to,at=>{e.showAutoplayNext&&!Ge()&&at(wi)})}var no=M(to,2);{var Wi=at=>{ad(at,{isMobile:!0,click:dn,get state(){return $()},get ref(){return rt.chromecast},set ref(Ft){rt.chromecast=Ft}})};R(no,at=>{r(ln)&&at(Wi)})}var mn=M(no,2);{var er=at=>{Hf(at,{click:dr,get isPictureInPictureActive(){return p()},get ref(){return rt.pip},set ref(Ft){rt.pip=Ft}})};R(mn,at=>{r(ko)&&at(er)})}var tr=M(mn,2);{var Er=at=>{Ja(at,{ref$:Pn})};R(tr,at=>{le()&&at(Er)})}var Pr=M(tr,2);{var Vn=at=>{sd(at,{click:we,get targetUrl(){return _e()},get logoClickable(){return e.logoClickable},get ref(){return rt.vkLogo},set ref(Ft){rt.vkLogo=Ft}})};R(Pr,at=>{r(lr)&&at(Vn)})}g(eo);var Rn=M(eo,2);let Ao;var Ar=h(Rn);{var Bo=at=>{let Ft=m(()=>Se.bind(null,!0));ua(at,{get click(){return r(Ft)},type:"prev",isMobile:!0,get ref(){return rt.prevButton},set ref(Vi){rt.prevButton=Vi}})};R(Ar,at=>{r(oo)&&at(Bo)})}var fr=M(Ar,2);{var Mr=at=>{nl(at,{get disabled(){return r(Co)},click:et,isMobile:!0,get isPlaying(){return r(To)},get ref(){return rt.playButton},set ref(Ft){rt.playButton=Ft}})};R(fr,at=>{r(zo)&&at(Mr)})}var Lr=M(fr,2);{var mr=at=>{ol(at,{get disabled(){return r(di)},click:et,isMobile:!0,get ref(){return rt.replayButton},set ref(Ft){rt.replayButton=Ft}})};R(Lr,at=>{r(Si)&&at(mr)})}var io=M(Lr,2);{var vn=at=>{let Ft=m(()=>De.bind(null,!0));ua(at,{get click(){return r(Ft)},type:"next",isMobile:!0,get ref(){return rt.nextButton},set ref(Vi){rt.nextButton=Vi}})};R(io,at=>{r(qi)&&at(vn)})}g(Rn);var qr=M(Rn,2);{var vr=at=>{var Ft=By(),Vi=ue(Ft);{var xe=ui=>{var Ee=Ry();let It;Ee.__click=[Ly,xt,e,Kt];var ei=h(Ee);let Ti=m(()=>!e.showControls);vd(ei,{get hidden(){return r(Ti)},get disabled(){return r(xt)},get click(){return e.playPrevChapter},get ref(){return rt.playPrevChapterButton},set ref(ni){rt.playPrevChapterButton=ni}}),g(Ee),k(ni=>It=te(Ee,1,"wrapper-middle-left svelte-1afsgkw",null,It,ni),[()=>({fullscreen:O(),hidden:!e.showControls})]),b(ui,Ee)};R(Vi,ui=>{si&&ui(xe)})}var Pt=M(Vi,2);{var vi=ui=>{var Ee=Dy();let It;var ei=h(Ee);let Ti=m(()=>!e.showControls&&!Ve());_d(ei,{get hidden(){return r(Ti)},get disabled(){return r(Sn)},get click(){return Tt.toggle},get graphIsOpened(){return Ve()},get ref(){return rt.interactiveGraphButton},set ref(ni){rt.interactiveGraphButton=ni}}),g(Ee),k(ni=>It=te(Ee,1,Ll(si?"wrapper-middle-left-second":"wrapper-middle-left"),"svelte-1afsgkw",It,ni),[()=>({fullscreen:O(),hidden:!e.showControls&&!Ve()})]),b(ui,Ee)};R(Pt,ui=>{r(kn)&&ui(vi)})}var hi=M(Pt,2);{var Mo=ui=>{var Ee=Ny();let It;Ee.__click=[Vy,Zi,e,oi];var ei=h(Ee);let Ti=m(()=>!e.showControls);hd(ei,{get hidden(){return r(Ti)},get disabled(){return r(Zi)},get click(){return e.seekToInteractive},get ref(){return rt.seekToInteractiveButton},set ref(ni){rt.seekToInteractiveButton=ni}}),g(Ee),k(ni=>It=te(Ee,1,"wrapper-middle-right svelte-1afsgkw",null,It,ni),[()=>({fullscreen:O(),hidden:!e.showControls})]),b(ui,Ee)};R(hi,ui=>{fi&&ui(Mo)})}b(at,Ft)};R(qr,at=>{pi&&!v()&&at(vr)})}k((at,Ft,Vi,xe)=>{Po=te(Mi,1,"overlay-mobile svelte-1afsgkw",null,Po,at),Qt=te(st,1,"wrapper-top-left svelte-1afsgkw",null,Qt,Ft),Li=te(eo,1,"wrapper-top-right svelte-1afsgkw",null,Li,Vi),Ao=te(Rn,1,"wrapper-middle svelte-1afsgkw",null,Ao,xe)},[()=>({hidden:!r(Qn)}),()=>({hidden:!e.showControls,fullscreen:O()}),()=>({hidden:!e.showControls&&!w(),fullscreen:O()}),()=>({hidden:!e.showControls||v()||e.endScreenShown&&e.showNextPrevButtons})]),b(mt,Ht)};R(Xi,mt=>{pe()||mt(An)})}var Ro=M(Xi,2);{var Mn=mt=>{var Ht=Uy(),Mi=ue(Ht);{var Po=Li=>{var xi=Hy();let to;var wi=h(xi);eu(wi,{get muted(){return ne()},expanded:!1,click:Ko,get ref(){return rt.volume},set ref(no){rt.volume=no}}),g(xi),k(no=>to=te(xi,1,"wrapper-top-right svelte-1afsgkw",null,to,no),[()=>({fullscreen:O()})]),b(Li,xi)};R(Mi,Li=>{J()&&Li(Po)})}var st=M(Mi,2);{var Qt=Li=>{var xi=Fy(),to=h(xi);let wi=m(()=>!r(Ai));nl(to,{get disabled(){return r(Co)},click:et,isMobile:!0,get isPlaying(){return r(wi)},get ref(){return rt.playButton},set ref(no){rt.playButton=no}}),g(xi),b(Li,xi)};R(st,Li=>{r(Ai)&&Li(Qt)})}var mi=M(st,2);let Ji;var eo=h(mi);ld(eo,{get position(){return Me()},get duration(){return be()}}),g(mi),k(Li=>Ji=te(mi,1,"wrapper-bottom ads-timeline-mobile svelte-1afsgkw",null,Ji,Li),[()=>({fullscreen:O()})]),b(mt,Ht)};R(Ro,mt=>{pe()&&d()!=="inactive"&&mt(Mn)})}var Qo=M(Ro,2);let Do;var gi=h(Qo);let jn;var Eo=h(gi);te(Eo,1,"controls svelte-1afsgkw",null,{},{mobile:!0});var cr=h(Eo);{var un=mt=>{Vo(mt,{get disabled(){return r(di)},get ref(){return rt.replayButton},set ref(Ht){rt.replayButton=Ht},children:(Ht,Mi)=>{ol(Ht,{get disabled(){return r(di)},click:ii})},$$slots:{default:!0}})};R(cr,mt=>{pi&&mt(un)})}var pn=M(cr,2);{var ur=mt=>{Vo(mt,{get ref(){return rt.liveButton},set ref(Ht){rt.liveButton=Ht},children:(Ht,Mi)=>{bd(Ht,{get isLiveActive(){return r(qo)},isMobile:!0,get ariaLabel(){return r(Gn)}})},$$slots:{default:!0}})};R(pn,mt=>{!pe()&&T()&&mt(ur)})}var Go=M(pn,2);{var Ir=mt=>{let Ht=m(()=>pe()?Me():ae()),Mi=m(()=>pe()?be():Le());od(mt,{get showDuration(){return r(Tn)},get position(){return r(Ht)},get duration(){return r(Mi)},isMobile:!0,get ref(){return rt.time},set ref(Po){rt.time=Po}})};R(Go,mt=>{r(Kn)&&mt(Ir)})}var Ln=M(Go,2);let Yn=m(()=>!r(go));Vo(Ln,{className:"w-max",get disabled(){return r(Yn)},get ref(){return rt.episodes},set ref(mt){rt.episodes=mt},children:(mt,Ht)=>{var Mi=ze(),Po=ue(Mi);{var st=Qt=>{var mi=zy(),Ji=M(ue(mi),2);dd(Ji,{get position(){return ae()},get duration(){return Le()},timeCodes:qe}),b(Qt,mi)};R(Po,Qt=>{r(go)&&Qt(st)})}b(mt,Mi)},$$slots:{default:!0}});var pr=M(Ln,2);{var kr=mt=>{Vo(mt,{get ref(){return rt.settings},set ref(Ht){rt.settings=Ht},children:(Ht,Mi)=>{Ja(Ht,{ref$:Pn})},$$slots:{default:!0}})};R(pr,mt=>{r(Tr)&&mt(kr)})}var Zn=M(pr,2);{var fn=mt=>{Vo(mt,{get ref(){return rt.fullscreen},set ref(Ht){rt.fullscreen=Ht},children:(Ht,Mi)=>{rd(Ht,{get click(){return e.toggleFullscreen},get isFullscreen(){return O()}})},$$slots:{default:!0}})};R(Zn,mt=>{r(In)&&mt(fn)})}g(Eo),pt(Eo,mt=>N(mt),()=>N());var Xn=M(Eo,2);la(Xn,{get isAds(){return pe()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return P()},get ref(){return rt.timeline},set ref(mt){rt.timeline=mt}}),g(gi),g(Qo),pt(Qo,mt=>re(mt),()=>re());var ci=M(Qo,2);{var No=mt=>{fd(mt,{get ref(){return rt.interactiveTimeIndicator},set ref(Ht){rt.interactiveTimeIndicator=Ht}})};R(ci,mt=>{ut&&mt(No)})}k((mt,Ht)=>{Do=te(Qo,1,"wrapper-bottom svelte-1afsgkw",null,Do,mt),jn=te(gi,1,"controls-wrapper svelte-1afsgkw",null,jn,Ht)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth,mobile:!0}),()=>({fullscreen:O()})]),b(t,Oi),z(),o()}lt(["click"]);function yd(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(T,"$isMobile",i),a=f(e,"bottomNoSmooth",3,!1),s=f(e,"playerControlsWrapperRef",15,void 0),d=f(e,"playerControlsRef",15,void 0),l=f(e,"isAds",3,!1),u=f(e,"logoTargetUrl",3,""),v=f(e,"showAutoplayNext",3,!1),$=f(e,"isOneVideoPlaylist",3,!1),p=f(e,"customFullscreenSupported",3,!0),_=f(e,"endScreenShown",3,!1),w=f(e,"onDisabledPlayPrevChapterClick",3,s1),y=f(e,"onDisabledSeekToInteractiveClick",3,s1),T=Ie().ui.isMobile,E=ee(!1);Ut(()=>{let V=setTimeout(()=>B(E,!0),0);return()=>clearTimeout(V)});var P=ze(),A=ue(P);{var I=V=>{var H=ze(),Y=ue(H);{var O=ne=>{Ff(ne,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},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 $()},get customFullscreenSupported(){return p()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return w()},get onDisabledSeekToInteractiveClick(){return y()},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(Z){s(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})},J=ne=>{Rf(ne,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return $()},get showAutoplayNext(){return v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return p()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(Z){s(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})};R(Y,ne=>{n()?ne(O):ne(J,!1)})}b(V,H)};R(A,V=>{r(E)&&V(I)})}b(t,P),z(),o()}var Ky=ye('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M15.537 10.534a1.157 1.157 0 0 0 .003 1.96l7.658 4.823c.78.491 1.798-.065 1.798-.981v-3.3c7.265.512 13 6.568 13 13.964 0 7.732-6.268 14-14 14-5.98 0-11.088-3.75-13.093-9.032a1.5 1.5 0 0 0-2.805 1.064C10.531 39.441 16.73 44 23.996 44c9.39 0 17-7.611 17-17 0-9.053-7.076-16.453-16-16.971V6.664c0-.918-1.021-1.473-1.8-.98z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M15.404 10.322a1.407 1.407 0 0 0 .003 2.384l7.657 4.823c.944.594 2.182-.076 2.182-1.193v-3.03c7.008.631 12.5 6.522 12.5 13.694 0 7.594-6.156 13.75-13.75 13.75-5.873 0-10.89-3.683-12.86-8.871a1.75 1.75 0 1 0-3.272 1.242c2.469 6.503 8.758 11.129 16.132 11.129 9.527 0 17.25-7.723 17.25-17.25 0-9.107-7.056-16.565-16-17.205V6.664c0-1.118-1.241-1.788-2.184-1.19z"></path></g><defs><filter id="a" width="43.996" height="49.5" x="2.5" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_100684"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_100684" result="shape"></feBlend></filter></defs></svg>');function Uf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Ky();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"51",fill:"none","aria-hidden":"true","data-testid":"seek-icon",role:"img"},i))),b(t,o)}function zf(t,e){let i=f(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);":void 0);Uf(t,{get style(){return r(o)}})}var Qy=ye('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M28.167 7h-8.334c-2.463 0-4.404 0-5.966.128-1.594.13-2.925.4-4.134 1.016a10.5 10.5 0 0 0-4.589 4.59c-.616 1.208-.886 2.54-1.016 4.133C4 18.429 4 20.37 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.594-.13 2.925-.4 4.134-1.016a10.5 10.5 0 0 0 4.589-4.59c.616-1.208.886-2.54 1.016-4.133.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7M13.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 22m18.5 6a1.5 1.5 0 0 0 0 3h4a1.5 1.5 0 0 0 0-3zM22 22a1.5 1.5 0 0 1 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 22 22" clip-rule="evenodd"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M28.167 6.75h-8.344c-2.455 0-4.405 0-5.977.128-1.609.132-2.976.407-4.226 1.044a10.75 10.75 0 0 0-4.698 4.698c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.609-.132 2.976-.407 4.226-1.044a10.75 10.75 0 0 0 4.698-4.698c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm17 7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm-7-7.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="45" x="-1.5" y="1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104204"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104204" result="shape"></feBlend></filter></defs></svg>');function qf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Qy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-on-icon",role:"img"},i))),b(t,o)}var Gy=ye('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.088 3.09a10.5 10.5 0 0 0-2.384 3.083c-.616 1.21-.886 2.54-1.016 4.134C4 18.429 4 20.369 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.437-.117 2.66-.348 3.773-.844l3.533 3.533a1.5 1.5 0 0 0 2.122-2.122l-37-37ZM13.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" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M34.5 23.5h-4.639l12.552 12.551q.237-.381.443-.784c.616-1.21.886-2.54 1.016-4.134.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7h-8.334c-2.463 0-4.404 0-5.966.128l-.347.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M29.861 23.25h-.603l.427.427 12.55 12.551.223.223.167-.268q.243-.39.453-.803c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128h-8.354c-2.455 0-4.405 0-5.977.128q-.177.014-.35.032l-.527.051.374.374 13.341 13.342.074.073H34.5a1.25 1.25 0 1 1 0 2.5zM6.737 4.263a1.75 1.75 0 0 0-2.474 2.474l2.903 2.904a10.8 10.8 0 0 0-2.244 2.979c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.384-.114 2.59-.333 3.696-.797l3.413 3.412a1.75 1.75 0 1 0 2.474-2.474zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="51" x="-1.5" y="-1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104293"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104293" result="shape"></feBlend></filter></defs></svg>');function Wf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Gy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-off-icon",role:"img"},i))),b(t,o)}function tu(t,e){let i=f(e,"isOff",3,!1);var o=ze(),n=ue(o);{var a=d=>{Wf(d,{})},s=d=>{qf(d,{})};R(n,d=>{i()?d(a):d(s,!1)})}b(t,o)}var jy=ye('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M24 22.677v-5.87a1.2 1.2 0 0 0-1.792-1.045L9.51 22.955a1.2 1.2 0 0 0 0 2.088l12.697 7.192a1.2 1.2 0 0 0 1.791-1.044v-5.873l12.21 6.916A1.2 1.2 0 0 0 38 31.19V16.805a1.2 1.2 0 0 0-1.791-1.044z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M24.25 16.806v5.442l11.835-6.704a1.45 1.45 0 0 1 2.165 1.261V31.19a1.45 1.45 0 0 1-2.165 1.262L24.25 25.747v5.444a1.45 1.45 0 0 1-2.164 1.262L9.388 25.26a1.45 1.45 0 0 1 0-2.523l12.697-7.192a1.45 1.45 0 0 1 2.164 1.261Z"></path></g><defs><filter id="a" width="40.098" height="27.785" x="3.402" y="10.105" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_106627"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_106627" result="shape"></feBlend></filter></defs></svg>');function Kf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=jy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"rate-change-icon",role:"img"},i))),b(t,o)}function Qf(t,e){let i=f(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);":void 0);Kf(t,{get style(){return r(o)}})}var Yy=ye('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M14 21.817c.631-.505 1.627-1.054 3.084-1.857l13.009-7.172c2.268-1.25 3.402-1.875 4.332-1.778a2.9 2.9 0 0 1 2.026 1.134c.549.73.549 1.991.549 4.511v14.69c0 2.52 0 3.78-.549 4.51a2.9 2.9 0 0 1-2.026 1.135c-.93.097-2.064-.528-4.332-1.778L17.084 28.04c-1.457-.803-2.453-1.352-3.084-1.857V34.5a1.5 1.5 0 0 1-3 0v-21a1.5 1.5 0 0 1 3 0z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="m16.964 19.74-.029.016c-1.162.641-2.046 1.129-2.685 1.567V13.5a1.75 1.75 0 1 0-3.5 0v21a1.75 1.75 0 1 0 3.5 0v-7.823c.639.438 1.523.926 2.685 1.567l.029.015 13.008 7.172.012.006c1.124.62 1.983 1.093 2.676 1.398.695.306 1.26.46 1.791.404a3.16 3.16 0 0 0 2.2-1.233c.317-.421.46-.976.53-1.711.069-.733.069-1.688.069-2.936V16.641c0-1.248 0-2.203-.07-2.936-.07-.735-.212-1.29-.529-1.711a3.16 3.16 0 0 0-2.2-1.233c-.53-.055-1.096.098-1.79.404-.694.305-1.553.778-2.677 1.398l-.012.006z"></path></g><defs><filter id="a" width="37" height="37" x="5.5" y="5.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2340_106922"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2340_106922" result="shape"></feBlend></filter></defs></svg>');function Gf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Yy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"episodes-seek-icon",role:"img"},i))),b(t,o)}function jf(t,e){let i=f(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);":void 0);Gf(t,{get style(){return r(o)}})}var Zy=L('<span class="hot-key-helpers-text svelte-1ad3n06"> </span>'),Xy=L('<div class="svelte-1ad3n06"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Jy=L("<div><!></div>"),e4={hash:"svelte-1ad3n06",code:`.hot-key-helpers-container.svelte-1ad3n06 {position:absolute;z-index:var(--hot-key-helpers-container-z-index);top:calc(50% - 40px);left:calc(50% - 100px);width:200px;height:120px;display:flex;align-items:center;flex-direction:column;
264
+ }`};function Ff(t,e){var Ci,Jn;U(e,!0),W(t,Wy);let[i,o]=Be(),n=()=>S(mo,"$seekToInteractiveDisabledTooltip$",i),a=()=>S(Pi,"$disabledControls$",i),s=()=>S(Et,"$playbackState$",i),d=()=>S(yt,"$adPlaybackState",i),l=()=>S(Wt,"$isEnded$",i),u=()=>S(So,"$playerSize",i),v=()=>S(He,"$scrubbingInProgress",i),$=()=>S(Xt,"$chromecastState$",i),p=()=>S(tt,"$isPictureInPictureActive",i),_=()=>S(ct,"$pictureInPictureType$",i),w=()=>S(Ue,"$mobileNotReportControlHidden$",i),y=()=>S(ft,"$playerPhase",i),C=()=>S(ji,"$currentGridType$",i),T=()=>S(ve,"$isLive$",i),E=()=>S(nt,"$settingsMenuVisible",i),P=()=>S(se,"$isRewindableLive$",i),A=()=>S(Ce,"$isActiveLive$",i),I=()=>S(zi,"$isInteractiveTime$",i),V=()=>S(jt,"$isAudioAvailable$",i),H=()=>S(Pn,"$settingButtonRef$",i),Y=()=>S(Ui,"$startedByKeyboard$",i),O=()=>S(Rt,"$isFullscreen",i),J=()=>S(Ze,"$mobileUnmuteButtonVisible",i),ne=()=>S(j,"$muted$",i),Z=()=>S(Ye,"$mobileUnmuteButtonExpanded",i),me=()=>S(an,"$additionalButtons$",i),le=()=>S(Ni,"$crashed$",i),Ve=()=>S(Tt,"$graphIsOpened$",i),Me=()=>S(Lt,"$adPosition",i),be=()=>S(Yi,"$adDuration",i),ae=()=>S(gt,"$position$",i),Le=()=>S(Je,"$duration$",i),re=f(e,"playerControlsWrapperRef",15,void 0),N=f(e,"playerControlsRef",15,void 0),pe=f(e,"isAds",3,!1),_e=f(e,"logoTargetUrl",3,""),Ge=f(e,"isOneVideoPlaylist",3,!1),ie=f(e,"customFullscreenSupported",3,!0),G=Ie(),K=fo(),Re=zt(),Ne=G.actions.internal.toggleMuted,et=G.actions.internal.togglePlay,we=G.actions.internal.pause,Se=G.actions.internal.prevVideoClick,De=G.actions.internal.nextVideoClick,Xe=(Ci=G.callbacks)==null?void 0:Ci.onAudioDoesNotExistHint,ot=(Jn=G.callbacks)==null?void 0:Jn.onAudioDisabledHint,ft=G.playerPhase,Je=G.state.duration$,gt=G.state.positionWithScrubbing$,Et=G.state.playbackState$,jt=G.state.isAudioAvailable$,qt=G.state.isAudioDisabled,Wt=G.state.isEnded$,ve=G.state.isLive$,j=G.state.muted$,Ce=G.state.isActiveLive$,se=G.state.isRewindableLive$,He=G.ui.scrubbingInProgress,Ue=G.ui.mobileNotReportControlHidden$,{isActive$:tt,type$:ct}=K.pictureInPicture$,Ye=G.ui.mobileUnmuteButtonExpanded,Ze=G.ui.mobileUnmuteButtonVisible,nt=G.ui.settingsMenu.visible$,Fe=G.ui.settingsMenu.openedByBtnKeyboard$,$t=G.ui.controls,qe=G.actions.internal.getVideoEpisodes(),dt=G.webApi.pictureInPictureApi,Xt=G.state.chromecastState$,Ni=G.state.crashed$,Pi=$t.disabledControls$,Ui=G.ui.startedByKeyboard$,ji=G.ui.currentGridType$,Yi=G.ads.duration,Lt=G.ads.position,yt=G.ads.playbackState,Rt=G.ui.isFullscreen,So=G.ui.playerSize,an=G.ui.additionalButtonsDeprecated$,X=G.actions.internal.getVideoElement,ii=G.actions.internal.replayInteractive,pi=G.state.isInteractive,zi=G.state.isInteractiveTime$,ri=G.state.showInteractiveGraph,fi=G.state.showSeekToInteractive,si=G.state.showPlayPrevChapter,ut=G.state.showInteractiveTimeIndicator,mo=K.seekToInteractiveDisabledTooltip$,Tt=K.graphIsOpened$,Kt=m(()=>F(G.state.playPrevChapterDisabledTooltip)),oi=m(()=>F(n())),vo=m(()=>a().has("EPISODE_BUTTON")),Sn=m(()=>a().has("GRAPH_BUTTON")),Zi=m(()=>a().has("SEEK_TO_INTERACTIVE_BUTTON")),Co=m(()=>a().has("PLAY_BUTTON")),di=m(()=>a().has("REPLAY_BUTTON")),xt=m(()=>a().has("PLAY_PREV_CHAPTER_BUTTON")),To=m(()=>s()===r1.PLAYING),Ai=m(()=>d()==="paused"),Si=m(()=>l()&&!pe()&&!pi),zo=m(()=>!l()||pe()),oo=m(()=>e.showNextPrevButtons&&!pe()&&e.prevButtonActive),qi=m(()=>e.showNextPrevButtons&&!pe()&&e.nextButtonActive),Cn=m(()=>u().width>300),Tn=m(()=>u().width>400),Bi=m(v),ln=m(()=>$()!==n1.NOT_AVAILABLE&&!(p()&&_()===1)&&!w()&&!pi),Io=m(()=>y()==="LiveWaitingStart"),ko=m(()=>!!dt&&$()!==n1.CONNECTED&&!w()&&(_()===1&&r(Io)||!r(Io))&&!r(Bi)&&!pi),Tr=m(()=>!r(Bi)&&Gi(C(),"s")),lr=m(()=>!e.logoHidden&&u().width>350),In=m(()=>Re.features.fullscreen&&!(p()&&_()===1)&&(pi?ie():!0)&&!r(Bi)),Kn=m(()=>(!T()||pe())&&u().width>260&&!r(Bi)&&!(Re.features.interactiveHideTime&&pi)),Qn=m(()=>E()||e.showControls),go=m(()=>!pe()&&!T()&&!!(qe!=null&&qe.length)&&r(Cn)&&!r(vo)&&!r(Bi)),qo=m(()=>!P()||!!A()),kn=m(()=>ri&&Gi(C(),"m")),rt=fe({}),Wo=My(il,260);We(()=>{u(),I(),Wo(X(),$t,rt,e.showControls)});let dn=()=>G.actions.internal.toggleChromecast();function En(){ws({isAudioDisabled:qt,audioDisabledHintCallback:ot,isAudioAvailable:V(),audioIsNotExistHintCallback:Xe})&&Ne()}function dr(){return kt(this,null,function*(){dt!=null&&dt.isActive()?yield dt==null?void 0:dt.remove():yield dt==null?void 0:dt.request()})}function Ko(){!qt&&V()&&Ze.set(!1),En()}let Gn=ee(""),cn=(mt,Ht)=>{if(!mt){B(Gn,fe(F("tooltip_live")));return}Ht&&Ht===r1.PAUSED&&B(Gn,fe(F("tooltip_play")))};We(()=>{cn(r(qo),s())});let Pn=de();We(()=>{H()&&Ga(H(),E(),Fe)}),We(()=>{Xc(Ui,Y(),rt.playButton)});var Oi=qy(),Xi=ue(Oi);{var An=mt=>{var Ht=Oy(),Mi=ue(Ht);let Po;var st=M(Mi,2);let Qt;var mi=h(st);{var Ji=at=>{let Ft=m(()=>V()&&!qt&&Z());eu(at,{get muted(){return ne()},get expanded(){return r(Ft)},click:Ko,get ref(){return rt.volume},set ref(Vi){rt.volume=Vi}})};R(mi,at=>{(!V()||J())&&at(Ji)})}g(st);var eo=M(st,2);let Li;var xi=h(eo);Ii(xi,1,me,({iconUrl:at,ariaLabel:Ft,testId:Vi,onClick:xe,tooltip:Pt})=>at,(at,Ft)=>{let Vi=()=>r(Ft).iconUrl,xe=()=>r(Ft).ariaLabel,Pt=()=>r(Ft).testId,vi=()=>r(Ft).onClick,hi=()=>r(Ft).tooltip,Mo=m(()=>{var ui;return(ui=xe())!=null?ui:hi()});Df(at,{get iconUrl(){return Vi()},get ariaLabel(){return r(Mo)},get testId(){return Pt()},get onClick(){return vi()}})});var to=M(xi,2);{var wi=at=>{gd(at,{get ref(){return rt.autoplayNextToggle},set ref(Ft){rt.autoplayNextToggle=Ft}})};R(to,at=>{e.showAutoplayNext&&!Ge()&&at(wi)})}var no=M(to,2);{var Wi=at=>{ad(at,{isMobile:!0,click:dn,get state(){return $()},get ref(){return rt.chromecast},set ref(Ft){rt.chromecast=Ft}})};R(no,at=>{r(ln)&&at(Wi)})}var mn=M(no,2);{var er=at=>{Hf(at,{click:dr,get isPictureInPictureActive(){return p()},get ref(){return rt.pip},set ref(Ft){rt.pip=Ft}})};R(mn,at=>{r(ko)&&at(er)})}var tr=M(mn,2);{var Er=at=>{Ja(at,{ref$:Pn})};R(tr,at=>{le()&&at(Er)})}var Pr=M(tr,2);{var Vn=at=>{sd(at,{click:we,get targetUrl(){return _e()},get logoClickable(){return e.logoClickable},get ref(){return rt.vkLogo},set ref(Ft){rt.vkLogo=Ft}})};R(Pr,at=>{r(lr)&&at(Vn)})}g(eo);var Rn=M(eo,2);let Ao;var Ar=h(Rn);{var Bo=at=>{let Ft=m(()=>Se.bind(null,!0));ua(at,{get click(){return r(Ft)},type:"prev",isMobile:!0,get ref(){return rt.prevButton},set ref(Vi){rt.prevButton=Vi}})};R(Ar,at=>{r(oo)&&at(Bo)})}var fr=M(Ar,2);{var Mr=at=>{nl(at,{get disabled(){return r(Co)},click:et,isMobile:!0,get isPlaying(){return r(To)},get ref(){return rt.playButton},set ref(Ft){rt.playButton=Ft}})};R(fr,at=>{r(zo)&&at(Mr)})}var Lr=M(fr,2);{var mr=at=>{ol(at,{get disabled(){return r(di)},click:et,isMobile:!0,get ref(){return rt.replayButton},set ref(Ft){rt.replayButton=Ft}})};R(Lr,at=>{r(Si)&&at(mr)})}var io=M(Lr,2);{var vn=at=>{let Ft=m(()=>De.bind(null,!0));ua(at,{get click(){return r(Ft)},type:"next",isMobile:!0,get ref(){return rt.nextButton},set ref(Vi){rt.nextButton=Vi}})};R(io,at=>{r(qi)&&at(vn)})}g(Rn);var qr=M(Rn,2);{var vr=at=>{var Ft=By(),Vi=ue(Ft);{var xe=ui=>{var Ee=Ry();let It;Ee.__click=[Ly,xt,e,Kt];var ei=h(Ee);let Ti=m(()=>!e.showControls);vd(ei,{get hidden(){return r(Ti)},get disabled(){return r(xt)},get click(){return e.playPrevChapter},get ref(){return rt.playPrevChapterButton},set ref(ni){rt.playPrevChapterButton=ni}}),g(Ee),k(ni=>It=te(Ee,1,"wrapper-middle-left svelte-1afsgkw",null,It,ni),[()=>({fullscreen:O(),hidden:!e.showControls})]),b(ui,Ee)};R(Vi,ui=>{si&&ui(xe)})}var Pt=M(Vi,2);{var vi=ui=>{var Ee=Dy();let It;var ei=h(Ee);let Ti=m(()=>!e.showControls&&!Ve());_d(ei,{get hidden(){return r(Ti)},get disabled(){return r(Sn)},get click(){return Tt.toggle},get graphIsOpened(){return Ve()},get ref(){return rt.interactiveGraphButton},set ref(ni){rt.interactiveGraphButton=ni}}),g(Ee),k(ni=>It=te(Ee,1,Ll(si?"wrapper-middle-left-second":"wrapper-middle-left"),"svelte-1afsgkw",It,ni),[()=>({fullscreen:O(),hidden:!e.showControls&&!Ve()})]),b(ui,Ee)};R(Pt,ui=>{r(kn)&&ui(vi)})}var hi=M(Pt,2);{var Mo=ui=>{var Ee=Ny();let It;Ee.__click=[Vy,Zi,e,oi];var ei=h(Ee);let Ti=m(()=>!e.showControls);hd(ei,{get hidden(){return r(Ti)},get disabled(){return r(Zi)},get click(){return e.seekToInteractive},get ref(){return rt.seekToInteractiveButton},set ref(ni){rt.seekToInteractiveButton=ni}}),g(Ee),k(ni=>It=te(Ee,1,"wrapper-middle-right svelte-1afsgkw",null,It,ni),[()=>({fullscreen:O(),hidden:!e.showControls})]),b(ui,Ee)};R(hi,ui=>{fi&&ui(Mo)})}b(at,Ft)};R(qr,at=>{pi&&!v()&&at(vr)})}k((at,Ft,Vi,xe)=>{Po=te(Mi,1,"overlay-mobile svelte-1afsgkw",null,Po,at),Qt=te(st,1,"wrapper-top-left svelte-1afsgkw",null,Qt,Ft),Li=te(eo,1,"wrapper-top-right svelte-1afsgkw",null,Li,Vi),Ao=te(Rn,1,"wrapper-middle svelte-1afsgkw",null,Ao,xe)},[()=>({hidden:!r(Qn)}),()=>({hidden:!e.showControls,fullscreen:O()}),()=>({hidden:!e.showControls&&!w(),fullscreen:O()}),()=>({hidden:!e.showControls||v()||e.endScreenShown&&e.showNextPrevButtons})]),b(mt,Ht)};R(Xi,mt=>{pe()||mt(An)})}var Ro=M(Xi,2);{var Mn=mt=>{var Ht=Uy(),Mi=ue(Ht);{var Po=Li=>{var xi=Hy();let to;var wi=h(xi);eu(wi,{get muted(){return ne()},expanded:!1,click:Ko,get ref(){return rt.volume},set ref(no){rt.volume=no}}),g(xi),k(no=>to=te(xi,1,"wrapper-top-right svelte-1afsgkw",null,to,no),[()=>({fullscreen:O()})]),b(Li,xi)};R(Mi,Li=>{J()&&Li(Po)})}var st=M(Mi,2);{var Qt=Li=>{var xi=Fy(),to=h(xi);let wi=m(()=>!r(Ai));nl(to,{get disabled(){return r(Co)},click:et,isMobile:!0,get isPlaying(){return r(wi)},get ref(){return rt.playButton},set ref(no){rt.playButton=no}}),g(xi),b(Li,xi)};R(st,Li=>{r(Ai)&&Li(Qt)})}var mi=M(st,2);let Ji;var eo=h(mi);ld(eo,{get position(){return Me()},get duration(){return be()}}),g(mi),k(Li=>Ji=te(mi,1,"wrapper-bottom ads-timeline-mobile svelte-1afsgkw",null,Ji,Li),[()=>({fullscreen:O()})]),b(mt,Ht)};R(Ro,mt=>{pe()&&d()!=="inactive"&&mt(Mn)})}var Qo=M(Ro,2);let Do;var gi=h(Qo);let jn;var Eo=h(gi);te(Eo,1,"controls svelte-1afsgkw",null,{},{mobile:!0});var cr=h(Eo);{var un=mt=>{Vo(mt,{get disabled(){return r(di)},get ref(){return rt.replayButton},set ref(Ht){rt.replayButton=Ht},children:(Ht,Mi)=>{ol(Ht,{get disabled(){return r(di)},click:ii})},$$slots:{default:!0}})};R(cr,mt=>{pi&&mt(un)})}var pn=M(cr,2);{var ur=mt=>{Vo(mt,{get ref(){return rt.liveButton},set ref(Ht){rt.liveButton=Ht},children:(Ht,Mi)=>{bd(Ht,{get isLiveActive(){return r(qo)},isMobile:!0,get ariaLabel(){return r(Gn)}})},$$slots:{default:!0}})};R(pn,mt=>{!pe()&&T()&&mt(ur)})}var Go=M(pn,2);{var Ir=mt=>{let Ht=m(()=>pe()?Me():ae()),Mi=m(()=>pe()?be():Le());od(mt,{get showDuration(){return r(Tn)},get position(){return r(Ht)},get duration(){return r(Mi)},isMobile:!0,get ref(){return rt.time},set ref(Po){rt.time=Po}})};R(Go,mt=>{r(Kn)&&mt(Ir)})}var Ln=M(Go,2);let Yn=m(()=>!r(go));Vo(Ln,{className:"w-max",get disabled(){return r(Yn)},get ref(){return rt.episodes},set ref(mt){rt.episodes=mt},children:(mt,Ht)=>{var Mi=ze(),Po=ue(Mi);{var st=Qt=>{var mi=zy(),Ji=M(ue(mi),2);dd(Ji,{get position(){return ae()},get duration(){return Le()},timeCodes:qe}),b(Qt,mi)};R(Po,Qt=>{r(go)&&Qt(st)})}b(mt,Mi)},$$slots:{default:!0}});var pr=M(Ln,2);{var kr=mt=>{Vo(mt,{get ref(){return rt.settings},set ref(Ht){rt.settings=Ht},children:(Ht,Mi)=>{Ja(Ht,{ref$:Pn})},$$slots:{default:!0}})};R(pr,mt=>{r(Tr)&&mt(kr)})}var Zn=M(pr,2);{var fn=mt=>{Vo(mt,{get ref(){return rt.fullscreen},set ref(Ht){rt.fullscreen=Ht},children:(Ht,Mi)=>{rd(Ht,{get click(){return e.toggleFullscreen},get isFullscreen(){return O()}})},$$slots:{default:!0}})};R(Zn,mt=>{r(In)&&mt(fn)})}g(Eo),pt(Eo,mt=>N(mt),()=>N());var Xn=M(Eo,2);la(Xn,{get isAds(){return pe()},get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return P()},get ref(){return rt.timeline},set ref(mt){rt.timeline=mt}}),g(gi),g(Qo),pt(Qo,mt=>re(mt),()=>re());var ci=M(Qo,2);{var No=mt=>{fd(mt,{get ref(){return rt.interactiveTimeIndicator},set ref(Ht){rt.interactiveTimeIndicator=Ht}})};R(ci,mt=>{ut&&mt(No)})}k((mt,Ht)=>{Do=te(Qo,1,"wrapper-bottom svelte-1afsgkw",null,Do,mt),jn=te(gi,1,"controls-wrapper svelte-1afsgkw",null,jn,Ht)},[()=>({hidden:e.bottomHidden,"controls-hidden":!e.showControls,"no-smooth":e.bottomNoSmooth,mobile:!0}),()=>({fullscreen:O()})]),b(t,Oi),z(),o()}lt(["click"]);function yd(t,e){U(e,!0);let[i,o]=Be(),n=()=>S(T,"$isMobile",i),a=f(e,"bottomNoSmooth",3,!1),s=f(e,"playerControlsWrapperRef",15,void 0),d=f(e,"playerControlsRef",15,void 0),l=f(e,"isAds",3,!1),u=f(e,"logoTargetUrl",3,""),v=f(e,"showAutoplayNext",3,!1),$=f(e,"isOneVideoPlaylist",3,!1),p=f(e,"customFullscreenSupported",3,!0),_=f(e,"endScreenShown",3,!1),w=f(e,"onDisabledPlayPrevChapterClick",3,s1),y=f(e,"onDisabledSeekToInteractiveClick",3,s1),T=Ie().ui.isMobile,E=ee(!1);Ut(()=>{let V=setTimeout(()=>B(E,!0),0);return()=>clearTimeout(V)});var P=ze(),A=ue(P);{var I=V=>{var H=ze(),Y=ue(H);{var O=ne=>{Ff(ne,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},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 $()},get customFullscreenSupported(){return p()},get endScreenShown(){return _()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get onDisabledPlayPrevChapterClick(){return w()},get onDisabledSeekToInteractiveClick(){return y()},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(Z){s(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})},J=ne=>{Rf(ne,{get bottomHidden(){return e.bottomHidden},get bottomNoSmooth(){return a()},get showControls(){return e.showControls},get isAds(){return l()},get canRewindLive(){return e.canRewindLive},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return u()},get isOneVideoPlaylist(){return $()},get showAutoplayNext(){return v()},get showNextPrevButtons(){return e.showNextPrevButtons},get nextButtonActive(){return e.nextButtonActive},get prevButtonActive(){return e.prevButtonActive},get customFullscreenSupported(){return p()},get toggleFullscreen(){return e.toggleFullscreen},get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return s()},set playerControlsWrapperRef(Z){s(Z)},get playerControlsRef(){return d()},set playerControlsRef(Z){d(Z)}})};R(Y,ne=>{n()?ne(O):ne(J,!1)})}b(V,H)};R(A,V=>{r(E)&&V(I)})}b(t,P),z(),o()}var Ky=ye('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M15.537 10.534a1.157 1.157 0 0 0 .003 1.96l7.658 4.823c.78.491 1.798-.065 1.798-.981v-3.3c7.265.512 13 6.568 13 13.964 0 7.732-6.268 14-14 14-5.98 0-11.088-3.75-13.093-9.032a1.5 1.5 0 0 0-2.805 1.064C10.531 39.441 16.73 44 23.996 44c9.39 0 17-7.611 17-17 0-9.053-7.076-16.453-16-16.971V6.664c0-.918-1.021-1.473-1.8-.98z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M15.404 10.322a1.407 1.407 0 0 0 .003 2.384l7.657 4.823c.944.594 2.182-.076 2.182-1.193v-3.03c7.008.631 12.5 6.522 12.5 13.694 0 7.594-6.156 13.75-13.75 13.75-5.873 0-10.89-3.683-12.86-8.871a1.75 1.75 0 1 0-3.272 1.242c2.469 6.503 8.758 11.129 16.132 11.129 9.527 0 17.25-7.723 17.25-17.25 0-9.107-7.056-16.565-16-17.205V6.664c0-1.118-1.241-1.788-2.184-1.19z"></path></g><defs><filter id="a" width="43.996" height="49.5" x="2.5" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_100684"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_100684" result="shape"></feBlend></filter></defs></svg>');function Uf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Ky();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"51",fill:"none","aria-hidden":"true","data-testid":"seek-icon",role:"img"},i))),b(t,o)}function zf(t,e){let i=f(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);":void 0);Uf(t,{get style(){return r(o)}})}var Qy=ye('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M28.167 7h-8.334c-2.463 0-4.404 0-5.966.128-1.594.13-2.925.4-4.134 1.016a10.5 10.5 0 0 0-4.589 4.59c-.616 1.208-.886 2.54-1.016 4.133C4 18.429 4 20.37 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.594-.13 2.925-.4 4.134-1.016a10.5 10.5 0 0 0 4.589-4.59c.616-1.208.886-2.54 1.016-4.133.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7M13.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 22m18.5 6a1.5 1.5 0 0 0 0 3h4a1.5 1.5 0 0 0 0-3zM22 22a1.5 1.5 0 0 1 1.5-1.5h11a1.5 1.5 0 0 1 0 3h-11A1.5 1.5 0 0 1 22 22" clip-rule="evenodd"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M28.167 6.75h-8.344c-2.455 0-4.405 0-5.977.128-1.609.132-2.976.407-4.226 1.044a10.75 10.75 0 0 0-4.698 4.698c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.609-.132 2.976-.407 4.226-1.044a10.75 10.75 0 0 0 4.698-4.698c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm17 7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Zm-7-7.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="45" x="-1.5" y="1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104204"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104204" result="shape"></feBlend></filter></defs></svg>');function qf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Qy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-on-icon",role:"img"},i))),b(t,o)}var Gy=ye('<svg><!><g clip-path="url(#c)" filter="url(#a)"><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M6.56 4.44a1.5 1.5 0 1 0-2.12 2.12l3.088 3.09a10.5 10.5 0 0 0-2.384 3.083c-.616 1.21-.886 2.54-1.016 4.134C4 18.429 4 20.369 4 22.833v2.334c0 2.463 0 4.404.128 5.966.13 1.594.4 2.925 1.016 4.134a10.5 10.5 0 0 0 4.59 4.589c1.208.616 2.54.886 4.133 1.016 1.562.128 3.502.128 5.966.128h8.334c2.463 0 4.404 0 5.966-.128 1.437-.117 2.66-.348 3.773-.844l3.533 3.533a1.5 1.5 0 0 0 2.122-2.122l-37-37ZM13.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" clip-rule="evenodd"></path><path fill="var(--btn-color, #fff)" d="M34.5 23.5h-4.639l12.552 12.551q.237-.381.443-.784c.616-1.21.886-2.54 1.016-4.134.128-1.562.128-3.502.128-5.966v-2.334c0-2.463 0-4.404-.128-5.966-.13-1.594-.4-2.925-1.016-4.134a10.5 10.5 0 0 0-4.59-4.589c-1.208-.616-2.54-.886-4.133-1.016C32.571 7 30.63 7 28.167 7h-8.334c-2.463 0-4.404 0-5.966.128l-.347.03L26.86 20.5h7.64a1.5 1.5 0 0 1 0 3"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M29.861 23.25h-.603l.427.427 12.55 12.551.223.223.167-.268q.243-.39.453-.803c.637-1.25.912-2.617 1.044-4.226.128-1.573.128-3.522.128-5.977v-2.354c0-2.455 0-4.405-.128-5.977-.132-1.609-.407-2.976-1.044-4.226a10.75 10.75 0 0 0-4.698-4.698c-1.25-.637-2.617-.912-4.226-1.044-1.572-.128-3.522-.128-5.977-.128h-8.354c-2.455 0-4.405 0-5.977.128q-.177.014-.35.032l-.527.051.374.374 13.341 13.342.074.073H34.5a1.25 1.25 0 1 1 0 2.5zM6.737 4.263a1.75 1.75 0 0 0-2.474 2.474l2.903 2.904a10.8 10.8 0 0 0-2.244 2.979c-.637 1.25-.912 2.617-1.044 4.226-.128 1.572-.128 3.522-.128 5.977v2.354c0 2.455 0 4.405.128 5.977.132 1.609.407 2.976 1.044 4.226a10.75 10.75 0 0 0 4.698 4.698c1.25.637 2.617.912 4.226 1.044 1.572.128 3.522.128 5.977.128h8.354c2.455 0 4.404 0 5.977-.128 1.384-.114 2.59-.333 3.696-.797l3.413 3.412a1.75 1.75 0 1 0 2.474-2.474zM12.25 29.5c0-.69.56-1.25 1.25-1.25h11a1.25 1.25 0 1 1 0 2.5h-11c-.69 0-1.25-.56-1.25-1.25Zm0-7.5c0-.69.56-1.25 1.25-1.25h4a1.25 1.25 0 1 1 0 2.5h-4c-.69 0-1.25-.56-1.25-1.25Z"></path></g><defs><clipPath id="c"><path fill="var(--btn-color, #fff)" d="M0 0h48v48H0z"></path></clipPath><filter id="a" width="51" height="51" x="-1.5" y="-1.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_104293"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_104293" result="shape"></feBlend></filter></defs></svg>');function Wf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Gy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"subtitles-off-icon",role:"img"},i))),b(t,o)}function tu(t,e){let i=f(e,"isOff",3,!1);var o=ze(),n=ue(o);{var a=d=>{Wf(d,{})},s=d=>{qf(d,{})};R(n,d=>{i()?d(a):d(s,!1)})}b(t,o)}var jy=ye('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M24 22.677v-5.87a1.2 1.2 0 0 0-1.792-1.045L9.51 22.955a1.2 1.2 0 0 0 0 2.088l12.697 7.192a1.2 1.2 0 0 0 1.791-1.044v-5.873l12.21 6.916A1.2 1.2 0 0 0 38 31.19V16.805a1.2 1.2 0 0 0-1.791-1.044z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="M24.25 16.806v5.442l11.835-6.704a1.45 1.45 0 0 1 2.165 1.261V31.19a1.45 1.45 0 0 1-2.165 1.262L24.25 25.747v5.444a1.45 1.45 0 0 1-2.164 1.262L9.388 25.26a1.45 1.45 0 0 1 0-2.523l12.697-7.192a1.45 1.45 0 0 1 2.164 1.261Z"></path></g><defs><filter id="a" width="40.098" height="27.785" x="3.402" y="10.105" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2260_106627"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2260_106627" result="shape"></feBlend></filter></defs></svg>');function Kf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=jy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"rate-change-icon",role:"img"},i))),b(t,o)}function Qf(t,e){let i=f(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);":void 0);Kf(t,{get style(){return r(o)}})}var Yy=ye('<svg><!><g filter="url(#a)"><path fill="var(--btn-color, #fff)" d="M14 21.817c.631-.505 1.627-1.054 3.084-1.857l13.009-7.172c2.268-1.25 3.402-1.875 4.332-1.778a2.9 2.9 0 0 1 2.026 1.134c.549.73.549 1.991.549 4.511v14.69c0 2.52 0 3.78-.549 4.51a2.9 2.9 0 0 1-2.026 1.135c-.93.097-2.064-.528-4.332-1.778L17.084 28.04c-1.457-.803-2.453-1.352-3.084-1.857V34.5a1.5 1.5 0 0 1-3 0v-21a1.5 1.5 0 0 1 3 0z"></path><path stroke="#000" stroke-opacity=".12" stroke-width=".5" d="m16.964 19.74-.029.016c-1.162.641-2.046 1.129-2.685 1.567V13.5a1.75 1.75 0 1 0-3.5 0v21a1.75 1.75 0 1 0 3.5 0v-7.823c.639.438 1.523.926 2.685 1.567l.029.015 13.008 7.172.012.006c1.124.62 1.983 1.093 2.676 1.398.695.306 1.26.46 1.791.404a3.16 3.16 0 0 0 2.2-1.233c.317-.421.46-.976.53-1.711.069-.733.069-1.688.069-2.936V16.641c0-1.248 0-2.203-.07-2.936-.07-.735-.212-1.29-.529-1.711a3.16 3.16 0 0 0-2.2-1.233c-.53-.055-1.096.098-1.79.404-.694.305-1.553.778-2.677 1.398l-.012.006z"></path></g><defs><filter id="a" width="37" height="37" x="5.5" y="5.5" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_2340_106922"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_2340_106922" result="shape"></feBlend></filter></defs></svg>');function Gf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=Yy();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(2),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",fill:"none","aria-hidden":"true","data-testid":"episodes-seek-icon",role:"img"},i))),b(t,o)}function jf(t,e){let i=f(e,"reversed",3,!1),o=m(()=>i()?"transform: scaleX(-1);":void 0);Gf(t,{get style(){return r(o)}})}var Zy=L('<span class="hot-key-helpers-text svelte-1ad3n06"> </span>'),Xy=L('<div class="svelte-1ad3n06"><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!>',1),Jy=L("<div><!></div>"),e4={hash:"svelte-1ad3n06",code:`.hot-key-helpers-container.svelte-1ad3n06 {position:absolute;z-index:var(--hot-key-helpers-container-z-index);top:calc(50% - 40px);left:calc(50% - 100px);width:200px;height:120px;display:flex;align-items:center;flex-direction:column;
265
265
  animation: svelte-1ad3n06-fadeIn ease var(--controls-transition-duration);padding-top:14px;box-sizing:border-box;}.hot-key-helpers-container.svelte-1ad3n06 > div:where(.svelte-1ad3n06) {width:48px;height:48px;display:flex;justify-content:center;align-items:center;}.hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="volume-off-icon"],
266
266
  .hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="volume-max-icon"] {transform:scale(2);}.hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="replay-icon"],
267
267
  .hot-key-helpers-container.svelte-1ad3n06 svg[data-testid="play-icon"],
@@ -276,10 +276,10 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
276
276
  @keyframes svelte-1ad3n06-fadeOut {
277
277
  0% {opacity:1;}
278
278
  100% {opacity:0;}
279
- }`};function Yf(t,e){U(e,!0),W(t,e4);let[i,o]=Be(),n=()=>S(e.data,"$data",i),s=Ie().ui.t,d=m(()=>!n()),l=m(()=>{var C;return((C=n())==null?void 0:C.type)==="BACKWARD_SEEK"}),u=m(()=>{var C;return((C=n())==null?void 0:C.type)==="FORWARD_SEEK"}),v=m(()=>{var C;return(C=n())==null?void 0:C.type}),$=m(()=>{var C,T;return(C=n())!=null&&C.t?s(n().t.key,{value:n().t.value||""}):(T=n())==null?void 0:T.text});var p=Jy();let _;var w=h(p);{var y=C=>{var T=Xy(),E=ue(T),P=h(E);{var A=ie=>{let G=m(()=>r(v)==="FORWARD_SEEK");zf(ie,{get reversed(){return r(G)}})};R(P,ie=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(r(v))&&ie(A)})}var I=M(P,2);{var V=ie=>{as(ie,{})};R(I,ie=>{r(v)==="PAUSE"&&ie(V)})}var H=M(I,2);{var Y=ie=>{Sr(ie,{})};R(H,ie=>{r(v)==="PLAY"&&ie(Y)})}var O=M(H,2);{var J=ie=>{md(ie,{})};R(O,ie=>{r(v)==="REPLAY"&&ie(J)})}var ne=M(O,2);{var Z=ie=>{tu(ie,{isOff:!0})};R(ne,ie=>{r(v)==="SUBTITLES_OFF"&&ie(Z)})}var me=M(ne,2);{var le=ie=>{tu(ie,{})};R(me,ie=>{r(v)==="SUBTITLES_ON"&&ie(le)})}var Ve=M(me,2);{var Me=ie=>{let G=m(()=>r(v)==="RATE_UP");Qf(ie,{get reversed(){return r(G)}})};R(Ve,ie=>{["RATE_DOWN","RATE_UP"].includes(r(v))&&ie(Me)})}var be=M(Ve,2);{var ae=ie=>{let G=m(()=>r(v)==="EPISODE_NEXT");jf(ie,{get reversed(){return r(G)}})};R(be,ie=>{["EPISODE_PREV","EPISODE_NEXT"].includes(r(v))&&ie(ae)})}var Le=M(be,2);{var re=ie=>{Ss(ie,{volume:0})};R(Le,ie=>{r(v)==="MUTE"&&ie(re)})}var N=M(Le,2);{var pe=ie=>{Ss(ie,{volume:1})};R(N,ie=>{r(v)==="VOLUME"&&ie(pe)})}g(E);var _e=M(E,2);{var Ge=ie=>{var G=Zy(),K=h(G,!0);g(G),k(()=>ge(K,r($))),b(ie,G)};R(_e,ie=>{r($)&&ie(Ge)})}b(C,T)};R(w,C=>{!r(d)&&r(v)&&C(y)})}g(p),k(C=>_=te(p,1,"hot-key-helpers-container svelte-1ad3n06",null,_,C),[()=>({hidden:r(d),"hot-key-helpers-container--left":r(l),"hot-key-helpers-container--right":r(u)})]),b(t,p),z(),o()}var t4=ye('<svg><!><path fill="currentColor" fill-opacity=".72" fill-rule="evenodd" d="M11.736 6.736a.9.9 0 0 1-1.272 0L6 2.273 1.536 6.736A.9.9 0 1 1 .264 5.464l5.1-5.1a.9.9 0 0 1 1.272 0l5.1 5.1a.9.9 0 0 1 0 1.272" clip-rule="evenodd"></path></svg>');function Zf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=t4();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"12",height:"7",fill:"none","aria-hidden":"true",color:"#fff",role:"img"},i))),b(t,o)}var i4=ye('<svg><!><path fill="currentColor" 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.272z"></path></svg>');function Xf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=i4();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",fill:"none","aria-hidden":"true",color:"#fff",role:"img"},i))),b(t,o)}function Is(t,e){U(e,!0);let i=f(e,"direction",3,"left"),o=f(e,"useBtnColor",3,!1),n=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),s=m(()=>(()=>{let $="";return r(a)&&($+="transform: rotate(180deg);"),o()&&($+="color: var(--btn-color, #fff);"),$.length?$:void 0})());var d=ze(),l=ue(d);{var u=$=>{let p=m(()=>r(a)?"chevron-icon--down":"chevron-icon--up");Zf($,{get style(){return r(s)},get"data-testid"(){return r(p)}})},v=$=>{let p=m(()=>r(a)?"chevron-icon--right":"chevron-icon--left");Xf($,{get style(){return r(s)},get"data-testid"(){return r(p)}})};R(l,$=>{r(n)?$(u):$(v,!1)})}b(t,d),z()}var o4=(t,e,i,o,n,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":n();break;case"ArrowRight":a();break}},n4=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},r4=L('<div tabindex="0" role="button"><div class="button-block svelte-1yzc86r" aria-hidden="true"><div class="button-row svelte-1yzc86r"><div class="button button-up svelte-1yzc86r"><!></div> <div class="button button-right svelte-1yzc86r"><!></div></div> <div class="button-row svelte-1yzc86r"><div class="button button-left svelte-1yzc86r"><!></div> <div class="button button-down svelte-1yzc86r"><!></div></div></div></div>'),s4={hash:"svelte-1yzc86r",code:".immersive-controls.svelte-1yzc86r {position:absolute;display:flex;flex-direction:row;top:10px;left:10px;width:56px;height:56px;background-color:rgba(0, 0, 0, .56);border-radius:8px;transition-property:top, left;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);}.immersive-controls.m-shifted.svelte-1yzc86r {top:50px;left:20px;}.button-block.svelte-1yzc86r {width:40px;height:40px;margin:auto auto;transform:rotate(45deg);}.button-row.svelte-1yzc86r {display:flex;flex-direction:row;position:relative;}.button.svelte-1yzc86r {width:20px;height:20px;text-align:center;cursor:pointer;}.button.svelte-1yzc86r svg {opacity:0.7;transition:opacity linear 0.2s;}.button.button-up.svelte-1yzc86r svg {transform:rotate(-45deg) translate(-1px, -1px);}.button.button-right.svelte-1yzc86r svg {transform:rotate(45deg) translate(1px, -1px);}.button.button-down.svelte-1yzc86r svg {transform:rotate(135deg) translate(1px, -3px);}.button.button-left.svelte-1yzc86r svg {transform:rotate(-135deg) translate(-1px, -3px);}.button.svelte-1yzc86r:hover svg {opacity:1;}"};function xd(t,e){U(e,!0),W(t,s4);let i=f(e,"isShifted",3,!1),o=Ie(),n=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},s=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},l=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),v=F("aria_label_spherical_control");var $=r4();let p;$.__keydown=[o4,n,a,s,l,d],$.__keyup=[n4,n,u],Fe($,"aria-label",v);var _=h($),w=h(_),y=h(w);y.__mousedown=a,y.__mouseup=u;var C=h(y);Is(C,{direction:"up",useBtnColor:!0}),g(y);var T=M(y,2);T.__mousedown=d,T.__mouseup=u;var E=h(T);Is(E,{direction:"up",useBtnColor:!0}),g(T),g(w);var P=M(w,2),A=h(P);A.__mousedown=l,A.__mouseup=u;var I=h(A);Is(I,{direction:"up",useBtnColor:!0}),g(A);var V=M(A,2);V.__mousedown=s,V.__mouseup=u;var H=h(V);Is(H,{direction:"up",useBtnColor:!0}),g(V),g(P),g(_),g($),k(Y=>p=te($,1,"immersive-controls svelte-1yzc86r",null,p,Y),[()=>({"m-shifted":i()})]),St("mouseleave",y,u),St("mouseleave",T,u),St("mouseleave",A,u),St("mouseleave",V,u),b(t,$),z()}lt(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as l1,Subscription as a4,filterChanged as l4,filter as d4}from"@vkontakte/videoplayer-shared/es2015";var a1=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var iu=class{constructor(){this.flickeringTimeout=a1(1e3);this.subscriptions=new a4;this.isAuto=!1;this.isLive=!1;this.captions$=new l1([]);this.captionsPrepared$=new l1([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(d4(()=>this.isEnabled()),l4()).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((n,{type:a,value:s},d)=>(o&&!d||(a==="timestamp"?n.push({timeAppeared:Number(s),value:""}):n.length===0?n.push({value:String(s)}):n[n.length-1].value=String(s)),n),[])),this.captionsPrepared$.next(i)}};var c4=L('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),u4=L('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"></span></span>'),p4=L('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),f4=L('<div><span class="caption svelte-c2x749"><!></span></div>'),m4=L("<div><!></div>"),v4={hash:"svelte-c2x749",code:`.subtitles-container.svelte-c2x749 {position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;transition:transform var(--controls-transition-duration);}.subtitles-container.shifted.svelte-c2x749 {transform:translateY(calc(var(--controls-height) * -1));}.subtitles-caption.svelte-c2x749 {position:absolute;left:4%;right:4%;bottom:4%;display:flex;justify-content:center;}.subtitles-caption.mobile.svelte-c2x749 {bottom:8%;}.subtitles-container.auto.svelte-c2x749 .subtitles-caption:where(.svelte-c2x749) {left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin);}.caption.svelte-c2x749 {display:block;overflow-wrap:normal;padding:4px 8px;border-radius:4px;background:rgba(0, 0, 0, 0.4);}.subtitles-container.auto.svelte-c2x749 .caption:where(.svelte-c2x749) {width:100%;}.caption-line.svelte-c2x749 {display:block;text-align:center;}.subtitles-container.auto.svelte-c2x749 .caption-line:where(.svelte-c2x749) {text-align:left;}.caption-segment.svelte-c2x749 {display:inline-block;line-height:1.2;font-size:13px;
279
+ }`};function Yf(t,e){U(e,!0),W(t,e4);let[i,o]=Be(),n=()=>S(e.data,"$data",i),s=Ie().ui.t,d=m(()=>!n()),l=m(()=>{var C;return((C=n())==null?void 0:C.type)==="BACKWARD_SEEK"}),u=m(()=>{var C;return((C=n())==null?void 0:C.type)==="FORWARD_SEEK"}),v=m(()=>{var C;return(C=n())==null?void 0:C.type}),$=m(()=>{var C,T;return(C=n())!=null&&C.t?s(n().t.key,{value:n().t.value||""}):(T=n())==null?void 0:T.text});var p=Jy();let _;var w=h(p);{var y=C=>{var T=Xy(),E=ue(T),P=h(E);{var A=ie=>{let G=m(()=>r(v)==="FORWARD_SEEK");zf(ie,{get reversed(){return r(G)}})};R(P,ie=>{["BACKWARD_SEEK","FORWARD_SEEK"].includes(r(v))&&ie(A)})}var I=M(P,2);{var V=ie=>{as(ie,{})};R(I,ie=>{r(v)==="PAUSE"&&ie(V)})}var H=M(I,2);{var Y=ie=>{Sr(ie,{})};R(H,ie=>{r(v)==="PLAY"&&ie(Y)})}var O=M(H,2);{var J=ie=>{md(ie,{})};R(O,ie=>{r(v)==="REPLAY"&&ie(J)})}var ne=M(O,2);{var Z=ie=>{tu(ie,{isOff:!0})};R(ne,ie=>{r(v)==="SUBTITLES_OFF"&&ie(Z)})}var me=M(ne,2);{var le=ie=>{tu(ie,{})};R(me,ie=>{r(v)==="SUBTITLES_ON"&&ie(le)})}var Ve=M(me,2);{var Me=ie=>{let G=m(()=>r(v)==="RATE_UP");Qf(ie,{get reversed(){return r(G)}})};R(Ve,ie=>{["RATE_DOWN","RATE_UP"].includes(r(v))&&ie(Me)})}var be=M(Ve,2);{var ae=ie=>{let G=m(()=>r(v)==="EPISODE_NEXT");jf(ie,{get reversed(){return r(G)}})};R(be,ie=>{["EPISODE_PREV","EPISODE_NEXT"].includes(r(v))&&ie(ae)})}var Le=M(be,2);{var re=ie=>{Ss(ie,{volume:0})};R(Le,ie=>{r(v)==="MUTE"&&ie(re)})}var N=M(Le,2);{var pe=ie=>{Ss(ie,{volume:1})};R(N,ie=>{r(v)==="VOLUME"&&ie(pe)})}g(E);var _e=M(E,2);{var Ge=ie=>{var G=Zy(),K=h(G,!0);g(G),k(()=>ge(K,r($))),b(ie,G)};R(_e,ie=>{r($)&&ie(Ge)})}b(C,T)};R(w,C=>{!r(d)&&r(v)&&C(y)})}g(p),k(C=>_=te(p,1,"hot-key-helpers-container svelte-1ad3n06",null,_,C),[()=>({hidden:r(d),"hot-key-helpers-container--left":r(l),"hot-key-helpers-container--right":r(u)})]),b(t,p),z(),o()}var t4=ye('<svg><!><path fill="currentColor" fill-opacity=".72" fill-rule="evenodd" d="M11.736 6.736a.9.9 0 0 1-1.272 0L6 2.273 1.536 6.736A.9.9 0 1 1 .264 5.464l5.1-5.1a.9.9 0 0 1 1.272 0l5.1 5.1a.9.9 0 0 1 0 1.272" clip-rule="evenodd"></path></svg>');function Zf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=t4();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"12",height:"7",fill:"none","aria-hidden":"true",color:"#fff",role:"img"},i))),b(t,o)}var i4=ye('<svg><!><path fill="currentColor" 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.272z"></path></svg>');function Xf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=i4();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",fill:"none","aria-hidden":"true",color:"#fff",role:"img"},i))),b(t,o)}function Is(t,e){U(e,!0);let i=f(e,"direction",3,"left"),o=f(e,"useBtnColor",3,!1),n=m(()=>["up","down"].includes(i())),a=m(()=>["right","down"].includes(i())),s=m(()=>(()=>{let $="";return r(a)&&($+="transform: rotate(180deg);"),o()&&($+="color: var(--btn-color, #fff);"),$.length?$:void 0})());var d=ze(),l=ue(d);{var u=$=>{let p=m(()=>r(a)?"chevron-icon--down":"chevron-icon--up");Zf($,{get style(){return r(s)},get"data-testid"(){return r(p)}})},v=$=>{let p=m(()=>r(a)?"chevron-icon--right":"chevron-icon--left");Xf($,{get style(){return r(s)},get"data-testid"(){return r(p)}})};R(l,$=>{r(n)?$(u):$(v,!1)})}b(t,d),z()}var o4=(t,e,i,o,n,a)=>{if(e.has(t.code))switch(t.preventDefault(),t.stopPropagation(),t.code){case"ArrowUp":i();break;case"ArrowDown":o();break;case"ArrowLeft":n();break;case"ArrowRight":a();break}},n4=(t,e,i)=>{e.has(t.code)&&(t.preventDefault(),t.stopPropagation(),i())},r4=L('<div tabindex="0" role="button"><div class="button-block svelte-1yzc86r" aria-hidden="true"><div class="button-row svelte-1yzc86r"><div class="button button-up svelte-1yzc86r"><!></div> <div class="button button-right svelte-1yzc86r"><!></div></div> <div class="button-row svelte-1yzc86r"><div class="button button-left svelte-1yzc86r"><!></div> <div class="button button-down svelte-1yzc86r"><!></div></div></div></div>'),s4={hash:"svelte-1yzc86r",code:".immersive-controls.svelte-1yzc86r {position:absolute;display:flex;flex-direction:row;top:10px;left:10px;width:56px;height:56px;background-color:rgba(0, 0, 0, .56);border-radius:8px;transition-property:top, left;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);}.immersive-controls.m-shifted.svelte-1yzc86r {top:50px;left:20px;}.button-block.svelte-1yzc86r {width:40px;height:40px;margin:auto auto;transform:rotate(45deg);}.button-row.svelte-1yzc86r {display:flex;flex-direction:row;position:relative;}.button.svelte-1yzc86r {width:20px;height:20px;text-align:center;cursor:pointer;}.button.svelte-1yzc86r svg {opacity:0.7;transition:opacity linear 0.2s;}.button.button-up.svelte-1yzc86r svg {transform:rotate(-45deg) translate(-1px, -1px);}.button.button-right.svelte-1yzc86r svg {transform:rotate(45deg) translate(1px, -1px);}.button.button-down.svelte-1yzc86r svg {transform:rotate(135deg) translate(1px, -3px);}.button.button-left.svelte-1yzc86r svg {transform:rotate(-135deg) translate(-1px, -3px);}.button.svelte-1yzc86r:hover svg {opacity:1;}"};function xd(t,e){U(e,!0),W(t,s4);let i=f(e,"isShifted",3,!1),o=Ie(),n=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),a=()=>{o.actions.internal.startCameraManualRotation(0,1)},s=()=>{o.actions.internal.startCameraManualRotation(0,-1)},d=()=>{o.actions.internal.startCameraManualRotation(1,0)},l=()=>{o.actions.internal.startCameraManualRotation(-1,0)},u=()=>(o.actions.internal.stopCameraManualRotation(),null),v=F("aria_label_spherical_control");var $=r4();let p;$.__keydown=[o4,n,a,s,l,d],$.__keyup=[n4,n,u],Oe($,"aria-label",v);var _=h($),w=h(_),y=h(w);y.__mousedown=a,y.__mouseup=u;var C=h(y);Is(C,{direction:"up",useBtnColor:!0}),g(y);var T=M(y,2);T.__mousedown=d,T.__mouseup=u;var E=h(T);Is(E,{direction:"up",useBtnColor:!0}),g(T),g(w);var P=M(w,2),A=h(P);A.__mousedown=l,A.__mouseup=u;var I=h(A);Is(I,{direction:"up",useBtnColor:!0}),g(A);var V=M(A,2);V.__mousedown=s,V.__mouseup=u;var H=h(V);Is(H,{direction:"up",useBtnColor:!0}),g(V),g(P),g(_),g($),k(Y=>p=te($,1,"immersive-controls svelte-1yzc86r",null,p,Y),[()=>({"m-shifted":i()})]),St("mouseleave",y,u),St("mouseleave",T,u),St("mouseleave",A,u),St("mouseleave",V,u),b(t,$),z()}lt(["keydown","keyup","mousedown","mouseup"]);import{ValueSubject as l1,Subscription as a4,filterChanged as l4,filter as d4}from"@vkontakte/videoplayer-shared/es2015";var a1=(t=1e3)=>{let e=null,i=()=>{e&&(clearTimeout(e),e=null)};return{add:o=>{i(),e=setTimeout(o,t)},clear:i}};var iu=class{constructor(){this.flickeringTimeout=a1(1e3);this.subscriptions=new a4;this.isAuto=!1;this.isLive=!1;this.captions$=new l1([]);this.captionsPrepared$=new l1([])}subscribe(){return this.subscriptions.add(this.captions$.pipe(d4(()=>this.isEnabled()),l4()).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((n,{type:a,value:s},d)=>(o&&!d||(a==="timestamp"?n.push({timeAppeared:Number(s),value:""}):n.length===0?n.push({value:String(s)}):n[n.length-1].value=String(s)),n),[])),this.captionsPrepared$.next(i)}};var c4=L('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),u4=L('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"></span></span>'),p4=L('<span class="caption-line svelte-c2x749"><span class="caption-segment svelte-c2x749"> </span></span>'),f4=L('<div><span class="caption svelte-c2x749"><!></span></div>'),m4=L("<div><!></div>"),v4={hash:"svelte-c2x749",code:`.subtitles-container.svelte-c2x749 {position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;transition:transform var(--controls-transition-duration);}.subtitles-container.shifted.svelte-c2x749 {transform:translateY(calc(var(--controls-height) * -1));}.subtitles-caption.svelte-c2x749 {position:absolute;left:4%;right:4%;bottom:4%;display:flex;justify-content:center;}.subtitles-caption.mobile.svelte-c2x749 {bottom:8%;}.subtitles-container.auto.svelte-c2x749 .subtitles-caption:where(.svelte-c2x749) {left:var(--subtitles-caption-margin);right:var(--subtitles-caption-margin);}.caption.svelte-c2x749 {display:block;overflow-wrap:normal;padding:4px 8px;border-radius:4px;background:rgba(0, 0, 0, 0.4);}.subtitles-container.auto.svelte-c2x749 .caption:where(.svelte-c2x749) {width:100%;}.caption-line.svelte-c2x749 {display:block;text-align:center;}.subtitles-container.auto.svelte-c2x749 .caption-line:where(.svelte-c2x749) {text-align:left;}.caption-segment.svelte-c2x749 {display:inline-block;line-height:1.2;font-size:13px;
280
280
  /*font-weight: 500;*/color:var(--white);white-space:pre-wrap;}`};function fa(t,e){U(e,!0),W(t,v4);let[i,o]=Be(),n=()=>S($,"$currentSubtitle$",i),a=()=>S(_,"$isLive$",i),s=()=>S(w,"$isFullscreen",i),d=()=>S(p,"$isAutoSubtitleCaptionVisible$",i),l=f(e,"isMobile",3,!1),u=Ie(),v=zt(),$=u.state.currentSubtitle$,p=u.state.isAutoSubtitleCaptionVisible$,_=u.state.isLive$,w=u.ui.isFullscreen,y=m(()=>!!n().isAuto),C=m(()=>!!a()),T=m(()=>e.playerSize.width*.02),E=m(()=>l()&&!s()||r(T)<=v.minSubtitlesFontSize?v.minSubtitlesFontSize:r(T)),P=ee(null);We(()=>{var J,ne,Z;(J=r(P))==null||J.setIsAuto(r(y)),(ne=r(P))==null||ne.setIsLive(r(C)),(Z=r(P))==null||Z.setCaptions(e.captions)});let A=ee(fe([[]]));Ut(()=>{B(P,fe(new iu().subscribe()));let J=r(P).captionsPrepared$.subscribe(ne=>{B(A,fe(ne))});return()=>{var ne;(ne=r(P))==null||ne.destroy(),J.unsubscribe()}}),Ut(()=>{if(r(y)){let J=window.setTimeout(()=>{p.set(!1)},v.autoSubtitlesTimeout);return()=>{window.clearTimeout(J)}}else p.set(!1)});let I=m(()=>e.playerSize.width<400?10:e.playerSize.width<550?14:24);var V=m4();let H;var Y=h(V);{var O=J=>{var ne=f4();let Z;var me=h(ne),le=h(me);{var Ve=be=>{var ae=c4(),Le=h(ae),re=h(Le,!0);g(Le),g(ae),k(N=>{var pe;it(Le,`font-size: ${(pe=r(E))!=null?pe:""}px`),ge(re,N)},[()=>F("subtitles_auto_caption")]),b(be,ae)},Me=(be,ae)=>{{var Le=N=>{var pe=ze(),_e=ue(pe);Ii(_e,17,()=>r(A),Al,(Ge,ie)=>{var G=u4(),K=h(G);Ii(K,21,()=>r(ie),({value:Re,timeAppeared:Ne})=>Ne,(Re,Ne)=>{let et=()=>r(Ne).value,we=()=>r(Ne).timeAppeared;var Se=ze(),De=ue(Se);{var Xe=ot=>{var ft=Br();k(()=>ge(ft,et())),b(ot,ft)};R(De,ot=>{(!we()||we()<=e.position)&&ot(Xe)})}b(Re,Se)}),g(K),g(G),k(()=>{var Re;return it(K,`font-size: ${(Re=r(E))!=null?Re:""}px`)}),b(Ge,G)}),b(N,pe)},re=N=>{var pe=ze(),_e=ue(pe);Ii(_e,17,()=>e.captions,({value:Ge})=>Ge,(Ge,ie)=>{let G=()=>r(ie).value;var K=p4(),Re=h(K),Ne=h(Re,!0);g(Re),g(K),k(()=>{var et;it(Re,`font-size: ${(et=r(E))!=null?et:""}px`),ge(Ne,G())}),b(Ge,K)}),b(N,pe)};R(be,N=>{var pe;r(y)&&((pe=r(A))!=null&&pe.length)?N(Le):N(re,!1)},ae)}};R(le,be=>{r(y)&&d()?be(Ve):be(Me,!1)})}g(me),g(ne),k(be=>{var ae;Z=te(ne,1,"subtitles-caption svelte-c2x749",null,Z,be),it(ne,`--subtitles-caption-margin: ${(ae=r(I))!=null?ae:""}%`)},[()=>({mobile:l()})]),b(J,ne)};R(Y,J=>{var ne;(e.captions.length||(ne=r(A))!=null&&ne.length)&&J(O)})}g(V),k(J=>H=te(V,1,"subtitles-container svelte-c2x749",null,H,J),[()=>({shifted:e.shifted,auto:r(y)&&!r(C)&&!d()})]),b(t,V),z(),o()}var g4=L('<div class="text svelte-raurnb"> </div>'),h4=L('<div><div class="icon_wrapper svelte-raurnb"><svg class="icon svelte-raurnb" width="22" height="22" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="var(--btn-color, #fff)"></path><path d="M0 0h24v24H0z"></path></g></svg></div> <!></div>'),_4={hash:"svelte-raurnb",code:".wrapper.svelte-raurnb {height:100%;background-position:center;background-size:contain;background-repeat:no-repeat;display:flex;align-items:center;justify-content:center;font-size:16px;flex-direction:column;}.wrapper.bgCover.svelte-raurnb {background-size:cover;}.icon_wrapper.svelte-raurnb {display:flex;flex-direction:column;align-items:center;width:400px;}.icon.svelte-raurnb {width:50px;height:50px;}.text.svelte-raurnb {margin-top:20px;}"};function wd(t,e){U(e,!0),W(t,_4);let i=zt();var o=h4();let n;var a=M(h(o),2);{var s=d=>{var l=g4(),u=h(l);g(l),k(()=>{var v;return ge(u,`\u0412\u0438\u0434\u0435\u043E \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0441\u044F \u043D\u0430 ${(v=e.chromecastDeviceName)!=null?v:""}`)}),b(d,l)};R(a,d=>{e.chromecastDeviceName&&d(s)})}g(o),k(d=>{n=te(o,1,"wrapper svelte-raurnb",null,n,d),it(o,`background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('${e.thumbUrl||""}')`)},[()=>({bgCover:i.features.previewNoEmptySpace})]),b(t,o),z()}var b4=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M460 193.998a3.997 3.997 0 0 1 3.997-3.998h122.006a4.003 4.003 0 0 1 3.997 3.998v82.004a3.997 3.997 0 0 1-3.997 3.998H463.997a4.003 4.003 0 0 1-3.997-3.998zm6 2.993c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm112-72c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zm0 12c0-.546.45-.99.99-.99h4.02c.546 0 .99.45.99.99v4.02c0 .546-.45.99-.99.99h-4.02a.995.995 0 0 1-.99-.99zM507 232a6 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.624 4.446 11.944 4.65 2.106 1.35 3.252.772 3.957.156s1.15-2.806-1.044-4.657c-1.735-1.48-5.806-5.16-14.856-5.15s-12.95 3.5-14.792 5.185c-1.84 1.685-2.288 3.498-.973 4.657s2.315 1.158 4.357-.327c-.007.007 5.357-4.515 11.408-4.515z"></path></svg>');function Jf(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=b4();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200","aria-hidden":"true","data-testid":"error-icon",viewBox:"460 190 130 90",role:"img"},i))),b(t,o)}var $4=L('<div class="container svelte-13zpvm8"><!></div>'),y4={hash:"svelte-13zpvm8",code:".container.svelte-13zpvm8 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}"};function Sd(t){W(t,y4);var e=$4(),i=h(e);Jf(i,{}),g(e),b(t,e)}var x4=L('<div class="playButton svelte-1ciju45" tabindex="0" role="button"><div class="playButtonBackground svelte-1ciju45"></div> <!></div>'),w4=L("<div><!></div>"),S4={hash:"svelte-1ciju45",code:`.container.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:contain;background-repeat:no-repeat;cursor:pointer;transition:opacity 0.2s,
281
281
  visibility 0.2s;will-change:opacity;}.container.hidden.svelte-1ciju45 {opacity:0;visibility:hidden;}.container.bgCover.svelte-1ciju45 {background-size:cover;}.playButton.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;}.playButtonBackground.svelte-1ciju45 {position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);transition:background 0.2s,
282
- transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.svelte-1ciju45:hover .playButtonBackground:where(.svelte-1ciju45) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.svelte-1ciju45 svg {transform:scale(2);}`};function ma(t,e){U(e,!0),W(t,S4);let i=f(e,"iconVisible",3,!0),o=Ie(),n=zt(),a=o.ui.startedByKeyboard$,s=F("tooltip_play"),d=_=>{var y;let w=_.code;["Enter","Space"].includes(w)&&(_.stopPropagation(),_.preventDefault(),a.set(!0),(y=e.startVideo)==null||y.call(e))},l=_=>{var w;_.stopPropagation(),(w=e.startVideo)==null||w.call(e)};var u=w4();let v;u.__click=l;var $=h(u);{var p=_=>{var w=x4();w.__keydown=d,Fe(w,"aria-label",s);var y=M(h(w),2);Sr(y,{}),g(w),b(_,w)};R($,_=>{i()&&_(p)})}return g(u),k(_=>{v=te(u,1,"container svelte-1ciju45",null,v,_),it(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),b(t,u),z({handlePressKey:d,handleClick:l})}lt(["click","keydown"]);var C4=L("<div> </div>"),T4={hash:"svelte-1bcvcf2",code:`.title.svelte-1bcvcf2 {position:absolute;pointer-events:none;left:0;top:0;width:100%;height:var(--controls-gradient-height);font-size:15px;color:var(--white);box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition-property:visibility, transform, opacity;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);will-change:transform, opacity;background:linear-gradient(
282
+ transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.svelte-1ciju45:hover .playButtonBackground:where(.svelte-1ciju45) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.svelte-1ciju45 svg {transform:scale(2);}`};function ma(t,e){U(e,!0),W(t,S4);let i=f(e,"iconVisible",3,!0),o=Ie(),n=zt(),a=o.ui.startedByKeyboard$,s=F("tooltip_play"),d=_=>{var y;let w=_.code;["Enter","Space"].includes(w)&&(_.stopPropagation(),_.preventDefault(),a.set(!0),(y=e.startVideo)==null||y.call(e))},l=_=>{var w;_.stopPropagation(),(w=e.startVideo)==null||w.call(e)};var u=w4();let v;u.__click=l;var $=h(u);{var p=_=>{var w=x4();w.__keydown=d,Oe(w,"aria-label",s);var y=M(h(w),2);Sr(y,{}),g(w),b(_,w)};R($,_=>{i()&&_(p)})}return g(u),k(_=>{v=te(u,1,"container svelte-1ciju45",null,v,_),it(u,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),b(t,u),z({handlePressKey:d,handleClick:l})}lt(["click","keydown"]);var C4=L('<div data-testid="title"> </div>'),T4={hash:"svelte-1bcvcf2",code:`.title.svelte-1bcvcf2 {position:absolute;pointer-events:none;left:0;top:0;width:100%;height:var(--controls-gradient-height);font-size:15px;color:var(--white);box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition-property:visibility, transform, opacity;transition-duration:var(--controls-transition-duration);transition-timing-function:var(--controls-transition-fn);will-change:transform, opacity;background:linear-gradient(
283
283
  0deg,
284
284
  rgba(0, 0, 0, 0) 0%,
285
285
  rgba(0, 0, 0, 0.02) 19%,
@@ -292,7 +292,7 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
292
292
  * \u0415\u0441\u043B\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D(\u0438\u043A\u043E\u043D\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442), \u0442\u043E \u0434\u043E\u043B\u0436\u043D\u044B \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u0443\u0441\u0442\u043E\u0435 \u043C\u0435\u0441\u0442\u043E
293
293
  * \u0447\u0442\u043E\u0431\u044B \u0432\u0441\u0435 \u043B\u0435\u0439\u0431\u043B\u044B \u043D\u0430\u0447\u0438\u043D\u0430\u043B\u0438\u0441\u044C \u0441 \u043E\u0434\u043D\u043E\u0433\u043E \u043E\u0442\u0441\u0442\u0443\u043F\u0430.
294
294
  */margin-left:calc(var(--icon-padding) + var(--select-icon-width));}.label.svelte-1t7rx2m,
295
- .sublabel.svelte-1t7rx2m {text-overflow:ellipsis;overflow:hidden;max-width:100%;}.sublabel.svelte-1t7rx2m {opacity:0.5;}`};function nm(t,e){U(e,!0),W(t,G4);let i=f(e,"isMobile",3,!1);var o=Q4();let n;o.__click=[z4,e],o.__keydown=[q4,e];var a=h(o);{var s=w=>{Td(w,{})};R(a,w=>{e.item.selected&&w(s)})}var d=M(a,2);let l;var u=h(d);{var v=w=>{var y=ze(),C=ue(y);ki(C,()=>e.item.valueComponent,(T,E)=>{E(T,is(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),b(w,y)},$=w=>{var y=W4();let C;var T=h(y,!0);g(y),k(E=>{var P;C=te(y,1,"label svelte-1t7rx2m",null,C,E),ge(T,(P=e.item.label)!=null?P:e.item.value)},[()=>({mobile:i()})]),b(w,y)};R(u,w=>{e.item.valueComponent?w(v):w($,!1)})}var p=M(u,2);{var _=w=>{var y=K4(),C=h(y,!0);g(y),k(()=>ge(C,e.item.sublabel)),b(w,y)};R(p,w=>{e.item.sublabel&&w(_)})}g(d),g(o),k((w,y,C)=>{n=te(o,1,"item",null,n,w),Fe(o,"data-value",e.item.value),Fe(o,"aria-label",y),l=te(d,1,"menu-item-value svelte-1t7rx2m",null,l,C),Fe(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var w,y;return(y=(w=e.item.ariaLabel)!=null?w:e.item.label)!=null?y:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),z()}lt(["click","keydown"]);var j4=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function rm(t,e){U(e,!0);let i=f(e,"isMobile",3,!1),o=f(e,"refMenuItems",15),n=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>y=>Dc(y,r(n)));var s=j4();let d;s.__click=function(...y){var C;(C=r(n))==null||C.apply(this,y)},s.__keydown=function(...y){var C;(C=r(a))==null||C.apply(this,y)};var l=h(s);{var u=y=>{Td(y,{})};R(l,y=>{e.item.selected&&y(u)})}var v=M(l,2);let $;var p=h(v);{var _=y=>{var C=ze();let T=m(()=>e.item.valueComponent);var E=ue(C);ki(E,()=>r(T),(P,A)=>{A(P,is(()=>{var I;return(I=e.item.valueComponentParams)!=null?I:{}}))}),b(y,C)},w=y=>{var C=Br();k(()=>ge(C,e.item.label)),b(y,C)};R(p,y=>{e.item.valueComponent?y(_):y(w,!1)})}g(v),g(s),pt(s,y=>o(o()[e.item.id]=y,!0),()=>{var y;return(y=o())==null?void 0:y[e.item.id]}),k((y,C)=>{var T;d=te(s,1,"item",null,d,y),Fe(s,"aria-label",(T=e.item.ariaLabel)!=null?T:e.item.label),Fe(s,"data-testid",e.item.id),$=te(v,1,"menu-item-value",null,$,C)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,s),z()}lt(["click","keydown"]);var Cr={"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 Z4=(t,e)=>{Ah(t,e.returnFromSubMenu,e.closeSettingsMenu)},X4=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},J4=(t,e)=>{Ql(t)&&(ar(t),e.returnFromSubMenu())},e3=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title svelte-7dfsuh"> </p></li> <!></ul></div>'),t3={hash:"svelte-7dfsuh",code:`.sub-menu.svelte-7dfsuh {--item-padding-vertical-mobile: 16px;--item-padding-vertical: 7px;--item-label-line-height: 18px;
295
+ .sublabel.svelte-1t7rx2m {text-overflow:ellipsis;overflow:hidden;max-width:100%;}.sublabel.svelte-1t7rx2m {opacity:0.5;}`};function nm(t,e){U(e,!0),W(t,G4);let i=f(e,"isMobile",3,!1);var o=Q4();let n;o.__click=[z4,e],o.__keydown=[q4,e];var a=h(o);{var s=w=>{Td(w,{})};R(a,w=>{e.item.selected&&w(s)})}var d=M(a,2);let l;var u=h(d);{var v=w=>{var y=ze(),C=ue(y);ki(C,()=>e.item.valueComponent,(T,E)=>{E(T,is(()=>{var P;return(P=e.item.valueComponentParams)!=null?P:{}}))}),b(w,y)},$=w=>{var y=W4();let C;var T=h(y,!0);g(y),k(E=>{var P;C=te(y,1,"label svelte-1t7rx2m",null,C,E),ge(T,(P=e.item.label)!=null?P:e.item.value)},[()=>({mobile:i()})]),b(w,y)};R(u,w=>{e.item.valueComponent?w(v):w($,!1)})}var p=M(u,2);{var _=w=>{var y=K4(),C=h(y,!0);g(y),k(()=>ge(C,e.item.sublabel)),b(w,y)};R(p,w=>{e.item.sublabel&&w(_)})}g(d),g(o),k((w,y,C)=>{n=te(o,1,"item",null,n,w),Oe(o,"data-value",e.item.value),Oe(o,"aria-label",y),Oe(o,"data-testid",e.item.dataTestid),l=te(d,1,"menu-item-value svelte-1t7rx2m",null,l,C),Oe(d,"data-selected",e.item.selected)},[()=>({mobile:i()}),()=>{var w,y;return(y=(w=e.item.ariaLabel)!=null?w:e.item.label)!=null?y:e.item.value.toString()},()=>({"submenu-value-mobile":i()})]),b(t,o),z()}lt(["click","keydown"]);var j4=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><!> <div><!></div></li>');function rm(t,e){U(e,!0);let i=f(e,"isMobile",3,!1),o=f(e,"refMenuItems",15),n=m(()=>()=>e.openSubMenuList(e.item.children)),a=m(()=>y=>Dc(y,r(n)));var s=j4();let d;s.__click=function(...y){var C;(C=r(n))==null||C.apply(this,y)},s.__keydown=function(...y){var C;(C=r(a))==null||C.apply(this,y)};var l=h(s);{var u=y=>{Td(y,{})};R(l,y=>{e.item.selected&&y(u)})}var v=M(l,2);let $;var p=h(v);{var _=y=>{var C=ze();let T=m(()=>e.item.valueComponent);var E=ue(C);ki(E,()=>r(T),(P,A)=>{A(P,is(()=>{var I;return(I=e.item.valueComponentParams)!=null?I:{}}))}),b(y,C)},w=y=>{var C=Br();k(()=>ge(C,e.item.label)),b(y,C)};R(p,y=>{e.item.valueComponent?y(_):y(w,!1)})}g(v),g(s),pt(s,y=>o(o()[e.item.id]=y,!0),()=>{var y;return(y=o())==null?void 0:y[e.item.id]}),k((y,C)=>{var T;d=te(s,1,"item",null,d,y),Oe(s,"aria-label",(T=e.item.ariaLabel)!=null?T:e.item.label),Oe(s,"data-testid",e.item.id),$=te(v,1,"menu-item-value",null,$,C)},[()=>({mobile:i(),bottomBordered:e.item.bottomBordered}),()=>({"submenu-value-mobile":i()})]),b(t,s),z()}lt(["click","keydown"]);var Cr={"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 Z4=(t,e)=>{Ah(t,e.returnFromSubMenu,e.closeSettingsMenu)},X4=(t,e)=>{t.stopPropagation(),e.returnFromSubMenu()},J4=(t,e)=>{Ql(t)&&(ar(t),e.returnFromSubMenu())},e3=L('<div><ul role="menu"><li role="menuitem" tabindex="0" data-testid="return-to-settings-menu"><!> <p class="title svelte-7dfsuh"> </p></li> <!></ul></div>'),t3={hash:"svelte-7dfsuh",code:`.sub-menu.svelte-7dfsuh {--item-padding-vertical-mobile: 16px;--item-padding-vertical: 7px;--item-label-line-height: 18px;
296
296
  /*\u0414\u043B\u044F \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u0438 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u0441\u043F\u0438\u0441\u043A\u0430*/--edge-item-padding-vertical-mobile: calc(6px + var(--item-padding-vertical-mobile));--edge-item-padding-vertical: calc(8px + var(--item-padding-vertical));}.sub-menu.svelte-7dfsuh .item.mobile {padding:var(--item-padding-vertical-mobile) 17px;line-height:var(--item-label-line-height);font-size:14px;}.sub-menu.svelte-7dfsuh {
297
297
  /**
298
298
  * \u0422\u0430\u043A \u043A\u0430\u043A \u0443 \u043D\u0430\u0441 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0441\u0442\u0438\u043A\u0438, \u043D\u0443\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u0434\u0434\u0438\u043D\u0433 \u0441 \u0432\u044B\u0441\u043E\u0442\u0443 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430.
@@ -302,11 +302,11 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
302
302
  var(--edge-item-padding-vertical-mobile) + var(--item-padding-vertical-mobile) + var(--item-label-line-height) +
303
303
  1px
304
304
  );}.sub-menu.svelte-7dfsuh .items:where(.svelte-7dfsuh) .item.header:where(.svelte-7dfsuh) {position:absolute;top:0;left:0;right:0;min-width:max-content;display:flex;justify-content:space-between;border-bottom:var(--divider-border);}.header.svelte-7dfsuh .title:where(.svelte-7dfsuh) {margin-left:8px;}.sub-menu.svelte-7dfsuh .item {padding:var(--item-padding-vertical) 12px;padding-right:22px;}.items.svelte-7dfsuh .item:first-child:not(.mobile) {padding-top:var(--edge-item-padding-vertical);}.items.svelte-7dfsuh .item:last-child:not(.mobile) {padding-bottom:var(--edge-item-padding-vertical);}.items.svelte-7dfsuh .item.mobile:first-child {padding-top:var(--edge-item-padding-vertical-mobile);}.items.svelte-7dfsuh .item.mobile:last-child {padding-bottom:var(--edge-item-padding-vertical-mobile);}.sub-menu.svelte-7dfsuh .item.bottomBordered {border-bottom:var(--divider-border);}.sub-menu.svelte-7dfsuh .item .sublabel {line-height:14px;font-size:12px;}.sub-menu.svelte-7dfsuh .item:not(.mobile) .label,
305
- .item.svelte-7dfsuh:not(.mobile) p:where(.svelte-7dfsuh) {line-height:var(--item-label-line-height);font-size:13px;}`};function am(t,e){U(e,!0),W(t,t3);let[i,o]=Be(),n=()=>S($,"$isFullscreen",i),a=()=>S(p,"$playerSize",i),s=f(e,"isMobile",3,!1),d=f(e,"playerControlsHeight",3,0),l=f(e,"ariaLabelReturnFromSubMenu",19,()=>F("aria_label_submenu_back")),u=f(e,"listRef",15);Ut(()=>{let Z=e.items.findIndex(me=>me.selected);u().children[Z+1].focus()});let v=Ie(),$=v.ui.isFullscreen,p=v.ui.playerSize,_=ee(void 0),w=ee(0),y=ee(0),C=m(()=>s()&&n()?`max-height: ${Math.round(a().height*.6)}px`:s()?"":`max-height: ${a().height-32-r(y)-d()}px; overflow: auto;`),T=m(()=>Math.max(e.minWidth,r(w)));var E=e3();let P;var A=h(E);let I;A.__keydown=[Z4,e];var V=h(A);let H;V.__click=[X4,e],V.__keydown=[J4,e];var Y=h(V);Is(Y,{direction:"left"});var O=M(Y,2),J=h(O,!0);g(O),g(V),pt(V,Z=>B(_,Z),()=>r(_));var ne=M(V,2);Ii(ne,17,()=>e.items,Al,(Z,me)=>{var le=ze(),Ve=ue(le);{var Me=ae=>{nm(ae,{get item(){return r(me)},get isMobile(){return s()}})},be=(ae,Le)=>{{var re=N=>{rm(N,{get isMobile(){return s()},get item(){return r(me)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(ae,N=>{r(me).type==="OPEN_SUB_MENU"&&N(re)},Le)}};R(Ve,ae=>{r(me).type==="SELECT_VALUE"?ae(Me):ae(be,!1)})}b(Z,le)}),g(A),pt(A,Z=>u(Z),()=>u()),g(E),k((Z,me,le)=>{P=te(E,1,"sub-menu menu svelte-7dfsuh",null,P,Z),Fe(E,"data-testid",`sub-menu-${e.id}`),it(E,`min-width: ${r(T)}px`),I=te(A,1,"items svelte-7dfsuh",null,I,me),it(A,r(C)),H=te(V,1,"item header back svelte-7dfsuh",null,H,le),Fe(V,"aria-label",l()),ge(J,e.title)},[()=>({desktop:!s(),mobile:s()}),()=>({mobile:s()}),()=>({mobile:s()})]),Or(V,"clientWidth",Z=>B(w,Z)),Or(V,"clientHeight",Z=>B(y,Z)),b(t,E),z(),o()}lt(["keydown","click"]);import{noop as i3}from"@vkontakte/videoplayer-shared/es2015";var o3=(t,e)=>Dc(t,e()),n3=(t,e)=>{t.stopPropagation(),e()()},r3=L('<div class="value svelte-1ikfjte"> </div>'),s3=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),a3={hash:"svelte-1ikfjte",code:".value.svelte-1ikfjte {position:relative;opacity:0.7;overflow:hidden;text-overflow:ellipsis;}"};function lm(t,e){U(e,!0),W(t,a3);let i=f(e,"isMobile",3,!1),o=f(e,"onClick",3,i3),n=f(e,"valueComponent",3,void 0),a=f(e,"ref",15);var s=s3();let d;s.__click=[n3,o],s.__keydown=[o3,o];var l=h(s),u=h(l);{var v=T=>{pa(T,{get icon(){return e.icon}})},$=T=>{var E=ze();let P=m(()=>e.icon);var A=ue(E);ki(A,()=>r(P),(I,V)=>{V(I,{})}),b(T,E)};R(u,T=>{typeof e.icon=="string"?T(v):T($,!1)})}g(l);var p=M(l,2),_=h(p,!0);g(p);var w=M(p,2);{var y=T=>{var E=ze();let P=m(n);var A=ue(E);ki(A,()=>r(P),(I,V)=>{V(I,{})}),b(T,E)},C=T=>{var E=r3(),P=h(E,!0);g(E),k(()=>ge(P,e.value)),b(T,E)};R(w,T=>{n()?T(y):T(C,!1)})}g(s),pt(s,T=>a(T),()=>a()),k(T=>{d=te(s,1,"item",null,d,T),Fe(s,"aria-label",e.ariaLabel),Fe(s,"data-testid",e.id),ge(_,e.label)},[()=>({mobile:i()})]),b(t,s),z()}lt(["click","keydown"]);import{noop as c1}from"@vkontakte/videoplayer-shared/es2015";var l3=(t,e)=>{Ya(t,()=>e())},d3=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),c3=L('<img class="icon" aria-hidden="true">'),u3=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label svelte-15ifkac"> </div></li>'),p3={hash:"svelte-15ifkac",code:".label.svelte-15ifkac {overflow:hidden;text-overflow:ellipsis;}"};function dm(t,e){U(e,!0),W(t,p3);let i=f(e,"isMobile",3,!1),o=f(e,"onClick",3,c1),n=f(e,"closeSettings",3,c1),a=ee(!1),s=()=>{B(a,!0)},d=C=>{C==null||C.stopPropagation(),o()(),n()()};var l=u3();let u;l.__click=d,l.__keydown=[l3,d];var v=h(l),$=h(v);{var p=C=>{var T=ze(),E=ue(T);{var P=I=>{var V=d3();b(I,V)},A=I=>{var V=c3();k(()=>Fe(V,"src",e.icon)),St("error",V,s),Ws(V),b(I,V)};R(E,I=>{r(a)?I(P):I(A,!1)})}b(C,T)},_=C=>{var T=ze();let E=m(()=>e.icon);var P=ue(T);ki(P,()=>r(E),(A,I)=>{I(A,{})}),b(C,T)};R($,C=>{typeof e.icon=="string"?C(p):C(_,!1)})}g(v);var w=M(v,2),y=h(w,!0);g(w),g(l),k(C=>{var T;u=te(l,1,"item",null,u,C),Fe(l,"aria-label",(T=e.ariaLabel)!=null?T:e.label),Fe(l,"data-testid",e.id),ge(y,e.label)},[()=>({mobile:i()})]),b(t,l),z()}lt(["click","keydown"]);import{noop as v3}from"@vkontakte/videoplayer-shared/es2015";var f3=L('<div class="toggle_wrap svelte-17wbjko"><div></div> <div class="toggle-label svelte-17wbjko"></div></div>'),m3={hash:"svelte-17wbjko",code:'.toggle_wrap.svelte-17wbjko {min-height:15px;padding:0;font-size:12px;line-height:15px;cursor:pointer;user-select:none;}.toggle.svelte-17wbjko {float:right;margin-top:3px;width:28px;height:9px;border-radius:45px;background-color:var(--toggle-color-separator);cursor:pointer;}.toggle.svelte-17wbjko::after {content:"";float:left;position:relative;width:15px;height:15px;border-radius:50%;background-color:var(--toggle-color-off);top:-3px;left:0;transition:left .1s ease;}.toggle.on.svelte-17wbjko::after {background-color:var(--toggle-color-on);left:13px;}.toggle-label.svelte-17wbjko {overflow:hidden;}'};function cm(t,e){W(t,m3);let i=f(e,"enabled",3,!1);var o=f3(),n=h(o);let a;$e(2),g(o),k(s=>a=te(n,1,"toggle svelte-17wbjko",null,a,s),[()=>({on:i()})]),b(t,o)}var g3=(t,e,i)=>{Mh(t,e(),o=>i()(o))},h3=(t,e,i)=>{t.stopPropagation(),e()(!i())},_3=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),b3=L('<li role="menuitem" tabindex="0"><!></li>');function um(t,e){U(e,!0);let i=f(e,"isMobile",3,!1),o=f(e,"onClick",3,v3),n=f(e,"enabled",3,!1),a=f(e,"tooltipText",3,void 0),s=f(e,"maxTooltipWidth",3,void 0);var d=b3();let l;d.__click=[h3,o,n],d.__keydown=[g3,n,o];var u=h(d);sa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return s()},children:(v,$)=>{var p=_3();let _;var w=h(p),y=h(w);{var C=I=>{pa(I,{get icon(){return e.icon}})},T=I=>{var V=ze();let H=m(()=>e.icon);var Y=ue(V);ki(Y,()=>r(H),(O,J)=>{J(O,{})}),b(I,V)};R(y,I=>{typeof e.icon=="string"?I(C):I(T,!1)})}g(w);var E=M(w,2),P=h(E,!0);g(E);var A=M(E,2);cm(A,{get enabled(){return n()}}),g(p),k(I=>{_=te(p,1,"switch-wrapper",null,_,I),ge(P,e.label)},[()=>({mobile:i()})]),b(v,p)},$$slots:{default:!0}}),g(d),k(v=>{var $;l=te(d,1,"item switch-item",null,l,v),Fe(d,"aria-label",($=e.ariaLabel)!=null?$:e.label),Fe(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),z()}lt(["click","keydown"]);import{isValidURL as z3,VideoQuality as y1}from"@vkontakte/videoplayer-shared/es2015";var u1=()=>{let t=ee(fe([])),e=m(()=>(r(t).length?r(t).at(-1):null)||null);return{get current(){return r(e)},pushSubMenu:i=>{r(t).push(i)},popSubMenu:()=>{B(t,fe(r(t).slice(0,-1)))},popAllSubMenus:()=>{B(t,fe([]))}}};var $3=L('<div class="quality-icon svelte-t2qk8t"><!></div>'),y3=L('<div class="quality-label svelte-t2qk8t"><span> </span> <!></div>'),x3={hash:"svelte-t2qk8t",code:".quality-label.svelte-t2qk8t {position:relative;}.quality.svelte-t2qk8t {font-size:13px;line-height:18px;}.quality.sub.svelte-t2qk8t {opacity:0.7;}.quality-icon.svelte-t2qk8t {position:absolute;padding-left:2px;transform:translateX(100%);display:flex;top:0;right:0;}.quality-icon.svelte-t2qk8t svg {color:var(--blue-light);}"};function ga(t,e){U(e,!0),W(t,x3);let i=f(e,"isSubCase",3,!1),o=m(()=>Fc(e.quality));var n=y3(),a=h(n);let s;var d=h(a,!0);g(a);var l=M(a,2);{var u=v=>{var $=$3();let p=m(()=>r(o));var _=h($);ki(_,()=>r(p),(w,y)=>{y(w,{})}),g($),b(v,$)};R(l,v=>{r(o)&&!e.isMobile&&v(u)})}g(n),k(v=>{s=te(a,1,"svelte-t2qk8t",null,s,v),ge(d,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,n),z()}import{VideoQuality as w3}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as p1}from"@vkontakte/videoplayer-core/es2015";var f1=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},m1=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=f1({quality:t,availableQualities:e});return i?t===p1.INVARIANT?F("auto_quality_invariant"):F("auto_quality",{actual:o}):o},v1=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===p1.INVARIANT?i:`${i}${f1({quality:t,availableQualities:e})}`:"...";var S3=L('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),C3={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function rl(t,e){U(e,!0),W(t,C3);let[i,o]=Be(),n=()=>S(l,"$currentQuality$",i),a=()=>S(u,"$availableQualities$",i),s=()=>S(v,"$isMobile$",i),d=Ie(),l=d.state.currentQuality$,u=d.state.availableQualities$,v=d.ui.isMobile,$=" \xB7 ",p=m(()=>e.prefix+(e.selected&&n()!==w3.INVARIANT?$:"")),_=m(()=>v1({prefix:r(p),quality:n(),availableQualities:a(),onlyPrefix:!e.selected}));var w=S3(),y=h(w);let C=m(()=>e.selected?n():void 0);ga(y,{get quality(){return r(C)},get label(){return r(_)},get isMobile(){return s()},isSubCase:!0}),g(w),b(t,w),z(),o()}var T3=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,n="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${n}|${a}`,"g")},I3={br:!0,span:!0},pm=(t,e={})=>{var d,l,u,v,$,p,_;if(!t)return t;let i=q(q({},I3),e),o=Object.keys(i);if(!o.length)return t;let n=T3(o),a=[],s=0;for(let w of t.matchAll(n)){let y=w[0],C=((d=w.groups)==null?void 0:d.keyhtml)||((l=w.groups)==null?void 0:l.keyi18n)||((u=w.groups)==null?void 0:u.keyhtmlself)||((v=w.groups)==null?void 0:v.keyi18nself)||"",{index:T}=w;if(!i[C]){a.push(t.slice(s,T)),s=T+y.length;continue}let E=($=w.groups)!=null&&$.childrenhtml?pm(w.groups.childrenhtml,i):"",P=(p=w.groups)!=null&&p.childrenhtml?y.replace(new RegExp((_=w.groups)==null?void 0:_.childrenhtml),()=>E||""):y;a.push(t.slice(s,T),P),s=T+y.length}return s===0?t:(a.push(t.slice(s)),a.join(""))};function Id(t,e){U(e,!1);let i=f(e,"message",8),o=pm(i());xr();var n=ze(),a=ue(n);{var s=d=>{var l=ze(),u=ue(l);Ml(u,()=>o,!1,!1),b(d,l)};R(a,d=>{o&&d(s)})}b(t,n),z()}var k3=L('<p class="quality-applies sublabel svelte-1qk3zto"><!></p>'),E3={hash:"svelte-1qk3zto",code:".quality-applies.svelte-1qk3zto {display:flex;justify-content:end;padding:3px 0;color:rgba(255, 255, 255, 0.5);}.quality-applies span {color:#70c1ff;}"};function fm(t,e){U(e,!1),W(t,E3),xr();var i=k3(),o=h(i);let n=br(()=>F("quality_applience",{action:`<span>${F("quality_applience_action")}</span>`}));Id(o,{get message(){return r(n)}}),g(i),b(t,i),z()}var h1=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"QUALITY_OTHER",type:"OPEN_SUB_MENU",selected:o,valueComponent:rl,valueComponentParams:{prefix:F("other_quality"),selected:o},children:"QUALITY"}},mm=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"QUALITY_AUTO",type:"SELECT_VALUE",value:"auto",label:F("auto_quality_limit"),valueComponent:e?rl:void 0,valueComponentParams:{prefix:F("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),_1=()=>({id:"QUALITY_APPLIENCE",type:"OPEN_SUB_MENU",valueComponent:fm,bottomBordered:!0,children:"QUALITY_APPLIENCE"}),vm=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"QUALITY_HIGH",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:F("high_quality"),valueComponent:t?rl:void 0,valueComponentParams:{prefix:F("high_quality"),selected:i},sublabel:F("high_quality_description")}),gm=({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:F("traffic_saving_quality"),valueComponent:t?rl:void 0,valueComponentParams:{prefix:F("traffic_saving_quality"),selected:i},sublabel:F("traffic_saving_quality_description")});var ou=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),nu=(t,e)=>{var s;if(!t)return"";let{language:i,label:o}=t,n;if(i==="und"?n=void 0:i&&(n=(s=Gc(i))!=null?s:i),o&&i&&n){let d=e.filter(l=>l.label===o&&l.language===i);if(d.length===1)return F("audio_stream_display_language_label",{language:n,label:o});{let l=ou(t,d);return F("audio_stream_display_language_label_index",{language:n,label:o,index:l})}}if(o){let d=e.filter(l=>l.label===o);if(d.length===1)return o;{let l=ou(t,d);return F("audio_stream_display_label_index",{label:o,index:l})}}if(i&&n){let d=e.filter(l=>l.language===i);if(d.length===1)return n;{let l=ou(t,d);return F("audio_stream_display_language_index",{language:n,index:l})}}let a=ou(t,e);return F("audio_stream_display_unknown",{index:a})};var P3={QUALITY_DETAILS:t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:n}=t,a=[];return i&&a.push({handler:mm,selected:e&&!o&&!n||!1}),a.push({handler:gm,selected:o},{handler:vm,selected:n}),{title:F("submenu_quality"),id:"QUALITY_DETAILS",items:[_1(t),...a.map(({handler:s,selected:d})=>s({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),h1(t)]}},QUALITY:({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"QUALITY",title:F("submenu_quality"),closeSettingsMenu:t,items:i.map(n=>({type:"SELECT_VALUE",value:n.value,valueComponent:ga,valueComponentParams:{quality:n.value,label:n.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:n.selected,label:n.displayValue}))}),QUALITY_APPLIENCE:t=>{var i,o,n;let{closeSettingsMenu:e}=t;return{id:"QUALITY_APPLIENCE",title:F("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:mm,selected:((i=Cc())==null?void 0:i.type)==="auto_quality"},{handler:gm,selected:((o=Cc())==null?void 0:o.type)==="traffic_saving"},{handler:vm,selected:((n=Cc())==null?void 0:n.type)==="high_quality"}].map(({handler:a,selected:s})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:s},t))}},AUDIO_LANGUAGES:({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"AUDIO_LANGUAGES",title:F("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(n=>({type:"SELECT_VALUE",value:n,dataValue:n.id,selectItem:o,selected:n.id===(i==null?void 0:i.id),label:nu(n,e)}))}),PLAYBACK_RATE_SUB_MENU:({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"PLAYBACK_RATE_SUB_MENU",title:F("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:F("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i,selectItem:e,selected:i.selected,label:i.displayValue}))})},b1=({subMenuId:t,context:e})=>t?[P3[t](e)]:[];var A3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M.1 6.5c0-2.24 0-3.36.436-4.216A4 4 0 0 1 2.284.536C3.139.1 4.259.1 6.5.1h5c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748c.436.856.436 1.976.436 4.216s0 3.36-.436 4.216a4 4 0 0 1-1.748 1.748c-.836.426-1.925.436-4.064.436l.55 2.2H14.1a.9.9 0 0 1 0 1.8H3.9a.9.9 0 1 1 0-1.8h1.897l.55-2.2c-2.139 0-3.227-.01-4.063-.436a4 4 0 0 1-1.748-1.748C.1 9.86.1 8.74.1 6.5m11.4-4.6h-5c-1.15 0-1.904.002-2.481.049-.556.045-.786.124-.918.19a2.2 2.2 0 0 0-.962.962c-.067.132-.145.363-.19.918-.048.577-.05 1.331-.05 2.481s.002 1.904.05 2.48c.045.556.123.787.19.919a2.2 2.2 0 0 0 .962.961c.132.068.362.146.918.192.577.047 1.33.048 2.48.048h5c1.15 0 1.904-.001 2.481-.048.556-.046.787-.124.918-.192a2.2 2.2 0 0 0 .962-.961c.067-.132.146-.363.191-.918.047-.577.049-1.331.049-2.48s-.002-1.905-.049-2.482c-.045-.555-.124-.786-.191-.918a2.2 2.2 0 0 0-.962-.961c-.131-.067-.362-.146-.918-.191-.577-.048-1.33-.049-2.48-.049m-3.298 11-.55 2.2h2.695l-.55-2.2z" clip-rule="evenodd"></path></svg>');function hm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=A3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"17",fill:"none","aria-hidden":"true","data-testid":"traffic-saving-icon",role:"img"},i))),b(t,o)}var M3=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M8.295 14.247c1.87 1.896 5.505.02 5.505-3.548V5.645l2.399-.697A2.74 2.74 0 0 0 18 2.364l-.01-1.72a.75.75 0 0 0-.906-.623l-.267.061c-.941.215-1.886.431-2.807.721-1.332.45-2.03 1.614-2.01 3.077V9c-3.887.196-5.639 3.286-3.705 5.247M.9.1a.9.9 0 0 0 0 1.8h8.197a.9.9 0 0 0 0-1.8zM.9 5.1a.9.9 0 1 0 0 1.8h7.196a.9.9 0 0 0 0-1.8zM0 11a.9.9 0 0 1 .9-.9h4.183a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11"></path></svg>');function _m(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=M3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"15",fill:"none","aria-hidden":"true","data-testid":"audio-languages-icon",role:"img"},i))),b(t,o)}var L3=ye('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" fill-rule="nonzero" d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A7.94 7.94 0 0 1 11 4.07M5.69 7.1 4.26 5.68A9.95 9.95 0 0 0 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A7.87 7.87 0 0 1 4.07 13zM11 21.95v-2.02a7.94 7.94 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.688 8.576l4.746 2.736a.792.792 0 0 1 0 1.372l-4.746 2.737a.792.792 0 0 1-1.188-.686V9.262a.792.792 0 0 1 1.188-.686"></path></g></svg>');function bm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=L3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"play-speed-icon",role:"img"},i))),b(t,o)}var V3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8 0a.9.9 0 0 1 .9.9v10.927l4.564-4.563a.9.9 0 0 1 1.272 1.272l-6.1 6.1a.9.9 0 0 1-1.272 0l-6.1-6.1a.9.9 0 1 1 1.272-1.272L7.1 11.827V.9A.9.9 0 0 1 8 0M0 18a.9.9 0 0 1 .9-.9h14.2a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 18" clip-rule="evenodd"></path></svg>');function $m(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=V3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"19",fill:"none","aria-hidden":"true","data-testid":"download-icon",role:"img"},i))),b(t,o)}var R3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8.863 2.1h6.274c.674-.002 1.2.211 1.683.697l4.383 4.383c.478.476.699.998.697 1.683v6.274c.002.685-.22 1.207-.697 1.683l-4.383 4.383c-.476.478-.998.699-1.683.697H8.863c-.685.002-1.207-.22-1.683-.697L2.797 16.82c-.478-.476-.699-.998-.697-1.683V8.863c-.002-.685.22-1.207.697-1.683L7.18 2.797c.484-.486 1.009-.699 1.683-.697m-.445 2.005L4.105 8.418c-.18.18-.205.242-.205.495v6.174c0 .25.025.316.205.495l4.313 4.313c.179.179.24.205.495.205h6.174c.253 0 .316-.026.495-.205l4.313-4.313c.18-.18.205-.245.205-.495V8.913c0-.254-.026-.316-.205-.495l-4.313-4.313c-.18-.18-.242-.205-.495-.205H8.913c-.254 0-.319.029-.495.205M13 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" clip-rule="evenodd"></path></svg>');function ym(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=R3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"report-icon",role:"img"},i))),b(t,o)}var D3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4 12.3V12c0-1.47.005-2.547.075-3.403.074-.904.216-1.482.454-1.949a4.85 4.85 0 0 1 2.12-2.12c.466-.237 1.044-.379 1.948-.453C9.51 4.001 10.675 4 12.3 4h4.512a2 2 0 0 0-.174-.49 2.4 2.4 0 0 0-1.048-1.048 2.4 2.4 0 0 0-.931-.239 14 14 0 0 0-1.026-.023H12.26c-1.576 0-2.814 0-3.81.081-1.014.083-1.856.255-2.62.644A6.65 6.65 0 0 0 2.926 5.83c-.389.763-.56 1.605-.644 2.62-.081.995-.081 2.233-.081 3.809v1.373c0 .392 0 .738.023 1.025.025.306.081.623.239.931a2.4 2.4 0 0 0 1.048 1.05c.162.082.326.136.49.173V12.3zM10.08 6h-.035c-.52 0-.964 0-1.329.03-.383.03-.755.097-1.112.276a2.9 2.9 0 0 0-1.298 1.298c-.179.357-.246.73-.277 1.112C6 9.081 6 9.524 6 10.046v7.909c0 .52 0 .964.03 1.329.03.382.097.755.276 1.112a2.9 2.9 0 0 0 1.298 1.298c.357.179.73.246 1.112.277.365.029.808.029 1.329.029h6.91c.52 0 .964 0 1.329-.03.382-.03.755-.097 1.112-.276a2.9 2.9 0 0 0 1.298-1.298c.179-.357.246-.73.277-1.112.029-.365.029-.808.029-1.33v-7.909c0-.52 0-.964-.03-1.329-.03-.382-.097-.755-.276-1.112a2.9 2.9 0 0 0-1.298-1.298c-.357-.179-.73-.246-1.112-.277C17.919 6 17.476 6 16.954 6zM8.408 7.916c.065-.032.179-.07.452-.093a18 18 0 0 1 1.22-.023h6.84c.565 0 .936 0 1.22.023.273.022.387.06.452.093a1.1 1.1 0 0 1 .492.492c.032.065.07.179.093.452.022.284.023.655.023 1.22v7.84c0 .565 0 .936-.023 1.22-.023.273-.06.387-.093.452a1.1 1.1 0 0 1-.492.492c-.065.032-.18.07-.452.093a18 18 0 0 1-1.22.023h-6.84c-.565 0-.936 0-1.22-.023-.273-.023-.387-.06-.452-.093a1.1 1.1 0 0 1-.492-.492c-.032-.065-.07-.18-.093-.452a17 17 0 0 1-.023-1.22v-7.84c0-.565 0-.936.023-1.22.022-.273.06-.387.093-.452a1.1 1.1 0 0 1 .492-.492" clip-rule="evenodd"></path></svg>');function ru(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=D3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"copy-icon",role:"img"},i))),b(t,o)}var N3=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12 20.105a8.105 8.105 0 1 0 0-16.21 8.105 8.105 0 0 0 0 16.21M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10m0-12.372a1.316 1.316 0 1 1 0-2.632 1.316 1.316 0 0 1 0 2.632m-.947 2.822c0-.541.424-.98.947-.98s.947.439.947.98v3.83c0 .54-.424.98-.947.98s-.947-.44-.947-.98z"></path></svg>');function xm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=N3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"info-icon",role:"img"},i))),b(t,o)}var B3=L('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),O3={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function wm(t,e){U(e,!0),W(t,O3);let[i,o]=Be(),n=()=>S(u,"$currentQuality$",i),a=()=>S(v,"$availableQualities$",i),s=()=>S($,"$isAutoQualityEnabled$",i),d=()=>S(p,"$isMobile$",i),l=Ie(),u=l.state.currentQuality$,v=l.state.availableQualities$,$=l.state.isAutoQualityEnabled$,p=l.ui.isMobile,_=m(()=>m1({quality:n(),availableQualities:a(),isAutoQualityEnabled:s()}));var w=B3(),y=h(w);ga(y,{get quality(){return n()},get label(){return r(_)},get isMobile(){return d()}}),g(w),b(t,w),z(),o()}var F3={QUALITY_SETTINGS:({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?F("auto_quality_option"):e)||"";return{id:"QUALITY_SETTINGS",type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_quality",{actual:o}),icon:td,label:F("menu_quality"),value:e,valueComponent:wm,weight:Cr["quality-settings"],children:i?"QUALITY_DETAILS":"QUALITY"}},TRAFFIC_SAVING_SWITCH:({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"TRAFFIC_SAVING_SWITCH",weight:Cr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:t?F("aria_label_submenu_traffic_saving_off"):`${F("aria_label_submenu_traffic_saving_on")}. ${F("traffic_saving_helper_text")}`,icon:hm,label:F("menu_traffic_saving"),enabled:t,tooltipText:F("traffic_saving_helper_text"),maxTooltipWidth:175}),AUDIO_LANGUAGES:({currentAudioStream:t,availableAudioStreams:e})=>{let i=nu(t,e);return{id:"AUDIO_LANGUAGES",weight:Cr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_audio_languages",{actual:i}),icon:_m,label:F("menu_audio_languages"),value:i,children:"AUDIO_LANGUAGES"}},PLAYBACK_RATE:({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(n=>n.value===e))==null?void 0:o.displayValue)||"";return{id:"PLAYBACK_RATE",weight:Cr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_rate",{actual:i}),icon:bm,label:F("menu_playback_rate"),value:`${e}x`,children:"PLAYBACK_RATE_SUB_MENU"}},SUBTITLES:({currentSubtitle:t})=>({id:"SUBTITLES",weight:Cr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_subtitle",{actual:t.displayValue}),icon:id,label:F("subtitles_caption"),value:t.displayValue,children:"SUBTITLES"}),DOWNLOAD:({onDownloadClick:t})=>({id:"DOWNLOAD",weight:Cr.download,type:"CLICK",onClick:t,label:F("download_video_caption"),ariaLabel:F("aria_label_menu_download"),icon:$m}),SHOW_SUPPORT:({onReportProblemClick:t})=>({id:"SHOW_SUPPORT",weight:Cr.report,type:"CLICK",onClick:t,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,icon:ym,isHiddenFor:["desktop"]}),COPY_DATA:({onCopyDataClick:t})=>({id:"COPY_DATA",weight:Cr["copy-data"],type:"CLICK",onClick:t,label:F("menu_copy_debug"),ariaLabel:F("menu_copy_debug"),icon:ru,isHiddenFor:["desktop"]}),SAVE_TRACE_INFO:({onSaveTraceDataClick:t})=>({id:"SAVE_TRACE_INFO",weight:Cr["save-trace-info"],type:"CLICK",onClick:t,label:F("menu_save_debug"),ariaLabel:F("menu_save_debug"),icon:ru,isHiddenFor:["desktop"]}),DEBUG_INFO:({toggleShowDebugInfo:t,debugPanelVisible:e})=>({id:"DEBUG_INFO",weight:Cr["debug-info"],type:"CLICK",onClick:t,label:e?F("aria_label_menu_debug_overlay_disable"):F("aria_label_menu_debug_overlay_enable"),ariaLabel:F("menu_debug_overlay"),icon:xm,isHiddenFor:["desktop"]})},$1=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(n=>F3[n](e)),...i.map(n=>Dt(q({},n),{isAdditional:!0}))].filter(n=>{var a,s,d;return!((a=n==null?void 0:n.isHiddenFor)!=null&&a.length)||!((s=n==null?void 0:n.isHiddenFor)!=null&&s.includes("desktop"))&&!o||!((d=n==null?void 0:n.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(ia)};var q3=(t,e)=>{Rc(t,e)},W3=L('<div><div> </div> <div class="close svelte-17or3al"></div></div>'),K3=L('<div data-testid="settings-menu"><!> <ul role="menu"></ul></div>'),Q3=L("<div><!> <!></div>"),G3={hash:"svelte-17or3al",code:`.settings-menu-container.mobile.svelte-17or3al {width:100%;}.settings-menu-container.svelte-17or3al ul {margin:0;padding:0;list-style-type:none;}.settings-menu-container.svelte-17or3al .menu {background-color:var(--settings-bg);border-radius:var(--settings-radius);transition:opacity 0.2s, visibility 0.2s;overflow:hidden;}.settings-menu-container.svelte-17or3al .menu .item:first-child:not(.mobile) {border-top-right-radius:var(--settings-radius);border-top-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .menu .item:last-child {border-bottom-right-radius:var(--settings-radius);border-bottom-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .settings-menu .item:first-child:not(.mobile) {padding-top:6px;}.settings-menu-container.svelte-17or3al .settings-menu .item:last-child:not(.mobile) {padding-bottom:6px;}.settings-menu-container.svelte-17or3al .menu.desktop {position:absolute;right:0;bottom:0;max-width:100%;}.settings-menu.svelte-17or3al {line-height:40px;}.settings-menu.desktop.svelte-17or3al {
305
+ .item.svelte-7dfsuh:not(.mobile) p:where(.svelte-7dfsuh) {line-height:var(--item-label-line-height);font-size:13px;}`};function am(t,e){U(e,!0),W(t,t3);let[i,o]=Be(),n=()=>S($,"$isFullscreen",i),a=()=>S(p,"$playerSize",i),s=f(e,"isMobile",3,!1),d=f(e,"playerControlsHeight",3,0),l=f(e,"ariaLabelReturnFromSubMenu",19,()=>F("aria_label_submenu_back")),u=f(e,"listRef",15);Ut(()=>{let Z=e.items.findIndex(me=>me.selected);u().children[Z+1].focus()});let v=Ie(),$=v.ui.isFullscreen,p=v.ui.playerSize,_=ee(void 0),w=ee(0),y=ee(0),C=m(()=>s()&&n()?`max-height: ${Math.round(a().height*.6)}px`:s()?"":`max-height: ${a().height-32-r(y)-d()}px; overflow: auto;`),T=m(()=>Math.max(e.minWidth,r(w)));var E=e3();let P;var A=h(E);let I;A.__keydown=[Z4,e];var V=h(A);let H;V.__click=[X4,e],V.__keydown=[J4,e];var Y=h(V);Is(Y,{direction:"left"});var O=M(Y,2),J=h(O,!0);g(O),g(V),pt(V,Z=>B(_,Z),()=>r(_));var ne=M(V,2);Ii(ne,17,()=>e.items,Al,(Z,me)=>{var le=ze(),Ve=ue(le);{var Me=ae=>{nm(ae,{get item(){return r(me)},get isMobile(){return s()}})},be=(ae,Le)=>{{var re=N=>{rm(N,{get isMobile(){return s()},get item(){return r(me)},get openSubMenuList(){return e.openSubMenuList},get refMenuItems(){return e.refMenuItems}})};R(ae,N=>{r(me).type==="OPEN_SUB_MENU"&&N(re)},Le)}};R(Ve,ae=>{r(me).type==="SELECT_VALUE"?ae(Me):ae(be,!1)})}b(Z,le)}),g(A),pt(A,Z=>u(Z),()=>u()),g(E),k((Z,me,le)=>{P=te(E,1,"sub-menu menu svelte-7dfsuh",null,P,Z),Oe(E,"data-testid",`sub-menu-${e.id}`),it(E,`min-width: ${r(T)}px`),I=te(A,1,"items svelte-7dfsuh",null,I,me),it(A,r(C)),H=te(V,1,"item header back svelte-7dfsuh",null,H,le),Oe(V,"aria-label",l()),ge(J,e.title)},[()=>({desktop:!s(),mobile:s()}),()=>({mobile:s()}),()=>({mobile:s()})]),Or(V,"clientWidth",Z=>B(w,Z)),Or(V,"clientHeight",Z=>B(y,Z)),b(t,E),z(),o()}lt(["keydown","click"]);import{noop as i3}from"@vkontakte/videoplayer-shared/es2015";var o3=(t,e)=>Dc(t,e()),n3=(t,e)=>{t.stopPropagation(),e()()},r3=L('<div class="value svelte-1ikfjte"> </div>'),s3=L('<li role="menuitem" tabindex="0" aria-haspopup="true"><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></li>'),a3={hash:"svelte-1ikfjte",code:".value.svelte-1ikfjte {position:relative;opacity:0.7;overflow:hidden;text-overflow:ellipsis;}"};function lm(t,e){U(e,!0),W(t,a3);let i=f(e,"isMobile",3,!1),o=f(e,"onClick",3,i3),n=f(e,"valueComponent",3,void 0),a=f(e,"ref",15);var s=s3();let d;s.__click=[n3,o],s.__keydown=[o3,o];var l=h(s),u=h(l);{var v=T=>{pa(T,{get icon(){return e.icon}})},$=T=>{var E=ze();let P=m(()=>e.icon);var A=ue(E);ki(A,()=>r(P),(I,V)=>{V(I,{})}),b(T,E)};R(u,T=>{typeof e.icon=="string"?T(v):T($,!1)})}g(l);var p=M(l,2),_=h(p,!0);g(p);var w=M(p,2);{var y=T=>{var E=ze();let P=m(n);var A=ue(E);ki(A,()=>r(P),(I,V)=>{V(I,{})}),b(T,E)},C=T=>{var E=r3(),P=h(E,!0);g(E),k(()=>ge(P,e.value)),b(T,E)};R(w,T=>{n()?T(y):T(C,!1)})}g(s),pt(s,T=>a(T),()=>a()),k(T=>{d=te(s,1,"item",null,d,T),Oe(s,"aria-label",e.ariaLabel),Oe(s,"data-testid",e.id),ge(_,e.label)},[()=>({mobile:i()})]),b(t,s),z()}lt(["click","keydown"]);import{noop as c1}from"@vkontakte/videoplayer-shared/es2015";var l3=(t,e)=>{Ya(t,()=>e())},d3=L('<div class="icon icon-error-stub"><div class="inner"></div></div>'),c3=L('<img class="icon" aria-hidden="true">'),u3=L('<li role="menuitem" tabindex="0"><div class="icon-wrapper"><!></div> <div class="label svelte-15ifkac"> </div></li>'),p3={hash:"svelte-15ifkac",code:".label.svelte-15ifkac {overflow:hidden;text-overflow:ellipsis;}"};function dm(t,e){U(e,!0),W(t,p3);let i=f(e,"isMobile",3,!1),o=f(e,"onClick",3,c1),n=f(e,"closeSettings",3,c1),a=ee(!1),s=()=>{B(a,!0)},d=C=>{C==null||C.stopPropagation(),o()(),n()()};var l=u3();let u;l.__click=d,l.__keydown=[l3,d];var v=h(l),$=h(v);{var p=C=>{var T=ze(),E=ue(T);{var P=I=>{var V=d3();b(I,V)},A=I=>{var V=c3();k(()=>Oe(V,"src",e.icon)),St("error",V,s),Ws(V),b(I,V)};R(E,I=>{r(a)?I(P):I(A,!1)})}b(C,T)},_=C=>{var T=ze();let E=m(()=>e.icon);var P=ue(T);ki(P,()=>r(E),(A,I)=>{I(A,{})}),b(C,T)};R($,C=>{typeof e.icon=="string"?C(p):C(_,!1)})}g(v);var w=M(v,2),y=h(w,!0);g(w),g(l),k(C=>{var T;u=te(l,1,"item",null,u,C),Oe(l,"aria-label",(T=e.ariaLabel)!=null?T:e.label),Oe(l,"data-testid",e.id),ge(y,e.label)},[()=>({mobile:i()})]),b(t,l),z()}lt(["click","keydown"]);import{noop as v3}from"@vkontakte/videoplayer-shared/es2015";var f3=L('<div class="toggle_wrap svelte-17wbjko"><div></div> <div class="toggle-label svelte-17wbjko"></div></div>'),m3={hash:"svelte-17wbjko",code:'.toggle_wrap.svelte-17wbjko {min-height:15px;padding:0;font-size:12px;line-height:15px;cursor:pointer;user-select:none;}.toggle.svelte-17wbjko {float:right;margin-top:3px;width:28px;height:9px;border-radius:45px;background-color:var(--toggle-color-separator);cursor:pointer;}.toggle.svelte-17wbjko::after {content:"";float:left;position:relative;width:15px;height:15px;border-radius:50%;background-color:var(--toggle-color-off);top:-3px;left:0;transition:left .1s ease;}.toggle.on.svelte-17wbjko::after {background-color:var(--toggle-color-on);left:13px;}.toggle-label.svelte-17wbjko {overflow:hidden;}'};function cm(t,e){W(t,m3);let i=f(e,"enabled",3,!1);var o=f3(),n=h(o);let a;$e(2),g(o),k(s=>a=te(n,1,"toggle svelte-17wbjko",null,a,s),[()=>({on:i()})]),b(t,o)}var g3=(t,e,i)=>{Mh(t,e(),o=>i()(o))},h3=(t,e,i)=>{t.stopPropagation(),e()(!i())},_3=L('<div><div class="icon-wrapper"><!></div> <div class="label"> </div> <!></div>'),b3=L('<li role="menuitem" tabindex="0"><!></li>');function um(t,e){U(e,!0);let i=f(e,"isMobile",3,!1),o=f(e,"onClick",3,v3),n=f(e,"enabled",3,!1),a=f(e,"tooltipText",3,void 0),s=f(e,"maxTooltipWidth",3,void 0);var d=b3();let l;d.__click=[h3,o,n],d.__keydown=[g3,n,o];var u=h(d);sa(u,{get content(){return a()},get isMobile(){return i()},placement:"left",translateX:10,isFullWidthWrapper:!0,get maxTooltipWidth(){return s()},children:(v,$)=>{var p=_3();let _;var w=h(p),y=h(w);{var C=I=>{pa(I,{get icon(){return e.icon}})},T=I=>{var V=ze();let H=m(()=>e.icon);var Y=ue(V);ki(Y,()=>r(H),(O,J)=>{J(O,{})}),b(I,V)};R(y,I=>{typeof e.icon=="string"?I(C):I(T,!1)})}g(w);var E=M(w,2),P=h(E,!0);g(E);var A=M(E,2);cm(A,{get enabled(){return n()}}),g(p),k(I=>{_=te(p,1,"switch-wrapper",null,_,I),ge(P,e.label)},[()=>({mobile:i()})]),b(v,p)},$$slots:{default:!0}}),g(d),k(v=>{var $;l=te(d,1,"item switch-item",null,l,v),Oe(d,"aria-label",($=e.ariaLabel)!=null?$:e.label),Oe(d,"data-testid",e.id)},[()=>({mobile:i()})]),b(t,d),z()}lt(["click","keydown"]);import{isValidURL as z3,VideoQuality as y1}from"@vkontakte/videoplayer-shared/es2015";var u1=()=>{let t=ee(fe([])),e=m(()=>(r(t).length?r(t).at(-1):null)||null);return{get current(){return r(e)},pushSubMenu:i=>{r(t).push(i)},popSubMenu:()=>{B(t,fe(r(t).slice(0,-1)))},popAllSubMenus:()=>{B(t,fe([]))}}};var $3=L('<div class="quality-icon svelte-t2qk8t"><!></div>'),y3=L('<div class="quality-label svelte-t2qk8t"><span> </span> <!></div>'),x3={hash:"svelte-t2qk8t",code:".quality-label.svelte-t2qk8t {position:relative;}.quality.svelte-t2qk8t {font-size:13px;line-height:18px;}.quality.sub.svelte-t2qk8t {opacity:0.7;}.quality-icon.svelte-t2qk8t {position:absolute;padding-left:2px;transform:translateX(100%);display:flex;top:0;right:0;}.quality-icon.svelte-t2qk8t svg {color:var(--blue-light);}"};function ga(t,e){U(e,!0),W(t,x3);let i=f(e,"isSubCase",3,!1),o=m(()=>Fc(e.quality));var n=y3(),a=h(n);let s;var d=h(a,!0);g(a);var l=M(a,2);{var u=v=>{var $=$3();let p=m(()=>r(o));var _=h($);ki(_,()=>r(p),(w,y)=>{y(w,{})}),g($),b(v,$)};R(l,v=>{r(o)&&!e.isMobile&&v(u)})}g(n),k(v=>{s=te(a,1,"svelte-t2qk8t",null,s,v),ge(d,e.label)},[()=>({sub:!i(),quality:!e.isMobile})]),b(t,n),z()}import{VideoQuality as w3}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as p1}from"@vkontakte/videoplayer-core/es2015";var f1=({quality:t,availableQualities:e})=>{let i=e.find(o=>o.value===t);return i?i.displayValue:t},m1=({quality:t,availableQualities:e,isAutoQualityEnabled:i})=>{if(!t)return"...";let o=f1({quality:t,availableQualities:e});return i?t===p1.INVARIANT?F("auto_quality_invariant"):F("auto_quality",{actual:o}):o},v1=({quality:t,availableQualities:e,prefix:i,onlyPrefix:o})=>t?o||t===p1.INVARIANT?i:`${i}${f1({quality:t,availableQualities:e})}`:"...";var S3=L('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),C3={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function rl(t,e){U(e,!0),W(t,C3);let[i,o]=Be(),n=()=>S(l,"$currentQuality$",i),a=()=>S(u,"$availableQualities$",i),s=()=>S(v,"$isMobile$",i),d=Ie(),l=d.state.currentQuality$,u=d.state.availableQualities$,v=d.ui.isMobile,$=" \xB7 ",p=m(()=>e.prefix+(e.selected&&n()!==w3.INVARIANT?$:"")),_=m(()=>v1({prefix:r(p),quality:n(),availableQualities:a(),onlyPrefix:!e.selected}));var w=S3(),y=h(w);let C=m(()=>e.selected?n():void 0);ga(y,{get quality(){return r(C)},get label(){return r(_)},get isMobile(){return s()},isSubCase:!0}),g(w),b(t,w),z(),o()}var T3=t=>{let e=t.join("|"),i="<(?<keyhtml>.*?)(?<propshtml> .*?)?>(?<childrenhtml>.*?)</\\k<keyhtml>>",o=`{(?<keyi18n>${e})}(?<childreni18n>.*?){/\\k<keyi18n>}`,n="<(?<keyhtmlself>.*?)(?<propshtmlself> .*?)?/?>",a=`{(?<keyi18nself>${e})}`;return new RegExp(`${i}|${o}|${n}|${a}`,"g")},I3={br:!0,span:!0},pm=(t,e={})=>{var d,l,u,v,$,p,_;if(!t)return t;let i=q(q({},I3),e),o=Object.keys(i);if(!o.length)return t;let n=T3(o),a=[],s=0;for(let w of t.matchAll(n)){let y=w[0],C=((d=w.groups)==null?void 0:d.keyhtml)||((l=w.groups)==null?void 0:l.keyi18n)||((u=w.groups)==null?void 0:u.keyhtmlself)||((v=w.groups)==null?void 0:v.keyi18nself)||"",{index:T}=w;if(!i[C]){a.push(t.slice(s,T)),s=T+y.length;continue}let E=($=w.groups)!=null&&$.childrenhtml?pm(w.groups.childrenhtml,i):"",P=(p=w.groups)!=null&&p.childrenhtml?y.replace(new RegExp((_=w.groups)==null?void 0:_.childrenhtml),()=>E||""):y;a.push(t.slice(s,T),P),s=T+y.length}return s===0?t:(a.push(t.slice(s)),a.join(""))};function Id(t,e){U(e,!1);let i=f(e,"message",8),o=pm(i());xr();var n=ze(),a=ue(n);{var s=d=>{var l=ze(),u=ue(l);Ml(u,()=>o,!1,!1),b(d,l)};R(a,d=>{o&&d(s)})}b(t,n),z()}var k3=L('<p class="quality-applies sublabel svelte-1qk3zto"><!></p>'),E3={hash:"svelte-1qk3zto",code:".quality-applies.svelte-1qk3zto {display:flex;justify-content:end;padding:3px 0;color:rgba(255, 255, 255, 0.5);}.quality-applies span {color:#70c1ff;}"};function fm(t,e){U(e,!1),W(t,E3),xr();var i=k3(),o=h(i);let n=br(()=>F("quality_applience",{action:`<span>${F("quality_applience_action")}</span>`}));Id(o,{get message(){return r(n)}}),g(i),b(t,i),z()}var h1=({isAutoQualityEnabled:t,trafficSavingEnabled:e,highQualityEnabled:i})=>{let o=!t&&!e&&!i;return{id:"QUALITY_OTHER",type:"OPEN_SUB_MENU",selected:o,valueComponent:rl,valueComponentParams:{prefix:F("other_quality"),selected:o},children:"QUALITY"}},mm=({appliesTo:t,labelWithQuality:e,selected:i},{selectQuality:o})=>({id:"QUALITY_AUTO",type:"SELECT_VALUE",value:"auto",label:F("auto_quality_limit"),valueComponent:e?rl:void 0,valueComponentParams:{prefix:F("auto_quality_limit"),selected:i},selectItem:()=>o("auto",t),selected:i}),_1=()=>({id:"QUALITY_APPLIENCE",type:"OPEN_SUB_MENU",valueComponent:fm,bottomBordered:!0,children:"QUALITY_APPLIENCE"}),vm=({labelWithQuality:t,appliesTo:e,selected:i},{toggleHighQuality:o})=>({id:"QUALITY_HIGH",type:"SELECT_VALUE",value:"high_quality",selectItem:()=>o(!0,e),selected:i,label:F("high_quality"),valueComponent:t?rl:void 0,valueComponentParams:{prefix:F("high_quality"),selected:i},sublabel:F("high_quality_description")}),gm=({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:F("traffic_saving_quality"),valueComponent:t?rl:void 0,valueComponentParams:{prefix:F("traffic_saving_quality"),selected:i},sublabel:F("traffic_saving_quality_description")});var ou=(t,e)=>String(e.findIndex(i=>i.id===t.id)+1),nu=(t,e)=>{var s;if(!t)return"";let{language:i,label:o}=t,n;if(i==="und"?n=void 0:i&&(n=(s=Gc(i))!=null?s:i),o&&i&&n){let d=e.filter(l=>l.label===o&&l.language===i);if(d.length===1)return F("audio_stream_display_language_label",{language:n,label:o});{let l=ou(t,d);return F("audio_stream_display_language_label_index",{language:n,label:o,index:l})}}if(o){let d=e.filter(l=>l.label===o);if(d.length===1)return o;{let l=ou(t,d);return F("audio_stream_display_label_index",{label:o,index:l})}}if(i&&n){let d=e.filter(l=>l.language===i);if(d.length===1)return n;{let l=ou(t,d);return F("audio_stream_display_language_index",{language:n,index:l})}}let a=ou(t,e);return F("audio_stream_display_unknown",{index:a})};var P3={QUALITY_DETAILS:t=>{let{isAutoQualityEnabled:e,isAutoQualityAvailable:i,trafficSavingEnabled:o,highQualityEnabled:n}=t,a=[];return i&&a.push({handler:mm,selected:e&&!o&&!n||!1}),a.push({handler:gm,selected:o},{handler:vm,selected:n}),{title:F("submenu_quality"),id:"QUALITY_DETAILS",items:[_1(t),...a.map(({handler:s,selected:d})=>s({labelWithQuality:!0,appliesTo:"to-video",selected:d},t)),h1(t)]}},QUALITY:({closeSettingsMenu:t,selectQuality:e,availableQualities:i,isMobile:o})=>({id:"QUALITY",title:F("submenu_quality"),closeSettingsMenu:t,items:i.map(n=>({type:"SELECT_VALUE",value:n.value,valueComponent:ga,valueComponentParams:{quality:n.value,label:n.displayValue,isMobile:o,isSubCase:!0},selectItem:a=>e(a,"to-video"),selected:n.selected,label:n.displayValue}))}),QUALITY_APPLIENCE:t=>{var i,o,n;let{closeSettingsMenu:e}=t;return{id:"QUALITY_APPLIENCE",title:F("default_quality_for_any_video"),closeSettingsMenu:e,items:[{handler:mm,selected:((i=Cc())==null?void 0:i.type)==="auto_quality"},{handler:gm,selected:((o=Cc())==null?void 0:o.type)==="traffic_saving"},{handler:vm,selected:((n=Cc())==null?void 0:n.type)==="high_quality"}].map(({handler:a,selected:s})=>a({labelWithQuality:!1,appliesTo:"as-default",selected:s},t))}},AUDIO_LANGUAGES:({closeSettingsMenu:t,availableAudioStreams:e,currentAudioStream:i,selectAudioLanguage:o})=>({id:"AUDIO_LANGUAGES",title:F("submenu_audio_languages"),closeSettingsMenu:t,items:e.map(n=>({type:"SELECT_VALUE",value:n,dataValue:n.id,selectItem:o,selected:n.id===(i==null?void 0:i.id),label:nu(n,e)}))}),PLAYBACK_RATE_SUB_MENU:({closeSettingsMenu:t,availablePlaybackRates:e,selectPlaybackRate:i})=>({id:"PLAYBACK_RATE_SUB_MENU",title:F("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:F("subtitles_caption"),items:t.map(i=>({type:"SELECT_VALUE",value:i,selectItem:e,selected:i.selected,label:i.displayValue,dataTestid:i.value}))})},b1=({subMenuId:t,context:e})=>t?[P3[t](e)]:[];var A3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M.1 6.5c0-2.24 0-3.36.436-4.216A4 4 0 0 1 2.284.536C3.139.1 4.259.1 6.5.1h5c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748c.436.856.436 1.976.436 4.216s0 3.36-.436 4.216a4 4 0 0 1-1.748 1.748c-.836.426-1.925.436-4.064.436l.55 2.2H14.1a.9.9 0 0 1 0 1.8H3.9a.9.9 0 1 1 0-1.8h1.897l.55-2.2c-2.139 0-3.227-.01-4.063-.436a4 4 0 0 1-1.748-1.748C.1 9.86.1 8.74.1 6.5m11.4-4.6h-5c-1.15 0-1.904.002-2.481.049-.556.045-.786.124-.918.19a2.2 2.2 0 0 0-.962.962c-.067.132-.145.363-.19.918-.048.577-.05 1.331-.05 2.481s.002 1.904.05 2.48c.045.556.123.787.19.919a2.2 2.2 0 0 0 .962.961c.132.068.362.146.918.192.577.047 1.33.048 2.48.048h5c1.15 0 1.904-.001 2.481-.048.556-.046.787-.124.918-.192a2.2 2.2 0 0 0 .962-.961c.067-.132.146-.363.191-.918.047-.577.049-1.331.049-2.48s-.002-1.905-.049-2.482c-.045-.555-.124-.786-.191-.918a2.2 2.2 0 0 0-.962-.961c-.131-.067-.362-.146-.918-.191-.577-.048-1.33-.049-2.48-.049m-3.298 11-.55 2.2h2.695l-.55-2.2z" clip-rule="evenodd"></path></svg>');function hm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=A3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"17",fill:"none","aria-hidden":"true","data-testid":"traffic-saving-icon",role:"img"},i))),b(t,o)}var M3=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M8.295 14.247c1.87 1.896 5.505.02 5.505-3.548V5.645l2.399-.697A2.74 2.74 0 0 0 18 2.364l-.01-1.72a.75.75 0 0 0-.906-.623l-.267.061c-.941.215-1.886.431-2.807.721-1.332.45-2.03 1.614-2.01 3.077V9c-3.887.196-5.639 3.286-3.705 5.247M.9.1a.9.9 0 0 0 0 1.8h8.197a.9.9 0 0 0 0-1.8zM.9 5.1a.9.9 0 1 0 0 1.8h7.196a.9.9 0 0 0 0-1.8zM0 11a.9.9 0 0 1 .9-.9h4.183a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 11"></path></svg>');function _m(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=M3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"15",fill:"none","aria-hidden":"true","data-testid":"audio-languages-icon",role:"img"},i))),b(t,o)}var L3=ye('<svg><!><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"></path><path fill="var(--btn-color, #fff)" fill-rule="nonzero" d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A7.94 7.94 0 0 1 11 4.07M5.69 7.1 4.26 5.68A9.95 9.95 0 0 0 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9M2.05 13c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A7.87 7.87 0 0 1 4.07 13zM11 21.95v-2.02a7.94 7.94 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.688 8.576l4.746 2.736a.792.792 0 0 1 0 1.372l-4.746 2.737a.792.792 0 0 1-1.188-.686V9.262a.792.792 0 0 1 1.188-.686"></path></g></svg>');function bm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=L3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true","data-testid":"play-speed-icon",role:"img"},i))),b(t,o)}var V3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8 0a.9.9 0 0 1 .9.9v10.927l4.564-4.563a.9.9 0 0 1 1.272 1.272l-6.1 6.1a.9.9 0 0 1-1.272 0l-6.1-6.1a.9.9 0 1 1 1.272-1.272L7.1 11.827V.9A.9.9 0 0 1 8 0M0 18a.9.9 0 0 1 .9-.9h14.2a.9.9 0 1 1 0 1.8H.9A.9.9 0 0 1 0 18" clip-rule="evenodd"></path></svg>');function $m(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=V3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"19",fill:"none","aria-hidden":"true","data-testid":"download-icon",role:"img"},i))),b(t,o)}var R3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M8.863 2.1h6.274c.674-.002 1.2.211 1.683.697l4.383 4.383c.478.476.699.998.697 1.683v6.274c.002.685-.22 1.207-.697 1.683l-4.383 4.383c-.476.478-.998.699-1.683.697H8.863c-.685.002-1.207-.22-1.683-.697L2.797 16.82c-.478-.476-.699-.998-.697-1.683V8.863c-.002-.685.22-1.207.697-1.683L7.18 2.797c.484-.486 1.009-.699 1.683-.697m-.445 2.005L4.105 8.418c-.18.18-.205.242-.205.495v6.174c0 .25.025.316.205.495l4.313 4.313c.179.179.24.205.495.205h6.174c.253 0 .316-.026.495-.205l4.313-4.313c.18-.18.205-.245.205-.495V8.913c0-.254-.026-.316-.205-.495l-4.313-4.313c-.18-.18-.242-.205-.495-.205H8.913c-.254 0-.319.029-.495.205M13 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" clip-rule="evenodd"></path></svg>');function ym(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=R3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"report-icon",role:"img"},i))),b(t,o)}var D3=ye('<svg><!><path fill="var(--btn-color, #fff)" fill-rule="evenodd" d="M4 12.3V12c0-1.47.005-2.547.075-3.403.074-.904.216-1.482.454-1.949a4.85 4.85 0 0 1 2.12-2.12c.466-.237 1.044-.379 1.948-.453C9.51 4.001 10.675 4 12.3 4h4.512a2 2 0 0 0-.174-.49 2.4 2.4 0 0 0-1.048-1.048 2.4 2.4 0 0 0-.931-.239 14 14 0 0 0-1.026-.023H12.26c-1.576 0-2.814 0-3.81.081-1.014.083-1.856.255-2.62.644A6.65 6.65 0 0 0 2.926 5.83c-.389.763-.56 1.605-.644 2.62-.081.995-.081 2.233-.081 3.809v1.373c0 .392 0 .738.023 1.025.025.306.081.623.239.931a2.4 2.4 0 0 0 1.048 1.05c.162.082.326.136.49.173V12.3zM10.08 6h-.035c-.52 0-.964 0-1.329.03-.383.03-.755.097-1.112.276a2.9 2.9 0 0 0-1.298 1.298c-.179.357-.246.73-.277 1.112C6 9.081 6 9.524 6 10.046v7.909c0 .52 0 .964.03 1.329.03.382.097.755.276 1.112a2.9 2.9 0 0 0 1.298 1.298c.357.179.73.246 1.112.277.365.029.808.029 1.329.029h6.91c.52 0 .964 0 1.329-.03.382-.03.755-.097 1.112-.276a2.9 2.9 0 0 0 1.298-1.298c.179-.357.246-.73.277-1.112.029-.365.029-.808.029-1.33v-7.909c0-.52 0-.964-.03-1.329-.03-.382-.097-.755-.276-1.112a2.9 2.9 0 0 0-1.298-1.298c-.357-.179-.73-.246-1.112-.277C17.919 6 17.476 6 16.954 6zM8.408 7.916c.065-.032.179-.07.452-.093a18 18 0 0 1 1.22-.023h6.84c.565 0 .936 0 1.22.023.273.022.387.06.452.093a1.1 1.1 0 0 1 .492.492c.032.065.07.179.093.452.022.284.023.655.023 1.22v7.84c0 .565 0 .936-.023 1.22-.023.273-.06.387-.093.452a1.1 1.1 0 0 1-.492.492c-.065.032-.18.07-.452.093a18 18 0 0 1-1.22.023h-6.84c-.565 0-.936 0-1.22-.023-.273-.023-.387-.06-.452-.093a1.1 1.1 0 0 1-.492-.492c-.032-.065-.07-.18-.093-.452a17 17 0 0 1-.023-1.22v-7.84c0-.565 0-.936.023-1.22.022-.273.06-.387.093-.452a1.1 1.1 0 0 1 .492-.492" clip-rule="evenodd"></path></svg>');function ru(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=D3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"copy-icon",role:"img"},i))),b(t,o)}var N3=ye('<svg><!><path fill="var(--btn-color, #fff)" d="M12 20.105a8.105 8.105 0 1 0 0-16.21 8.105 8.105 0 0 0 0 16.21M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10m0-12.372a1.316 1.316 0 1 1 0-2.632 1.316 1.316 0 0 1 0 2.632m-.947 2.822c0-.541.424-.98.947-.98s.947.439.947.98v3.83c0 .54-.424.98-.947.98s-.947-.44-.947-.98z"></path></svg>');function xm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=N3();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none","aria-hidden":"true","data-testid":"info-icon",role:"img"},i))),b(t,o)}var B3=L('<div class="menu-item-value-wrapper svelte-1j7b2kc"><!></div>'),O3={hash:"svelte-1j7b2kc",code:".menu-item-value-wrapper.svelte-1j7b2kc {line-height:normal;}"};function wm(t,e){U(e,!0),W(t,O3);let[i,o]=Be(),n=()=>S(u,"$currentQuality$",i),a=()=>S(v,"$availableQualities$",i),s=()=>S($,"$isAutoQualityEnabled$",i),d=()=>S(p,"$isMobile$",i),l=Ie(),u=l.state.currentQuality$,v=l.state.availableQualities$,$=l.state.isAutoQualityEnabled$,p=l.ui.isMobile,_=m(()=>m1({quality:n(),availableQualities:a(),isAutoQualityEnabled:s()}));var w=B3(),y=h(w);ga(y,{get quality(){return n()},get label(){return r(_)},get isMobile(){return d()}}),g(w),b(t,w),z(),o()}var F3={QUALITY_SETTINGS:({isAutoQualityEnabled:t,currentQuality:e,qualityDetailsSubMenuEnabled:i})=>{let o=(t?F("auto_quality_option"):e)||"";return{id:"QUALITY_SETTINGS",type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_quality",{actual:o}),icon:td,label:F("menu_quality"),value:e,valueComponent:wm,weight:Cr["quality-settings"],children:i?"QUALITY_DETAILS":"QUALITY"}},TRAFFIC_SAVING_SWITCH:({trafficSavingEnabled:t,toggleTrafficSaving:e})=>({id:"TRAFFIC_SAVING_SWITCH",weight:Cr["traffic-saving-settings"],type:"SWITCH",onClick:i=>e(i,"to-video"),ariaLabel:t?F("aria_label_submenu_traffic_saving_off"):`${F("aria_label_submenu_traffic_saving_on")}. ${F("traffic_saving_helper_text")}`,icon:hm,label:F("menu_traffic_saving"),enabled:t,tooltipText:F("traffic_saving_helper_text"),maxTooltipWidth:175}),AUDIO_LANGUAGES:({currentAudioStream:t,availableAudioStreams:e})=>{let i=nu(t,e);return{id:"AUDIO_LANGUAGES",weight:Cr["audio-language-settings"],type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_audio_languages",{actual:i}),icon:_m,label:F("menu_audio_languages"),value:i,children:"AUDIO_LANGUAGES"}},PLAYBACK_RATE:({availablePlaybackRates:t,currentPlaybackRate:e})=>{var o;let i=((o=t.find(n=>n.value===e))==null?void 0:o.displayValue)||"";return{id:"PLAYBACK_RATE",weight:Cr["playback-rate-settings"],type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_rate",{actual:i}),icon:bm,label:F("menu_playback_rate"),value:`${e}x`,children:"PLAYBACK_RATE_SUB_MENU"}},SUBTITLES:({currentSubtitle:t})=>({id:"SUBTITLES",weight:Cr["subtitles-settings"],type:"OPEN_SUB_MENU",ariaLabel:F("aria_label_menu_subtitle",{actual:t.displayValue}),icon:id,label:F("subtitles_caption"),value:t.displayValue,children:"SUBTITLES"}),DOWNLOAD:({onDownloadClick:t})=>({id:"DOWNLOAD",weight:Cr.download,type:"CLICK",onClick:t,label:F("download_video_caption"),ariaLabel:F("aria_label_menu_download"),icon:$m}),SHOW_SUPPORT:({onReportProblemClick:t})=>({id:"SHOW_SUPPORT",weight:Cr.report,type:"CLICK",onClick:t,label:F("menu_report"),ariaLabel:`${F("menu_report")}. ${F("aria_label_new_tab_alert")}`,icon:ym,isHiddenFor:["desktop"]}),COPY_DATA:({onCopyDataClick:t})=>({id:"COPY_DATA",weight:Cr["copy-data"],type:"CLICK",onClick:t,label:F("menu_copy_debug"),ariaLabel:F("menu_copy_debug"),icon:ru,isHiddenFor:["desktop"]}),SAVE_TRACE_INFO:({onSaveTraceDataClick:t})=>({id:"SAVE_TRACE_INFO",weight:Cr["save-trace-info"],type:"CLICK",onClick:t,label:F("menu_save_debug"),ariaLabel:F("menu_save_debug"),icon:ru,isHiddenFor:["desktop"]}),DEBUG_INFO:({toggleShowDebugInfo:t,debugPanelVisible:e})=>({id:"DEBUG_INFO",weight:Cr["debug-info"],type:"CLICK",onClick:t,label:e?F("aria_label_menu_debug_overlay_disable"):F("aria_label_menu_debug_overlay_enable"),ariaLabel:F("menu_debug_overlay"),icon:xm,isHiddenFor:["desktop"]})},$1=({items:t,context:e,additionalSettingsMenuItems:i})=>{let{isMobile:o}=e;return[...t.map(n=>F3[n](e)),...i.map(n=>Dt(q({},n),{isAdditional:!0}))].filter(n=>{var a,s,d;return!((a=n==null?void 0:n.isHiddenFor)!=null&&a.length)||!((s=n==null?void 0:n.isHiddenFor)!=null&&s.includes("desktop"))&&!o||!((d=n==null?void 0:n.isHiddenFor)!=null&&d.includes("mobile"))&&o}).sort(ia)};var q3=(t,e)=>{Rc(t,e)},W3=L('<div><div> </div> <div class="close svelte-17or3al"></div></div>'),K3=L('<div data-testid="settings-menu"><!> <ul role="menu"></ul></div>'),Q3=L("<div><!> <!></div>"),G3={hash:"svelte-17or3al",code:`.settings-menu-container.mobile.svelte-17or3al {width:100%;}.settings-menu-container.svelte-17or3al ul {margin:0;padding:0;list-style-type:none;}.settings-menu-container.svelte-17or3al .menu {background-color:var(--settings-bg);border-radius:var(--settings-radius);transition:opacity 0.2s, visibility 0.2s;overflow:hidden;}.settings-menu-container.svelte-17or3al .menu .item:first-child:not(.mobile) {border-top-right-radius:var(--settings-radius);border-top-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .menu .item:last-child {border-bottom-right-radius:var(--settings-radius);border-bottom-left-radius:var(--settings-radius);}.settings-menu-container.svelte-17or3al .settings-menu .item:first-child:not(.mobile) {padding-top:6px;}.settings-menu-container.svelte-17or3al .settings-menu .item:last-child:not(.mobile) {padding-bottom:6px;}.settings-menu-container.svelte-17or3al .menu.desktop {position:absolute;right:0;bottom:0;max-width:100%;}.settings-menu.svelte-17or3al {line-height:40px;}.settings-menu.desktop.svelte-17or3al {
306
306
  /* \u043D\u0443\u0436\u043D\u043E \u0447\u0442\u043E\u0431 \u043C\u0435\u043D\u044E \u043D\u0435 \u0441\u043A\u0430\u043A\u0430\u043B\u043E \u0432 \u0448\u0438\u0440\u0438\u043D\u0435 \u043F\u0440\u0438 \u0441\u043C\u0435\u043D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u044F, \u043E\u0441\u043E\u0431\u043E \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E \u043F\u0440\u0438 \u0430\u0432\u0442\u043E \u0440\u0435\u0436\u0438\u043C\u0435 */min-width:300px;}.settings-menu-container.svelte-17or3al .menu.mobile {width:100%;background:var(--mobile-settings-bg);font-size:15px;line-height:50px;}.settings-menu-container.svelte-17or3al .menu.mobile.hidden {display:none;}.settings-menu-container.svelte-17or3al .menu .item:not(.switch-item),
307
307
  .settings-menu-container.svelte-17or3al .menu .switch-wrapper {align-items:center;color:var(--white);cursor:pointer;display:flex;justify-content:flex-end;white-space:nowrap;position:relative;}.settings-menu-container.svelte-17or3al .menu .item:hover {background-color:var(--settings-item-bg-hover);}.settings-menu-container.svelte-17or3al .menu .item.mobile:hover {background:var(--mobile-settings-bg);}.settings-menu.svelte-17or3al .item:not(.switch-item),
308
308
  .settings-menu.svelte-17or3al .switch-wrapper {padding:0 32px 0 18px;}.settings-menu.svelte-17or3al .item.mobile:not(.switch-item),
309
- .settings-menu.svelte-17or3al .switch-wrapper.mobile {padding:0 14px;}.settings-menu.svelte-17or3al .icon-wrapper {width:24px;min-width:24px;height:24px;display:flex;align-items:center;justify-content:center;margin-right:16px;}.settings-menu.svelte-17or3al .label {flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis;}.settings-menu.svelte-17or3al .item.header.mobile:where(.svelte-17or3al) {color:var(--white);cursor:pointer;justify-content:space-between;column-gap:12px;display:flex;border-bottom:var(--divider-border);margin-bottom:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar {width:8px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-track {box-shadow:none;background-color:#3a3a3a;border-radius:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb:hover {background-color:#777;}.settings-menu-container.svelte-17or3al .items.mobile {overflow-y:auto;overflow-x:hidden;max-height:160px;text-align:left;}.close.svelte-17or3al {position:relative;width:12px;height:12px;padding:12px;margin-right:-12px;}.close.svelte-17or3al:before, .close.svelte-17or3al:after {position:absolute;left:18px;content:' ';height:12px;width:2px;background-color:var(--white);}.close.svelte-17or3al:before {transform:rotate(45deg);}.close.svelte-17or3al:after {transform:rotate(-45deg);}`};function kd(t,e){U(e,!0),W(t,G3);let[i,o]=Be(),n=()=>S(Ne,"$settingsMenuVisible",i),a=()=>S(et,"$settingsMenuOpenedByKeyboard",i),s=()=>S(gt,"$debugPanelVisible",i),d=()=>S(Se,"$isMobile",i),l=()=>S(Je,"$playerSize",i),u=()=>S(Re,"$hasMpegSources$",i),v=()=>S(De,"$mobileNotReportControlHidden$",i),$=()=>S(re,"$autoQualityLimitingAvailable$",i),p=()=>S(G,"$availableSubtitlesList$",i),_=()=>S(Xe,"$isLiveWithPlaybackSpeed",i),w=()=>S(be,"$availableAudioStreams$",i),y=()=>S(Ge,"$availablePlaybackRates$",i),C=()=>S(Me,"$currentAudioStream$",i),T=()=>S(_e,"$currentPlaybackRate$",i),E=()=>S(ot,"$trafficSavingEnabled",i),P=()=>S(ae,"$currentQuality$",i),A=()=>S(N,"$isAutoQualityEnabled$",i),I=()=>S(ie,"$currentSubtitle$",i),V=()=>S(jt,"$additionalSettingsMenuItems$",i),H=()=>S(pe,"$isAutoQualityAvailable$",i),Y=()=>S(Le,"$availableQualities$",i),O=()=>S(ft,"$highQualityEnabled",i),J=f(e,"ref",15,void 0),ne=f(e,"playerControlsHeight",3,0),Z=fe({}),me=fe({}),le=Ie(),Ve=zt(),Me=le.state.audioStream$,be=le.state.availableAudioStreams$,ae=le.state.currentQuality$,Le=le.state.availableQualities$,re=le.state.autoQualityLimitingAvailable$,N=le.state.isAutoQualityEnabled$,pe=le.state.isAutoQualityAvailable$,_e=le.state.currentPlaybackRate$,Ge=le.state.availablePlaybackRates$,ie=le.state.currentSubtitle$,G=le.state.availableSubtitlesList$,K=le.state.canDownload,Re=le.state.hasMpegSources$,Ne=le.ui.settingsMenu.visible$,et=le.ui.settingsMenu.openedByBtnKeyboard$,we=le.ui.settingsMenu.ref$,Se=le.ui.isMobile,De=le.ui.mobileNotReportControlHidden$,Xe=le.state.canChangePlaybackSpeed$,ot=le.state.trafficSavingEnabled$,ft=le.state.highQualityEnabled$,Je=le.ui.playerSize,gt=le.ui.debugPanelVisible,Et=le.state.isInteractiveTime$,jt=le.ui.additionalSettingsMenuItems$,qt=le.ui.t,Wt=le.actions.internal.downloadVideo,ve=le.actions.internal.closeSettingsMenu,j=le.actions.internal.openSettingsSubMenu,Ce=le.actions.internal.closeSettingsSubMenu,se=ee(!1),Oe=ee(void 0),Ue=u1();We(()=>{!n()&&Ue.current&&(Ce(me[Ue.current]),Ue.popAllSubMenus())}),We(()=>{n()||B(Oe,void 0)}),We(()=>{!Ue.current&&r(Oe)&&Ph(Z,r(Oe))}),We(()=>{J()&&we.set(J())});function tt(Tt){return kt(this,null,function*(){Ue.pushSubMenu(Tt),yield $o(),j(Tt,me[Tt])})}function ct(Tt){var Kt;Tt==null||Tt.stopPropagation(),a()||(Kt=e.returnFocus)==null||Kt.call(e),ve(),B(se,!1)}function Ye(Tt,Kt){le.actions.internal.setQuality(Tt,{appliesTo:Kt}),ct()}function Ze(Tt){le.actions.internal.setAudioStream(Tt),ct()}function nt(Tt,Kt){le.actions.internal.setTrafficSavingEnabled(Tt,Kt),Ve.features.qualityDetailsSubMenuEnabled&&ct()}function He(Tt,Kt){le.actions.internal.setHighQualityEnabled(Tt,Kt),ct()}function $t(Tt){le.actions.internal.setPlaybackRate(Tt),ct()}function qe(Tt){le.actions.internal.setSubtitle(Tt),ct()}function dt(){Wt()}function Xt(){z3(e.supportLink)&&window.open(e.supportLink,"_blank"),le.actions.internal.reportProblem(),le.actions.internal.pause()}function Ni(){Qa(le.actions.internal.getDebugTextData())}let Pi=()=>{let Tt=le.actions.internal.getTraceTextData(),Kt=new Blob([...Tt],{type:"application/json"}),oi=window.URL.createObjectURL(Kt);Zs(oi,"vk_player_trace_info","json")};function Ui(){gt.set(!s())}function ji(){B(se,!0)}function Yi(){B(se,!1)}function Lt(){return d()?`max-height: ${Math.round(l().height*.6)}px`:`max-height: ${l().height-32-ne()}px; overflow: auto;`}let yt=m(()=>K&&u()&&!v()),Rt=m(()=>Ve.features.trafficSaving&&!v()&&$()&&!Ve.features.qualityDetailsSubMenuEnabled),So=m(()=>p().length>0&&!v()),an=m(()=>!!_()&&!v()),X=m(()=>Ve.features.audioLanguages&&w().length>=2&&!v()),ii=m(()=>!v());Ut(()=>Et.subscribe(Tt=>{Tt&&!d()&&!r(se)&&!a()&&ct()}));let pi=m(()=>{let Tt=[r(ii)&&"QUALITY_SETTINGS",r(X)&&"AUDIO_LANGUAGES",r(an)&&"PLAYBACK_RATE",r(So)&&"SUBTITLES",r(Rt)&&"TRAFFIC_SAVING_SWITCH",r(yt)&&"DOWNLOAD",Ve.showSupport&&"SHOW_SUPPORT","COPY_DATA",Ve.features.saveTraceInfoToFile&&"SAVE_TRACE_INFO","DEBUG_INFO"].filter(Kt=>!!Kt);return $1({items:Tt,context:{qualityDetailsSubMenuEnabled:Ve.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:y(),currentAudioStream:C(),availableAudioStreams:w(),currentPlaybackRate:T(),selectPlaybackRate:$t,trafficSavingEnabled:E(),toggleTrafficSaving:nt,currentQuality:P()||y1.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:I(),isMobile:d(),onDownloadClick:dt,debugPanelVisible:s(),onCopyDataClick:Ni,onReportProblemClick:Xt,onSaveTraceDataClick:Pi,toggleShowDebugInfo:Ui},additionalSettingsMenuItems:V()})}),zi=m(()=>b1({subMenuId:Ue.current,context:{availablePlaybackRates:y(),selectPlaybackRate:$t,trafficSavingEnabled:E(),toggleTrafficSaving:nt,currentQuality:P()||y1.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:H()||!1,availableQualities:Y(),highQualityEnabled:O(),toggleHighQuality:He,availableAudioStreams:w(),availableSubtitlesList:p(),closeSettingsMenu:ve,currentAudioStream:C(),isMobile:d(),selectAudioLanguage:Ze,selectQuality:Ye,selectSubtitle:qe}}));var ri=Q3();let fi;var si=h(ri);{var ut=Tt=>{var Kt=K3();let oi;Kt.__keydown=[q3,ve];var vo=h(Kt);{var Sn=di=>{var xt=W3();let To;var Ai=h(xt),Si=h(Ai,!0);g(Ai);var zo=M(Ai,2);zo.__click=ct,g(xt),k((oo,qi)=>{To=te(xt,1,"item header svelte-17or3al",null,To,oo),ge(Si,qi)},[()=>({mobile:d()}),()=>qt("submenu_settings")]),b(di,xt)};R(vo,di=>{d()&&di(Sn)})}var Zi=M(vo,2);let Co;Ii(Zi,21,()=>r(pi),di=>di.id,(di,xt)=>{var To=ze(),Ai=ue(To);{var Si=oo=>{lm(oo,{get isMobile(){return d()},get id(){return r(xt).id},get icon(){return r(xt).icon},get label(){return r(xt).label},get ariaLabel(){return r(xt).ariaLabel},get value(){return r(xt).value},get valueComponent(){return r(xt).valueComponent},onClick:()=>{tt(r(xt).children),B(Oe,fe(r(xt).id))},get ref(){return Z[r(xt).id]},set ref(qi){Z[r(xt).id]=qi}})},zo=(oo,qi)=>{{var Cn=Bi=>{dm(Bi,{get isMobile(){return d()},get id(){return r(xt).id},get onClick(){return r(xt).onClick},get icon(){return r(xt).icon},get label(){return r(xt).label},get ariaLabel(){return r(xt).ariaLabel},closeSettings:ct})},Tn=(Bi,ln)=>{{var Io=ko=>{um(ko,{get isMobile(){return d()},get id(){return r(xt).id},get onClick(){return r(xt).onClick},get icon(){return r(xt).icon},get label(){return r(xt).label},get ariaLabel(){return r(xt).ariaLabel},get enabled(){return r(xt).enabled},get tooltipText(){return r(xt).tooltipText},get maxTooltipWidth(){return r(xt).maxTooltipWidth}})};R(Bi,ko=>{r(xt).type==="SWITCH"&&ko(Io)},ln)}};R(oo,Bi=>{r(xt).type==="CLICK"?Bi(Cn):Bi(Tn,!1)},qi)}};R(Ai,oo=>{r(xt).type==="OPEN_SUB_MENU"?oo(Si):oo(zo,!1)})}b(di,To)}),g(Zi),pt(Zi,di=>J(di),()=>J()),g(Kt),k((di,xt,To)=>{oi=te(Kt,1,"settings-menu menu svelte-17or3al",null,oi,di),Co=te(Zi,1,"items",null,Co,xt),it(Zi,To)},[()=>({desktop:!d(),mobile:d(),hidden:!!Ue.current}),()=>({mobile:d()}),Lt]),St("mouseenter",Kt,ji),St("mouseleave",Kt,Yi),b(Tt,Kt)};R(si,Tt=>{n()&&Tt(ut)})}var mo=M(si,2);Ii(mo,17,()=>r(zi),Tt=>Tt.id,(Tt,Kt)=>{let oi=m(()=>{var vo;return(vo=r(Kt).minWidth)!=null?vo:137});am(Tt,{get isMobile(){return d()},get playerControlsHeight(){return ne()},get returnFromSubMenu(){return Ue.popSubMenu},get id(){return r(Kt).id},get title(){return r(Kt).title},closeSettingsMenu:ve,openSubMenuList:tt,get items(){return r(Kt).items},get minWidth(){return r(oi)},get refMenuItems(){return Z},get listRef(){return me[r(Kt).id]},set listRef(vo){me[r(Kt).id]=vo}})}),g(ri),k(Tt=>fi=te(ri,1,"settings-menu-container svelte-17or3al",null,fi,Tt),[()=>({mobile:d(),hidden:!n()})]),b(t,ri),z(),o()}lt(["keydown","click"]);var j3=t=>t;function x1(t,{delay:e=0,duration:i=400,easing:o=j3}={}){let n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*n}`}}var Y3=L('<button class="button svelte-1sbbskl"> </button>'),Z3={hash:"svelte-1sbbskl",code:".button.svelte-1sbbskl {margin-top:12px;font-size:14px;line-height:18px;background:rgba(255, 255, 255, 0.1);padding:6px 12px 7px;border-radius:8px;}"};function Sm(t,e){W(t,Z3);var i=Y3();i.__click=function(...n){var a;(a=e.onClick)==null||a.apply(this,n)};var o=h(i,!0);g(i),k(()=>ge(o,e.label)),b(t,i)}lt(["click"]);var X3=L('<div class="container svelte-1es7arp"><div class="notification svelte-1es7arp"><div><p class="description svelte-1es7arp"><!></p> <!></div> <!></div></div>'),J3={hash:"svelte-1es7arp",code:`.container.svelte-1es7arp {position:absolute;left:0;right:0;top:20px;display:flex;justify-content:center;
309
+ .settings-menu.svelte-17or3al .switch-wrapper.mobile {padding:0 14px;}.settings-menu.svelte-17or3al .icon-wrapper {width:24px;min-width:24px;height:24px;display:flex;align-items:center;justify-content:center;margin-right:16px;}.settings-menu.svelte-17or3al .label {flex-grow:1;margin-right:24px;overflow:hidden;text-overflow:ellipsis;}.settings-menu.svelte-17or3al .item.header.mobile:where(.svelte-17or3al) {color:var(--white);cursor:pointer;justify-content:space-between;column-gap:12px;display:flex;border-bottom:var(--divider-border);margin-bottom:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar {width:8px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-track {box-shadow:none;background-color:#3a3a3a;border-radius:4px;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb {min-height:40px;border-radius:5px;background-color:#666;border:1px solid transparent;background-clip:padding-box;}.settings-menu-container.svelte-17or3al .items::-webkit-scrollbar-thumb:hover {background-color:#777;}.settings-menu-container.svelte-17or3al .items.mobile {overflow-y:auto;overflow-x:hidden;max-height:160px;text-align:left;}.close.svelte-17or3al {position:relative;width:12px;height:12px;padding:12px;margin-right:-12px;}.close.svelte-17or3al:before, .close.svelte-17or3al:after {position:absolute;left:18px;content:' ';height:12px;width:2px;background-color:var(--white);}.close.svelte-17or3al:before {transform:rotate(45deg);}.close.svelte-17or3al:after {transform:rotate(-45deg);}`};function kd(t,e){U(e,!0),W(t,G3);let[i,o]=Be(),n=()=>S(Ne,"$settingsMenuVisible",i),a=()=>S(et,"$settingsMenuOpenedByKeyboard",i),s=()=>S(gt,"$debugPanelVisible",i),d=()=>S(Se,"$isMobile",i),l=()=>S(Je,"$playerSize",i),u=()=>S(Re,"$hasMpegSources$",i),v=()=>S(De,"$mobileNotReportControlHidden$",i),$=()=>S(re,"$autoQualityLimitingAvailable$",i),p=()=>S(G,"$availableSubtitlesList$",i),_=()=>S(Xe,"$isLiveWithPlaybackSpeed",i),w=()=>S(be,"$availableAudioStreams$",i),y=()=>S(Ge,"$availablePlaybackRates$",i),C=()=>S(Me,"$currentAudioStream$",i),T=()=>S(_e,"$currentPlaybackRate$",i),E=()=>S(ot,"$trafficSavingEnabled",i),P=()=>S(ae,"$currentQuality$",i),A=()=>S(N,"$isAutoQualityEnabled$",i),I=()=>S(ie,"$currentSubtitle$",i),V=()=>S(jt,"$additionalSettingsMenuItems$",i),H=()=>S(pe,"$isAutoQualityAvailable$",i),Y=()=>S(Le,"$availableQualities$",i),O=()=>S(ft,"$highQualityEnabled",i),J=f(e,"ref",15,void 0),ne=f(e,"playerControlsHeight",3,0),Z=fe({}),me=fe({}),le=Ie(),Ve=zt(),Me=le.state.audioStream$,be=le.state.availableAudioStreams$,ae=le.state.currentQuality$,Le=le.state.availableQualities$,re=le.state.autoQualityLimitingAvailable$,N=le.state.isAutoQualityEnabled$,pe=le.state.isAutoQualityAvailable$,_e=le.state.currentPlaybackRate$,Ge=le.state.availablePlaybackRates$,ie=le.state.currentSubtitle$,G=le.state.availableSubtitlesList$,K=le.state.canDownload,Re=le.state.hasMpegSources$,Ne=le.ui.settingsMenu.visible$,et=le.ui.settingsMenu.openedByBtnKeyboard$,we=le.ui.settingsMenu.ref$,Se=le.ui.isMobile,De=le.ui.mobileNotReportControlHidden$,Xe=le.state.canChangePlaybackSpeed$,ot=le.state.trafficSavingEnabled$,ft=le.state.highQualityEnabled$,Je=le.ui.playerSize,gt=le.ui.debugPanelVisible,Et=le.state.isInteractiveTime$,jt=le.ui.additionalSettingsMenuItems$,qt=le.ui.t,Wt=le.actions.internal.downloadVideo,ve=le.actions.internal.closeSettingsMenu,j=le.actions.internal.openSettingsSubMenu,Ce=le.actions.internal.closeSettingsSubMenu,se=ee(!1),He=ee(void 0),Ue=u1();We(()=>{!n()&&Ue.current&&(Ce(me[Ue.current]),Ue.popAllSubMenus())}),We(()=>{n()||B(He,void 0)}),We(()=>{!Ue.current&&r(He)&&Ph(Z,r(He))}),We(()=>{J()&&we.set(J())});function tt(Tt){return kt(this,null,function*(){Ue.pushSubMenu(Tt),yield $o(),j(Tt,me[Tt])})}function ct(Tt){var Kt;Tt==null||Tt.stopPropagation(),a()||(Kt=e.returnFocus)==null||Kt.call(e),ve(),B(se,!1)}function Ye(Tt,Kt){le.actions.internal.setQuality(Tt,{appliesTo:Kt}),ct()}function Ze(Tt){le.actions.internal.setAudioStream(Tt),ct()}function nt(Tt,Kt){le.actions.internal.setTrafficSavingEnabled(Tt,Kt),Ve.features.qualityDetailsSubMenuEnabled&&ct()}function Fe(Tt,Kt){le.actions.internal.setHighQualityEnabled(Tt,Kt),ct()}function $t(Tt){le.actions.internal.setPlaybackRate(Tt),ct()}function qe(Tt){le.actions.internal.setSubtitle(Tt),ct()}function dt(){Wt()}function Xt(){z3(e.supportLink)&&window.open(e.supportLink,"_blank"),le.actions.internal.reportProblem(),le.actions.internal.pause()}function Ni(){Qa(le.actions.internal.getDebugTextData())}let Pi=()=>{let Tt=le.actions.internal.getTraceTextData(),Kt=new Blob([...Tt],{type:"application/json"}),oi=window.URL.createObjectURL(Kt);Zs(oi,"vk_player_trace_info","json")};function Ui(){gt.set(!s())}function ji(){B(se,!0)}function Yi(){B(se,!1)}function Lt(){return d()?`max-height: ${Math.round(l().height*.6)}px`:`max-height: ${l().height-32-ne()}px; overflow: auto;`}let yt=m(()=>K&&u()&&!v()),Rt=m(()=>Ve.features.trafficSaving&&!v()&&$()&&!Ve.features.qualityDetailsSubMenuEnabled),So=m(()=>p().length>0&&!v()),an=m(()=>!!_()&&!v()),X=m(()=>Ve.features.audioLanguages&&w().length>=2&&!v()),ii=m(()=>!v());Ut(()=>Et.subscribe(Tt=>{Tt&&!d()&&!r(se)&&!a()&&ct()}));let pi=m(()=>{let Tt=[r(ii)&&"QUALITY_SETTINGS",r(X)&&"AUDIO_LANGUAGES",r(an)&&"PLAYBACK_RATE",r(So)&&"SUBTITLES",r(Rt)&&"TRAFFIC_SAVING_SWITCH",r(yt)&&"DOWNLOAD",Ve.showSupport&&"SHOW_SUPPORT","COPY_DATA",Ve.features.saveTraceInfoToFile&&"SAVE_TRACE_INFO","DEBUG_INFO"].filter(Kt=>!!Kt);return $1({items:Tt,context:{qualityDetailsSubMenuEnabled:Ve.features.qualityDetailsSubMenuEnabled,availablePlaybackRates:y(),currentAudioStream:C(),availableAudioStreams:w(),currentPlaybackRate:T(),selectPlaybackRate:$t,trafficSavingEnabled:E(),toggleTrafficSaving:nt,currentQuality:P()||y1.INVARIANT,isAutoQualityEnabled:A()||!1,currentSubtitle:I(),isMobile:d(),onDownloadClick:dt,debugPanelVisible:s(),onCopyDataClick:Ni,onReportProblemClick:Xt,onSaveTraceDataClick:Pi,toggleShowDebugInfo:Ui},additionalSettingsMenuItems:V()})}),zi=m(()=>b1({subMenuId:Ue.current,context:{availablePlaybackRates:y(),selectPlaybackRate:$t,trafficSavingEnabled:E(),toggleTrafficSaving:nt,currentQuality:P()||y1.INVARIANT,isAutoQualityEnabled:A()||!1,isAutoQualityAvailable:H()||!1,availableQualities:Y(),highQualityEnabled:O(),toggleHighQuality:Fe,availableAudioStreams:w(),availableSubtitlesList:p(),closeSettingsMenu:ve,currentAudioStream:C(),isMobile:d(),selectAudioLanguage:Ze,selectQuality:Ye,selectSubtitle:qe}}));var ri=Q3();let fi;var si=h(ri);{var ut=Tt=>{var Kt=K3();let oi;Kt.__keydown=[q3,ve];var vo=h(Kt);{var Sn=di=>{var xt=W3();let To;var Ai=h(xt),Si=h(Ai,!0);g(Ai);var zo=M(Ai,2);zo.__click=ct,g(xt),k((oo,qi)=>{To=te(xt,1,"item header svelte-17or3al",null,To,oo),ge(Si,qi)},[()=>({mobile:d()}),()=>qt("submenu_settings")]),b(di,xt)};R(vo,di=>{d()&&di(Sn)})}var Zi=M(vo,2);let Co;Ii(Zi,21,()=>r(pi),di=>di.id,(di,xt)=>{var To=ze(),Ai=ue(To);{var Si=oo=>{lm(oo,{get isMobile(){return d()},get id(){return r(xt).id},get icon(){return r(xt).icon},get label(){return r(xt).label},get ariaLabel(){return r(xt).ariaLabel},get value(){return r(xt).value},get valueComponent(){return r(xt).valueComponent},onClick:()=>{tt(r(xt).children),B(He,fe(r(xt).id))},get ref(){return Z[r(xt).id]},set ref(qi){Z[r(xt).id]=qi}})},zo=(oo,qi)=>{{var Cn=Bi=>{dm(Bi,{get isMobile(){return d()},get id(){return r(xt).id},get onClick(){return r(xt).onClick},get icon(){return r(xt).icon},get label(){return r(xt).label},get ariaLabel(){return r(xt).ariaLabel},closeSettings:ct})},Tn=(Bi,ln)=>{{var Io=ko=>{um(ko,{get isMobile(){return d()},get id(){return r(xt).id},get onClick(){return r(xt).onClick},get icon(){return r(xt).icon},get label(){return r(xt).label},get ariaLabel(){return r(xt).ariaLabel},get enabled(){return r(xt).enabled},get tooltipText(){return r(xt).tooltipText},get maxTooltipWidth(){return r(xt).maxTooltipWidth}})};R(Bi,ko=>{r(xt).type==="SWITCH"&&ko(Io)},ln)}};R(oo,Bi=>{r(xt).type==="CLICK"?Bi(Cn):Bi(Tn,!1)},qi)}};R(Ai,oo=>{r(xt).type==="OPEN_SUB_MENU"?oo(Si):oo(zo,!1)})}b(di,To)}),g(Zi),pt(Zi,di=>J(di),()=>J()),g(Kt),k((di,xt,To)=>{oi=te(Kt,1,"settings-menu menu svelte-17or3al",null,oi,di),Co=te(Zi,1,"items",null,Co,xt),it(Zi,To)},[()=>({desktop:!d(),mobile:d(),hidden:!!Ue.current}),()=>({mobile:d()}),Lt]),St("mouseenter",Kt,ji),St("mouseleave",Kt,Yi),b(Tt,Kt)};R(si,Tt=>{n()&&Tt(ut)})}var mo=M(si,2);Ii(mo,17,()=>r(zi),Tt=>Tt.id,(Tt,Kt)=>{let oi=m(()=>{var vo;return(vo=r(Kt).minWidth)!=null?vo:137});am(Tt,{get isMobile(){return d()},get playerControlsHeight(){return ne()},get returnFromSubMenu(){return Ue.popSubMenu},get id(){return r(Kt).id},get title(){return r(Kt).title},closeSettingsMenu:ve,openSubMenuList:tt,get items(){return r(Kt).items},get minWidth(){return r(oi)},get refMenuItems(){return Z},get listRef(){return me[r(Kt).id]},set listRef(vo){me[r(Kt).id]=vo}})}),g(ri),k(Tt=>fi=te(ri,1,"settings-menu-container svelte-17or3al",null,fi,Tt),[()=>({mobile:d(),hidden:!n()})]),b(t,ri),z(),o()}lt(["keydown","click"]);var j3=t=>t;function x1(t,{delay:e=0,duration:i=400,easing:o=j3}={}){let n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:o,css:a=>`opacity: ${a*n}`}}var Y3=L('<button class="button svelte-1sbbskl"> </button>'),Z3={hash:"svelte-1sbbskl",code:".button.svelte-1sbbskl {margin-top:12px;font-size:14px;line-height:18px;background:rgba(255, 255, 255, 0.1);padding:6px 12px 7px;border-radius:8px;}"};function Sm(t,e){W(t,Z3);var i=Y3();i.__click=function(...n){var a;(a=e.onClick)==null||a.apply(this,n)};var o=h(i,!0);g(i),k(()=>ge(o,e.label)),b(t,i)}lt(["click"]);var X3=L('<div class="container svelte-1es7arp"><div class="notification svelte-1es7arp"><div><p class="description svelte-1es7arp"><!></p> <!></div> <!></div></div>'),J3={hash:"svelte-1es7arp",code:`.container.svelte-1es7arp {position:absolute;left:0;right:0;top:20px;display:flex;justify-content:center;
310
310
  /**
311
311
  * \u0415\u0441\u043B\u0438 \u043D\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u043C \u0443 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 \u0441\u043E\u0431\u044B\u0442\u0438\u044F, \u0442\u043E \u043D\u0435 \u0441\u043C\u043E\u0436\u0435\u043C \u043F\u043E \u044D\u0442\u043E\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0432\u044B\u0437\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u043D\u043E\u0435 \u043C\u0435\u043D\u044E.
312
312
  */pointer-events:none;}.notification.svelte-1es7arp {padding:9px 14px 10px 12px;background:var(--notification-bg);display:inline-flex;border-radius:var(--notification-radius);gap:10px;pointer-events:auto;}.description.svelte-1es7arp {line-height:16px;font-size:13px;margin:0;white-space:pre;}`};function Ed(t,e){U(e,!0),W(t,J3);let i=340,{features:{forceAutoQualityWhenSevereStallHappens:o}}=zt(),{ui:{t:n}}=Ie(),a=n(o?"slow_video_notification_force_description":"slow_video_notification_suggest_description");var s=X3(),d=h(s),l=h(d),u=h(l),v=h(u);Id(v,{message:a}),g(u);var $=M(u,2);{var p=w=>{let y=m(()=>n("slow_video_notification_button"));Sm(w,{get label(){return r(y)},get onClick(){return e.onSelectAutoQuality}})};R($,w=>{o||w(p)})}g(l);var _=M(l,2);oa(_,{get onClick(){return e.onClose}}),g(d),g(s),up(3,d,()=>x1,()=>({duration:i})),b(t,s),z()}var ha="annotation",su=class{constructor(){this.slots=new Map}init(e){this.shadowRootContainer=e}add(e,{overlay:i,id:o}){e.setAttribute("slot",ha),this.setupSlotStyles(e,i),this.shadowRootContainer.append(e),this.slots.set(o,e)}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"}}remove(e){let i=this.slots.get(e);i&&(i.remove(),this.slots.delete(e))}destroy(){for(let e in this.slots.keys())this.remove(e);this.slots.clear()}};var ex=L('<div class="container svelte-f47ws8"><div class="playback_state_icon svelte-f47ws8"><!></div></div>'),tx={hash:"svelte-f47ws8",code:`.container.svelte-f47ws8 {position:absolute;display:flex;width:100%;height:100%;align-items:center;justify-content:center;pointer-events:none;}.playback_state_icon.svelte-f47ws8 {display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:100%;background-color:#00000073;will-change:opacity, scale;
@@ -341,7 +341,7 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
341
341
  scale: 0;
342
342
  }
343
343
  }`};function Cm(t,e){U(e,!0),W(t,tx);let[i,o]=Be(),n=()=>S(s,"$isPlaying$",i),a=()=>S(d,"$aboutToGoNextVideo",i),{state:{isPlaying$:s},ui:{aboutToGoNextVideo:d},actions:l}=Ie(),{features:{playbackStatusShow:u,playbackStatusAnimationDuration:v,playbackStatusNextVideoAnimationDuration:$}}=zt(),p=0,_=ee(null),w=ee(!1);We(()=>{B(_,fe(n()?Sr:as))}),We(()=>{B(_,fe(a()?Ts:null))}),We(()=>{if(u)return p=window.setTimeout(()=>{p=0,a()&&r(_)===Ts&&(a()==="next"?l.internal.nextVideoClick(!1):l.internal.prevVideoClick(!1)),B(_,null)},r(_)!==Ts?v:$),()=>{p&&(window.clearTimeout(p),p=0)}}),We(()=>{n()&&!r(w)&&(B(w,!0),B(_,null))});var y=ze(),C=ue(y);{var T=E=>{var P=ze(),A=ue(P);Qs(A,()=>r(_),I=>{var V=ex(),H=h(V),Y=h(H);let O=m(()=>a()==="prev");ki(Y,()=>r(_),(J,ne)=>{ne(J,{width:"40",height:"40",viewBox:"0 0 24 24",get isPrev(){return r(O)}})}),g(H),g(V),k(()=>it(H,`animation-duration: ${r(_)!==Ts?v:$}ms`)),b(I,V)}),b(E,P)};R(C,E=>{r(_)&&u&&E(T)})}b(t,y),z(),o()}var ix=L('<div><div data-testid="video-container"></div></div>'),ox={hash:"svelte-1czns9r",code:`.video-wrapper.svelte-1czns9r,
344
- .video-container.svelte-1czns9r {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.svelte-1czns9r {z-index:var(--video-container-z-index);background:var(--black);}.video-container.svelte-1czns9r {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}.video-container.fast-rotate.svelte-1czns9r {transition:none;}.nocursor.svelte-1czns9r {cursor:none;}`};function _a(t,e){U(e,!0),W(t,ox);let[i,o]=Be(),n=()=>S(v,"$rotateAlpha",i),a=()=>S($,"$playerSize",i),s=()=>S(u,"$playerPhase",i),d=()=>S(p,"$isPlaying$",i),l=f(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:v,playerSize:$},state:{isPlaying$:p}}=Ie(),{isSmoothVideoRotate:_}=zt(),w=m(()=>l()&&n()%180?a().height/a().width:1);var y=ix();let C;y.__contextmenu=function(...E){var P;(P=e.onContextMenu)==null||P.apply(this,E)},y.__mousedown=function(...E){var P;(P=e.onMouseDown)==null||P.apply(this,E)},y.__mouseup=function(...E){var P;(P=e.onMouseUp)==null||P.apply(this,E)},y.__click=function(...E){var P;(P=e.onClick)==null||P.apply(this,E)};var T=h(y);te(T,1,"video-container svelte-1czns9r",null,{},{"fast-rotate":!_}),pt(T,E=>l(E),()=>l()),g(y),k(E=>{C=te(y,1,"video-wrapper svelte-1czns9r",null,C,E),it(T,`transform: rotate(${n()}deg) scale(${r(w)})`),Fe(T,"data-is-playing",d())},[()=>({hidden:s()!=="video",nocursor:e.hideCursor})]),b(t,y),z(),o()}lt(["contextmenu","mousedown","mouseup","click"]);var nx=(t,e,i,o,n,a)=>{t.preventDefault(),e&&(i({message:"double click on video"}),o(),n(a.uiConfig.controls.hideTimeoutCursor))},rx=(t,e,i,o,n,a)=>{if(t.stopPropagation(),e()||o()){a();return}},sx=L("<div><!></div>"),ax=L('<div class="spherical-video-icon svelte-jtgjmv"><!></div>'),lx=L("<div><!></div>"),dx=L('<div class="settings-menu svelte-jtgjmv"><!></div>'),cx=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ux=L("<!> <!> <!>",1),px=L('<div class="blocked svelte-jtgjmv"></div>'),fx=L('<div class="player-wrapper svelte-jtgjmv"><!> <div class="overlay-container"></div></div> <!>',1),mx={hash:"svelte-jtgjmv",code:".player-wrapper.svelte-jtgjmv {position:absolute;width:100%;height:100%;}.blocked.svelte-jtgjmv {position:absolute;width:100%;height:100%;z-index:var(--overlay-container-z-index);}.player-wrapper.svelte-jtgjmv .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-jtgjmv {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}.ads-container.svelte-jtgjmv {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-jtgjmv {z-index:var(--ads-container-z-index);background:var(--black);}.settings-menu.svelte-jtgjmv {position:absolute;z-index:var(--settings-menu-z-index);bottom:57px;right:18px;left:0;transition:opacity 0.2s, visibility 0.2s;}"};function Tm(t,e){U(e,!0),W(t,mx);let[i,o]=Be(),n=()=>S(Ko,"$notificationsToShow$",i),a=()=>S(Ui,"$playerPhase",i),s=()=>S(pi,"$isLoaderVisible",i),d=()=>S(Xt,"$adPlaybackState",i),l=()=>S(Tt,"$crashed",i),u=()=>S(To,"$isInteractiveTime$",i),v=()=>S(yt,"$settingsMenuVisible",i),$=()=>S(Ai,"$isInteractiveExpectation$",i),p=()=>S(Lt,"$controlsVisible",i),_=()=>S(zo,"$touched",i),w=()=>S(Qn,"$graphIsOpened$",i),y=()=>S(ji,"$isFullscreen",i),C=()=>S(Tr,"$autoplayNextEnabled$",i),T=()=>S(si,"$postrollPassed",i),E=()=>S(zi,"$isEnded$",i),P=()=>S(Qo,"$cursorInside",i),A=()=>S(In,"$fakeIsPlaying$",i),I=()=>S(Xi,"$bottomNoSmooth",i),V=()=>S(Tn,"$interactiveTimeIndicator",i),H=()=>S(Zi,"$playerSize",i),Y=()=>S(Co,"$is3DVideo",i),O=()=>S(X,"$contextMenuVisible$",i),J=()=>S(dt,"$playbackState$",i),ne=()=>S(oo,"$hotKeyMapData",i),Z=()=>S(So,"$scrubbingInProgress",i),me=()=>S(an,"$volumeChangingInProgress",i),le=()=>S(ri,"$chromecastConnected$",i),Ve=()=>S(Ro,"$controlsTimeoutActive",i),Me=()=>S(Rt,"$settingsMenuOpenedByKeyboard",i),be=()=>S(Ao,"$contextMenuOpenedByKeyboard$",i),ae=()=>S(Ar,"$contextMenuButtonRef$",i),Le=()=>S(fr,"$contextMenuOpenedByHotKey$",i),re=()=>S(Mr,"$contextMenuLastActiveElem$",i),N=()=>S(Yi,"$isFullscreenOpenedByKeyboard",i),pe=()=>S(qe,"$language$",i),_e=()=>S(di,"$icon3DVideoVisible",i),Ge=()=>S(fi,"$chromecastDeviceName$",i),ie=()=>S(vo,"$currentSubtitle$",i),G=()=>S(Sn,"$currentSubtitleCaptions$",i),K=()=>S(Ni,"$position$",i),Re=()=>S(Pi,"$duration$",i),Ne=()=>S(ut,"$isLive$",i),et=()=>S(mo,"$isPlaying$",i),we=()=>S(ln,"$contextMenuPosition$",i),Se=()=>S(qi,"$showHotKeyMap",i),De=()=>S(ii,"$debugPanelVisible",i),Xe=()=>S(lr,"$userActionsDisabled$",i),ot=f(e,"videoContainer",15),ft=f(e,"adsSlotId",3,void 0),Je=f(e,"adsParams",3,void 0),gt=f(e,"adsPreviewParam",3,void 0),Et=f(e,"adsAutoplayParam",3,void 0),jt=f(e,"duration",3,void 0),qt=f(e,"logoTargetUrl",3,""),Wt=f(e,"showNextPrevButtons",3,!1),ve=f(e,"nextButtonActive",3,!1),j=f(e,"prevButtonActive",3,!1),Ce=f(e,"endScreenVideoTitle",3,void 0),se=f(e,"endScreenVideoThumb",3,void 0),Oe=f(e,"isOneVideoPlaylist",3,!1),Ue=f(e,"shadowRootContainer",3,void 0),tt=f(e,"outerContainerRef",3,void 0),ct=f(e,"playerStarted",3,!1),Ye=f(e,"fullScreenTarget",3,void 0),Ze=f(e,"showMiniTimer",3,!1),nt=f(e,"showEndScreen",3,!0),He=f(e,"keyboardControls",15),$t=e.store.getLogger().createComponentLog("Root component"),qe=e.store.interfaceLanguage$,dt=e.store.state.playbackState$,Xt=e.store.ads.playbackState,Ni=e.store.state.positionWithScrubbing$,Pi=e.store.state.duration$,Ui=e.store.playerPhase,ji=e.store.ui.isFullscreen,Yi=e.store.ui.isFullscreenOpenedByKeyboard,Lt=e.store.ui.controlsVisible,yt=e.store.ui.settingsMenu.visible$,Rt=e.store.ui.settingsMenu.openedByBtnKeyboard$,So=e.store.ui.scrubbingInProgress,an=e.store.ui.volumeChangingInProgress,X=e.store.ui.contextMenu.visible$,ii=e.store.ui.debugPanelVisible,pi=e.store.state.isLoaderVisible,zi=e.store.state.isEnded$,ri=e.store.state.chromecastConnected$,fi=e.store.state.chromecastDeviceName$,si=e.store.ads.postrollPassed,ut=e.store.state.isLive$,mo=e.store.state.isPlaying$,Tt=e.store.state.crashed$,Kt=e.store.webApi.annotationsApi,oi=e.store.webApi.pictureInPictureApi,vo=e.store.state.currentSubtitle$,Sn=e.store.state.currentSubtitleCaptions$,Zi=e.store.ui.playerSize,Co=e.store.ui.is3DVideo,di=e.store.ui.icon3DVideoVisible,xt=e.store.state.isInteractive,To=e.store.state.isInteractiveTime$,Ai=e.store.state.isInteractiveExpectation$,Si=e.store.state.hasInteractiveBranches,zo=e.store.ui.touched,oo=e.store.ui.modals.hotKeyMap.data,qi=e.store.ui.modals.hotKeyMap.show,Cn=e.store.ui.overlayContainer$,Tn=e.store.ui.controls.interactiveTimeIndicator,Bi=e.store.state.showInteractiveTimeIndicator,ln=e.store.ui.contextMenu.position$,Io=e.store.actions.internal.setQuality,ko=e.store.actions.internal.closeSettingsMenu,Tr=e.store.ui.autoplayNextEnabled$,lr=e.store.ui.userActionsDisabled,{fakeIsPlaying$:In,notifications$:Kn,graphIsOpened$:Qn}=fo(),go=ee(void 0),qo=ee(void 0),kn=ee(void 0),rt=ee(void 0),Wo,dn,En;oo.set(wh());let{closeNotification:dr,notificationsToShow$:Ko}=Kn,Gn=m(()=>!!n().slow_video),cn=()=>dr("slow_video"),Pn=m(()=>(a()==="video"&&s()||a()==="ads"&&d()==="inactive")&&!l()),Oi=ee(void 0),Xi=de(!1),An,Ro=de(!1),Mn=de(),Qo=de(!1),Do=ee(!1),gi=ee(!1),jn=ee(!1),Eo=ee(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),cr=m(()=>u()&&!v()&&!(r(Do)||r(gi))&&!(r(jn)&&!$())),un=!0,pn=m(()=>e.uiConfig.features.thumbTimer&&Ze()&&a()==="video"&&!p()&&!l()&&!xt&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),ur=m(()=>a()==="video"&&!w()&&y()),Go=ee(!1),Ir=m(()=>(nt()||e.showAutoplayNext&&C())&&!!Ce()&&!!se()&&(e.showAds&&T()||!e.showAds)&&E()&&!l()&&!r(Go)),Ln=m(()=>P()&&!(p()||r(Ir))&&!u()),Yn=ee(!1),pr=m(()=>A()!==null),{toggle:kr}=In,Zn=!1,fn=null;oi==null||oi.setContext(kl());let Xn=()=>{e.autoplay&&!xt&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ci(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Xn});let ci=()=>{window.clearTimeout(Wo),Ro.set(!1)},No=()=>{window.clearTimeout(dn),Mn.set(null)},Ci=xe=>{ci(),Ro.set(!0),Wo=window.setTimeout(()=>Ro.set(!1),xe);let Pt=xe-100;An=window.setTimeout(()=>{I()&&Xi.set(!1)},Pt>0?Pt:xe)},Jn=(xe,Pt)=>{No(),Mn.set(Pt),dn=window.setTimeout(()=>Mn.set(null),xe)},mt=Co.subscribe(xe=>{di.set(xe),xe&&(window.clearTimeout(En),En=window.setTimeout(()=>di.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Ht=()=>kt(this,null,function*(){var Pt,vi,hi,Mo;let xe=bs();if(xe){let ui=Ul(),Ee=st();xe=ui===Ee||ui===Ue()}if(xe){Ci(e.uiConfig.controls.hideTimeoutFullscreen);try{yield oi==null?void 0:oi.remove()}catch(ui){$t({message:String(ui)})}}ji.set(xe),e.store.getAdmanWrapper().setFullscreen(xe),y()?(vi=(Pt=e.store.callbacks)==null?void 0:Pt.onFullscreenEnter)==null||vi.call(Pt):(Mo=(hi=e.store.callbacks)==null?void 0:hi.onFullscreenExit)==null||Mo.call(hi)}),Mi=xe=>{let{width:Pt,height:vi}=xe.target;Zi.set({width:Pt,height:vi})},Po=()=>{let{width:xe,height:Pt}=r(go).getBoundingClientRect();Zi.set({width:xe,height:Pt})};Ut(()=>{var Pt;return Lc(Ht),e.uiConfig.features.annotationsInside&&(Kt==null||Kt.init(r(go))),ea(oi)&&(oi==null||oi.assignPlayerContainer(r(go)),oi==null||oi.registryExternalEventHandlers({resize:Mi,leavepictureinpicture:Po})),e.interactiveContainer&&((Pt=ot().parentElement)==null||Pt.insertBefore(e.interactiveContainer,ot().nextSibling)),()=>{window.clearTimeout(Wo),window.clearTimeout(An),window.clearTimeout(dn),window.clearTimeout(En),mt(),oi==null||oi.dispose().catch(vi=>{$t({message:String(vi)})}),Vc(Ht)}});let st=()=>{let xe=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!tt()?r(go):tt(),Pt=xe.getRootNode(),vi=Pt instanceof ShadowRoot?Pt.host:Pt,hi=Ye()instanceof HTMLElement&&Ye().contains(vi);return e.uiConfig.allowChangingFullscreenTarget&&Ye()&&hi?Ye():xe},Qt=()=>kt(this,null,function*(){bs()?(yield Mc(document),$t({message:"exit fullscreen"})):($t({message:"request fullscreen"}),yield Ac(st()))}),mi=()=>{ko(),X.set(!1)},Ji=xe=>{w()||(xe.preventDefault(),X.set(!0),ln.set({left:xe.clientX,top:xe.clientY}))};function eo(){Qo.set(!0),xt||Ci(e.uiConfig.controls.hideTimeoutCursor)}function Li(){xt||(Xi.set(!0),Ci(e.uiConfig.controls.hideTimeoutCursor))}function xi(){Qo.set(!1),B(gi,!1),B(Do,!1),Zn=!1,e.store.actions.internal.releaseCamera(),Ci(e.uiConfig.controls.hideTimeout)}function to(xe){return xe?xe.offsetTop+to(xe.offsetParent):0}function wi(xe){return xe?xe.offsetLeft+wi(xe.offsetParent):0}function no(xe){if(V()&&Bi){let Pt=xe.currentTarget,vi=to(Pt),hi=wi(Pt),Mo=xe.pageX-hi,ui=xe.pageY-vi,{left:Ee,bottom:It,right:ei}=V(),Ti=ei-Ee;return Mo>=Ee-Ti&&ui<=It+Ti}}function Wi(xe){if(r(go)){let Pt=to(xe.currentTarget),vi=H().height,hi=xe.pageY-Pt;if(no(xe)){B(gi,!1);return}hi<40?B(gi,!0):hi>vi-40?B(Do,!0):(B(gi,!1),v()||B(Do,!1))}}function mn(xe){Wi(xe),r(cr)||Ci(e.uiConfig.controls.hideTimeoutCursor),Y()&&Zn&&fn&&e.store.actions.internal.moveCameraFocusPX(fn.clientX-xe.clientX,fn.clientY-xe.clientY,xe.timeStamp-fn.timeStamp),fn=xe}let er=xe=>{xe.preventDefault(),xe.button===0&&(Zn=!0,e.store.actions.internal.holdCamera()),Ci(e.uiConfig.controls.hideTimeoutCursor)},tr=xe=>{xe.preventDefault(),xe.button===0&&(fn=xe,Zn=!1,e.store.actions.internal.releaseCamera()),Ci(e.uiConfig.controls.hideTimeoutCursor)},Er=xe=>{var Pt;if(xe.preventDefault(),O()||v()){mi();return}if(!(E()&&!Si)){if(r(pr))return kr();if((Pt=He())==null||Pt.focus(),!ct()){e.firstStart(),Ci(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||J()!==S1.PLAYING)&&e.store.actions.internal.togglePlay(),Ci(e.uiConfig.controls.hideTimeoutCursor)}},Pr=xe=>{mi(),zo.set(!0),Ci(e.uiConfig.controls.hideTimeout),xe&&Jn(e.uiConfig.controls.hideHotKeyHelpers,xe)},Vn=()=>{var xe,Pt;mi(),(xe=e.store.callbacks)!=null&&xe.onOpenHotKeyMap?(Pt=e.store.callbacks)==null||Pt.onOpenHotKeyMap(ne()):qi.update(vi=>!vi)},Rn=()=>{zo.set(!0)},Ao=e.store.ui.contextMenu.openedByBtnKeyboard$,Ar=e.store.ui.contextMenu.btnRef$,Bo=ee(void 0),fr=e.store.ui.contextMenu.openedByHotKey$,Mr=e.store.ui.contextMenu.lastActiveElem$;We(()=>{Cn.set(r(Oi))}),We(()=>{B(jn,fe(r(Eo)&&J()!==S1.PLAYING)),r(Eo)||bt(()=>B(Eo,!0))}),We(()=>{Lt.set((r(jn)||E()||v()||Z()||me()||le()||Ve())&&!r(cr)&&(a()==="video"||a()==="ads")&&!l())}),We(()=>{!Z()&&r(Yn)&&!u()&&Ci(e.uiConfig.controls.hideTimeoutCursor),bt(()=>B(Yn,fe(Z())))}),We(()=>{r(rt),v(),Me(),bt(()=>ja(r(rt),v(),Me()))}),We(()=>{r(Bo),O(),be(),bt(()=>ja(r(Bo),O(),be()))}),We(()=>{let xe=ae();xe&&(O(),bt(()=>Ga(xe,O(),Ao)))}),We(()=>{r(Bo),O(),Le(),bt(()=>ja(r(Bo),O(),Le()))}),We(()=>{let xe=re();xe&&(O(),bt(()=>Eh(xe,O(),fr)))}),We(()=>{var xe;!N()&&y()&&(bt(()=>Yi.set(!1)),(xe=He())==null||xe.focus())}),We(()=>{w()&&mi()});let Lr=F("video360");var mr=fx();St("blur",Us,mi);var io=ue(mr);io.__mousemove=mn,io.__dblclick=[nx,un,$t,Qt,Ci,e];var vn=h(io);let qr=m(()=>a()==="ads"),vr=m(()=>r(pr)?kr:void 0);pt(Wp(vn,{toggleFullscreen:Qt,hideContextMenu:mi,showHotKeyHelpers:Pr,showKeyMap:Vn,get isAds(){return r(qr)},get fakePlayButtonHandler(){return r(vr)},get nextButtonActive(){return ve()},get prevButtonActive(){return j()},children:(xe,Pt)=>{var vi=ux(),hi=ue(vi);_a(hi,{get hideCursor(){return r(Ln)},onClick:Er,onContextMenu:Ji,onMouseDown:er,onMouseUp:tr,get videoContainer(){return ot()},set videoContainer(Ee){ot(Ee)}});var Mo=M(hi,2);Gs(Mo,()=>"slot",!1,(Ee,It)=>{ke(Ee,null,{name:ha})});var ui=M(Mo,2);Qs(ui,pe,Ee=>{var It=cx(),ei=ue(It);let Ti=m(()=>a()!=="thumb"||l()||xt&&e.autoplay);ma(ei,{get hidden(){return r(Ti)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var ni=M(ei,2);Cm(ni,{});var jo=M(ni,2);{var gn=Ke=>{let li=m(()=>{var Yo;return(Yo=e.live)==null?void 0:Yo.startTime});Cd(Ke,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(li)}})};R(jo,Ke=>{a()==="LiveWaitingStart"&&Ke(gn)})}var Vr=M(jo,2);{var Dn=Ke=>{va(Ke,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Vr,Ke=>{a()==="LiveWaitingRecover"&&Ke(Dn)})}var Wr=M(Vr,2);{var ba=Ke=>{va(Ke,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Wr,Ke=>{a()==="LiveWaitingRecord"&&Ke(ba)})}var Es=M(Wr,2);{var ll=Ke=>{var li=sx();let Yo;var Ls=h(li);zl(Ls,{get adsSlotId(){return ft()},get adsParams(){return Je()},get adsPreviewParam(){return gt()},get adsAutoplayParam(){return Et()},get duration(){return jt()}}),g(li),k(ho=>Yo=te(li,1,"ads-container svelte-jtgjmv",null,Yo,ho),[()=>({hidden:a()!=="ads"})]),b(Ke,li)};R(Es,Ke=>{e.showAds&&ct()&&Ke(ll)})}var $a=M(Es,2);{var dl=Ke=>{let li=m(()=>!nt()&&e.showAutoplayNext&&C());Up(Ke,{get title(){return Ce()},get thumb(){return se()},get isHide(){return r(li)},clickCloseIcon:()=>B(Go,!0)})};R($a,Ke=>{r(Ir)&&Ce()&&se()&&Ke(dl)})}var Ps=M($a,2);{var cl=Ke=>{let li=m(()=>!p());em(Ke,{get title(){return e.title},get isHidden(){return r(li)}})};R(Ps,Ke=>{r(ur)&&Ke(cl)})}var ir=M(Ps,2);{var ya=Ke=>{let li=m(()=>a()==="video"&&p());xd(Ke,{get isShifted(){return r(li)}})};R(ir,Ke=>{Y()&&Ke(ya)})}var As=M(ir,2);{var _t=Ke=>{var li=ax(),Yo=h(li);Fl(Yo,{"aria-label":Lr}),g(li),b(Ke,li)};R(As,Ke=>{_e()&&Ke(_t)})}var ht=M(As,2);{var ro=Ke=>{wd(Ke,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ge()}})};R(ht,Ke=>{le()&&Ke(ro)})}var Oo=M(ht,2);{var so=Ke=>{fa(Ke,{get shifted(){return p()},get captions(){return G()},get position(){return K()},get playerSize(){return H()}})};R(Oo,Ke=>{ie().value!=="off"&&Ke(so)})}var ai=M(Oo,2);{var Hi=Ke=>{var li=lx();li.__contextmenu=Ji,li.__click=[rx,O,X,v,yt,mi];var Yo=h(li);Sd(Yo,{}),g(li),b(Ke,li)};R(ai,Ke=>{l()&&Ke(Hi)})}var ds=M(ai,2);{var ul=Ke=>{let li=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Yo=m(()=>a()==="ads"),Ls=m(()=>e.canRewindLive&&Re()!==0);yd(Ke,{get bottomHidden(){return r(li)},get bottomNoSmooth(){return I()},get showControls(){return p()},get isAds(){return r(Yo)},get canRewindLive(){return r(Ls)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return qt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Wt()},get nextButtonActive(){return ve()},get prevButtonActive(){return j()},get isOneVideoPlaylist(){return Oe()},customFullscreenSupported:un,toggleFullscreen:Qt,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return r(qo)},set playerControlsWrapperRef(ho){B(qo,fe(ho))},get playerControlsRef(){return r(kn)},set playerControlsRef(ho){B(kn,fe(ho))}})};R(ds,Ke=>{ct()&&Ke(ul)})}var Hd=M(ds,2);{var _u=Ke=>{var li=dx(),Yo=h(li);let Ls=m(()=>{var ho;return(ho=r(kn))==null?void 0:ho.clientHeight});kd(Yo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return r(Ls)},returnFocus:()=>{var ho;return(ho=He())==null?void 0:ho.focus()},get ref(){return r(rt)},set ref(ho){B(rt,fe(ho))}}),g(li),b(Ke,li)};R(Hd,Ke=>{!le()&&a()!=="ads"&&Ke(_u)})}var Fd=M(Hd,2);let bu=m(()=>!r(pn));Kl(Fd,{get isLive(){return Ne()},get isHidden(){return r(bu)},get isPlaying(){return et()},get position(){return K()},get duration(){return Re()}});var Ms=M(Fd,2);Yf(Ms,{data:Mn});var Ud=M(Ms,2);Fp(Ud,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ke;return(Ke=He())==null?void 0:Ke.focus()},get visible(){return O()},get playerContainerRef(){return r(go)},get controlsContainerRef(){return r(qo)},get position(){return we()},get menuElementRef(){return r(Bo)},set menuElementRef(Ke){B(Bo,fe(Ke))}});var pl=M(Ud,2);{var zd=Ke=>{Ed(Ke,{onClose:cn,onSelectAutoQuality:()=>{Io("auto"),cn()}})};R(pl,Ke=>{r(Gn)&&Ke(zd)})}var qd=M(pl,2);{var Wd=Ke=>{ra(Ke,{})};R(qd,Ke=>{r(Pn)&&Ke(Wd)})}var xa=M(qd,2);{var Kd=Ke=>{Gp(Ke,{})};R(xa,Ke=>{Se()&&Ke(Kd)})}var $u=M(xa,2);{var Qd=Ke=>{Yl(Ke,{})};R($u,Ke=>{De()&&Ke(Qd)})}b(Ee,It)}),b(xe,vi)},$$slots:{default:!0}}),xe=>He(xe),()=>He());var at=M(vn,2);pt(at,xe=>B(Oi,xe),()=>r(Oi)),g(io),pt(io,xe=>B(go,xe),()=>r(go));var Ft=M(io,2);{var Vi=xe=>{var Pt=px();b(xe,Pt)};R(Ft,xe=>{Xe()&&xe(Vi)})}St("mouseenter",io,eo),St("mouseleave",io,xi),St("click",io,Rn,!0),St("focusin",io,Li,!0),b(t,mr),z(),o()}lt(["mousemove","dblclick","contextmenu","click"]);import{clientChecker as Pd,PlaybackState as Sx}from"@vkontakte/videoplayer-core/es2015";import{noop as Cx}from"@vkontakte/videoplayer-shared/es2015";var vx=L('<div></div> <div class="info svelte-nhq2ld"><div class="triangles-wrapper svelte-nhq2ld"><div></div> <div></div> <div></div></div> <p class="step-caption svelte-nhq2ld"> </p></div>',1),gx=L("<div><!></div>"),hx={hash:"svelte-nhq2ld",code:`.double-click-area.svelte-nhq2ld {position:absolute;top:0;height:100%;width:25%;overflow:hidden;}.double-click-area.left.svelte-nhq2ld {left:0;}.double-click-area.right.svelte-nhq2ld {right:0;}.semicircle.svelte-nhq2ld {position:absolute;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);}.semicircle.left.svelte-nhq2ld {left:0;border-top-right-radius:50%;border-bottom-right-radius:50%;}.semicircle.right.svelte-nhq2ld {right:0;border-top-left-radius:50%;border-bottom-left-radius:50%;}.info.svelte-nhq2ld {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center;justify-content:center;}.triangles-wrapper.svelte-nhq2ld {position:relative;display:flex;margin-bottom:10px;justify-content:center;}.triangle.svelte-nhq2ld {width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;
344
+ .video-container.svelte-1czns9r {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.svelte-1czns9r {z-index:var(--video-container-z-index);background:var(--black);}.video-container.svelte-1czns9r {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}.video-container.fast-rotate.svelte-1czns9r {transition:none;}.nocursor.svelte-1czns9r {cursor:none;}`};function _a(t,e){U(e,!0),W(t,ox);let[i,o]=Be(),n=()=>S(v,"$rotateAlpha",i),a=()=>S($,"$playerSize",i),s=()=>S(u,"$playerPhase",i),d=()=>S(p,"$isPlaying$",i),l=f(e,"videoContainer",15),{playerPhase:u,ui:{rotateAlpha:v,playerSize:$},state:{isPlaying$:p}}=Ie(),{isSmoothVideoRotate:_}=zt(),w=m(()=>l()&&n()%180?a().height/a().width:1);var y=ix();let C;y.__contextmenu=function(...E){var P;(P=e.onContextMenu)==null||P.apply(this,E)},y.__mousedown=function(...E){var P;(P=e.onMouseDown)==null||P.apply(this,E)},y.__mouseup=function(...E){var P;(P=e.onMouseUp)==null||P.apply(this,E)},y.__click=function(...E){var P;(P=e.onClick)==null||P.apply(this,E)};var T=h(y);te(T,1,"video-container svelte-1czns9r",null,{},{"fast-rotate":!_}),pt(T,E=>l(E),()=>l()),g(y),k(E=>{C=te(y,1,"video-wrapper svelte-1czns9r",null,C,E),it(T,`transform: rotate(${n()}deg) scale(${r(w)})`),Oe(T,"data-is-playing",d())},[()=>({hidden:s()!=="video",nocursor:e.hideCursor})]),b(t,y),z(),o()}lt(["contextmenu","mousedown","mouseup","click"]);var nx=(t,e,i,o,n,a)=>{t.preventDefault(),e&&(i({message:"double click on video"}),o(),n(a.uiConfig.controls.hideTimeoutCursor))},rx=(t,e,i,o,n,a)=>{if(t.stopPropagation(),e()||o()){a();return}},sx=L("<div><!></div>"),ax=L('<div class="spherical-video-icon svelte-jtgjmv"><!></div>'),lx=L("<div><!></div>"),dx=L('<div class="settings-menu svelte-jtgjmv"><!></div>'),cx=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),ux=L("<!> <!> <!>",1),px=L('<div class="blocked svelte-jtgjmv"></div>'),fx=L('<div class="player-wrapper svelte-jtgjmv"><!> <div class="overlay-container"></div></div> <!>',1),mx={hash:"svelte-jtgjmv",code:".player-wrapper.svelte-jtgjmv {position:absolute;width:100%;height:100%;}.blocked.svelte-jtgjmv {position:absolute;width:100%;height:100%;z-index:var(--overlay-container-z-index);}.player-wrapper.svelte-jtgjmv .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-jtgjmv {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}.ads-container.svelte-jtgjmv {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-jtgjmv {z-index:var(--ads-container-z-index);background:var(--black);}.settings-menu.svelte-jtgjmv {position:absolute;z-index:var(--settings-menu-z-index);bottom:57px;right:18px;left:0;transition:opacity 0.2s, visibility 0.2s;}"};function Tm(t,e){U(e,!0),W(t,mx);let[i,o]=Be(),n=()=>S(Ko,"$notificationsToShow$",i),a=()=>S(Ui,"$playerPhase",i),s=()=>S(pi,"$isLoaderVisible",i),d=()=>S(Xt,"$adPlaybackState",i),l=()=>S(Tt,"$crashed",i),u=()=>S(To,"$isInteractiveTime$",i),v=()=>S(yt,"$settingsMenuVisible",i),$=()=>S(Ai,"$isInteractiveExpectation$",i),p=()=>S(Lt,"$controlsVisible",i),_=()=>S(zo,"$touched",i),w=()=>S(Qn,"$graphIsOpened$",i),y=()=>S(ji,"$isFullscreen",i),C=()=>S(Tr,"$autoplayNextEnabled$",i),T=()=>S(si,"$postrollPassed",i),E=()=>S(zi,"$isEnded$",i),P=()=>S(Qo,"$cursorInside",i),A=()=>S(In,"$fakeIsPlaying$",i),I=()=>S(Xi,"$bottomNoSmooth",i),V=()=>S(Tn,"$interactiveTimeIndicator",i),H=()=>S(Zi,"$playerSize",i),Y=()=>S(Co,"$is3DVideo",i),O=()=>S(X,"$contextMenuVisible$",i),J=()=>S(dt,"$playbackState$",i),ne=()=>S(oo,"$hotKeyMapData",i),Z=()=>S(So,"$scrubbingInProgress",i),me=()=>S(an,"$volumeChangingInProgress",i),le=()=>S(ri,"$chromecastConnected$",i),Ve=()=>S(Ro,"$controlsTimeoutActive",i),Me=()=>S(Rt,"$settingsMenuOpenedByKeyboard",i),be=()=>S(Ao,"$contextMenuOpenedByKeyboard$",i),ae=()=>S(Ar,"$contextMenuButtonRef$",i),Le=()=>S(fr,"$contextMenuOpenedByHotKey$",i),re=()=>S(Mr,"$contextMenuLastActiveElem$",i),N=()=>S(Yi,"$isFullscreenOpenedByKeyboard",i),pe=()=>S(qe,"$language$",i),_e=()=>S(di,"$icon3DVideoVisible",i),Ge=()=>S(fi,"$chromecastDeviceName$",i),ie=()=>S(vo,"$currentSubtitle$",i),G=()=>S(Sn,"$currentSubtitleCaptions$",i),K=()=>S(Ni,"$position$",i),Re=()=>S(Pi,"$duration$",i),Ne=()=>S(ut,"$isLive$",i),et=()=>S(mo,"$isPlaying$",i),we=()=>S(ln,"$contextMenuPosition$",i),Se=()=>S(qi,"$showHotKeyMap",i),De=()=>S(ii,"$debugPanelVisible",i),Xe=()=>S(lr,"$userActionsDisabled$",i),ot=f(e,"videoContainer",15),ft=f(e,"adsSlotId",3,void 0),Je=f(e,"adsParams",3,void 0),gt=f(e,"adsPreviewParam",3,void 0),Et=f(e,"adsAutoplayParam",3,void 0),jt=f(e,"duration",3,void 0),qt=f(e,"logoTargetUrl",3,""),Wt=f(e,"showNextPrevButtons",3,!1),ve=f(e,"nextButtonActive",3,!1),j=f(e,"prevButtonActive",3,!1),Ce=f(e,"endScreenVideoTitle",3,void 0),se=f(e,"endScreenVideoThumb",3,void 0),He=f(e,"isOneVideoPlaylist",3,!1),Ue=f(e,"shadowRootContainer",3,void 0),tt=f(e,"outerContainerRef",3,void 0),ct=f(e,"playerStarted",3,!1),Ye=f(e,"fullScreenTarget",3,void 0),Ze=f(e,"showMiniTimer",3,!1),nt=f(e,"showEndScreen",3,!0),Fe=f(e,"keyboardControls",15),$t=e.store.getLogger().createComponentLog("Root component"),qe=e.store.interfaceLanguage$,dt=e.store.state.playbackState$,Xt=e.store.ads.playbackState,Ni=e.store.state.positionWithScrubbing$,Pi=e.store.state.duration$,Ui=e.store.playerPhase,ji=e.store.ui.isFullscreen,Yi=e.store.ui.isFullscreenOpenedByKeyboard,Lt=e.store.ui.controlsVisible,yt=e.store.ui.settingsMenu.visible$,Rt=e.store.ui.settingsMenu.openedByBtnKeyboard$,So=e.store.ui.scrubbingInProgress,an=e.store.ui.volumeChangingInProgress,X=e.store.ui.contextMenu.visible$,ii=e.store.ui.debugPanelVisible,pi=e.store.state.isLoaderVisible,zi=e.store.state.isEnded$,ri=e.store.state.chromecastConnected$,fi=e.store.state.chromecastDeviceName$,si=e.store.ads.postrollPassed,ut=e.store.state.isLive$,mo=e.store.state.isPlaying$,Tt=e.store.state.crashed$,Kt=e.store.webApi.annotationsApi,oi=e.store.webApi.pictureInPictureApi,vo=e.store.state.currentSubtitle$,Sn=e.store.state.currentSubtitleCaptions$,Zi=e.store.ui.playerSize,Co=e.store.ui.is3DVideo,di=e.store.ui.icon3DVideoVisible,xt=e.store.state.isInteractive,To=e.store.state.isInteractiveTime$,Ai=e.store.state.isInteractiveExpectation$,Si=e.store.state.hasInteractiveBranches,zo=e.store.ui.touched,oo=e.store.ui.modals.hotKeyMap.data,qi=e.store.ui.modals.hotKeyMap.show,Cn=e.store.ui.overlayContainer$,Tn=e.store.ui.controls.interactiveTimeIndicator,Bi=e.store.state.showInteractiveTimeIndicator,ln=e.store.ui.contextMenu.position$,Io=e.store.actions.internal.setQuality,ko=e.store.actions.internal.closeSettingsMenu,Tr=e.store.ui.autoplayNextEnabled$,lr=e.store.ui.userActionsDisabled,{fakeIsPlaying$:In,notifications$:Kn,graphIsOpened$:Qn}=fo(),go=ee(void 0),qo=ee(void 0),kn=ee(void 0),rt=ee(void 0),Wo,dn,En;oo.set(wh());let{closeNotification:dr,notificationsToShow$:Ko}=Kn,Gn=m(()=>!!n().slow_video),cn=()=>dr("slow_video"),Pn=m(()=>(a()==="video"&&s()||a()==="ads"&&d()==="inactive")&&!l()),Oi=ee(void 0),Xi=de(!1),An,Ro=de(!1),Mn=de(),Qo=de(!1),Do=ee(!1),gi=ee(!1),jn=ee(!1),Eo=ee(!(e.autoplay&&!e.uiConfig.controls.showOnStartupAtAutoplay)),cr=m(()=>u()&&!v()&&!(r(Do)||r(gi))&&!(r(jn)&&!$())),un=!0,pn=m(()=>e.uiConfig.features.thumbTimer&&Ze()&&a()==="video"&&!p()&&!l()&&!xt&&(e.uiConfig.hideThumbTimerAfterTouch&&!_()||!e.uiConfig.hideThumbTimerAfterTouch)),ur=m(()=>a()==="video"&&!w()&&y()),Go=ee(!1),Ir=m(()=>(nt()||e.showAutoplayNext&&C())&&!!Ce()&&!!se()&&(e.showAds&&T()||!e.showAds)&&E()&&!l()&&!r(Go)),Ln=m(()=>P()&&!(p()||r(Ir))&&!u()),Yn=ee(!1),pr=m(()=>A()!==null),{toggle:kr}=In,Zn=!1,fn=null;oi==null||oi.setContext(kl());let Xn=()=>{e.autoplay&&!xt&&e.uiConfig.controls.showOnStartupAtAutoplay&&Ci(e.uiConfig.controls.hideTimeout)};e.store.setUiCallbacks({onStarted:Xn});let ci=()=>{window.clearTimeout(Wo),Ro.set(!1)},No=()=>{window.clearTimeout(dn),Mn.set(null)},Ci=xe=>{ci(),Ro.set(!0),Wo=window.setTimeout(()=>Ro.set(!1),xe);let Pt=xe-100;An=window.setTimeout(()=>{I()&&Xi.set(!1)},Pt>0?Pt:xe)},Jn=(xe,Pt)=>{No(),Mn.set(Pt),dn=window.setTimeout(()=>Mn.set(null),xe)},mt=Co.subscribe(xe=>{di.set(xe),xe&&(window.clearTimeout(En),En=window.setTimeout(()=>di.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Ht=()=>kt(this,null,function*(){var Pt,vi,hi,Mo;let xe=bs();if(xe){let ui=Ul(),Ee=st();xe=ui===Ee||ui===Ue()}if(xe){Ci(e.uiConfig.controls.hideTimeoutFullscreen);try{yield oi==null?void 0:oi.remove()}catch(ui){$t({message:String(ui)})}}ji.set(xe),e.store.getAdmanWrapper().setFullscreen(xe),y()?(vi=(Pt=e.store.callbacks)==null?void 0:Pt.onFullscreenEnter)==null||vi.call(Pt):(Mo=(hi=e.store.callbacks)==null?void 0:hi.onFullscreenExit)==null||Mo.call(hi)}),Mi=xe=>{let{width:Pt,height:vi}=xe.target;Zi.set({width:Pt,height:vi})},Po=()=>{let{width:xe,height:Pt}=r(go).getBoundingClientRect();Zi.set({width:xe,height:Pt})};Ut(()=>{var Pt;return Lc(Ht),e.uiConfig.features.annotationsInside&&(Kt==null||Kt.init(r(go))),ea(oi)&&(oi==null||oi.assignPlayerContainer(r(go)),oi==null||oi.registryExternalEventHandlers({resize:Mi,leavepictureinpicture:Po})),e.interactiveContainer&&((Pt=ot().parentElement)==null||Pt.insertBefore(e.interactiveContainer,ot().nextSibling)),()=>{window.clearTimeout(Wo),window.clearTimeout(An),window.clearTimeout(dn),window.clearTimeout(En),mt(),oi==null||oi.dispose().catch(vi=>{$t({message:String(vi)})}),Vc(Ht)}});let st=()=>{let xe=e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!tt()?r(go):tt(),Pt=xe.getRootNode(),vi=Pt instanceof ShadowRoot?Pt.host:Pt,hi=Ye()instanceof HTMLElement&&Ye().contains(vi);return e.uiConfig.allowChangingFullscreenTarget&&Ye()&&hi?Ye():xe},Qt=()=>kt(this,null,function*(){bs()?(yield Mc(document),$t({message:"exit fullscreen"})):($t({message:"request fullscreen"}),yield Ac(st()))}),mi=()=>{ko(),X.set(!1)},Ji=xe=>{w()||(xe.preventDefault(),X.set(!0),ln.set({left:xe.clientX,top:xe.clientY}))};function eo(){Qo.set(!0),xt||Ci(e.uiConfig.controls.hideTimeoutCursor)}function Li(){xt||(Xi.set(!0),Ci(e.uiConfig.controls.hideTimeoutCursor))}function xi(){Qo.set(!1),B(gi,!1),B(Do,!1),Zn=!1,e.store.actions.internal.releaseCamera(),Ci(e.uiConfig.controls.hideTimeout)}function to(xe){return xe?xe.offsetTop+to(xe.offsetParent):0}function wi(xe){return xe?xe.offsetLeft+wi(xe.offsetParent):0}function no(xe){if(V()&&Bi){let Pt=xe.currentTarget,vi=to(Pt),hi=wi(Pt),Mo=xe.pageX-hi,ui=xe.pageY-vi,{left:Ee,bottom:It,right:ei}=V(),Ti=ei-Ee;return Mo>=Ee-Ti&&ui<=It+Ti}}function Wi(xe){if(r(go)){let Pt=to(xe.currentTarget),vi=H().height,hi=xe.pageY-Pt;if(no(xe)){B(gi,!1);return}hi<40?B(gi,!0):hi>vi-40?B(Do,!0):(B(gi,!1),v()||B(Do,!1))}}function mn(xe){Wi(xe),r(cr)||Ci(e.uiConfig.controls.hideTimeoutCursor),Y()&&Zn&&fn&&e.store.actions.internal.moveCameraFocusPX(fn.clientX-xe.clientX,fn.clientY-xe.clientY,xe.timeStamp-fn.timeStamp),fn=xe}let er=xe=>{xe.preventDefault(),xe.button===0&&(Zn=!0,e.store.actions.internal.holdCamera()),Ci(e.uiConfig.controls.hideTimeoutCursor)},tr=xe=>{xe.preventDefault(),xe.button===0&&(fn=xe,Zn=!1,e.store.actions.internal.releaseCamera()),Ci(e.uiConfig.controls.hideTimeoutCursor)},Er=xe=>{var Pt;if(xe.preventDefault(),O()||v()){mi();return}if(!(E()&&!Si)){if(r(pr))return kr();if((Pt=Fe())==null||Pt.focus(),!ct()){e.firstStart(),Ci(e.uiConfig.controls.hideTimeoutCursor);return}(!e.uiConfig.preventPauseOnVideoClick||J()!==S1.PLAYING)&&e.store.actions.internal.togglePlay(),Ci(e.uiConfig.controls.hideTimeoutCursor)}},Pr=xe=>{mi(),zo.set(!0),Ci(e.uiConfig.controls.hideTimeout),xe&&Jn(e.uiConfig.controls.hideHotKeyHelpers,xe)},Vn=()=>{var xe,Pt;mi(),(xe=e.store.callbacks)!=null&&xe.onOpenHotKeyMap?(Pt=e.store.callbacks)==null||Pt.onOpenHotKeyMap(ne()):qi.update(vi=>!vi)},Rn=()=>{zo.set(!0)},Ao=e.store.ui.contextMenu.openedByBtnKeyboard$,Ar=e.store.ui.contextMenu.btnRef$,Bo=ee(void 0),fr=e.store.ui.contextMenu.openedByHotKey$,Mr=e.store.ui.contextMenu.lastActiveElem$;We(()=>{Cn.set(r(Oi))}),We(()=>{B(jn,fe(r(Eo)&&J()!==S1.PLAYING)),r(Eo)||bt(()=>B(Eo,!0))}),We(()=>{Lt.set((r(jn)||E()||v()||Z()||me()||le()||Ve())&&!r(cr)&&(a()==="video"||a()==="ads")&&!l())}),We(()=>{!Z()&&r(Yn)&&!u()&&Ci(e.uiConfig.controls.hideTimeoutCursor),bt(()=>B(Yn,fe(Z())))}),We(()=>{r(rt),v(),Me(),bt(()=>ja(r(rt),v(),Me()))}),We(()=>{r(Bo),O(),be(),bt(()=>ja(r(Bo),O(),be()))}),We(()=>{let xe=ae();xe&&(O(),bt(()=>Ga(xe,O(),Ao)))}),We(()=>{r(Bo),O(),Le(),bt(()=>ja(r(Bo),O(),Le()))}),We(()=>{let xe=re();xe&&(O(),bt(()=>Eh(xe,O(),fr)))}),We(()=>{var xe;!N()&&y()&&(bt(()=>Yi.set(!1)),(xe=Fe())==null||xe.focus())}),We(()=>{w()&&mi()});let Lr=F("video360");var mr=fx();St("blur",Us,mi);var io=ue(mr);io.__mousemove=mn,io.__dblclick=[nx,un,$t,Qt,Ci,e];var vn=h(io);let qr=m(()=>a()==="ads"),vr=m(()=>r(pr)?kr:void 0);pt(Wp(vn,{toggleFullscreen:Qt,hideContextMenu:mi,showHotKeyHelpers:Pr,showKeyMap:Vn,get isAds(){return r(qr)},get fakePlayButtonHandler(){return r(vr)},get nextButtonActive(){return ve()},get prevButtonActive(){return j()},children:(xe,Pt)=>{var vi=ux(),hi=ue(vi);_a(hi,{get hideCursor(){return r(Ln)},onClick:Er,onContextMenu:Ji,onMouseDown:er,onMouseUp:tr,get videoContainer(){return ot()},set videoContainer(Ee){ot(Ee)}});var Mo=M(hi,2);Gs(Mo,()=>"slot",!1,(Ee,It)=>{ke(Ee,null,{name:ha})});var ui=M(Mo,2);Qs(ui,pe,Ee=>{var It=cx(),ei=ue(It);let Ti=m(()=>a()!=="thumb"||l()||xt&&e.autoplay);ma(ei,{get hidden(){return r(Ti)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var ni=M(ei,2);Cm(ni,{});var jo=M(ni,2);{var gn=Ke=>{let li=m(()=>{var Yo;return(Yo=e.live)==null?void 0:Yo.startTime});Cd(Ke,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(li)}})};R(jo,Ke=>{a()==="LiveWaitingStart"&&Ke(gn)})}var Vr=M(jo,2);{var Dn=Ke=>{va(Ke,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(Vr,Ke=>{a()==="LiveWaitingRecover"&&Ke(Dn)})}var Wr=M(Vr,2);{var ba=Ke=>{va(Ke,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Wr,Ke=>{a()==="LiveWaitingRecord"&&Ke(ba)})}var Es=M(Wr,2);{var ll=Ke=>{var li=sx();let Yo;var Ls=h(li);zl(Ls,{get adsSlotId(){return ft()},get adsParams(){return Je()},get adsPreviewParam(){return gt()},get adsAutoplayParam(){return Et()},get duration(){return jt()}}),g(li),k(ho=>Yo=te(li,1,"ads-container svelte-jtgjmv",null,Yo,ho),[()=>({hidden:a()!=="ads"})]),b(Ke,li)};R(Es,Ke=>{e.showAds&&ct()&&Ke(ll)})}var $a=M(Es,2);{var dl=Ke=>{let li=m(()=>!nt()&&e.showAutoplayNext&&C());Up(Ke,{get title(){return Ce()},get thumb(){return se()},get isHide(){return r(li)},clickCloseIcon:()=>B(Go,!0)})};R($a,Ke=>{r(Ir)&&Ce()&&se()&&Ke(dl)})}var Ps=M($a,2);{var cl=Ke=>{let li=m(()=>!p());em(Ke,{get title(){return e.title},get isHidden(){return r(li)}})};R(Ps,Ke=>{r(ur)&&Ke(cl)})}var ir=M(Ps,2);{var ya=Ke=>{let li=m(()=>a()==="video"&&p());xd(Ke,{get isShifted(){return r(li)}})};R(ir,Ke=>{Y()&&Ke(ya)})}var As=M(ir,2);{var _t=Ke=>{var li=ax(),Yo=h(li);Fl(Yo,{"aria-label":Lr}),g(li),b(Ke,li)};R(As,Ke=>{_e()&&Ke(_t)})}var ht=M(As,2);{var ro=Ke=>{wd(Ke,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return Ge()}})};R(ht,Ke=>{le()&&Ke(ro)})}var Oo=M(ht,2);{var so=Ke=>{fa(Ke,{get shifted(){return p()},get captions(){return G()},get position(){return K()},get playerSize(){return H()}})};R(Oo,Ke=>{ie().value!=="off"&&Ke(so)})}var ai=M(Oo,2);{var Hi=Ke=>{var li=lx();li.__contextmenu=Ji,li.__click=[rx,O,X,v,yt,mi];var Yo=h(li);Sd(Yo,{}),g(li),b(Ke,li)};R(ai,Ke=>{l()&&Ke(Hi)})}var ds=M(ai,2);{var ul=Ke=>{let li=m(()=>a()==="thumb"||a()==="LiveWaitingStart"||a()==="LiveWaitingRecover"||a()==="LiveWaitingRecord"),Yo=m(()=>a()==="ads"),Ls=m(()=>e.canRewindLive&&Re()!==0);yd(Ke,{get bottomHidden(){return r(li)},get bottomNoSmooth(){return I()},get showControls(){return p()},get isAds(){return r(Yo)},get canRewindLive(){return r(Ls)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return qt()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Wt()},get nextButtonActive(){return ve()},get prevButtonActive(){return j()},get isOneVideoPlaylist(){return He()},customFullscreenSupported:un,toggleFullscreen:Qt,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},get playerControlsWrapperRef(){return r(qo)},set playerControlsWrapperRef(ho){B(qo,fe(ho))},get playerControlsRef(){return r(kn)},set playerControlsRef(ho){B(kn,fe(ho))}})};R(ds,Ke=>{ct()&&Ke(ul)})}var Hd=M(ds,2);{var _u=Ke=>{var li=dx(),Yo=h(li);let Ls=m(()=>{var ho;return(ho=r(kn))==null?void 0:ho.clientHeight});kd(Yo,{get supportLink(){return e.supportLink},get playerControlsHeight(){return r(Ls)},returnFocus:()=>{var ho;return(ho=Fe())==null?void 0:ho.focus()},get ref(){return r(rt)},set ref(ho){B(rt,fe(ho))}}),g(li),b(Ke,li)};R(Hd,Ke=>{!le()&&a()!=="ads"&&Ke(_u)})}var Fd=M(Hd,2);let bu=m(()=>!r(pn));Kl(Fd,{get isLive(){return Ne()},get isHidden(){return r(bu)},get isPlaying(){return et()},get position(){return K()},get duration(){return Re()}});var Ms=M(Fd,2);Yf(Ms,{data:Mn});var Ud=M(Ms,2);Fp(Ud,{get supportLink(){return e.supportLink},returnFocus:()=>{var Ke;return(Ke=Fe())==null?void 0:Ke.focus()},get visible(){return O()},get playerContainerRef(){return r(go)},get controlsContainerRef(){return r(qo)},get position(){return we()},get menuElementRef(){return r(Bo)},set menuElementRef(Ke){B(Bo,fe(Ke))}});var pl=M(Ud,2);{var zd=Ke=>{Ed(Ke,{onClose:cn,onSelectAutoQuality:()=>{Io("auto"),cn()}})};R(pl,Ke=>{r(Gn)&&Ke(zd)})}var qd=M(pl,2);{var Wd=Ke=>{ra(Ke,{})};R(qd,Ke=>{r(Pn)&&Ke(Wd)})}var xa=M(qd,2);{var Kd=Ke=>{Gp(Ke,{})};R(xa,Ke=>{Se()&&Ke(Kd)})}var $u=M(xa,2);{var Qd=Ke=>{Yl(Ke,{})};R($u,Ke=>{De()&&Ke(Qd)})}b(Ee,It)}),b(xe,vi)},$$slots:{default:!0}}),xe=>Fe(xe),()=>Fe());var at=M(vn,2);pt(at,xe=>B(Oi,xe),()=>r(Oi)),g(io),pt(io,xe=>B(go,xe),()=>r(go));var Ft=M(io,2);{var Vi=xe=>{var Pt=px();b(xe,Pt)};R(Ft,xe=>{Xe()&&xe(Vi)})}St("mouseenter",io,eo),St("mouseleave",io,xi),St("click",io,Rn,!0),St("focusin",io,Li,!0),b(t,mr),z(),o()}lt(["mousemove","dblclick","contextmenu","click"]);import{clientChecker as Pd,PlaybackState as Sx}from"@vkontakte/videoplayer-core/es2015";import{noop as Cx}from"@vkontakte/videoplayer-shared/es2015";var vx=L('<div></div> <div class="info svelte-nhq2ld"><div class="triangles-wrapper svelte-nhq2ld"><div></div> <div></div> <div></div></div> <p class="step-caption svelte-nhq2ld"> </p></div>',1),gx=L("<div><!></div>"),hx={hash:"svelte-nhq2ld",code:`.double-click-area.svelte-nhq2ld {position:absolute;top:0;height:100%;width:25%;overflow:hidden;}.double-click-area.left.svelte-nhq2ld {left:0;}.double-click-area.right.svelte-nhq2ld {right:0;}.semicircle.svelte-nhq2ld {position:absolute;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);}.semicircle.left.svelte-nhq2ld {left:0;border-top-right-radius:50%;border-bottom-right-radius:50%;}.semicircle.right.svelte-nhq2ld {right:0;border-top-left-radius:50%;border-bottom-left-radius:50%;}.info.svelte-nhq2ld {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex;flex-direction:column;align-items:center;justify-content:center;}.triangles-wrapper.svelte-nhq2ld {position:relative;display:flex;margin-bottom:10px;justify-content:center;}.triangle.svelte-nhq2ld {width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;
345
345
  animation: svelte-nhq2ld-blink 500ms infinite;opacity:0;}.triangle.right.svelte-nhq2ld:nth-child(1),
346
346
  .triangle.left.svelte-nhq2ld:nth-child(3) {animation-delay:0ms;}.triangle.right.svelte-nhq2ld:nth-child(2),
347
347
  .triangle.left.svelte-nhq2ld:nth-child(2) {animation-delay:100ms;}.triangle.right.svelte-nhq2ld:nth-child(3),
@@ -358,7 +358,7 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
358
358
  opacity: 0;
359
359
  }
360
360
  }.triangle.left.svelte-nhq2ld {border-right:8px solid var(--white);}.triangle.right.svelte-nhq2ld {border-left:8px solid var(--white);}.triangle.svelte-nhq2ld:not(:last-child) {margin-right:5px;}.step-caption.svelte-nhq2ld {margin:0;text-align:center;font-size:12px;line-height:1;color:var(--white);}`};function au(t,e){U(e,!0),W(t,hx);let i=f(e,"seekStep",3,0),o=ee(!1),n=0,a=0,s=ee(fe(i())),d=$=>{$.stopPropagation(),a+=1,B(s,i()*(a-1)),a===1?e.handleSingleFirstClick($):(B(o,!0),e.handleSecondClick()),window.clearTimeout(n),n=window.setTimeout(()=>{a=0,B(o,!1)},300)};yn(()=>{window.clearTimeout(n)});var l=gx();l.__click=d;var u=h(l);{var v=$=>{var p=vx(),_=ue(p),w=M(_,2),y=h(w),C=h(y),T=M(C,2),E=M(T,2);g(y);var P=M(y,2),A=h(P,!0);g(P),g(w),k(I=>{var V,H,Y,O;te(_,1,`semicircle ${(V=e.side)!=null?V:""}`,"svelte-nhq2ld"),te(C,1,`triangle ${(H=e.side)!=null?H:""}`,"svelte-nhq2ld"),te(T,1,`triangle ${(Y=e.side)!=null?Y:""}`,"svelte-nhq2ld"),te(E,1,`triangle ${(O=e.side)!=null?O:""}`,"svelte-nhq2ld"),ge(A,I)},[()=>F("doubletap_seek_step",{seconds:r(s).toFixed(0)})]),b($,p)};R(u,$=>{r(o)&&$(v)})}g(l),k(()=>{var $;return te(l,1,`double-click-area ${($=e.side)!=null?$:""}`,"svelte-nhq2ld")}),b(t,l),z()}lt(["click"]);var _x=(t,e,i)=>{e(!1),i()},bx=L('<div class="overlay svelte-1qdxi6t"></div> <div class="next-video svelte-1qdxi6t"><div class="top svelte-1qdxi6t"><div class="caption svelte-1qdxi6t"> </div> <!></div> <div class="row svelte-1qdxi6t"><div class="column svelte-1qdxi6t"><div class="thumb svelte-1qdxi6t"><div></div> <!></div></div> <div class="column svelte-1qdxi6t"><div class="title svelte-1qdxi6t"> </div></div></div></div>',1),$x={hash:"svelte-1qdxi6t",code:".overlay.svelte-1qdxi6t {width:100%;height:100%;background:rgba(0, 0, 0, 0.72);position:absolute;}.next-video.svelte-1qdxi6t {position:absolute;top:50%;left:50%;z-index:var(--end-screen-mobile-z-index);transform:translate(-50%, -50%);display:flex;flex-direction:column;max-width:362px;min-width:320px;margin:0 auto;padding-bottom:12px;}.top.svelte-1qdxi6t {display:flex;justify-content:space-between;}.caption.svelte-1qdxi6t {font-size:11px;font-weight:bold;color:var(--white);text-transform:uppercase;opacity:0.8;}.row.svelte-1qdxi6t {height:102px;background:rgba(48, 48, 48, .8);cursor:pointer;margin-top:6px;display:flex;flex-direction:row;width:100%;}.column.svelte-1qdxi6t {display:flex;flex-direction:column;flex-basis:50%;}.thumb.svelte-1qdxi6t {width:100%;height:100%;background:no-repeat center;background-size:cover;display:flex;align-items:center;position:relative;justify-content:space-around;}.thumb-overlay.svelte-1qdxi6t {width:100%;height:100%;position:absolute;}.thumb-overlay.withOpacity.svelte-1qdxi6t {background:var(--black);opacity:0.3;}.title.svelte-1qdxi6t {padding:10px 16px;font-size:12px;font-weight:bold;color:var(--white);line-height:1.6;max-height:52px;overflow:hidden;}"};function Im(t,e){U(e,!0),W(t,$x);let[i,o]=Be(),n=()=>S(d,"$autoplayNextEnabled$",i),a=()=>S(l,"$timerNextVideoRunning$",i),s=Ie(),d=s.ui.autoplayNextEnabled$,l=s.ui.timerNextVideoRunning$,u=s.actions.internal.nextVideoClick,v=s.actions.internal.nextVideoAnnouncementShow,$=s.actions.internal.nextVideoAnnouncementClick,p=s.actions.internal.nextVideoAnnouncementAuto,_=s.actions.internal.nextVideoAnnouncementCancel,w=()=>{u(!1),p()},y=()=>{e.clickCloseIcon(),_()};Ut(()=>{e.isHide||v(),e.isHide&&n()&&(u(!1),p())});var C=ze(),T=ue(C);{var E=P=>{var A=bx(),I=M(ue(A),2),V=h(I),H=h(V),Y=h(H,!0);g(H);var O=M(H,2);oa(O,{onClick:y}),g(V);var J=M(V,2);J.__click=[_x,u,$];var ne=h(J),Z=h(ne),me=h(Z);let le;var Ve=M(me,2);{var Me=re=>{Zl(re,{get isRunning(){return a()},onTimerEnded:w})};R(Ve,re=>{n()&&re(Me)})}g(Z),g(ne);var be=M(ne,2),ae=h(be),Le=h(ae,!0);g(ae),g(be),g(J),g(I),k((re,N)=>{ge(Y,re),it(Z,`background-image: url('${e.thumb}')`),le=te(me,1,"thumb-overlay svelte-1qdxi6t",null,le,N),ge(Le,e.title)},[()=>n()?F("end_screen_next_video"):F("end_screen_recommended_video"),()=>({withOpacity:n()})]),b(P,A)};R(T,P=>{e.isHide||P(E)})}b(t,C),z(),o()}lt(["click"]);import{clientChecker as yx}from"@vkontakte/videoplayer-core/es2015";var C1=({getFullscreenTarget:t,fullScreenChangeHandler:e})=>{let i=null,o;Ut(()=>{yx.device.isIOS&&(o=setTimeout(()=>{let a=t().querySelector("video");if(!a)return;let s=()=>e(!0),d=()=>e(!1);a.addEventListener("webkitbeginfullscreen",s),a.addEventListener("webkitendfullscreen",d),i=()=>{a.removeEventListener("webkitbeginfullscreen",s),a.removeEventListener("webkitendfullscreen",d)}},0))}),yn(()=>{i==null||i(),clearTimeout(o)})};import{VideoFormat as xx}from"@vkontakte/videoplayer-core/es2015";var lu=class{constructor(e){this.video=e}getTracksArray(){return Array.from(this.video.getElementsByTagName("track"))}attach(e,i=!1){let o=document.createElement("track");o.setAttribute("src",e.url),o.setAttribute("id",e.id),e.label&&o.setAttribute("label",e.label),e.language&&o.setAttribute("srclang",e.language),i&&(o.track.mode="showing"),this.video.appendChild(o)}detachAll(){for(let e of this.getTracksArray())this.video.removeChild(e)}updateSrc(e){let i=this.getTracksArray().find(o=>o.id===e.id);i&&(i.src=e.url)}getCurrentShowingId(){var e,i;return(i=(e=this.getTracksArray().find(o=>o.track.mode==="showing"))==null?void 0:e.id)!=null?i:null}};import{clientChecker as wx}from"@vkontakte/videoplayer-core/es2015";var T1=({store:t,getFullscreenTarget:e})=>{let{isFullscreen:i}=t.ui,{setSubtitle:o}=t.actions.internal,{currentSubtitle$:n,availableSubtitlesList$:a,currentFormat$:s,availableTextTracks$:d}=t.state,l=null,u=()=>e().querySelector("video"),v=()=>wx.device.isIOS&&Te(s)===xx.DASH_LIVE_CMAF,$=()=>{l==null||l(),l=null},p=_=>{if($(),!v()||!_)return;let w=u();if(!w)return;let y=new lu(w),C=Te(d),T=Te(a),E=Te(n);for(let I of C)T.some(H=>H.value===I.id)&&y.attach(I,E.value===I.id);let P=d.subscribe(I=>{for(let V of I)y.updateSrc(V)}),A=()=>{let I=y.getCurrentShowingId();o(Te(a).find(V=>V.value===I))};w.textTracks.addEventListener("change",A),l=()=>{P(),y.detachAll(),w.textTracks.removeEventListener("change",A)}};Ut(()=>i.subscribe(p)),yn($)};var Tx=(t,e,i,o)=>{if(t.stopPropagation(),e()){o();return}},Ix=L("<!> <!>",1),kx=L("<div><!></div>"),Ex=L('<div class="spherical-video-icon svelte-dtyj47"><!></div>'),Px=L("<div><!></div>"),Ax=L('<div class="settings-mobile svelte-dtyj47"><!></div>'),Mx=L("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),Lx=L('<div class="player-wrapper svelte-dtyj47" role="region" tabindex="-1"><!> <!> <!> <div class="overlay-container"></div></div>'),Vx={hash:"svelte-dtyj47",code:`.player-wrapper.svelte-dtyj47 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-dtyj47 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.spherical-video-icon.svelte-dtyj47 {display:inline-block;position:absolute;top:calc(50% - 23px);left:calc(50% - 38px);}
361
- .ads-container.svelte-dtyj47 {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-dtyj47 {z-index:var(--ads-container-z-index);background:var(--black);}.settings-mobile.svelte-dtyj47 {position:absolute;z-index:var(--settings-menu-z-index);top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;max-width:320px;width:90%;}`};function km(t,e){var Mi,Po;U(e,!0),W(t,Vx);let[i,o]=Be(),n=()=>S(He,"$playerPhase",i),a=()=>S(Yi,"$isLoaderVisible",i),s=()=>S(Ye,"$adPlaybackState",i),d=()=>S(fi,"$crashed",i),l=()=>S(rt,"$notificationsToShow$",i),u=()=>S(ct,"$playbackState$",i),v=()=>S(Oe,"$graphIsOpened$",i),$=()=>S(dt,"$interactiveHideMobileControls",i),p=()=>S(Lt,"$isEnded$",i),_=()=>S(xt,"$isInteractiveExpectation$",i),w=()=>S(qe,"$controlsVisible",i),y=()=>S(Si,"$touched",i),C=()=>S(oo,"$autoplayNextEnabled$",i),T=()=>S(So,"$postrollPassed",i),E=()=>S(En,"$bottomNoSmooth",i),P=()=>S(mo,"$videoSize",i),A=()=>S(vo,"$playerSize",i),I=()=>S($t,"$isFullscreen",i),V=()=>S(Ze,"$position$",i),H=()=>S(nt,"$duration$",i),Y=()=>S(qi,"$loadedMetadata",i),O=()=>S(Xt,"$settingsMenuVisible",i),J=()=>S(Pi,"$scrubbingInProgress",i),ne=()=>S(Ui,"$volumeChangingInProgress",i),Z=()=>S(yt,"$chromecastConnected$",i),me=()=>S(di,"$isInteractiveTime$",i),le=()=>S(zi,"$isActiveLive",i),Ve=()=>S(Ni,"$settingsMenuOpenedByKeyboard",i),Me=()=>S(tt,"$language$",i),be=()=>S(Ai,"$disabledControls$",i),ae=()=>S(Sn,"$is3DVideo",i),Le=()=>S(Zi,"$icon3DVideoVisible",i),re=()=>S(Rt,"$chromecastDeviceName$",i),N=()=>S(Tt,"$currentSubtitle$",i),pe=()=>S(Kt,"$currentSubtitleCaptions$",i),_e=()=>S(oi,"$realDuration$",i),Ge=()=>S(ii,"$isLive$",i),ie=()=>S(pi,"$isPlaying$",i),G=()=>S(ji,"$debugPanelVisible",i),K=f(e,"videoContainer",15),Re=f(e,"adsSlotId",3,void 0),Ne=f(e,"adsParams",3,void 0),et=f(e,"adsPreviewParam",3,void 0),we=f(e,"adsAutoplayParam",3,void 0),Se=f(e,"duration",3,void 0),De=f(e,"logoTargetUrl",3,""),Xe=f(e,"showNextPrevButtons",3,!1),ot=f(e,"nextButtonActive",3,!1),ft=f(e,"prevButtonActive",3,!1),Je=f(e,"endScreenVideoTitle",3,void 0),gt=f(e,"endScreenVideoThumb",3,void 0),Et=f(e,"isOneVideoPlaylist",3,!1),jt=f(e,"shadowRootContainer",3,void 0),qt=f(e,"outerContainerRef",3,void 0),Wt=f(e,"showMiniTimer",3,!1),ve=f(e,"fullScreenTarget",3,void 0),j=f(e,"playerStarted",3,!1),Ce=f(e,"showEndScreen",3,!0),{notifications$:se,graphIsOpened$:Oe}=fo(),Ue=e.store.getLogger().createComponentLog("Root component"),tt=e.store.interfaceLanguage$,ct=e.store.state.playbackState$,Ye=e.store.ads.playbackState,Ze=e.store.state.positionWithScrubbing$,nt=e.store.state.duration$,He=e.store.playerPhase,$t=e.store.ui.isFullscreen,qe=e.store.ui.controlsVisible,dt=e.store.ui.interactiveHideMobileControls,Xt=e.store.ui.settingsMenu.visible$,Ni=e.store.ui.settingsMenu.openedByBtnKeyboard$,Pi=e.store.ui.scrubbingInProgress,Ui=e.store.ui.volumeChangingInProgress,ji=e.store.ui.debugPanelVisible,Yi=e.store.state.isLoaderVisible,Lt=e.store.state.isEnded$,yt=e.store.state.chromecastConnected$,Rt=e.store.state.chromecastDeviceName$,So=e.store.ads.postrollPassed,an=e.store.ui.mobileUnmuteButtonExpanded,X=e.store.ui.mobileUnmuteButtonVisible,ii=e.store.state.isLive$,pi=e.store.state.isPlaying$,zi=e.store.state.isActiveLive$,ri=e.store.state.isRewindableLive$,fi=e.store.state.crashed$,si=e.store.webApi.annotationsApi,ut=e.store.webApi.pictureInPictureApi,mo=e.store.state.videoSize$,Tt=e.store.state.currentSubtitle$,Kt=e.store.state.currentSubtitleCaptions$,oi=e.store.state.duration$,vo=e.store.ui.playerSize,Sn=e.store.ui.is3DVideo,Zi=e.store.ui.icon3DVideoVisible,Co=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,xt=e.store.state.isInteractiveExpectation$,To=e.store.state.hasInteractiveBranches,Ai=e.store.ui.controls.disabledControls$,Si=e.store.ui.touched,zo=e.store.ui.overlayContainer$,oo=e.store.ui.autoplayNextEnabled$,qi=e.store.state.loadedMetadata$,Cn=e.store.actions.internal.closeSettingsMenu,Tn=(Mi=e.store.callbacks)==null?void 0:Mi.onDisabledPlayPrevChapterClick,Bi=(Po=e.store.callbacks)==null?void 0:Po.onDisabledSeekToInteractiveClick,ln=e.store.actions.internal.setQuality,Io=ee(void 0),ko=ee(void 0),Tr=ee(void 0),lr=ee(void 0),In,Kn,Qn,go=m(()=>(n()==="video"&&a()||n()==="ads"&&s()==="inactive")&&!d()),qo=ee(void 0),{closeNotification:kn,notificationsToShow$:rt}=se,Wo=m(()=>!!l().slow_video),dn=()=>kn("slow_video"),En=de(!1),dr,Ko=ee(!1),Gn=m(()=>u()!==Sx.PLAYING),cn=ee(!1),Pn=m(()=>v()||$()||!r(Ko)&&(p()&&!!To||r(Gn)&&_())),Oi=ee(!0),Xi=m(()=>e.uiConfig.features.thumbTimer&&Wt()&&n()==="video"&&!w()&&!d()&&!Co&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),An=ee(!1),Ro=m(()=>(Ce()||e.showAutoplayNext&&C())&&!!Je()&&!!gt()&&(e.showAds&&T()||!e.showAds)&&p()&&!d()&&!r(An)),Mn=ee(!1);ut==null||ut.setContext(kl());let Qo=st=>{clearTimeout(Kn),st&&(X.set(!0),an.set(!0),Kn=setTimeout(()=>{an.set(!1)},e.uiConfig.controls.collapseMobileUnmute),Co||gi(e.uiConfig.controls.hideTimeoutMobile))};e.store.setUiCallbacks({onStarted:Qo});let Do=()=>{clearTimeout(In),B(Ko,!1),$()&&dt.set(!1)},gi=st=>{Do(),B(Ko,!0),In=setTimeout(()=>B(Ko,!1),st);let Qt=st-100;dr=setTimeout(()=>{E()&&En.set(!1)},Qt>0?Qt:st)},jn=Sn.subscribe(st=>{Zi.set(st),st&&(clearTimeout(Qn),Qn=setTimeout(()=>Zi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Eo=(...Qt)=>kt(this,[...Qt],function*(st=bs()){var mi,Ji,eo,Li,xi,to;if(st&&!Pd.device.isIOS){let wi=Ul(),no=Go(),Wi=Pd.browser.isSamsungBrowser&&wi===jt();st=wi===no||Wi}if(st){gi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield ut==null?void 0:ut.remove()}catch(wi){Ue({message:String(wi)})}try{let wi=(mi=P())!=null&&mi.width&&((Ji=P())!=null&&Ji.height)?P():A();yield yh(wi)}catch(wi){Ue({message:String(wi)})}}$t.set(st),e.store.getAdmanWrapper().setFullscreen(st),I()?(Li=(eo=e.store.callbacks)==null?void 0:eo.onFullscreenEnter)==null||Li.call(eo):(to=(xi=e.store.callbacks)==null?void 0:xi.onFullscreenExit)==null||to.call(xi)}),cr=st=>{let Qt=st;vo.set({width:Qt.target.width,height:Qt.target.height})};Ut(()=>{var st;return Lc(Eo),e.uiConfig.features.annotationsInside&&(si==null||si.init(r(Io))),ea(ut)&&(ut==null||ut.assignPlayerContainer(r(Io)),ut==null||ut.registryExternalEventHandlers({resize:cr})),B(Oi,!Pd.device.isIphoneOrOldIpad),e.interactiveContainer&&((st=K().parentElement)==null||st.insertBefore(e.interactiveContainer,K().nextSibling)),()=>{clearTimeout(In),clearTimeout(dr),clearTimeout(Kn),clearTimeout(Qn),jn(),ut==null||ut.dispose().catch(Qt=>{Ue({message:String(Qt)})}),Vc(Eo)}});let un=ee(!0),pn=ee(!0),ur=st=>{let Qt=V()+(st==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Qt<0?(B(un,!1),Qt=0):Qt>=H()&&(B(pn,!1),Qt=H()),B(cn,!0),e.seekTime(Qt)},Go=()=>{let st=Pd.device.isIOS||e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!qt()?r(Io):qt(),Qt=st.getRootNode(),mi=Qt instanceof ShadowRoot?Qt.host:Qt,Ji=ve()instanceof HTMLElement&&ve().contains(mi);return e.uiConfig.allowChangingFullscreenTarget&&ve()&&Ji?ve():st},Ir=()=>kt(this,null,function*(){try{if(bs())yield Mc(document),Ue({message:"exit fullscreen"});else{if(Ue({message:"request fullscreen"}),Pd.device.isIOS&&!Y())return;yield Ac(Go())}}catch(st){Ue({message:String(st)})}}),Ln=()=>{Cn()},Yn=st=>{if(st.preventDefault(),O()){Ln();return}if(!j()){e.firstStart(),gi(e.uiConfig.controls.hideTimeoutCursor);return}B(cn,!1),w()?Do():gi(e.uiConfig.controls.hideTimeoutMobile)},pr=()=>{Si.set(!0)},kr=()=>{Co||(En.set(!0),gi(e.uiConfig.controls.hideTimeoutCursor))},Zn=st=>{Tn&&(Tn(st),gi(e.uiConfig.controls.hideTimeoutMobile))},fn=st=>{Bi&&(Bi(st),gi(e.uiConfig.controls.hideTimeoutMobile))};We(()=>{zo.set(r(qo))}),We(()=>{qe.set((r(Gn)||O()||J()||ne()||Z()||!r(Ro)&&(p()||r(Ko)&&!r(cn)))&&!r(Pn)&&n()==="video"&&!d())}),We(()=>{!J()&&r(Mn)&&!me()&&gi(e.uiConfig.controls.hideTimeoutMobile),B(Mn,fe(J()))}),We(()=>{B(un,V()>0),B(pn,fe(!le()&&V()<H()))}),We(()=>{ja(r(lr),O(),Ve())});let Xn=F("aria_label_video_player"),ci=F("video360");C1({fullScreenChangeHandler:Eo,getFullscreenTarget:Go}),T1({store:e.store,getFullscreenTarget:Go});var No=Lx();St("blur",Us,Ln),Fe(No,"aria-label",Xn);var Ci=h(No);_a(Ci,{onClick:Yn,get videoContainer(){return K()},set videoContainer(st){K(st)}});var Jn=M(Ci,2);Gs(Jn,()=>"slot",!1,(st,Qt)=>{ke(st,null,{name:ha})});var mt=M(Jn,2);Qs(mt,Me,st=>{var Qt=Mx(),mi=ue(Qt);let Ji=m(()=>n()!=="thumb"||d()||Co&&e.autoplay);ma(mi,{get hidden(){return r(Ji)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var eo=M(mi,2);{var Li=Ee=>{var It=Ix(),ei=ue(It);{var Ti=gn=>{let Vr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);au(gn,{side:"left",get seekStep(){return r(Vr)},handleSingleFirstClick:Yn,handleSecondClick:()=>ur("backward")})};R(ei,gn=>{r(un)&&gn(Ti)})}var ni=M(ei,2);{var jo=gn=>{let Vr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);au(gn,{side:"right",get seekStep(){return r(Vr)},handleSingleFirstClick:Yn,handleSecondClick:()=>ur("forward")})};R(ni,gn=>{r(pn)&&gn(jo)})}b(Ee,It)};R(eo,Ee=>{e.canRewindLive&&ri&&!be().has("TIMELINE")&&Ee(Li)})}var xi=M(eo,2);{var to=Ee=>{let It=m(()=>{var ei;return(ei=e.live)==null?void 0:ei.startTime});Cd(Ee,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(It)}})};R(xi,Ee=>{n()==="LiveWaitingStart"&&Ee(to)})}var wi=M(xi,2);{var no=Ee=>{va(Ee,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(wi,Ee=>{n()==="LiveWaitingRecover"&&Ee(no)})}var Wi=M(wi,2);{var mn=Ee=>{va(Ee,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Wi,Ee=>{n()==="LiveWaitingRecord"&&Ee(mn)})}var er=M(Wi,2);{var tr=Ee=>{var It=kx();let ei;var Ti=h(It);zl(Ti,{get adsSlotId(){return Re()},get adsParams(){return Ne()},get adsPreviewParam(){return et()},get adsAutoplayParam(){return we()},get duration(){return Se()}}),g(It),k(ni=>ei=te(It,1,"ads-container svelte-dtyj47",null,ei,ni),[()=>({hidden:n()!=="ads"})]),b(Ee,It)};R(er,Ee=>{e.showAds&&j()&&Ee(tr)})}var Er=M(er,2);{var Pr=Ee=>{let It=m(()=>!Ce()&&e.showAutoplayNext&&C());Im(Ee,{get title(){return Je()},get thumb(){return gt()},get isHide(){return r(It)},clickCloseIcon:()=>B(An,!0)})};R(Er,Ee=>{r(Ro)&&Je()&&gt()&&Ee(Pr)})}var Vn=M(Er,2);{var Rn=Ee=>{xd(Ee,{})};R(Vn,Ee=>{ae()&&Ee(Rn)})}var Ao=M(Vn,2);{var Ar=Ee=>{var It=Ex(),ei=h(It);Fl(ei,{"aria-label":ci}),g(It),b(Ee,It)};R(Ao,Ee=>{Le()&&Ee(Ar)})}var Bo=M(Ao,2);{var fr=Ee=>{wd(Ee,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return re()}})};R(Bo,Ee=>{Z()&&Ee(fr)})}var Mr=M(Bo,2);{var Lr=Ee=>{fa(Ee,{get shifted(){return w()},get captions(){return pe()},get position(){return V()},get playerSize(){return A()},isMobile:!0})};R(Mr,Ee=>{N().value!=="off"&&Ee(Lr)})}var mr=M(Mr,2);{var io=Ee=>{var It=Px();It.__click=[Tx,O,Xt,Ln];var ei=h(It);Sd(ei,{}),g(It),b(Ee,It)};R(mr,Ee=>{d()&&Ee(io)})}var vn=M(mr,2);{var qr=Ee=>{let It=m(()=>n()==="thumb"||n()==="LiveWaitingStart"||n()==="LiveWaitingRecover"||n()==="LiveWaitingRecord"||n()==="ads"),ei=m(()=>n()==="ads"),Ti=m(()=>e.canRewindLive&&_e()!==0);yd(Ee,{get bottomHidden(){return r(It)},get showControls(){return w()},get bottomNoSmooth(){return E()},get isAds(){return r(ei)},get canRewindLive(){return r(Ti)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return De()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Xe()},get nextButtonActive(){return ot()},get prevButtonActive(){return ft()},get isOneVideoPlaylist(){return Et()},get customFullscreenSupported(){return r(Oi)},get endScreenShown(){return r(Ro)},toggleFullscreen:Ir,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Zn,onDisabledSeekToInteractiveClick:fn,get playerControlsWrapperRef(){return r(ko)},set playerControlsWrapperRef(ni){B(ko,fe(ni))},get playerControlsRef(){return r(Tr)},set playerControlsRef(ni){B(Tr,fe(ni))}})};R(vn,Ee=>{j()&&Ee(qr)})}var vr=M(vn,2);{var at=Ee=>{var It=Ax(),ei=h(It);kd(ei,{get supportLink(){return e.supportLink},returnFocus:Cx,get ref(){return r(lr)},set ref(Ti){B(lr,fe(Ti))}}),g(It),b(Ee,It)};R(vr,Ee=>{O()&&Ee(at)})}var Ft=M(vr,2);let Vi=m(()=>!r(Xi));Kl(Ft,{get isLive(){return Ge()},get isHidden(){return r(Vi)},get isPlaying(){return ie()},get position(){return V()},get duration(){return H()}});var xe=M(Ft,2);{var Pt=Ee=>{ra(Ee,{})};R(xe,Ee=>{r(go)&&Ee(Pt)})}var vi=M(xe,2);{var hi=Ee=>{Yl(Ee,{})};R(vi,Ee=>{G()&&Ee(hi)})}var Mo=M(vi,2);{var ui=Ee=>{Ed(Ee,{onClose:dn,onSelectAutoQuality:()=>{ln("auto"),dn()}})};R(Mo,Ee=>{r(Wo)&&Ee(ui)})}b(st,Qt)});var Ht=M(mt,2);pt(Ht,st=>B(qo,st),()=>r(qo)),g(No),pt(No,st=>B(Io,st),()=>r(Io)),St("click",No,pr,!0),St("focusin",No,kr,!0),b(t,No),z(),o()}lt(["click"]);function du(t){let e="";return Wn(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),Wn(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),Wn(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),Wn(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),Wn(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),Wn(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),Wn(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),Wn(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),Wn(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),Wn(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),Wn(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),Wn(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),Wn(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),e.length&&e||void 0}function Wn(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as Rx}from"@vkontakte/videoplayer-shared/es2015";var Dx=L('<div class="player-wrapper svelte-1qfjf44" role="region"><!> <!> <!> <!> <div class="time-container svelte-1qfjf44"><!></div> <div><!></div></div>'),Nx={hash:"svelte-1qfjf44",code:".player-wrapper.svelte-1qfjf44 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-1qfjf44 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.timeline.svelte-1qfjf44 {opacity:0;opacity:1;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);}.visible.svelte-1qfjf44 {opacity:1;}.time-container.svelte-1qfjf44 {position:absolute;bottom:8px;right:8px;z-index:var(--thumb-timer-z-index);}"};function Em(t,e){U(e,!0),W(t,Nx);let[i,o]=Be(),n=()=>S(ne,"$playerSize",i),a=()=>S(I,"$isPlaying$",i),s=()=>S(P,"$duration$",i),d=()=>S(Y,"$positionWithScrubbing$",i),l=()=>S(T,"$playerPhase",i),u=()=>S(E,"$crashed$",i),v=()=>S(V,"$currentSubtitle$",i),$=()=>S(H,"$currentSubtitleCaptions$",i),p=()=>S(A,"$positionExact$",i),_=()=>S(O,"$isLive$",i),w=()=>S(J,"$isRewindableLive$",i),y=f(e,"outsideDuration",3,0),C=f(e,"videoContainer",15),{playerPhase:T,state:{crashed$:E,duration$:P,positionExact$:A,isPlaying$:I,currentSubtitle$:V,currentSubtitleCaptions$:H,positionWithScrubbing$:Y,isLive$:O,isRewindableLive$:J},ui:{playerSize:ne,controls:Z},actions:{internal:{getVideoElement:me}}}=Ie(),le=8,Ve=ee(!1),Me=fe({}),be=()=>{B(Ve,!0)},ae=()=>{B(Ve,!1)},Le=Rx(il,260);We(()=>{n(),Le(me(),Z,Me,r(Ve))});let re=m(()=>a()?sn(s()-d()):sn(isFinite(s())?s():y()));var N=Dx(),pe=h(N);_a(pe,{hideCursor:!1,get videoContainer(){return C()},set videoContainer(De){C(De)}});var _e=M(pe,2);Gs(_e,()=>"slot",!1,(De,Xe)=>{ke(De,null,{name:ha})});var Ge=M(_e,2);let ie=m(()=>l()!=="thumb"||u());ma(Ge,{get hidden(){return r(ie)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var G=M(Ge,2);{var K=De=>{fa(De,{shifted:!1,get captions(){return $()},get position(){return p()},get playerSize(){return n()}})};R(G,De=>{v().value!=="off"&&De(K)})}var Re=M(G,2),Ne=h(Re);Wl(Ne,{get isLive(){return _()},get isPlaying(){return a()},get time(){return r(re)}}),g(Re);var et=M(Re,2);let we;var Se=h(et);la(Se,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return w()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:le,tooltipRightOffset:le,get ref(){return Me.timeline},set ref(De){Me.timeline=De}}),g(et),g(N),k(De=>we=te(et,1,"timeline svelte-1qfjf44",null,we,De),[()=>({visible:r(Ve)})]),St("mouseenter",N,be),St("mouseleave",N,ae),b(t,N),z(),o()}var Fx=L("<div><!></div>"),Ux={hash:"svelte-7ed4yj",code:`.root.svelte-7ed4yj {--white: #fff;--black: #000;--red: #ff3347;--blue-light: #70c1ff;--black-alpha-40: rgba(0, 0, 0, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.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;--focused: var(--white);--focused-element-shadow: inset 0 0 0 2px 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, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;--interactive-episode-complete: rgba(92, 156, 230, 1);--slider-bg: rgba(255, 255, 255, 0.4);--slider-filled-bg: var(--white);--slider-handle-bg: var(--white);--slider-loaded-bg: rgba(255, 255, 255, 0.4);--slider-height: 3px;--slider-video-episode-gap: 1.5px;--slider-radius: 0px;--slider-handle-size: 12px;--slider-filled-ads: rgba(103, 165, 235, 1);--slider-disabled-color: rgba(248, 248, 248, 0.31);--slider-volume-height: 5px;--slider-volume-radius: calc(var(--slider-volume-height) / 2);--slider-volume-handle-size: 13px;
361
+ .ads-container.svelte-dtyj47 {position:absolute;width:100%;height:100%;left:0;top:0;}.ads-container.svelte-dtyj47 {z-index:var(--ads-container-z-index);background:var(--black);}.settings-mobile.svelte-dtyj47 {position:absolute;z-index:var(--settings-menu-z-index);top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity var(--controls-transition-duration);display:flex;align-items:center;max-width:320px;width:90%;}`};function km(t,e){var Mi,Po;U(e,!0),W(t,Vx);let[i,o]=Be(),n=()=>S(Fe,"$playerPhase",i),a=()=>S(Yi,"$isLoaderVisible",i),s=()=>S(Ye,"$adPlaybackState",i),d=()=>S(fi,"$crashed",i),l=()=>S(rt,"$notificationsToShow$",i),u=()=>S(ct,"$playbackState$",i),v=()=>S(He,"$graphIsOpened$",i),$=()=>S(dt,"$interactiveHideMobileControls",i),p=()=>S(Lt,"$isEnded$",i),_=()=>S(xt,"$isInteractiveExpectation$",i),w=()=>S(qe,"$controlsVisible",i),y=()=>S(Si,"$touched",i),C=()=>S(oo,"$autoplayNextEnabled$",i),T=()=>S(So,"$postrollPassed",i),E=()=>S(En,"$bottomNoSmooth",i),P=()=>S(mo,"$videoSize",i),A=()=>S(vo,"$playerSize",i),I=()=>S($t,"$isFullscreen",i),V=()=>S(Ze,"$position$",i),H=()=>S(nt,"$duration$",i),Y=()=>S(qi,"$loadedMetadata",i),O=()=>S(Xt,"$settingsMenuVisible",i),J=()=>S(Pi,"$scrubbingInProgress",i),ne=()=>S(Ui,"$volumeChangingInProgress",i),Z=()=>S(yt,"$chromecastConnected$",i),me=()=>S(di,"$isInteractiveTime$",i),le=()=>S(zi,"$isActiveLive",i),Ve=()=>S(Ni,"$settingsMenuOpenedByKeyboard",i),Me=()=>S(tt,"$language$",i),be=()=>S(Ai,"$disabledControls$",i),ae=()=>S(Sn,"$is3DVideo",i),Le=()=>S(Zi,"$icon3DVideoVisible",i),re=()=>S(Rt,"$chromecastDeviceName$",i),N=()=>S(Tt,"$currentSubtitle$",i),pe=()=>S(Kt,"$currentSubtitleCaptions$",i),_e=()=>S(oi,"$realDuration$",i),Ge=()=>S(ii,"$isLive$",i),ie=()=>S(pi,"$isPlaying$",i),G=()=>S(ji,"$debugPanelVisible",i),K=f(e,"videoContainer",15),Re=f(e,"adsSlotId",3,void 0),Ne=f(e,"adsParams",3,void 0),et=f(e,"adsPreviewParam",3,void 0),we=f(e,"adsAutoplayParam",3,void 0),Se=f(e,"duration",3,void 0),De=f(e,"logoTargetUrl",3,""),Xe=f(e,"showNextPrevButtons",3,!1),ot=f(e,"nextButtonActive",3,!1),ft=f(e,"prevButtonActive",3,!1),Je=f(e,"endScreenVideoTitle",3,void 0),gt=f(e,"endScreenVideoThumb",3,void 0),Et=f(e,"isOneVideoPlaylist",3,!1),jt=f(e,"shadowRootContainer",3,void 0),qt=f(e,"outerContainerRef",3,void 0),Wt=f(e,"showMiniTimer",3,!1),ve=f(e,"fullScreenTarget",3,void 0),j=f(e,"playerStarted",3,!1),Ce=f(e,"showEndScreen",3,!0),{notifications$:se,graphIsOpened$:He}=fo(),Ue=e.store.getLogger().createComponentLog("Root component"),tt=e.store.interfaceLanguage$,ct=e.store.state.playbackState$,Ye=e.store.ads.playbackState,Ze=e.store.state.positionWithScrubbing$,nt=e.store.state.duration$,Fe=e.store.playerPhase,$t=e.store.ui.isFullscreen,qe=e.store.ui.controlsVisible,dt=e.store.ui.interactiveHideMobileControls,Xt=e.store.ui.settingsMenu.visible$,Ni=e.store.ui.settingsMenu.openedByBtnKeyboard$,Pi=e.store.ui.scrubbingInProgress,Ui=e.store.ui.volumeChangingInProgress,ji=e.store.ui.debugPanelVisible,Yi=e.store.state.isLoaderVisible,Lt=e.store.state.isEnded$,yt=e.store.state.chromecastConnected$,Rt=e.store.state.chromecastDeviceName$,So=e.store.ads.postrollPassed,an=e.store.ui.mobileUnmuteButtonExpanded,X=e.store.ui.mobileUnmuteButtonVisible,ii=e.store.state.isLive$,pi=e.store.state.isPlaying$,zi=e.store.state.isActiveLive$,ri=e.store.state.isRewindableLive$,fi=e.store.state.crashed$,si=e.store.webApi.annotationsApi,ut=e.store.webApi.pictureInPictureApi,mo=e.store.state.videoSize$,Tt=e.store.state.currentSubtitle$,Kt=e.store.state.currentSubtitleCaptions$,oi=e.store.state.duration$,vo=e.store.ui.playerSize,Sn=e.store.ui.is3DVideo,Zi=e.store.ui.icon3DVideoVisible,Co=e.store.state.isInteractive,di=e.store.state.isInteractiveTime$,xt=e.store.state.isInteractiveExpectation$,To=e.store.state.hasInteractiveBranches,Ai=e.store.ui.controls.disabledControls$,Si=e.store.ui.touched,zo=e.store.ui.overlayContainer$,oo=e.store.ui.autoplayNextEnabled$,qi=e.store.state.loadedMetadata$,Cn=e.store.actions.internal.closeSettingsMenu,Tn=(Mi=e.store.callbacks)==null?void 0:Mi.onDisabledPlayPrevChapterClick,Bi=(Po=e.store.callbacks)==null?void 0:Po.onDisabledSeekToInteractiveClick,ln=e.store.actions.internal.setQuality,Io=ee(void 0),ko=ee(void 0),Tr=ee(void 0),lr=ee(void 0),In,Kn,Qn,go=m(()=>(n()==="video"&&a()||n()==="ads"&&s()==="inactive")&&!d()),qo=ee(void 0),{closeNotification:kn,notificationsToShow$:rt}=se,Wo=m(()=>!!l().slow_video),dn=()=>kn("slow_video"),En=de(!1),dr,Ko=ee(!1),Gn=m(()=>u()!==Sx.PLAYING),cn=ee(!1),Pn=m(()=>v()||$()||!r(Ko)&&(p()&&!!To||r(Gn)&&_())),Oi=ee(!0),Xi=m(()=>e.uiConfig.features.thumbTimer&&Wt()&&n()==="video"&&!w()&&!d()&&!Co&&(e.uiConfig.hideThumbTimerAfterTouch&&!y()||!e.uiConfig.hideThumbTimerAfterTouch)),An=ee(!1),Ro=m(()=>(Ce()||e.showAutoplayNext&&C())&&!!Je()&&!!gt()&&(e.showAds&&T()||!e.showAds)&&p()&&!d()&&!r(An)),Mn=ee(!1);ut==null||ut.setContext(kl());let Qo=st=>{clearTimeout(Kn),st&&(X.set(!0),an.set(!0),Kn=setTimeout(()=>{an.set(!1)},e.uiConfig.controls.collapseMobileUnmute),Co||gi(e.uiConfig.controls.hideTimeoutMobile))};e.store.setUiCallbacks({onStarted:Qo});let Do=()=>{clearTimeout(In),B(Ko,!1),$()&&dt.set(!1)},gi=st=>{Do(),B(Ko,!0),In=setTimeout(()=>B(Ko,!1),st);let Qt=st-100;dr=setTimeout(()=>{E()&&En.set(!1)},Qt>0?Qt:st)},jn=Sn.subscribe(st=>{Zi.set(st),st&&(clearTimeout(Qn),Qn=setTimeout(()=>Zi.set(!1),e.uiConfig.controls.hide360IconTimeout))}),Eo=(...Qt)=>kt(this,[...Qt],function*(st=bs()){var mi,Ji,eo,Li,xi,to;if(st&&!Pd.device.isIOS){let wi=Ul(),no=Go(),Wi=Pd.browser.isSamsungBrowser&&wi===jt();st=wi===no||Wi}if(st){gi(e.uiConfig.controls.hideTimeoutFullscreen);try{yield ut==null?void 0:ut.remove()}catch(wi){Ue({message:String(wi)})}try{let wi=(mi=P())!=null&&mi.width&&((Ji=P())!=null&&Ji.height)?P():A();yield yh(wi)}catch(wi){Ue({message:String(wi)})}}$t.set(st),e.store.getAdmanWrapper().setFullscreen(st),I()?(Li=(eo=e.store.callbacks)==null?void 0:eo.onFullscreenEnter)==null||Li.call(eo):(to=(xi=e.store.callbacks)==null?void 0:xi.onFullscreenExit)==null||to.call(xi)}),cr=st=>{let Qt=st;vo.set({width:Qt.target.width,height:Qt.target.height})};Ut(()=>{var st;return Lc(Eo),e.uiConfig.features.annotationsInside&&(si==null||si.init(r(Io))),ea(ut)&&(ut==null||ut.assignPlayerContainer(r(Io)),ut==null||ut.registryExternalEventHandlers({resize:cr})),B(Oi,!Pd.device.isIphoneOrOldIpad),e.interactiveContainer&&((st=K().parentElement)==null||st.insertBefore(e.interactiveContainer,K().nextSibling)),()=>{clearTimeout(In),clearTimeout(dr),clearTimeout(Kn),clearTimeout(Qn),jn(),ut==null||ut.dispose().catch(Qt=>{Ue({message:String(Qt)})}),Vc(Eo)}});let un=ee(!0),pn=ee(!0),ur=st=>{let Qt=V()+(st==="forward"?1:-1)*e.uiConfig.controls.seekStepMobile/1e3;Qt<0?(B(un,!1),Qt=0):Qt>=H()&&(B(pn,!1),Qt=H()),B(cn,!0),e.seekTime(Qt)},Go=()=>{let st=Pd.device.isIOS||e.uiConfig.features.fullscreenInternalTargetPlayerContainer||!qt()?r(Io):qt(),Qt=st.getRootNode(),mi=Qt instanceof ShadowRoot?Qt.host:Qt,Ji=ve()instanceof HTMLElement&&ve().contains(mi);return e.uiConfig.allowChangingFullscreenTarget&&ve()&&Ji?ve():st},Ir=()=>kt(this,null,function*(){try{if(bs())yield Mc(document),Ue({message:"exit fullscreen"});else{if(Ue({message:"request fullscreen"}),Pd.device.isIOS&&!Y())return;yield Ac(Go())}}catch(st){Ue({message:String(st)})}}),Ln=()=>{Cn()},Yn=st=>{if(st.preventDefault(),O()){Ln();return}if(!j()){e.firstStart(),gi(e.uiConfig.controls.hideTimeoutCursor);return}B(cn,!1),w()?Do():gi(e.uiConfig.controls.hideTimeoutMobile)},pr=()=>{Si.set(!0)},kr=()=>{Co||(En.set(!0),gi(e.uiConfig.controls.hideTimeoutCursor))},Zn=st=>{Tn&&(Tn(st),gi(e.uiConfig.controls.hideTimeoutMobile))},fn=st=>{Bi&&(Bi(st),gi(e.uiConfig.controls.hideTimeoutMobile))};We(()=>{zo.set(r(qo))}),We(()=>{qe.set((r(Gn)||O()||J()||ne()||Z()||!r(Ro)&&(p()||r(Ko)&&!r(cn)))&&!r(Pn)&&n()==="video"&&!d())}),We(()=>{!J()&&r(Mn)&&!me()&&gi(e.uiConfig.controls.hideTimeoutMobile),B(Mn,fe(J()))}),We(()=>{B(un,V()>0),B(pn,fe(!le()&&V()<H()))}),We(()=>{ja(r(lr),O(),Ve())});let Xn=F("aria_label_video_player"),ci=F("video360");C1({fullScreenChangeHandler:Eo,getFullscreenTarget:Go}),T1({store:e.store,getFullscreenTarget:Go});var No=Lx();St("blur",Us,Ln),Oe(No,"aria-label",Xn);var Ci=h(No);_a(Ci,{onClick:Yn,get videoContainer(){return K()},set videoContainer(st){K(st)}});var Jn=M(Ci,2);Gs(Jn,()=>"slot",!1,(st,Qt)=>{ke(st,null,{name:ha})});var mt=M(Jn,2);Qs(mt,Me,st=>{var Qt=Mx(),mi=ue(Qt);let Ji=m(()=>n()!=="thumb"||d()||Co&&e.autoplay);ma(mi,{get hidden(){return r(Ji)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var eo=M(mi,2);{var Li=Ee=>{var It=Ix(),ei=ue(It);{var Ti=gn=>{let Vr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);au(gn,{side:"left",get seekStep(){return r(Vr)},handleSingleFirstClick:Yn,handleSecondClick:()=>ur("backward")})};R(ei,gn=>{r(un)&&gn(Ti)})}var ni=M(ei,2);{var jo=gn=>{let Vr=m(()=>e.uiConfig.controls.seekStepMobile/1e3);au(gn,{side:"right",get seekStep(){return r(Vr)},handleSingleFirstClick:Yn,handleSecondClick:()=>ur("forward")})};R(ni,gn=>{r(pn)&&gn(jo)})}b(Ee,It)};R(eo,Ee=>{e.canRewindLive&&ri&&!be().has("TIMELINE")&&Ee(Li)})}var xi=M(eo,2);{var to=Ee=>{let It=m(()=>{var ei;return(ei=e.live)==null?void 0:ei.startTime});Cd(Ee,{get thumbUrl(){return e.thumbUrl},get startTime(){return r(It)}})};R(xi,Ee=>{n()==="LiveWaitingStart"&&Ee(to)})}var wi=M(xi,2);{var no=Ee=>{va(Ee,{kind:"recover",get thumbUrl(){return e.thumbUrl}})};R(wi,Ee=>{n()==="LiveWaitingRecover"&&Ee(no)})}var Wi=M(wi,2);{var mn=Ee=>{va(Ee,{kind:"record",get thumbUrl(){return e.thumbUrl}})};R(Wi,Ee=>{n()==="LiveWaitingRecord"&&Ee(mn)})}var er=M(Wi,2);{var tr=Ee=>{var It=kx();let ei;var Ti=h(It);zl(Ti,{get adsSlotId(){return Re()},get adsParams(){return Ne()},get adsPreviewParam(){return et()},get adsAutoplayParam(){return we()},get duration(){return Se()}}),g(It),k(ni=>ei=te(It,1,"ads-container svelte-dtyj47",null,ei,ni),[()=>({hidden:n()!=="ads"})]),b(Ee,It)};R(er,Ee=>{e.showAds&&j()&&Ee(tr)})}var Er=M(er,2);{var Pr=Ee=>{let It=m(()=>!Ce()&&e.showAutoplayNext&&C());Im(Ee,{get title(){return Je()},get thumb(){return gt()},get isHide(){return r(It)},clickCloseIcon:()=>B(An,!0)})};R(Er,Ee=>{r(Ro)&&Je()&&gt()&&Ee(Pr)})}var Vn=M(Er,2);{var Rn=Ee=>{xd(Ee,{})};R(Vn,Ee=>{ae()&&Ee(Rn)})}var Ao=M(Vn,2);{var Ar=Ee=>{var It=Ex(),ei=h(It);Fl(ei,{"aria-label":ci}),g(It),b(Ee,It)};R(Ao,Ee=>{Le()&&Ee(Ar)})}var Bo=M(Ao,2);{var fr=Ee=>{wd(Ee,{get thumbUrl(){return e.thumbUrl},get chromecastDeviceName(){return re()}})};R(Bo,Ee=>{Z()&&Ee(fr)})}var Mr=M(Bo,2);{var Lr=Ee=>{fa(Ee,{get shifted(){return w()},get captions(){return pe()},get position(){return V()},get playerSize(){return A()},isMobile:!0})};R(Mr,Ee=>{N().value!=="off"&&Ee(Lr)})}var mr=M(Mr,2);{var io=Ee=>{var It=Px();It.__click=[Tx,O,Xt,Ln];var ei=h(It);Sd(ei,{}),g(It),b(Ee,It)};R(mr,Ee=>{d()&&Ee(io)})}var vn=M(mr,2);{var qr=Ee=>{let It=m(()=>n()==="thumb"||n()==="LiveWaitingStart"||n()==="LiveWaitingRecover"||n()==="LiveWaitingRecord"||n()==="ads"),ei=m(()=>n()==="ads"),Ti=m(()=>e.canRewindLive&&_e()!==0);yd(Ee,{get bottomHidden(){return r(It)},get showControls(){return w()},get bottomNoSmooth(){return E()},get isAds(){return r(ei)},get canRewindLive(){return r(Ti)},get logoClickable(){return e.logoClickable},get logoHidden(){return e.logoHidden},get logoTargetUrl(){return De()},get showAutoplayNext(){return e.showAutoplayNext},get showNextPrevButtons(){return Xe()},get nextButtonActive(){return ot()},get prevButtonActive(){return ft()},get isOneVideoPlaylist(){return Et()},get customFullscreenSupported(){return r(Oi)},get endScreenShown(){return r(Ro)},toggleFullscreen:Ir,get seekToInteractive(){return e.seekToInteractive},get playPrevChapter(){return e.playPrevChapter},onDisabledPlayPrevChapterClick:Zn,onDisabledSeekToInteractiveClick:fn,get playerControlsWrapperRef(){return r(ko)},set playerControlsWrapperRef(ni){B(ko,fe(ni))},get playerControlsRef(){return r(Tr)},set playerControlsRef(ni){B(Tr,fe(ni))}})};R(vn,Ee=>{j()&&Ee(qr)})}var vr=M(vn,2);{var at=Ee=>{var It=Ax(),ei=h(It);kd(ei,{get supportLink(){return e.supportLink},returnFocus:Cx,get ref(){return r(lr)},set ref(Ti){B(lr,fe(Ti))}}),g(It),b(Ee,It)};R(vr,Ee=>{O()&&Ee(at)})}var Ft=M(vr,2);let Vi=m(()=>!r(Xi));Kl(Ft,{get isLive(){return Ge()},get isHidden(){return r(Vi)},get isPlaying(){return ie()},get position(){return V()},get duration(){return H()}});var xe=M(Ft,2);{var Pt=Ee=>{ra(Ee,{})};R(xe,Ee=>{r(go)&&Ee(Pt)})}var vi=M(xe,2);{var hi=Ee=>{Yl(Ee,{})};R(vi,Ee=>{G()&&Ee(hi)})}var Mo=M(vi,2);{var ui=Ee=>{Ed(Ee,{onClose:dn,onSelectAutoQuality:()=>{ln("auto"),dn()}})};R(Mo,Ee=>{r(Wo)&&Ee(ui)})}b(st,Qt)});var Ht=M(mt,2);pt(Ht,st=>B(qo,st),()=>r(qo)),g(No),pt(No,st=>B(Io,st),()=>r(Io)),St("click",No,pr,!0),St("focusin",No,kr,!0),b(t,No),z(),o()}lt(["click"]);function du(t){let e="";return Wn(t.timelineSliderFilledColor)&&(e+=`--timeline-slider-filled-bg:${t.timelineSliderFilledColor};`),Wn(t.timelineSliderHandleColor)&&(e+=`--timeline-slider-handle-bg:${t.timelineSliderHandleColor};`),Wn(t.timelineSliderLoadedColor)&&(e+=`--timeline-slider-loaded-bg:${t.timelineSliderLoadedColor};`),Wn(t.timelineSliderColor)&&(e+=`--timeline-slider-bg:${t.timelineSliderColor};`),Wn(t.volumeSliderColor)&&(e+=`--volume-slider-bg:${t.volumeSliderColor};`),Wn(t.volumeSliderHandleColor)&&(e+=`--volume-slider-handle-bg:${t.volumeSliderHandleColor};`),Wn(t.volumeSliderFilledColor)&&(e+=`--volume-slider-filled-bg:${t.volumeSliderFilledColor};`),Wn(t.controlsTimeColor)&&(e+=`--controls-time:${t.controlsTimeColor};`),Wn(t.timelineSliderFilledActiveLiveColor)&&(e+=`--timeline-slider-filled-active-live-bg:${t.timelineSliderFilledActiveLiveColor};`),Wn(t.timelineSliderHandleActiveLiveColor)&&(e+=`--timeline-slider-handle-active-live-bg:${t.timelineSliderHandleActiveLiveColor};`),Wn(t.buttonColor)&&(e+=`--btn-color:${t.buttonColor};`),Wn(t.buttonToggleOnColor)&&(e+=`--toggle-color-on:${t.buttonToggleOnColor};`,e+=`--toggle-color-autoplay-on:${t.buttonToggleOnColor};`),Wn(t.focusedColor)&&(e+=`--focused:${t.focusedColor};`),e.length&&e||void 0}function Wn(t){return typeof t=="string"&&!t.includes(";")}import{debounceFn as Rx}from"@vkontakte/videoplayer-shared/es2015";var Dx=L('<div class="player-wrapper svelte-1qfjf44" role="region"><!> <!> <!> <!> <div class="time-container svelte-1qfjf44"><!></div> <div><!></div></div>'),Nx={hash:"svelte-1qfjf44",code:".player-wrapper.svelte-1qfjf44 {position:absolute;width:100%;height:100%;}.player-wrapper.svelte-1qfjf44 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}.timeline.svelte-1qfjf44 {opacity:0;opacity:1;position:absolute;z-index:var(--controls-container-z-index);width:100%;bottom:0;left:0;transition:opacity var(--controls-transition-duration) var(--controls-transition-fn);}.visible.svelte-1qfjf44 {opacity:1;}.time-container.svelte-1qfjf44 {position:absolute;bottom:8px;right:8px;z-index:var(--thumb-timer-z-index);}"};function Em(t,e){U(e,!0),W(t,Nx);let[i,o]=Be(),n=()=>S(ne,"$playerSize",i),a=()=>S(I,"$isPlaying$",i),s=()=>S(P,"$duration$",i),d=()=>S(Y,"$positionWithScrubbing$",i),l=()=>S(T,"$playerPhase",i),u=()=>S(E,"$crashed$",i),v=()=>S(V,"$currentSubtitle$",i),$=()=>S(H,"$currentSubtitleCaptions$",i),p=()=>S(A,"$positionExact$",i),_=()=>S(O,"$isLive$",i),w=()=>S(J,"$isRewindableLive$",i),y=f(e,"outsideDuration",3,0),C=f(e,"videoContainer",15),{playerPhase:T,state:{crashed$:E,duration$:P,positionExact$:A,isPlaying$:I,currentSubtitle$:V,currentSubtitleCaptions$:H,positionWithScrubbing$:Y,isLive$:O,isRewindableLive$:J},ui:{playerSize:ne,controls:Z},actions:{internal:{getVideoElement:me}}}=Ie(),le=8,Ve=ee(!1),Me=fe({}),be=()=>{B(Ve,!0)},ae=()=>{B(Ve,!1)},Le=Rx(il,260);We(()=>{n(),Le(me(),Z,Me,r(Ve))});let re=m(()=>a()?sn(s()-d()):sn(isFinite(s())?s():y()));var N=Dx(),pe=h(N);_a(pe,{hideCursor:!1,get videoContainer(){return C()},set videoContainer(De){C(De)}});var _e=M(pe,2);Gs(_e,()=>"slot",!1,(De,Xe)=>{ke(De,null,{name:ha})});var Ge=M(_e,2);let ie=m(()=>l()!=="thumb"||u());ma(Ge,{get hidden(){return r(ie)},get thumbUrl(){return e.thumbUrl},iconVisible:!1});var G=M(Ge,2);{var K=De=>{fa(De,{shifted:!1,get captions(){return $()},get position(){return p()},get playerSize(){return n()}})};R(G,De=>{v().value!=="off"&&De(K)})}var Re=M(G,2),Ne=h(Re);Wl(Ne,{get isLive(){return _()},get isPlaying(){return a()},get time(){return r(re)}}),g(Re);var et=M(Re,2);let we;var Se=h(et);la(Se,{get canRewindLive(){return e.canRewindLive},get isRewindableLive(){return w()},isAds:!1,needPadding:!1,isHidden:!1,withEpisodes:!1,tooltipLeftOffset:le,tooltipRightOffset:le,get ref(){return Me.timeline},set ref(De){Me.timeline=De}}),g(et),g(N),k(De=>we=te(et,1,"timeline svelte-1qfjf44",null,we,De),[()=>({visible:r(Ve)})]),St("mouseenter",N,be),St("mouseleave",N,ae),b(t,N),z(),o()}var Fx=L("<div><!></div>"),Ux={hash:"svelte-7ed4yj",code:`.root.svelte-7ed4yj {--white: #fff;--black: #000;--red: #ff3347;--blue-light: #70c1ff;--black-alpha-40: rgba(0, 0, 0, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.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;--focused: var(--white);--focused-element-shadow: inset 0 0 0 2px 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, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;--interactive-episode-complete: rgba(92, 156, 230, 1);--slider-bg: rgba(255, 255, 255, 0.4);--slider-filled-bg: var(--white);--slider-handle-bg: var(--white);--slider-loaded-bg: rgba(255, 255, 255, 0.4);--slider-height: 3px;--slider-video-episode-gap: 1.5px;--slider-radius: 0px;--slider-handle-size: 12px;--slider-filled-ads: rgba(103, 165, 235, 1);--slider-disabled-color: rgba(248, 248, 248, 0.31);--slider-volume-height: 5px;--slider-volume-radius: calc(var(--slider-volume-height) / 2);--slider-volume-handle-size: 13px;
362
362
 
363
363
  /* USER DEFINED COLORS */
364
364
 
@@ -392,5 +392,5 @@ Try switching the\xA0quality to\xA0Auto.`},mh=u_;var os=new Map;os.set(gh.EN,mh)
392
392
  /* --vk-vp-int-custom-font - vk video player interactive custom font */font-family:var(--vk-vp-int-custom-font, inherit);}*:focus, *:focus-visible {outline:none;}*:focus-visible {box-shadow:var(--focused-element-shadow);}
393
393
  /* css reset end */.hidden {visibility:hidden;opacity:0;}.overlay-container {pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:var(--overlay-container-z-index);}
394
394
 
395
- /* \u041A\u043B\u0430\u0441\u0441 \u0434\u043B\u044F \u0441\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043B\u044C\u043D\u043E \u043D\u043E \u043D\u0435 \u0434\u043B\u044F \u043E\u0431\u0445\u043E\u0434\u0430 \u043F\u043E \u0442\u0430\u0431 \u0438 \u0441\u043A\u0440\u0438\u043D \u0440\u0438\u0434\u0435\u0440\u0430 */.out-of-view {position:absolute !important;left:-1000vh !important;}.icon.icon-error-stub {display:flex;justify-content:center;align-items:center;}`};function Am(t,e){U(e,!0),W(t,Ux);let[i,o]=Be(),n=()=>S(jt,"$isLive$",i),a=f(e,"sources",7),s=f(e,"store",7),d=f(e,"microStoresRoot",7),l=f(e,"videoConfig",7),u=f(e,"uiConfig",7),v=f(e,"title",7),$=f(e,"thumbUrl",7),p=f(e,"interactiveContainer",7),_=f(e,"interactiveController",7),w=f(e,"subtitles",7),y=f(e,"live",7),C=f(e,"preload",7),T=f(e,"autoplay",7),E=f(e,"volume",7,void 0),P=f(e,"muted",7,void 0),A=f(e,"fromTime",7),I=f(e,"canRewindLive",7),V=f(e,"showAds",7),H=f(e,"adsSlotId",7,void 0),Y=f(e,"adsParams",7,void 0),O=f(e,"adsPreviewParam",7,void 0),J=f(e,"adsAutoplayParam",7,void 0),ne=f(e,"duration",7,void 0),Z=f(e,"logoClickable",7),me=f(e,"logoHidden",7),le=f(e,"isMobile",7),Ve=f(e,"showNextPrevButtons",7,!1),Me=f(e,"nextButtonActive",7,!1),be=f(e,"prevButtonActive",7,!1),ae=f(e,"endScreenVideoTitle",7,void 0),Le=f(e,"endScreenVideoThumb",7,void 0),re=f(e,"isOneVideoPlaylist",7,!1),N=f(e,"supportLink",7),pe=f(e,"shadowRootContainer",7,void 0),_e=f(e,"outerContainerRef",7,void 0),Ge=f(e,"fullScreenTarget",7,void 0),ie=f(e,"failoverHosts",7,void 0),G=f(e,"showMiniTimer",7,!1),K=f(e,"saveRate",7),Re=f(e,"seekToInteractive",7,I1),Ne=f(e,"playPrevChapter",7,I1),et=f(e,"volumeMultiplier",7),we=f(e,"showAutoplayNext",7),Se=f(e,"showEndScreen",7,!0),De=f(e,"keyboardControls",15,void 0),{subscribers:Xe,stores:ot}=d();Rg(u());let ft=zt(),Je=u().logoLink,gt=s().ui.debugPanelVisible,Et=s().ui.playerSize,jt=s().state.isLive$,Wt=s().state.isInteractive&&Pm.device.isAndroid,ve=ee(void 0),j=null,Ce=ee(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{isMobile:s().ui.isMobile,mobileUnmuteButtonVisible:s().ui.mobileUnmuteButtonVisible,vsid:s().vsid}),Wg(s(),ot),We(()=>{s().ui.isMobile.set(le())});let se=(X=!1)=>{B(Ce,!0),X?s().actions.external.firstStart(V()):s().actions.internal.firstStart(V())},Oe=()=>{if(ft.features.qualityDetailsSubMenuEnabled){let X=uh(s().videoId);if(X)switch(X.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,X.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,X.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(X.quality);break}}else{ph(s().videoId),Ip()&&s().actions.internal.setTrafficSavingEnabled(!0);let ii=wp(s().videoId);ii&&s().actions.internal.setQuality(ii)}};function Ue(X){var fi,si,ut;let ii=a()||X;ii&&s().initVideo({container:r(ve),sources:ii,failoverHosts:ie(),subtitles:w(),volumeMultiplier:et()});let pi=Bx.get(Dl)==="true";gt.set(pi),A()>0&&s().actions.external.seekTime(A());let zi=le()?ft.volumeDefault:(si=(fi=E())!=null?fi:wc())!=null?si:ft.volumeDefault,ri=(ut=P())!=null?ut:rh();if(s().actions.external.setVolume(zi),s().actions.external.setMuted(ri),s().getAdmanWrapper().setInitialVolume(ri?0:zi),Oe(),ft.features.saveRate&&K()){let mo=lh();mo&&!n()&&s().actions.internal.setPlaybackRate(mo)}if(we()){let mo=ch();mo&&s().actions.internal.setAutoplayNextEnabled(mo)}s().ui.isAutoplay.set(T()),T()?se():C()&&ft.features.preload&&s().actions.internal.preload()}let tt=X=>{if(window.ResizeObserver){let ii,pi;j=new ResizeObserver(Ox(zi=>{let ri=zi[0];if(ri.contentBoxSize){let fi=Array.isArray(ri.contentBoxSize)?ri.contentBoxSize[0]:ri.contentBoxSize;ii=fi.inlineSize,pi=fi.blockSize}else ri.contentRect&&(ii=ri.contentRect.width,pi=ri.contentRect.height);Et.set({width:ii,height:pi})},300)),j.observe(X)}Et.set({width:X.clientWidth,height:X.clientHeight})},ct=()=>{document.hidden&&s().actions.external.stop()};Ut(()=>{var pi,zi,ri,fi;Wt&&document.addEventListener("visibilitychange",ct),ft.debugLog&&s().actions.internal.startLogging(),tt(r(ve));let X=Xe.map(si=>si.init({store:s(),microStores:ot,config:l(),interactiveController:_(),uiConfig:u()})),ii=()=>{Wt&&document.removeEventListener("visibilitychange",ct),j==null||j.disconnect(),X.forEach(si=>si.unsubscribe()),s().destroy()};return((pi=y())==null?void 0:pi.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),ii):((zi=y())==null?void 0:zi.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),ii):(((ri=y())==null?void 0:ri.status)==="finished"||((fi=y())==null?void 0:fi.status)==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),ii):(Ue(),ii)});function Ye(){r(Ce)?s().actions.external.play():se(!0)}function Ze(){s().actions.external.pause()}function nt(X){s().actions.external.setMuted(X)}function He(){s().actions.external.toggleSubtitle()}function $t(X){le()||X>=0&&X<=1&&s().actions.external.setVolume(X)}function qe(X){s().actions.internal.seekTime(X,Hx.UNKNOWN)}function dt(X){s().actions.external.seekEpisodeStartTime(X)}function Xt(){s().actions.external.returnFocusToEpisodes()}function Ni(X){s().actions.external.setPlaybackRate(X)}function Pi(X){s().actions.external.setAutoQualityLimits(X)}let Ui=du(ft.view),ji=l().playerView==="preview";var Yi=Fx();let Lt;it(Yi,Ui);var yt=h(Yi);{var Rt=X=>{km(X,{get store(){return s()},uiConfig:ft,get thumbUrl(){return $()},get interactiveContainer(){return p()},get live(){return y()},get autoplay(){return T()},get canRewindLive(){return I()},get showAds(){return V()},get adsSlotId(){return H()},get adsParams(){return Y()},get adsPreviewParam(){return O()},get adsAutoplayParam(){return J()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return me()},logoTargetUrl:Je,get nextButtonActive(){return Me()},get prevButtonActive(){return be()},get endScreenVideoTitle(){return ae()},get endScreenVideoThumb(){return Le()},get isOneVideoPlaylist(){return re()},get supportLink(){return N()},get shadowRootContainer(){return pe()},get outerContainerRef(){return _e()},get fullScreenTarget(){return Ge()},get showMiniTimer(){return G()},get playerStarted(){return r(Ce)},get seekToInteractive(){return Re()},get playPrevChapter(){return Ne()},firstStart:se,seekTime:qe,get showEndScreen(){return Se()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return Ve()},get videoContainer(){return r(ve)},set videoContainer(ii){B(ve,fe(ii))}})},So=X=>{var ii=ze(),pi=ue(ii);{var zi=fi=>{Em(fi,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return I()},get videoContainer(){return r(ve)},set videoContainer(si){B(ve,fe(si))}})},ri=fi=>{Tm(fi,{get store(){return s()},uiConfig:ft,get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return p()},get live(){return y()},get autoplay(){return T()},get canRewindLive(){return I()},get showAds(){return V()},get adsSlotId(){return H()},get adsParams(){return Y()},get adsPreviewParam(){return O()},get adsAutoplayParam(){return J()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return me()},logoTargetUrl:Je,get nextButtonActive(){return Me()},get prevButtonActive(){return be()},get endScreenVideoTitle(){return ae()},get endScreenVideoThumb(){return Le()},get isOneVideoPlaylist(){return re()},get supportLink(){return N()},get shadowRootContainer(){return pe()},get outerContainerRef(){return _e()},get fullScreenTarget(){return Ge()},get showMiniTimer(){return G()},get playerStarted(){return r(Ce)},get seekToInteractive(){return Re()},get playPrevChapter(){return Ne()},firstStart:se,get showEndScreen(){return Se()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return Ve()},get videoContainer(){return r(ve)},set videoContainer(si){B(ve,fe(si))},get keyboardControls(){return De()},set keyboardControls(si){De(si)}})};R(pi,fi=>{ji?fi(zi):fi(ri,!1)})}b(X,ii)};R(yt,X=>{le()?X(Rt):X(So,!1)})}g(Yi),k(X=>Lt=te(Yi,1,"root svelte-7ed4yj",null,Lt,X),[()=>({"root--miui-browser":Pm.device.isMobile&&Pm.browser.isMiuiBrowser,"visible-outside":ji})]),b(t,Yi);var an=z({initVideo:Ue,play:Ye,pause:Ze,setMuted:nt,toggleSubtitle:He,setVolume:$t,seekTime:qe,seekEpisodeStartTime:dt,returnFocusToEpisodes:Xt,setPlaybackRate:Ni,setAutoQualityLimits:Pi,get sources(){return a()},set sources(X){a(X)},get store(){return s()},set store(X){s(X)},get microStoresRoot(){return d()},set microStoresRoot(X){d(X)},get videoConfig(){return l()},set videoConfig(X){l(X)},get uiConfig(){return u()},set uiConfig(X){u(X)},get title(){return v()},set title(X){v(X)},get thumbUrl(){return $()},set thumbUrl(X){$(X)},get interactiveContainer(){return p()},set interactiveContainer(X){p(X)},get interactiveController(){return _()},set interactiveController(X){_(X)},get subtitles(){return w()},set subtitles(X){w(X)},get live(){return y()},set live(X){y(X)},get preload(){return C()},set preload(X){C(X)},get autoplay(){return T()},set autoplay(X){T(X)},get volume(){return E()},set volume(X){E(X)},get muted(){return P()},set muted(X){P(X)},get fromTime(){return A()},set fromTime(X){A(X)},get canRewindLive(){return I()},set canRewindLive(X){I(X)},get showAds(){return V()},set showAds(X){V(X)},get adsSlotId(){return H()},set adsSlotId(X){H(X)},get adsParams(){return Y()},set adsParams(X){Y(X)},get adsPreviewParam(){return O()},set adsPreviewParam(X){O(X)},get adsAutoplayParam(){return J()},set adsAutoplayParam(X){J(X)},get duration(){return ne()},set duration(X){ne(X)},get logoClickable(){return Z()},set logoClickable(X){Z(X)},get logoHidden(){return me()},set logoHidden(X){me(X)},get isMobile(){return le()},set isMobile(X){le(X)},get showNextPrevButtons(){return Ve()},set showNextPrevButtons(X){Ve(X)},get nextButtonActive(){return Me()},set nextButtonActive(X){Me(X)},get prevButtonActive(){return be()},set prevButtonActive(X){be(X)},get endScreenVideoTitle(){return ae()},set endScreenVideoTitle(X){ae(X)},get endScreenVideoThumb(){return Le()},set endScreenVideoThumb(X){Le(X)},get isOneVideoPlaylist(){return re()},set isOneVideoPlaylist(X){re(X)},get supportLink(){return N()},set supportLink(X){N(X)},get shadowRootContainer(){return pe()},set shadowRootContainer(X){pe(X)},get outerContainerRef(){return _e()},set outerContainerRef(X){_e(X)},get fullScreenTarget(){return Ge()},set fullScreenTarget(X){Ge(X)},get failoverHosts(){return ie()},set failoverHosts(X){ie(X)},get showMiniTimer(){return G()},set showMiniTimer(X){G(X)},get saveRate(){return K()},set saveRate(X){K(X)},get showAutoplayNext(){return we()},set showAutoplayNext(X){we(X)},get seekToInteractive(){return Re()},set seekToInteractive(X){Re(X)},get playPrevChapter(){return Ne()},set playPrevChapter(X){Ne(X)},get volumeMultiplier(){return et()},set volumeMultiplier(X){et(X)},get showEndScreen(){return Se()},set showEndScreen(X){Se(X)},get keyboardControls(){return De()},set keyboardControls(X){De(X)}});return o(),an}var zx=ye('<svg><!><path fill="currentColor" d="M38.245 6c3.566 0 4.859.371 6.162 1.069a7.27 7.27 0 0 1 3.025 3.024c.697 1.303 1.068 2.597 1.068 6.163v23.489c0 3.566-.371 4.859-1.069 6.162a7.27 7.27 0 0 1-3.024 3.025C43.104 49.629 41.811 50 38.245 50h-19.49c-3.565 0-4.859-.371-6.162-1.069a7.27 7.27 0 0 1-3.024-3.024C8.87 44.604 8.5 43.311 8.5 39.745v-23.49c0-3.565.371-4.859 1.069-6.162a7.27 7.27 0 0 1 3.024-3.024C13.896 6.37 15.19 6 18.756 6zm.314 3H18.756c-2.799 0-3.761.186-4.749.714a4.27 4.27 0 0 0-1.793 1.793c-.508.95-.7 1.876-.713 4.434L11.5 39.744c0 2.799.186 3.761.714 4.749a4.27 4.27 0 0 0 1.793 1.793c.988.528 1.95.714 4.749.714h19.489c2.798 0 3.76-.186 4.748-.714a4.27 4.27 0 0 0 1.793-1.793c.528-.988.714-1.95.714-4.748v-23.49c0-2.798-.186-3.76-.714-4.748a4.27 4.27 0 0 0-1.793-1.793c-.95-.508-1.876-.7-4.434-.713zM19.22 38c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134z"></path></svg>');function Mm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=zx();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"57",height:"60",fill:"none","aria-hidden":"true","data-testid":"stub-icon",role:"img"},i))),b(t,o)}function Lm(t,e){let i=f(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");Mm(t,{get style(){return r(o)}})}var qx=L('<div class="title svelte-1y9fytq"> </div>'),Wx=L('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),Kx={hash:"svelte-1y9fytq",code:".playerStub.svelte-1y9fytq {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.title.svelte-1y9fytq {position:absolute;left:0;top:0;width:100%;font-size:15px;color:#fff;box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function Vm(t,e){W(t,Kx);var i=Wx(),o=h(i);{var n=d=>{var l=qx(),u=h(l,!0);g(l),k(()=>ge(u,e.title)),b(d,l)};R(o,d=>{e.title&&d(n)})}var a=M(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);Lm(d,{get isWhite(){return r(l)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),k(()=>it(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}import{now as x5}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as w5,InterfaceLanguage as S5,isNonNullable as Fm,Logger as C5,Observable as T5,Subscription as D1,once as I5,InternalsExposure as k5,skip as E5}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as N1,isMobile as P5}from"@vkontakte/videoplayer-core/es2015";import{OneStat as A5}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as Qx,Subscription as Gx}from"@vkontakte/videoplayer-shared/es2015";var cu=class{constructor(){this.subscription=new Gx,this.logger=new Qx,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[n,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,n,a)}catch(s){throw new Error(`The media session action "${n}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,s;let o=Te(e.state.currentPlaybackRate$),n=Te(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{(s=(a=navigator.mediaSession).setPositionState)==null||s.call(a,{position:i,playbackRate:o,duration:n})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Bm,detectEmbed as e5}from"@vkontakte/videoplayer-shared/es2015";var jx=ye('<svg><!><g fill="var(--btn-color, #fff)"><path d="m30.744 4 .744.005c2.981.046 4.526.385 6.127 1.24a8.77 8.77 0 0 1 3.475 3.347l.174.312.15.292c.772 1.553 1.066 3.18 1.085 6.251v9.045a1.5 1.5 0 0 1-3 .016l-.008-9.651c-.04-2.032-.228-3.12-.627-4.035l-.126-.27-.13-.252A5.77 5.77 0 0 0 36.2 7.891c-1.187-.635-2.339-.873-5.115-.89L22.255 7c-2.737 0-4.003.2-5.071.698l-.133.064-.251.13a5.77 5.77 0 0 0-2.409 2.408c-.635 1.187-.873 2.339-.89 5.114l-.001 20.83c0 2.738.2 4.004.698 5.072l.064.133.13.251a5.77 5.77 0 0 0 2.408 2.409c1.1.588 2.134.825 4.438.88l.323.006 3.695.005H26a1.5 1.5 0 0 1 0 3h-.756l-3.718-.005c-2.989-.047-4.526-.377-6.14-1.24a8.77 8.77 0 0 1-3.476-3.347l-.174-.312-.15-.292c-.731-1.472-1.036-3.016-1.08-5.803l-.006-.756v-20.49l.005-.743c.046-2.981.385-4.526 1.24-6.127a8.77 8.77 0 0 1 3.347-3.475l.312-.174.292-.15c1.472-.731 3.016-1.036 5.803-1.08L22.256 4z"></path><path d="M30.5 33.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C32.78 29 33.62 29 35.3 29h6.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311c.327.642.327 1.482.327 3.162v13.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C44.22 52 43.38 52 41.7 52h-6.4c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C30.5 49.72 30.5 48.88 30.5 47.2z"></path></g></svg>');function Rm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=jx();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"57",height:"56",fill:"none","aria-label":"dummy-image","data-testid":"pip-dummy-icon",role:"img"},i))),b(t,o)}var Yx=L('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),Zx={hash:"svelte-1pbsod4",code:".player-pip-dummy.svelte-1pbsod4 {width:100%;height:100%;background-color:#19191A;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.player-pip-dummy.is-pip-api.svelte-1pbsod4 {position:relative;}.dummy-image.svelte-1pbsod4 svg {transform:scale(1.07143);}.dummy-image.desktop.svelte-1pbsod4 {transform:scale(1.07143) rotate(-90deg) rotateY(180deg);}.title.svelte-1pbsod4 {font-size:16px;color:#fff;padding:18px 20px 10px;text-align:center;}"};function Dm(t,e){U(e,!0),W(t,Zx);let[i,o]=Be(),n=()=>S(u,"$interfaceLanguage$",i),a=()=>S(v,"$isMobile$",i),s=Ie(),d=zt(),l=!!s.webApi.pictureInPictureApi,u=s.interfaceLanguage$,v=s.ui.isMobile,$=s.ui.t,p=m(()=>n()&&$("pip_dummy_title")),_=du(d.view);var w=Yx();te(w,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),it(w,_);var y=h(w);let C;var T=h(y);Rm(T,{}),g(y);var E=M(y,2),P=h(E,!0);g(E),g(w),k(A=>{C=te(y,1,"dummy-image svelte-1pbsod4",null,C,A),ge(P,r(p))},[()=>({desktop:!a()})]),b(t,w),z(),o()}var Xx=Object.defineProperty,Jx=(t,e,i)=>e in t?Xx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,sl=(t,e,i)=>Jx(t,typeof e!="symbol"?e+"":e,i),Nm=(t,e,i)=>new Promise((o,n)=>{var a=l=>{try{d(i.next(l))}catch(u){n(u)}},s=l=>{try{d(i.throw(l))}catch(u){n(u)}},d=l=>l.done?o(l.value):Promise.resolve(l.value).then(a,s);d((i=i.apply(t,e)).next())}),t5=460,i5=280,Ad=class{constructor({enabled:e=!0}={enabled:!0}){sl(this,"playerDomElement"),sl(this,"playerParentShadowRoot"),sl(this,"playerDummyElement"),sl(this,"svelteContext"),sl(this,"pipWindow"),sl(this,"info",{isActive$:new Bm(!1),isEnabled$:new Bm(!1),type:1}),this.info.isEnabled$=new Bm(e)}isSupported(){let{isEmbed:e}=e5();return"documentPictureInPicture"in window&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Nm(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:t5,height:i5,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(l=>[...l.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
396
- `),n=document.createElement("style");n.textContent=o;let a=this.createStretchedContainer(),s=a.attachShadow({mode:"open"});s.append(n),s.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=es(Dm,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",l=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Ks(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})})}remove(){return Nm(this,null,function*(){return new Promise(e=>{var i;(i=documentPictureInPicture.window)==null||i.close(),e()})})}dispose(){return Nm(this,null,function*(){yield this.remove()})}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 k1(t){return t instanceof Ad}var uu=class{static getLatestSupportedVersion(e){let i=new Js(e),o=new Ad(e);if(o.isSupported())return o;if(i.isSupported())return i}};function pu(t,e){var n,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let s of i)o[s]=(a=(n=e[s])!=null?n:t[s])!=null?a:void 0;return o}var E1="Inner error. Unexpectedly root annotation container null reference exception",P1="Annotation with such name already exists",A1="Annotation with such name does not exist";var al=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as o5,Subscription as n5,throttleFn as r5}from"@vkontakte/videoplayer-shared/es2015";var s5="1",a5=100,fu=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new n5}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=r5(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},a5);this.subscriptions.add(o5(this.rootAnnotationsContainer).subscribe(({width:o,height:n})=>{this.playerSize={width:o,height:n},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 al(E1);if(this.annotations.has(e))throw new al(P1);i.style.zIndex=(o=i.style.zIndex)!=null?o:s5,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 al(A1);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 n=e.offsetTop,a=e.offsetLeft,s=e.offsetWidth,d=e.offsetHeight;return n<0||a<0||a+s>i||n+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as mu,Subscription as l5}from"@vkontakte/videoplayer-shared/es2015";var Uo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return mu(e),mu(i),mu(n),n.interactiveData&&mu(o),this.subscription=new l5,this.subscription}};var Md=class extends Uo{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Dt(q({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:n}=i.store.state;return o.add(n.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Ld=class extends Uo{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Dt(q({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:n,store:a}=i,{fakeIsPlaying$:s}=n,{isInteractiveExpectation$:d,isPlaying$:l}=a.state,{controlsVisible:u,isMobile:v}=a.ui,$=Te(v),p=()=>$&&Te(u);return o.add(u.subscribe(_=>{if(!$)return;let w=Te(s);Te(l)?this.state$.set(_):w!==null&&this.state$.set(!w||_)})),o.add(l.subscribe(_=>{this.state$.set(!_||p())})),o.add(s.subscribe(_=>{if(_===null)return;let w=Te(d);if(p()){this.state$.set(!0);return}w&&this.state$.set(!_)})),o}};var Vd=class extends Uo{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:n}=i;return o.add(n.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(s=>s.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as d5}from"@vkontakte/videoplayer-shared/es2015";var Om=de(!1),vu=null,Rd=class extends Uo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Dt(q({},Om),{set:(i,o=!1)=>{i!==Te(Om)&&(this.clearTimeout(),Om.set(i),!i&&vu&&(vu=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:n,config:a}=i,{isInteractiveTime$:s,isPlaying$:d}=n.state,l=n.ui.controlsVisible,{interactiveTimeIndicator:u}=n.ui.controls;o.add(l.subscribe($=>{Te(s)&&$&&this.state$.set(!1)}));let v=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(d5({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:u}).subscribe(({isPlaying$:$,isInteractiveTime$:p,interactiveTimeIndicator:_})=>{var w,y;if(!(!$||!(_!=null&&_.isDisplayed))){if(!p)return this.state$.set(!1);v.tooltipHelpHintActive&&vu===null&&(vu=!0,v.tooltipHelpHintActive=!1,this.state$.set(!0),(y=(w=n.callbacks)==null?void 0:w.onInteractiveTimeIndicatorHintDeactivated)==null||y.call(w))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as c5,noop as u5}from"@vkontakte/videoplayer-shared/es2015";var Dd=class extends Uo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Dt(q({},de(null)),{toggle:u5});this.checkIfShouldHide=i=>Cs(i,"s")}init(i){let o=super.init(i),{store:n,interactiveController:a}=i,s=n.ui.currentGridType$,d=n.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>kt(this,null,function*(){if(this.checkIfShouldHide(Te(s)))return;let l=Te(this.state$),{isEnded$:u,playbackState$:v}=n.state,{disabledControls$:$}=n.ui.controls,p=Te(u),_=Te(v);if(l)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),$.remove(gp),!p&&this.graphMadePause&&n.actions.internal.play()}catch(w){d({message:"Cant hide graph"})}else{this.graphMadePause=_==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),$.add(gp),!p&&this.graphMadePause&&n.actions.internal.pause()}catch(w){d({message:"Cant show graph"})}}}),o.add(c5({graphIsOpened:this.state$,currentGridType:s}).subscribe(v=>kt(this,[v],function*({graphIsOpened:l,currentGridType:u}){if(this.checkIfShouldHide(u)&&l)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as M1}from"@vkontakte/videoplayer-shared/es2015";var Nd=class extends Uo{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:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new M1(!1),isEnabled$:new M1(!1)}};return o.add(a.subscribe(l=>{this.state$.isActive$.set(l)})),o.add(s.subscribe(l=>{this.state$.isEnabled$.set(l)})),this.state$.type$.set(d),o}};import{filter as m5,filterChanged as v5}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Hm}from"@vkontakte/videoplayer-shared/es2015";var L1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?p5({maxCount:t}):void 0,e!==0?f5({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},p5=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,n;e[i]=((o=e[i])!=null?o:0)+1,Hm.set("videoplayer_notifications_manager_count",JSON.stringify((n=e[i])!=null?n:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},f5=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Hm.get(e)||"{}")}catch(a){return{}}},o=a=>Hm.set(e,JSON.stringify(a)),n=a=>{let s=i();delete s[a],o(s)};return{notificationShowed:a=>{o(Dt(q({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let s=i()[a];if(s){let d=Date.now()-s.launchTime>t;return d&&n(a),d}else return!0}}};var Bd=class extends Uo{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:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=L1({maxShowCount:a,timeout:s});let u=n.getPlayer();return o.add(u.events.severeStallOccured$.pipe(v5(),m5(v=>v)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var V1=()=>[Md,Ld,Vd,Rd,Dd,Nd,Bd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Dt(q({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Od}from"@vkontakte/videoplayer-shared/es2015";var g5=Object.defineProperty,h5=Object.defineProperties,_5=Object.getOwnPropertyDescriptors,R1=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,$5=Object.prototype.propertyIsEnumerable,Um=(t,e,i)=>e in t?g5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ks=(t,e)=>{for(var i in e||(e={}))b5.call(e,i)&&Um(t,i,e[i]);if(R1)for(var i of R1(e))$5.call(e,i)&&Um(t,i,e[i]);return t},y5=(t,e)=>h5(t,_5(e)),ti=(t,e,i)=>Um(t,typeof e!="symbol"?e+"":e,i),gu=(t,e,i)=>new Promise((o,n)=>{var a=l=>{try{d(i.next(l))}catch(u){n(u)}},s=l=>{try{d(i.throw(l))}catch(u){n(u)}},d=l=>l.done?o(l.value):Promise.resolve(l.value).then(a,s);d((i=i.apply(t,e)).next())}),M5={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:S5.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:P5(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},wn=ee(void 0),hu=class extends HTMLElement{constructor(){super(),ti(this,"svelteStubComponent"),ti(this,"svelteRootComponent"),ti(this,"store"),ti(this,"microStoresRoot"),ti(this,"statistics"),ti(this,"sentry"),ti(this,"_shadowRoot"),ti(this,"playerContainer"),ti(this,"rootContainer"),ti(this,"shadowRootContainer"),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,"prevIsid"),ti(this,"isInited",!1),ti(this,"internalsExposure",null),ti(this,"shadowDOMCallbacksDisabled",!1),ti(this,"createOneStat",(e,i={})=>{var o,n,a,s;let{albumId:d,statPlace:l,statUserSalt:u,statTrackCode:v,statVKAppId:$,refreshStatAuthToken:p,autoplay:_,isMobile:w,isTouch:y,refDomain:C,deviceId:T,interactiveData:E}=pu(this.videoConfig,i),P=(o=E==null?void 0:E.projectInfo)==null?void 0:o.pid,A=(a=(n=this.interactiveController)==null?void 0:n.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:I,isClip:V=!1}=e;if(this.uiConfig.features.statistics&&I)return new A5(ks({movieId:I,albumId:d,place:l,trackCode:v,vkAppId:$,autoplay:(s=_&&!this.interactiveController)!=null?s:!1,mobile:y!=null?y:w,clip:V,refDomain:C,deviceId:T},P&&(!this.isInited||A)&&{projectId:Number(P)}),ks({refreshAuthToken:p,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}),Od.create("ui"),this.logger=new C5,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new D1,this.interactiveSubscription=new D1,this.graphMadePause=!1}connectedCallback(){var e,i;if(this.isInited||this.shadowDOMCallbacksDisabled)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,n=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=fe({title:o,thumbUrl:n}),s={target:this.playerContainer,props:a};this.svelteStubComponent=es(Vm,s)}disconnectedCallback(){var e,i,o,n,a;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.mediaSessionApi)==null||i.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),(o=this.unsubscribePlayerPhaseSubscription)==null||o.call(this),(n=this.interactiveController)==null||n.destroy(),this.interactiveSubscription.unsubscribe(),(a=this.internalsExposure)==null||a.destroy(),Od.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.append(this.rootContainer)}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}}createPlayer(e,i={},o){var n,a,s,d,l,u,v,$;if(!this.videoConfig)return;let{albumId:p,statPlace:_,statAuthToken:w,preload:y,autoplay:C,volume:T,muted:E,fromTime:P,canRewindLive:A,supportLink:I,showAds:V,adsSlotId:H,adsParams:Y={},adsPreviewParam:O,adsAutoplayParam:J,interfaceLanguage:ne,isCyrillicRelatedInterface:Z,logoClickable:me,logoHidden:le,isMobile:Ve,isTouch:Me,isAudioDisabled:be,isLiveCatchUpMode:ae,fullScreenTarget:Le,failoverHosts:re,canDownload:N,callbacks:pe,interactiveData:_e,showThumbTimer:Ge,additionalButtons:ie=[],additionalSettingsMenuItems:G=[],additionalContextMenuItems:K=[],repeat:Re,saveRate:Ne,volumeMultiplier:et,showEndScreen:we,showAutoplayNext:Se}=pu(this.videoConfig,i),{sources:De,title:Xe,thumbUrl:ot,unitedVideoId:ft,isClip:Je=!1,duration:gt,adsParams:Et={},videoEpisodes:jt,previewThumbsData:qt,subtitles:Wt,live:ve}=e,j=ks(ks({},Y),Et),Ce=this.getNextVideoInfo(),se={sources:De,title:Xe,thumbUrl:ot,subtitles:Wt,unitedVideoId:ft,isClip:Je,live:ve,albumId:p,statPlace:_,autoplay:C,muted:E,volume:T,fromTime:P,canRewindLive:A,showAds:V,adsSlotId:H,adsParams:j,adsPreviewParam:O,adsAutoplayParam:J,duration:gt,logoClickable:me,logoHidden:le,isTouch:Me!=null?Me:Ve,repeat:Re,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Ce.nextVideoTitle,endScreenVideoThumb:Ce.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},Oe={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(se)}`});let Ue=(n=this.interactiveController)==null?void 0:n.state.statistics$.getValue(),tt=(Ue==null?void 0:Ue.oneStat)||this.createOneStat(e,i);tt&&(this.statistics=new jc(tt,Ue==null?void 0:Ue.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Xs(this.uiConfig.sentry,{version:Wa,env:$c},{movieId:ft,albumId:p,place:_,autoplay:(a=C&&!this.interactiveController)!=null?a:!1,mobile:Me!=null?Me:Ve,clip:Je}),this.interactiveController&&((d=this.prevIsid)!=null||(this.prevIsid=(s=this.statistics)==null?void 0:s.oneStat.isid$.getValue())),this.sentry=ks(ks({},this.sentry),Xs.getInstance());let Ye=!!_e,Ze=[],nt="tooltip_interactive_go_back_disabled_first";if(Ye&&this.interactiveController){let dt=this.interactiveController.state.isInitialChapter$.getValue(),Xt=this.interactiveController.getHistoryState();dt&&Ze.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ze.push("SEEK_TO_INTERACTIVE_BUTTON"),Xt.hasPrevChapter$.getValue()||(Ze.push("PLAY_PREV_CHAPTER_BUTTON"),dt||(Xt.isGoBackLimited$.getValue()?nt="tooltip_interactive_go_back_disabled_limit":nt="tooltip_interactive_go_back_disabled"))}let He=()=>{var dt;this.isInited=!1,this.prevIsid=void 0;let Xt=(o==null?void 0:o.info.isEnded$.getValue())&&((dt=this.interactiveController)==null?void 0:dt.state.isEndChapter$.getValue());pe.onReplayInteractiveVideo&&!Xt?pe.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=Xh({player:o,interfaceLanguage:ne,isCyrillicRelatedInterface:Z,videoId:ft,isClip:Je,isLiveCatchUpMode:ae,isAudioDisabled:be,statAuthToken:w,callbacks:pe,webApi:Oe,videoEpisodes:jt,previewThumbsData:qt,canDownload:N,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ze,isInteractive:Ye,saveRate:Ne,interactiveRanges$:(l=this.interactiveController)==null?void 0:l.state.interactiveRanges$,isInteractiveTime$:(u=this.interactiveController)==null?void 0:u.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:He,playPrevChapterDisabledTooltip:nt,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?ie:[],additionalSettingsMenuItems:G!=null?G:[],additionalContextMenuItems:K!=null?K:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:Re&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView});let{stores:$t}=this.microStoresRoot=V1(),qe=()=>{var dt,Xt,Ni,Pi,Ui,ji;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onCurrentFormatChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add($t.interactiveControlsOpacity$.subscribe(Lt=>{var yt;Lt!==null&&((yt=this==null?void 0:this.interactiveController)==null||yt.setDisabledControls(Lt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onThroughputEstimationChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onTrafficSavingEnabledChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(new T5(Lt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(yt=>Lt.next(yt)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?E5(1):Lt=>Lt).subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onCurrentPlaybackRateChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.volume$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onVolumeChange)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.muted$.subscribe(Lt=>{var yt,Rt;return Lt?(yt=pe==null?void 0:pe.onMute)==null?void 0:yt.call(pe):(Rt=pe==null?void 0:pe.onUnmute)==null?void 0:Rt.call(pe)})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onVideoBitrateChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Lt=>{var yt;let Rt=(yt=this.store)==null?void 0:yt.ui.controls.disabledControls$;Rt&&(Lt&&!Rt.includes(Nl)&&Rt.add(Nl),Lt||Rt.remove(Nl))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(Lt=>gu(this,null,function*(){var yt;if(!N1.browser.isSamsungBrowser||!Lt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((yt=this.videoConfig)==null?void 0:yt.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onVSIDChanged)==null?void 0:yt.call(pe,Lt)})),this.initMediaSession(),B(wn,fe({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:De,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Xe,thumbUrl:ot,subtitles:Wt,live:ve,preload:y,autoplay:C,muted:E,volume:T,fromTime:P,canRewindLive:A,supportLink:I,showAds:V,adsSlotId:H,adsParams:j,adsPreviewParam:O,adsAutoplayParam:J,duration:gt,logoClickable:me,logoHidden:le,isMobile:Me!=null?Me:Ve,failoverHosts:re,fullScreenTarget:Le,saveRate:Ne,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ge,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Ce.nextVideoTitle,endScreenVideoThumb:Ce.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:et,showEndScreen:we,showAutoplayNext:Se}));let Yi={target:this.playerContainer,props:r(wn)};this.svelteRootComponent=es(Am,Yi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(Ni=(Xt=(dt=this.videoConfig)==null?void 0:dt.callbacks)==null?void 0:Xt.onInited)==null||Ni.call(Xt)),(Pi=this.internalsExposure)==null||Pi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((ji=(Ui=this.videoConfig)==null?void 0:Ui.callbacks)!=null&&ji.onDevNullLog)?Od.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Od.destroy("ui")};this.coreConfig.asyncResolveClientChecker?N1.isInited$.subscribe(dt=>{dt&&(console.log("UI SDK async start"),qe())}):qe()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,n=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!n)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var l;return(l=a.onPlayerPhaseChanged)==null?void 0:l.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var l;return d&&((l=a.onPlaybackStateChanged)==null?void 0:l.call(a,d))})).add(o.state.isLive$.subscribe(d=>{var l;return(l=a.onIsLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var l;return(l=a.onIsActiveLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var l;return(l=a.onIsAudioAvailableChanged)==null?void 0:l.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var l;return(l=a.onCurrentQualityChanged)==null?void 0:l.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var l;return(l=a.onAvailableQualitiesChanged)==null?void 0:l.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(n.pictureInPicture$.isActive$.subscribe(d=>{var l,u;return d?(l=a.onPiPEnter)==null?void 0:l.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let s=a==null?void 0:a.uiInfo;s&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var l;return(l=s.onControlsVisibleChanged)==null?void 0:l.call(s,d)})).add(o.ui.isMobile.subscribe(d=>{var l;return(l=s.onIsMobileChanged)==null?void 0:l.call(s,d)})).add(o.ui.playerSize.subscribe(d=>{var l;return(l=s.onPlayerSizeChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var l;return(l=s.onPrevButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playButton.subscribe(d=>{var l;return(l=s.onPlayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var l;return(l=s.onReplayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var l;return(l=s.onNextButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var l;return(l=s.onPlayPrevChapterChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var l;return(l=s.onSeekToInteractiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var l;return(l=s.onGraphButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var l;return(l=s.onLiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.time.subscribe(d=>{var l;return(l=s.onTimeUpdateChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.episodes.subscribe(d=>{var l;return(l=s.onEpisodesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var l;return(l=s.onSubtitlesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.settings.subscribe(d=>{var l;return(l=s.onSettingsChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var l;return(l=s.onFullscreenChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var l;return(l=s.onChromecastChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.pip.subscribe(d=>{var l;return(l=s.onPipChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var l;return(l=s.onVkLogoChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var l;return(l=s.onInteractiveTimeIndicatorChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.timeline.subscribe(d=>{var l;return(l=s.onTimelineChanged)==null?void 0:l.call(s,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 n=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!n){this.log({message:"no next video"});return}this.isInited&&Fm(n.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(n.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(n,{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 gu(this,null,function*(){var e,i,o,n;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:a}=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$,d=s?Te(s):this.videoConfig.interfaceLanguage,{projectInfo:l,initChapterId:u,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new a({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:d,graph:this.uiConfig.features.interactiveGraph,projectInfo:l,initChapterId:u,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}});let{isInteractiveExpectation$:p,isSeekable$:_}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(_.subscribe(y=>{if(!this.isInited)return;let C=this.store;y?C.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):C.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(p.subscribe(y=>{this.store&&this.store.state.isInteractiveExpectation$.set(y)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(y=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=y5(ks({},y.config),{title:(l==null?void 0:l.title)||y.config.title});let C=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(y.player,C),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:y,actionType:C})=>{var T,E,P,A,I,V;if(!this.store||!this.microStoresRoot)return;let H=p.getValue();if(y==="action-choice"&&C==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Bl)),y==="action-choice-canceled"){let Y=Te(this.store.state.isPlaying$)||H;if(((P=(T=this.videoConfig)==null?void 0:T.isTouch)!=null?P:(E=this.videoConfig)!=null&&E.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(V=(A=this.videoConfig)==null?void 0:(I=A.callbacks).onDisabledInteractiveClick)==null||V.call(I)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:y,removeAllOpenURI:C})=>{this.store&&y==="container-fake-removed"&&C&&this.store.ui.controls.disabledControls$.remove(Bl)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(n=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&n.onInteractiveHistoryChanged){let y=this.interactiveController.getHistoryState();this.subscription.add(y.history$.subscribe(C=>{var T,E,P;C.length&&((P=(E=(T=this.videoConfig)==null?void 0:T.callbacks)==null?void 0:E.onInteractiveHistoryChanged)==null||P.call(E,C))}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var y,C,T,E;(y=this.microStoresRoot)==null||y.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(E=(C=this.videoConfig)==null?void 0:(T=C.callbacks).onInteractiveTimeIndicatorClick)==null||E.call(T)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(y=>{this.log({message:y.toString()})}))}catch(a){this.log({message:a.message})}})}initPlayer(e,i={}){var o,n,a,s,d,l,u,v,$,p,_,w,y,C,T,E,P,A,I,V,H,Y,O,J,ne,Z;if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=pu(M5,w5(e,me=>me instanceof HTMLElement?me:void 0)),this.uiConfig=Vg((o=i.ui)!=null?o:{}),this.coreConfig=(n=i.core)!=null?n:{configName:[]},this.statisticsConfig=(a=i.statistics)!=null?a:{},this.uiConfig.features.forcePlayerDisplayBlock&&(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&&((d=this.internalsExposure)!=null||(this.internalsExposure=new k5("UI"))),Od.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((l=this.videoConfig)==null?void 0:l.showAds)],numbers:[x5()]}),Fm(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(u=this.uiConfig.features.mediaSession)!=null?u:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Fm(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(p=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?p:!0,this.uiConfig.features.dpip=(w=(_=this.uiConfig.features.dpip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.videoConfig.isTouch=(C=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?C:this.videoConfig.isMobile,(T=this.videoConfig).autoplay&&(T.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.adsPreviewParam=(A=this.uiConfig.ads.preview)!=null?A:this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!((I=this.uiConfig.showLogo)!=null?I:!this.videoConfig.logoHidden),(V=this.videoConfig).canRewindLive&&(V.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(H=this.videoConfig.supportLink)!=null?H:this.uiConfig.supportLink,this.videoConfig.showEndScreen=(Y=this.uiConfig.features.endScreen)!=null?Y:this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=(O=this.uiConfig.features.autoplayNext)!=null?O:this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=(J=this.uiConfig.features.nextPrevButtons)!=null?J:this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((ne=this.videoConfig.videos)!=null&&ne[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let me={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=uu.getLatestSupportedVersion(me):this.pictureInPictureApi=new Js(me)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new cu:void 0,this.slotsApi=this.uiConfig.features.slots?new su:void 0,this.annotationsApi=this.uiConfig.features.annotations?new fu(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),(Z=this.slotsApi)==null||Z.init(this.shadowRootContainer),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),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]),k1(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot)}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();r(wn)&&(r(wn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(wn).nextButtonActive=this.isNextButtonActive(),r(wn).prevButtonActive=this.isPrevButtonActive(),r(wn).endScreenVideoTitle=o.nextVideoTitle,r(wn).endScreenVideoThumb=o.nextVideoThumb,r(wn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=ks({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",n=>this.seekTime(n.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>this.playNextVideo()]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>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="\u0420\u0435\u043A\u043B\u0430\u043C\u0430",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,n;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"}),(n=this.svelteRootComponent)==null||n.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()}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,r(wn)&&(r(wn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(wn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(wn).nextButtonActive=this.isNextButtonActive(),r(wn).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,n;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(n=this.svelteRootComponent)==null||n.setAutoQualityLimits(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return gu(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;this.log({message:"live started"}),(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)}setLiveWaitingRecover(){var e;this.log({message:"live waiting recover"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!0),(o=this.store)==null||o.destroy()})}setLiveWaitingRecord(){var e;this.log({message:"post live"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecord(!0),(o=this.store)==null||o.destroy()})}setLiveEnd(e){var i;this.log({message:"live ended"}),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var o,n;(o=this.store)==null||o.actions.internal.setLiveWaitingRecover(!1),(n=this.store)==null||n.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}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;return(i=(e=this.statistics)==null?void 0:e.oneStat.getDeviceId())!=null?i:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return gu(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let n=Te(this.store.state.positionExact$),s=Te(this.store.state.interactiveEpisodes$).find(l=>!l.completed);this.interactiveController.events.playerChanged$.pipe(I5()).subscribe(()=>{s&&n>=s.time?this.seekTime(s.time):this.seekTime(n),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.updateContext(e)}handleTimerNextVideo(e){var i;(i=this.store)==null||i.actions.internal.setTimerNextVideoRunning(e)}focus(){var e,i,o;(o=(i=(e=this.svelteRootComponent)==null?void 0:e.keyboardControls)==null?void 0:i.focus)==null||o.call(i)}unmountComponent(e){e&&Ks(e)}};import{InterfaceLanguage as BJ,VKNumericLanguage as OJ,loadVKLangPack as HJ}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as UJ,VideoFormat as zJ}from"@vkontakte/videoplayer-core/es2015";var PJ=()=>{window.customElements.define("vk-video-player",hu)};export{Yc as ControlButtonType,Fr as GridTypes,BJ as InterfaceLanguage,Gl as MenuItemType,ns as PlayerPhase,Wa as VERSION,OJ as VKNumericLanguage,zJ as VideoFormat,UJ as VideoQuality,HJ as loadVKLangPack,PJ as registerPlayerWebComponent};
395
+ /* \u041A\u043B\u0430\u0441\u0441 \u0434\u043B\u044F \u0441\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043B\u044C\u043D\u043E \u043D\u043E \u043D\u0435 \u0434\u043B\u044F \u043E\u0431\u0445\u043E\u0434\u0430 \u043F\u043E \u0442\u0430\u0431 \u0438 \u0441\u043A\u0440\u0438\u043D \u0440\u0438\u0434\u0435\u0440\u0430 */.out-of-view {position:absolute !important;left:-1000vh !important;}.icon.icon-error-stub {display:flex;justify-content:center;align-items:center;}`};function Am(t,e){U(e,!0),W(t,Ux);let[i,o]=Be(),n=()=>S(jt,"$isLive$",i),a=f(e,"sources",7),s=f(e,"store",7),d=f(e,"microStoresRoot",7),l=f(e,"videoConfig",7),u=f(e,"uiConfig",7),v=f(e,"title",7),$=f(e,"thumbUrl",7),p=f(e,"interactiveContainer",7),_=f(e,"interactiveController",7),w=f(e,"subtitles",7),y=f(e,"live",7),C=f(e,"preload",7),T=f(e,"autoplay",7),E=f(e,"volume",7,void 0),P=f(e,"muted",7,void 0),A=f(e,"fromTime",7),I=f(e,"canRewindLive",7),V=f(e,"showAds",7),H=f(e,"adsSlotId",7,void 0),Y=f(e,"adsParams",7,void 0),O=f(e,"adsPreviewParam",7,void 0),J=f(e,"adsAutoplayParam",7,void 0),ne=f(e,"duration",7,void 0),Z=f(e,"logoClickable",7),me=f(e,"logoHidden",7),le=f(e,"isMobile",7),Ve=f(e,"showNextPrevButtons",7,!1),Me=f(e,"nextButtonActive",7,!1),be=f(e,"prevButtonActive",7,!1),ae=f(e,"endScreenVideoTitle",7,void 0),Le=f(e,"endScreenVideoThumb",7,void 0),re=f(e,"isOneVideoPlaylist",7,!1),N=f(e,"supportLink",7),pe=f(e,"shadowRootContainer",7,void 0),_e=f(e,"outerContainerRef",7,void 0),Ge=f(e,"fullScreenTarget",7,void 0),ie=f(e,"failoverHosts",7,void 0),G=f(e,"showMiniTimer",7,!1),K=f(e,"saveRate",7),Re=f(e,"seekToInteractive",7,I1),Ne=f(e,"playPrevChapter",7,I1),et=f(e,"volumeMultiplier",7),we=f(e,"showAutoplayNext",7),Se=f(e,"showEndScreen",7,!0),De=f(e,"keyboardControls",15,void 0),{subscribers:Xe,stores:ot}=d();Rg(u());let ft=zt(),Je=u().logoLink,gt=s().ui.debugPanelVisible,Et=s().ui.playerSize,jt=s().state.isLive$,Wt=s().state.isInteractive&&Pm.device.isAndroid,ve=ee(void 0),j=null,Ce=ee(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{isMobile:s().ui.isMobile,mobileUnmuteButtonVisible:s().ui.mobileUnmuteButtonVisible,vsid:s().vsid}),Wg(s(),ot),We(()=>{s().ui.isMobile.set(le())});let se=(X=!1)=>{B(Ce,!0),X?s().actions.external.firstStart(V()):s().actions.internal.firstStart(V())},He=()=>{if(ft.features.qualityDetailsSubMenuEnabled){let X=uh(s().videoId);if(X)switch(X.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,X.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,X.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(X.quality);break}}else{ph(s().videoId),Ip()&&s().actions.internal.setTrafficSavingEnabled(!0);let ii=wp(s().videoId);ii&&s().actions.internal.setQuality(ii)}};function Ue(X){var fi,si,ut;let ii=a()||X;ii&&s().initVideo({container:r(ve),sources:ii,failoverHosts:ie(),subtitles:w(),volumeMultiplier:et()});let pi=Bx.get(Dl)==="true";gt.set(pi),A()>0&&s().actions.external.seekTime(A());let zi=le()?ft.volumeDefault:(si=(fi=E())!=null?fi:wc())!=null?si:ft.volumeDefault,ri=(ut=P())!=null?ut:rh();if(s().actions.external.setVolume(zi),s().actions.external.setMuted(ri),s().getAdmanWrapper().setInitialVolume(ri?0:zi),He(),ft.features.saveRate&&K()){let mo=lh();mo&&!n()&&s().actions.internal.setPlaybackRate(mo)}if(we()){let mo=ch();mo&&s().actions.internal.setAutoplayNextEnabled(mo)}s().ui.isAutoplay.set(T()),T()?se():C()&&ft.features.preload&&s().actions.internal.preload()}let tt=X=>{if(window.ResizeObserver){let ii,pi;j=new ResizeObserver(Ox(zi=>{let ri=zi[0];if(ri.contentBoxSize){let fi=Array.isArray(ri.contentBoxSize)?ri.contentBoxSize[0]:ri.contentBoxSize;ii=fi.inlineSize,pi=fi.blockSize}else ri.contentRect&&(ii=ri.contentRect.width,pi=ri.contentRect.height);Et.set({width:ii,height:pi})},300)),j.observe(X)}Et.set({width:X.clientWidth,height:X.clientHeight})},ct=()=>{document.hidden&&s().actions.external.stop()};Ut(()=>{var pi,zi,ri,fi;Wt&&document.addEventListener("visibilitychange",ct),ft.debugLog&&s().actions.internal.startLogging(),tt(r(ve));let X=Xe.map(si=>si.init({store:s(),microStores:ot,config:l(),interactiveController:_(),uiConfig:u()})),ii=()=>{Wt&&document.removeEventListener("visibilitychange",ct),j==null||j.disconnect(),X.forEach(si=>si.unsubscribe()),s().destroy()};return((pi=y())==null?void 0:pi.status)==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),ii):((zi=y())==null?void 0:zi.status)==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),ii):(((ri=y())==null?void 0:ri.status)==="finished"||((fi=y())==null?void 0:fi.status)==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),ii):(Ue(),ii)});function Ye(){r(Ce)?s().actions.external.play():se(!0)}function Ze(){s().actions.external.pause()}function nt(X){s().actions.external.setMuted(X)}function Fe(){s().actions.external.toggleSubtitle()}function $t(X){le()||X>=0&&X<=1&&s().actions.external.setVolume(X)}function qe(X){s().actions.internal.seekTime(X,Hx.UNKNOWN)}function dt(X){s().actions.external.seekEpisodeStartTime(X)}function Xt(){s().actions.external.returnFocusToEpisodes()}function Ni(X){s().actions.external.setPlaybackRate(X)}function Pi(X){s().actions.external.setAutoQualityLimits(X)}let Ui=du(ft.view),ji=l().playerView==="preview";var Yi=Fx();let Lt;it(Yi,Ui);var yt=h(Yi);{var Rt=X=>{km(X,{get store(){return s()},uiConfig:ft,get thumbUrl(){return $()},get interactiveContainer(){return p()},get live(){return y()},get autoplay(){return T()},get canRewindLive(){return I()},get showAds(){return V()},get adsSlotId(){return H()},get adsParams(){return Y()},get adsPreviewParam(){return O()},get adsAutoplayParam(){return J()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return me()},logoTargetUrl:Je,get nextButtonActive(){return Me()},get prevButtonActive(){return be()},get endScreenVideoTitle(){return ae()},get endScreenVideoThumb(){return Le()},get isOneVideoPlaylist(){return re()},get supportLink(){return N()},get shadowRootContainer(){return pe()},get outerContainerRef(){return _e()},get fullScreenTarget(){return Ge()},get showMiniTimer(){return G()},get playerStarted(){return r(Ce)},get seekToInteractive(){return Re()},get playPrevChapter(){return Ne()},firstStart:se,seekTime:qe,get showEndScreen(){return Se()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return Ve()},get videoContainer(){return r(ve)},set videoContainer(ii){B(ve,fe(ii))}})},So=X=>{var ii=ze(),pi=ue(ii);{var zi=fi=>{Em(fi,{get thumbUrl(){return $()},get outsideDuration(){return ne()},get canRewindLive(){return I()},get videoContainer(){return r(ve)},set videoContainer(si){B(ve,fe(si))}})},ri=fi=>{Tm(fi,{get store(){return s()},uiConfig:ft,get title(){return v()},get thumbUrl(){return $()},get interactiveContainer(){return p()},get live(){return y()},get autoplay(){return T()},get canRewindLive(){return I()},get showAds(){return V()},get adsSlotId(){return H()},get adsParams(){return Y()},get adsPreviewParam(){return O()},get adsAutoplayParam(){return J()},get duration(){return ne()},get logoClickable(){return Z()},get logoHidden(){return me()},logoTargetUrl:Je,get nextButtonActive(){return Me()},get prevButtonActive(){return be()},get endScreenVideoTitle(){return ae()},get endScreenVideoThumb(){return Le()},get isOneVideoPlaylist(){return re()},get supportLink(){return N()},get shadowRootContainer(){return pe()},get outerContainerRef(){return _e()},get fullScreenTarget(){return Ge()},get showMiniTimer(){return G()},get playerStarted(){return r(Ce)},get seekToInteractive(){return Re()},get playPrevChapter(){return Ne()},firstStart:se,get showEndScreen(){return Se()},get showAutoplayNext(){return we()},get showNextPrevButtons(){return Ve()},get videoContainer(){return r(ve)},set videoContainer(si){B(ve,fe(si))},get keyboardControls(){return De()},set keyboardControls(si){De(si)}})};R(pi,fi=>{ji?fi(zi):fi(ri,!1)})}b(X,ii)};R(yt,X=>{le()?X(Rt):X(So,!1)})}g(Yi),k(X=>Lt=te(Yi,1,"root svelte-7ed4yj",null,Lt,X),[()=>({"root--miui-browser":Pm.device.isMobile&&Pm.browser.isMiuiBrowser,"visible-outside":ji})]),b(t,Yi);var an=z({initVideo:Ue,play:Ye,pause:Ze,setMuted:nt,toggleSubtitle:Fe,setVolume:$t,seekTime:qe,seekEpisodeStartTime:dt,returnFocusToEpisodes:Xt,setPlaybackRate:Ni,setAutoQualityLimits:Pi,get sources(){return a()},set sources(X){a(X)},get store(){return s()},set store(X){s(X)},get microStoresRoot(){return d()},set microStoresRoot(X){d(X)},get videoConfig(){return l()},set videoConfig(X){l(X)},get uiConfig(){return u()},set uiConfig(X){u(X)},get title(){return v()},set title(X){v(X)},get thumbUrl(){return $()},set thumbUrl(X){$(X)},get interactiveContainer(){return p()},set interactiveContainer(X){p(X)},get interactiveController(){return _()},set interactiveController(X){_(X)},get subtitles(){return w()},set subtitles(X){w(X)},get live(){return y()},set live(X){y(X)},get preload(){return C()},set preload(X){C(X)},get autoplay(){return T()},set autoplay(X){T(X)},get volume(){return E()},set volume(X){E(X)},get muted(){return P()},set muted(X){P(X)},get fromTime(){return A()},set fromTime(X){A(X)},get canRewindLive(){return I()},set canRewindLive(X){I(X)},get showAds(){return V()},set showAds(X){V(X)},get adsSlotId(){return H()},set adsSlotId(X){H(X)},get adsParams(){return Y()},set adsParams(X){Y(X)},get adsPreviewParam(){return O()},set adsPreviewParam(X){O(X)},get adsAutoplayParam(){return J()},set adsAutoplayParam(X){J(X)},get duration(){return ne()},set duration(X){ne(X)},get logoClickable(){return Z()},set logoClickable(X){Z(X)},get logoHidden(){return me()},set logoHidden(X){me(X)},get isMobile(){return le()},set isMobile(X){le(X)},get showNextPrevButtons(){return Ve()},set showNextPrevButtons(X){Ve(X)},get nextButtonActive(){return Me()},set nextButtonActive(X){Me(X)},get prevButtonActive(){return be()},set prevButtonActive(X){be(X)},get endScreenVideoTitle(){return ae()},set endScreenVideoTitle(X){ae(X)},get endScreenVideoThumb(){return Le()},set endScreenVideoThumb(X){Le(X)},get isOneVideoPlaylist(){return re()},set isOneVideoPlaylist(X){re(X)},get supportLink(){return N()},set supportLink(X){N(X)},get shadowRootContainer(){return pe()},set shadowRootContainer(X){pe(X)},get outerContainerRef(){return _e()},set outerContainerRef(X){_e(X)},get fullScreenTarget(){return Ge()},set fullScreenTarget(X){Ge(X)},get failoverHosts(){return ie()},set failoverHosts(X){ie(X)},get showMiniTimer(){return G()},set showMiniTimer(X){G(X)},get saveRate(){return K()},set saveRate(X){K(X)},get showAutoplayNext(){return we()},set showAutoplayNext(X){we(X)},get seekToInteractive(){return Re()},set seekToInteractive(X){Re(X)},get playPrevChapter(){return Ne()},set playPrevChapter(X){Ne(X)},get volumeMultiplier(){return et()},set volumeMultiplier(X){et(X)},get showEndScreen(){return Se()},set showEndScreen(X){Se(X)},get keyboardControls(){return De()},set keyboardControls(X){De(X)}});return o(),an}var zx=ye('<svg><!><path fill="currentColor" d="M38.245 6c3.566 0 4.859.371 6.162 1.069a7.27 7.27 0 0 1 3.025 3.024c.697 1.303 1.068 2.597 1.068 6.163v23.489c0 3.566-.371 4.859-1.069 6.162a7.27 7.27 0 0 1-3.024 3.025C43.104 49.629 41.811 50 38.245 50h-19.49c-3.565 0-4.859-.371-6.162-1.069a7.27 7.27 0 0 1-3.024-3.024C8.87 44.604 8.5 43.311 8.5 39.745v-23.49c0-3.565.371-4.859 1.069-6.162a7.27 7.27 0 0 1 3.024-3.024C13.896 6.37 15.19 6 18.756 6zm.314 3H18.756c-2.799 0-3.761.186-4.749.714a4.27 4.27 0 0 0-1.793 1.793c-.508.95-.7 1.876-.713 4.434L11.5 39.744c0 2.799.186 3.761.714 4.749a4.27 4.27 0 0 0 1.793 1.793c.988.528 1.95.714 4.749.714h19.489c2.798 0 3.76-.186 4.748-.714a4.27 4.27 0 0 0 1.793-1.793c.528-.988.714-1.95.714-4.748v-23.49c0-2.798-.186-3.76-.714-4.748a4.27 4.27 0 0 0-1.793-1.793c-.95-.508-1.876-.7-4.434-.713zM19.22 38c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.163.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.607-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.608.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134zm-20-8c.445 0 .607.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.162.088-.324.134-.77.134h-1.436c-.446 0-.608-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.162-.088.324-.134.77-.134h1.436zm20 0c.445 0 .606.046.77.134a.9.9 0 0 1 .377.378c.088.162.134.324.134.77v1.436c0 .446-.046.608-.134.77a.9.9 0 0 1-.378.378c-.163.088-.324.134-.77.134h-1.436c-.446 0-.607-.046-.77-.134a.9.9 0 0 1-.378-.378c-.088-.162-.134-.324-.134-.77v-1.436c0-.446.046-.607.134-.77a.9.9 0 0 1 .378-.378c.163-.088.324-.134.77-.134z"></path></svg>');function Mm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=zx();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"57",height:"60",fill:"none","aria-hidden":"true","data-testid":"stub-icon",role:"img"},i))),b(t,o)}function Lm(t,e){let i=f(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");Mm(t,{get style(){return r(o)}})}var qx=L('<div class="title svelte-1y9fytq"> </div>'),Wx=L('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),Kx={hash:"svelte-1y9fytq",code:".playerStub.svelte-1y9fytq {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.title.svelte-1y9fytq {position:absolute;left:0;top:0;width:100%;font-size:15px;color:#fff;box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"};function Vm(t,e){W(t,Kx);var i=Wx(),o=h(i);{var n=d=>{var l=qx(),u=h(l,!0);g(l),k(()=>ge(u,e.title)),b(d,l)};R(o,d=>{e.title&&d(n)})}var a=M(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);Lm(d,{get isWhite(){return r(l)}})};R(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),k(()=>it(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}import{now as x5}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as w5,InterfaceLanguage as S5,isNonNullable as Fm,Logger as C5,Observable as T5,Subscription as D1,once as I5,InternalsExposure as k5,skip as E5}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as N1,isMobile as P5}from"@vkontakte/videoplayer-core/es2015";import{OneStat as A5}from"@vkontakte/videoplayer-statistics/es2015";import{Logger as Qx,Subscription as Gx}from"@vkontakte/videoplayer-shared/es2015";var cu=class{constructor(){this.subscription=new Gx,this.logger=new Qx,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[n,a]of e)try{(o=(i=navigator.mediaSession).setActionHandler)==null||o.call(i,n,a)}catch(s){throw new Error(`The media session action "${n}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{var a,s;let o=Te(e.state.currentPlaybackRate$),n=Te(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{(s=(a=navigator.mediaSession).setPositionState)==null||s.call(a,{position:i,playbackRate:o,duration:n})}catch(d){this.log({message:`MediaSession setPositionState can't call with position: ${i} and duration: ${n}`})}})))}clearSubscriptions(){this.subscription.unsubscribe()}destroy(){this.resetActionHandlers(),this.clearSubscriptions()}};import{ValueSubject as Bm,detectEmbed as e5}from"@vkontakte/videoplayer-shared/es2015";var jx=ye('<svg><!><g fill="var(--btn-color, #fff)"><path d="m30.744 4 .744.005c2.981.046 4.526.385 6.127 1.24a8.77 8.77 0 0 1 3.475 3.347l.174.312.15.292c.772 1.553 1.066 3.18 1.085 6.251v9.045a1.5 1.5 0 0 1-3 .016l-.008-9.651c-.04-2.032-.228-3.12-.627-4.035l-.126-.27-.13-.252A5.77 5.77 0 0 0 36.2 7.891c-1.187-.635-2.339-.873-5.115-.89L22.255 7c-2.737 0-4.003.2-5.071.698l-.133.064-.251.13a5.77 5.77 0 0 0-2.409 2.408c-.635 1.187-.873 2.339-.89 5.114l-.001 20.83c0 2.738.2 4.004.698 5.072l.064.133.13.251a5.77 5.77 0 0 0 2.408 2.409c1.1.588 2.134.825 4.438.88l.323.006 3.695.005H26a1.5 1.5 0 0 1 0 3h-.756l-3.718-.005c-2.989-.047-4.526-.377-6.14-1.24a8.77 8.77 0 0 1-3.476-3.347l-.174-.312-.15-.292c-.731-1.472-1.036-3.016-1.08-5.803l-.006-.756v-20.49l.005-.743c.046-2.981.385-4.526 1.24-6.127a8.77 8.77 0 0 1 3.347-3.475l.312-.174.292-.15c1.472-.731 3.016-1.036 5.803-1.08L22.256 4z"></path><path d="M30.5 33.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C32.78 29 33.62 29 35.3 29h6.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311c.327.642.327 1.482.327 3.162v13.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C44.22 52 43.38 52 41.7 52h-6.4c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C30.5 49.72 30.5 48.88 30.5 47.2z"></path></g></svg>');function Rm(t,e){let i=Ae(e,["$$slots","$$events","$$legacy","children"]);var o=jx();let n;var a=h(o);he(a,()=>{var s;return(s=e.children)!=null?s:oe}),$e(),g(o),k(()=>n=ke(o,n,q({xmlns:"http://www.w3.org/2000/svg",width:"57",height:"56",fill:"none","aria-label":"dummy-image","data-testid":"pip-dummy-icon",role:"img"},i))),b(t,o)}var Yx=L('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),Zx={hash:"svelte-1pbsod4",code:".player-pip-dummy.svelte-1pbsod4 {width:100%;height:100%;background-color:#19191A;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.player-pip-dummy.is-pip-api.svelte-1pbsod4 {position:relative;}.dummy-image.svelte-1pbsod4 svg {transform:scale(1.07143);}.dummy-image.desktop.svelte-1pbsod4 {transform:scale(1.07143) rotate(-90deg) rotateY(180deg);}.title.svelte-1pbsod4 {font-size:16px;color:#fff;padding:18px 20px 10px;text-align:center;}"};function Dm(t,e){U(e,!0),W(t,Zx);let[i,o]=Be(),n=()=>S(u,"$interfaceLanguage$",i),a=()=>S(v,"$isMobile$",i),s=Ie(),d=zt(),l=!!s.webApi.pictureInPictureApi,u=s.interfaceLanguage$,v=s.ui.isMobile,$=s.ui.t,p=m(()=>n()&&$("pip_dummy_title")),_=du(d.view);var w=Yx();te(w,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),it(w,_);var y=h(w);let C;var T=h(y);Rm(T,{}),g(y);var E=M(y,2),P=h(E,!0);g(E),g(w),k(A=>{C=te(y,1,"dummy-image svelte-1pbsod4",null,C,A),ge(P,r(p))},[()=>({desktop:!a()})]),b(t,w),z(),o()}var Xx=Object.defineProperty,Jx=(t,e,i)=>e in t?Xx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,sl=(t,e,i)=>Jx(t,typeof e!="symbol"?e+"":e,i),Nm=(t,e,i)=>new Promise((o,n)=>{var a=l=>{try{d(i.next(l))}catch(u){n(u)}},s=l=>{try{d(i.throw(l))}catch(u){n(u)}},d=l=>l.done?o(l.value):Promise.resolve(l.value).then(a,s);d((i=i.apply(t,e)).next())}),t5=460,i5=280,Ad=class{constructor({enabled:e=!0}={enabled:!0}){sl(this,"playerDomElement"),sl(this,"playerParentShadowRoot"),sl(this,"playerDummyElement"),sl(this,"svelteContext"),sl(this,"pipWindow"),sl(this,"info",{isActive$:new Bm(!1),isEnabled$:new Bm(!1),type:1}),this.info.isEnabled$=new Bm(e)}isSupported(){let{isEmbed:e}=e5();return"documentPictureInPicture"in window&&!e}isActive(){return this.isSupported()&&!!documentPictureInPicture.window}setPlayerDomElement(e,i){this.playerDomElement=e,this.playerParentShadowRoot=i}setContext(e){this.svelteContext=e}request(){return Nm(this,null,function*(){var e,i;if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=yield documentPictureInPicture.requestWindow({width:t5,height:i5,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let o=[...this.playerParentShadowRoot.styleSheets].map(l=>[...l.cssRules].map(u=>u.cssText).join(" ")).filter(Boolean).join(`
396
+ `),n=document.createElement("style");n.textContent=o;let a=this.createStretchedContainer(),s=a.attachShadow({mode:"open"});s.append(n),s.append(this.playerDomElement);let d={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=es(Dm,d),(e=this.pipWindow)==null||e.document.body.append(a),this.info.isActive$.next(!0),(i=this.pipWindow)==null||i.addEventListener("unload",l=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Ks(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})})}remove(){return Nm(this,null,function*(){return new Promise(e=>{var i;(i=documentPictureInPicture.window)==null||i.close(),e()})})}dispose(){return Nm(this,null,function*(){yield this.remove()})}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 k1(t){return t instanceof Ad}var uu=class{static getLatestSupportedVersion(e){let i=new Js(e),o=new Ad(e);if(o.isSupported())return o;if(i.isSupported())return i}};function pu(t,e){var n,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let s of i)o[s]=(a=(n=e[s])!=null?n:t[s])!=null?a:void 0;return o}var E1="Inner error. Unexpectedly root annotation container null reference exception",P1="Annotation with such name already exists",A1="Annotation with such name does not exist";var al=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as o5,Subscription as n5,throttleFn as r5}from"@vkontakte/videoplayer-shared/es2015";var s5="1",a5=100,fu=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new n5}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=r5(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},a5);this.subscriptions.add(o5(this.rootAnnotationsContainer).subscribe(({width:o,height:n})=>{this.playerSize={width:o,height:n},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 al(E1);if(this.annotations.has(e))throw new al(P1);i.style.zIndex=(o=i.style.zIndex)!=null?o:s5,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 al(A1);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 n=e.offsetTop,a=e.offsetLeft,s=e.offsetWidth,d=e.offsetHeight;return n<0||a<0||a+s>i||n+d>o}registryRootContainer(e){}addLayer(e){return document.createElement("div")}getLayer(e){}removeLayer(e){}clearLayer(e){}detach(){}reattach(){}};import{assertNonNullable as mu,Subscription as l5}from"@vkontakte/videoplayer-shared/es2015";var Uo=class{init({store:e,microStores:i,interactiveController:o,config:n}){return mu(e),mu(i),mu(n),n.interactiveData&&mu(o),this.subscription=new l5,this.subscription}};var Md=class extends Uo{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$=Dt(q({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{isInteractiveExpectation$:n}=i.store.state;return o.add(n.subscribe(a=>{this.state$.set(a?!0:null)})),o}};var Ld=class extends Uo{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$=Dt(q({},de(null)),{toggle:()=>this.state$.update(i=>!i)})}init(i){let o=super.init(i),{microStores:n,store:a}=i,{fakeIsPlaying$:s}=n,{isInteractiveExpectation$:d,isPlaying$:l}=a.state,{controlsVisible:u,isMobile:v}=a.ui,$=Te(v),p=()=>$&&Te(u);return o.add(u.subscribe(_=>{if(!$)return;let w=Te(s);Te(l)?this.state$.set(_):w!==null&&this.state$.set(!w||_)})),o.add(l.subscribe(_=>{this.state$.set(!_||p())})),o.add(s.subscribe(_=>{if(_===null)return;let w=Te(d);if(p()){this.state$.set(!0);return}w&&this.state$.set(!_)})),o}};var Vd=class extends Uo{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=de("tooltip_chapter_without_interactive")}init(i){let o=super.init(i),{store:n}=i;return o.add(n.state.interactiveEpisodes$.subscribe(a=>{a.length&&(a.every(s=>s.completed)?this.state$.set("tooltip_interactive_of_chapter_completed"):this.state$.set("tooltip_disabled_when_interactive"))})),o}};import{combine as d5}from"@vkontakte/videoplayer-shared/es2015";var Om=de(!1),vu=null,Rd=class extends Uo{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$=Dt(q({},Om),{set:(i,o=!1)=>{i!==Te(Om)&&(this.clearTimeout(),Om.set(i),!i&&vu&&(vu=!1),i&&o&&(this.timeout=setTimeout(()=>{this.state$.set(!1)},3e3)))},clearTimeout:()=>this.clearTimeout()})}init(i){let o=super.init(i),{store:n,config:a}=i,{isInteractiveTime$:s,isPlaying$:d}=n.state,l=n.ui.controlsVisible,{interactiveTimeIndicator:u}=n.ui.controls;o.add(l.subscribe($=>{Te(s)&&$&&this.state$.set(!1)}));let v=(a==null?void 0:a.interactiveData)||{tooltipHelpHintActive:!1};return o.add(d5({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:u}).subscribe(({isPlaying$:$,isInteractiveTime$:p,interactiveTimeIndicator:_})=>{var w,y;if(!(!$||!(_!=null&&_.isDisplayed))){if(!p)return this.state$.set(!1);v.tooltipHelpHintActive&&vu===null&&(vu=!0,v.tooltipHelpHintActive=!1,this.state$.set(!0),(y=(w=n.callbacks)==null?void 0:w.onInteractiveTimeIndicatorHintDeactivated)==null||y.call(w))}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as c5,noop as u5}from"@vkontakte/videoplayer-shared/es2015";var Dd=class extends Uo{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$=Dt(q({},de(null)),{toggle:u5});this.checkIfShouldHide=i=>Cs(i,"s")}init(i){let o=super.init(i),{store:n,interactiveController:a}=i,s=n.ui.currentGridType$,d=n.getLogger().createComponentLog("GraphIsOpened microStore");return this.state$.toggle=()=>kt(this,null,function*(){if(this.checkIfShouldHide(Te(s)))return;let l=Te(this.state$),{isEnded$:u,playbackState$:v}=n.state,{disabledControls$:$}=n.ui.controls,p=Te(u),_=Te(v);if(l)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1),$.remove(gp),!p&&this.graphMadePause&&n.actions.internal.play()}catch(w){d({message:"Cant hide graph"})}else{this.graphMadePause=_==="playing";try{yield a==null?void 0:a.toggleGraphView(!0),this.state$.set(!0),$.add(gp),!p&&this.graphMadePause&&n.actions.internal.pause()}catch(w){d({message:"Cant show graph"})}}}),o.add(c5({graphIsOpened:this.state$,currentGridType:s}).subscribe(v=>kt(this,[v],function*({graphIsOpened:l,currentGridType:u}){if(this.checkIfShouldHide(u)&&l)try{yield a==null?void 0:a.toggleGraphView(!1),this.state$.set(!1)}catch(p){d({message:"Cant hide graph"})}}))),o}};import{ValueSubject as M1}from"@vkontakte/videoplayer-shared/es2015";var Nd=class extends Uo{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:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new M1(!1),isEnabled$:new M1(!1)}};return o.add(a.subscribe(l=>{this.state$.isActive$.set(l)})),o.add(s.subscribe(l=>{this.state$.isEnabled$.set(l)})),this.state$.type$.set(d),o}};import{filter as m5,filterChanged as v5}from"@vkontakte/videoplayer-shared/es2015";import{safeStorage as Hm}from"@vkontakte/videoplayer-shared/es2015";var L1=({maxShowCount:t,timeout:e})=>{let i=[t!==0?p5({maxCount:t}):void 0,e!==0?f5({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},p5=({maxCount:t})=>{let e={};return{notificationShowed:i=>{var o,n;e[i]=((o=e[i])!=null?o:0)+1,Hm.set("videoplayer_notifications_manager_count",JSON.stringify((n=e[i])!=null?n:0))},canShowNotification:i=>{var o;return((o=e[i])!=null?o:0)<t}}},f5=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(Hm.get(e)||"{}")}catch(a){return{}}},o=a=>Hm.set(e,JSON.stringify(a)),n=a=>{let s=i();delete s[a],o(s)};return{notificationShowed:a=>{o(Dt(q({},i()),{[a]:{timeout:t,launchTime:Date.now()}}))},canShowNotification:a=>{let s=i()[a];if(s){let d=Date.now()-s.launchTime>t;return d&&n(a),d}else return!0}}};var Bd=class extends Uo{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:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=L1({maxShowCount:a,timeout:s});let u=n.getPlayer();return o.add(u.events.severeStallOccured$.pipe(v5(),m5(v=>v)).subscribe(()=>{d&&!u.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var V1=()=>[Md,Ld,Vd,Rd,Dd,Nd,Bd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:Dt(q({},e),{[o.stateName]:o.state$})}},{subscribers:[],stores:{}});import{devNull as Od}from"@vkontakte/videoplayer-shared/es2015";var g5=Object.defineProperty,h5=Object.defineProperties,_5=Object.getOwnPropertyDescriptors,R1=Object.getOwnPropertySymbols,b5=Object.prototype.hasOwnProperty,$5=Object.prototype.propertyIsEnumerable,Um=(t,e,i)=>e in t?g5(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,ks=(t,e)=>{for(var i in e||(e={}))b5.call(e,i)&&Um(t,i,e[i]);if(R1)for(var i of R1(e))$5.call(e,i)&&Um(t,i,e[i]);return t},y5=(t,e)=>h5(t,_5(e)),ti=(t,e,i)=>Um(t,typeof e!="symbol"?e+"":e,i),gu=(t,e,i)=>new Promise((o,n)=>{var a=l=>{try{d(i.next(l))}catch(u){n(u)}},s=l=>{try{d(i.throw(l))}catch(u){n(u)}},d=l=>l.done?o(l.value):Promise.resolve(l.value).then(a,s);d((i=i.apply(t,e)).next())}),M5={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:S5.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:P5(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},wn=ee(void 0),hu=class extends HTMLElement{constructor(){super(),ti(this,"svelteStubComponent"),ti(this,"svelteRootComponent"),ti(this,"store"),ti(this,"microStoresRoot"),ti(this,"statistics"),ti(this,"sentry"),ti(this,"_shadowRoot"),ti(this,"playerContainer"),ti(this,"rootContainer"),ti(this,"shadowRootContainer"),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,"prevIsid"),ti(this,"isInited",!1),ti(this,"internalsExposure",null),ti(this,"shadowDOMCallbacksDisabled",!1),ti(this,"createOneStat",(e,i={})=>{var o,n,a,s;let{albumId:d,statPlace:l,statUserSalt:u,statTrackCode:v,statVKAppId:$,refreshStatAuthToken:p,autoplay:_,isMobile:w,isTouch:y,refDomain:C,deviceId:T,interactiveData:E}=pu(this.videoConfig,i),P=(o=E==null?void 0:E.projectInfo)==null?void 0:o.pid,A=(a=(n=this.interactiveController)==null?void 0:n.state.isReplay$.getValue())!=null?a:!1;A&&(this.prevIsid=void 0);let{unitedVideoId:I,isClip:V=!1}=e;if(this.uiConfig.features.statistics&&I)return new A5(ks({movieId:I,albumId:d,place:l,trackCode:v,vkAppId:$,autoplay:(s=_&&!this.interactiveController)!=null?s:!1,mobile:y!=null?y:w,clip:V,refDomain:C,deviceId:T},P&&(!this.isInited||A)&&{projectId:Number(P)}),ks({refreshAuthToken:p,userSalt:u,config:this.statisticsConfig},this.interactiveController&&{useIsid:!0,isid:this.prevIsid}))}),Od.create("ui"),this.logger=new C5,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new D1,this.interactiveSubscription=new D1,this.graphMadePause=!1}connectedCallback(){var e,i;if(this.isInited||this.shadowDOMCallbacksDisabled)return;this.initPlayerRootContainers();let o=(e=this.getAttribute("stub-title"))!=null?e:void 0,n=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=fe({title:o,thumbUrl:n}),s={target:this.playerContainer,props:a};this.svelteStubComponent=es(Vm,s)}disconnectedCallback(){var e,i,o,n,a;this.shadowDOMCallbacksDisabled||((e=this.annotationsApi)==null||e.destroy(),(i=this.mediaSessionApi)==null||i.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),(o=this.unsubscribePlayerPhaseSubscription)==null||o.call(this),(n=this.interactiveController)==null||n.destroy(),this.interactiveSubscription.unsubscribe(),(a=this.internalsExposure)==null||a.destroy(),Od.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.append(this.rootContainer)}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}}createPlayer(e,i={},o){var n,a,s,d,l,u,v,$;if(!this.videoConfig)return;let{albumId:p,statPlace:_,statAuthToken:w,preload:y,autoplay:C,volume:T,muted:E,fromTime:P,canRewindLive:A,supportLink:I,showAds:V,adsSlotId:H,adsParams:Y={},adsPreviewParam:O,adsAutoplayParam:J,interfaceLanguage:ne,isCyrillicRelatedInterface:Z,logoClickable:me,logoHidden:le,isMobile:Ve,isTouch:Me,isAudioDisabled:be,isLiveCatchUpMode:ae,fullScreenTarget:Le,failoverHosts:re,canDownload:N,callbacks:pe,interactiveData:_e,showThumbTimer:Ge,additionalButtons:ie=[],additionalSettingsMenuItems:G=[],additionalContextMenuItems:K=[],repeat:Re,saveRate:Ne,volumeMultiplier:et,showEndScreen:we,showAutoplayNext:Se}=pu(this.videoConfig,i),{sources:De,title:Xe,thumbUrl:ot,unitedVideoId:ft,isClip:Je=!1,duration:gt,adsParams:Et={},videoEpisodes:jt,previewThumbsData:qt,subtitles:Wt,live:ve}=e,j=ks(ks({},Y),Et),Ce=this.getNextVideoInfo(),se={sources:De,title:Xe,thumbUrl:ot,subtitles:Wt,unitedVideoId:ft,isClip:Je,live:ve,albumId:p,statPlace:_,autoplay:C,muted:E,volume:T,fromTime:P,canRewindLive:A,showAds:V,adsSlotId:H,adsParams:j,adsPreviewParam:O,adsAutoplayParam:J,duration:gt,logoClickable:me,logoHidden:le,isTouch:Me!=null?Me:Ve,repeat:Re,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Ce.nextVideoTitle,endScreenVideoThumb:Ce.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},He={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(se)}`});let Ue=(n=this.interactiveController)==null?void 0:n.state.statistics$.getValue(),tt=(Ue==null?void 0:Ue.oneStat)||this.createOneStat(e,i);tt&&(this.statistics=new jc(tt,Ue==null?void 0:Ue.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Xs(this.uiConfig.sentry,{version:Wa,env:$c},{movieId:ft,albumId:p,place:_,autoplay:(a=C&&!this.interactiveController)!=null?a:!1,mobile:Me!=null?Me:Ve,clip:Je}),this.interactiveController&&((d=this.prevIsid)!=null||(this.prevIsid=(s=this.statistics)==null?void 0:s.oneStat.isid$.getValue())),this.sentry=ks(ks({},this.sentry),Xs.getInstance());let Ye=!!_e,Ze=[],nt="tooltip_interactive_go_back_disabled_first";if(Ye&&this.interactiveController){let dt=this.interactiveController.state.isInitialChapter$.getValue(),Xt=this.interactiveController.getHistoryState();dt&&Ze.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||Ze.push("SEEK_TO_INTERACTIVE_BUTTON"),Xt.hasPrevChapter$.getValue()||(Ze.push("PLAY_PREV_CHAPTER_BUTTON"),dt||(Xt.isGoBackLimited$.getValue()?nt="tooltip_interactive_go_back_disabled_limit":nt="tooltip_interactive_go_back_disabled"))}let Fe=()=>{var dt;this.isInited=!1,this.prevIsid=void 0;let Xt=(o==null?void 0:o.info.isEnded$.getValue())&&((dt=this.interactiveController)==null?void 0:dt.state.isEndChapter$.getValue());pe.onReplayInteractiveVideo&&!Xt?pe.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=Xh({player:o,interfaceLanguage:ne,isCyrillicRelatedInterface:Z,videoId:ft,isClip:Je,isLiveCatchUpMode:ae,isAudioDisabled:be,statAuthToken:w,callbacks:pe,webApi:He,videoEpisodes:jt,previewThumbsData:qt,canDownload:N,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:Ze,isInteractive:Ye,saveRate:Ne,interactiveRanges$:(l=this.interactiveController)==null?void 0:l.state.interactiveRanges$,isInteractiveTime$:(u=this.interactiveController)==null?void 0:u.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:Fe,playPrevChapterDisabledTooltip:nt,hasInteractiveBranches:!!(($=(v=this.interactiveController)==null?void 0:v.getChapterBranches())!=null&&$.length),additionalButtons:this.uiConfig.features.additionalButtons?ie:[],additionalSettingsMenuItems:G!=null?G:[],additionalContextMenuItems:K!=null?K:[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:Re&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure,playerView:this.videoConfig.playerView});let{stores:$t}=this.microStoresRoot=V1(),qe=()=>{var dt,Xt,Ni,Pi,Ui,ji;if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onCurrentFormatChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add($t.interactiveControlsOpacity$.subscribe(Lt=>{var yt;Lt!==null&&((yt=this==null?void 0:this.interactiveController)==null||yt.setDisabledControls(Lt))})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onThroughputEstimationChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onTrafficSavingEnabledChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(new T5(Lt=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(yt=>Lt.next(yt)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?E5(1):Lt=>Lt).subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onCurrentPlaybackRateChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.volume$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onVolumeChange)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.muted$.subscribe(Lt=>{var yt,Rt;return Lt?(yt=pe==null?void 0:pe.onMute)==null?void 0:yt.call(pe):(Rt=pe==null?void 0:pe.onUnmute)==null?void 0:Rt.call(pe)})),this.subscription.add(this.store.state.videoBitrate$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onVideoBitrateChanged)==null?void 0:yt.call(pe,Lt)})),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Lt=>{var yt;let Rt=(yt=this.store)==null?void 0:yt.ui.controls.disabledControls$;Rt&&(Lt&&!Rt.includes(Nl)&&Rt.add(Nl),Lt||Rt.remove(Nl))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(Lt=>gu(this,null,function*(){var yt;if(!N1.browser.isSamsungBrowser||!Lt||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&(yield this.replayInteractiveChapter((yt=this.videoConfig)==null?void 0:yt.callbacks.onExternalFullscreenExit))}))),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Lt=>{var yt;return(yt=pe==null?void 0:pe.onVSIDChanged)==null?void 0:yt.call(pe,Lt)})),this.initMediaSession(),B(wn,fe({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:De,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Xe,thumbUrl:ot,subtitles:Wt,live:ve,preload:y,autoplay:C,muted:E,volume:T,fromTime:P,canRewindLive:A,supportLink:I,showAds:V,adsSlotId:H,adsParams:j,adsPreviewParam:O,adsAutoplayParam:J,duration:gt,logoClickable:me,logoHidden:le,isMobile:Me!=null?Me:Ve,failoverHosts:re,fullScreenTarget:Le,saveRate:Ne,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ge,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:Ce.nextVideoTitle,endScreenVideoThumb:Ce.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:et,showEndScreen:we,showAutoplayNext:Se}));let Yi={target:this.playerContainer,props:r(wn)};this.svelteRootComponent=es(Am,Yi),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,(Ni=(Xt=(dt=this.videoConfig)==null?void 0:dt.callbacks)==null?void 0:Xt.onInited)==null||Ni.call(Xt)),(Pi=this.internalsExposure)==null||Pi.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((ji=(Ui=this.videoConfig)==null?void 0:Ui.callbacks)!=null&&ji.onDevNullLog)?Od.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Od.destroy("ui")};this.coreConfig.asyncResolveClientChecker?N1.isInited$.subscribe(dt=>{dt&&(console.log("UI SDK async start"),qe())}):qe()}addPlayerInfoSubscriptions(){var e,i;let o=this.store,n=(e=this.microStoresRoot)==null?void 0:e.stores;if(!o||!n)return;let a=(i=this.videoConfig)==null?void 0:i.callbacks;a&&this.subscription.add(o.playerPhase.subscribe(d=>{var l;return(l=a.onPlayerPhaseChanged)==null?void 0:l.call(a,d)})).add(o.state.playbackState$.subscribe(d=>{var l;return d&&((l=a.onPlaybackStateChanged)==null?void 0:l.call(a,d))})).add(o.state.isLive$.subscribe(d=>{var l;return(l=a.onIsLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isActiveLive$.subscribe(d=>{var l;return(l=a.onIsActiveLiveChanged)==null?void 0:l.call(a,d)})).add(o.state.isAudioAvailable$.subscribe(d=>{var l;return(l=a.onIsAudioAvailableChanged)==null?void 0:l.call(a,d)})).add(o.state.currentQuality$.subscribe(d=>{var l;return(l=a.onCurrentQualityChanged)==null?void 0:l.call(a,d)})).add(o.state.availableQualities$.subscribe(d=>{var l;return(l=a.onAvailableQualitiesChanged)==null?void 0:l.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(n.pictureInPicture$.isActive$.subscribe(d=>{var l,u;return d?(l=a.onPiPEnter)==null?void 0:l.call(a):(u=a.onPiPExit)==null?void 0:u.call(a)}));let s=a==null?void 0:a.uiInfo;s&&this.subscription.add(o.ui.controlsVisible.subscribe(d=>{var l;return(l=s.onControlsVisibleChanged)==null?void 0:l.call(s,d)})).add(o.ui.isMobile.subscribe(d=>{var l;return(l=s.onIsMobileChanged)==null?void 0:l.call(s,d)})).add(o.ui.playerSize.subscribe(d=>{var l;return(l=s.onPlayerSizeChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.prevButton.subscribe(d=>{var l;return(l=s.onPrevButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playButton.subscribe(d=>{var l;return(l=s.onPlayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.replayButton.subscribe(d=>{var l;return(l=s.onReplayButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.nextButton.subscribe(d=>{var l;return(l=s.onNextButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.playPrevChapterButton.subscribe(d=>{var l;return(l=s.onPlayPrevChapterChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.seekToInteractiveButton.subscribe(d=>{var l;return(l=s.onSeekToInteractiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveGraphButton.subscribe(d=>{var l;return(l=s.onGraphButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.liveButton.subscribe(d=>{var l;return(l=s.onLiveButtonChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.time.subscribe(d=>{var l;return(l=s.onTimeUpdateChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.episodes.subscribe(d=>{var l;return(l=s.onEpisodesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.subtitles.subscribe(d=>{var l;return(l=s.onSubtitlesChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.settings.subscribe(d=>{var l;return(l=s.onSettingsChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.fullscreen.subscribe(d=>{var l;return(l=s.onFullscreenChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.chromecast.subscribe(d=>{var l;return(l=s.onChromecastChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.pip.subscribe(d=>{var l;return(l=s.onPipChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.vkLogo.subscribe(d=>{var l;return(l=s.onVkLogoChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.interactiveTimeIndicator.subscribe(d=>{var l;return(l=s.onInteractiveTimeIndicatorChanged)==null?void 0:l.call(s,d)})).add(o.ui.controls.timeline.subscribe(d=>{var l;return(l=s.onTimelineChanged)==null?void 0:l.call(s,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 n=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!n){this.log({message:"no next video"});return}this.isInited&&Fm(n.unitedVideoId)&&((o=this.store)==null||o.actions.internal.nextMovie(n.unitedVideoId)),this.unmountComponent(this.svelteRootComponent),this.createPlayer(n,{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 gu(this,null,function*(){var e,i,o,n;if((e=this.videoConfig)!=null&&e.interactiveData)try{let{Interactives:a}=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$,d=s?Te(s):this.videoConfig.interfaceLanguage,{projectInfo:l,initChapterId:u,historyApi:v,videoLoader:$}=this.videoConfig.interactiveData;this.interactiveController=new a({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:d,graph:this.uiConfig.features.interactiveGraph,projectInfo:l,initChapterId:u,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}});let{isInteractiveExpectation$:p,isSeekable$:_}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(_.subscribe(y=>{if(!this.isInited)return;let C=this.store;y?C.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):C.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(p.subscribe(y=>{this.store&&this.store.state.isInteractiveExpectation$.set(y)}));let w=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(y=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]=y5(ks({},y.config),{title:(l==null?void 0:l.title)||y.config.title});let C=w?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(y.player,C),w&&(w=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:y,actionType:C})=>{var T,E,P,A,I,V;if(!this.store||!this.microStoresRoot)return;let H=p.getValue();if(y==="action-choice"&&C==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(Bl)),y==="action-choice-canceled"){let Y=Te(this.store.state.isPlaying$)||H;if(((P=(T=this.videoConfig)==null?void 0:T.isTouch)!=null?P:(E=this.videoConfig)!=null&&E.isMobile)&&Y){this.store.ui.interactiveHideMobileControls.set(!0);return}(V=(A=this.videoConfig)==null?void 0:(I=A.callbacks).onDisabledInteractiveClick)==null||V.call(I)}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:y,removeAllOpenURI:C})=>{this.store&&y==="container-fake-removed"&&C&&this.store.ui.controls.disabledControls$.remove(Bl)})),yield this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),(n=(o=this.videoConfig)==null?void 0:o.callbacks)!=null&&n.onInteractiveHistoryChanged){let y=this.interactiveController.getHistoryState();this.subscription.add(y.history$.subscribe(C=>{var T,E,P;C.length&&((P=(E=(T=this.videoConfig)==null?void 0:T.callbacks)==null?void 0:E.onInteractiveHistoryChanged)==null||P.call(E,C))}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{var y,C,T,E;(y=this.microStoresRoot)==null||y.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),(E=(C=this.videoConfig)==null?void 0:(T=C.callbacks).onInteractiveTimeIndicatorClick)==null||E.call(T)})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(y=>{this.log({message:y.toString()})}))}catch(a){this.log({message:a.message})}})}initPlayer(e,i={}){var o,n,a,s,d,l,u,v,$,p,_,w,y,C,T,E,P,A,I,V,H,Y,O,J,ne,Z;if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=pu(M5,w5(e,me=>me instanceof HTMLElement?me:void 0)),this.uiConfig=Vg((o=i.ui)!=null?o:{}),this.coreConfig=(n=i.core)!=null?n:{configName:[]},this.statisticsConfig=(a=i.statistics)!=null?a:{},this.uiConfig.features.forcePlayerDisplayBlock&&(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&&((d=this.internalsExposure)!=null||(this.internalsExposure=new k5("UI"))),Od.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((l=this.videoConfig)==null?void 0:l.showAds)],numbers:[x5()]}),Fm(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=(v=(u=this.uiConfig.features.mediaSession)!=null?u:this.videoConfig.isMediaSessionEnabled)!=null?v:!0),Fm(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=(p=($=this.uiConfig.features.pip)!=null?$:this.videoConfig.isPictureInPictureEnabled)!=null?p:!0,this.uiConfig.features.dpip=(w=(_=this.uiConfig.features.dpip)!=null?_:this.videoConfig.isPictureInPictureEnabled)!=null?w:!0),this.videoConfig.isTouch=(C=(y=this.uiConfig.isMobile)!=null?y:this.videoConfig.isTouch)!=null?C:this.videoConfig.isMobile,(T=this.videoConfig).autoplay&&(T.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.adsPreviewParam=(A=this.uiConfig.ads.preview)!=null?A:this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!((I=this.uiConfig.showLogo)!=null?I:!this.videoConfig.logoHidden),(V=this.videoConfig).canRewindLive&&(V.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(H=this.videoConfig.supportLink)!=null?H:this.uiConfig.supportLink,this.videoConfig.showEndScreen=(Y=this.uiConfig.features.endScreen)!=null?Y:this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=(O=this.uiConfig.features.autoplayNext)!=null?O:this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=(J=this.uiConfig.features.nextPrevButtons)!=null?J:this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((ne=this.videoConfig.videos)!=null&&ne[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let me={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=uu.getLatestSupportedVersion(me):this.pictureInPictureApi=new Js(me)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new cu:void 0,this.slotsApi=this.uiConfig.features.slots?new su:void 0,this.annotationsApi=this.uiConfig.features.annotations?new fu(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),(Z=this.slotsApi)==null||Z.init(this.shadowRootContainer),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),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]),k1(this.pictureInPictureApi)&&this.pictureInPictureApi.setPlayerDomElement(this.playerContainer,this._shadowRoot)}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();r(wn)&&(r(wn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(wn).nextButtonActive=this.isNextButtonActive(),r(wn).prevButtonActive=this.isPrevButtonActive(),r(wn).endScreenVideoTitle=o.nextVideoTitle,r(wn).endScreenVideoThumb=o.nextVideoThumb,r(wn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){var e,i;this.mediaSessionApi&&((e=this.unsubscribePlayerPhaseSubscription)==null||e.call(this),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=(i=this.store)==null?void 0:i.playerPhase.subscribe(o=>{o==="video"?this.setupMediaSessionForVideo():o==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}=ks({},this.videoConfig.videos[this.currentPlayingVideoIndex]),o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",n=>this.seekTime(n.seekTime)]];this.videoConfig.videos.length>1&&(this.currentPlayingVideoIndex<this.videoConfig.videos.length-1&&o.push(["nexttrack",()=>this.playNextVideo()]),this.currentPlayingVideoIndex>0&&o.push(["previoustrack",()=>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="\u0420\u0435\u043A\u043B\u0430\u043C\u0430",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,n;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"}),(n=this.svelteRootComponent)==null||n.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()}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,r(wn)&&(r(wn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(wn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(wn).nextButtonActive=this.isNextButtonActive(),r(wn).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,n;this.log({message:`set auto quality limitation. Max: ${(i=e.max)!=null?i:"none"}. Min: ${(o=e.min)!=null?o:"none"}`}),(n=this.svelteRootComponent)==null||n.setAutoQualityLimits(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}setLanguage(e){return gu(this,null,function*(){var i;yield(i=this.store)==null?void 0:i.actions.internal.setLanguage(e)})}setLiveStart(e){var i,o;this.log({message:"live started"}),(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)}setLiveWaitingRecover(){var e;this.log({message:"live waiting recover"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!0),(o=this.store)==null||o.destroy()})}setLiveWaitingRecord(){var e;this.log({message:"post live"}),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var i,o;(i=this.store)==null||i.actions.internal.setLiveWaitingRecord(!0),(o=this.store)==null||o.destroy()})}setLiveEnd(e){var i;this.log({message:"live ended"}),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var o,n;(o=this.store)==null||o.actions.internal.setLiveWaitingRecover(!1),(n=this.store)==null||n.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}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;return(i=(e=this.statistics)==null?void 0:e.oneStat.getDeviceId())!=null?i:void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}replayInteractiveChapter(e){return gu(this,null,function*(){var i,o;if(this.interactiveController&&((i=this.store)!=null&&i.state.positionExact$)){let n=Te(this.store.state.positionExact$),s=Te(this.store.state.interactiveEpisodes$).find(l=>!l.completed);this.interactiveController.events.playerChanged$.pipe(I5()).subscribe(()=>{s&&n>=s.time?this.seekTime(s.time):this.seekTime(n),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.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)}unmountComponent(e){e&&Ks(e)}};import{InterfaceLanguage as BJ,VKNumericLanguage as OJ,loadVKLangPack as HJ}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as UJ,VideoFormat as zJ}from"@vkontakte/videoplayer-core/es2015";var PJ=()=>{window.customElements.define("vk-video-player",hu)};export{Yc as ControlButtonType,Fr as GridTypes,BJ as InterfaceLanguage,Gl as MenuItemType,ns as PlayerPhase,Wa as VERSION,OJ as VKNumericLanguage,zJ as VideoFormat,UJ as VideoQuality,HJ as loadVKLangPack,PJ as registerPlayerWebComponent};