@vkontakte/videoplayer-tv 1.0.4-dev.b507ef65.0 → 1.0.4-dev.c0f690bfb.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2018.cjs +131 -46
- package/es2018.esm.js +131 -46
- package/es2024.cjs +126 -41
- package/es2024.esm.js +126 -41
- package/esnext.cjs +126 -41
- package/esnext.esm.js +126 -41
- package/evergreen.esm.js +126 -41
- package/package.json +4 -4
- package/types/AndroidTvPlayer.d.ts +40 -40
- package/types/components/Ads/admanWrapper.d.ts +75 -75
- package/types/components/Ads/types.d.ts +26 -26
- package/types/components/Controls/CircleButton/types.d.ts +11 -11
- package/types/components/Controls/ProgressBar/types.d.ts +5 -5
- package/types/components/Controls/types.d.ts +3 -3
- package/types/components/Icons/constants.d.ts +5 -5
- package/types/components/Icons/utils.d.ts +1 -1
- package/types/components/List/types.d.ts +6 -6
- package/types/components/Root/types.d.ts +24 -24
- package/types/components/Time/constants.d.ts +2 -2
- package/types/config.d.ts +95 -95
- package/types/constans/index.d.ts +2 -2
- package/types/index.d.ts +10 -10
- package/types/services/BackButton.d.ts +6 -6
- package/types/services/DeviceCapabilities.d.ts +3 -3
- package/types/services/FocusManager.d.ts +9 -9
- package/types/services/statistics.d.ts +13 -13
- package/types/store/index.d.ts +5 -5
- package/types/store/types.d.ts +403 -402
- package/types/store/ui.d.ts +1 -1
- package/types/store/utils.d.ts +34 -34
- package/types/translation/index.d.ts +2 -2
- package/types/translation/labels.d.ts +1 -1
- package/types/translation/packs/en.d.ts +1 -1
- package/types/translation/packs/ru.d.ts +1 -1
- package/types/translation/types.d.ts +5 -5
- package/types/types/index.d.ts +408 -408
- package/types/types/svg.d.d.ts +5 -0
- package/types/utils/WebVttParser.d.ts +11 -11
- package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
- package/types/utils/changeVolume.d.ts +6 -6
- package/types/utils/elementHelpers.d.ts +2 -2
- package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
- package/types/utils/fullscreen.d.ts +14 -14
- package/types/utils/roundFps.d.ts +1 -1
- package/types/utils/sanitizeHtml.d.ts +3 -3
- package/types/utils/sorts.d.ts +2 -2
- package/types/utils/stack/index.d.ts +7 -7
- package/types/utils/stack/node.d.ts +3 -3
- package/types/utils/subtitles.d.ts +8 -8
- package/types/utils/timeout.d.ts +2 -2
- package/types/utils/userSettings.d.ts +23 -18
- package/types/utils/videoConfig.d.ts +6 -2
- package/types/utils/volumeChange.d.ts +1 -1
- package/types/utils/webAPI/focusLock.d.ts +30 -30
- package/types/utils/webAPI/focusManager.d.ts +15 -15
- package/types/utils/webAPI/language.d.ts +1 -1
- package/es2015.cjs +0 -52
- package/es2015.esm.js +0 -52
package/es2018.cjs
CHANGED
|
@@ -1,52 +1,137 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-tv v1.0.4-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-tv v1.0.4-dev.c0f690bfb.0
|
|
3
|
+
* Wed, 11 Mar 2026 17:03:10 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-4/doc/
|
|
5
5
|
*/
|
|
6
|
-
"use strict";var Ju=Object.create;var Un=Object.defineProperty;var Xu=Object.getOwnPropertyDescriptor;var ec=Object.getOwnPropertyNames;var tc=Object.getPrototypeOf,ic=Object.prototype.hasOwnProperty;var Ps=t=>{throw TypeError(t)};var nc=(t,e,i)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var rc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),oc=(t,e)=>{for(var i in e)Un(t,i,{get:e[i],enumerable:!0})},Rs=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ec(e))!ic.call(t,r)&&r!==i&&Un(t,r,{get:()=>e[r],enumerable:!(n=Xu(e,r))||n.enumerable});return t};var ac=(t,e,i)=>(i=t!=null?Ju(tc(t)):{},Rs(e||!t||!t.__esModule?Un(i,"default",{value:t,enumerable:!0}):i,t)),sc=t=>Rs(Un({},"__esModule",{value:!0}),t);var di=(t,e,i)=>nc(t,typeof e!="symbol"?e+"":e,i),Vs=(t,e,i)=>e.has(t)||Ps("Cannot "+i);var Ut=(t,e,i)=>(Vs(t,e,"read from private field"),i?i.call(t):e.get(t)),Er=(t,e,i)=>e.has(t)?Ps("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),wr=(t,e,i,n)=>(Vs(t,e,"write to private field"),n?n.call(t,i):e.set(t,i),i);var pd=rc(()=>{"use strict";AdmanHTML=function(){"use strict";function t(w){w&&typeof w=="string"&&new AdmanHTML.OpenLinkPopupRender(j).open(w)}function e(w){Be.initMode(w.slot?"slot":"json",{slot:w.slot,version:j.version}),j.slotId=w.slot,j.playerEl=w.playerEl,j.wrapper=w.wrapper,j.videoEl=w.videoEl,j.audioEl=w.audioEl,j.clickEl=w.clickEl,j.quality=parseInt(w.videoQuality||w.params&&w.params.videoQuality||360,10),j.browser=w.browser||{},j.config=w.config||{},j.pauseOnHide=w.pauseOnHide||!1,j.viewabilityValue=w.viewabilityValue||.5,j.viewabilityEl=w.viewabilityEl||j.videoEl,j.disclaimer=w.disclaimer!==!1,j.callToActionButton=w.callToActionButton!==!1,j.forcePreloadAdditionalData=!!w.forcePreloadAdditionalData,j.ctaStyles=w.ctaStyles,j.pause=f,j.resume=l,j.openPopup=t;var ee=AdmanHTML.Utils.getPageLocation(),de=AdmanHTML.Utils.getHostname(ee||""),We=AdmanHTML.Utils.isMobile(navigator.userAgent||navigator.vendor||window.opera);AdmanHTML.Utils.isElement(j.videoEl)&&We&&j.videoEl.setAttribute("playsinline",""),j.location={top:ee,topEncoded:encodeURIComponent(ee||""),hostname:de,hostnameEncoded:encodeURIComponent(de||"")},Be.rb(Be.code.ADMAN_SUCCESSFULLY_INITIALIZED),j.stats.metrics("initing"),I=w.midrollPointsP||null,je=!I&&w.midrollPoints?w.midrollPoints:null,j.config.vpaidJsInterface||(j.config.vpaidJsInterface=he),j.config.vpaidHtmlInterface||(j.config.vpaidHtmlInterface=Ae);var Ue="https://ad.mail.ru/vp/"+j.slotId+"?app_name=admanhtml&version="+this.getVersion();if(w.params&&w.params.constructor&&w.params.constructor===Object){var ft=[];"flash"in w.params||(w.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var ot in w.params)w.params.hasOwnProperty(ot)&&ft.push(ot+"="+w.params[ot]);var ht=AdmanHTML.Utils.getUserIdQuery();ht&&ft.push(ht),ft.length&&(Ue+="&"+ft.join("&"))}if((j.slotId||w.json||w.adUrl)&&!j.browser.adBlock){var ut={},Ti=this;j.slotId?ut.url=Ue:w.adUrl?(w.adUrl.indexOf("ad.mail.ru/")!==-1&&(w.adUrl+=w.adUrl.indexOf("?")===-1?"?":"&",w.adUrl+="version="+this.getVersion()),ut.url=w.adUrl):ut.data=w.json,ie=new AdmanHTML.AdSlot(j,ut,function(){var Si=ie.getRootSettings()||{},Li=Si.requestHostname;if(Li&&!AdmanHTML.Utils.matchHostname(j.location.hostname,Li,re))return j.stats.logError("HOSTNAME_MISMATCH:"+Li+":"+j.location.topEncoded,{impressionID:Si.impressionID,padID:Si.padID,bannerIDs:Si.bannerIDs}),void(j.callbacks.onError&&j.callbacks.onError());j.location.hostname||j.stats.logError("HOSTNAME_EMPTY:"+Li+":"+j.location.topEncoded),j.cb("onReady",[{settings:ie.settings}]);var Ki=1e6,Hi=[],Ke=[],Ge=w.params&&w.params.duration?parseInt(w.params.duration,10):Ki;Ge===0&&(Ge=Ki),je&&je.sort(AdmanHTML.Utils.numSorter),I&&I.sort(AdmanHTML.Utils.numSorter);var pt=ie.getSection("midroll")||[],xo=ie.getServices("midroll",function(Dt){return!Dt.started()&&Dt.isAfter()})||[];pt=pt.concat(xo),pt.forEach(function(Dt){var ct=Dt.getAd();ct.point||ct.pointP||(ct.pointP=50)}),pt.sort(function(Dt,ct){var hn=Dt.getAd(),Zi=ct.getAd();return hn.pointP&&Zi.pointP?hn.pointP-Zi.pointP:(hn.point||hn.pointP/100*Ge)-(Zi.point||Zi.pointP/100*Ge)}).forEach(function(Dt){if(!Dt.isEmpty||!Dt.isEmpty()){var ct=Dt.getAd();je&&je.length?(ct.point=je.shift(),ct.pointP=null,Ke.push(ct.point),Dt.addImmutableProperty("point",ct.point)):I&&I.length?(ct.pointP=I.shift(),ct.point=null,Hi.push(ct.pointP),Dt.addImmutableProperty("pointP",ct.pointP)):je||I||(ct.point?(Dt.addImmutableProperty("point",ct.point),Ke.push(ct.point)):ct.pointP&&(Dt.addImmutableProperty("pointP",ct.pointP),Hi.push(ct.pointP)))}}),F=Hi.sort(AdmanHTML.Utils.numSorter),C=Ke.sort(AdmanHTML.Utils.numSorter);var gn=ie.getSection("research");gn&&gn.length>0&&(ae=gn[0]),j.pauseOnHide&&ce(Ti)})}else{Be.logError("Adman init failed");var li=j.callbacks.onError;li&&li(),q=be=Y=null}}function i(w,ee){ee=ee||!1;var de;if(q&&(q.log("sectionShown"),q.disposed||(q.dispose(),q.disposed=!0,T(q,Y)),w&&q.log("closedByUser")),Y&&!Ce[Y]&&(Ce[Y]=Y!=="midroll",de=w?j.callbacks.onClosed:j.callbacks.onCompleted),Qe[Y]&&be&&(Qe[Y]=Qe[Y].concat(be.splice(0,be.length))),q=be=Y=null,s(),typeof ee=="object"&&ee.force===!0)return void((de=j.callbacks.onError)&&de(ee.message));de&&de()}function n(w){var ee=ie.getSettings(Y).maxBannersShow||0,de=ze[Y]||0,We=!ee||de<ee;if(q&&!q.disposed&&(q.complete&&q.log("playbackCompleted"),q.dispose(),q.disposed=!0,T(q,Y)),be&&be.length&&We)q=be.shift(),ze[Y]=de+(q.isEmpty()?0:1),q.reset(),q.started=!0,q.start();else{var Ue=ie.getNextAfterService(Y);Y!=="midroll"&&Ue&&We?Ue.start(function(){be=ie.getSection(Y),n()}):ie.getSettings(Y).loop&&Qe[Y]&&Qe[Y].length?(be=Qe[Y],Qe[Y]=[],n()):i(!1,w)}}function r(w){be||(Y=w||"preroll",ie.resetServices(Y),Ce[Y]=!1,be=ie.getSection(Y),w==="midroll"&&(be=c(be)),n(),Y&&(Qe[Y]=Qe[Y]||[]),q&&(q.log("sectionStarted"),j.debugMode&&console.log(Y,q.getAd(),q.getSettings(),be)),o(Y),j.stats.metrics("started"))}function o(w){(He=ie.getDebug(w))&&He.start()}function s(){He&&He.dispose(),He=null}function a(w,ee){function de(Ke,Ge){for(var pt=0;pt<Ke.length&&!(Math.abs(Ke[pt])>Ge);pt++);return pt>0?[Ke[pt-1]]:[]}function We(Ke){var Ge=Ke.getAd();return!(Ge.point&&C.indexOf(Ge.point)===-1||Ge.pointP&&F.indexOf(Ge.pointP)===-1)&&(Ge.point&&Ge.point<=Si||Ge.pointP&&Ge.pointP<=Li)}function Ue(){K=F.reduce(function(Ke,Ge){var pt=Math.ceil(ee*Ge/100);Ke.indexOf(pt)===-1&&Ke.push(pt)},C).sort(AdmanHTML.Utils.numSorter)}function ft(Ke){return K.reduce(function(Ge,pt){return Ge===0&&pt>0&&pt-Ke>=0?pt-Ke:Ge},0)}if(!isNaN(w)&&!isNaN(ee)){var ot=parseInt(w),ht=Math.floor(100*w/ee);_e=ee,le=F&&isFinite(ht)?de(F,ht):[],ge=C?de(C,ot):[],le[0]&&ge[0]&&(Math.abs(le[0]*_e/100)>Math.abs(ge[0])?ge=[]:le=[]);var ut=typeof ie=="object"&&typeof ie.getSettings=="function"?ie.getSettings("midroll").midpointAllowableDelta:void 0;G=ut!=null?ut:G;var Ti=100*G/ee,li=G!==0&&G<5?G:5,Si=ot+li,Li=ht+li/ee*100;if(ie.getServices("midroll",function(Ke){return!(!Ke.isAfter()||Ke.started()||!We(Ke))}).forEach(function(Ke){var Ge=ot-Ke.getAd().point,pt=ht-Ke.getAd().pointP;Ge<G||pt<Ti||G===0?Ke.start():j.debugMode&&console.log("skip midroll fetch")}),le.length&&le[0]>0||ge.length&&ge[0]>0){var Ki=!1,Hi=ie.getSection("midroll");Hi&&Hi.forEach(function(Ke){var Ge=Ke.getAd();(Ge.pointP&&~le.indexOf(Ge.pointP)||Ge.point&&~ge.indexOf(Ge.point))&&(Ki=!0)}),Ki&&j.cb("adMidrollPoint",[w])}return j.forcePreloadAdditionalData?(Ue(),ft(w)):void 0}}function c(w){function ee(We,Ue){var ft=We.getAd(),ot=Ue.getAd();return(ft.point||ft.pointP*_e/100)-(ot.point||ot.pointP*_e/100)}var de=[];return w&&w.forEach(function(We){var Ue=We.getAd();(Ue.pointP&&~le.indexOf(Ue.pointP)||Ue.point&&~ge.indexOf(Ue.point))&&de.push(We)}),C.forEach(function(We,Ue){~ge.indexOf(We)&&(C[Ue]=-C[Ue])}),F.forEach(function(We,Ue){~le.indexOf(We)&&(F[Ue]=-F[Ue])}),de.sort(ee),de}function m(){j.cb("onSkipped"),q&&(q.log("closedByUser"),q.skip(n))}function f(){q&&(q.log("playbackPaused"),q.pause())}function l(w){q&&(w||q.log("playbackResumed"),q.resume())}function u(w){w=w<0?0:w>1?1:w,q&&q.setVolume(w)}function v(){q&&q.log("fullscreenOn")}function g(){q&&q.log("fullscreenOff")}function h(){i()}function y(w,ee){j.callbacks[w]=ee}function $(w){var ee=[],de=ie.getSection(w||"preroll");return de&&de.forEach(function(We){We.isEmpty()||ee.push(We.getExtendedAdForApp())}),ee}function D(w){return ie.getAfterServices(w||"preroll")}function T(w,ee){w.isEmpty()||w.isStat()||Qe[ee]&&Qe[ee].push(w)}function b(w){return(w.right-w.left)*(w.bottom-w.top)}function x(w,ee){return{left:w.left+ee.left,right:w.right+ee.left,top:w.top+ee.top,bottom:w.bottom+ee.top}}function A(w){return w&&!isNaN(w)?w:null}function S(w,ee){var de=w.document,We=ee==="width"?"clientWidth":"clientHeight",Ue=ee==="width"?"innerWidth":"innerHeight",ft=w[Ue],ot=de.body[We],ht=de.documentElement[We],ut=1/0;return ut=A(ot)||ut,ut=A(ht)||ut,ft&&!isNaN(ft)&&(ut=Math.min(ut,ft)),ut}function L(w){return{width:S(w,"width"),height:S(w,"height")}}function k(w,ee){var de=L(ee);return{left:Math.max(0,w.left),right:Math.min(de.width,w.right),top:Math.max(0,w.top),bottom:Math.min(de.height,w.bottom)}}function E(w,ee){try{for(var de=w.getBoundingClientRect(),We=b(de),Ue=ee,ft=Ue.parent;Ue!==ft;){var ot=Ue.frameElement.getBoundingClientRect();de=x(de,ot);var ht=Math.max(ot.left,de.left),ut=Math.min(ot.right,de.right),Ti=Math.max(ot.top,de.top),li=Math.min(ot.bottom,de.bottom);de.left=ht,de.right=ut<ht?ht:ut,de.top=Ti,de.bottom=li<Ti?Ti:li,Ue=Ue.parent}de=k(de,ft);var Si=b(de);return{left:de.left,right:de.right,top:de.top,bottom:de.bottom,percent:Si/We*100}}catch(Li){return{left:0,right:0,top:0,bottom:0,percent:0}}}function M(){return window.hasOwnProperty("IntersectionObserver")}function _(w){try{if(w===w.top)return"ON_PAGE";for(var ee=w;ee!==ee.parent;){if(ee.document.domain!==ee.parent.document.domain)return"XD_FRAME";ee=ee.parent}return"S_FRAME"}catch(de){}return"XD_FRAME"}function R(w){return!M(w)&&_(w)!=="XD_FRAME"}function U(w,ee,de){Q(de,E(w,window).percent>=100*ee)}function O(w){return w.mozVisibilityState?"mozvisibilitychange":w.webkitVisibilityState?"webkitvisibilitychange":w.visibilityState?"visibilitychange":""}function P(w){Q(w,!0)}function z(w){Q(w,!1)}function Q(w,ee){var de=w.getPlayStatus();w.prevVisibility!==ee&&(w.prevVisibility=ee,de.curStatus!==void 0&&de.curStatus!==de.prevStatus&&(ee?w.resume():w.pause()))}function ce(w){var ee=w,de=j.viewabilityValue,We=j.viewabilityEl;if(We){if(M()){var Ue=new IntersectionObserver(function(ht){ht.forEach(function(ut){Q(ee,ut.intersectionRatio>=de)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});Ue.observe(We)}else if(R){var ft=function(){U(We,de,ee)};window.addEventListener("resize",ft,!1),window.addEventListener("scroll",ft,!1)}}var ot=(O(document),fe.hasFocus());setInterval(function(){var ht=fe.hasFocus();ot!==ht&&(ot=ht,ot?P(ee):z(ee))},500)}function X(){return j.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:j.playStatus}var ie,Y,be,q,He,ae,_e,j={version:"2.2.57",debugMode:!0,callbacks:{},cb:function(w,ee){switch(w){case"onCompleted":q&&(q.complete=!0),n();break;case"onError":q&&(q.error=!0),n(ee);break;case"onClosed":i(!0);break;default:var de=j.callbacks[w];de&&de.apply(this,ee)}}},Se=window.location.protocol==="http:"?"http:":"https:",he=Se+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",Ae=Se+"//ad.mail.ru/static/rbadman-vpaid.html",Be=new AdmanHTML.Stats(j),ke=new AdmanHTML.Viewability,je=[],I=[],C=[],F=[],K=[],le=[],ge=[],ze={},Qe={},G=3,re=function(){for(var w=window,ee=frameElement;ee;){try{ee=w.parent.frameElement}catch(de){break}w=w.parent}return w}(),fe=re.document;j.stats=Be,j.viewability=ke,j.protocol=Se,j.stats.metrics();var Ce={};return{init:e,start:r,stop:h,pause:f,resume:l,setVolume:u,fullscreenOn:v,fullscreenOff:g,setFullscreen:function(w){w?v():g()},skip:m,destroy:h,getPlayStatus:X,getSlot:function(){return j.slotId},setSlot:function(w){j.slotId=w},getVersion:function(){return j.version},getBannersForSection:$,getServicesForSection:D,hasSection:function(w){return w=w||"preroll",!(!$(w).length&&!D(w).length)},setDebug:function(w){j.debugMode=w},setPosition:a,getUserIdQuery:AdmanHTML.Utils.getUserIdQuery,onReady:y.bind(this,"onReady"),onError:y.bind(this,"onError"),onStarted:y.bind(this,"onStarted"),onPaused:y.bind(this,"onPaused"),onPlayed:y.bind(this,"onPlayed"),onCompleted:y.bind(this,"onCompleted"),onClosed:y.bind(this,"onClosed"),onSkipped:y.bind(this,"onSkipped"),onClicked:y.bind(this,"onClicked"),onTimeRemained:y.bind(this,"onTimeRemained"),onDurationChanged:y.bind(this,"onDurationChanged"),adMidrollPoint:y.bind(this,"adMidrollPoint"),_onVPAIDStarted:y.bind(this,"onVPAIDStarted"),research:{pause:function(){ae&&ae.pause()},resume:function(){ae&&ae.resume()},complete:function(){ae&&ae.setComplete()},setVolume:function(w){ae&&ae.setVolume(w)},setFullscreen:function(w){ae&&ae.setFullscreen(w)},setPosition:function(w,ee){ae&&ae.setPosition(w,ee)}}}},AdmanHTML.Ad=function(t,e){"use strict";function i(b){b&&b.forEach(function(x){n(x.url,x.type,x)})}function n(b,x,A){var S,L,k,E;if(b){try{b=decodeURIComponent(b)}catch(P){}if(x==="playheadReachedValue")A.thresholdValue!==void 0||A.value!==void 0?(S=parseInt(A.thresholdValue||A.value,10),e.stats.push({name:"thresholdValue",value:S,type:"thresholdValue."+S,url:b})):A.thresholdPValue===void 0&&A.pvalue===void 0||(S=parseInt(A.thresholdPValue||A.pvalue,10),e.stats.push({name:"thresholdPValue",value:S,type:"thresholdPValue."+S,url:b}));else if(x==="playheadViewabilityValue"){var M=parseInt(A.viewablePercent,10),_=A.ovv===void 0&&A.mrc===void 0||!!A.ovv||!!A.mrc,R="";k=A.startTimer!==void 0?parseInt(A.startTimer,10):0,E=A.endTimer!==void 0?parseInt(A.endTimer,10):0,M=isNaN(M)?50:M,A.value!==void 0?(S=parseInt(A.value,10),L="ovvValue"):A.pvalue!==void 0?(S=parseInt(A.pvalue,10),L="ovvPValue"):A.duration!==void 0&&(S=parseInt(A.duration,10),L="mrcValue",_||(R=A.unload?"unload":"complete"));var U={name:L,value:S,url:b,percent:M,viewable:_,start:k,end:E,onevent:R};"target"in A&&(U.target=A.target),e.stats.push(U)}else if(x==="playheadTimerValue"){k=A.startTimer!==void 0?parseInt(A.startTimer,10):0,E=A.endTimer!==void 0?parseInt(A.endTimer,10):0;var O=A.rate!==void 0?parseInt(A.rate,10):1;e.stats.push({name:"timerValue",rate:O,url:b,start:k,end:E})}else e.stats.push({name:x,type:x,url:b})}}function r(b){e.click=b,e.ad&&(e.ad.urlToNavigateOnClick=b)}function o(b,x){e.extensions[b]=x}function s(b,x,A){!A&&b in e.immutables||(e.immutables[b]=x)}function a(b){e.settings=e.settings||{},AdmanHTML.Utils.deepExtend(e.settings,b)}function c(b){function x(E){var M=E.type||"";return!(~M.indexOf("video")&&M!=="video/mp4"||~M.indexOf("audio")&&M!=="audio/mp3"&&M!=="audio/mpeg")}function A(){t.stats.rb(t.stats.code.UNKNOWN_ADV_TYPE),t.stats.logError("UNKNOWN_ADV_TYPE")}if(e.ad=b,e.click&&(e.ad.urlToNavigateOnClick=e.click),AdmanHTML.Utils.mixin(e.ad,e.extensions),AdmanHTML.Utils.mixin(e.ad,e.immutables),e.ad.mediafiles&&e.ad.mediafiles.length){var S;e.ad.mediafiles.forEach(function(E){x(E)&&(!S||Math.abs(parseInt(E.height)-t.quality)<Math.abs(parseInt(S.height)-t.quality))&&(S=E)}),S&&AdmanHTML.Utils.mixin(e.ad,S)}delete e.ad.statistics,delete e.ad.mediafiles;var L,k;switch(e.ad.type){case"swf":case"application/x-shockwave-flash":if(k=e.ad.apiFramework||e.ad.api,t.browser.mobile||k&&k!=="VPAID")return A(),!1;L=k?new AdmanHTML.VpaidSwfAdRenderer(t,this):new AdmanHTML.SwfAdRenderer(t,this);break;case"javascript":case"application/javascript":if((k=e.ad.apiFramework||e.ad.api)&&k!=="VPAID")return A(),!1;L=new AdmanHTML.VpaidJsAdRenderer(t,this);break;case"video":case"video/mp4":L=new AdmanHTML.VideoAdRenderer(t,this);break;case"audio":case"audio/mp3":case"audio/mpeg":L=new AdmanHTML.AudioAdRenderer(t,this);break;case"image":case"image/bmp":case"image/gif":case"image/jpeg":case"image/png":L=new AdmanHTML.ImgAdRenderer(t,this);break;case"text":L=new AdmanHTML.TextAdRenderer(t,this);break;case"html":L=new AdmanHTML.HtmlAdRenderer(t,this);break;case"empty":L=new AdmanHTML.EmptyAdRenderer(t,this);break;case"statistics":L=new AdmanHTML.StatisticsAdRenderer(t,this);break;case"debugData":L=new AdmanHTML.DebugAdRenderer(t,this);break;case"research":L=new AdmanHTML.ResearchAdRenderer(t,this);break;case"video/x-flv":default:return A(),!1}return e.renderer=L,!0}function m(){return new AdmanHTML.Ad(t,JSON.parse(JSON.stringify(e)))}function f(){this.started&&(e.ad&&c.call(this,e.ad),this.disposed=!1,this.completed=!1,this.error=!1,this.started=!1),e.statsBackup?e.stats=e.statsBackup.slice():e.statsBackup=e.stats.slice()}function l(b,x,A){var S=b.url;S=S.replace("{requesthostname}",t.location.hostnameEncoded||""),AdmanHTML.Utils.loadImg(S);var L=x.indexOf(b);~L&&A&&x.splice(L,1)}function u(b,x){var A=x.indexOf(b);~A&&x.splice(A,1)}function v(b,x){function A(_){_=25*Math.floor(_/25);var R=T["thresholdPValue."+_];R&&(E=E.concat(R))}var S=e.stats.slice(0);if(Array.isArray(b)){var L;for(L=0;L<b.length&&!~S.findIndex(function(_){return _.name===b[L]});L++);b=b[L]||b.slice(-1)}if(!t.isPopupOpen||b!=="playbackPaused"&&b!=="playbackResumed"){var k=b+(x===void 0?"":"."+x),E=T[k]?T[k].slice(0):[];E.push(k),b==="thresholdPValue"&&A(x);var M=b==="thresholdPValue"||b==="thresholdValue"||b==="closedByUser";e.stats.forEach(function(_){(b==="thresholdPValue"&&_.name==="thresholdPValue"&&_.value<x||b==="thresholdValue"&&_.name==="thresholdValue"&&_.value<x)&&l(_,S,M),~E.indexOf(_.type)&&l(_,S,M)}),e.stats=S}}function g(b,x){function A(M,_){_[Math.ceil(M.percent/10)].duration>=1e3*M.value?M.viewable?l(M,L,!0):u(M,L):k++}function S(M){M.viewable||M.onevent===x&&l(M,L,!0)}var L=e.stats.slice(0),k=0,E=b&&b.length?A:S;return e.stats.forEach(function(M){M.name==="mrcValue"&&E(M,b)}),e.stats=L,k}function h(b,x){var A,S,L=e.stats.slice(0);e.stats.forEach(function(k){(k.name==="ovvValue"&&k.value<=b||k.name==="ovvPValue"&&k.value<=x)&&(A=A||t.viewability.getViewabilityState(),S=A.percent>k.percent&&A.focus,A.state!=="UNDETERMINED"&&(S&&k.viewable||!S&&!k.viewable)&&AdmanHTML.Utils.loadImg(k.url),u(k,L))}),e.stats=L}function y(b,x){e.renderer&&e.renderer[b]&&e.renderer[b](x)}function $(){var b={};return b=e.ad.type==="audio"||e.ad.type==="audio/mp3"||e.ad.type==="audio/mpeg"?{allowSeek:!1,allowSkip:!1,allowTrackChange:!1,allowVolumeChange:!1}:e.settings?{allowClose:!e.settings.hasOwnProperty("allowClose")||e.settings.allowClose,allowCloseDelay:e.settings.hasOwnProperty("allowCloseDelay")?e.settings.allowCloseDelay:0}:{allowClose:!0,allowCloseDelay:0},AdmanHTML.Utils.mixin(b,e.ad),b}function D(){var b=$();return b.statistics=e.stats.slice(0),b}e=e||{stats:[],extensions:{},immutables:{}};var T={closedByUser:["close","skipAd"],click:["addClick"],"thresholdPValue.25":["firstQuartile"],"thresholdPValue.50":["secondQuartile","midpoint"],"thresholdPValue.75":["thirdQuartile"],"thresholdPValue.100":["fourthQuartile"],playbackStarted:["start"],playbackCompleted:["complete"],volumeOff:["mute"],volumeOn:["unmute"],playbackPaused:["pause"],playbackResumed:["resume"],fullscreenOn:["fullscreen"],error:["Error"]};return{addStatCollection:i,addStat:n,addClick:r,addExtension:o,addImmutableProperty:s,addSettings:a,getSettings:function(){return e.settings},addAd:c,getAd:function(){return e.ad},getAdForApp:$,getExtendedAdForApp:D,isEmpty:function(){return e.ad.type==="empty"},isStat:function(){return e.ad.type==="statistics"},clone:m,reset:f,log:v,logMRC:g,logOVV:h,start:y.bind(this,"start"),dispose:y.bind(this,"dispose"),pause:y.bind(this,"pause"),resume:y.bind(this,"resume"),setVolume:y.bind(this,"setVolume"),setFullscreen:y.bind(this,"setFullscreen"),setComplete:y.bind(this,"setComplete"),skip:y.bind(this,"skip"),setPosition:function(b,x){e.renderer&&e.renderer.setPosition&&e.renderer.setPosition(b,x)},complete:!1,error:!1}},AdmanHTML.AdSlot=function(t,e,i){"use strict";function n(E){D||(D={});for(var M in E)E.hasOwnProperty(M)&&(D[M]=E[M])}function r(E,M,_,R,U,O){function P(Q){t.stats.metrics("inited");var ce={};--b,Q&&(x++,Q=typeof Q=="string"?Q.trim():Q,typeof Q=="object"||Q.charAt(0)==="{"?(ce=a(Q,E,M,_||0,R,U,O),A++):Q.charAt(0)==="<"?(ce=c(Q,E,M,_||0,R,U,O),A++):(t.stats.rb(t.stats.code.UNKNOWN_DATA_FORMAT),t.stats.logError("UNKNOWN_DATA_FORMAT"))),E.id&&(ce.banners||ce.services?ce.banners&&k.markNonEmptyService(E.id):k.markEmptyService(E.id)),o(O)}if(_&&_>4)return void o(O);var z=k.getService(E.id);z&&z.log("serviceRequested"),++b,E.url?(E.url.indexOf("ad.mail.ru/")!==-1&&E.url.indexOf("version="+t.version)===-1&&(E.url+=E.url.indexOf("?")===-1?"?":"&",E.url+="version="+t.version),AdmanHTML.Utils.xhr(E.url,P)):E.data&&setTimeout(P,0,E.data)}function o(E){if(!b){if(x&&A){var M=k.getNextOnEmptyService();if(M)return void M.start(o.bind(null,E));g();var _=E||i;return _.called||(_.called=!0,_()),void(t.debugMode&&console.log(y))}s()}}function s(){var E=t.callbacks.onError;E&&E()}function a(E,M,_,R,U,O,P){function z(_e){return _e?_e.filter(function(j){return j.type&&(j.type==="sectionShown"||j.type==="sectionStarted"||j.type==="sectionEmpty")}):[]}function Q(_e,j,Se,he){var Ae=_?_.clone():new AdmanHTML.Ad(t);if(Ae.addStatCollection(_e.statistics),Ae.addStatCollection(_e.serviceStatistics),_e.type==="additionalData"){var Be;_e.id=_e.id||AdmanHTML.Utils.createIntUID(),ie.services++;var ke=!y[Se]||y[Se].length===0;if(j>0&&ke&&(L[Se]=!0),_e.extensions)for(var je in _e.extensions)_e.extensions.hasOwnProperty(je)&&m(Ae,_e.extensions[je],je);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function(F){F in _e&&Ae.addImmutableProperty(F,_e[F])}),t.forcePreloadAdditionalData||_e.doAfter!=="true"&&_e.doAfter!==!0&&!_e.doOnEmptyResponseFromId)Be=new AdmanHTML.ServiceAd(t),l(Se,M.id,Be,_e),j===0&&ke?r(_e,Ae,R+1,Se,S.PRE,P):r(_e,Ae,R+1,Se,null,P);else{var I=_e.doAfter==="true"||_e.doAfter===!0?S.POST:null,C=function(F,K){r(_e,F||Ae,_e.allowRepeat?0:R+1,Se,I,function(){K&&K()})};Be=new AdmanHTML.ServiceAd(t,null,C),l(Se,M.id,Be,_e,Ae)}}else f(Se,he,Ae,_e),ie.banners++;return Ae}var ce,X=E,ie={banners:0,services:0};if(typeof E=="string")try{X=JSON.parse(E)}catch(_e){return t.stats.rb(t.stats.code.ERROR_CONVERTING_STRING_TO_JSON),void t.stats.logError("ERROR_CONVERTING_STRING_TO_JSON")}if(X.settings&&X.settings.requestHostname&&!D.requestHostname&&(D.requestHostname=X.settings.requestHostname),X&&X.settings&&(D=t.slot&&t.slot.getRootSettings()||D||{},n&&typeof n=="function")){var Y=X.sections&&X.sections.preroll&&X.sections.preroll.length&&X.sections.preroll[0]||null;n({impressionID:X.settings.impressionID||"",padID:X.settings.padID||"",bannerIDs:Y&&Y.bannerID||""})}for(var be in X.sections)if(X.sections.hasOwnProperty(be)){var q=X.sections[be],He=0;if(X.settings&&(ce=X.settings[be])&&(ce.controlsStyle=X.settings.controlsStyle||0,v(be,ce)),q.forEach(function(_e){if(_e.type==="debugData"){var j=new AdmanHTML.Ad(t);return j.addClick(_e.url),void u(be,j,_e)}var Se=U===be?O:"",he=Q(_e,He,be,Se);ce&&(he.addStatCollection(z(ce.statistics)),he.addSettings(ce)),He++}),q.length===0){var ae=new AdmanHTML.Ad(t);ce&&ae.addStatCollection(z(ce.statistics)),f(be,"",ae,{type:"empty"})}}return X.type&&Q(X,0,U,O),ie}function c(E,M,_,R,U,O,P){function z(q,He,ae){ce(q.getElementsByTagName(He),ae)}function Q(q,He,ae,_e){z(q,He,function(j){_e(ie(j),ae?X(j,ae):null,j)})}function ce(q,He){Array.prototype.forEach.call(q,He.bind(this))}function X(q,He){var ae=q.attributes.getNamedItem(He);return ae?ae.value:null}function ie(q){return q&&q.childNodes&&q.childNodes[0]&&q.childNodes[0].wholeText?q.childNodes[0].wholeText.trim():null}var Y,be={banners:0,services:0};try{Y=AdmanHTML.Utils.parseXml(E)}catch(q){return t.stats.rb(t.stats.code.ERROR_CONVERTING_STRING_TO_XML),void t.stats.logError("ERROR_CONVERTING_STRING_TO_XML")}return z(Y,"Ad",function(q){function He(j){var Se=_?_.clone():new AdmanHTML.Ad(t);Q(q,"Impression","id",function(Ae){try{Se.addStat(Ae,"playbackStarted")}catch(Be){}}),Q(q,"Extension","type",function(Ae,Be){m(Se,Ae,Be)}),Q(q,"Error",null,function(Ae){Se.addStat(Ae,"error")}),Q(j,"Tracking","event",Se.addStat);var he=j.getElementsByTagName("VideoClicks")[0];return he&&ce(he.childNodes,function(Ae){Ae.tagName==="ClickThrough"?Se.addClick(ie(Ae)):Ae.tagName==="ClickTracking"&&Se.addStat(ie(Ae),"click")}),Se}function ae(j){var Se={width:X(j,"width"),height:X(j,"height"),id:X(j,"id"),assetWidth:X(j,"assetWidth"),assetHeight:X(j,"assetHeight"),expandedWidth:X(j,"expandedWidth"),expandedHeight:X(j,"expandedHeight"),apiFramework:X(j,"apiFramework"),adSlotID:X(j,"adSlotID"),statistics:[]};return Q(j,"StaticResource",null,function(he){Se.staticResource=he}),Q(j,"HTMLResource",null,function(he){Se.htmlResource=he}),Q(j,"IFrameResource",null,function(he){Se.iframeResource=he}),Q(j,"CompanionClickTracking",null,function(he){Se.statistics.push({type:"click",url:he})}),Q(j,"Tracking","event",function(he,Ae){Se.statistics.push({type:Ae,url:he})}),Q(j,"CompanionClickThrough",null,function(he){Se.urlToNavigateOnClick=he}),Se}var _e=X(q,"id");z(q,"InLine",function(j){var Se=[];z(j,"CompanionAds",function(he){var Ae=X(he,"required")||"none";z(j,"Companion",function(Be){var ke=ae(Be);ke.required=Ae,Se.push(ke)})}),z(j,"Linear",function(he){var Ae,Be=He(he),ke=he.parentNode;ke&&(Ae=X(ke,"adId")||X(ke,"adID")||X(ke,"AdId")||X(ke,"AdID")||X(ke,"id")),Ae=Ae||_e;var je={bannerID:Ae,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(ie(he.getElementsByTagName("Duration")[0]))};M.urlToNavigateOnClick&&(je.urlToNavigateOnClick=M.urlToNavigateOnClick),z(he,"MediaFile",function(I){je.mediafiles.push({apiFramework:X(I,"apiFramework"),type:X(I,"type"),width:X(I,"width"),height:X(I,"height"),src:ie(I)})}),z(he,"AdParameters",function(I){je.params=ie(I);try{var C=JSON.parse(je.params);if(C&&C.settings&&(D=t.slot&&t.slot.getRootSettings()||D||{},n&&typeof n=="function")){var F=C.sections&&C.sections.preroll&&C.sections.preroll.length&&C.sections.preroll[0]||null;C.settings&&C.settings.preroll,n({impressionID:C.settings.impressionID||"",padID:C.settings.padID||"",bannerIDs:F&&F.bannerID||""})}}catch(K){console.log(K)}}),Se.length&&(je.companionAds=Se),f(U||"preroll",O,Be,je),be.banners++}),z(j,"NonLinear",function(he){var Ae=He(he),Be={width:X(he,"width"),height:X(he,"height"),duration:AdmanHTML.Utils.convertDuration(X(he,"minSuggestedDuration")),mediafiles:[]};Q(he,"NonLinearClickThrough",null,function(ke){Ae.addStat(ke,"click")}),Q(he,"StaticResource","creativeType",function(ke,je){Be.mediafiles.push({type:je,src:ke})}),f(U||"overlay",O,Ae,Be),be.banners++})}),z(q,"VASTAdTagURI",function(j){be.services++,r({url:ie(j),id:M.id},He(q),R+1,U,O,P)})}),be}function m(E,M,_){_==="controls"?E.addExtension("showControls",!!parseInt(M,10)):_==="skipTime2"?(M=isNaN(M)?AdmanHTML.Utils.convertDuration("00:"+M):parseInt(M,10),E.addExtension("allowCloseDelay",M)):_==="linkTxt"&&(E.addExtension("linkText",M),E.addExtension("adText",M))}function f(E,M,_,R){_.addAd(R)&&(_.sectionType=E,M===S.PRE&&L[E]&&(M=""),E=(M||"")+E,y[E]=y[E]||[],y[E].push(_))}function l(E,M,_,R,U){_.addAd(R),_.addInheritedAd(U),_.addStatCollection(R.statistics),_.addStatCollection(R.serviceStatistics),_.sectionType=E,k.addService(_,M)}function u(E,M,_){M.addAd(_)&&(M.section=E,T[E]=M)}function v(E,M){$[E]=$[E]||{},AdmanHTML.Utils.mixin($[E],M),delete $[E].statistics,delete $[E].view,delete $[E].advertisment}function g(){"preroll midroll pauseroll overlay postroll claimroll".split(" ").forEach(function(E){var M=L[E]?y[E]:y[S.PRE+E],_=L[E]?y[S.PRE+E]:y[E],R=y[S.POST+E];y[E]=[].concat(M||[],_||[],R||[]),h(S.PRE+E),h(S.POST+E)})}function h(E){y[E]=[]}var y={},$={},D={},T={},b=0,x=0,A=0,S={PRE:"pre-",POST:"post-"},L={},k=new AdmanHTML.ServiceStorage(t);return r({url:e.url,data:e.data}),{getSection:function(E){return y[E]},getAfterServices:k.getAfterServices,getNextAfterService:k.getNextAfterService,resetServices:k.resetAll,getServices:k.getServices,removeService:k.removeService,getSettings:function(E){return $[E]||{}},getRootSettings:function(){return D},getDebug:function(E){return T[E]}}},AdmanHTML.ServiceAd=function(t,e,i){"use strict";function n(v){return e.ad=v,!0}function r(v){e.inheritedAd=v}function o(v,g){e.inheritedAd.addImmutableProperty(v,g,!0)}function s(v){var g=v?v.filter(function(h){return h.type==="serviceRequested"||h.type==="serviceAnswerEmpty"}):[];g&&g.forEach(function(h){a(h.url,h.type,h)})}function a(v,g){v=decodeURIComponent(v),e.stats.push({name:g,type:g,url:v})}function c(v){u=!0,i&&i(e.inheritedAd,v)}function m(){u=!1}function f(){return!(t.forcePreloadAdditionalData||!e.ad||!e.ad.doAfter)&&(e.ad.doAfter===!0||e.ad.doAfter==="true")}function l(v){function g(y){AdmanHTML.Utils.loadImg(y.url);var $=h.indexOf(y);~$&&h.splice($,1)}var h=e.stats.slice(0);e.stats.forEach(function(y){y.type===v&&g(y)}),e.stats=h}e=e||{stats:[]};var u=!1;return{addStatCollection:s,addStat:a,addAd:n,addInheritedAd:r,addImmutableProperty:o,getAd:function(){return e.ad},start:c,reset:m,started:function(){return u},log:l,isAfter:f}},AdmanHTML.ServiceStorage=function(t){"use strict";function e(h,y){var $=h.getAd();v.push($.id),u[$.id]={service:h},y&&u[y]&&(u[y].children=u[y].children||[],u[y].children.push($.id)),t.forcePreloadAdditionalData||$.doAfter!=="true"&&$.doAfter!==!0&&!$.doOnEmptyResponseFromId||l.push(h)}function i(h){return u[h]?u[h].service:null}function n(h){var y=typeof h=="string"||typeof h=="number"?h:h.getAd().id;delete u[y];var $,D;for($=0,D=l.length;$<D;$++)if(h=l[$],h.getAd().id===y){l.splice($,1);break}}function r(h,y){if(!h)return[];var $,D,T=[];for($ in u)u.hasOwnProperty($)&&(D=u[$].service,D.sectionType!==h||y&&!y(D)||T.push(D));return T}function o(h){v.forEach(function(y,$){h===y?(u[y].service.log("serviceAnswerEmpty"),v.splice($,1),g.push(h),delete u[y]):u[y].children&&u[y].children.indexOf(h)!==-1&&u[y].children.splice(u[y].children.indexOf(h),1)})}function s(h){var y=u[h];y&&(y.children=null)}function a(){var h,y,$,D;for(h=0,y=l.length;h<y;h++)if($=l[h],(D=$.getAd().doOnEmptyResponseFromId)&&g.indexOf(D)!==-1&&!$.isAfter())return l.splice(h,1),$;return null}function c(h){if(!h)return[];var y,$,D,T=[];for(y=0,$=l.length;y<$;y++)D=l[y],D.sectionType===h&&D.isAfter()&&!D.started()&&T.push(D);return T}function m(h){if(!h)return null;var y,$,D,T;for(y=0,$=l.length;y<$;y++)if(D=l[y],D.sectionType===h&&D.isAfter()&&!D.started()){if((T=D.getAd().doOnEmptyResponseFromId)&&g.indexOf(T)===-1)continue;return D.getAd().allowRepeat||l.splice(y,1),D}return null}function f(h){var y,$,D;for(y=0,$=l.length;y<$;y++)D=l[y],h&&D.sectionType!==h||D.reset()}var l=[],u={},v=[],g=[];return{addService:e,getService:i,getServices:r,removeService:n,resetAll:f,markEmptyService:o,markNonEmptyService:s,getAfterServices:c,getNextAfterService:m,getNextOnEmptyService:a}},typeof define=="function"&&define.amd&&define(function(){"use strict";return AdmanHTML}),AdmanHTML.VpaidLoader=function(){"use strict";function t(i,n){this.id=Math.round(1e6*Math.random()),this.video=i,this.videoIsElement=AdmanHTML.Utils.isElement(this.video),this._props={},this.autoMuted=!1,this.win=n||window}var e=300;return t.prototype.load=function(i,n){var r=document.createElement("iframe");return this.adframe=r,this.src=i,r.width="100%",r.height="100%",r.scrolling="no",r.marginWidth="0",r.marginHeight="0",r.frameBorder="0",r.src=n,r.id="ad-frame-"+this.id,r.setAttribute("allow","autoplay"),r.onload=function(){this.src.indexOf("yandex.ru")!==-1&&this.send({type:"vpaid",method:"log"}),this.send({type:"vpaid",method:"load",src:this.src,urlToNavigateOnClick:this.urlToNavigateOnClick})}.bind(this),this.processMessage=this.processMessage.bind(this),this.videoEventHandler=this.videoEventHandler.bind(this),this.videoEvents=["play","pause","volumechange","timeupdate","ended"],this.video.addEventListener("play",this.videoEventHandler),this.video.addEventListener("pause",this.videoEventHandler),this.video.addEventListener("volumechange",this.videoEventHandler),this.video.addEventListener("timeupdate",this.videoEventHandler),this.video.addEventListener("ended",this.videoEventHandler),this.win.addEventListener("message",this.processMessage),r.setAttribute("style","color-scheme: light;"),r},t.prototype.processMessage=function(i){if(i.source===this.adframe.contentWindow)try{var n=JSON.parse(i.data);switch(this.urlToNavigateOnClick&&(n.urlToNavigateOnClick=this.urlToNavigateOnClick),n.type){case"video":this.videoMessageHandler(n);break;case"vpaid":this.vpaidMessageHandler(n)}}catch(r){}},t.prototype.videoMessageHandler=function(i){switch(i.src&&i.src.replace(/https?:/,"")!==this.video.src.replace(/https?:/,"")&&(this.video.src=i.src),i.method){case"load":this.video.load();break;case"play":var n=this.video.play();n.then&&n.then(function(){this.video.muted&&!this.autoMutedTS&&(this.autoMutedTS=new Date().getTime())}.bind(this),function(){this.autoMuted=!0,this.autoMutedTS=new Date().getTime(),this.video.muted=!0,this.video.volume=0,this.videoEventHandler({type:"volumechange"}),this.callSet("adVolume",0),this.video.play()}.bind(this));break;case"pause":this.video.pause();break;case"muted":if(!i.value&&this.video.muted&&this.autoMutedTS&&new Date().getTime()-this.autoMutedTS<e)return;this.mutedByVPAID=i.value,this.video.muted=i.value;break;case"volume":i.value&&this.video.muted&&!this.mutedByVPAID?!this.autoMutedTS||new Date().getTime()-this.autoMutedTS>e?(this.video.muted=!1,this.video.volume=i.value):this.callSet("adVolume",0):(this.video.volume=i.value,i.value===0&&(this.video.muted=!0));break;case"styles":AdmanHTML.Utils.setStyle(this.video,i.styles);break;case"addEventListener":this.videoEvents=this.videoEvents||[],this.videoEvents.push(i.eventType),this.video.addEventListener(i.eventType,this.videoEventHandler)}},t.prototype.videoEventHandler=function(i){this.send({type:"video",method:"emit",eventType:i.type,currentTime:this.video.currentTime,duration:this.video.duration,volume:this.video.volume,muted:this.video.muted}),this.videoIsElement&&(i.type==="play"?this.onVpaidCallback("video:play"):i.type==="pause"&&this.video.currentTime>0&&this.video.currentTime<.99*this.video.duration&&this.onVpaidCallback("video:pause"))},t.prototype.vpaidMessageHandler=function(i){AdmanHTML.Utils.mixin(this._props,i.props),typeof this.onVpaidCallback=="function"&&this.onVpaidCallback(i.eventType,i.props)},t.prototype.call=function(i,n){var r={type:"vpaid",method:i};if(n&&(r.params=n),this.send(r),i in this._props)return this._props[i]},t.prototype.callGet=function(i){return this._props[i]},t.prototype.callSet=function(i,n){return i="set"+i.charAt(0).toUpperCase()+i.slice(1),this.call(i,[n])},t.prototype.send=function(i){this.adframe&&(i.id=this.id,this.adframe.contentWindow&&this.adframe.contentWindow.postMessage(JSON.stringify(i),"*"))},t.prototype.onVpaidEvent=function(i){this.onVpaidCallback=i},t.prototype.destroy=function(){if(this.adframe&&this.adframe.parentNode&&this.adframe.parentNode.removeChild(this.adframe),this.videoEvents&&this.videoEvents.length)for(var i=0,n=this.videoEvents.length;i<n;i++)this.video.removeEventListener(this.videoEvents[i],this.videoEventHandler);this.video.pause(),this.video.src="",this.autoMuted&&(this.video.muted=!1),this.adframe=null,this.win.removeEventListener("message",this.processMessage),this.win=null},t}(),AdmanHTML.Constants=function(){"use strict";return{AD_ACTIONS_DEFAULT_CONFIG:{members:["disclaimer","timer","adchoice"],positionX:"left",positionY:"top",offsetX:"6px",offsetY:"6px",disclaimerText:"Реклама",headerText:"Рекламное объявление",aboutText:"О рекламодателе",copyText:"Скопировать ID"}}}(),AdmanHTML.Stats=function(t){"use strict";function e(T){if(u){var b=g[T];b&&s("https://r.mail.ru/d"+b+".gif?rnd="+Math.random())}else v.push(T)}function i(T,b){if(!n()){if(T)try{Object.defineProperty(h,T,{writable:!1,enumerable:!0,value:b||Date.now()-c})}catch(x){}else h.sessionId=AdmanHTML.Utils._genSessionId();c=Date.now(),Object.keys(g).length&&s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+t.version+"&metrics="+encodeURIComponent(JSON.stringify(h))+"&slot="+(m==="slot"?t.slotId:"json"))}}function n(){return["media_error_code","vpaid_error_message","skipped","completed"].some(function(T){return h.hasOwnProperty(T)})}function r(T,b,x){var A=[];if(x)for(var S in x)x.hasOwnProperty(S)&&A.push(S+"="+String(x[S]));var L="";A.length&&(L="&"+A.join("&")),D||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+t.version+"&"+T+"="+encodeURI(b)+"&slot="+(m==="slot"?t.slotId:"json")+L),t.debugMode&&console&&console.log&&(console.log("MESSAGE: "+T+" = "+b),x&&console.log("MESSAGE EXTRA PARAMS: "+JSON.stringify(x)))}function o(T,b){var x=[];if(b)for(var A in b)b.hasOwnProperty(A)&&x.push(A+"="+String(b[A]));var S="";x.length&&(S="&"+x.join("&")),D||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+t.version+"&error="+encodeURI(T)+"&slot="+(m==="slot"?t.slotId:"json")+S),t.debugMode&&console&&console.warn&&console.warn("Error: "+T)}function s(T){AdmanHTML.Utils.loadImg(T)}function a(T){if(!l){var b="https://ad.mail.ru/vp/"+f+"?original="+(T.slot||"")+"&version="+T.version;l=!0,D?(console.log(b),u=!0):AdmanHTML.Utils.xhr(b,function(x){if(u=!0,x){if(typeof x=="string")try{g=JSON.parse(x.trim())}catch(S){}else typeof x=="object"&&(g=x);var A=v.slice();v=[],A.forEach(e)}})}}var c,m="slot",f=3107,l=!1,u=!1,v=[],g={},h={},y=AdmanHTML.Utils.getPageLocation(),$=AdmanHTML.Utils.getHostname(y||""),D=$.indexOf("localhost")!==-1;return{rb:e,logError:o,logMessage:r,simple:s,metrics:i,initMode:function(T,b){m=T,T==="slot"&&a(b)},code:{ADMAN_INSTANCE_CREATED:"ADMAN_INSTANCE_CREATED",ADMAN_SUCCESSFULLY_INITIALIZED:"ADMAN_SUCCESSFULLY_INITIALIZED",ERROR_CONVERTING_STRING_TO_JSON:"ERROR_CONVERTING_STRING_TO_JSON",ERROR_PARSING_JSON:"ERROR_PARSING_JSON",ERROR_CONVERTING_STRING_TO_XML:"ERROR_CONVERTING_STRING_TO_XML",ERROR_PARSING_XML:"ERROR_PARSING_XML",UNKNOWN_DATA_FORMAT:"UNKNOWN_DATA_FORMAT",UNKNOWN_ADV_TYPE:"UNKNOWN_ADV_TYPE"}}},AdmanHTML.StyleUtils=function(){"use strict";function t(c){return c.replace(/-+(.)?/g,function(m,f){return f?f.toUpperCase():""})}function e(c,m,f){var l,u=s[m];if(!u){for(l=0;l<a.length;l++)if(u=a[l]===""?m:t(a[l]+"-"+m),c[u]!==void 0){s[m]=u;break}}c[u]=f}function i(c){return parseInt(c)+"px"}function n(c,m){function f(l,u){return l=parseInt(l,16),u=u||1,"rgba("+(l>>16&255)+","+(l>>8&255)+","+(255&l)+","+u+")"}return Array.isArray(c)?"linear-gradient("+c.map(function(l){return f(l,m)}).join(", ")+")":f(c,m)}function r(c,m,f){var l=c.style;(f||Object.keys(m)).forEach(function(u){m.hasOwnProperty(u)&&o(l,u,m[u],m)})}function o(c,m,f,l){var u,v,g;switch(m){case"fontFace":u="fontFamily",v=f;break;case"hasBackground":f||(u="background",v="none",delete l.backgroundColor);break;case"backgroundColor":u="background",v=n(f,l.backgroundAlpha);break;case"cornerRounding":case"borderCornerRounding":u="borderRadius",v=i(Math.floor(f/2));break;case"headerColor":case"bodyColor":case"hyperlinkColor":case"textColor":u="color",v=n(f);break;case"headerSize":case"bodySize":case"hyperlinkSize":case"textSize":u="fontSize",v=i(f);break;case"headerUnderline":case"bodyUnderline":case"hyperlinkUnderline":case"textUnderline":u="text-decoration",v=f?"underline":"none",g="";break;case"headerUnderlineOnRollOver":u="text-decoration",v=f?"":"none",g=f?"":"important";break;case"headerBold":case"bodyBold":case"hyperlinkBold":case"textBold":u="fontWeight",v=f?"bold":"normal";break;case"headerIndent":case"bodyIndent":case"hyperlinkIndent":u="marginTop",v=i(f);break;case"bodyPaddingRight":u="marginRight",v=i(f);break;case"width":case"height":u=m,v=i(f);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":u="padding",v=i(f);break;case"maxImageWidth":case"maxImageHeight":u=m==="maxImageWidth"?"maxWidth":"maxHeight",v=i(f);break;case"borderSize":u="borderWidth",v=i(f);break;case"borderColor":u="borderColor",v=n(f,l.borderAlpha);break;case"paddingLeft":case"paddingTop":u=m==="paddingLeft"?"left":"top",v=i(f);break;case"controlsPaddingTop":case"controlsPaddingRight":u=m==="controlsPaddingRight"?"right":"top",v=i(f)}u&&v&&(g!==void 0?c.setProperty(u,v,g):e(c,u,v))}var s={},a=["","webkit","Moz","O","ms"];return{applyStyle:r,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function t(){return _e||(_e=function(){try{if(window===window.top)return j;for(var I=window;I!==I.parent;){if(I.document.domain!==I.parent.document.domain)return he;I=I.parent}return Se}catch(C){}return he}())}function e(){if(Ae!==null)return Ae;var I=window;try{for(;I.parent!==I&&I.document.domain===I.parent.document.domain;)I=I.parent}catch(C){}return Ae=I,I}function i(){var I=window,C="",F=e();try{C=I.top.location.href}catch(le){if(F&&F.parent===I.top&&(C=F.document.referrer),!C){var K=I.location.ancestorOrigins;K&&K.length&&(C=K[K.length-1])}}return C||(C=(F||window).document.referrer),C}function n(){return je.major?ke:Be}function r(I){I(n())}function o(I,C){C&&I.addEventListener("load",C,!1);var F=document.getElementsByTagName("head");if(F&&F.length){var K=F[0];K&&K.appendChild(I)}}function s(I,C,F){var K=document.getElementById(C);if(K&&K.parentNode){if(!F)return;K.parentNode.removeChild(K)}K=document.createElement("style"),K.type="text/css",K.id=C,K.innerHTML=I,o(K)}function a(I){var C=document.querySelector("link[href*='"+I+"']");C||(C=document.createElement("link"),C.type="text/css",C.rel="stylesheet",C.href=I,o(C))}function c(I){var C=document.querySelector("script[src*='"+I+"']");C||(C=document.createElement("script"),C.setAttribute("type","text/javascript"),C.setAttribute("charset","utf8"),C.setAttribute("src",I),o(C))}function m(I,C){var F=AdmanHTML.Utils.getPageLocation();if(AdmanHTML.Utils.getHostname(F||"").indexOf("localhost")===-1){var K=new Image;K.onload=function(){C&&C(K)},K.src=I}else console.log(I)}function f(I,C,F,K,le){K=K||"GET";var ge=new XMLHttpRequest;return ge.open(K,I,!0),ge.withCredentials=!le,ge.setRequestHeader("Content-Type","text/plain"),ge.send(F||null),C&&(ge.onreadystatechange=function(){ge.readyState===4&&(ge.status===200?C(ge.response):C())},ge.onerror=function(){le?C():f(I,C,F,K,!0)}),ge}function l(I,C,F,K,le){le===void 0&&(le=!0);var ge=C*F<I*K;le&&(ge=!ge);var ze=ge?K/C:F/I,Qe=Math.floor(I*ze),G=Math.floor(C*ze);return{x:Math.floor((F-Qe)/2),y:Math.floor((K-G)/2),width:Math.floor(Qe),height:Math.floor(G)}}function u(I){return typeof I=="object"&&!!I&&!Array.isArray(I)}function v(I){var C;for(C in I)return!1;return!0}function g(I,C){if(!I)return null;if(C){var F;for(F in C)Object.prototype.hasOwnProperty.call(C,F)&&(I[F]=C[F])}return I}function h(I,C){if(C){var F,K;for(F in C)Object.prototype.hasOwnProperty.call(C,F)&&(K=C[F],u(K)?(I[F]=I[F]||{},I[F]=h(I[F],K)):I[F]=K)}return I}function y(I,C,F){return I=I||0,C=C||0,F=F||1,Math.min(F,Math.max(C,I))}function $(I,C){return I-C}function D(){return Math.floor(Math.random()*Math.pow(2,48)).toString()}function T(I){I=I.split("+").join(" ");for(var C,F={},K=/[?&]?([^=]+)=([^&]*)/g;C=K.exec(I);)F[decodeURIComponent(C[1])]=decodeURIComponent(C[2]);return F}function b(I,C){var F;document.createEvent?(F=document.createEvent("HTMLEvents"),F.initEvent(C,!0,!0)):(F=document.createEventObject(),F.eventType=C),F.eventName=C,document.createEvent?I.dispatchEvent(F):I.fireEvent("on"+F.eventType,F)}function x(I){return I?I.substring(I.indexOf("//")+2,I.indexOf("/?")):""}function A(I){var C=document.createElement("a");return C.href=I,C.hostname}function S(I){return I.replace(/^(www[0-9]?\.)?/,"")}function L(I,C,F){if(!I||!C)return!0;if(I=S(I),C=S(C),!(F&&F.URL&&Array.prototype.includes))return new RegExp("^"+C.replace(/^(\*\.?)/,"([^/]*.)?").replace(/\./g,"\\.")+"$").test(I);try{I=new URL(I);try{return C=new URL(C),I.host.includes(C.host)}catch(K){return I.host.includes(C)}}catch(K){return I.includes(C)}}function k(I){var C=I.button,F=I.which;return F||C===void 0?F:1&C?1:2&C?3:4&C?2:0}function E(I){return k(I)===1}function M(I,C){return C=C||document.body,I!==C&&C.contains(I)}function _(I){return I&&I.nodeType===1}function R(I){var C=I.ownerDocument;return C.defaultView||C.parentWindow}function U(I){I.preventDefault()}function O(I){var C;if(window.DOMParser)C=new DOMParser().parseFromString(I,"text/xml");else{if(!window.ActiveXObject)return;C=new window.ActiveXObject("Microsoft.XMLDOM"),C.async=!1,C.loadXML(I)}return C.documentElement}function P(I){if(I){var C=I.split(":");if(C.length===3){var F=parseInt(C[0],10),K=parseInt(C[1],10),le=C[2].split("."),ge=parseInt(le[0],10),ze=0;if(le.length===2&&(ze=parseInt(le[1],10)),!(isNaN(F)||isNaN(K)||isNaN(ge)||isNaN(ze)))return 3600*F+60*K+ge+ze/1e3}}return NaN}function z(I,C){var F,K=I;for(F in C)C.hasOwnProperty(F)&&(K=K.replace("{{"+F+"}}",C[F]));return K}function Q(I,C){if(C=C||0,window.Worker&&window.Blob){var F,K=new Blob(['var timeout; onmessage = function(e) {clearTimeout(timeout); if (e.data === "start") {timeout = setTimeout(function() { postMessage({}); }, '+C+");}}"]);try{F=new Worker(window.URL.createObjectURL(K)),F.onmessage=function(){F.terminate(),I()},F.postMessage("start")}catch(le){return setTimeout(I,C)}return F}return setTimeout(I,C)}function ce(){function I(ze){var Qe={};try{var G=window[ze].getItem("rb_sync_id");G&&typeof(Qe=JSON.parse(G))!="object"&&(Qe={})}catch(re){}return Qe}var C=[],F=I("localStorage"),K=I("sessionStorage"),le=g(F,K);for(var ge in le)le.hasOwnProperty(ge)&&C.push(ge+"="+encodeURIComponent(le[ge]));return C.join("&")}function X(I){return/nr-vpaid(\.min)?\.js/.test(I)}function ie(I,C){I&&I.style&&Y(I,C,!0)}function Y(I,C,F){F=F||!1;var K=F?function(le,ge){I.style.setProperty(le,ge,"important")}:function(le,ge){I.style.setProperty(le,ge)};Object.getOwnPropertyNames(C).forEach(function(le){K(le,C[le])})}function be(){function I(Qe,G){return function(){return Qe.apply(G,arguments)}}function C(Qe){var G=Qe.toString(16);return G.length===1?"0"+G:G}function F(Qe,G,re){for(var fe="",Ce=G;Ce<=re;Ce++)fe+=C(Qe[Ce]);return fe}var K="undefined",le=typeof crypto!==K&&crypto.getRandomValues&&I(crypto.getRandomValues,crypto)||typeof msCrypto!==K&&window.msCrypto.getRandomValues&&I(window.msCrypto.getRandomValues,window.msCrypto),ge=function(){if(le){var Qe=new Uint8Array(16);return function(){return le(Qe),Qe}}var G=new Array(16);return function(){for(var re,fe=0;fe<16;fe++)(3&fe)==0&&(re=4294967296*Math.random()),G[fe]=re>>>((3&fe)<<3)&255;return G}}(),ze=ge();return ze[6]=15&ze[6]|64,ze[8]=63&ze[8]|128,F(ze,0,3)+"-"+F(ze,4,5)+"-"+F(ze,6,7)+"-"+F(ze,8,9)+"-"+F(ze,10,15)}function q(I,C){var F=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,K=[C,I].reduce(function(le,ge){return ge&&Object.keys(F).forEach(function(ze){le[ze]!==ge[ze]&&(le[ze]=ge[ze]?ge[ze]:le[ze]),typeof ge.members=="object"&&(le.members=ge.members)}),le},Object.assign({},F));return He(K)?K:F}function He(I){return!!Array.isArray(I.members)&&(I.members.forEach(function(C){if(["adchoice","disclaimer","timer"].indexOf(C)===-1)return!1}),typeof I.positionX=="string"&&["left","right"].indexOf(I.positionX)!==-1&&typeof I.positionY=="string"&&["top","bottom"].indexOf(I.positionY)!==-1&&typeof I.offsetX=="string"&&typeof I.offsetY=="string"&&!(typeof I.disclaimerText!="string"||!I.disclaimerText.length)&&!(typeof I.headerText!="string"||!I.headerText.length)&&!(typeof I.aboutText!="string"||!I.aboutText.length)&&!(typeof I.copyText!="string"||!I.copyText.length))}function ae(I){I=I||navigator.userAgent;var C=!1;return function(F){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(F)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(F.substr(0,4)))&&(C=!0)}(I),C}var _e,j=1,Se=2,he=3,Ae=null,Be=0,ke=1,je=function(){var I="undefined",C="Shockwave Flash",F="application/x-shockwave-flash",K={major:0,minor:0,release:0},le=null;if(typeof navigator.plugins!==I&&typeof navigator.plugins[C]=="object")(le=navigator.plugins[C].description)&&typeof navigator.mimeTypes!==I&&navigator.mimeTypes[F]&&navigator.mimeTypes[F].enabledPlugin&&(le=le.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),K.major=parseInt(le.replace(/^(.*)\..*$/,"$1"),10),K.minor=parseInt(le.replace(/^.*\.(.*)\s.*$/,"$1"),10),K.release=/[a-zA-Z]/.test(le)?parseInt(le.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==I)try{var ge=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");ge&&(le=ge.GetVariable("$version"))&&(le=le.split(" ")[1].split(","),K.major=parseInt(le[0],10),K.minor=parseInt(le[1],10),K.release=parseInt(le[2],10))}catch(ze){}return K}();return{setStyle:ie,isNRVpaid:X,addCss:s,loadCss:a,loadJs:c,loadImg:m,xhr:f,scaleBySide:l,isEmptyObject:v,mixin:g,deepExtend:h,validateMinMax:y,numSorter:$,createIntUID:D,getQueryParams:T,triggerEvent:b,getUserIdQuery:ce,getPageLocation:i,getDomain:x,getHostname:A,_genSessionId:be,matchHostname:L,isLeftButtonPressed:E,isElementInDocument:M,isElement:_,getElementViewport:R,preventDefault:U,parseXml:O,convertDuration:P,renderTemplate:z,setTimeout:Q,checkFlash:n,checkFlashAsync:r,FLASH_READY:ke,FLASH_MISSING:Be,getServingType:t,servingTypes:{ON_PAGE:j,S_FRAME:Se,XD_FRAME:he},adActionsConfigPrepare:q,isMobile:ae}}(),AdmanHTML.Viewability=function(){"use strict";function t(O,P,z){return O.forEach(function(Q){Q.duration=P.focus&&P.percent>=Q.threshold?Q.duration+z:0}),O}function e(O){O.forEach(function(P){P.duration=0})}function i(O){return new window.IntersectionObserver(function(P){P&&P.length&&P[0].intersectionRatio!==void 0&&(O(P[0].intersectionRatio),!M&&(P[0].intersectionRatio>0||P[0].isIntersecting)&&(M=!0,y.log("viewin")))},{threshold:R})}function n(){return L?!document[L]:A===S.XD_FRAME||!window.top.document.hasFocus||window.top.document.hasFocus()}function r(){var O=o();if(O.state!=="UNDETERMINED")return t(U,O,b),y&&(y.logMRC(U)||h()),O}function o(){var O,P,z=n();return x?(O=_,P="DETERMINED"):A!==S.XD_FRAME?(O=s($).percent,P="DETERMINED"):(O=0,P="UNDETERMINED"),{percent:O,focus:z,state:P,viewinOccured:M}}function s(O,P){try{var z=O.getBoundingClientRect(),Q=a(z),ce=AdmanHTML.Utils.getElementViewport(O)||window;for(P=P||window.top;ce!==P;){var X=ce.frameElement.getBoundingClientRect();z=c(z,X),z.left=Math.max(X.left,z.left),z.right=Math.min(X.right,z.right),z.top=Math.max(X.top,z.top),z.bottom=Math.min(X.bottom,z.bottom),z.right<z.left&&(z.right=z.left),z.bottom<z.top&&(z.bottom=z.top),ce=ce.parent}z=m(z,P);var ie=a(z);return z.percent=ie/Q*100,z}catch(Y){return{left:0,right:0,top:0,bottom:0,percent:0}}}function a(O){return(O.right-O.left)*(O.bottom-O.top)}function c(O,P){return{left:O.left+P.left,right:O.right+P.left,top:O.top+P.top,bottom:O.bottom+P.top}}function m(O,P){var z={},Q=f(P);return z.left=Math.max(0,O.left),z.right=Math.min(Q.width,O.right),z.top=Math.max(0,O.top),z.bottom=Math.min(Q.height,O.bottom),z}function f(O){var P={width:1/0,height:1/0};return!isNaN(O.document.body.clientWidth)&&O.document.body.clientWidth>0&&(P.width=O.document.body.clientWidth),!isNaN(O.document.body.clientHeight)&&O.document.body.clientHeight>0&&(P.height=O.document.body.clientHeight),O.document.documentElement&&O.document.documentElement.clientWidth&&!isNaN(O.document.documentElement.clientWidth)&&(P.width=O.document.documentElement.clientWidth),O.document.documentElement&&O.document.documentElement.clientHeight&&!isNaN(O.document.documentElement.clientHeight)&&(P.height=O.document.documentElement.clientHeight),O.innerWidth&&!isNaN(O.innerWidth)&&(P.width=Math.min(P.width,O.innerWidth)),O.innerHeight&&!isNaN(O.innerHeight)&&(P.height=Math.min(P.height,O.innerHeight)),P}function l(O,P,z){if(y=P,E=!z,$=O,x)T=T||i(function(Q){_=100*Q}),T.observe(O);else if(A===S.XD_FRAME)return k=!1,void y.log("viewabilityUnmeasurable");z||(D=setInterval(r,b)),k=!0,y.log("viewabilityMeasurable"),window.addEventListener("unload",u)}function u(){g("unload")}function v(){D||(D=setInterval(r,b))}function g(O){k&&y&&E&&y.logMRC([],O||"complete"),y=null,k=!1,E=!1,$=null,clearInterval(D),D=void 0,e(U),T&&T.disconnect(),window.removeEventListener("unload",u)}function h(){D&&(clearInterval(D),D=void 0,e(U))}var y,$,D,T,b=255,x=!!window.IntersectionObserver,A=AdmanHTML.Utils.getServingType(),S=AdmanHTML.Utils.servingTypes,L=function(){for(var O=["h","webkitH","mozH","msH","oH"],P=0;P<O.length;P++)if(document[O[P]+"idden"]!==void 0)return O[P]+"idden";return""}(),k=!1,E=!1,M=!1,_=0,R=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],U=[];return R.forEach(function(O){U.push({threshold:Math.round(100*O),duration:0})}),{start:l,pause:h,resume:v,stop:g,getViewabilityState:o}},AdmanHTML.AdRenderer=function(t,e){"use strict";function i(){T.wrapperEl=T.wrapperEl||t.wrapper,T.mainEl=T.mainEl||document.createElement("div"),T.clickEl=T.clickEl||T.mainEl,AdmanHTML.Utils.isElement(T.mainEl)&&!T.mainEl.parentNode&&(T.wrapperEl.childNodes.length?T.wrapperEl.insertBefore(T.mainEl,T.wrapperEl.childNodes[0]):T.wrapperEl.appendChild(T.mainEl),D=!0),T.clickEl.addEventListener("click",T.onClick),window.addEventListener("resize",v)}function n(A){A()}function r(){t.viewability.stop(),window.removeEventListener("resize",v),T.clickEl&&T.clickEl.removeEventListener("click",T.onClick),clearTimeout(h),AdmanHTML.Utils.isElement(T.mainEl)&&D&&T.mainEl.parentNode&&T.mainEl.parentNode.removeChild(T.mainEl)}function o(){if(!b&&(b=!0,clearTimeout(h),y)){var A=Date.now()-y;$=1e3*x.duration-A}}function s(){b&&(b=!1,a())}function a(){y=Date.now();var A=$||1e3*x.duration;h=setTimeout(function(){r(),t.cb("onCompleted")},A)}function c(){x.urlToNavigateOnClick&&(x.openLinkInPopup?t.openPopup(x.urlToNavigateOnClick||x.trackingLink):window.open(x.urlToNavigateOnClick,"_blank"),e.log("click"),t.cb("onClicked"))}function m(A){t.cb("onStarted",[e.sectionType,AdmanHTML.Utils.mixin(e.getAdForApp()||{},A||{})]),e.log("playbackStarted")}function f(A,S){var L=parseInt(A/S*100);t.cb("onTimeRemained",[{remained:S-A,percent:L,duration:S,currentTime:A}]),A=parseInt(A),e.log("thresholdPValue",L),e.log("thresholdValue",A),e.logOVV(A,L)}function l(A,S){typeof A!="string"&&A?T.mainEl.appendChild(A):T.mainEl.innerHTML=A,AdmanHTML.Utils.mixin(T.mainEl.style,S)}function u(A){T.wrapperEl=A}function v(){T.onResize(T.mainEl.offsetWidth,T.mainEl.offsetHeight)}function g(){}var h,y,$,D,T={},b=!1,x=e.getAd();return T={start:i,pause:o,resume:s,skip:n,dispose:r,onClick:c,onStart:m,registerTimer:a,setView:l,setWrapper:u,onTimeRemained:f,onResize:g}},AdmanHTML.AudioAdRenderer=function(t,e){"use strict";function i(){s.mainEl=t.audioEl||document.createElement("audio"),a.forEach(function(c){s.mainEl.addEventListener(c,r)}),t.audioEl||s.setView(null,{position:"absolute",width:"1px",height:"1px",top:"-10000px",left:"-10000px"}),o=e.getAd().duration,s.mainEl.src=e.getAd().src,s.mainEl.load(),e.log("render"),s.mainEl.play(),t.audioEl||s.start()}function n(){s.dispose(),a.forEach(function(c){s.mainEl.removeEventListener(c,r)})}function r(c){var m,f;switch(c.type){case"loadedmetadata":s.onStart();break;case"play":t.cb("onPlayed");break;case"pause":t.cb("onPaused");break;case"timeupdate":m=s.mainEl.duration,f=s.mainEl.currentTime,!isNaN(m)&&o&&Math.abs(o-m)>1&&(m=o,f=Math.min(f,m)),s.onTimeRemained(f,m);break;case"ended":t.cb("onCompleted");break;case"error":t.cb("onError")}}var o,s=new AdmanHTML.AdRenderer(t,e),a=["loadedmetadata","error","pause","play","timeupdate","ended"];return{start:i,skip:s.skip,dispose:n,pause:function(){s.mainEl.pause()},resume:function(){s.mainEl.play()},setVolume:function(c){var m=s.mainEl.muted?0:s.mainEl.volume;s.mainEl.muted=c===0,s.mainEl.volume=c,(m===0&&c>0||m>0&&c===0)&&e.log(c?"volumeOn":"volumeOff")}}},AdmanHTML.CallToActionBtnRenderer=function(t,e){"use strict";function i(){this.isRendered=!1,this.background="#1a79ff",this.boxShadow="0px 0px 4px 0px #0000000F",this.ctaButtonEl=document.createElement("div"),this.ctaButtonEl.className="rb-adman-cta-btn",this.ctaButtonTextEl=document.createElement("span"),this.ctaButtonTextEl.className="rb-adman-cta-btn-text",this.ctaButtonEl.appendChild(this.ctaButtonTextEl)}function n(g){g.propertyName==="transform"&&g.target===l&&v.moveWithControls()}function r(){u.start(),f=e.getAd(),m=e.getSettings(),l=document.querySelector("div.videoplayer_controls");var g=AdmanHTML.Utils.adActionsConfigPrepare(f?f.adActionsConfig:null,m?m.adActionsConfig:null);if(!f.ctaWebEnabled||g.positionY==="bottom"&&g.positionX==="left")return void(a=Function.prototype);v.setText(f.ctaText),v.setStyles(),c=o(),v.setCustomStyles(c),v.addListeners(),v.appendTo(t.wrapper),a=function(){v.destroy()},l&&l.addEventListener("transitionstart",n)}function o(){return[t,f,m].reduce(function(g,h){return Object.keys(g).length||typeof h.ctaStyles!="object"?g:h.ctaStyles},{})}function s(){l&&l.removeEventListener("transitionstart",n),a&&a(),u.dispose()}if(!t.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var a,c,m,f,l,u=new AdmanHTML.AdRenderer(t,e);i.prototype._setStyles=function(g,h){AdmanHTML.Utils.setStyle(g,h)},i.prototype.setStyles=function(){this._setStyles(this.ctaButtonEl,{position:"absolute","font-family":"Roboto","font-style":"normal","font-weight":"500","font-size":"14px","line-height":"18px",transition:"background-color .15s ease-out,opacity .15s ease-out, transform 250ms cubic-bezier(0.455, 0.03, 0.515, 0.955)",border:"0.5px solid "+this.background,"box-shadow":this.boxShadow,height:"36px",cursor:"pointer",display:"flex","flex-direction":"row","align-items":"center",padding:"0px 20px",gap:"8px",background:this.background,"border-radius":"8px",color:"#FFF",bottom:l?"20px":"16%",left:"20px"})},i.prototype.setCustomStyles=function(g){g.background&&(this.background=g.background),this._setStyles(this.ctaButtonEl,g)},i.prototype.setText=function(g){this.ctaButtonTextEl.innerText=g&&typeof g=="string"?g:"Перейти"},i.prototype.removeFromDOM=function(){this.ctaButtonEl.remove()},i.prototype.addListeners=function(){this.ctaButtonEl.addEventListener("mouseover",this._hoverCTABtnListener.bind(this,!0)),this.ctaButtonEl.addEventListener("mouseout",this._hoverCTABtnListener.bind(this,!1)),this.ctaButtonEl.addEventListener("click",this._clickCTABtnListener.bind(this))},i.prototype.removeListeners=function(){this.ctaButtonEl.removeEventListener("mouseover",this._hoverCTABtnListener.bind(this,!0)),this.ctaButtonEl.removeEventListener("mouseout",this._hoverCTABtnListener.bind(this,!1)),this.ctaButtonEl.removeEventListener("click",this._clickCTABtnListener.bind(this))},i.prototype.destroy=function(){this.removeListeners(),this.removeFromDOM()},i.prototype._clickCTABtnListener=function(){var g=f.ctaLink||f.urlToNavigateOnClick;f.openLinkInPopup?t.openPopup(g||f.trackingLink):window.open(g,"_blank"),e.log(["ctaClick","click"]),t.cb("onClicked")},i.prototype._hoverCTABtnListener=function(g){this._setStyles(this.ctaButtonEl,{background:g?"#1460C9":this.background,"box-shadow":g?"0px 4px 8px 0px #0000000A":this.boxShadow})},i.prototype.appendTo=function(g){g&&(g.appendChild(this.ctaButtonEl),this.isRendered=!0)},i.prototype.moveWithControls=function(){var g=l.classList.contains("hidden");this.ctaButtonEl.style.setProperty("transform","translateY("+(g?"0":"-"+Math.round(l.offsetHeight))+"px)")};var v=new i;return{render:r,dispose:s}},AdmanHTML.CloseBtnRenderer=function(t,e){"use strict";function i(){o.start();var f=e.getSettings(),l=f.controlsStyle||0,u=s[l],v=a[l];v.bg=v.bg||v.width;var g={};for(var h in m)m.hasOwnProperty(h)&&(g[h]=f[h]!==void 0?f[h]:m[h]);if(g.controlsPaddingTop=g.controlsPaddingTop-g.controlsSafeArea,g.controlsPaddingRight=g.controlsPaddingRight-g.controlsSafeArea,o.setView(AdmanHTML.Utils.renderTemplate(c,{img:u,width:v.width,height:v.height,bg:v.bg}),{position:"absolute",cursor:"pointer"}),AdmanHTML.StyleUtils.applyStyle(o.mainEl,g),v.bg!==v.width){var y=v.bg-v.width,$=function(T){T.target.className==="rb-adman_close"&&(T.target.style.backgroundPosition="-"+y+"px 0")},D=function(T){T.target.className==="rb-adman_close"&&(T.target.style.backgroundPosition="0 0")};o.mainEl.addEventListener("mouseover",$),o.mainEl.addEventListener("mouseout",D),r=function(){o.mainEl.removeEventListener("mouseover",$),o.mainEl.removeEventListener("mouseout",D)}}}function n(){r&&r(),o.dispose()}var r,o=new AdmanHTML.AdRenderer(t,e),s=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAASCAMAAAAE/YwaAAABTVBMVEUAAAD4+PiLi4sAAAD////////q6uokJCT4+PiDg4MVFRUAAAD////9/f2AgICwsLC8vLyWlpaTk5MAAADq6urGxsYmJiZra2v29vZ2dnba2trQ0NCmpqbb29unp6c0NDTs7OzPz8+xsbH+/v7///9jY2P///+fn5+ysrLe3t5LS0uzs7PBwcEuLi66urpYWFi3t7cAAAD39/fW1tb8/PzGxsba2tpKSkpUVFR/f39sbGyRkZF2dnaqqqqioqLKyspERET6+vr////l5eX////w8PD////////a2tr////Y2Nj///+Pj4////+Dg4N6enq3t7dkZGSGhoaMjIz///+amppeXl7///9MTExxcXE9PT3///////9CQkL////////////n5+fKysrq6uq9vb2jo6Pk5OScnJyoqKjk5OS9vb2IiIhAQEBeXl7///8RDLJoAAAAbnRSTlNegIEhrIlmZmWAZkky/GeCgYFnBoCAdGbzq4GAgGZmZvHfzaefnJiXkpGKcG5uZmZDQ/fq466sqqeZmJeSd2xnZvnw7Onj2dHMyMfAvLe2tLCwpJGQjH92b25ubFpYUUhA4NrQzsrHvqqolnl5b4/gN4MAAAGhSURBVCjPZdFXbxpBEMDxORYSks1VDrgOpphqwKF34t7j3lt6n+//mOFtkX/Srlaj/8NKAzG2CoJVFns5AVZuhwXtMmP5JgqaeQa8I0UF0i/O01lJkE1zgNyrBTmANWnBGgAs+351PK761cq4UvX9ZYAN0yzYdsEsntqnRdPcoOh8WukgdipeCy11Oj0HaJnFDOLXgp1G68gxWxRFarXJd5R/f0G5OKnVIgBbjjNcQvlHE+WDguNsUSQFweTPJsqIbSMIAglg23U1e30+yQxd192m6MowDCVkIe4pBrkC2I3H4xcf3yN+7sfJLkV3iqLchGi0c6OQO4B9TdPO5tFSXyP7FEWTyeTlJn5APP5HzyjAoapenKTnk0xfVdVDiu7r9esdlM/2UB5e1+v3AGHPG9DHj+gcjDwvTNHj7PYY8eft309oXc5mjwBZfZRB/DboraN1outZip5SqZVEYoWu+Z16oh3oer7bzeujXrc30PUcRc+vFzzTDkILaAe88fBW8NDgvKS+EaglDizReCdoJBgrlyKCUplBjHEQcBZ7OfkPWYpTXkAiSDwAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANBAMAAACAxflPAAAAGFBMVEX///8AAAD///////////////////////8GrCwdAAAACHRSTlPMAKZNgI0NmlQIVC0AAABMSURBVAjXYxAUVmBQFhRgEFNgYGBQE2AQYgACJgEGA6YAhiAGAwYFVhEWcQaQpKOhAwMIMAsDCRgfLC8KlDdgKmAoYjCA6oebBzMfAF6oBtnQTZWMAAAAAElFTkSuQmCC","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAA0CAMAAABRjo0fAAAARVBMVEUAAAAAAAAAAAD///+3t7e3t7cAAAAtLS3FxcUAAAAtLS3z8/Px8fHIyMjCwsJKSkpKSkoAAAAAAAD29vbi4uLi4uL////qCBnnAAAAFnRSTlMAgE2Zx3c4jHxiVJLy0s2VWR8K9eSJJoi7pQAAAS1JREFUWMPs0DkSwzAIQNFoV+R90/2PGg0DTQI2RQoX/hUN84ReT09Pf22JViwu/E58G7F3ZFdWZERqZXaQEamVgdCRY95Hjiwx/2YvW37eZi6L/EEld46pywVOYg9KQ1+Z+iHxJ4EDDEuB9L0DzlaFNpBYKDuxLEFDFRtEqJOhToJ6GepFyJ0kQfWku0DHXLLDcpkPDbRPaazYmKZdBc1tCg4KbZw10NQmXyHfxkkFFQsSOrZooGRAQsckFZQtSgGGrIFGg5KHYdRABISAoAIiwHsEVRBJ6KggktDRQCSRo4FIIkcDkUSOBiKJnDtCn1EadIMtMVAheQ+uDEuNImhwFarUqCYGV8VHPYsGvnFCi+YW3RqQdGsS062RT69uC906YvTqWo6CUTAKqAkAIPxHpRLLbKUAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAAiCAMAAADRYI/HAAAAOVBMVEUAAAD///+7u7uxsbF9fX2Pj4/W1taJiYn39/eTk5PNzc2tra2CgoLx8fHIyMioqKiioqJ3d3fh4eHCLdXsAAAAAXRSTlMAQObYZgAAAPhJREFUSMfszksOgzAMRdFiYoKdL+x/sTWRDJXyppU66BtF6HLk13+/vbTCpac4AtzxFNYTmH32IoQceVrMIXzcQbpNU7pvOcxoNK2Z4reYcS5gJ/kpZigq1BRHyArYkCOx4aLFB9lwst0IEy6Iv4Jo3ZexvSpGUveiJ4woEe2jsIciJLFIuR5FhBNEKq2mDGOlipAuOcpVSMzSITJ+tpgGhpDCMZhiRohcEOKKGxPiCrMbAHHFDYAs44j3wM7BE8VAI4Bm4ItioClAMyBsyg2hsncoD1jKo5jyxEZBsueAJ3sqZsDBWJ5QXjxSXlBTXmVQo/KiZjUKAAVsE9yzWNzOAAAAAElFTkSuQmCC"],a=[{width:18,height:18,bg:36},{width:13,height:13},{width:26,height:26,bg:52},{width:17,height:17,bg:34}],c='<div class="rb-adman_close" style="background:url({{img}});background-size:{{bg}}px 100%;width:{{width}}px;height:{{height}}px""></div>',m={controlsPaddingTop:3,controlsPaddingRight:0,controlsSafeArea:0};return o.onClick=function(f){f.stopPropagation(),f.target.className==="rb-adman_close"&&t.cb("onClosed")},{start:i,dispose:n,setWrapper:o.setWrapper}},AdmanHTML.DebugAdRenderer=function(t,e){"use strict";function i(){n.mainEl=document.createElement("span"),n.start(),n.setView("⚒ "+e.section,{position:"absolute",cursor:"pointer",top:"5px",left:"5px",background:"rgba(204,204,204,0.8)",padding:"5px",color:"#333","border-radius":"6px",font:"12px/19px Tahoma",display:"inline-block","z-index":100})}var n=new AdmanHTML.AdRenderer(t,e),r=e.getAd();return n.onClick=function(){window.open(r.urlToNavigateOnClick,"_blank")},{start:i,dispose:n.dispose}},AdmanHTML.DisclaimerRenderer=function(t,e){"use strict";function i(l,u,v,g){var h=document.createElement("style");h.appendChild(document.createTextNode(" @font-face { font-family: "+l+"; font-style: normal; font-weight: 300; unicode-range: "+g+"; src: url('"+u+"') format('"+v+"'); } ")),document.head.appendChild(h)}function n(){this.isOpened=!1,this.isSmall=!1,this.appendedTo=null,this._advPageUrlPart="https://ads.vk.com/adv_info?",this.actionsWrapperWidth=175,this.infoOrdIdDescription="",this.closeIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS43MzY0MSAwLjI2MzYwNEMxMC4wODc5IDAuNjE1MDc2IDEwLjA4NzkgMS4xODQ5MiA5LjczNjQxIDEuNTM2NEw2LjI3MyA1TDkuNzM2NDEgOC40NjM2MkMxMC4wNTg2IDguNzg1OCAxMC4wODU0IDkuMjkxNDggOS44MTY5NSA5LjY0NDI0TDkuNzM2NDEgOS43MzY0MUM5LjM4NDk0IDEwLjA4NzkgOC44MTUwOSAxMC4wODc5IDguNDYzNjIgOS43MzY0MUw1IDYuMjczTDEuNTM2NCA5LjczNjQxQzEuMTg0OTIgMTAuMDg3OSAwLjYxNTA3NiAxMC4wODc5IDAuMjYzNjA0IDkuNzM2NDFDLTAuMDg3ODY3OSA5LjM4NDk0IC0wLjA4Nzg2NzkgOC44MTUwOSAwLjI2MzYwNCA4LjQ2MzYyTDMuNzI3IDVMMC4yNjM2MDQgMS41MzY0Qy0wLjA1ODU3ODYgMS4yMTQyMSAtMC4wODU0MjcyIDAuNzA4NTM0IDAuMTgzMDU4IDAuMzU1NzY5TDAuMjYzNjA0IDAuMjYzNjA0QzAuNjE1MDc2IC0wLjA4Nzg2OCAxLjE4NDkyIC0wLjA4Nzg2OCAxLjUzNjQgMC4yNjM2MDRMNSAzLjcyN0w4LjQ2MzYyIDAuMjYzNjA0QzguODE1MDkgLTAuMDg3ODY4IDkuMzg0OTQgLTAuMDg3ODY4IDkuNzM2NDEgMC4yNjM2MDRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjY0Ii8+PC9zdmc+",this.closeIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOS43MzY0MSAwLjI2MzYwNEMxMC4wODc5IDAuNjE1MDc2IDEwLjA4NzkgMS4xODQ5MiA5LjczNjQxIDEuNTM2NEw2LjI3MyA1TDkuNzM2NDEgOC40NjM2MkMxMC4wNTg2IDguNzg1OCAxMC4wODU0IDkuMjkxNDggOS44MTY5NSA5LjY0NDI0TDkuNzM2NDEgOS43MzY0MUM5LjM4NDk0IDEwLjA4NzkgOC44MTUwOSAxMC4wODc5IDguNDYzNjIgOS43MzY0MUw1IDYuMjczTDEuNTM2NCA5LjczNjQxQzEuMTg0OTIgMTAuMDg3OSAwLjYxNTA3NiAxMC4wODc5IDAuMjYzNjA0IDkuNzM2NDFDLTAuMDg3ODY3OSA5LjM4NDk0IC0wLjA4Nzg2NzkgOC44MTUwOSAwLjI2MzYwNCA4LjQ2MzYyTDMuNzI3IDVMMC4yNjM2MDQgMS41MzY0Qy0wLjA1ODU3ODYgMS4yMTQyMSAtMC4wODU0MjcyIDAuNzA4NTM0IDAuMTgzMDU4IDAuMzU1NzY5TDAuMjYzNjA0IDAuMjYzNjA0QzAuNjE1MDc2IC0wLjA4Nzg2OCAxLjE4NDkyIC0wLjA4Nzg2OCAxLjUzNjQgMC4yNjM2MDRMNSAzLjcyN0w4LjQ2MzYyIDAuMjYzNjA0QzguODE1MDkgLTAuMDg3ODY4IDkuMzg0OTQgLTAuMDg3ODY4IDkuNzM2NDEgMC4yNjM2MDRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIxLjAwIi8+PC9zdmc+",this.aboutIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiA2Ljc1QzYgNy4xNjQyMSA2LjMzNTc5IDcuNSA2Ljc1IDcuNUg5LjQzOTM0TDYuMjE5NjcgMTAuNzE5N0M1LjkyNjc4IDExLjAxMjYgNS45MjY3OCAxMS40ODc0IDYuMjE5NjcgMTEuNzgwM0M2LjUxMjU2IDEyLjA3MzIgNi45ODc0NCAxMi4wNzMyIDcuMjgwMzMgMTEuNzgwM0wxMC41IDguNTYwNjZWMTEuMjVDMTAuNSAxMS42NjQyIDEwLjgzNTggMTIgMTEuMjUgMTJDMTEuNjY0MiAxMiAxMiAxMS42NjQyIDEyIDExLjI1VjYuNzVDMTIgNi4zMzU3OSAxMS42NjQyIDYgMTEuMjUgNkg2Ljc1QzYuMzM1NzkgNiA2IDYuMzM1NzkgNiA2Ljc1WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkgMTcuNUMxMy42OTQ0IDE3LjUgMTcuNSAxMy42OTQ0IDE3LjUgOUMxNy41IDQuMzA1NTggMTMuNjk0NCAwLjUgOSAwLjVDNC4zMDU1OCAwLjUgMC41IDQuMzA1NTggMC41IDlDMC41IDEzLjY5NDQgNC4zMDU1OCAxNy41IDkgMTcuNVpNMTYgOUMxNiAxMi44NjYgMTIuODY2IDE2IDkgMTZDNS4xMzQwMSAxNiAyIDEyLjg2NiAyIDlDMiA1LjEzNDAxIDUuMTM0MDEgMiA5IDJDMTIuODY2IDIgMTYgNS4xMzQwMSAxNiA5WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPjwvc3ZnPgo=",this.aboutIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiA2Ljc1QzYgNy4xNjQyMSA2LjMzNTc5IDcuNSA2Ljc1IDcuNUg5LjQzOTM0TDYuMjE5NjcgMTAuNzE5N0M1LjkyNjc4IDExLjAxMjYgNS45MjY3OCAxMS40ODc0IDYuMjE5NjcgMTEuNzgwM0M2LjUxMjU2IDEyLjA3MzIgNi45ODc0NCAxMi4wNzMyIDcuMjgwMzMgMTEuNzgwM0wxMC41IDguNTYwNjZWMTEuMjVDMTAuNSAxMS42NjQyIDEwLjgzNTggMTIgMTEuMjUgMTJDMTEuNjY0MiAxMiAxMiAxMS42NjQyIDEyIDExLjI1VjYuNzVDMTIgNi4zMzU3OSAxMS42NjQyIDYgMTEuMjUgNkg2Ljc1QzYuMzM1NzkgNiA2IDYuMzM1NzkgNiA2Ljc1WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTkgMTcuNUMxMy42OTQ0IDE3LjUgMTcuNSAxMy42OTQ0IDE3LjUgOUMxNy41IDQuMzA1NTggMTMuNjk0NCAwLjUgOSAwLjVDNC4zMDU1OCAwLjUgMC41IDQuMzA1NTggMC41IDlDMC41IDEzLjY5NDQgNC4zMDU1OCAxNy41IDkgMTcuNVpNMTYgOUMxNiAxMi44NjYgMTIuODY2IDE2IDkgMTZDNS4xMzQwMSAxNiAyIDEyLjg2NiAyIDlDMiA1LjEzNDAxIDUuMTM0MDEgMiA5IDJDMTIuODY2IDIgMTYgNS4xMzQwMSAxNiA5WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPjwvc3ZnPgo=",this.copyIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy4yIDJDNS45MTUxMyAyIDUuMDQxNjkgMi4wMDExNyA0LjM2NjU2IDIuMDU2MzNDMy43MDg5MyAyLjExMDA2IDMuMzcyNjMgMi4yMDc0NSAzLjEzODAzIDIuMzI2OThDMi41NzM1NCAyLjYxNDYgMi4xMTQ2IDMuMDczNTQgMS44MjY5OCAzLjYzODAzQzEuNzA3NDUgMy44NzI2MyAxLjYxMDA2IDQuMjA4OTMgMS41NTYzMyA0Ljg2NjU2QzEuNTAxMTcgNS41NDE2OSAxLjUgNi40MTUxMyAxLjUgNy43VjEwLjNDMS41IDEwLjg4NDggMS41MDExNyAxMS4yMzMyIDEuNTIyMjcgMTEuNDkxNEMxLjUzMTI4IDExLjYwMTcgMS41NDIzIDExLjY2NzMgMS41NSAxMS43MDI4VjExLjhDMS41NSAxMi41NjExIDEuNTUgMTMuMDYzNiAxLjYxODM4IDEzLjQ0MThDMS40MTMzMiAxMy40MDk2IDEuMjQ0MjkgMTMuMzU5NiAxLjA5MjAyIDEzLjI4MkMwLjcxNTY5NSAxMy4wOTAzIDAuNDA5NzM0IDEyLjc4NDMgMC4yMTc5ODcgMTIuNDA4QzAgMTEuOTgwMiAwIDExLjQyMDEgMCAxMC4zVjcuN0MwIDUuMTc5NzYgMCAzLjkxOTY1IDAuNDkwNDcxIDIuOTU3MDRDMC45MjE5MDEgMi4xMTAzMSAxLjYxMDMxIDEuNDIxOSAyLjQ1NzA0IDAuOTkwNDcxQzMuNDE5NjUgMC41IDQuNjc5NzYgMC41IDcuMiAwLjVIOS4yQzEwLjMyMDEgMC41IDEwLjg4MDIgMC41IDExLjMwOCAwLjcxNzk4N0MxMS42ODQzIDAuOTA5NzM0IDExLjk5MDMgMS4yMTU2OSAxMi4xODIgMS41OTIwMkMxMi4yNTE5IDEuNzI5MTUgMTIuMjk5NCAxLjg3OTg2IDEyLjMzMTYgMi4wNTgyNEMxMS45NjA1IDIgMTEuNDcxNCAyIDEwLjc1IDJINy4yWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42NCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy4xIDYuN0MzLjEgNS41Nzk5IDMuMSA1LjAxOTg0IDMuMzE3OTkgNC41OTIwMkMzLjUwOTczIDQuMjE1NjkgMy44MTU2OSAzLjkwOTczIDQuMTkyMDIgMy43MTc5OUM0LjYxOTg0IDMuNSA1LjE3OTg5IDMuNSA2LjMgMy41SDEyLjNDMTMuNDIwMSAzLjUgMTMuOTgwMiAzLjUgMTQuNDA4IDMuNzE3OTlDMTQuNzg0MyAzLjkwOTczIDE1LjA5MDMgNC4yMTU2OSAxNS4yODIgNC41OTIwMkMxNS41IDUuMDE5ODQgMTUuNSA1LjU3OTkgMTUuNSA2LjdWMTQuM0MxNS41IDE1LjQyMDEgMTUuNSAxNS45ODAyIDE1LjI4MiAxNi40MDhDMTUuMDkwMyAxNi43ODQzIDE0Ljc4NDMgMTcuMDkwMyAxNC40MDggMTcuMjgyQzEzLjk4MDIgMTcuNSAxMy40MjAxIDE3LjUgMTIuMyAxNy41SDYuM0M1LjE3OTkgMTcuNSA0LjYxOTg0IDE3LjUgNC4xOTIwMiAxNy4yODJDMy44MTU2OSAxNy4wOTAzIDMuNTA5NzMgMTYuNzg0MyAzLjMxNzk5IDE2LjQwOEMzLjEgMTUuOTgwMiAzLjEgMTUuNDIwMSAzLjEgMTQuM1Y2LjdaTTYuMyA1SDEyLjNDMTIuODg0OCA1IDEzLjIzMzIgNS4wMDExNyAxMy40OTE0IDUuMDIyMjdDMTMuNjQ5MSA1LjAzNTE0IDEzLjcxNTMgNS4wNTIxNCAxMy43MzMxIDUuMDU3NjVDMTMuODIyNCA1LjEwNDY5IDEzLjg5NTMgNS4xNzc2NSAxMy45NDI0IDUuMjY2OTNDMTMuOTQ3OSA1LjI4NDY4IDEzLjk2NDkgNS4zNTA5NCAxMy45Nzc3IDUuNTA4NTVDMTMuOTk4OCA1Ljc2NjgxIDE0IDYuMTE1MiAxNCA2LjdWMTQuM0MxNCAxNC44ODQ4IDEzLjk5ODggMTUuMjMzMiAxMy45Nzc3IDE1LjQ5MTRDMTMuOTY0OSAxNS42NDkxIDEzLjk0NzkgMTUuNzE1MyAxMy45NDI0IDE1LjczMzFDMTMuODk1MyAxNS44MjI0IDEzLjgyMjQgMTUuODk1MyAxMy43MzMxIDE1Ljk0MjRDMTMuNzE1MyAxNS45NDc5IDEzLjY0OTEgMTUuOTY0OSAxMy40OTE0IDE1Ljk3NzdDMTMuMjMzMiAxNS45OTg4IDEyLjg4NDggMTYgMTIuMyAxNkg2LjNDNS43MTUyIDE2IDUuMzY2ODEgMTUuOTk4OCA1LjEwODU1IDE1Ljk3NzdDNC45NTA5NCAxNS45NjQ5IDQuODg0NjkgMTUuOTQ3OSA0Ljg2NjkzIDE1Ljk0MjRDNC43Nzc2NSAxNS44OTUzIDQuNzA0NjkgMTUuODIyNCA0LjY1NzY1IDE1LjczMzFDNC42NTIxNCAxNS43MTUzIDQuNjM1MTQgMTUuNjQ5MSA0LjYyMjI3IDE1LjQ5MTRDNC42MDExNyAxNS4yMzMyIDQuNiAxNC44ODQ4IDQuNiAxNC4zVjYuN0M0LjYgNi4xMTUyIDQuNjAxMTcgNS43NjY4MSA0LjYyMjI3IDUuNTA4NTVDNC42MzUxNCA1LjM1MDkzIDQuNjUyMTQgNS4yODQ2OCA0LjY1NzY1IDUuMjY2OTNDNC43MDQ2OSA1LjE3NzY1IDQuNzc3NjUgNS4xMDQ2OSA0Ljg2NjkzIDUuMDU3NjVDNC44ODQ2OCA1LjA1MjE0IDQuOTUwOTQgNS4wMzUxNCA1LjEwODU1IDUuMDIyMjdDNS4zNjY4MSA1LjAwMTE3IDUuNzE1MiA1IDYuMyA1Wk0xMy43MzgzIDUuMDU5NDVMMTMuNzM1MiA1LjA1ODMzQzEzLjczNzQgNS4wNTkwNCAxMy43MzgzIDUuMDU5NDMgMTMuNzM4MyA1LjA1OTQ1Wk0xMy45NDA1IDUuMjYxNzVDMTMuOTQwNiA1LjI2MTY5IDEzLjk0MSA1LjI2MjY0IDEzLjk0MTcgNS4yNjQ3OEwxMy45NDA1IDUuMjYxNzVaTTEzLjk0MDUgMTUuNzM4M0wxMy45NDE3IDE1LjczNTJDMTMuOTQxIDE1LjczNzMgMTMuOTQwNiAxNS43MzgzIDEzLjk0MDUgMTUuNzM4M1pNMTMuNzM4MiAxNS45NDA1QzEzLjczODMgMTUuOTQwNiAxMy43Mzc0IDE1Ljk0MDkgMTMuNzM1MyAxNS45NDE3TDEzLjczODIgMTUuOTQwNVpNNC44NjE3NSAxNS45NDA1TDQuODY0NzggMTUuOTQxN0M0Ljg2MjY1IDE1Ljk0MSA0Ljg2MTY5IDE1Ljk0MDYgNC44NjE3NSAxNS45NDA1Wk00LjY1OTQ1IDE1LjczODNDNC42NTk0MyAxNS43MzgzIDQuNjU5MDQgMTUuNzM3NCA0LjY1ODMzIDE1LjczNTJMNC42NTk0NSAxNS43MzgzWk00LjY1OTQ1IDUuMjYxNzVMNC42NTgzMyA1LjI2NDc4QzQuNjU5MDQgNS4yNjI2NCA0LjY1OTQzIDUuMjYxNjkgNC42NTk0NSA1LjI2MTc1Wk00Ljg2MjE0IDUuMDU5MjdDNC44NjIxMiA1LjA1OTI2IDQuODYxODUgNS4wNTkzOCA0Ljg2MjE0IDUuMDU5MjdMNC44NjQ3OCA1LjA1ODMzQzQuODYzNDcgNS4wNTg3NyA0Ljg2MjYgNS4wNTkwOCA0Ljg2MjE0IDUuMDU5MjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjY0Ii8+PC9zdmc+",this.copyIconActiveSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNiAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy4yIDJDNS45MTUxMyAyIDUuMDQxNjkgMi4wMDExNyA0LjM2NjU2IDIuMDU2MzNDMy43MDg5MyAyLjExMDA2IDMuMzcyNjMgMi4yMDc0NSAzLjEzODAzIDIuMzI2OThDMi41NzM1NCAyLjYxNDYgMi4xMTQ2IDMuMDczNTQgMS44MjY5OCAzLjYzODAzQzEuNzA3NDUgMy44NzI2MyAxLjYxMDA2IDQuMjA4OTMgMS41NTYzMyA0Ljg2NjU2QzEuNTAxMTcgNS41NDE2OSAxLjUgNi40MTUxMyAxLjUgNy43VjEwLjNDMS41IDEwLjg4NDggMS41MDExNyAxMS4yMzMyIDEuNTIyMjcgMTEuNDkxNEMxLjUzMTI4IDExLjYwMTcgMS41NDIzIDExLjY2NzMgMS41NSAxMS43MDI4VjExLjhDMS41NSAxMi41NjExIDEuNTUgMTMuMDYzNiAxLjYxODM4IDEzLjQ0MThDMS40MTMzMiAxMy40MDk2IDEuMjQ0MjkgMTMuMzU5NiAxLjA5MjAyIDEzLjI4MkMwLjcxNTY5NSAxMy4wOTAzIDAuNDA5NzM0IDEyLjc4NDMgMC4yMTc5ODcgMTIuNDA4QzAgMTEuOTgwMiAwIDExLjQyMDEgMCAxMC4zVjcuN0MwIDUuMTc5NzYgMCAzLjkxOTY1IDAuNDkwNDcxIDIuOTU3MDRDMC45MjE5MDEgMi4xMTAzMSAxLjYxMDMxIDEuNDIxOSAyLjQ1NzA0IDAuOTkwNDcxQzMuNDE5NjUgMC41IDQuNjc5NzYgMC41IDcuMiAwLjVIOS4yQzEwLjMyMDEgMC41IDEwLjg4MDIgMC41IDExLjMwOCAwLjcxNzk4N0MxMS42ODQzIDAuOTA5NzM0IDExLjk5MDMgMS4yMTU2OSAxMi4xODIgMS41OTIwMkMxMi4yNTE5IDEuNzI5MTUgMTIuMjk5NCAxLjg3OTg2IDEyLjMzMTYgMi4wNTgyNEMxMS45NjA1IDIgMTEuNDcxNCAyIDEwLjc1IDJINy4yWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMS4wMCIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy4xIDYuN0MzLjEgNS41Nzk5IDMuMSA1LjAxOTg0IDMuMzE3OTkgNC41OTIwMkMzLjUwOTczIDQuMjE1NjkgMy44MTU2OSAzLjkwOTczIDQuMTkyMDIgMy43MTc5OUM0LjYxOTg0IDMuNSA1LjE3OTg5IDMuNSA2LjMgMy41SDEyLjNDMTMuNDIwMSAzLjUgMTMuOTgwMiAzLjUgMTQuNDA4IDMuNzE3OTlDMTQuNzg0MyAzLjkwOTczIDE1LjA5MDMgNC4yMTU2OSAxNS4yODIgNC41OTIwMkMxNS41IDUuMDE5ODQgMTUuNSA1LjU3OTkgMTUuNSA2LjdWMTQuM0MxNS41IDE1LjQyMDEgMTUuNSAxNS45ODAyIDE1LjI4MiAxNi40MDhDMTUuMDkwMyAxNi43ODQzIDE0Ljc4NDMgMTcuMDkwMyAxNC40MDggMTcuMjgyQzEzLjk4MDIgMTcuNSAxMy40MjAxIDE3LjUgMTIuMyAxNy41SDYuM0M1LjE3OTkgMTcuNSA0LjYxOTg0IDE3LjUgNC4xOTIwMiAxNy4yODJDMy44MTU2OSAxNy4wOTAzIDMuNTA5NzMgMTYuNzg0MyAzLjMxNzk5IDE2LjQwOEMzLjEgMTUuOTgwMiAzLjEgMTUuNDIwMSAzLjEgMTQuM1Y2LjdaTTYuMyA1SDEyLjNDMTIuODg0OCA1IDEzLjIzMzIgNS4wMDExNyAxMy40OTE0IDUuMDIyMjdDMTMuNjQ5MSA1LjAzNTE0IDEzLjcxNTMgNS4wNTIxNCAxMy43MzMxIDUuMDU3NjVDMTMuODIyNCA1LjEwNDY5IDEzLjg5NTMgNS4xNzc2NSAxMy45NDI0IDUuMjY2OTNDMTMuOTQ3OSA1LjI4NDY4IDEzLjk2NDkgNS4zNTA5NCAxMy45Nzc3IDUuNTA4NTVDMTMuOTk4OCA1Ljc2NjgxIDE0IDYuMTE1MiAxNCA2LjdWMTQuM0MxNCAxNC44ODQ4IDEzLjk5ODggMTUuMjMzMiAxMy45Nzc3IDE1LjQ5MTRDMTMuOTY0OSAxNS42NDkxIDEzLjk0NzkgMTUuNzE1MyAxMy45NDI0IDE1LjczMzFDMTMuODk1MyAxNS44MjI0IDEzLjgyMjQgMTUuODk1MyAxMy43MzMxIDE1Ljk0MjRDMTMuNzE1MyAxNS45NDc5IDEzLjY0OTEgMTUuOTY0OSAxMy40OTE0IDE1Ljk3NzdDMTMuMjMzMiAxNS45OTg4IDEyLjg4NDggMTYgMTIuMyAxNkg2LjNDNS43MTUyIDE2IDUuMzY2ODEgMTUuOTk4OCA1LjEwODU1IDE1Ljk3NzdDNC45NTA5NCAxNS45NjQ5IDQuODg0NjkgMTUuOTQ3OSA0Ljg2NjkzIDE1Ljk0MjRDNC43Nzc2NSAxNS44OTUzIDQuNzA0NjkgMTUuODIyNCA0LjY1NzY1IDE1LjczMzFDNC42NTIxNCAxNS43MTUzIDQuNjM1MTQgMTUuNjQ5MSA0LjYyMjI3IDE1LjQ5MTRDNC42MDExNyAxNS4yMzMyIDQuNiAxNC44ODQ4IDQuNiAxNC4zVjYuN0M0LjYgNi4xMTUyIDQuNjAxMTcgNS43NjY4MSA0LjYyMjI3IDUuNTA4NTVDNC42MzUxNCA1LjM1MDkzIDQuNjUyMTQgNS4yODQ2OCA0LjY1NzY1IDUuMjY2OTNDNC43MDQ2OSA1LjE3NzY1IDQuNzc3NjUgNS4xMDQ2OSA0Ljg2NjkzIDUuMDU3NjVDNC44ODQ2OCA1LjA1MjE0IDQuOTUwOTQgNS4wMzUxNCA1LjEwODU1IDUuMDIyMjdDNS4zNjY4MSA1LjAwMTE3IDUuNzE1MiA1IDYuMyA1Wk0xMy43MzgzIDUuMDU5NDVMMTMuNzM1MiA1LjA1ODMzQzEzLjczNzQgNS4wNTkwNCAxMy43MzgzIDUuMDU5NDMgMTMuNzM4MyA1LjA1OTQ1Wk0xMy45NDA1IDUuMjYxNzVDMTMuOTQwNiA1LjI2MTY5IDEzLjk0MSA1LjI2MjY0IDEzLjk0MTcgNS4yNjQ3OEwxMy45NDA1IDUuMjYxNzVaTTEzLjk0MDUgMTUuNzM4M0wxMy45NDE3IDE1LjczNTJDMTMuOTQxIDE1LjczNzMgMTMuOTQwNiAxNS43MzgzIDEzLjk0MDUgMTUuNzM4M1pNMTMuNzM4MiAxNS45NDA1QzEzLjczODMgMTUuOTQwNiAxMy43Mzc0IDE1Ljk0MDkgMTMuNzM1MyAxNS45NDE3TDEzLjczODIgMTUuOTQwNVpNNC44NjE3NSAxNS45NDA1TDQuODY0NzggMTUuOTQxN0M0Ljg2MjY1IDE1Ljk0MSA0Ljg2MTY5IDE1Ljk0MDYgNC44NjE3NSAxNS45NDA1Wk00LjY1OTQ1IDE1LjczODNDNC42NTk0MyAxNS43MzgzIDQuNjU5MDQgMTUuNzM3NCA0LjY1ODMzIDE1LjczNTJMNC42NTk0NSAxNS43MzgzWk00LjY1OTQ1IDUuMjYxNzVMNC42NTgzMyA1LjI2NDc4QzQuNjU5MDQgNS4yNjI2NCA0LjY1OTQzIDUuMjYxNjkgNC42NTk0NSA1LjI2MTc1Wk00Ljg2MjE0IDUuMDU5MjdDNC44NjIxMiA1LjA1OTI2IDQuODYxODUgNS4wNTkzOCA0Ljg2MjE0IDUuMDU5MjdMNC44NjQ3OCA1LjA1ODMzQzQuODYzNDcgNS4wNTg3NyA0Ljg2MjYgNS4wNTkwOCA0Ljg2MjE0IDUuMDU5MjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIxLjAwIi8+PC9zdmc+",this.adchoiceIconSrc="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMTIuNUMxMC4wMzc2IDEyLjUgMTIuNSAxMC4wMzc2IDEyLjUgN0MxMi41IDMuOTYyNDMgMTAuMDM3NiAxLjUgNyAxLjVDMy45NjI0MyAxLjUgMS41IDMuOTYyNDMgMS41IDdDMS41IDEwLjAzNzYgMy45NjI0MyAxMi41IDcgMTIuNVpNMTQgN0MxNCAxMC44NjYgMTAuODY2IDE0IDcgMTRDMy4xMzQwMSAxNCAwIDEwLjg2NiAwIDdDMCAzLjEzNDAxIDMuMTM0MDEgMCA3IDBDMTAuODY2IDAgMTQgMy4xMzQwMSAxNCA3WiIgZmlsbD0id2hpdGUiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcgMTFDNi41ODU3OSAxMSA2LjI1IDEwLjY2NDIgNi4yNSAxMC4yNVY2Ljc1QzYuMjUgNi4zMzU3OSA2LjU4NTc5IDYgNyA2QzcuNDE0MjEgNiA3Ljc1IDYuMzM1NzkgNy43NSA2Ljc1VjEwLjI1QzcuNzUgMTAuNjY0MiA3LjQxNDIxIDExIDcgMTFaIiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik02LjEwMDAyIDMuOUM2LjEwMDAyIDMuNDAyOTUgNi41MDI5NyAzIDcuMDAwMDIgM0M3LjQ5NzA4IDMgNy45MDAwMiAzLjQwMjk1IDcuOTAwMDIgMy45QzcuOTAwMDIgNC4zOTcwNiA3LjQ5NzA4IDQuOCA3LjAwMDAyIDQuOEM2LjUwMjk3IDQuOCA2LjEwMDAyIDQuMzk3MDYgNi4xMDAwMiAzLjlaIiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPgo=",this.adActionsEl=document.createElement("div"),this.adActionsEl.className="rb-adman-ad-actions",this.disclaimerWrapperEl=document.createElement("div"),this.disclaimerWrapperEl.className="disclaimer-wrapper",this.disclaimerEl=document.createElement("span"),this.disclaimerEl.className="disclaimer-text",this.remainTimeEl=document.createElement("span"),this.remainTimeEl.className="remain-time",this.adChoiceEl=document.createElement("span"),this.adChoiceEl.className="ad-choice",this.actionsWrapperEl=document.createElement("div"),this.actionsWrapperEl.className="actions-wrapper",this.actionsHeaderEl=document.createElement("div"),this.actionsHeaderEl.className="actions-header",this.actionsHeaderText=document.createElement("span"),this.actionsHeaderText.className="actions-header-text",this.actionsHeaderButton=document.createElement("span"),this.actionsHeaderButton.className="actions-header-close",this.actionsAboutEl=document.createElement("div"),this.actionsAboutEl.className="actions-about",this.actionsAboutPictureEl=document.createElement("span"),this.actionsAboutPictureEl.className="actions-about-picture",this.actionsAboutTextEl=document.createElement("span"),this.actionsAboutTextEl.className="actions-about-text",this.actionsCopyEl=document.createElement("div"),this.actionsCopyEl.className="actions-copy",this.actionsCopyPictureEl=document.createElement("div"),this.actionsCopyPictureEl.className="actions-copy-picture",this.actionsCopyTextEl=document.createElement("div"),this.actionsCopyTextEl.className="actions-copy-text",this.infoWrapperEl=document.createElement("div"),this.infoWrapperEl.className="info-wrapper",this.infoOrdIdEl=document.createElement("div"),this.infoOrdIdEl.className="info-ord-id",this.infoOrdIdDescriptionEl=document.createElement("span"),this.infoOrdIdDescriptionEl.className="info-ord-id-description",this.infoOrdIdValueEl=document.createElement("span"),this.infoOrdIdValueEl.className="info-ord-id-value"}function r(){m.start();var l=e.getSettings(),u=e.getAd();if(typeof u=="object"&&typeof u.adActionsConfig=="object"&&u.adActionsConfig.members===null||typeof l=="object"&&typeof l.adActionsConfig=="object"&&l.adActionsConfig.members===null)return void s();var v={originalBannerId:u.bannerID,cipherBannerID:u.cipherBannerID?u.cipherBannerID:null,bannerOrdId:u.ordID||null,advData:u.advData||null},g=AdmanHTML.Utils.adActionsConfigPrepare(u?u.adActionsConfig:null,l?l.adActionsConfig:null);f.build(g,v),f.init(),f.addListeners(),f.appendTo(t.wrapper),a=function(){f.destroy()}}function o(l,u){var v=Math.floor(u-l);v||(v="00"),f.updateRemainTime(v)}function s(){a&&a(),c&&typeof c=="object"&&typeof c.remove=="function"&&c.remove(),m.dispose()}if(!t.disclaimer)return{render:Function.prototype,onTimeRemained:Function.prototype,dispose:Function.prototype};var a,c,m=new AdmanHTML.AdRenderer(t,e);[{name:"Roboto",description:"cyrillic-ext",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2",format:"woff2",unicodeRange:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F"},{name:"Roboto",description:"cyrillic",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2",format:"woff2",unicodeRange:"U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116"},{name:"Roboto",description:"latin-ext",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2",format:"woff2",unicodeRange:"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF"},{name:"Roboto",description:"latin",url:"https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2",format:"woff2",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"}].forEach(function(l){i(l.name,l.url,l.format,l.unicodeRange)}),n.prototype.preBuild=function(){this.actionsHeaderEl.appendChild(this.actionsHeaderText),this.actionsHeaderEl.appendChild(this.actionsHeaderButton),this.actionsAboutEl.appendChild(this.actionsAboutPictureEl),this.actionsAboutEl.appendChild(this.actionsAboutTextEl),this.actionsCopyEl.appendChild(this.actionsCopyPictureEl),this.actionsCopyEl.appendChild(this.actionsCopyTextEl),this.infoOrdIdEl.appendChild(this.infoOrdIdDescriptionEl),this.infoOrdIdEl.appendChild(this.infoOrdIdValueEl),this.infoWrapperEl.appendChild(this.infoOrdIdEl),this.actionsWrapperEl.appendChild(this.actionsHeaderEl),this.actionsWrapperEl.appendChild(this.actionsAboutEl),this.actionsWrapperEl.appendChild(this.actionsCopyEl),this.actionsWrapperEl.appendChild(this.infoWrapperEl),this.adActionsEl.appendChild(this.disclaimerWrapperEl),this.adActionsEl.appendChild(this.actionsWrapperEl)},n.prototype.build=function(l,u){this.config=l,this.data=u,this.config.members.forEach(function(v){switch(v){case"disclaimer":this.disclaimerWrapperEl.appendChild(this.disclaimerEl);break;case"timer":this.disclaimerWrapperEl.appendChild(this.remainTimeEl);break;case"adchoice":this.disclaimerWrapperEl.appendChild(this.adChoiceEl)}}.bind(this))},n.prototype.init=function(){this._fillData(),this._setInitialStyles(),this._setSpecificStyles()},n.prototype._setSpecificStyles=function(){var l={};this.config.positionX==="left"&&(l.left=this.config.offsetX),this.config.positionX==="right"&&(l.right=this.config.offsetX),this.config.positionY==="top"&&(l.top=this.config.offsetY),this.config.positionY==="bottom"&&(l.bottom=this.config.offsetY),this._setStyles(this.adActionsEl,l),this.data.bannerOrdId||(this._setStyles(this.infoWrapperEl,{display:"none"}),this._setStyles(this.actionsCopyEl,{display:"none"}))},n.prototype._fillData=function(){this.disclaimerEl.innerText=this.config.disclaimerText,this.actionsHeaderText.innerText=this.config.headerText,this.actionsAboutTextEl.innerText=this.config.aboutText,this.actionsCopyTextEl.innerText=this.data.bannerOrdId?"Скопировать ERID":this.config.copyText,this.infoOrdIdDescriptionEl.innerText=this.infoOrdIdDescription,this.infoOrdIdValueEl.innerText=this.data.bannerOrdId||this.data.originalBannerId||this.data.cipherBannerID},n.prototype._setInitialStyles=function(){this._setStyles(this.disclaimerWrapperEl,{display:"flex","flex-direction":"row","align-items":"center",gap:"8px"}),this._setStyles(this.adChoiceEl,{"background-image":'url("'+this.adchoiceIconSrc+'")',"background-repeat":"no-repeat",width:"14px",height:"14px","background-position":"center"}),this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconSrc+'")',"background-repeat":"no-repeat",width:"10px","background-position":"center"}),this._setStyles(this.actionsAboutPictureEl,{"background-image":'url("'+this.aboutIconSrc+'")',"background-repeat":"no-repeat",width:"17px",height:"17px","background-position":"center"}),this._setStyles(this.actionsCopyPictureEl,{"background-image":'url("'+this.copyIconSrc+'")',"background-repeat":"no-repeat",width:"17px",height:"17px","background-position":"center"}),this._setStyles(this.actionsCopyTextEl,{"margin-left":"8px"}),this._setStyles(this.actionsAboutTextEl,{"margin-left":"8px"}),this._setStyles(this.actionsHeaderEl,{width:"100%",display:"flex"}),this._setStyles(this.infoWrapperEl,{width:"100%",display:"flex",cursor:"initial"}),this._setStyles(this.infoOrdIdValueEl,{"margin-left":"9px",color:"rgba(255, 255, 255, 0.8)"}),this._setStyles(this.infoOrdIdDescriptionEl,{width:"17px","text-align":"center"}),this._setStyles(this.actionsAboutEl,{width:"100%",display:"flex",color:"rgba(255, 255, 255, 0.72)","border-radius":"8px","margin-top":"8px"}),this._setStyles(this.actionsCopyEl,{width:"100%",display:"flex",color:"rgba(255, 255, 255, 0.72)","border-radius":"8px","margin-top":"8px"}),this._setStyles(this.infoOrdIdEl,{width:"100%",display:"flex",color:"rgba(255, 255, 255, 0.72)","border-radius":"8px"}),this._setStyles(this.actionsHeaderEl,{width:"100%",display:"flex","flex-direction":"row","justify-content":"space-between"}),this._setStyles(this.actionsWrapperEl,{"flex-direction":"column","align-items":"flex-start",display:"none",width:this.actionsWrapperWidth+"px"}),this._setStyles(this.adActionsEl,{"border-radius":"5px",color:"white",cursor:"pointer",display:"flex","flex-direction":"row","align-items":"center",padding:"3px 6px",gap:"2px",position:"absolute","font-family":"Roboto","font-style":"normal","font-weight":"300","font-size":"12px","line-height":"15px"});var l=".rb-adman-ad-actions { background-color: rgba(17,17,17,0.4)!important} .rb-adman-ad-actions:hover{ background-color: rgba(17,17,17,0.8)!important} div.videoplayer_ads_skip {border-radius: 5px !important; background: rgba(17, 17, 17, 0.4) !important; color: white !important; cursor: pointer !important; padding: 5px 8px 5px 8px !important; font-weight: 300 !important; font-size: 12px !important; line-height: 15px !important; right: 6px !important; top: 6px !important;}";c=document.createElement("style"),c.styleSheet?c.styleSheet.cssText=l:c.appendChild(document.createTextNode(l)),this.adActionsEl.appendChild(c),this._setStyles(this.adChoiceEl,{width:"14px",height:"14px"})},n.prototype._setStyles=function(l,u){AdmanHTML.Utils.setStyle(l,u)},n.prototype.updateRemainTime=function(l){var u=Math.trunc(l/60),v=l-60*u;u=u.toString(),v=v.toString(),v.length===1&&(v="0"+v),this.remainTimeEl.innerText=u+":"+v},n.prototype.addListeners=function(){this.actionsAboutEl.addEventListener("mouseover",this._setHoverActionsAboutListener.bind(this,!0)),this.actionsAboutEl.addEventListener("mouseout",this._setHoverActionsAboutListener.bind(this,!1)),this.actionsAboutEl.addEventListener("click",this._redirToAboutAdvPageListener.bind(this)),this.actionsCopyEl.addEventListener("mouseover",this._setHoverActionsCopyListener.bind(this,!0)),this.actionsCopyEl.addEventListener("mouseout",this._setHoverActionsCopyListener.bind(this,!1)),this.actionsCopyEl.addEventListener("click",this._copyBannerOrdIdToClipboardListener.bind(this)),this.actionsHeaderButton.addEventListener("mouseover",this._setHoverActionsHeaderButton.bind(this,!0)),this.actionsHeaderButton.addEventListener("mouseout",this._setHoverActionsHeaderButton.bind(this,!1)),this.adActionsEl.addEventListener("click",this._clickListener.bind(this)),this.actionsHeaderButton.addEventListener("click",this._actionsHeaderButtonListener.bind(this))},n.prototype._redirToAboutAdvPageListener=function(l){l.stopPropagation();var u=this.data.advData?"data":"id",v=this.data.advData?this.data.advData:this.data.cipherBannerID;window.open(this._advPageUrlPart+u+"="+v,"_blank")},n.prototype._copyToClipboard=function(l){var u=document.createElement("textarea");document.body.appendChild(u),u.value=l,u.select(),document.execCommand("copy"),document.body.removeChild(u)},n.prototype._copyBannerOrdIdToClipboardListener=function(l){l.stopPropagation(),this._copyToClipboard(this.data.bannerOrdId)},n.prototype._setAdActionsHoverListener=function(l){l?AdmanHTML.Utils.setStyle(this.adActionsEl,{background:"rgba(17,17,17,.72)"}):AdmanHTML.Utils.setStyle(this.adActionsEl,{background:"rgba(17,17,17,.8)"})},n.prototype._actionsHeaderButtonListener=function(l){l.stopPropagation(),this._setStyles(this.actionsWrapperEl,{display:"none"}),this._setStyles(this.disclaimerWrapperEl,{display:"flex"}),this.isSmall&&this._setStyles(this.adActionsEl,{left:this.config.positionX==="left"?this.config.offsetX:"unset",right:this.config.positionX==="right"?this.config.offsetX:"unset",bottom:this.config.positionY==="bottom"?this.config.offsetY:"unset",top:this.config.positionY==="top"?this.config.offsetY:"unset","font-size":"12px",padding:"5px 6px 5px 8px"}),this.isOpened=!1},n.prototype._clickListener=function(l){l.stopPropagation(),!this.isOpened&&(this.data.advData||this.data.cipherBannerID||this.data.bannerOrdId)&&(this._setStyles(this.actionsWrapperEl,{display:"flex"}),this._setStyles(this.disclaimerWrapperEl,{display:"none"}),this.isSmall&&(this._setStyles(this.adActionsEl,{left:"2px",right:"2px"}),this.config.positionY==="top"?this._setStyles(this.adActionsEl,{top:this.config.offsetY}):this._setStyles(this.adActionsEl,{bottom:this.config.offsetY}),this._setStyles(this.adActionsEl,{"font-size":"12px",padding:"4px 6px 4px 9px"})),this.isOpened=!0)},n.prototype._setHoverActionsCopyListener=function(l){l?(this._setStyles(this.actionsCopyPictureEl,{"background-image":'url("'+this.copyIconActiveSrc+'")'}),this._setStyles(this.actionsCopyEl,{color:"rgba(255, 255, 255, 0.8)"})):(this._setStyles(this.actionsCopyPictureEl,{"background-image":'url("'+this.copyIconSrc+'")'}),this._setStyles(this.actionsCopyEl,{color:"rgba(255, 255, 255, 0.72)"}))},n.prototype._setHoverActionsAboutListener=function(l){l?(this._setStyles(this.actionsAboutPictureEl,{"background-image":'url("'+this.aboutIconActiveSrc+'")'}),this._setStyles(this.actionsAboutEl,{color:"rgba(255, 255, 255, 0.8)"})):(this._setStyles(this.actionsAboutPictureEl,{"background-image":'url("'+this.aboutIconSrc+'")'}),this._setStyles(this.actionsAboutEl,{color:"rgba(255, 255, 255, 0.72)"}))},n.prototype._setHoverActionsHeaderButton=function(l){l?this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconActiveSrc+'")'}):this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconSrc+'")'})},n.prototype.appendTo=function(l){if(l){try{var u=window.getComputedStyle(l).width,v=this.actionsWrapperWidth+parseInt(this.adActionsEl.style.paddingLeft)+parseInt(this.adActionsEl.style.paddingRight);(u?parseInt(u):v+1)<=v&&(this.isSmall=!0,this._setStyles(this.adActionsEl,{"border-radius":"6px","font-size":"12px",padding:"5px 6px 5px 8px"}))}catch(g){console.warn("Failed detect small wrapper size",g)}this.appendedTo=l,l.appendChild(this.adActionsEl)}},n.prototype.getEl=function(){return this.adActionsEl},n.prototype.destroy=function(){this.removeListeners(),this.removeFromDOM()},n.prototype.removeFromDOM=function(){this.adActionsEl.remove()},n.prototype.removeListeners=function(){this.actionsAboutEl.removeEventListener("mouseover",this._setHoverActionsAboutListener.bind(this,!0)),this.actionsAboutEl.removeEventListener("mouseout",this._setHoverActionsAboutListener.bind(this,!1)),this.actionsCopyEl.removeEventListener("mouseover",this._setHoverActionsCopyListener.bind(this,!0)),this.actionsCopyEl.removeEventListener("mouseout",this._setHoverActionsCopyListener.bind(this,!1)),this.actionsHeaderButton.removeEventListener("mouseover",this._setHoverActionsHeaderButton.bind(this,!0)),this.actionsHeaderButton.removeEventListener("mouseout",this._setHoverActionsHeaderButton.bind(this,!1)),this.adActionsEl.removeEventListener("mouseover",this._setAdActionsHoverListener.bind(this,!0)),this.adActionsEl.removeEventListener("mouseout",this._setAdActionsHoverListener.bind(this,!1)),this.adActionsEl.removeEventListener("click",this._clickListener.bind(this)),this.actionsHeaderButton.removeEventListener("click",this._actionsHeaderButtonListener.bind(this))};var f=new n;return f.preBuild(),{render:r,onTimeRemained:o,dispose:s}},AdmanHTML.EmptyAdRenderer=function(t,e){"use strict";function i(){e.log("sectionEmpty"),setTimeout(function(){t.cb("onCompleted")})}return{start:i}},AdmanHTML.HtmlAdRenderer=function(t,e){"use strict";function i(){A.start(),M=e.getAd(),T=M.duration,D=$(),D.width="100%",D.height="100%",D.setAttribute("style","display:block;width:100%;height:100%"),A.setView(D,{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),AdmanHTML.Utils.isElement(t.videoEl)&&t.videoEl.parentNode===A.mainEl.parentNode&&A.mainEl.parentNode.insertBefore(A.mainEl,t.videoEl.nextSibling),D.contentWindow||D.contentDocument?r():D.onload=function(Y){r()},L&&L.render(),S&&S.render()}function n(Y){Y.preventDefault(),Y.stopPropagation(),e.log("click"),t.cb("onClicked"),t.openPopup(M.urlToNavigateOnClick||M.trackingLink)}function r(){function Y(){var be=D.contentWindow.document.body||D.contentDocument.body;be&&be.addEventListener("click",n,!0)}E=D.contentWindow?D.contentWindow.document:D.contentDocument,E.open(),O?(E.write('<!DOCTYPE html><html style="width: 100%; height: 100%"><head></head><body>'),E.write(M.src),E.write("</body></html>"),z=document.querySelector("div.videoplayer_controls"),z&&(Q=z.style.display,z.style.display="none"),(ce=document.querySelector("div.videoplayer_ads_skip"))&&(X=ce.style.display,ce.style.display="none")):(E.write(M.src),e.log("render")),E.close(),k=AdmanHTML.Utils.getElementViewport(t.wrapper),k.addEventListener("message",l),M.openLinkInPopup&&(M.urlToNavigateOnClick||M.trackingLink)&&(D.contentWindow.document.body||D.contentDocument.body?Y():D.onload=Y),t.viewability.start(A.mainEl,e),c(),A.onStart()}function o(){_||(_=!0,R+=Date.now()-U,clearInterval(b),b=null,z?z.style.display=Q:O&&u("pauseAd",[]),t.cb("onPaused"))}function s(){return M.creativeType==="video-motion"}function a(){_&&(_=!1,c(),t.cb("onPlayed"))}function c(){if(!b){if(O){if(!P)return;z?z.style.display="none":u("startAd",[])}b=setInterval(f,251),U=Date.now(),_=!1}}function m(){ie||t.cb("onCompleted")}function f(){R+=Date.now()-U,U=Date.now(),A.onTimeRemained(R/1e3,T),O?u("timeUpdateAd",[R/1e3,T]):L.onTimeRemained(R/1e3,T),R>=1e3*T&&(clearInterval(b),b=null,m())}function l(Y){if(Y.source===D.contentWindow){if(O&&typeof Y.data=="object")return void v(Y.data);try{switch(JSON.parse(Y.data).type){case"trg:click":e.log("click"),t.cb("onClicked")}}catch(be){}}}function u(Y,be){if(typeof D=="object"&&typeof D.contentWindow=="object")try{var q=D.contentWindow.origin;D.contentWindow.postMessage({initiator:"render-runner",id:x,method:Y,args:be},q)}catch(He){}}function v(Y){if(O&&typeof Y=="object"&&Y.initiator==="render-runner"&&Array.isArray(Y.args)&&Y.args[0]===x)switch(Y.event){case"AdStarted":P=!0,c();break;case"AdCanPlay":e.log("render");break;case"HeaderClick":e.log("click"),t.cb("onClicked",{type:"header"});break;case"ItemClick":e.log("card_"+Y.args[1]+"_click"),t.cb("onClicked",{type:"card",cardId:Y.args[1]});break;case"ItemShow":e.log("card_"+Y.args[1]+"_show");break;case"AdClickThru":e.log("click"),t.cb("onClicked",{type:"common"});break;case"AdError":t.cb("onError",Y.args[1]);break;case"ClosedByUser":e.log("closedByUser"),t.cb("onClosed"),t.cb("onSkipped"),ie=null,y();break;case"UserAction":ie=Date.now()}}function g(){z&&(z.style.display=Q),ce&&(ce.style.display=X)}function h(){b&&clearInterval(b),b=null,g(),k.removeEventListener("message",l)}function y(){h(),A.dispose(),L&&L.dispose(),S&&S.dispose()}function $(){var Y=document.createElement("iframe");return Y.scrolling="no",Y.marginWidth="0",Y.marginHeight="0",Y.frameBorder="0",Y.id="ad-frame-"+Math.round(1e5*Math.random()),Y.onclose=g,Y}var D,T,b,x,A=new AdmanHTML.AdRenderer(t,e),S=new AdmanHTML.CallToActionBtnRenderer(t,e),L=null,k=null,E=null,M=e.getAd(),_=!1,R=0,U=0,O=s(),P=!1,z=null,Q="flex",ce=null,X="block",ie=null;return O?x="b"+M.bannerID:L=new AdmanHTML.DisclaimerRenderer(t,e),A.onClick=function(){},{start:i,pause:o,resume:a,skip:A.skip,dispose:y}},AdmanHTML.ImgAdRenderer=function(t,e){"use strict";function i(){r.start(),r.registerTimer(),AdmanHTML.Utils.addCss(c,a);var f=e.getAd();r.setView(AdmanHTML.Utils.renderTemplate(m,f),{position:"absolute",display:"inline-block",width:"100%","max-width":f.width+"px",left:"50%",bottom:0,transform:"translate(-50%,0)","box-sizing":"border-box",overflow:"hidden","z-index":"999999","text-align":"center"});var l=e.getSettings(),u=r.mainEl.querySelector(".rb-adman_age_wrapper");if(l&&l.advertisment&&l.advertisment.image){var v=l.advertisment.image;AdmanHTML.StyleUtils.applyStyle(r.mainEl,v,"fontFace contentIndent hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_image_wrapper"),v,"borderSize borderColor borderAlpha borderCornerRounding".split(" "));var g=l.advertisment.image.ageRestrictions;f.ageRestrictions&&g&&(AdmanHTML.StyleUtils.applyStyle(u,g),AdmanHTML.StyleUtils.applyStyle(u.querySelector(".rb-adman_age_content"),g,["textUnderline"]))}f.ageRestrictions||u.parentNode.removeChild(u),o.setWrapper(r.mainEl),o.start(),r.onStart(),s.render(),e.log("render")}function n(){r.dispose(),o.dispose(),s.dispose()}var r=new AdmanHTML.AdRenderer(t,e),o=new AdmanHTML.CloseBtnRenderer(t,e),s=new AdmanHTML.DisclaimerRenderer(t,e),a="rb-adman-img-style",c=".rb-adman_image_overlay {display:inline-block; overflow:hidden;vertical-align:middle;cursor:pointer;color:#fff}.rb-adman_image_overlay .rb-adman_image_wrapper {display:block;border:0px solid transparent;overflow:hidden;}.rb-adman_image_overlay .rb-adman_image_wrapper img {vertical-align:top;}.rb-adman_image_overlay .rb-adman_age_wrapper {display:block;position:absolute;top:0px;left:3px;border:0px solid transparent;margin-right:1px;text-decoration:none!important}",m='<div class="rb-adman_image_overlay"><div class="rb-adman_image_wrapper"><img src="{{src}}" width="100%" height="auto"></div><span class="rb-adman_age_wrapper"><span class="rb-adman_age_content">{{ageRestrictions}}</span></span></div>';return{start:i,pause:r.pause,resume:r.resume,skip:r.skip,dispose:n}},AdmanHTML.OpenLinkPopupRender=function(t){"use strict";function e(){for(var c=window;c.parent&&c.parent.frameElement;)c=c.parent;return c}function i(c){t.isPopupOpen=!0,t.pause(),s=n(c)}function n(c){s=a.createElement("div"),r(),s.classList.add("rb-adman-popup");var m=a.createElement("div");m.classList.add("rb-adman-popup-body"),s.appendChild(m);var f=a.createElement("div");f.classList.add("rb-adman-popup-closeButton");var l=s;o=function(){l.remove(),l=null,t.resume(!0),t.isPopupOpen=!1},f.onclick=o,m.appendChild(f);var u=a.createElement("iframe");u.classList.add("rb-adman-popup-frame"),u.setAttribute("src",c),m.appendChild(u),a.body.append(s)}function r(){var c=a.createElement("style");c.innerHTML=".rb-adman-popup{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;flex-direction:row;align-items:center;justify-content:center;overflow:auto;padding: 7vh 0;box-sizing:border-box;background:rgba(0,0,0,.4);z-index: 1000000;}.rb-adman-popup-body{position:relative;max-width:630px;min-width:500px;width:50%;height:100%;z-index:20;border-radius:12px;background-color:#FFF;-webkit-box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);-moz-box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);color: #FEFEFE}.rb-adman-popup-frame{width:100%;height:100%;overflow:hidden;border-radius: 12px;border:none;}.rb-adman-popup-closeButton{background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZSIgdmlld0JveD0iMCAwIDE3IDE3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im05LjIgOC41IDYuNjUgNi42NS0uNy43TDguNSA5LjIxbC02LjY1IDYuNjQtLjctLjdMNy43OSA4LjUgMS4xNSAxLjg1bC43LS43TDguNSA3Ljc5bDYuNjUtNi42NC43LjdMOS4yMSA4LjV6IiBzdHJva2U9Im5vbmUiLz48L3N2Zz4K);background-repeat:no-repeat;background-position:center;background-size:50%;position:absolute;top:0;right:-38px;width:28px;height:28px;border-radius:14px;padding: 4px;background-color:rgba(0,0,0,.35);background-color:#000;cursor:pointer;filter:opacity(35%);color:white;box-sizing:border-box;transition: transform .15s ease-in;}.rb-adman-popup-closeButton:hover{filter:opacity(55%);transform:scale(1.1) rotate(90deg);}",s.appendChild(c)}var o,s=null,a=e().document;return{open:i,close:o}},AdmanHTML.ResearchAdRenderer=function(t,e){"use strict";function i(x,A){var S=[];return x.forEach(function(L){L.name===A&&S.push(L)}),S}function n(x,A,S){return A<=x&&(!S||S>=x)}function r(){!h&&g&&(h=!0,e.log("playbackPaused"))}function o(){h&&g&&(h=!1,e.log("playbackResumed"))}function s(){g=!1,h=!1,v.stop()}function a(x){var A=!x;A!==y&&(y=A,e.log(A?"volumeOff":"volumeOn"))}function c(){g&&(D&&f(D,D),l&&T.forEach(function(x){x.completed||(x.completed=!0,!x.viewable&&AdmanHTML.Utils.loadImg(x.url))}),s())}function m(x){e.log(x?"fullscreenOn":"fullscreenOff")}function f(x,A){if(!isNaN(x)){g||(g=!0,v.start(t.playerEl,e,!0),e.log("playbackStarted")),x=Math.round(x);var S=$!==null?x-$:null;if($=x,e.log("thresholdValue",x),!isNaN(A)&&isFinite(A)&&A>0&&(A=Math.round(A),D=A,e.log("thresholdPValue",Math.floor(x/A*100))),S<0&&e.log("rewind"),b.forEach(function(E){if(n(x,E.start,E.end)){var M=Math.floor((x-E.start)/E.rate);M>0&&E.last!==M&&(E.last=M,AdmanHTML.Utils.loadImg(E.url.replace("[CONTENTPLAYHEAD]",x)))}else E.last=null}),l!==!1&&S!==0){var L,k=S<0||S>1;T.forEach(function(E){if(n(x,E.start,E.end)&&!E.completed){L=L||v.getViewabilityState(),l=L.state==="DETERMINED";var M=L.percent>E.percent&&L.focus;E.duration=E.duration||0,E.lastViewable&&M&&!k?E.duration+=S:E.duration=0,E.lastViewable=M,E.duration>=E.value&&(E.completed=!0,E.viewable&&AdmanHTML.Utils.loadImg(E.url))}else E.duration=0,E.lastViewable=!1})}}}var l,u=e.getExtendedAdForApp().statistics,v=new AdmanHTML.Viewability,g=!1,h=!1,y=!1,$=null,D=null,T=i(u,"mrcValue"),b=i(u,"timerValue");return{pause:r,resume:o,setVolume:a,setPosition:f,setComplete:c,setFullscreen:m}},AdmanHTML.StatisticsAdRenderer=function(t,e){"use strict";function i(){e.log("playbackStarted"),AdmanHTML.Utils.setTimeout(function(){t.cb("onCompleted")})}return{start:i}},AdmanHTML.SwfAdRenderer=function(t,e){"use strict";function i(){r.start(),AdmanHTML.Utils.checkFlashAsync(function(o){o===AdmanHTML.Utils.FLASH_READY?(r.registerTimer(),r.setView(n(e.getAd().src,{width:"100%",height:"100%"},{}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"}),e.log("render"),r.onStart()):t.cb("onError")})}function n(o,s,a){var c,m,f=s||{},l=a||{};f.type="application/x-shockwave-flash",window.ActiveXObject?(f.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",l.movie=o):f.data=o,m="<object";for(c in f)f.hasOwnProperty(c)&&(m+=" "+c+'="'+f[c]+'"');m+=">";for(c in l)l.hasOwnProperty(c)&&(m+='<param name="'+c+'" value="'+l[c]+'" />');return m+="</object>"}var r=new AdmanHTML.AdRenderer(t,e);return{start:i,skip:r.skip,dispose:r.dispose,createSwfObject:n,super:r}},AdmanHTML.TextAdRenderer=function(t,e){"use strict";function i(){r.start(),r.registerTimer(),AdmanHTML.Utils.addCss(c,a);var f=AdmanHTML.Utils.mixin({header:"",body:"",hyperlinkText:""},e.getAd());r.setView(AdmanHTML.Utils.renderTemplate(m,f),{position:"absolute",margin:"0 auto",left:0,right:0,bottom:0,"box-sizing":"border-box",overflow:"hidden"});var l=e.getSettings();if(l&&l.advertisment&&l.advertisment.text){var u=l.advertisment.text;AdmanHTML.StyleUtils.applyStyle(r.mainEl,u,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_header"),u,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_header_text"),u,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_body"),u,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(r.mainEl.querySelector(".rb-adman_link"),u,"hyperlinkColor hyperlinkSize hyperlinkUnderline hyperlinkIndent".split(" "));var v=l.advertisment.text.ageRestrictions,g=r.mainEl.querySelector(".rb-adman_age_wrapper");f.ageRestrictions?v&&(AdmanHTML.StyleUtils.applyStyle(g,v),AdmanHTML.StyleUtils.applyStyle(g.querySelector(".rb-adman_age_content"),v,["textUnderline"])):g.parentNode.removeChild(g);var h=r.mainEl.querySelector(".rb-adman_image_wrapper span");if(u.noImage)h.parentNode.removeChild(h);else if(u.contentPadding&&(h.style.marginRight=AdmanHTML.StyleUtils.getLength(u.contentPadding)),u.maxImageHeight||u.maxImageWidth){var y=f.width/f.height;h.style.width=AdmanHTML.StyleUtils.getLength(Math.round(u.maxImageWidth||u.maxImageHeight*y)),h.style.height=AdmanHTML.StyleUtils.getLength(Math.round(u.maxImageHeight||u.maxImageWidth/y))}}o.setWrapper(r.mainEl),o.start(),s.render(),e.log("render"),r.onStart()}function n(){r.dispose(),o.dispose(),s.dispose()}var r=new AdmanHTML.AdRenderer(t,e),o=new AdmanHTML.CloseBtnRenderer(t,e),s=new AdmanHTML.DisclaimerRenderer(t,e),a="rb-adman-text-style",c=".rb-adman_text_overlay {display:block; overflow:hidden;height:100%;cursor:pointer;color:#fff}.rb-adman_text_overlay .rb-adman_image_wrapper {display:block;float:left;position:relative;height:100%;vertical-align:middle}.rb-adman_text_overlay .rb-adman_image_wrapper span {display:inline-block;vertical-align:middle;background-size:contain;background-position:center}.rb-adman_text_overlay .rb-adman_text_wrapper {display:block;overflow:hidden;height:100%;vertical-align:top;line-height:1.2}.rb-adman_text_overlay .rb-adman_header {display:block;white-space:nowrap;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.rb-adman_text_overlay .rb-adman_age_wrapper {display:inline-block; vertical-align:middle;border:0px solid transparent;margin-right:1px;text-decoration:none!important}.rb-adman_text_overlay .rb-adman_header_text {color:inherit;text-decoration:none;letter-spacing:normal;line-height:1.5;vertical-align:middle}.rb-adman_text_overlay .rb-adman_header_text:hover {color:inherit;text-decoration:underline}.rb-adman_text_overlay .rb-adman_body {padding:2px 0}.rb-adman_text_overlay .rb-adman_body, .rb-adman_link {display:block;text-decoration:none;padding-top:2px}",m='<div class="rb-adman_text_overlay"><div class="rb-adman_image_wrapper"><div style="display:table;height:100%;"><div style="display:table-cell;height:100%;vertical-align:middle"><span style="background-image: url({{src}});width:{{width}}px;height:{{height}}px"></span></div></div></div><div class="rb-adman_text_wrapper"><span class="rb-adman_header"><span class="rb-adman_age_wrapper"><span class="rb-adman_age_content">{{ageRestrictions}}</span></span><span class="rb-adman_header_text">{{header}}</span></span><span class="rb-adman_body">{{body}}</span><span class="rb-adman_link">{{hyperlinkText}}</span></div></div>';return{start:i,pause:r.pause,resume:r.resume,skip:r.skip,dispose:n}},AdmanHTML.VideoAdRenderer=function(t,e){"use strict";function i(){l.mainEl=t.videoEl,l.clickEl=t.clickEl||l.mainEl,g.forEach(function(b){l.mainEl.addEventListener(b,s)}),l.mainEl.parentNode?$={src:l.mainEl.src,time:l.mainEl.currentTime,muted:l.mainEl.muted}:l.setView(null,{position:"absolute",width:"100%",height:"100%",top:0}),l.mainEl.controls=t.browser.mobile,l.mainEl.src=e.getAd().src,l.mainEl.load(),e.log("render"),c(0),m=l.mainEl.play(),m&&m.then&&m.then(a,function(){l.mainEl.muted=!0,m=l.mainEl.play(),m.then(a,function(){})}),l.start(),u.render(),v.render()}function n(b){return b.indexOf("videolink.mycdn.me")!==-1}function r(){u.dispose(),v.dispose(),l.dispose(),g.forEach(function(b){l.mainEl.removeEventListener(b,s)}),$.src?(l.mainEl.src=$.src,l.mainEl.load(),l.mainEl.play(),c($.time)):(l.mainEl.src="",l.mainEl.removeAttribute&&l.mainEl.removeAttribute("src"))}function o(b){if(b.indexOf("mradx")!==-1)return"rb";if(b.indexOf("videolink.mycdn.me")!==-1)return"ev";var x=new URL(b);return"evcdn:"+("hostname"in x?x.hostname:"")}function s(b){switch(b.type){case"loadstart":f=Date.now();break;case"loadeddata":D||(D=!0,T=Date.now()-f,t.stats.logMessage("firstLoadedData",T,{banner_id:y.bannerID,duration:Math.round(l.mainEl.duration),geo:y.geo!=="undefined"?y.geo:void 0,one_video_src:n(l.mainEl.src),slot:"slotId"in y?y.slotId:"no_slot_id",video_source:o(l.mainEl.src),resolution:("width"in y?y.width:"no_ad_width")+"x"+("height"in y?y.height:"no_ad_height"),label:"experimentLabel"in y?y.experimentLabel:""}));break;case"loadedmetadata":t.stats.metrics("ready"),t.stats.metrics("creative_type","video"),u.onTimeRemained(l.mainEl.currentTime,l.mainEl.duration);break;case"playing":m||a();break;case"play":t.cb("onPlayed");break;case"pause":t.cb("onPaused");break;case"timeupdate":l.onTimeRemained(l.mainEl.currentTime,l.mainEl.duration),u.onTimeRemained(l.mainEl.currentTime,l.mainEl.duration);break;case"ended":t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",t.cb("onCompleted"),t.stats.metrics("completed");break;case"error":var x=b.target&&typeof b.target=="object"&&b.target.error&&typeof b.target.error=="object"&&b.target.error.code?b.target.error.code:"unknown_code",A="video_el_err_code:"+x;t.stats.logError(A),t.stats.metrics("media_error_code",x),t.cb("onError")}}function a(){if(!h){h=!0;var b=AdmanHTML.Utils.isElement(l.mainEl)?l.mainEl:l.wrapperEl;t.viewability.start(b,e),l.onStart({muted:l.mainEl.muted})}}function c(b){if(l.mainEl)try{l.mainEl.currentTime=b}catch(x){}}var m,f,l=new AdmanHTML.AdRenderer(t,e),u=new AdmanHTML.DisclaimerRenderer(t,e),v=new AdmanHTML.CallToActionBtnRenderer(t,e),g=["loadstart","loadeddata","loadedmetadata","error","pause","play","playing","timeupdate","ended"],h=!1,y=e.getAd(),$={},D=!1,T=null;return{start:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="play",i(),t.stats.metrics("playing")},skip:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",t.stats.metrics("skipped"),l.skip.apply(t,arguments)},dispose:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",r()},pause:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",l.mainEl.pause()},resume:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="play",l.mainEl.play()},setVolume:function(b){var x=l.mainEl.muted?0:l.mainEl.volume;b>0&&l.mainEl.muted&&(l.mainEl.muted=!1),b===0&&(l.mainEl.muted=!0),l.mainEl.volume=b,(x===0&&b>0||x>0&&b===0)&&e.log(b?"volumeOn":"volumeOff")}}},AdmanHTML.VpaidJsAdRenderer=function(t,e){"use strict";function i(){var _;if(!c)return A.duration;try{_=c.callGet("adDuration"),_===void 0&&(_=A.duration)}catch(R){_=A.duration}return _}function n(){if(b.start(),x.render(),AdmanHTML.Utils.isElement(t.videoEl)){var _=AdmanHTML.Utils.getElementViewport;_(t.videoEl)===_(b.wrapperEl)&&(t.videoEl.parentNode?(f=t.videoEl.parentNode,l=t.videoEl.nextSibling):m=!0,b.wrapperEl.insertBefore(t.videoEl,b.wrapperEl.childNodes[0]),AdmanHTML.Utils.mixin(t.videoEl.style,{position:"absolute",width:"100%",height:"100%",top:0,display:"block"}))}var R=e.getSettings();R&&(R.loadTimeout&&(S=R.loadTimeout),R.startTimeout&&(L=R.startTimeout)),AdmanHTML.Utils.isNRVpaid(A.src)&&typeof A.timeoutsFactor=="number"&&A.timeoutsFactor>1&&(S*=A.timeoutsFactor,L*=A.timeoutsFactor),t.cb("onStarted",[e.sectionType,e.getAdForApp()||{}]),o(S,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadInterface"),c.urlToNavigateOnClick=e.getAd().urlToNavigateOnClick,b.setView(c.load(A.src,t.config.vpaidHtmlInterface),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),e.log("render")}function r(){m&&t.videoEl.parentNode?t.videoEl.parentNode.removeChild(t.videoEl):f&&f.insertBefore(t.videoEl,l&&l.parentNode?l:null),s(),c.destroy(),x.dispose(),b.dispose()}function o(_,R){s(),$=R,v=setTimeout(a,_)}function s(){clearTimeout(v)}function a(){y=!0,s(),e.log("error"),$&&t.stats.logError($,{bannerID:A.bannerID,isNRVpaid:AdmanHTML.Utils.isNRVpaid(A.src)}),t.cb("onError",{force:!0,message:$})}var c,m,f,l,u,v,g,h,y,$,D,T,b=new AdmanHTML.AdRenderer(t,e),x=new AdmanHTML.DisclaimerRenderer(t,e),A=e.getAd(),S=500,L=1e3;b.onResize=function(_,R){c&&c.call("resizeAd",[_,R,"normal"])},b.onClick=function(){};var k=function(_,R){if(!y){var U,O;switch(_){case"loaded":o(S,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":s();break;case"inited":c.call("handshakeVersion",["2.0"])?(o(L,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),c.call("initAd",[b.mainEl.offsetWidth,b.mainEl.offsetHeight,"normal",A.bitrate,{AdParameters:A.params}])):t.cb("onError");break;case"AdStarted":s(),h=c.callGet("adVolume"),g===void 0||c.autoMuted||c.callSet("adVolume",g),e.log("playbackStarted"),t.viewability.start(b.mainEl,e),t.cb("onVPAIDStarted"),t.stats.metrics("playing");break;case"AdLoaded":o(L,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:StartAd"),c.call("startAd"),t.stats.metrics("ready"),t.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":U=i(),O=c.callGet("adRemainingTime"),U>0&&O>=0?(b.onTimeRemained(U-O,U),x.onTimeRemained(U-O,U)):t.cb("onDurationChanged",[{remained:O,duration:U}]);break;case"AdVolumeChange":var P=c.callGet("adVolume");(h===0&&P>0||h>0&&P===0)&&e.log(P?"volumeOn":"volumeOff"),h=P;break;case"AdVideoComplete":t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",U=i(),b.onTimeRemained(U,U);break;case"AdStopped":case"AdSkipped":D||(D=!0,setTimeout(function(){u?u():t.cb("onCompleted")})),t.stats.metrics(_==="AdStopped"?"completed":"skipped");break;case"AdClickThru":R.url&&R.playerHandles&&window.open(R.url,"_blank"),e.log("click"),t.cb("onClicked");break;case"AdError":t.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(R&&R.message||"")),t.stats.metrics("vpaid_error_message",R&&R.message||"vpaid script err"),t.cb("onError");break;case"AdPaused":T||(T=!0,t.cb("onPaused"));break;case"AdPlaying":T&&(T=!1,t.cb("onPlayed"));break;case"AdUserClose":e.log("closedByUser");break;case"video:pause":T||c&&c.call("pauseAd");break;case"video:play":T&&c&&c.call("resumeAd")}}},E=t.wrapper.ownerDocument,M=E.defaultView||E.parentWindow;return c=new AdmanHTML.VpaidLoader(t.videoEl,M),c.onVpaidEvent(k),{start:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="play",n()},dispose:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",r()},pause:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",c&&c.call("pauseAd")},resume:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="play",c&&c.call("resumeAd")},setVolume:function(_){c&&c.callSet("adVolume",_),g=_},skip:function(_){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",u=_;try{c&&c.call("skipAd")}catch(R){}t.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(t,e){"use strict";function i(){var x;if(!c)return $.duration;try{x=c.callGet("adDuration")||$.duration}catch(A){x=$.duration}return x}function n(){y.start();var x=e.getSettings();x&&(x.loadTimeout&&(T=x.loadTimeout),x.startTimeout&&(b=x.startTimeout)),AdmanHTML.Utils.checkFlashAsync(function(A){if(A===AdmanHTML.Utils.FLASH_READY){t.cb("onStarted",[e.sectionType,e.getAdForApp()||{}]),o(T);var S="vpaidSwfUrl="+encodeURIComponent($.src)+"&proxyMethodName="+D;y.setView(g.createSwfObject(t.config.vpaidJsInterface,{width:"100%",height:"100%"},{flashvars:S,allowScriptAccess:"always",wmode:"opaque"}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"})}else t.cb("onError")}),h.render(),e.log("render")}function r(){s(),y.dispose(),h.dispose(),window[D]=null}function o(x){s(),f=setTimeout(a,x)}function s(){clearTimeout(f)}function a(){v=!0,s(),e.log("error"),t.cb("onError")}var c,m,f,l,u,v,g=new AdmanHTML.SwfAdRenderer(t,e),h=new AdmanHTML.DisclaimerRenderer(t,e),y=g.super,$=e.getAd(),D="vpaidProxyMethod"+Date.now(),T=500,b=1e3;return y.onResize=function(x,A){c&&c.call("resizeAd",[x,A,"normal"])},y.onClick=function(){},window[D]=function(x,A){if(!v){var S;switch(x){case"loaded":o(T);break;case"vpaidloaded":s();break;case"inited":c=y.mainEl.getElementsByTagName("object")[0],c.call("handshakeVersion",["2.0"])?(o(b),c.call("initAd",[y.mainEl.offsetWidth,y.mainEl.offsetHeight,"normal",$.bitrate,$.params,""])):t.cb("onError");break;case"AdStarted":s(),u=c.callGet("adVolume"),l!==void 0&&c.callSet("adVolume",l),e.log("playbackStarted"),t.viewability.start(y.mainEl,e),t.cb("onVPAIDStarted");break;case"AdLoaded":o(b),c.call("startAd");break;case"AdRemainingTimeChange":S=i(),y.onTimeRemained(S-c.callGet("adRemainingTime"),S),h.onTimeRemained(S-c.callGet("adRemainingTime"),S);break;case"AdVolumeChange":var L=c.callGet("adVolume");(u===0&&L>0||u>0&&L===0)&&e.log(L?"volumeOn":"volumeOff"),u=L;break;case"AdVideoComplete":S=i(),y.onTimeRemained(S,S);break;case"AdStopped":case"AdSkipped":setTimeout(function(){m?m():t.cb("onCompleted")});break;case"AdClickThru":e.log("click"),t.cb("onClicked");break;case"AdError":t.stats.logError("EXTERNAL_SWF_ADVERTISMENT_ERROR:"+(A&&A.message||"")),t.cb("onError");break;case"AdPaused":t.cb("onPaused");break;case"AdPlaying":t.cb("onPlayed");break;case"AdUserClose":e.log("closedByUser")}}},{start:n,dispose:r,pause:function(){c&&c.call("pauseAd")},resume:function(){c&&c.call("resumeAd")},setVolume:function(x){c&&c.callSet("adVolume",x),l=x},skip:function(x){m=x;try{c&&c.call("skipAd")}catch(A){}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var im={};oc(im,{AndroidTvPlayer:()=>yo,InterfaceLanguage:()=>Rn.InterfaceLanguage,VERSION:()=>Fn,VKNumericLanguage:()=>Rn.VKNumericLanguage,VideoFormat:()=>bo.VideoFormat,VideoQuality:()=>bo.VideoQuality,loadVKLangPack:()=>Rn.loadVKLangPack});module.exports=sc(im);var js="prod",Fn="1.0.4-dev.b507ef65.0";var fn=require("@vkontakte/videoplayer-shared/es2018");var Us,Fs,zs=(Fs=(Us=globalThis.process)==null?void 0:Us.env)==null?void 0:Fs.NODE_ENV,Z=zs&&!zs.toLowerCase().startsWith("prod");var ui=Array.isArray,Hs=Array.prototype.indexOf,Hn=Array.from,Do=Object.keys,yt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,Co=Object.getOwnPropertyDescriptors,$o=Object.prototype,Bs=Array.prototype,_n=Object.getPrototypeOf,ko=Object.isExtensible;var xt=()=>{};function yn(t){for(var e=0;e<t.length;e++)t[e]()}var Yt=Symbol("$state"),Bn=Symbol("legacy props"),Qs=Symbol(""),Mr=Symbol("proxy path");var Qn=3,ci=8;function Tr(t){return t===this.v}function bn(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ys(t,e){return t!==e}function xn(t){return!bn(t,this.v)}function Ws(){if(Z){let t=new Error(`derived_references_self
|
|
6
|
+
var e=require(`@oxc-project/runtime/helpers/defineProperty`),t=require(`@oxc-project/runtime/helpers/classPrivateMethodInitSpec`),n=require(`@oxc-project/runtime/helpers/classPrivateFieldInitSpec`),r=require(`@oxc-project/runtime/helpers/classPrivateFieldGet2`),i=require(`@oxc-project/runtime/helpers/assertClassBrand`),a=require(`@oxc-project/runtime/helpers/classPrivateFieldSet2`),o,s,c=Object.create,l=Object.getPrototypeOf,u=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertyDescriptor,p=Object.prototype.hasOwnProperty;function m(e){return this[e]}var h,g,_=(e,t,n)=>{var r=typeof e==`object`&&!!e;if(r){var i=t?h??=new WeakMap:g??=new WeakMap,a=i.get(e);if(a)return a}n=e==null?{}:c(l(e));let o=t||!e||!e.__esModule?u(n,`default`,{value:e,enumerable:!0}):n;for(let t of d(e))p.call(o,t)||u(o,t,{get:m.bind(e,t),enumerable:!0});return r&&i.set(e,o),o},v=e=>{var t=(y??=new WeakMap).get(e),n;if(t)return t;if(t=u({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var r of d(e))p.call(t,r)||u(t,r,{get:m.bind(e,r),enumerable:!(n=f(e,r))||n.enumerable});return y.set(e,t),t},y,b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),x=e=>e;function S(e,t){this[e]=x.bind(null,t)}var C=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0,configurable:!0,set:S.bind(t,n)})},w=b((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||function(){return this}()||Function(`return this`)()}),T=b((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}}),E=b((e,t)=>{t.exports=!T()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})}),D=b((e,t)=>{var n=E(),r=Function.prototype,i=r.apply,a=r.call;t.exports=typeof Reflect==`object`&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})}),O=b((e,t)=>{var n=E(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}}),k=b((e,t)=>{var n=O(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}}),A=b((e,t)=>{var n=k(),r=O();t.exports=function(e){if(n(e)===`Function`)return r(e)}}),j=b((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}}),M=b((e,t)=>{t.exports=!T()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),ee=b((e,t)=>{var n=E(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}}),N=b(e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t}),te=b((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}}),ne=b((e,t)=>{var n=O(),r=T(),i=k(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a}),re=b((e,t)=>{t.exports=function(e){return e==null}}),ie=b((e,t)=>{var n=re(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}}),ae=b((e,t)=>{var n=ne(),r=ie();t.exports=function(e){return n(r(e))}}),oe=b((e,t)=>{var n=j();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}}),se=b((e,t)=>{t.exports={}}),ce=b((e,t)=>{var n=se(),r=w(),i=j(),a=function(e){return i(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?a(n[e])||a(r[e]):n[e]&&n[e][t]||r[e]&&r[e][t]}}),le=b((e,t)=>{t.exports=O()({}.isPrototypeOf)}),ue=b((e,t)=>{var n=w().navigator,r=n&&n.userAgent;t.exports=r?String(r):``}),de=b((e,t)=>{var n=w(),r=ue(),i=n.process,a=n.Deno,o=i&&i.versions||a&&a.version,s=o&&o.v8,c,l;s&&(c=s.split(`.`),l=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!l&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(l=+c[1]))),t.exports=l}),fe=b((e,t)=>{var n=de(),r=T(),i=w().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})}),pe=b((e,t)=>{t.exports=fe()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`}),me=b((e,t)=>{var n=ce(),r=j(),i=le(),a=pe(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}}),he=b((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}}),ge=b((e,t)=>{var n=j(),r=he(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}}),_e=b((e,t)=>{var n=ge(),r=re();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}}),ve=b((e,t)=>{var n=ee(),r=j(),i=oe(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}}),ye=b((e,t)=>{t.exports=!0}),be=b((e,t)=>{var n=w(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}}),xe=b((e,t)=>{var n=ye(),r=w(),i=be(),a=`__core-js_shared__`,o=t.exports=r[a]||i(a,{});(o.versions||=[]).push({version:`3.43.0`,mode:n?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE`,source:`https://github.com/zloirock/core-js`})}),Se=b((e,t)=>{var n=xe();t.exports=function(e,t){return n[e]||(n[e]=t||{})}}),Ce=b((e,t)=>{var n=ie(),r=Object;t.exports=function(e){return r(n(e))}}),we=b((e,t)=>{var n=O(),r=Ce(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}}),Te=b((e,t)=>{var n=O(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}}),Ee=b((e,t)=>{var n=w(),r=Se(),i=we(),a=Te(),o=fe(),s=pe(),c=n.Symbol,l=r(`wks`),u=s?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return i(l,e)||(l[e]=o&&i(c,e)?c[e]:u(`Symbol.`+e)),l[e]}}),De=b((e,t)=>{var n=ee(),r=oe(),i=me(),a=_e(),o=ve(),s=Ee(),c=TypeError,l=s(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var s=a(e,l),u;if(s){if(t===void 0&&(t=`default`),u=n(s,e,t),!r(u)||i(u))return u;throw new c(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),o(e,t)}}),Oe=b((e,t)=>{var n=De(),r=me();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}}),ke=b((e,t)=>{var n=w(),r=oe(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}}),Ae=b((e,t)=>{var n=M(),r=T(),i=ke();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),`a`,{get:function(){return 7}}).a!==7})}),je=b(e=>{var t=M(),n=ee(),r=N(),i=te(),a=ae(),o=Oe(),s=we(),c=Ae(),l=Object.getOwnPropertyDescriptor;e.f=t?l:function(e,t){if(e=a(e),t=o(t),c)try{return l(e,t)}catch{}if(s(e,t))return i(!n(r.f,e,t),e[t])}}),Me=b((e,t)=>{var n=T(),r=j(),i=/#|\.prototype\./,a=function(e,t){var i=s[o(e)];return i===l?!0:i===c?!1:r(t)?n(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},s=a.data={},c=a.NATIVE=`N`,l=a.POLYFILL=`P`;t.exports=a}),Ne=b((e,t)=>{var n=A(),r=ge(),i=E(),a=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:i?a(e,t):function(){return e.apply(t,arguments)}}}),Pe=b((e,t)=>{var n=M(),r=T();t.exports=n&&r(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42})}),Fe=b((e,t)=>{var n=oe(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}}),Ie=b(e=>{var t=M(),n=Ae(),r=Pe(),i=Fe(),a=Oe(),o=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=`enumerable`,u=`configurable`,d=`writable`;e.f=t?r?function(e,t,n){if(i(e),t=a(t),i(n),typeof e==`function`&&t===`prototype`&&`value`in n&&d in n&&!n[d]){var r=c(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:l in n?n[l]:r[l],writable:!1})}return s(e,t,n)}:s:function(e,t,r){if(i(e),t=a(t),i(r),n)try{return s(e,t,r)}catch{}if(`get`in r||`set`in r)throw new o(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}}),Le=b((e,t)=>{var n=M(),r=Ie(),i=te();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}}),Re=b((e,t)=>{var n=w(),r=D(),i=A(),a=j(),o=je().f,s=Me(),c=se(),l=Ne(),u=Le(),d=we();xe();var f=function(e){var t=function(n,i,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,a)}return r(e,this,arguments)};return t.prototype=e.prototype,t};t.exports=function(e,t){var r=e.target,p=e.global,m=e.stat,h=e.proto,g=p?n:m?n[r]:n[r]&&n[r].prototype,_=p?c:c[r]||u(c,r,{})[r],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in t)y=s(p?S:r+(m?`.`:`#`)+S,e.forced),b=!y&&g&&d(g,S),w=_[S],b&&(e.dontCallGetSet?(D=o(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:t[S],!(!y&&!h&&typeof w==typeof C)&&(E=e.bind&&b?l(C,n):e.wrap&&b?f(C):h&&a(C)?i(C):C,(e.sham||C&&C.sham||w&&w.sham)&&u(E,`sham`,!0),u(_,S,E),h&&(x=r+`Prototype`,d(c,x)||u(c,x,{}),u(c[x],S,C),e.real&&v&&(y||!v[S])&&u(v,S,C)))}}),ze=b((e,t)=>{var n=Se(),r=Te(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}}),Be=b((e,t)=>{t.exports=!T()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}),Ve=b((e,t)=>{var n=we(),r=j(),i=Ce(),a=ze(),o=Be(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}}),He=b((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}}),Ue=b((e,t)=>{var n=He();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}}),We=b((e,t)=>{var n=Ue(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}}),Ge=b((e,t)=>{var n=Ue(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}}),Ke=b((e,t)=>{var n=Ge();t.exports=function(e){return n(e.length)}}),qe=b((e,t)=>{var n=ae(),r=We(),i=Ke(),a=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}}),Je=b((e,t)=>{t.exports={}}),Ye=b((e,t)=>{var n=O(),r=we(),i=ae(),a=qe().indexOf,o=Je(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}}),Xe=b((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]}),Ze=b((e,t)=>{var n=Ye(),r=Xe();t.exports=Object.keys||function(e){return n(e,r)}}),Qe=b((e,t)=>{var n=M(),r=T(),i=O(),a=Ve(),o=Ze(),s=ae(),c=N().f,l=i(c),u=i([].push),d=n&&r(function(){var e=Object.create(null);return e[2]=2,!l(e,2)}),f=function(e){return function(t){for(var r=s(t),i=o(r),c=d&&a(r)===null,f=i.length,p=0,m=[],h;f>p;)h=i[p++],(!n||(c?h in r:l(r,h)))&&u(m,e?[h,r[h]]:r[h]);return m}};t.exports={entries:f(!0),values:f(!1)}}),$e=b(()=>{var e=Re(),t=Qe().values;e({target:`Object`,stat:!0},{values:function(e){return t(e)}})}),et=b((e,t)=>{$e(),t.exports=se().Object.values}),tt=b((e,t)=>{t.exports=et()}),nt=b((e,t)=>{t.exports=tt()}),rt=b((e,t)=>{t.exports=function(){}}),it=b(()=>{var e=Re(),t=qe().includes,n=T(),r=rt();e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`)}),at=b((e,t)=>{t.exports=ce()}),ot=b((e,t)=>{it(),t.exports=at()(`Array`,`includes`)}),st=b((e,t)=>{t.exports=ot()}),ct=b((e,t)=>{t.exports=st()}),lt=b(()=>{var e=Re(),t=Ce(),n=Ke(),r=Ue(),i=rt();e({target:`Array`,proto:!0},{at:function(e){var i=t(this),a=n(i),o=r(e),s=o>=0?o:a+o;return s<0||s>=a?void 0:i[s]}}),i(`at`)}),ut=b((e,t)=>{lt(),t.exports=at()(`Array`,`at`)}),dt=b((e,t)=>{t.exports=ut()}),ft=b((e,t)=>{t.exports=dt()}),pt=b(()=>{var e=Re(),t=Qe().entries;e({target:`Object`,stat:!0},{entries:function(e){return t(e)}})}),mt=b((e,t)=>{pt(),t.exports=se().Object.entries}),ht=b((e,t)=>{t.exports=mt()}),gt=b((e,t)=>{t.exports=ht()}),_t=b((e,t)=>{var n=w(),r=ue(),i=k(),a=function(e){return r.slice(0,e.length)===e};t.exports=function(){return a(`Bun/`)?`BUN`:a(`Cloudflare-Workers`)?`CLOUDFLARE`:a(`Deno/`)?`DENO`:a(`Node.js/`)?`NODE`:n.Bun&&typeof Bun.version==`string`?`BUN`:n.Deno&&typeof Deno.version==`object`?`DENO`:i(n.process)===`process`?`NODE`:n.window&&n.document?`BROWSER`:`REST`}()}),vt=b((e,t)=>{t.exports=_t()===`NODE`}),yt=b((e,t)=>{var n=Le();t.exports=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e}}),bt=b((e,t)=>{var n=O(),r=ge();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}}),xt=b((e,t)=>{var n=oe();t.exports=function(e){return n(e)||e===null}}),St=b((e,t)=>{var n=xt(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}}),Ct=b((e,t)=>{var n=bt(),r=oe(),i=ie(),a=St();t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch{}return function(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)}),wt=b((e,t)=>{var n=Ee()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`}),Tt=b((e,t)=>{var n=wt(),r=j(),i=k(),a=Ee()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,c=function(e,t){try{return e[t]}catch{}};t.exports=n?i:function(e){var t,n,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=c(t=o(e),a))==`string`?n:s?i(t):(l=i(t))===`Object`&&r(t.callee)?`Arguments`:l}}),Et=b((e,t)=>{var n=wt(),r=Tt();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}}),Dt=b((e,t)=>{var n=wt(),r=Ie().f,i=Le(),a=we(),o=Et(),s=Ee()(`toStringTag`);t.exports=function(e,t,c,l){var u=c?e:e&&e.prototype;u&&(a(u,s)||r(u,s,{configurable:!0,value:t}),l&&!n&&i(u,`toString`,o))}}),Ot=b((e,t)=>{var n=Ie();t.exports=function(e,t,r){return n.f(e,t,r)}}),kt=b((e,t)=>{var n=ce(),r=Ot(),i=Ee(),a=M(),o=i(`species`);t.exports=function(e){var t=n(e);a&&t&&!t[o]&&r(t,o,{configurable:!0,get:function(){return this}})}}),At=b((e,t)=>{var n=le(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}}),jt=b((e,t)=>{var n=O(),r=j(),i=xe(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource}),Mt=b((e,t)=>{var n=O(),r=T(),i=j(),a=Tt(),o=ce(),s=jt(),c=function(){},l=o(`Reflect`,`construct`),u=/^\s*(?:class|function)\b/,d=n(u.exec),f=!u.test(c),p=function(e){if(!i(e))return!1;try{return l(c,[],e),!0}catch{return!1}},m=function(e){if(!i(e))return!1;switch(a(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return f||!!d(u,s(e))}catch{return!0}};m.sham=!0,t.exports=!l||r(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?m:p}),Nt=b((e,t)=>{var n=Mt(),r=he(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a constructor`)}}),Pt=b((e,t)=>{var n=Fe(),r=Nt(),i=re(),a=Ee()(`species`);t.exports=function(e,t){var o=n(e).constructor,s;return o===void 0||i(s=n(o)[a])?t:r(s)}}),Ft=b((e,t)=>{t.exports=ce()(`document`,`documentElement`)}),It=b((e,t)=>{t.exports=O()([].slice)}),Lt=b((e,t)=>{var n=TypeError;t.exports=function(e,t){if(e<t)throw new n(`Not enough arguments`);return e}}),Rt=b((e,t)=>{var n=ue();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)}),zt=b((e,t)=>{var n=w(),r=D(),i=Ne(),a=j(),o=we(),s=T(),c=Ft(),l=It(),u=ke(),d=Lt(),f=Rt(),p=vt(),m=n.setImmediate,h=n.clearImmediate,g=n.process,_=n.Dispatch,v=n.Function,y=n.MessageChannel,b=n.String,x=0,S={},C=`onreadystatechange`,E,O,k,A;s(function(){E=n.location});var M=function(e){if(o(S,e)){var t=S[e];delete S[e],t()}},ee=function(e){return function(){M(e)}},N=function(e){M(e.data)},te=function(e){n.postMessage(b(e),E.protocol+`//`+E.host)};(!m||!h)&&(m=function(e){d(arguments.length,1);var t=a(e)?e:v(e),n=l(arguments,1);return S[++x]=function(){r(t,void 0,n)},O(x),x},h=function(e){delete S[e]},p?O=function(e){g.nextTick(ee(e))}:_&&_.now?O=function(e){_.now(ee(e))}:y&&!f?(k=new y,A=k.port2,k.port1.onmessage=N,O=i(A.postMessage,A)):n.addEventListener&&a(n.postMessage)&&!n.importScripts&&E&&E.protocol!==`file:`&&!s(te)?(O=te,n.addEventListener(`message`,N,!1)):O=C in u(`script`)?function(e){c.appendChild(u(`script`))[C]=function(){c.removeChild(this),M(e)}}:function(e){setTimeout(ee(e),0)}),t.exports={set:m,clear:h}}),Bt=b((e,t)=>{var n=w(),r=M(),i=Object.getOwnPropertyDescriptor;t.exports=function(e){if(!r)return n[e];var t=i(n,e);return t&&t.value}}),Vt=b((e,t)=>{var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}},t.exports=n}),Ht=b((e,t)=>{var n=ue();t.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<`u`}),Ut=b((e,t)=>{var n=ue();t.exports=/web0s(?!.*chrome)/i.test(n)}),Wt=b((e,t)=>{var n=w(),r=Bt(),i=Ne(),a=zt().set,o=Vt(),s=Rt(),c=Ht(),l=Ut(),u=vt(),d=n.MutationObserver||n.WebKitMutationObserver,f=n.document,p=n.process,m=n.Promise,h=r(`queueMicrotask`),g,_,v,y,b;h||=(x=new o,S=function(){var e,t;for(u&&(e=p.domain)&&e.exit();t=x.get();)try{t()}catch(e){throw x.head&&g(),e}e&&e.enter()},!s&&!u&&!l&&d&&f?(_=!0,v=f.createTextNode(``),new d(S).observe(v,{characterData:!0}),g=function(){v.data=_=!_}):!c&&m&&m.resolve?(y=m.resolve(void 0),y.constructor=m,b=i(y.then,y),g=function(){b(S)}):u?g=function(){p.nextTick(S)}:(a=i(a,n),g=function(){a(S)}),function(e){x.head||g(),x.add(e)});var x,S;t.exports=h}),Gt=b((e,t)=>{t.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}}}),Kt=b((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}}),qt=b((e,t)=>{var n=w(),r=j(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))}),Jt=b((e,t)=>{var n=qt(),r=w(),i=oe(),a=Le(),o=we(),s=xe(),c=ze(),l=Je(),u=`Object already initialized`,d=r.TypeError,f=r.WeakMap,p,m,h,g=function(e){return h(e)?m(e):p(e,{})},_=function(e){return function(t){var n;if(!i(t)||(n=m(t)).type!==e)throw new d(`Incompatible receiver, `+e+` required`);return n}};n||s.state?(v=s.state||=new f,v.get=v.get,v.has=v.has,v.set=v.set,p=function(e,t){if(v.has(e))throw new d(u);return t.facade=e,v.set(e,t),t},m=function(e){return v.get(e)||{}},h=function(e){return v.has(e)}):(y=c(`state`),l[y]=!0,p=function(e,t){if(o(e,y))throw new d(u);return t.facade=e,a(e,y,t),t},m=function(e){return o(e,y)?e[y]:{}},h=function(e){return o(e,y)});var v,y;t.exports={set:p,get:m,has:h,enforce:g,getterFor:_}}),Yt=b((e,t)=>{t.exports=w().Promise}),Xt=b((e,t)=>{var n=w(),r=Yt(),i=j(),a=Me(),o=jt(),s=Ee(),c=_t(),l=ye(),u=de(),d=r&&r.prototype,f=s(`species`),p=!1,m=i(n.PromiseRejectionEvent);t.exports={CONSTRUCTOR:a(`Promise`,function(){var e=o(r),t=e!==String(r);if(!t&&u===66||l&&!(d.catch&&d.finally))return!0;if(!u||u<51||!/native code/.test(e)){var n=new r(function(e){e(1)}),i=function(e){e(function(){},function(){})},a=n.constructor={};if(a[f]=i,p=n.then(function(){})instanceof i,!p)return!0}return!t&&(c===`BROWSER`||c===`DENO`)&&!m}),REJECTION_EVENT:m,SUBCLASSING:p}}),Zt=b((e,t)=>{var n=ge(),r=TypeError,i=function(e){var t,i;this.promise=new e(function(e,n){if(t!==void 0||i!==void 0)throw new r(`Bad Promise constructor`);t=e,i=n}),this.resolve=n(t),this.reject=n(i)};t.exports.f=function(e){return new i(e)}}),Qt=b(()=>{var e=Re(),t=ye(),n=vt(),r=w(),i=se(),a=ee(),o=yt(),s=Ct(),c=Dt(),l=kt(),u=ge(),d=j(),f=oe(),p=At(),m=Pt(),h=zt().set,g=Wt(),_=Gt(),v=Kt(),y=Vt(),b=Jt(),x=Yt(),S=Xt(),C=Zt(),T=`Promise`,E=S.CONSTRUCTOR,D=S.REJECTION_EVENT,O=S.SUBCLASSING,k=b.getterFor(T),A=b.set,M=x&&x.prototype,N=x,te=M,ne=r.TypeError,re=r.document,ie=r.process,ae=C.f,ce=ae,le=!!(re&&re.createEvent&&r.dispatchEvent),ue=`unhandledrejection`,de=`rejectionhandled`,fe=0,pe=1,me=2,he=1,_e=2,ve,be,xe,Se,Ce=function(e){var t;return f(e)&&d(t=e.then)?t:!1},we=function(e,t){var n=t.value,r=t.state===pe,i=r?e.ok:e.fail,o=e.resolve,s=e.reject,c=e.domain,l,u,d;try{i?(r||(t.rejection===_e&&ke(t),t.rejection=he),i===!0?l=n:(c&&c.enter(),l=i(n),c&&(c.exit(),d=!0)),l===e.promise?s(new ne(`Promise-chain cycle`)):(u=Ce(l))?a(u,l,o,s):o(l)):s(n)}catch(e){c&&!d&&c.exit(),s(e)}},Te=function(e,t){e.notified||(e.notified=!0,g(function(){for(var n=e.reactions,r;r=n.get();)we(r,e);e.notified=!1,t&&!e.rejection&&De(e)}))},Ee=function(e,t,n){var i,a;le?(i=re.createEvent(`Event`),i.promise=t,i.reason=n,i.initEvent(e,!1,!0),r.dispatchEvent(i)):i={promise:t,reason:n},!D&&(a=r[`on`+e])?a(i):e===ue&&_(`Unhandled promise rejection`,n)},De=function(e){a(h,r,function(){var t=e.facade,r=e.value,i=Oe(e),a;if(i&&(a=v(function(){n?ie.emit(`unhandledRejection`,r,t):Ee(ue,t,r)}),e.rejection=n||Oe(e)?_e:he,a.error))throw a.value})},Oe=function(e){return e.rejection!==he&&!e.parent},ke=function(e){a(h,r,function(){var t=e.facade;n?ie.emit(`rejectionHandled`,t):Ee(de,t,e.value)})},Ae=function(e,t,n){return function(r){e(t,r,n)}},je=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=me,Te(e,!0))},Me=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new ne(`Promise can't be resolved itself`);var r=Ce(t);r?g(function(){var n={done:!1};try{a(r,t,Ae(Me,n,e),Ae(je,n,e))}catch(t){je(n,t,e)}}):(e.value=t,e.state=pe,Te(e,!1))}catch(t){je({done:!1},t,e)}}};if(E&&(N=function(e){p(this,te),u(e),a(ve,this);var t=k(this);try{e(Ae(Me,t),Ae(je,t))}catch(e){je(t,e)}},te=N.prototype,ve=function(e){A(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new y,rejection:!1,state:fe,value:null})},ve.prototype=o(te,`then`,function(e,t){var r=k(this),i=ae(m(this,N));return r.parent=!0,i.ok=d(e)?e:!0,i.fail=d(t)&&t,i.domain=n?ie.domain:void 0,r.state===fe?r.reactions.add(i):g(function(){we(i,r)}),i.promise}),be=function(){var e=new ve,t=k(e);this.promise=e,this.resolve=Ae(Me,t),this.reject=Ae(je,t)},C.f=ae=function(e){return e===N||e===xe?new be(e):ce(e)},!t&&d(x)&&M!==Object.prototype)){Se=M.then,O||o(M,`then`,function(e,t){var n=this;return new N(function(e,t){a(Se,n,e,t)}).then(e,t)},{unsafe:!0});try{delete M.constructor}catch{}s&&s(M,te)}e({global:!0,constructor:!0,wrap:!0,forced:E},{Promise:N}),xe=i.Promise,c(N,T,!1,!0),l(T)}),$t=b((e,t)=>{t.exports={}}),en=b((e,t)=>{var n=Ee(),r=$t(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}}),tn=b((e,t)=>{var n=Tt(),r=_e(),i=re(),a=$t(),o=Ee()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}}),nn=b((e,t)=>{var n=ee(),r=ge(),i=Fe(),a=he(),o=tn(),s=TypeError;t.exports=function(e,t){var c=arguments.length<2?o(e):t;if(r(c))return i(n(c,e));throw new s(a(e)+` is not iterable`)}}),rn=b((e,t)=>{var n=ee(),r=Fe(),i=_e();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}}),an=b((e,t)=>{var n=Ne(),r=ee(),i=Fe(),a=he(),o=en(),s=Ke(),c=le(),l=nn(),u=tn(),d=rn(),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;t.exports=function(e,t,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=n(t,g),S,C,w,T,E,D,O,k=function(e){return S&&d(S,`normal`),new p(!0,e)},A=function(e){return _?(i(e),b?x(e[0],e[1],k):x(e[0],e[1])):b?x(e,k):x(e)};if(v)S=e.iterator;else if(y)S=e;else{if(C=u(e),!C)throw new f(a(e)+` is not iterable`);if(o(C)){for(w=0,T=s(e);T>w;w++)if(E=A(e[w]),E&&c(m,E))return E;return new p(!1)}S=l(e,C)}for(D=v?e.next:S.next;!(O=r(D,S)).done;){try{E=A(O.value)}catch(e){d(S,`throw`,e)}if(typeof E==`object`&&E&&c(m,E))return E}return new p(!1)}}),on=b((e,t)=>{var n=Ee()(`iterator`),r=!1;try{i=0,a={next:function(){return{done:!!i++}},return:function(){r=!0}},a[n]=function(){return this},Array.from(a,function(){throw 2})}catch{}var i,a;t.exports=function(e,t){try{if(!t&&!r)return!1}catch{return!1}var i=!1;try{var a={};a[n]=function(){return{next:function(){return{done:i=!0}}}},e(a)}catch{}return i}}),sn=b((e,t)=>{var n=Yt(),r=on();t.exports=Xt().CONSTRUCTOR||!r(function(e){n.all(e).then(void 0,function(){})})}),cn=b(()=>{var e=Re(),t=ee(),n=ge(),r=Zt(),i=Kt(),a=an();e({target:`Promise`,stat:!0,forced:sn()},{all:function(e){var o=this,s=r.f(o),c=s.resolve,l=s.reject,u=i(function(){var r=n(o.resolve),i=[],s=0,u=1;a(e,function(e){var n=s++,a=!1;u++,t(r,o,e).then(function(e){a||(a=!0,i[n]=e,--u||c(i))},l)}),--u||c(i)});return u.error&&l(u.value),s.promise}})}),ln=b(()=>{var e=Re(),t=ye(),n=Xt().CONSTRUCTOR,r=Yt(),i=ce(),a=j(),o=yt(),s=r&&r.prototype;e({target:`Promise`,proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&a(r)&&(c=i(`Promise`).prototype.catch,s.catch!==c&&o(s,`catch`,c,{unsafe:!0}));var c}),un=b(()=>{var e=Re(),t=ee(),n=ge(),r=Zt(),i=Kt(),a=an();e({target:`Promise`,stat:!0,forced:sn()},{race:function(e){var o=this,s=r.f(o),c=s.reject,l=i(function(){var r=n(o.resolve);a(e,function(e){t(r,o,e).then(s.resolve,c)})});return l.error&&c(l.value),s.promise}})}),dn=b(()=>{var e=Re(),t=Zt(),n=Xt().CONSTRUCTOR;e({target:`Promise`,stat:!0,forced:n},{reject:function(e){var n=t.f(this),r=n.reject;return r(e),n.promise}})}),fn=b((e,t)=>{var n=Fe(),r=oe(),i=Zt();t.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var a=i.f(e),o=a.resolve;return o(t),a.promise}}),pn=b(()=>{var e=Re(),t=ce(),n=ye(),r=Yt(),i=Xt().CONSTRUCTOR,a=fn(),o=t(`Promise`),s=n&&!i;e({target:`Promise`,stat:!0,forced:n||i},{resolve:function(e){return a(s&&this===o?r:this,e)}})}),mn=b(()=>{Qt(),cn(),ln(),un(),dn(),pn()}),hn=b(()=>{var e=Re(),t=ye(),n=Yt(),r=T(),i=ce(),a=j(),o=Pt(),s=fn(),c=yt(),l=n&&n.prototype;e({target:`Promise`,proto:!0,real:!0,forced:!!n&&r(function(){l.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=o(this,i(`Promise`)),n=a(e);return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}}),!t&&a(n)&&(u=i(`Promise`).prototype.finally,l.finally!==u&&c(l,`finally`,u,{unsafe:!0}));var u}),gn=b((e,t)=>{mn(),hn(),t.exports=at()(`Promise`,`finally`)}),_n=b((e,t)=>{t.exports=gn()}),vn=b((e,t)=>{t.exports=_n()}),yn=b((e,t)=>{var n=M(),r=we(),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(i,`name`);t.exports={EXISTS:o,PROPER:o&&function(){}.name===`something`,CONFIGURABLE:o&&(!n||n&&a(i,`name`).configurable)}}),bn=b(e=>{var t=M(),n=Pe(),r=Ie(),i=Fe(),a=ae(),o=Ze();e.f=t&&!n?Object.defineProperties:function(e,t){i(e);for(var n=a(t),s=o(t),c=s.length,l=0,u;c>l;)r.f(e,u=s[l++],n[u]);return e}}),xn=b((e,t)=>{var n=Fe(),r=bn(),i=Xe(),a=Je(),o=Ft(),s=ke(),c=ze(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),m=function(){},h=function(e){return u+f+l+e+u+`/`+f+l},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(h(`document.F=Object`)),n.close(),n.F},v,y=function(){try{v=new ActiveXObject(`htmlfile`)}catch{}y=typeof document<`u`?document.domain&&v?g(v):_():g(v);for(var e=i.length;e--;)delete y[d][i[e]];return y()};a[p]=!0,t.exports=Object.create||function(e,t){var i;return e===null?i=y():(m[d]=n(e),i=new m,m[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}}),Sn=b((e,t)=>{var n=T(),r=j(),i=oe(),a=xn(),o=Ve(),s=yt(),c=Ee(),l=ye(),u=c(`iterator`),d=!1,f,p,m;[].keys&&(m=[].keys(),`next`in m?(p=o(o(m)),p!==Object.prototype&&(f=p)):d=!0),!i(f)||n(function(){var e={};return f[u].call(e)!==e})?f={}:l&&(f=a(f)),r(f[u])||s(f,u,function(){return this}),t.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d}}),Cn=b((e,t)=>{var n=Sn().IteratorPrototype,r=xn(),i=te(),a=Dt(),o=$t(),s=function(){return this};t.exports=function(e,t,c,l){var u=t+` Iterator`;return e.prototype=r(n,{next:i(+!l,c)}),a(e,u,!1,!0),o[u]=s,e}}),wn=b((e,t)=>{var n=Re(),r=ee(),i=ye(),a=yn(),o=j(),s=Cn(),c=Ve(),l=Ct(),u=Dt(),d=Le(),f=yt(),p=Ee(),m=$t(),h=Sn(),g=a.PROPER,_=a.CONFIGURABLE,v=h.IteratorPrototype,y=h.BUGGY_SAFARI_ITERATORS,b=p(`iterator`),x=`keys`,S=`values`,C=`entries`,w=function(){return this};t.exports=function(e,t,a,p,h,T,E){s(a,t,p);var D=function(e){if(e===h&&M)return M;if(!y&&e&&e in A)return A[e];switch(e){case x:return function(){return new a(this,e)};case S:return function(){return new a(this,e)};case C:return function(){return new a(this,e)}}return function(){return new a(this)}},O=t+` Iterator`,k=!1,A=e.prototype,j=A[b]||A[`@@iterator`]||h&&A[h],M=!y&&j||D(h),ee=t===`Array`&&A.entries||j,N,te,ne;if(ee&&(N=c(ee.call(new e)),N!==Object.prototype&&N.next&&(!i&&c(N)!==v&&(l?l(N,v):o(N[b])||f(N,b,w)),u(N,O,!0,!0),i&&(m[O]=w))),g&&h===S&&j&&j.name!==S&&(!i&&_?d(A,`name`,S):(k=!0,M=function(){return r(j,this)})),h)if(te={values:D(S),keys:T?M:D(x),entries:D(C)},E)for(ne in te)(y||k||!(ne in A))&&f(A,ne,te[ne]);else n({target:t,proto:!0,forced:y||k},te);return(!i||E)&&A[b]!==M&&f(A,b,M,{name:h}),m[t]=M,te}}),Tn=b((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),En=b((e,t)=>{var n=ae(),r=rt(),i=$t(),a=Jt(),o=Ie().f,s=wn(),c=Tn(),l=ye(),u=M(),d=`Array Iterator`,f=a.set,p=a.getterFor(d);t.exports=s(Array,`Array`,function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case`keys`:return c(n,!1);case`values`:return c(t[n],!1)}return c([n,t[n]],!1)},`values`);var m=i.Arguments=i.Array;if(r(`keys`),r(`values`),r(`entries`),!l&&u&&m.name!==`values`)try{o(m,`name`,{value:`values`})}catch{}}),Dn=b((e,t)=>{var n=M(),r=Ie(),i=te();t.exports=function(e,t,a){n?r.f(e,t,i(0,a)):e[t]=a}}),On=b(()=>{var e=Re(),t=an(),n=Dn();e({target:`Object`,stat:!0},{fromEntries:function(e){var r={};return t(e,function(e,t){n(r,e,t)},{AS_ENTRIES:!0}),r}})}),kn=b((e,t)=>{En(),On(),t.exports=se().Object.fromEntries}),An=b((e,t)=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),jn=b(()=>{En();var e=An(),t=w(),n=Dt(),r=$t();for(i in e)n(t[i],i),r[i]=r.Array;var i}),Mn=b((e,t)=>{var n=kn();jn(),t.exports=n}),Nn=b((e,t)=>{t.exports=Mn()}),Pn=b((e,t)=>{var n=oe(),r=k(),i=Ee()(`match`);t.exports=function(e){var t;return n(e)&&((t=e[i])===void 0?r(e)===`RegExp`:!!t)}}),Fn=b((e,t)=>{var n=Tt(),r=String;t.exports=function(e){if(n(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return r(e)}}),In=b((e,t)=>{var n=w(),r=T(),i=n.RegExp;t.exports={correct:!r(function(){var e=!0;try{i(`.`,`d`)}catch{e=!1}var t={},n=``,r=e?`dgimsy`:`gimsy`,a=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)a(s,o[s]);return Object.getOwnPropertyDescriptor(i.prototype,`flags`).get.call(t)!==r||n!==r})}}),Ln=b((e,t)=>{var n=Fe();t.exports=function(){var e=n(this),t=``;return e.hasIndices&&(t+=`d`),e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.unicodeSets&&(t+=`v`),e.sticky&&(t+=`y`),t}}),Rn=b((e,t)=>{var n=ee(),r=we(),i=le(),a=In(),o=Ln(),s=RegExp.prototype;t.exports=a.correct?function(e){return e.flags}:function(e){return!a.correct&&i(s,e)&&!r(e,`flags`)?n(o,e):e.flags}}),zn=b((e,t)=>{var n=O(),r=Ce(),i=Math.floor,a=n(``.charAt),o=n(``.replace),s=n(``.slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,n,u,d,f){var p=n+e.length,m=u.length,h=l;return d!==void 0&&(d=r(d),h=c),o(f,h,function(r,o){var c;switch(a(o,0)){case`$`:return`$`;case`&`:return e;case"`":return s(t,0,n);case`'`:return s(t,p);case`<`:c=d[s(o,1,-1)];break;default:var l=+o;if(l===0)return r;if(l>m){var f=i(l/10);return f===0?r:f<=m?u[f-1]===void 0?a(o,1):u[f-1]+a(o,1):r}c=u[l-1]}return c===void 0?``:c})}}),Bn=b(()=>{var e=Re(),t=ee(),n=O(),r=ie(),i=j(),a=oe(),o=Pn(),s=Fn(),c=_e(),l=Rn(),u=zn(),d=Ee(),f=ye(),p=d(`replace`),m=TypeError,h=n(``.indexOf),g=n(``.replace),_=n(``.slice),v=Math.max;e({target:`String`,proto:!0},{replaceAll:function(e,n){var d=r(this),y,b,x,S,C,w,T,E,D,O,k=0,A=``;if(a(e)){if(y=o(e),y&&(b=s(r(l(e))),!~h(b,`g`)))throw new m("`.replaceAll` does not allow non-global regexes");if(x=c(e,p),x)return t(x,e,d,n);if(f&&y)return g(s(d),e,n)}for(S=s(d),C=s(e),w=i(n),w||(n=s(n)),T=C.length,E=v(1,T),D=h(S,C);D!==-1;)O=w?s(n(C,D,S)):u(C,S,D,[],void 0,n),A+=_(S,k,D)+O,k=D+T,D=D+E>S.length?-1:h(S,C,D+E);return k<S.length&&(A+=_(S,k)),A}})}),Vn=b((e,t)=>{Bn(),t.exports=at()(`String`,`replaceAll`)}),Hn=b((e,t)=>{t.exports=Vn()}),Un=b((e,t)=>{t.exports=Hn()}),Wn=b((e,t)=>{var n=Ue(),r=Fn(),i=ie(),a=RangeError;t.exports=function(e){var t=r(i(this)),o=``,s=n(e);if(s<0||s===1/0)throw new a(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(t+=t))s&1&&(o+=t);return o}}),Gn=b((e,t)=>{var n=O(),r=Ge(),i=Fn(),a=Wn(),o=ie(),s=n(a),c=n(``.slice),l=Math.ceil,u=function(e){return function(t,n,a){var u=i(o(t)),d=r(n),f=u.length,p=a===void 0?` `:i(a),m,h;return d<=f||p===``?u:(m=d-f,h=s(p,l(m/p.length)),h.length>m&&(h=c(h,0,m)),e?u+h:h+u)}};t.exports={start:u(!1),end:u(!0)}}),Kn=b((e,t)=>{var n=ue();t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(n)}),qn=b(()=>{var e=Re(),t=Gn().start;e({target:`String`,proto:!0,forced:Kn()},{padStart:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}),Jn=b((e,t)=>{qn(),t.exports=at()(`String`,`padStart`)}),Yn=b((e,t)=>{t.exports=Jn()}),Xn=b((e,t)=>{t.exports=Yn()}),Zn={};C(Zn,{loadVKLangPack:()=>Hm.loadVKLangPack,VideoQuality:()=>Um.VideoQuality,VideoFormat:()=>Um.VideoFormat,VKNumericLanguage:()=>Hm.VKNumericLanguage,VERSION:()=>$n,InterfaceLanguage:()=>Hm.InterfaceLanguage,AndroidTvPlayer:()=>Vm}),module.exports=v(Zn);var Qn=`prod`,$n=`1.0.4-dev.c0f690bfb.0`,er=require(`@vkontakte/videoplayer-shared/es2018`),P=!0,tr=Array.isArray,nr=Array.prototype.indexOf,rr=Array.prototype.includes,ir=Array.from;Object.keys;var ar=Object.defineProperty,or=Object.getOwnPropertyDescriptor,sr=Object.getOwnPropertyDescriptors,cr=Object.prototype,lr=Array.prototype,ur=Object.getPrototypeOf,dr=Object.isExtensible,fr=()=>{};function pr(e){for(var t=0;t<e.length;t++)e[t]()}function mr(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var hr=2,gr=4,_r=8,vr=1<<24,yr=16,br=32,xr=64,Sr=128,Cr=512,wr=1024,Tr=2048,Er=4096,Dr=8192,Or=16384,kr=32768,Ar=65536,jr=1<<17,Mr=1<<18,Nr=1<<19,Pr=1<<20,Fr=1<<25,Ir=65536,Lr=1<<21,Rr=1<<22,zr=1<<23,Br=Symbol(`$state`),Vr=Symbol(`legacy props`),Hr=Symbol(``),Ur=Symbol(`proxy path`),Wr=new class extends Error{constructor(...t){super(...t),e(this,`name`,`StaleReactionError`),e(this,`message`,"The reaction that called `getAbortSignal()` was re-run or destroyed")}},Gr=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),Kr=3,qr=8;function Jr(){if(P){let e=Error("invalid_default_snippet\nCannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead\nhttps://svelte.dev/e/invalid_default_snippet");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/invalid_default_snippet`)}function Yr(e){if(P){let t=Error(`lifecycle_outside_component
|
|
7
|
+
\`${e}(...)\` can only be used during component initialisation
|
|
8
|
+
https://svelte.dev/e/lifecycle_outside_component`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Xr(){if(P){let e=Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Zr(){if(P){let e=Error(`derived_references_self
|
|
7
9
|
A derived value cannot reference itself recursively
|
|
8
|
-
https://svelte.dev/e/derived_references_self`);throw
|
|
9
|
-
\`${
|
|
10
|
-
https://svelte.dev/e/
|
|
11
|
-
\`${t}\`
|
|
12
|
-
https://svelte.dev/e/
|
|
13
|
-
|
|
14
|
-
https://svelte.dev/e/
|
|
15
|
-
|
|
16
|
-
https://svelte.dev/e/
|
|
17
|
-
|
|
18
|
-
https://svelte.dev/e/
|
|
19
|
-
|
|
20
|
-
https://svelte.dev/e/
|
|
21
|
-
|
|
22
|
-
`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
10
|
+
https://svelte.dev/e/derived_references_self`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/derived_references_self`)}function Qr(e,t,n){if(P){let r=Error(`each_key_duplicate
|
|
11
|
+
${n?`Keyed each block has duplicate key \`${n}\` at indexes ${e} and ${t}`:`Keyed each block has duplicate key at indexes ${e} and ${t}`}
|
|
12
|
+
https://svelte.dev/e/each_key_duplicate`);throw r.name=`Svelte error`,r}else throw Error(`https://svelte.dev/e/each_key_duplicate`)}function $r(e,t,n){if(P){let r=Error(`each_key_volatile
|
|
13
|
+
Keyed each block has key that is not idempotent — the key for item at index ${e} was \`${t}\` but is now \`${n}\`. Keys must be the same each time for a given item
|
|
14
|
+
https://svelte.dev/e/each_key_volatile`);throw r.name=`Svelte error`,r}else throw Error(`https://svelte.dev/e/each_key_volatile`)}function ei(e){if(P){let t=Error(`effect_in_teardown
|
|
15
|
+
\`${e}\` cannot be used inside an effect cleanup function
|
|
16
|
+
https://svelte.dev/e/effect_in_teardown`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ti(){if(P){let e=Error(`effect_in_unowned_derived
|
|
17
|
+
Effect cannot be created inside a \`$derived\` value that was not itself created inside an effect
|
|
18
|
+
https://svelte.dev/e/effect_in_unowned_derived`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function ni(e){if(P){let t=Error(`effect_orphan
|
|
19
|
+
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
20
|
+
https://svelte.dev/e/effect_orphan`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_orphan`)}function ri(){if(P){let e=Error(`effect_update_depth_exceeded
|
|
21
|
+
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
22
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function ii(){if(P){let e=Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/invalid_snippet`)}function ai(e){if(P){let t=Error(`props_invalid_value
|
|
23
|
+
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
24
|
+
https://svelte.dev/e/props_invalid_value`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/props_invalid_value`)}function oi(e){if(P){let t=Error(`rune_outside_svelte
|
|
25
|
+
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
26
|
+
https://svelte.dev/e/rune_outside_svelte`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/rune_outside_svelte`)}function si(){if(P){let e=Error("set_context_after_init\n`setContext` must be called when a component first initializes, not in a subsequent effect or after an `await` expression\nhttps://svelte.dev/e/set_context_after_init");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/set_context_after_init`)}function ci(){if(P){let e=Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function li(){if(P){let e=Error(`state_prototype_fixed
|
|
27
|
+
Cannot set prototype of \`$state\` object
|
|
28
|
+
https://svelte.dev/e/state_prototype_fixed`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function ui(){if(P){let e=Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function di(){if(P){let e=Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var fi=1,pi=2,mi=4,hi=8,gi=16,_i=1,vi=2,yi=4,bi=8,xi=16,Si=1,Ci=2,wi=`[`,Ti=`[!`,Ei=`[?`,Di=`]`,Oi={},ki=Symbol(),Ai=Symbol(`filename`),ji=`http://www.w3.org/1999/xhtml`,Mi=`font-weight: bold`,Ni=`font-weight: normal`;function Pi(e,t){P?console.warn(`%c[svelte] await_waterfall
|
|
29
|
+
%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
30
|
+
https://svelte.dev/e/await_waterfall`,Mi,Ni):console.warn(`https://svelte.dev/e/await_waterfall`)}function Fi(e,t,n){P?console.warn(`%c[svelte] hydration_attribute_changed
|
|
31
|
+
%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${n}\`, will be ignored in favour of the server value
|
|
32
|
+
https://svelte.dev/e/hydration_attribute_changed`,Mi,Ni):console.warn(`https://svelte.dev/e/hydration_attribute_changed`)}function Ii(e){P?console.warn(`%c[svelte] hydration_mismatch
|
|
33
|
+
%c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:`Hydration failed because the initial UI does not match what was rendered on the server`}
|
|
34
|
+
https://svelte.dev/e/hydration_mismatch`,Mi,Ni):console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Li(){P?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
30
35
|
%cTried to unmount a component that was not mounted
|
|
31
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
32
|
-
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${
|
|
33
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`}),
|
|
38
|
-
`).
|
|
39
|
-
`)})}}var ln=!1,Sn=null,dn=!1,Vi=!1;function Ho(t){Vi=t}var or=[],ar=[],Ie=null,Xt=!1;function _t(t){Ie=t}var xe=null;function At(t){xe=t}var Nt=null;function $r(t){Ie!==null&&Ie.f&2097152&&(Nt===null?Nt=[Ie,[t]]:Nt[1].push(t))}var Ht=null,ni=0,Jt=null;function cl(t){Jt=t}var Dl=1,Qr=0,ji=!1,Yr=null;function Kn(){return++Dl}function rn(t){var l,u;var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){var i=t.deps,n=(e&256)!==0;if(i!==null){var r,o,s=(e&512)!==0,a=n&&xe!==null&&!ji,c=i.length;if(s||a){var m=t,f=m.parent;for(r=0;r<c;r++)o=i[r],(s||!((l=o==null?void 0:o.reactions)!=null&&l.includes(m)))&&((u=o.reactions)!=null?u:o.reactions=[]).push(m);s&&(m.f^=512),a&&f!==null&&(f.f&256)===0&&(m.f^=256)}for(r=0;r<c;r++)if(o=i[r],rn(o)&&Uo(o),o.wv>t.wv)return!0}(!n||xe!==null&&!ji)&&Ft(t,1024)}return!1}function Cl(t,e,i=!0){var n=t.reactions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];Nt!=null&&Nt[1].includes(t)&&Nt[0]===Ie||((o.f&2)!==0?Cl(o,e,!1):e===o&&(i?Ft(o,2048):(o.f&1024)!==0&&Ft(o,4096),Jn(o)))}}function Cr(t){var v,g;var e=Ht,i=ni,n=Jt,r=Ie,o=ji,s=Nt,a=$e,c=Xt,m=t.f;Ht=null,ni=0,Jt=null,ji=(m&256)!==0&&(Xt||!dn||Ie===null),Ie=(m&96)===0?t:null,Nt=null,Wn(t.ctx),Xt=!1,Qr++,t.f|=2097152;try{var f=(0,t.fn)(),l=t.deps;if(Ht!==null){var u;if(ir(t,ni),l!==null&&ni>0)for(l.length=ni+Ht.length,u=0;u<Ht.length;u++)l[ni+u]=Ht[u];else t.deps=l=Ht;if(!ji||(m&2)!==0&&t.reactions!==null)for(u=ni;u<l.length;u++)((g=(v=l[u]).reactions)!=null?g:v.reactions=[]).push(t)}else l!==null&&ni<l.length&&(ir(t,ni),l.length=ni);if(Di()&&Jt!==null&&!Xt&&l!==null&&(t.f&6146)===0)for(u=0;u<Jt.length;u++)Cl(Jt[u],t);return r!==null&&r!==t&&(Qr++,Jt!==null&&(n===null?n=Jt:n.push(...Jt))),f}catch(h){Sl(h)}finally{Ht=e,ni=i,Jt=n,Ie=r,ji=o,Nt=s,Wn(a),Xt=c,t.f^=2097152}}function gc(t,e){let i=e.reactions;if(i!==null){var n=Hs.call(i,t);if(n!==-1){var r=i.length-1;r===0?i=e.reactions=null:(i[n]=i[r],i.pop())}}i===null&&(e.f&2)!==0&&(Ht===null||!Ht.includes(e))&&(Ft(e,4096),(e.f&768)===0&&(e.f^=512),Dr(e),ir(e,0))}function ir(t,e){var i=t.deps;if(i!==null)for(var n=e;n<i.length;n++)gc(t,i[n])}function Tn(t){var e=t.f;if((e&16384)===0){Ft(t,1024);var i=xe,n=dn;if(xe=t,dn=!0,Z){var r=bi;Gn(t.component_function)}try{(e&16)!==0?xl(t):Yo(t),Qo(t);var o=Cr(t);if(t.teardown=typeof o=="function"?o:null,t.wv=Dl,Z&&Ni&&(t.f&2048)!==0&&t.deps!==null)for(var s of t.deps)s.set_during_effect&&(s.wv=Kn(),s.set_during_effect=!1);Z&&ar.push(t)}finally{dn=n,xe=i,Z&&Gn(r)}}}function Il(){console.error("Last ten effects were: ",ar.slice(-10).map(t=>t.fn)),ar=[]}function hc(){try{Zs()}catch(t){if(Z&&yt(t,"stack",{value:""}),Sn!==null)if(Z)try{rr(t,Sn)}catch(e){throw Il(),e}else rr(t,Sn);else throw Z&&Il(),t}}function Zo(){var t=dn;try{var e=0;for(dn=!0;or.length>0;){e++>1e3&&hc();var i=or,n=i.length;or=[];for(var r=0;r<n;r++){var o=yc(i[r]);_c(o)}En.clear()}}finally{ln=!1,dn=t,Sn=null,Z&&(ar=[])}}function _c(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var n=t[i];(n.f&24576)===0&&rn(n)&&(Tn(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Wo(n):n.fn=null))}}function Jn(t){ln||(ln=!0,queueMicrotask(Zo));for(var e=Sn=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}or.push(e)}function yc(t){for(var e=[],i=t;i!==null;){var n=i.f,r=(n&96)!==0,o=r&&(n&1024)!==0;if(!o&&(n&8192)===0){(n&4)!==0?e.push(i):r?i.f^=1024:rn(i)&&Tn(i);var s=i.first;if(s!==null){i=s;continue}}var a=i.parent;for(i=i.next;i===null&&a!==null;)i=a.next,a=a.parent}return e}function sr(t){var e;for(t&&(ln=!0,Zo(),ln=!0,e=t());;){if(Ml(),or.length===0)return ln=!1,Sn=null,Z&&(ar=[]),e;ln=!0,Zo()}}function N(t){var e=t.f,i=(e&2)!==0;if(Yr!==null&&Yr.add(t),Ie!==null&&!Xt){if(!(Nt!=null&&Nt[1].includes(t))||Nt[0]!==Ie){var n=Ie.deps;t.rv<Qr&&(t.rv=Qr,Ht===null&&n!==null&&n[ni]===t?ni++:Ht===null?Ht=[t]:(!ji||!Ht.includes(t))&&Ht.push(t))}}else if(i&&t.deps===null&&t.effects===null){var r=t,o=r.parent;o!==null&&(o.f&256)===0&&(r.f^=256)}if(i&&(r=t,rn(r)&&Uo(r)),Z&&Ni&&!Xt&&Yn!==null&&Ie!==null&&Yn.reaction===Ie)if(t.trace)t.trace();else{var s=Pi("TracedAt");if(s){var a=Yn.entries.get(t);a===void 0&&(a={traces:[]},Yn.entries.set(t,a));var c=a.traces[a.traces.length-1];s.stack!==(c==null?void 0:c.stack)&&a.traces.push(s)}}return Vi&&En.has(t)?En.get(t):t.v}function it(t){var e=Xt;try{return Xt=!0,t()}finally{Xt=e}}var bc=-7169;function Ft(t,e){t.f=t.f&bc|e}var Ac=["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 fg=[...Ac,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Ec=["touchstart","touchmove"];function $l(t){return Ec.includes(t)}var wc=["$state","$state.raw","$derived","$derived.by"],pg=[...wc,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var Ll=new Map;function Ol(t,e){var i=Ll.get(t);i||(i=new Set,Ll.set(t,i)),i.add(e)}function Wr(t){var e=Ie,i=xe;_t(null),At(null);try{return t()}finally{_t(e),At(i)}}var Jo=new Set,Gr=new Set;function Rl(t,e,i,n={}){function r(o){if(n.capture||Nn.call(e,o),!o.cancelBubble)return Wr(()=>i==null?void 0:i.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?ii(()=>{e.addEventListener(t,r,n)}):e.addEventListener(t,r,n),r}function In(t,e,i,n,r){var o={capture:n,passive:r},s=Rl(t,e,i,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&$t(()=>{e.removeEventListener(t,s,o)})}function qt(t){for(var e=0;e<t.length;e++)Jo.add(t[e]);for(var i of Gr)i(t)}function Nn(t){var D;var e=this,i=e.ownerDocument,n=t.type,r=((D=t.composedPath)==null?void 0:D.call(t))||[],o=r[0]||t.target,s=0,a=t.__root;if(a){var c=r.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var m=r.indexOf(e);if(m===-1)return;c<=m&&(s=c)}if(o=r[s]||t.target,o!==e){yt(t,"currentTarget",{configurable:!0,get(){return o||i}});var f=Ie,l=xe;_t(null),At(null);try{for(var u,v=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var h=o["__"+n];if(h!=null&&(!o.disabled||t.target===o))if(ui(h)){var[y,...$]=h;y.apply(o,[t,...$])}else h.call(o,t)}catch(T){u?v.push(T):u=T}if(t.cancelBubble||g===e||g===null)break;o=g}if(u){for(let T of v)queueMicrotask(()=>{throw T});throw u}}finally{t.__root=e,delete t.currentTarget,_t(f),At(l)}}}var Sc;function Vl(){Sc=void 0}function lr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function ri(t,e){var i=xe;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function ue(t,e){var i=(e&1)!==0,n=(e&2)!==0,r,o=!t.startsWith("<!>");return()=>{if(me)return ri(Me,null),Me;r===void 0&&(r=lr(o?t:"<!>"+t),i||(r=vt(r)));var s=n||Xn?document.importNode(r,!0):r.cloneNode(!0);if(i){var a=vt(s),c=s.lastChild;ri(a,c)}else ri(s,s);return s}}function Nc(t,e,i="svg"){var n=!t.startsWith("<!>"),r=(e&1)!==0,o=`<${i}>${n?t:"<!>"+t}</${i}>`,s;return()=>{if(me)return ri(Me,null),Me;if(!s){var a=lr(o),c=vt(a);if(r)for(s=document.createDocumentFragment();vt(c);)s.appendChild(vt(c));else s=vt(c)}var m=s.cloneNode(!0);if(r){var f=vt(m),l=m.lastChild;ri(f,l)}else ri(m,m);return m}}function Tt(t,e){return Nc(t,e,"svg")}function un(){if(me)return ri(Me,null),Me;var t=document.createDocumentFragment(),e=document.createComment(""),i=mi();return t.append(e,i),ri(e,i),t}function J(t,e){if(me){xe.nodes_end=Me,wt();return}t!==null&&t.before(e)}var Xo=!0;function Ne(t,e){var n;var i=e==null?"":typeof e=="object"?e+"":e;i!==((n=t.__t)!=null?n:t.__t=t.nodeValue)&&(t.__t=i,t.nodeValue=i+"")}function cn(t,e){return Ul(t,e)}function ta(t,e){var s;Vr(),e.intro=(s=e.intro)!=null?s:!1;let i=e.target,n=me,r=Me;try{for(var o=vt(i);o&&(o.nodeType!==ci||o.data!==Qi);)o=Pt(o);if(!o)throw Oi;Ot(!0),lt(o),wt();let a=Ul(t,{...e,anchor:o});if(Me===null||Me.nodeType!==ci||Me.data!==Ji)throw on(),Oi;return Ot(!1),a}catch(a){if(a===Oi)return e.recover===!1&&Js(),Vr(),er(i),Ot(!1),cn(t,e);throw a}finally{Ot(n),lt(r),Vl()}}var Dn=new Map;function Ul(t,{target:e,anchor:i,props:n={},events:r,context:o,intro:s=!0}){Vr();var a=new Set,c=l=>{for(var u=0;u<l.length;u++){var v=l[u];if(!a.has(v)){a.add(v);var g=$l(v);e.addEventListener(v,Nn,{passive:g});var h=Dn.get(v);h===void 0?(document.addEventListener(v,Nn,{passive:g}),Dn.set(v,1)):Dn.set(v,h+1)}}};c(Hn(Jo)),Gr.add(c);var m=void 0,f=bl(()=>{var l=i!=null?i:e.appendChild(mi());return bt(()=>{if(o){Ee({});var u=$e;u.c=o}r&&(n.$$events=r),me&&ri(l,null),Xo=s,m=t(l,n)||{},Xo=!0,me&&(xe.nodes_end=Me),o&&we()}),()=>{var g;for(var u of a){e.removeEventListener(u,Nn);var v=Dn.get(u);--v===0?(document.removeEventListener(u,Nn),Dn.delete(u)):Dn.set(u,v)}Gr.delete(c),l!==i&&((g=l.parentNode)==null||g.removeChild(l))}});return ea.set(m,f),m}var ea=new WeakMap;function dr(t,e){let i=ea.get(t);return i?(ea.delete(t),i(e)):(Z&&pl(),Promise.resolve())}function De(t,e,[i,n]=[0,0]){me&&i===0&&wt();var r=t,o=null,s=null,a=mt,c=i>0?65536:0,m=!1;let f=(u,v=!0)=>{m=!0,l(v,u)},l=(u,v)=>{if(a===(a=u))return;let g=!1;if(me&&n!==-1){if(i===0){let y=Rr(r);y===Qi?n=0:y===Yi?n=1/0:(n=parseInt(y.substring(1)),n!==n&&(n=a?1/0:-1))}let h=n>i;!!a===h&&(r=an(),lt(r),Ot(!1),g=!0,n=-1)}a?(o?Wi(o):v&&(o=bt(()=>v(r))),s&&vi(s,()=>{s=null})):(s?Wi(s):v&&(s=bt(()=>v(r,[i+1,n]))),o&&vi(o,()=>{o=null})),g&&Ot(!0)};Mt(()=>{m=!1,e(f),m||l(null,null)},c),me&&(r=Me)}function ia(t,e,i){me&&wt();var n=t,r=mt,o,s=Di()?Ys:bn;Mt(()=>{s(r,r=e())&&(o&&vi(o),o=bt(()=>i(n)))}),me&&(n=Me)}var ur=null;function kc(t,e,i,n){for(var r=[],o=e.length,s=0;s<o;s++)Hr(e[s].e,r,!0);var a=o>0&&r.length===0&&i!==null;if(a){var c=i.parentNode;er(c),c.append(i),n.clear(),Gi(t,e[0].prev,e[o-1].next)}Go(r,()=>{for(var m=0;m<o;m++){var f=e[m];a||(n.delete(f.k),Gi(t,f.prev,f.next)),Et(f.e,!a)}})}function oa(t,e,i,n,r,o=null){var s=t,a={flags:e,items:new Map,first:null},c=(e&4)!==0;if(c){var m=t;s=me?lt(vt(m)):m.appendChild(mi())}me&&wt();var f=null,l=!1,u=qn(()=>{var v=i();return ui(v)?v:v==null?[]:Hn(v)});Mt(()=>{var v=N(u),g=v.length;if(l&&g===0)return;l=g===0;let h=!1;if(me){var y=Rr(s)===Yi;y!==(g===0)&&(s=an(),lt(s),Ot(!1),h=!0)}if(me){for(var $=null,D,T=0;T<g;T++){if(Me.nodeType===ci&&Me.data===Ji){s=Me,h=!0,Ot(!1);break}var b=v[T],x=n(b,T);D=Bl(Me,a,$,null,b,x,T,r,e,i),a.items.set(x,D),$=D}g>0&<(an())}me||Lc(v,a,s,r,e,n,i),o!==null&&(g===0?f?Wi(f):f=bt(()=>o(s)):f!==null&&vi(f,()=>{f=null})),h&&Ot(!0),N(u)}),me&&(s=Me)}function Lc(t,e,i,n,r,o,s){var U,O,P,z;var a=(r&8)!==0,c=(r&3)!==0,m=t.length,f=e.items,l=e.first,u=l,v,g=null,h,y=[],$=[],D,T,b,x;if(a)for(x=0;x<m;x+=1)D=t[x],T=o(D,x),b=f.get(T),b!==void 0&&((U=b.a)==null||U.measure(),(h!=null?h:h=new Set).add(b));for(x=0;x<m;x+=1){if(D=t[x],T=o(D,x),b=f.get(T),b===void 0){var A=u?u.e.nodes_start:i;g=Bl(A,e,g,g===null?e.first:g.next,D,T,x,n,r,s),f.set(T,g),y=[],$=[],u=g.next;continue}if(c&&Oc(b,D,x,r),(b.e.f&8192)!==0&&(Wi(b.e),a&&((O=b.a)==null||O.unfix(),(h!=null?h:h=new Set).delete(b))),b!==u){if(v!==void 0&&v.has(b)){if(y.length<$.length){var S=$[0],L;g=S.prev;var k=y[0],E=y[y.length-1];for(L=0;L<y.length;L+=1)Fl(y[L],S,i);for(L=0;L<$.length;L+=1)v.delete($[L]);Gi(e,k.prev,E.next),Gi(e,g,k),Gi(e,E,S),u=S,g=E,x-=1,y=[],$=[]}else v.delete(b),Fl(b,u,i),Gi(e,b.prev,b.next),Gi(e,b,g===null?e.first:g.next),Gi(e,g,b),g=b;continue}for(y=[],$=[];u!==null&&u.k!==T;)(u.e.f&8192)===0&&(v!=null?v:v=new Set).add(u),$.push(u),u=u.next;if(u===null)continue;b=u}y.push(b),g=b,u=b.next}if(u!==null||v!==void 0){for(var M=v===void 0?[]:Hn(v);u!==null;)(u.e.f&8192)===0&&M.push(u),u=u.next;var _=M.length;if(_>0){var R=(r&4)!==0&&m===0?i:null;if(a){for(x=0;x<_;x+=1)(P=M[x].a)==null||P.measure();for(x=0;x<_;x+=1)(z=M[x].a)==null||z.fix()}kc(e,M,R,f)}}a&&ii(()=>{var Q;if(h!==void 0)for(b of h)(Q=b.a)==null||Q.apply()}),xe.first=e.first&&e.first.e,xe.last=g&&g.e}function Oc(t,e,i,n){(n&1)!==0&&Mn(t.v,e),(n&2)!==0?Mn(t.i,i):t.i=i}function Bl(t,e,i,n,r,o,s,a,c,m){var f=ur,l=(c&1)!==0,u=(c&16)===0,v=l?u?Ci(r,!1,!1):pi(r):r,g=(c&2)===0?s:pi(s);Z&&l&&(v.trace=()=>{var y=typeof g=="number"?s:g.v;m()[y]});var h={i:g,v,k:o,a:null,e:null,prev:i,next:n};ur=h;try{return h.e=bt(()=>a(t,v,g,m),me),h.e.prev=i&&i.e,h.e.next=n&&n.e,i===null?e.first=h:(i.next=h,i.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{ur=f}}function Fl(t,e,i){for(var n=t.next?t.next.e.nodes_start:i,r=e?e.e.nodes_start:i,o=t.e.nodes_start;o!==n;){var s=Pt(o);r.before(o),o=s}}function Gi(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 aa(t,e,i,n,r){var a;me&&wt();var o=(a=e.$$slots)==null?void 0:a[i],s=!1;o===!0&&(o=e[i==="default"?"children":i],s=!0),o===void 0?r!==null&&r(t):o(t,s?()=>n:n)}function Cn(t,e,...i){var n=t,r=xt,o;Mt(()=>{r!==(r=e())&&(o&&(Et(o),o=null),Z&&r==null&&Xs(),o=bt(()=>r(n,...i)))},65536),me&&(n=Me)}var da;function Ql(t){return da=t.target,new la(t)}var Ui,gi,la=class{constructor(e){Er(this,Ui);Er(this,gi);var o,s;var i=new Map,n=(a,c)=>{var m=Ci(c,!1,!1);return i.set(a,m),m};let r=new Proxy({...e.props||{},$$events:{}},{get(a,c){var m;return N((m=i.get(c))!=null?m:n(c,Reflect.get(a,c)))},has(a,c){var m;return c===Bn?!0:(N((m=i.get(c))!=null?m:n(c,Reflect.get(a,c))),Reflect.has(a,c))},set(a,c,m){var f;return pe((f=i.get(c))!=null?f:n(c,m),m),Reflect.set(a,c,m)}});wr(this,gi,(e.hydrate?ta:cn)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:(o=e.intro)!=null?o:!1,recover:e.recover})),(!((s=e==null?void 0:e.props)!=null&&s.$$host)||e.sync===!1)&&sr(),wr(this,Ui,r.$$events);for(let a of Object.keys(Ut(this,gi)))a==="$set"||a==="$destroy"||a==="$on"||yt(this,a,{get(){return Ut(this,gi)[a]},set(c){Ut(this,gi)[a]=c},enumerable:!0});Ut(this,gi).$set=a=>{Object.assign(r,a)},Ut(this,gi).$destroy=()=>{dr(Ut(this,gi))}}$set(e){Ut(this,gi).$set(e)}$on(e,i){Ut(this,Ui)[e]=Ut(this,Ui)[e]||[];let n=(...r)=>i.call(this,...r);return Ut(this,Ui)[e].push(n),()=>{Ut(this,Ui)[e]=Ut(this,Ui)[e].filter(r=>r!==n)}}$destroy(){Ut(this,gi).$destroy()}};Ui=new WeakMap,gi=new WeakMap;function Re(t,e){ii(()=>{var r,o,s;var i=t.getRootNode(),n=i.host?i:(s=(r=i.head)!=null?r:i.ownerDocument.head)!=null?s:(o=da)==null?void 0:o.parentNode;if(!(n!=null&&n.querySelector("#"+e.hash))){let a=document.createElement("style");a.id=e.hash,a.textContent=e.code,n.appendChild(a),Z&&Ol(e.hash,a)}})}function Wl(t){var e,i,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(i=Wl(t[e]))&&(n&&(n+=" "),n+=i)}else for(i in t)t[i]&&(n&&(n+=" "),n+=i);return n}function Gl(){for(var t,e,i=0,n="",r=arguments.length;i<r;i++)(t=arguments[i])&&(e=Wl(t))&&(n&&(n+=" "),n+=e);return n}function $i(t){return typeof t=="object"?Gl(t):t!=null?t:""}var ql=[...`
|
|
40
|
-
\r\f \v\uFEFF`];function Zl(t,e,i){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),i){for(var r in i)if(i[r])n=n?n+" "+r:r;else if(n.length)for(var o=r.length,s=0;(s=n.indexOf(r,s))>=0;){var a=s+o;(s===0||ql.includes(n[s-1]))&&(a===n.length||ql.includes(n[a]))?n=(s===0?"":n.substring(0,s))+n.substring(a+1):s=a}}return n===""?null:n}function Kl(t,e=!1){var i=e?" !important;":";",n="";for(var r in t){var o=t[r];o!=null&&o!==""&&(n+=" "+r+": "+o+i)}return n}function ua(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Jl(t,e){if(e){var i="",n,r;if(Array.isArray(e)?(n=e[0],r=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,a=!1,c=[];n&&c.push(...Object.keys(n).map(ua)),r&&c.push(...Object.keys(r).map(ua));var m=0,f=-1;let h=t.length;for(var l=0;l<h;l++){var u=t[l];if(a?u==="/"&&t[l-1]==="*"&&(a=!1):o?o===u&&(o=!1):u==="/"&&t[l+1]==="*"?a=!0:u==='"'||u==="'"?o=u:u==="("?s++:u===")"&&s--,!a&&o===!1&&s===0){if(u===":"&&f===-1)f=l;else if(u===";"||l===h-1){if(f!==-1){var v=ua(t.substring(m,f).trim());if(!c.includes(v)){u!==";"&&l++;var g=t.substring(m,l).trim();i+=" "+g+";"}}m=l+1,f=-1}}}}return n&&(i+=Kl(n)),r&&(i+=Kl(r,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function hi(t,e,i,n,r,o){var s=t.__className;if(me||s!==i||s===void 0){var a=Zl(i,n,o);(!me||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=i}else if(o&&r!==o)for(var c in o){var m=!!o[c];(r==null||m!==!!r[c])&&t.classList.toggle(c,m)}return o}function ca(t,e={},i,n){for(var r in i){var o=i[r];e[r]!==o&&(i[r]==null?t.style.removeProperty(r):t.style.setProperty(r,o,n))}}function at(t,e,i,n){var r=t.__style;if(me||r!==e){var o=Jl(e,n);(!me||o!==t.getAttribute("style"))&&(o==null?t.removeAttribute("style"):t.style.cssText=o),t.__style=e}else n&&(Array.isArray(n)?(ca(t,i==null?void 0:i[0],n[0]),ca(t,i==null?void 0:i[1],n[1],"important")):ca(t,i,n));return n}var qc=Symbol("class"),Kc=Symbol("style"),Zc=Symbol("is custom element"),Jc=Symbol("is html");function Xe(t,e,i,n){var r=Xc(t);if(me&&(r[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||tf(t,e,i!=null?i:"");return}r[e]!==(r[e]=i)&&(e==="loading"&&(t[Qs]=i),i==null?t.removeAttribute(e):typeof i!="string"&&ef(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function Xc(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[Zc]:t.nodeName.includes("-"),[Jc]:t.namespaceURI===sl}}var Xl=new Map;function ef(t){var e=Xl.get(t.nodeName);if(e)return e;Xl.set(t.nodeName,e=[]);for(var i,n=t,r=Element.prototype;r!==n;){i=Co(n);for(var o in i)i[o].set&&e.push(o);n=_n(n)}return e}function tf(t,e,i){var n;Z&&(e==="srcset"&&nf(t,i)||fa((n=t.getAttribute(e))!=null?n:"",i)||fl(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function fa(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ed(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function nf(t,e){var i=ed(t.srcset),n=ed(e);return n.length===i.length&&n.every(([r,o],s)=>o===i[s][1]&&(fa(i[s][0],r)||fa(r,i[s][0])))}function td(t,e){return t===e||(t==null?void 0:t[Yt])===e}function oi(t={},e,i,n){return Wt(()=>{var r,o;return Vt(()=>{r=o,o=(n==null?void 0:n())||[],it(()=>{t!==i(...o)&&(e(t,...o),r&&td(i(...r),t)&&e(null,...r))})}),()=>{ii(()=>{o&&td(i(...o),t)&&e(null,...o)})}}),t}function cr(t,e,i){if(t==null)return e(void 0),i&&i(void 0),xt;let n=it(()=>t.subscribe(e,i));return n.unsubscribe?()=>n.unsubscribe():n}var $n=[];function ai(t,e){return{subscribe:W(t,e).subscribe}}function W(t,e=xt){let i=null,n=new Set;function r(a){if(bn(t,a)&&(t=a,i)){let c=!$n.length;for(let m of n)m[1](),$n.push(m,t);if(c){for(let m=0;m<$n.length;m+=2)$n[m][0]($n[m+1]);$n.length=0}}}function o(a){r(a(t))}function s(a,c=xt){let m=[a,c];return n.add(m),n.size===1&&(i=e(r,o)||xt),a(t),()=>{n.delete(m),n.size===0&&i&&(i(),i=null)}}return{set:r,update:o,subscribe:s}}function nt(t,e,i){let n=!Array.isArray(t),r=n?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let o=e.length<2;return ai(i,(s,a)=>{let c=!1,m=[],f=0,l=xt,u=()=>{if(f)return;l();let g=e(n?m[0]:m,s,a);o?s(g):l=typeof g=="function"?g:xt},v=r.map((g,h)=>cr(g,y=>{m[h]=y,f&=~(1<<h),c&&u()},()=>{f|=1<<h}));return c=!0,u(),function(){yn(v),l(),c=!1}})}function Te(t){let e;return cr(t,i=>e=i)(),e}var Kr=!1,pa=Symbol();function qe(t,e,i){var o;let n=(o=i[e])!=null?o:i[e]={store:null,source:Ci(void 0),unsubscribe:xt};if(n.store!==t&&!(pa in i))if(n.unsubscribe(),n.store=t!=null?t:null,t==null)n.source.v=void 0,n.unsubscribe=xt;else{var r=!0;n.unsubscribe=cr(t,s=>{r?n.source.v=s:pe(n.source,s)}),r=!1}return t&&pa in i?Te(t):N(n.source)}function si(){let t={};function e(){$t(()=>{for(var i in t)t[i].unsubscribe();yt(t,pa,{enumerable:!1,value:!0})})}return[t,e]}function ma(t){var e=Kr;try{return Kr=!1,[t(),Kr]}finally{Kr=e}}function id(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function et(t,e,i,n){var S,L;var r=(i&1)!==0,o=!Ii||(i&2)!==0,s=(i&8)!==0,a=(i&16)!==0,c=!1,m;s?[m,c]=ma(()=>t[e]):m=t[e];var f=Yt in t||Bn in t,l=s&&((L=(S=Qt(t,e))==null?void 0:S.set)!=null?L:f&&e in t&&(k=>t[e]=k))||void 0,u=n,v=!0,g=!1,h=()=>(g=!0,v&&(v=!1,a?u=it(n):u=n),u);m===void 0&&n!==void 0&&(l&&o&&el(e),m=h(),l&&l(m));var y;if(o)y=()=>{var k=t[e];return k===void 0?h():(v=!0,g=!1,k)};else{var $=(r?Ri:qn)(()=>t[e]);$.f|=131072,y=()=>{var k=N($);return k!==void 0&&(u=void 0),k===void 0?u:k}}if((i&4)===0&&o)return y;if(l){var D=t.$$legacy;return function(k,E){return arguments.length>0?((!o||!E||D||c)&&l(E?y():k),k):y()}}var T=!1,b=!1,x=Ci(m),A=Ri(()=>{var k=y(),E=N(x);return T?(T=!1,b=!0,E):(b=!1,x.v=k)});return s&&N(A),r||(A.equals=xn),function(k,E){if(Yr!==null&&(T=b,y(),N(x)),arguments.length>0){let M=E?N(A):o&&s?kt(k):k;if(!A.equals(M)){if(T=!0,pe(x,M),g&&u!==void 0&&(u=M),id(A))return k;it(()=>N(A))}return k}return id(A)?A.v:N(A)}}var ff;typeof HTMLElement=="function"&&(ff=class extends HTMLElement{constructor(e,i,n){super();di(this,"$$ctor");di(this,"$$s");di(this,"$$c");di(this,"$$cn",!1);di(this,"$$d",{});di(this,"$$r",!1);di(this,"$$p_d",{});di(this,"$$l",{});di(this,"$$l_u",new Map);di(this,"$$me");this.$$ctor=e,this.$$s=i,n&&this.attachShadow({mode:"open"})}addEventListener(e,i,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(i),this.$$c){let r=this.$$c.$on(e,i);this.$$l_u.set(i,r)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){let r=this.$$l_u.get(i);r&&(r(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(o){return s=>{let a=document.createElement("slot");o!=="default"&&(a.name=o),J(s,a)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let n={},r=pf(this);for(let o of this.$$s)o in r&&(o==="default"&&!this.$$d.children?(this.$$d.children=i(o),n.default=!0):n[o]=i(o));for(let o of this.attributes){let s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=va(s,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Ql({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=Fr(()=>{Vt(()=>{var o;this.$$r=!0;for(let s of Do(this.$$c)){if(!((o=this.$$p_d[s])!=null&&o.reflect))continue;this.$$d[s]=this.$$c[s];let a=va(s,this.$$d[s],this.$$p_d,"toAttribute");a==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,a)}this.$$r=!1})});for(let o in this.$$l)for(let s of this.$$l[o]){let a=this.$$c.$on(o,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,i,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=va(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Do(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function va(t,e,i,n){var o;let r=(o=i[t])==null?void 0:o.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function pf(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}if(Z){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;tl(e)},set:n=>{i=n}})}};vf=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var vf;function wi(t){$e===null&&An("onMount"),Ii&&$e.l!==null?mf($e).m.push(t):Rt(()=>{let e=it(t);if(typeof e=="function")return e})}function rd(t){$e===null&&An("onDestroy"),wi(()=>()=>it(t))}function mf(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var gf={debugLog:!1,devNullLog:!1,defaultLanguage:fn.InterfaceLanguage.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!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,trafficSavingLimit:fn.VideoQuality.Q_480P,highQualityLimit:fn.VideoQuality.Q_720P,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,fullscreen:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,copyVideoLink:!0,videoRotate:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,userVideoPrefs:!1,initSubtitles:!0},controls:{playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},userSalt:"0"},ga=t=>(0,fn.fillWithDefault)(t,gf),od=t=>en("ui-config",t),Zr=()=>Xi("ui-config");var dt=require("@vkontakte/videoplayer-shared/es2018");var ad="5";var sd,ld,dd;typeof window!="undefined"&&((dd=(ld=(sd=window.__svelte)!=null?sd:window.__svelte={}).v)!=null?dd:ld.v=new Set).add(ad);ol();var ud="var(--btn-color, #fff)";var hf=Tt('<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>',1),_f=Tt('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Bt(t,e){var f;Ee(e,!0);let i=et(e,"width",19,()=>"14"),n=et(e,"height",19,()=>"14"),r=et(e,"fill",3,ud),o=(f=e.viewBox)!=null?f:`0 0 ${i()} ${n()}`;var s=_f(),a=B(s);{var c=l=>{var u=hf(),v=ti(u),g=B(v);Cn(g,()=>e.children),H(v),Pr(),J(l,u)},m=l=>{var u=un(),v=ti(u);Cn(v,()=>e.children),J(l,u)};De(a,l=>{e.shadow?l(c):l(m,!1)})}H(s),ye(()=>{Xe(s,"aria-label",e.ariaLabel),Xe(s,"aria-hidden",!e.ariaLabel),Xe(s,"width",i()),Xe(s,"height",n()),Xe(s,"viewBox",o),Xe(s,"fill",r()),at(s,e.style),Xe(s,"data-testid",e.testId)}),J(t,s),we()}var yf=Tt('<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>');function ha(t){Bt(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var n=yf();J(e,n)},$$slots:{default:!0}})}var bf=ue('<div class="container s-2"><!></div>'),xf={hash:"s-2",code:".container.s-2{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function fr(t){Re(t,xf);var e=bf(),i=B(e);ha(i,{}),H(e),J(t,e)}var Af=ue('<div class="playerError s-0"><!></div>'),Ef={hash:"s-0",code:".playerError.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function _a(t){Re(t,Ef);var e=Af(),i=B(e);fr(i,{}),H(e),J(t,e)}function cd(t,e){var r,o;let i=new Set([...Object.keys(t),...Object.keys(e)]),n={};for(let s of i)n[s]=(o=(r=e[s])!=null?r:t[s])!=null?o:void 0;return n}var pr="ui-tv";var Pn=require("@vkontakte/videoplayer-statistics/es2018");var fd=require("@vkontakte/videoplayer-shared/es2018"),vM=require("@vkontakte/videoplayer-statistics/es2018"),Xr=class{constructor(e,i,n,r=new fd.Subscription){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=n;this.statSubscription=r}destroy(){var e,i,n;(e=this.oneStat)==null||e.destroy(),(i=this.thinOneStat)==null||i.destroy(),(n=this.mediascopePixel)==null||n.destroy(),this.statSubscription.unsubscribe()}};var rt=require("@vkontakte/videoplayer-core/es2018"),ve=require("@vkontakte/videoplayer-shared/es2018"),mn=require("@vkontakte/videoplayer-statistics/es2018");var OM=require("@vkontakte/videoplayer-core/es2018");var oe=require("@vkontakte/videoplayer-shared/es2018"),gt=require("@vkontakte/videoplayer-shared/es2018"),wf="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",eo=class{constructor(e,i){this.adman=null;this.initialVolume=1;this.videoElement=null;this.currentAdSection=null;this.actions=null;this.adsState=null;this.playerState=null;this.events={init$:new gt.Subject,loadStarted$:new gt.Subject,loadEnded$:new gt.Subject,loadError$:new gt.Subject,ready$:new gt.Subject,slotRequested$:new gt.Subject,started$:new gt.Subject,timeRemained$:new gt.Subject,paused$:new gt.Subject,resumed$:new gt.Subject,ended$:new gt.Subject,empty$:new gt.Subject,skipped$:new gt.Subject,clicked$:new gt.Subject,closed$:new gt.Subject,error$:new gt.Subject};this.loadAdman=e=>(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,oe.now)()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,n)=>{let r;this.events.loadStarted$.next();let o=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,oe.now)()]}),i(),this.events.loadEnded$.next()):(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,oe.now)()]}),n())};(0,gt.addScript)(wf,e,this.loadTimeout).then(()=>{oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,oe.now)()]}),window.AdmanHTML?(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,oe.now)()]}),i(),this.events.loadEnded$.next()):(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,oe.now)()]}),window.admanAsyncInit=o,r=window.setTimeout(o,this.initTimeout))}).catch(s=>{oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[(0,oe.now)()]}),n(),clearTimeout(r)})});this.loadAdmanNPM=e=>new Promise((i,n)=>{let r;this.events.loadStarted$.next();let o=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,oe.now)()]}),i(),this.events.loadEnded$.next()):(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,oe.now)()]}),n())},s=()=>{a=!0,n()},a=!1,c=window.setTimeout(()=>{oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,oe.now)()]}),s()},this.loadTimeout);e.addEventListener("abort",s),e.aborted&&(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,oe.now)()]}),s()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>ac(pd(),1)).then(()=>{oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(a)],numbers:[(0,oe.now)()]}),!a&&(window.AdmanHTML?(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,oe.now)()]}),i(),this.events.loadEnded$.next()):(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,oe.now)()]}),window.admanAsyncInit=o,r=window.setTimeout(o,this.initTimeout)))},s).finally(()=>{clearTimeout(r),clearTimeout(c),e.removeEventListener("abort",s)})});this.onAdsReady=()=>{oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,oe.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var n;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,oe.now)(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(e),i.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:"ad muted start"})),this.adsState.duration.set(i.duration),this.adsState.playbackState.set("playing"),this.adsState.canSkip.set(i.allowClose),this.adsState.secondsToWatchBeforeSkip.set(i.allowCloseDelay),this.startWatchDog(),(n=this.externalApi)!=null&&n.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=e=>{var n;((n=this.adsState)!=null&&n.playbackState?Te(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{var e;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.stopWatchDog(),this.adsState?(this.log({message:"ad paused"}),this.adsState.playbackState.set("paused")):this.onAdError("Paused callback failed: Adman state is not initialized")};this.onAdPlayed=()=>{var e;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.startWatchDog(),this.adsState?(this.log({message:"ad played"}),this.adsState.playbackState.set("playing")):this.onAdError("Player callback failed: Adman is not initialized")};this.onAdMidrollPoint=()=>{if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,oe.now)()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch(e){this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{var e;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.log({message:"ad completed"}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()};this.onAdClicked=()=>{var e,i;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.log({message:"ad clicked"}),(i=this.videoElement)==null||i.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(e="ad error")=>{oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,oe.now)()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=e.createComponentLog("AdmanWrapper"),oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,oe.now)()]}),this.loadTimeout=i.loadTimeout,this.initTimeout=i.initTimeout,this.runtimeTimeout=i.runtimeTimeout,this.useAdmanFromNPM=i.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(i.volumeMultiplier,1)),this.isVsidOriginal=i.isVsidOriginal}init(e,i,n){this.actions=e,this.adsState=i,this.playerState=n}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(e){var T,b;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,oe.now)(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:n,isAutoplay:r,adsContainer:o,adsVideoElement:s,slotId:a,params:c={},paramsOverride:m={},duration:f,externalApi:l}=e;this.externalApi=l;let u,v=this.playerState&&Te(this.playerState.vsid);v&&(this.isVsidOriginal?u=v:u=parseInt(v,36));let{isEmbed:g,immediateOrigin:h}=(0,oe.detectEmbed)(),y=(T=g?h:window.location.href)!=null?T:window.location.href,$={...c,dl:encodeURIComponent(y),autoplay:r?1:0,player_width:i,player_height:n,...u?{request_id:u}:{},duration:f,...m};$=Object.fromEntries(Object.entries($).filter(([x,A])=>(0,oe.isNonNullable)(A)));let D={slot:a,wrapper:o,videoEl:s,videoQuality:n,params:$,browser:{mobile:!1}};try{let x=new window.AdmanHTML;if(x.onReady(this.onAdsReady),x.onStarted(this.onAdStarted),x.onPlayed(this.onAdPlayed),x.onPaused(this.onAdPaused),x.adMidrollPoint(this.onAdMidrollPoint),x.onClosed(this.onAdClosed),x.onSkipped(this.onAdSkipped),x.onClicked(this.onAdClicked),x.onTimeRemained(this.onAdTimeRemained),x.onCompleted(this.onAdCompleted),x.onError(this.onAdError),x.setDebug(!1),(b=this.externalApi)!=null&&b.videoGetAds){let A=await this.safeExternalCall(this.externalApi.videoGetAds,$);A&&(delete D.slot,delete D.params,Object.assign(D,{json:A}))}x.init(D),this.adman=x,this.videoElement=s,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(D)}`})}catch(x){oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(x)],numbers:[(0,oe.now)()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var n,r,o;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(n=this.currentAdSection)!=null?n:"","force: "+e],numbers:[(0,oe.now)()]}),this.currentAdSection===null&&!e){this.log({message:"switch to video, no currentAdSection. can't switch"});return}let i=this.currentAdSection==="postroll";if(this.actions){if(this.adsState&&this.playerState)this.adsState.playbackState.set("inactive"),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${i}`});else{let s="Switch to video: Adman state was not updated correctly";this.log({message:s}),this.events.error$.next(s)}(o=(r=this.actions).switchFromAdsToVideo)==null||o.call(r,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.adsState){this.log({message:"toggle play"});let i=Te(this.adsState.playbackState);i==="playing"?this.pause():i==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let i=e*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch(n){this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch(i){this.onAdError("could not set ad fullscreen")}}startPreroll(){if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,oe.now)()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch(e){this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){var e;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch(i){this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){var e;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch(i){this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){var e;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch(i){this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){var e;if(oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[(0,oe.now)()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch(i){this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(e,i){var n;(n=this.adman)==null||n.setPosition(Math.floor(e),Math.floor(i))}destroy(){var e,i,n,r,o,s,a,c,m,f,l,u;oe.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,oe.now)()]}),this.log({message:"destroy"}),this.stopWatchDog(),(e=this.adman)==null||e.onReady(void 0),(i=this.adman)==null||i.onStarted(void 0),(n=this.adman)==null||n.onPlayed(void 0),(r=this.adman)==null||r.onPaused(void 0),(o=this.adman)==null||o.adMidrollPoint(void 0),(s=this.adman)==null||s.onClosed(void 0),(a=this.adman)==null||a.onSkipped(void 0),(c=this.adman)==null||c.onClicked(void 0),(m=this.adman)==null||m.onTimeRemained(void 0),(f=this.adman)==null||f.onCompleted(void 0),(l=this.adman)==null||l.onError(void 0),(u=this.adman)==null||u.destroy(),this.videoElement&&(0,gt.clearVideoElement)(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var n;try{return await e(...i)}catch(r){return this.onAdError((n=r==null?void 0:r.message)!=null?n:"External call failed"),null}}};var kn=require("@vkontakte/videoplayer-shared/es2018");var io=require("@vkontakte/videoplayer-shared/es2018"),gd=require("@vkontakte/videoplayer-core/es2018"),hd=require("@vkontakte/videoplayer-statistics/es2018");var vd=(t,e,i)=>{let n=document.createElement("a");n.href=t,n.download=`${e}.${i}`,n.style.display="none",n.click()};var _d=Symbol("storeContext"),yd=t=>{en(_d,t),js==="dev"&&(window.app={store:t})},jt=()=>{let t=Xi(_d);return(0,io.assertNonNullable)(t,"Store context is empty!"),t},Ye=(t,e)=>no(t,t.getValue(),e),no=(t,e,i)=>ai(e,n=>{let r=t.subscribe(o=>{n(o),i==null||i(o)});return()=>r.unsubscribe()}),bd=(t,e,i,n,r=["meta config not provided"])=>{var L,k,E,M,_,R,U,O,P;let o=t.info,{width:s,height:a}=Te(i.ui.playerSize),c=(k=(L=o.throughputEstimation$.getValue())==null?void 0:L.toFixed(0))!=null?k:0,m=(M=(E=o.rttEstimation$.getValue())==null?void 0:E.toFixed(0))!=null?M:0,f=o.isAutoQualityEnabled$.getValue()?"auto":"manual",l=`${Fn} (core: ${gd.VERSION}, stat: ${hd.VERSION}, shared: ${io.VERSION})`,u=Te(i.state.errorLog$),v=u.length?`
|
|
41
|
-
|
|
42
|
-
`,
|
|
43
|
-
|
|
44
|
-
`;return ce+X+ie}).join(`
|
|
45
|
-
`):void 0,g=i.state.isAudioDisabled?"disabled":Te(i.state.isAudioAvailable$)?void 0:"unavailable",h=t.info.currentVideoStream$.getValue(),y=t.info.currentAudioStream$.getValue(),$=[];h&&$.push(`Video: ${(_=h==null?void 0:h.codec)!=null?_:""}`+(h!=null&&h.hdr?" (HDR)":"")),y&&$.push(`Audio: ${(R=y==null?void 0:y.codec)!=null?R:""}`+(y!=null&&y.language?` (${y.language})`:""));let D=o.currentQuality$.getValue(),T="";if(D){let z=o.availableQualitiesFps$.getValue()[D];T=z?`${z}fps`:""}let b=o.httpConnectionType$.getValue(),x=(O=(U=o.currentBuffer$.getValue())==null?void 0:U.end)!=null?O:0,A=Math.max(x-Te(i.state.positionExact$),0),S={Version:l,Browser:navigator.userAgent,Config:r.join(", "),"United video id":String(i.videoId),TraceId:n,VSID:Te(i.vsid),"Content host":o.hostname$.getValue(),"Connection type":b?b+(o.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${c}Kbps @ ${m}ms RTT`,Format:o.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:$.join(", "),Quality:`${f} ${D!=null?D:""} ${T}`,"Available qualities":o.availableQualities$.getValue().join(", "),Audio:g,Position:`${Te(i.state.positionExact$)}s`,Buffer:`${A}s`,State:`${Te(i.playerPhase)} ${(P=o.playbackState$.getValue())!=null?P:""}`,"Player size":`${s}x${a}`,URL:window.location.href,Errors:v};return Object.entries(S).filter(([z,Q])=>Q!==void 0).map(([z,Q])=>`${z}: ${Q}`).join(`
|
|
46
|
-
`)},xd=(t,e,i)=>{var L,k,E,M;let n=t.info,{width:r,height:o}=Te(i.ui.playerSize),s={version:Fn,viewport:`${r}x${o}`,volume:Math.round(Te(i.state.volume$)*100)};s.id=i.videoId,n.currentFormat$.getValue()&&(s.provider=n.currentFormat$.getValue()),n.hostname$.getValue()&&(s.cdn=n.hostname$.getValue());let m=n.intrinsicVideoSize$.getValue();m&&(s.videoSize=`${m.width}x${m.height}`);let f=n.currentBuffer$.getValue(),l=n.currentNativeBuffer$.getValue(),u=n.isLive$.getValue(),v=n.liveBufferTime$.getValue();f&&l&&(u&&v?(s.buffer=f.end-v,s.nativeBuffer=l.end-v):(s.buffer=Math.max(f.end-Te(i.state.positionExact$),0),s.nativeBuffer=Math.max(l.end-Te(i.state.positionExact$),0))),s.position=Te(i.state.positionExact$);let g=n.throughputEstimation$.getValue();g&&(s.speed=g);let h=n.videoBitrate$.getValue();h&&(s.bitrate=h);let y=n.liveLatency$.getValue();y&&(s.liveLatency=y);let $=n.currentVideoSegmentLength$.getValue();$&&(s.currentVideoSegmentLength=$);let D=n.currentAudioSegmentLength$.getValue();D&&(s.currentAudioSegmentLength=D);let T=Te(i.vsid);typeof T=="string"&&(s.vsid=T);let b=(L=t.info.currentVideoStream$.getValue())==null?void 0:L.codec;b&&(s.videoCodec=b);let x=(k=t.info.currentAudioStream$.getValue())==null?void 0:k.codec;x&&(s.audioCodec=x),((E=t.info.currentVideoStream$.getValue())==null?void 0:E.hdr)&&(s.hdr=!0);let S=(M=t.info.currentAudioStream$.getValue())==null?void 0:M.language;return S&&(s.audioLanguage=S),s},Ad=(t,e)=>vd(t,e,"mp4"),Ed=()=>{let e=[],i=0;return{add:(n,r)=>{e[i]=[n,r],i=(i+1)%10},find:n=>e.find(([r])=>r===n)}},to=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let i=await fetch(e,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};function ro(t,e=i=>i){let i=W(t);return[ai(t,o=>{i.subscribe(o)}),o=>{i.set(e(o))}]}var Mf={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},Md=Tf;var Fi=new Map;Fi.set(kn.InterfaceLanguage.EN,Md);Fi.set(kn.InterfaceLanguage.RU,wd);var Td=new Map,ya=({language:t,pack:e,fallback:i})=>{if(Fi.has(t)){let n=Fi.get(t);Fi.set(t,{...n,...e})}else Fi.set(t,e);Td.set(t,i)},ba=t=>Fi.has(t),xa=(t,e,i,n)=>{var s;let r=Fi.get(t),o=r==null?void 0:r[e];if((0,kn.isNullable)(o)){let a=(s=Td.get(t))!=null?s:n,c=a?Fi.get(a):void 0;o=c==null?void 0:c[e]}return(0,kn.isNullable)(o)?e+Object.values(i!=null?i:{}).join(" "):i?o.replaceAll(/{(\w+?)}/g,(a,c)=>{var m;return(m=i[c])!=null?m:""}):o},zt=(t,e)=>{let{interfaceLanguage$:i}=jt(),n=Te(i),r=Zr();return xa(n,t,e,r.defaultLanguage)};var Sd=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,Id=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},Sf=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},Nd=()=>!!Sf();var Dd=t=>{let e=Math.round(t);return isNaN(e)||e<40?"":e>=40&&e<55?50:e>=55&&e<90?60:e>=90&&e<180?120:e>=180?240:""};var tt=require("@vkontakte/videoplayer-shared/es2018"),lT=require("@vkontakte/videoplayer-core/es2018"),If="vk_player_",$d="vk_player_prefer_traffic_saving_enabled",Nf="vk_player_preferred_volume",Df="vk_player_prefer_volume_mute",Ma="vk_player_preferred_quality",Aa="vk_player_preferred_default_quality_settings",Ea="vk_player_preferred_quality_settings_by_video",kd="vk_player_preferred_stream_language",Ld="vk_player_preferred_rate";var wa="vk_player_preferred_subtitles_language",Cf="vk_player_user_video_prefs",dT=`${If}preview_track_close_tooltip`,$f=t=>t>1?1:t<0?0:t;var oo=()=>{let t=tt.safeStorage.get(Nf);return(0,tt.isNullable)(t)?void 0:$f(parseFloat(t))},Ta=(t,e)=>tt.safeStorage.set(Ma,JSON.stringify({videoId:t,value:e})),ao=()=>tt.safeStorage.remove(Ma),Sa=t=>{let e=tt.safeStorage.get(Ma);if((0,tt.isNullable)(e))return;let{videoId:i,value:n}=JSON.parse(e);if(t!==i){ao();return}return n},kf=(t,e)=>{e?tt.safeStorage.set(t,"true"):tt.safeStorage.remove(t)},Od=t=>tt.safeStorage.get(t)==="true";var Pd=()=>Od(Df),Cd=t=>kf($d,t),Ia=()=>Od($d),Rd=()=>tt.safeStorage.get(kd),Vd=t=>tt.safeStorage.set(kd,t),Na=()=>tt.safeStorage.get(wa),Lf=t=>{t?tt.safeStorage.set(wa,t):tt.safeStorage.remove(wa)},jd=t=>tt.safeStorage.set(Ld,JSON.stringify({rate:t})),zd=()=>{let t=tt.safeStorage.get(Ld);if((0,tt.isNullable)(t))return;let{rate:e}=JSON.parse(t);return e};var Of=()=>{let t=f=>{tt.safeStorage.set(Aa,JSON.stringify(f))},e=()=>{try{let f=tt.safeStorage.get(Aa);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=tt.safeStorage.get(Ea);return f?JSON.parse(f):null}catch(f){return null}},n=f=>{tt.safeStorage.set(Ea,JSON.stringify(f))},r=f=>{m(f);let l=f?i():null;if(l&&(l==null?void 0:l.videoId)===f)return{...l,appliesTo:"to-video"};l&&o();let u=e();return u?{...u,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},o=()=>{tt.safeStorage.remove(Ea)},s=()=>{tt.safeStorage.remove(Aa)},a=(f,l="as-default")=>{f.type==="exact_quality"||l==="to-video"?n(f):t(f)},c=f=>{let l=r(f);if(l){switch(l.type){case"traffic_saving":Cd(!0);break;case"exact_quality":Ta(f,l.quality)}o(),s()}},m=f=>{let l=Sa(f);if(l){n({type:"exact_quality",videoId:f,quality:l});return}Ia()&&t({type:"traffic_saving",videoId:f}),Cd(!1),ao()};return{getPreferredQualitySettings:r,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:a,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:o,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:Na,savePreferredSubtitlesLanguage:Lf}},{getPreferredQualitySettings:uT,migrateSettingsToLegacyWay:Ud,savePreferredQualitySettings:cT,savePreferredDefaultQualitySettings:fT,removePreferredQualitySettingsByVideo:pT,getPreferredDefaultQualitySettings:mT}=Of();var Pf=()=>{let t=tt.safeStorage.get(Cf);if(t)try{return JSON.parse(t)}catch(e){return null}return null},so=(t,e)=>{var r,o;let i=Pf();return(o=(r=i==null?void 0:i[t])==null?void 0:r[e])!=null?o:null};var Da=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let n=[],r=e.split(this.twoLinesRegExp);for(let o of r){let s={startTime:0,endTime:0,texts:[],lang:i},a=o.split(this.oneLineRegExp);for(let c of a)if(!s.startTime&&!s.endTime){let m=new lo,{startTime:f,endTime:l}=m.parse(c);s.startTime=f,s.endTime=l}else if(c.trim()!==""){let m=new Ca,{texts:f}=m.parse(c);s.texts=[...s.texts,...f]}(s.startTime||s.endTime)&&s.texts.length>0&&n.push(s)}return n}},lo=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(e){let i={startTime:0,endTime:0},n=this.timingRegExp.exec(e);return n&&(i.startTime=this.calcTime(n[1],n[2],n[3],n[4]),i.endTime=this.calcTime(n[6],n[7],n[8],n[9])),i}parseTime(e){let i=this.timeRegExp.exec(e);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e="0",i="0",n="0",r="0"){let o=Number(e)*60*60,s=Number(i)*60,a=Number(n),c=+`0.${r}`;return o+s+a+c}},Ca=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},r=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let a=0,c=[];for(;a<s.length;){let m=["<",">"].reduce((f,l)=>{let u=s.indexOf(l,a);return f===-1||f>u?u:f},-1);if(m===-1){c.push(s.substring(a));break}c.push(s.substring(a,m)),a=m+1}return c}}),o=new lo;for(let s of r)o.isTime(s)?i.texts.push({type:"timestamp",value:o.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Fd=Da;var co=require("@vkontakte/videoplayer-shared/es2018"),pn,st,$a=0,ka=!1,Hd="",Bd=(t,e=0,i=0)=>t<e&&t<i,uo=(t,e=0,i=0)=>t>=e&&t<=i,Rf=(t,e=0,i=0)=>t>e&&t>i,Qd=(t,e,i,n=!1)=>{var a;let r=(a=i.find(({id:c})=>c===e.value))==null?void 0:a.subtitles;if(n)return r==null?void 0:r.find(({startTime:m,endTime:f})=>uo(t,m,f));let o=t>=$a,s=t<$a;if($a=t,s&&(ka=!1),(0,co.isNonNullable)(pn)&&uo(t,pn.startTime,pn.endTime)&&Hd===e.value)return pn;if(!(0,co.isNonNullable)(st)&&(r!=null&&r.length)&&!ka){st=r.find(({startTime:m,endTime:f})=>uo(t,m,f)||o&&Bd(t,m,f)),pn=void 0,!(0,co.isNonNullable)(st)&&r[r.length-1].endTime<t&&(ka=!0);return}else{if(uo(t,st==null?void 0:st.startTime,st==null?void 0:st.endTime))return pn=st,st=void 0,Hd=e.value,pn;(o&&Rf(t,st==null?void 0:st.startTime,st==null?void 0:st.endTime)||s&&Bd(t,st==null?void 0:st.startTime,st==null?void 0:st.endTime))&&(st=void 0)}};var fo={ru:"Русский",en:"English",uk:"Українська",be:"Беларуская (тарашкевiца)",es:"Español",fi:"Suomi",de:"Deutsch",it:"Italiano",bg:"Български",hr:"Hrvatski",hu:"Magyar",sr:"Српски",pt:"Português",el:"Ελληνικά",pl:"Polski",fr:"Français",ko:"한국어","zh-CN":"汉语",lt:"Lietuvių",ja:"日本語",cs:"Čeština",et:"Eesti",tt:"Татарча",ba:"Башҡортса",cv:"Чăвашла",sk:"Slovenčina",ro:"Română",no:"Norsk",lv:"Latviešu",az:"Azərbaycan dili",hy:"Հայերեն",sv:"Svenska",nl:"Nederlands",tk:"Türkmen",ka:"ქართული",da:"Dansk",uz:"O‘zbek",th:"ภาษาไทย",id:"Bahasa Indonesia",tg:"Тоҷикӣ",sl:"Slovenščina",bs:"Bosanski","pt-BR":"Português brasileiro",fa:"فارسی",vi:"Tiếng Việt",hi:"हिन्दी",si:"සිංහල",bn:"বাংলা",tl:"Tagalog",mn:"Монгол",my:"ဗမာစာ",tr:"Türkçe",ne:"नेपाली",ur:"اردو",ky:"Кыргыз тили",pa:"پنجابی",os:"Ирон",kn:"ಕನ್ನಡ",sw:"Kiswahili",kk:"Қазақша",ar:"العربية",he:"עברית",ab:"Аҧсшәа",eu:"Euskara",eo:"Esperanto"},Vf={abk:"as",ara:"ar",aze:"az",bak:"ba",bel:"be",ben:"bn",bos:"bs",bul:"bg",ces:"cs",chv:"cv",dan:"da",deu:"de",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",fas:"fa",fin:"fi",fra:"fr",heb:"he",hin:"hi",hrv:"hr",hun:"hu",hye:"hy",ind:"id",ita:"it",jpn:"ja",kan:"kn",kat:"ka",kaz:"kk",kir:"ky",kor:"ko",lav:"lv",lit:"lt",mon:"mn",mya:"my",nep:"ne",nld:"nl",nor:"no",oss:"os",pan:"pa",pol:"pl",por:"pt",ron:"ro",rus:"ru",sin:"si",slk:"sk",slv:"sl",spa:"es",srp:"sr",swa:"sw",swe:"sv",tat:"tt",tgk:"tg",tgl:"tl",tha:"th",tuk:"tk",tur:"tr",ukr:"uk",urd:"ur",uzb:"uz",vie:"vi"},La=t=>{var e,i;return(i=(e=fo[t])!=null?e:fo[Vf[t]])!=null?i:void 0};var mr="vk_player_debug_panel_opened";var Yd="videoplayer",Wd="videoplayer";var Mi="off";var Ln=require("@vkontakte/videoplayer-shared/es2018"),jf=5e3;function Gd(){let t=W(!1),e=W(!0),i=()=>{t.set(!0)},n=()=>{t.set(!1)},r=T=>{e.set(T)},[o,s]=ro(!1),[a,c]=ro(!0),[m,f]=ro(!1),l=W(!1),u=(0,Ln.getWindow)().setTimeout(()=>{},0),v=()=>{l.set(!0),(0,Ln.getWindow)().clearTimeout(u),u=(0,Ln.getWindow)().setTimeout(()=>{l.set(!1)},jf)},g=()=>{(0,Ln.getWindow)().clearTimeout(u),l.set(!1)},h=()=>{(0,Ln.getWindow)().clearTimeout(u),l.set(!1)},y=()=>{if(Te(m))return f(!1),!0;let T=Te(l);return h(),T},$=()=>{h()};function D(T){let{state:{isPlaying$:b,isEnded$:x,isLoaderVisible:A,crashed$:S},ui:{settingsVisible:L},ads:{playbackState:k},playerPhase:E}=T;nt([b,x,l,L],([M,_,R,U])=>!U&&(!M||_||R)).subscribe(M=>{s(M),M||g()}),nt([E,A,k,S],([M,_,R,U])=>(M==="video"&&_||M==="ads"&&R==="inactive")&&!U).subscribe(c)}return{state:{touched:W(!1),controls:{prevButton:W(void 0),playButton:W(void 0),replayButton:W(void 0),nextButton:W(void 0),playPrevChapterButton:W(void 0),seekToInteractiveButton:W(void 0),interactiveGraphButton:W(void 0),liveButton:W(void 0),time:W(void 0),episodes:W(void 0),volume:W(void 0),subtitles:W(void 0),settings:W(void 0),context:W(void 0),chromecast:W(void 0),pip:W(void 0),fullscreen:W(void 0),vkLogo:W(void 0),interactiveTimeIndicator:W(void 0),timeline:W(void 0),autoplayNextToggle:W(void 0),"theater-mode-button":W(void 0),additionalButtons:[]},modals:{hotKeyMap:{show:W(!1),data:W({title:"",closeBtnText:"",groups:[]})}},isFullscreen:W(Nd()),isFullscreenOpenedByKeyboard:W(!1),isAutoplay:W(!1),debugPanelVisible:W(!1),episodes:{panelOpened$:W(!1),openedByKeyboard$:W(!1)},contextMenu:{visible$:W(!1),btnRef$:W(void 0),openedByBtnKeyboard$:W(!1),openedByHotKey$:W(!1),lastActiveElem$:W(void 0),showContextMenuBtn$:W(!1),position$:W({top:0,left:0})},playerSize:W({width:0,height:0}),isMobile:W(!1),icon3DVideoVisible:W(!1),scrubbingInProgress:W(!1),volumeChangingInProgress:t,interactiveHideMobileControls:W(!1),overlayContainer$:W(void 0),startedByKeyboard$:W(!1),autoplayNextEnabled$:W(!1),timerNextVideoRunning$:W(!0),settingsMenu:{visible$:W(!1),ref$:W(void 0),openedByBtnKeyboard$:W(!1)},settingsSubMenu:{visible$:W(!1),ref$:W(void 0),name$:W(void 0)},userActionsDisabled:W(!1),hiddenControls:{volume:W(!1),vkLogo:W(!1),pip:W(!1),chromecast:W(!1),settings:W(!1)},isControlsAvailable:e,controlBlocks:{topLeft:W(void 0),topRight:W(void 0),middle:W(void 0),bottom:W(void 0),bottomLeft:W(void 0),bottomRight:W(void 0)},videoTitleInfo:W(void 0),doubleForwardOn$:W(!1),doubleForwardAvailable$:W(!1),previewTrackActive:W(!1),previewTrackDragInProgress:W(!1),previewTrackAvailable:W(!1),isPreviewTrackHorizontallyAligned:W(!1),isShowLoader:a,controlsVisible:o,settingsVisible:m},action:{stopVolumeChanging:n,startVolumeChanging:i,setControlsAvailibility:r,onUserInput:v,clearShowByInput:h,onBackButton:y,setSettingsVisibility:f,onPlay:$},resolveDependency:D}}var qd=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isLiveCatchUpMode:n,statAuthToken:r,isAudioDisabled:o,canDownload:s,callbacks:a,webApi:c,previewThumbsData:m,uiConfig:f,coreConfig:l,player:u,stopPlayer:v,looped:g=!1,statistics:h,saveRate:y,internalsExposure:$,playerId:D,metaConfig:T,app:b,video:x,deviceCapabilities:A})=>{var Os;let S=Gd(),L={...l,isAudioDisabled:o,live:{...(Os=l.live)!=null?Os:{},isLiveCatchUpMode:!!n}},k=f,E=ve.TracerFactory.createRootTracer(!1),M=E.createComponentTracer("Store"),_=u||new rt.Player(L,E,{playerId:D,onDevNullLog:a==null?void 0:a.onDevNullLog});$==null||$.expose({corePlayer:_});let R=new ve.Logger,U=new eo(R,{loadTimeout:k.ads.loadTimeout,initTimeout:k.ads.initTimeout,runtimeTimeout:k.ads.runtimeTimeout,useAdmanFromNPM:k.ads.useAdmanFromNPM,volumeMultiplier:k.ads.volumeMultiplier,isVsidOriginal:k.ads.isVsidOriginal}),O=c==null?void 0:c.focusManager,P=R.createComponentLog("Store"),z,Q,ce={},X=new to,ie=new ve.Subscription,Y="",be=h&&h.oneStat?Ye(h.oneStat.vsid$):ai(void 0),q=()=>Sd(document,rt.clientChecker.device.isIOS),He=W(!1),ae=W([]),_e=(0,ve.merge)(_.events.fatalError$,_.events.managedError$).subscribe(d=>ae.update(p=>[...p,d])),j=ai(!1,d=>{let p=_.events.fatalError$.subscribe(()=>d(!0));return()=>p.unsubscribe()}),Se=async d=>{var te;let p=Object.values(ve.InterfaceLanguage).includes(d);if(k.downloadVKLanguages&&(p&&k.updateBuiltinLanguages||!ba(d))){let se;try{se=await(0,ve.loadVKLangPack)(d,Yd,Wd)}catch(Pe){(te=h==null?void 0:h.oneStat)==null||te.logError({errorType:"VKLangPack",fatal:!1})}se&&(ya({language:d,pack:se,fallback:k.defaultLanguage}),he.set(d),Ae.update(Pe=>Pe+1))}ba(d)&&he.set(d)},he=W(t),Ae=W(0),Be=W(e);Se(t);let ke=(d,p)=>{let V=Te(he);return xa(V,d,p,k.defaultLanguage)},je=W("thumb");je.subscribe(d=>{d==="ads"&&_.info.playbackState$.getValue()&&F()});let I=(()=>{let d=nt([j,je],([p,V])=>p?"crashed":V);return{...d,is:p=>Te(d)===p}})(),C=W(),F=()=>{C.set({muted:_.info.muted$.getValue()})},K=null,le=_.info.isBuffering$,ge=ai(le.getValue(),d=>{let p=le.subscribe(V=>{V&&K===null?K=window.setTimeout(()=>{d(le.getValue()),K=null},k.loaderDelay):d(V)});return()=>{p.unsubscribe(),K&&clearTimeout(K)}});M.log("create store"),P({message:"create store"});let ze=d=>{P({message:`init video, config: ${JSON.stringify(d)}`}),ve.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,ve.now)()]}),_.initVideo(d),M.log("init video"),d.subtitles&&_.setExternalTextTracks(d.subtitles),z=d,Y=d.subtitlesForcedLanguage||""},Qe=new ve.Subject,G=new ve.ValueSubject(mn.SeekAction.UNKNOWN),re=new ve.Subject,fe={actionRewind$:Qe,actionSeek$:G,inFullscreen$:new ve.Observable(d=>S.state.isFullscreen.subscribe(p=>d.next(p))),actionSetSubtitle$:re},Ce=new ve.Subject,w=new ve.Subject,ee={actionSeek$:G,actionSubtitlesSwitched$:Ce,actionQuality$:w,playerSize$:new ve.Observable(d=>S.state.playerSize.subscribe(p=>d.next(p))),inFullscreen$:new ve.Observable(d=>S.state.isFullscreen.subscribe(p=>d.next(p))),isLoaderVisible$:new ve.Observable(d=>ge.subscribe(p=>d.next(p)))};if(h){let{oneStat:d,thinOneStat:p,mediascopePixel:V,statSubscription:te}=h;d&&(te.add(d.attachToUi(fe)),te.add(d.attachToAds(U.events)),d.authorize(r).catch(se=>{P({message:`onestat auth error ${String(se)}`})}),V&&V.attachTo(_)),p&&(te.add(p.attachTo(_,U.events)),te.add(p.attachToUi(ee)),te.add(p.attachToAds(U.events)),p.updateContext({isMobile:Te(S.state.isMobile)}),p.authorize(r))}let de=()=>{if(rt.clientChecker.device.isIOS&&Q)try{Id(Q)}catch(d){P({message:`exitIosSafariFullscreen failed: ${d}`})}};ie.add(_.experimental.element$.subscribe(d=>{d&&(Q=d,d.classList.add("player-media"))})).add(_.events.ended$.subscribe(()=>{var d;de(),(d=a==null?void 0:a.onEnded)==null||d.call(a)})).add(_.events.looped$.subscribe(()=>{var d;(d=a==null?void 0:a.onLooped)==null||d.call(a)})).add(_.events.started$.subscribe(async()=>{var p,V;let d=_.info.muted$.getValue();(p=a==null?void 0:a.onStarted)==null||p.call(a),(V=ce.onStarted)==null||V.call(ce,d)})).add(_.events.willSeek$.subscribe(({from:d,to:p})=>{var V;(V=a==null?void 0:a.onSeek)==null||V.call(a,d,p,G.getValue())})).add(_.events.autoplaySoundProhibited$.subscribe(()=>{var d;(d=a==null?void 0:a.onAutoplaySoundProhibited)==null||d.call(a)})).add(_.info.position$.subscribe(d=>{var V;let p=_.info.duration$.getValue();isFinite(p)&&p>0&&((V=a==null?void 0:a.onTimeupdate)==null||V.call(a,p,d),U.setPosition(d,p))})).add(_.events.fatalError$.subscribe(d=>{var p;(p=a==null?void 0:a.onCrashed)==null||p.call(a,d?`${d.id}: ${d.message}`:void 0)})).add(_.events.fetcherRecoverableError$.subscribe(d=>{var p;(p=a==null?void 0:a.onRecoverableError)==null||p.call(a,d?`${d.id}: ${d.message}`:void 0)})).add(_.events.loadedMetadata$.subscribe(()=>{He.set(!0)})).add(_.info.liveTime$.subscribe(d=>{var p;(p=a==null?void 0:a.onLiveTime)==null||p.call(a,d)})).add(_.info.isStalled$.subscribe(d=>{var p;(p=a==null?void 0:a.onStalledChanged)==null||p.call(a,d)})).add(_.info.isLiveEnded$.subscribe(d=>{var p;return d&&((p=a==null?void 0:a.onLiveEnded)==null?void 0:p.call(a))})).add(U.events.loadStarted$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onLoadStarted)==null?void 0:p.call(d)})).add(U.events.loadEnded$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onLoadEnded)==null?void 0:p.call(d)})).add(U.events.loadError$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onLoadError)==null?void 0:p.call(d)})).add(U.events.init$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onInit)==null?void 0:p.call(d)})).add(U.events.ready$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onReady)==null?void 0:p.call(d)})).add(U.events.started$.subscribe(d=>{var p,V;return(V=(p=a==null?void 0:a.adsInfo)==null?void 0:p.onStarted)==null?void 0:V.call(p,d)})).add(U.events.timeRemained$.subscribe(d=>{var p,V;return(V=(p=a==null?void 0:a.adsInfo)==null?void 0:p.onTimeRemained)==null?void 0:V.call(p,d)})).add(U.events.ended$.subscribe(d=>{var p,V;return(V=(p=a==null?void 0:a.adsInfo)==null?void 0:p.onCompleted)==null?void 0:V.call(p,d)})).add(U.events.empty$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onEmpty)==null?void 0:p.call(d)})).add(U.events.clicked$.subscribe(d=>{var p,V;return(V=(p=a==null?void 0:a.adsInfo)==null?void 0:p.onClicked)==null?void 0:V.call(p,d)})).add(U.events.closed$.subscribe(d=>{var p,V;return(V=(p=a==null?void 0:a.adsInfo)==null?void 0:p.onClosed)==null?void 0:V.call(p,d)})).add(U.events.error$.subscribe(d=>{var p,V;return(V=(p=a==null?void 0:a.adsInfo)==null?void 0:p.onError)==null?void 0:V.call(p,d)})).add(U.events.paused$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onPaused)==null?void 0:p.call(d)})).add(U.events.resumed$.subscribe(()=>{var d,p;return(p=(d=a==null?void 0:a.adsInfo)==null?void 0:d.onResumed)==null?void 0:p.call(d)}));let We=ai(_.info.position$.getValue(),d=>{let p,V,te=()=>{let se=_.info.playbackState$.getValue(),Pe=_.info.isLive$.getValue(),Fe=_.info.duration$.getValue(),Ve=_.info.position$.getValue();if(se&&[rt.PlaybackState.PLAYING,rt.PlaybackState.PAUSED].includes(se)){let St=Pe?Ve-Fe:_.getExactTime();St!==V&&d(St),V=St}p=requestAnimationFrame(te)};return te(),()=>cancelAnimationFrame(p)}),Ue=Ye(_.info.playbackState$),ft=Ye(_.info.isBuffering$),ot=nt([Ue,ft],([d,p])=>p?"buffering":d),ht=Ye(_.info.currentBuffer$),ut=Ye(_.info.isEnded$),Ti=Ye(_.info.isLive$),li=k.features.playbackRate?Ye(_.info.canChangePlaybackSpeed$):ai(!1),Si=Ye(_.info.liveBufferTime$),Li=Ye(_.info.volume$),Ki=Ye(_.info.muted$),Hi=no(_.info.predefinedQualityLimitType$.pipe((0,ve.map)(d=>d===rt.PredefinedQualityLimits.TRAFFIC_SAVING)),_.info.predefinedQualityLimitType$.getValue()===rt.PredefinedQualityLimits.TRAFFIC_SAVING),Ke=no(_.info.predefinedQualityLimitType$.pipe((0,ve.map)(d=>d===rt.PredefinedQualityLimits.HIGH_QUALITY)),_.info.predefinedQualityLimitType$.getValue()===rt.PredefinedQualityLimits.HIGH_QUALITY),Ge=Ye(_.info.autoQualityLimitingAvailable$),pt=Ye(_.info.availableQualities$),xo=Ye(_.info.availableQualitiesFps$),gn=Ye(_.info.currentFormat$),Dt=Ye(_.info.throughputEstimation$),ct=Ye(_.info.videoBitrate$),hn=Ye(_.info.intrinsicVideoSize$),Zi=Ye(_.info.duration$),eu=Ye(_.info.isAudioAvailable$),tu=()=>{K&&clearTimeout(K),K=null},br=nt([Zi,Ti],([d,p])=>p?-d:d),rs=nt([Ue],([d])=>d===rt.PlaybackState.PLAYING),os=Ye(_.info.atLiveEdge$),as=Ye(_.info.atLiveDurationEdge$),ss=Ye(_.info.position$),iu=nt([ss,Zi],([d,p])=>isFinite(d)&&isFinite(p)&&!!p),nu=Ye(_.info.availableVideoStreams$),ls=k.features.audioLanguages?Ye(_.info.availableAudioStreams$):ai([]),ru=Ye(_.info.currentVideoStream$),ds=Ye(_.info.currentAudioStream$),ou=d=>{d.language&&Vd(d.language),_.setVideoStream(d)},us=d=>{_.setAudioStream(d)},cs=d=>{let p;if(d.length===1&&(p=d.at(0)),p!=null||(p=d.find(te=>"isDefault"in te&&te.isDefault)),k.features.userVideoPrefs&&i){let te=so(k.userSalt,String(i));if(te!=null&&te.audioTrackId){let se=d.find(Pe=>Pe.id===te.audioTrackId);p=se!=null?se:p}}let V=Rd();return V&&(p!=null||(p=d.find(({language:te})=>V===te))),p!=null||(p=d.at(0)),p},au=d=>{M.log("change audio stream",{id:d});let p=_.info.availableAudioStreams$.getValue().find(V=>V.id===d);p&&us(p)},fs=!1;ie.add(_.info.availableAudioStreams$.subscribe(d=>{if(!fs&&d.length){let p=cs(d);p&&(_.setAudioStream(p),fs=!0)}})),ls.subscribe(d=>{var p;(p=a==null?void 0:a.onAvailableAudioStreamsChanged)==null||p.call(a,d.map(({label:V="",id:te="",language:se=""})=>({label:V,language:se,id:te})))}),ds.subscribe(d=>{var p;return d&&((p=a==null?void 0:a.onAudioStreamChanged)==null?void 0:p.call(a,d.id))});let ps=!1;ie.add(_.info.availableVideoStreams$.subscribe(d=>{if(!ps&&d.length){let p=cs(d);p&&(_.setVideoStream(p),ps=!0)}}));let xr=W(void 0),ms=Ye(_.info.isAutoQualityEnabled$,d=>d&&xr.set(void 0)),su=Ye(_.info.currentQuality$,()=>xr.set(void 0)),vs=nt([xr,su],([d,p])=>d!=null?d:p),gs=nt(gn,d=>d!==rt.VideoFormat.MPEG),lu=nt([pt,xo,ms,vs,gs],([d,p,V,te,se])=>{let Pe=[];se&&Pe.push({value:"auto",displayValue:ke("auto_quality_option"),selected:V});let Fe=d.filter(Ve=>!(0,ve.isInvariantQuality)(Ve));for(let Ve of Fe){let St=p[Ve];Pe.push({value:Ve,displayValue:`${Ve}${St?Dd(St):""}`,selected:V?!1:Ve===te})}return Pe}),Ao=Ye(_.info.currentPlaybackRate$),Eo=nt([Ao,os,as],([d,p,V])=>{let te=V?1:k.controls.playbackRateMin,se=p?1:k.controls.playbackRateMax,Pe=k.controls.playbackRateStep,Fe=[];for(let Ve=te;Ve<=se;Ve+=Pe)Fe.push({value:Ve,displayValue:Ve===1?ke("playback_rate_1"):ke("playback_rate",{multiplier:Ve.toString(10)}),selected:d===Ve});return Fe}),Ar=()=>({displayValue:ke("subtitles_off"),value:Mi,language:""}),hs=W(Ar()),Bi=nt([hs,Ae],([d],p)=>{d.value===Mi?p(Ar()):p(d)}),wo=k.features.subtitles?Ye(_.info.availableTextTracks$):ai([]),_s=Ed(),du=nt([wo,Bi],([d,p],V)=>{var Pe;let te=[],se=d.find(({id:Fe})=>Fe===p.value);if(se!=null&&se.url){let[,Fe]=(Pe=_s.find(se.url))!=null?Pe:[];if(Fe){V(Fe);return}X.download(se.url).then(Ve=>{if(!Ve||X.isDestroyed())return;let St=new Fd,zn=se.language;if(zn){let Ku=!!se.isAuto,Zu=St.parse(Ve,zn);te.push({lang:zn,subtitles:Zu,isAuto:Ku,id:se.id})}_s.add(se.url,te),Te(Bi).value===p.value&&V(te)}).catch(()=>{var Ve;(Ve=h==null?void 0:h.oneStat)==null||Ve.logError({errorType:"Subtitles download",fatal:!1})})}V(te)}),uu=nt([Ao,rs,Bi],([d,p,V],te)=>{let Fe;if(_.info.isLive$.getValue()&&p&&V.value!==Mi){let St=()=>{let zn=1e3/(3*d);Fe=setTimeout(St,zn),te(Date.now())};return St(),()=>clearTimeout(Fe)}}),ys=nt([wo,Bi],([d,p])=>{if(!d.length)return[];let V=[];for(let{language:te,isAuto:se,id:Pe}of d){let Fe=te&&La(te);te&&Fe&&V.push({displayValue:se?ke("subtitles_auto",{language:Fe}):Fe,value:Pe,selected:(p==null?void 0:p.value)===Pe,isAuto:se,language:te})}return V.length?(V.unshift({...Ar(),selected:(p==null?void 0:p.value)===Mi}),V):[]}),Vn={available:[],prev:[]},cu=()=>{var p,V;let d=_.experimental.getCurrentTime$.getValue();return(V=(p=d==null?void 0:d())!=null?p:Q==null?void 0:Q.currentTime)!=null?V:0},fu=nt([We,Bi,du,uu],([d,p,V,te])=>{var Pe;let se=_.info.isLive$.getValue();if(se&&Vn.prev!==V){let Fe=V.find(({id:St})=>St===p.value),Ve=Vn.prev.find(({id:St})=>St===p.value);if(Fe){let St={...Fe,subtitles:[...(Pe=Ve==null?void 0:Ve.subtitles)!=null?Pe:[],...Fe.subtitles]};Vn.available=[St],Vn.prev=V}}if(p&&p.value!==Mi){let Fe=se?cu():d,Ve=se?Vn.available:V;return Qd(Fe,p,Ve,se)}}),pu=nt([fu],([d])=>d!=null&&d.texts?d.texts:[]);ie.add(Bi.subscribe(d=>{var p,V;if(d.value===Mi)(p=a==null?void 0:a.onSubtitleOff)==null||p.call(a);else{let te=Object.entries(fo).find(([se,Pe])=>Pe===d.displayValue);(V=a==null?void 0:a.onSubtitleOn)==null||V.call(a,te?te[0]:"",d.value)}}));let mu=W(!0),vu=nt([ht,br,ss,Si],([d,p,V,te])=>{var Ve;let se=(Ve=d==null?void 0:d.end)!=null?Ve:0;if(!te)return se/p;let Fe=-V+te-p;return(se-Fe)/p}),bs=Ye(_.info.availableSources$),gu=nt([bs],([d])=>Object.keys((d==null?void 0:d[rt.VideoFormat.MPEG])||{}).length>0),hu=()=>{var V,te,se;let d=Object.keys(((te=(V=_.info.availableSources$)==null?void 0:V.getValue())==null?void 0:te[rt.VideoFormat.MPEG])||{}),p=(0,ve.getHighestQuality)(d)||ve.VideoQuality.Q_144P;return(se=z.sources[rt.VideoFormat.MPEG])==null?void 0:se[p]},_u=()=>{var p;let d=hu();if(d)M.log("download video",{url:d}),Ad(d,((p=z==null?void 0:z.meta)==null?void 0:p.title)||"video");else{let V="There is no URL for download video";M.log("download video",{message:V}),P({message:V})}},yu=()=>{P({message:"toggle muted"});let d=_.info.muted$.getValue();_.info.volume$.getValue()===0&&!d?To(Mo()):jn(!d)},bu=()=>{Je.ui.settingsMenu.visible$.set(!1),M.log("close settings menu")},xu=async(d,p=()=>Promise.resolve())=>{Je.ui.settingsMenu.visible$.set(!0),await p(),M.log("open settings menu",{wasOpenedByKeyboard:d})},Mo=()=>{var p;let d=Math.max(k.volumeMinRestore,(p=oo())!=null?p:0);return d===0?k.volumeDefault:d},To=d=>{let p=d===0?Mo():d,V=_.info.muted$.getValue();P({message:`set volume, volume: ${d}, preferredVolume: ${p}`});let te=!o||I.is("ads");V&&d>0&&te&&(V=!1),_.setVolume(d,V),U.setVolume(d)},jn=d=>{let p=_.info.volume$.getValue();P({message:`set muted, currentVolume: ${p}, mute: ${d}`});let V=I.is("ads");if(_.setMuted(d,V),U.setVolume(d?0:p),!d&&p===0){let te=Mo();_.setVolume(te),U.setVolume(te)}},xs=W(!1),As=d=>{M.log("set looped",{isLooped:d}),xs.set(d),_.setLooped(d)};As(g);let Au=()=>{_.prepare()},Eu=()=>{(0,ve.assertNonNullable)(Je);let d=Te(Je.playerPhase),p={playerPhase:d,isVideoEnded:!1,action:"none"};if(P({message:"toggle play"}),d==="ads"){p.action="play",M.log("toggle adman play",p),U.togglePlay();return}let V=()=>{var se;P({message:"toggle play, call player.play"}),S.action.onPlay(),p.action="play",_.play(),(se=a==null?void 0:a.onPlay)==null||se.call(a)},te=()=>{var se;P({message:"toggle play, call player.pause"}),p.action="pause",_.pause(),(se=a==null?void 0:a.onPause)==null||se.call(a)};_.info.isEnded$.getValue()?(P({message:"toggle play, video ended, seek to 0"}),Qe.next(),G.next(mn.SeekAction.REWIND),_.seekTime(0),V()):_.info.playbackState$.getValue()!==rt.PlaybackState.PLAYING?V():te(),M.log("toggle play",p)},Es=(d,{byUser:p=!1}={})=>{P({message:`set quality, quality: ${d}`}),M.log("set quality",{quality:d}),p&&w.next(d),_.setAutoQuality(d==="auto"),ao(),d!=="auto"&&(Ta(i,d),xr.set(d),_.setQuality(d))},ws=d=>{P({message:`set trafficSavingEnabled, value: ${d}`}),M.log("set traffic saving enabled",{trafficSavingEnabled:d});let p=d?rt.PredefinedQualityLimits.TRAFFIC_SAVING:rt.PredefinedQualityLimits.UNKNOWN;_.setPredefinedQualityLimits(p)},Ms=d=>{P({message:`set highQualityEnabled, value: ${d}`}),M.log("set high quality enabled",{highQualityEnabled:d}),wu(d?rt.PredefinedQualityLimits.HIGH_QUALITY:rt.PredefinedQualityLimits.UNKNOWN)},wu=d=>{_.setPredefinedQualityLimits(d)},So=(d,p=!0)=>{M.log("set playback rate",{playbackRate:d}),_.setPlaybackRate(d),k.features.saveRate&&y&&!_.info.isLive$.getValue()&&p&&jd(d)},Mu=()=>{let d=Te(li),p=Te(Eo),V=p.findIndex(({selected:se})=>se);if(V===p.length-1||!d)return p[V];let te=p[V+1];return So(te.value),te},Tu=()=>{let d=Te(li),p=Te(Eo),V=p.findIndex(({selected:se})=>se);if(V===0||!d)return p[V];let te=p[V-1];return So(te.value),te},Io=(d={...Ar(),selected:!1})=>{M.log("set subtitles",{...d}),d.value!==Mi&&re.next(d.isAuto?d.value+"_auto":d.value),Ce.next({enabled:d.value!==Mi,lang:d.language,auto:!!d.isAuto}),hs.set(d)},Ts=d=>{M.log("toggle subtitles");let p=Te(Bi);(p==null?void 0:p.value)===Mi?Ss(d):Is()},Su=(d,p)=>{M.log("change subtitle",{enabled:d}),d?Ss(!0,p):Is()},Ss=(d,p)=>{M.log("subtitle on");let V=Te(ys),te=Te(he),se=Y!=null?Y:te,Pe;p&&(Pe=V.find(Fe=>Fe.value===p)),Pe!=null||(Pe=V.filter(Fe=>Fe.value!==Mi).find(Fe=>Fe.language===se)),Io(Pe!=null?Pe:V[1])},Is=()=>{M.log("subtitle off"),Io(void 0)};ie.add(_.info.availableTextTracks$.subscribe(d=>{var V;function p(){let te=[];for(let{language:se,isAuto:Pe,id:Fe}of d){let Ve=se&&La(se);se&&Ve&&te.push({id:Fe,language:se,title:Pe?ke("subtitles_auto",{language:Ve}):Ve})}return te}(V=a==null?void 0:a.onAvailableSubtitlesChanged)==null||V.call(a,p())}));let Ns=(d,p,V=!0)=>{var te;if(P({message:`seek to time, time: ${d}`}),M.log("seek to time",{time:d,action:p,forcePrecise:V}),G.next(p),_.info.isLive$.getValue()){let se=_.info.duration$.getValue(),Pe=Math.min(0,se+d);_.seekTime(Pe,V)}else _.info.isEnded$.getValue()&&(P({message:"seek after ended, call callbacks.onPlay"}),(te=a==null?void 0:a.onPlay)==null||te.call(a)),_.seekTime(d,V)},Ds=(d,p,V=!1)=>{P({message:`seek to percent, percent: ${d}`}),M.log("seek to percent",{percent:d,action:p});let te=Te(br)*d;Ns(te,p,V)},Iu=d=>{P({message:`seek external, time: ${d}`}),M.log("seek external",{time:d}),G.next(mn.SeekAction.UNKNOWN),_.seekTime(_.info.isLive$.getValue()?-d:d)},Nu=d=>{var te,se;let p=(te=d.max)!=null?te:"none",V=(se=d.min)!=null?se:"none";P({message:`set auto quality limitation. Max: ${p}. Min: ${V}`}),M.log("set auto quality limits",{max:p,min:V}),_.setAutoQualityLimits(d)},Du=d=>{P({message:`set playback rate to: ${d}`}),M.log("set playback rate external",{playbackRate:d}),_.setPlaybackRate(d)},No=W(void 0),Cu=d=>{P({message:`start scrubbing, progress: ${d}`}),M.log("start scrubbing",{progress:d}),S.state.scrubbingInProgress.set(!0),Cs(d)},Cs=d=>{No.set(d)},$u=()=>{No.set(void 0),S.state.scrubbingInProgress.set(!1)},ku=(d,p=!1)=>{P({message:`complete scrubbing, progress: ${d}`}),M.log("complete scrubbing",{progress:d}),Ds(d,mn.SeekAction.SLIDER,p),$u()},Lu=nt([We,br,No],([d,p,V],te)=>{te((0,ve.isNonNullable)(V)?V*p:d)}),Ou=d=>{G.next(mn.SeekAction.LIVE),P({message:"live switch to low latency "+d}),M.log("live switch to low latency "+d),_.setLiveLowLatency(d)},Pu=()=>{G.next(mn.SeekAction.LIVE),P({message:"switch to active live"}),M.log("switch to active live"),_.seekTime(0),_.info.playbackState$.getValue()!==rt.PlaybackState.PLAYING&&Je.actions.internal.togglePlay()},Ru=()=>{M.log("skip adman"),U.skip()},Vu=(d=!0)=>{var te;(0,ve.assertNonNullable)(Je),P({message:`switch from ads to video, callPlay: ${d}`}),M.log("switch from ads to video",{callPlay:d}),je.set("video"),d&&_.play(),o&&jn(!0);let p=(te=Te(C))==null?void 0:te.muted,V=!_.info.muted$.getValue();p!==void 0&&!V&&jn(p),C.set(void 0)},ju=()=>{(0,ve.assertNonNullable)(Je),P({message:"switch from video to ads"}),M.log("switch from video to ads"),Je.actions.internal.pause(),de(),je.set("ads")},zu=d=>{(0,ve.assertNonNullable)(Je);let p=d?"LiveWaitingStart":"thumb";M.log("set live waiting start",{state:d,playerPhase:p}),je.set(p)},Uu=d=>{(0,ve.assertNonNullable)(Je);let p=d?"LiveWaitingRecover":"thumb";M.log("set live waiting recover",{state:d,playerPhase:p}),je.set(p)},Fu=d=>{(0,ve.assertNonNullable)(Je);let p=d?"LiveWaitingRecord":"thumb";M.log("set live waiting record",{state:d,playerPhase:p}),je.set(p)},Hu=()=>((0,ve.assertNonNullable)(Je),M.log("get debug text data"),bd(_,z,Je,E.getTraceId(),T)),Bu=()=>((0,ve.assertNonNullable)(Je),JSON.stringify(E.getFinishedSpans())),Qu=()=>((0,ve.assertNonNullable)(Je),xd(_,z,Je)),Yu=()=>Q,$s=d=>{var V;if((0,ve.assertNonNullable)(Je),_.info.isEnded$.getValue())return;let p=!d;if(Te(Je.playerPhase)==="ads"){P({message:`pause ads, internalCall: ${p}`}),M.log("pause ads",{internalCall:p}),U.pause();return}P({message:`pause video, internalCall: ${p}`}),M.log("pause video",{internalCall:p}),p&&((V=a==null?void 0:a.onPause)==null||V.call(a)),_.pause()},ks=d=>{var V;(0,ve.assertNonNullable)(Je);let p=!d;if(Te(Je.playerPhase)==="ads"){P({message:`play ads, internalCall: ${p}`}),M.log("play ads",{internalCall:p}),U.play();return}P({message:`play video, internalCall: ${p}`}),M.log("play video",{internalCall:p}),p&&((V=a==null?void 0:a.onPlay)==null||V.call(a)),_.play()},Wu=d=>{(0,ve.assertNonNullable)(Je);let p=!d;if(Te(Je.playerPhase)==="ads"){P({message:"player cannot be stopped during ads via external method"});return}P({message:`player will be stopped, internalCall: ${p}`}),v==null||v()},Ls=(d,p)=>{(0,ve.assertNonNullable)(Je),P({message:`first start, show ads: ${d}, internalCall: ${!p}`}),M.log("first start",{showAds:d,external:p}),d?je.set("ads"):(je.set("video"),p?_.play():Je.actions.internal.togglePlay())},Gu=()=>(P({message:"getting preview thumbs data"}),M.log("get preview thumbs data",{...m}),m),qu=()=>{M.log("destroy store"),ie.unsubscribe(),_.destroy(),U.destroy(),h==null||h.destroy(),_e.unsubscribe(),X.destroy()},Je={interfaceLanguage$:he,isCyrillicRelatedInterface$:Be,initVideo:ze,videoId:i,playerPhase:I,vsid:be,i18n:ke,app:b,video:(0,ve.cloneDeep)(x),state:{positionExact$:We,positionWithScrubbing$:Lu,duration$:br,playbackState$:Ue,playbackStateRealistic$:ot,isPlaying$:rs,isLoaderVisible:ge,bufferedProgress$:vu,isLive$:Ti,canChangePlaybackSpeed$:li,isActiveLive$:os,isOldestAvailableLive$:as,isRewindableLive$:iu,isEnded$:ut,muted$:Ki,volume$:Li,trafficSavingEnabled$:Hi,highQualityEnabled$:Ke,autoQualityLimitingAvailable$:Ge,availableVideoStreams$:nu,availableAudioStreams$:ls,videoStream$:ru,audioStream$:ds,currentQuality$:vs,isAutoQualityEnabled$:ms,availableQualities$:lu,currentPlaybackRate$:Ao,availablePlaybackRates$:Eo,currentSubtitle$:Bi,availableTextTracks$:wo,availableSubtitlesList$:ys,currentSubtitleCaptions$:pu,isAutoSubtitleCaptionVisible$:mu,currentFormat$:gn,throughputEstimation$:Dt,videoBitrate$:ct,videoSize$:hn,errorLog$:ae,crashed$:j,isAudioAvailable$:eu,isAudioDisabled:!!o,canDownload:k.features.download&&!!s,availableSources$:bs,hasMpegSources$:gu,looped$:xs,loadedMetadata$:He,isAutoQualityAvailable$:gs},ui:S.state,ads:{position:W(0),duration:W(0),playbackState:W("inactive"),canSkip:W(!1),secondsToWatchBeforeSkip:W(0),postrollPassed:W(!1)},webApi:{focusManager:O},actions:{internal:{preload:Au,firstStart:d=>Ls(d,!1),play:()=>ks(!1),pause:()=>$s(!1),togglePlay:Eu,toggleMuted:yu,openSettingsMenu:xu,closeSettingsMenu:bu,setVolume:d=>To(d),setMuted:d=>jn(d),startVolumeChanging:S.action.startVolumeChanging,stopVolumeChanging:S.action.stopVolumeChanging,onUserInput:S.action.onUserInput,setSettingsVisibility:S.action.setSettingsVisibility,clearShowByInput:S.action.clearShowByInput,onBackButton:S.action.onBackButton,setVideoStream:ou,setAudioStream:d=>us(d),setQuality:(d,p)=>Es(d,p),setTrafficSavingEnabled:d=>ws(d),setHighQualityEnabled:d=>Ms(d),setPlaybackRate:So,incrementPlaybackRate:Mu,decrementPlaybackRate:Tu,setSubtitle:d=>Io(d),toggleSubtitle:()=>Ts(!1),startScrubbing:Cu,progressScrubbing:Cs,completeScrubbing:ku,switchToActiveLive:Pu,switchFromAdsToVideo:Vu,switchFromVideoToAds:ju,skipAd:Ru,setLiveWaitingStart:zu,setLiveWaitingRecover:Uu,setLiveWaitingRecord:Fu,getDebugTextData:Hu,getTraceTextData:Bu,getDebugPanelData:Qu,getVideoElement:Yu,seekTime:(d,p,V)=>Ns(d,p,V),clearDelayedBufferingCheckTimeout:tu,seekToPercent:Ds,getPreviewThumbsData:Gu,downloadVideo:_u,addLanguage:ya,setLanguage:Se,setLooped:As,checkFullscreenSupport:q},external:{firstStart:d=>Ls(d,!0),play:()=>ks(!0),pause:()=>$s(!0),stop:()=>Wu(!0),seekTime:d=>Iu(d),setPlaybackRate:d=>Du(d),setAutoQualityLimits:d=>Nu(d),setMuted:d=>jn(d),toggleSubtitle:()=>Ts(!0),changeSubtitle:Su,setVolume:d=>To(d),setLiveLowLatency:Ou,hideControls:()=>S.action.setControlsAvailibility(!1),showControls:()=>S.action.setControlsAvailibility(!0),setQuality:d=>Es(d),setTrafficSavingEnabled:d=>ws(d),setHighQualityEnabled:d=>Ms(d),changeAudioStream:au}},callbacks:a,setUiCallbacks:d=>{ce={...d}},getAdmanWrapper:()=>U,getLogger:()=>R,getPlayer:()=>_,deviceCapabilities:A,destroy:qu};return S.resolveDependency(Je),Je};var Xd=require("@vkontakte/videoplayer-core/es2018"),is=require("@vkontakte/videoplayer-core/es2018"),_r=require("@vkontakte/videoplayer-shared/es2018");var po=class{constructor(e){this.value=e,this.next=null}};var On=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new po(e);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],i=this.bottom;for(;i;)e.push(i.value),i=i.next;return e}};var Uf=ue('<div class="container s-c"><canvas class="s-c"></canvas></div>'),Ff={hash:"s-c",code:".container.s-c{display:inline-block;height:16px;width:120px}canvas.s-c{margin-top:2px;transform:scaleY(-1)}"};function vr(t,e){Ee(e,!0),Re(t,Ff);let i=et(e,"values",19,()=>[]),n=Oe(void 0),r=Oe(null),o=16,s=120,a=60,c=s/a;wi(()=>{N(n).width=s,N(n).height=o,pe(r,N(n).getContext("2d"),!0)});function m(u,v,g,h,y){y===0&&(y=1),u.fillStyle="#fff",u.fillRect(v,g,h,y)}Rt(()=>{let u="";if(N(r)){let v=i()[0];for(let h=1;h<i().length;h++)i()[h]>v&&(v=i()[h]);N(r).clearRect(0,0,s,o);let g=a-1;for(let h=i().length-1;h>=0;h--){let y=g*c,$=v>0?o*(i()[h]/v):0;m(N(r),y,0,c,$),u=$+" "+u,g--}}});var f=Uf(),l=B(f);oi(l,u=>pe(n,u),()=>N(n)),H(f),J(t,f),we()}var Pa=require("@vkontakte/videoplayer-shared/es2018");var Hf=(t,e)=>{t.stopPropagation(),Pa.safeStorage.remove(mr),e.set(!1)},Bf=ue('<div class="s-3"><div class="s-3">Video id</div> <span> </span></div>'),Qf=ue('<div class="s-3"><div class="s-3">VSID</div> <span> </span></div>'),Yf=ue('<div class="s-3"><div class="s-3">Provider</div> <span> </span></div>'),Wf=ue('<div class="s-3"><div class="s-3">Streams</div> <span> </span></div>'),Gf=ue('<div class="s-3"><div class="s-3">Viewport</div> <span> </span></div>'),qf=ue('<div class="s-3"><div class="s-3">Video size</div> <span> </span></div>'),Kf=ue('<div class="s-3"><div class="s-3">CDN host</div> <span> </span></div>'),Zf=ue('<div class="s-3"><div class="s-3">Volume</div> <span> </span></div>'),Jf=ue('<div class="s-3"><div class="s-3">Position</div> <span> </span></div>'),Xf=ue('<div class="s-3"><div class="s-3">Buffer</div> <span> </span></div>'),ep=ue('<div class="s-3"><div class="s-3">Nbuffer</div> <span> </span></div>'),tp=ue('<div class="s-3"><div class="s-3">Live latency</div> <span> </span></div>'),ip=ue('<div class="s-3"><div class="s-3">Segment</div> <span> </span></div>'),np=ue('<div class="s-3"><div class="s-3">Network</div> <!> <span> </span></div>'),rp=ue('<div class="s-3"><div class="s-3">V bitrate</div> <!> <span> </span></div>'),op=ue('<div class="container s-3" role="region"><button class="close s-3" title="закрыть">[x]</button> <div class="content s-3"><div class="s-3"><div class="s-3">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-3"><div class="s-3">Dropped</div> <span> </span></div> <!> <!> <div class="s-3"><div class="s-3">FPS</div> <!> <span> </span></div></div></div>'),ap={hash:"s-3",code:".container.s-3{background:rgba(28,28,28,.8);border-radius:4px;font-size:10px;left:20px;min-width:160px;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container.s-3,button.close.s-3{color:#fff;position:absolute}button.close.s-3{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-3{padding:5px}.content.s-3>div:where(.s-3)>div:where(.s-3){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function Ra(t,e){Ee(e,!0),Re(t,ap);let i=jt(),n=i.ui.debugPanelVisible,r=Oe(kt(i.actions.internal.getDebugPanelData())),o=i.actions.internal.getVideoElement(),s=Oe(0),a=Oe(0),c=Oe(0),m=new On(60),f=new On(60),l=new On(60),u=Oe(kt([])),v=Oe(kt([])),g=Oe(kt([])),h=zt("aria_label_debug_panel");wi(()=>{Pa.safeStorage.set(mr,"true"),o&&(pe(a,o.getVideoPlaybackQuality().droppedVideoFrames,!0),pe(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let G=window.setInterval(()=>{pe(r,i.actions.internal.getDebugPanelData(),!0)},500),re;return o&&(re=window.setInterval(()=>{if(o){pe(a,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let fe=o.getVideoPlaybackQuality().totalVideoFrames;pe(c,fe-N(s)),pe(s,fe,!0),m.push(N(c)),N(r).speed&&f.push(N(r).speed),N(r).bitrate&&l.push(N(r).bitrate),pe(u,m.getValuesFromBottom(),!0),pe(v,f.getValuesFromBottom(),!0),pe(g,l.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(G),re&&clearInterval(re)}});var y=op(),$=B(y);$.__click=[Hf,n];var D=ne($,2),T=B(D),b=ne(B(T),2),x=B(b,!0);H(b),H(T);var A=ne(T,2);{var S=G=>{var re=Bf(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(()=>Ne(Ce,N(r).id)),J(G,re)};De(A,G=>{N(r).id&&G(S)})}var L=ne(A,2);{var k=G=>{var re=Qf(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(()=>Ne(Ce,N(r).vsid)),J(G,re)};De(L,G=>{N(r).vsid&&G(k)})}var E=ne(L,2);{var M=G=>{var re=Yf(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(()=>Ne(Ce,N(r).provider)),J(G,re)};De(E,G=>{N(r).provider&&G(M)})}var _=ne(E,2);{var R=G=>{var re=Wf(),fe=ne(B(re),2),Ce=B(fe);H(fe),H(re),ye(()=>{var w,ee;return Ne(Ce,`Video: ${(w=N(r).videoCodec||"")!=null?w:""} ${N(r).hdr?"(HDR)":""}
|
|
36
|
+
https://svelte.dev/e/lifecycle_double_unmount`,Mi,Ni):console.warn(`https://svelte.dev/e/lifecycle_double_unmount`)}function Ri(e){P?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
37
|
+
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
38
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,Mi,Ni):console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`)}function zi(){P?console.warn(`%c[svelte] state_proxy_unmount
|
|
39
|
+
%cTried to unmount a state proxy, rather than a component
|
|
40
|
+
https://svelte.dev/e/state_proxy_unmount`,Mi,Ni):console.warn(`https://svelte.dev/e/state_proxy_unmount`)}function Bi(){P?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",Mi,Ni):console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var F=!1;function Vi(e){F=e}var I;function Hi(e){if(e===null)throw Ii(),Oi;return I=e}function Ui(){return Hi(ws(I))}function L(e){if(F){if(ws(I)!==null)throw Ii(),Oi;I=e}}function Wi(e=1){if(F){for(var t=e,n=I;t--;)n=ws(n);I=n}}function Gi(e=!0){for(var t=0,n=I;;){if(n.nodeType===qr){var r=n.data;if(r===Di){if(t===0)return n;--t}else (r===wi||r===Ti||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ws(n);e&&n.remove(),n=i}}function Ki(e){if(!e||e.nodeType!==qr)throw Ii(),Oi;return e.data}function qi(e){return e===this.v}function Ji(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Yi(e){return!Ji(e,this.v)}var Xi=!1,Zi=!1,Qi=!1;function $i(){Zi=!0}var ea=null;function ta(e,t){return e.label=t,na(e.v,t),e}function na(e,t){var n;return e==null||(n=e[Ur])==null||n.call(e,t),e}function ra(e){let t=Error(),n=ia();return n.length===0?null:(n.unshift(`
|
|
41
|
+
`),ar(t,`stack`,{value:n.join(`
|
|
42
|
+
`)}),ar(t,`name`,{value:e}),t)}function ia(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=Error().stack;if(Error.stackTraceLimit=e,!t)return[];let n=t.split(`
|
|
43
|
+
`),r=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.replaceAll(`\\`,`/`);if(t.trim()!==`Error`){if(t.includes(`validate_each_keys`))return[];i.includes(`svelte/src/internal`)||i.includes(`node_modules/.vite`)||r.push(t)}}return r}var aa=null;function oa(e){aa=e}var sa=null;function ca(e){sa=e}var la=null;function ua(e){la=e}function da(e){return ga(`getContext`).get(e)}function fa(e,t){let n=ga(`setContext`);if(Xi){var r=U.f;!H&&(r&br)!==0&&!aa.i||si()}return n.set(e,t),t}function pa(e,t=!1,n){aa={p:aa,i:!1,c:null,e:null,s:e,x:null,l:Zi&&!t?{s:null,u:null,$:[]}:null},P&&(aa.function=n,la=n)}function ma(e){var t=aa,n=t.e;if(n!==null){t.e=null;for(var r of n)Ls(r)}return e!==void 0&&(t.x=e),t.i=!0,aa=t.p,P&&(la=aa?.function??null),e??{}}function ha(){return!Zi||aa!==null&&aa.l===null}function ga(e){var t;return aa===null&&Yr(e),(t=aa).c??(t.c=new Map(_a(aa)||void 0))}function _a(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var va=[];function ya(){var e=va;va=[],pr(e)}function ba(e){if(va.length===0&&!Ia){var t=va;queueMicrotask(()=>{t===va&&ya()})}va.push(e)}var xa=new WeakMap;function Sa(e){var t=U;if(t===null)return H.f|=zr,e;if(P&&e instanceof Error&&!xa.has(e)&&xa.set(e,wa(e,t)),(t.f&kr)===0&&(t.f&gr)===0)throw P&&!t.parent&&e instanceof Error&&Ta(e),e;Ca(e,t)}function Ca(e,t){for(;t!==null;){if((t.f&Sr)!==0){if((t.f&kr)===0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw P&&e instanceof Error&&Ta(e),e}function wa(e,t){let n=or(e,`message`);if(!(n&&!n.configurable)){for(var r=vs?` `:` `,i=`
|
|
44
|
+
${r}in ${t.fn?.name||`<unknown>`}`,a=t.ctx;a!==null;)i+=`
|
|
45
|
+
${r}in ${a.function?.[Ai].split(`/`).pop()}`,a=a.p;return{message:e.message+`
|
|
46
|
+
${i}
|
|
47
|
+
`,stack:e.stack?.split(`
|
|
48
|
+
`).filter(e=>!e.includes(`svelte/src/internal`)).join(`
|
|
49
|
+
`)}}}function Ta(e){let t=xa.get(e);t&&(ar(e,`message`,{value:t.message}),ar(e,`stack`,{value:t.stack}))}var Ea=~(Tr|Er|wr);function Da(e,t){e.f=e.f&Ea|t}function Oa(e){(e.f&Cr)!==0||e.deps===null?Da(e,wr):Da(e,Er)}function ka(e){if(e!==null)for(let t of e)(t.f&hr)===0||(t.f&Ir)===0||(t.f^=Ir,ka(t.deps))}function Aa(e,t,n){(e.f&Tr)===0?(e.f&Er)!==0&&n.add(e):t.add(e),ka(e.deps),Da(e,wr)}var ja=new Set,Ma=null,Na=null,Pa=[],Fa=null,Ia=!1,La=null,Ra=new WeakMap,za=new WeakMap,Ba=new WeakMap,Va=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,qa=new WeakSet;class Ja{constructor(){t(this,qa),e(this,`current`,new Map),e(this,`previous`,new Map),n(this,Ra,new Set),n(this,za,new Set),n(this,Ba,0),n(this,Va,0),n(this,Ha,null),n(this,Ua,new Set),n(this,Wa,new Set),n(this,Ga,new Map),e(this,`is_fork`,!1),n(this,Ka,!1)}skip_effect(e){r(Ga,this).has(e)||r(Ga,this).set(e,{d:[],m:[]})}unskip_effect(e){var t=r(Ga,this).get(e);if(t){r(Ga,this).delete(e);for(var n of t.d)Da(n,Tr),ao(n);for(n of t.m)Da(n,Er),ao(n)}}process(e){Pa=[],this.apply();var t=La=[],n=[];for(let r of e)i(qa,this,Xa).call(this,r,t,n);if(La=null,i(qa,this,Ya).call(this)){i(qa,this,Za).call(this,n),i(qa,this,Za).call(this,t);for(let[e,t]of r(Ga,this))oo(e,t)}else{Ma=null;for(let e of r(Ra,this))e(this);r(Ra,this).clear(),r(Ba,this)===0&&i(qa,this,Qa).call(this),no(n),no(t),r(Ua,this).clear(),r(Wa,this).clear(),r(Ha,this)?.resolve()}Na=null}capture(e,t){t!==ki&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&zr)===0&&(this.current.set(e,e.v),Na?.set(e,e.v))}activate(){Ma=this,this.apply()}deactivate(){Ma===this&&(Ma=null,Na=null)}flush(){if(Pa.length>0)Ma=this,$a();else if(r(Ba,this)===0&&!this.is_fork){for(let e of r(Ra,this))e(this);r(Ra,this).clear(),i(qa,this,Qa).call(this),r(Ha,this)?.resolve()}this.deactivate()}discard(){for(let e of r(za,this))e(this);r(za,this).clear()}increment(e){a(Ba,this,r(Ba,this)+1),e&&a(Va,this,r(Va,this)+1)}decrement(e){a(Ba,this,r(Ba,this)-1),e&&a(Va,this,r(Va,this)-1),!r(Ka,this)&&(a(Ka,this,!0),ba(()=>{a(Ka,this,!1),i(qa,this,Ya).call(this)?Pa.length>0&&this.flush():this.revive()}))}revive(){for(let e of r(Ua,this))r(Wa,this).delete(e),Da(e,Tr),ao(e);for(let e of r(Wa,this))Da(e,Er),ao(e);this.flush()}oncommit(e){r(Ra,this).add(e)}ondiscard(e){r(za,this).add(e)}settled(){return(r(Ha,this)??a(Ha,this,mr())).promise}static ensure(){if(Ma===null){let e=Ma=new Ja;ja.add(Ma),Ia||ba(()=>{Ma===e&&e.flush()})}return Ma}apply(){if(!(!Xi||!this.is_fork&&ja.size===1)){Na=new Map(this.current);for(let e of ja)if(e!==this)for(let[t,n]of e.previous)Na.has(t)||Na.set(t,n)}}}function Ya(){return this.is_fork||r(Va,this)>0}function Xa(e,t,n){e.f^=wr;for(var i=e.first;i!==null;){var a=i.f,o=(a&(br|xr))!==0;if(!(o&&(a&wr)!==0||(a&Dr)!==0||r(Ga,this).has(i))&&i.fn!==null){o?i.f^=wr:(a&gr)===0?Xi&&(a&(_r|vr))!==0?n.push(i):yc(i)&&((a&yr)!==0&&r(Wa,this).add(i),wc(i)):t.push(i);var s=i.first;if(s!==null){i=s;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}}function Za(e){for(var t=0;t<e.length;t+=1)Aa(e[t],r(Ua,this),r(Wa,this))}function Qa(){if(ja.size>1){this.previous.clear();var e=Ma,t=Na,n=!0;for(let e of ja){if(e===this){n=!1;continue}let t=[];for(let[r,i]of this.current){if(e.current.has(r))if(n&&i!==e.current.get(r))e.current.set(r,i);else continue;t.push(r)}if(t.length===0)continue;let r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){var a=Pa;Pa=[];let n=new Set,o=new Map;for(let e of t)ro(e,r,n,o);if(Pa.length>0){Ma=e,e.apply();for(let t of Pa)i(qa,e,Xa).call(e,t,[],[]);e.deactivate()}Pa=a}}Ma=e,Na=t}r(Ga,this).clear(),ja.delete(this)}function $a(){var e=P?new Set:null;try{for(var t=0;Pa.length>0;){var n=Ja.ensure();if(t++>1e3){if(P){var r=new Map;for(let e of n.current.keys())for(let[t,n]of e.updated??[]){var i=r.get(t);i||(i={error:n.error,count:0},r.set(t,i)),i.count+=n.count}for(let e of r.values())e.error&&console.error(e.error)}eo()}if(n.process(Pa),$o.clear(),P)for(let t of n.current.keys())e.add(t)}}finally{if(Pa=[],Fa=null,La=null,P)for(let t of e)t.updated=null}}function eo(){try{ri()}catch(e){P&&ar(e,`stack`,{value:``}),Ca(e,Fa)}}var to=null;function no(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Or|Dr))===0&&yc(r)&&(to=new Set,wc(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Ys(r),to?.size>0)){$o.clear();for(let e of to){if((e.f&(Or|Dr))!==0)continue;let t=[e],n=e.parent;for(;n!==null;)to.has(n)&&(to.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];(n.f&(Or|Dr))===0&&wc(n)}}to.clear()}}to=null}}function ro(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;(e&hr)===0?(e&(Rr|yr))!==0&&(e&Tr)===0&&io(i,t,r)&&(Da(i,Tr),ao(i)):ro(i,t,n,r)}}function io(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(rr.call(t,r))return!0;if((r.f&hr)!==0&&io(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function ao(e){var t=Fa=e,n=t.b;if(n?.is_pending&&(e.f&(gr|_r|vr))!==0&&(e.f&kr)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(La!==null&&t===U&&(Xi||(e.f&_r)===0))return;if((r&(xr|br))!==0){if((r&wr)===0)return;t.f^=wr}}Pa.push(t)}function oo(e,t){if(!((e.f&br)!==0&&(e.f&wr)!==0)){(e.f&Tr)===0?(e.f&Er)!==0&&t.m.push(e):t.d.push(e),Da(e,wr);for(var n=e.first;n!==null;)oo(n,t),n=n.next}}function so(e){let t=0,n=rs(0),r;return P&&ta(n,`createSubscriber version`),()=>{Ps()&&(W(n),Vs(()=>(t===0&&(r=Dc(()=>e(()=>cs(n)))),t+=1,()=>{ba(()=>{--t,t===0&&(r?.(),r=void 0,cs(n))})})))}}var co=Ar|Nr;function lo(e,t,n,r){new Oo(e,t,n,r)}var uo=new WeakMap,fo=new WeakMap,po=new WeakMap,mo=new WeakMap,ho=new WeakMap,go=new WeakMap,_o=new WeakMap,vo=new WeakMap,yo=new WeakMap,bo=new WeakMap,xo=new WeakMap,So=new WeakMap,Co=new WeakMap,wo=new WeakMap,To=new WeakMap,Eo=new WeakMap,Do=new WeakSet;class Oo{constructor(o,s,c,l){t(this,Do),e(this,`parent`,void 0),e(this,`is_pending`,!1),e(this,`transform_error`,void 0),n(this,uo,void 0),n(this,fo,F?I:null),n(this,po,void 0),n(this,mo,void 0),n(this,ho,void 0),n(this,go,null),n(this,_o,null),n(this,vo,null),n(this,yo,null),n(this,bo,0),n(this,xo,0),n(this,So,!1),n(this,Co,new Set),n(this,wo,new Set),n(this,To,null),n(this,Eo,so(()=>(a(To,this,rs(r(bo,this))),P&&ta(r(To,this),`$effect.pending()`),()=>{a(To,this,null)}))),a(uo,this,o),a(po,this,s),a(mo,this,e=>{var t=U;t.b=this,t.f|=Sr,c(e)}),this.parent=U.b,this.transform_error=l??this.parent?.transform_error??(e=>e),a(ho,this,Hs(()=>{if(F){let e=r(fo,this);Ui();let t=e.data===Ti;if(e.data.startsWith(Ei)){let t=JSON.parse(e.data.slice(Ei.length));i(Do,this,Ao).call(this,t)}else t?i(Do,this,jo).call(this):i(Do,this,ko).call(this)}else i(Do,this,Mo).call(this)},co)),F&&a(uo,this,I)}defer_effect(e){Aa(e,r(Co,this),r(wo,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!r(po,this).pending}update_pending_count(e){i(Do,this,Fo).call(this,e),a(bo,this,r(bo,this)+e),!(!r(To,this)||r(So,this))&&(a(So,this,!0),ba(()=>{a(So,this,!1),r(To,this)&&os(r(To,this),r(bo,this))}))}get_effect_pending(){return r(Eo,this).call(this),W(r(To,this))}error(e){var t=r(po,this).onerror;let n=r(po,this).failed;if(!t&&!n)throw e;r(go,this)&&(qs(r(go,this)),a(go,this,null)),r(_o,this)&&(qs(r(_o,this)),a(_o,this,null)),r(vo,this)&&(qs(r(vo,this)),a(vo,this,null)),F&&(Hi(r(fo,this)),Wi(),Hi(Gi()));var o=!1,s=!1;let c=()=>{if(o){Bi();return}o=!0,s&&di(),r(vo,this)!==null&&Xs(r(vo,this),()=>{a(vo,this,null)}),i(Do,this,Po).call(this,()=>{Ja.ensure(),i(Do,this,Mo).call(this)})},l=e=>{try{s=!0,t?.(e,c),s=!1}catch(e){Ca(e,r(ho,this)&&r(ho,this).parent)}n&&a(vo,this,i(Do,this,Po).call(this,()=>{Ja.ensure();try{return Us(()=>{var t=U;t.b=this,t.f|=Sr,n(r(uo,this),()=>e,()=>c)})}catch(e){return Ca(e,r(ho,this).parent),null}}))};ba(()=>{var t;try{t=this.transform_error(e)}catch(e){Ca(e,r(ho,this)&&r(ho,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(l,e=>Ca(e,r(ho,this)&&r(ho,this).parent)):l(t)})}}function ko(){try{a(go,this,Us(()=>r(mo,this).call(this,r(uo,this))))}catch(e){this.error(e)}}function Ao(e){let t=r(po,this).failed;t&&a(vo,this,Us(()=>{t(r(uo,this),()=>e,()=>()=>{})}))}function jo(){let e=r(po,this).pending;e&&(this.is_pending=!0,a(_o,this,Us(()=>e(r(uo,this)))),ba(()=>{var e=a(yo,this,document.createDocumentFragment()),t=Ss();e.append(t),a(go,this,i(Do,this,Po).call(this,()=>(Ja.ensure(),Us(()=>r(mo,this).call(this,t))))),r(xo,this)===0&&(r(uo,this).before(e),a(yo,this,null),Xs(r(_o,this),()=>{a(_o,this,null)}),i(Do,this,No).call(this))}))}function Mo(){try{if(this.is_pending=this.has_pending_snippet(),a(xo,this,0),a(bo,this,0),a(go,this,Us(()=>{r(mo,this).call(this,r(uo,this))})),r(xo,this)>0){var e=a(yo,this,document.createDocumentFragment());ec(r(go,this),e);let t=r(po,this).pending;a(_o,this,Us(()=>t(r(uo,this))))}else i(Do,this,No).call(this)}catch(e){this.error(e)}}function No(){this.is_pending=!1;for(let e of r(Co,this))Da(e,Tr),ao(e);for(let e of r(wo,this))Da(e,Er),ao(e);r(Co,this).clear(),r(wo,this).clear()}function Po(e){var t=U,n=H,i=aa;sc(r(ho,this)),oc(r(ho,this)),oa(r(ho,this).ctx);try{return e()}catch(e){return Sa(e),null}finally{sc(t),oc(n),oa(i)}}function Fo(e){if(!this.has_pending_snippet()){if(this.parent){var t;i(Do,t=this.parent,Fo).call(t,e)}return}a(xo,this,r(xo,this)+e),r(xo,this)===0&&(i(Do,this,No).call(this),r(_o,this)&&Xs(r(_o,this),()=>{a(_o,this,null)}),r(yo,this)&&(r(uo,this).before(r(yo,this)),a(yo,this,null)))}function Io(e,t,n,r){let i=ha()?Vo:Wo;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=U,s=Lo(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){(o.f&Or)===0&&Ca(e,o)}Ro()}if(n.length===0){c.then(()=>l(t.map(i)));return}function u(){s(),Promise.all(n.map(e=>Ho(e))).then(e=>l([...t.map(i),...e])).catch(e=>Ca(e,o))}c?c.then(u):u()}function Lo(){var e=U,t=H,n=aa,r=Ma;if(P)var i=sa;return function(a=!0){sc(e),oc(t),oa(n),a&&r?.activate(),P&&ca(i)}}function Ro(e=!0){sc(null),oc(null),oa(null),e&&Ma?.deactivate(),P&&ca(null)}function zo(){var e=U.b,t=Ma,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}var Bo=new Set;function Vo(e){var t=hr|Tr,n=H!==null&&(H.f&hr)!==0?H:null;U!==null&&(U.f|=Nr);let r={ctx:aa,deps:null,effects:null,equals:qi,f:t,fn:e,reactions:null,rv:0,v:ki,wv:0,parent:n??U,ac:null};return P&&Qi&&(r.created=ra(`created at`)),r}function Ho(e,t,n){U===null&&Xr();var r=void 0,i=rs(ki);P&&(i.label=t);var a=!H,o=new Map;return Bs(()=>{var t=mr();r=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).finally(Ro)}catch(e){t.reject(e),Ro()}var s=Ma;if(a){var c=zo();o.get(s)?.reject(Wr),o.delete(s),o.set(s,t)}let l=(e,t=void 0)=>{if(s.activate(),t)t!==Wr&&(i.f|=zr,os(i,t));else{(i.f&zr)!==0&&(i.f^=zr),os(i,e);for(let[e,t]of o){if(o.delete(e),e===s)break;t.reject(Wr)}P&&n!==void 0&&(Bo.add(i),setTimeout(()=>{Bo.has(i)&&(Pi(i.label,n),Bo.delete(i))}))}c&&c()};t.promise.then(l,e=>l(null,e||`unknown`))}),Fs(()=>{for(let e of o.values())e.reject(Wr)}),P&&(i.f|=Rr),new Promise(e=>{function t(n){function a(){n===r?e(i):t(r)}n.then(a,a)}t(r)})}function Uo(e){let t=Vo(e);return Xi||lc(t),t}function Wo(e){let t=Vo(e);return t.equals=Yi,t}function Go(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)qs(t[n])}}var Ko=[];function qo(e){for(var t=e.parent;t!==null;){if((t.f&hr)===0)return(t.f&Or)===0?t:null;t=t.parent}return null}function Jo(e){var t,n=U;if(sc(qo(e)),P){let r=Qo;es(new Set);try{rr.call(Ko,e)&&Zr(),Ko.push(e),e.f&=~Ir,Go(e),t=xc(e)}finally{sc(n),es(r),Ko.pop()}}else try{e.f&=~Ir,Go(e),t=xc(e)}finally{sc(n)}return t}function Yo(e){var t=Jo(e);if(!e.equals(t)&&(e.wv=vc(),(!Ma?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){Da(e,wr);return}rc||(Na===null?Oa(e):(Ps()||Ma?.is_fork)&&Na.set(e,t))}function Xo(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.call(t),t.ac?.abort(Wr),t.teardown=fr,t.ac=null,Cc(t,0),Gs(t))}function Zo(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&wc(t)}var Qo=new Set,$o=new Map;function es(e){Qo=e}var ts=!1;function ns(){ts=!0}function rs(e,t){var n={f:0,v:e,reactions:null,equals:qi,rv:0,wv:0};return P&&Qi&&(n.created=t??ra(`created at`),n.updated=null,n.set_during_effect=!1,n.trace=null),n}function is(e,t){let n=rs(e,t);return lc(n),n}function as(e,t=!1,n=!0){let r=rs(e);if(t||(r.equals=Yi),Zi&&n&&aa!==null&&aa.l!==null){var i;((i=aa.l).s??(i.s=[])).push(r)}return r}function R(e,t,n=!1){H!==null&&(!ac||(H.f&jr)!==0)&&ha()&&(H.f&(hr|yr|Rr|jr))!==0&&(cc===null||!rr.call(cc,e))&&ui();let r=n?ds(t):t;return P&&na(r,e.label),os(e,r)}function os(e,t){if(!e.equals(t)){var n=e.v;rc?$o.set(e,t):$o.set(e,n),e.v=t;var r=Ja.ensure();if(r.capture(e,n),P){if(Qi||U!==null){e.updated??=new Map;let t=(e.updated.get(``)?.count??0)+1;if(e.updated.set(``,{error:null,count:t}),Qi||t>5){let t=ra(`updated at`);if(t!==null){let n=e.updated.get(t.stack);n||(n={error:t,count:0},e.updated.set(t.stack,n)),n.count++}}}U!==null&&(e.set_during_effect=!0)}if((e.f&hr)!==0){let t=e;(e.f&Tr)!==0&&Jo(t),Oa(t)}e.wv=vc(),ls(e,Tr),ha()&&U!==null&&(U.f&wr)!==0&&(U.f&(br|xr))===0&&(fc===null?pc([e]):fc.push(e)),!r.is_fork&&Qo.size>0&&!ts&&ss()}return t}function ss(){ts=!1;for(let e of Qo)(e.f&wr)!==0&&Da(e,Er),yc(e)&&wc(e);Qo.clear()}function cs(e){R(e,e.v+1)}function ls(e,t){var n=e.reactions;if(n!==null)for(var r=ha(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;if(!(!r&&o===U)){if(P&&(s&jr)!==0){Qo.add(o);continue}var c=(s&Tr)===0;if(c&&Da(o,t),(s&hr)!==0){var l=o;Na?.delete(l),(s&Ir)===0&&(s&Cr&&(o.f|=Ir),ls(l,Er))}else c&&((s&yr)!==0&&to!==null&&to.add(o),ao(o))}}}var us=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function ds(e){if(typeof e!=`object`||!e||Br in e)return e;let t=ur(e);if(t!==cr&&t!==lr)return e;var n=new Map,r=tr(e),i=is(0),a=P&&Qi?ra(`created at`):null,o=gc,s=e=>{if(gc===o)return e();var t=H,n=gc;oc(null),_c(o);var r=e();return oc(t),_c(n),r};r&&(n.set(`length`,is(e.length,a)),P&&(e=hs(e)));var c=``;let l=!1;function u(e){if(!l){l=!0,c=e,ta(i,`${c} version`);for(let[e,t]of n)ta(t,fs(c,e));l=!1}}return new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&ci();var i=n.get(t);return i===void 0?s(()=>{var e=is(r.value,a);return n.set(t,e),P&&typeof t==`string`&&ta(e,fs(c,t)),e}):R(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>is(ki,a));n.set(t,e),cs(i),P&&ta(e,fs(c,t))}}else R(r,ki),cs(i);return!0},get(t,r,i){if(r===Br)return e;if(P&&r===Ur)return u;var o=n.get(r),l=r in t;if(o===void 0&&(!l||or(t,r)?.writable)&&(o=s(()=>{var e=is(ds(l?t[r]:ki),a);return P&&ta(e,fs(c,r)),e}),n.set(r,o)),o!==void 0){var d=W(o);return d===ki?void 0:d}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=W(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==ki)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Br)return!0;var r=n.get(t),i=r!==void 0&&r.v!==ki||Reflect.has(e,t);return(r!==void 0||U!==null&&(!i||or(e,t)?.writable))&&(r===void 0&&(r=s(()=>{var n=is(i?ds(e[t]):ki,a);return P&&ta(n,fs(c,t)),n}),n.set(t,r)),W(r)===ki)?!1:i},set(e,t,o,l){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=o;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=s(()=>is(ki,a)),n.set(f+``,p),P&&ta(p,fs(c,f))):R(p,ki)}if(u===void 0)(!d||or(e,t)?.writable)&&(u=s(()=>is(void 0,a)),P&&ta(u,fs(c,t)),R(u,ds(o)),n.set(t,u));else{d=u.v!==ki;var m=s(()=>ds(o));R(u,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(l,o),!d){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&R(g,_+1)}cs(i)}return!0},ownKeys(e){W(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==ki});for(var[r,a]of n)a.v!==ki&&!(r in e)&&t.push(r);return t},setPrototypeOf(){li()}})}function fs(e,t){return typeof t==`symbol`?`${e}[Symbol(${t.description??``})]`:us.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function ps(e){try{if(typeof e==`object`&&e&&Br in e)return e[Br]}catch{}return e}var ms=new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);function hs(e){return new Proxy(e,{get(e,t,n){var r=Reflect.get(e,t,n);return ms.has(t)?function(...e){ns();var t=r.apply(this,e);return ss(),t}:r}})}function gs(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:n,lastIndexOf:r,includes:i}=e;e.indexOf=function(e,t){let r=n.call(this,e,t);if(r===-1){for(let n=t??0;n<this.length;n+=1)if(ps(this[n])===e){Ri(`array.indexOf(...)`);break}}return r},e.lastIndexOf=function(e,t){let n=r.call(this,e,t??this.length-1);if(n===-1){for(let n=0;n<=(t??this.length-1);n+=1)if(ps(this[n])===e){Ri(`array.lastIndexOf(...)`);break}}return n},e.includes=function(e,t){let n=i.call(this,e,t);if(!n){for(let t=0;t<this.length;t+=1)if(ps(this[t])===e){Ri(`array.includes(...)`);break}}return n},Array.__svelte_cleanup=()=>{e.indexOf=n,e.lastIndexOf=r,e.includes=i}}var _s,vs,ys,bs;function xs(){if(_s===void 0){_s=window,document,vs=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ys=or(t,`firstChild`).get,bs=or(t,`nextSibling`).get,dr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),dr(n)&&(n.__t=void 0),P&&(e.__svelte_meta=null,gs())}}function Ss(e=``){return document.createTextNode(e)}function Cs(e){return ys.call(e)}function ws(e){return bs.call(e)}function z(e,t){if(!F)return Cs(e);var n=Cs(I);if(n===null)n=I.appendChild(Ss());else if(t&&n.nodeType!==Kr){var r=Ss();return n?.before(r),Hi(r),r}return t&&ks(n),Hi(n),n}function Ts(e,t=!1){if(!F){var n=Cs(e);return n instanceof Comment&&n.data===``?ws(n):n}if(t){if(I?.nodeType!==Kr){var r=Ss();return I?.before(r),Hi(r),r}ks(I)}return I}function B(e,t=1,n=!1){let r=F?I:e;for(var i;t--;)i=r,r=ws(r);if(!F)return r;if(n){if(r?.nodeType!==Kr){var a=Ss();return r===null?i?.after(a):r.before(a),Hi(a),a}ks(r)}return Hi(r),r}function Es(e){e.textContent=``}function Ds(){return!Xi||to!==null?!1:(U.f&kr)!==0}function Os(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??ji,e,r)}function ks(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Kr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function As(e){var t=H,n=U;oc(null),sc(null);try{return e()}finally{oc(t),sc(n)}}function js(e){U===null&&(H===null&&ni(e),ti()),rc&&ei(e)}function Ms(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ns(e,t){var n=U;if(P)for(;n!==null&&(n.f&jr)!==0;)n=n.parent;n!==null&&(n.f&Dr)!==0&&(e|=Dr);var r={ctx:aa,deps:null,nodes:null,f:e|Tr|Cr,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};P&&(r.component_function=la);var i=r;if((e&gr)!==0)La===null?ao(r):La.push(r);else if(t!==null){try{wc(r)}catch(e){throw qs(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Nr)===0&&(i=i.first,(e&yr)!==0&&(e&Ar)!==0&&i!==null&&(i.f|=Ar))}if(i!==null&&(i.parent=n,n!==null&&Ms(i,n),H!==null&&(H.f&hr)!==0&&(e&xr)===0)){var a=H;(a.effects??=[]).push(i)}return r}function Ps(){return H!==null&&!ac}function Fs(e){let t=Ns(_r,null);return Da(t,wr),t.teardown=e,t}function Is(e){js(`$effect`),P&&ar(e,`name`,{value:`$effect`});var t=U.f;if(!H&&(t&br)!==0&&(t&kr)===0){var n=aa;(n.e??=[]).push(e)}else return Ls(e)}function Ls(e){return Ns(gr|Pr,e)}function Rs(e){Ja.ensure();let t=Ns(xr|Nr,e);return(e={})=>new Promise(n=>{e.outro?Xs(t,()=>{qs(t),n(void 0)}):(qs(t),n(void 0))})}function zs(e){return Ns(gr,e)}function Bs(e){return Ns(Rr|Nr,e)}function Vs(e,t=0){return Ns(_r|t,e)}function V(e,t=[],n=[],r=[]){Io(r,t,n,t=>{Ns(_r,()=>e(...t.map(W)))})}function Hs(e,t=0){var n=Ns(yr|t,e);return P&&(n.dev_stack=sa),n}function Us(e){return Ns(br|Nr,e)}function Ws(e){var t=e.teardown;if(t!==null){let e=rc,n=H;ic(!0),oc(null);try{t.call(null)}finally{ic(e),oc(n)}}}function Gs(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&As(()=>{e.abort(Wr)});var r=n.next;(n.f&xr)===0?qs(n,t):n.parent=null,n=r}}function Ks(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&br)===0&&qs(t),t=n}}function qs(e,t=!0){var n=!1;(t||(e.f&Mr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Js(e.nodes.start,e.nodes.end),n=!0),Gs(e,t&&!n),Cc(e,0),Da(e,Or);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Ws(e);var i=e.parent;i!==null&&i.first!==null&&Ys(e),P&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Js(e,t){for(;e!==null;){var n=e===t?null:ws(e);e.remove(),e=n}}function Ys(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Xs(e,t,n=!0){var r=[];Zs(e,r,!0);var i=()=>{n&&qs(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Zs(e,t,n){if((e.f&Dr)===0){e.f^=Dr;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&Ar)!==0||(i.f&br)!==0&&(e.f&yr)!==0;Zs(i,t,o?n:!1),i=a}}}function Qs(e){$s(e,!0)}function $s(e,t){if((e.f&Dr)!==0){e.f^=Dr,(e.f&wr)===0&&(Da(e,Tr),ao(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Ar)!==0||(n.f&br)!==0;$s(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ec(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ws(n);t.append(n),n=i}}var tc=null,nc=!1,rc=!1;function ic(e){rc=e}var H=null,ac=!1;function oc(e){H=e}var U=null;function sc(e){U=e}var cc=null;function lc(e){H!==null&&(!Xi||(H.f&hr)!==0)&&(cc===null?cc=[e]:cc.push(e))}var uc=null,dc=0,fc=null;function pc(e){fc=e}var mc=1,hc=0,gc=hc;function _c(e){gc=e}function vc(){return++mc}function yc(e){var t=e.f;if((t&Tr)!==0)return!0;if(t&hr&&(e.f&=~Ir),(t&Er)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(yc(a)&&Yo(a),a.wv>e.wv)return!0}(t&Cr)!==0&&Na===null&&Da(e,wr)}return!1}function bc(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Xi&&cc!==null&&rr.call(cc,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&hr)===0?t===a&&(n?Da(a,Tr):(a.f&wr)!==0&&Da(a,Er),ao(a)):bc(a,t,!1)}}function xc(e){var t=uc,n=dc,r=fc,i=H,a=cc,o=aa,s=ac,c=gc,l=e.f;uc=null,dc=0,fc=null,H=(l&(br|xr))===0?e:null,cc=null,oa(e.ctx),ac=!1,gc=++hc,e.ac!==null&&(As(()=>{e.ac.abort(Wr)}),e.ac=null);try{e.f|=Lr;var u=e.fn,d=u();e.f|=kr;var f=e.deps,p=Ma?.is_fork;if(uc!==null){var m;if(p||Cc(e,dc),f!==null&&dc>0)for(f.length=dc+uc.length,m=0;m<uc.length;m++)f[dc+m]=uc[m];else e.deps=f=uc;if(Ps()&&(e.f&Cr)!==0)for(m=dc;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else !p&&f!==null&&dc<f.length&&(Cc(e,dc),f.length=dc);if(ha()&&fc!==null&&!ac&&f!==null&&(e.f&(hr|Er|Tr))===0)for(m=0;m<fc.length;m++)bc(fc[m],e);if(i!==null&&i!==e){if(hc++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=hc;if(t!==null)for(let e of t)e.rv=hc;fc!==null&&(r===null?r=fc:r.push(...fc))}return(e.f&zr)!==0&&(e.f^=zr),d}catch(e){return Sa(e)}finally{e.f^=Lr,uc=t,dc=n,fc=r,H=i,cc=a,oa(o),ac=s,gc=c}}function Sc(e,t){let n=t.reactions;if(n!==null){var r=nr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&hr)!==0&&(uc===null||!rr.call(uc,t))){var a=t;(a.f&Cr)!==0&&(a.f^=Cr,a.f&=~Ir),Oa(a),Xo(a),Cc(a,0)}}function Cc(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Sc(e,n[r])}function wc(e){var t=e.f;if((t&Or)===0){Da(e,wr);var n=U,r=nc;if(U=e,nc=!0,P){var i=la;ua(e.component_function);var a=sa;ca(e.dev_stack??sa)}try{(t&(yr|vr))===0?Gs(e):Ks(e),Ws(e);var o=xc(e);if(e.teardown=typeof o==`function`?o:null,e.wv=mc,P&&Qi&&(e.f&Tr)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&=(s.wv=vc(),!1)}finally{nc=r,U=n,P&&(ua(i),ca(a))}}}function W(e){var t=(e.f&hr)!==0;if(tc?.add(e),H!==null&&!ac&&!(U!==null&&(U.f&Or)!==0)&&(cc===null||!rr.call(cc,e))){var n=H.deps;if((H.f&Lr)!==0)e.rv<hc&&(e.rv=hc,uc===null&&n!==null&&n[dc]===e?dc++:uc===null?uc=[e]:uc.push(e));else{var r;((r=H).deps??(r.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[H]:rr.call(i,H)||i.push(H)}}if(P&&(Bo.delete(e),Qi&&!ac&&ea!==null&&H!==null&&ea.reaction===H))if(e.trace)e.trace();else{var a=ra(`traced at`);if(a){var o=ea.entries.get(e);o===void 0&&(o={traces:[]},ea.entries.set(e,o));var s=o.traces[o.traces.length-1];a.stack!==s?.stack&&o.traces.push(a)}}if(rc&&$o.has(e))return $o.get(e);if(t){var c=e;if(rc){var l=c.v;return((c.f&wr)===0&&c.reactions!==null||Ec(c))&&(l=Jo(c)),$o.set(c,l),l}var u=(c.f&Cr)===0&&!ac&&H!==null&&(nc||(H.f&Cr)!==0),d=(c.f&kr)===0;yc(c)&&(u&&(c.f|=Cr),Yo(c)),u&&!d&&(Zo(c),Tc(c))}if(Na?.has(e))return Na.get(e);if((e.f&zr)!==0)throw e.v;return e.v}function Tc(e){if(e.f|=Cr,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&hr)!==0&&(t.f&Cr)===0&&(Zo(t),Tc(t))}function Ec(e){if(e.v===ki)return!0;if(e.deps===null)return!1;for(let t of e.deps)if($o.has(t)||(t.f&hr)!==0&&Ec(t))return!0;return!1}function Dc(e){var t=ac;try{return ac=!0,e()}finally{ac=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Oc=[`touchstart`,`touchmove`];function kc(e){return Oc.includes(e)}var Ac=new Map;function jc(e,t){var n=Ac.get(e);n||(n=new Set,Ac.set(e,n)),n.add(t)}var Mc=Symbol(`events`),Nc=new Set,Pc=new Set;function Fc(e,t,n,r={}){function i(e){if(r.capture||Bc.call(t,e),!e.cancelBubble)return As(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?ba(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Ic(e,t,n,r,i){var a={capture:r,passive:i},o=Fc(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Fs(()=>{t.removeEventListener(e,o,a)})}function Lc(e,t,n){(t[Mc]??(t[Mc]={}))[e]=n}function Rc(e){for(var t=0;t<e.length;t++)Nc.add(e[t]);for(var n of Pc)n(e)}var zc=null;function Bc(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.call(e)||[],a=i[0]||e.target;zc=e;var o=0,s=zc===e&&e[Mc];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Mc]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){ar(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=H,d=U;oc(null),sc(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[Mc]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Mc]=t,delete e.currentTarget,oc(u),sc(d)}}}var Vc=((o=globalThis)==null||(o=o.window)==null?void 0:o.trustedTypes)&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Hc(e){return Vc?.createHTML(e)??e}function Uc(e){var t=Os(`template`);return t.innerHTML=Hc(e.replaceAll(`<!>`,`<!---->`)),t.content}function Wc(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function G(e,t){var n=(t&Si)!==0,r=(t&Ci)!==0,i,a=!e.startsWith(`<!>`);return()=>{if(F)return Wc(I,null),I;i===void 0&&(i=Uc(a?e:`<!>`+e),n||(i=Cs(i)));var t=r||vs?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Cs(t),s=t.lastChild;Wc(o,s)}else Wc(t,t);return t}}function Gc(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&Si)!==0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(F)return Wc(I,null),I;if(!o){var e=Cs(Uc(a));if(i)for(o=document.createDocumentFragment();Cs(e);)o.appendChild(Cs(e));else o=Cs(e)}var t=o.cloneNode(!0);if(i){var n=Cs(t),r=t.lastChild;Wc(n,r)}else Wc(t,t);return t}}function Kc(e,t){return Gc(e,t,`svg`)}function qc(){if(F)return Wc(I,null),I;var e=document.createDocumentFragment(),t=document.createComment(``),n=Ss();return e.append(t,n),Wc(t,n),e}function K(e,t){if(F){var n=U;((n.f&kr)===0||n.nodes.end===null)&&(n.nodes.end=I),Ui();return}e!==null&&e.before(t)}function q(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Jc(e,t){return Xc(e,t)}var Yc=new Map;function Xc(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){xs();var c=void 0,l=Rs(()=>{var o=n??t.appendChild(Ss());lo(o,{pending:()=>{}},t=>{pa({});var n=aa;if(a&&(n.c=a),i&&(r.$$events=i),F&&Wc(t,null),c=e(t,r)||{},F&&(U.nodes.end=I,I===null||I.nodeType!==qr||I.data!==Di))throw Ii(),Oi;ma()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=kc(r);for(let e of[t,document]){var a=Yc.get(e);a===void 0&&(a=new Map,Yc.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Bc,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(ir(Nc)),Pc.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=Yc.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Bc),r.delete(e),r.size===0&&Yc.delete(n)):r.set(e,i)}Pc.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return Zc.set(c,l),c}var Zc=new WeakMap;function Qc(e,t){let n=Zc.get(e);return n?(Zc.delete(e),n(t)):(P&&(Br in e?zi():Li()),Promise.resolve())}var $c=new WeakMap,el=new WeakMap,tl=new WeakMap,nl=new WeakMap,rl=new WeakMap,il=new WeakMap,al=new WeakMap;class ol{constructor(t,i=!0){e(this,`anchor`,void 0),n(this,$c,new Map),n(this,el,new Map),n(this,tl,new Map),n(this,nl,new Set),n(this,rl,!0),n(this,il,e=>{if(r($c,this).has(e)){var t=r($c,this).get(e),n=r(el,this).get(t);if(n)Qs(n),r(nl,this).delete(t);else{var i=r(tl,this).get(t);i&&(r(el,this).set(t,i.effect),r(tl,this).delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(let[t,n]of r($c,this)){if(r($c,this).delete(t),t===e)break;let i=r(tl,this).get(n);i&&(qs(i.effect),r(tl,this).delete(n))}for(let[e,i]of r(el,this)){if(e===t||r(nl,this).has(e))continue;let a=()=>{if(Array.from(r($c,this).values()).includes(e)){var t=document.createDocumentFragment();ec(i,t),t.append(Ss()),r(tl,this).set(e,{effect:i,fragment:t})}else qs(i);r(nl,this).delete(e),r(el,this).delete(e)};r(rl,this)||!n?(r(nl,this).add(e),Xs(i,a,!1)):a()}}}),n(this,al,e=>{r($c,this).delete(e);let t=Array.from(r($c,this).values());for(let[e,n]of r(tl,this))t.includes(e)||(qs(n.effect),r(tl,this).delete(e))}),this.anchor=t,a(rl,this,i)}ensure(e,t){var n=Ma,i=Ds();if(t&&!r(el,this).has(e)&&!r(tl,this).has(e))if(i){var a=document.createDocumentFragment(),o=Ss();a.append(o),r(tl,this).set(e,{effect:Us(()=>t(o)),fragment:a})}else r(el,this).set(e,Us(()=>t(this.anchor)));if(r($c,this).set(n,e),i){for(let[t,i]of r(el,this))t===e?n.unskip_effect(i):n.skip_effect(i);for(let[t,i]of r(tl,this))t===e?n.unskip_effect(i.effect):n.skip_effect(i.effect);n.oncommit(r(il,this)),n.ondiscard(r(al,this))}else F&&(this.anchor=I),r(il,this).call(this,n)}}function J(e,t,n=!1){var r;F&&(r=I,Ui());var i=new ol(e),a=n?Ar:0;function o(e,t){if(F){var n=Ki(r);if(e!==(n===wi?0:n===Ti?!1:parseInt(n.substring(1)))){var a=Gi();Hi(a),i.anchor=a,Vi(!1),i.ensure(e,t),Vi(!0);return}}i.ensure(e,t)}Hs(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(!1,null)},a)}var sl=Symbol(`NaN`);function cl(e,t,n){F&&Ui();var r=new ol(e),i=!ha();Hs(()=>{var e=t();e!==e&&(e=sl),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function ll(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Xs(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;ul(ir(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;Es(u),u.append(l),e.items.clear()}ul(t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function ul(e,t=!0){for(var n=0;n<e.length;n++)qs(e[n],t)}var dl;function fl(e,t,n,r,i,a=null){var o=e,s=new Map;if((t&mi)!==0){var c=e;o=F?Hi(Cs(c)):c.appendChild(Ss())}F&&Ui();var l=null,u=Wo(()=>{var e=n();return tr(e)?e:e==null?[]:ir(e)}),d,f=!0;function p(){m.fallback=l,ml(m,d,o,t,r),l!==null&&(d.length===0?(l.f&Fr)===0?Qs(l):(l.f^=Fr,gl(l,null,o)):Xs(l,()=>{l=null}))}var m={effect:Hs(()=>{d=W(u);var e=d.length;let c=!1;F&&Ki(o)===Ti!=(e===0)&&(o=Gi(),Hi(o),Vi(!1),c=!0);for(var m=new Set,h=Ma,g=Ds(),_=0;_<e;_+=1){F&&I.nodeType===qr&&I.data===Di&&(o=I,c=!0,Vi(!1));var v=d[_],y=r(v,_);if(P){var b=r(v,_);y!==b&&$r(String(_),String(y),String(b))}var x=f?null:s.get(y);x?(x.v&&os(x.v,v),x.i&&os(x.i,_),g&&h.unskip_effect(x.e)):(x=hl(s,f?o:dl??=Ss(),v,y,_,i,t,n),f||(x.e.f|=Fr),s.set(y,x)),m.add(y)}if(e===0&&a&&!l&&(f?l=Us(()=>a(o)):(l=Us(()=>a(dl??=Ss())),l.f|=Fr)),e>m.size&&(P?vl(d,r):Qr(``,``,``)),F&&e>0&&Hi(Gi()),!f)if(g){for(let[e,t]of s)m.has(e)||h.skip_effect(t.e);h.oncommit(p),h.ondiscard(()=>{})}else p();c&&Vi(!0),W(u)}),flags:t,items:s,outrogroups:null,fallback:l};f=!1,F&&(o=I)}function pl(e){for(;e!==null&&(e.f&br)===0;)e=e.next;return e}function ml(e,t,n,r,i){var a=(r&hi)!==0,o=t.length,s=e.items,c=pl(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a){for(_=0;_<o;_+=1)if(m=t[_],h=i(m,_),g=s.get(h).e,(g.f&Fr)===0){var v;(v=g.nodes)==null||(v=v.a)==null||v.measure(),(d??=new Set).add(g)}}for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if((g.f&Fr)!==0)if(g.f^=Fr,g===c)gl(g,null,n);else{var y=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),_l(e,u,g),_l(e,g,y),gl(g,y,n),u=g,f=[],p=[],c=pl(u.next);continue}if((g.f&Dr)!==0&&(Qs(g),a)){var b;(b=g.nodes)==null||(b=b.a)==null||b.unfix(),(d??=new Set).delete(g)}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var x=p[0],S;u=x.prev;var C=f[0],w=f[f.length-1];for(S=0;S<f.length;S+=1)gl(f[S],x,n);for(S=0;S<p.length;S+=1)l.delete(p[S]);_l(e,C.prev,w.next),_l(e,u,C),_l(e,w,x),c=x,u=w,--_,f=[],p=[]}else l.delete(g),gl(g,c,n),_l(e,g.prev,g.next),_l(e,g,u===null?e.effect.first:u.next),_l(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=pl(c.next);if(c===null)continue}(g.f&Fr)===0&&f.push(g),u=g,c=pl(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(ul(ir(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var T=[];if(l!==void 0)for(g of l)(g.f&Dr)===0&&T.push(g);for(;c!==null;)(c.f&Dr)===0&&c!==e.fallback&&T.push(c),c=pl(c.next);var E=T.length;if(E>0){var D=(r&mi)!==0&&o===0?n:null;if(a){for(_=0;_<E;_+=1){var O;(O=T[_].nodes)==null||(O=O.a)==null||O.measure()}for(_=0;_<E;_+=1){var k;(k=T[_].nodes)==null||(k=k.a)==null||k.fix()}}ll(e,T,D)}}a&&ba(()=>{if(d!==void 0)for(g of d){var e;(e=g.nodes)==null||(e=e.a)==null||e.apply()}})}function hl(e,t,n,r,i,a,o,s){var c=(o&fi)===0?null:(o&gi)===0?as(n,!1,!1):rs(n),l=(o&pi)===0?null:rs(i);return P&&c&&(c.trace=()=>{s()[l?.v??i]}),{v:c,i:l,e:Us(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function gl(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&(t.f&Fr)===0?t.nodes.start:n;r!==null;){var o=ws(r);if(a.before(r),r===i)return;r=o}}function _l(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function vl(e,t){let n=new Map,r=e.length;for(let i=0;i<r;i++){let r=t(e[i],i);if(n.has(r)){let e=String(n.get(r)),t=String(i),a=String(r);a.startsWith(`[object `)&&(a=null),Qr(e,t,a)}n.set(r,i)}}function yl(e,t,n,r,i){F&&Ui();var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n===`default`?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}function bl(e,t,...n){var r=new ol(e);Hs(()=>{let e=t()??null;P&&e==null&&ii(),r.ensure(e,e&&(t=>e(t,...n)))},Ar)}function xl(e,t){zs(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=Os(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e),P&&jc(t.hash,e)}})}function Sl(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Sl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Cl(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Sl(e))&&(r&&(r+=` `),r+=t);return r}function wl(e){return typeof e==`object`?Cl(e):e??``}var Tl=[...`
|
|
50
|
+
\r\f\xA0\v`];function El(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Tl.includes(r[o-1]))&&(s===r.length||Tl.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Dl(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Ol(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function kl(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Ol)),i&&c.push(...Object.keys(i).map(Ol));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Ol(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Dl(r)),i&&(n+=Dl(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Al(e,t,n,r,i,a){var o=e.__className;if(F||o!==n||o===void 0){var s=El(n,r,a);(!F||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function jl(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Ml(e,t,n,r){var i=e.__style;if(F||i!==t){var a=kl(t,r);(!F||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(jl(e,n?.[0],r[0]),jl(e,n?.[1],r[1],`important`)):jl(e,n,r));return r}var Nl=Symbol(`is custom element`),Pl=Symbol(`is html`),Fl=Gr?`link`:`LINK`;function Il(e,t,n,r){var i=Ll(e);if(F&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Fl)){r||Bl(e,t,n??``);return}i[t]!==(i[t]=n)&&(t===`loading`&&(e[Hr]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&zl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ll(e){return e.__attributes??={[Nl]:e.nodeName.includes(`-`),[Pl]:e.namespaceURI===ji}}var Rl=new Map;function zl(e){var t=e.getAttribute(`is`)||e.nodeName,n=Rl.get(t);if(n)return n;Rl.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=sr(i),r)r[o].set&&n.push(o);i=ur(i)}return n}function Bl(e,t,n){P&&(t===`srcset`&&Ul(e,n)||Vl(e.getAttribute(t)??``,n)||Fi(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&`...`),String(n)))}function Vl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function Hl(e){return e.split(`,`).map(e=>e.trim().split(` `).filter(Boolean))}function Ul(e,t){var n=Hl(e.srcset),r=Hl(t);return r.length===n.length&&r.every(([e,t],r)=>t===n[r][1]&&(Vl(n[r][0],e)||Vl(e,n[r][0])))}var Wl=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,ql=new WeakSet;class Jl{constructor(e){t(this,ql),n(this,Wl,new WeakMap),n(this,Gl,void 0),n(this,Kl,void 0),a(Kl,this,e)}observe(e,t){var n=r(Wl,this).get(e)||new Set;return n.add(t),r(Wl,this).set(e,n),i(ql,this,Yl).call(this).observe(e,r(Kl,this)),()=>{var n=r(Wl,this).get(e);n.delete(t),n.size===0&&(r(Wl,this).delete(e),r(Gl,this).unobserve(e))}}}s=Jl;function Yl(){return r(Gl,this)??a(Gl,this,new ResizeObserver(e=>{for(var t of e){s.entries.set(t.target,t);for(var n of r(Wl,this).get(t.target)||[])n(t)}}))}e(Jl,`entries`,new WeakMap);function Xl(e,t){return e===t||e?.[Br]===t}function Zl(e={},t,n,r){return zs(()=>{var i,a;return Vs(()=>{i=a,a=r?.()||[],Dc(()=>{e!==n(...a)&&(t(e,...a),i&&Xl(n(...i),e)&&t(null,...i))})}),()=>{ba(()=>{a&&Xl(n(...a),e)&&t(null,...a)})}}),e}function Ql(e,t,n){if(e==null)return t(void 0),n&&n(void 0),fr;let r=Dc(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var $l=[];function eu(e,t){return{subscribe:Y(e,t).subscribe}}function Y(e,t=fr){let n=null,r=new Set;function i(t){if(Ji(e,t)&&(e=t,n)){let t=!$l.length;for(let t of r)t[1](),$l.push(t,e);if(t){for(let e=0;e<$l.length;e+=2)$l[e][0]($l[e+1]);$l.length=0}}}function a(t){i(t(e))}function o(o,s=fr){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||fr),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function tu(e,t,n){let r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let a=t.length<2;return eu(n,(e,n)=>{let o=!1,s=[],c=0,l=fr,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:fr},d=i.map((e,t)=>Ql(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){pr(d),l(),o=!1}})}function X(e){let t;return Ql(e,e=>t=e)(),t}var nu=!1,ru=Symbol();function iu(e,t,n){let r=n[t]??(n[t]={store:null,source:as(void 0),unsubscribe:fr});if(P&&(r.source.label=t),r.store!==e&&!(ru in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=fr;else{var i=!0;r.unsubscribe=Ql(e,e=>{i?r.source.v=e:R(r.source,e)}),i=!1}return e&&ru in n?X(e):W(r.source)}function au(){let e={};function t(){Fs(()=>{for(var t in e)e[t].unsubscribe();ar(e,ru,{enumerable:!1,value:!0})})}return[e,t]}function ou(e){var t=nu;try{return nu=!1,[e(),nu]}finally{nu=t}}function su(e,t,n,r){var i=!Zi||(n&vi)!==0,a=(n&bi)!==0,o=(n&xi)!==0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?Dc(r):r),s),u;if(a){var d=Br in e||Vr in e;u=or(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=ou(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&ai(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&(n&yi)===0)return m;if(u){var h=e.$$legacy;return function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()}}var g=!1,_=((n&_i)===0?Wo:Vo)(()=>(g=!1,m()));P&&(_.label=t),a&&W(_);var v=U;return function(e,t){if(arguments.length>0){let n=t?W(_):i&&a?ds(e):e;return R(_,n),g=!0,s!==void 0&&(s=n),e}return rc&&g||(v.f&Or)!==0?_.v:W(_)}}if(P){let e=function(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(t!==void 0)return t;oi(e)},set:e=>{t=e}})}};e(`$state`),e(`$effect`),e(`$derived`),e(`$inspect`),e(`$props`),e(`$bindable`)}function cu(e){aa===null&&Yr(`onMount`),Zi&&aa.l!==null?uu(aa).m.push(e):Is(()=>{let t=Dc(e);if(typeof t==`function`)return t})}function lu(e){aa===null&&Yr(`onDestroy`),cu(()=>()=>Dc(e))}function uu(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var du={debugLog:!1,devNullLog:!1,defaultLanguage:er.InterfaceLanguage.RU,downloadVKLanguages:!0,updateBuiltinLanguages:!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,trafficSavingLimit:er.VideoQuality.Q_480P,highQualityLimit:er.VideoQuality.Q_720P,features:{autoplay:!0,statistics:!0,thinStatistics:!1,preload:!0,subtitles:!0,fullscreen:!0,download:!0,liveRewind:!0,playbackRate:!0,trafficSaving:!0,copyVideoLink:!0,videoRotate:!0,audioLanguages:!1,saveRate:!1,fullscreenInternalTargetPlayerContainer:!1,endScreen:!0,previewNoEmptySpace:!1,exposeInternalsToGlobal:!1,userVideoPrefs:!1,initSubtitles:!0},controls:{playbackRateMin:.25,playbackRateMax:2,playbackRateStep:.25},ads:{enable:void 0,initTimeout:2e3,loadTimeout:2e3,runtimeTimeout:5e3,slot:void 0,preview:void 0,paramsOverride:void 0,isMobileGoToSiteButton:!0,useAdmanFromNPM:!1,volumeMultiplier:1,isVsidOriginal:!1},userSalt:`0`},fu=e=>er.fillWithDefault(e,du),pu=e=>fa(`ui-config`,e),mu=()=>da(`ui-config`),hu=require(`@vkontakte/videoplayer-shared/es2018`),gu=`5`;if(typeof window<`u`){var _u,vu;((_u=(vu=window).__svelte??(vu.__svelte={})).v??(_u.v=new Set)).add(gu)}$i();var yu=`var(--btn-color, #fff)`,bu=Kc(`<g filter="url(#strokeAndShadow)"><!></g><defs><filter x="-12" width="72" y="-12" height="72" id="strokeAndShadow"><feMorphology operator="dilate" radius=".4" result="outer"></feMorphology><feFlood flood-color="rgba(0,0,0,0.1)" result="outerColor"></feFlood><feComposite operator="in" in="outerColor" in2="outer" result="outerOutline"></feComposite><feDropShadow in="SourceGraphic" dx="0" dy="0" stdDeviation="3" flood-color="rgba(0,0,0,0.4)" result="outerShadow"></feDropShadow><feMerge><feMergeNode in="outerShadow"></feMergeNode><feMergeNode in="outerOutline"></feMergeNode><feMergeNode in="SourceGraphic"></feMergeNode></feMerge></filter></defs>`,1),xu=Kc(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>`);function Su(e,t){pa(t,!0);let n=su(t,`width`,19,()=>`14`),r=su(t,`height`,19,()=>`14`),i=su(t,`fill`,3,yu),a=Uo(()=>t.viewBox??`0 0 ${n()} ${r()}`);var o=xu(),s=z(o),c=e=>{var n=bu(),r=Ts(n);bl(z(r),()=>t.children),L(r),Wi(),K(e,n)},l=e=>{var n=qc();bl(Ts(n),()=>t.children),K(e,n)};J(s,e=>{t.shadow?e(c):e(l,!1)}),L(o),V(()=>{Il(o,`aria-label`,t.ariaLabel),Il(o,`aria-hidden`,!t.ariaLabel),Il(o,`width`,n()),Il(o,`height`,r()),Il(o,`viewBox`,W(a)),Il(o,`fill`,i()),Ml(o,t.style),Il(o,`data-testid`,t.testId)}),K(e,o),ma()}var Cu=Kc(`<path d="M460 194a4 4 0 0 1 4-4h122a4 4 0 0 1 4 4v82a4 4 0 0 1-4 4H464a4 4 0 0 1-4-4zm6 3a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm112-72a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm0 12a1 1 0 0 1 .99-1h4.02a1 1 0 0 1 .99 1v4a1 1 0 0 1-.99 1h-4.02a1 1 0 0 1-.99-1zm-71-37a6 6 0 1 0 0-12 6 6 0 0 0 0 12m36 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-18.05 15c6.05 0 11.62 4.45 11.94 4.65 2.11 1.35 3.26.77 3.96.16s1.15-2.81-1.04-4.66c-1.74-1.48-5.8-5.16-14.86-5.15s-12.95 3.5-14.8 5.18c-1.83 1.69-2.28 3.5-.96 4.66s2.31 1.16 4.35-.33c0 .01 5.36-4.51 11.41-4.51"></path>`);function wu(e){Su(e,{width:`200`,height:`200`,viewBox:`460 190 130 90`,testId:`error-icon`,children:(e,t)=>{K(e,Cu())},$$slots:{default:!0}})}var Tu=G(`<div class="container s-2"><!></div>`),Eu={hash:`s-2`,code:`.container.s-2 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}`};function Du(e){xl(e,Eu);var t=Tu();wu(z(t),{}),L(t),K(e,t)}var Ou=G(`<div class="playerError s-0"><!></div>`),ku={hash:`s-0`,code:`.playerError.s-0 {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;}`};function Au(e){xl(e,ku);var t=Ou();Du(z(t),{}),L(t),K(e,t)}function ju(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]),r={};for(let i of n)r[i]=t[i]??e[i]??void 0;return r}var Mu=`ui-tv`,Nu=require(`@vkontakte/videoplayer-statistics/es2018`),Pu=require(`@vkontakte/videoplayer-shared/es2018`);class Fu{constructor(t=void 0,n=void 0,r=void 0,i=new Pu.Subscription){e(this,`oneStat`,void 0),e(this,`thinOneStat`,void 0),e(this,`mediascopePixel`,void 0),e(this,`statSubscription`,void 0),this.oneStat=t,this.thinOneStat=n,this.mediascopePixel=r,this.statSubscription=i}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}}var Iu=_(nt(),1),Lu=_(ct(),1),Ru=_(ft(),1),zu=_(gt(),1),Bu=require(`@vkontakte/videoplayer-core/es2018`),Z=require(`@vkontakte/videoplayer-shared/es2018`),Vu=require(`@vkontakte/videoplayer-statistics/es2018`),Hu=_(vn(),1),Uu=_(gt(),1),Wu=_(Nn(),1),Q=require(`@vkontakte/videoplayer-shared/es2018`),Gu=require(`@vkontakte/videoplayer-shared/es2018`),Ku=`//ad.mail.ru/static/admanhtml/rbadman-html5.min.js`;class qu{constructor(t,n){e(this,`adman`,null),e(this,`initialVolume`,1),e(this,`volumeMultiplier`,void 0),e(this,`videoElement`,null),e(this,`currentAdSection`,null),e(this,`actions`,null),e(this,`adsState`,null),e(this,`playerState`,null),e(this,`isDestroyed`,void 0),e(this,`log`,void 0),e(this,`loadTimeout`,void 0),e(this,`initTimeout`,void 0),e(this,`runtimeTimeout`,void 0),e(this,`useAdmanFromNPM`,void 0),e(this,`isVsidOriginal`,void 0),e(this,`watchDogTimeout`,void 0),e(this,`externalApi`,void 0),e(this,`events`,{init$:new Gu.Subject,loadStarted$:new Gu.Subject,loadEnded$:new Gu.Subject,loadError$:new Gu.Subject,ready$:new Gu.Subject,slotRequested$:new Gu.Subject,started$:new Gu.Subject,timeRemained$:new Gu.Subject,paused$:new Gu.Subject,resumed$:new Gu.Subject,ended$:new Gu.Subject,empty$:new Gu.Subject,skipped$:new Gu.Subject,clicked$:new Gu.Subject,closed$:new Gu.Subject,error$:new Gu.Subject}),e(this,`loadAdman`,e=>(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_start`,this.useAdmanFromNPM?`npm`:`http`],numbers:[Q.now()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e))),e(this,`loadAdmanMailRu`,e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_async_init_done`,`http`],numbers:[Q.now()]}),t(),this.events.loadEnded$.next()):(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`http`],numbers:[Q.now()]}),n())};Gu.addScript(Ku,e,this.loadTimeout).then(()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_loaded`,`http`],numbers:[Q.now()]}),window.AdmanHTML?(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`http`],numbers:[Q.now()]}),t(),this.events.loadEnded$.next()):(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`http`],numbers:[Q.now()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout))}).catch(e=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_load_error`,`http`,String(e)],numbers:[Q.now()]}),n(),clearTimeout(r)})})),e(this,`loadAdmanNPM`,e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_done`,`npm`],numbers:[Q.now()]}),t(),this.events.loadEnded$.next()):(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`npm`],numbers:[Q.now()]}),n())},a=()=>{o=!0,n()},o=!1,s=window.setTimeout(()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_timed_out`,`npm`],numbers:[Q.now()]}),a()},this.loadTimeout);e.addEventListener(`abort`,a),e.aborted&&(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_aborted`,`npm`],numbers:[Q.now()]}),a()),window.AdmanHTML=window.AdmanHTML||null,Hu.default(import(`@adtech/rbadman/out/rbadman-html5.min.js`).then(()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_chunk_imorted`,`npm`,`failed: `+String(o)],numbers:[Q.now()]}),!o&&(window.AdmanHTML?(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`npm`],numbers:[Q.now()]}),t(),this.events.loadEnded$.next()):(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`npm`],numbers:[Q.now()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout)))},a),()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener(`abort`,a)})})),e(this,`onAdsReady`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ads_ready`],numbers:[Q.now()]}),this.log({message:`ads ready`}),this.events.ready$.next(),this.startPreroll()}),e(this,`onAdStarted`,(e,t)=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_started`,e,`muted: `+t.muted],numbers:[Q.now(),t.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(t)}`}),this.events.started$.next(e),t.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:`ad muted start`})),this.adsState.duration.set(t.duration),this.adsState.playbackState.set(`playing`),this.adsState.canSkip.set(t.allowClose),this.adsState.secondsToWatchBeforeSkip.set(t.allowCloseDelay),this.startWatchDog(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(t.bannerID))):this.onAdError(`Started callback failed: Adman is not initialized`)}),e(this,`onAdTimeRemained`,e=>{(this.adsState?.playbackState?X(this.adsState.playbackState):void 0)!==`inactive`&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError(`TimeRemained callback failed: Adman state is not initialized`))}),e(this,`onAdPaused`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_pased`,this.currentAdSection??``],numbers:[Q.now()]}),this.stopWatchDog(),this.adsState?(this.log({message:`ad paused`}),this.adsState.playbackState.set(`paused`)):this.onAdError(`Paused callback failed: Adman state is not initialized`)}),e(this,`onAdPlayed`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_played`,this.currentAdSection??``],numbers:[Q.now()]}),this.startWatchDog(),this.adsState?(this.log({message:`ad played`}),this.adsState.playbackState.set(`playing`)):this.onAdError(`Player callback failed: Adman is not initialized`)}),e(this,`onAdMidrollPoint`,()=>{if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_midroll_pioint`],numbers:[Q.now()]}),this.adman&&this.actions){this.log({message:`midroll point`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`midroll`,this.startWatchDog();try{this.adman.start(`midroll`)}catch{this.onAdError(`could not start midroll`)}}else this.onAdError(`Midroll callback failed: Adman is not initialized`)}),e(this,`onAdSkipped`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_skipped`,this.currentAdSection??``],numbers:[Q.now()]}),this.log({message:`ad skipped`}),this.stopWatchDog()}),e(this,`onAdClosed`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_closed`,this.currentAdSection??``],numbers:[Q.now()]}),this.log({message:`ad closed`}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()}),e(this,`onAdCompleted`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_completed`,this.currentAdSection??``],numbers:[Q.now()]}),this.log({message:`ad completed`}),this.currentAdSection?(this.events.ended$.next(this.currentAdSection),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0)):this.events.empty$.next(),this.switchToVideo(),this.stopWatchDog()}),e(this,`onAdClicked`,()=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_clicked`,this.currentAdSection??``],numbers:[Q.now()]}),this.log({message:`ad clicked`}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()}),e(this,`onAdError`,(e=`ad error`)=>{Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_error`,e],numbers:[Q.now()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()}),this.log=t.createComponentLog(`AdmanWrapper`),Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_created`],numbers:[Q.now()]}),this.loadTimeout=n.loadTimeout,this.initTimeout=n.initTimeout,this.runtimeTimeout=n.runtimeTimeout,this.useAdmanFromNPM=n.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(n.volumeMultiplier,1)),this.isVsidOriginal=n.isVsidOriginal}init(e,t,n){this.actions=e,this.adsState=t,this.playerState=n}onAdmanLoadingError(){this.onAdError(`adman loading error`)}async initAdman(e){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init`,`already inited: `+!!this.adman],numbers:[Q.now(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:t,height:n,isAutoplay:r,adsContainer:i,adsVideoElement:a,slotId:o,params:s={},paramsOverride:c={},duration:l,externalApi:u}=e;this.externalApi=u;let d,f=this.playerState&&X(this.playerState.vsid);f&&(d=this.isVsidOriginal?f:parseInt(f,36));let{isEmbed:p,immediateOrigin:m}=Q.detectEmbed(),h=(p?m:window.location.href)??window.location.href,g={...s,dl:encodeURIComponent(h),autoplay:r?1:0,player_width:t,player_height:n,...d?{request_id:d}:{},duration:l,...c};g=Wu.default(Uu.default(g).filter(([e,t])=>Q.isNonNullable(t)));let _={slot:o,wrapper:i,videoEl:a,videoQuality:n,params:g,browser:{mobile:!1}};try{let e=new window.AdmanHTML;if(e.onReady(this.onAdsReady),e.onStarted(this.onAdStarted),e.onPlayed(this.onAdPlayed),e.onPaused(this.onAdPaused),e.adMidrollPoint(this.onAdMidrollPoint),e.onClosed(this.onAdClosed),e.onSkipped(this.onAdSkipped),e.onClicked(this.onAdClicked),e.onTimeRemained(this.onAdTimeRemained),e.onCompleted(this.onAdCompleted),e.onError(this.onAdError),e.setDebug(!1),this.externalApi?.videoGetAds){let e=await this.safeExternalCall(this.externalApi.videoGetAds,g);e&&(delete _.slot,delete _.params,Object.assign(_,{json:e}))}e.init(_),this.adman=e,this.videoElement=a,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(_)}`})}catch(e){Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_threw`,String(e)],numbers:[Q.now()]}),this.onAdError(`could not init adman`)}}switchToVideo(e=!1){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_switch_to_video`,this.currentAdSection??``,`force: `+e],numbers:[Q.now()]}),this.currentAdSection===null&&!e){this.log({message:`switch to video, no currentAdSection. can't switch`});return}let t=this.currentAdSection===`postroll`;if(this.actions){var n;if(this.adsState&&this.playerState)this.adsState.playbackState.set(`inactive`),this.currentAdSection=null,this.log({message:`switch to video, isPostroll: ${t}`});else{let e=`Switch to video: Adman state was not updated correctly`;this.log({message:e}),this.events.error$.next(e)}(n=this.actions).switchFromAdsToVideo?.call(n,!t)}}setPostrollPassed(e){this.adsState?.postrollPassed.set(e),this.log({message:`postroll passed`})}togglePlay(){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_toggle_play`,this.currentAdSection??``],numbers:[Q.now()]}),this.adsState){this.log({message:`toggle play`});let e=X(this.adsState.playbackState);e===`playing`?this.pause():e===`paused`&&this.play()}else this.onAdError(`Can not toggle play: Adman state is not initialized`)}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let t=e*this.volumeMultiplier;if(this.log({message:`set volume ${t}`}),this.adman)try{this.adman.setVolume(t)}catch{this.onAdError(`could not set ad volume`)}this.videoElement&&(this.videoElement.volume=t)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch{this.onAdError(`could not set ad fullscreen`)}}startPreroll(){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_preroll`],numbers:[Q.now()]}),this.adman){if(!this.isDestroyed){this.log({message:`start preroll`}),this.setVolume(this.initialVolume),this.currentAdSection=`preroll`,this.startWatchDog();try{this.adman.start(`preroll`)}catch{this.onAdError(`could not start preroll`)}}}else this.onAdError(`Can not start preroll: Adman is not initialized`)}startPostroll(){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_postroll`,this.currentAdSection??``],numbers:[Q.now()]}),this.adman&&this.actions){this.log({message:`start postroll`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`postroll`,this.startWatchDog();try{this.adman.start(`postroll`)}catch{this.onAdError(`could not start postroll`)}}else this.onAdError(`Can not start postroll: Adman is not initialized`)}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError(`Watchdog timeout`),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pplay`,this.currentAdSection??``],numbers:[Q.now()]}),this.adman){this.log({message:`ad play`}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError(`could not resume ad`)}}else this.onAdError(`Can not play: Adman is not initialized`)}pause(){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pause`,this.currentAdSection??``],numbers:[Q.now()]}),this.adman){this.stopWatchDog(),this.log({message:`ad pause`});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError(`could not pause ad`)}}else this.onAdError(`Can not pause: Adman is not initialized`)}skip(){if(Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_skip`,this.currentAdSection??``],numbers:[Q.now()]}),this.adman){this.stopWatchDog(),this.log({message:`ad skip`});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError(`could not skip ad`)}}else this.onAdError(`Can not skip: Adman is not initialized`)}setPosition(e,t){this.adman?.setPosition(Math.floor(e),Math.floor(t))}destroy(){Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_destroy`],numbers:[Q.now()]}),this.log({message:`destroy`}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&Gu.clearVideoElement(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...t){try{return await e(...t)}catch(e){return this.onAdError(e?.message??`External call failed`),null}}}var Ju=_(nt(),1),Yu=_(Un(),1),Xu=require(`@vkontakte/videoplayer-shared/es2018`),Zu=_(gt(),1),{NativeAbortSignal:Qu,NativeAbortController:$u}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function ed(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function td(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,`name`,{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class nd{constructor(){Object.defineProperty(this,`listeners`,{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class rd extends nd{constructor(){super(),this.listeners||nd.call(this),Object.defineProperty(this,`aborted`,{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,`onabort`,{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,`reason`,{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new id;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new id;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class id{constructor(){Object.defineProperty(this,`signal`,{value:new rd,writable:!0,configurable:!0})}abort(e){let t=td(e),n=ed(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(id.prototype[Symbol.toStringTag]=`AbortController`,rd.prototype[Symbol.toStringTag]=`AbortSignal`);function ad(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log(`__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill`),!0):typeof e.Request==`function`&&!e.Request.prototype.hasOwnProperty(`signal`)||!e.AbortController}function od(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!ad({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,`signal`,{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var sd=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,cd=`fetch`in sd&&ad({fetch:sd.fetch,Request:sd.Request,AbortController:sd.AbortController}),ld=cd?od({fetch:sd.fetch,Request:sd.Request,AbortController:sd.AbortController}):void 0,ud=cd?ld.fetch:sd.fetch;cd?ld.Request:sd.Request;var dd=cd?id:sd.AbortController;cd||sd.AbortSignal;var fd=require(`@vkontakte/videoplayer-shared/es2018`),pd=require(`@vkontakte/videoplayer-core/es2018`),md=require(`@vkontakte/videoplayer-statistics/es2018`),hd=(e,t,n)=>{let r=document.createElement(`a`);r.href=e,r.download=`${t}.${n}`,r.style.display=`none`,r.click()},gd=Symbol(`storeContext`),_d=e=>{fa(gd,e),Qn===`dev`&&(window.app={store:e})},vd=()=>{let e=da(gd);return fd.assertNonNullable(e,`Store context is empty!`),e},$=(e,t)=>yd(e,e.getValue(),t),yd=(e,t,n)=>eu(t,t=>{let r=e.subscribe(e=>{t(e),n?.(e)});return()=>r.unsubscribe()}),bd=(e,t,n,r,i=[`meta config not provided`])=>{let a=e.info,{width:o,height:s}=X(n.ui.playerSize),c=a.throughputEstimation$.getValue()?.toFixed(0)??0,l=a.rttEstimation$.getValue()?.toFixed(0)??0,u=a.isAutoQualityEnabled$.getValue()?`auto`:`manual`,d=`${$n} (core: ${pd.VERSION}, stat: ${md.VERSION}, shared: ${fd.VERSION})`,f=X(n.state.errorLog$),p=f.length?`
|
|
51
|
+
`+f.map((e,t)=>{let n=`${t}) Type: ${e.id}
|
|
52
|
+
`,r=`Message: ${e.message} (${e.thrown})
|
|
53
|
+
`,i=`Trace: ${e.thrown?.stack}
|
|
54
|
+
`;return n+r+i}).join(`
|
|
55
|
+
`):void 0,m=n.state.isAudioDisabled?`disabled`:X(n.state.isAudioAvailable$)?void 0:`unavailable`,h=e.info.currentVideoStream$.getValue(),g=e.info.currentAudioStream$.getValue(),_=[];h&&_.push(`Video: ${h?.codec??``}`+(h?.hdr?` (HDR)`:``)),g&&_.push(`Audio: ${g?.codec??``}`+(g?.language?` (${g.language})`:``));let v=a.currentQuality$.getValue(),y=``;if(v){let e=a.availableQualitiesFps$.getValue()[v];y=e?`${e}fps`:``}let b=a.httpConnectionType$.getValue(),x=a.currentBuffer$.getValue()?.end??0,S=Math.max(x-X(n.state.positionExact$),0),C={Version:d,Browser:navigator.userAgent,Config:i.join(`, `),"United video id":String(n.videoId),TraceId:r,VSID:X(n.vsid),"Content host":a.hostname$.getValue(),"Connection type":b?b+(a.httpConnectionReused$.getValue()?` (reused)`:``):``,Throughput:`${c}Kbps @ ${l}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(`, `):``,Streams:_.join(`, `),Quality:`${u} ${v??``} ${y}`,"Available qualities":a.availableQualities$.getValue().join(`, `),Audio:m,Position:`${X(n.state.positionExact$)}s`,Buffer:`${S}s`,State:`${X(n.playerPhase)} ${a.playbackState$.getValue()??``}`,"Player size":`${o}x${s}`,URL:window.location.href,Errors:p};return Zu.default(C).filter(([e,t])=>t!==void 0).map(([e,t])=>`${e}: ${t}`).join(`
|
|
56
|
+
`)},xd=(e,t,n)=>{let r=e.info,{width:i,height:a}=X(n.ui.playerSize),o={version:$n,viewport:`${i}x${a}`,volume:Math.round(X(n.state.volume$)*100)};o.id=n.videoId,r.currentFormat$.getValue()&&(o.provider=r.currentFormat$.getValue()),r.hostname$.getValue()&&(o.cdn=r.hostname$.getValue());let s=r.intrinsicVideoSize$.getValue();s&&(o.videoSize=`${s.width}x${s.height}`);let c=r.currentBuffer$.getValue(),l=r.currentNativeBuffer$.getValue(),u=r.isLive$.getValue(),d=r.liveBufferTime$.getValue();c&&l&&(u&&d?(o.buffer=c.end-d,o.nativeBuffer=l.end-d):(o.buffer=Math.max(c.end-X(n.state.positionExact$),0),o.nativeBuffer=Math.max(l.end-X(n.state.positionExact$),0))),o.position=X(n.state.positionExact$);let f=r.throughputEstimation$.getValue();f&&(o.speed=f);let p=r.videoBitrate$.getValue();p&&(o.bitrate=p);let m=r.liveLatency$.getValue();m&&(o.liveLatency=m);let h=r.currentVideoSegmentLength$.getValue();h&&(o.currentVideoSegmentLength=h);let g=r.currentAudioSegmentLength$.getValue();g&&(o.currentAudioSegmentLength=g);let _=X(n.vsid);typeof _==`string`&&(o.vsid=_);let v=e.info.currentVideoStream$.getValue()?.codec;v&&(o.videoCodec=v);let y=e.info.currentAudioStream$.getValue()?.codec;y&&(o.audioCodec=y),e.info.currentVideoStream$.getValue()?.hdr&&(o.hdr=!0);let b=e.info.currentAudioStream$.getValue()?.language;return b&&(o.audioLanguage=b),o},Sd=(e,t)=>hd(e,t,`mp4`),Cd=()=>{let e=[],t=0;return{add:(n,r)=>{e[t]=[n,r],t=(t+1)%10},find:t=>e.find(([e])=>e===t)}};class wd{constructor(){e(this,`destroyController`,new dd),e(this,`pendingDownloads`,new Set)}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let t=await ud(e,{signal:this.destroyController.signal});if(t.ok)return await t.text();throw t}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}}function Td(e,t=e=>e){let n=Y(e);return[eu(e,e=>{n.subscribe(e)}),e=>{n.set(t(e))}]}var Ed={auto_quality_invariant:`Авто`,auto_quality:`Авто ({actual})`,auto_quality_option:`Авто`,other_quality:`Другое`,high_quality:`Высокое качество`,high_quality_description:`Будет использовано больше трафика`,auto_quality_limit:`Автоматически`,traffic_saving_quality:`Экономия трафика`,traffic_saving_quality_description:`Видео грузятся быстрее, но качество ниже`,default_quality_for_any_video:`Качество для всех видео`,quality_applience:`Качество по умолчанию можно\xA0{action}`,quality_applience_action:`изменить`,menu_quality:`Качество`,menu_traffic_saving:`Экономия данных`,menu_playback_rate:`Скорость`,menu_report:`Сообщить о проблеме`,menu_pip:`Картинка в картинке`,menu_pip_close:`Развернуть видео`,menu_copy_video_link:`Скопировать ссылку на видео`,menu_copy_video_link_with_timestamp:`Скопировать ссылку на кадр`,menu_video_rotate:`Повернуть`,menu_video_loop_on:`Включить повторение`,menu_video_loop_off:`Отключить повторение`,menu_chromecast:`Chromecast трансляция`,menu_copy_debug:`Копировать данные для диагностики`,menu_save_debug:`Сохранить данные для диагностики`,menu_debug_overlay:`Техническая информация`,menu_copy_embed_code:`Копировать код для встраивания`,menu_audio_languages:`Звуковая дорожка`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Дорожка {index}`,pip_dummy_title:`Видео воспроизводится в режиме картинка в картинке`,submenu_quality:`Качество`,submenu_playback_rate:`Скорость`,submenu_settings:`Настройки`,submenu_traffic_saving:`Экономия данных`,submenu_audio_languages:`Звуковая дорожка`,playing_ads:`Реклама {timeleft}`,skip_ads_now:`Пропустить рекламу`,skip_ads_after:`Пропустить {time}с`,visit_advertiser:`Перейти на сайт`,aria_timeline:`Ползунок временной шкалы`,aria_timeline_value:`{position} (общая длительность {duration}`,doubletap_seek_step:`{seconds} секунд`,playback_rate_1:`Обычная`,playback_rate:`{multiplier}x`,video360:`панорамное видео`,subtitles_caption:`Субтитры`,subtitles_auto:`{language} (Автоматические)`,subtitles_off:`Выкл.`,subtitles_auto_caption:`Автоматические субтитры`,subtitles_turn_on:`Включить субтитры`,subtitles_turn_off:`Выключить субтитры`,traffic_saving_off:`Откл.`,traffic_saving_on:`Вкл.`,traffic_saving_helper_text:`При включении качество видео будет снижено для экономии трафика`,tooltip_button_disabled:`Кнопка недоступна`,tooltip_previous:`Предыдущее видео`,tooltip_restart:`Начать заново`,tooltip_play:`Смотреть`,tooltip_pause:`Пауза`,tooltip_next:`Следующее видео`,tooltip_interactive_go_back:`Вернуться к предыдущей главе`,tooltip_interactive_go_back_disabled:`История прохождения недоступна`,tooltip_interactive_go_back_disabled_first:`Вы смотрите первую главу`,tooltip_interactive_go_back_disabled_limit:`Лимит возвратов исчерпан`,tooltip_chapter_without_interactive:`В этой главе нет интерактива`,tooltip_interactive_of_chapter_completed:`Интерактивы этой главы уже пройдены`,tooltip_interactive_seek:`Перейти к интерактиву`,tooltip_interactive_graph_off:`Показать карту сюжета`,tooltip_interactive_graph_on:`Скрыть карту сюжета`,tooltip_live:`Перемотать на актуальный лайв`,tooltip_episodes:`Эпизоды`,tooltip_volume:`Включить звук`,tooltip_volume_muted:`Выключить звук`,tooltip_sound_unavailable:`Звук недоступен`,tooltip_subtitles_off:`Включить субтитры`,tooltip_subtitles_on:`Выключить субтитры`,tooltip_settings_off:`Открыть настройки`,tooltip_settings_on:`Закрыть настройки`,tooltip_fullscreen_off:`На весь экран`,tooltip_fullscreen_on:`Выйти из полноэкранного режима`,tooltip_chromecast_off:`Включить Chromecast`,tooltip_chromecast_on:`Выключить Chromecast`,tooltip_episode_finished:`Вы уже сделали свой выбор`,tooltip_episode_unfinished:`Не пройдено`,tooltip_disabled_when_interactive:`Интерактив уже идёт`,tooltip_disabled_when_graph_on:`Кнопка недоступна во время просмотра карты`,tooltip_interactive_interaction_time_indicator:`Нажмите на элемент интерактива`,tooltip_vk_logo:`Открыть в VK Видео`,tooltip_vk_video_logo:`Перейти в VK Видео`,tooltip_autoplay_off:`Включить автовоспроизведение`,tooltip_autoplay_on:`Отключить автовоспроизведение`,tooltip_context_menu_open:`Открыть контекстное меню`,tooltip_context_menu_close:`Закрыть контекстное меню`,download_video_caption:`Скачать видео`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Быстрые клавиши`,hotkey_map_modal_close_btn_text:`Закрыть`,hotkey_map_group_title_common:`Общие`,hotkey_map_group_title_playback:`Воспроизведение`,hotkey_map_group_title_subtitles:`Субтитры`,hotkey_map_group_title_episodes:`Эпизоды`,hotkey_map_item_mute_description:`Включить или отключить звук`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Увеличить громкость`,hotkey_map_item_volume_up_value:`Стрелка вверх`,hotkey_map_item_volume_down_description:`Уменьшить громкость`,hotkey_map_item_volume_down_value:`Стрелка вниз`,hotkey_map_item_pip_description:`Свернуть или развернуть мини-проигрыватель`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Включить или выключить полноэкранный режим`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Скрыть или показать контекстное меню`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Скрыть или показать список горячих клавиш`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Приостановить или продолжить воспроизведение`,hotkey_map_item_play_toggle_value:`Пробел (или k)`,hotkey_map_item_seek_backward_description:`Перемотать ролик на 10 секунд назад`,hotkey_map_item_seek_backward_value:`Стрелка влево (или j)`,hotkey_map_item_seek_forward_description:`Перемотать ролик на 10 секунд вперёд`,hotkey_map_item_seek_forward_value:`Стрелка вправо (или l)`,hotkey_map_item_fast_seek_backward_description:`Ускоренная перемотка назад`,hotkey_map_item_fast_seek_backward_value:`Shift + Стрелка влево`,hotkey_map_item_fast_seek_forward_description:`Ускоренная перемотка вперёд`,hotkey_map_item_fast_seek_forward_value:`Shift + Стрелка вправо`,hotkey_map_item_rate_down_description:`Уменьшить скорость воспроизведения`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Увеличить скорость воспроизведения`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Перейти к следующему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Включить или отключить субтитры`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Перейти к предыдущему эпизоду`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Стрелка влево`,hotkey_map_item_prev_episode_mac_value:`Option + Стрелка влево`,hotkey_map_item_next_episode_description:`Перейти к следующему эпизоду`,hotkey_map_item_next_episode_pc_value:`Ctrl + Стрелка вправо`,hotkey_map_item_next_episode_mac_value:`Option + Стрелка вправо`,hotkey_map_item_next_video_description:`Перейти к следующему видео`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Перейти к предыдущему видео`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`дн`,waiting_live_hour_value:`ч`,waiting_live_minute_value:`мин`,waiting_live_second_value:`сек`,waiting_live_colon:`:`,waiting_live_upcoming_title:`Трансляция еще не началась`,waiting_live_timer_title:`До начала трансляции осталось`,waiting_live_recover_title:`Трансляция приостановлена - она продолжится, когда автор вернётся`,waiting_record_title:`Трансляция завершена - запись появится позже`,aria_label_video_player:`Видео плеер`,aria_label_spherical_control:`Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.`,aria_label_debug_panel:`Область с технической информацией, сделайте скриншот для техподдержки`,aria_label_new_tab_alert:`Откроется в новой вкладке.`,aria_label_menu_quality:`Качество: {actual}`,aria_label_menu_audio_languages:`Язык аудио: {actual}`,aria_label_menu_rate:`Скорость: {actual}`,aria_label_menu_subtitle:`Субтитры: {actual}`,aria_label_menu_download:`Скачать видео`,aria_label_menu_debug_overlay:`Отображение технической информации`,aria_label_menu_rotate:`Повернуть видео на 90 градусов`,aria_label_menu_loop:`Переключение режима повторения`,aria_label_submenu_back:`Вернуться в меню настроек`,aria_label_submenu_traffic_saving:`Режим экономии данных`,aria_label_settings:`Настройки`,aria_label_context_menu:`Контекстное меню`,aria_label_autoplay:`Автовоспроизведение`,end_screen_next_video:`Следующее видео`,end_screen_recommended_video:`Рекомендуемое видео`,slow_video_notification_button:`Выбрать качество «Авто»`,slow_video_notification_force_description:`Видео грузится слишком медленно,
|
|
57
|
+
качество изменено на\xA0«Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
|
|
58
|
+
попробуйте изменить качество на «Авто»`,double_forward_label:`2x`,preview_track_notification_text:`Потяните вверх для точной перемотки`,preview_track_close_tooltip:`Выйти из режима точной перемотки`},Dd={auto_quality_invariant:`Auto`,auto_quality:`Auto ({actual})`,auto_quality_option:`Auto`,other_quality:`Other`,high_quality:`High quality`,high_quality_description:`Uses more data`,auto_quality_limit:`Auto`,traffic_saving_quality:`Data saving`,traffic_saving_quality_description:`Videos load faster but\xA0at\xA0lower quality`,quality_applience:`You can\xA0{action} the\xA0default quality`,quality_applience_action:`change`,default_quality_for_any_video:`Quality for\xA0all videos`,menu_quality:`Quality`,menu_playback_rate:`Playback rate`,menu_traffic_saving:`Data saving`,menu_report:`Report a problem`,menu_pip:`Picture in picture`,menu_pip_close:`Expand video`,menu_copy_video_link:`Copy video link`,menu_copy_video_link_with_timestamp:`Copy link with timestamp`,menu_video_rotate:`Rotate`,menu_video_loop_on:`Enable loop`,menu_video_loop_off:`Disable loop`,menu_chromecast:`Chromecast stream`,menu_copy_debug:`Copy debug info`,menu_save_debug:`Save debug info`,menu_debug_overlay:`Tech stats`,menu_copy_embed_code:`Copy embed code`,menu_audio_languages:`Audio track`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Audio track {index}`,pip_dummy_title:`Video plays in picture-in-picture mode`,submenu_quality:`Quality`,submenu_playback_rate:`Playback rate`,submenu_traffic_saving:`Data saving`,submenu_settings:`Settings`,submenu_audio_languages:`Audio track`,playing_ads:`Ads {timeleft}`,skip_ads_after:`Skip ads`,skip_ads_now:`Skip {time}s`,visit_advertiser:`Visit site`,aria_timeline:`Time scale slider`,aria_timeline_value:`{position} out of {duration}`,doubletap_seek_step:`{seconds} seconds`,playback_rate_1:`Normal`,playback_rate:`{multiplier}x`,video360:`spherical video`,subtitles_caption:`Subtitles`,subtitles_auto:`{language} (Auto-generated)`,subtitles_off:`Off`,subtitles_auto_caption:`Auto subtitles`,subtitles_turn_on:`Turn on subtitles`,subtitles_turn_off:`Turn off subtitles`,traffic_saving_off:`Off`,traffic_saving_on:`On`,traffic_saving_helper_text:`When turned on the video quality will be reduced to save data`,tooltip_button_disabled:`Button disabled`,tooltip_previous:`Previous video`,tooltip_restart:`Watch again`,tooltip_play:`Play`,tooltip_pause:`Pause`,tooltip_next:`Next video`,tooltip_interactive_go_back:`Back to previous chapter`,tooltip_interactive_go_back_disabled:`Interactive history unavailable`,tooltip_interactive_go_back_disabled_first:`You're watching the first chapter`,tooltip_interactive_go_back_disabled_limit:`Go-back limit exceeded`,tooltip_chapter_without_interactive:`This chapter has no interactive segment`,tooltip_interactive_of_chapter_completed:`Chapter's interactive segments already watched`,tooltip_interactive_seek:`Go to interactive`,tooltip_interactive_graph_off:`Show interactive graph`,tooltip_interactive_graph_on:`Hide interactive graph`,tooltip_live:`Go to the live edge`,tooltip_episodes:`Episodes`,tooltip_volume:`Volume off`,tooltip_volume_muted:`Turn volume on`,tooltip_sound_unavailable:`Sound unavailable`,tooltip_subtitles_off:`Turn subtitles on`,tooltip_subtitles_on:`Turn subtitles off`,tooltip_settings_off:`Open settings`,tooltip_settings_on:`Close settings`,tooltip_fullscreen_off:`Enter fullscreen mode`,tooltip_fullscreen_on:`Exit fullscreen mode`,tooltip_chromecast_off:`Turn Chromecast on`,tooltip_chromecast_on:`Turn Chromecast off`,tooltip_episode_finished:`You have already viewed interactive episode`,tooltip_episode_unfinished:`Interactive episode not finished`,tooltip_disabled_when_interactive:`Interactive video in progress`,tooltip_disabled_when_graph_on:`Button is disabled when graph is opened`,tooltip_interactive_interaction_time_indicator:`Press the interactive element`,tooltip_vk_logo:`Open in VK Video`,tooltip_vk_video_logo:`Go to VK Video`,tooltip_autoplay_off:`Turn autoplay on`,tooltip_autoplay_on:`Turn autoplay off`,tooltip_context_menu_open:`Open context menu`,tooltip_context_menu_close:`Close context menu`,download_video_caption:`Download video`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Keyboard shortcuts`,hotkey_map_modal_close_btn_text:`Close`,hotkey_map_group_title_common:`Common`,hotkey_map_group_title_playback:`Playback`,hotkey_map_group_title_subtitles:`Subtitles`,hotkey_map_group_title_episodes:`Episodes`,hotkey_map_item_mute_description:`Toggle mute`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Increase volume`,hotkey_map_item_volume_up_value:`Arrow up`,hotkey_map_item_volume_down_description:`Decrease volume`,hotkey_map_item_volume_down_value:`Arrow down`,hotkey_map_item_pip_description:`Toggle miniplayer`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Toggle full screen`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Hide or show context menu`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Hide or show list of hotkeys`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Toggle play/pause`,hotkey_map_item_play_toggle_value:`Space (or k)`,hotkey_map_item_seek_backward_description:`Rewind 10 seconds`,hotkey_map_item_seek_backward_value:`Arrow left (or j)`,hotkey_map_item_seek_forward_description:`Forward 10 seconds`,hotkey_map_item_seek_forward_value:`Arrow right (or l)`,hotkey_map_item_fast_seek_backward_description:`Fast rewind`,hotkey_map_item_fast_seek_backward_value:`Shift + Arrow left`,hotkey_map_item_fast_seek_forward_description:`Fast forward`,hotkey_map_item_fast_seek_forward_value:`Shift + Arrow right`,hotkey_map_item_rate_down_description:`Decrease playback rate`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Increase playback rate`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Previous frame (while paused)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Next frame (while paused)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Seek to specific point in the video (7 advances to 70% of duration)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Toggle captions ON/OFF`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Seek to previous episode`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Arrow left`,hotkey_map_item_prev_episode_mac_value:`Option + Arrow left`,hotkey_map_item_next_episode_description:`Seek to next episode`,hotkey_map_item_next_episode_pc_value:`Ctrl + Arrow right`,hotkey_map_item_next_episode_mac_value:`Option + Arrow right`,hotkey_map_item_next_video_description:`Next video`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Previous video`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`d`,waiting_live_hour_value:`h`,waiting_live_minute_value:`min`,waiting_live_second_value:`sec`,waiting_live_colon:`:`,waiting_live_upcoming_title:`The broadcast hasn't started yet`,waiting_live_timer_title:`Before the start of the broadcast left`,waiting_live_recover_title:`The broadcast has been paused - it will resume when the author returns`,waiting_record_title:`The broadcast completed - recording will appear later`,aria_label_video_player:`Video player`,aria_label_spherical_control:`Spherical video control. Use the arrow keys to pan the video.`,aria_label_debug_panel:`Technical information area, take a screenshot for technical support`,aria_label_new_tab_alert:`Opens in a new tab.`,aria_label_menu_quality:`Quality: {actual}`,aria_label_menu_audio_languages:`Audio language: {actual}`,aria_label_menu_rate:`Rate: {actual}`,aria_label_menu_subtitle:`Subtitles: {actual}`,aria_label_menu_download:`Download video`,aria_label_menu_debug_overlay:`Display of technical information`,aria_label_menu_rotate:`Rotate video 90 degrees`,aria_label_menu_loop:`Toggle loop`,aria_label_submenu_back:`Return to settings menu`,aria_label_submenu_traffic_saving:`Data saving mode`,aria_label_settings:`Settings`,aria_label_context_menu:`Context menu`,aria_label_autoplay:`Autoplay`,end_screen_next_video:`Next video`,end_screen_recommended_video:`Recommended video`,slow_video_notification_button:`Select Auto quality`,slow_video_notification_force_description:`The video is loading too slowly,
|
|
59
|
+
so\xA0the\xA0quality was changed to\xA0Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
|
|
60
|
+
Try switching the\xA0quality to\xA0Auto.`,double_forward_label:`2x`,preview_track_notification_text:`pull up to open precise rewind`,preview_track_close_tooltip:`dismiss precise rewind`},Od=new Map;Od.set(Xu.InterfaceLanguage.EN,Dd),Od.set(Xu.InterfaceLanguage.RU,Ed);var kd=new Map,Ad=({language:e,pack:t,fallback:n})=>{if(Od.has(e)){let n=Od.get(e);Od.set(e,{...n,...t})}else Od.set(e,t);kd.set(e,n)},jd=e=>Od.has(e),Md=(e,t,n,r)=>{let i=Od.get(e)?.[t];if(Xu.isNullable(i)){let n=kd.get(e)??r;i=(n?Od.get(n):void 0)?.[t]}return Xu.isNullable(i)?t+Ju.default(n??{}).join(` `):n?Yu.default(i,/{(\w+?)}/g,(e,t)=>n[t]??``):i},Nd=(e,t)=>{let{interfaceLanguage$:n}=vd();return Md(X(n),e,t,mu().defaultLanguage)},Pd=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,Fd=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},Id=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},Ld=()=>!!Id(),Rd=e=>{let t=Math.round(e);return isNaN(t)||t<40?``:t>=40&&t<55?50:t>=55&&t<90?60:t>=90&&t<180?120:t>=180?240:``};_(gt(),1),_(nt(),1),_(Nn(),1);var zd=require(`@vkontakte/videoplayer-shared/es2018`),Bd=`vk_player_`,Vd=`vk_player_prefer_traffic_saving_enabled`,Hd=`vk_player_preferred_volume`,Ud=`vk_player_prefer_volume_mute`,Wd=`vk_player_preferred_quality`,Gd=`vk_player_preferred_default_quality_settings`,Kd=`vk_player_preferred_quality_settings_by_video`,qd=`vk_player_preferred_stream_language`,Jd=`vk_player_preferred_rate`,Yd=`vk_player_preferred_subtitles_language`,Xd=`vk_player_user_video_prefs`;`${Bd}`;var Zd=e=>e>1?1:e<0?0:e,Qd=()=>{let e=zd.safeStorage.get(Hd);return zd.isNullable(e)?void 0:Zd(parseFloat(e))},$d=(e,t)=>zd.safeStorage.set(Wd,JSON.stringify({videoId:e,value:t})),ef=()=>zd.safeStorage.remove(Wd),tf=e=>{let t=zd.safeStorage.get(Wd);if(zd.isNullable(t))return;let{videoId:n,value:r}=JSON.parse(t);if(e!==n){ef();return}return r},nf=(e,t)=>{t?zd.safeStorage.set(e,`true`):zd.safeStorage.remove(e)},rf=e=>zd.safeStorage.get(e)===`true`,af=()=>rf(Ud),of=e=>nf(Vd,e),sf=()=>rf(Vd),cf=()=>zd.safeStorage.get(qd),lf=e=>zd.safeStorage.set(qd,e),uf=()=>zd.safeStorage.get(Yd),df=e=>{e?zd.safeStorage.set(Yd,e):zd.safeStorage.remove(Yd)},ff=e=>zd.safeStorage.set(Jd,JSON.stringify({rate:e})),pf=()=>{let e=zd.safeStorage.get(Jd);if(zd.isNullable(e))return;let{rate:t}=JSON.parse(e);return t},mf=(()=>{let e=e=>{zd.safeStorage.set(Gd,JSON.stringify(e))},t=()=>{try{let e=zd.safeStorage.get(Gd);return e?JSON.parse(e):null}catch{return null}},n=()=>{try{let e=zd.safeStorage.get(Kd);return e?JSON.parse(e):null}catch{return null}},r=e=>{zd.safeStorage.set(Kd,JSON.stringify(e))},i=r=>{l(r);let i=r?n():null;if(i&&i?.videoId===r)return{...i,appliesTo:`to-video`};i&&a();let o=t();return o?{...o,appliesTo:`as-default`}:(e({type:`auto_quality`}),{type:`auto_quality`,appliesTo:`as-default`})},a=()=>{zd.safeStorage.remove(Kd)},o=()=>{zd.safeStorage.remove(Gd)},s=(t,n=`as-default`)=>{t.type===`exact_quality`||n===`to-video`?r(t):e(t)},c=e=>{let t=i(e);if(t){switch(t.type){case`traffic_saving`:of(!0);break;case`exact_quality`:$d(e,t.quality)}a(),o()}},l=t=>{let n=tf(t);if(n){r({type:`exact_quality`,videoId:t,quality:n});return}sf()&&e({type:`traffic_saving`,videoId:t}),of(!1),ef()};return{getPreferredQualitySettings:i,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:s,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:uf,savePreferredSubtitlesLanguage:df}})();mf.getPreferredQualitySettings;var hf=mf.migrateSettingsToLegacyWay;mf.savePreferredQualitySettings,mf.savePreferredDefaultQualitySettings,mf.removePreferredQualitySettingsByVideo,mf.getPreferredDefaultQualitySettings;var gf=()=>{let e=zd.safeStorage.get(Xd);if(e)try{return JSON.parse(e)}catch{return null}return null},_f=(e,t)=>{var n;let r=gf();return(r==null||(n=r[e])==null?void 0:n[t])??null};class vf{constructor(){e(this,`oneLineRegExp`,/\r\n|\n|\r/),e(this,`twoLinesRegExp`,/\r\n\r\n|\n\n|\r\r/)}parse(e,t){let n=[],r=e.split(this.twoLinesRegExp);for(let e of r){let r={startTime:0,endTime:0,texts:[],lang:t},i=e.split(this.oneLineRegExp);for(let e of i)if(!r.startTime&&!r.endTime){let{startTime:t,endTime:n}=new yf().parse(e);r.startTime=t,r.endTime=n}else if(e.trim()!==``){let{texts:t}=new bf().parse(e);r.texts=[...r.texts,...t]}(r.startTime||r.endTime)&&r.texts.length>0&&n.push(r)}return n}}class yf{constructor(){e(this,`timeRegExp`,/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/),e(this,`timingRegExp`,RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`))}parse(e){let t={startTime:0,endTime:0},n=this.timingRegExp.exec(e);return n&&(t.startTime=this.calcTime(n[1],n[2],n[3],n[4]),t.endTime=this.calcTime(n[6],n[7],n[8],n[9])),t}parseTime(e){let t=this.timeRegExp.exec(e);return t?this.calcTime(t[1],t[2],t[3],t[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e=`0`,t=`0`,n=`0`,r=`0`){let i=Number(e)*60*60,a=Number(t)*60,o=Number(n),s=Number(`0.${r}`);return i+a+o+s}}class bf{constructor(){e(this,`letterTagRegExp`,/<[a-z]*>|<\/[a-z]*>/)}parse(e){let t={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,`g`),``).split({[Symbol.split](e){let t=0,n=[];for(;t<e.length;){let r=[`<`,`>`].reduce((n,r)=>{let i=e.indexOf(r,t);return n===-1||n>i?i:n},-1);if(r===-1){n.push(e.substring(t));break}n.push(e.substring(t,r)),t=r+1}return n}}),r=new yf;for(let e of n)r.isTime(e)?t.texts.push({type:`timestamp`,value:r.parseTime(e)}):t.texts.push({type:`text`,value:e});return t}}var xf=vf,Sf=require(`@vkontakte/videoplayer-shared/es2018`),Cf,wf,Tf=0,Ef=!1,Df=``,Of=(e,t=0,n=0)=>e<t&&e<n,kf=(e,t=0,n=0)=>e>=t&&e<=n,Af=(e,t=0,n=0)=>e>t&&e>n,jf=(e,t,n,r=!1)=>{let i=n.find(({id:e})=>e===t.value)?.subtitles;if(r)return i?.find(({startTime:t,endTime:n})=>kf(e,t,n));let a=e>=Tf,o=e<Tf;if(Tf=e,o&&(Ef=!1),Sf.isNonNullable(Cf)&&kf(e,Cf.startTime,Cf.endTime)&&Df===t.value)return Cf;if(!Sf.isNonNullable(wf)&&i?.length&&!Ef){wf=i.find(({startTime:t,endTime:n})=>kf(e,t,n)||a&&Of(e,t,n)),Cf=void 0,!Sf.isNonNullable(wf)&&i[i.length-1].endTime<e&&(Ef=!0);return}else if(kf(e,wf?.startTime,wf?.endTime))return Cf=wf,wf=void 0,Df=t.value,Cf;else (a&&Af(e,wf?.startTime,wf?.endTime)||o&&Of(e,wf?.startTime,wf?.endTime))&&(wf=void 0)},Mf={ru:`Русский`,en:`English`,uk:`Українська`,be:`Беларуская (тарашкевiца)`,es:`Español`,fi:`Suomi`,de:`Deutsch`,it:`Italiano`,bg:`Български`,hr:`Hrvatski`,hu:`Magyar`,sr:`Српски`,pt:`Português`,el:`Ελληνικά`,pl:`Polski`,fr:`Français`,ko:`한국어`,"zh-CN":`汉语`,lt:`Lietuvių`,ja:`日本語`,cs:`Čeština`,et:`Eesti`,tt:`Татарча`,ba:`Башҡортса`,cv:`Чăвашла`,sk:`Slovenčina`,ro:`Română`,no:`Norsk`,lv:`Latviešu`,az:`Azərbaycan dili`,hy:`Հայերեն`,sv:`Svenska`,nl:`Nederlands`,tk:`Türkmen`,ka:`ქართული`,da:`Dansk`,uz:`O‘zbek`,th:`ภาษาไทย`,id:`Bahasa Indonesia`,tg:`Тоҷикӣ`,sl:`Slovenščina`,bs:`Bosanski`,"pt-BR":`Português brasileiro`,fa:`فارسی`,vi:`Tiếng Việt`,hi:`हिन्दी`,si:`සිංහල`,bn:`বাংলা`,tl:`Tagalog`,mn:`Монгол`,my:`ဗမာစာ`,tr:`Türkçe`,ne:`नेपाली`,ur:`اردو`,ky:`Кыргыз тили`,pa:`پنجابی`,os:`Ирон`,kn:`ಕನ್ನಡ`,sw:`Kiswahili`,kk:`Қазақша`,ar:`العربية`,he:`עברית`,ab:`Аҧсшәа`,eu:`Euskara`,eo:`Esperanto`},Nf={abk:`as`,ara:`ar`,aze:`az`,bak:`ba`,bel:`be`,ben:`bn`,bos:`bs`,bul:`bg`,ces:`cs`,chv:`cv`,dan:`da`,deu:`de`,ell:`el`,eng:`en`,epo:`eo`,est:`et`,eus:`eu`,fas:`fa`,fin:`fi`,fra:`fr`,heb:`he`,hin:`hi`,hrv:`hr`,hun:`hu`,hye:`hy`,ind:`id`,ita:`it`,jpn:`ja`,kan:`kn`,kat:`ka`,kaz:`kk`,kir:`ky`,kor:`ko`,lav:`lv`,lit:`lt`,mon:`mn`,mya:`my`,nep:`ne`,nld:`nl`,nor:`no`,oss:`os`,pan:`pa`,pol:`pl`,por:`pt`,ron:`ro`,rus:`ru`,sin:`si`,slk:`sk`,slv:`sl`,spa:`es`,srp:`sr`,swa:`sw`,swe:`sv`,tat:`tt`,tgk:`tg`,tgl:`tl`,tha:`th`,tuk:`tk`,tur:`tr`,ukr:`uk`,urd:`ur`,uzb:`uz`,vie:`vi`},Pf=e=>Mf[e]??Mf[Nf[e]]??void 0,Ff=`vk_player_debug_panel_opened`,If=`videoplayer`,Lf=`videoplayer`,Rf=`off`,zf=require(`@vkontakte/videoplayer-shared/es2018`),Bf=5e3;function Vf(){let e=Y(!1),t=Y(!0),n=()=>{e.set(!0)},r=()=>{e.set(!1)},i=e=>{t.set(e)},[a,o]=Td(!1),[s,c]=Td(!0),[l,u]=Td(!1),d=Y(!1),f=zf.getWindow().setTimeout(()=>{},0),p=()=>{d.set(!0),zf.getWindow().clearTimeout(f),f=zf.getWindow().setTimeout(()=>{d.set(!1)},Bf)},m=()=>{zf.getWindow().clearTimeout(f),d.set(!1)},h=()=>{zf.getWindow().clearTimeout(f),d.set(!1)},g=()=>{if(X(l))return u(!1),!0;let e=X(d);return h(),e},_=()=>{h()};function v(e){let{state:{isPlaying$:t,isEnded$:n,isLoaderVisible:r,crashed$:i},ui:{settingsVisible:a},ads:{playbackState:s},playerPhase:l}=e;tu([t,n,d,a],([e,t,n,r])=>!r&&(!e||t||n)).subscribe(e=>{o(e),e||m()}),tu([l,r,s,i],([e,t,n,r])=>(e===`video`&&t||e===`ads`&&n===`inactive`)&&!r).subscribe(c)}return{state:{touched:Y(!1),controls:{prevButton:Y(void 0),playButton:Y(void 0),replayButton:Y(void 0),nextButton:Y(void 0),playPrevChapterButton:Y(void 0),seekToInteractiveButton:Y(void 0),interactiveGraphButton:Y(void 0),liveButton:Y(void 0),time:Y(void 0),episodes:Y(void 0),volume:Y(void 0),subtitles:Y(void 0),settings:Y(void 0),context:Y(void 0),chromecast:Y(void 0),pip:Y(void 0),fullscreen:Y(void 0),vkLogo:Y(void 0),interactiveTimeIndicator:Y(void 0),timeline:Y(void 0),autoplayNextToggle:Y(void 0),"theater-mode-button":Y(void 0),additionalButtons:[]},modals:{hotKeyMap:{show:Y(!1),data:Y({title:``,closeBtnText:``,groups:[]})}},isFullscreen:Y(Ld()),isFullscreenOpenedByKeyboard:Y(!1),isAutoplay:Y(!1),debugPanelVisible:Y(!1),episodes:{panelOpened$:Y(!1),openedByKeyboard$:Y(!1)},contextMenu:{visible$:Y(!1),btnRef$:Y(void 0),openedByBtnKeyboard$:Y(!1),openedByHotKey$:Y(!1),lastActiveElem$:Y(void 0),showContextMenuBtn$:Y(!1),position$:Y({top:0,left:0})},playerSize:Y({width:0,height:0}),isMobile:Y(!1),icon3DVideoVisible:Y(!1),scrubbingInProgress:Y(!1),volumeChangingInProgress:e,interactiveHideMobileControls:Y(!1),overlayContainer$:Y(void 0),startedByKeyboard$:Y(!1),autoplayNextEnabled$:Y(!1),timerNextVideoRunning$:Y(!0),settingsMenu:{visible$:Y(!1),ref$:Y(void 0),openedByBtnKeyboard$:Y(!1)},settingsSubMenu:{visible$:Y(!1),ref$:Y(void 0),name$:Y(void 0)},userActionsDisabled:Y(!1),hiddenControls:{volume:Y(!1),vkLogo:Y(!1),pip:Y(!1),chromecast:Y(!1),settings:Y(!1)},isControlsAvailable:t,controlBlocks:{topLeft:Y(void 0),topRight:Y(void 0),middle:Y(void 0),bottom:Y(void 0),bottomLeft:Y(void 0),bottomRight:Y(void 0)},videoTitleInfo:Y(void 0),doubleForwardOn$:Y(!1),doubleForwardAvailable$:Y(!1),previewTrackActive:Y(!1),previewTrackDragInProgress:Y(!1),previewTrackAvailable:Y(!1),isPreviewTrackHorizontallyAligned:Y(!1),isShowLoader:s,controlsVisible:a,settingsVisible:l},action:{stopVolumeChanging:r,startVolumeChanging:n,setControlsAvailibility:i,onUserInput:p,clearShowByInput:h,onBackButton:g,setSettingsVisibility:u,onPlay:_},resolveDependency:v}}var Hf=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:n,isLiveCatchUpMode:r,statAuthToken:i,isAudioDisabled:a,canDownload:o,callbacks:s,webApi:c,previewThumbsData:l,uiConfig:u,coreConfig:d,player:f,stopPlayer:p,looped:m=!1,statistics:h,saveRate:g,internalsExposure:_,playerId:v,metaConfig:y,app:b,video:x,deviceCapabilities:S})=>{let C=Vf(),w={...d,isAudioDisabled:a,live:{...d.live,isLiveCatchUpMode:!!r}},T=u,E=Z.TracerFactory.createRootTracer(!1),D=E.createComponentTracer(`Store`),O=f||new Bu.Player(w,E,{playerId:v,onDevNullLog:s?.onDevNullLog});_?.expose({corePlayer:O});let k=new Z.Logger,A=new qu(k,{loadTimeout:T.ads.loadTimeout,initTimeout:T.ads.initTimeout,runtimeTimeout:T.ads.runtimeTimeout,useAdmanFromNPM:T.ads.useAdmanFromNPM,volumeMultiplier:T.ads.volumeMultiplier,isVsidOriginal:T.ads.isVsidOriginal}),j=c?.focusManager,M=k.createComponentLog(`Store`),ee,N,te={},ne=new wd,re=new Z.Subscription,ie=``,ae=h&&h.oneStat?$(h.oneStat.vsid$):eu(void 0),oe=()=>Pd(Z.getWindow().document,Bu.clientChecker.device.isIOS),se=Y(!1),ce=Y([]),le=Z.merge(O.events.fatalError$,O.events.managedError$).subscribe(e=>ce.update(t=>[...t,e])),ue=eu(!1,e=>{let t=O.events.fatalError$.subscribe(()=>e(!0));return()=>t.unsubscribe()}),de=async e=>{let t=Lu.default(Iu.default(Z.InterfaceLanguage),e);if(T.downloadVKLanguages&&(t&&T.updateBuiltinLanguages||!jd(e))){let t;try{t=await Z.loadVKLangPack(e,If,Lf)}catch{var n;h==null||(n=h.oneStat)==null||n.logError({errorType:`VKLangPack`,fatal:!1})}t&&(Ad({language:e,pack:t,fallback:T.defaultLanguage}),fe.set(e),pe.update(e=>e+1))}jd(e)&&fe.set(e)},fe=Y(e),pe=Y(0),me=Y(t);de(e);let he=(e,t)=>Md(X(fe),e,t,T.defaultLanguage),ge=Y(`thumb`);ge.subscribe(e=>{e===`ads`&&O.info.playbackState$.getValue()&&ye()});let _e=(()=>{let e=tu([ue,ge],([e,t])=>e?`crashed`:t);return{...e,is:t=>X(e)===t}})(),ve=Y(),ye=()=>{ve.set({muted:O.info.muted$.getValue()})},be=null,xe=O.info.isBuffering$,Se=eu(xe.getValue(),e=>{let t=xe.subscribe(t=>{t&&be===null?be=Z.getWindow().setTimeout(()=>{e(xe.getValue()),be=null},T.loaderDelay):e(t)});return()=>{t.unsubscribe(),be&&Z.getWindow().clearTimeout(be)}});D.log(`create store`),M({message:`create store`});let Ce=e=>{M({message:`init video, config: ${JSON.stringify(e)}`}),Z.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`core_init_video`],numbers:[Z.now()]}),O.initVideo(e),D.log(`init video`),e.subtitles&&O.setExternalTextTracks(e.subtitles),ee=e,ie=e.subtitlesForcedLanguage||``},we=new Z.Subject,Te=new Z.ValueSubject(Vu.SeekAction.UNKNOWN),Ee=new Z.Subject,De={actionRewind$:we,actionSeek$:Te,inFullscreen$:new Z.Observable(e=>C.state.isFullscreen.subscribe(t=>e.next(t))),actionSetSubtitle$:Ee},Oe=new Z.Subject,ke=new Z.Subject,Ae={actionSeek$:Te,actionSubtitlesSwitched$:Oe,actionQuality$:ke,playerSize$:new Z.Observable(e=>C.state.playerSize.subscribe(t=>e.next(t))),inFullscreen$:new Z.Observable(e=>C.state.isFullscreen.subscribe(t=>e.next(t))),isLoaderVisible$:new Z.Observable(e=>Se.subscribe(t=>e.next(t)))};if(h){let{oneStat:e,thinOneStat:t,mediascopePixel:n,statSubscription:r}=h;e&&(r.add(e.attachToUi(De)),r.add(e.attachToAds(A.events)),e.authorize(i).catch(e=>{M({message:`onestat auth error ${String(e)}`})}),n&&n.attachTo(O)),t&&(r.add(t.attachTo(O,A.events)),r.add(t.attachToUi(Ae)),r.add(t.attachToAds(A.events)),t.updateContext({isMobile:X(C.state.isMobile)}),t.authorize(i))}let je=()=>{if(Bu.clientChecker.device.isIOS&&N)try{Fd(N)}catch(e){M({message:`exitIosSafariFullscreen failed: ${e}`})}};re.add(O.experimental.element$.subscribe(e=>{e&&(N=e,e.classList.add(`player-media`))})).add(O.events.ended$.subscribe(()=>{var e;je(),s==null||(e=s.onEnded)==null||e.call(s)})).add(O.events.looped$.subscribe(()=>{var e;s==null||(e=s.onLooped)==null||e.call(s)})).add(O.events.started$.subscribe(async()=>{var e;let t=O.info.muted$.getValue();s==null||(e=s.onStarted)==null||e.call(s),te.onStarted?.call(te,t)})).add(O.events.willSeek$.subscribe(({from:e,to:t})=>{var n;s==null||(n=s.onSeek)==null||n.call(s,e,t,Te.getValue())})).add(O.events.autoplaySoundProhibited$.subscribe(()=>{var e;s==null||(e=s.onAutoplaySoundProhibited)==null||e.call(s)})).add(O.info.position$.subscribe(e=>{let t=O.info.duration$.getValue();if(isFinite(t)&&t>0){var n;s==null||(n=s.onTimeupdate)==null||n.call(s,t,e),A.setPosition(e,t)}})).add(O.events.fatalError$.subscribe(e=>{var t;s==null||(t=s.onCrashed)==null||t.call(s,e?`${e.id}: ${e.message}`:void 0)})).add(O.events.fetcherRecoverableError$.subscribe(e=>{var t;s==null||(t=s.onRecoverableError)==null||t.call(s,e?`${e.id}: ${e.message}`:void 0)})).add(O.events.loadedMetadata$.subscribe(()=>{se.set(!0)})).add(O.info.liveTime$.subscribe(e=>{var t;s==null||(t=s.onLiveTime)==null||t.call(s,e)})).add(O.info.isStalled$.subscribe(e=>{var t;s==null||(t=s.onStalledChanged)==null||t.call(s,e)})).add(O.info.isLiveEnded$.subscribe(e=>{var t;return e&&(s==null||(t=s.onLiveEnded)==null?void 0:t.call(s))})).add(A.events.loadStarted$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onLoadStarted)==null?void 0:t.call(e)})).add(A.events.loadEnded$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onLoadEnded)==null?void 0:t.call(e)})).add(A.events.loadError$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onLoadError)==null?void 0:t.call(e)})).add(A.events.init$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onInit)==null?void 0:t.call(e)})).add(A.events.ready$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onReady)==null?void 0:t.call(e)})).add(A.events.started$.subscribe(e=>{var t,n;return s==null||(t=s.adsInfo)==null||(n=t.onStarted)==null?void 0:n.call(t,e)})).add(A.events.timeRemained$.subscribe(e=>{var t,n;return s==null||(t=s.adsInfo)==null||(n=t.onTimeRemained)==null?void 0:n.call(t,e)})).add(A.events.ended$.subscribe(e=>{var t,n;return s==null||(t=s.adsInfo)==null||(n=t.onCompleted)==null?void 0:n.call(t,e)})).add(A.events.empty$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onEmpty)==null?void 0:t.call(e)})).add(A.events.clicked$.subscribe(e=>{var t,n;return s==null||(t=s.adsInfo)==null||(n=t.onClicked)==null?void 0:n.call(t,e)})).add(A.events.closed$.subscribe(e=>{var t,n;return s==null||(t=s.adsInfo)==null||(n=t.onClosed)==null?void 0:n.call(t,e)})).add(A.events.error$.subscribe(e=>{var t,n;return s==null||(t=s.adsInfo)==null||(n=t.onError)==null?void 0:n.call(t,e)})).add(A.events.paused$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onPaused)==null?void 0:t.call(e)})).add(A.events.resumed$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onResumed)==null?void 0:t.call(e)}));let Me=eu(O.info.position$.getValue(),e=>{let t,n,r=()=>{let i=O.info.playbackState$.getValue(),a=O.info.isLive$.getValue(),o=O.info.duration$.getValue(),s=O.info.position$.getValue();if(i&&Lu.default([Bu.PlaybackState.PLAYING,Bu.PlaybackState.PAUSED],i)){let t=a?s-o:O.getExactTime();t!==n&&e(t),n=t}t=Z.getWindow().requestAnimationFrame(r)};return r(),()=>Z.getWindow().cancelAnimationFrame(t)}),Ne=$(O.info.playbackState$),Pe=tu([Ne,$(O.info.isBuffering$)],([e,t])=>t?`buffering`:e),Fe=$(O.info.currentBuffer$),Ie=$(O.info.isEnded$),Le=$(O.info.isLive$),Re=T.features.playbackRate?$(O.info.canChangePlaybackSpeed$):eu(!1),ze=$(O.info.liveBufferTime$),Be=$(O.info.volume$),Ve=$(O.info.muted$),He=yd(O.info.predefinedQualityLimitType$.pipe(Z.map(e=>e===Bu.PredefinedQualityLimits.TRAFFIC_SAVING)),O.info.predefinedQualityLimitType$.getValue()===Bu.PredefinedQualityLimits.TRAFFIC_SAVING),Ue=yd(O.info.predefinedQualityLimitType$.pipe(Z.map(e=>e===Bu.PredefinedQualityLimits.HIGH_QUALITY)),O.info.predefinedQualityLimitType$.getValue()===Bu.PredefinedQualityLimits.HIGH_QUALITY),We=$(O.info.autoQualityLimitingAvailable$),Ge=$(O.info.availableQualities$),Ke=$(O.info.availableQualitiesFps$),qe=$(O.info.currentFormat$),Je=$(O.info.throughputEstimation$),Ye=$(O.info.videoBitrate$),Xe=$(O.info.intrinsicVideoSize$),Ze=$(O.info.duration$),Qe=$(O.info.isAudioAvailable$),$e=()=>{be&&Z.getWindow().clearTimeout(be),be=null},et=tu([Ze,Le],([e,t])=>t?-e:e),tt=tu([Ne],([e])=>e===Bu.PlaybackState.PLAYING),nt=$(O.info.atLiveEdge$),rt=$(O.info.atLiveDurationEdge$),it=$(O.info.position$),at=tu([it,Ze],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),ot=$(O.info.availableVideoStreams$),st=T.features.audioLanguages?$(O.info.availableAudioStreams$):eu([]),ct=$(O.info.currentVideoStream$),lt=$(O.info.currentAudioStream$),ut=e=>{e.language&&lf(e.language),O.setVideoStream(e)},dt=e=>{O.setAudioStream(e)},ft=e=>{let t;if(e.length===1&&(t=Ru.default(e,0)),t??=e.find(e=>`isDefault`in e&&e.isDefault),T.features.userVideoPrefs&&n){let r=_f(T.userSalt,String(n));r?.audioTrackId&&(t=e.find(e=>e.id===r.audioTrackId)??t)}let r=cf();return r&&(t??=e.find(({language:e})=>r===e)),t??=Ru.default(e,0),t},pt=e=>{D.log(`change audio stream`,{id:e});let t=O.info.availableAudioStreams$.getValue().find(t=>t.id===e);t&&dt(t)},mt=!1;re.add(O.info.availableAudioStreams$.subscribe(e=>{if(!mt&&e.length){let t=ft(e);t&&(O.setAudioStream(t),mt=!0)}})),st.subscribe(e=>{var t;s==null||(t=s.onAvailableAudioStreamsChanged)==null||t.call(s,e.map(({label:e=``,id:t=``,language:n=``})=>({label:e,language:n,id:t})))}),lt.subscribe(e=>{var t;return e&&(s==null||(t=s.onAudioStreamChanged)==null?void 0:t.call(s,e.id))});let ht=!1;re.add(O.info.availableVideoStreams$.subscribe(e=>{if(!ht&&e.length){let t=ft(e);t&&(O.setVideoStream(t),ht=!0)}}));let gt=Y(void 0),_t=$(O.info.isAutoQualityEnabled$,e=>e&>.set(void 0)),vt=tu([gt,$(O.info.currentQuality$,()=>gt.set(void 0))],([e,t])=>e??t),yt=tu(qe,e=>e!==Bu.VideoFormat.MPEG),bt=tu([Ge,Ke,_t,vt,yt],([e,t,n,r,i])=>{let a=[];i&&a.push({value:`auto`,displayValue:he(`auto_quality_option`),selected:n});let o=e.filter(e=>!Z.isInvariantQuality(e));for(let e of o){let i=t[e];a.push({value:e,displayValue:`${e}${i?Rd(i):``}`,selected:n?!1:e===r})}return a}),xt=$(O.info.currentPlaybackRate$),St=tu([xt,nt,rt],([e,t,n])=>{let r=n?1:T.controls.playbackRateMin,i=t?1:T.controls.playbackRateMax,a=T.controls.playbackRateStep,o=[];for(let t=r;t<=i;t+=a)o.push({value:t,displayValue:t===1?he(`playback_rate_1`):he(`playback_rate`,{multiplier:t.toString(10)}),selected:e===t});return o}),Ct=()=>({displayValue:he(`subtitles_off`),value:Rf,language:``}),wt=Y(Ct()),Tt=tu([wt,pe],([e],t)=>{e.value===Rf?t(Ct()):t(e)}),Et=T.features.subtitles?$(O.info.availableTextTracks$):eu([]),Dt=Cd(),Ot=tu([Et,Tt],([e,t],n)=>{let r=[],i=e.find(({id:e})=>e===t.value);if(i?.url){let[,e]=Dt.find(i.url)??[];if(e){n(e);return}ne.download(i.url).then(e=>{if(!e||ne.isDestroyed())return;let a=new xf,o=i.language;if(o){let t=!!i.isAuto,n=a.parse(e,o);r.push({lang:o,subtitles:n,isAuto:t,id:i.id})}Dt.add(i.url,r),X(Tt).value===t.value&&n(r)}).catch(()=>{var e;h==null||(e=h.oneStat)==null||e.logError({errorType:`Subtitles download`,fatal:!1})})}n(r)}),kt=tu([xt,tt,Tt],([e,t,n],r)=>{let i;if(O.info.isLive$.getValue()&&t&&n.value!==Rf){let t=()=>{let n=1e3/(3*e);i=Z.getWindow().setTimeout(t,n),r(Date.now())};return t(),()=>Z.getWindow().clearTimeout(i)}}),At=tu([Et,Tt],([e,t])=>{if(!e.length)return[];let n=[];for(let{language:r,isAuto:i,id:a}of e){let e=r&&Pf(r);r&&e&&n.push({displayValue:i?he(`subtitles_auto`,{language:e}):e,value:a,selected:t?.value===a,isAuto:i,language:r})}return n.length?(n.unshift({...Ct(),selected:t?.value===Rf}),n):[]}),jt={available:[],prev:[]},Mt=()=>O.experimental.getCurrentTime$.getValue()?.()??N?.currentTime??0,Nt=tu([tu([Me,Tt,Ot,kt],([e,t,n,r])=>{let i=O.info.isLive$.getValue();if(i&&jt.prev!==n){let e=n.find(({id:e})=>e===t.value),r=jt.prev.find(({id:e})=>e===t.value);e&&(jt.available=[{...e,subtitles:[...r?.subtitles??[],...e.subtitles]}],jt.prev=n)}if(t&&t.value!==Rf)return jf(i?Mt():e,t,i?jt.available:n,i)})],([e])=>e?.texts?e.texts:[]);re.add(Tt.subscribe(e=>{if(e.value===Rf){var t;s==null||(t=s.onSubtitleOff)==null||t.call(s)}else{var n;let t=zu.default(Mf).find(([t,n])=>n===e.displayValue);s==null||(n=s.onSubtitleOn)==null||n.call(s,t?t[0]:``,e.value)}}));let Pt=Y(!0),Ft=tu([Fe,et,it,ze],([e,t,n,r])=>{let i=e?.end??0;return r?(i-(-n+r-t))/t:i/t}),It=$(O.info.availableSources$),Lt=tu([It],([e])=>Object.keys(e?.[Bu.VideoFormat.MPEG]||{}).length>0),Rt=()=>{var e;let t=Object.keys(((e=O.info.availableSources$)==null||(e=e.getValue())==null?void 0:e[Bu.VideoFormat.MPEG])||{}),n=Z.getHighestQuality(t)||Z.VideoQuality.Q_144P;return ee.sources[Bu.VideoFormat.MPEG]?.[n]},zt=()=>{let e=Rt();if(e){var t;D.log(`download video`,{url:e}),Sd(e,(ee==null||(t=ee.meta)==null?void 0:t.title)||`video`)}else{let e=`There is no URL for download video`;D.log(`download video`,{message:e}),M({message:e})}},Bt=()=>{M({message:`toggle muted`});let e=O.info.muted$.getValue();O.info.volume$.getValue()===0&&!e?Wt(Ut()):Gt(!e)},Vt=()=>{In.ui.settingsMenu.visible$.set(!1),D.log(`close settings menu`)},Ht=async(e,t=()=>Promise.resolve())=>{In.ui.settingsMenu.visible$.set(!0),await t(),D.log(`open settings menu`,{wasOpenedByKeyboard:e})},Ut=()=>{let e=Math.max(T.volumeMinRestore,Qd()??0);return e===0?T.volumeDefault:e},Wt=e=>{let t=e===0?Ut():e,n=O.info.muted$.getValue();M({message:`set volume, volume: ${e}, preferredVolume: ${t}`});let r=!a||_e.is(`ads`);n&&e>0&&r&&(n=!1),O.setVolume(e,n),A.setVolume(e)},Gt=e=>{let t=O.info.volume$.getValue();M({message:`set muted, currentVolume: ${t}, mute: ${e}`});let n=_e.is(`ads`);if(O.setMuted(e,n),A.setVolume(e?0:t),!e&&t===0){let e=Ut();O.setVolume(e),A.setVolume(e)}},Kt=Y(!1),qt=e=>{D.log(`set looped`,{isLooped:e}),Kt.set(e),O.setLooped(e)};qt(m);let Jt=()=>{O.prepare()},Yt=()=>{Z.assertNonNullable(In);let e=X(In.playerPhase),t={playerPhase:e,isVideoEnded:!1,action:`none`};if(M({message:`toggle play`}),e===`ads`){t.action=`play`,D.log(`toggle adman play`,t),A.togglePlay();return}let n=()=>{var e;M({message:`toggle play, call player.play`}),C.action.onPlay(),t.action=`play`,O.play(),s==null||(e=s.onPlay)==null||e.call(s)};O.info.isEnded$.getValue()?(M({message:`toggle play, video ended, seek to 0`}),we.next(),Te.next(Vu.SeekAction.REWIND),O.seekTime(0),n()):O.info.playbackState$.getValue()===Bu.PlaybackState.PLAYING?(()=>{var e;M({message:`toggle play, call player.pause`}),t.action=`pause`,O.pause(),s==null||(e=s.onPause)==null||e.call(s)})():n(),D.log(`toggle play`,t)},Xt=(e,{byUser:t=!1}={})=>{M({message:`set quality, quality: ${e}`}),D.log(`set quality`,{quality:e}),t&&ke.next(e),O.setAutoQuality(e===`auto`),ef(),e!==`auto`&&($d(n,e),gt.set(e),O.setQuality(e))},Zt=e=>{M({message:`set trafficSavingEnabled, value: ${e}`}),D.log(`set traffic saving enabled`,{trafficSavingEnabled:e});let t=e?Bu.PredefinedQualityLimits.TRAFFIC_SAVING:Bu.PredefinedQualityLimits.UNKNOWN;O.setPredefinedQualityLimits(t)},Qt=e=>{M({message:`set highQualityEnabled, value: ${e}`}),D.log(`set high quality enabled`,{highQualityEnabled:e}),$t(e?Bu.PredefinedQualityLimits.HIGH_QUALITY:Bu.PredefinedQualityLimits.UNKNOWN)},$t=e=>{O.setPredefinedQualityLimits(e)},en=(e,t=!0)=>{D.log(`set playback rate`,{playbackRate:e}),O.setPlaybackRate(e),T.features.saveRate&&g&&!O.info.isLive$.getValue()&&t&&ff(e)},tn=()=>{let e=X(Re),t=X(St),n=t.findIndex(({selected:e})=>e);if(n===t.length-1||!e)return t[n];let r=t[n+1];return en(r.value),r},nn=()=>{let e=X(Re),t=X(St),n=t.findIndex(({selected:e})=>e);if(n===0||!e)return t[n];let r=t[n-1];return en(r.value),r},rn=(e={...Ct(),selected:!1})=>{D.log(`set subtitles`,{...e}),e.value!==Rf&&Ee.next(e.isAuto?e.value+`_auto`:e.value),Oe.next({enabled:e.value!==Rf,lang:e.language,auto:!!e.isAuto}),wt.set(e)},an=e=>{D.log(`toggle subtitles`),X(Tt)?.value===Rf?sn(e):cn()},on=(e,t)=>{D.log(`change subtitle`,{enabled:e}),e?sn(!0,t):cn()},sn=(e,t)=>{D.log(`subtitle on`);let n=X(At),r=X(fe),i=ie??r,a;t&&(a=n.find(e=>e.value===t)),a??=n.filter(e=>e.value!==Rf).find(e=>e.language===i),rn(a??n[1])},cn=()=>{D.log(`subtitle off`),rn(void 0)};re.add(O.info.availableTextTracks$.subscribe(e=>{var t;function n(){let t=[];for(let{language:n,isAuto:r,id:i}of e){let e=n&&Pf(n);n&&e&&t.push({id:i,language:n,title:r?he(`subtitles_auto`,{language:e}):e})}return t}s==null||(t=s.onAvailableSubtitlesChanged)==null||t.call(s,n())}));let ln=(e,t,n=!0)=>{if(M({message:`seek to time, time: ${e}`}),D.log(`seek to time`,{time:e,action:t,forcePrecise:n}),Te.next(t),O.info.isLive$.getValue()){let t=O.info.duration$.getValue(),r=Math.min(0,t+e);O.seekTime(r,n)}else{if(O.info.isEnded$.getValue()){var r;M({message:`seek after ended, call callbacks.onPlay`}),s==null||(r=s.onPlay)==null||r.call(s)}O.seekTime(e,n)}},un=(e,t,n=!1)=>{M({message:`seek to percent, percent: ${e}`}),D.log(`seek to percent`,{percent:e,action:t}),ln(X(et)*e,t,n)},dn=e=>{M({message:`seek external, time: ${e}`}),D.log(`seek external`,{time:e}),Te.next(Vu.SeekAction.UNKNOWN),O.seekTime(O.info.isLive$.getValue()?-e:e)},fn=e=>{let t=e.max??`none`,n=e.min??`none`;M({message:`set auto quality limitation. Max: ${t}. Min: ${n}`}),D.log(`set auto quality limits`,{max:t,min:n}),O.setAutoQualityLimits(e)},pn=e=>{M({message:`set playback rate to: ${e}`}),D.log(`set playback rate external`,{playbackRate:e}),O.setPlaybackRate(e)},mn=Y(void 0),hn=e=>{M({message:`start scrubbing, progress: ${e}`}),D.log(`start scrubbing`,{progress:e}),C.state.scrubbingInProgress.set(!0),gn(e)},gn=e=>{mn.set(e)},_n=()=>{mn.set(void 0),C.state.scrubbingInProgress.set(!1)},vn=(e,t=!1)=>{M({message:`complete scrubbing, progress: ${e}`}),D.log(`complete scrubbing`,{progress:e}),un(e,Vu.SeekAction.SLIDER,t),_n()},yn=tu([Me,et,mn],([e,t,n],r)=>{r(Z.isNonNullable(n)?n*t:e)}),bn=e=>{Te.next(Vu.SeekAction.LIVE),M({message:`live switch to low latency `+e}),D.log(`live switch to low latency `+e),O.setLiveLowLatency(e)},xn=()=>{Te.next(Vu.SeekAction.LIVE),M({message:`switch to active live`}),D.log(`switch to active live`),O.seekTime(0),O.info.playbackState$.getValue()!==Bu.PlaybackState.PLAYING&&In.actions.internal.togglePlay()},Sn=()=>{D.log(`skip adman`),A.skip()},Cn=(e=!0)=>{Z.assertNonNullable(In),M({message:`switch from ads to video, callPlay: ${e}`}),D.log(`switch from ads to video`,{callPlay:e}),ge.set(`video`),e&&O.play(),a&&Gt(!0);let t=X(ve)?.muted,n=!O.info.muted$.getValue();t!==void 0&&!n&&Gt(t),ve.set(void 0)},wn=()=>{Z.assertNonNullable(In),M({message:`switch from video to ads`}),D.log(`switch from video to ads`),In.actions.internal.pause(),je(),ge.set(`ads`)},Tn=e=>{Z.assertNonNullable(In);let t=e?`LiveWaitingStart`:`thumb`;D.log(`set live waiting start`,{state:e,playerPhase:t}),ge.set(t)},En=e=>{Z.assertNonNullable(In);let t=e?`LiveWaitingRecover`:`thumb`;D.log(`set live waiting recover`,{state:e,playerPhase:t}),ge.set(t)},Dn=e=>{Z.assertNonNullable(In);let t=e?`LiveWaitingRecord`:`thumb`;D.log(`set live waiting record`,{state:e,playerPhase:t}),ge.set(t)},On=()=>(Z.assertNonNullable(In),D.log(`get debug text data`),bd(O,ee,In,E.getTraceId(),y)),kn=()=>(Z.assertNonNullable(In),JSON.stringify(E.getFinishedSpans())),An=()=>(Z.assertNonNullable(In),xd(O,ee,In)),jn=()=>N,Mn=e=>{var t;if(Z.assertNonNullable(In),O.info.isEnded$.getValue())return;let n=!e;if(X(In.playerPhase)===`ads`){M({message:`pause ads, internalCall: ${n}`}),D.log(`pause ads`,{internalCall:n}),A.pause();return}M({message:`pause video, internalCall: ${n}`}),D.log(`pause video`,{internalCall:n}),n&&(s==null||(t=s.onPause)==null||t.call(s)),O.pause()},Nn=e=>{var t;Z.assertNonNullable(In);let n=!e;if(X(In.playerPhase)===`ads`){M({message:`play ads, internalCall: ${n}`}),D.log(`play ads`,{internalCall:n}),A.play();return}M({message:`play video, internalCall: ${n}`}),D.log(`play video`,{internalCall:n}),n&&(s==null||(t=s.onPlay)==null||t.call(s)),O.play()},Pn=e=>{Z.assertNonNullable(In);let t=!e;if(X(In.playerPhase)===`ads`){M({message:`player cannot be stopped during ads via external method`});return}M({message:`player will be stopped, internalCall: ${t}`}),p?.()},Fn=(e,t)=>{Z.assertNonNullable(In),M({message:`first start, show ads: ${e}, internalCall: ${!t}`}),D.log(`first start`,{showAds:e,external:t}),e?ge.set(`ads`):(ge.set(`video`),t?O.play():In.actions.internal.togglePlay())},In={interfaceLanguage$:fe,isCyrillicRelatedInterface$:me,initVideo:Ce,videoId:n,playerPhase:_e,vsid:ae,i18n:he,app:b,video:Z.cloneDeep(x),state:{positionExact$:Me,positionWithScrubbing$:yn,duration$:et,playbackState$:Ne,playbackStateRealistic$:Pe,isPlaying$:tt,isLoaderVisible:Se,bufferedProgress$:Ft,isLive$:Le,canChangePlaybackSpeed$:Re,isActiveLive$:nt,isOldestAvailableLive$:rt,isRewindableLive$:at,isEnded$:Ie,muted$:Ve,volume$:Be,trafficSavingEnabled$:He,highQualityEnabled$:Ue,autoQualityLimitingAvailable$:We,availableVideoStreams$:ot,availableAudioStreams$:st,videoStream$:ct,audioStream$:lt,currentQuality$:vt,isAutoQualityEnabled$:_t,availableQualities$:bt,currentPlaybackRate$:xt,availablePlaybackRates$:St,currentSubtitle$:Tt,availableTextTracks$:Et,availableSubtitlesList$:At,currentSubtitleCaptions$:Nt,isAutoSubtitleCaptionVisible$:Pt,currentFormat$:qe,throughputEstimation$:Je,videoBitrate$:Ye,videoSize$:Xe,errorLog$:ce,crashed$:ue,isAudioAvailable$:Qe,isAudioDisabled:!!a,canDownload:T.features.download&&!!o,availableSources$:It,hasMpegSources$:Lt,looped$:Kt,loadedMetadata$:se,isAutoQualityAvailable$:yt},ui:C.state,ads:{position:Y(0),duration:Y(0),playbackState:Y(`inactive`),canSkip:Y(!1),secondsToWatchBeforeSkip:Y(0),postrollPassed:Y(!1)},webApi:{focusManager:j},actions:{internal:{preload:Jt,firstStart:e=>Fn(e,!1),play:()=>Nn(!1),pause:()=>Mn(!1),togglePlay:Yt,toggleMuted:Bt,openSettingsMenu:Ht,closeSettingsMenu:Vt,setVolume:e=>Wt(e),setMuted:e=>Gt(e),startVolumeChanging:C.action.startVolumeChanging,stopVolumeChanging:C.action.stopVolumeChanging,onUserInput:C.action.onUserInput,setSettingsVisibility:C.action.setSettingsVisibility,clearShowByInput:C.action.clearShowByInput,onBackButton:C.action.onBackButton,setVideoStream:ut,setAudioStream:e=>dt(e),setQuality:(e,t)=>Xt(e,t),setTrafficSavingEnabled:e=>Zt(e),setHighQualityEnabled:e=>Qt(e),setPlaybackRate:en,incrementPlaybackRate:tn,decrementPlaybackRate:nn,setSubtitle:e=>rn(e),toggleSubtitle:()=>an(!1),startScrubbing:hn,progressScrubbing:gn,completeScrubbing:vn,switchToActiveLive:xn,switchFromAdsToVideo:Cn,switchFromVideoToAds:wn,skipAd:Sn,setLiveWaitingStart:Tn,setLiveWaitingRecover:En,setLiveWaitingRecord:Dn,getDebugTextData:On,getTraceTextData:kn,getDebugPanelData:An,getVideoElement:jn,seekTime:(e,t,n)=>ln(e,t,n),clearDelayedBufferingCheckTimeout:$e,seekToPercent:un,getPreviewThumbsData:()=>(M({message:`getting preview thumbs data`}),D.log(`get preview thumbs data`,{...l}),l),downloadVideo:zt,addLanguage:Ad,setLanguage:de,setLooped:qt,checkFullscreenSupport:oe},external:{firstStart:e=>Fn(e,!0),play:()=>Nn(!0),pause:()=>Mn(!0),stop:()=>Pn(!0),seekTime:e=>dn(e),setPlaybackRate:e=>pn(e),setAutoQualityLimits:e=>fn(e),setMuted:e=>Gt(e),toggleSubtitle:()=>an(!0),changeSubtitle:on,setVolume:e=>Wt(e),setLiveLowLatency:bn,hideControls:()=>C.action.setControlsAvailibility(!1),showControls:()=>C.action.setControlsAvailibility(!0),setQuality:e=>Xt(e),setTrafficSavingEnabled:e=>Zt(e),setHighQualityEnabled:e=>Qt(e),changeAudioStream:pt}},callbacks:s,setUiCallbacks:e=>{te={...e}},getAdmanWrapper:()=>A,getLogger:()=>k,getPlayer:()=>O,deviceCapabilities:S,destroy:()=>{D.log(`destroy store`),re.unsubscribe(),O.destroy(),A.destroy(),h?.destroy(),le.unsubscribe(),ne.destroy()}};return C.resolveDependency(In),In},Uf=require(`@vkontakte/videoplayer-core/es2018`),Wf=require(`@vkontakte/videoplayer-core/es2018`),Gf=require(`@vkontakte/videoplayer-shared/es2018`);class Kf{constructor(t){e(this,`value`,void 0),e(this,`next`,void 0),this.value=t,this.next=null}}class qf{constructor(t){e(this,`top`,void 0),e(this,`bottom`,void 0),e(this,`size`,void 0),e(this,`maxSize`,void 0),this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(e){let t=new Kf(e);this.top?(this.top.next=t,this.top=t):(this.top=t,this.bottom=t),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],t=this.bottom;for(;t;)e.push(t.value),t=t.next;return e}}var Jf=G(`<div class="container s-b"><canvas class="s-b"></canvas></div>`),Yf={hash:`s-b`,code:`.container.s-b {display:inline-block;width:120px;height:16px;}canvas.s-b {transform:scale(1, -1);margin-top:2px;}`};function Xf(e,t){pa(t,!0),xl(e,Yf);let n=su(t,`values`,19,()=>[]),r=is(void 0),i=is(null);cu(()=>{W(r).width=120,W(r).height=16,R(i,W(r).getContext(`2d`),!0)});function a(e,t,n,r,i){i===0&&(i=1),e.fillStyle=`#fff`,e.fillRect(t,n,r,i)}Is(()=>{let e=``;if(W(i)){let t=n()[0];for(let e=1;e<n().length;e++)n()[e]>t&&(t=n()[e]);W(i).clearRect(0,0,120,16);let r=59;for(let o=n().length-1;o>=0;o--){let s=r*2,c=t>0?16*(n()[o]/t):0;a(W(i),s,0,2,c),e=c+` `+e,r--}}});var o=Jf();Zl(z(o),e=>R(r,e),()=>W(r)),L(o),K(e,o),ma()}var Zf=require(`@vkontakte/videoplayer-shared/es2018`),Qf=G(`<div class="s-3"><div class="s-3">Video id</div> <span> </span></div>`),$f=G(`<div class="s-3"><div class="s-3">VSID</div> <span> </span></div>`),ep=G(`<div class="s-3"><div class="s-3">Provider</div> <span> </span></div>`),tp=G(`<div class="s-3"><div class="s-3">Streams</div> <span> </span></div>`),np=G(`<div class="s-3"><div class="s-3">Viewport</div> <span> </span></div>`),rp=G(`<div class="s-3"><div class="s-3">Video size</div> <span> </span></div>`),ip=G(`<div class="s-3"><div class="s-3">CDN host</div> <span> </span></div>`),ap=G(`<div class="s-3"><div class="s-3">Volume</div> <span> </span></div>`),op=G(`<div class="s-3"><div class="s-3">Position</div> <span> </span></div>`),sp=G(`<div class="s-3"><div class="s-3">Buffer</div> <span> </span></div>`),cp=G(`<div class="s-3"><div class="s-3">Nbuffer</div> <span> </span></div>`),lp=G(`<div class="s-3"><div class="s-3">Live latency</div> <span> </span></div>`),up=G(`<div class="s-3"><div class="s-3">Segment</div> <span> </span></div>`),dp=G(`<div class="s-3"><div class="s-3">Network</div> <!> <span> </span></div>`),fp=G(`<div class="s-3"><div class="s-3">V bitrate</div> <!> <span> </span></div>`),pp=G(`<div class="container s-3" role="region"><button class="close s-3" title="закрыть">[x]</button> <div class="content s-3"><div class="s-3"><div class="s-3">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-3"><div class="s-3">Dropped</div> <span> </span></div> <!> <!> <div class="s-3"><div class="s-3">FPS</div> <!> <span> </span></div></div></div>`),mp={hash:`s-3`,code:`.container.s-3 {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}button.close.s-3 {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.s-3 {padding:5px;}.content.s-3 > div:where(.s-3) > div:where(.s-3) {display:inline-block;text-align:right;width:60px;padding:0 5px;}`};function hp(e,t){pa(t,!0),xl(e,mp);let n=vd(),r=n.ui.debugPanelVisible,i=e=>{e.stopPropagation(),Zf.safeStorage.remove(Ff),r.set(!1)},a=is(ds(n.actions.internal.getDebugPanelData())),o=n.actions.internal.getVideoElement(),s=is(0),c=is(0),l=is(0),u=new qf(60),d=new qf(60),f=new qf(60),p=is(ds([])),m=is(ds([])),h=is(ds([])),g=Nd(`aria_label_debug_panel`);cu(()=>{Zf.safeStorage.set(Ff,`true`),o&&(R(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0),R(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let e=window.setInterval(()=>{R(a,n.actions.internal.getDebugPanelData(),!0)},500),t;return o&&(t=window.setInterval(()=>{if(o){R(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=o.getVideoPlaybackQuality().totalVideoFrames;R(l,e-W(s)),R(s,e,!0),u.push(W(l)),W(a).speed&&d.push(W(a).speed),W(a).bitrate&&f.push(W(a).bitrate),R(p,u.getValuesFromBottom(),!0),R(m,d.getValuesFromBottom(),!0),R(h,f.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(e),t&&clearInterval(t)}});var _=pp(),v=z(_),y=B(v,2),b=z(y),x=B(z(b),2),S=z(x,!0);L(x),L(b);var C=B(b,2),w=e=>{var t=Qf(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(()=>q(r,W(a).id)),K(e,t)};J(C,e=>{W(a).id&&e(w)});var T=B(C,2),E=e=>{var t=$f(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(()=>q(r,W(a).vsid)),K(e,t)};J(T,e=>{W(a).vsid&&e(E)});var D=B(T,2),O=e=>{var t=ep(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(()=>q(r,W(a).provider)),K(e,t)};J(D,e=>{W(a).provider&&e(O)});var k=B(D,2),A=e=>{var t=tp(),n=B(z(t),2),r=z(n);L(n),L(t),V(()=>q(r,`Video: ${(W(a).videoCodec||``)??``} ${W(a).hdr?`(HDR)`:``}
|
|
51
61
|
&
|
|
52
|
-
Audio: ${(ee=N(r).audioCodec||"")!=null?ee:""} ${N(r).audioLanguage?`(${N(r).audioLanguage})`:""}`)}),J(G,re)};De(_,G=>{(N(r).videoCodec||N(r).audioCodec)&&G(R)})}var U=ne(_,2);{var O=G=>{var re=Gf(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(()=>Ne(Ce,N(r).viewport)),J(G,re)};De(U,G=>{N(r).viewport&&G(O)})}var P=ne(U,2);{var z=G=>{var re=qf(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(()=>Ne(Ce,N(r).videoSize)),J(G,re)};De(P,G=>{N(r).videoSize&&G(z)})}var Q=ne(P,2);{var ce=G=>{var re=Kf(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(()=>Ne(Ce,N(r).cdn)),J(G,re)};De(Q,G=>{N(r).cdn&&G(ce)})}var X=ne(Q,2);{var ie=G=>{var re=Zf(),fe=ne(B(re),2),Ce=B(fe);H(fe),H(re),ye(()=>{var w;return Ne(Ce,`${(w=N(r).volume)!=null?w:""} %`)}),J(G,re)};De(X,G=>{N(r).volume&&G(ie)})}var Y=ne(X,2);{var be=G=>{var re=Jf(),fe=ne(B(re),2),Ce=B(fe);H(fe),H(re),ye(w=>Ne(Ce,`${w!=null?w:""} s`),[()=>N(r).position.toFixed(2)]),J(G,re)};De(Y,G=>{N(r).position&&G(be)})}var q=ne(Y,2);{var He=G=>{var re=Xf(),fe=ne(B(re),2),Ce=B(fe);H(fe),H(re),ye(w=>Ne(Ce,`${w!=null?w:""} s`),[()=>N(r).buffer.toFixed(2)]),J(G,re)};De(q,G=>{N(r).buffer&&G(He)})}var ae=ne(q,2);{var _e=G=>{var re=ep(),fe=ne(B(re),2),Ce=B(fe);H(fe),H(re),ye(w=>Ne(Ce,`${w!=null?w:""} s`),[()=>N(r).nativeBuffer.toFixed(2)]),J(G,re)};De(ae,G=>{N(r).nativeBuffer&&G(_e)})}var j=ne(ae,2);{var Se=G=>{var re=tp(),fe=ne(B(re),2),Ce=B(fe);H(fe),H(re),ye(w=>Ne(Ce,`${w!=null?w:""} s`),[()=>N(r).liveLatency.toFixed(2)]),J(G,re)};De(j,G=>{N(r).liveLatency&&G(Se)})}var he=ne(j,2);{var Ae=G=>{var re=ip(),fe=ne(B(re),2),Ce=B(fe,!0);H(fe),H(re),ye(w=>Ne(Ce,w),[()=>[{value:N(r).currentVideoSegmentLength,title:"Video:"},{value:N(r).currentAudioSegmentLength,title:"Audio:"}].filter(({value:w})=>w).map(({value:w,title:ee})=>`${ee} ${((w!=null?w:0)/1e3).toFixed(2)} s`).join(" & ")]),J(G,re)};De(he,G=>{(N(r).currentVideoSegmentLength||N(r).currentAudioSegmentLength)&&G(Ae)})}var Be=ne(he,2),ke=ne(B(Be),2),je=B(ke);H(ke),H(Be);var I=ne(Be,2);{var C=G=>{var re=np(),fe=ne(B(re),2);vr(fe,{get values(){return N(v)}});var Ce=ne(fe,2),w=B(Ce);H(Ce),H(re),ye(ee=>Ne(w,`${ee!=null?ee:""} Kbps`),[()=>N(r).speed.toFixed(2)]),J(G,re)};De(I,G=>{N(r).speed&&G(C)})}var F=ne(I,2);{var K=G=>{var re=rp(),fe=ne(B(re),2);vr(fe,{get values(){return N(g)}});var Ce=ne(fe,2),w=B(Ce);H(Ce),H(re),ye(ee=>Ne(w,`${ee!=null?ee:""} Kbps`),[()=>N(r).bitrate.toFixed(2)]),J(G,re)};De(F,G=>{N(r).bitrate&&G(K)})}var le=ne(F,2),ge=ne(B(le),2);vr(ge,{get values(){return N(u)}});var ze=ne(ge,2),Qe=B(ze,!0);H(ze),H(le),H(D),H(y),ye(()=>{var G,re;Xe(y,"aria-label",h),Ne(x,N(r).version),Ne(je,`${(G=N(a))!=null?G:""} / ${(re=N(s))!=null?re:""} frames`),Ne(Qe,N(c))}),J(t,y),we()}qt(["click"]);var sp=ue('<div><div class="video-container s-5"></div></div>'),lp={hash:"s-5",code:".video-container.s-5,.video-wrapper.s-5{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-5{background:var(--black)}.video-container.s-5,.video-wrapper.s-5{z-index:var(--video-container-z-index)}.video-container.s-5{transition:var(--rotate-transition-duration) ease all}"};function Va(t,e){Ee(e,!0),Re(t,lp);let[i,n]=si(),r=()=>qe(s,"$playerPhase",i),o=et(e,"videoContainer",15),{playerPhase:s}=jt();var a=sp();let c;var m=B(a);oi(m,f=>o(f),()=>o()),H(a),ye(f=>c=hi(a,1,"video-wrapper s-5",null,c,f),[()=>({hidden:r()!=="video"})]),J(t,a),we(),n()}var Kt=t=>`width:${t}rem;height:${t}rem;`;var gr=require("@vkontakte/videoplayer-shared/es2018"),qi=class{constructor(e){this.onKeyDown=e=>{let i=(0,gr.getWindow)().document.activeElement;if(!i)return console.warn("no active element"),!1;let{row:n,col:r,layer:o}=i.dataset;if(!n||!r||!o)return console.warn("no col or row or layer"),!1;let s=!1;switch(e.key){case"ArrowDown":s=this.moveFocusVertical(Number(n)+1,r,o);break;case"ArrowUp":s=this.moveFocusVertical(Number(n)-1,r,o);break;case"ArrowLeft":s=this.moveFocusHorizontal(Number(r)-1,n,o);break;case"ArrowRight":s=this.moveFocusHorizontal(Number(r)+1,n,o);break}return s&&(e.preventDefault(),e.stopPropagation()),s};this.root=e}destroy(){this.root.removeEventListener("keydown",this.onKeyDown)}unmountedElement(e,i,n,r){var o;r&&(this.moveFocusHorizontal(Number(e)-1,i.toString(),n)||this.moveFocusHorizontal(Number(e)+1,i.toString(),n)||this.moveFocusVertical(Number(e)-1,i.toString(),n)||this.moveFocusVertical(Number(e)+1,i.toString(),n)||(o=(0,gr.getWindow)().document.querySelector(`[data-layer=${n}][data-default]`))==null||o.focus())}moveFocusVertical(e,i,n){let r=(0,gr.getWindow)().document.querySelectorAll(`[data-row="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let o;for(let s=0;s<r.length;s++){let a=r[s];if(a.dataset.col===i)return a.focus(),!0;a.dataset.col==="1"&&(o=a)}return o?o.focus():r[0].focus(),!0}moveFocusHorizontal(e,i,n){let r=(0,gr.getWindow)().document.querySelectorAll(`[data-col="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let o;for(let s=0;s<r.length;s++){let a=r[s];if(a.dataset.row===i)return a.focus(),!0;a.dataset.row==="1"&&(o=a)}return o?o.focus():r[0].focus(),!0}};qi.CONTEXT_KEY="focusManager";var dp=(t,e)=>{var i;t.preventDefault(),t.stopPropagation(),(i=e.onclick)==null||i.call(e)},up=ue("<button><!></button>"),cp={hash:"s-f",code:".button.s-f{align-items:center;background:hsla(0,0%,100%,.15);border:0;border-radius:50%;color:#fff;display:inline-block;font-size:inherit;justify-content:center;padding:0}.button.s-f:focus{background:#fff;color:#000;outline:0}.button.s-f:hover:not(:focus){background-color:#76787a}"};function vn(t,e){Ee(e,!0),Re(t,cp);let i=et(e,"ref",15),n=et(e,"defaultInLayer",3,!1),r=Oe(!1),o=()=>{pe(r,!0)},s=()=>{pe(r,!1)},a=Le(()=>Kt(Number(e.size||"14")*2)),c=Xi(qi.CONTEXT_KEY);Rt(()=>()=>{c.focusManager.unmountedElement(e.col,e.row,e.layer,N(r))});var m=up();m.__click=[dp,e];var f=B(m);Cn(f,()=>e.children),H(m),oi(m,l=>i(l),()=>i()),ye(()=>{hi(m,1,$i(["button",e.class]),"s-f"),at(m,N(a)),Xe(m,"data-row",e.row),Xe(m,"data-col",e.col),Xe(m,"data-layer",e.layer),Xe(m,"data-default",n())}),In("focus",m,o),In("blur",m,s),J(t,m),we()}qt(["click"]);var za=require("@vkontakte/videoplayer-statistics/es2018");var ja=t=>{let e=Math.abs(Math.round(t)),i=Math.floor(e/3600),n=e%3600,r=Math.floor(n/60),o=n%60;return`${t<0?"-":""}${i?String(i).padStart(2,"0")+":":""}${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`};var fp=ue("<div> </div>"),pp={hash:"s-h",code:".video-time.s-h{color:#fff;line-height:125%}"};function mo(t,e){Ee(e,!0),Re(t,pp);let i=10,n=Le(()=>ja(e.current)+(e.duration?` / ${ja(e.duration)}`:"")),r=Le(()=>`font-size: ${e.size||i}rem`);var o=fp(),s=B(o,!0);H(o),ye(()=>{at(o,N(r)),hi(o,1,$i(["video-time",e.class]),"s-h"),Ne(s,N(n))}),J(t,o),we()}var mp=(t,e,i,n,r)=>{t.preventDefault(),t.stopPropagation(),e(i()*t.offsetX/r().offsetWidth,za.SeekAction.SLIDER)},vp=ue('<div class="pointer-time-wrapper s-g"><!></div>'),gp=ue('<div><div class="time-wrapper s-g"><!></div> <div class="current-progress s-g"></div> <div class="pointer s-g"><!></div></div>'),hp={hash:"s-g",code:".progress-bar.s-g{background:hsla(0,0%,100%,.15);border-radius:2rem;font-size:inherit;height:4rem;position:relative;width:100%}.current-progress.s-g{background-color:#fff;border-radius:inherit;height:100%;left:0;position:absolute;top:0}.is-live-now.s-g .current-progress:where(.s-g){background:#ff5c5c}.pointer.s-g{background:#fff;border-radius:50%;display:none;height:7rem;position:absolute;top:50%;transform:translate(-50%,-50%);width:7rem;will-change:transform}.time-wrapper.s-g{position:absolute;right:0;top:0;transform:translateY(calc(-100% - 20rem))}.pointer-time-wrapper.s-g{bottom:0;left:50%;position:absolute;transform:translate(-50%,calc(100% + 5rem))}.progress-bar.s-g:focus{outline:0}.progress-bar.s-g:focus .pointer:where(.s-g){display:block}.button.s-g:hover:not(:focus){background-color:#76787a}"};function Ua(t,e){Ee(e,!0),Re(t,hp);let[i,n]=si(),r=()=>qe(h,"$duration$",i),o=()=>qe(x,"$positionPercent$",i),s=()=>qe(g,"$positionExact$",i),a=()=>qe(y,"$isLive$",i),c=0,m=1,f=10,{actions:{internal:{seekTime:l,pause:u,play:v}},state:{positionExact$:g,duration$:h,isLive$:y}}=jt(),$=f/r(),D=et(e,"ref",15),T=Oe(kt(NaN)),b=Le(()=>isFinite(N(T))),x=nt([g,h],([ie,Y])=>Y>0?ie/Y:0),A=()=>{N(b)||(pe(T,o(),!0),u())},S=ie=>{switch(ie.key){case"ArrowLeft":ie.stopPropagation(),A(),pe(T,Math.max(c,N(T)-$),!0);break;case"ArrowRight":ie.stopPropagation(),A(),pe(T,Math.min(m,N(T)+$),!0);break;case"ArrowDown":case"ArrowUp":pe(T,NaN,!0);break;case"Enter":ie.preventDefault(),l(Te(h)*N(T),za.SeekAction.SLIDER),v(),pe(T,NaN,!0);break;case"Escape":N(b)&&(ie.stopPropagation(),v(),pe(T,NaN,!0));break}},L=Le(()=>Number(N(b)?N(T):o())),k=Le(()=>`width: ${N(L)*100}%`),E=Le(()=>`left: ${N(L)*100}%`),M=Le(()=>s()-(a()?r():0)),_=Le(()=>N(b)?N(T)*r()-(a()?r():0):0);var R=gp();Xe(R,"tabindex",0),R.__keydown=S,R.__click=[mp,l,r,h,D];var U=B(R),O=B(U);{var P=ie=>{let Y=Le(()=>a()?0:r());mo(ie,{get size(){return"10"},get current(){return N(M)},get duration(){return N(Y)}})};De(O,ie=>{a()||ie(P)})}H(U);var z=ne(U,2),Q=ne(z,2),ce=B(Q);{var X=ie=>{var Y=vp(),be=B(Y);mo(be,{get size(){return"8"},get current(){return N(_)}}),H(Y),J(ie,Y)};De(ce,ie=>{N(_)&&ie(X)})}H(Q),H(R),oi(R,ie=>D(ie),()=>D()),ye(()=>{hi(R,1,$i(["progress-bar",e.class,a()&&N(L)===1&&"is-live-now"]),"s-g"),Xe(R,"data-row",e.row),Xe(R,"data-col",e.col),Xe(R,"data-layer",e.layer),at(z,N(k)),at(Q,N(E))}),J(t,R),we(),n()}qt(["keydown","click"]);var _p=Tt('<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>');function Fa(t,e){Ee(e,!0);let i=Le(()=>Kt(e.size));Bt(t,{width:"48",height:"48",fill:"currentColor",get style(){return N(i)},testId:"play-icon",get shadow(){return e.shadow},children:(n,r)=>{var o=_p();J(n,o)},$$slots:{default:!0}}),we()}var Kd=require("@vkontakte/videoplayer-core/es2018");var yp=Tt('<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>');function Ha(t,e){Ee(e,!0);let i=Le(()=>Kt(e.size));Bt(t,{width:"48",height:"48",fill:"currentColor",get style(){return N(i)},testId:"pause-icon",get shadow(){return e.shadow},children:(n,r)=>{var o=yp();J(n,o)},$$slots:{default:!0}}),we()}var bp=Tt('<path d="M19.605 0.0611157C20.2463 0.163726 20.8529 0.409114 21.3976 0.844894C22.29 1.55876 22.7149 2.45864 23.0434 3.77239C23.1274 4.10872 23.2729 4.50079 23.4548 4.88131C23.8719 5.05864 24.28 5.25575 24.6777 5.47185C25.0704 5.37484 25.4474 5.24601 25.7485 5.10584C27.8669 4.11966 29.644 4.17147 31.0993 5.74115C31.2224 5.87392 31.2959 5.96187 31.4558 6.15934L32.3998 7.32506C32.6537 7.63857 32.7621 7.78141 32.9223 8.04795C33.96 9.7751 33.5554 11.3836 32.2437 13.1266C32.026 13.4159 31.8038 13.7945 31.6179 14.1928C31.7352 14.6166 31.8328 15.0463 31.9105 15.4809C32.2446 15.7486 32.5997 15.9831 32.9134 16.1432C34.1196 16.7587 34.9009 17.3752 35.3957 18.4053C35.6978 19.0341 35.8004 19.6804 35.7561 20.3283C35.7327 20.6708 35.6957 20.8617 35.597 21.2892L35.2596 22.7507C35.1609 23.1782 35.1105 23.366 34.9814 23.6841C34.7371 24.2859 34.3616 24.8218 33.8144 25.2545C32.9181 25.9634 31.9457 26.175 30.5917 26.1995C30.2492 26.2057 29.84 26.2581 29.4328 26.3478C29.1681 26.7135 28.8862 27.0665 28.5882 27.4055C28.5933 27.8168 28.6342 28.221 28.7042 28.5516C28.9849 29.8764 28.9975 30.8715 28.5084 31.9043C28.2098 32.5347 27.7721 33.0212 27.2407 33.3946C26.9598 33.5919 26.7882 33.6833 26.3939 33.8756L25.0457 34.5332C24.6514 34.7255 24.4737 34.8045 24.1452 34.9043C23.5238 35.0933 22.871 35.1386 22.1904 34.9858C21.0754 34.7353 20.299 34.1128 19.4279 33.076C19.1976 32.8019 18.883 32.5036 18.5409 32.235C18.3222 32.245 18.1028 32.25 17.8829 32.25C17.6631 32.25 17.4437 32.245 17.225 32.235C16.8829 32.5036 16.5682 32.8019 16.338 33.076C15.4669 34.1128 14.6905 34.7353 13.5755 34.9858C12.8949 35.1386 12.242 35.0933 11.6206 34.9043C11.2922 34.8045 11.1145 34.7255 10.7202 34.5332L9.37201 33.8756C9.25348 33.8179 9.17995 33.7815 9.09407 33.7368C7.12674 32.7123 6.55001 30.9662 7.06165 28.5516C7.1317 28.221 7.17258 27.8168 7.17769 27.4055C6.87964 27.0665 6.59775 26.7135 6.33304 26.3478C5.92591 26.2581 5.51663 26.2057 5.17413 26.1995C3.82017 26.175 2.84776 25.9634 1.95146 25.2545C1.40431 24.8218 1.02875 24.2859 0.784502 23.6841C0.655401 23.366 0.604985 23.1782 0.506296 22.7507L0.168869 21.2892C0.0643852 20.8366 0.0258935 20.6348 0.00607361 20.2681C-0.031082 19.5806 0.100474 18.8976 0.449422 18.2496C0.957844 17.3055 1.71039 16.726 2.85245 16.1432C3.16613 15.9831 3.52129 15.7486 3.85542 15.4809C3.93305 15.0463 4.03072 14.6166 4.14799 14.1928C3.96209 13.7945 3.73987 13.4159 3.52222 13.1266C2.21049 11.3836 1.80583 9.7751 2.84361 8.04795C3.00377 7.78141 3.11222 7.63857 3.36609 7.32506L4.31007 6.15934C4.46998 5.96187 4.54348 5.87392 4.66657 5.74115C6.12187 4.17147 7.89898 4.11966 10.0173 5.10584C10.3184 5.24601 10.6955 5.37484 11.0881 5.47185C11.4859 5.25575 11.894 5.05864 12.3111 4.88131C12.4929 4.50079 12.6384 4.10872 12.7225 3.77239C13.0509 2.45864 13.4759 1.55876 14.3682 0.844894C14.913 0.409114 15.5196 0.163726 16.1609 0.0611157C16.4321 0.0177263 16.6107 0.00464598 16.8959 0.00114942L18.6329 0C19.0716 0 19.266 0.00687897 19.605 0.0611157ZM18.7615 3.00031L17.1329 3C16.3829 3 16.0079 3 15.6329 4.5C15.4248 5.33261 14.9856 6.39629 14.3794 7.30626C13.4155 7.62186 12.509 8.06414 11.6795 8.61343C10.6044 8.50749 9.51939 8.18318 8.75121 7.82556C7.3495 7.17301 7.1135 7.46444 6.64151 8.0473L5.69753 9.21302C5.22554 9.79588 4.98955 10.0873 5.91927 11.3227C6.44256 12.0181 7.00097 13.0476 7.3248 14.1068C6.9932 15.0058 6.77314 15.9587 6.68139 16.9489C5.92897 17.7503 4.98495 18.423 4.21611 18.8153C2.83891 19.5182 2.92327 19.8835 3.09198 20.6143L3.42941 22.0759C3.59812 22.8067 3.68248 23.172 5.22839 23.2C6.08312 23.2155 7.21283 23.4028 8.23271 23.7856C8.75071 24.6478 9.38097 25.4348 10.1033 26.1265C10.2448 27.2028 10.173 28.3403 9.99649 29.1735C9.67598 30.6861 10.013 30.8505 10.6871 31.1792L12.0353 31.8368C12.7094 32.1656 13.0465 32.33 14.0411 31.1462C14.5988 30.4824 15.4718 29.71 16.4268 29.1566C16.9035 29.2182 17.3895 29.25 17.8829 29.25C18.3764 29.25 18.8624 29.2182 19.3391 29.1566C20.2941 29.71 21.1671 30.4824 21.7248 31.1462C22.7194 32.33 23.0565 32.1656 23.7306 31.8368L25.0788 31.1792C25.7528 30.8505 26.0899 30.6861 25.7694 29.1735C25.5928 28.3403 25.5211 27.2028 25.6626 26.1265C26.3849 25.4348 27.0152 24.6478 27.5332 23.7856C28.553 23.4028 29.6828 23.2155 30.5375 23.2C32.0834 23.172 32.1678 22.8067 32.3365 22.0759L32.6739 20.6143C32.8426 19.8835 32.927 19.5182 31.5498 18.8153C30.7809 18.423 29.8369 17.7503 29.0845 16.9489C28.9927 15.9587 28.7727 15.0058 28.4411 14.1068C28.7649 13.0476 29.3233 12.0181 29.8466 11.3227C30.7763 10.0873 30.5403 9.79588 30.0683 9.21302L29.1244 8.0473C28.6524 7.46444 28.4164 7.17301 27.0147 7.82556C26.2465 8.18318 25.1615 8.50749 24.0864 8.61343C23.2569 8.06414 22.3504 7.62186 21.3865 7.30626C20.7803 6.39629 20.3411 5.33261 20.1329 4.5C19.78 3.08824 19.4271 3.00519 18.7615 3.00031ZM17.8829 11.25C21.6109 11.25 24.6329 14.2721 24.6329 18C24.6329 21.7279 21.6109 24.75 17.8829 24.75C14.155 24.75 11.1329 21.7279 11.1329 18C11.1329 14.2721 14.155 11.25 17.8829 11.25ZM17.8829 14.25C15.8119 14.25 14.1329 15.9289 14.1329 18C14.1329 20.0711 15.8119 21.75 17.8829 21.75C19.954 21.75 21.6329 20.0711 21.6329 18C21.6329 15.9289 19.954 14.25 17.8829 14.25Z"></path>');function Ba(t,e){Ee(e,!0);let i=Le(()=>Kt(e.size));Bt(t,{width:"36",height:"36",viewBox:"0 0 36 36",fill:"currentColor",get style(){return N(i)},testId:"settings-icon",get shadow(){return e.shadow},children:(n,r)=>{var o=bp();J(n,o)},$$slots:{default:!0}}),we()}var xp=Tt('<path d="M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5 M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5 M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69 z"></path>');function Qa(t,e){Ee(e,!0);let i=Le(()=>Kt(e.size));Bt(t,{width:"42",height:"20",testId:"live-icon",fill:"currentColor",get style(){return N(i)},children:(n,r)=>{var o=xp();J(n,o)},$$slots:{default:!0}}),we()}var Zd=require("@vkontakte/videoplayer-statistics/es2018"),Ap=ue('<div class="wrapper s-4"><div class="container s-4"><div class="top-buttons"></div> <div class="filler s-4"></div> <div class="top-above-progress-bar s-4"><div class="video-title s-4"> </div> <div class="filler s-4"></div> <!></div> <!> <div class="bottom-buttons s-4"><div class="play-pause-button-container"><!></div> <div class="settings-button-container s-4"><!></div></div></div></div>'),Ep={hash:"s-4",code:".wrapper.s-4{background-image:linear-gradient(1turn,transparent,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000),linear-gradient(180deg,transparent 0,rgba(0,0,0,.016) 9.22%,rgba(0,0,0,.055) 18.76%,rgba(0,0,0,.118) 28.48%,rgba(0,0,0,.2) 38.19%,rgba(0,0,0,.29) 47.75%,rgba(0,0,0,.392) 56.99%,rgba(0,0,0,.502) 65.75%,rgba(0,0,0,.608) 73.87%,rgba(0,0,0,.71) 81.18%,rgba(0,0,0,.8) 87.52%,rgba(0,0,0,.882) 92.74%,rgba(0,0,0,.945) 96.66%,rgba(0,0,0,.984) 99.14%,#000);bottom:0;left:0;position:absolute;right:0;top:0}.container.s-4{box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:10rem 48rem 0}.filler.s-4{flex-grow:1}.top-above-progress-bar.s-4{align-items:flex-end;display:flex;padding-bottom:20rem}.video-title.s-4{color:#fff;font-size:14rem;line-height:18rem;max-width:320rem}.bottom-buttons.s-4{align-items:center;display:flex;justify-content:center;margin:20rem 0;position:relative;width:100%}.settings-button-container.s-4{position:absolute;right:0;top:50%;transform:translateY(-50%)}"};function Ya(t,e){Ee(e,!0),Re(t,Ep);let[i,n]=si(),r=()=>qe(l,"$playbackState$",i),o=()=>qe(u,"$isLive$",i),s=()=>qe(v,"$positionExact$",i),a=()=>qe(g,"$duration$",i),{actions:{internal:{togglePlay:c,setSettingsVisibility:m,seekTime:f}},state:{playbackState$:l,isLive$:u,positionExact$:v,duration$:g},video:{title:h}}=jt(),y=Le(()=>r()===Kd.PlaybackState.PLAYING),$=Oe(void 0);Rt(()=>{var Q;(Q=N($))==null||Q.focus()});let D=()=>{m(!0)},T=Le(()=>o()&&s()!==a()),b=()=>{f(a(),Zd.SeekAction.LIVE)};var x=Ap(),A=B(x),S=ne(B(A),4),L=B(S),k=B(L,!0);H(L);var E=ne(L,4);{var M=Q=>{vn(Q,{layer:"controls",row:1,col:1,onclick:b,children:(ce,X)=>{Qa(ce,{get size(){return"14"}})},$$slots:{default:!0}})};De(E,Q=>{N(T)&&Q(M)})}H(S);var _=ne(S,2);Ua(_,{row:2,col:1,layer:"controls"});var R=ne(_,2),U=B(R),O=B(U);vn(O,{get size(){return"20"},get onclick(){return c},row:3,col:1,layer:"controls",get ref(){return N($)},set ref(Q){pe($,Q,!0)},children:(Q,ce)=>{var X=un(),ie=ti(X);{var Y=q=>{Ha(q,{get size(){return"20"}})},be=q=>{Fa(q,{get size(){return"20"}})};De(ie,q=>{N(y)?q(Y):q(be,!1)})}J(Q,X)},$$slots:{default:!0}}),H(U);var P=ne(U,2),z=B(P);vn(z,{get size(){return"14"},onclick:D,row:3,col:2,layer:"controls",children:(Q,ce)=>{Ba(Q,{get size(){return"14"}})},$$slots:{default:!0}}),H(P),H(R),H(A),H(x),ye(()=>Ne(k,h)),J(t,x),we(),n()}var wp=(t,e,i)=>{switch(t.key){case"ArrowUp":pe(e,Math.max(N(e)-1,0),!0),t.stopPropagation();break;case"ArrowDown":pe(e,Math.min(N(e)+1,i.items.length-1),!0),t.stopPropagation();break;case"Enter":if(t.stopPropagation(),t.preventDefault(),i.items[N(e)].disabled)return;i.onAction(N(e));break}},Mp=ue('<button class="s-d"><!></button>'),Tp=ue('<div class="list s-d"></div>'),Sp={hash:"s-d",code:".list.s-d{display:flex;flex-direction:column;gap:4rem}.list.s-d:focus,.list.s-d:focus-visible{outline:0}.list.s-d button:where(.s-d){background:none;border:none;color:inherit}"};function Wa(t,e){Ee(e,!0),Re(t,Sp);let i=et(e,"ref",15),n=Oe(0);wi(()=>{pe(n,e.items.findIndex(s=>s.isSelected),!0)});let r=s=>{pe(n,s,!0),!e.items[s].disabled&&e.onAction(s)};var o=Tp();Xe(o,"tabindex",0),o.__keydown=[wp,n,e],oa(o,23,()=>e.items,s=>s.id,(s,a,c)=>{var m=Mp();m.__click=()=>r(N(c));var f=B(m);aa(f,e,"default",{get item(){return N(a)},get focused(){return N(c)===N(n)}},null),H(m),ye(()=>m.disabled=N(a).disabled),J(s,m)}),H(o),oi(o,s=>i(s),()=>i()),ye(()=>{Xe(o,"data-row",e.row),Xe(o,"data-col",e.col),Xe(o,"data-layer",e.layer)}),J(t,o),we()}qt(["keydown","click"]);var Ip=Tt('<path d="M16.5 24.8787L8.56066 16.9393C7.97487 16.3536 7.02513 16.3536 6.43934 16.9393C5.85355 17.5251 5.85355 18.4749 6.43934 19.0607L15.4393 28.0607C16.0251 28.6464 16.9749 28.6464 17.5607 28.0607L35.5607 10.0607C36.1464 9.47487 36.1464 8.52513 35.5607 7.93934C34.9749 7.35355 34.0251 7.35355 33.4393 7.93934L16.5 24.8787Z"></path>');function Ga(t,e){Ee(e,!0);let i=Le(()=>Kt(e.size));Bt(t,{width:"39",height:"36",viewBox:"0 0 39 36",fill:"currentColor",get style(){return N(i)},testId:"back-icon",get shadow(){return e.shadow},children:(n,r)=>{var o=Ip();J(n,o)},$$slots:{default:!0}}),we()}var Np=ue("<div> <!></div>"),Dp={hash:"s-e",code:".quality-list-item.s-e{align-items:center;border-radius:6rem;box-sizing:border-box;color:var(--vkui--color_text_subhead);display:flex;font-size:10rem;font-weight:500;justify-content:space-between;line-height:12rem;padding:6rem;width:100%}.quality-list-item.s-e:hover{background-color:#76787a;color:#e1e3e6}.quality-list-item.selected.s-e{background:var(--vkui--color_background_contrast_secondary_alpha);color:var(--vkui--color_text_subhead)}:focus .quality-list-item.focused.s-e{background-color:#fff;color:#000}.quality-list-item.disabled.s-e{opacity:.5}"};function qa(t,e){Ee(e,!0),Re(t,Dp);var i=Np(),n=B(i),r=ne(n);{var o=s=>{Ga(s,{get size(){return"7"}})};De(r,s=>{e.data.isSelected&&s(o)})}H(i),ye(()=>{var s;hi(i,1,$i(["quality-list-item",e.data.isSelected?"selected":"",e.data.isFocused?"focused":"",e.data.disabled&&"disabled"]),"s-e"),Ne(n,`${(s=e.data.text)!=null?s:""} `)}),J(t,i),we()}var Cp=Tt('<path d="M9.43934 9.43934C10.0251 8.85355 10.9749 8.85355 11.5607 9.43934L21 18.8775L30.4393 9.43934C30.9801 8.89861 31.8309 8.85702 32.4193 9.31456L32.5607 9.43934C33.1464 10.0251 33.1464 10.9749 32.5607 11.5607L23.1225 21L32.5607 30.4393C33.1014 30.9801 33.143 31.8309 32.6854 32.4193L32.5607 32.5607C31.9749 33.1464 31.0251 33.1464 30.4393 32.5607L21 23.1225L11.5607 32.5607C11.0199 33.1014 10.1691 33.143 9.58065 32.6854L9.43934 32.5607C8.85355 31.9749 8.85355 31.0251 9.43934 30.4393L18.8775 21L9.43934 11.5607C8.89861 11.0199 8.85702 10.1691 9.31456 9.58065L9.43934 9.43934Z"></path>');function Ka(t,e){Ee(e,!0);let i=Le(()=>Kt(e.size));Bt(t,{width:"42",height:"42",viewBox:"0 0 42 42",fill:"currentColor",get style(){return N(i)},testId:"back-icon",get shadow(){return e.shadow},children:(n,r)=>{var o=Cp();J(n,o)},$$slots:{default:!0}}),we()}var Jd=require("@vkontakte/videoplayer-shared/es2018"),$p=ue('<div class="settings-layer s-9"><div class="settings-menu s-9"><div class="settings-title s-9">Качество</div> <div class="menu-list"><div class="close-button-container s-9"><!></div> <!></div></div></div>'),kp={hash:"s-9",code:".settings-layer.s-9{bottom:0;left:0}.settings-layer.s-9,.settings-menu.s-9{position:absolute;right:0;top:0}.settings-menu.s-9{background:#000;box-sizing:border-box;height:100%;padding:10rem;width:163rem}.settings-title.s-9{color:#fff;font-size:12rem;line-height:116%;margin-bottom:12rem;margin-left:8rem;margin-top:5rem}.close-button-container.s-9{left:0;position:absolute;top:15rem;transform:translateX(calc(-100% - 7rem))}"};function Za(t,e){Ee(e,!0),Re(t,kp);let[i,n]=si(),r=()=>qe(m,"$availableQualities$",i),o=()=>qe(f,"$currentQuality$",i),{actions:{internal:{setSettingsVisibility:s,setQuality:a,clearShowByInput:c}},state:{availableQualities$:m,currentQuality$:f},deviceCapabilities:l}=jt(),u=Oe(void 0),v=Le(()=>r().map(A=>{let{value:S,displayValue:L,selected:k}=A,E={id:S,text:L,isSelected:k,disabled:S!=="auto"&&S!==Jd.VideoQuality.INVARIANT&&!l.isCodecSupported(S)};return k&&S==="auto"&&(E.text=`${L} (${o()})`),E}));Rt(()=>{var A;(A=N(u))==null||A.focus()});let g=()=>{s(!1)},h=A=>{let S=N(v)[A];a(S.id),s(!1),c()};var y=$p(),$=B(y),D=ne(B($),2),T=B(D),b=B(T);vn(b,{get size(){return"14"},onclick:g,row:1,col:1,layer:"settings",children:(A,S)=>{Ka(A,{get size(){return"14"}})},$$slots:{default:!0}}),H(T);var x=ne(T,2);Wa(x,{row:1,col:2,layer:"settings",get items(){return N(v)},onAction:h,get ref(){return N(u)},set ref(A){pe(u,A,!0)},children:Ir,$$slots:{default:(A,S)=>{let L=Le(()=>S.item),k=Le(()=>S.focused),E=Le(()=>({...N(L),isFocused:N(k)}));qa(A,{get data(){return N(E)}})}}}),H(D),H($),H(y),J(t,y),we(),n()}var Lp=ue('<div class="container s-a"><div class="dot s-a"></div> <div class="dot s-a"></div> <div class="dot s-a"></div></div>'),Op={hash:"s-a",code:".container.s-a{display:flex;left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%)}.dot.s-a:first-child{animation-delay:0s}.dot.s-a:nth-child(2){animation-delay:.18s}.dot.s-a:nth-child(3){animation-delay:.36s}@keyframes s-a-dot_animation{0%{opacity:.2}30%{opacity:1}to{opacity:.2}}.dot.s-a{animation-duration:.75s;animation-iteration-count:infinite;animation-name:s-a-dot_animation;background:var(--btn-color);border-radius:4px;height:8px;width:8px}.dot.s-a+.dot:where(.s-a){margin-left:4px}"};function hr(t,e){Re(t,Op);let i=et(e,"style",3,"");var n=Lp();ye(()=>at(n,i())),J(t,n)}var Pp=ue('<div class="container s-6"><!></div>'),Rp={hash:"s-6",code:".container.s-6{bottom:0;color:green;font-size:33px;left:0;position:absolute;right:0;top:0}"};function Ja(t){Re(t,Rp);var e=Pp(),i=B(e);hr(i,{}),H(e),J(t,e)}var vo=require("@vkontakte/videoplayer-shared/es2018"),Vp=ue('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div> <span class="timer__points s-b"> </span>',1),jp=ue('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div> <span class="timer__points s-b"> </span>',1),zp=ue('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div> <span class="timer__points s-b"> </span>',1),Up=ue('<div class="timer__cell cell s-b"><span class="cell__value s-b"> </span> <span class="cell__unit s-b"> </span></div>'),Fp=ue('<div class="timer__container s-b"><!> <!> <!> <!></div>'),Hp={hash:"s-b",code:".timer__container.s-b{align-items:flex-start;display:flex;justify-content:center}.cell.s-b{align-items:center;display:flex;flex-direction:column}.cell__value.s-b{font-size:16em;font-weight:600;line-height:1.2}.cell__unit.s-b{font-size:4.7em;font-weight:400;line-height:1.2}.timer__points.s-b{display:inline-block;font-size:42px;font-weight:600;line-height:1.2;margin:0 8px}"};function Xa(t,e){Ee(e,!0),Re(t,Hp);let i=Oe(""),n=Oe(""),r=Oe(""),o=Oe(""),s,a=32,c=a/2,m=S=>String(S).padStart(2,"0"),f=S=>Math.max(S.length,1),l=S=>`${(e.isSmallSize?c:a)*f(S)}px`,u=S=>{let L=Math.floor(S/86400);L&&(S-=L*86400,pe(i,m(L),!0));let k=Math.floor(S/3600);pe(n,m(k),!0);let E=Math.floor(S/60)%60;pe(r,m(E),!0);let M=S%60;pe(o,m(M),!0)},v=()=>{let S=Math.floor(Date.now()/1e3),L=e.startTime-S;u(L),L>=1?s=(0,vo.getWindow)().requestAnimationFrame(v):e.onTimerOver()};wi(()=>{s=(0,vo.getWindow)().requestAnimationFrame(v)}),rd(()=>{(0,vo.getWindow)().cancelAnimationFrame(s)});var g=Fp(),h=B(g);{var y=S=>{var L=Vp(),k=ti(L);let E;var M=B(k),_=B(M,!0);H(M);var R=ne(M,2),U=B(R,!0);H(R),H(k);var O=ne(k,2),P=B(O,!0);H(O),ye((z,Q,ce)=>{E=at(k,"",E,{width:z}),Ne(_,N(i)),Ne(U,Q),Ne(P,ce)},[()=>l(N(i)),()=>zt("waiting_live_day_value"),()=>zt("waiting_live_colon")]),J(S,L)};De(h,S=>{N(i)&&S(y)})}var $=ne(h,2);{var D=S=>{var L=jp(),k=ti(L);let E;var M=B(k),_=B(M,!0);H(M);var R=ne(M,2),U=B(R,!0);H(R),H(k);var O=ne(k,2),P=B(O,!0);H(O),ye((z,Q,ce)=>{E=at(k,"",E,{width:z}),Ne(_,N(n)),Ne(U,Q),Ne(P,ce)},[()=>l(N(n)),()=>zt("waiting_live_hour_value"),()=>zt("waiting_live_colon")]),J(S,L)};De($,S=>{N(n)&&S(D)})}var T=ne($,2);{var b=S=>{var L=zp(),k=ti(L);let E;var M=B(k),_=B(M,!0);H(M);var R=ne(M,2),U=B(R,!0);H(R),H(k);var O=ne(k,2),P=B(O,!0);H(O),ye((z,Q,ce)=>{E=at(k,"",E,{width:z}),Ne(_,N(r)),Ne(U,Q),Ne(P,ce)},[()=>l(N(r)),()=>zt("waiting_live_minute_value"),()=>zt("waiting_live_colon")]),J(S,L)};De(T,S=>{N(r)&&S(b)})}var x=ne(T,2);{var A=S=>{var L=Up();let k;var E=B(L),M=B(E,!0);H(E);var _=ne(E,2),R=B(_,!0);H(_),H(L),ye((U,O)=>{k=at(L,"",k,{width:U}),Ne(M,N(o)),Ne(R,O)},[()=>l(N(o)),()=>zt("waiting_live_second_value")]),J(S,L)};De(x,S=>{N(o)&&S(A)})}H(g),J(t,g),we()}var Bp=ue('<div class="waiting s-8"><span class="waiting__title medium s-8"> </span></div>'),Qp=ue('<div class="upcoming-timer timer s-8"><span class="timer__title medium s-8"> </span> <!></div>'),Yp=ue('<div class="waiting-container s-8"><!></div>'),Wp={hash:"s-8",code:'.waiting-container.s-8{background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;color:#fff;white-space:nowrap}.waiting-container.s-8,.waiting-container.s-8:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-8:before{backdrop-filter:blur(5em);background-color:rgba(0,0,0,.56);content:"";z-index:1}.waiting.s-8{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;position:absolute;top:50%;transform:translateY(-50%);width:100%;z-index:2}.waiting__title.s-8{font-size:7em;font-weight:600;line-height:1.2}.upcoming-timer.s-8{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.timer.s-8{align-items:center;display:flex;flex-direction:column;justify-content:center}.timer__title.s-8{display:inline-block;font-size:6.6666em;font-weight:600;line-height:1.2;margin-bottom:.7em;vertical-align:middle}.medium.s-8{font-size:6em}'};function es(t,e){Ee(e,!0),Re(t,Wp);let{video:{thumbUrl:i,live:n}}=jt(),r=(n==null?void 0:n.startTime)||0,o=Le(()=>r<Math.floor(Date.now()/1e3));var s=Yp(),a=B(s);{var c=f=>{var l=Bp(),u=B(l),v=B(u,!0);H(u),H(l),ye(g=>Ne(v,g),[()=>zt("waiting_live_upcoming_title")]),J(f,l)},m=f=>{var l=Qp(),u=B(l),v=B(u,!0);H(u);var g=ne(u,2);let h=Le(()=>r||0);Xa(g,{get startTime(){return N(h)},onTimerOver:()=>pe(o,!0)}),H(l),ye(y=>Ne(v,y),[()=>zt("waiting_live_timer_title")]),J(f,l)};De(a,f=>{N(o)?f(c):f(m,!1)})}H(s),ye(()=>at(s,`background-image: url(${i})`)),J(t,s),we()}var Gp=ue('<div class="waiting-container s-7"><div class="waiting-caption s-7"><!> <p class="waiting-title s-7"> </p></div></div>'),qp={hash:"s-7",code:'.waiting-container.s-7{align-items:center;background-color:var(--black);background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;justify-content:center}.waiting-container.s-7,.waiting-container.s-7:before{height:100%;left:0;position:absolute;top:0;width:100%}.waiting-container.s-7:before{backdrop-filter:blur(10px);background-color:rgba(0,0,0,.4);content:""}.waiting-caption.s-7{align-items:center;display:flex;flex-direction:column;position:relative}.waiting-title.s-7{font-size:20px;font-weight:400;line-height:1.2;margin:0;padding:20px;text-align:center}'};function go(t,e){Ee(e,!0),Re(t,qp);let i=et(e,"thumbUrl",3,""),n={recover:zt("waiting_live_recover_title"),record:zt("waiting_record_title")},r=Le(()=>n[e.kind]||"");var o=Gp();o.__contextmenu=function(...f){var l;(l=e.onContextMenu)==null||l.apply(this,f)},o.__click=function(...f){var l;(l=e.onClick)==null||l.apply(this,f)};var s=B(o),a=B(s);hr(a,{style:"position: static; transform: translate(0, 0)"});var c=ne(a,2),m=B(c,!0);H(c),H(s),H(o),ye(()=>{at(o,`background-image: url('${i()}')`),Ne(m,N(r))}),J(t,o),we()}qt(["contextmenu","click"]);var Kp=ue("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function ts(t,e){Ee(e,!0);let[i,n]=si(),r=()=>qe(v,"$language$",i),o=()=>qe($,"$isShowLoader",i),s=()=>qe(y,"$controlsVisible",i),a=()=>qe(D,"$settingsVisible",i),c=()=>qe(T,"$playerPhase",i),m=()=>qe(g,"$crashed",i),f=()=>qe(h,"$debugPanelVisible",i),l=et(e,"videoContainer",15),u=jt(),v=u.interfaceLanguage$,g=u.state.crashed$,h=u.ui.debugPanelVisible,{ui:{controlsVisible:y,isShowLoader:$,settingsVisible:D},playerPhase:T,video:{thumbUrl:b}}=u;var x=un(),A=ti(x);ia(A,r,S=>{var L=Kp(),k=ti(L);Va(k,{get videoContainer(){return l()},set videoContainer(ae){l(ae)}});var E=ne(k,2);{var M=ae=>{Ja(ae,{})};De(E,ae=>{o()&&ae(M)})}var _=ne(E,2);{var R=ae=>{Ya(ae,{})};De(_,ae=>{s()&&ae(R)})}var U=ne(_,2);{var O=ae=>{Za(ae,{})};De(U,ae=>{a()&&ae(O)})}var P=ne(U,2);{var z=ae=>{es(ae,{})};De(P,ae=>{c()==="LiveWaitingStart"&&ae(z)})}var Q=ne(P,2);{var ce=ae=>{go(ae,{kind:"recover",get thumbUrl(){return b}})};De(Q,ae=>{c()==="LiveWaitingRecover"&&ae(ce)})}var X=ne(Q,2);{var ie=ae=>{go(ae,{kind:"record",get thumbUrl(){return b}})};De(X,ae=>{c()==="LiveWaitingRecord"&&ae(ie)})}var Y=ne(X,2);{var be=ae=>{fr(ae,{})};De(Y,ae=>{m()&&ae(be)})}var q=ne(Y,2);{var He=ae=>{Ra(ae,{})};De(q,ae=>{f()&&ae(He)})}J(S,L)}),J(t,x),we(),n()}var Zp=(t,e,i,n,r,o)=>{e()||(n()?(o.store.actions.internal.clearShowByInput(),o.store.actions.internal.play()):(o.store.actions.internal.onUserInput(),o.store.actions.internal.pause()))},Jp=(t,e)=>{e.store.actions.internal.onUserInput()},Xp=ue('<div class="player-wrapper s-1" tabindex="0"><!></div>'),em={hash:"s-1",code:'.player-wrapper.s-1{aspect-ratio:16/9;color:var(--white);height:100%;left:0;position:relative;top:0;width:100%;--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px;--interactive-episode-complete:#5c9ce6;--slider-bg:hsla(0,0%,100%,.4);--slider-filled-bg:var(--white);--slider-handle-bg:var(--white);--slider-loaded-bg:hsla(0,0%,100%,.4);--slider-height:3px;--slider-video-episode-gap:1.5px;--slider-radius:0px;--slider-handle-size:12px;--slider-filled-ads:#67a5eb;--slider-disabled-color:hsla(0,0%,97%,.31);--slider-volume-height:5px;--slider-volume-radius:calc(var(--slider-volume-height)/2);--slider-volume-handle-size:13px;--timeline-slider-filled-active-live-bg:var(--red);--timeline-slider-handle-active-live-bg:var(--red);--timeline-slider-bg:var(--slider-bg);--timeline-slider-filled-bg:var(--slider-filled-bg);--timeline-slider-handle-bg:var(--slider-handle-bg);--timeline-slider-loaded-bg:var(--slider-loaded-bg);--volume-slider-bg:var(--slider-bg);--volume-slider-filled-bg:var(--slider-filled-bg);--volume-slider-handle-bg:var(--slider-handle-bg);--controls-time:var(--white);--controls-gradient:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.005) 6.67%,rgba(0,0,0,.02) 13.33%,rgba(1,1,1,.04) 20%,rgba(1,1,1,.07) 26.67%,rgba(2,2,2,.11) 33.33%,rgba(3,3,3,.16) 40%,rgba(4,4,4,.22) 46.67%,rgba(6,6,6,.28) 53.33%,rgba(7,7,7,.33) 60%,rgba(8,8,8,.38) 66.67%,rgba(9,9,9,.42) 73.33%,rgba(9,9,9,.46) 80%,hsla(0,0%,4%,.48) 86.67%,hsla(0,0%,4%,.5));--timeline-preview-shadow:rgba(0,0,0,.08);--timeline-preview-bg:#222;--timeline-padding-horizontal:10px;--timeline-padding-vertical-top:3px;--timeline-padding-vertical-bottom:4px;--timeline-height:calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical:114px;--preview-track-frame-height-horizontal:65px;--preview-track-controls-top:16px;--preview-track-time-line-height:16px;--preview-track-bottom-offset:10px;--preview-track-height:calc(var(--preview-track-frame-height-vertical) + var(--preview-track-bottom-offset));--preview-track-controls-top-offset:calc(var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height));--settings-bg:rgba(0,0,0,.72);--settings-item-bg-hover:hsla(0,0%,100%,.08);--settings-radius:8px;--mobile-settings-bg:#2c2d2e;--divider-border:1px solid var(--white-alpha-24);--toggle-color-separator:#363738;--toggle-color-off:#656565;--toggle-color-on:#71aaeb;--toggle-color-autoplay-on:var(--white);--notification-bg:#2c2d2e;--notification-radius:8px;--button-hover-transition:opacity 0.2s;--video-container-z-index:0;--controls-container-z-index:1;--ads-container-z-index:1;--end-screen-mobile-z-index:1;--notification-z-index:1;--thumb-timer-z-index:2;--debug-panel-z-index:2;--modal-z-index:2;--settings-menu-z-index:2;--context-menu-z-index:3;--hot-key-helpers-container-z-index:3;--overlay-container-z-index:4;--rotate-transition-duration:0.25s;--btn-color:var(--white);--double-forward-bg:rgba(0,0,0,.6);--vkui--color_background_contrast_secondary_alpha:hsla(0,0%,100%,.2);--vkui--color_text_subhead:#969a9f;font-family:var(--font)}.player-wrapper.s-1 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}'};function ns(t,e){Ee(e,!0),Re(t,em);let[i,n]=si(),r=()=>qe(v,"$isLive$",i),o=()=>qe(D,"$availableSubtitlesList$",i),s=()=>qe(x,"$settingsVisible",i),a=()=>qe(b,"$controlsVisible",i),c=et(e,"volume",3,void 0),m=et(e,"muted",3,void 0),f=et(e,"failoverHosts",3,void 0);od(e.uiConfig);let l=Zr(),u=e.store.ui.debugPanelVisible,v=e.store.state.isLive$,g=Oe(void 0);e.store.getAdmanWrapper().init({switchFromAdsToVideo:e.store.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:e.store.actions.internal.switchFromVideoToAds,setMuted:e.store.actions.external.setMuted},e.store.ads,{vsid:e.store.vsid}),yd(e.store),Rt(()=>{var R,U;(U=(R=e.videoConfig.callbacks)==null?void 0:R.onDomReady)==null||U.call(R)});let h=(R=!1)=>{R?e.store.actions.external.firstStart(e.showAds):e.store.actions.internal.firstStart(e.showAds)},y=()=>{Ud(e.store.videoId),Ia()&&e.store.actions.internal.setTrafficSavingEnabled(!0),e.store.deviceCapabilities.maxQuality!==is.VideoQuality.INVARIANT&&e.store.getPlayer().setAutoQualityLimits({max:e.store.deviceCapabilities.maxQuality});let U=Sa(e.store.videoId);if(U&&U!==is.VideoQuality.INVARIANT&&e.store.deviceCapabilities.isCodecSupported(U)){e.store.actions.internal.setQuality(U);return}};function $(R){var Q,ce,X;let U=e.sources||R;U&&e.store.initVideo({container:N(g),sources:U,failoverHosts:f(),subtitles:e.subtitles,subtitlesForcedLanguage:e.subtitlesForcedLanguage,volumeMultiplier:e.volumeMultiplier});let O=_r.safeStorage.get(mr)==="true";u.set(O),e.fromTime>0&&e.store.actions.external.seekTime(e.fromTime);let P=(ce=(Q=c())!=null?Q:oo())!=null?ce:l.volumeDefault,z=(X=m())!=null?X:Pd();if(e.store.actions.external.setVolume(P),e.store.actions.external.setMuted(z),e.store.getAdmanWrapper().setInitialVolume(z?0:P),y(),l.features.saveRate&&e.saveRate){let ie=zd();ie&&!r()&&e.store.actions.internal.setPlaybackRate(ie)}e.store.ui.isAutoplay.set(e.autoplay),e.autoplay&&h(),e.preload&&l.features.preload&&e.store.actions.internal.preload()}wi(()=>{var U,O,P,z;let R=()=>e.store.destroy();return((U=e.live)==null?void 0:U.status)==="upcoming"?(e.store.actions.internal.setLiveWaitingStart(!0),R):((O=e.live)==null?void 0:O.status)==="waiting"?(e.store.actions.internal.setLiveWaitingRecover(!0),R):(((P=e.live)==null?void 0:P.status)==="finished"||((z=e.live)==null?void 0:z.status)==="postlive")&&!(e.sources&&(0,Xd.areValidLiveRecordSources)(e.sources))?(e.store.actions.internal.setLiveWaitingRecord(!0),R):($(),R)});let D=e.store.state.availableSubtitlesList$;if(l.features.initSubtitles){let R=!1;Rt(()=>{var U;if(!R&&o().length){R=!0;let O;if(l.features.userVideoPrefs&&e.store.videoId){let z=so(l.userSalt,String(e.store.videoId));z!=null&&z.subtitleTrackId&&(O=o().find(Q=>Q.value===z.subtitleTrackId))}let P=(U=e.subtitlesForcedLanguage)!=null?U:Na();P&&(O=o().find(z=>z.language===P)),e.store.actions.internal.setSubtitle(O)}})}let T=(0,_r.getWindow)().innerWidth/640;(0,_r.getWindow)().document.documentElement.style.fontSize=`${T}px`;let{controlsVisible:b,settingsVisible:x}=e.store.ui,A={};en(qi.CONTEXT_KEY,A);let S=R=>{switch(R.key){case"Enter":R.target===R.currentTarget&&(e.store.actions.internal.onUserInput(),R.preventDefault());break;case"Escape":e.store.actions.internal.onBackButton()||e.store.app.destroy();return;case"ArrowUp":case"ArrowDown":A.focusManager.onKeyDown(R)||(a()?e.store.actions.internal.clearShowByInput():e.store.actions.internal.onUserInput());break;default:A.focusManager.onKeyDown(R)}},L=R=>{["ArrowUp","ArrowDown"].includes(R.key)||e.store.actions.internal.onUserInput()},k;Rt(()=>(A.focusManager=new qi(k),()=>{A.focusManager.destroy()})),e.store.ui.controlsVisible.subscribe(R=>{R||k.focus()});var E=Xp();E.__click=[Zp,s,x,a,b,e],E.__keydown=S,E.__mousemove=[Jp,e];var M=B(E);ts(M,{get videoContainer(){return N(g)},set videoContainer(R){pe(g,R,!0)}}),H(E),oi(E,R=>k=R,()=>k),ye(()=>at(E,`font-size: ${T}px;`)),In("keydown",E,L,!0),J(t,E);var _=we({initVideo:$});return n(),_}qt(["click","keydown","mousemove"]);var yr=require("@vkontakte/videoplayer-shared/es2018"),ho=class{constructor(e){this.hasFakeState=!1;this.onPopState=({state:e})=>{let i=this.store.actions.internal.onBackButton(),n=(0,yr.getWindow)();n.removeEventListener("popstate",this.onPopState),i?(n.history.pushState(e,""),n.addEventListener("popstate",this.onPopState)):this.hasFakeState&&(this.hasFakeState=!1,n.history.back())};this.store=e;let i=(0,yr.getWindow)();i.history.pushState(i.history.state,""),this.hasFakeState=!0,i.addEventListener("popstate",this.onPopState)}destroy(){(0,yr.getWindow)().removeEventListener("popstate",this.onPopState),this.hasFakeState&&(0,yr.getWindow)().history.back()}};var ki=require("@vkontakte/videoplayer-shared/es2018"),_o=class{constructor(){this.maxQuality=(0,ki.videoHeightToQuality)((0,ki.getWindow)().document.body.offsetHeight*(0,ki.getWindow)().devicePixelRatio)||ki.VideoQuality.INVARIANT}isCodecSupported(e){return this.maxQuality===ki.VideoQuality.INVARIANT?!0:(0,ki.isLowerOrEqual)(e,this.maxQuality)}};var tm={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:dt.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},yo=class{constructor(e,i={},n=(0,dt.getWindow)().document.body){this.fatalError$=new dt.ValueSubject(null);this.subscription=new dt.Subscription;this.videoConfig=void 0;this.internalsExposure=null;this.status="Not initialized";this.createOneStat=e=>{if(!this.videoConfig)return;let{albumId:i,statPlace:n,statUserSalt:r,statTrackCode:o,statVKAppId:s,refreshStatAuthToken:a,autoplay:c,isTouch:m,refDomain:f,deviceId:l}=this.videoConfig,{unitedVideoId:u,isClip:v=!1}=e;if(this.uiConfig.features.statistics&&u)try{return new Pn.OneStat({movieId:u,albumId:i,place:n,trackCode:o,vkAppId:s,autoplay:c!=null?c:!1,mobile:m,clip:v,refDomain:f,deviceId:l,isPreviewPlayerView:!1},{refreshAuthToken:a,userSalt:r,config:this.statisticsConfig})}catch(h){console.error(h)}};var Q,ce,X,ie,Y,be,q,He,ae,_e,j,Se,he,Ae,Be;if((0,dt.getWindow)()!==top)throw new Error("Must run in top frame");if(this.logger=new dt.Logger,this.log=this.logger.createComponentLog("VKVideoPlayer"),this.parentNode=n,this.parentNode.className="vk-vp-tv-parentNode",this.fatalError$.subscribe(ke=>{this.unmountComponent(this.svelteErrorComponent),ke&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=cn(_a,{target:this.parentNode}))}),!Array.isArray(e.videos)||e.videos.length===0){let ke=new Error("empty videos");this.fatalError$.next(ke),(ce=(Q=e.callbacks)==null?void 0:Q.onCrashed)==null||ce.call(Q,ke.message);return}else this.fatalError$.next(null);this.uiConfig=ga((X=i.ui)!=null?X:{}),this.videoConfig=cd(tm,(0,dt.cloneDeepWith)(e)),(ie=this.videoConfig).autoplay&&(ie.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(Y=this.uiConfig.ads.enable)!=null?Y:this.videoConfig.showAds,this.videoConfig.adsSlotId=(be=this.uiConfig.ads.slot)!=null?be:this.videoConfig.adsSlotId,(q=this.videoConfig).canRewindLive&&(q.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(He=this.videoConfig.supportLink)!=null?He:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,dt.devNull.push(pr,{key:"videoplayer_embed",strings:["new","player_init_player"],numbers:[(0,dt.now)()]}),this.statisticsConfig=(ae=i.statistics)!=null?ae:{},this.playerId=(0,dt.getPlayerId)(e.playerId),this.uiConfig=ga((_e=i.ui)!=null?_e:{}),this.coreConfig=(j=i.core)!=null?j:{},this.metaConfig=i.meta;let r=this.videoConfig.videos[0],{statAuthToken:o,preload:s,autoplay:a,volume:c,muted:m,fromTime:f,supportLink:l,interfaceLanguage:u,isCyrillicRelatedInterface:v,isAudioDisabled:g,isLiveCatchUpMode:h,failoverHosts:y,canDownload:$,callbacks:D,saveRate:T,volumeMultiplier:b,mediascopePixels:x}=this.videoConfig,{sources:A,unitedVideoId:S,previewThumbsData:L,subtitles:k,subtitlesForcedLanguage:E,live:M,adsExternalApi:_}=r;if(!A&&!M){let ke=new Error("empty sources and live");this.fatalError$.next(ke),(Se=D==null?void 0:D.onCrashed)==null||Se.call(D,ke.message);return}let R=this.createOneStat(r),U=this.createThinOneStat(r),O;x&&(O=new Pn.MediascopePixel({pixels:x})),(R||U)&&(this.statistics=new Xr(R,U,O)),this.store=qd({interfaceLanguage:u,isCyrillicRelatedInterface:v,videoId:S,isLiveCatchUpMode:h,isAudioDisabled:g,statAuthToken:o,callbacks:D,previewThumbsData:L,canDownload:$,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:T,internalsExposure:this.internalsExposure,statistics:this.statistics,playerId:this.playerId,app:this,video:r,deviceCapabilities:new _o});let P={sources:A,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,subtitles:k,subtitlesForcedLanguage:E,live:M,preload:s,autoplay:a,muted:m,volume:c,fromTime:f,supportLink:l,showAds:!1,failoverHosts:y,saveRate:T,volumeMultiplier:b,adsExternalApi:_,getVideoDeeplink:this.videoConfig.getVideoDeeplink},z={target:this.parentNode,props:P};this.svelteRootComponent=cn(ns,z),(he=this.internalsExposure)==null||he.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig,logger:this.logger,log:this.log}),this.uiConfig.devNullLog&&((Be=(Ae=this.videoConfig)==null?void 0:Ae.callbacks)!=null&&Be.onDevNullLog)?dt.devNull.subscribe(pr,this.videoConfig.callbacks.onDevNullLog):dt.devNull.destroy(pr),this.backButtonService=new ho(this.store),this.status="Normal"}destroy(){var e,i,n;this.status!=="Destroyed"&&(this.backButtonService.destroy(),this.status="Destroyed",this.subscription.unsubscribe(),(e=this.internalsExposure)==null||e.destroy(),dt.devNull.destroy(pr),(n=(i=this.store)==null?void 0:i.getPlayer())==null||n.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.svelteStubComponent),(0,dt.getWindow)().history.back())}createThinOneStat(e){if(!this.videoConfig)return;let{deviceId:i,preload:n,refreshStatAuthToken:r}=this.videoConfig,{unitedVideoId:o}=e;if(this.uiConfig.features.thinStatistics&&o)return new Pn.ThinOneStat.ThinOneStat({deviceId:i,movieId:o,preload:n,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r})}unmountComponent(e){e&&dr(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}setLiveStart(e){var n,r;let i=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${i}`}),i||((n=this.store)==null||n.actions.internal.setLiveWaitingRecover(!1),(r=this.store)==null||r.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;this.log({message:"live waiting"}),(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var n;let e=(n=this.store)==null?void 0:n.getPlayer();if(!e)return!1;let{info:i}=e;return i.canPlayLiveTailBuffer$.getValue()&&!i.isStalled$.getValue()&&!i.atLiveEdge$.getValue()}createPlayer(e,i={},n){}setLiveWaitingRecover(e=!1){var o;let i=this.isLiveTailPlaying(),n=e||!i;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${i}`});let r=()=>{var s;(s=this.store)==null||s.actions.internal.setLiveWaitingRecover(!0)};n&&r(),(o=this.store)!=null&&o.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var s;n||r(),(s=this.store)==null||s.destroy()})}setLiveWaitingRecord(){var r;let e=this.isLiveTailPlaying(),i=!e;this.log({message:`live waiting record: liveTailPlaying = ${e}`});let n=()=>{var o;(o=this.store)==null||o.actions.internal.setLiveWaitingRecord(!0)};i&&n(),(r=this.store)!=null&&r.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var o;i||n(),(o=this.store)==null||o.destroy()})}setLiveEnd(e){var o;let i=this.isLiveTailPlaying(),n=!i;this.log({message:`live ended: liveTailPlaying = ${i}`});let r=()=>{var s,a;(s=this.store)==null||s.actions.internal.setLiveWaitingRecover(!1),(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(n){r();return}(o=this.store)!=null&&o.callbacks&&(this.store.callbacks.onLiveEnded=r)}};var Rn=require("@vkontakte/videoplayer-shared/es2018"),bo=require("@vkontakte/videoplayer-core/es2018");
|
|
62
|
+
Audio: ${(W(a).audioCodec||``)??``} ${W(a).audioLanguage?`(${W(a).audioLanguage})`:``}`)),K(e,t)};J(k,e=>{(W(a).videoCodec||W(a).audioCodec)&&e(A)});var j=B(k,2),M=e=>{var t=np(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(()=>q(r,W(a).viewport)),K(e,t)};J(j,e=>{W(a).viewport&&e(M)});var ee=B(j,2),N=e=>{var t=rp(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(()=>q(r,W(a).videoSize)),K(e,t)};J(ee,e=>{W(a).videoSize&&e(N)});var te=B(ee,2),ne=e=>{var t=ip(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(()=>q(r,W(a).cdn)),K(e,t)};J(te,e=>{W(a).cdn&&e(ne)});var re=B(te,2),ie=e=>{var t=ap(),n=B(z(t),2),r=z(n);L(n),L(t),V(()=>q(r,`${W(a).volume??``} %`)),K(e,t)};J(re,e=>{W(a).volume&&e(ie)});var ae=B(re,2),oe=e=>{var t=op(),n=B(z(t),2),r=z(n);L(n),L(t),V(e=>q(r,`${e??``} s`),[()=>W(a).position.toFixed(2)]),K(e,t)};J(ae,e=>{W(a).position&&e(oe)});var se=B(ae,2),ce=e=>{var t=sp(),n=B(z(t),2),r=z(n);L(n),L(t),V(e=>q(r,`${e??``} s`),[()=>W(a).buffer.toFixed(2)]),K(e,t)};J(se,e=>{W(a).buffer&&e(ce)});var le=B(se,2),ue=e=>{var t=cp(),n=B(z(t),2),r=z(n);L(n),L(t),V(e=>q(r,`${e??``} s`),[()=>W(a).nativeBuffer.toFixed(2)]),K(e,t)};J(le,e=>{W(a).nativeBuffer&&e(ue)});var de=B(le,2),fe=e=>{var t=lp(),n=B(z(t),2),r=z(n);L(n),L(t),V(e=>q(r,`${e??``} s`),[()=>W(a).liveLatency.toFixed(2)]),K(e,t)};J(de,e=>{W(a).liveLatency&&e(fe)});var pe=B(de,2),me=e=>{var t=up(),n=B(z(t),2),r=z(n,!0);L(n),L(t),V(e=>q(r,e),[()=>[{value:W(a).currentVideoSegmentLength,title:`Video:`},{value:W(a).currentAudioSegmentLength,title:`Audio:`}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(` & `)]),K(e,t)};J(pe,e=>{(W(a).currentVideoSegmentLength||W(a).currentAudioSegmentLength)&&e(me)});var he=B(pe,2),ge=B(z(he),2),_e=z(ge);L(ge),L(he);var ve=B(he,2),ye=e=>{var t=dp(),n=B(z(t),2);Xf(n,{get values(){return W(m)}});var r=B(n,2),i=z(r);L(r),L(t),V(e=>q(i,`${e??``} Kbps`),[()=>W(a).speed.toFixed(2)]),K(e,t)};J(ve,e=>{W(a).speed&&e(ye)});var be=B(ve,2),xe=e=>{var t=fp(),n=B(z(t),2);Xf(n,{get values(){return W(h)}});var r=B(n,2),i=z(r);L(r),L(t),V(e=>q(i,`${e??``} Kbps`),[()=>W(a).bitrate.toFixed(2)]),K(e,t)};J(be,e=>{W(a).bitrate&&e(xe)});var Se=B(be,2),Ce=B(z(Se),2);Xf(Ce,{get values(){return W(p)}});var we=B(Ce,2),Te=z(we,!0);L(we),L(Se),L(y),L(_),V(()=>{Il(_,`aria-label`,g),q(S,W(a).version),q(_e,`${W(c)??``} / ${W(s)??``} frames`),q(Te,W(l))}),Lc(`click`,v,i),K(e,_),ma()}Rc([`click`]);var gp=G(`<div><div class="video-container s-4"></div></div>`),_p={hash:`s-4`,code:`.video-wrapper.s-4,
|
|
63
|
+
.video-container.s-4 {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.s-4 {z-index:var(--video-container-z-index);background:var(--black);}.video-container.s-4 {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}`};function vp(e,t){pa(t,!0),xl(e,_p);let n=()=>iu(o,`$playerPhase`,r),[r,i]=au(),a=su(t,`videoContainer`,15),{playerPhase:o}=vd();var s=gp();let c;Zl(z(s),e=>a(e),()=>a()),L(s),V(()=>c=Al(s,1,`video-wrapper s-4`,null,c,{hidden:n()!==`video`})),K(e,s),ma(),i()}var yp=e=>`width:${e}rem;height:${e}rem;`,bp=require(`@vkontakte/videoplayer-shared/es2018`);class xp{constructor(t){e(this,`root`,void 0),e(this,`onKeyDown`,e=>{let t=bp.getWindow().document.activeElement;if(!t)return console.warn(`no active element`),!1;let{row:n,col:r,layer:i}=t.dataset;if(!n||!r||!i)return console.warn(`no col or row or layer`),!1;let a=!1;switch(e.key){case`ArrowDown`:a=this.moveFocusVertical(Number(n)+1,r,i);break;case`ArrowUp`:a=this.moveFocusVertical(Number(n)-1,r,i);break;case`ArrowLeft`:a=this.moveFocusHorizontal(Number(r)-1,n,i);break;case`ArrowRight`:a=this.moveFocusHorizontal(Number(r)+1,n,i);break}return a&&(e.preventDefault(),e.stopPropagation()),a}),this.root=t}destroy(){this.root.removeEventListener(`keydown`,this.onKeyDown)}unmountedElement(e,t,n,r){r&&(this.moveFocusHorizontal(Number(e)-1,t.toString(),n)||this.moveFocusHorizontal(Number(e)+1,t.toString(),n)||this.moveFocusVertical(Number(e)-1,t.toString(),n)||this.moveFocusVertical(Number(e)+1,t.toString(),n)||bp.getWindow().document.querySelector(`[data-layer=${n}][data-default]`)?.focus())}moveFocusVertical(e,t,n){let r=bp.getWindow().document.querySelectorAll(`[data-row="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let i;for(let e=0;e<r.length;e++){let n=r[e];if(n.dataset.col===t)return n.focus(),!0;n.dataset.col===`1`&&(i=n)}return i?i.focus():r[0].focus(),!0}moveFocusHorizontal(e,t,n){let r=bp.getWindow().document.querySelectorAll(`[data-col="${e}"][data-layer="${n}"]`);if(r.length===0)return!1;let i;for(let e=0;e<r.length;e++){let n=r[e];if(n.dataset.row===t)return n.focus(),!0;n.dataset.row===`1`&&(i=n)}return i?i.focus():r[0].focus(),!0}}e(xp,`CONTEXT_KEY`,`focusManager`);var Sp=G(`<button><!></button>`),Cp={hash:`s-a`,code:`.button.s-a{display:inline-block;padding:0;align-items:center;justify-content:center;border-radius:50%;background:rgba(255,255,255,.15);color:white;border:0;font-size:inherit;}.button.s-a:focus{color:black;background:white;outline:0;}.button.s-a:hover:not(:focus) {background-color:rgba(118, 120, 122, 1);}`};function wp(e,t){pa(t,!0),xl(e,Cp);let n=su(t,`ref`,15),r=su(t,`defaultInLayer`,3,!1),i=is(!1),a=()=>{R(i,!0)},o=()=>{R(i,!1)},s=Uo(()=>yp(Number(t.size||`14`)*2)),c=e=>{e.preventDefault(),e.stopPropagation(),t.onclick?.call(t)},l=da(xp.CONTEXT_KEY);Is(()=>()=>{l.focusManager.unmountedElement(t.col,t.row,t.layer,W(i))});var u=Sp();bl(z(u),()=>t.children),L(u),Zl(u,e=>n(e),()=>n()),V(()=>{Al(u,1,wl([`button`,t.class]),`s-a`),Ml(u,W(s)),Il(u,`data-row`,t.row),Il(u,`data-col`,t.col),Il(u,`data-layer`,t.layer),Il(u,`data-default`,r())}),Lc(`click`,u,c),Ic(`focus`,u,a),Ic(`blur`,u,o),K(e,u),ma()}Rc([`click`]);var Tp=require(`@vkontakte/videoplayer-statistics/es2018`),Ep=_(Xn(),1),Dp=e=>{let t=Math.abs(Math.round(e)),n=Math.floor(t/3600),r=t%3600,i=Math.floor(r/60),a=r%60;return`${e<0?`-`:``}${n?Ep.default(String(n),2,`0`)+`:`:``}${Ep.default(String(i),2,`0`)}:${Ep.default(String(a),2,`0`)}`},Op=G(`<div> </div>`),kp={hash:`s-h`,code:`.video-time.s-h {color:white;line-height:125%;}`};function Ap(e,t){pa(t,!0),xl(e,kp);let n=Uo(()=>Dp(t.current)+(t.duration?` / ${Dp(t.duration)}`:``)),r=Uo(()=>`font-size: ${t.size||10}rem`);var i=Op(),a=z(i,!0);L(i),V(()=>{Ml(i,W(r)),Al(i,1,wl([`video-time`,t.class]),`s-h`),q(a,W(n))}),K(e,i),ma()}var jp=G(`<div class="pointer-time-wrapper s-c"><!></div>`),Mp=G(`<div><div class="time-wrapper s-c"><!></div> <div class="current-progress s-c"></div> <div class="pointer s-c"><!></div></div>`),Np={hash:`s-c`,code:`.progress-bar.s-c {position:relative;width:100%;height:4rem;border-radius:2rem;background:rgba(255, 255, 255, 0.15);font-size:inherit;}.current-progress.s-c {position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:white;}.is-live-now.s-c .current-progress:where(.s-c){background:#ff5c5c;}.pointer.s-c {display:none;position:absolute;top:50%;transform:translate(-50%, -50%);will-change:transform;width:7rem;height:7rem;border-radius:50%;background:white;}.time-wrapper.s-c {position:absolute;top:0;right:0;transform:translateY(calc(-100% - 20rem));}.pointer-time-wrapper.s-c {position:absolute;bottom:0;left:50%;transform:translate(-50%, calc(100% + 5rem));}.progress-bar.s-c:focus {outline:0;}.progress-bar.s-c:focus .pointer:where(.s-c) {display:block;}.button.s-c:hover:not(:focus) {background-color:rgba(118, 120, 122, 1);}`};function Pp(e,t){pa(t,!0),xl(e,Np);let n=()=>iu(f,`$duration$`,o),r=()=>iu(v,`$positionPercent$`,o),i=()=>iu(d,`$positionExact$`,o),a=()=>iu(p,`$isLive$`,o),[o,s]=au(),{actions:{internal:{seekTime:c,pause:l,play:u}},state:{positionExact$:d,duration$:f,isLive$:p}}=vd(),m=10/n(),h=su(t,`ref`,15),g=is(ds(NaN)),_=Uo(()=>isFinite(W(g))),v=tu([d,f],([e,t])=>t>0?e/t:0),y=e=>{e.preventDefault(),e.stopPropagation(),c(n()*e.offsetX/h().offsetWidth,Tp.SeekAction.SLIDER)},b=()=>{W(_)||(R(g,r(),!0),l())},x=e=>{switch(e.key){case`ArrowLeft`:e.stopPropagation(),b(),R(g,Math.max(0,W(g)-m),!0);break;case`ArrowRight`:e.stopPropagation(),b(),R(g,Math.min(1,W(g)+m),!0);break;case`ArrowDown`:case`ArrowUp`:R(g,NaN,!0);break;case`Enter`:e.preventDefault(),c(X(f)*W(g),Tp.SeekAction.SLIDER),u(),R(g,NaN,!0);break;case`Escape`:W(_)&&(e.stopPropagation(),u(),R(g,NaN,!0));break}},S=Uo(()=>Number(W(_)?W(g):r())),C=Uo(()=>`width: ${W(S)*100}%`),w=Uo(()=>`left: ${W(S)*100}%`),T=Uo(()=>i()-(a()?n():0)),E=Uo(()=>W(_)?W(g)*n()-(a()?n():0):0);var D=Mp();Il(D,`tabindex`,0);var O=z(D),k=z(O),A=e=>{{let t=Uo(()=>a()?0:n());Ap(e,{get size(){return`10`},get current(){return W(T)},get duration(){return W(t)}})}};J(k,e=>{a()||e(A)}),L(O);var j=B(O,2),M=B(j,2),ee=z(M),N=e=>{var t=jp();Ap(z(t),{get size(){return`8`},get current(){return W(E)}}),L(t),K(e,t)};J(ee,e=>{W(E)&&e(N)}),L(M),L(D),Zl(D,e=>h(e),()=>h()),V(()=>{Al(D,1,wl([`progress-bar`,t.class,a()&&W(S)===1&&`is-live-now`]),`s-c`),Il(D,`data-row`,t.row),Il(D,`data-col`,t.col),Il(D,`data-layer`,t.layer),Ml(j,W(C)),Ml(M,W(w))}),Lc(`keydown`,D,x),Lc(`click`,D,y),K(e,D),ma(),s()}Rc([`keydown`,`click`]);var Fp=Kc(`<path d="m14.4 8.76 24.02 13.85a1.6 1.6 0 0 1 0 2.78L14.4 39.24a1.6 1.6 0 0 1-2.4-1.39v-27.7a1.6 1.6 0 0 1 2.4-1.39"></path>`);function Ip(e,t){pa(t,!0);let n=Uo(()=>yp(t.size));Su(e,{width:`48`,height:`48`,fill:`currentColor`,get style(){return W(n)},testId:`play-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,Fp())},$$slots:{default:!0}}),ma()}var Lp=require(`@vkontakte/videoplayer-core/es2018`),Rp=Kc(`<path d="m17.4 10 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h3.801zm16 0 1.6.2a2 2 90 01.8.8l.2 1.6v22.8l-.2 1.6a2 2 90 01-.8.8l-1.6.2h-4l-1.4-.2a2 2 90 01-.8-.8l-.2-1.6V12.6l.2-1.6a2 2 90 01.8-.8l1.6-.2h4z"></path>`);function zp(e,t){pa(t,!0);let n=Uo(()=>yp(t.size));Su(e,{width:`48`,height:`48`,fill:`currentColor`,get style(){return W(n)},testId:`pause-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,Rp())},$$slots:{default:!0}}),ma()}var Bp=Kc(`<path d="M19.605 0.0611157C20.2463 0.163726 20.8529 0.409114 21.3976 0.844894C22.29 1.55876 22.7149 2.45864 23.0434 3.77239C23.1274 4.10872 23.2729 4.50079 23.4548 4.88131C23.8719 5.05864 24.28 5.25575 24.6777 5.47185C25.0704 5.37484 25.4474 5.24601 25.7485 5.10584C27.8669 4.11966 29.644 4.17147 31.0993 5.74115C31.2224 5.87392 31.2959 5.96187 31.4558 6.15934L32.3998 7.32506C32.6537 7.63857 32.7621 7.78141 32.9223 8.04795C33.96 9.7751 33.5554 11.3836 32.2437 13.1266C32.026 13.4159 31.8038 13.7945 31.6179 14.1928C31.7352 14.6166 31.8328 15.0463 31.9105 15.4809C32.2446 15.7486 32.5997 15.9831 32.9134 16.1432C34.1196 16.7587 34.9009 17.3752 35.3957 18.4053C35.6978 19.0341 35.8004 19.6804 35.7561 20.3283C35.7327 20.6708 35.6957 20.8617 35.597 21.2892L35.2596 22.7507C35.1609 23.1782 35.1105 23.366 34.9814 23.6841C34.7371 24.2859 34.3616 24.8218 33.8144 25.2545C32.9181 25.9634 31.9457 26.175 30.5917 26.1995C30.2492 26.2057 29.84 26.2581 29.4328 26.3478C29.1681 26.7135 28.8862 27.0665 28.5882 27.4055C28.5933 27.8168 28.6342 28.221 28.7042 28.5516C28.9849 29.8764 28.9975 30.8715 28.5084 31.9043C28.2098 32.5347 27.7721 33.0212 27.2407 33.3946C26.9598 33.5919 26.7882 33.6833 26.3939 33.8756L25.0457 34.5332C24.6514 34.7255 24.4737 34.8045 24.1452 34.9043C23.5238 35.0933 22.871 35.1386 22.1904 34.9858C21.0754 34.7353 20.299 34.1128 19.4279 33.076C19.1976 32.8019 18.883 32.5036 18.5409 32.235C18.3222 32.245 18.1028 32.25 17.8829 32.25C17.6631 32.25 17.4437 32.245 17.225 32.235C16.8829 32.5036 16.5682 32.8019 16.338 33.076C15.4669 34.1128 14.6905 34.7353 13.5755 34.9858C12.8949 35.1386 12.242 35.0933 11.6206 34.9043C11.2922 34.8045 11.1145 34.7255 10.7202 34.5332L9.37201 33.8756C9.25348 33.8179 9.17995 33.7815 9.09407 33.7368C7.12674 32.7123 6.55001 30.9662 7.06165 28.5516C7.1317 28.221 7.17258 27.8168 7.17769 27.4055C6.87964 27.0665 6.59775 26.7135 6.33304 26.3478C5.92591 26.2581 5.51663 26.2057 5.17413 26.1995C3.82017 26.175 2.84776 25.9634 1.95146 25.2545C1.40431 24.8218 1.02875 24.2859 0.784502 23.6841C0.655401 23.366 0.604985 23.1782 0.506296 22.7507L0.168869 21.2892C0.0643852 20.8366 0.0258935 20.6348 0.00607361 20.2681C-0.031082 19.5806 0.100474 18.8976 0.449422 18.2496C0.957844 17.3055 1.71039 16.726 2.85245 16.1432C3.16613 15.9831 3.52129 15.7486 3.85542 15.4809C3.93305 15.0463 4.03072 14.6166 4.14799 14.1928C3.96209 13.7945 3.73987 13.4159 3.52222 13.1266C2.21049 11.3836 1.80583 9.7751 2.84361 8.04795C3.00377 7.78141 3.11222 7.63857 3.36609 7.32506L4.31007 6.15934C4.46998 5.96187 4.54348 5.87392 4.66657 5.74115C6.12187 4.17147 7.89898 4.11966 10.0173 5.10584C10.3184 5.24601 10.6955 5.37484 11.0881 5.47185C11.4859 5.25575 11.894 5.05864 12.3111 4.88131C12.4929 4.50079 12.6384 4.10872 12.7225 3.77239C13.0509 2.45864 13.4759 1.55876 14.3682 0.844894C14.913 0.409114 15.5196 0.163726 16.1609 0.0611157C16.4321 0.0177263 16.6107 0.00464598 16.8959 0.00114942L18.6329 0C19.0716 0 19.266 0.00687897 19.605 0.0611157ZM18.7615 3.00031L17.1329 3C16.3829 3 16.0079 3 15.6329 4.5C15.4248 5.33261 14.9856 6.39629 14.3794 7.30626C13.4155 7.62186 12.509 8.06414 11.6795 8.61343C10.6044 8.50749 9.51939 8.18318 8.75121 7.82556C7.3495 7.17301 7.1135 7.46444 6.64151 8.0473L5.69753 9.21302C5.22554 9.79588 4.98955 10.0873 5.91927 11.3227C6.44256 12.0181 7.00097 13.0476 7.3248 14.1068C6.9932 15.0058 6.77314 15.9587 6.68139 16.9489C5.92897 17.7503 4.98495 18.423 4.21611 18.8153C2.83891 19.5182 2.92327 19.8835 3.09198 20.6143L3.42941 22.0759C3.59812 22.8067 3.68248 23.172 5.22839 23.2C6.08312 23.2155 7.21283 23.4028 8.23271 23.7856C8.75071 24.6478 9.38097 25.4348 10.1033 26.1265C10.2448 27.2028 10.173 28.3403 9.99649 29.1735C9.67598 30.6861 10.013 30.8505 10.6871 31.1792L12.0353 31.8368C12.7094 32.1656 13.0465 32.33 14.0411 31.1462C14.5988 30.4824 15.4718 29.71 16.4268 29.1566C16.9035 29.2182 17.3895 29.25 17.8829 29.25C18.3764 29.25 18.8624 29.2182 19.3391 29.1566C20.2941 29.71 21.1671 30.4824 21.7248 31.1462C22.7194 32.33 23.0565 32.1656 23.7306 31.8368L25.0788 31.1792C25.7528 30.8505 26.0899 30.6861 25.7694 29.1735C25.5928 28.3403 25.5211 27.2028 25.6626 26.1265C26.3849 25.4348 27.0152 24.6478 27.5332 23.7856C28.553 23.4028 29.6828 23.2155 30.5375 23.2C32.0834 23.172 32.1678 22.8067 32.3365 22.0759L32.6739 20.6143C32.8426 19.8835 32.927 19.5182 31.5498 18.8153C30.7809 18.423 29.8369 17.7503 29.0845 16.9489C28.9927 15.9587 28.7727 15.0058 28.4411 14.1068C28.7649 13.0476 29.3233 12.0181 29.8466 11.3227C30.7763 10.0873 30.5403 9.79588 30.0683 9.21302L29.1244 8.0473C28.6524 7.46444 28.4164 7.17301 27.0147 7.82556C26.2465 8.18318 25.1615 8.50749 24.0864 8.61343C23.2569 8.06414 22.3504 7.62186 21.3865 7.30626C20.7803 6.39629 20.3411 5.33261 20.1329 4.5C19.78 3.08824 19.4271 3.00519 18.7615 3.00031ZM17.8829 11.25C21.6109 11.25 24.6329 14.2721 24.6329 18C24.6329 21.7279 21.6109 24.75 17.8829 24.75C14.155 24.75 11.1329 21.7279 11.1329 18C11.1329 14.2721 14.155 11.25 17.8829 11.25ZM17.8829 14.25C15.8119 14.25 14.1329 15.9289 14.1329 18C14.1329 20.0711 15.8119 21.75 17.8829 21.75C19.954 21.75 21.6329 20.0711 21.6329 18C21.6329 15.9289 19.954 14.25 17.8829 14.25Z"></path>`);function Vp(e,t){pa(t,!0);let n=Uo(()=>yp(t.size));Su(e,{width:`36`,height:`36`,viewBox:`0 0 36 36`,fill:`currentColor`,get style(){return W(n)},testId:`settings-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,Bp())},$$slots:{default:!0}}),ma()}var Hp=Kc(`<path d="M5 0h32s5 0 5 5v10s0 5 -5 5h-32s-5 0 -5 -5v-10s0 -5 5 -5 M5.5 2h31s3.5 0 3.5 3.5v9s0 3.5-3.5 3.5h-31s-3.5 0-3.5-3.5v-9s0-3.5 3.5-3.5 M8 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H9V6a1 1 0 0 0-1-1m7 1a1 1 0 1 1 2 0v8a1 1 0 1 1-2 0zm15-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2h-3v-2h3a1 1 0 1 0 0-2h-3V7h3a1 1 0 1 0 0-2zm-8.32 9.31-2.55-7.82a1 1 0 0 1-.12-.37L19 6.1a1 1 0 1 1 2-.2l2 6.4 2-6.4a1 1 0 0 1 2 .2v.02a1 1 0 0 1-.13.37l-2.55 7.82a1 1 0 0 1-.95.69h-.74a1 1 0 0 1-.95-.69 z"></path>`);function Up(e,t){pa(t,!0);let n=Uo(()=>yp(t.size));Su(e,{width:`42`,height:`20`,testId:`live-icon`,fill:`currentColor`,get style(){return W(n)},children:(e,t)=>{K(e,Hp())},$$slots:{default:!0}}),ma()}var Wp=require(`@vkontakte/videoplayer-statistics/es2018`),Gp=G(`<div class="wrapper s-5"><div class="container s-5"><div class="top-buttons"></div> <div class="filler s-5"></div> <div class="top-above-progress-bar s-5"><div class="video-title s-5"> </div> <div class="filler s-5"></div> <!></div> <!> <div class="bottom-buttons s-5"><div class="play-pause-button-container"><!></div> <div class="settings-button-container s-5"><!></div></div></div></div>`),Kp={hash:`s-5`,code:`.wrapper.s-5 {background-image:linear-gradient(
|
|
64
|
+
360deg,
|
|
65
|
+
rgba(0, 0, 0, 0.0001) 0%,
|
|
66
|
+
rgba(0, 0, 0, 0.0156863) 9.22%,
|
|
67
|
+
rgba(0, 0, 0, 0.054902) 18.76%,
|
|
68
|
+
rgba(0, 0, 0, 0.117647) 28.48%,
|
|
69
|
+
rgba(0, 0, 0, 0.2) 38.19%,
|
|
70
|
+
rgba(0, 0, 0, 0.290196) 47.75%,
|
|
71
|
+
rgba(0, 0, 0, 0.392157) 56.99%,
|
|
72
|
+
rgba(0, 0, 0, 0.501961) 65.75%,
|
|
73
|
+
rgba(0, 0, 0, 0.607843) 73.87%,
|
|
74
|
+
rgba(0, 0, 0, 0.709804) 81.18%,
|
|
75
|
+
rgba(0, 0, 0, 0.8) 87.52%,
|
|
76
|
+
rgba(0, 0, 0, 0.882353) 92.74%,
|
|
77
|
+
rgba(0, 0, 0, 0.945098) 96.66%,
|
|
78
|
+
rgba(0, 0, 0, 0.984314) 99.14%,
|
|
79
|
+
#000 100%
|
|
80
|
+
),
|
|
81
|
+
linear-gradient(
|
|
82
|
+
to bottom,
|
|
83
|
+
rgba(0, 0, 0, 0.0001) 0%,
|
|
84
|
+
rgba(0, 0, 0, 0.0156863) 9.22%,
|
|
85
|
+
rgba(0, 0, 0, 0.054902) 18.76%,
|
|
86
|
+
rgba(0, 0, 0, 0.117647) 28.48%,
|
|
87
|
+
rgba(0, 0, 0, 0.2) 38.19%,
|
|
88
|
+
rgba(0, 0, 0, 0.290196) 47.75%,
|
|
89
|
+
rgba(0, 0, 0, 0.392157) 56.99%,
|
|
90
|
+
rgba(0, 0, 0, 0.501961) 65.75%,
|
|
91
|
+
rgba(0, 0, 0, 0.607843) 73.87%,
|
|
92
|
+
rgba(0, 0, 0, 0.709804) 81.18%,
|
|
93
|
+
rgba(0, 0, 0, 0.8) 87.52%,
|
|
94
|
+
rgba(0, 0, 0, 0.882353) 92.74%,
|
|
95
|
+
rgba(0, 0, 0, 0.945098) 96.66%,
|
|
96
|
+
rgba(0, 0, 0, 0.984314) 99.14%,
|
|
97
|
+
#000 100%
|
|
98
|
+
);position:absolute;top:0;left:0;right:0;bottom:0;}.container.s-5 {height:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:10rem 48rem 0;}.filler.s-5 {flex-grow:1;}.top-above-progress-bar.s-5{display:flex;align-items:flex-end;padding-bottom:20rem;}.video-title.s-5 {max-width:320rem;color:white;font-size:14rem;line-height:18rem;}.bottom-buttons.s-5 {position:relative;width:100%;display:flex;justify-content:center;align-items:center;margin:20rem 0;}.settings-button-container.s-5 {position:absolute;top:50%;right:0;transform:translateY(-50%);}`};function qp(e,t){pa(t,!0),xl(e,Kp);let n=()=>iu(d,`$playbackState$`,o),r=()=>iu(f,`$isLive$`,o),i=()=>iu(p,`$positionExact$`,o),a=()=>iu(m,`$duration$`,o),[o,s]=au(),{actions:{internal:{togglePlay:c,setSettingsVisibility:l,seekTime:u}},state:{playbackState$:d,isLive$:f,positionExact$:p,duration$:m},video:{title:h}}=vd(),g=Uo(()=>n()===Lp.PlaybackState.PLAYING),_=is(void 0);Is(()=>{W(_)?.focus()});let v=()=>{l(!0)},y=Uo(()=>r()&&i()!==a()),b=()=>{u(a(),Wp.SeekAction.LIVE)};var x=Gp(),S=z(x),C=B(z(S),4),w=z(C),T=z(w,!0);L(w);var E=B(w,4),D=e=>{wp(e,{layer:`controls`,row:1,col:1,onclick:b,children:(e,t)=>{Up(e,{get size(){return`14`}})},$$slots:{default:!0}})};J(E,e=>{W(y)&&e(D)}),L(C);var O=B(C,2);Pp(O,{row:2,col:1,layer:`controls`});var k=B(O,2),A=z(k);wp(z(A),{get size(){return`20`},get onclick(){return c},row:3,col:1,layer:`controls`,get ref(){return W(_)},set ref(e){R(_,e,!0)},children:(e,t)=>{var n=qc(),r=Ts(n),i=e=>{zp(e,{get size(){return`20`}})},a=e=>{Ip(e,{get size(){return`20`}})};J(r,e=>{W(g)?e(i):e(a,!1)}),K(e,n)},$$slots:{default:!0}}),L(A);var j=B(A,2);wp(z(j),{get size(){return`14`},onclick:v,row:3,col:2,layer:`controls`,children:(e,t)=>{Vp(e,{get size(){return`14`}})},$$slots:{default:!0}}),L(j),L(k),L(S),L(x),V(()=>q(T,h)),K(e,x),ma(),s()}var Jp=G(`<button class="s-f"><!></button>`),Yp=G(`<div class="list s-f"></div>`),Xp={hash:`s-f`,code:`.list.s-f {display:flex;flex-direction:column;gap:4rem;}.list.s-f:focus, .list.s-f:focus-visible {outline:0;}.list.s-f button:where(.s-f){border:none;background:none;color:inherit;}`};function Zp(e,t){pa(t,!0),xl(e,Xp);let n=su(t,`ref`,15),r=is(0);cu(()=>{R(r,t.items.findIndex(e=>e.isSelected),!0)});let i=e=>{switch(e.key){case`ArrowUp`:R(r,Math.max(W(r)-1,0),!0),e.stopPropagation();break;case`ArrowDown`:R(r,Math.min(W(r)+1,t.items.length-1),!0),e.stopPropagation();break;case`Enter`:if(e.stopPropagation(),e.preventDefault(),t.items[W(r)].disabled)return;t.onAction(W(r));break}},a=e=>{R(r,e,!0),!t.items[e].disabled&&t.onAction(e)};var o=Yp();Il(o,`tabindex`,0),fl(o,23,()=>t.items,e=>e.id,(e,n,i)=>{var o=Jp();yl(z(o),t,`default`,{get item(){return W(n)},get focused(){return W(i)===W(r)}},null),L(o),V(()=>o.disabled=W(n).disabled),Lc(`click`,o,()=>a(W(i))),K(e,o)}),L(o),Zl(o,e=>n(e),()=>n()),V(()=>{Il(o,`data-row`,t.row),Il(o,`data-col`,t.col),Il(o,`data-layer`,t.layer)}),Lc(`keydown`,o,i),K(e,o),ma()}Rc([`keydown`,`click`]);var Qp=Kc(`<path d="M16.5 24.8787L8.56066 16.9393C7.97487 16.3536 7.02513 16.3536 6.43934 16.9393C5.85355 17.5251 5.85355 18.4749 6.43934 19.0607L15.4393 28.0607C16.0251 28.6464 16.9749 28.6464 17.5607 28.0607L35.5607 10.0607C36.1464 9.47487 36.1464 8.52513 35.5607 7.93934C34.9749 7.35355 34.0251 7.35355 33.4393 7.93934L16.5 24.8787Z"></path>`);function $p(e,t){pa(t,!0);let n=Uo(()=>yp(t.size));Su(e,{width:`39`,height:`36`,viewBox:`0 0 39 36`,fill:`currentColor`,get style(){return W(n)},testId:`back-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,Qp())},$$slots:{default:!0}}),ma()}var em=G(`<div> <!></div>`),tm={hash:`s-g`,code:`.quality-list-item.s-g {box-sizing:border-box;padding:6rem;width:100%;color:var(--vkui--color_text_subhead);font-size:10rem;line-height:12rem;font-weight:500;border-radius:6rem;display:flex;justify-content:space-between;align-items:center;}.quality-list-item.s-g:hover {background-color:#76787a;color:#e1e3e6;}.quality-list-item.selected.s-g {background:var(--vkui--color_background_contrast_secondary_alpha);color:var(--vkui--color_text_subhead);}:focus .quality-list-item.focused.s-g {background-color:#fff;color:#000;}.quality-list-item.disabled.s-g{opacity:.5;}`};function nm(e,t){pa(t,!0),xl(e,tm);var n=em(),r=z(n),i=B(r),a=e=>{$p(e,{get size(){return`7`}})};J(i,e=>{t.data.isSelected&&e(a)}),L(n),V(()=>{Al(n,1,wl([`quality-list-item`,t.data.isSelected?`selected`:``,t.data.isFocused?`focused`:``,t.data.disabled&&`disabled`]),`s-g`),q(r,`${t.data.text??``} `)}),K(e,n),ma()}var rm=Kc(`<path d="M9.43934 9.43934C10.0251 8.85355 10.9749 8.85355 11.5607 9.43934L21 18.8775L30.4393 9.43934C30.9801 8.89861 31.8309 8.85702 32.4193 9.31456L32.5607 9.43934C33.1464 10.0251 33.1464 10.9749 32.5607 11.5607L23.1225 21L32.5607 30.4393C33.1014 30.9801 33.143 31.8309 32.6854 32.4193L32.5607 32.5607C31.9749 33.1464 31.0251 33.1464 30.4393 32.5607L21 23.1225L11.5607 32.5607C11.0199 33.1014 10.1691 33.143 9.58065 32.6854L9.43934 32.5607C8.85355 31.9749 8.85355 31.0251 9.43934 30.4393L18.8775 21L9.43934 11.5607C8.89861 11.0199 8.85702 10.1691 9.31456 9.58065L9.43934 9.43934Z"></path>`);function im(e,t){pa(t,!0);let n=Uo(()=>yp(t.size));Su(e,{width:`42`,height:`42`,viewBox:`0 0 42 42`,fill:`currentColor`,get style(){return W(n)},testId:`back-icon`,get shadow(){return t.shadow},children:(e,t)=>{K(e,rm())},$$slots:{default:!0}}),ma()}var am=require(`@vkontakte/videoplayer-shared/es2018`),om=G(`<div class="settings-layer s-8"><div class="settings-menu s-8"><div class="settings-title s-8">Качество</div> <div class="menu-list"><div class="close-button-container s-8"><!></div> <!></div></div></div>`),sm={hash:`s-8`,code:`.settings-layer.s-8 {position:absolute;top:0;left:0;right:0;bottom:0;}.settings-menu.s-8 {box-sizing:border-box;position:absolute;top:0;right:0;padding:10rem;width:163rem;height:100%;background:#000;}.settings-title.s-8 {margin-left:8rem;margin-top:5rem;margin-bottom:12rem;font-size:12rem;line-height:116%;color:#fff;}.close-button-container.s-8 {position:absolute;top:15rem;left:0;transform:translateX(calc(-100% - 7rem));}`};function cm(e,t){pa(t,!0),xl(e,sm);let n=()=>iu(l,`$availableQualities$`,i),r=()=>iu(u,`$currentQuality$`,i),[i,a]=au(),{actions:{internal:{setSettingsVisibility:o,setQuality:s,clearShowByInput:c}},state:{availableQualities$:l,currentQuality$:u},deviceCapabilities:d}=vd(),f=is(void 0),p=Uo(()=>n().map(e=>{let{value:t,displayValue:n,selected:i}=e,a={id:t,text:n,isSelected:i,disabled:t!==`auto`&&t!==am.VideoQuality.INVARIANT&&!d.isCodecSupported(t)};return i&&t===`auto`&&(a.text=`${n} (${r()})`),a}));Is(()=>{W(f)?.focus()});let m=()=>{o(!1)},h=e=>{let t=W(p)[e];s(t.id),o(!1),c()};var g=om(),_=z(g),v=B(z(_),2),y=z(v);wp(z(y),{get size(){return`14`},onclick:m,row:1,col:1,layer:`settings`,children:(e,t)=>{im(e,{get size(){return`14`}})},$$slots:{default:!0}}),L(y),Zp(B(y,2),{row:1,col:2,layer:`settings`,get items(){return W(p)},onAction:h,get ref(){return W(f)},set ref(e){R(f,e,!0)},children:Jr,$$slots:{default:(e,t)=>{let n=Uo(()=>t.item),r=Uo(()=>t.focused),i=Uo(()=>({...W(n),isFocused:W(r)}));nm(e,{get data(){return W(i)}})}}}),L(v),L(_),L(g),K(e,g),ma(),a()}var lm=G(`<div class="container s-d"><div class="dot s-d"></div> <div class="dot s-d"></div> <div class="dot s-d"></div></div>`),um={hash:`s-d`,code:`.container.s-d {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;display:flex;}.dot.s-d:nth-child(1) {animation-delay:calc(0 * 180ms);}.dot.s-d:nth-child(2) {animation-delay:calc(1 * 180ms);}.dot.s-d:nth-child(3) {animation-delay:calc(2 * 180ms);}
|
|
99
|
+
|
|
100
|
+
@keyframes s-d-dot_animation {
|
|
101
|
+
0% {
|
|
102
|
+
opacity: 0.2;
|
|
103
|
+
}
|
|
104
|
+
30% {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
100% {
|
|
108
|
+
opacity: 0.2;
|
|
109
|
+
}
|
|
110
|
+
}.dot.s-d {border-radius:4px;width:8px;height:8px;background:var(--btn-color);animation-duration:750ms;
|
|
111
|
+
animation-name: s-d-dot_animation;animation-iteration-count:infinite;}.dot.s-d + .dot:where(.s-d) {margin-left:4px;}`};function dm(e,t){xl(e,um);let n=su(t,`style`,3,``);var r=lm();V(()=>Ml(r,n())),K(e,r)}var fm=G(`<div class="container s-6"><!></div>`),pm={hash:`s-6`,code:`.container.s-6 {position:absolute;left:0;top:0;right:0;bottom:0;font-size:33px;color:green;}`};function mm(e){xl(e,pm);var t=fm();dm(z(t),{}),L(t),K(e,t)}var hm=require(`@vkontakte/videoplayer-shared/es2018`),gm=G(`<div class="timer__cell cell s-e"><span class="cell__value s-e"> </span> <span class="cell__unit s-e"> </span></div> <span class="timer__points s-e"> </span>`,1),_m=G(`<div class="timer__cell cell s-e"><span class="cell__value s-e"> </span> <span class="cell__unit s-e"> </span></div> <span class="timer__points s-e"> </span>`,1),vm=G(`<div class="timer__cell cell s-e"><span class="cell__value s-e"> </span> <span class="cell__unit s-e"> </span></div> <span class="timer__points s-e"> </span>`,1),ym=G(`<div class="timer__cell cell s-e"><span class="cell__value s-e"> </span> <span class="cell__unit s-e"> </span></div>`),bm=G(`<div class="timer__container s-e"><!> <!> <!> <!></div>`),xm={hash:`s-e`,code:`.timer__container.s-e {display:flex;align-items:flex-start;justify-content:center;}.cell.s-e {display:flex;flex-direction:column;align-items:center;}.cell__value.s-e {font-size:16em;line-height:1.2;font-weight:600;}.cell__unit.s-e {font-size:4.7em;line-height:1.2;font-weight:400;}.timer__points.s-e {display:inline-block;margin:0 8px;font-size:42px;line-height:1.2;font-weight:600;}`};function Sm(e,t){pa(t,!0),xl(e,xm);let n=is(``),r=is(``),i=is(``),a=is(``),o,s=e=>String(e).padStart(2,`0`),c=e=>Math.max(e.length,1),l=e=>`${(t.isSmallSize?16:32)*c(e)}px`,u=e=>{let t=Math.floor(e/86400);t&&(e-=t*86400,R(n,s(t),!0)),R(r,s(Math.floor(e/3600)),!0),R(i,s(Math.floor(e/60)%60),!0),R(a,s(e%60),!0)},d=()=>{let e=Math.floor(Date.now()/1e3),n=t.startTime-e;u(n),n>=1?o=hm.getWindow().requestAnimationFrame(d):t.onTimerOver()};cu(()=>{o=hm.getWindow().requestAnimationFrame(d)}),lu(()=>{hm.getWindow().cancelAnimationFrame(o)});var f=bm(),p=z(f),m=e=>{var t=gm(),r=Ts(t);let i;var a=z(r),o=z(a,!0);L(a);var s=B(a,2),c=z(s,!0);L(s),L(r);var u=B(r,2),d=z(u,!0);L(u),V((e,t,a)=>{i=Ml(r,``,i,e),q(o,W(n)),q(c,t),q(d,a)},[()=>({width:l(W(n))}),()=>Nd(`waiting_live_day_value`),()=>Nd(`waiting_live_colon`)]),K(e,t)};J(p,e=>{W(n)&&e(m)});var h=B(p,2),g=e=>{var t=_m(),n=Ts(t);let i;var a=z(n),o=z(a,!0);L(a);var s=B(a,2),c=z(s,!0);L(s),L(n);var u=B(n,2),d=z(u,!0);L(u),V((e,t,a)=>{i=Ml(n,``,i,e),q(o,W(r)),q(c,t),q(d,a)},[()=>({width:l(W(r))}),()=>Nd(`waiting_live_hour_value`),()=>Nd(`waiting_live_colon`)]),K(e,t)};J(h,e=>{W(r)&&e(g)});var _=B(h,2),v=e=>{var t=vm(),n=Ts(t);let r;var a=z(n),o=z(a,!0);L(a);var s=B(a,2),c=z(s,!0);L(s),L(n);var u=B(n,2),d=z(u,!0);L(u),V((e,t,a)=>{r=Ml(n,``,r,e),q(o,W(i)),q(c,t),q(d,a)},[()=>({width:l(W(i))}),()=>Nd(`waiting_live_minute_value`),()=>Nd(`waiting_live_colon`)]),K(e,t)};J(_,e=>{W(i)&&e(v)});var y=B(_,2),b=e=>{var t=ym();let n;var r=z(t),i=z(r,!0);L(r);var o=B(r,2),s=z(o,!0);L(o),L(t),V((e,r)=>{n=Ml(t,``,n,e),q(i,W(a)),q(s,r)},[()=>({width:l(W(a))}),()=>Nd(`waiting_live_second_value`)]),K(e,t)};J(y,e=>{W(a)&&e(b)}),L(f),K(e,f),ma()}var Cm=G(`<div class="waiting s-7"><span class="waiting__title medium s-7"> </span></div>`),wm=G(`<div class="upcoming-timer timer s-7"><span class="timer__title medium s-7"> </span> <!></div>`),Tm=G(`<div class="waiting-container s-7"><!></div>`),Em={hash:`s-7`,code:`.waiting-container.s-7 {position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--black);background-position:center;background-size:cover;background-repeat:no-repeat;white-space:nowrap;color:white;}.waiting-container.s-7::before {content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.56);z-index:1;backdrop-filter:blur(5em);}.waiting.s-7 {position:absolute;top:50%;left:0;width:100%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:2;}.waiting__title.s-7 {font-size:7em;line-height:1.2;font-weight:600;}.upcoming-timer.s-7 {position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:2;}.timer.s-7 {display:flex;flex-direction:column;align-items:center;justify-content:center;}.timer__title.s-7 {display:inline-block;vertical-align:middle;margin-bottom:.7em;font-size:6.6666em;line-height:1.2;font-weight:600;}.medium.s-7 {font-size:6em;}`};function Dm(e,t){pa(t,!0),xl(e,Em);let{video:{thumbUrl:n,live:r}}=vd(),i=r?.startTime||0,a=Uo(()=>i<Math.floor(Date.now()/1e3));var o=Tm(),s=z(o),c=e=>{var t=Cm(),n=z(t),r=z(n,!0);L(n),L(t),V(e=>q(r,e),[()=>Nd(`waiting_live_upcoming_title`)]),K(e,t)},l=e=>{var t=wm(),n=z(t),r=z(n,!0);L(n);var o=B(n,2);{let e=Uo(()=>i||0);Sm(o,{get startTime(){return W(e)},onTimerOver:()=>R(a,!0)})}L(t),V(e=>q(r,e),[()=>Nd(`waiting_live_timer_title`)]),K(e,t)};J(s,e=>{W(a)?e(c):e(l,!1)}),L(o),V(()=>Ml(o,`background-image: url(${n})`)),K(e,o),ma()}var Om=G(`<div class="waiting-container s-9"><div class="waiting-caption s-9"><!> <p class="waiting-title s-9"> </p></div></div>`),km={hash:`s-9`,code:`.waiting-container.s-9 {position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--black);background-position:center;background-size:cover;background-repeat:no-repeat;}.waiting-container.s-9::before {content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.4);backdrop-filter:blur(10px);}.waiting-caption.s-9 {position:relative;display:flex;flex-direction:column;align-items:center;}.waiting-title.s-9 {margin:0;padding:20px;text-align:center;font-size:20px;line-height:1.2;font-weight:400;}`};function Am(e,t){pa(t,!0),xl(e,km);let n=su(t,`thumbUrl`,3,``),r={recover:Nd(`waiting_live_recover_title`),record:Nd(`waiting_record_title`)},i=Uo(()=>r[t.kind]||``);var a=Om(),o=z(a),s=z(o);dm(s,{style:`position: static; transform: translate(0, 0)`});var c=B(s,2),l=z(c,!0);L(c),L(o),L(a),V(()=>{Ml(a,`background-image: url('${n()}')`),q(l,W(i))}),Lc(`contextmenu`,a,function(...e){t.onContextMenu?.apply(this,e)}),Lc(`click`,a,function(...e){t.onClick?.apply(this,e)}),K(e,a),ma()}Rc([`contextmenu`,`click`]);var jm=G(`<!> <!> <!> <!> <!> <!> <!> <!> <!>`,1);function Mm(e,t){pa(t,!0);let n=()=>iu(p,`$language$`,l),r=()=>iu(_,`$isShowLoader`,l),i=()=>iu(g,`$controlsVisible`,l),a=()=>iu(v,`$settingsVisible`,l),o=()=>iu(y,`$playerPhase`,l),s=()=>iu(m,`$crashed`,l),c=()=>iu(h,`$debugPanelVisible`,l),[l,u]=au(),d=su(t,`videoContainer`,15),f=vd(),p=f.interfaceLanguage$,m=f.state.crashed$,h=f.ui.debugPanelVisible,{ui:{controlsVisible:g,isShowLoader:_,settingsVisible:v},playerPhase:y,video:{thumbUrl:b}}=f;var x=qc();cl(Ts(x),n,e=>{var t=jm(),n=Ts(t);vp(n,{get videoContainer(){return d()},set videoContainer(e){d(e)}});var l=B(n,2),u=e=>{mm(e,{})};J(l,e=>{r()&&e(u)});var f=B(l,2),p=e=>{qp(e,{})};J(f,e=>{i()&&e(p)});var m=B(f,2),h=e=>{cm(e,{})};J(m,e=>{a()&&e(h)});var g=B(m,2),_=e=>{Dm(e,{})};J(g,e=>{o()===`LiveWaitingStart`&&e(_)});var v=B(g,2),y=e=>{Am(e,{kind:`recover`,get thumbUrl(){return b}})};J(v,e=>{o()===`LiveWaitingRecover`&&e(y)});var x=B(v,2),S=e=>{Am(e,{kind:`record`,get thumbUrl(){return b}})};J(x,e=>{o()===`LiveWaitingRecord`&&e(S)});var C=B(x,2),w=e=>{Du(e,{})};J(C,e=>{s()&&e(w)});var T=B(C,2),E=e=>{hp(e,{})};J(T,e=>{c()&&e(E)}),K(e,t)}),K(e,x),ma(),u()}var Nm=G(`<div class="player-wrapper s-1" tabindex="0"><!></div>`),Pm={hash:`s-1`,code:`.player-wrapper.s-1 {position:relative;top:0;left:0;width:100%;height:100%;aspect-ratio:16/9;color:var(--white);--white: #fff;--black: #000;--red: #ff3347;--blue-light: #70c1ff;--black-alpha-40: rgba(0, 0, 0, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.72);--devider-gray: #dce1e6;--text-gray: #626d7a;--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;--controls-height: 40px;--controls-gradient-height: 100px;--controls-transition-duration: 0.25s;--controls-transition-fn: cubic-bezier(0.455, 0.03, 0.515, 0.955);--controls-desktop-item-margin-left: 4px;--controls-desktop-padding-horizontal: 4px;--focused: var(--white);--focused-outline-width: 2px;--focused-outline-radius: 0;--focused-element-shadow: inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow: 0 0 0 2px var(--focused);--big-play-size: 96px;--big-play-radius: 50%;--big-play-bg-color: rgba(0, 0, 0, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;--interactive-episode-complete: rgba(92, 156, 230, 1);--slider-bg: rgba(255, 255, 255, 0.4);--slider-filled-bg: var(--white);--slider-handle-bg: var(--white);--slider-loaded-bg: rgba(255, 255, 255, 0.4);--slider-height: 3px;--slider-video-episode-gap: 1.5px;--slider-radius: 0px;--slider-handle-size: 12px;--slider-filled-ads: rgba(103, 165, 235, 1);--slider-disabled-color: rgba(248, 248, 248, 0.31);--slider-volume-height: 5px;--slider-volume-radius: calc(var(--slider-volume-height) / 2);--slider-volume-handle-size: 13px;
|
|
112
|
+
|
|
113
|
+
/* USER DEFINED COLORS */
|
|
114
|
+
|
|
115
|
+
/* timeline active live */--timeline-slider-filled-active-live-bg: var(--red);--timeline-slider-handle-active-live-bg: var(--red);
|
|
116
|
+
/* timeline & timeline ads */--timeline-slider-bg: var(--slider-bg);--timeline-slider-filled-bg: var(--slider-filled-bg);--timeline-slider-handle-bg: var(--slider-handle-bg);--timeline-slider-loaded-bg: var(--slider-loaded-bg);
|
|
117
|
+
/* volume slider colors */--volume-slider-bg: var(--slider-bg);--volume-slider-filled-bg: var(--slider-filled-bg);--volume-slider-handle-bg: var(--slider-handle-bg);
|
|
118
|
+
/* controls time */--controls-time: var(--white);
|
|
119
|
+
|
|
120
|
+
/* /// USER DEFINED COLORS */--controls-gradient: linear-gradient(
|
|
121
|
+
to bottom,
|
|
122
|
+
rgba(0, 0, 0, 0) 0%,
|
|
123
|
+
rgba(0, 0, 0, 0.005) 6.67%,
|
|
124
|
+
rgba(0, 0, 0, 0.02) 13.33%,
|
|
125
|
+
rgba(1, 1, 1, 0.04) 20%,
|
|
126
|
+
rgba(1, 1, 1, 0.07) 26.67%,
|
|
127
|
+
rgba(2, 2, 2, 0.11) 33.33%,
|
|
128
|
+
rgba(3, 3, 3, 0.16) 40%,
|
|
129
|
+
rgba(4, 4, 4, 0.22) 46.67%,
|
|
130
|
+
rgba(6, 6, 6, 0.28) 53.33%,
|
|
131
|
+
rgba(7, 7, 7, 0.33) 60%,
|
|
132
|
+
rgba(8, 8, 8, 0.38) 66.67%,
|
|
133
|
+
rgba(9, 9, 9, 0.42) 73.33%,
|
|
134
|
+
rgba(9, 9, 9, 0.46) 80%,
|
|
135
|
+
rgba(10, 10, 10, 0.48) 86.67%,
|
|
136
|
+
rgba(10, 10, 10, 0.50) 100%
|
|
137
|
+
);--timeline-preview-shadow: rgba(0, 0, 0, 0.08);--timeline-preview-bg: rgba(34, 34, 34, 1);--timeline-padding-horizontal: 10px;--timeline-padding-vertical-top: 3px;--timeline-padding-vertical-bottom: 4px;--timeline-height: calc(var(--timeline-padding-vertical-bottom) + var(--timeline-padding-vertical-top) + var(--slider-height));--preview-track-frame-height-vertical: 114px;--preview-track-frame-height-horizontal: 65px;--preview-track-controls-top: 16px;--preview-track-time-line-height: 16px;--preview-track-bottom-offset: 10px;--preview-track-height: calc(var(--preview-track-frame-height-vertical)+var(--preview-track-bottom-offset));--preview-track-controls-top-offset: calc((var(--timeline-height) + var(--preview-track-controls-top) + var(--preview-track-time-line-height)));--settings-bg: rgba(0, 0, 0, 0.72);--settings-item-bg-hover: rgba(255, 255, 255, 0.08);--settings-radius: 8px;--mobile-settings-bg: #2c2d2e;--divider-border: 1px solid var(--white-alpha-24);--toggle-color-separator: #363738;--toggle-color-off: #656565;--toggle-color-on: #71aaeb;--toggle-color-autoplay-on: var(--white);--notification-bg: #2C2D2E;--notification-radius: 8px;--button-hover-transition: opacity 0.2s;--video-container-z-index: 0;--controls-container-z-index: 1;--ads-container-z-index: 1;--end-screen-mobile-z-index: 1;--notification-z-index: 1;--thumb-timer-z-index: 2;--debug-panel-z-index: 2;--modal-z-index: 2;--settings-menu-z-index: 2;--context-menu-z-index: 3;--hot-key-helpers-container-z-index: 3;--overlay-container-z-index: 4;--rotate-transition-duration: 0.25s;--btn-color: var(--white);--double-forward-bg: rgba(0, 0, 0, 0.6);--vkui--color_background_contrast_secondary_alpha: rgba(255, 255, 255, 0.2);--vkui--color_text_subhead: #969A9F;font-family:var(--font);}.player-wrapper.s-1 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}`};function Fm(e,t){pa(t,!0),xl(e,Pm);let n=()=>iu(p,`$isLive$`,o),r=()=>iu(v,`$availableSubtitlesList$`,o),i=()=>iu(x,`$settingsVisible`,o),a=()=>iu(b,`$controlsVisible`,o),[o,s]=au(),c=su(t,`volume`,3,void 0),l=su(t,`muted`,3,void 0),u=su(t,`failoverHosts`,3,void 0);pu(t.uiConfig);let d=mu(),f=t.store.ui.debugPanelVisible,p=t.store.state.isLive$,m=is(void 0);t.store.getAdmanWrapper().init({switchFromAdsToVideo:t.store.actions.internal.switchFromAdsToVideo,switchFromVideoToAds:t.store.actions.internal.switchFromVideoToAds,setMuted:t.store.actions.external.setMuted},t.store.ads,{vsid:t.store.vsid}),_d(t.store),Is(()=>{var e,n;(e=t.videoConfig.callbacks)==null||(n=e.onDomReady)==null||n.call(e)});let h=(e=!1)=>{e?t.store.actions.external.firstStart(t.showAds):t.store.actions.internal.firstStart(t.showAds)},g=()=>{hf(t.store.videoId),sf()&&t.store.actions.internal.setTrafficSavingEnabled(!0),t.store.deviceCapabilities.maxQuality!==Wf.VideoQuality.INVARIANT&&t.store.getPlayer().setAutoQualityLimits({max:t.store.deviceCapabilities.maxQuality});let e=tf(t.store.videoId);if(e&&e!==Wf.VideoQuality.INVARIANT&&t.store.deviceCapabilities.isCodecSupported(e)){t.store.actions.internal.setQuality(e);return}};function _(e){let r=t.sources||e;r&&t.store.initVideo({container:W(m),sources:r,failoverHosts:u(),subtitles:t.subtitles,subtitlesForcedLanguage:t.subtitlesForcedLanguage,volumeMultiplier:t.volumeMultiplier});let i=Gf.safeStorage.get(Ff)===`true`;f.set(i),t.fromTime>0&&t.store.actions.external.seekTime(t.fromTime);let a=c()??Qd()??d.volumeDefault,o=l()??af();if(t.store.actions.external.setVolume(a),t.store.actions.external.setMuted(o),t.store.getAdmanWrapper().setInitialVolume(o?0:a),g(),d.features.saveRate&&t.saveRate){let e=pf();e&&!n()&&t.store.actions.internal.setPlaybackRate(e)}t.store.ui.isAutoplay.set(t.autoplay),t.autoplay&&h(),t.preload&&d.features.preload&&t.store.actions.internal.preload()}cu(()=>{let e=()=>t.store.destroy();return t.live?.status===`upcoming`?(t.store.actions.internal.setLiveWaitingStart(!0),e):t.live?.status===`waiting`?(t.store.actions.internal.setLiveWaitingRecover(!0),e):(t.live?.status===`finished`||t.live?.status===`postlive`)&&!(t.sources&&Uf.areValidLiveRecordSources(t.sources))?(t.store.actions.internal.setLiveWaitingRecord(!0),e):(_(),e)});let v=t.store.state.availableSubtitlesList$;if(d.features.initSubtitles){let e=!1;Is(()=>{if(!e&&r().length){e=!0;let n;if(d.features.userVideoPrefs&&t.store.videoId){let e=_f(d.userSalt,String(t.store.videoId));e?.subtitleTrackId&&(n=r().find(t=>t.value===e.subtitleTrackId))}let i=t.subtitlesForcedLanguage??uf();i&&(n=r().find(e=>e.language===i)),t.store.actions.internal.setSubtitle(n)}})}let y=Gf.getWindow().innerWidth/640;Gf.getWindow().document.documentElement.style.fontSize=`${y}px`;let{controlsVisible:b,settingsVisible:x}=t.store.ui,S=()=>{i()||(a()?(t.store.actions.internal.clearShowByInput(),t.store.actions.internal.play()):(t.store.actions.internal.onUserInput(),t.store.actions.internal.pause()))},C={};fa(xp.CONTEXT_KEY,C);let w=e=>{switch(e.key){case`Enter`:e.target===e.currentTarget&&(t.store.actions.internal.onUserInput(),e.preventDefault());break;case`Escape`:t.store.actions.internal.onBackButton()||t.store.app.destroy();return;case`ArrowUp`:case`ArrowDown`:C.focusManager.onKeyDown(e)||(a()?t.store.actions.internal.clearShowByInput():t.store.actions.internal.onUserInput());break;default:C.focusManager.onKeyDown(e)}},T=e=>{[`ArrowUp`,`ArrowDown`].includes(e.key)||t.store.actions.internal.onUserInput()},E=()=>{t.store.actions.internal.onUserInput()},D;Is(()=>(C.focusManager=new xp(D),()=>{C.focusManager.destroy()})),t.store.ui.controlsVisible.subscribe(e=>{e||D.focus()});var O={initVideo:_},k=Nm();Mm(z(k),{get videoContainer(){return W(m)},set videoContainer(e){R(m,e,!0)}}),L(k),Zl(k,e=>D=e,()=>D),V(()=>Ml(k,`font-size: ${y}px;`)),Lc(`click`,k,S),Lc(`keydown`,k,w),Ic(`keydown`,k,T,!0),Lc(`mousemove`,k,E),K(e,k);var A=ma(O);return s(),A}Rc([`click`,`keydown`,`mousemove`]);var Im=require(`@vkontakte/videoplayer-shared/es2018`);class Lm{constructor(t){e(this,`store`,void 0),e(this,`hasFakeState`,!1),e(this,`onPopState`,({state:e})=>{let t=this.store.actions.internal.onBackButton(),n=Im.getWindow();n.removeEventListener(`popstate`,this.onPopState),t?(n.history.pushState(e,``),n.addEventListener(`popstate`,this.onPopState)):this.hasFakeState&&(this.hasFakeState=!1,n.history.back())}),this.store=t;let n=Im.getWindow();n.history.pushState(n.history.state,``),this.hasFakeState=!0,n.addEventListener(`popstate`,this.onPopState)}destroy(){Im.getWindow().removeEventListener(`popstate`,this.onPopState),this.hasFakeState&&Im.getWindow().history.back()}}var Rm=require(`@vkontakte/videoplayer-shared/es2018`);class zm{constructor(){e(this,`maxQuality`,Rm.videoHeightToQuality(Rm.getWindow().document.body.offsetHeight*Rm.getWindow().devicePixelRatio)||Rm.VideoQuality.INVARIANT)}isCodecSupported(e){return this.maxQuality===Rm.VideoQuality.INVARIANT?!0:Rm.isLowerOrEqual(e,this.maxQuality)}}var Bm={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:hu.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1};class Vm{constructor(t,n={},r=hu.getWindow().document.body){var i,a,o;if(e(this,`parentNode`,void 0),e(this,`fatalError$`,new hu.ValueSubject(null)),e(this,`subscription`,new hu.Subscription),e(this,`svelteStubComponent`,void 0),e(this,`svelteRootComponent`,void 0),e(this,`svelteErrorComponent`,void 0),e(this,`videoConfig`,void 0),e(this,`uiConfig`,void 0),e(this,`statisticsConfig`,void 0),e(this,`statistics`,void 0),e(this,`store`,void 0),e(this,`playerId`,void 0),e(this,`coreConfig`,void 0),e(this,`metaConfig`,void 0),e(this,`internalsExposure`,null),e(this,`logger`,void 0),e(this,`log`,void 0),e(this,`status`,`Not initialized`),e(this,`backButtonService`,void 0),e(this,`createOneStat`,e=>{if(!this.videoConfig)return;let{albumId:t,statPlace:n,statUserSalt:r,statTrackCode:i,statVKAppId:a,refreshStatAuthToken:o,autoplay:s,isTouch:c,refDomain:l,deviceId:u}=this.videoConfig,{unitedVideoId:d,isClip:f=!1}=e;if(this.uiConfig.features.statistics&&d)try{return new Nu.OneStat({movieId:d,albumId:t,place:n,trackCode:i,vkAppId:a,autoplay:s??!1,mobile:c,clip:f,refDomain:l,deviceId:u,isPreviewPlayerView:!1},{refreshAuthToken:o,userSalt:r,config:this.statisticsConfig})}catch(e){console.error(e)}}),hu.getWindow()!==top)throw Error(`Must run in top frame`);if(this.logger=new hu.Logger,this.log=this.logger.createComponentLog(`VKVideoPlayer`),this.parentNode=r,this.parentNode.className=`vk-vp-tv-parentNode`,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Jc(Au,{target:this.parentNode}))}),!Array.isArray(t.videos)||t.videos.length===0){var s,c;let e=Error(`empty videos`);this.fatalError$.next(e),(s=t.callbacks)==null||(c=s.onCrashed)==null||c.call(s,e.message);return}else this.fatalError$.next(null);this.uiConfig=fu(n.ui??{}),this.videoConfig=ju(Bm,hu.cloneDeepWith(t)),(i=this.videoConfig).autoplay&&(i.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,(a=this.videoConfig).canRewindLive&&(a.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,hu.devNull.push(Mu,{key:`videoplayer_embed`,strings:[`new`,`player_init_player`],numbers:[hu.now()]}),this.statisticsConfig=n.statistics??{},this.playerId=hu.getPlayerId(t.playerId),this.uiConfig=fu(n.ui??{}),this.coreConfig=n.core??{},this.metaConfig=n.meta;let l=this.videoConfig.videos[0],{statAuthToken:u,preload:d,autoplay:f,volume:p,muted:m,fromTime:h,supportLink:g,interfaceLanguage:_,isCyrillicRelatedInterface:v,isAudioDisabled:y,isLiveCatchUpMode:b,failoverHosts:x,canDownload:S,callbacks:C,saveRate:w,volumeMultiplier:T,mediascopePixels:E}=this.videoConfig,{sources:D,unitedVideoId:O,previewThumbsData:k,subtitles:A,subtitlesForcedLanguage:j,live:M,adsExternalApi:ee}=l;if(!D&&!M){var N;let e=Error(`empty sources and live`);this.fatalError$.next(e),C==null||(N=C.onCrashed)==null||N.call(C,e.message);return}let te=this.createOneStat(l),ne=this.createThinOneStat(l),re;E&&(re=new Nu.MediascopePixel({pixels:E})),(te||ne)&&(this.statistics=new Fu(te,ne,re)),this.store=Hf({interfaceLanguage:_,isCyrillicRelatedInterface:v,videoId:O,isLiveCatchUpMode:b,isAudioDisabled:y,statAuthToken:u,callbacks:C,previewThumbsData:k,canDownload:S,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:w,internalsExposure:this.internalsExposure,statistics:this.statistics,playerId:this.playerId,app:this,video:l,deviceCapabilities:new zm});let ie={sources:D,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,subtitles:A,subtitlesForcedLanguage:j,live:M,preload:d,autoplay:f,muted:m,volume:p,fromTime:h,supportLink:g,showAds:!1,failoverHosts:x,saveRate:w,volumeMultiplier:T,adsExternalApi:ee,getVideoDeeplink:this.videoConfig.getVideoDeeplink};this.svelteRootComponent=Jc(Fm,{target:this.parentNode,props:ie}),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&&!((o=this.videoConfig)==null||(o=o.callbacks)==null)&&o.onDevNullLog?hu.devNull.subscribe(Mu,this.videoConfig.callbacks.onDevNullLog):hu.devNull.destroy(Mu),this.backButtonService=new Lm(this.store),this.status=`Normal`}destroy(){var e;this.status!==`Destroyed`&&(this.backButtonService.destroy(),this.status=`Destroyed`,this.subscription.unsubscribe(),this.internalsExposure?.destroy(),hu.devNull.destroy(Mu),(e=this.store)==null||(e=e.getPlayer())==null||e.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.unmountComponent(this.svelteStubComponent),hu.getWindow().history.back())}createThinOneStat(e){if(!this.videoConfig)return;let{deviceId:t,preload:n,refreshStatAuthToken:r}=this.videoConfig,{unitedVideoId:i}=e;if(this.uiConfig.features.thinStatistics&&i)return new Nu.ThinOneStat.ThinOneStat({deviceId:t,movieId:i,preload:n,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r})}unmountComponent(e){e&&Qc(e)}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}setLiveStart(e){let t=this.isLiveTailPlaying();this.log({message:`live started: liveTailPlaying = ${t}`}),!t&&(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){this.log({message:`live waiting`}),this.store?.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){let e=this.store?.getPlayer();if(!e)return!1;let{info:t}=e;return t.canPlayLiveTailBuffer$.getValue()&&!t.isStalled$.getValue()&&!t.atLiveEdge$.getValue()}createPlayer(e,t={},n){}setLiveWaitingRecover(e=!1){let t=this.isLiveTailPlaying(),n=e||!t;this.log({message:`live waiting recover: forceImmediate = ${e}, liveTailPlaying = ${t}`});let r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};n&&r(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{n||r(),this.store?.destroy()})}setLiveWaitingRecord(){let e=this.isLiveTailPlaying(),t=!e;this.log({message:`live waiting record: liveTailPlaying = ${e}`});let n=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};t&&n(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{t||n(),this.store?.destroy()})}setLiveEnd(e){let t=this.isLiveTailPlaying(),n=!t;this.log({message:`live ended: liveTailPlaying = ${t}`});let r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(n){r();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=r)}}var Hm=require(`@vkontakte/videoplayer-shared/es2018`),Um=require(`@vkontakte/videoplayer-core/es2018`);
|