@vkontakte/videoplayer 1.1.60 → 1.1.61-dev.6fff06ee.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs.js +5 -5
- package/es2015.esm.js +5 -5
- package/es2018.cjs.js +5 -5
- package/es2018.esm.js +5 -5
- package/es2024.cjs.js +5 -5
- package/es2024.esm.js +5 -5
- package/esnext.cjs.js +5 -5
- package/esnext.esm.js +5 -5
- package/evergreen.esm.js +5 -5
- package/package.json +5 -5
package/evergreen.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer v1.1.
|
|
3
|
-
*
|
|
4
|
-
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-
|
|
2
|
+
* @vkontakte/videoplayer v1.1.61-dev.6fff06ee.0
|
|
3
|
+
* Tue, 15 Apr 2025 06:48:26 GMT
|
|
4
|
+
* https://st.mycdn.me/static/vkontakte-videoplayer/1-1-61/doc/
|
|
5
5
|
*/
|
|
6
6
|
var ia="[",_a="[!",ba="]",Or={};var _i=Symbol(),ri=Symbol("filename"),hm=Symbol("hmr"),_m="http://www.w3.org/1999/xhtml",Jc="http://www.w3.org/2000/svg";var kd=!0;var eu=globalThis.process?.env?.NODE_ENV;eu||console.warn("If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.");var $e=eu&&!eu.toLowerCase().includes("prod");var _o=Symbol("$state"),Hr=Symbol("$state metadata"),Us=Symbol("legacy props"),bm=Symbol("");var lr=Array.isArray,$m=Array.prototype.indexOf,zs=Array.from,tu=Object.keys,Ri=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,Td=Object.getOwnPropertyDescriptors,iu=Object.prototype,ym=Array.prototype,Fr=Object.getPrototypeOf;function oa(t){return typeof t=="function"}var J=()=>{};function xm(t){return t()}function na(t){for(var e=0;e<t.length;e++)t[e]()}var qs=[],ou=[];function wm(){var t=qs;qs=[],na(t)}function e1(){var t=ou;ou=[],na(t)}function Ao(t){qs.length===0&&queueMicrotask(wm),qs.push(t)}function nu(){qs.length>0&&wm(),ou.length>0&&e1()}function Id(t){return t===this.v}function ts(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Sm(t,e){return t!==e}function is(t){return!ts(t,this.v)}function Cm(){if($e){let t=new Error(`derived_references_self
|
|
7
7
|
A derived value cannot reference itself recursively
|
|
@@ -45,7 +45,7 @@ ${l}in ${u}`).join("")}
|
|
|
45
45
|
`)){let o=u1.exec(i)??p1.exec(i);o&&e.push({file:o[1],line:+o[2],column:+o[3]})}return e}function uv(){let t=f1()?.slice(4);if(!t)return null;for(let e=0;e<t.length;e++){let i=t[e],o=c1[i.file];if(!o){if(e===0)return null;continue}for(let n of o){if(n.end==null)return null;if(n.start.line<i.line&&n.end.line>i.line)return n.component}}return null}var zd=Symbol("ADD_OWNER");function wu(t,e,i=!1,o=!1){if(t&&!i){let n=Bo,a=t[Hr];if(a&&!Su(a,n)){let s=Cu(a);e&&e[ri]!==n[ri]&&!o&&Qm(n[ri],e[ri],s[ri])}}qd(t,e,new Set)}function fu(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 qd(t,e,i){let o=t?.[Hr];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),zd in t&&t[zd])Ji(()=>{t[zd](e)});else{var n=Fr(t);if(n===Object.prototype)for(let a in t)if(Object.getOwnPropertyDescriptor(t,a)?.get){let s=_i;Ji(()=>{let d=t[a];s!==d&&(s=d,qd(d,e,i))})}else qd(t[a],e,i);else if(n===Array.prototype)for(let a=0;a<t.length;a+=1)qd(t[a],e,i)}}}function Su(t,e){return t.owners===null?!0:t.owners.has(e)||ri in e&&[...t.owners].some(i=>i[ri]===e[ri])||t.parent!==null&&Su(t.parent,e)}function Cu(t){return t?.owners?.values().next().value??Cu(t.parent)}var m1=!1;function jm(t){if(m1)return;let e=uv();if(e&&!Su(t,e)){let i=Cu(t);i[ri]!==e[ri]?pu(e[ri],i[ri]):pu()}}function ps(t){if($e){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 wt=null;function el(t){wt=t}var Bo=null;function tl(t){Bo=t}function fs(t){return ku("getContext").get(t)}function ms(t,e){let i=ku("setContext");return $e&&pt(()=>wu(e,null,!0)),i.set(t,e),e}function ol(){return ku("getAllContexts")}function F(t,e=!1,i){var o=wt={p:wt,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};Ar&&!e&&(wt.l={s:null,u:null,r1:[],r2:wi(!1)}),No(()=>{o.d=!0}),$e&&(wt.function=i,Bo=i)}function U(t){let e=wt;if(e!==null){t!==void 0&&(e.x=t);let s=e.e;if(s!==null){var i=vt,o=Tt;e.e=null;try{for(var n=0;n<s.length;n++){var a=s[n];Bi(a.effect),Zi(a.reaction),en(a.fn)}}finally{Bi(i),Zi(o)}}wt=e.p,$e&&(Bo=e.p?.function??null),e.m=!0}return t||{}}function Mr(){return!Ar||wt!==null&&wt.l===null}function ku(t){return wt===null&&ps(t),wt.c??=new Map(g1(wt)||void 0)}function g1(t){let e=t.p;for(;e!==null;){let i=e.c;if(i!==null)return i;e=e.p}return null}var h1=/\r/g;function pv(t){t=t.replace(h1,"");let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return(e>>>0).toString(36)}function fv(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}var _1=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function mv(t){return _1.includes(t)}var b1=["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 $1={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 vv(t){return t=t.toLowerCase(),$1[t]??t}var _w=[...b1,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var y1=["touchstart","touchmove"];function gv(t){return y1.includes(t)}var x1=["textarea","script","style","title"];function hv(t){return x1.includes(t)}function Tu(t){return t?.replace(/\//g,"/\u200B")}var _v=new Map;function bv(t,e){var i=_v.get(t);i||(i=new Set,_v.set(t,i)),i.add(e)}function Iu(t,e){if(e){let i=document.body;t.autofocus=!0,Ao(()=>{document.activeElement===i&&t.focus()})}}function nl(t){var e=Tt,i=vt;Zi(null),Bi(null);try{return t()}finally{Zi(e),Bi(i)}}var Eu=new Set,Kd=new Set;function Ea(t){if(!We)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 Au(t,e,i,o={}){function n(a){if(o.capture||vs.call(e,a),!a.cancelBubble)return nl(()=>i?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Ao(()=>{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=Au(t,e,i,a);(e===document.body||e===window||e===document)&&No(()=>{e.removeEventListener(t,s,a)})}function it(t){for(var e=0;e<t.length;e++)Eu.add(t[e]);for(var i of Kd)i(t)}function vs(t){var e=this,i=e.ownerDocument,o=t.type,n=t.composedPath?.()||[],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 c=n.indexOf(e);if(c===-1)return;l<=c&&(s=l)}if(a=n[s]||t.target,a!==e){Ri(t,"currentTarget",{configurable:!0,get(){return a||i}});var u=Tt,_=vt;Zi(null),Bi(null);try{for(var p,y=[];a!==null;){var x=a.assignedSlot||a.parentNode||a.host||null;try{var w=a["__"+o];if(w!=null&&(!a.disabled||t.target===a))if(lr(w)){var[S,...I]=w;S.apply(a,[t,...I])}else w.call(a,t)}catch(L){p?y.push(L):p=L}if(t.cancelBubble||x===e||x===null)break;a=x}if(p){for(let L of y)queueMicrotask(()=>{throw L});throw p}}finally{t.__root=e,delete t.currentTarget,Zi(u),Bi(_)}}}var S1;function $v(){S1=void 0}function gs(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function eo(t,e){var i=vt;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function M(t,e){var i=(e&1)!==0,o=(e&2)!==0,n,a=!t.startsWith("<!>");return()=>{if(We)return eo(lt,null),lt;n===void 0&&(n=gs(a?t:"<!>"+t),i||(n=si(n)));var s=o||Gs?document.importNode(n,!0):n.cloneNode(!0);if(i){var d=si(s),l=s.lastChild;eo(d,l)}else eo(s,s);return s}}function me(t,e,i="svg"){var o=!t.startsWith("<!>"),n=(e&1)!==0,a=`<${i}>${o?t:"<!>"+t}</${i}>`,s;return()=>{if(We)return eo(lt,null),lt;if(!s){var d=gs(a),l=si(d);if(n)for(s=document.createDocumentFragment();si(l);)s.appendChild(si(l));else s=si(l)}var c=s.cloneNode(!0);if(n){var u=si(c),_=c.lastChild;eo(u,_)}else eo(c,c);return c}}function Wn(t=""){if(!We){var e=Vo(t+"");return eo(e,e),e}var i=lt;return i.nodeType!==3&&(i.before(i=Vo()),ai(i)),eo(i,i),i}function ze(){if(We)return eo(lt,null),lt;var t=document.createDocumentFragment(),e=document.createComment(""),i=Vo();return t.append(e,i),eo(e,i),t}function b(t,e){if(We){vt.nodes_end=lt,bi();return}t!==null&&t.before(e)}var rl=!0;function Wd(t){rl=t}function le(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function Qr(t,e){return xv(t,e)}function Mu(t,e){Ld(),e.intro=e.intro??!1;let i=e.target,o=We,n=lt;try{for(var a=si(i);a&&(a.nodeType!==8||a.data!==ia);)a=so(a);if(!a)throw Or;Di(!0),ai(a),bi();let s=xv(t,{...e,anchor:a});if(lt===null||lt.nodeType!==8||lt.data!==ba)throw Ca(),Or;return Di(!1),s}catch(s){if(s===Or)return e.recover===!1&&Am(),Ld(),js(i),Di(!1),Qr(t,e);throw s}finally{Di(o),ai(n),$v()}}var hs=new Map;function xv(t,{target:e,anchor:i,props:o={},events:n,context:a,intro:s=!0}){Ld();var d=new Set,l=_=>{for(var p=0;p<_.length;p++){var y=_[p];if(!d.has(y)){d.add(y);var x=gv(y);e.addEventListener(y,vs,{passive:x});var w=hs.get(y);w===void 0?(document.addEventListener(y,vs,{passive:x}),hs.set(y,1)):hs.set(y,w+1)}}};l(zs(Eu)),Kd.add(l);var c=void 0,u=dv(()=>{var _=i??e.appendChild(Vo());return Si(()=>{if(a){F({});var p=wt;p.c=a}n&&(o.$$events=n),We&&eo(_,null),rl=s,c=t(_,o)||{},rl=!0,We&&(vt.nodes_end=lt),a&&U()}),()=>{for(var p of d){e.removeEventListener(p,vs);var y=hs.get(p);--y===0?(document.removeEventListener(p,vs),hs.delete(p)):hs.set(p,y)}Kd.delete(l),_!==i&&_.parentNode?.removeChild(_)}});return Pu.set(c,u),c}var Pu=new WeakMap;function Aa(t,e){let i=Pu.get(t);return i?(Pu.delete(t),i(e)):($e&&Wm(),Promise.resolve())}function V(t,e,[i,o]=[0,0]){We&&i===0&&bi();var n=t,a=null,s=null,d=_i,l=i>0?65536:0,c=!1;let u=(p,y=!0)=>{c=!0,_(y,p)},_=(p,y)=>{if(d===(d=p))return;let x=!1;if(We&&o!==-1){if(i===0){let S=n.data;S===ia?o=0:S===_a?o=1/0:(o=parseInt(S.substring(1)),o!==o&&(o=d?1/0:-1))}let w=o>i;!!d===w&&(n=ss(),ai(n),Di(!1),x=!0,o=-1)}d?(a?Wr(a):y&&(a=Si(()=>y(n))),s&&tn(s,()=>{s=null})):(s?Wr(s):y&&(s=Si(()=>y(n,[i+1,o]))),a&&tn(a,()=>{a=null})),x&&Di(!0)};Oi(()=>{c=!1,e(u),c||_(null,null)},l),We&&(n=lt)}function al(t,e,i){We&&bi();var o=t,n=_i,a,s=Mr()?Sm:ts;Oi(()=>{s(n,n=e())&&(a&&tn(a),a=Si(()=>i(o)))}),We&&(o=lt)}var sa=null;function Ru(t){sa=t}function sl(t,e){return e}function I1(t,e,i,o){for(var n=[],a=e.length,s=0;s<a;s++)Ud(e[s].e,n,!0);var d=a>0&&n.length===0&&i!==null;if(d){var l=i.parentNode;js(l),l.append(i),o.clear(),aa(t,e[0].prev,e[a-1].next)}xu(n,()=>{for(var c=0;c<a;c++){var u=e[c];d||(o.delete(u.k),aa(t,u.prev,u.next)),Ni(u.e,!d)}})}function fi(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 c=t;s=We?ai(si(c)):c.appendChild(Vo())}We&&bi();var u=null,_=!1,p=ur(()=>{var y=i();return lr(y)?y:y==null?[]:zs(y)});Oi(()=>{var y=r(p),x=y.length;if(_&&x===0)return;_=x===0;let w=!1;if(We){var S=s.data===_a;S!==(x===0)&&(s=ss(),ai(s),Di(!1),w=!0)}if(We){for(var I=null,L,A=0;A<x;A++){if(lt.nodeType===8&<.data===ba){s=lt,w=!0,Di(!1);break}var P=y[A],T=o(P,A);L=Cv(lt,d,I,null,P,T,A,n,e,i),d.items.set(T,L),I=L}x>0&&ai(ss())}We||E1(y,d,s,n,e,o,i),a!==null&&(x===0?u?Wr(u):u=Si(()=>a(s)):u!==null&&tn(u,()=>{u=null})),w&&Di(!0),r(p)}),We&&(s=lt)}function E1(t,e,i,o,n,a,s){var d=(n&8)!==0,l=(n&3)!==0,c=t.length,u=e.items,_=e.first,p=_,y,x=null,w,S=[],I=[],L,A,P,T;if(d)for(T=0;T<c;T+=1)L=t[T],A=a(L,T),P=u.get(A),P!==void 0&&(P.a?.measure(),(w??=new Set).add(P));for(T=0;T<c;T+=1){if(L=t[T],A=a(L,T),P=u.get(A),P===void 0){var N=p?p.e.nodes_start:i;x=Cv(N,e,x,x===null?e.first:x.next,L,A,T,o,n,s),u.set(A,x),S=[],I=[],p=x.next;continue}if(l&&A1(P,L,T,n),(P.e.f&8192)!==0&&(Wr(P.e),d&&(P.a?.unfix(),(w??=new Set).delete(P))),P!==p){if(y!==void 0&&y.has(P)){if(S.length<I.length){var Q=I[0],G;x=Q.prev;var ee=S[0],ie=S[S.length-1];for(G=0;G<S.length;G+=1)wv(S[G],Q,i);for(G=0;G<I.length;G+=1)y.delete(I[G]);aa(e,ee.prev,ie.next),aa(e,x,ee),aa(e,ie,Q),p=Q,x=ie,T-=1,S=[],I=[]}else y.delete(P),wv(P,p,i),aa(e,P.prev,P.next),aa(e,P,x===null?e.first:x.next),aa(e,x,P),x=P;continue}for(S=[],I=[];p!==null&&p.k!==A;)(p.e.f&8192)===0&&(y??=new Set).add(p),I.push(p),p=p.next;if(p===null)continue;P=p}S.push(P),x=P,p=P.next}if(p!==null||y!==void 0){for(var oe=y===void 0?[]:zs(y);p!==null;)(p.e.f&8192)===0&&oe.push(p),p=p.next;var te=oe.length;if(te>0){var ge=(n&4)!==0&&c===0?i:null;if(d){for(T=0;T<te;T+=1)oe[T].a?.measure();for(T=0;T<te;T+=1)oe[T].a?.fix()}I1(e,oe,ge,u)}}d&&Ao(()=>{if(w!==void 0)for(P of w)P.a?.apply()}),vt.first=e.first&&e.first.e,vt.last=x&&x.e}function A1(t,e,i,o){(o&1)!==0&&ns(t.v,e),(o&2)!==0?ns(t.i,i):t.i=i}function Cv(t,e,i,o,n,a,s,d,l,c){var u=sa,_=(l&1)!==0,p=(l&16)===0,y=_?p?qr(n):wi(n):n,x=(l&2)===0?s:wi(s);$e&&_&&(y.debug=()=>{var S=typeof x=="number"?s:x.v;c()[S]});var w={i:x,v:y,k:a,a:null,e:null,prev:i,next:o};sa=w;try{return w.e=Si(()=>d(t,y,x,c),We),w.e.prev=i&&i.e,w.e.next=o&&o.e,i===null?e.first=w:(i.next=w,i.e.next=w.e),o!==null&&(o.prev=w,o.e.prev=w.e),w}finally{sa=u}}function wv(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=so(a);n.before(a),a=s}}function aa(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 P1(t,e,i){if(!e||e===pv(String(i??"")))return;let o,n=t.__svelte_meta?.loc;n?o=`near ${n.file}:${n.line}:${n.column}`:Bo?.[ri]&&(o=`in ${Bo[ri]}`),Km(Tu(o))}function ll(t,e,i,o,n){var a=t,s="",d;Oi(()=>{if(s===(s=e()??"")){We&&bi();return}d!==void 0&&(Ni(d),d=void 0),s!==""&&(d=Si(()=>{if(We){for(var l=lt.data,c=bi(),u=c;c!==null&&(c.nodeType!==8||c.data!=="");)u=c,c=so(c);if(c===null)throw Ca(),Or;$e&&!n&&P1(c.parentNode,l,s),eo(lt,u),a=ai(c);return}var _=s+"";i?_=`<svg>${_}</svg>`:o&&(_=`<math>${_}</math>`);var p=gs(_);if((i||o)&&(p=si(p)),eo(si(p),p.lastChild),i||o)for(;si(p);)a.before(si(p));else a.before(p)}))})}function de(t,e,...i){var o=t,n=J,a;Oi(()=>{n!==(n=e())&&(a&&(Ni(a),a=null),$e&&n==null&&Pm(),a=Si(()=>n(o,...i)))},65536),We&&(o=lt)}function $i(t,e,i){We&&bi();var o=t,n,a;Oi(()=>{n!==(n=e())&&(a&&(tn(a),a=null),n&&(a=Si(()=>i(o,n))))},65536),We&&(o=lt)}function dl(t,e,i,o,n,a){let s=We;We&&bi();var d=$e&&a&&wt?.function[ri],l,c,u=null;We&<.nodeType===1&&(u=lt,bi());var _=We?lt:t,p,y=sa;Oi(()=>{let x=e()||null;var w=n?n():i||x==="svg"?Jc:null;if(x!==l){var S=sa;Ru(y),p&&(x===null?tn(p,()=>{p=null,c=null}):x===c?Wr(p):(Ni(p),Wd(!1))),x&&x!==c&&(p=Si(()=>{if(u=We?u:w?document.createElementNS(w,x):document.createElement(x),$e&&a&&(u.__svelte_meta={loc:{file:d,line:a[0],column:a[1]}}),eo(u,u),o){We&&hv(x)&&u.append(document.createComment(""));var I=We?si(u):u.appendChild(Vo());We&&(I===null?Di(!1):ai(I)),o(u,I)}vt.nodes_end=u,_.before(u)})),l=x,l&&(c=l),Wd(!0),Ru(S)}},65536),s&&(Di(!0),ai(_))}var Nu;function kv(t){return Nu=t.target,new Bu(t)}var Bu=class{#t;#e;constructor(e){var i=new Map,o=(a,s)=>{var d=qr(s);return i.set(a,d),d};let n=new Proxy({...e.props||{},$$events:{}},{get(a,s){return r(i.get(s)??o(s,Reflect.get(a,s)))},has(a,s){return s===Us?!0:(r(i.get(s)??o(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,d){return D(i.get(s)??o(s,d),d),Reflect.set(a,s,d)}});this.#e=(e.hydrate?Mu:Qr)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&cs(),this.#t=n.$$events;for(let a of Object.keys(this.#e))a==="$set"||a==="$destroy"||a==="$on"||Ri(this,a,{get(){return this.#e[a]},set(s){this.#e[a]=s},enumerable:!0});this.#e.$set=a=>{Object.assign(n,a)},this.#e.$destroy=()=>{Aa(this.#e)}}$set(e){this.#e.$set(e)}$on(e,i){this.#t[e]=this.#t[e]||[];let o=(...n)=>i.call(this,...n);return this.#t[e].push(o),()=>{this.#t[e]=this.#t[e].filter(n=>n!==o)}}$destroy(){this.#e.$destroy()}};function K(t,e){Ao(()=>{var i=t.getRootNode(),o=i.host?i:i.head??i.ownerDocument.head??Nu?.parentNode;if(!o?.querySelector("#"+e.hash)){let n=document.createElement("style");n.id=e.hash,n.textContent=e.code,o.appendChild(n),$e&&bv(e.hash,n)}})}function Tv(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=Tv(t[e]))&&(o&&(o+=" "),o+=i)}else for(i in t)t[i]&&(o&&(o+=" "),o+=i);return o}function Iv(){for(var t,e,i=0,o="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=Tv(t))&&(o&&(o+=" "),o+=e);return o}function cl(t){return typeof t=="object"?Iv(t):t??""}var Ev=[...`
|
|
48
|
-
\r\f\xA0\v\uFEFF`];function Pv(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||Ev.includes(o[s-1]))&&(d===o.length||Ev.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function Av(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 Du(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Mv(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(Du)),n&&l.push(...Object.keys(n).map(Du));var c=0,u=-1;let w=t.length;for(var _=0;_<w;_++){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===":"&&u===-1)u=_;else if(p===";"||_===w-1){if(u!==-1){var y=Du(t.substring(c,u).trim());if(!l.includes(y)){p!==";"&&_++;var x=t.substring(c,_).trim();i+=" "+x+";"}}c=_+1,u=-1}}}}return o&&(i+=Av(o)),n&&(i+=Av(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function Z(t,e,i,o,n,a){var s=t.__className;if(We||s!==i){var d=Pv(i,o,a);(!We||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 c=!!a[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return a}function Ou(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 tt(t,e,i,o){var n=t.__style;if(We||n!==e){var a=Mv(e,o);(!We||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(Ou(t,i?.[0],o[0]),Ou(t,i?.[1],o[1],"important")):Ou(t,i,o));return o}var _s=Symbol("class"),bs=Symbol("style"),Rv=Symbol("is custom element"),Bv=Symbol("is html");function Nv(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var n=Dv(t);if(We&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||D1(t,e,i??"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[bm]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Ov(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function he(t,e,i,o,n=!1){var a=Dv(t),s=a[Rv],d=!a[Bv];let l=We&&s;l&&Di(!1);var c=e||{},u=t.tagName==="OPTION";for(var _ in e)_ in i||(i[_]=null);i.class?i.class=cl(i.class):(o||i[_s])&&(i.class=null),i[bs]&&(i.style??=null);var p=Ov(t);for(let P in i){let T=i[P];if(u&&P==="value"&&T==null){t.value=t.__value="",c[P]=T;continue}if(P==="class"){var y=t.namespaceURI==="http://www.w3.org/1999/xhtml";Z(t,y,T,o,e?.[_s],i[_s]),c[P]=T,c[_s]=i[_s];continue}if(P==="style"){tt(t,T,e?.[bs],i[bs]),c[P]=T,c[bs]=i[bs];continue}var x=c[P];if(T!==x){c[P]=T;var w=P[0]+P[1];if(w!=="$$")if(w==="on"){let N={},Q="$$"+P,G=P.slice(2);var S=mv(G);if(fv(G)&&(G=G.slice(0,-7),N.capture=!0),!S&&x){if(T!=null)continue;t.removeEventListener(G,c[Q],N),c[Q]=null}if(T!=null)if(S)t[`__${G}`]=T,it([G]);else{let ee=function(ie){c[P].call(this,ie)};var A=ee;c[Q]=Au(G,t,ee,N)}else S&&(t[`__${G}`]=void 0)}else if(P==="style")Me(t,P,T);else if(P==="autofocus")Iu(t,!!T);else if(!s&&(P==="__value"||P==="value"&&T!=null))t.value=t.__value=T;else if(P==="selected"&&u)Nv(t,T);else{var I=P;d||(I=vv(I));var L=I==="defaultValue"||I==="defaultChecked";if(T==null&&!s&&!L)if(a[P]=null,I==="value"||I==="checked"){let N=t,Q=e===void 0;if(I==="value"){let G=N.defaultValue;N.removeAttribute(I),N.defaultValue=G,N.value=N.__value=Q?G:null}else{let G=N.defaultChecked;N.removeAttribute(I),N.defaultChecked=G,N.checked=Q?G:!1}}else t.removeAttribute(P);else L||p.includes(I)&&(s||typeof T!="string")?t[I]=T:typeof T!="function"&&Me(t,I,T,n)}}}return l&&Di(!0),c}function Dv(t){return t.__attributes??={[Rv]:t.nodeName.includes("-"),[Bv]:t.namespaceURI===_m}}var Lv=new Map;function Ov(t){var e=Lv.get(t.nodeName);if(e)return e;Lv.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=Td(o);for(var a in i)i[a].set&&e.push(a);o=Fr(o)}return e}function D1(t,e,i){$e&&(e==="srcset"&&O1(t,i)||Hu(t.getAttribute(e)??"",i)||qm(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Hu(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function Vv(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function O1(t,e){var i=Vv(t.srcset),o=Vv(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(Hu(i[s][0],n)||Hu(n,i[s][0])))}var H1=kd?()=>performance.now():()=>Date.now(),fr={tick:t=>(kd?requestAnimationFrame:J)(t),now:()=>H1(),tasks:new Set};function Hv(){let t=fr.now();fr.tasks.forEach(e=>{e.c(t)||(fr.tasks.delete(e),e.f())}),fr.tasks.size!==0&&fr.tick(Hv)}function Fv(t){let e;return fr.tasks.size===0&&fr.tick(Hv),{promise:new Promise(i=>{fr.tasks.add(e={c:t,f:i})}),abort(){fr.tasks.delete(e)}}}function Qd(t,e){nl(()=>{t.dispatchEvent(new CustomEvent(e))})}function q1(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 Uv(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=q1(n.trim());e[s]=a.trim()}return e}var K1=t=>t;function Uu(t,e,i,o){var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",c,u=e.inert,_=e.style.overflow,p,y;function x(){var A=Tt,P=vt;Zi(null),Bi(null);try{return c??=i()(e,o?.()??{},{direction:l})}finally{Zi(A),Bi(P)}}var w={is_global:d,in(){if(e.inert=u,!n){y?.abort(),y?.reset?.();return}a||p?.abort(),Qd(e,"introstart"),p=Fu(e,x(),y,1,()=>{Qd(e,"introend"),p?.abort(),p=c=void 0,e.style.overflow=_})},out(A){if(!a){A?.(),c=void 0;return}e.inert=!0,Qd(e,"outrostart"),y=Fu(e,x(),p,0,()=>{Qd(e,"outroend"),A?.()})},stop:()=>{p?.abort(),y?.abort()}},S=vt;if((S.transitions??=[]).push(w),n&&rl){var I=d;if(!I){for(var L=S.parent;L&&(L.f&65536)!==0;)for(;(L=L.parent)&&(L.f&16)===0;);I=!L||(L.f&32768)!==0}I&&en(()=>{pt(()=>w.in())})}}function Fu(t,e,i,o,n){var a=o===1;if(oa(e)){var s,d=!1;return Ao(()=>{if(!d){var S=e({direction:a?"in":"out"});s=Fu(t,S,i,o,n)}}),{abort:()=>{d=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i?.deactivate(),!e?.duration)return n(),{abort:J,deactivate:J,reset:J,t:()=>o};let{delay:l=0,css:c,tick:u,easing:_=K1}=e;var p=[];if(a&&i===void 0&&(u&&u(0,1),c)){var y=Uv(c(0,1));p.push(y,y)}var x=()=>1-o,w=t.animate(p,{duration:l});return w.onfinish=()=>{var S=i?.t()??1-o;i?.abort();var I=o-S,L=e.duration*Math.abs(I),A=[];if(L>0){var P=!1;if(c)for(var T=Math.ceil(L/16.666666666666668),N=0;N<=T;N+=1){var Q=S+I*_(N/T),G=Uv(c(Q,1-Q));A.push(G),P||=G.overflow==="hidden"}P&&(t.style.overflow="hidden"),x=()=>{var ee=w.currentTime;return S+I*_(ee/L)},u&&Fv(()=>{if(w.playState!=="running")return!1;var ee=x();return u(ee,1-ee),!0})}w=t.animate(A,{duration:L,fill:"forwards"}),w.onfinish=()=>{x=()=>o,u?.(o,1-o),n()}},{abort:()=>{w&&(w.cancel(),w.effect=null,w.onfinish=J)},deactivate:()=>{n=J},reset:()=>{o===0&&u?.(1,0)},t:()=>x()}}var zu=class t{#t=new WeakMap;#e;#i;static entries=new WeakMap;constructor(e){this.#i=e}observe(e,i){var o=this.#t.get(e)||new Set;return o.add(i),this.#t.set(e,o),this.#o().observe(e,this.#i),()=>{var n=this.#t.get(e);n.delete(i),n.size===0&&(this.#t.delete(e),this.#e.unobserve(e))}}#o(){return this.#e??(this.#e=new ResizeObserver(e=>{for(var i of e){t.entries.set(i.target,i);for(var o of this.#t.get(i.target)||[])o(i)}}))}};var G1=new zu({box:"border-box"});function Lr(t,e,i){var o=G1.observe(t,()=>i(t[e]));en(()=>(pt(()=>i(t[e])),o))}function zv(t,e){return t===e||t?.[_o]===e}function at(t={},e,i,o){return en(()=>{var n,a;return Ji(()=>{n=a,a=o?.()||[],pt(()=>{t!==i(...a)&&(e(t,...a),n&&zv(i(...n),t)&&e(null,...n))})}),()=>{Ao(()=>{a&&zv(i(...a),t)&&e(null,...a)})}}),t}function mr(t=!1){let e=wt,i=e.l.u;if(!i)return;let o=()=>Od(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let c in l)l[c]!==a[c]&&(a[c]=l[c],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&us(()=>{qv(e,o),na(i.b)}),Qe(()=>{let n=pt(()=>i.m.map(xm));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&Qe(()=>{qv(e,o),na(i.a)})}function qv(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if($e){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;Vm(e)},set:o=>{i=o}})}};Y1=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var Y1;function It(t){wt===null&&ps("onMount"),Ar&&wt.l!==null?j1(wt).m.push(t):Qe(()=>{let e=pt(t);if(typeof e=="function")return e})}function on(t){wt===null&&ps("onDestroy"),It(()=>()=>pt(t))}function j1(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function ul(t,e,i){if(t==null)return e(void 0),i&&i(void 0),J;let o=pt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var $s=[];function Qn(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=J){let i=null,o=new Set;function n(d){if(ts(t,d)&&(t=d,i)){let l=!$s.length;for(let c of o)c[1](),$s.push(c,t);if(l){for(let c=0;c<$s.length;c+=2)$s[c][0]($s[c+1]);$s.length=0}}}function a(d){n(d(t))}function s(d,l=J){let c=[d,l];return o.add(c),o.size===1&&(i=e(n,a)||J),d(t),()=>{o.delete(c),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function li(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 Qn(i,(s,d)=>{let l=!1,c=[],u=0,_=J,p=()=>{if(u)return;_();let x=e(o?c[0]:c,s,d);a?s(x):_=typeof x=="function"?x:J},y=n.map((x,w)=>ul(x,S=>{c[w]=S,u&=~(1<<w),l&&p()},()=>{u|=1<<w}));return l=!0,p(),function(){na(y),_(),l=!1}})}function ve(t){let e;return ul(t,i=>e=i)(),e}var jd=!1,qu=Symbol();function $(t,e,i){let o=i[e]??={store:null,source:qr(void 0),unsubscribe:J};if(o.store!==t&&!(qu in i))if(o.unsubscribe(),o.store=t??null,t==null)o.source.v=void 0,o.unsubscribe=J;else{var n=!0;o.unsubscribe=ul(t,a=>{n?o.source.v=a:D(o.source,a)}),n=!1}return t&&qu in i?ve(t):r(o.source)}function Oe(){let t={};function e(){No(()=>{for(var i in t)t[i].unsubscribe();Ri(t,qu,{enumerable:!1,value:!0})})}return[t,e]}function Ku(t){var e=jd;try{return jd=!1,[t(),jd]}finally{jd=e}}var o0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return $e&&Lm(`${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 xe(t,e,i){return new Proxy($e?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},o0)}var n0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(oa(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];oa(n)&&(n=n());let a=Cn(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(oa(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=Cn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===_o||e===Us)return!1;for(let i of t.props)if(oa(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){oa(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function Gr(...t){return new Proxy({props:t},n0)}function Kv(t){return t.ctx?.d??!1}function v(t,e,i,o){var n=(i&1)!==0,a=!Ar||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,c;s?[c,l]=Ku(()=>t[e]):c=t[e];var u=_o in t||Us in t,_=s&&(Cn(t,e)?.set??(u&&e in t&&(Q=>t[e]=Q)))||void 0,p=o,y=!0,x=!1,w=()=>(x=!0,y&&(y=!1,d?p=pt(o):p=o),p);c===void 0&&o!==void 0&&(_&&a&&Mm(e),c=w(),_&&_(c));var S;if(a)S=()=>{var Q=t[e];return Q===void 0?w():(y=!0,x=!1,Q)};else{var I=(n?m:ur)(()=>t[e]);I.f|=131072,S=()=>{var Q=r(I);return Q!==void 0&&(p=void 0),Q===void 0?p:Q}}if((i&4)===0)return S;if(_){var L=t.$$legacy;return function(Q,G){return arguments.length>0?((!a||!G||L||l)&&_(G?S():Q),Q):S()}}var A=!1,P=!1,T=qr(c),N=m(()=>{var Q=S(),G=r(T);return A?(A=!1,P=!0,G):(P=!1,T.v=Q)});return s&&r(N),n||(N.equals=is),function(Q,G){if(Ws!==null&&(A=P,S(),r(T)),arguments.length>0){let ee=G?r(N):a&&s?pe(Q):Q;if(!N.equals(ee)){if(A=!0,D(T,ee),x&&p!==void 0&&(p=ee),Kv(N))return Q;pt(()=>r(N))}return Q}return Kv(N)?N.v:r(N)}}var r0;typeof HTMLElement=="function"&&(r0=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return a=>{let s=document.createElement("slot");n!=="default"&&(s.name=n),b(a,s)}};var t=e;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},o=a0(this);for(let n of this.$$s)n in o&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),i.default=!0):i[n]=e(n));for(let n of this.attributes){let a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=Wu(a,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=kv({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=Fd(()=>{Ji(()=>{this.$$r=!0;for(let n of tu(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let a=Wu(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(let n in this.$$l)for(let a of this.$$l[n]){let s=this.$$c.$on(n,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Wu(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return tu(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Wu(t,e,i,o){let n=i[t]?.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;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 a0(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Wv="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Wv);import{clientChecker as M3}from"@vkontakte/videoplayer-core/evergreen";import"@vkontakte/videoplayer-core/evergreen";import{noop as Uh,safeStorage as L3,throttleFn as V3}from"@vkontakte/videoplayer-shared/evergreen";import{SeekAction as R3}from"@vkontakte/videoplayer-statistics/evergreen";import{InterfaceLanguage as l0,fillWithDefault as d0,VideoQuality as Qv}from"@vkontakte/videoplayer-shared/evergreen";var c0={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:l0.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:Qv.Q_480P,highQualityLimit:Qv.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,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},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}},Gv=t=>d0(t,c0),jv=t=>ms("ui-config",t),Vt=()=>fs("ui-config");var pl="vk_player_debug_panel_opened";var Yv="videoplayer",Zv="videoplayer";var Vr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Xv=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Jv=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),eg=new Set(["ShiftRight","ShiftLeft"]);var tg=["TIMELINE"],fl=[...tg,"GRAPH_BUTTON"],Qu=[...tg,"PLAY_BUTTON"],ml=[...fl,"PLAY_BUTTON"];var Rr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(Rr||{}),Ma={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as ig,VERSION as u0}from"@vkontakte/videoplayer-shared/evergreen";import{VERSION as p0}from"@vkontakte/videoplayer-core/evergreen";import{VERSION as f0}from"@vkontakte/videoplayer-statistics/evergreen";var Yd="prod",ys="1.1.60";var La=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var og=Symbol("storeContext"),ng=Symbol("microStoresContext"),rg=(t,e)=>{ms(og,t),ms(ng,e),Yd==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=fs(og);return ig(t,"Store context is empty!"),t},Hi=()=>{let t=fs(ng);return ig(t,"MicroStores context is empty!"),t},Ut=(t,e)=>Xd(t,t.getValue(),e),Xd=(t,e,i)=>Qn(e,o=>{let n=t.subscribe(a=>{o(a),i?.(a)});return()=>n.unsubscribe()}),ag=(t,e,i)=>{let o=t.info,{width:n,height:a}=ve(i.ui.playerSize),s=o.throughputEstimation$.getValue()?.toFixed(0)??0,d=o.rttEstimation$.getValue()?.toFixed(0)??0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${ys} (core: ${p0}, stat: ${f0}, shared: ${u0})`,u=ve(i.state.errorLog$),_=u.length?`
|
|
48
|
+
\r\f\xA0\v\uFEFF`];function Pv(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||Ev.includes(o[s-1]))&&(d===o.length||Ev.includes(o[d]))?o=(s===0?"":o.substring(0,s))+o.substring(d+1):s=d}}return o===""?null:o}function Av(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 Du(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Mv(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(Du)),n&&l.push(...Object.keys(n).map(Du));var c=0,u=-1;let w=t.length;for(var _=0;_<w;_++){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===":"&&u===-1)u=_;else if(p===";"||_===w-1){if(u!==-1){var y=Du(t.substring(c,u).trim());if(!l.includes(y)){p!==";"&&_++;var x=t.substring(c,_).trim();i+=" "+x+";"}}c=_+1,u=-1}}}}return o&&(i+=Av(o)),n&&(i+=Av(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function Z(t,e,i,o,n,a){var s=t.__className;if(We||s!==i){var d=Pv(i,o,a);(!We||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 c=!!a[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return a}function Ou(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 tt(t,e,i,o){var n=t.__style;if(We||n!==e){var a=Mv(e,o);(!We||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else o&&(Array.isArray(o)?(Ou(t,i?.[0],o[0]),Ou(t,i?.[1],o[1],"important")):Ou(t,i,o));return o}var _s=Symbol("class"),bs=Symbol("style"),Rv=Symbol("is custom element"),Bv=Symbol("is html");function Nv(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Me(t,e,i,o){var n=Dv(t);if(We&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){o||D1(t,e,i??"");return}n[e]!==(n[e]=i)&&(e==="loading"&&(t[bm]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Ov(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function he(t,e,i,o,n=!1){var a=Dv(t),s=a[Rv],d=!a[Bv];let l=We&&s;l&&Di(!1);var c=e||{},u=t.tagName==="OPTION";for(var _ in e)_ in i||(i[_]=null);i.class?i.class=cl(i.class):(o||i[_s])&&(i.class=null),i[bs]&&(i.style??=null);var p=Ov(t);for(let P in i){let T=i[P];if(u&&P==="value"&&T==null){t.value=t.__value="",c[P]=T;continue}if(P==="class"){var y=t.namespaceURI==="http://www.w3.org/1999/xhtml";Z(t,y,T,o,e?.[_s],i[_s]),c[P]=T,c[_s]=i[_s];continue}if(P==="style"){tt(t,T,e?.[bs],i[bs]),c[P]=T,c[bs]=i[bs];continue}var x=c[P];if(T!==x){c[P]=T;var w=P[0]+P[1];if(w!=="$$")if(w==="on"){let N={},Q="$$"+P,G=P.slice(2);var S=mv(G);if(fv(G)&&(G=G.slice(0,-7),N.capture=!0),!S&&x){if(T!=null)continue;t.removeEventListener(G,c[Q],N),c[Q]=null}if(T!=null)if(S)t[`__${G}`]=T,it([G]);else{let ee=function(ie){c[P].call(this,ie)};var A=ee;c[Q]=Au(G,t,ee,N)}else S&&(t[`__${G}`]=void 0)}else if(P==="style")Me(t,P,T);else if(P==="autofocus")Iu(t,!!T);else if(!s&&(P==="__value"||P==="value"&&T!=null))t.value=t.__value=T;else if(P==="selected"&&u)Nv(t,T);else{var I=P;d||(I=vv(I));var L=I==="defaultValue"||I==="defaultChecked";if(T==null&&!s&&!L)if(a[P]=null,I==="value"||I==="checked"){let N=t,Q=e===void 0;if(I==="value"){let G=N.defaultValue;N.removeAttribute(I),N.defaultValue=G,N.value=N.__value=Q?G:null}else{let G=N.defaultChecked;N.removeAttribute(I),N.defaultChecked=G,N.checked=Q?G:!1}}else t.removeAttribute(P);else L||p.includes(I)&&(s||typeof T!="string")?t[I]=T:typeof T!="function"&&Me(t,I,T,n)}}}return l&&Di(!0),c}function Dv(t){return t.__attributes??={[Rv]:t.nodeName.includes("-"),[Bv]:t.namespaceURI===_m}}var Lv=new Map;function Ov(t){var e=Lv.get(t.nodeName);if(e)return e;Lv.set(t.nodeName,e=[]);for(var i,o=t,n=Element.prototype;n!==o;){i=Td(o);for(var a in i)i[a].set&&e.push(a);o=Fr(o)}return e}function D1(t,e,i){$e&&(e==="srcset"&&O1(t,i)||Hu(t.getAttribute(e)??"",i)||qm(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Hu(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function Vv(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function O1(t,e){var i=Vv(t.srcset),o=Vv(e);return o.length===i.length&&o.every(([n,a],s)=>a===i[s][1]&&(Hu(i[s][0],n)||Hu(n,i[s][0])))}var H1=kd?()=>performance.now():()=>Date.now(),fr={tick:t=>(kd?requestAnimationFrame:J)(t),now:()=>H1(),tasks:new Set};function Hv(){let t=fr.now();fr.tasks.forEach(e=>{e.c(t)||(fr.tasks.delete(e),e.f())}),fr.tasks.size!==0&&fr.tick(Hv)}function Fv(t){let e;return fr.tasks.size===0&&fr.tick(Hv),{promise:new Promise(i=>{fr.tasks.add(e={c:t,f:i})}),abort(){fr.tasks.delete(e)}}}function Qd(t,e){nl(()=>{t.dispatchEvent(new CustomEvent(e))})}function q1(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 Uv(t){let e={},i=t.split(";");for(let o of i){let[n,a]=o.split(":");if(!n||a===void 0)break;let s=q1(n.trim());e[s]=a.trim()}return e}var K1=t=>t;function Uu(t,e,i,o){var n=(t&1)!==0,a=(t&2)!==0,s=n&&a,d=(t&4)!==0,l=s?"both":n?"in":"out",c,u=e.inert,_=e.style.overflow,p,y;function x(){var A=Tt,P=vt;Zi(null),Bi(null);try{return c??=i()(e,o?.()??{},{direction:l})}finally{Zi(A),Bi(P)}}var w={is_global:d,in(){if(e.inert=u,!n){y?.abort(),y?.reset?.();return}a||p?.abort(),Qd(e,"introstart"),p=Fu(e,x(),y,1,()=>{Qd(e,"introend"),p?.abort(),p=c=void 0,e.style.overflow=_})},out(A){if(!a){A?.(),c=void 0;return}e.inert=!0,Qd(e,"outrostart"),y=Fu(e,x(),p,0,()=>{Qd(e,"outroend"),A?.()})},stop:()=>{p?.abort(),y?.abort()}},S=vt;if((S.transitions??=[]).push(w),n&&rl){var I=d;if(!I){for(var L=S.parent;L&&(L.f&65536)!==0;)for(;(L=L.parent)&&(L.f&16)===0;);I=!L||(L.f&32768)!==0}I&&en(()=>{pt(()=>w.in())})}}function Fu(t,e,i,o,n){var a=o===1;if(oa(e)){var s,d=!1;return Ao(()=>{if(!d){var S=e({direction:a?"in":"out"});s=Fu(t,S,i,o,n)}}),{abort:()=>{d=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(i?.deactivate(),!e?.duration)return n(),{abort:J,deactivate:J,reset:J,t:()=>o};let{delay:l=0,css:c,tick:u,easing:_=K1}=e;var p=[];if(a&&i===void 0&&(u&&u(0,1),c)){var y=Uv(c(0,1));p.push(y,y)}var x=()=>1-o,w=t.animate(p,{duration:l});return w.onfinish=()=>{var S=i?.t()??1-o;i?.abort();var I=o-S,L=e.duration*Math.abs(I),A=[];if(L>0){var P=!1;if(c)for(var T=Math.ceil(L/16.666666666666668),N=0;N<=T;N+=1){var Q=S+I*_(N/T),G=Uv(c(Q,1-Q));A.push(G),P||=G.overflow==="hidden"}P&&(t.style.overflow="hidden"),x=()=>{var ee=w.currentTime;return S+I*_(ee/L)},u&&Fv(()=>{if(w.playState!=="running")return!1;var ee=x();return u(ee,1-ee),!0})}w=t.animate(A,{duration:L,fill:"forwards"}),w.onfinish=()=>{x=()=>o,u?.(o,1-o),n()}},{abort:()=>{w&&(w.cancel(),w.effect=null,w.onfinish=J)},deactivate:()=>{n=J},reset:()=>{o===0&&u?.(1,0)},t:()=>x()}}var zu=class t{#t=new WeakMap;#e;#i;static entries=new WeakMap;constructor(e){this.#i=e}observe(e,i){var o=this.#t.get(e)||new Set;return o.add(i),this.#t.set(e,o),this.#o().observe(e,this.#i),()=>{var n=this.#t.get(e);n.delete(i),n.size===0&&(this.#t.delete(e),this.#e.unobserve(e))}}#o(){return this.#e??(this.#e=new ResizeObserver(e=>{for(var i of e){t.entries.set(i.target,i);for(var o of this.#t.get(i.target)||[])o(i)}}))}};var G1=new zu({box:"border-box"});function Lr(t,e,i){var o=G1.observe(t,()=>i(t[e]));en(()=>(pt(()=>i(t[e])),o))}function zv(t,e){return t===e||t?.[_o]===e}function at(t={},e,i,o){return en(()=>{var n,a;return Ji(()=>{n=a,a=o?.()||[],pt(()=>{t!==i(...a)&&(e(t,...a),n&&zv(i(...n),t)&&e(null,...n))})}),()=>{Ao(()=>{a&&zv(i(...a),t)&&e(null,...a)})}}),t}function mr(t=!1){let e=wt,i=e.l.u;if(!i)return;let o=()=>Od(e.s);if(t){let n=0,a={},s=m(()=>{let d=!1,l=e.s;for(let c in l)l[c]!==a[c]&&(a[c]=l[c],d=!0);return d&&n++,n});o=()=>r(s)}i.b.length&&us(()=>{qv(e,o),na(i.b)}),Qe(()=>{let n=pt(()=>i.m.map(xm));return()=>{for(let a of n)typeof a=="function"&&a()}}),i.a.length&&Qe(()=>{qv(e,o),na(i.a)})}function qv(t,e){if(t.l.s)for(let i of t.l.s)r(i);e()}if($e){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;Vm(e)},set:o=>{i=o}})}};Y1=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var Y1;function It(t){wt===null&&ps("onMount"),Ar&&wt.l!==null?j1(wt).m.push(t):Qe(()=>{let e=pt(t);if(typeof e=="function")return e})}function on(t){wt===null&&ps("onDestroy"),It(()=>()=>pt(t))}function j1(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function ul(t,e,i){if(t==null)return e(void 0),i&&i(void 0),J;let o=pt(()=>t.subscribe(e,i));return o.unsubscribe?()=>o.unsubscribe():o}var $s=[];function Qn(t,e){return{subscribe:ae(t,e).subscribe}}function ae(t,e=J){let i=null,o=new Set;function n(d){if(ts(t,d)&&(t=d,i)){let l=!$s.length;for(let c of o)c[1](),$s.push(c,t);if(l){for(let c=0;c<$s.length;c+=2)$s[c][0]($s[c+1]);$s.length=0}}}function a(d){n(d(t))}function s(d,l=J){let c=[d,l];return o.add(c),o.size===1&&(i=e(n,a)||J),d(t),()=>{o.delete(c),o.size===0&&i&&(i(),i=null)}}return{set:n,update:a,subscribe:s}}function li(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 Qn(i,(s,d)=>{let l=!1,c=[],u=0,_=J,p=()=>{if(u)return;_();let x=e(o?c[0]:c,s,d);a?s(x):_=typeof x=="function"?x:J},y=n.map((x,w)=>ul(x,S=>{c[w]=S,u&=~(1<<w),l&&p()},()=>{u|=1<<w}));return l=!0,p(),function(){na(y),_(),l=!1}})}function ve(t){let e;return ul(t,i=>e=i)(),e}var jd=!1,qu=Symbol();function $(t,e,i){let o=i[e]??={store:null,source:qr(void 0),unsubscribe:J};if(o.store!==t&&!(qu in i))if(o.unsubscribe(),o.store=t??null,t==null)o.source.v=void 0,o.unsubscribe=J;else{var n=!0;o.unsubscribe=ul(t,a=>{n?o.source.v=a:D(o.source,a)}),n=!1}return t&&qu in i?ve(t):r(o.source)}function Oe(){let t={};function e(){No(()=>{for(var i in t)t[i].unsubscribe();Ri(t,qu,{enumerable:!1,value:!0})})}return[t,e]}function Ku(t){var e=jd;try{return jd=!1,[t(),jd]}finally{jd=e}}var o0={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return $e&&Lm(`${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 xe(t,e,i){return new Proxy($e?{props:t,exclude:e,name:i,other:{},to_proxy:[]}:{props:t,exclude:e},o0)}var n0={get(t,e){let i=t.props.length;for(;i--;){let o=t.props[i];if(oa(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];oa(n)&&(n=n());let a=Cn(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(oa(o)&&(o=o()),typeof o=="object"&&o!==null&&e in o){let n=Cn(o,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===_o||e===Us)return!1;for(let i of t.props)if(oa(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){let e=[];for(let i of t.props){oa(i)&&(i=i());for(let o in i)e.includes(o)||e.push(o)}return e}};function Gr(...t){return new Proxy({props:t},n0)}function Kv(t){return t.ctx?.d??!1}function v(t,e,i,o){var n=(i&1)!==0,a=!Ar||(i&2)!==0,s=(i&8)!==0,d=(i&16)!==0,l=!1,c;s?[c,l]=Ku(()=>t[e]):c=t[e];var u=_o in t||Us in t,_=s&&(Cn(t,e)?.set??(u&&e in t&&(Q=>t[e]=Q)))||void 0,p=o,y=!0,x=!1,w=()=>(x=!0,y&&(y=!1,d?p=pt(o):p=o),p);c===void 0&&o!==void 0&&(_&&a&&Mm(e),c=w(),_&&_(c));var S;if(a)S=()=>{var Q=t[e];return Q===void 0?w():(y=!0,x=!1,Q)};else{var I=(n?m:ur)(()=>t[e]);I.f|=131072,S=()=>{var Q=r(I);return Q!==void 0&&(p=void 0),Q===void 0?p:Q}}if((i&4)===0)return S;if(_){var L=t.$$legacy;return function(Q,G){return arguments.length>0?((!a||!G||L||l)&&_(G?S():Q),Q):S()}}var A=!1,P=!1,T=qr(c),N=m(()=>{var Q=S(),G=r(T);return A?(A=!1,P=!0,G):(P=!1,T.v=Q)});return s&&r(N),n||(N.equals=is),function(Q,G){if(Ws!==null&&(A=P,S(),r(T)),arguments.length>0){let ee=G?r(N):a&&s?pe(Q):Q;if(!N.equals(ee)){if(A=!0,D(T,ee),x&&p!==void 0&&(p=ee),Kv(N))return Q;pt(()=>r(N))}return Q}return Kv(N)?N.v:r(N)}}var r0;typeof HTMLElement=="function"&&(r0=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(t,e,i){super(),this.$$ctor=t,this.$$s=e,i&&this.attachShadow({mode:"open"})}addEventListener(t,e,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,i)}removeEventListener(t,e,i){if(super.removeEventListener(t,e,i),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return a=>{let s=document.createElement("slot");n!=="default"&&(s.name=n),b(a,s)}};var t=e;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},o=a0(this);for(let n of this.$$s)n in o&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),i.default=!0):i[n]=e(n));for(let n of this.attributes){let a=this.$$g_p(n.name);a in this.$$d||(this.$$d[a]=Wu(a,n.value,this.$$p_d,"toProp"))}for(let n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=kv({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=Fd(()=>{Ji(()=>{this.$$r=!0;for(let n of tu(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];let a=Wu(n,this.$$d[n],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,a)}this.$$r=!1})});for(let n in this.$$l)for(let a of this.$$l[n]){let s=this.$$c.$on(n,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,e,i){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Wu(t,i,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return tu(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Wu(t,e,i,o){let n=i[t]?.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;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 a0(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var Wv="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Wv);import{clientChecker as M3}from"@vkontakte/videoplayer-core/evergreen";import"@vkontakte/videoplayer-core/evergreen";import{noop as Uh,safeStorage as L3,throttleFn as V3}from"@vkontakte/videoplayer-shared/evergreen";import{SeekAction as R3}from"@vkontakte/videoplayer-statistics/evergreen";import{InterfaceLanguage as l0,fillWithDefault as d0,VideoQuality as Qv}from"@vkontakte/videoplayer-shared/evergreen";var c0={isMobile:void 0,debugLog:!1,devNullLog:!1,defaultLanguage:l0.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:Qv.Q_480P,highQualityLimit:Qv.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,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},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}},Gv=t=>d0(t,c0),jv=t=>ms("ui-config",t),Vt=()=>fs("ui-config");var pl="vk_player_debug_panel_opened";var Yv="videoplayer",Zv="videoplayer";var Vr={KeyF:"f",KeyK:"k",KeyC:"c",KeyM:"m"},Xv=new Set(["ArrowLeft","ArrowRight","KeyL","KeyJ"]),Jv=new Set(["Tab","Space","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),eg=new Set(["ShiftRight","ShiftLeft"]);var tg=["TIMELINE"],fl=[...tg,"GRAPH_BUTTON"],Qu=[...tg,"PLAY_BUTTON"],ml=[...fl,"PLAY_BUTTON"];var Rr=(a=>(a.XS="xs",a.S="s",a.M="m",a.L="l",a.XL="xl",a))(Rr||{}),Ma={xs:0,s:1,m:2,l:3,xl:4};import{assertNonNullable as ig,VERSION as u0}from"@vkontakte/videoplayer-shared/evergreen";import{VERSION as p0}from"@vkontakte/videoplayer-core/evergreen";import{VERSION as f0}from"@vkontakte/videoplayer-statistics/evergreen";var Yd="prod",ys="1.1.61-dev.6fff06ee.0";var La=(t,e,i)=>{let o=document.createElement("a");o.href=t,o.download=`${e}.${i}`,o.style.display="none",o.click()};var og=Symbol("storeContext"),ng=Symbol("microStoresContext"),rg=(t,e)=>{ms(og,t),ms(ng,e),Yd==="dev"&&(window.app={store:t,microStores:e})},ye=()=>{let t=fs(og);return ig(t,"Store context is empty!"),t},Hi=()=>{let t=fs(ng);return ig(t,"MicroStores context is empty!"),t},Ut=(t,e)=>Xd(t,t.getValue(),e),Xd=(t,e,i)=>Qn(e,o=>{let n=t.subscribe(a=>{o(a),i?.(a)});return()=>n.unsubscribe()}),ag=(t,e,i)=>{let o=t.info,{width:n,height:a}=ve(i.ui.playerSize),s=o.throughputEstimation$.getValue()?.toFixed(0)??0,d=o.rttEstimation$.getValue()?.toFixed(0)??0,l=o.isAutoQualityEnabled$.getValue()?"auto":"manual",c=`${ys} (core: ${p0}, stat: ${f0}, shared: ${u0})`,u=ve(i.state.errorLog$),_=u.length?`
|
|
49
49
|
`+u.map((I,L)=>{let A=`${L}) Type: ${I.id}
|
|
50
50
|
`,P=`Message: ${I.message} (${I.thrown})
|
|
51
51
|
`,T=`Trace: ${I.thrown?.stack}
|
|
@@ -360,5 +360,5 @@ Try switching the\xA0quality to\xA0Auto.`},Ig=h0;var jr=new Map;jr.set(Ag.EN,Ig)
|
|
|
360
360
|
/* --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);}
|
|
361
361
|
/* 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);}
|
|
362
362
|
|
|
363
|
-
/* \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 sm(t,e){F(e,!0),K(t,N3);let[i,o]=Oe(),n=()=>$(Et,"$isLive$",i),a=v(e,"sources",7),s=v(e,"store",7),d=v(e,"microStoresRoot",7),l=v(e,"videoConfig",7),c=v(e,"uiConfig",7),u=v(e,"title",7),_=v(e,"thumbUrl",7),p=v(e,"interactiveContainer",7),y=v(e,"interactiveController",7),x=v(e,"subtitles",7),w=v(e,"live",7),S=v(e,"preload",7),I=v(e,"autoplay",7),L=v(e,"volume",7,void 0),A=v(e,"muted",7,void 0),P=v(e,"fromTime",7),T=v(e,"canRewindLive",7),N=v(e,"showAds",7),Q=v(e,"adsSlotId",7,void 0),G=v(e,"adsParams",7,void 0),ee=v(e,"adsPreviewParam",7,void 0),ie=v(e,"adsAutoplayParam",7,void 0),oe=v(e,"duration",7,void 0),te=v(e,"logoClickable",7),ge=v(e,"logoHidden",7),X=v(e,"isMobile",7),Le=v(e,"showNextPrevButtons",7,!1),Ae=v(e,"nextButtonActive",7,!1),se=v(e,"prevButtonActive",7,!1),He=v(e,"endScreenVideoTitle",7,void 0),j=v(e,"endScreenVideoThumb",7,void 0),B=v(e,"isOneVideoPlaylist",7,!1),Ve=v(e,"supportLink",7),_e=v(e,"shadowRootContainer",7,void 0),Ce=v(e,"outerContainerRef",7,void 0),Be=v(e,"fullScreenTarget",7,void 0),ce=v(e,"failoverHosts",7,void 0),R=v(e,"showMiniTimer",7,!1),be=v(e,"saveRate",7),Ie=v(e,"seekToInteractive",7,Uh),je=v(e,"playPrevChapter",7,Uh),qe=v(e,"volumeMultiplier",7),ke=v(e,"showAutoplayNext",7),Pe=v(e,"showEndScreen",7,!0),Re=v(e,"keyboardControls",15,void 0),{subscribers:ct,stores:gt}=d();jv(c());let ot=Vt(),kt=c().logoLink,nt=s().ui.debugPanelVisible,ut=s().ui.playerSize,Et=s().state.isLive$,Ne=s().state.isInteractive&&M3.device.isAndroid,Ye=Y(void 0),q=null,re=Y(!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}),rg(s(),gt),Qe(()=>{s().ui.isMobile.set(X())});let ne=(z=!1)=>{D(re,!0),z?s().actions.external.firstStart(N()):s().actions.internal.firstStart(N())},Fe=()=>{if(ot.features.qualityDetailsSubMenuEnabled){let z=Cg(s().videoId);if(z)switch(z.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,z.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,z.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(z.quality);break}}else{kg(s().videoId),np()&&s().actions.internal.setTrafficSavingEnabled(!0);let zt=ep(s().videoId);zt&&s().actions.internal.setQuality(zt)}};function Ge(z){let zt=a()||z;zt&&s().initVideo({container:r(Ye),sources:zt,failoverHosts:ce(),subtitles:x(),volumeMultiplier:qe()});let yi=L3.get(pl)==="true";nt.set(yi),P()>0&&s().actions.external.seekTime(P());let Ui=X()?ot.volumeDefault:L()??Jd()??ot.volumeDefault,Xt=A()??bg();if(s().actions.external.setVolume(Ui),s().actions.external.setMuted(Xt),s().getAdmanWrapper().setInitialVolume(Xt?0:Ui),Fe(),ot.features.saveRate&&be()){let Jt=xg();Jt&&!n()&&s().actions.internal.setPlaybackRate(Jt)}if(ke()){let Jt=Sg();Jt&&s().actions.internal.setAutoplayNextEnabled(Jt)}s().ui.isAutoplay.set(I()),I()?ne():S()&&ot.features.preload&&s().actions.internal.preload()}let yt=z=>{if(window.ResizeObserver){let zt,yi;q=new ResizeObserver(V3(Ui=>{let Xt=Ui[0];if(Xt.contentBoxSize){let Jt=Array.isArray(Xt.contentBoxSize)?Xt.contentBoxSize[0]:Xt.contentBoxSize;zt=Jt.inlineSize,yi=Jt.blockSize}else Xt.contentRect&&(zt=Xt.contentRect.width,yi=Xt.contentRect.height);ut.set({width:zt,height:yi})},300)),q.observe(z)}ut.set({width:z.clientWidth,height:z.clientHeight})},Ke=()=>{document.hidden&&s().actions.external.stop()};It(()=>{Ne&&document.addEventListener("visibilitychange",Ke),ot.debugLog&&s().actions.internal.startLogging(),yt(r(Ye));let z=ct.map(yi=>yi.init({store:s(),microStores:gt,config:l(),interactiveController:y(),uiConfig:c()})),zt=()=>{Ne&&document.removeEventListener("visibilitychange",Ke),q?.disconnect(),z.forEach(yi=>yi.unsubscribe()),s().destroy()};return w()?.status==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),zt):w()?.status==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),zt):(w()?.status==="finished"||w()?.status==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),zt):(Ge(),zt)});function Ze(){r(re)?s().actions.external.play():ne(!0)}function Ee(){s().actions.external.pause()}function dt(z){s().actions.external.setMuted(z)}function Rt(z){X()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function Gt(z){s().actions.internal.seekTime(z,R3.UNKNOWN)}function Zt(z){s().actions.external.seekEpisodeStartTime(z)}function ui(){s().actions.external.returnFocusToEpisodes()}function Fi(z){s().actions.external.setPlaybackRate(z)}function Do(z){s().actions.external.setAutoQualityLimits(z)}let an=Oc(ot.view);var io=B3();tt(io,an);var sn=h(io);{var Oo=z=>{am(z,{get store(){return s()},uiConfig:ot,get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:kt,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return je()},firstStart:ne,seekTime:Gt,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ye)},set videoContainer(zt){D(Ye,pe(zt))}})},Ho=z=>{nm(z,{get store(){return s()},uiConfig:ot,get title(){return u()},get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:kt,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return je()},firstStart:ne,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ye)},set videoContainer(zt){D(Ye,pe(zt))},get keyboardControls(){return Re()},set keyboardControls(zt){Re(zt)}})};V(sn,z=>{X()?z(Oo):z(Ho,!1)})}g(io),b(t,io);var co=U({initVideo:Ge,play:Ze,pause:Ee,setMuted:dt,setVolume:Rt,seekTime:Gt,seekEpisodeStartTime:Zt,returnFocusToEpisodes:ui,setPlaybackRate:Fi,setAutoQualityLimits:Do,get sources(){return a()},set sources(z){a(z)},get store(){return s()},set store(z){s(z)},get microStoresRoot(){return d()},set microStoresRoot(z){d(z)},get videoConfig(){return l()},set videoConfig(z){l(z)},get uiConfig(){return c()},set uiConfig(z){c(z)},get title(){return u()},set title(z){u(z)},get thumbUrl(){return _()},set thumbUrl(z){_(z)},get interactiveContainer(){return p()},set interactiveContainer(z){p(z)},get interactiveController(){return y()},set interactiveController(z){y(z)},get subtitles(){return x()},set subtitles(z){x(z)},get live(){return w()},set live(z){w(z)},get preload(){return S()},set preload(z){S(z)},get autoplay(){return I()},set autoplay(z){I(z)},get volume(){return L()},set volume(z){L(z)},get muted(){return A()},set muted(z){A(z)},get fromTime(){return P()},set fromTime(z){P(z)},get canRewindLive(){return T()},set canRewindLive(z){T(z)},get showAds(){return N()},set showAds(z){N(z)},get adsSlotId(){return Q()},set adsSlotId(z){Q(z)},get adsParams(){return G()},set adsParams(z){G(z)},get adsPreviewParam(){return ee()},set adsPreviewParam(z){ee(z)},get adsAutoplayParam(){return ie()},set adsAutoplayParam(z){ie(z)},get duration(){return oe()},set duration(z){oe(z)},get logoClickable(){return te()},set logoClickable(z){te(z)},get logoHidden(){return ge()},set logoHidden(z){ge(z)},get isMobile(){return X()},set isMobile(z){X(z)},get showNextPrevButtons(){return Le()},set showNextPrevButtons(z){Le(z)},get nextButtonActive(){return Ae()},set nextButtonActive(z){Ae(z)},get prevButtonActive(){return se()},set prevButtonActive(z){se(z)},get endScreenVideoTitle(){return He()},set endScreenVideoTitle(z){He(z)},get endScreenVideoThumb(){return j()},set endScreenVideoThumb(z){j(z)},get isOneVideoPlaylist(){return B()},set isOneVideoPlaylist(z){B(z)},get supportLink(){return Ve()},set supportLink(z){Ve(z)},get shadowRootContainer(){return _e()},set shadowRootContainer(z){_e(z)},get outerContainerRef(){return Ce()},set outerContainerRef(z){Ce(z)},get fullScreenTarget(){return Be()},set fullScreenTarget(z){Be(z)},get failoverHosts(){return ce()},set failoverHosts(z){ce(z)},get showMiniTimer(){return R()},set showMiniTimer(z){R(z)},get saveRate(){return be()},set saveRate(z){be(z)},get showAutoplayNext(){return ke()},set showAutoplayNext(z){ke(z)},get seekToInteractive(){return Ie()},set seekToInteractive(z){Ie(z)},get playPrevChapter(){return je()},set playPrevChapter(z){je(z)},get volumeMultiplier(){return qe()},set volumeMultiplier(z){qe(z)},get showEndScreen(){return Pe()},set showEndScreen(z){Pe(z)},get keyboardControls(){return Re()},set keyboardControls(z){Re(z)}});return o(),co}var D3=me('<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 lm(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=D3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(o,n,{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 dm(t,e){let i=v(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");lm(t,{get style(){return r(o)}})}var O3=M('<div class="title svelte-1y9fytq"> </div>'),H3=M('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),F3={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 cm(t,e){K(t,F3);var i=H3(),o=h(i);{var n=d=>{var l=O3(),c=h(l,!0);g(l),C(()=>le(c,e.title)),b(d,l)};V(o,d=>{e.title&&d(n)})}var a=E(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);dm(d,{get isWhite(){return r(l)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),C(()=>tt(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}import{now as dx}from"@vkontakte/videoplayer-shared/evergreen";import{cloneDeepWith as cx,InterfaceLanguage as ux,isNonNullable as gm,Logger as px,Observable as fx,Subscription as Yh,once as mx,InternalsExposure as vx,skip as gx}from"@vkontakte/videoplayer-shared/evergreen";import{clientChecker as Zh,isMobile as hx}from"@vkontakte/videoplayer-core/evergreen";import{OneStat as _x}from"@vkontakte/videoplayer-statistics/evergreen";import{Logger as U3,Subscription as z3}from"@vkontakte/videoplayer-shared/evergreen";var Hc=class{constructor(){this.subscription=new z3,this.logger=new U3,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){if(this.isSupported())for(let[i,o]of e)try{navigator.mediaSession.setActionHandler?.(i,o)}catch{throw new Error(`The media session action "${i}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{let o=ve(e.state.currentPlaybackRate$),n=ve(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{navigator.mediaSession.setPositionState?.({position:i,playbackRate:o,duration:n})}catch{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 fm,detectEmbed as Q3}from"@vkontakte/videoplayer-shared/evergreen";var q3=me('<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 um(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=q3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(o,n,{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 K3=M('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),W3={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 pm(t,e){F(e,!0),K(t,W3);let[i,o]=Oe(),n=()=>$(c,"$interfaceLanguage$",i),a=()=>$(u,"$isMobile$",i),s=ye(),d=Vt(),l=!!s.webApi.pictureInPictureApi,c=s.interfaceLanguage$,u=s.ui.isMobile,_=s.ui.t,p=m(()=>n()&&_("pip_dummy_title")),y=Oc(d.view);var x=K3();Z(x,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),tt(x,y);var w=h(x);let S;var I=h(w);um(I,{}),g(w);var L=E(w,2),A=h(L,!0);g(L),g(x),C(P=>{S=Z(w,1,"dummy-image svelte-1pbsod4",null,S,P),le(A,r(p))},[()=>({desktop:!a()})]),b(t,x),U(),o()}var G3=460,j3=280,dd=class{playerDomElement;playerParentShadowRoot;playerDummyElement;svelteContext;pipWindow;info={isActive$:new fm(!1),isEnabled$:new fm(!1),type:1};constructor({enabled:e=!0}={enabled:!0}){this.info.isEnabled$=new fm(e)}isSupported(){let{isEmbed:e}=Q3();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}async request(){if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:G3,height:j3,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(d=>d.cssText).join(" ")).filter(Boolean).join(`
|
|
363
|
+
/* \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 sm(t,e){F(e,!0),K(t,N3);let[i,o]=Oe(),n=()=>$(Et,"$isLive$",i),a=v(e,"sources",7),s=v(e,"store",7),d=v(e,"microStoresRoot",7),l=v(e,"videoConfig",7),c=v(e,"uiConfig",7),u=v(e,"title",7),_=v(e,"thumbUrl",7),p=v(e,"interactiveContainer",7),y=v(e,"interactiveController",7),x=v(e,"subtitles",7),w=v(e,"live",7),S=v(e,"preload",7),I=v(e,"autoplay",7),L=v(e,"volume",7,void 0),A=v(e,"muted",7,void 0),P=v(e,"fromTime",7),T=v(e,"canRewindLive",7),N=v(e,"showAds",7),Q=v(e,"adsSlotId",7,void 0),G=v(e,"adsParams",7,void 0),ee=v(e,"adsPreviewParam",7,void 0),ie=v(e,"adsAutoplayParam",7,void 0),oe=v(e,"duration",7,void 0),te=v(e,"logoClickable",7),ge=v(e,"logoHidden",7),X=v(e,"isMobile",7),Le=v(e,"showNextPrevButtons",7,!1),Ae=v(e,"nextButtonActive",7,!1),se=v(e,"prevButtonActive",7,!1),He=v(e,"endScreenVideoTitle",7,void 0),j=v(e,"endScreenVideoThumb",7,void 0),B=v(e,"isOneVideoPlaylist",7,!1),Ve=v(e,"supportLink",7),_e=v(e,"shadowRootContainer",7,void 0),Ce=v(e,"outerContainerRef",7,void 0),Be=v(e,"fullScreenTarget",7,void 0),ce=v(e,"failoverHosts",7,void 0),R=v(e,"showMiniTimer",7,!1),be=v(e,"saveRate",7),Ie=v(e,"seekToInteractive",7,Uh),je=v(e,"playPrevChapter",7,Uh),qe=v(e,"volumeMultiplier",7),ke=v(e,"showAutoplayNext",7),Pe=v(e,"showEndScreen",7,!0),Re=v(e,"keyboardControls",15,void 0),{subscribers:ct,stores:gt}=d();jv(c());let ot=Vt(),kt=c().logoLink,nt=s().ui.debugPanelVisible,ut=s().ui.playerSize,Et=s().state.isLive$,Ne=s().state.isInteractive&&M3.device.isAndroid,Ye=Y(void 0),q=null,re=Y(!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}),rg(s(),gt),Qe(()=>{s().ui.isMobile.set(X())});let ne=(z=!1)=>{D(re,!0),z?s().actions.external.firstStart(N()):s().actions.internal.firstStart(N())},Fe=()=>{if(ot.features.qualityDetailsSubMenuEnabled){let z=Cg(s().videoId);if(z)switch(z.type){case"high_quality":s().actions.internal.setHighQualityEnabled(!0,z.appliesTo);break;case"traffic_saving":s().actions.internal.setTrafficSavingEnabled(!0,z.appliesTo);break;case"exact_quality":s().actions.internal.setQuality(z.quality);break}}else{kg(s().videoId),np()&&s().actions.internal.setTrafficSavingEnabled(!0);let zt=ep(s().videoId);zt&&s().actions.internal.setQuality(zt)}};function Ge(z){let zt=a()||z;zt&&s().initVideo({container:r(Ye),sources:zt,failoverHosts:ce(),subtitles:x(),volumeMultiplier:qe()});let yi=L3.get(pl)==="true";nt.set(yi),Number.isFinite(P())&&s().actions.external.seekTime(P());let Ui=X()?ot.volumeDefault:L()??Jd()??ot.volumeDefault,Xt=A()??bg();if(s().actions.external.setVolume(Ui),s().actions.external.setMuted(Xt),s().getAdmanWrapper().setInitialVolume(Xt?0:Ui),Fe(),ot.features.saveRate&&be()){let Jt=xg();Jt&&!n()&&s().actions.internal.setPlaybackRate(Jt)}if(ke()){let Jt=Sg();Jt&&s().actions.internal.setAutoplayNextEnabled(Jt)}s().ui.isAutoplay.set(I()),I()?ne():S()&&ot.features.preload&&s().actions.internal.preload()}let yt=z=>{if(window.ResizeObserver){let zt,yi;q=new ResizeObserver(V3(Ui=>{let Xt=Ui[0];if(Xt.contentBoxSize){let Jt=Array.isArray(Xt.contentBoxSize)?Xt.contentBoxSize[0]:Xt.contentBoxSize;zt=Jt.inlineSize,yi=Jt.blockSize}else Xt.contentRect&&(zt=Xt.contentRect.width,yi=Xt.contentRect.height);ut.set({width:zt,height:yi})},300)),q.observe(z)}ut.set({width:z.clientWidth,height:z.clientHeight})},Ke=()=>{document.hidden&&s().actions.external.stop()};It(()=>{Ne&&document.addEventListener("visibilitychange",Ke),ot.debugLog&&s().actions.internal.startLogging(),yt(r(Ye));let z=ct.map(yi=>yi.init({store:s(),microStores:gt,config:l(),interactiveController:y(),uiConfig:c()})),zt=()=>{Ne&&document.removeEventListener("visibilitychange",Ke),q?.disconnect(),z.forEach(yi=>yi.unsubscribe()),s().destroy()};return w()?.status==="upcoming"?(s().actions.internal.setLiveWaitingStart(!0),zt):w()?.status==="waiting"?(s().actions.internal.setLiveWaitingRecover(!0),zt):(w()?.status==="finished"||w()?.status==="postlive")&&!Object.keys(a()||[]).length?(s().actions.internal.setLiveWaitingRecord(!0),zt):(Ge(),zt)});function Ze(){r(re)?s().actions.external.play():ne(!0)}function Ee(){s().actions.external.pause()}function dt(z){s().actions.external.setMuted(z)}function Rt(z){X()||z>=0&&z<=1&&s().actions.external.setVolume(z)}function Gt(z){s().actions.internal.seekTime(z,R3.UNKNOWN)}function Zt(z){s().actions.external.seekEpisodeStartTime(z)}function ui(){s().actions.external.returnFocusToEpisodes()}function Fi(z){s().actions.external.setPlaybackRate(z)}function Do(z){s().actions.external.setAutoQualityLimits(z)}let an=Oc(ot.view);var io=B3();tt(io,an);var sn=h(io);{var Oo=z=>{am(z,{get store(){return s()},uiConfig:ot,get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:kt,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return je()},firstStart:ne,seekTime:Gt,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ye)},set videoContainer(zt){D(Ye,pe(zt))}})},Ho=z=>{nm(z,{get store(){return s()},uiConfig:ot,get title(){return u()},get thumbUrl(){return _()},get interactiveContainer(){return p()},get live(){return w()},get autoplay(){return I()},get canRewindLive(){return T()},get showAds(){return N()},get adsSlotId(){return Q()},get adsParams(){return G()},get adsPreviewParam(){return ee()},get adsAutoplayParam(){return ie()},get duration(){return oe()},get logoClickable(){return te()},get logoHidden(){return ge()},logoTargetUrl:kt,get nextButtonActive(){return Ae()},get prevButtonActive(){return se()},get endScreenVideoTitle(){return He()},get endScreenVideoThumb(){return j()},get isOneVideoPlaylist(){return B()},get supportLink(){return Ve()},get shadowRootContainer(){return _e()},get outerContainerRef(){return Ce()},get fullScreenTarget(){return Be()},get showMiniTimer(){return R()},get playerStarted(){return r(re)},get seekToInteractive(){return Ie()},get playPrevChapter(){return je()},firstStart:ne,get showEndScreen(){return Pe()},get showAutoplayNext(){return ke()},get showNextPrevButtons(){return Le()},get videoContainer(){return r(Ye)},set videoContainer(zt){D(Ye,pe(zt))},get keyboardControls(){return Re()},set keyboardControls(zt){Re(zt)}})};V(sn,z=>{X()?z(Oo):z(Ho,!1)})}g(io),b(t,io);var co=U({initVideo:Ge,play:Ze,pause:Ee,setMuted:dt,setVolume:Rt,seekTime:Gt,seekEpisodeStartTime:Zt,returnFocusToEpisodes:ui,setPlaybackRate:Fi,setAutoQualityLimits:Do,get sources(){return a()},set sources(z){a(z)},get store(){return s()},set store(z){s(z)},get microStoresRoot(){return d()},set microStoresRoot(z){d(z)},get videoConfig(){return l()},set videoConfig(z){l(z)},get uiConfig(){return c()},set uiConfig(z){c(z)},get title(){return u()},set title(z){u(z)},get thumbUrl(){return _()},set thumbUrl(z){_(z)},get interactiveContainer(){return p()},set interactiveContainer(z){p(z)},get interactiveController(){return y()},set interactiveController(z){y(z)},get subtitles(){return x()},set subtitles(z){x(z)},get live(){return w()},set live(z){w(z)},get preload(){return S()},set preload(z){S(z)},get autoplay(){return I()},set autoplay(z){I(z)},get volume(){return L()},set volume(z){L(z)},get muted(){return A()},set muted(z){A(z)},get fromTime(){return P()},set fromTime(z){P(z)},get canRewindLive(){return T()},set canRewindLive(z){T(z)},get showAds(){return N()},set showAds(z){N(z)},get adsSlotId(){return Q()},set adsSlotId(z){Q(z)},get adsParams(){return G()},set adsParams(z){G(z)},get adsPreviewParam(){return ee()},set adsPreviewParam(z){ee(z)},get adsAutoplayParam(){return ie()},set adsAutoplayParam(z){ie(z)},get duration(){return oe()},set duration(z){oe(z)},get logoClickable(){return te()},set logoClickable(z){te(z)},get logoHidden(){return ge()},set logoHidden(z){ge(z)},get isMobile(){return X()},set isMobile(z){X(z)},get showNextPrevButtons(){return Le()},set showNextPrevButtons(z){Le(z)},get nextButtonActive(){return Ae()},set nextButtonActive(z){Ae(z)},get prevButtonActive(){return se()},set prevButtonActive(z){se(z)},get endScreenVideoTitle(){return He()},set endScreenVideoTitle(z){He(z)},get endScreenVideoThumb(){return j()},set endScreenVideoThumb(z){j(z)},get isOneVideoPlaylist(){return B()},set isOneVideoPlaylist(z){B(z)},get supportLink(){return Ve()},set supportLink(z){Ve(z)},get shadowRootContainer(){return _e()},set shadowRootContainer(z){_e(z)},get outerContainerRef(){return Ce()},set outerContainerRef(z){Ce(z)},get fullScreenTarget(){return Be()},set fullScreenTarget(z){Be(z)},get failoverHosts(){return ce()},set failoverHosts(z){ce(z)},get showMiniTimer(){return R()},set showMiniTimer(z){R(z)},get saveRate(){return be()},set saveRate(z){be(z)},get showAutoplayNext(){return ke()},set showAutoplayNext(z){ke(z)},get seekToInteractive(){return Ie()},set seekToInteractive(z){Ie(z)},get playPrevChapter(){return je()},set playPrevChapter(z){je(z)},get volumeMultiplier(){return qe()},set volumeMultiplier(z){qe(z)},get showEndScreen(){return Pe()},set showEndScreen(z){Pe(z)},get keyboardControls(){return Re()},set keyboardControls(z){Re(z)}});return o(),co}var D3=me('<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 lm(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=D3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(o,n,{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 dm(t,e){let i=v(e,"isWhite",3,!1),o=m(()=>i()?"color: #fff;":"color: #909499;");lm(t,{get style(){return r(o)}})}var O3=M('<div class="title svelte-1y9fytq"> </div>'),H3=M('<div class="playerStub svelte-1y9fytq"><!> <!></div>'),F3={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 cm(t,e){K(t,F3);var i=H3(),o=h(i);{var n=d=>{var l=O3(),c=h(l,!0);g(l),C(()=>le(c,e.title)),b(d,l)};V(o,d=>{e.title&&d(n)})}var a=E(o,2);{var s=d=>{let l=m(()=>!!e.thumbUrl);dm(d,{get isWhite(){return r(l)}})};V(a,d=>{(!e.title||!e.thumbUrl)&&d(s)})}g(i),C(()=>tt(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),b(t,i)}import{now as dx}from"@vkontakte/videoplayer-shared/evergreen";import{cloneDeepWith as cx,InterfaceLanguage as ux,isNonNullable as gm,Logger as px,Observable as fx,Subscription as Yh,once as mx,InternalsExposure as vx,skip as gx}from"@vkontakte/videoplayer-shared/evergreen";import{clientChecker as Zh,isMobile as hx}from"@vkontakte/videoplayer-core/evergreen";import{OneStat as _x}from"@vkontakte/videoplayer-statistics/evergreen";import{Logger as U3,Subscription as z3}from"@vkontakte/videoplayer-shared/evergreen";var Hc=class{constructor(){this.subscription=new z3,this.logger=new U3,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){if(this.isSupported())for(let[i,o]of e)try{navigator.mediaSession.setActionHandler?.(i,o)}catch{throw new Error(`The media session action "${i}" is not supported yet.`)}}attachToStore(e){!this.isSupported()||!e||(this.clearSubscriptions(),this.subscription.add(e.state.positionExact$.subscribe(i=>{let o=ve(e.state.currentPlaybackRate$),n=ve(e.state.duration$);if(!(!isFinite(i)||!isFinite(n)))try{navigator.mediaSession.setPositionState?.({position:i,playbackRate:o,duration:n})}catch{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 fm,detectEmbed as Q3}from"@vkontakte/videoplayer-shared/evergreen";var q3=me('<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 um(t,e){let i=xe(e,["$$slots","$$events","$$legacy","children"]);var o=q3();let n;var a=h(o);de(a,()=>e.children??J),fe(),g(o),C(()=>n=he(o,n,{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 K3=M('<div><div><!></div> <span class="title svelte-1pbsod4"> </span></div>'),W3={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 pm(t,e){F(e,!0),K(t,W3);let[i,o]=Oe(),n=()=>$(c,"$interfaceLanguage$",i),a=()=>$(u,"$isMobile$",i),s=ye(),d=Vt(),l=!!s.webApi.pictureInPictureApi,c=s.interfaceLanguage$,u=s.ui.isMobile,_=s.ui.t,p=m(()=>n()&&_("pip_dummy_title")),y=Oc(d.view);var x=K3();Z(x,1,"player-pip-dummy svelte-1pbsod4",null,{},{"is-pip-api":l}),tt(x,y);var w=h(x);let S;var I=h(w);um(I,{}),g(w);var L=E(w,2),A=h(L,!0);g(L),g(x),C(P=>{S=Z(w,1,"dummy-image svelte-1pbsod4",null,S,P),le(A,r(p))},[()=>({desktop:!a()})]),b(t,x),U(),o()}var G3=460,j3=280,dd=class{playerDomElement;playerParentShadowRoot;playerDummyElement;svelteContext;pipWindow;info={isActive$:new fm(!1),isEnabled$:new fm(!1),type:1};constructor({enabled:e=!0}={enabled:!0}){this.info.isEnabled$=new fm(e)}isSupported(){let{isEmbed:e}=Q3();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}async request(){if(!this.isSupported()||!this.playerDomElement||!this.playerParentShadowRoot)return;this.pipWindow=await documentPictureInPicture.requestWindow({width:G3,height:j3,copyStyleSheets:!0}),this.pipWindow.document.body.style.margin="0";let e=[...this.playerParentShadowRoot.styleSheets].map(s=>[...s.cssRules].map(d=>d.cssText).join(" ")).filter(Boolean).join(`
|
|
364
364
|
`),i=document.createElement("style");i.textContent=e;let o=this.createStretchedContainer(),n=o.attachShadow({mode:"open"});n.append(i),n.append(this.playerDomElement);let a={target:this.playerParentShadowRoot,context:this.svelteContext};this.playerDummyElement=Qr(pm,a),this.pipWindow?.document.body.append(o),this.info.isActive$.next(!0),this.pipWindow?.addEventListener("unload",s=>{!this.playerDomElement||!this.playerParentShadowRoot||!this.playerDummyElement||(Aa(this.playerDummyElement),this.playerParentShadowRoot.append(this.playerDomElement),this.info.isActive$.next(!1))})}async remove(){return new Promise(e=>{documentPictureInPicture.window?.close(),e()})}async dispose(){await 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 zh(t){return t instanceof dd}var Fc=class{static getLatestSupportedVersion(e){let i=new Ba,o=new dd(e);if(o.isSupported())return o;if(i.isSupported())return i}};function Uc(t,e){let i=new Set([...Object.keys(t),...Object.keys(e)]),o={};for(let n of i)o[n]=e[n]??t[n]??void 0;return o}var qh="Inner error. Unexpectedly root annotation container null reference exception",Kh="Annotation with such name already exists",Wh="Annotation with such name does not exist";var Rs=class extends Error{constructor(e){super(e),this.name="AnnotationError"}};import{observeElementSize as Y3,Subscription as Z3,throttleFn as X3}from"@vkontakte/videoplayer-shared/evergreen";var J3="1",ex=100,zc=class{constructor(e){this.annotationsInside=e;this.annotations=new Map;this.subscriptions=new Z3}init(e){if(this.rootAnnotationsContainer=e,this.annotationsInside)return;let i=X3(()=>{for(let o of this.annotations.values())this.isElementExceedsBoundaries(o,this.playerSize.width,this.playerSize.height)?o.style.visibility="hidden":o.style.visibility="visible"},ex);this.subscriptions.add(Y3(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){if(!this.rootAnnotationsContainer)throw new Rs(qh);if(this.annotations.has(e))throw new Rs(Kh);i.style.zIndex=i.style.zIndex??J3,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 Rs(Wh);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(){this.annotations.clear(),this.subscriptions.unsubscribe(),this.mutationObserver?.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 qc,Subscription as tx}from"@vkontakte/videoplayer-shared/evergreen";var $o=class{init({store:e,microStores:i,interactiveController:o,config:n}){return qc(e),qc(i),qc(n),n.interactiveData&&qc(o),this.subscription=new tx,this.subscription}};var cd=class extends $o{constructor(){super(...arguments);this.stateName="fakeIsPlaying$";this.state$={...ae(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 ud=class extends $o{constructor(){super(...arguments);this.stateName="interactiveControlsOpacity$";this.state$={...ae(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:c,isMobile:u}=a.ui,_=ve(u),p=()=>_&&ve(c);return o.add(c.subscribe(y=>{if(!_)return;let x=ve(s);ve(l)?this.state$.set(y):x!==null&&this.state$.set(!x||y)})),o.add(l.subscribe(y=>{this.state$.set(!y||p())})),o.add(s.subscribe(y=>{if(y===null)return;let x=ve(d);if(p()){this.state$.set(!0);return}x&&this.state$.set(!y)})),o}};var pd=class extends $o{constructor(){super(...arguments);this.stateName="seekToInteractiveDisabledTooltip$";this.state$=ae("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 ix}from"@vkontakte/videoplayer-shared/evergreen";var mm=ae(!1),Kc=null,fd=class extends $o{constructor(){super(...arguments);this.stateName="showInteractiveTimeIndicatorTooltip$";this.state$={...mm,set:(i,o=!1)=>{i!==ve(mm)&&(this.clearTimeout(),mm.set(i),!i&&Kc&&(Kc=!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:c}=n.ui.controls;o.add(l.subscribe(_=>{ve(s)&&_&&this.state$.set(!1)}));let u=a?.interactiveData||{tooltipHelpHintActive:!1};return o.add(ix({isPlaying$:d,isInteractiveTime$:s,interactiveTimeIndicator:c}).subscribe(({isPlaying$:_,isInteractiveTime$:p,interactiveTimeIndicator:y})=>{if(!(!_||!y?.isDisplayed)){if(!p)return this.state$.set(!1);u.tooltipHelpHintActive&&Kc===null&&(Kc=!0,u.tooltipHelpHintActive=!1,this.state$.set(!0),n.callbacks?.onInteractiveTimeIndicatorHintDeactivated?.())}})),o}clearTimeout(){window.clearTimeout(this.timeout)}};import{combine as ox,noop as nx}from"@vkontakte/videoplayer-shared/evergreen";var md=class extends $o{constructor(){super(...arguments);this.stateName="graphIsOpened$";this.graphMadePause=!1;this.state$={...ae(null),toggle:nx};this.checkIfShouldHide=i=>ma(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=async()=>{if(this.checkIfShouldHide(ve(s)))return;let l=ve(this.state$),{isEnded$:c,playbackState$:u}=n.state,{disabledControls$:_}=n.ui.controls,p=ve(c),y=ve(u);if(l)try{await a?.toggleGraphView(!1),this.state$.set(!1),_.remove(Qu),!p&&this.graphMadePause&&n.actions.internal.play()}catch{d({message:"Cant hide graph"})}else{this.graphMadePause=y==="playing";try{await a?.toggleGraphView(!0),this.state$.set(!0),_.add(Qu),!p&&this.graphMadePause&&n.actions.internal.pause()}catch{d({message:"Cant show graph"})}}},o.add(ox({graphIsOpened:this.state$,currentGridType:s}).subscribe(async({graphIsOpened:l,currentGridType:c})=>{if(this.checkIfShouldHide(c)&&l)try{await a?.toggleGraphView(!1),this.state$.set(!1)}catch{d({message:"Cant hide graph"})}})),o}};import{ValueSubject as Qh}from"@vkontakte/videoplayer-shared/evergreen";var vd=class extends $o{constructor(){super(...arguments);this.stateName="pictureInPicture$";this.state$={isActive$:ae(!1),isEnabled$:ae(!1),type$:ae(void 0)}}init(i){let o=super.init(i),{store:n}=i,{info:{isActive$:a,isEnabled$:s,type:d}}=n.webApi.pictureInPictureApi||{info:{isActive$:new Qh(!1),isEnabled$:new Qh(!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 sx,filterChanged as lx}from"@vkontakte/videoplayer-shared/evergreen";import{safeStorage as vm}from"@vkontakte/videoplayer-shared/evergreen";var Gh=({maxShowCount:t,timeout:e})=>{let i=[t!==0?rx({maxCount:t}):void 0,e!==0?ax({timeout:e}):void 0].filter(o=>!!o);return{notificationShowed:o=>i.forEach(n=>n.notificationShowed(o)),canShowNotification:o=>i.every(n=>n.canShowNotification(o))}},rx=({maxCount:t})=>{let e={};return{notificationShowed:i=>{e[i]=(e[i]??0)+1,vm.set("videoplayer_notifications_manager_count",JSON.stringify(e[i]??0))},canShowNotification:i=>(e[i]??0)<t}},ax=({timeout:t})=>{let e="videoplayer_notifications_manager",i=()=>{try{return JSON.parse(vm.get(e)||"{}")}catch{return{}}},o=a=>vm.set(e,JSON.stringify(a)),n=a=>{let s=i();delete s[a],o(s)};return{notificationShowed:a=>{o({...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 gd=class extends $o{constructor(){super(...arguments);this.stateName="notifications$";this.state$={notificationsToShow$:ae({}),showNotification:i=>{this.state$.notificationsToShow$.update(o=>(o[i]=!0,o)),this.notificationManager.notificationShowed(i)},closeNotification:i=>{this.state$.notificationsToShow$.update(o=>(delete o[i],o))}}}init(i){let o=super.init(i),{store:n,uiConfig:{features:{maxCountShowSlowVideoNotification:a,timeoutShowSlowVideoNotification:s,showSlowVideoNotification:d,forceAutoQualityWhenSevereStallHappens:l}}}=i;this.notificationManager=Gh({maxShowCount:a,timeout:s});let c=n.getPlayer();return o.add(c.events.severeStallOccured$.pipe(lx(),sx(u=>u)).subscribe(()=>{d&&!c.info.isAutoQualityEnabled$.getValue()&&this.notificationManager.canShowNotification("slow_video")&&(l&&n.actions.internal.setQuality("auto"),this.state$.showNotification("slow_video"))})),o}};var jh=()=>[cd,ud,pd,fd,md,vd,gd].reduce(({subscribers:t,stores:e},i)=>{let o=new i;return{subscribers:[...t,o],stores:{...e,[o.stateName]:o.state$}}},{subscribers:[],stores:{}});import{devNull as hd}from"@vkontakte/videoplayer-shared/evergreen";var bx={preload:!0,autoplay:!1,repeat:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:ux.RU,isCyrillicRelatedInterface:!0,logoClickable:!1,logoHidden:!1,isTouch:hx(),isMediaSessionEnabled:!0,isPictureInPictureEnabled:!0,isAudioDisabled:!1,callbacks:{uiInfo:{}},tuningConfig:{configName:[]},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showAutoplayNext:!0,showNextPrevButtons:!0},rn=Y(void 0),Wc=class extends HTMLElement{svelteStubComponent;svelteRootComponent;store;microStoresRoot;statistics;sentry;_shadowRoot;playerContainer;rootContainer;shadowRootContainer;uiConfig;coreConfig;statisticsConfig;interactiveController;interactiveContainer;graphMadePause;currentPlayingVideoIndex=0;needToRepeatPlaylist=!1;videoConfig=void 0;pictureInPictureApi=void 0;mediaSessionApi=void 0;unsubscribePlayerPhaseSubscription=void 0;logger;log;subscription;interactiveSubscription;annotationsApi=void 0;slotsApi;prevIsid=void 0;isInited=!1;internalsExposure=null;constructor(){super(),hd.create("ui"),this.logger=new px,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.subscription=new Yh,this.interactiveSubscription=new Yh,this.graphMadePause=!1}connectedCallback(){if(this.isInited)return;this.initPlayerRootContainers();let e=this.getAttribute("stub-title")??void 0,i=this.getAttribute("stub-thumb-url")??void 0,o=pe({title:e,thumbUrl:i}),n={target:this.playerContainer,props:o};this.svelteStubComponent=Qr(cm,n)}disconnectedCallback(){this.annotationsApi?.destroy(),this.mediaSessionApi?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.subscription.unsubscribe(),this.unsubscribePlayerPhaseSubscription?.(),this.interactiveController?.destroy(),this.interactiveSubscription.unsubscribe(),this.internalsExposure?.destroy(),hd.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){return this.store?.ui.controls.disabledControls$?.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}}createOneStat=(e,i={})=>{let{albumId:o,statPlace:n,statUserSalt:a,statTrackCode:s,statVKAppId:d,refreshStatAuthToken:l,autoplay:c,isMobile:u,isTouch:_,refDomain:p,deviceId:y,interactiveData:x}=Uc(this.videoConfig,i),w=x?.projectInfo?.pid,S=this.interactiveController?.state.isReplay$.getValue()??!1;S&&(this.prevIsid=void 0);let{unitedVideoId:I,isClip:L=!1}=e;if(this.uiConfig.features.statistics&&I)return new _x({movieId:I,albumId:o,place:n,trackCode:s,vkAppId:d,autoplay:(c&&!this.interactiveController)??!1,mobile:_??u,clip:L,refDomain:p,deviceId:y,...w&&(!this.isInited||S)&&{projectId:Number(w)}},{refreshAuthToken:l,userSalt:a,config:this.statisticsConfig,...this.interactiveController&&{useIsid:!0,isid:this.prevIsid}})};createPlayer(e,i={},o){if(!this.videoConfig)return;let{albumId:n,statPlace:a,statAuthToken:s,preload:d,autoplay:l,volume:c,muted:u,fromTime:_,canRewindLive:p,supportLink:y,showAds:x,adsSlotId:w,adsParams:S={},adsPreviewParam:I,adsAutoplayParam:L,interfaceLanguage:A,isCyrillicRelatedInterface:P,logoClickable:T,logoHidden:N,isMobile:Q,isTouch:G,isAudioDisabled:ee,isLiveCatchUpMode:ie,fullScreenTarget:oe,failoverHosts:te,canDownload:ge,callbacks:X,interactiveData:Le,showThumbTimer:Ae,additionalButtons:se=[],additionalSettingsMenuItems:He=[],additionalContextMenuItems:j=[],repeat:B,saveRate:Ve,volumeMultiplier:_e,showEndScreen:Ce,showAutoplayNext:Be}=Uc(this.videoConfig,i),{sources:ce,title:R,thumbUrl:be,unitedVideoId:Ie,isClip:je=!1,duration:qe,adsParams:ke={},videoEpisodes:Pe,previewThumbsData:Re,subtitles:ct,live:gt}=e,ot={...S,...ke},kt=this.getNextVideoInfo(),nt={sources:ce,title:R,thumbUrl:be,subtitles:ct,unitedVideoId:Ie,isClip:je,live:gt,albumId:n,statPlace:a,autoplay:l,muted:u,volume:c,fromTime:_,canRewindLive:p,showAds:x,adsSlotId:w,adsParams:ot,adsPreviewParam:I,adsAutoplayParam:L,duration:qe,logoClickable:T,logoHidden:N,isTouch:G??Q,repeat:B,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:kt.nextVideoTitle,endScreenVideoThumb:kt.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist()},ut={pictureInPictureApi:this.pictureInPictureApi,annotationsApi:this.annotationsApi};this.log({message:`create player, props: ${JSON.stringify(nt)}`});let Et=this.interactiveController?.state.statistics$.getValue(),we=Et?.oneStat||this.createOneStat(e,i);we&&(this.statistics=new Sc(we,Et?.statSubscription)),this.uiConfig.features.sentry&&this.uiConfig.sentry.dsn&&new Va(this.uiConfig.sentry,{version:ys,env:Yd},{movieId:Ie,albumId:n,place:a,autoplay:(l&&!this.interactiveController)??!1,mobile:G??Q,clip:je}),this.interactiveController&&(this.prevIsid??=this.statistics?.oneStat.isid$.getValue()),this.sentry={...this.sentry,...Va.getInstance()};let Ye=!!Le,q=[],re="tooltip_interactive_go_back_disabled_first";if(Ye&&this.interactiveController){let yt=this.interactiveController.state.isInitialChapter$.getValue(),Ke=this.interactiveController.getHistoryState();yt&&q.push("REPLAY_BUTTON"),this.interactiveController.getIsSeekable().getValue()||q.push("SEEK_TO_INTERACTIVE_BUTTON"),Ke.hasPrevChapter$.getValue()||(q.push("PLAY_PREV_CHAPTER_BUTTON"),yt||(Ke.isGoBackLimited$.getValue()?re="tooltip_interactive_go_back_disabled_limit":re="tooltip_interactive_go_back_disabled"))}let ne=()=>{this.isInited=!1,this.prevIsid=void 0;let yt=o?.info.isEnded$.getValue()&&this.interactiveController?.state.isEndChapter$.getValue();X.onReplayInteractiveVideo&&!yt?X.onReplayInteractiveVideo():this.replayInteractiveVideo()};this.store=fh({player:o,interfaceLanguage:A,isCyrillicRelatedInterface:P,videoId:Ie,isClip:je,isLiveCatchUpMode:ie,isAudioDisabled:ee,statAuthToken:s,callbacks:X,webApi:ut,videoEpisodes:Pe,previewThumbsData:Re,canDownload:ge,uiConfig:this.uiConfig,coreConfig:this.coreConfig,disabledControls:q,isInteractive:Ye,saveRate:Ve,interactiveRanges$:this.interactiveController?.state.interactiveRanges$,isInteractiveTime$:this.interactiveController?.state.isInteractiveTime$,stopPlayer:()=>this.stop(),replayInteractive:ne,playPrevChapterDisabledTooltip:re,hasInteractiveBranches:!!this.interactiveController?.getChapterBranches()?.length,additionalButtons:this.uiConfig.features.additionalButtons?se:[],additionalSettingsMenuItems:He??[],additionalContextMenuItems:j??[],playPrevVideo:()=>this.playPrevVideo(),playNextVideo:()=>this.playNextVideo(),looped:B&&this.videoConfig.videos.length===1,statistics:this.statistics,internalsExposure:this.internalsExposure});let{stores:Fe}=this.microStoresRoot=jh(),Ge=()=>{if(!this.store||!this.microStoresRoot||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(Ke=>X?.onCurrentFormatChanged?.(Ke))),this.subscription.add(Fe.interactiveControlsOpacity$.subscribe(Ke=>{Ke!==null&&this?.interactiveController?.setDisabledControls(Ke)})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(Ke=>X?.onThroughputEstimationChanged?.(Ke))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(Ke=>X?.onTrafficSavingEnabledChanged?.(Ke))),this.subscription.add(new fx(Ke=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(Ze=>Ke.next(Ze)))}).pipe(this.uiConfig.features.skipInitialPlaybackRateValue?gx(1):Ke=>Ke).subscribe(Ke=>X?.onCurrentPlaybackRateChanged?.(Ke))),this.subscription.add(this.store.state.volume$.subscribe(Ke=>X?.onVolumeChange?.(Ke))),this.subscription.add(this.store.state.muted$.subscribe(Ke=>Ke?X?.onMute?.():X?.onUnmute?.())),this.subscription.add(this.store.state.videoBitrate$.subscribe(Ke=>X?.onVideoBitrateChanged?.(Ke))),this.subscription.add(this.store.state.isInteractiveTime$.subscribe(Ke=>{let Ze=this.store?.ui.controls.disabledControls$;Ze&&(Ke&&!Ze.includes(fl)&&Ze.add(fl),Ke||Ze.remove(fl))})),this.subscription.add(this.store.ui.isFullscreen.subscribe(async Ke=>{if(!Zh.browser.isSamsungBrowser||!Ke||!this.interactiveController)return;document.fullscreenElement===this.shadowRootContainer&&await this.replayInteractiveChapter(this.videoConfig?.callbacks.onExternalFullscreenExit)})),this.statistics&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(Ke=>X?.onVSIDChanged?.(Ke))),this.initMediaSession(),D(rn,pe({interactiveController:this.interactiveController,interactiveContainer:this.interactiveContainer,sources:ce,store:this.store,microStoresRoot:this.microStoresRoot,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:R,thumbUrl:be,subtitles:ct,live:gt,preload:d,autoplay:l,muted:u,volume:c,fromTime:_,canRewindLive:p,supportLink:y,showAds:x,adsSlotId:w,adsParams:ot,adsPreviewParam:I,adsAutoplayParam:L,duration:qe,logoClickable:T,logoHidden:N,isMobile:G??Q,failoverHosts:te,fullScreenTarget:oe,saveRate:Ve,shadowRootContainer:this.shadowRootContainer,showMiniTimer:Ae,outerContainerRef:this.rootContainer,showNextPrevButtons:this.needToShowNextPrevButtons(),nextButtonActive:this.isNextButtonActive(),prevButtonActive:this.isPrevButtonActive(),endScreenVideoTitle:kt.nextVideoTitle,endScreenVideoThumb:kt.nextVideoThumb,isOneVideoPlaylist:this.isOneVideoPlaylist(),playPrevChapter:()=>this.playPrevChapter(),seekToInteractive:()=>this.seekToInteractive(),volumeMultiplier:_e,showEndScreen:Ce,showAutoplayNext:Be}));let yt={target:this.playerContainer,props:r(rn)};this.svelteRootComponent=Qr(sm,yt),this.addPlayerInfoSubscriptions(),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?hd.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):hd.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Zh.isInited$.subscribe(yt=>{yt&&(console.log("UI SDK async start"),Ge())}):Ge()}addPlayerInfoSubscriptions(){let e=this.store,i=this.microStoresRoot?.stores;if(!e||!i)return;let o=this.videoConfig?.callbacks;o&&this.subscription.add(e.playerPhase.subscribe(a=>o.onPlayerPhaseChanged?.(a))).add(e.state.playbackState$.subscribe(a=>a&&o.onPlaybackStateChanged?.(a))).add(e.state.isLive$.subscribe(a=>o.onIsLiveChanged?.(a))).add(e.state.isActiveLive$.subscribe(a=>o.onIsActiveLiveChanged?.(a))).add(e.state.isAudioAvailable$.subscribe(a=>o.onIsAudioAvailableChanged?.(a))).add(e.state.currentQuality$.subscribe(a=>o.onCurrentQualityChanged?.(a))).add(e.state.availableQualities$.subscribe(a=>o.onAvailableQualitiesChanged?.(a.map(({value:s})=>s).filter(s=>s!=="auto")))).add(e.state.availableAudioStreams$.subscribe(a=>{a.length>1&&o.onAudioLanguagesAvailable&&o.onAudioLanguagesAvailable()})).add(i.pictureInPicture$.isActive$.subscribe(a=>a?o.onPiPEnter?.():o.onPiPExit?.()));let n=o?.uiInfo;n&&this.subscription.add(e.ui.controlsVisible.subscribe(a=>n.onControlsVisibleChanged?.(a))).add(e.ui.isMobile.subscribe(a=>n.onIsMobileChanged?.(a))).add(e.ui.playerSize.subscribe(a=>n.onPlayerSizeChanged?.(a))).add(e.ui.controls.prevButton.subscribe(a=>n.onPrevButtonChanged?.(a))).add(e.ui.controls.playButton.subscribe(a=>n.onPlayButtonChanged?.(a))).add(e.ui.controls.replayButton.subscribe(a=>n.onReplayButtonChanged?.(a))).add(e.ui.controls.nextButton.subscribe(a=>n.onNextButtonChanged?.(a))).add(e.ui.controls.playPrevChapterButton.subscribe(a=>n.onPlayPrevChapterChanged?.(a))).add(e.ui.controls.seekToInteractiveButton.subscribe(a=>n.onSeekToInteractiveButtonChanged?.(a))).add(e.ui.controls.interactiveGraphButton.subscribe(a=>n.onGraphButtonChanged?.(a))).add(e.ui.controls.liveButton.subscribe(a=>n.onLiveButtonChanged?.(a))).add(e.ui.controls.time.subscribe(a=>n.onTimeUpdateChanged?.(a))).add(e.ui.controls.episodes.subscribe(a=>n.onEpisodesChanged?.(a))).add(e.ui.controls.subtitles.subscribe(a=>n.onSubtitlesChanged?.(a))).add(e.ui.controls.settings.subscribe(a=>n.onSettingsChanged?.(a))).add(e.ui.controls.fullscreen.subscribe(a=>n.onFullscreenChanged?.(a))).add(e.ui.controls.chromecast.subscribe(a=>n.onChromecastChanged?.(a))).add(e.ui.controls.pip.subscribe(a=>n.onPipChanged?.(a))).add(e.ui.controls.vkLogo.subscribe(a=>n.onVkLogoChanged?.(a))).add(e.ui.controls.interactiveTimeIndicator.subscribe(a=>n.onInteractiveTimeIndicatorChanged?.(a))).add(e.ui.controls.timeline.subscribe(a=>n.onTimelineChanged?.(a)))}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){if(!this.videoConfig)return;let o=this.videoConfig.videos[this.currentPlayingVideoIndex];if(!o){this.log({message:"no next video"});return}this.isInited&&gm(o.unitedVideoId)&&this.store.actions.internal.nextMovie(o.unitedVideoId),this.unmountComponent(this.svelteRootComponent),this.createPlayer(o,{autoplay:i,fromTime:0},e)}playPrevChapter(){this.interactiveController?.playPrevChapter()}seekToInteractive(){let e=this.interactiveController?.getNextInteractiveStartTime();typeof e=="number"&&this.seekTime(e/1e3)}async initInteractives(){if(this.videoConfig?.interactiveData)try{let{Interactives:e}=await import("@vkontakte/videoplayer-interactive/evergreen");this.interactiveContainer=document.createElement("div"),this.interactiveContainer.classList.add("interactive-root");let i=this.store?.interfaceLanguage$,o=i?ve(i):this.videoConfig.interfaceLanguage,{projectInfo:n,initChapterId:a,historyApi:s,videoLoader:d}=this.videoConfig.interactiveData;this.interactiveController=new e({parentElement:this.interactiveContainer,fullscreenTargetElement:this.playerContainer,lang:o,graph:this.uiConfig.features.interactiveGraph,projectInfo:n,initChapterId:a,historyApi:s,vkVideoLoader:d,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,animationsFeatureToggles:{areaControlShadow:this.uiConfig.features.interactiveAreaControlShadow,controlsExpectTimeBlinkAnimation:this.uiConfig.features.interactiveControlsExpectTimeBlinkAnimation}});let{isInteractiveExpectation$:l,isSeekable$:c}=this.interactiveController.state;this.uiConfig.features.seekToInteractive&&this.subscription.add(c.subscribe(_=>{if(!this.isInited)return;let p=this.store;_?p.ui.controls.disabledControls$.remove("SEEK_TO_INTERACTIVE_BUTTON"):p.ui.controls.disabledControls$.add("SEEK_TO_INTERACTIVE_BUTTON")})),this.subscription.add(l.subscribe(_=>{this.store&&this.store.state.isInteractiveExpectation$.set(_)}));let u=!0;if(this.subscription.add(this.interactiveController.events.playerChanged$.subscribe(_=>{if(!this.videoConfig)return;this.videoConfig.videos[this.currentPlayingVideoIndex]={..._.config,title:n?.title||_.config.title};let p=u?this.videoConfig.autoplay:!0;this.createPlayerWithCurrentVideo(_.player,p),u&&(u=!1)})),this.interactiveSubscription.add(this.interactiveController.events.interactiveActionChoice$.subscribe(({type:_,actionType:p})=>{if(!this.store||!this.microStoresRoot)return;let y=l.getValue();if(_==="action-choice"&&p==="setRandomBranch"&&(this.microStoresRoot.stores.graphIsOpened$.set(!1),this.store.ui.controls.disabledControls$.remove(ml)),_==="action-choice-canceled"){let x=ve(this.store.state.isPlaying$)||y;if((this.videoConfig?.isTouch??this.videoConfig?.isMobile)&&x){this.store.ui.interactiveHideMobileControls.set(!0);return}this.videoConfig?.callbacks.onDisabledInteractiveClick?.()}})),this.interactiveSubscription.add(this.interactiveController.events.interactiveContainerFakeRemoved$.subscribe(({type:_,removeAllOpenURI:p})=>{this.store&&_==="container-fake-removed"&&p&&this.store.ui.controls.disabledControls$.remove(ml)})),await this.interactiveController.setManifest(this.videoConfig.interactiveData.manifest),this.videoConfig?.callbacks?.onInteractiveHistoryChanged){let _=this.interactiveController.getHistoryState();this.subscription.add(_.history$.subscribe(p=>{p.length&&this.videoConfig?.callbacks?.onInteractiveHistoryChanged?.(p)}))}this.uiConfig.features.interactiveTimeIndicator&&this.subscription.add(this.interactiveController.events.noInteraction$.subscribe(()=>{this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(!0,!0),this.videoConfig?.callbacks.onInteractiveTimeIndicatorClick?.()})),this.interactiveSubscription.add(this.interactiveController.events.error$.subscribe(_=>{this.log({message:_.toString()})}))}catch(e){this.log({message:e.message})}}initPlayer(e,i={}){if(!Array.isArray(e.videos)||e.videos.length===0&&!e.interactiveData)throw new Error("empty videos");if(this.videoConfig=Uc(bx,cx(e,o=>o instanceof HTMLElement?o:void 0)),this.uiConfig=Gv(i.ui??{}),this.coreConfig=i.core??{configName:[]},this.statisticsConfig=i.statistics??{},this.uiConfig.features.forcePlayerDisplayBlock&&(this.rootContainer.style.minHeight="unset",this.style.display="block",this.style.width="100%",this.style.height="100%"),this.sentry={config:this.uiConfig.sentry??{}},this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new vx("UI")),hd.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[dx()]}),gm(this.videoConfig.isMediaSessionEnabled)&&(this.uiConfig.features.mediaSession=this.uiConfig.features.mediaSession??this.videoConfig.isMediaSessionEnabled??!0),gm(this.videoConfig.isPictureInPictureEnabled)&&(this.uiConfig.features.pip=this.uiConfig.features.pip??this.videoConfig.isPictureInPictureEnabled??!0,this.uiConfig.features.dpip=this.uiConfig.features.dpip??this.videoConfig.isPictureInPictureEnabled??!0),this.videoConfig.isTouch=this.uiConfig.isMobile??this.videoConfig.isTouch??this.videoConfig.isMobile,this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.adsPreviewParam=this.uiConfig.ads.preview??this.videoConfig.adsPreviewParam,this.videoConfig.logoHidden=!(this.uiConfig.showLogo??!this.videoConfig.logoHidden),this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen??this.videoConfig.showEndScreen,this.videoConfig.showAutoplayNext=this.uiConfig.features.autoplayNext??this.videoConfig.showAutoplayNext,this.videoConfig.showNextPrevButtons=this.uiConfig.features.nextPrevButtons??this.videoConfig.showNextPrevButtons,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.needToRepeatPlaylist=this.videoConfig.repeat,this.uiConfig.features.pip){let o={enabled:this.videoConfig.pipEnabled};this.uiConfig.features.dpip?this.pictureInPictureApi=Fc.getLatestSupportedVersion(o):this.pictureInPictureApi=new Ba(o)}this.mediaSessionApi=this.uiConfig.features.mediaSession?new Hc:void 0,this.slotsApi=this.uiConfig.features.slots?new Bc:void 0,this.annotationsApi=this.uiConfig.features.annotations?new zc(this.uiConfig.features.annotationsInside):void 0,this.annotationsApi&&!this.uiConfig.features.annotationsInside&&this.annotationsApi.init(this.rootContainer),this.slotsApi?.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]),zh(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(rn)&&(r(rn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(rn).nextButtonActive=this.isNextButtonActive(),r(rn).prevButtonActive=this.isPrevButtonActive(),r(rn).endScreenVideoTitle=o.nextVideoTitle,r(rn).endScreenVideoThumb=o.nextVideoThumb,r(rn).isOneVideoPlaylist=this.isOneVideoPlaylist())}updatePrevVideos(e){this.updateVideos(e,"prev")}updateNextVideos(e){this.updateVideos(e,"next")}initMediaSession(){this.mediaSessionApi&&(this.unsubscribePlayerPhaseSubscription?.(),this.mediaSessionApi.clearSubscriptions(),this.unsubscribePlayerPhaseSubscription=this.store?.playerPhase.subscribe(e=>{e==="video"?this.setupMediaSessionForVideo():e==="ads"&&this.setupMediaSessionForAds()}))}setupMediaSessionForVideo(){if(!(!this.videoConfig||!this.mediaSessionApi))try{let{title:e,thumbUrl:i}={...this.videoConfig.videos[this.currentPlayingVideoIndex]},o=[["play",()=>this.play()],["pause",()=>this.pause()],["seekto",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})}}play(){this.isControlDisabled("PLAY_BUTTON")||this.store?.playerPhase.is("LiveWaitingStart")||this.store?.playerPhase.is("LiveWaitingRecover")||this.store?.playerPhase.is("LiveWaitingRecord")||(this.log({message:"play"}),this.svelteRootComponent?.play())}pause(){this.log({message:"pause"}),this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.log({message:"stop"});let e=!!this.interactiveController;e&&(this.interactiveController.destroy(),this.interactiveController=void 0,this.interactiveContainer=void 0,this.interactiveSubscription.unsubscribe()),this.unmountComponent(this.svelteStubComponent),this.mediaSessionApi?.destroy();let i=this.videoConfig.videos[0];i&&(this.unmountComponent(this.svelteRootComponent),e?(this.videoConfig.autoplay=!1,this.initInteractives()):this.createPlayer(i))}setMuted(e){this.log({message:`set muted, muted: ${e}`}),this.svelteRootComponent?.setMuted(e)}setPiPEnabled(e){this.store?.webApi.pictureInPictureApi?.setEnabled(e)}setVolume(e){this.log({message:`set volume, volume: ${e}`}),this.svelteRootComponent?.setVolume(e)}setRepeat(e){this.log({message:`set repeat, repeat: ${e}`}),this.needToRepeatPlaylist=e,r(rn)&&(r(rn).needToRepeatPlaylist=this.needToRepeatPlaylist,r(rn).showNextPrevButtons=this.needToShowNextPrevButtons(),r(rn).nextButtonActive=this.isNextButtonActive(),r(rn).prevButtonActive=this.isPrevButtonActive())}seekTime(e){this.isControlDisabled("TIMELINE")||(this.log({message:`seek time, time: ${e}`}),this.svelteRootComponent?.seekTime(e))}seekEpisodeStartTime(e){this.log({message:`seek episode start time, time: ${e}`}),this.svelteRootComponent?.seekEpisodeStartTime(e)}returnFocusToEpisodes(){this.log({message:"return focus to episodes button"}),this.svelteRootComponent?.returnFocusToEpisodes()}setPlaybackRate(e){this.log({message:`set playback rate to: ${e}`}),this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.log({message:`set auto quality limitation. Max: ${e.max??"none"}. Min: ${e.min??"none"}`}),this.svelteRootComponent?.setAutoQualityLimits(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.log({message:"live started"}),this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0})}setLiveWaitingRecover(){this.log({message:"live waiting"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0),this.store?.destroy()})}setLiveWaitingRecord(){this.log({message:"post live"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0),this.store?.destroy()})}setLiveEnd(e){this.log({message:"live ended"}),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})})}setLiveLowLatency(e){this.log({message:"live switch to low latency "+e}),this.store?.actions.external.setLiveLowLatency(e)}getDeviceId(){return this.statistics?.oneStat.getDeviceId()??void 0}replayInteractiveVideo(){this.interactiveController&&this.interactiveController.setChapter()}async replayInteractiveChapter(e){if(this.interactiveController&&this.store?.state.positionExact$){let i=ve(this.store.state.positionExact$),n=ve(this.store.state.interactiveEpisodes$).find(s=>!s.completed);this.interactiveController.events.playerChanged$.pipe(mx()).subscribe(()=>{n&&i>=n.time?this.seekTime(n.time):this.seekTime(i),e?.()});let a=this.interactiveController.getCurrentChapter();await this.interactiveController.setChapter({chapterId:a?.chapter?.id,pushToHistory:!1})}}showInteractiveIndicatorTooltip(e,i=!1){this.microStoresRoot?.stores.showInteractiveTimeIndicatorTooltip$.set(e,i)}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateAdditionalSettingsItem(e,i){this.store?.actions.external.updateAdditionalSettingsItem(e,i)}addAdditionalSettingsItem(e){this.store?.actions.external.addAdditionalSettingsItem(e)}removeAdditionalSettingsItem(e){this.store?.actions.external.removeAdditionalSettingsItem(e)}updateAdditionalContextItem(e,i){this.store?.actions.external.updateAdditionalContextItem(e,i)}addAdditionalContextItem(e){this.store?.actions.external.addAdditionalContextItem(e)}removeAdditionalContextItem(e){this.store?.actions.external.removeAdditionalContextItem(e)}updateAdditionalButton(e,i){this.store?.actions.external.updateAdditionalButton(e,i)}addAdditionalButton(e){this.store?.actions.external.addAdditionalButton(e)}removeAdditionalButton(e){this.store?.actions.external.removeAdditionalButton(e)}updateStatContext(e){this.statistics&&this.statistics.oneStat.updateContext(e)}handleTimerNextVideo(e){this.store?.actions.internal.setTimerNextVideoRunning(e)}focus(){this.svelteRootComponent?.keyboardControls?.focus?.()}unmountComponent(e){e&&Aa(e)}};import{InterfaceLanguage as bY,VKNumericLanguage as $Y,loadVKLangPack as yY}from"@vkontakte/videoplayer-shared/evergreen";import{VideoQuality as wY,VideoFormat as SY}from"@vkontakte/videoplayer-core/evergreen";var uY=()=>{window.customElements.define("vk-video-player",Wc)};export{Cc as ControlButtonType,Rr as GridTypes,bY as InterfaceLanguage,wl as MenuItemType,Ra as PlayerPhase,ys as VERSION,$Y as VKNumericLanguage,SY as VideoFormat,wY as VideoQuality,yY as loadVKLangPack,uY as registerPlayerWebComponent};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/videoplayer",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.61-dev.6fff06ee.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Videoplayer based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@adtech/rbadman": "2.2.57",
|
|
58
|
-
"@vkontakte/videoplayer-core": "2.0.
|
|
59
|
-
"@vkontakte/videoplayer-interactive": "1.0.
|
|
60
|
-
"@vkontakte/videoplayer-shared": "1.0.
|
|
61
|
-
"@vkontakte/videoplayer-statistics": "1.0.
|
|
58
|
+
"@vkontakte/videoplayer-core": "2.0.131-dev.ba1a65a9.0",
|
|
59
|
+
"@vkontakte/videoplayer-interactive": "1.0.36-dev.7f0470cf.0",
|
|
60
|
+
"@vkontakte/videoplayer-shared": "1.0.59-dev.6292e9aa.0",
|
|
61
|
+
"@vkontakte/videoplayer-statistics": "1.0.77-dev.c4bedd21.0"
|
|
62
62
|
}
|
|
63
63
|
}
|