@vkontakte/videoplayer-tv 1.0.4-dev.84183efb.0 → 1.0.4-dev.92f6f050.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 +55 -46
- package/es2018.esm.js +55 -46
- package/es2024.cjs +50 -41
- package/es2024.esm.js +50 -41
- package/esnext.cjs +50 -41
- package/esnext.esm.js +50 -41
- package/evergreen.esm.js +50 -41
- package/package.json +4 -4
- package/types/VKVideoPlayerTv/HTMLElement.d.ts +1 -1
- package/types/VKVideoPlayerTv/index.svelte.d.ts +94 -94
- package/types/components/Ads/admanWrapper.d.ts +75 -75
- package/types/components/Ads/types.d.ts +26 -26
- 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/Root/types.d.ts +49 -49
- 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/statistics.d.ts +13 -13
- package/types/store/index.d.ts +207 -207
- 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 +199 -199
- 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,61 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-tv v1.0.4-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-tv v1.0.4-dev.92f6f050.0
|
|
3
|
+
* Thu, 05 Mar 2026 15:36:31 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-4/doc/
|
|
5
5
|
*/
|
|
6
|
-
"use strict";var Eu=Object.create;var Sn=Object.defineProperty;var Tu=Object.getOwnPropertyDescriptor;var Mu=Object.getOwnPropertyNames;var wu=Object.getPrototypeOf,Su=Object.prototype.hasOwnProperty;var as=t=>{throw TypeError(t)};var Iu=(t,e,i)=>e in t?Sn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Nu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Du=(t,e)=>{for(var i in e)Sn(t,i,{get:e[i],enumerable:!0})},ss=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Mu(e))!Su.call(t,o)&&o!==i&&Sn(t,o,{get:()=>e[o],enumerable:!(n=Tu(e,o))||n.enumerable});return t};var Lu=(t,e,i)=>(i=t!=null?Eu(wu(t)):{},ss(e||!t||!t.__esModule?Sn(i,"default",{value:t,enumerable:!0}):i,t)),ku=t=>ss(Sn({},"__esModule",{value:!0}),t);var qt=(t,e,i)=>Iu(t,typeof e!="symbol"?e+"":e,i),ls=(t,e,i)=>e.has(t)||as("Cannot "+i);var Nt=(t,e,i)=>(ls(t,e,"read from private field"),i?i.call(t):e.get(t)),ao=(t,e,i)=>e.has(t)?as("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),so=(t,e,i,n)=>(ls(t,e,"write to private field"),n?n.call(t,i):e.set(t,i),i);var sd=Nu(()=>{"use strict";AdmanHTML=function(){"use strict";function t(_){_&&typeof _=="string"&&new AdmanHTML.OpenLinkPopupRender(O).open(_)}function e(_){Me.initMode(_.slot?"slot":"json",{slot:_.slot,version:O.version}),O.slotId=_.slot,O.playerEl=_.playerEl,O.wrapper=_.wrapper,O.videoEl=_.videoEl,O.audioEl=_.audioEl,O.clickEl=_.clickEl,O.quality=parseInt(_.videoQuality||_.params&&_.params.videoQuality||360,10),O.browser=_.browser||{},O.config=_.config||{},O.pauseOnHide=_.pauseOnHide||!1,O.viewabilityValue=_.viewabilityValue||.5,O.viewabilityEl=_.viewabilityEl||O.videoEl,O.disclaimer=_.disclaimer!==!1,O.callToActionButton=_.callToActionButton!==!1,O.forcePreloadAdditionalData=!!_.forcePreloadAdditionalData,O.ctaStyles=_.ctaStyles,O.pause=f,O.resume=l,O.openPopup=t;var Q=AdmanHTML.Utils.getPageLocation(),ie=AdmanHTML.Utils.getHostname(Q||""),Re=AdmanHTML.Utils.isMobile(navigator.userAgent||navigator.vendor||window.opera);AdmanHTML.Utils.isElement(O.videoEl)&&Re&&O.videoEl.setAttribute("playsinline",""),O.location={top:Q,topEncoded:encodeURIComponent(Q||""),hostname:ie,hostnameEncoded:encodeURIComponent(ie||"")},Me.rb(Me.code.ADMAN_SUCCESSFULLY_INITIALIZED),O.stats.metrics("initing"),T=_.midrollPointsP||null,Ue=!T&&_.midrollPoints?_.midrollPoints:null,O.config.vpaidJsInterface||(O.config.vpaidJsInterface=le),O.config.vpaidHtmlInterface||(O.config.vpaidHtmlInterface=me);var Le="https://ad.mail.ru/vp/"+O.slotId+"?app_name=admanhtml&version="+this.getVersion();if(_.params&&_.params.constructor&&_.params.constructor===Object){var it=[];"flash"in _.params||(_.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var Ke in _.params)_.params.hasOwnProperty(Ke)&&it.push(Ke+"="+_.params[Ke]);var st=AdmanHTML.Utils.getUserIdQuery();st&&it.push(st),it.length&&(Le+="&"+it.join("&"))}if((O.slotId||_.json||_.adUrl)&&!O.browser.adBlock){var et={},ci=this;O.slotId?et.url=Le:_.adUrl?(_.adUrl.indexOf("ad.mail.ru/")!==-1&&(_.adUrl+=_.adUrl.indexOf("?")===-1?"?":"&",_.adUrl+="version="+this.getVersion()),et.url=_.adUrl):et.data=_.json,de=new AdmanHTML.AdSlot(O,et,function(){var pi=de.getRootSettings()||{},_i=pi.requestHostname;if(_i&&!AdmanHTML.Utils.matchHostname(O.location.hostname,_i,z))return O.stats.logError("HOSTNAME_MISMATCH:"+_i+":"+O.location.topEncoded,{impressionID:pi.impressionID,padID:pi.padID,bannerIDs:pi.bannerIDs}),void(O.callbacks.onError&&O.callbacks.onError());O.location.hostname||O.stats.logError("HOSTNAME_EMPTY:"+_i+":"+O.location.topEncoded),O.cb("onReady",[{settings:de.settings}]);var Pi=1e6,Di=[],Qe=[],ze=_.params&&_.params.duration?parseInt(_.params.duration,10):Pi;ze===0&&(ze=Pi),Ue&&Ue.sort(AdmanHTML.Utils.numSorter),T&&T.sort(AdmanHTML.Utils.numSorter);var nt=de.getSection("midroll")||[],er=de.getServices("midroll",function(xt){return!xt.started()&&xt.isAfter()})||[];nt=nt.concat(er),nt.forEach(function(xt){var Xe=xt.getAd();Xe.point||Xe.pointP||(Xe.pointP=50)}),nt.sort(function(xt,Xe){var Ji=xt.getAd(),Xi=Xe.getAd();return Ji.pointP&&Xi.pointP?Ji.pointP-Xi.pointP:(Ji.point||Ji.pointP/100*ze)-(Xi.point||Xi.pointP/100*ze)}).forEach(function(xt){if(!xt.isEmpty||!xt.isEmpty()){var Xe=xt.getAd();Ue&&Ue.length?(Xe.point=Ue.shift(),Xe.pointP=null,Qe.push(Xe.point),xt.addImmutableProperty("point",Xe.point)):T&&T.length?(Xe.pointP=T.shift(),Xe.point=null,Di.push(Xe.pointP),xt.addImmutableProperty("pointP",Xe.pointP)):Ue||T||(Xe.point?(xt.addImmutableProperty("point",Xe.point),Qe.push(Xe.point)):Xe.pointP&&(xt.addImmutableProperty("pointP",Xe.pointP),Di.push(Xe.pointP)))}}),L=Di.sort(AdmanHTML.Utils.numSorter),S=Qe.sort(AdmanHTML.Utils.numSorter);var Zi=de.getSection("research");Zi&&Zi.length>0&&(De=Zi[0]),O.pauseOnHide&&Ee(ci)})}else{Me.logError("Adman init failed");var Gt=O.callbacks.onError;Gt&&Gt(),B=_e=Y=null}}function i(_,Q){Q=Q||!1;var ie;if(B&&(B.log("sectionShown"),B.disposed||(B.dispose(),B.disposed=!0,N(B,Y)),_&&B.log("closedByUser")),Y&&!fe[Y]&&(fe[Y]=Y!=="midroll",ie=_?O.callbacks.onClosed:O.callbacks.onCompleted),$e[Y]&&_e&&($e[Y]=$e[Y].concat(_e.splice(0,_e.length))),B=_e=Y=null,d(),typeof Q=="object"&&Q.force===!0)return void((ie=O.callbacks.onError)&&ie(Q.message));ie&&ie()}function n(_){var Q=de.getSettings(Y).maxBannersShow||0,ie=Ie[Y]||0,Re=!Q||ie<Q;if(B&&!B.disposed&&(B.complete&&B.log("playbackCompleted"),B.dispose(),B.disposed=!0,N(B,Y)),_e&&_e.length&&Re)B=_e.shift(),Ie[Y]=ie+(B.isEmpty()?0:1),B.reset(),B.started=!0,B.start();else{var Le=de.getNextAfterService(Y);Y!=="midroll"&&Le&&Re?Le.start(function(){_e=de.getSection(Y),n()}):de.getSettings(Y).loop&&$e[Y]&&$e[Y].length?(_e=$e[Y],$e[Y]=[],n()):i(!1,_)}}function o(_){_e||(Y=_||"preroll",de.resetServices(Y),fe[Y]=!1,_e=de.getSection(Y),_==="midroll"&&(_e=c(_e)),n(),Y&&($e[Y]=$e[Y]||[]),B&&(B.log("sectionStarted"),O.debugMode&&console.log(Y,B.getAd(),B.getSettings(),_e)),a(Y),O.stats.metrics("started"))}function a(_){(je=de.getDebug(_))&&je.start()}function d(){je&&je.dispose(),je=null}function r(_,Q){function ie(Qe,ze){for(var nt=0;nt<Qe.length&&!(Math.abs(Qe[nt])>ze);nt++);return nt>0?[Qe[nt-1]]:[]}function Re(Qe){var ze=Qe.getAd();return!(ze.point&&S.indexOf(ze.point)===-1||ze.pointP&&L.indexOf(ze.pointP)===-1)&&(ze.point&&ze.point<=pi||ze.pointP&&ze.pointP<=_i)}function Le(){R=L.reduce(function(Qe,ze){var nt=Math.ceil(Q*ze/100);Qe.indexOf(nt)===-1&&Qe.push(nt)},S).sort(AdmanHTML.Utils.numSorter)}function it(Qe){return R.reduce(function(ze,nt){return ze===0&&nt>0&&nt-Qe>=0?nt-Qe:ze},0)}if(!isNaN(_)&&!isNaN(Q)){var Ke=parseInt(_),st=Math.floor(100*_/Q);ue=Q,te=L&&isFinite(st)?ie(L,st):[],se=S?ie(S,Ke):[],te[0]&&se[0]&&(Math.abs(te[0]*ue/100)>Math.abs(se[0])?se=[]:te=[]);var et=typeof de=="object"&&typeof de.getSettings=="function"?de.getSettings("midroll").midpointAllowableDelta:void 0;E=et!=null?et:E;var ci=100*E/Q,Gt=E!==0&&E<5?E:5,pi=Ke+Gt,_i=st+Gt/Q*100;if(de.getServices("midroll",function(Qe){return!(!Qe.isAfter()||Qe.started()||!Re(Qe))}).forEach(function(Qe){var ze=Ke-Qe.getAd().point,nt=st-Qe.getAd().pointP;ze<E||nt<ci||E===0?Qe.start():O.debugMode&&console.log("skip midroll fetch")}),te.length&&te[0]>0||se.length&&se[0]>0){var Pi=!1,Di=de.getSection("midroll");Di&&Di.forEach(function(Qe){var ze=Qe.getAd();(ze.pointP&&~te.indexOf(ze.pointP)||ze.point&&~se.indexOf(ze.point))&&(Pi=!0)}),Pi&&O.cb("adMidrollPoint",[_])}return O.forcePreloadAdditionalData?(Le(),it(_)):void 0}}function c(_){function Q(Re,Le){var it=Re.getAd(),Ke=Le.getAd();return(it.point||it.pointP*ue/100)-(Ke.point||Ke.pointP*ue/100)}var ie=[];return _&&_.forEach(function(Re){var Le=Re.getAd();(Le.pointP&&~te.indexOf(Le.pointP)||Le.point&&~se.indexOf(Le.point))&&ie.push(Re)}),S.forEach(function(Re,Le){~se.indexOf(Re)&&(S[Le]=-S[Le])}),L.forEach(function(Re,Le){~te.indexOf(Re)&&(L[Le]=-L[Le])}),ie.sort(Q),ie}function h(){O.cb("onSkipped"),B&&(B.log("closedByUser"),B.skip(n))}function f(){B&&(B.log("playbackPaused"),B.pause())}function l(_){B&&(_||B.log("playbackResumed"),B.resume())}function u(_){_=_<0?0:_>1?1:_,B&&B.setVolume(_)}function v(){B&&B.log("fullscreenOn")}function b(){B&&B.log("fullscreenOff")}function y(){i()}function g(_,Q){O.callbacks[_]=Q}function C(_){var Q=[],ie=de.getSection(_||"preroll");return ie&&ie.forEach(function(Re){Re.isEmpty()||Q.push(Re.getExtendedAdForApp())}),Q}function D(_){return de.getAfterServices(_||"preroll")}function N(_,Q){_.isEmpty()||_.isStat()||$e[Q]&&$e[Q].push(_)}function w(_){return(_.right-_.left)*(_.bottom-_.top)}function A(_,Q){return{left:_.left+Q.left,right:_.right+Q.left,top:_.top+Q.top,bottom:_.bottom+Q.top}}function M(_){return _&&!isNaN(_)?_:null}function I(_,Q){var ie=_.document,Re=Q==="width"?"clientWidth":"clientHeight",Le=Q==="width"?"innerWidth":"innerHeight",it=_[Le],Ke=ie.body[Re],st=ie.documentElement[Re],et=1/0;return et=M(Ke)||et,et=M(st)||et,it&&!isNaN(it)&&(et=Math.min(et,it)),et}function m(_){return{width:I(_,"width"),height:I(_,"height")}}function U(_,Q){var ie=m(Q);return{left:Math.max(0,_.left),right:Math.min(ie.width,_.right),top:Math.max(0,_.top),bottom:Math.min(ie.height,_.bottom)}}function x(_,Q){try{for(var ie=_.getBoundingClientRect(),Re=w(ie),Le=Q,it=Le.parent;Le!==it;){var Ke=Le.frameElement.getBoundingClientRect();ie=A(ie,Ke);var st=Math.max(Ke.left,ie.left),et=Math.min(Ke.right,ie.right),ci=Math.max(Ke.top,ie.top),Gt=Math.min(Ke.bottom,ie.bottom);ie.left=st,ie.right=et<st?st:et,ie.top=ci,ie.bottom=Gt<ci?ci:Gt,Le=Le.parent}ie=U(ie,it);var pi=w(ie);return{left:ie.left,right:ie.right,top:ie.top,bottom:ie.bottom,percent:pi/Re*100}}catch(_i){return{left:0,right:0,top:0,bottom:0,percent:0}}}function P(){return window.hasOwnProperty("IntersectionObserver")}function k(_){try{if(_===_.top)return"ON_PAGE";for(var Q=_;Q!==Q.parent;){if(Q.document.domain!==Q.parent.document.domain)return"XD_FRAME";Q=Q.parent}return"S_FRAME"}catch(ie){}return"XD_FRAME"}function Z(_){return!P(_)&&k(_)!=="XD_FRAME"}function ae(_,Q,ie){J(ie,x(_,window).percent>=100*Q)}function V(_){return _.mozVisibilityState?"mozvisibilitychange":_.webkitVisibilityState?"webkitvisibilitychange":_.visibilityState?"visibilitychange":""}function G(_){J(_,!0)}function F(_){J(_,!1)}function J(_,Q){var ie=_.getPlayStatus();_.prevVisibility!==Q&&(_.prevVisibility=Q,ie.curStatus!==void 0&&ie.curStatus!==ie.prevStatus&&(Q?_.resume():_.pause()))}function Ee(_){var Q=_,ie=O.viewabilityValue,Re=O.viewabilityEl;if(Re){if(P()){var Le=new IntersectionObserver(function(st){st.forEach(function(et){J(Q,et.intersectionRatio>=ie)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});Le.observe(Re)}else if(Z){var it=function(){ae(Re,ie,Q)};window.addEventListener("resize",it,!1),window.addEventListener("scroll",it,!1)}}var Ke=(V(document),X.hasFocus());setInterval(function(){var st=X.hasFocus();Ke!==st&&(Ke=st,Ke?G(Q):F(Q))},500)}function ee(){return O.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:O.playStatus}var de,Y,_e,B,je,De,ue,O={version:"2.2.57",debugMode:!0,callbacks:{},cb:function(_,Q){switch(_){case"onCompleted":B&&(B.complete=!0),n();break;case"onError":B&&(B.error=!0),n(Q);break;case"onClosed":i(!0);break;default:var ie=O.callbacks[_];ie&&ie.apply(this,Q)}}},pe=window.location.protocol==="http:"?"http:":"https:",le=pe+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",me=pe+"//ad.mail.ru/static/rbadman-vpaid.html",Me=new AdmanHTML.Stats(O),Se=new AdmanHTML.Viewability,Ue=[],T=[],S=[],L=[],R=[],te=[],se=[],Ie={},$e={},E=3,z=function(){for(var _=window,Q=frameElement;Q;){try{Q=_.parent.frameElement}catch(ie){break}_=_.parent}return _}(),X=z.document;O.stats=Me,O.viewability=Se,O.protocol=pe,O.stats.metrics();var fe={};return{init:e,start:o,stop:y,pause:f,resume:l,setVolume:u,fullscreenOn:v,fullscreenOff:b,setFullscreen:function(_){_?v():b()},skip:h,destroy:y,getPlayStatus:ee,getSlot:function(){return O.slotId},setSlot:function(_){O.slotId=_},getVersion:function(){return O.version},getBannersForSection:C,getServicesForSection:D,hasSection:function(_){return _=_||"preroll",!(!C(_).length&&!D(_).length)},setDebug:function(_){O.debugMode=_},setPosition:r,getUserIdQuery:AdmanHTML.Utils.getUserIdQuery,onReady:g.bind(this,"onReady"),onError:g.bind(this,"onError"),onStarted:g.bind(this,"onStarted"),onPaused:g.bind(this,"onPaused"),onPlayed:g.bind(this,"onPlayed"),onCompleted:g.bind(this,"onCompleted"),onClosed:g.bind(this,"onClosed"),onSkipped:g.bind(this,"onSkipped"),onClicked:g.bind(this,"onClicked"),onTimeRemained:g.bind(this,"onTimeRemained"),onDurationChanged:g.bind(this,"onDurationChanged"),adMidrollPoint:g.bind(this,"adMidrollPoint"),_onVPAIDStarted:g.bind(this,"onVPAIDStarted"),research:{pause:function(){De&&De.pause()},resume:function(){De&&De.resume()},complete:function(){De&&De.setComplete()},setVolume:function(_){De&&De.setVolume(_)},setFullscreen:function(_){De&&De.setFullscreen(_)},setPosition:function(_,Q){De&&De.setPosition(_,Q)}}}},AdmanHTML.Ad=function(t,e){"use strict";function i(w){w&&w.forEach(function(A){n(A.url,A.type,A)})}function n(w,A,M){var I,m,U,x;if(w){try{w=decodeURIComponent(w)}catch(G){}if(A==="playheadReachedValue")M.thresholdValue!==void 0||M.value!==void 0?(I=parseInt(M.thresholdValue||M.value,10),e.stats.push({name:"thresholdValue",value:I,type:"thresholdValue."+I,url:w})):M.thresholdPValue===void 0&&M.pvalue===void 0||(I=parseInt(M.thresholdPValue||M.pvalue,10),e.stats.push({name:"thresholdPValue",value:I,type:"thresholdPValue."+I,url:w}));else if(A==="playheadViewabilityValue"){var P=parseInt(M.viewablePercent,10),k=M.ovv===void 0&&M.mrc===void 0||!!M.ovv||!!M.mrc,Z="";U=M.startTimer!==void 0?parseInt(M.startTimer,10):0,x=M.endTimer!==void 0?parseInt(M.endTimer,10):0,P=isNaN(P)?50:P,M.value!==void 0?(I=parseInt(M.value,10),m="ovvValue"):M.pvalue!==void 0?(I=parseInt(M.pvalue,10),m="ovvPValue"):M.duration!==void 0&&(I=parseInt(M.duration,10),m="mrcValue",k||(Z=M.unload?"unload":"complete"));var ae={name:m,value:I,url:w,percent:P,viewable:k,start:U,end:x,onevent:Z};"target"in M&&(ae.target=M.target),e.stats.push(ae)}else if(A==="playheadTimerValue"){U=M.startTimer!==void 0?parseInt(M.startTimer,10):0,x=M.endTimer!==void 0?parseInt(M.endTimer,10):0;var V=M.rate!==void 0?parseInt(M.rate,10):1;e.stats.push({name:"timerValue",rate:V,url:w,start:U,end:x})}else e.stats.push({name:A,type:A,url:w})}}function o(w){e.click=w,e.ad&&(e.ad.urlToNavigateOnClick=w)}function a(w,A){e.extensions[w]=A}function d(w,A,M){!M&&w in e.immutables||(e.immutables[w]=A)}function r(w){e.settings=e.settings||{},AdmanHTML.Utils.deepExtend(e.settings,w)}function c(w){function A(x){var P=x.type||"";return!(~P.indexOf("video")&&P!=="video/mp4"||~P.indexOf("audio")&&P!=="audio/mp3"&&P!=="audio/mpeg")}function M(){t.stats.rb(t.stats.code.UNKNOWN_ADV_TYPE),t.stats.logError("UNKNOWN_ADV_TYPE")}if(e.ad=w,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 I;e.ad.mediafiles.forEach(function(x){A(x)&&(!I||Math.abs(parseInt(x.height)-t.quality)<Math.abs(parseInt(I.height)-t.quality))&&(I=x)}),I&&AdmanHTML.Utils.mixin(e.ad,I)}delete e.ad.statistics,delete e.ad.mediafiles;var m,U;switch(e.ad.type){case"swf":case"application/x-shockwave-flash":if(U=e.ad.apiFramework||e.ad.api,t.browser.mobile||U&&U!=="VPAID")return M(),!1;m=U?new AdmanHTML.VpaidSwfAdRenderer(t,this):new AdmanHTML.SwfAdRenderer(t,this);break;case"javascript":case"application/javascript":if((U=e.ad.apiFramework||e.ad.api)&&U!=="VPAID")return M(),!1;m=new AdmanHTML.VpaidJsAdRenderer(t,this);break;case"video":case"video/mp4":m=new AdmanHTML.VideoAdRenderer(t,this);break;case"audio":case"audio/mp3":case"audio/mpeg":m=new AdmanHTML.AudioAdRenderer(t,this);break;case"image":case"image/bmp":case"image/gif":case"image/jpeg":case"image/png":m=new AdmanHTML.ImgAdRenderer(t,this);break;case"text":m=new AdmanHTML.TextAdRenderer(t,this);break;case"html":m=new AdmanHTML.HtmlAdRenderer(t,this);break;case"empty":m=new AdmanHTML.EmptyAdRenderer(t,this);break;case"statistics":m=new AdmanHTML.StatisticsAdRenderer(t,this);break;case"debugData":m=new AdmanHTML.DebugAdRenderer(t,this);break;case"research":m=new AdmanHTML.ResearchAdRenderer(t,this);break;case"video/x-flv":default:return M(),!1}return e.renderer=m,!0}function h(){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(w,A,M){var I=w.url;I=I.replace("{requesthostname}",t.location.hostnameEncoded||""),AdmanHTML.Utils.loadImg(I);var m=A.indexOf(w);~m&&M&&A.splice(m,1)}function u(w,A){var M=A.indexOf(w);~M&&A.splice(M,1)}function v(w,A){function M(k){k=25*Math.floor(k/25);var Z=N["thresholdPValue."+k];Z&&(x=x.concat(Z))}var I=e.stats.slice(0);if(Array.isArray(w)){var m;for(m=0;m<w.length&&!~I.findIndex(function(k){return k.name===w[m]});m++);w=w[m]||w.slice(-1)}if(!t.isPopupOpen||w!=="playbackPaused"&&w!=="playbackResumed"){var U=w+(A===void 0?"":"."+A),x=N[U]?N[U].slice(0):[];x.push(U),w==="thresholdPValue"&&M(A);var P=w==="thresholdPValue"||w==="thresholdValue"||w==="closedByUser";e.stats.forEach(function(k){(w==="thresholdPValue"&&k.name==="thresholdPValue"&&k.value<A||w==="thresholdValue"&&k.name==="thresholdValue"&&k.value<A)&&l(k,I,P),~x.indexOf(k.type)&&l(k,I,P)}),e.stats=I}}function b(w,A){function M(P,k){k[Math.ceil(P.percent/10)].duration>=1e3*P.value?P.viewable?l(P,m,!0):u(P,m):U++}function I(P){P.viewable||P.onevent===A&&l(P,m,!0)}var m=e.stats.slice(0),U=0,x=w&&w.length?M:I;return e.stats.forEach(function(P){P.name==="mrcValue"&&x(P,w)}),e.stats=m,U}function y(w,A){var M,I,m=e.stats.slice(0);e.stats.forEach(function(U){(U.name==="ovvValue"&&U.value<=w||U.name==="ovvPValue"&&U.value<=A)&&(M=M||t.viewability.getViewabilityState(),I=M.percent>U.percent&&M.focus,M.state!=="UNDETERMINED"&&(I&&U.viewable||!I&&!U.viewable)&&AdmanHTML.Utils.loadImg(U.url),u(U,m))}),e.stats=m}function g(w,A){e.renderer&&e.renderer[w]&&e.renderer[w](A)}function C(){var w={};return w=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(w,e.ad),w}function D(){var w=C();return w.statistics=e.stats.slice(0),w}e=e||{stats:[],extensions:{},immutables:{}};var N={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:o,addExtension:a,addImmutableProperty:d,addSettings:r,getSettings:function(){return e.settings},addAd:c,getAd:function(){return e.ad},getAdForApp:C,getExtendedAdForApp:D,isEmpty:function(){return e.ad.type==="empty"},isStat:function(){return e.ad.type==="statistics"},clone:h,reset:f,log:v,logMRC:b,logOVV:y,start:g.bind(this,"start"),dispose:g.bind(this,"dispose"),pause:g.bind(this,"pause"),resume:g.bind(this,"resume"),setVolume:g.bind(this,"setVolume"),setFullscreen:g.bind(this,"setFullscreen"),setComplete:g.bind(this,"setComplete"),skip:g.bind(this,"skip"),setPosition:function(w,A){e.renderer&&e.renderer.setPosition&&e.renderer.setPosition(w,A)},complete:!1,error:!1}},AdmanHTML.AdSlot=function(t,e,i){"use strict";function n(x){D||(D={});for(var P in x)x.hasOwnProperty(P)&&(D[P]=x[P])}function o(x,P,k,Z,ae,V){function G(J){t.stats.metrics("inited");var Ee={};--w,J&&(A++,J=typeof J=="string"?J.trim():J,typeof J=="object"||J.charAt(0)==="{"?(Ee=r(J,x,P,k||0,Z,ae,V),M++):J.charAt(0)==="<"?(Ee=c(J,x,P,k||0,Z,ae,V),M++):(t.stats.rb(t.stats.code.UNKNOWN_DATA_FORMAT),t.stats.logError("UNKNOWN_DATA_FORMAT"))),x.id&&(Ee.banners||Ee.services?Ee.banners&&U.markNonEmptyService(x.id):U.markEmptyService(x.id)),a(V)}if(k&&k>4)return void a(V);var F=U.getService(x.id);F&&F.log("serviceRequested"),++w,x.url?(x.url.indexOf("ad.mail.ru/")!==-1&&x.url.indexOf("version="+t.version)===-1&&(x.url+=x.url.indexOf("?")===-1?"?":"&",x.url+="version="+t.version),AdmanHTML.Utils.xhr(x.url,G)):x.data&&setTimeout(G,0,x.data)}function a(x){if(!w){if(A&&M){var P=U.getNextOnEmptyService();if(P)return void P.start(a.bind(null,x));b();var k=x||i;return k.called||(k.called=!0,k()),void(t.debugMode&&console.log(g))}d()}}function d(){var x=t.callbacks.onError;x&&x()}function r(x,P,k,Z,ae,V,G){function F(ue){return ue?ue.filter(function(O){return O.type&&(O.type==="sectionShown"||O.type==="sectionStarted"||O.type==="sectionEmpty")}):[]}function J(ue,O,pe,le){var me=k?k.clone():new AdmanHTML.Ad(t);if(me.addStatCollection(ue.statistics),me.addStatCollection(ue.serviceStatistics),ue.type==="additionalData"){var Me;ue.id=ue.id||AdmanHTML.Utils.createIntUID(),de.services++;var Se=!g[pe]||g[pe].length===0;if(O>0&&Se&&(m[pe]=!0),ue.extensions)for(var Ue in ue.extensions)ue.extensions.hasOwnProperty(Ue)&&h(me,ue.extensions[Ue],Ue);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function(L){L in ue&&me.addImmutableProperty(L,ue[L])}),t.forcePreloadAdditionalData||ue.doAfter!=="true"&&ue.doAfter!==!0&&!ue.doOnEmptyResponseFromId)Me=new AdmanHTML.ServiceAd(t),l(pe,P.id,Me,ue),O===0&&Se?o(ue,me,Z+1,pe,I.PRE,G):o(ue,me,Z+1,pe,null,G);else{var T=ue.doAfter==="true"||ue.doAfter===!0?I.POST:null,S=function(L,R){o(ue,L||me,ue.allowRepeat?0:Z+1,pe,T,function(){R&&R()})};Me=new AdmanHTML.ServiceAd(t,null,S),l(pe,P.id,Me,ue,me)}}else f(pe,le,me,ue),de.banners++;return me}var Ee,ee=x,de={banners:0,services:0};if(typeof x=="string")try{ee=JSON.parse(x)}catch(ue){return t.stats.rb(t.stats.code.ERROR_CONVERTING_STRING_TO_JSON),void t.stats.logError("ERROR_CONVERTING_STRING_TO_JSON")}if(ee.settings&&ee.settings.requestHostname&&!D.requestHostname&&(D.requestHostname=ee.settings.requestHostname),ee&&ee.settings&&(D=t.slot&&t.slot.getRootSettings()||D||{},n&&typeof n=="function")){var Y=ee.sections&&ee.sections.preroll&&ee.sections.preroll.length&&ee.sections.preroll[0]||null;n({impressionID:ee.settings.impressionID||"",padID:ee.settings.padID||"",bannerIDs:Y&&Y.bannerID||""})}for(var _e in ee.sections)if(ee.sections.hasOwnProperty(_e)){var B=ee.sections[_e],je=0;if(ee.settings&&(Ee=ee.settings[_e])&&(Ee.controlsStyle=ee.settings.controlsStyle||0,v(_e,Ee)),B.forEach(function(ue){if(ue.type==="debugData"){var O=new AdmanHTML.Ad(t);return O.addClick(ue.url),void u(_e,O,ue)}var pe=ae===_e?V:"",le=J(ue,je,_e,pe);Ee&&(le.addStatCollection(F(Ee.statistics)),le.addSettings(Ee)),je++}),B.length===0){var De=new AdmanHTML.Ad(t);Ee&&De.addStatCollection(F(Ee.statistics)),f(_e,"",De,{type:"empty"})}}return ee.type&&J(ee,0,ae,V),de}function c(x,P,k,Z,ae,V,G){function F(B,je,De){Ee(B.getElementsByTagName(je),De)}function J(B,je,De,ue){F(B,je,function(O){ue(de(O),De?ee(O,De):null,O)})}function Ee(B,je){Array.prototype.forEach.call(B,je.bind(this))}function ee(B,je){var De=B.attributes.getNamedItem(je);return De?De.value:null}function de(B){return B&&B.childNodes&&B.childNodes[0]&&B.childNodes[0].wholeText?B.childNodes[0].wholeText.trim():null}var Y,_e={banners:0,services:0};try{Y=AdmanHTML.Utils.parseXml(x)}catch(B){return t.stats.rb(t.stats.code.ERROR_CONVERTING_STRING_TO_XML),void t.stats.logError("ERROR_CONVERTING_STRING_TO_XML")}return F(Y,"Ad",function(B){function je(O){var pe=k?k.clone():new AdmanHTML.Ad(t);J(B,"Impression","id",function(me){try{pe.addStat(me,"playbackStarted")}catch(Me){}}),J(B,"Extension","type",function(me,Me){h(pe,me,Me)}),J(B,"Error",null,function(me){pe.addStat(me,"error")}),J(O,"Tracking","event",pe.addStat);var le=O.getElementsByTagName("VideoClicks")[0];return le&&Ee(le.childNodes,function(me){me.tagName==="ClickThrough"?pe.addClick(de(me)):me.tagName==="ClickTracking"&&pe.addStat(de(me),"click")}),pe}function De(O){var pe={width:ee(O,"width"),height:ee(O,"height"),id:ee(O,"id"),assetWidth:ee(O,"assetWidth"),assetHeight:ee(O,"assetHeight"),expandedWidth:ee(O,"expandedWidth"),expandedHeight:ee(O,"expandedHeight"),apiFramework:ee(O,"apiFramework"),adSlotID:ee(O,"adSlotID"),statistics:[]};return J(O,"StaticResource",null,function(le){pe.staticResource=le}),J(O,"HTMLResource",null,function(le){pe.htmlResource=le}),J(O,"IFrameResource",null,function(le){pe.iframeResource=le}),J(O,"CompanionClickTracking",null,function(le){pe.statistics.push({type:"click",url:le})}),J(O,"Tracking","event",function(le,me){pe.statistics.push({type:me,url:le})}),J(O,"CompanionClickThrough",null,function(le){pe.urlToNavigateOnClick=le}),pe}var ue=ee(B,"id");F(B,"InLine",function(O){var pe=[];F(O,"CompanionAds",function(le){var me=ee(le,"required")||"none";F(O,"Companion",function(Me){var Se=De(Me);Se.required=me,pe.push(Se)})}),F(O,"Linear",function(le){var me,Me=je(le),Se=le.parentNode;Se&&(me=ee(Se,"adId")||ee(Se,"adID")||ee(Se,"AdId")||ee(Se,"AdID")||ee(Se,"id")),me=me||ue;var Ue={bannerID:me,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(de(le.getElementsByTagName("Duration")[0]))};P.urlToNavigateOnClick&&(Ue.urlToNavigateOnClick=P.urlToNavigateOnClick),F(le,"MediaFile",function(T){Ue.mediafiles.push({apiFramework:ee(T,"apiFramework"),type:ee(T,"type"),width:ee(T,"width"),height:ee(T,"height"),src:de(T)})}),F(le,"AdParameters",function(T){Ue.params=de(T);try{var S=JSON.parse(Ue.params);if(S&&S.settings&&(D=t.slot&&t.slot.getRootSettings()||D||{},n&&typeof n=="function")){var L=S.sections&&S.sections.preroll&&S.sections.preroll.length&&S.sections.preroll[0]||null;S.settings&&S.settings.preroll,n({impressionID:S.settings.impressionID||"",padID:S.settings.padID||"",bannerIDs:L&&L.bannerID||""})}}catch(R){console.log(R)}}),pe.length&&(Ue.companionAds=pe),f(ae||"preroll",V,Me,Ue),_e.banners++}),F(O,"NonLinear",function(le){var me=je(le),Me={width:ee(le,"width"),height:ee(le,"height"),duration:AdmanHTML.Utils.convertDuration(ee(le,"minSuggestedDuration")),mediafiles:[]};J(le,"NonLinearClickThrough",null,function(Se){me.addStat(Se,"click")}),J(le,"StaticResource","creativeType",function(Se,Ue){Me.mediafiles.push({type:Ue,src:Se})}),f(ae||"overlay",V,me,Me),_e.banners++})}),F(B,"VASTAdTagURI",function(O){_e.services++,o({url:de(O),id:P.id},je(B),Z+1,ae,V,G)})}),_e}function h(x,P,k){k==="controls"?x.addExtension("showControls",!!parseInt(P,10)):k==="skipTime2"?(P=isNaN(P)?AdmanHTML.Utils.convertDuration("00:"+P):parseInt(P,10),x.addExtension("allowCloseDelay",P)):k==="linkTxt"&&(x.addExtension("linkText",P),x.addExtension("adText",P))}function f(x,P,k,Z){k.addAd(Z)&&(k.sectionType=x,P===I.PRE&&m[x]&&(P=""),x=(P||"")+x,g[x]=g[x]||[],g[x].push(k))}function l(x,P,k,Z,ae){k.addAd(Z),k.addInheritedAd(ae),k.addStatCollection(Z.statistics),k.addStatCollection(Z.serviceStatistics),k.sectionType=x,U.addService(k,P)}function u(x,P,k){P.addAd(k)&&(P.section=x,N[x]=P)}function v(x,P){C[x]=C[x]||{},AdmanHTML.Utils.mixin(C[x],P),delete C[x].statistics,delete C[x].view,delete C[x].advertisment}function b(){"preroll midroll pauseroll overlay postroll claimroll".split(" ").forEach(function(x){var P=m[x]?g[x]:g[I.PRE+x],k=m[x]?g[I.PRE+x]:g[x],Z=g[I.POST+x];g[x]=[].concat(P||[],k||[],Z||[]),y(I.PRE+x),y(I.POST+x)})}function y(x){g[x]=[]}var g={},C={},D={},N={},w=0,A=0,M=0,I={PRE:"pre-",POST:"post-"},m={},U=new AdmanHTML.ServiceStorage(t);return o({url:e.url,data:e.data}),{getSection:function(x){return g[x]},getAfterServices:U.getAfterServices,getNextAfterService:U.getNextAfterService,resetServices:U.resetAll,getServices:U.getServices,removeService:U.removeService,getSettings:function(x){return C[x]||{}},getRootSettings:function(){return D},getDebug:function(x){return N[x]}}},AdmanHTML.ServiceAd=function(t,e,i){"use strict";function n(v){return e.ad=v,!0}function o(v){e.inheritedAd=v}function a(v,b){e.inheritedAd.addImmutableProperty(v,b,!0)}function d(v){var b=v?v.filter(function(y){return y.type==="serviceRequested"||y.type==="serviceAnswerEmpty"}):[];b&&b.forEach(function(y){r(y.url,y.type,y)})}function r(v,b){v=decodeURIComponent(v),e.stats.push({name:b,type:b,url:v})}function c(v){u=!0,i&&i(e.inheritedAd,v)}function h(){u=!1}function f(){return!(t.forcePreloadAdditionalData||!e.ad||!e.ad.doAfter)&&(e.ad.doAfter===!0||e.ad.doAfter==="true")}function l(v){function b(g){AdmanHTML.Utils.loadImg(g.url);var C=y.indexOf(g);~C&&y.splice(C,1)}var y=e.stats.slice(0);e.stats.forEach(function(g){g.type===v&&b(g)}),e.stats=y}e=e||{stats:[]};var u=!1;return{addStatCollection:d,addStat:r,addAd:n,addInheritedAd:o,addImmutableProperty:a,getAd:function(){return e.ad},start:c,reset:h,started:function(){return u},log:l,isAfter:f}},AdmanHTML.ServiceStorage=function(t){"use strict";function e(y,g){var C=y.getAd();v.push(C.id),u[C.id]={service:y},g&&u[g]&&(u[g].children=u[g].children||[],u[g].children.push(C.id)),t.forcePreloadAdditionalData||C.doAfter!=="true"&&C.doAfter!==!0&&!C.doOnEmptyResponseFromId||l.push(y)}function i(y){return u[y]?u[y].service:null}function n(y){var g=typeof y=="string"||typeof y=="number"?y:y.getAd().id;delete u[g];var C,D;for(C=0,D=l.length;C<D;C++)if(y=l[C],y.getAd().id===g){l.splice(C,1);break}}function o(y,g){if(!y)return[];var C,D,N=[];for(C in u)u.hasOwnProperty(C)&&(D=u[C].service,D.sectionType!==y||g&&!g(D)||N.push(D));return N}function a(y){v.forEach(function(g,C){y===g?(u[g].service.log("serviceAnswerEmpty"),v.splice(C,1),b.push(y),delete u[g]):u[g].children&&u[g].children.indexOf(y)!==-1&&u[g].children.splice(u[g].children.indexOf(y),1)})}function d(y){var g=u[y];g&&(g.children=null)}function r(){var y,g,C,D;for(y=0,g=l.length;y<g;y++)if(C=l[y],(D=C.getAd().doOnEmptyResponseFromId)&&b.indexOf(D)!==-1&&!C.isAfter())return l.splice(y,1),C;return null}function c(y){if(!y)return[];var g,C,D,N=[];for(g=0,C=l.length;g<C;g++)D=l[g],D.sectionType===y&&D.isAfter()&&!D.started()&&N.push(D);return N}function h(y){if(!y)return null;var g,C,D,N;for(g=0,C=l.length;g<C;g++)if(D=l[g],D.sectionType===y&&D.isAfter()&&!D.started()){if((N=D.getAd().doOnEmptyResponseFromId)&&b.indexOf(N)===-1)continue;return D.getAd().allowRepeat||l.splice(g,1),D}return null}function f(y){var g,C,D;for(g=0,C=l.length;g<C;g++)D=l[g],y&&D.sectionType!==y||D.reset()}var l=[],u={},v=[],b=[];return{addService:e,getService:i,getServices:o,removeService:n,resetAll:f,markEmptyService:a,markNonEmptyService:d,getAfterServices:c,getNextAfterService:h,getNextOnEmptyService:r}},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 o=document.createElement("iframe");return this.adframe=o,this.src=i,o.width="100%",o.height="100%",o.scrolling="no",o.marginWidth="0",o.marginHeight="0",o.frameBorder="0",o.src=n,o.id="ad-frame-"+this.id,o.setAttribute("allow","autoplay"),o.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),o.setAttribute("style","color-scheme: light;"),o},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(o){}},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 o={type:"vpaid",method:i};if(n&&(o.params=n),this.send(o),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(N){if(u){var w=b[N];w&&d("https://r.mail.ru/d"+w+".gif?rnd="+Math.random())}else v.push(N)}function i(N,w){if(!n()){if(N)try{Object.defineProperty(y,N,{writable:!1,enumerable:!0,value:w||Date.now()-c})}catch(A){}else y.sessionId=AdmanHTML.Utils._genSessionId();c=Date.now(),Object.keys(b).length&&d("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+t.version+"&metrics="+encodeURIComponent(JSON.stringify(y))+"&slot="+(h==="slot"?t.slotId:"json"))}}function n(){return["media_error_code","vpaid_error_message","skipped","completed"].some(function(N){return y.hasOwnProperty(N)})}function o(N,w,A){var M=[];if(A)for(var I in A)A.hasOwnProperty(I)&&M.push(I+"="+String(A[I]));var m="";M.length&&(m="&"+M.join("&")),D||d("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+t.version+"&"+N+"="+encodeURI(w)+"&slot="+(h==="slot"?t.slotId:"json")+m),t.debugMode&&console&&console.log&&(console.log("MESSAGE: "+N+" = "+w),A&&console.log("MESSAGE EXTRA PARAMS: "+JSON.stringify(A)))}function a(N,w){var A=[];if(w)for(var M in w)w.hasOwnProperty(M)&&A.push(M+"="+String(w[M]));var I="";A.length&&(I="&"+A.join("&")),D||d("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+t.version+"&error="+encodeURI(N)+"&slot="+(h==="slot"?t.slotId:"json")+I),t.debugMode&&console&&console.warn&&console.warn("Error: "+N)}function d(N){AdmanHTML.Utils.loadImg(N)}function r(N){if(!l){var w="https://ad.mail.ru/vp/"+f+"?original="+(N.slot||"")+"&version="+N.version;l=!0,D?(console.log(w),u=!0):AdmanHTML.Utils.xhr(w,function(A){if(u=!0,A){if(typeof A=="string")try{b=JSON.parse(A.trim())}catch(I){}else typeof A=="object"&&(b=A);var M=v.slice();v=[],M.forEach(e)}})}}var c,h="slot",f=3107,l=!1,u=!1,v=[],b={},y={},g=AdmanHTML.Utils.getPageLocation(),C=AdmanHTML.Utils.getHostname(g||""),D=C.indexOf("localhost")!==-1;return{rb:e,logError:a,logMessage:o,simple:d,metrics:i,initMode:function(N,w){h=N,N==="slot"&&r(w)},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(h,f){return f?f.toUpperCase():""})}function e(c,h,f){var l,u=d[h];if(!u){for(l=0;l<r.length;l++)if(u=r[l]===""?h:t(r[l]+"-"+h),c[u]!==void 0){d[h]=u;break}}c[u]=f}function i(c){return parseInt(c)+"px"}function n(c,h){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,h)}).join(", ")+")":f(c,h)}function o(c,h,f){var l=c.style;(f||Object.keys(h)).forEach(function(u){h.hasOwnProperty(u)&&a(l,u,h[u],h)})}function a(c,h,f,l){var u,v,b;switch(h){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",b="";break;case"headerUnderlineOnRollOver":u="text-decoration",v=f?"":"none",b=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=h,v=i(f);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":u="padding",v=i(f);break;case"maxImageWidth":case"maxImageHeight":u=h==="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=h==="paddingLeft"?"left":"top",v=i(f);break;case"controlsPaddingTop":case"controlsPaddingRight":u=h==="controlsPaddingRight"?"right":"top",v=i(f)}u&&v&&(b!==void 0?c.setProperty(u,v,b):e(c,u,v))}var d={},r=["","webkit","Moz","O","ms"];return{applyStyle:o,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function t(){return ue||(ue=function(){try{if(window===window.top)return O;for(var T=window;T!==T.parent;){if(T.document.domain!==T.parent.document.domain)return le;T=T.parent}return pe}catch(S){}return le}())}function e(){if(me!==null)return me;var T=window;try{for(;T.parent!==T&&T.document.domain===T.parent.document.domain;)T=T.parent}catch(S){}return me=T,T}function i(){var T=window,S="",L=e();try{S=T.top.location.href}catch(te){if(L&&L.parent===T.top&&(S=L.document.referrer),!S){var R=T.location.ancestorOrigins;R&&R.length&&(S=R[R.length-1])}}return S||(S=(L||window).document.referrer),S}function n(){return Ue.major?Se:Me}function o(T){T(n())}function a(T,S){S&&T.addEventListener("load",S,!1);var L=document.getElementsByTagName("head");if(L&&L.length){var R=L[0];R&&R.appendChild(T)}}function d(T,S,L){var R=document.getElementById(S);if(R&&R.parentNode){if(!L)return;R.parentNode.removeChild(R)}R=document.createElement("style"),R.type="text/css",R.id=S,R.innerHTML=T,a(R)}function r(T){var S=document.querySelector("link[href*='"+T+"']");S||(S=document.createElement("link"),S.type="text/css",S.rel="stylesheet",S.href=T,a(S))}function c(T){var S=document.querySelector("script[src*='"+T+"']");S||(S=document.createElement("script"),S.setAttribute("type","text/javascript"),S.setAttribute("charset","utf8"),S.setAttribute("src",T),a(S))}function h(T,S){var L=AdmanHTML.Utils.getPageLocation();if(AdmanHTML.Utils.getHostname(L||"").indexOf("localhost")===-1){var R=new Image;R.onload=function(){S&&S(R)},R.src=T}else console.log(T)}function f(T,S,L,R,te){R=R||"GET";var se=new XMLHttpRequest;return se.open(R,T,!0),se.withCredentials=!te,se.setRequestHeader("Content-Type","text/plain"),se.send(L||null),S&&(se.onreadystatechange=function(){se.readyState===4&&(se.status===200?S(se.response):S())},se.onerror=function(){te?S():f(T,S,L,R,!0)}),se}function l(T,S,L,R,te){te===void 0&&(te=!0);var se=S*L<T*R;te&&(se=!se);var Ie=se?R/S:L/T,$e=Math.floor(T*Ie),E=Math.floor(S*Ie);return{x:Math.floor((L-$e)/2),y:Math.floor((R-E)/2),width:Math.floor($e),height:Math.floor(E)}}function u(T){return typeof T=="object"&&!!T&&!Array.isArray(T)}function v(T){var S;for(S in T)return!1;return!0}function b(T,S){if(!T)return null;if(S){var L;for(L in S)Object.prototype.hasOwnProperty.call(S,L)&&(T[L]=S[L])}return T}function y(T,S){if(S){var L,R;for(L in S)Object.prototype.hasOwnProperty.call(S,L)&&(R=S[L],u(R)?(T[L]=T[L]||{},T[L]=y(T[L],R)):T[L]=R)}return T}function g(T,S,L){return T=T||0,S=S||0,L=L||1,Math.min(L,Math.max(S,T))}function C(T,S){return T-S}function D(){return Math.floor(Math.random()*Math.pow(2,48)).toString()}function N(T){T=T.split("+").join(" ");for(var S,L={},R=/[?&]?([^=]+)=([^&]*)/g;S=R.exec(T);)L[decodeURIComponent(S[1])]=decodeURIComponent(S[2]);return L}function w(T,S){var L;document.createEvent?(L=document.createEvent("HTMLEvents"),L.initEvent(S,!0,!0)):(L=document.createEventObject(),L.eventType=S),L.eventName=S,document.createEvent?T.dispatchEvent(L):T.fireEvent("on"+L.eventType,L)}function A(T){return T?T.substring(T.indexOf("//")+2,T.indexOf("/?")):""}function M(T){var S=document.createElement("a");return S.href=T,S.hostname}function I(T){return T.replace(/^(www[0-9]?\.)?/,"")}function m(T,S,L){if(!T||!S)return!0;if(T=I(T),S=I(S),!(L&&L.URL&&Array.prototype.includes))return new RegExp("^"+S.replace(/^(\*\.?)/,"([^/]*.)?").replace(/\./g,"\\.")+"$").test(T);try{T=new URL(T);try{return S=new URL(S),T.host.includes(S.host)}catch(R){return T.host.includes(S)}}catch(R){return T.includes(S)}}function U(T){var S=T.button,L=T.which;return L||S===void 0?L:1&S?1:2&S?3:4&S?2:0}function x(T){return U(T)===1}function P(T,S){return S=S||document.body,T!==S&&S.contains(T)}function k(T){return T&&T.nodeType===1}function Z(T){var S=T.ownerDocument;return S.defaultView||S.parentWindow}function ae(T){T.preventDefault()}function V(T){var S;if(window.DOMParser)S=new DOMParser().parseFromString(T,"text/xml");else{if(!window.ActiveXObject)return;S=new window.ActiveXObject("Microsoft.XMLDOM"),S.async=!1,S.loadXML(T)}return S.documentElement}function G(T){if(T){var S=T.split(":");if(S.length===3){var L=parseInt(S[0],10),R=parseInt(S[1],10),te=S[2].split("."),se=parseInt(te[0],10),Ie=0;if(te.length===2&&(Ie=parseInt(te[1],10)),!(isNaN(L)||isNaN(R)||isNaN(se)||isNaN(Ie)))return 3600*L+60*R+se+Ie/1e3}}return NaN}function F(T,S){var L,R=T;for(L in S)S.hasOwnProperty(L)&&(R=R.replace("{{"+L+"}}",S[L]));return R}function J(T,S){if(S=S||0,window.Worker&&window.Blob){var L,R=new Blob(['var timeout; onmessage = function(e) {clearTimeout(timeout); if (e.data === "start") {timeout = setTimeout(function() { postMessage({}); }, '+S+");}}"]);try{L=new Worker(window.URL.createObjectURL(R)),L.onmessage=function(){L.terminate(),T()},L.postMessage("start")}catch(te){return setTimeout(T,S)}return L}return setTimeout(T,S)}function Ee(){function T(Ie){var $e={};try{var E=window[Ie].getItem("rb_sync_id");E&&typeof($e=JSON.parse(E))!="object"&&($e={})}catch(z){}return $e}var S=[],L=T("localStorage"),R=T("sessionStorage"),te=b(L,R);for(var se in te)te.hasOwnProperty(se)&&S.push(se+"="+encodeURIComponent(te[se]));return S.join("&")}function ee(T){return/nr-vpaid(\.min)?\.js/.test(T)}function de(T,S){T&&T.style&&Y(T,S,!0)}function Y(T,S,L){L=L||!1;var R=L?function(te,se){T.style.setProperty(te,se,"important")}:function(te,se){T.style.setProperty(te,se)};Object.getOwnPropertyNames(S).forEach(function(te){R(te,S[te])})}function _e(){function T($e,E){return function(){return $e.apply(E,arguments)}}function S($e){var E=$e.toString(16);return E.length===1?"0"+E:E}function L($e,E,z){for(var X="",fe=E;fe<=z;fe++)X+=S($e[fe]);return X}var R="undefined",te=typeof crypto!==R&&crypto.getRandomValues&&T(crypto.getRandomValues,crypto)||typeof msCrypto!==R&&window.msCrypto.getRandomValues&&T(window.msCrypto.getRandomValues,window.msCrypto),se=function(){if(te){var $e=new Uint8Array(16);return function(){return te($e),$e}}var E=new Array(16);return function(){for(var z,X=0;X<16;X++)(3&X)==0&&(z=4294967296*Math.random()),E[X]=z>>>((3&X)<<3)&255;return E}}(),Ie=se();return Ie[6]=15&Ie[6]|64,Ie[8]=63&Ie[8]|128,L(Ie,0,3)+"-"+L(Ie,4,5)+"-"+L(Ie,6,7)+"-"+L(Ie,8,9)+"-"+L(Ie,10,15)}function B(T,S){var L=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,R=[S,T].reduce(function(te,se){return se&&Object.keys(L).forEach(function(Ie){te[Ie]!==se[Ie]&&(te[Ie]=se[Ie]?se[Ie]:te[Ie]),typeof se.members=="object"&&(te.members=se.members)}),te},Object.assign({},L));return je(R)?R:L}function je(T){return!!Array.isArray(T.members)&&(T.members.forEach(function(S){if(["adchoice","disclaimer","timer"].indexOf(S)===-1)return!1}),typeof T.positionX=="string"&&["left","right"].indexOf(T.positionX)!==-1&&typeof T.positionY=="string"&&["top","bottom"].indexOf(T.positionY)!==-1&&typeof T.offsetX=="string"&&typeof T.offsetY=="string"&&!(typeof T.disclaimerText!="string"||!T.disclaimerText.length)&&!(typeof T.headerText!="string"||!T.headerText.length)&&!(typeof T.aboutText!="string"||!T.aboutText.length)&&!(typeof T.copyText!="string"||!T.copyText.length))}function De(T){T=T||navigator.userAgent;var S=!1;return function(L){(/(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(L)||/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(L.substr(0,4)))&&(S=!0)}(T),S}var ue,O=1,pe=2,le=3,me=null,Me=0,Se=1,Ue=function(){var T="undefined",S="Shockwave Flash",L="application/x-shockwave-flash",R={major:0,minor:0,release:0},te=null;if(typeof navigator.plugins!==T&&typeof navigator.plugins[S]=="object")(te=navigator.plugins[S].description)&&typeof navigator.mimeTypes!==T&&navigator.mimeTypes[L]&&navigator.mimeTypes[L].enabledPlugin&&(te=te.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),R.major=parseInt(te.replace(/^(.*)\..*$/,"$1"),10),R.minor=parseInt(te.replace(/^.*\.(.*)\s.*$/,"$1"),10),R.release=/[a-zA-Z]/.test(te)?parseInt(te.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==T)try{var se=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");se&&(te=se.GetVariable("$version"))&&(te=te.split(" ")[1].split(","),R.major=parseInt(te[0],10),R.minor=parseInt(te[1],10),R.release=parseInt(te[2],10))}catch(Ie){}return R}();return{setStyle:de,isNRVpaid:ee,addCss:d,loadCss:r,loadJs:c,loadImg:h,xhr:f,scaleBySide:l,isEmptyObject:v,mixin:b,deepExtend:y,validateMinMax:g,numSorter:C,createIntUID:D,getQueryParams:N,triggerEvent:w,getUserIdQuery:Ee,getPageLocation:i,getDomain:A,getHostname:M,_genSessionId:_e,matchHostname:m,isLeftButtonPressed:x,isElementInDocument:P,isElement:k,getElementViewport:Z,preventDefault:ae,parseXml:V,convertDuration:G,renderTemplate:F,setTimeout:J,checkFlash:n,checkFlashAsync:o,FLASH_READY:Se,FLASH_MISSING:Me,getServingType:t,servingTypes:{ON_PAGE:O,S_FRAME:pe,XD_FRAME:le},adActionsConfigPrepare:B,isMobile:De}}(),AdmanHTML.Viewability=function(){"use strict";function t(V,G,F){return V.forEach(function(J){J.duration=G.focus&&G.percent>=J.threshold?J.duration+F:0}),V}function e(V){V.forEach(function(G){G.duration=0})}function i(V){return new window.IntersectionObserver(function(G){G&&G.length&&G[0].intersectionRatio!==void 0&&(V(G[0].intersectionRatio),!P&&(G[0].intersectionRatio>0||G[0].isIntersecting)&&(P=!0,g.log("viewin")))},{threshold:Z})}function n(){return m?!document[m]:M===I.XD_FRAME||!window.top.document.hasFocus||window.top.document.hasFocus()}function o(){var V=a();if(V.state!=="UNDETERMINED")return t(ae,V,w),g&&(g.logMRC(ae)||y()),V}function a(){var V,G,F=n();return A?(V=k,G="DETERMINED"):M!==I.XD_FRAME?(V=d(C).percent,G="DETERMINED"):(V=0,G="UNDETERMINED"),{percent:V,focus:F,state:G,viewinOccured:P}}function d(V,G){try{var F=V.getBoundingClientRect(),J=r(F),Ee=AdmanHTML.Utils.getElementViewport(V)||window;for(G=G||window.top;Ee!==G;){var ee=Ee.frameElement.getBoundingClientRect();F=c(F,ee),F.left=Math.max(ee.left,F.left),F.right=Math.min(ee.right,F.right),F.top=Math.max(ee.top,F.top),F.bottom=Math.min(ee.bottom,F.bottom),F.right<F.left&&(F.right=F.left),F.bottom<F.top&&(F.bottom=F.top),Ee=Ee.parent}F=h(F,G);var de=r(F);return F.percent=de/J*100,F}catch(Y){return{left:0,right:0,top:0,bottom:0,percent:0}}}function r(V){return(V.right-V.left)*(V.bottom-V.top)}function c(V,G){return{left:V.left+G.left,right:V.right+G.left,top:V.top+G.top,bottom:V.bottom+G.top}}function h(V,G){var F={},J=f(G);return F.left=Math.max(0,V.left),F.right=Math.min(J.width,V.right),F.top=Math.max(0,V.top),F.bottom=Math.min(J.height,V.bottom),F}function f(V){var G={width:1/0,height:1/0};return!isNaN(V.document.body.clientWidth)&&V.document.body.clientWidth>0&&(G.width=V.document.body.clientWidth),!isNaN(V.document.body.clientHeight)&&V.document.body.clientHeight>0&&(G.height=V.document.body.clientHeight),V.document.documentElement&&V.document.documentElement.clientWidth&&!isNaN(V.document.documentElement.clientWidth)&&(G.width=V.document.documentElement.clientWidth),V.document.documentElement&&V.document.documentElement.clientHeight&&!isNaN(V.document.documentElement.clientHeight)&&(G.height=V.document.documentElement.clientHeight),V.innerWidth&&!isNaN(V.innerWidth)&&(G.width=Math.min(G.width,V.innerWidth)),V.innerHeight&&!isNaN(V.innerHeight)&&(G.height=Math.min(G.height,V.innerHeight)),G}function l(V,G,F){if(g=G,x=!F,C=V,A)N=N||i(function(J){k=100*J}),N.observe(V);else if(M===I.XD_FRAME)return U=!1,void g.log("viewabilityUnmeasurable");F||(D=setInterval(o,w)),U=!0,g.log("viewabilityMeasurable"),window.addEventListener("unload",u)}function u(){b("unload")}function v(){D||(D=setInterval(o,w))}function b(V){U&&g&&x&&g.logMRC([],V||"complete"),g=null,U=!1,x=!1,C=null,clearInterval(D),D=void 0,e(ae),N&&N.disconnect(),window.removeEventListener("unload",u)}function y(){D&&(clearInterval(D),D=void 0,e(ae))}var g,C,D,N,w=255,A=!!window.IntersectionObserver,M=AdmanHTML.Utils.getServingType(),I=AdmanHTML.Utils.servingTypes,m=function(){for(var V=["h","webkitH","mozH","msH","oH"],G=0;G<V.length;G++)if(document[V[G]+"idden"]!==void 0)return V[G]+"idden";return""}(),U=!1,x=!1,P=!1,k=0,Z=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],ae=[];return Z.forEach(function(V){ae.push({threshold:Math.round(100*V),duration:0})}),{start:l,pause:y,resume:v,stop:b,getViewabilityState:a}},AdmanHTML.AdRenderer=function(t,e){"use strict";function i(){N.wrapperEl=N.wrapperEl||t.wrapper,N.mainEl=N.mainEl||document.createElement("div"),N.clickEl=N.clickEl||N.mainEl,AdmanHTML.Utils.isElement(N.mainEl)&&!N.mainEl.parentNode&&(N.wrapperEl.childNodes.length?N.wrapperEl.insertBefore(N.mainEl,N.wrapperEl.childNodes[0]):N.wrapperEl.appendChild(N.mainEl),D=!0),N.clickEl.addEventListener("click",N.onClick),window.addEventListener("resize",v)}function n(M){M()}function o(){t.viewability.stop(),window.removeEventListener("resize",v),N.clickEl&&N.clickEl.removeEventListener("click",N.onClick),clearTimeout(y),AdmanHTML.Utils.isElement(N.mainEl)&&D&&N.mainEl.parentNode&&N.mainEl.parentNode.removeChild(N.mainEl)}function a(){if(!w&&(w=!0,clearTimeout(y),g)){var M=Date.now()-g;C=1e3*A.duration-M}}function d(){w&&(w=!1,r())}function r(){g=Date.now();var M=C||1e3*A.duration;y=setTimeout(function(){o(),t.cb("onCompleted")},M)}function c(){A.urlToNavigateOnClick&&(A.openLinkInPopup?t.openPopup(A.urlToNavigateOnClick||A.trackingLink):window.open(A.urlToNavigateOnClick,"_blank"),e.log("click"),t.cb("onClicked"))}function h(M){t.cb("onStarted",[e.sectionType,AdmanHTML.Utils.mixin(e.getAdForApp()||{},M||{})]),e.log("playbackStarted")}function f(M,I){var m=parseInt(M/I*100);t.cb("onTimeRemained",[{remained:I-M,percent:m,duration:I,currentTime:M}]),M=parseInt(M),e.log("thresholdPValue",m),e.log("thresholdValue",M),e.logOVV(M,m)}function l(M,I){typeof M!="string"&&M?N.mainEl.appendChild(M):N.mainEl.innerHTML=M,AdmanHTML.Utils.mixin(N.mainEl.style,I)}function u(M){N.wrapperEl=M}function v(){N.onResize(N.mainEl.offsetWidth,N.mainEl.offsetHeight)}function b(){}var y,g,C,D,N={},w=!1,A=e.getAd();return N={start:i,pause:a,resume:d,skip:n,dispose:o,onClick:c,onStart:h,registerTimer:r,setView:l,setWrapper:u,onTimeRemained:f,onResize:b}},AdmanHTML.AudioAdRenderer=function(t,e){"use strict";function i(){d.mainEl=t.audioEl||document.createElement("audio"),r.forEach(function(c){d.mainEl.addEventListener(c,o)}),t.audioEl||d.setView(null,{position:"absolute",width:"1px",height:"1px",top:"-10000px",left:"-10000px"}),a=e.getAd().duration,d.mainEl.src=e.getAd().src,d.mainEl.load(),e.log("render"),d.mainEl.play(),t.audioEl||d.start()}function n(){d.dispose(),r.forEach(function(c){d.mainEl.removeEventListener(c,o)})}function o(c){var h,f;switch(c.type){case"loadedmetadata":d.onStart();break;case"play":t.cb("onPlayed");break;case"pause":t.cb("onPaused");break;case"timeupdate":h=d.mainEl.duration,f=d.mainEl.currentTime,!isNaN(h)&&a&&Math.abs(a-h)>1&&(h=a,f=Math.min(f,h)),d.onTimeRemained(f,h);break;case"ended":t.cb("onCompleted");break;case"error":t.cb("onError")}}var a,d=new AdmanHTML.AdRenderer(t,e),r=["loadedmetadata","error","pause","play","timeupdate","ended"];return{start:i,skip:d.skip,dispose:n,pause:function(){d.mainEl.pause()},resume:function(){d.mainEl.play()},setVolume:function(c){var h=d.mainEl.muted?0:d.mainEl.volume;d.mainEl.muted=c===0,d.mainEl.volume=c,(h===0&&c>0||h>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(b){b.propertyName==="transform"&&b.target===l&&v.moveWithControls()}function o(){u.start(),f=e.getAd(),h=e.getSettings(),l=document.querySelector("div.videoplayer_controls");var b=AdmanHTML.Utils.adActionsConfigPrepare(f?f.adActionsConfig:null,h?h.adActionsConfig:null);if(!f.ctaWebEnabled||b.positionY==="bottom"&&b.positionX==="left")return void(r=Function.prototype);v.setText(f.ctaText),v.setStyles(),c=a(),v.setCustomStyles(c),v.addListeners(),v.appendTo(t.wrapper),r=function(){v.destroy()},l&&l.addEventListener("transitionstart",n)}function a(){return[t,f,h].reduce(function(b,y){return Object.keys(b).length||typeof y.ctaStyles!="object"?b:y.ctaStyles},{})}function d(){l&&l.removeEventListener("transitionstart",n),r&&r(),u.dispose()}if(!t.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var r,c,h,f,l,u=new AdmanHTML.AdRenderer(t,e);i.prototype._setStyles=function(b,y){AdmanHTML.Utils.setStyle(b,y)},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(b){b.background&&(this.background=b.background),this._setStyles(this.ctaButtonEl,b)},i.prototype.setText=function(b){this.ctaButtonTextEl.innerText=b&&typeof b=="string"?b:"Перейти"},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 b=f.ctaLink||f.urlToNavigateOnClick;f.openLinkInPopup?t.openPopup(b||f.trackingLink):window.open(b,"_blank"),e.log(["ctaClick","click"]),t.cb("onClicked")},i.prototype._hoverCTABtnListener=function(b){this._setStyles(this.ctaButtonEl,{background:b?"#1460C9":this.background,"box-shadow":b?"0px 4px 8px 0px #0000000A":this.boxShadow})},i.prototype.appendTo=function(b){b&&(b.appendChild(this.ctaButtonEl),this.isRendered=!0)},i.prototype.moveWithControls=function(){var b=l.classList.contains("hidden");this.ctaButtonEl.style.setProperty("transform","translateY("+(b?"0":"-"+Math.round(l.offsetHeight))+"px)")};var v=new i;return{render:o,dispose:d}},AdmanHTML.CloseBtnRenderer=function(t,e){"use strict";function i(){a.start();var f=e.getSettings(),l=f.controlsStyle||0,u=d[l],v=r[l];v.bg=v.bg||v.width;var b={};for(var y in h)h.hasOwnProperty(y)&&(b[y]=f[y]!==void 0?f[y]:h[y]);if(b.controlsPaddingTop=b.controlsPaddingTop-b.controlsSafeArea,b.controlsPaddingRight=b.controlsPaddingRight-b.controlsSafeArea,a.setView(AdmanHTML.Utils.renderTemplate(c,{img:u,width:v.width,height:v.height,bg:v.bg}),{position:"absolute",cursor:"pointer"}),AdmanHTML.StyleUtils.applyStyle(a.mainEl,b),v.bg!==v.width){var g=v.bg-v.width,C=function(N){N.target.className==="rb-adman_close"&&(N.target.style.backgroundPosition="-"+g+"px 0")},D=function(N){N.target.className==="rb-adman_close"&&(N.target.style.backgroundPosition="0 0")};a.mainEl.addEventListener("mouseover",C),a.mainEl.addEventListener("mouseout",D),o=function(){a.mainEl.removeEventListener("mouseover",C),a.mainEl.removeEventListener("mouseout",D)}}}function n(){o&&o(),a.dispose()}var o,a=new AdmanHTML.AdRenderer(t,e),d=["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"],r=[{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>',h={controlsPaddingTop:3,controlsPaddingRight:0,controlsSafeArea:0};return a.onClick=function(f){f.stopPropagation(),f.target.className==="rb-adman_close"&&t.cb("onClosed")},{start:i,dispose:n,setWrapper:a.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),o=e.getAd();return n.onClick=function(){window.open(o.urlToNavigateOnClick,"_blank")},{start:i,dispose:n.dispose}},AdmanHTML.DisclaimerRenderer=function(t,e){"use strict";function i(l,u,v,b){var y=document.createElement("style");y.appendChild(document.createTextNode(" @font-face { font-family: "+l+"; font-style: normal; font-weight: 300; unicode-range: "+b+"; src: url('"+u+"') format('"+v+"'); } ")),document.head.appendChild(y)}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 o(){h.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 d();var v={originalBannerId:u.bannerID,cipherBannerID:u.cipherBannerID?u.cipherBannerID:null,bannerOrdId:u.ordID||null,advData:u.advData||null},b=AdmanHTML.Utils.adActionsConfigPrepare(u?u.adActionsConfig:null,l?l.adActionsConfig:null);f.build(b,v),f.init(),f.addListeners(),f.appendTo(t.wrapper),r=function(){f.destroy()}}function a(l,u){var v=Math.floor(u-l);v||(v="00"),f.updateRemainTime(v)}function d(){r&&r(),c&&typeof c=="object"&&typeof c.remove=="function"&&c.remove(),h.dispose()}if(!t.disclaimer)return{render:Function.prototype,onTimeRemained:Function.prototype,dispose:Function.prototype};var r,c,h=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(b){console.warn("Failed detect small wrapper size",b)}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:o,onTimeRemained:a,dispose:d}},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(){M.start(),P=e.getAd(),N=P.duration,D=C(),D.width="100%",D.height="100%",D.setAttribute("style","display:block;width:100%;height:100%"),M.setView(D,{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),AdmanHTML.Utils.isElement(t.videoEl)&&t.videoEl.parentNode===M.mainEl.parentNode&&M.mainEl.parentNode.insertBefore(M.mainEl,t.videoEl.nextSibling),D.contentWindow||D.contentDocument?o():D.onload=function(Y){o()},m&&m.render(),I&&I.render()}function n(Y){Y.preventDefault(),Y.stopPropagation(),e.log("click"),t.cb("onClicked"),t.openPopup(P.urlToNavigateOnClick||P.trackingLink)}function o(){function Y(){var _e=D.contentWindow.document.body||D.contentDocument.body;_e&&_e.addEventListener("click",n,!0)}x=D.contentWindow?D.contentWindow.document:D.contentDocument,x.open(),V?(x.write('<!DOCTYPE html><html style="width: 100%; height: 100%"><head></head><body>'),x.write(P.src),x.write("</body></html>"),F=document.querySelector("div.videoplayer_controls"),F&&(J=F.style.display,F.style.display="none"),(Ee=document.querySelector("div.videoplayer_ads_skip"))&&(ee=Ee.style.display,Ee.style.display="none")):(x.write(P.src),e.log("render")),x.close(),U=AdmanHTML.Utils.getElementViewport(t.wrapper),U.addEventListener("message",l),P.openLinkInPopup&&(P.urlToNavigateOnClick||P.trackingLink)&&(D.contentWindow.document.body||D.contentDocument.body?Y():D.onload=Y),t.viewability.start(M.mainEl,e),c(),M.onStart()}function a(){k||(k=!0,Z+=Date.now()-ae,clearInterval(w),w=null,F?F.style.display=J:V&&u("pauseAd",[]),t.cb("onPaused"))}function d(){return P.creativeType==="video-motion"}function r(){k&&(k=!1,c(),t.cb("onPlayed"))}function c(){if(!w){if(V){if(!G)return;F?F.style.display="none":u("startAd",[])}w=setInterval(f,251),ae=Date.now(),k=!1}}function h(){de||t.cb("onCompleted")}function f(){Z+=Date.now()-ae,ae=Date.now(),M.onTimeRemained(Z/1e3,N),V?u("timeUpdateAd",[Z/1e3,N]):m.onTimeRemained(Z/1e3,N),Z>=1e3*N&&(clearInterval(w),w=null,h())}function l(Y){if(Y.source===D.contentWindow){if(V&&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(_e){}}}function u(Y,_e){if(typeof D=="object"&&typeof D.contentWindow=="object")try{var B=D.contentWindow.origin;D.contentWindow.postMessage({initiator:"render-runner",id:A,method:Y,args:_e},B)}catch(je){}}function v(Y){if(V&&typeof Y=="object"&&Y.initiator==="render-runner"&&Array.isArray(Y.args)&&Y.args[0]===A)switch(Y.event){case"AdStarted":G=!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"),de=null,g();break;case"UserAction":de=Date.now()}}function b(){F&&(F.style.display=J),Ee&&(Ee.style.display=ee)}function y(){w&&clearInterval(w),w=null,b(),U.removeEventListener("message",l)}function g(){y(),M.dispose(),m&&m.dispose(),I&&I.dispose()}function C(){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=b,Y}var D,N,w,A,M=new AdmanHTML.AdRenderer(t,e),I=new AdmanHTML.CallToActionBtnRenderer(t,e),m=null,U=null,x=null,P=e.getAd(),k=!1,Z=0,ae=0,V=d(),G=!1,F=null,J="flex",Ee=null,ee="block",de=null;return V?A="b"+P.bannerID:m=new AdmanHTML.DisclaimerRenderer(t,e),M.onClick=function(){},{start:i,pause:a,resume:r,skip:M.skip,dispose:g}},AdmanHTML.ImgAdRenderer=function(t,e){"use strict";function i(){o.start(),o.registerTimer(),AdmanHTML.Utils.addCss(c,r);var f=e.getAd();o.setView(AdmanHTML.Utils.renderTemplate(h,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=o.mainEl.querySelector(".rb-adman_age_wrapper");if(l&&l.advertisment&&l.advertisment.image){var v=l.advertisment.image;AdmanHTML.StyleUtils.applyStyle(o.mainEl,v,"fontFace contentIndent hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_image_wrapper"),v,"borderSize borderColor borderAlpha borderCornerRounding".split(" "));var b=l.advertisment.image.ageRestrictions;f.ageRestrictions&&b&&(AdmanHTML.StyleUtils.applyStyle(u,b),AdmanHTML.StyleUtils.applyStyle(u.querySelector(".rb-adman_age_content"),b,["textUnderline"]))}f.ageRestrictions||u.parentNode.removeChild(u),a.setWrapper(o.mainEl),a.start(),o.onStart(),d.render(),e.log("render")}function n(){o.dispose(),a.dispose(),d.dispose()}var o=new AdmanHTML.AdRenderer(t,e),a=new AdmanHTML.CloseBtnRenderer(t,e),d=new AdmanHTML.DisclaimerRenderer(t,e),r="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}",h='<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:o.pause,resume:o.resume,skip:o.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(),d=n(c)}function n(c){d=r.createElement("div"),o(),d.classList.add("rb-adman-popup");var h=r.createElement("div");h.classList.add("rb-adman-popup-body"),d.appendChild(h);var f=r.createElement("div");f.classList.add("rb-adman-popup-closeButton");var l=d;a=function(){l.remove(),l=null,t.resume(!0),t.isPopupOpen=!1},f.onclick=a,h.appendChild(f);var u=r.createElement("iframe");u.classList.add("rb-adman-popup-frame"),u.setAttribute("src",c),h.appendChild(u),r.body.append(d)}function o(){var c=r.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);}",d.appendChild(c)}var a,d=null,r=e().document;return{open:i,close:a}},AdmanHTML.ResearchAdRenderer=function(t,e){"use strict";function i(A,M){var I=[];return A.forEach(function(m){m.name===M&&I.push(m)}),I}function n(A,M,I){return M<=A&&(!I||I>=A)}function o(){!y&&b&&(y=!0,e.log("playbackPaused"))}function a(){y&&b&&(y=!1,e.log("playbackResumed"))}function d(){b=!1,y=!1,v.stop()}function r(A){var M=!A;M!==g&&(g=M,e.log(M?"volumeOff":"volumeOn"))}function c(){b&&(D&&f(D,D),l&&N.forEach(function(A){A.completed||(A.completed=!0,!A.viewable&&AdmanHTML.Utils.loadImg(A.url))}),d())}function h(A){e.log(A?"fullscreenOn":"fullscreenOff")}function f(A,M){if(!isNaN(A)){b||(b=!0,v.start(t.playerEl,e,!0),e.log("playbackStarted")),A=Math.round(A);var I=C!==null?A-C:null;if(C=A,e.log("thresholdValue",A),!isNaN(M)&&isFinite(M)&&M>0&&(M=Math.round(M),D=M,e.log("thresholdPValue",Math.floor(A/M*100))),I<0&&e.log("rewind"),w.forEach(function(x){if(n(A,x.start,x.end)){var P=Math.floor((A-x.start)/x.rate);P>0&&x.last!==P&&(x.last=P,AdmanHTML.Utils.loadImg(x.url.replace("[CONTENTPLAYHEAD]",A)))}else x.last=null}),l!==!1&&I!==0){var m,U=I<0||I>1;N.forEach(function(x){if(n(A,x.start,x.end)&&!x.completed){m=m||v.getViewabilityState(),l=m.state==="DETERMINED";var P=m.percent>x.percent&&m.focus;x.duration=x.duration||0,x.lastViewable&&P&&!U?x.duration+=I:x.duration=0,x.lastViewable=P,x.duration>=x.value&&(x.completed=!0,x.viewable&&AdmanHTML.Utils.loadImg(x.url))}else x.duration=0,x.lastViewable=!1})}}}var l,u=e.getExtendedAdForApp().statistics,v=new AdmanHTML.Viewability,b=!1,y=!1,g=!1,C=null,D=null,N=i(u,"mrcValue"),w=i(u,"timerValue");return{pause:o,resume:a,setVolume:r,setPosition:f,setComplete:c,setFullscreen:h}},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(){o.start(),AdmanHTML.Utils.checkFlashAsync(function(a){a===AdmanHTML.Utils.FLASH_READY?(o.registerTimer(),o.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"),o.onStart()):t.cb("onError")})}function n(a,d,r){var c,h,f=d||{},l=r||{};f.type="application/x-shockwave-flash",window.ActiveXObject?(f.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",l.movie=a):f.data=a,h="<object";for(c in f)f.hasOwnProperty(c)&&(h+=" "+c+'="'+f[c]+'"');h+=">";for(c in l)l.hasOwnProperty(c)&&(h+='<param name="'+c+'" value="'+l[c]+'" />');return h+="</object>"}var o=new AdmanHTML.AdRenderer(t,e);return{start:i,skip:o.skip,dispose:o.dispose,createSwfObject:n,super:o}},AdmanHTML.TextAdRenderer=function(t,e){"use strict";function i(){o.start(),o.registerTimer(),AdmanHTML.Utils.addCss(c,r);var f=AdmanHTML.Utils.mixin({header:"",body:"",hyperlinkText:""},e.getAd());o.setView(AdmanHTML.Utils.renderTemplate(h,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(o.mainEl,u,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header"),u,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header_text"),u,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_body"),u,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_link"),u,"hyperlinkColor hyperlinkSize hyperlinkUnderline hyperlinkIndent".split(" "));var v=l.advertisment.text.ageRestrictions,b=o.mainEl.querySelector(".rb-adman_age_wrapper");f.ageRestrictions?v&&(AdmanHTML.StyleUtils.applyStyle(b,v),AdmanHTML.StyleUtils.applyStyle(b.querySelector(".rb-adman_age_content"),v,["textUnderline"])):b.parentNode.removeChild(b);var y=o.mainEl.querySelector(".rb-adman_image_wrapper span");if(u.noImage)y.parentNode.removeChild(y);else if(u.contentPadding&&(y.style.marginRight=AdmanHTML.StyleUtils.getLength(u.contentPadding)),u.maxImageHeight||u.maxImageWidth){var g=f.width/f.height;y.style.width=AdmanHTML.StyleUtils.getLength(Math.round(u.maxImageWidth||u.maxImageHeight*g)),y.style.height=AdmanHTML.StyleUtils.getLength(Math.round(u.maxImageHeight||u.maxImageWidth/g))}}a.setWrapper(o.mainEl),a.start(),d.render(),e.log("render"),o.onStart()}function n(){o.dispose(),a.dispose(),d.dispose()}var o=new AdmanHTML.AdRenderer(t,e),a=new AdmanHTML.CloseBtnRenderer(t,e),d=new AdmanHTML.DisclaimerRenderer(t,e),r="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}",h='<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:o.pause,resume:o.resume,skip:o.skip,dispose:n}},AdmanHTML.VideoAdRenderer=function(t,e){"use strict";function i(){l.mainEl=t.videoEl,l.clickEl=t.clickEl||l.mainEl,b.forEach(function(w){l.mainEl.addEventListener(w,d)}),l.mainEl.parentNode?C={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),h=l.mainEl.play(),h&&h.then&&h.then(r,function(){l.mainEl.muted=!0,h=l.mainEl.play(),h.then(r,function(){})}),l.start(),u.render(),v.render()}function n(w){return w.indexOf("videolink.mycdn.me")!==-1}function o(){u.dispose(),v.dispose(),l.dispose(),b.forEach(function(w){l.mainEl.removeEventListener(w,d)}),C.src?(l.mainEl.src=C.src,l.mainEl.load(),l.mainEl.play(),c(C.time)):(l.mainEl.src="",l.mainEl.removeAttribute&&l.mainEl.removeAttribute("src"))}function a(w){if(w.indexOf("mradx")!==-1)return"rb";if(w.indexOf("videolink.mycdn.me")!==-1)return"ev";var A=new URL(w);return"evcdn:"+("hostname"in A?A.hostname:"")}function d(w){switch(w.type){case"loadstart":f=Date.now();break;case"loadeddata":D||(D=!0,N=Date.now()-f,t.stats.logMessage("firstLoadedData",N,{banner_id:g.bannerID,duration:Math.round(l.mainEl.duration),geo:g.geo!=="undefined"?g.geo:void 0,one_video_src:n(l.mainEl.src),slot:"slotId"in g?g.slotId:"no_slot_id",video_source:a(l.mainEl.src),resolution:("width"in g?g.width:"no_ad_width")+"x"+("height"in g?g.height:"no_ad_height"),label:"experimentLabel"in g?g.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":h||r();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 A=w.target&&typeof w.target=="object"&&w.target.error&&typeof w.target.error=="object"&&w.target.error.code?w.target.error.code:"unknown_code",M="video_el_err_code:"+A;t.stats.logError(M),t.stats.metrics("media_error_code",A),t.cb("onError")}}function r(){if(!y){y=!0;var w=AdmanHTML.Utils.isElement(l.mainEl)?l.mainEl:l.wrapperEl;t.viewability.start(w,e),l.onStart({muted:l.mainEl.muted})}}function c(w){if(l.mainEl)try{l.mainEl.currentTime=w}catch(A){}}var h,f,l=new AdmanHTML.AdRenderer(t,e),u=new AdmanHTML.DisclaimerRenderer(t,e),v=new AdmanHTML.CallToActionBtnRenderer(t,e),b=["loadstart","loadeddata","loadedmetadata","error","pause","play","playing","timeupdate","ended"],y=!1,g=e.getAd(),C={},D=!1,N=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",o()},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(w){var A=l.mainEl.muted?0:l.mainEl.volume;w>0&&l.mainEl.muted&&(l.mainEl.muted=!1),w===0&&(l.mainEl.muted=!0),l.mainEl.volume=w,(A===0&&w>0||A>0&&w===0)&&e.log(w?"volumeOn":"volumeOff")}}},AdmanHTML.VpaidJsAdRenderer=function(t,e){"use strict";function i(){var k;if(!c)return M.duration;try{k=c.callGet("adDuration"),k===void 0&&(k=M.duration)}catch(Z){k=M.duration}return k}function n(){if(w.start(),A.render(),AdmanHTML.Utils.isElement(t.videoEl)){var k=AdmanHTML.Utils.getElementViewport;k(t.videoEl)===k(w.wrapperEl)&&(t.videoEl.parentNode?(f=t.videoEl.parentNode,l=t.videoEl.nextSibling):h=!0,w.wrapperEl.insertBefore(t.videoEl,w.wrapperEl.childNodes[0]),AdmanHTML.Utils.mixin(t.videoEl.style,{position:"absolute",width:"100%",height:"100%",top:0,display:"block"}))}var Z=e.getSettings();Z&&(Z.loadTimeout&&(I=Z.loadTimeout),Z.startTimeout&&(m=Z.startTimeout)),AdmanHTML.Utils.isNRVpaid(M.src)&&typeof M.timeoutsFactor=="number"&&M.timeoutsFactor>1&&(I*=M.timeoutsFactor,m*=M.timeoutsFactor),t.cb("onStarted",[e.sectionType,e.getAdForApp()||{}]),a(I,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadInterface"),c.urlToNavigateOnClick=e.getAd().urlToNavigateOnClick,w.setView(c.load(M.src,t.config.vpaidHtmlInterface),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),e.log("render")}function o(){h&&t.videoEl.parentNode?t.videoEl.parentNode.removeChild(t.videoEl):f&&f.insertBefore(t.videoEl,l&&l.parentNode?l:null),d(),c.destroy(),A.dispose(),w.dispose()}function a(k,Z){d(),C=Z,v=setTimeout(r,k)}function d(){clearTimeout(v)}function r(){g=!0,d(),e.log("error"),C&&t.stats.logError(C,{bannerID:M.bannerID,isNRVpaid:AdmanHTML.Utils.isNRVpaid(M.src)}),t.cb("onError",{force:!0,message:C})}var c,h,f,l,u,v,b,y,g,C,D,N,w=new AdmanHTML.AdRenderer(t,e),A=new AdmanHTML.DisclaimerRenderer(t,e),M=e.getAd(),I=500,m=1e3;w.onResize=function(k,Z){c&&c.call("resizeAd",[k,Z,"normal"])},w.onClick=function(){};var U=function(k,Z){if(!g){var ae,V;switch(k){case"loaded":a(I,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":d();break;case"inited":c.call("handshakeVersion",["2.0"])?(a(m,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),c.call("initAd",[w.mainEl.offsetWidth,w.mainEl.offsetHeight,"normal",M.bitrate,{AdParameters:M.params}])):t.cb("onError");break;case"AdStarted":d(),y=c.callGet("adVolume"),b===void 0||c.autoMuted||c.callSet("adVolume",b),e.log("playbackStarted"),t.viewability.start(w.mainEl,e),t.cb("onVPAIDStarted"),t.stats.metrics("playing");break;case"AdLoaded":a(m,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:StartAd"),c.call("startAd"),t.stats.metrics("ready"),t.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":ae=i(),V=c.callGet("adRemainingTime"),ae>0&&V>=0?(w.onTimeRemained(ae-V,ae),A.onTimeRemained(ae-V,ae)):t.cb("onDurationChanged",[{remained:V,duration:ae}]);break;case"AdVolumeChange":var G=c.callGet("adVolume");(y===0&&G>0||y>0&&G===0)&&e.log(G?"volumeOn":"volumeOff"),y=G;break;case"AdVideoComplete":t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",ae=i(),w.onTimeRemained(ae,ae);break;case"AdStopped":case"AdSkipped":D||(D=!0,setTimeout(function(){u?u():t.cb("onCompleted")})),t.stats.metrics(k==="AdStopped"?"completed":"skipped");break;case"AdClickThru":Z.url&&Z.playerHandles&&window.open(Z.url,"_blank"),e.log("click"),t.cb("onClicked");break;case"AdError":t.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(Z&&Z.message||"")),t.stats.metrics("vpaid_error_message",Z&&Z.message||"vpaid script err"),t.cb("onError");break;case"AdPaused":N||(N=!0,t.cb("onPaused"));break;case"AdPlaying":N&&(N=!1,t.cb("onPlayed"));break;case"AdUserClose":e.log("closedByUser");break;case"video:pause":N||c&&c.call("pauseAd");break;case"video:play":N&&c&&c.call("resumeAd")}}},x=t.wrapper.ownerDocument,P=x.defaultView||x.parentWindow;return c=new AdmanHTML.VpaidLoader(t.videoEl,P),c.onVpaidEvent(U),{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",o()},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(k){c&&c.callSet("adVolume",k),b=k},skip:function(k){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",u=k;try{c&&c.call("skipAd")}catch(Z){}t.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(t,e){"use strict";function i(){var A;if(!c)return C.duration;try{A=c.callGet("adDuration")||C.duration}catch(M){A=C.duration}return A}function n(){g.start();var A=e.getSettings();A&&(A.loadTimeout&&(N=A.loadTimeout),A.startTimeout&&(w=A.startTimeout)),AdmanHTML.Utils.checkFlashAsync(function(M){if(M===AdmanHTML.Utils.FLASH_READY){t.cb("onStarted",[e.sectionType,e.getAdForApp()||{}]),a(N);var I="vpaidSwfUrl="+encodeURIComponent(C.src)+"&proxyMethodName="+D;g.setView(b.createSwfObject(t.config.vpaidJsInterface,{width:"100%",height:"100%"},{flashvars:I,allowScriptAccess:"always",wmode:"opaque"}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"})}else t.cb("onError")}),y.render(),e.log("render")}function o(){d(),g.dispose(),y.dispose(),window[D]=null}function a(A){d(),f=setTimeout(r,A)}function d(){clearTimeout(f)}function r(){v=!0,d(),e.log("error"),t.cb("onError")}var c,h,f,l,u,v,b=new AdmanHTML.SwfAdRenderer(t,e),y=new AdmanHTML.DisclaimerRenderer(t,e),g=b.super,C=e.getAd(),D="vpaidProxyMethod"+Date.now(),N=500,w=1e3;return g.onResize=function(A,M){c&&c.call("resizeAd",[A,M,"normal"])},g.onClick=function(){},window[D]=function(A,M){if(!v){var I;switch(A){case"loaded":a(N);break;case"vpaidloaded":d();break;case"inited":c=g.mainEl.getElementsByTagName("object")[0],c.call("handshakeVersion",["2.0"])?(a(w),c.call("initAd",[g.mainEl.offsetWidth,g.mainEl.offsetHeight,"normal",C.bitrate,C.params,""])):t.cb("onError");break;case"AdStarted":d(),u=c.callGet("adVolume"),l!==void 0&&c.callSet("adVolume",l),e.log("playbackStarted"),t.viewability.start(g.mainEl,e),t.cb("onVPAIDStarted");break;case"AdLoaded":a(w),c.call("startAd");break;case"AdRemainingTimeChange":I=i(),g.onTimeRemained(I-c.callGet("adRemainingTime"),I),y.onTimeRemained(I-c.callGet("adRemainingTime"),I);break;case"AdVolumeChange":var m=c.callGet("adVolume");(u===0&&m>0||u>0&&m===0)&&e.log(m?"volumeOn":"volumeOff"),u=m;break;case"AdVideoComplete":I=i(),g.onTimeRemained(I,I);break;case"AdStopped":case"AdSkipped":setTimeout(function(){h?h():t.cb("onCompleted")});break;case"AdClickThru":e.log("click"),t.cb("onClicked");break;case"AdError":t.stats.logError("EXTERNAL_SWF_ADVERTISMENT_ERROR:"+(M&&M.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:o,pause:function(){c&&c.call("pauseAd")},resume:function(){c&&c.call("resumeAd")},setVolume:function(A){c&&c.callSet("adVolume",A),l=A},skip:function(A){h=A;try{c&&c.call("skipAd")}catch(M){}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var Gp={};Du(Gp,{InterfaceLanguage:()=>En.InterfaceLanguage,VERSION:()=>Xn,VKNumericLanguage:()=>En.VKNumericLanguage,VideoFormat:()=>Xo.VideoFormat,VideoQuality:()=>Xo.VideoQuality,loadVKLangPack:()=>En.loadVKLangPack,registerPlayerWebComponent:()=>Wp});module.exports=ku(Gp);var ki="[",Vi="[!",en="]",yi={};var ot=Symbol(),Xt=Symbol("filename"),ds=Symbol("hmr"),us="http://www.w3.org/1999/xhtml";var ps,fs,cs=(fs=(ps=globalThis.process)==null?void 0:ps.env)==null?void 0:fs.NODE_ENV,W=cs&&!cs.toLowerCase().startsWith("prod");var ei=Array.isArray,ms=Array.prototype.indexOf,cr=Array.from,pr=Object.keys,ut=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,fr=Object.getOwnPropertyDescriptors,mr=Object.prototype,hs=Array.prototype,tn=Object.getPrototypeOf,hr=Object.isExtensible;var mt=()=>{};function nn(t){for(var e=0;e<t.length;e++)t[e]()}var Ot=Symbol("$state"),In=Symbol("legacy props"),vs=Symbol(""),lo=Symbol("proxy path");var Nn=3,ti=8;function uo(t){return t===this.v}function on(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function gs(t,e){return t!==e}function rn(t){return!on(t,this.v)}function _s(){if(W){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})}),N=b((e,t)=>{var n=E(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}}),P=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}),ee=b((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}}),te=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}),ne=b((e,t)=>{t.exports=function(e){return e==null}}),re=b((e,t)=>{var n=ne(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}}),ie=b((e,t)=>{var n=te(),r=re();t.exports=function(e){return n(r(e))}}),ae=b((e,t)=>{var n=j();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}}),oe=b((e,t)=>{t.exports={}}),se=b((e,t)=>{var n=oe(),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]}}),ce=b((e,t)=>{t.exports=O()({}.isPrototypeOf)}),le=b((e,t)=>{var n=w().navigator,r=n&&n.userAgent;t.exports=r?String(r):``}),ue=b((e,t)=>{var n=w(),r=le(),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}),de=b((e,t)=>{var n=ue(),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})}),fe=b((e,t)=>{t.exports=de()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`}),pe=b((e,t)=>{var n=se(),r=j(),i=ce(),a=fe(),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))}}),me=b((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}}),he=b((e,t)=>{var n=j(),r=me(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}}),ge=b((e,t)=>{var n=he(),r=ne();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}}),_e=b((e,t)=>{var n=N(),r=j(),i=ae(),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`)}}),ve=b((e,t)=>{t.exports=!0}),ye=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}}),be=b((e,t)=>{var n=ve(),r=w(),i=ye(),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`})}),xe=b((e,t)=>{var n=be();t.exports=function(e,t){return n[e]||(n[e]=t||{})}}),Se=b((e,t)=>{var n=re(),r=Object;t.exports=function(e){return r(n(e))}}),Ce=b((e,t)=>{var n=O(),r=Se(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}}),we=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)}}),Te=b((e,t)=>{var n=w(),r=xe(),i=Ce(),a=we(),o=de(),s=fe(),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]}}),Ee=b((e,t)=>{var n=N(),r=ae(),i=pe(),a=ge(),o=_e(),s=Te(),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)}}),De=b((e,t)=>{var n=Ee(),r=pe();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}}),Oe=b((e,t)=>{var n=w(),r=ae(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}}),ke=b((e,t)=>{var n=M(),r=T(),i=Oe();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),`a`,{get:function(){return 7}}).a!==7})}),Ae=b(e=>{var t=M(),n=N(),r=P(),i=ee(),a=ie(),o=De(),s=Ce(),c=ke(),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])}}),je=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}),Me=b((e,t)=>{var n=A(),r=he(),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)}}}),Ne=b((e,t)=>{var n=M(),r=T();t.exports=n&&r(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42})}),Pe=b((e,t)=>{var n=ae(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}}),Fe=b(e=>{var t=M(),n=ke(),r=Ne(),i=Pe(),a=De(),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}}),Ie=b((e,t)=>{var n=M(),r=Fe(),i=ee();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}}),Le=b((e,t)=>{var n=w(),r=D(),i=A(),a=j(),o=Ae().f,s=je(),c=oe(),l=Me(),u=Ie(),d=Ce();be();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)))}}),Re=b((e,t)=>{var n=xe(),r=we(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}}),ze=b((e,t)=>{t.exports=!T()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}),Be=b((e,t)=>{var n=Ce(),r=j(),i=Se(),a=Re(),o=ze(),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}}),Ve=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)}}),He=b((e,t)=>{var n=Ve();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}}),Ue=b((e,t)=>{var n=He(),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)}}),We=b((e,t)=>{var n=He(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}}),Ge=b((e,t)=>{var n=We();t.exports=function(e){return n(e.length)}}),Ke=b((e,t)=>{var n=ie(),r=Ue(),i=Ge(),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)}}),qe=b((e,t)=>{t.exports={}}),Je=b((e,t)=>{var n=O(),r=Ce(),i=ie(),a=Ke().indexOf,o=qe(),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}}),Ye=b((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]}),Xe=b((e,t)=>{var n=Je(),r=Ye();t.exports=Object.keys||function(e){return n(e,r)}}),Ze=b((e,t)=>{var n=M(),r=T(),i=O(),a=Be(),o=Xe(),s=ie(),c=P().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)}}),Qe=b(()=>{var e=Le(),t=Ze().entries;e({target:`Object`,stat:!0},{entries:function(e){return t(e)}})}),$e=b((e,t)=>{Qe(),t.exports=oe().Object.entries}),et=b((e,t)=>{t.exports=$e()}),tt=b((e,t)=>{t.exports=et()}),nt=b(()=>{var e=Le(),t=Ze().values;e({target:`Object`,stat:!0},{values:function(e){return t(e)}})}),rt=b((e,t)=>{nt(),t.exports=oe().Object.values}),it=b((e,t)=>{t.exports=rt()}),at=b((e,t)=>{t.exports=it()}),ot=b((e,t)=>{t.exports=function(){}}),st=b((e,t)=>{t.exports={}}),ct=b((e,t)=>{var n=w(),r=j(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))}),lt=b((e,t)=>{var n=ct(),r=w(),i=ae(),a=Ie(),o=Ce(),s=be(),c=Re(),l=qe(),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:_}}),ut=b((e,t)=>{var n=M(),r=Ce(),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)}}),dt=b(e=>{var t=M(),n=Ne(),r=Fe(),i=Pe(),a=ie(),o=Xe();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}}),ft=b((e,t)=>{t.exports=se()(`document`,`documentElement`)}),pt=b((e,t)=>{var n=Pe(),r=dt(),i=Ye(),a=qe(),o=ft(),s=Oe(),c=Re(),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)}}),mt=b((e,t)=>{var n=Ie();t.exports=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e}}),ht=b((e,t)=>{var n=T(),r=j(),i=ae(),a=pt(),o=Be(),s=mt(),c=Te(),l=ve(),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}}),gt=b((e,t)=>{var n=Te()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`}),_t=b((e,t)=>{var n=gt(),r=j(),i=k(),a=Te()(`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}}),vt=b((e,t)=>{var n=gt(),r=_t();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}}),yt=b((e,t)=>{var n=gt(),r=Fe().f,i=Ie(),a=Ce(),o=vt(),s=Te()(`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))}}),bt=b((e,t)=>{var n=ht().IteratorPrototype,r=pt(),i=ee(),a=yt(),o=st(),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}}),xt=b((e,t)=>{var n=O(),r=he();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}}),St=b((e,t)=>{var n=ae();t.exports=function(e){return n(e)||e===null}}),Ct=b((e,t)=>{var n=St(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}}),wt=b((e,t)=>{var n=xt(),r=ae(),i=re(),a=Ct();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)}),Tt=b((e,t)=>{var n=Le(),r=N(),i=ve(),a=ut(),o=j(),s=bt(),c=Be(),l=wt(),u=yt(),d=Ie(),f=mt(),p=Te(),m=st(),h=ht(),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),N=t===`Array`&&A.entries||j,P,ee,te;if(N&&(P=c(N.call(new e)),P!==Object.prototype&&P.next&&(!i&&c(P)!==v&&(l?l(P,v):o(P[b])||f(P,b,w)),u(P,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(ee={values:D(S),keys:T?M:D(x),entries:D(C)},E)for(te in ee)(y||k||!(te in A))&&f(A,te,ee[te]);else n({target:t,proto:!0,forced:y||k},ee);return(!i||E)&&A[b]!==M&&f(A,b,M,{name:h}),m[t]=M,ee}}),Et=b((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),Dt=b((e,t)=>{var n=ie(),r=ot(),i=st(),a=lt(),o=Fe().f,s=Tt(),c=Et(),l=ve(),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{}}),Ot=b((e,t)=>{var n=Te(),r=st(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}}),kt=b((e,t)=>{var n=_t(),r=ge(),i=ne(),a=st(),o=Te()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}}),At=b((e,t)=>{var n=N(),r=he(),i=Pe(),a=me(),o=kt(),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`)}}),jt=b((e,t)=>{var n=N(),r=Pe(),i=ge();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}}),Mt=b((e,t)=>{var n=Me(),r=N(),i=Pe(),a=me(),o=Ot(),s=Ge(),c=ce(),l=At(),u=kt(),d=jt(),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)}}),Nt=b((e,t)=>{var n=M(),r=Fe(),i=ee();t.exports=function(e,t,a){n?r.f(e,t,i(0,a)):e[t]=a}}),Pt=b(()=>{var e=Le(),t=Mt(),n=Nt();e({target:`Object`,stat:!0},{fromEntries:function(e){var r={};return t(e,function(e,t){n(r,e,t)},{AS_ENTRIES:!0}),r}})}),Ft=b((e,t)=>{Dt(),Pt(),t.exports=oe().Object.fromEntries}),It=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}}),Lt=b(()=>{Dt();var e=It(),t=w(),n=yt(),r=st();for(i in e)n(t[i],i),r[i]=r.Array;var i}),Rt=b((e,t)=>{var n=Ft();Lt(),t.exports=n}),zt=b((e,t)=>{t.exports=Rt()}),Bt=b((e,t)=>{var n=ae(),r=k(),i=Te()(`match`);t.exports=function(e){var t;return n(e)&&((t=e[i])===void 0?r(e)===`RegExp`:!!t)}}),Vt=b((e,t)=>{var n=_t(),r=String;t.exports=function(e){if(n(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return r(e)}}),Ht=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})}}),Ut=b((e,t)=>{var n=Pe();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}}),Wt=b((e,t)=>{var n=N(),r=Ce(),i=ce(),a=Ht(),o=Ut(),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}}),Gt=b((e,t)=>{var n=O(),r=Se(),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})}}),Kt=b(()=>{var e=Le(),t=N(),n=O(),r=re(),i=j(),a=ae(),o=Bt(),s=Vt(),c=ge(),l=Wt(),u=Gt(),d=Te(),f=ve(),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}})}),qt=b((e,t)=>{t.exports=se()}),Jt=b((e,t)=>{Kt(),t.exports=qt()(`String`,`replaceAll`)}),Yt=b((e,t)=>{t.exports=Jt()}),Xt=b((e,t)=>{t.exports=Yt()}),Zt=b(()=>{var e=Le(),t=Ke().includes,n=T(),r=ot();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`)}),Qt=b((e,t)=>{Zt(),t.exports=qt()(`Array`,`includes`)}),$t=b((e,t)=>{t.exports=Qt()}),en=b((e,t)=>{t.exports=$t()}),tn=b(()=>{var e=Le(),t=Se(),n=Ge(),r=He(),i=ot();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`)}),nn=b((e,t)=>{tn(),t.exports=qt()(`Array`,`at`)}),rn=b((e,t)=>{t.exports=nn()}),an=b((e,t)=>{t.exports=rn()}),on=b((e,t)=>{var n=w(),r=le(),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`}()}),sn=b((e,t)=>{t.exports=on()===`NODE`}),cn=b((e,t)=>{var n=Fe();t.exports=function(e,t,r){return n.f(e,t,r)}}),ln=b((e,t)=>{var n=se(),r=cn(),i=Te(),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}})}}),un=b((e,t)=>{var n=ce(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}}),dn=b((e,t)=>{var n=O(),r=j(),i=be(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource}),fn=b((e,t)=>{var n=O(),r=T(),i=j(),a=_t(),o=se(),s=dn(),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}),pn=b((e,t)=>{var n=fn(),r=me(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a constructor`)}}),mn=b((e,t)=>{var n=Pe(),r=pn(),i=ne(),a=Te()(`species`);t.exports=function(e,t){var o=n(e).constructor,s;return o===void 0||i(s=n(o)[a])?t:r(s)}}),hn=b((e,t)=>{t.exports=O()([].slice)}),gn=b((e,t)=>{var n=TypeError;t.exports=function(e,t){if(e<t)throw new n(`Not enough arguments`);return e}}),_n=b((e,t)=>{var n=le();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)}),vn=b((e,t)=>{var n=w(),r=D(),i=Me(),a=j(),o=Ce(),s=T(),c=ft(),l=hn(),u=Oe(),d=gn(),f=_n(),p=sn(),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()}},N=function(e){return function(){M(e)}},P=function(e){M(e.data)},ee=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(N(e))}:_&&_.now?O=function(e){_.now(N(e))}:y&&!f?(k=new y,A=k.port2,k.port1.onmessage=P,O=i(A.postMessage,A)):n.addEventListener&&a(n.postMessage)&&!n.importScripts&&E&&E.protocol!==`file:`&&!s(ee)?(O=ee,n.addEventListener(`message`,P,!1)):O=C in u(`script`)?function(e){c.appendChild(u(`script`))[C]=function(){c.removeChild(this),M(e)}}:function(e){setTimeout(N(e),0)}),t.exports={set:m,clear:h}}),yn=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}}),bn=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}),xn=b((e,t)=>{var n=le();t.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<`u`}),Sn=b((e,t)=>{var n=le();t.exports=/web0s(?!.*chrome)/i.test(n)}),Cn=b((e,t)=>{var n=w(),r=yn(),i=Me(),a=vn().set,o=bn(),s=_n(),c=xn(),l=Sn(),u=sn(),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}),wn=b((e,t)=>{t.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}}}),Tn=b((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}}),En=b((e,t)=>{t.exports=w().Promise}),Dn=b((e,t)=>{var n=w(),r=En(),i=j(),a=je(),o=dn(),s=Te(),c=on(),l=ve(),u=ue(),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}}),On=b((e,t)=>{var n=he(),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)}}),kn=b(()=>{var e=Le(),t=ve(),n=sn(),r=w(),i=oe(),a=N(),o=mt(),s=wt(),c=yt(),l=ln(),u=he(),d=j(),f=ae(),p=un(),m=mn(),h=vn().set,g=Cn(),_=wn(),v=Tn(),y=bn(),b=lt(),x=En(),S=Dn(),C=On(),T=`Promise`,E=S.CONSTRUCTOR,D=S.REJECTION_EVENT,O=S.SUBCLASSING,k=b.getterFor(T),A=b.set,M=x&&x.prototype,P=x,ee=M,te=r.TypeError,ne=r.document,re=r.process,ie=C.f,se=ie,ce=!!(ne&&ne.createEvent&&r.dispatchEvent),le=`unhandledrejection`,ue=`rejectionhandled`,de=0,fe=1,pe=2,me=1,ge=2,_e,ye,be,xe,Se=function(e){var t;return f(e)&&d(t=e.then)?t:!1},Ce=function(e,t){var n=t.value,r=t.state===fe,i=r?e.ok:e.fail,o=e.resolve,s=e.reject,c=e.domain,l,u,d;try{i?(r||(t.rejection===ge&&Oe(t),t.rejection=me),i===!0?l=n:(c&&c.enter(),l=i(n),c&&(c.exit(),d=!0)),l===e.promise?s(new te(`Promise-chain cycle`)):(u=Se(l))?a(u,l,o,s):o(l)):s(n)}catch(e){c&&!d&&c.exit(),s(e)}},we=function(e,t){e.notified||(e.notified=!0,g(function(){for(var n=e.reactions,r;r=n.get();)Ce(r,e);e.notified=!1,t&&!e.rejection&&Ee(e)}))},Te=function(e,t,n){var i,a;ce?(i=ne.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===le&&_(`Unhandled promise rejection`,n)},Ee=function(e){a(h,r,function(){var t=e.facade,r=e.value,i=De(e),a;if(i&&(a=v(function(){n?re.emit(`unhandledRejection`,r,t):Te(le,t,r)}),e.rejection=n||De(e)?ge:me,a.error))throw a.value})},De=function(e){return e.rejection!==me&&!e.parent},Oe=function(e){a(h,r,function(){var t=e.facade;n?re.emit(`rejectionHandled`,t):Te(ue,t,e.value)})},ke=function(e,t,n){return function(r){e(t,r,n)}},Ae=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=pe,we(e,!0))},je=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new te(`Promise can't be resolved itself`);var r=Se(t);r?g(function(){var n={done:!1};try{a(r,t,ke(je,n,e),ke(Ae,n,e))}catch(t){Ae(n,t,e)}}):(e.value=t,e.state=fe,we(e,!1))}catch(t){Ae({done:!1},t,e)}}};if(E&&(P=function(e){p(this,ee),u(e),a(_e,this);var t=k(this);try{e(ke(je,t),ke(Ae,t))}catch(e){Ae(t,e)}},ee=P.prototype,_e=function(e){A(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new y,rejection:!1,state:de,value:null})},_e.prototype=o(ee,`then`,function(e,t){var r=k(this),i=ie(m(this,P));return r.parent=!0,i.ok=d(e)?e:!0,i.fail=d(t)&&t,i.domain=n?re.domain:void 0,r.state===de?r.reactions.add(i):g(function(){Ce(i,r)}),i.promise}),ye=function(){var e=new _e,t=k(e);this.promise=e,this.resolve=ke(je,t),this.reject=ke(Ae,t)},C.f=ie=function(e){return e===P||e===be?new ye(e):se(e)},!t&&d(x)&&M!==Object.prototype)){xe=M.then,O||o(M,`then`,function(e,t){var n=this;return new P(function(e,t){a(xe,n,e,t)}).then(e,t)},{unsafe:!0});try{delete M.constructor}catch{}s&&s(M,ee)}e({global:!0,constructor:!0,wrap:!0,forced:E},{Promise:P}),be=i.Promise,c(P,T,!1,!0),l(T)}),An=b((e,t)=>{var n=Te()(`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}}),jn=b((e,t)=>{var n=En(),r=An();t.exports=Dn().CONSTRUCTOR||!r(function(e){n.all(e).then(void 0,function(){})})}),Mn=b(()=>{var e=Le(),t=N(),n=he(),r=On(),i=Tn(),a=Mt();e({target:`Promise`,stat:!0,forced:jn()},{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}})}),Nn=b(()=>{var e=Le(),t=ve(),n=Dn().CONSTRUCTOR,r=En(),i=se(),a=j(),o=mt(),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}),Pn=b(()=>{var e=Le(),t=N(),n=he(),r=On(),i=Tn(),a=Mt();e({target:`Promise`,stat:!0,forced:jn()},{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}})}),Fn=b(()=>{var e=Le(),t=On(),n=Dn().CONSTRUCTOR;e({target:`Promise`,stat:!0,forced:n},{reject:function(e){var n=t.f(this),r=n.reject;return r(e),n.promise}})}),In=b((e,t)=>{var n=Pe(),r=ae(),i=On();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}}),Ln=b(()=>{var e=Le(),t=se(),n=ve(),r=En(),i=Dn().CONSTRUCTOR,a=In(),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)}})}),Rn=b(()=>{kn(),Mn(),Nn(),Pn(),Fn(),Ln()}),zn=b(()=>{var e=Le(),t=ve(),n=En(),r=T(),i=se(),a=j(),o=mn(),s=In(),c=mt(),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}),Bn=b((e,t)=>{Rn(),zn(),t.exports=qt()(`Promise`,`finally`)}),Vn=b((e,t)=>{t.exports=Bn()}),Hn=b((e,t)=>{t.exports=Vn()}),Un={};C(Un,{registerPlayerWebComponent:()=>dp,loadVKLangPack:()=>lp.loadVKLangPack,VideoQuality:()=>up.VideoQuality,VideoFormat:()=>up.VideoFormat,VKNumericLanguage:()=>lp.VKNumericLanguage,VERSION:()=>su,InterfaceLanguage:()=>lp.InterfaceLanguage}),module.exports=v(Un);var F=1,Wn=2,Gn=4,Kn=8,qn=16,Jn=1,Yn=2,Xn=`[`,Zn=`[!`,Qn=`[?`,$n=`]`,er={},tr=Symbol(),nr=Symbol(`filename`),rr=`http://www.w3.org/1999/xhtml`,I=!0,ir=Array.isArray,ar=Array.prototype.indexOf,or=Array.prototype.includes,sr=Array.from;Object.keys;var cr=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,dr=Object.prototype,fr=Array.prototype,pr=Object.getPrototypeOf,mr=Object.isExtensible,hr=()=>{};function gr(e){for(var t=0;t<e.length;t++)e[t]()}function _r(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var vr=2,yr=4,br=8,xr=1<<24,Sr=16,Cr=32,wr=64,Tr=128,Er=512,Dr=1024,Or=2048,kr=4096,Ar=8192,jr=16384,Mr=32768,Nr=65536,Pr=1<<17,Fr=1<<18,Ir=1<<19,Lr=1<<20,Rr=65536,zr=1<<21,Br=1<<22,Vr=1<<23,Hr=Symbol(`$state`),Ur=Symbol(`legacy props`),Wr=Symbol(``),Gr=Symbol(`proxy path`),Kr=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")}},qr=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),Jr=3,Yr=8;function Xr(e){if(I){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 Zr(){if(I){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 Qr(){if(I){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/effect_in_teardown`);throw
|
|
11
|
-
\`$
|
|
12
|
-
https://svelte.dev/e/
|
|
13
|
-
|
|
14
|
-
https://svelte.dev/e/
|
|
15
|
-
|
|
16
|
-
https://svelte.dev/e/
|
|
17
|
-
Cannot do \`bind:${
|
|
18
|
-
https://svelte.dev/e/props_invalid_value`);throw
|
|
19
|
-
The \`${
|
|
20
|
-
https://svelte.dev/e/rune_outside_svelte`);throw
|
|
21
|
-
|
|
22
|
-
`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
https://svelte.dev/e/hydration_mismatch`,_o,yo):console.warn("https://svelte.dev/e/hydration_mismatch")}function Rs(){W?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
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 $r(e){if(I){let t=Error(`effect_in_teardown
|
|
11
|
+
\`${e}\` cannot be used inside an effect cleanup function
|
|
12
|
+
https://svelte.dev/e/effect_in_teardown`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ei(){if(I){let e=Error(`effect_in_unowned_derived
|
|
13
|
+
Effect cannot be created inside a \`$derived\` value that was not itself created inside an effect
|
|
14
|
+
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 ti(e){if(I){let t=Error(`effect_orphan
|
|
15
|
+
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
16
|
+
https://svelte.dev/e/effect_orphan`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_orphan`)}function ni(){if(I){let e=Error(`effect_update_depth_exceeded
|
|
17
|
+
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
18
|
+
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 ri(){if(I){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 ii(e){if(I){let t=Error(`props_invalid_value
|
|
19
|
+
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
20
|
+
https://svelte.dev/e/props_invalid_value`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/props_invalid_value`)}function ai(e){if(I){let t=Error(`rune_outside_svelte
|
|
21
|
+
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
22
|
+
https://svelte.dev/e/rune_outside_svelte`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/rune_outside_svelte`)}function oi(){if(I){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 si(){if(I){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 ci(){if(I){let e=Error(`state_prototype_fixed
|
|
23
|
+
Cannot set prototype of \`$state\` object
|
|
24
|
+
https://svelte.dev/e/state_prototype_fixed`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function li(){if(I){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 ui(){if(I){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 di=`font-weight: bold`,fi=`font-weight: normal`;function pi(e,t){I?console.warn(`%c[svelte] await_waterfall
|
|
25
|
+
%cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
26
|
+
https://svelte.dev/e/await_waterfall`,di,fi):console.warn(`https://svelte.dev/e/await_waterfall`)}function mi(e,t,n){I?console.warn(`%c[svelte] hydration_attribute_changed
|
|
27
|
+
%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
|
|
28
|
+
https://svelte.dev/e/hydration_attribute_changed`,di,fi):console.warn(`https://svelte.dev/e/hydration_attribute_changed`)}function hi(e){I?console.warn(`%c[svelte] hydration_mismatch
|
|
29
|
+
%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`}
|
|
30
|
+
https://svelte.dev/e/hydration_mismatch`,di,fi):console.warn(`https://svelte.dev/e/hydration_mismatch`)}function gi(){I?console.warn(`%c[svelte] lifecycle_double_unmount
|
|
30
31
|
%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 Qi=!1,pn=null,Yi=!1,Ei=!1;function wr(t){Ei=t}var Yn=[],Bn=[],be=null,Ft=!1;function ht(t){be=t}var ye=null;function Tt(t){ye=t}var yt=null;function vo(t){be!==null&&be.f&2097152&&(yt===null?yt=[be,[t]]:yt[1].push(t))}var Ct=null,Yt=0,zt=null;function $s(t){zt=t}var el=1,Io=0,Ti=!1,No=null;function Rn(){return++el}function zi(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 o,a,d=(e&512)!==0,r=n&&ye!==null&&!Ti,c=i.length;if(d||r){var h=t,f=h.parent;for(o=0;o<c;o++)a=i[o],(d||!((l=a==null?void 0:a.reactions)!=null&&l.includes(h)))&&((u=a.reactions)!=null?u:a.reactions=[]).push(h);d&&(h.f^=512),r&&f!==null&&(f.f&256)===0&&(h.f^=256)}for(o=0;o<c;o++)if(a=i[o],zi(a)&&Er(a),a.wv>t.wv)return!0}(!n||ye!==null&&!Ti)&&Lt(t,1024)}return!1}function tl(t,e,i=!0){var n=t.reactions;if(n!==null)for(var o=0;o<n.length;o++){var a=n[o];yt!=null&&yt[1].includes(t)&&yt[0]===be||((a.f&2)!==0?tl(a,e,!1):e===a&&(i?Lt(a,2048):(a.f&1024)!==0&&Lt(a,4096),Vn(a)))}}function mo(t){var v,b;var e=Ct,i=Yt,n=zt,o=be,a=Ti,d=yt,r=we,c=Ft,h=t.f;Ct=null,Yt=0,zt=null,Ti=(h&256)!==0&&(Ft||!Yi||be===null),be=(h&96)===0?t:null,yt=null,kn(t.ctx),Ft=!1,Io++,t.f|=2097152;try{var f=(0,t.fn)(),l=t.deps;if(Ct!==null){var u;if(Fn(t,Yt),l!==null&&Yt>0)for(l.length=Yt+Ct.length,u=0;u<Ct.length;u++)l[Yt+u]=Ct[u];else t.deps=l=Ct;if(!Ti||(h&2)!==0&&t.reactions!==null)for(u=Yt;u<l.length;u++)((b=(v=l[u]).reactions)!=null?b:v.reactions=[]).push(t)}else l!==null&&Yt<l.length&&(Fn(t,Yt),l.length=Yt);if(hi()&&zt!==null&&!Ft&&l!==null&&(t.f&6146)===0)for(u=0;u<zt.length;u++)tl(zt[u],t);return o!==null&&o!==t&&(Io++,zt!==null&&(n===null?n=zt:n.push(...zt))),f}catch(y){Zs(y)}finally{Ct=e,Yt=i,zt=n,be=o,Ti=a,yt=d,kn(r),Ft=c,t.f^=2097152}}function zu(t,e){let i=e.reactions;if(i!==null){var n=ms.call(i,t);if(n!==-1){var o=i.length-1;o===0?i=e.reactions=null:(i[n]=i[o],i.pop())}}i===null&&(e.f&2)!==0&&(Ct===null||!Ct.includes(e))&&(Lt(e,4096),(e.f&768)===0&&(e.f^=512),fo(e),Fn(e,0))}function Fn(t,e){var i=t.deps;if(i!==null)for(var n=e;n<i.length;n++)zu(t,i[n])}function ln(t){var e=t.f;if((e&16384)===0){Lt(t,1024);var i=ye,n=Yi;if(ye=t,Yi=!0,W){var o=ni;Cn(t.component_function)}try{(e&16)!==0?Qs(t):Nr(t),Ir(t);var a=mo(t);if(t.teardown=typeof a=="function"?a:null,t.wv=el,W&&mi&&(t.f&2048)!==0&&t.deps!==null)for(var d of t.deps)d.set_during_effect&&(d.wv=Rn(),d.set_during_effect=!1);W&&Bn.push(t)}finally{Yi=n,ye=i,W&&Cn(o)}}}function Js(){console.error("Last ten effects were: ",Bn.slice(-10).map(t=>t.fn)),Bn=[]}function Fu(){try{xs()}catch(t){if(W&&ut(t,"stack",{value:""}),pn!==null)if(W)try{Qn(t,pn)}catch(e){throw Js(),e}else Qn(t,pn);else throw W&&Js(),t}}function $r(){var t=Yi;try{var e=0;for(Yi=!0;Yn.length>0;){e++>1e3&&Fu();var i=Yn,n=i.length;Yn=[];for(var o=0;o<n;o++){var a=Qu(i[o]);Hu(a)}an.clear()}}finally{Qi=!1,Yi=t,pn=null,W&&(Bn=[])}}function Hu(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var n=t[i];(n.f&24576)===0&&zi(n)&&(ln(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Dr(n):n.fn=null))}}function Vn(t){Qi||(Qi=!0,queueMicrotask($r));for(var e=pn=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}Yn.push(e)}function Qu(t){for(var e=[],i=t;i!==null;){var n=i.f,o=(n&96)!==0,a=o&&(n&1024)!==0;if(!a&&(n&8192)===0){(n&4)!==0?e.push(i):o?i.f^=1024:zi(i)&&ln(i);var d=i.first;if(d!==null){i=d;continue}}var r=i.parent;for(i=i.next;i===null&&r!==null;)i=r.next,r=r.parent}return e}function Wn(t){var e;for(t&&(Qi=!0,$r(),Qi=!0,e=t());;){if(qs(),Yn.length===0)return Qi=!1,pn=null,W&&(Bn=[]),e;Qi=!0,$r()}}function j(t){var e=t.f,i=(e&2)!==0;if(No!==null&&No.add(t),be!==null&&!Ft){if(!(yt!=null&&yt[1].includes(t))||yt[0]!==be){var n=be.deps;t.rv<Io&&(t.rv=Io,Ct===null&&n!==null&&n[Yt]===t?Yt++:Ct===null?Ct=[t]:(!Ti||!Ct.includes(t))&&Ct.push(t))}}else if(i&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&256)===0&&(o.f^=256)}if(i&&(o=t,zi(o)&&Er(o)),W&&mi&&!Ft&&Dn!==null&&be!==null&&Dn.reaction===be)if(t.trace)t.trace();else{var d=bi("TracedAt");if(d){var r=Dn.entries.get(t);r===void 0&&(r={traces:[]},Dn.entries.set(t,r));var c=r.traces[r.traces.length-1];d.stack!==(c==null?void 0:c.stack)&&r.traces.push(d)}}return Ei&&an.has(t)?an.get(t):t.v}function Ze(t){var e=Ft;try{return Ft=!0,t()}finally{Ft=e}}var Yu=-7169;function Lt(t,e){t.f=t.f&Yu|e}var Or=new Set,Do=new Set;function fn(t){for(var e=0;e<t.length;e++)Or.add(t[e]);for(var i of Do)i(t)}function Gn(t){var D;var e=this,i=e.ownerDocument,n=t.type,o=((D=t.composedPath)==null?void 0:D.call(t))||[],a=o[0]||t.target,d=0,r=t.__root;if(r){var c=o.indexOf(r);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var h=o.indexOf(e);if(h===-1)return;c<=h&&(d=c)}if(a=o[d]||t.target,a!==e){ut(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=be,l=ye;ht(null),Tt(null);try{for(var u,v=[];a!==null;){var b=a.assignedSlot||a.parentNode||a.host||null;try{var y=a["__"+n];if(y!=null&&(!a.disabled||t.target===a))if(ei(y)){var[g,...C]=y;g.apply(a,[t,...C])}else y.call(a,t)}catch(N){u?v.push(N):u=N}if(t.cancelBubble||b===e||b===null)break;a=b}if(u){for(let N of v)queueMicrotask(()=>{throw N});throw u}}finally{t.__root=e,delete t.currentTarget,ht(f),Tt(l)}}}var Wu;function nl(){Wu=void 0}function qn(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Bt(t,e){var i=ye;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function Ce(t,e){var i=(e&1)!==0,n=(e&2)!==0,o,a=!t.startsWith("<!>");return()=>{if(ge)return Bt(Te,null),Te;o===void 0&&(o=qn(a?t:"<!>"+t),i||(o=dt(o)));var d=n||Un?document.importNode(o,!0):o.cloneNode(!0);if(i){var r=dt(d),c=d.lastChild;Bt(r,c)}else Bt(d,d);return d}}function Ku(t,e,i="svg"){var n=!t.startsWith("<!>"),o=(e&1)!==0,a=`<${i}>${n?t:"<!>"+t}</${i}>`,d;return()=>{if(ge)return Bt(Te,null),Te;if(!d){var r=qn(a),c=dt(r);if(o)for(d=document.createDocumentFragment();dt(c);)d.appendChild(dt(c));else d=dt(c)}var h=d.cloneNode(!0);if(o){var f=dt(h),l=h.lastChild;Bt(f,l)}else Bt(h,h);return h}}function gi(t,e){return Ku(t,e,"svg")}function Rr(){if(ge)return Bt(Te,null),Te;var t=document.createDocumentFragment(),e=document.createComment(""),i=ri();return t.append(e,i),Bt(e,i),t}function ve(t,e){if(ge){ye.nodes_end=Te,St();return}t!==null&&t.before(e)}var Zu=["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 Ph=[...Zu,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Ju=["touchstart","touchmove"];function al(t){return Ju.includes(t)}var Xu=["$state","$state.raw","$derived","$derived.by"],Vh=[...Xu,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var Pr=!0;function tt(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 $i(t,e){return sl(t,e)}function jr(t,e){var d;Ao(),e.intro=(d=e.intro)!=null?d:!1;let i=e.target,n=ge,o=Te;try{for(var a=dt(i);a&&(a.nodeType!==ti||a.data!==ki);)a=kt(a);if(!a)throw yi;Qt(!0),lt(a),St();let r=sl(t,{...e,anchor:a});if(Te===null||Te.nodeType!==ti||Te.data!==en)throw Fi(),yi;return Qt(!1),r}catch(r){if(r===yi)return e.recover===!1&&Es(),Ao(),xo(i),Qt(!1),$i(t,e);throw r}finally{Qt(n),lt(o),nl()}}var mn=new Map;function sl(t,{target:e,anchor:i,props:n={},events:o,context:a,intro:d=!0}){Ao();var r=new Set,c=l=>{for(var u=0;u<l.length;u++){var v=l[u];if(!r.has(v)){r.add(v);var b=al(v);e.addEventListener(v,Gn,{passive:b});var y=mn.get(v);y===void 0?(document.addEventListener(v,Gn,{passive:b}),mn.set(v,1)):mn.set(v,y+1)}}};c(cr(Or)),Do.add(c);var h=void 0,f=Hs(()=>{var l=i!=null?i:e.appendChild(ri());return At(()=>{if(a){ct({});var u=we;u.c=a}o&&(n.$$events=o),ge&&Bt(l,null),Pr=d,h=t(l,n)||{},Pr=!0,ge&&(ye.nodes_end=Te),a&&pt()}),()=>{var b;for(var u of r){e.removeEventListener(u,Gn);var v=mn.get(u);--v===0?(document.removeEventListener(u,Gn),mn.delete(u)):mn.set(u,v)}Do.delete(c),l!==i&&((b=l.parentNode)==null||b.removeChild(l))}});return Vr.set(h,f),h}var Vr=new WeakMap;function Kn(t,e){let i=Vr.get(t);return i?(Vr.delete(t),i(e)):(W&&Rs(),Promise.resolve())}function Lo(t,e,...i){var n=t,o=mt,a;bt(()=>{o!==(o=e())&&(a&&(_t(a),a=null),W&&o==null&&Ts(),a=At(()=>o(n,...i)))},65536),ge&&(n=Te)}if(W){let t=function(e){if(!(e in globalThis)){let i;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(i!==void 0)return i;ws(e)},set:n=>{i=n}})}};nc=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var nc;function hn(t){we===null&&Ln("onMount"),fi&&we.l!==null?ic(we).m.push(t):Si(()=>{let e=Ze(t);if(typeof e=="function")return e})}function ic(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var cl=new Map;function pl(t,e){var i=cl.get(t);i||(i=new Set,cl.set(t,i)),i.add(e)}function Ye(t,e,[i,n]=[0,0]){ge&&i===0&&St();var o=t,a=null,d=null,r=ot,c=i>0?65536:0,h=!1;let f=(u,v=!0)=>{h=!0,l(v,u)},l=(u,v)=>{if(r===(r=u))return;let b=!1;if(ge&&n!==-1){if(i===0){let g=Tr(o);g===ki?n=0:g===Vi?n=1/0:(n=parseInt(g.substring(1)),n!==n&&(n=r?1/0:-1))}let y=n>i;!!r===y&&(o=jn(),lt(o),Qt(!1),b=!0,n=-1)}r?(a?cn(a):v&&(a=At(()=>v(o))),d&&si(d,()=>{d=null})):(d?cn(d):v&&(d=At(()=>v(o,[i+1,n]))),a&&si(a,()=>{a=null})),b&&Qt(!0)};bt(()=>{h=!1,e(f),h||l(null,null)},c),ge&&(o=Te)}function Ur(t,e,i){ge&&St();var n=t,o=ot,a,d=hi()?gs:on;bt(()=>{d(o,o=e())&&(a&&si(a),a=At(()=>i(n)))}),ge&&(n=Te)}var Hr;function fl(t){return Hr=t.target,new Fr(t)}var Ii,Zt,Fr=class{constructor(e){ao(this,Ii);ao(this,Zt);var a,d;var i=new Map,n=(r,c)=>{var h=wi(c,!1,!1);return i.set(r,h),h};let o=new Proxy({...e.props||{},$$events:{}},{get(r,c){var h;return j((h=i.get(c))!=null?h:n(c,Reflect.get(r,c)))},has(r,c){var h;return c===In?!0:(j((h=i.get(c))!=null?h:n(c,Reflect.get(r,c))),Reflect.has(r,c))},set(r,c,h){var f;return Ne((f=i.get(c))!=null?f:n(c,h),h),Reflect.set(r,c,h)}});so(this,Zt,(e.hydrate?jr:$i)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:(a=e.intro)!=null?a:!1,recover:e.recover})),(!((d=e==null?void 0:e.props)!=null&&d.$$host)||e.sync===!1)&&Wn(),so(this,Ii,o.$$events);for(let r of Object.keys(Nt(this,Zt)))r==="$set"||r==="$destroy"||r==="$on"||ut(this,r,{get(){return Nt(this,Zt)[r]},set(c){Nt(this,Zt)[r]=c},enumerable:!0});Nt(this,Zt).$set=r=>{Object.assign(o,r)},Nt(this,Zt).$destroy=()=>{Kn(Nt(this,Zt))}}$set(e){Nt(this,Zt).$set(e)}$on(e,i){Nt(this,Ii)[e]=Nt(this,Ii)[e]||[];let n=(...o)=>i.call(this,...o);return Nt(this,Ii)[e].push(n),()=>{Nt(this,Ii)[e]=Nt(this,Ii)[e].filter(o=>o!==n)}}$destroy(){Nt(this,Zt).$destroy()}};Ii=new WeakMap,Zt=new WeakMap;function ft(t,e){li(()=>{var o,a,d;var i=t.getRootNode(),n=i.host?i:(d=(o=i.head)!=null?o:i.ownerDocument.head)!=null?d:(a=Hr)==null?void 0:a.parentNode;if(!(n!=null&&n.querySelector("#"+e.hash))){let r=document.createElement("style");r.id=e.hash,r.textContent=e.code,n.appendChild(r),W&&pl(e.hash,r)}})}var hl=[...`
|
|
40
|
-
\r\f \v\uFEFF`];function gl(t,e,i){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),i){for(var o in i)if(i[o])n=n?n+" "+o:o;else if(n.length)for(var a=o.length,d=0;(d=n.indexOf(o,d))>=0;){var r=d+a;(d===0||hl.includes(n[d-1]))&&(r===n.length||hl.includes(n[r]))?n=(d===0?"":n.substring(0,d))+n.substring(r+1):d=r}}return n===""?null:n}function vl(t,e=!1){var i=e?" !important;":";",n="";for(var o in t){var a=t[o];a!=null&&a!==""&&(n+=" "+o+": "+a+i)}return n}function Qr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function _l(t,e){if(e){var i="",n,o;if(Array.isArray(e)?(n=e[0],o=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,d=0,r=!1,c=[];n&&c.push(...Object.keys(n).map(Qr)),o&&c.push(...Object.keys(o).map(Qr));var h=0,f=-1;let y=t.length;for(var l=0;l<y;l++){var u=t[l];if(r?u==="/"&&t[l-1]==="*"&&(r=!1):a?a===u&&(a=!1):u==="/"&&t[l+1]==="*"?r=!0:u==='"'||u==="'"?a=u:u==="("?d++:u===")"&&d--,!r&&a===!1&&d===0){if(u===":"&&f===-1)f=l;else if(u===";"||l===y-1){if(f!==-1){var v=Qr(t.substring(h,f).trim());if(!c.includes(v)){u!==";"&&l++;var b=t.substring(h,l).trim();i+=" "+b+";"}}h=l+1,f=-1}}}}return n&&(i+=vl(n)),o&&(i+=vl(o,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function vn(t,e,i,n,o,a){var d=t.__className;if(ge||d!==i||d===void 0){var r=gl(i,n,a);(!ge||r!==t.getAttribute("class"))&&(r==null?t.removeAttribute("class"):e?t.className=r:t.setAttribute("class",r)),t.__className=i}else if(a&&o!==a)for(var c in a){var h=!!a[c];(o==null||h!==!!o[c])&&t.classList.toggle(c,h)}return a}function Yr(t,e={},i,n){for(var o in i){var a=i[o];e[o]!==a&&(i[o]==null?t.style.removeProperty(o):t.style.setProperty(o,a,n))}}function Oi(t,e,i,n){var o=t.__style;if(ge||o!==e){var a=_l(e,n);(!ge||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else n&&(Array.isArray(n)?(Yr(t,i==null?void 0:i[0],n[0]),Yr(t,i==null?void 0:i[1],n[1],"important")):Yr(t,i,n));return n}var bc=Symbol("class"),Ac=Symbol("style"),xc=Symbol("is custom element"),Ec=Symbol("is html");function Wt(t,e,i,n){var o=Tc(t);if(ge&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||wc(t,e,i!=null?i:"");return}o[e]!==(o[e]=i)&&(e==="loading"&&(t[vs]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Mc(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function Tc(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[xc]:t.nodeName.includes("-"),[Ec]:t.namespaceURI===us}}var yl=new Map;function Mc(t){var e=yl.get(t.nodeName);if(e)return e;yl.set(t.nodeName,e=[]);for(var i,n=t,o=Element.prototype;o!==n;){i=fr(n);for(var a in i)i[a].set&&e.push(a);n=tn(n)}return e}function wc(t,e,i){var n;W&&(e==="srcset"&&Sc(t,i)||Br((n=t.getAttribute(e))!=null?n:"",i)||Os(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Br(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function bl(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Sc(t,e){var i=bl(t.srcset),n=bl(e);return n.length===i.length&&n.every(([o,a],d)=>a===i[d][1]&&(Br(i[d][0],o)||Br(o,i[d][0])))}function Al(t,e){return t===e||(t==null?void 0:t[Ot])===e}function Bi(t={},e,i,n){return Rt(()=>{var o,a;return It(()=>{o=a,a=(n==null?void 0:n())||[],Ze(()=>{t!==i(...a)&&(e(t,...a),o&&Al(i(...o),t)&&e(null,...o))})}),()=>{li(()=>{a&&Al(i(...a),t)&&e(null,...a)})}}),t}function Zn(t,e,i){if(t==null)return e(void 0),i&&i(void 0),mt;let n=Ze(()=>t.subscribe(e,i));return n.unsubscribe?()=>n.unsubscribe():n}var gn=[];function Jt(t,e){return{subscribe:H(t,e).subscribe}}function H(t,e=mt){let i=null,n=new Set;function o(r){if(on(t,r)&&(t=r,i)){let c=!gn.length;for(let h of n)h[1](),gn.push(h,t);if(c){for(let h=0;h<gn.length;h+=2)gn[h][0](gn[h+1]);gn.length=0}}}function a(r){o(r(t))}function d(r,c=mt){let h=[r,c];return n.add(h),n.size===1&&(i=e(o,a)||mt),r(t),()=>{n.delete(h),n.size===0&&i&&(i(),i=null)}}return{set:o,update:a,subscribe:d}}function rt(t,e,i){let n=!Array.isArray(t),o=n?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let a=e.length<2;return Jt(i,(d,r)=>{let c=!1,h=[],f=0,l=mt,u=()=>{if(f)return;l();let b=e(n?h[0]:h,d,r);a?d(b):l=typeof b=="function"?b:mt},v=o.map((b,y)=>Zn(b,g=>{h[y]=g,f&=~(1<<y),c&&u()},()=>{f|=1<<y}));return c=!0,u(),function(){nn(v),l(),c=!1}})}function Ae(t){let e;return Zn(t,i=>e=i)(),e}var Co=!1,Wr=Symbol();function di(t,e,i){var a;let n=(a=i[e])!=null?a:i[e]={store:null,source:wi(void 0),unsubscribe:mt};if(n.store!==t&&!(Wr in i))if(n.unsubscribe(),n.store=t!=null?t:null,t==null)n.source.v=void 0,n.unsubscribe=mt;else{var o=!0;n.unsubscribe=Zn(t,d=>{o?n.source.v=d:Ne(n.source,d)}),o=!1}return t&&Wr in i?Ae(t):j(n.source)}function Wi(){let t={};function e(){Dt(()=>{for(var i in t)t[i].unsubscribe();ut(t,Wr,{enumerable:!1,value:!0})})}return[t,e]}function Gr(t){var e=Co;try{return Co=!1,[t(),Co]}finally{Co=e}}function xl(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function xe(t,e,i,n){var I,m;var o=(i&1)!==0,a=!fi||(i&2)!==0,d=(i&8)!==0,r=(i&16)!==0,c=!1,h;d?[h,c]=Gr(()=>t[e]):h=t[e];var f=Ot in t||In in t,l=d&&((m=(I=$t(t,e))==null?void 0:I.set)!=null?m:f&&e in t&&(U=>t[e]=U))||void 0,u=n,v=!0,b=!1,y=()=>(b=!0,v&&(v=!1,r?u=Ze(n):u=n),u);h===void 0&&n!==void 0&&(l&&a&&Ms(e),h=y(),l&&l(h));var g;if(a)g=()=>{var U=t[e];return U===void 0?y():(v=!0,b=!1,U)};else{var C=(o?Ai:ho)(()=>t[e]);C.f|=131072,g=()=>{var U=j(C);return U!==void 0&&(u=void 0),U===void 0?u:U}}if((i&4)===0&&a)return g;if(l){var D=t.$$legacy;return function(U,x){return arguments.length>0?((!a||!x||D||c)&&l(x?g():U),U):g()}}var N=!1,w=!1,A=wi(h),M=Ai(()=>{var U=g(),x=j(A);return N?(N=!1,w=!0,x):(w=!1,A.v=U)});return d&&j(M),o||(M.equals=rn),function(U,x){if(No!==null&&(N=w,g(),j(A)),arguments.length>0){let P=x?j(M):a&&d?Mt(U):U;if(!M.equals(P)){if(N=!0,Ne(A,P),b&&u!==void 0&&(u=P),xl(M))return U;Ze(()=>j(M))}return U}return xl(M)?M.v:j(M)}}var Rc;typeof HTMLElement=="function"&&(Rc=class extends HTMLElement{constructor(e,i,n){super();qt(this,"$$ctor");qt(this,"$$s");qt(this,"$$c");qt(this,"$$cn",!1);qt(this,"$$d",{});qt(this,"$$r",!1);qt(this,"$$p_d",{});qt(this,"$$l",{});qt(this,"$$l_u",new Map);qt(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 o=this.$$c.$on(e,i);this.$$l_u.set(i,o)}super.addEventListener(e,i,n)}removeEventListener(e,i,n){if(super.removeEventListener(e,i,n),this.$$c){let o=this.$$l_u.get(i);o&&(o(),this.$$l_u.delete(i))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let i=function(a){return d=>{let r=document.createElement("slot");a!=="default"&&(r.name=a),ve(d,r)}};var e=i;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let n={},o=Pc(this);for(let a of this.$$s)a in o&&(a==="default"&&!this.$$d.children?(this.$$d.children=i(a),n.default=!0):n[a]=i(a));for(let a of this.attributes){let d=this.$$g_p(a.name);d in this.$$d||(this.$$d[d]=qr(d,a.value,this.$$p_d,"toProp"))}for(let a in this.$$p_d)!(a in this.$$d)&&this[a]!==void 0&&(this.$$d[a]=this[a],delete this[a]);this.$$c=fl({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}}),this.$$me=wo(()=>{It(()=>{var a;this.$$r=!0;for(let d of pr(this.$$c)){if(!((a=this.$$p_d[d])!=null&&a.reflect))continue;this.$$d[d]=this.$$c[d];let r=qr(d,this.$$d[d],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[d].attribute||d):this.setAttribute(this.$$p_d[d].attribute||d,r)}this.$$r=!1})});for(let a in this.$$l)for(let d of this.$$l[a]){let r=this.$$c.$on(a,d);this.$$l_u.set(d,r)}this.$$l={}}}attributeChangedCallback(e,i,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=qr(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 pr(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function qr(t,e,i,n){var a;let o=(a=i[t])==null?void 0:a.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!i[t])return e;if(n==="toAttribute")switch(o){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(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Pc(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var El="5";var Tl,Ml,wl;typeof window!="undefined"&&((wl=(Ml=(Tl=window.__svelte)!=null?Tl:window.__svelte={}).v)!=null?wl:Ml.v=new Set).add(El);var od=require("@vkontakte/videoplayer-core/es2018"),BS=require("@vkontakte/videoplayer-core/es2018"),rd=require("@vkontakte/videoplayer-shared/es2018"),ad=require("@vkontakte/videoplayer-statistics/es2018");var Gi=require("@vkontakte/videoplayer-shared/es2018");var Vc={debugLog:!1,devNullLog:!1,defaultLanguage:Gi.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:Gi.VideoQuality.Q_480P,highQualityLimit:Gi.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"},Sl=t=>(0,Gi.fillWithDefault)(t,Vc),Il=t=>On("ui-config",t),_n=()=>$n("ui-config");var Jn="vk_player_debug_panel_opened";var Nl="videoplayer",Dl="videoplayer";var Oo=require("@vkontakte/videoplayer-shared/es2018"),Cl=require("@vkontakte/videoplayer-core/es2018"),$l=require("@vkontakte/videoplayer-statistics/es2018");var Ll="prod",Xn="1.0.4-dev.84183efb.0";var kl=(t,e,i)=>{let n=document.createElement("a");n.href=t,n.download=`${e}.${i}`,n.style.display="none",n.click()};var Ol=Symbol("storeContext"),Rl=t=>{On(Ol,t),Ll==="dev"&&(window.app={store:t})},Ri=()=>{let t=$n(Ol);return(0,Oo.assertNonNullable)(t,"Store context is empty!"),t},Ve=(t,e)=>Ro(t,t.getValue(),e),Ro=(t,e,i)=>Jt(e,n=>{let o=t.subscribe(a=>{n(a),i==null||i(a)});return()=>o.unsubscribe()}),Pl=(t,e,i,n,o=["meta config not provided"])=>{var m,U,x,P,k,Z,ae,V,G;let a=t.info,{width:d,height:r}=Ae(i.ui.playerSize),c=(U=(m=a.throughputEstimation$.getValue())==null?void 0:m.toFixed(0))!=null?U:0,h=(P=(x=a.rttEstimation$.getValue())==null?void 0:x.toFixed(0))!=null?P:0,f=a.isAutoQualityEnabled$.getValue()?"auto":"manual",l=`${Xn} (core: ${Cl.VERSION}, stat: ${$l.VERSION}, shared: ${Oo.VERSION})`,u=Ae(i.state.errorLog$),v=u.length?`
|
|
41
|
-
|
|
42
|
-
`,
|
|
43
|
-
|
|
44
|
-
`;return Ee+ee+de}).join(`
|
|
45
|
-
`):void 0,b=i.state.isAudioDisabled?"disabled":Ae(i.state.isAudioAvailable$)?void 0:"unavailable",y=t.info.currentVideoStream$.getValue(),g=t.info.currentAudioStream$.getValue(),C=[];y&&C.push(`Video: ${(k=y==null?void 0:y.codec)!=null?k:""}`+(y!=null&&y.hdr?" (HDR)":"")),g&&C.push(`Audio: ${(Z=g==null?void 0:g.codec)!=null?Z:""}`+(g!=null&&g.language?` (${g.language})`:""));let D=a.currentQuality$.getValue(),N="";if(D){let F=a.availableQualitiesFps$.getValue()[D];N=F?`${F}fps`:""}let w=a.httpConnectionType$.getValue(),A=(V=(ae=a.currentBuffer$.getValue())==null?void 0:ae.end)!=null?V:0,M=Math.max(A-Ae(i.state.positionExact$),0),I={Version:l,Browser:navigator.userAgent,Config:o.join(", "),"United video id":String(i.videoId),TraceId:n,VSID:Ae(i.vsid),"Content host":a.hostname$.getValue(),"Connection type":w?w+(a.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${c}Kbps @ ${h}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":e!=null&&e.sources?Object.keys(e.sources).join(", "):"",Streams:C.join(", "),Quality:`${f} ${D!=null?D:""} ${N}`,"Available qualities":a.availableQualities$.getValue().join(", "),Audio:b,Position:`${Ae(i.state.positionExact$)}s`,Buffer:`${M}s`,State:`${Ae(i.playerPhase)} ${(G=a.playbackState$.getValue())!=null?G:""}`,"Player size":`${d}x${r}`,URL:window.location.href,Errors:v};return Object.entries(I).filter(([F,J])=>J!==void 0).map(([F,J])=>`${F}: ${J}`).join(`
|
|
46
|
-
`)},Vl=(t,e,i)=>{var m,U,x,P;let n=t.info,{width:o,height:a}=Ae(i.ui.playerSize),d={version:Xn,viewport:`${o}x${a}`,volume:Math.round(Ae(i.state.volume$)*100)};d.id=i.videoId,n.currentFormat$.getValue()&&(d.provider=n.currentFormat$.getValue()),n.hostname$.getValue()&&(d.cdn=n.hostname$.getValue());let h=n.intrinsicVideoSize$.getValue();h&&(d.videoSize=`${h.width}x${h.height}`);let f=n.currentBuffer$.getValue(),l=n.currentNativeBuffer$.getValue(),u=n.isLive$.getValue(),v=n.liveBufferTime$.getValue();f&&l&&(u&&v?(d.buffer=f.end-v,d.nativeBuffer=l.end-v):(d.buffer=Math.max(f.end-Ae(i.state.positionExact$),0),d.nativeBuffer=Math.max(l.end-Ae(i.state.positionExact$),0))),d.position=Ae(i.state.positionExact$);let b=n.throughputEstimation$.getValue();b&&(d.speed=b);let y=n.videoBitrate$.getValue();y&&(d.bitrate=y);let g=n.liveLatency$.getValue();g&&(d.liveLatency=g);let C=n.currentVideoSegmentLength$.getValue();C&&(d.currentVideoSegmentLength=C);let D=n.currentAudioSegmentLength$.getValue();D&&(d.currentAudioSegmentLength=D);let N=Ae(i.vsid);typeof N=="string"&&(d.vsid=N);let w=(m=t.info.currentVideoStream$.getValue())==null?void 0:m.codec;w&&(d.videoCodec=w);let A=(U=t.info.currentAudioStream$.getValue())==null?void 0:U.codec;A&&(d.audioCodec=A),((x=t.info.currentVideoStream$.getValue())==null?void 0:x.hdr)&&(d.hdr=!0);let I=(P=t.info.currentAudioStream$.getValue())==null?void 0:P.language;return I&&(d.audioLanguage=I),d},jl=(t,e)=>kl(t,e,"mp4"),Ul=()=>{let e=[],i=0;return{add:(n,o)=>{e[i]=[n,o],i=(i+1)%10},find:n=>e.find(([o])=>o===n)}},$o=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}};var We=require("@vkontakte/videoplayer-shared/es2018"),Nw=require("@vkontakte/videoplayer-core/es2018"),jc="vk_player_",Fl="vk_player_prefer_traffic_saving_enabled",Uc="vk_player_preferred_volume",zc="vk_player_prefer_volume_mute",Xr="vk_player_preferred_quality",Kr="vk_player_preferred_default_quality_settings",Zr="vk_player_preferred_quality_settings_by_video",Hl="vk_player_preferred_stream_language",Ql="vk_player_preferred_rate";var Jr="vk_player_preferred_subtitles_language",Fc="vk_player_user_video_prefs",Dw=`${jc}preview_track_close_tooltip`,Hc=t=>t>1?1:t<0?0:t;var Po=()=>{let t=We.safeStorage.get(Uc);return(0,We.isNullable)(t)?void 0:Hc(parseFloat(t))},ea=(t,e)=>We.safeStorage.set(Xr,JSON.stringify({videoId:t,value:e})),Vo=()=>We.safeStorage.remove(Xr),ta=t=>{let e=We.safeStorage.get(Xr);if((0,We.isNullable)(e))return;let{videoId:i,value:n}=JSON.parse(e);if(t!==i){Vo();return}return n},Qc=(t,e)=>{e?We.safeStorage.set(t,"true"):We.safeStorage.remove(t)},Yl=t=>We.safeStorage.get(t)==="true";var Bl=()=>Yl(zc),zl=t=>Qc(Fl,t),ia=()=>Yl(Fl),Wl=()=>We.safeStorage.get(Hl),Gl=t=>We.safeStorage.set(Hl,t),na=()=>We.safeStorage.get(Jr),Yc=t=>{t?We.safeStorage.set(Jr,t):We.safeStorage.remove(Jr)},ql=t=>We.safeStorage.set(Ql,JSON.stringify({rate:t})),Kl=()=>{let t=We.safeStorage.get(Ql);if((0,We.isNullable)(t))return;let{rate:e}=JSON.parse(t);return e};var Bc=()=>{let t=f=>{We.safeStorage.set(Kr,JSON.stringify(f))},e=()=>{try{let f=We.safeStorage.get(Kr);return f?JSON.parse(f):null}catch(f){return null}},i=()=>{try{let f=We.safeStorage.get(Zr);return f?JSON.parse(f):null}catch(f){return null}},n=f=>{We.safeStorage.set(Zr,JSON.stringify(f))},o=f=>{h(f);let l=f?i():null;if(l&&(l==null?void 0:l.videoId)===f)return{...l,appliesTo:"to-video"};l&&a();let u=e();return u?{...u,appliesTo:"as-default"}:(t({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},a=()=>{We.safeStorage.remove(Zr)},d=()=>{We.safeStorage.remove(Kr)},r=(f,l="as-default")=>{f.type==="exact_quality"||l==="to-video"?n(f):t(f)},c=f=>{let l=o(f);if(l){switch(l.type){case"traffic_saving":zl(!0);break;case"exact_quality":ea(f,l.quality)}a(),d()}},h=f=>{let l=ta(f);if(l){n({type:"exact_quality",videoId:f,quality:l});return}ia()&&t({type:"traffic_saving",videoId:f}),zl(!1),Vo()};return{getPreferredQualitySettings:o,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:r,savePreferredDefaultQualitySettings:t,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:e,getPreferredSubtitlesLanguage:na,savePreferredSubtitlesLanguage:Yc}},{getPreferredQualitySettings:Lw,migrateSettingsToLegacyWay:Zl,savePreferredQualitySettings:kw,savePreferredDefaultQualitySettings:Cw,removePreferredQualitySettingsByVideo:$w,getPreferredDefaultQualitySettings:Ow}=Bc();var Wc=()=>{let t=We.safeStorage.get(Fc);if(t)try{return JSON.parse(t)}catch(e){return null}return null},jo=(t,e)=>{var o,a;let i=Wc();return(a=(o=i==null?void 0:i[t])==null?void 0:o[e])!=null?a:null};var Pw=require("@vkontakte/videoplayer-core/es2018");var Uo=class{constructor(e){this.value=e,this.next=null}};var yn=class{constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let i=new Uo(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 Gc=Ce('<div class="container s-8"><canvas class="s-8"></canvas></div>'),qc={hash:"s-8",code:".container.s-8{display:inline-block;height:16px;width:120px}canvas.s-8{margin-top:2px;transform:scaleY(-1)}"};function eo(t,e){ct(e,!0),ft(t,qc);let i=xe(e,"values",19,()=>[]),n=He(void 0),o=He(null),a=16,d=120,r=60,c=d/r;hn(()=>{j(n).width=d,j(n).height=a,Ne(o,j(n).getContext("2d"),!0)});function h(u,v,b,y,g){g===0&&(g=1),u.fillStyle="#fff",u.fillRect(v,b,y,g)}Si(()=>{let u="";if(j(o)){let v=i()[0];for(let y=1;y<i().length;y++)i()[y]>v&&(v=i()[y]);j(o).clearRect(0,0,d,a);let b=r-1;for(let y=i().length-1;y>=0;y--){let g=b*c,C=v>0?a*(i()[y]/v):0;h(j(o),g,0,c,C),u=C+" "+u,b--}}});var f=Gc(),l=re(f);Bi(l,u=>Ne(n,u),()=>j(n)),oe(f),ve(t,f),pt()}var sa=require("@vkontakte/videoplayer-shared/es2018");var bn=require("@vkontakte/videoplayer-shared/es2018");var Kc={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
|
-
|
|
32
|
+
https://svelte.dev/e/lifecycle_double_unmount`,di,fi):console.warn(`https://svelte.dev/e/lifecycle_double_unmount`)}function _i(e){I?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
33
|
+
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
34
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,di,fi):console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`)}function vi(){I?console.warn(`%c[svelte] state_proxy_unmount
|
|
35
|
+
%cTried to unmount a state proxy, rather than a component
|
|
36
|
+
https://svelte.dev/e/state_proxy_unmount`,di,fi):console.warn(`https://svelte.dev/e/state_proxy_unmount`)}function yi(){I?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",di,fi):console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var L=!1;function bi(e){L=e}var R;function xi(e){if(e===null)throw hi(),er;return R=e}function Si(){return xi(rs(R))}function z(e){if(L){if(rs(R)!==null)throw hi(),er;R=e}}function Ci(e=1){if(L){for(var t=e,n=R;t--;)n=rs(n);R=n}}function wi(e=!0){for(var t=0,n=R;;){if(n.nodeType===Yr){var r=n.data;if(r===$n){if(t===0)return n;--t}else (r===Xn||r===Zn||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=rs(n);e&&n.remove(),n=i}}function Ti(e){if(!e||e.nodeType!==Yr)throw hi(),er;return e.data}function Ei(e){return e===this.v}function Di(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Oi(e){return!Di(e,this.v)}var ki=!1,Ai=!1,ji=!1;function Mi(){Ai=!0}var Ni=null;function Pi(e,t){return e.label=t,Fi(e.v,t),e}function Fi(e,t){var n;return e==null||(n=e[Gr])==null||n.call(e,t),e}function Ii(e){let t=Error(),n=Li();return n.length===0?null:(n.unshift(`
|
|
37
|
+
`),cr(t,`stack`,{value:n.join(`
|
|
38
|
+
`)}),cr(t,`name`,{value:e}),t)}function Li(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=Error().stack;if(Error.stackTraceLimit=e,!t)return[];let n=t.split(`
|
|
39
|
+
`),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 B=null;function Ri(e){B=e}var zi=null;function Bi(e){zi=e}var Vi=null;function Hi(e){Vi=e}function Ui(e){return Ji(`getContext`).get(e)}function Wi(e,t){let n=Ji(`setContext`);if(ki){var r=W.f;!U&&(r&Cr)!==0&&!B.i||oi()}return n.set(e,t),t}function Gi(e,t=!1,n){B={p:B,i:!1,c:null,e:null,s:e,x:null,l:Ai&&!t?{s:null,u:null,$:[]}:null},I&&(B.function=n,Vi=n)}function Ki(e){var t=B,n=t.e;if(n!==null){t.e=null;for(var r of n)hs(r)}return e!==void 0&&(t.x=e),t.i=!0,B=t.p,I&&(Vi=B?.function??null),e??{}}function qi(){return!Ai||B!==null&&B.l===null}function Ji(e){var t;return B===null&&Xr(e),(t=B).c??(t.c=new Map(Yi(B)||void 0))}function Yi(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var Xi=[];function Zi(){var e=Xi;Xi=[],gr(e)}function Qi(e){if(Xi.length===0&&!ma){var t=Xi;queueMicrotask(()=>{t===Xi&&Zi()})}Xi.push(e)}var $i=new WeakMap;function ea(e){var t=W;if(t===null)return U.f|=Vr,e;if(I&&e instanceof Error&&!$i.has(e)&&$i.set(e,na(e,t)),(t.f&Mr)===0&&(t.f&yr)===0)throw I&&!t.parent&&e instanceof Error&&ra(e),e;ta(e,t)}function ta(e,t){for(;t!==null;){if((t.f&Tr)!==0){if((t.f&Mr)===0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw I&&e instanceof Error&&ra(e),e}function na(e,t){let n=lr(e,`message`);if(!(n&&!n.configurable)){for(var r=Zo?` `:` `,i=`
|
|
40
|
+
${r}in ${t.fn?.name||`<unknown>`}`,a=t.ctx;a!==null;)i+=`
|
|
41
|
+
${r}in ${a.function?.[nr].split(`/`).pop()}`,a=a.p;return{message:e.message+`
|
|
42
|
+
${i}
|
|
43
|
+
`,stack:e.stack?.split(`
|
|
44
|
+
`).filter(e=>!e.includes(`svelte/src/internal`)).join(`
|
|
45
|
+
`)}}}function ra(e){let t=$i.get(e);t&&(cr(e,`message`,{value:t.message}),cr(e,`stack`,{value:t.stack}))}var ia=~(Or|kr|Dr);function aa(e,t){e.f=e.f&ia|t}function oa(e){(e.f&Er)!==0||e.deps===null?aa(e,Dr):aa(e,kr)}function sa(e){if(e!==null)for(let t of e)(t.f&vr)===0||(t.f&Rr)===0||(t.f^=Rr,sa(t.deps))}function ca(e,t,n){(e.f&Or)===0?(e.f&kr)!==0&&n.add(e):t.add(e),sa(e.deps),aa(e,Dr)}var la=new Set,ua=null,da=null,fa=[],pa=null,ma=!1,ha=null,ga=new WeakMap,_a=new WeakMap,va=new WeakMap,ya=new WeakMap,ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=new WeakSet;class Ea{constructor(){t(this,Ta),e(this,`current`,new Map),e(this,`previous`,new Map),n(this,ga,new Set),n(this,_a,new Set),n(this,va,0),n(this,ya,0),n(this,ba,null),n(this,xa,new Set),n(this,Sa,new Set),n(this,Ca,new Map),e(this,`is_fork`,!1),n(this,wa,!1)}skip_effect(e){r(Ca,this).has(e)||r(Ca,this).set(e,{d:[],m:[]})}unskip_effect(e){var t=r(Ca,this).get(e);if(t){r(Ca,this).delete(e);for(var n of t.d)aa(n,Or),La(n);for(n of t.m)aa(n,kr),La(n)}}process(e){fa=[],this.apply();var t=ha=[],n=[];for(let r of e)i(Ta,this,Oa).call(this,r,t,n);if(ha=null,i(Ta,this,Da).call(this)){i(Ta,this,ka).call(this,n),i(Ta,this,ka).call(this,t);for(let[e,t]of r(Ca,this))Ra(e,t)}else{ua=null;for(let e of r(ga,this))e(this);r(ga,this).clear(),r(va,this)===0&&i(Ta,this,Aa).call(this),Pa(n),Pa(t),r(xa,this).clear(),r(Sa,this).clear(),r(ba,this)?.resolve()}da=null}capture(e,t){t!==tr&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&Vr)===0&&(this.current.set(e,e.v),da?.set(e,e.v))}activate(){ua=this,this.apply()}deactivate(){ua===this&&(ua=null,da=null)}flush(){if(fa.length>0)ua=this,ja();else if(r(va,this)===0&&!this.is_fork){for(let e of r(ga,this))e(this);r(ga,this).clear(),i(Ta,this,Aa).call(this),r(ba,this)?.resolve()}this.deactivate()}discard(){for(let e of r(_a,this))e(this);r(_a,this).clear()}increment(e){a(va,this,r(va,this)+1),e&&a(ya,this,r(ya,this)+1)}decrement(e){a(va,this,r(va,this)-1),e&&a(ya,this,r(ya,this)-1),!r(wa,this)&&(a(wa,this,!0),Qi(()=>{a(wa,this,!1),i(Ta,this,Da).call(this)?fa.length>0&&this.flush():this.revive()}))}revive(){for(let e of r(xa,this))r(Sa,this).delete(e),aa(e,Or),La(e);for(let e of r(Sa,this))aa(e,kr),La(e);this.flush()}oncommit(e){r(ga,this).add(e)}ondiscard(e){r(_a,this).add(e)}settled(){return(r(ba,this)??a(ba,this,_r())).promise}static ensure(){if(ua===null){let e=ua=new Ea;la.add(ua),ma||Qi(()=>{ua===e&&e.flush()})}return ua}apply(){if(!(!ki||!this.is_fork&&la.size===1)){da=new Map(this.current);for(let e of la)if(e!==this)for(let[t,n]of e.previous)da.has(t)||da.set(t,n)}}}function Da(){return this.is_fork||r(ya,this)>0}function Oa(e,t,n){e.f^=Dr;for(var i=e.first;i!==null;){var a=i.f,o=(a&(Cr|wr))!==0;if(!(o&&(a&Dr)!==0||(a&Ar)!==0||r(Ca,this).has(i))&&i.fn!==null){o?i.f^=Dr:(a&yr)===0?ki&&(a&(br|xr))!==0?n.push(i):Qs(i)&&((a&Sr)!==0&&r(Sa,this).add(i),rc(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 ka(e){for(var t=0;t<e.length;t+=1)ca(e[t],r(xa,this),r(Sa,this))}function Aa(){if(la.size>1){this.previous.clear();var e=ua,t=da,n=!0;for(let e of la){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=fa;fa=[];let n=new Set,o=new Map;for(let e of t)Fa(e,r,n,o);if(fa.length>0){ua=e,e.apply();for(let t of fa)i(Ta,e,Oa).call(e,t,[],[]);e.deactivate()}fa=a}}ua=e,da=t}r(Ca,this).clear(),la.delete(this)}function ja(){var e=I?new Set:null;try{for(var t=0;fa.length>0;){var n=Ea.ensure();if(t++>1e3){if(I){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)}Ma()}if(n.process(fa),jo.clear(),I)for(let t of n.current.keys())e.add(t)}}finally{if(fa=[],pa=null,ha=null,I)for(let t of e)t.updated=null}}function Ma(){try{ni()}catch(e){I&&cr(e,`stack`,{value:``}),ta(e,pa)}}var Na=null;function Pa(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(jr|Ar))===0&&Qs(r)&&(Na=new Set,rc(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Os(r),Na?.size>0)){jo.clear();for(let e of Na){if((e.f&(jr|Ar))!==0)continue;let t=[e],n=e.parent;for(;n!==null;)Na.has(n)&&(Na.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];(n.f&(jr|Ar))===0&&rc(n)}}Na.clear()}}Na=null}}function Fa(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&vr)===0?(e&(Br|Sr))!==0&&(e&Or)===0&&Ia(i,t,r)&&(aa(i,Or),La(i)):Fa(i,t,n,r)}}function Ia(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(or.call(t,r))return!0;if((r.f&vr)!==0&&Ia(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function La(e){var t=pa=e,n=t.b;if(n?.is_pending&&(e.f&(yr|br|xr))!==0&&(e.f&Mr)===0){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(ha!==null&&t===W&&(ki||(e.f&br)===0))return;if((r&(wr|Cr))!==0){if((r&Dr)===0)return;t.f^=Dr}}fa.push(t)}function Ra(e,t){if(!((e.f&Cr)!==0&&(e.f&Dr)!==0)){(e.f&Or)===0?(e.f&kr)!==0&&t.m.push(e):t.d.push(e),aa(e,Dr);for(var n=e.first;n!==null;)Ra(n,t),n=n.next}}function za(e){let t=0,n=Fo(0),r;return I&&Pi(n,`createSubscriber version`),()=>{fs()&&(G(n),ys(()=>(t===0&&(r=oc(()=>e(()=>Vo(n)))),t+=1,()=>{Qi(()=>{--t,t===0&&(r?.(),r=void 0,Vo(n))})})))}}var Ba=Nr|Ir;function Va(e,t,n,r){new ao(e,t,n,r)}var Ha=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ga=new WeakMap,Ka=new WeakMap,qa=new WeakMap,Ja=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Za=new WeakMap,Qa=new WeakMap,$a=new WeakMap,eo=new WeakMap,to=new WeakMap,no=new WeakMap,ro=new WeakMap,io=new WeakSet;class ao{constructor(o,s,c,l){t(this,io),e(this,`parent`,void 0),e(this,`is_pending`,!1),e(this,`transform_error`,void 0),n(this,Ha,void 0),n(this,Ua,L?R:null),n(this,Wa,void 0),n(this,Ga,void 0),n(this,Ka,void 0),n(this,qa,null),n(this,Ja,null),n(this,Ya,null),n(this,Xa,null),n(this,Za,0),n(this,Qa,0),n(this,$a,!1),n(this,eo,new Set),n(this,to,new Set),n(this,no,null),n(this,ro,za(()=>(a(no,this,Fo(r(Za,this))),I&&Pi(r(no,this),`$effect.pending()`),()=>{a(no,this,null)}))),a(Ha,this,o),a(Wa,this,s),a(Ga,this,e=>{var t=W;t.b=this,t.f|=Tr,c(e)}),this.parent=W.b,this.transform_error=l??this.parent?.transform_error??(e=>e),a(Ka,this,xs(()=>{if(L){let e=r(Ua,this);Si();let t=e.data===Zn;if(e.data.startsWith(Qn)){let t=JSON.parse(e.data.slice(Qn.length));i(io,this,so).call(this,t)}else t?i(io,this,co).call(this):i(io,this,oo).call(this)}else i(io,this,lo).call(this)},Ba)),L&&a(Ha,this,R)}defer_effect(e){ca(e,r(eo,this),r(to,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!r(Wa,this).pending}update_pending_count(e){i(io,this,po).call(this,e),a(Za,this,r(Za,this)+e),!(!r(no,this)||r($a,this))&&(a($a,this,!0),Qi(()=>{a($a,this,!1),r(no,this)&&zo(r(no,this),r(Za,this))}))}get_effect_pending(){return r(ro,this).call(this),G(r(no,this))}error(e){var t=r(Wa,this).onerror;let n=r(Wa,this).failed;if(!t&&!n)throw e;r(qa,this)&&(Es(r(qa,this)),a(qa,this,null)),r(Ja,this)&&(Es(r(Ja,this)),a(Ja,this,null)),r(Ya,this)&&(Es(r(Ya,this)),a(Ya,this,null)),L&&(xi(r(Ua,this)),Ci(),xi(wi()));var o=!1,s=!1;let c=()=>{if(o){yi();return}o=!0,s&&ui(),r(Ya,this)!==null&&ks(r(Ya,this),()=>{a(Ya,this,null)}),i(io,this,fo).call(this,()=>{Ea.ensure(),i(io,this,lo).call(this)})},l=e=>{try{s=!0,t?.(e,c),s=!1}catch(e){ta(e,r(Ka,this)&&r(Ka,this).parent)}n&&a(Ya,this,i(io,this,fo).call(this,()=>{Ea.ensure();try{return Ss(()=>{var t=W;t.b=this,t.f|=Tr,n(r(Ha,this),()=>e,()=>c)})}catch(e){return ta(e,r(Ka,this).parent),null}}))};Qi(()=>{var t;try{t=this.transform_error(e)}catch(e){ta(e,r(Ka,this)&&r(Ka,this).parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(l,e=>ta(e,r(Ka,this)&&r(Ka,this).parent)):l(t)})}}function oo(){try{a(qa,this,Ss(()=>r(Ga,this).call(this,r(Ha,this))))}catch(e){this.error(e)}}function so(e){let t=r(Wa,this).failed;t&&a(Ya,this,Ss(()=>{t(r(Ha,this),()=>e,()=>()=>{})}))}function co(){let e=r(Wa,this).pending;e&&(this.is_pending=!0,a(Ja,this,Ss(()=>e(r(Ha,this)))),Qi(()=>{var e=a(Xa,this,document.createDocumentFragment()),t=ts();e.append(t),a(qa,this,i(io,this,fo).call(this,()=>(Ea.ensure(),Ss(()=>r(Ga,this).call(this,t))))),r(Qa,this)===0&&(r(Ha,this).before(e),a(Xa,this,null),ks(r(Ja,this),()=>{a(Ja,this,null)}),i(io,this,uo).call(this))}))}function lo(){try{if(this.is_pending=this.has_pending_snippet(),a(Qa,this,0),a(Za,this,0),a(qa,this,Ss(()=>{r(Ga,this).call(this,r(Ha,this))})),r(Qa,this)>0){var e=a(Xa,this,document.createDocumentFragment());Ns(r(qa,this),e);let t=r(Wa,this).pending;a(Ja,this,Ss(()=>t(r(Ha,this))))}else i(io,this,uo).call(this)}catch(e){this.error(e)}}function uo(){this.is_pending=!1;for(let e of r(eo,this))aa(e,Or),La(e);for(let e of r(to,this))aa(e,kr),La(e);r(eo,this).clear(),r(to,this).clear()}function fo(e){var t=W,n=U,i=B;Bs(r(Ka,this)),zs(r(Ka,this)),Ri(r(Ka,this).ctx);try{return e()}catch(e){return ea(e),null}finally{Bs(t),zs(n),Ri(i)}}function po(e){if(!this.has_pending_snippet()){if(this.parent){var t;i(io,t=this.parent,po).call(t,e)}return}a(Qa,this,r(Qa,this)+e),r(Qa,this)===0&&(i(io,this,uo).call(this),r(Ja,this)&&ks(r(Ja,this),()=>{a(Ja,this,null)}),r(Xa,this)&&(r(Ha,this).before(r(Xa,this)),a(Xa,this,null)))}function mo(e,t,n,r){let i=qi()?yo:So;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=W,s=ho(),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&jr)===0&&ta(e,o)}go()}if(n.length===0){c.then(()=>l(t.map(i)));return}function u(){s(),Promise.all(n.map(e=>bo(e))).then(e=>l([...t.map(i),...e])).catch(e=>ta(e,o))}c?c.then(u):u()}function ho(){var e=W,t=U,n=B,r=ua;if(I)var i=zi;return function(a=!0){Bs(e),zs(t),Ri(n),a&&r?.activate(),I&&Bi(i)}}function go(e=!0){Bs(null),zs(null),Ri(null),e&&ua?.deactivate(),I&&Bi(null)}function _o(){var e=W.b,t=ua,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}var vo=new Set;function yo(e){var t=vr|Or,n=U!==null&&(U.f&vr)!==0?U:null;W!==null&&(W.f|=Ir);let r={ctx:B,deps:null,effects:null,equals:Ei,f:t,fn:e,reactions:null,rv:0,v:tr,wv:0,parent:n??W,ac:null};return I&&ji&&(r.created=Ii(`created at`)),r}function bo(e,t,n){W===null&&Zr();var r=void 0,i=Fo(tr);I&&(i.label=t);var a=!U,o=new Map;return vs(()=>{var t=_r();r=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).finally(go)}catch(e){t.reject(e),go()}var s=ua;if(a){var c=_o();o.get(s)?.reject(Kr),o.delete(s),o.set(s,t)}let l=(e,t=void 0)=>{if(s.activate(),t)t!==Kr&&(i.f|=Vr,zo(i,t));else{(i.f&Vr)!==0&&(i.f^=Vr),zo(i,e);for(let[e,t]of o){if(o.delete(e),e===s)break;t.reject(Kr)}I&&n!==void 0&&(vo.add(i),setTimeout(()=>{vo.has(i)&&(pi(i.label,n),vo.delete(i))}))}c&&c()};t.promise.then(l,e=>l(null,e||`unknown`))}),ps(()=>{for(let e of o.values())e.reject(Kr)}),I&&(i.f|=Br),new Promise(e=>{function t(n){function a(){n===r?e(i):t(r)}n.then(a,a)}t(r)})}function xo(e){let t=yo(e);return ki||Hs(t),t}function So(e){let t=yo(e);return t.equals=Oi,t}function Co(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Es(t[n])}}var wo=[];function To(e){for(var t=e.parent;t!==null;){if((t.f&vr)===0)return(t.f&jr)===0?t:null;t=t.parent}return null}function Eo(e){var t,n=W;if(Bs(To(e)),I){let r=Ao;Mo(new Set);try{or.call(wo,e)&&Qr(),wo.push(e),e.f&=~Rr,Co(e),t=ec(e)}finally{Bs(n),Mo(r),wo.pop()}}else try{e.f&=~Rr,Co(e),t=ec(e)}finally{Bs(n)}return t}function Do(e){var t=Eo(e);if(!e.equals(t)&&(e.wv=Zs(),(!ua?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){aa(e,Dr);return}Is||(da===null?oa(e):(fs()||ua?.is_fork)&&da.set(e,t))}function Oo(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.call(t),t.ac?.abort(Kr),t.teardown=hr,t.ac=null,nc(t,0),ws(t))}function ko(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&rc(t)}var Ao=new Set,jo=new Map;function Mo(e){Ao=e}var No=!1;function Po(){No=!0}function Fo(e,t){var n={f:0,v:e,reactions:null,equals:Ei,rv:0,wv:0};return I&&ji&&(n.created=t??Ii(`created at`),n.updated=null,n.set_during_effect=!1,n.trace=null),n}function Io(e,t){let n=Fo(e,t);return Hs(n),n}function Lo(e,t=!1,n=!0){let r=Fo(e);if(t||(r.equals=Oi),Ai&&n&&B!==null&&B.l!==null){var i;((i=B.l).s??(i.s=[])).push(r)}return r}function Ro(e,t,n=!1){U!==null&&(!Rs||(U.f&Pr)!==0)&&qi()&&(U.f&(vr|Sr|Br|Pr))!==0&&(Vs===null||!or.call(Vs,e))&&li();let r=n?Wo(t):t;return I&&Fi(r,e.label),zo(e,r)}function zo(e,t){if(!e.equals(t)){var n=e.v;Is?jo.set(e,t):jo.set(e,n),e.v=t;var r=Ea.ensure();if(r.capture(e,n),I){if(ji||W!==null){e.updated??=new Map;let t=(e.updated.get(``)?.count??0)+1;if(e.updated.set(``,{error:null,count:t}),ji||t>5){let t=Ii(`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++}}}W!==null&&(e.set_during_effect=!0)}if((e.f&vr)!==0){let t=e;(e.f&Or)!==0&&Eo(t),oa(t)}e.wv=Zs(),Ho(e,Or),qi()&&W!==null&&(W.f&Dr)!==0&&(W.f&(Cr|wr))===0&&(Gs===null?Ks([e]):Gs.push(e)),!r.is_fork&&Ao.size>0&&!No&&Bo()}return t}function Bo(){No=!1;for(let e of Ao)(e.f&Dr)!==0&&aa(e,kr),Qs(e)&&rc(e);Ao.clear()}function Vo(e){Ro(e,e.v+1)}function Ho(e,t){var n=e.reactions;if(n!==null)for(var r=qi(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;if(!(!r&&o===W)){if(I&&(s&Pr)!==0){Ao.add(o);continue}var c=(s&Or)===0;if(c&&aa(o,t),(s&vr)!==0){var l=o;da?.delete(l),(s&Rr)===0&&(s&Er&&(o.f|=Rr),Ho(l,kr))}else c&&((s&Sr)!==0&&Na!==null&&Na.add(o),La(o))}}}var Uo=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Wo(e){if(typeof e!=`object`||!e||Hr in e)return e;let t=pr(e);if(t!==dr&&t!==fr)return e;var n=new Map,r=ir(e),i=Io(0),a=I&&ji?Ii(`created at`):null,o=Ys,s=e=>{if(Ys===o)return e();var t=U,n=Ys;zs(null),Xs(o);var r=e();return zs(t),Xs(n),r};r&&(n.set(`length`,Io(e.length,a)),I&&(e=Jo(e)));var c=``;let l=!1;function u(e){if(!l){l=!0,c=e,Pi(i,`${c} version`);for(let[e,t]of n)Pi(t,Go(c,e));l=!1}}return new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&si();var i=n.get(t);return i===void 0?s(()=>{var e=Io(r.value,a);return n.set(t,e),I&&typeof t==`string`&&Pi(e,Go(c,t)),e}):Ro(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>Io(tr,a));n.set(t,e),Vo(i),I&&Pi(e,Go(c,t))}}else Ro(r,tr),Vo(i);return!0},get(t,r,i){if(r===Hr)return e;if(I&&r===Gr)return u;var o=n.get(r),l=r in t;if(o===void 0&&(!l||lr(t,r)?.writable)&&(o=s(()=>{var e=Io(Wo(l?t[r]:tr),a);return I&&Pi(e,Go(c,r)),e}),n.set(r,o)),o!==void 0){var d=G(o);return d===tr?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=G(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==tr)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Hr)return!0;var r=n.get(t),i=r!==void 0&&r.v!==tr||Reflect.has(e,t);return(r!==void 0||W!==null&&(!i||lr(e,t)?.writable))&&(r===void 0&&(r=s(()=>{var n=Io(i?Wo(e[t]):tr,a);return I&&Pi(n,Go(c,t)),n}),n.set(t,r)),G(r)===tr)?!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(()=>Io(tr,a)),n.set(f+``,p),I&&Pi(p,Go(c,f))):Ro(p,tr)}if(u===void 0)(!d||lr(e,t)?.writable)&&(u=s(()=>Io(void 0,a)),I&&Pi(u,Go(c,t)),Ro(u,Wo(o)),n.set(t,u));else{d=u.v!==tr;var m=s(()=>Wo(o));Ro(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&&Ro(g,_+1)}Vo(i)}return!0},ownKeys(e){G(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==tr});for(var[r,a]of n)a.v!==tr&&!(r in e)&&t.push(r);return t},setPrototypeOf(){ci()}})}function Go(e,t){return typeof t==`symbol`?`${e}[Symbol(${t.description??``})]`:Uo.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Ko(e){try{if(typeof e==`object`&&e&&Hr in e)return e[Hr]}catch{}return e}var qo=new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);function Jo(e){return new Proxy(e,{get(e,t,n){var r=Reflect.get(e,t,n);return qo.has(t)?function(...e){Po();var t=r.apply(this,e);return Bo(),t}:r}})}function Yo(){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(Ko(this[n])===e){_i(`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(Ko(this[n])===e){_i(`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(Ko(this[t])===e){_i(`array.includes(...)`);break}}return n},Array.__svelte_cleanup=()=>{e.indexOf=n,e.lastIndexOf=r,e.includes=i}}var Xo,Zo,Qo,$o;function es(){if(Xo===void 0){Xo=window,document,Zo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Qo=lr(t,`firstChild`).get,$o=lr(t,`nextSibling`).get,mr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),mr(n)&&(n.__t=void 0),I&&(e.__svelte_meta=null,Yo())}}function ts(e=``){return document.createTextNode(e)}function ns(e){return Qo.call(e)}function rs(e){return $o.call(e)}function V(e,t){if(!L)return ns(e);var n=ns(R);if(n===null)n=R.appendChild(ts());else if(t&&n.nodeType!==Jr){var r=ts();return n?.before(r),xi(r),r}return t&&ss(n),xi(n),n}function is(e,t=!1){if(!L){var n=ns(e);return n instanceof Comment&&n.data===``?rs(n):n}if(t){if(R?.nodeType!==Jr){var r=ts();return R?.before(r),xi(r),r}ss(R)}return R}function H(e,t=1,n=!1){let r=L?R:e;for(var i;t--;)i=r,r=rs(r);if(!L)return r;if(n){if(r?.nodeType!==Jr){var a=ts();return r===null?i?.after(a):r.before(a),xi(a),a}ss(r)}return xi(r),r}function as(){return!ki||Na!==null?!1:(W.f&Mr)!==0}function os(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??rr,e,r)}function ss(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Jr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function cs(e){var t=U,n=W;zs(null),Bs(null);try{return e()}finally{zs(t),Bs(n)}}function ls(e){W===null&&(U===null&&ti(e),ei()),Is&&$r(e)}function us(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ds(e,t){var n=W;if(I)for(;n!==null&&(n.f&Pr)!==0;)n=n.parent;n!==null&&(n.f&Ar)!==0&&(e|=Ar);var r={ctx:B,deps:null,nodes:null,f:e|Or|Er,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};I&&(r.component_function=Vi);var i=r;if((e&yr)!==0)ha===null?La(r):ha.push(r);else if(t!==null){try{rc(r)}catch(e){throw Es(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ir)===0&&(i=i.first,(e&Sr)!==0&&(e&Nr)!==0&&i!==null&&(i.f|=Nr))}if(i!==null&&(i.parent=n,n!==null&&us(i,n),U!==null&&(U.f&vr)!==0&&(e&wr)===0)){var a=U;(a.effects??=[]).push(i)}return r}function fs(){return U!==null&&!Rs}function ps(e){let t=ds(br,null);return aa(t,Dr),t.teardown=e,t}function ms(e){ls(`$effect`),I&&cr(e,`name`,{value:`$effect`});var t=W.f;if(!U&&(t&Cr)!==0&&(t&Mr)===0){var n=B;(n.e??=[]).push(e)}else return hs(e)}function hs(e){return ds(yr|Lr,e)}function gs(e){Ea.ensure();let t=ds(wr|Ir,e);return(e={})=>new Promise(n=>{e.outro?ks(t,()=>{Es(t),n(void 0)}):(Es(t),n(void 0))})}function _s(e){return ds(yr,e)}function vs(e){return ds(Br|Ir,e)}function ys(e,t=0){return ds(br|t,e)}function bs(e,t=[],n=[],r=[]){mo(r,t,n,t=>{ds(br,()=>e(...t.map(G)))})}function xs(e,t=0){var n=ds(Sr|t,e);return I&&(n.dev_stack=zi),n}function Ss(e){return ds(Cr|Ir,e)}function Cs(e){var t=e.teardown;if(t!==null){let e=Is,n=U;Ls(!0),zs(null);try{t.call(null)}finally{Ls(e),zs(n)}}}function ws(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&cs(()=>{e.abort(Kr)});var r=n.next;(n.f&wr)===0?Es(n,t):n.parent=null,n=r}}function Ts(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Cr)===0&&Es(t),t=n}}function Es(e,t=!0){var n=!1;(t||(e.f&Fr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Ds(e.nodes.start,e.nodes.end),n=!0),ws(e,t&&!n),nc(e,0),aa(e,jr);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Cs(e);var i=e.parent;i!==null&&i.first!==null&&Os(e),I&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Ds(e,t){for(;e!==null;){var n=e===t?null:rs(e);e.remove(),e=n}}function Os(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 ks(e,t,n=!0){var r=[];As(e,r,!0);var i=()=>{n&&Es(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function As(e,t,n){if((e.f&Ar)===0){e.f^=Ar;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&Nr)!==0||(i.f&Cr)!==0&&(e.f&Sr)!==0;As(i,t,o?n:!1),i=a}}}function js(e){Ms(e,!0)}function Ms(e,t){if((e.f&Ar)!==0){e.f^=Ar,(e.f&Dr)===0&&(aa(e,Or),La(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Nr)!==0||(n.f&Cr)!==0;Ms(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 Ns(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:rs(n);t.append(n),n=i}}var Ps=null,Fs=!1,Is=!1;function Ls(e){Is=e}var U=null,Rs=!1;function zs(e){U=e}var W=null;function Bs(e){W=e}var Vs=null;function Hs(e){U!==null&&(!ki||(U.f&vr)!==0)&&(Vs===null?Vs=[e]:Vs.push(e))}var Us=null,Ws=0,Gs=null;function Ks(e){Gs=e}var qs=1,Js=0,Ys=Js;function Xs(e){Ys=e}function Zs(){return++qs}function Qs(e){var t=e.f;if((t&Or)!==0)return!0;if(t&vr&&(e.f&=~Rr),(t&kr)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Qs(a)&&Do(a),a.wv>e.wv)return!0}(t&Er)!==0&&da===null&&aa(e,Dr)}return!1}function $s(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!ki&&Vs!==null&&or.call(Vs,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&vr)===0?t===a&&(n?aa(a,Or):(a.f&Dr)!==0&&aa(a,kr),La(a)):$s(a,t,!1)}}function ec(e){var t=Us,n=Ws,r=Gs,i=U,a=Vs,o=B,s=Rs,c=Ys,l=e.f;Us=null,Ws=0,Gs=null,U=(l&(Cr|wr))===0?e:null,Vs=null,Ri(e.ctx),Rs=!1,Ys=++Js,e.ac!==null&&(cs(()=>{e.ac.abort(Kr)}),e.ac=null);try{e.f|=zr;var u=e.fn,d=u();e.f|=Mr;var f=e.deps,p=ua?.is_fork;if(Us!==null){var m;if(p||nc(e,Ws),f!==null&&Ws>0)for(f.length=Ws+Us.length,m=0;m<Us.length;m++)f[Ws+m]=Us[m];else e.deps=f=Us;if(fs()&&(e.f&Er)!==0)for(m=Ws;m<f.length;m++){var h;((h=f[m]).reactions??(h.reactions=[])).push(e)}}else !p&&f!==null&&Ws<f.length&&(nc(e,Ws),f.length=Ws);if(qi()&&Gs!==null&&!Rs&&f!==null&&(e.f&(vr|kr|Or))===0)for(m=0;m<Gs.length;m++)$s(Gs[m],e);if(i!==null&&i!==e){if(Js++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Js;if(t!==null)for(let e of t)e.rv=Js;Gs!==null&&(r===null?r=Gs:r.push(...Gs))}return(e.f&Vr)!==0&&(e.f^=Vr),d}catch(e){return ea(e)}finally{e.f^=zr,Us=t,Ws=n,Gs=r,U=i,Vs=a,Ri(o),Rs=s,Ys=c}}function tc(e,t){let n=t.reactions;if(n!==null){var r=ar.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&vr)!==0&&(Us===null||!or.call(Us,t))){var a=t;(a.f&Er)!==0&&(a.f^=Er,a.f&=~Rr),oa(a),Oo(a),nc(a,0)}}function nc(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)tc(e,n[r])}function rc(e){var t=e.f;if((t&jr)===0){aa(e,Dr);var n=W,r=Fs;if(W=e,Fs=!0,I){var i=Vi;Hi(e.component_function);var a=zi;Bi(e.dev_stack??zi)}try{(t&(Sr|xr))===0?ws(e):Ts(e),Cs(e);var o=ec(e);if(e.teardown=typeof o==`function`?o:null,e.wv=qs,I&&ji&&(e.f&Or)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&=(s.wv=Zs(),!1)}finally{Fs=r,W=n,I&&(Hi(i),Bi(a))}}}function G(e){var t=(e.f&vr)!==0;if(Ps?.add(e),U!==null&&!Rs&&!(W!==null&&(W.f&jr)!==0)&&(Vs===null||!or.call(Vs,e))){var n=U.deps;if((U.f&zr)!==0)e.rv<Js&&(e.rv=Js,Us===null&&n!==null&&n[Ws]===e?Ws++:Us===null?Us=[e]:Us.push(e));else{var r;((r=U).deps??(r.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[U]:or.call(i,U)||i.push(U)}}if(I&&(vo.delete(e),ji&&!Rs&&Ni!==null&&U!==null&&Ni.reaction===U))if(e.trace)e.trace();else{var a=Ii(`traced at`);if(a){var o=Ni.entries.get(e);o===void 0&&(o={traces:[]},Ni.entries.set(e,o));var s=o.traces[o.traces.length-1];a.stack!==s?.stack&&o.traces.push(a)}}if(Is&&jo.has(e))return jo.get(e);if(t){var c=e;if(Is){var l=c.v;return((c.f&Dr)===0&&c.reactions!==null||ac(c))&&(l=Eo(c)),jo.set(c,l),l}var u=(c.f&Er)===0&&!Rs&&U!==null&&(Fs||(U.f&Er)!==0),d=(c.f&Mr)===0;Qs(c)&&(u&&(c.f|=Er),Do(c)),u&&!d&&(ko(c),ic(c))}if(da?.has(e))return da.get(e);if((e.f&Vr)!==0)throw e.v;return e.v}function ic(e){if(e.f|=Er,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&vr)!==0&&(t.f&Er)===0&&(ko(t),ic(t))}function ac(e){if(e.v===tr)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(jo.has(t)||(t.f&vr)!==0&&ac(t))return!0;return!1}function oc(e){var t=Rs;try{return Rs=!0,e()}finally{Rs=t}}var sc=Symbol(`events`),cc=new Set,lc=new Set;function uc(e,t,n){(t[sc]??(t[sc]={}))[e]=n}function dc(e){for(var t=0;t<e.length;t++)cc.add(e[t]);for(var n of lc)n(e)}var fc=null;function pc(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.call(e)||[],a=i[0]||e.target;fc=e;var o=0,s=fc===e&&e[sc];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[sc]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){cr(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=U,d=W;zs(null),Bs(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[sc]?.[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[sc]=t,delete e.currentTarget,zs(u),Bs(d)}}}var mc=((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 mc?.createHTML(e)??e}function gc(e){var t=os(`template`);return t.innerHTML=hc(e.replaceAll(`<!>`,`<!---->`)),t.content}function _c(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var n=(t&Jn)!==0,r=(t&Yn)!==0,i,a=!e.startsWith(`<!>`);return()=>{if(L)return _c(R,null),R;i===void 0&&(i=gc(a?e:`<!>`+e),n||(i=ns(i)));var t=r||Zo?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=ns(t),s=t.lastChild;_c(o,s)}else _c(t,t);return t}}function vc(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&Jn)!==0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(L)return _c(R,null),R;if(!o){var e=ns(gc(a));if(i)for(o=document.createDocumentFragment();ns(e);)o.appendChild(ns(e));else o=ns(e)}var t=o.cloneNode(!0);if(i){var n=ns(t),r=t.lastChild;_c(n,r)}else _c(t,t);return t}}function yc(e,t){return vc(e,t,`svg`)}function bc(){if(L)return _c(R,null),R;var e=document.createDocumentFragment(),t=document.createComment(``),n=ts();return e.append(t,n),_c(t,n),e}function q(e,t){if(L){var n=W;((n.f&Mr)===0||n.nodes.end===null)&&(n.nodes.end=R),Si();return}e!==null&&e.before(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 xc=[`touchstart`,`touchmove`];function Sc(e){return xc.includes(e)}function Cc(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function wc(e,t){return Ec(e,t)}var Tc=new Map;function Ec(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){es();var c=void 0,l=gs(()=>{var o=n??t.appendChild(ts());Va(o,{pending:()=>{}},t=>{Gi({});var n=B;if(a&&(n.c=a),i&&(r.$$events=i),L&&_c(t,null),c=e(t,r)||{},L&&(W.nodes.end=R,R===null||R.nodeType!==Yr||R.data!==$n))throw hi(),er;Ki()},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=Sc(r);for(let e of[t,document]){var a=Tc.get(e);a===void 0&&(a=new Map,Tc.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,pc,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(sr(cc)),lc.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=Tc.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,pc),r.delete(e),r.size===0&&Tc.delete(n)):r.set(e,i)}lc.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return Dc.set(c,l),c}var Dc=new WeakMap;function Oc(e,t){let n=Dc.get(e);return n?(Dc.delete(e),n(t)):(I&&(Hr in e?vi():gi()),Promise.resolve())}var kc=new WeakMap,Ac=new WeakMap,jc=new WeakMap,Mc=new WeakMap,Nc=new WeakMap,Pc=new WeakMap,Fc=new WeakMap;class Ic{constructor(t,i=!0){e(this,`anchor`,void 0),n(this,kc,new Map),n(this,Ac,new Map),n(this,jc,new Map),n(this,Mc,new Set),n(this,Nc,!0),n(this,Pc,e=>{if(r(kc,this).has(e)){var t=r(kc,this).get(e),n=r(Ac,this).get(t);if(n)js(n),r(Mc,this).delete(t);else{var i=r(jc,this).get(t);i&&(r(Ac,this).set(t,i.effect),r(jc,this).delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(let[t,n]of r(kc,this)){if(r(kc,this).delete(t),t===e)break;let i=r(jc,this).get(n);i&&(Es(i.effect),r(jc,this).delete(n))}for(let[e,i]of r(Ac,this)){if(e===t||r(Mc,this).has(e))continue;let a=()=>{if(Array.from(r(kc,this).values()).includes(e)){var t=document.createDocumentFragment();Ns(i,t),t.append(ts()),r(jc,this).set(e,{effect:i,fragment:t})}else Es(i);r(Mc,this).delete(e),r(Ac,this).delete(e)};r(Nc,this)||!n?(r(Mc,this).add(e),ks(i,a,!1)):a()}}}),n(this,Fc,e=>{r(kc,this).delete(e);let t=Array.from(r(kc,this).values());for(let[e,n]of r(jc,this))t.includes(e)||(Es(n.effect),r(jc,this).delete(e))}),this.anchor=t,a(Nc,this,i)}ensure(e,t){var n=ua,i=as();if(t&&!r(Ac,this).has(e)&&!r(jc,this).has(e))if(i){var a=document.createDocumentFragment(),o=ts();a.append(o),r(jc,this).set(e,{effect:Ss(()=>t(o)),fragment:a})}else r(Ac,this).set(e,Ss(()=>t(this.anchor)));if(r(kc,this).set(n,e),i){for(let[t,i]of r(Ac,this))t===e?n.unskip_effect(i):n.skip_effect(i);for(let[t,i]of r(jc,this))t===e?n.unskip_effect(i.effect):n.skip_effect(i.effect);n.oncommit(r(Pc,this)),n.ondiscard(r(Fc,this))}else L&&(this.anchor=R),r(Pc,this).call(this,n)}}function Lc(e,t,...n){var r=new Ic(e);xs(()=>{let e=t()??null;I&&e==null&&ri(),r.ensure(e,e&&(t=>e(t,...n)))},Nr)}if(I){let e=function(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(t!==void 0)return t;ai(e)},set:e=>{t=e}})}};e(`$state`),e(`$effect`),e(`$derived`),e(`$inspect`),e(`$props`),e(`$bindable`)}function Rc(e){B===null&&Xr(`onMount`),Ai&&B.l!==null?zc(B).m.push(e):ms(()=>{let t=oc(e);if(typeof t==`function`)return t})}function zc(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var Bc=new Map;function Vc(e,t){var n=Bc.get(e);n||(n=new Set,Bc.set(e,n)),n.add(t)}function Hc(e,t,n=!1){var r;L&&(r=R,Si());var i=new Ic(e),a=n?Nr:0;function o(e,t){if(L){var n=Ti(r);if(e!==(n===Xn?0:n===Zn?!1:parseInt(n.substring(1)))){var a=wi();xi(a),i.anchor=a,bi(!1),i.ensure(e,t),bi(!0);return}}i.ensure(e,t)}xs(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(!1,null)},a)}var Uc=Symbol(`NaN`);function Wc(e,t,n){L&&Si();var r=new Ic(e),i=!qi();xs(()=>{var e=t();e!==e&&(e=Uc),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Gc(e,t){_s(()=>{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),I&&Vc(t.hash,e)}})}var Kc=[...`
|
|
46
|
+
\r\f\xA0\v`];function qc(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||Kc.includes(r[o-1]))&&(s===r.length||Kc.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Jc(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 Yc(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Xc(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(Yc)),i&&c.push(...Object.keys(i).map(Yc));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=Yc(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+=Jc(r)),i&&(n+=Jc(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Zc(e,t,n,r,i,a){var o=e.__className;if(L||o!==n||o===void 0){var s=qc(n,r,a);(!L||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 Qc(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 $c(e,t,n,r){var i=e.__style;if(L||i!==t){var a=Xc(t,r);(!L||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Qc(e,n?.[0],r[0]),Qc(e,n?.[1],r[1],`important`)):Qc(e,n,r));return r}var el=Symbol(`is custom element`),tl=Symbol(`is html`),nl=qr?`link`:`LINK`;function rl(e,t,n,r){var i=il(e);if(L&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===nl)){r||sl(e,t,n??``);return}i[t]!==(i[t]=n)&&(t===`loading`&&(e[Wr]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ol(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function il(e){return e.__attributes??={[el]:e.nodeName.includes(`-`),[tl]:e.namespaceURI===rr}}var al=new Map;function ol(e){var t=e.getAttribute(`is`)||e.nodeName,n=al.get(t);if(n)return n;al.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=ur(i),r)r[o].set&&n.push(o);i=pr(i)}return n}function sl(e,t,n){I&&(t===`srcset`&&ul(e,n)||cl(e.getAttribute(t)??``,n)||mi(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&`...`),String(n)))}function cl(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function ll(e){return e.split(`,`).map(e=>e.trim().split(` `).filter(Boolean))}function ul(e,t){var n=ll(e.srcset),r=ll(t);return r.length===n.length&&r.every(([e,t],r)=>t===n[r][1]&&(cl(n[r][0],e)||cl(e,n[r][0])))}var dl=new WeakMap,fl=new WeakMap,pl=new WeakMap,ml=new WeakSet;class hl{constructor(e){t(this,ml),n(this,dl,new WeakMap),n(this,fl,void 0),n(this,pl,void 0),a(pl,this,e)}observe(e,t){var n=r(dl,this).get(e)||new Set;return n.add(t),r(dl,this).set(e,n),i(ml,this,gl).call(this).observe(e,r(pl,this)),()=>{var n=r(dl,this).get(e);n.delete(t),n.size===0&&(r(dl,this).delete(e),r(fl,this).unobserve(e))}}}s=hl;function gl(){return r(fl,this)??a(fl,this,new ResizeObserver(e=>{for(var t of e){s.entries.set(t.target,t);for(var n of r(dl,this).get(t.target)||[])n(t)}}))}e(hl,`entries`,new WeakMap);function _l(e,t){return e===t||e?.[Hr]===t}function vl(e={},t,n,r){return _s(()=>{var i,a;return ys(()=>{i=a,a=r?.()||[],oc(()=>{e!==n(...a)&&(t(e,...a),i&&_l(n(...i),e)&&t(null,...i))})}),()=>{Qi(()=>{a&&_l(n(...a),e)&&t(null,...a)})}}),e}function yl(e,t,n){if(e==null)return t(void 0),n&&n(void 0),hr;let r=oc(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var bl=[];function xl(e,t){return{subscribe:J(e,t).subscribe}}function J(e,t=hr){let n=null,r=new Set;function i(t){if(Di(e,t)&&(e=t,n)){let t=!bl.length;for(let t of r)t[1](),bl.push(t,e);if(t){for(let e=0;e<bl.length;e+=2)bl[e][0](bl[e+1]);bl.length=0}}}function a(t){i(t(e))}function o(o,s=hr){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||hr),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function Sl(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 xl(n,(e,n)=>{let o=!1,s=[],c=0,l=hr,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:hr},d=i.map((e,t)=>yl(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){gr(d),l(),o=!1}})}function Y(e){let t;return yl(e,e=>t=e)(),t}var Cl=!1,wl=Symbol();function Tl(e,t,n){let r=n[t]??(n[t]={store:null,source:Lo(void 0),unsubscribe:hr});if(I&&(r.source.label=t),r.store!==e&&!(wl in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=hr;else{var i=!0;r.unsubscribe=yl(e,e=>{i?r.source.v=e:Ro(r.source,e)}),i=!1}return e&&wl in n?Y(e):G(r.source)}function El(){let e={};function t(){ps(()=>{for(var t in e)e[t].unsubscribe();cr(e,wl,{enumerable:!1,value:!0})})}return[e,t]}function Dl(e){var t=Cl;try{return Cl=!1,[e(),Cl]}finally{Cl=t}}function X(e,t,n,r){var i=!Ai||(n&Wn)!==0,a=(n&Kn)!==0,o=(n&qn)!==0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?oc(r):r),s),u;if(a){var d=Hr in e||Ur in e;u=lr(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=Dl(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&ii(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&Gn)===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&F)===0?So:yo)(()=>(g=!1,m()));I&&(_.label=t),a&&G(_);var v=W;return function(e,t){if(arguments.length>0){let n=t?G(_):i&&a?Wo(e):e;return Ro(_,n),g=!0,s!==void 0&&(s=n),e}return Is&&g||(v.f&jr)!==0?_.v:G(_)}}var Ol=`5`;if(typeof window<`u`){var kl,Al;((kl=(Al=window).__svelte??(Al.__svelte={})).v??(kl.v=new Set)).add(Ol)}var jl=require(`@vkontakte/videoplayer-core/es2018`),Ml=require(`@vkontakte/videoplayer-shared/es2018`),Nl=require(`@vkontakte/videoplayer-statistics/es2018`),Pl=require(`@vkontakte/videoplayer-shared/es2018`),Fl={debugLog:!1,devNullLog:!1,defaultLanguage:Pl.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:Pl.VideoQuality.Q_480P,highQualityLimit:Pl.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`},Il=e=>Pl.fillWithDefault(e,Fl),Ll=e=>Wi(`ui-config`,e),Rl=()=>Ui(`ui-config`),zl=`vk_player_debug_panel_opened`,Bl=`videoplayer`,Vl=`videoplayer`,Hl=_(tt(),1),{NativeAbortSignal:Ul,NativeAbortController:Wl}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function Gl(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 Kl(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 ql{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 Jl extends ql{constructor(){super(),this.listeners||ql.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 Yl;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Yl;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 Yl{constructor(){Object.defineProperty(this,`signal`,{value:new Jl,writable:!0,configurable:!0})}abort(e){let t=Kl(e),n=Gl(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Yl.prototype[Symbol.toStringTag]=`AbortController`,Jl.prototype[Symbol.toStringTag]=`AbortSignal`);function Xl(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 Zl(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Xl({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 Ql=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$l=`fetch`in Ql&&Xl({fetch:Ql.fetch,Request:Ql.Request,AbortController:Ql.AbortController}),eu=$l?Zl({fetch:Ql.fetch,Request:Ql.Request,AbortController:Ql.AbortController}):void 0,tu=$l?eu.fetch:Ql.fetch;$l?eu.Request:Ql.Request;var nu=$l?Yl:Ql.AbortController;$l||Ql.AbortSignal;var ru=require(`@vkontakte/videoplayer-shared/es2018`),iu=require(`@vkontakte/videoplayer-core/es2018`),au=require(`@vkontakte/videoplayer-statistics/es2018`),ou=`prod`,su=`1.0.4-dev.92f6f050.0`,cu=(e,t,n)=>{let r=document.createElement(`a`);r.href=e,r.download=`${t}.${n}`,r.style.display=`none`,r.click()},lu=Symbol(`storeContext`),uu=e=>{Wi(lu,e),ou===`dev`&&(window.app={store:e})},du=()=>{let e=Ui(lu);return ru.assertNonNullable(e,`Store context is empty!`),e},Z=(e,t)=>fu(e,e.getValue(),t),fu=(e,t,n)=>xl(t,t=>{let r=e.subscribe(e=>{t(e),n?.(e)});return()=>r.unsubscribe()}),pu=(e,t,n,r,i=[`meta config not provided`])=>{let a=e.info,{width:o,height:s}=Y(n.ui.playerSize),c=a.throughputEstimation$.getValue()?.toFixed(0)??0,l=a.rttEstimation$.getValue()?.toFixed(0)??0,u=a.isAutoQualityEnabled$.getValue()?`auto`:`manual`,d=`${su} (core: ${iu.VERSION}, stat: ${au.VERSION}, shared: ${ru.VERSION})`,f=Y(n.state.errorLog$),p=f.length?`
|
|
47
|
+
`+f.map((e,t)=>{let n=`${t}) Type: ${e.id}
|
|
48
|
+
`,r=`Message: ${e.message} (${e.thrown})
|
|
49
|
+
`,i=`Trace: ${e.thrown?.stack}
|
|
50
|
+
`;return n+r+i}).join(`
|
|
51
|
+
`):void 0,m=n.state.isAudioDisabled?`disabled`:Y(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-Y(n.state.positionExact$),0),C={Version:d,Browser:navigator.userAgent,Config:i.join(`, `),"United video id":String(n.videoId),TraceId:r,VSID:Y(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:`${Y(n.state.positionExact$)}s`,Buffer:`${S}s`,State:`${Y(n.playerPhase)} ${a.playbackState$.getValue()??``}`,"Player size":`${o}x${s}`,URL:window.location.href,Errors:p};return Hl.default(C).filter(([e,t])=>t!==void 0).map(([e,t])=>`${e}: ${t}`).join(`
|
|
52
|
+
`)},mu=(e,t,n)=>{let r=e.info,{width:i,height:a}=Y(n.ui.playerSize),o={version:su,viewport:`${i}x${a}`,volume:Math.round(Y(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-Y(n.state.positionExact$),0),o.nativeBuffer=Math.max(l.end-Y(n.state.positionExact$),0))),o.position=Y(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 _=Y(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},hu=(e,t)=>cu(e,t,`mp4`),gu=()=>{let e=[],t=0;return{add:(n,r)=>{e[t]=[n,r],t=(t+1)%10},find:t=>e.find(([e])=>e===t)}};class _u{constructor(){e(this,`destroyController`,new nu),e(this,`pendingDownloads`,new Set)}async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let t=await tu(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}}_(tt(),1),_(at(),1),_(zt(),1);var vu=require(`@vkontakte/videoplayer-shared/es2018`),yu=`vk_player_`,bu=`vk_player_prefer_traffic_saving_enabled`,xu=`vk_player_preferred_volume`,Su=`vk_player_prefer_volume_mute`,Cu=`vk_player_preferred_quality`,wu=`vk_player_preferred_default_quality_settings`,Tu=`vk_player_preferred_quality_settings_by_video`,Eu=`vk_player_preferred_stream_language`,Du=`vk_player_preferred_rate`,Ou=`vk_player_preferred_subtitles_language`,ku=`vk_player_user_video_prefs`;`${yu}`;var Au=e=>e>1?1:e<0?0:e,ju=()=>{let e=vu.safeStorage.get(xu);return vu.isNullable(e)?void 0:Au(parseFloat(e))},Mu=(e,t)=>vu.safeStorage.set(Cu,JSON.stringify({videoId:e,value:t})),Nu=()=>vu.safeStorage.remove(Cu),Pu=e=>{let t=vu.safeStorage.get(Cu);if(vu.isNullable(t))return;let{videoId:n,value:r}=JSON.parse(t);if(e!==n){Nu();return}return r},Fu=(e,t)=>{t?vu.safeStorage.set(e,`true`):vu.safeStorage.remove(e)},Iu=e=>vu.safeStorage.get(e)===`true`,Lu=()=>Iu(Su),Ru=e=>Fu(bu,e),zu=()=>Iu(bu),Bu=()=>vu.safeStorage.get(Eu),Vu=e=>vu.safeStorage.set(Eu,e),Hu=()=>vu.safeStorage.get(Ou),Uu=e=>{e?vu.safeStorage.set(Ou,e):vu.safeStorage.remove(Ou)},Wu=e=>vu.safeStorage.set(Du,JSON.stringify({rate:e})),Gu=()=>{let e=vu.safeStorage.get(Du);if(vu.isNullable(e))return;let{rate:t}=JSON.parse(e);return t},Ku=(()=>{let e=e=>{vu.safeStorage.set(wu,JSON.stringify(e))},t=()=>{try{let e=vu.safeStorage.get(wu);return e?JSON.parse(e):null}catch{return null}},n=()=>{try{let e=vu.safeStorage.get(Tu);return e?JSON.parse(e):null}catch{return null}},r=e=>{vu.safeStorage.set(Tu,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=()=>{vu.safeStorage.remove(Tu)},o=()=>{vu.safeStorage.remove(wu)},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`:Ru(!0);break;case`exact_quality`:Mu(e,t.quality)}a(),o()}},l=t=>{let n=Pu(t);if(n){r({type:`exact_quality`,videoId:t,quality:n});return}zu()&&e({type:`traffic_saving`,videoId:t}),Ru(!1),Nu()};return{getPreferredQualitySettings:i,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:s,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:Hu,savePreferredSubtitlesLanguage:Uu}})();Ku.getPreferredQualitySettings;var qu=Ku.migrateSettingsToLegacyWay;Ku.savePreferredQualitySettings,Ku.savePreferredDefaultQualitySettings,Ku.removePreferredQualitySettingsByVideo,Ku.getPreferredDefaultQualitySettings;var Ju=()=>{let e=vu.safeStorage.get(ku);if(e)try{return JSON.parse(e)}catch{return null}return null},Yu=(e,t)=>{var n;let r=Ju();return(r==null||(n=r[e])==null?void 0:n[t])??null};class Xu{constructor(t){e(this,`value`,void 0),e(this,`next`,void 0),this.value=t,this.next=null}}class Zu{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 Xu(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 Qu=K(`<div class="container s-8"><canvas class="s-8"></canvas></div>`),$u={hash:`s-8`,code:`.container.s-8 {display:inline-block;width:120px;height:16px;}canvas.s-8 {transform:scale(1, -1);margin-top:2px;}`};function ed(e,t){Gi(t,!0),Gc(e,$u);let n=X(t,`values`,19,()=>[]),r=Io(void 0),i=Io(null);Rc(()=>{G(r).width=120,G(r).height=16,Ro(i,G(r).getContext(`2d`),!0)});function a(e,t,n,r,i){i===0&&(i=1),e.fillStyle=`#fff`,e.fillRect(t,n,r,i)}ms(()=>{let e=``;if(G(i)){let t=n()[0];for(let e=1;e<n().length;e++)n()[e]>t&&(t=n()[e]);G(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(G(i),s,0,2,c),e=c+` `+e,r--}}});var o=Qu();vl(V(o),e=>Ro(r,e),()=>G(r)),z(o),q(e,o),Ki()}var td=require(`@vkontakte/videoplayer-shared/es2018`),nd=_(at(),1),rd=_(Xt(),1),id=require(`@vkontakte/videoplayer-shared/es2018`),ad={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:`Видео грузится слишком медленно,
|
|
53
|
+
качество изменено на\xA0«Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
|
|
54
|
+
попробуйте изменить качество на «Авто»`,double_forward_label:`2x`,preview_track_notification_text:`Потяните вверх для точной перемотки`,preview_track_close_tooltip:`Выйти из режима точной перемотки`},od={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,
|
|
55
|
+
so\xA0the\xA0quality was changed to\xA0Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
|
|
56
|
+
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`},sd=new Map;sd.set(id.InterfaceLanguage.EN,od),sd.set(id.InterfaceLanguage.RU,ad);var cd=new Map,ld=({language:e,pack:t,fallback:n})=>{if(sd.has(e)){let n=sd.get(e);sd.set(e,{...n,...t})}else sd.set(e,t);cd.set(e,n)},ud=e=>sd.has(e),dd=(e,t,n,r)=>{let i=sd.get(e)?.[t];if(id.isNullable(i)){let n=cd.get(e)??r;i=(n?sd.get(n):void 0)?.[t]}return id.isNullable(i)?t+nd.default(n??{}).join(` `):n?rd.default(i,/{(\w+?)}/g,(e,t)=>n[t]??``):i},fd=(e,t)=>{let{interfaceLanguage$:n}=du();return dd(Y(n),e,t,Rl().defaultLanguage)},pd=K(`<div class="s-5"><div class="s-5">Video id</div> <span> </span></div>`),md=K(`<div class="s-5"><div class="s-5">VSID</div> <span> </span></div>`),hd=K(`<div class="s-5"><div class="s-5">Provider</div> <span> </span></div>`),gd=K(`<div class="s-5"><div class="s-5">Streams</div> <span> </span></div>`),_d=K(`<div class="s-5"><div class="s-5">Viewport</div> <span> </span></div>`),vd=K(`<div class="s-5"><div class="s-5">Video size</div> <span> </span></div>`),yd=K(`<div class="s-5"><div class="s-5">CDN host</div> <span> </span></div>`),bd=K(`<div class="s-5"><div class="s-5">Volume</div> <span> </span></div>`),xd=K(`<div class="s-5"><div class="s-5">Position</div> <span> </span></div>`),Sd=K(`<div class="s-5"><div class="s-5">Buffer</div> <span> </span></div>`),Cd=K(`<div class="s-5"><div class="s-5">Nbuffer</div> <span> </span></div>`),wd=K(`<div class="s-5"><div class="s-5">Live latency</div> <span> </span></div>`),Td=K(`<div class="s-5"><div class="s-5">Segment</div> <span> </span></div>`),Ed=K(`<div class="s-5"><div class="s-5">Network</div> <!> <span> </span></div>`),Dd=K(`<div class="s-5"><div class="s-5">V bitrate</div> <!> <span> </span></div>`),Od=K(`<div class="container s-5" role="region"><button class="close s-5" title="закрыть">[x]</button> <div class="content s-5"><div class="s-5"><div class="s-5">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-5"><div class="s-5">Dropped</div> <span> </span></div> <!> <!> <div class="s-5"><div class="s-5">FPS</div> <!> <span> </span></div></div></div>`),kd={hash:`s-5`,code:`.container.s-5 {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-5 {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.s-5 {padding:5px;}.content.s-5 > div:where(.s-5) > div:where(.s-5) {display:inline-block;text-align:right;width:60px;padding:0 5px;}`};function Ad(e,t){Gi(t,!0),Gc(e,kd);let n=du(),r=n.ui.debugPanelVisible,i=e=>{e.stopPropagation(),td.safeStorage.remove(zl),r.set(!1)},a=Io(Wo(n.actions.internal.getDebugPanelData())),o=n.actions.internal.getVideoElement(),s=Io(0),c=Io(0),l=Io(0),u=new Zu(60),d=new Zu(60),f=new Zu(60),p=Io(Wo([])),m=Io(Wo([])),h=Io(Wo([])),g=fd(`aria_label_debug_panel`);Rc(()=>{td.safeStorage.set(zl,`true`),o&&(Ro(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0),Ro(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let e=window.setInterval(()=>{Ro(a,n.actions.internal.getDebugPanelData(),!0)},500),t;return o&&(t=window.setInterval(()=>{if(o){Ro(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=o.getVideoPlaybackQuality().totalVideoFrames;Ro(l,e-G(s)),Ro(s,e,!0),u.push(G(l)),G(a).speed&&d.push(G(a).speed),G(a).bitrate&&f.push(G(a).bitrate),Ro(p,u.getValuesFromBottom(),!0),Ro(m,d.getValuesFromBottom(),!0),Ro(h,f.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(e),t&&clearInterval(t)}});var _=Od(),v=V(_),y=H(v,2),b=V(y),x=H(V(b),2),S=V(x,!0);z(x),z(b);var C=H(b,2),w=e=>{var t=pd(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(()=>Cc(r,G(a).id)),q(e,t)};Hc(C,e=>{G(a).id&&e(w)});var T=H(C,2),E=e=>{var t=md(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(()=>Cc(r,G(a).vsid)),q(e,t)};Hc(T,e=>{G(a).vsid&&e(E)});var D=H(T,2),O=e=>{var t=hd(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(()=>Cc(r,G(a).provider)),q(e,t)};Hc(D,e=>{G(a).provider&&e(O)});var k=H(D,2),A=e=>{var t=gd(),n=H(V(t),2),r=V(n);z(n),z(t),bs(()=>Cc(r,`Video: ${(G(a).videoCodec||``)??``} ${G(a).hdr?`(HDR)`:``}
|
|
51
57
|
&
|
|
52
|
-
Audio: ${(Q=j(o).audioCodec||"")!=null?Q:""} ${j(o).audioLanguage?`(${j(o).audioLanguage})`:""}`)}),ve(E,z)};Ye(k,E=>{(j(o).videoCodec||j(o).audioCodec)&&E(Z)})}var ae=he(k,2);{var V=E=>{var z=np(),X=he(re(z),2),fe=re(X,!0);oe(X),oe(z),Fe(()=>tt(fe,j(o).viewport)),ve(E,z)};Ye(ae,E=>{j(o).viewport&&E(V)})}var G=he(ae,2);{var F=E=>{var z=op(),X=he(re(z),2),fe=re(X,!0);oe(X),oe(z),Fe(()=>tt(fe,j(o).videoSize)),ve(E,z)};Ye(G,E=>{j(o).videoSize&&E(F)})}var J=he(G,2);{var Ee=E=>{var z=rp(),X=he(re(z),2),fe=re(X,!0);oe(X),oe(z),Fe(()=>tt(fe,j(o).cdn)),ve(E,z)};Ye(J,E=>{j(o).cdn&&E(Ee)})}var ee=he(J,2);{var de=E=>{var z=ap(),X=he(re(z),2),fe=re(X);oe(X),oe(z),Fe(()=>{var _;return tt(fe,`${(_=j(o).volume)!=null?_:""} %`)}),ve(E,z)};Ye(ee,E=>{j(o).volume&&E(de)})}var Y=he(ee,2);{var _e=E=>{var z=sp(),X=he(re(z),2),fe=re(X);oe(X),oe(z),Fe(_=>tt(fe,`${_!=null?_:""} s`),[()=>j(o).position.toFixed(2)]),ve(E,z)};Ye(Y,E=>{j(o).position&&E(_e)})}var B=he(Y,2);{var je=E=>{var z=lp(),X=he(re(z),2),fe=re(X);oe(X),oe(z),Fe(_=>tt(fe,`${_!=null?_:""} s`),[()=>j(o).buffer.toFixed(2)]),ve(E,z)};Ye(B,E=>{j(o).buffer&&E(je)})}var De=he(B,2);{var ue=E=>{var z=dp(),X=he(re(z),2),fe=re(X);oe(X),oe(z),Fe(_=>tt(fe,`${_!=null?_:""} s`),[()=>j(o).nativeBuffer.toFixed(2)]),ve(E,z)};Ye(De,E=>{j(o).nativeBuffer&&E(ue)})}var O=he(De,2);{var pe=E=>{var z=up(),X=he(re(z),2),fe=re(X);oe(X),oe(z),Fe(_=>tt(fe,`${_!=null?_:""} s`),[()=>j(o).liveLatency.toFixed(2)]),ve(E,z)};Ye(O,E=>{j(o).liveLatency&&E(pe)})}var le=he(O,2);{var me=E=>{var z=cp(),X=he(re(z),2),fe=re(X,!0);oe(X),oe(z),Fe(_=>tt(fe,_),[()=>[{value:j(o).currentVideoSegmentLength,title:"Video:"},{value:j(o).currentAudioSegmentLength,title:"Audio:"}].filter(({value:_})=>_).map(({value:_,title:Q})=>`${Q} ${((_!=null?_:0)/1e3).toFixed(2)} s`).join(" & ")]),ve(E,z)};Ye(le,E=>{(j(o).currentVideoSegmentLength||j(o).currentAudioSegmentLength)&&E(me)})}var Me=he(le,2),Se=he(re(Me),2),Ue=re(Se);oe(Se),oe(Me);var T=he(Me,2);{var S=E=>{var z=pp(),X=he(re(z),2);eo(X,{get values(){return j(v)}});var fe=he(X,2),_=re(fe);oe(fe),oe(z),Fe(Q=>tt(_,`${Q!=null?Q:""} Kbps`),[()=>j(o).speed.toFixed(2)]),ve(E,z)};Ye(T,E=>{j(o).speed&&E(S)})}var L=he(T,2);{var R=E=>{var z=fp(),X=he(re(z),2);eo(X,{get values(){return j(b)}});var fe=he(X,2),_=re(fe);oe(fe),oe(z),Fe(Q=>tt(_,`${Q!=null?Q:""} Kbps`),[()=>j(o).bitrate.toFixed(2)]),ve(E,z)};Ye(L,E=>{j(o).bitrate&&E(R)})}var te=he(L,2),se=he(re(te),2);eo(se,{get values(){return j(u)}});var Ie=he(se,2),$e=re(Ie,!0);oe(Ie),oe(te),oe(D),oe(g),Fe(()=>{var E,z;Wt(g,"aria-label",y),tt(A,j(o).version),tt(Ue,`${(E=j(r))!=null?E:""} / ${(z=j(d))!=null?z:""} frames`),tt($e,j(c))}),ve(t,g),pt()}fn(["click"]);Ds();var td="var(--btn-color, #fff)";var vp=gi('<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),gp=gi('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function qi(t,e){var f;ct(e,!0);let i=xe(e,"width",19,()=>"24"),n=xe(e,"height",19,()=>"24"),o=xe(e,"fill",3,td),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${n()}`;var d=gp(),r=re(d);{var c=l=>{var u=vp(),v=un(u),b=re(v);Lo(b,()=>e.children),oe(v),dn(),ve(l,u)},h=l=>{var u=Rr(),v=un(u);Lo(v,()=>e.children),ve(l,u)};Ye(r,l=>{e.shadow?l(c):l(h,!1)})}oe(d),Fe(()=>{Wt(d,"aria-label",e.ariaLabel),Wt(d,"aria-hidden",!e.ariaLabel),Wt(d,"width",i()),Wt(d,"height",n()),Wt(d,"viewBox",a),Wt(d,"fill",o()),Oi(d,e.style),Wt(d,"data-testid",e.testId)}),ve(t,d),pt()}var _p=gi('<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 da(t){qi(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var n=_p();ve(e,n)},$$slots:{default:!0}})}var yp=Ce('<div class="container s-3"><!></div>'),bp={hash:"s-3",code:".container.s-3{align-items:center;background:#000;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}"};function to(t){ft(t,bp);var e=yp(),i=re(e);da(i,{}),oe(e),ve(t,e)}var nd=t=>`width:${t}px;height:${t}px;`;var Ap=gi('<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 ua(t,e){ct(e,!0);let i=xi(()=>nd(e.size));qi(t,{get width(){return"48"},get height(){return"48"},get fill(){return e.fill},get style(){return j(i)},testId:"play-icon",get shadow(){return e.shadow},children:(n,o)=>{var a=Ap();ve(n,a)},$$slots:{default:!0}}),pt()}var xp=Ce('<div class="playButton s-6" tabindex="0" role="button"><div class="playButtonBackground s-6"></div> <!></div>'),Ep=Ce('<div data-testid="unstarted-thumb"><!></div>'),Tp={hash:"s-6",code:".container.s-6{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-6{opacity:0;visibility:hidden}.container.bgCover.s-6{background-size:cover}.playButton.s-6{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-6,.playButtonBackground.s-6{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-6{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-6:hover .playButtonBackground:where(.s-6){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-6 svg{position:relative}"};function ca(t,e){ct(e,!0),ft(t,Tp);let i=xe(e,"iconVisible",3,!0),n=_n(),o=zo("tooltip_play"),a=f=>{var l,u;f.stopPropagation(),(l=e.startVideo)==null||l.call(e),(u=e.onClick)==null||u.call(e,f)};var d=Ep();let r;d.__click=a,d.__contextmenu=function(...f){var l;(l=e.onContextMenu)==null||l.apply(this,f)};var c=re(d);{var h=f=>{var l=xp(),u=he(re(l),2);ua(u,{get size(){return"48"}}),oe(l),Fe(()=>Wt(l,"aria-label",o)),ve(f,l)};Ye(c,f=>{i()&&f(h)})}return oe(d),Fe(f=>{r=vn(d,1,"container s-6",null,r,f),Oi(d,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),ve(t,d),pt({handleClick:a})}fn(["click","contextmenu"]);var Mp=Ce('<div><div class="video-container s-7"></div></div>'),wp={hash:"s-7",code:".video-container.s-7,.video-wrapper.s-7{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-7{background:var(--black)}.video-container.s-7,.video-wrapper.s-7{z-index:var(--video-container-z-index)}.video-container.s-7{transition:var(--rotate-transition-duration) ease all}"};function fa(t,e){ct(e,!0),ft(t,wp);let[i,n]=Wi(),o=()=>di(d,"$playerPhase",i),a=xe(e,"videoContainer",15),{playerPhase:d}=Ri();var r=Mp();let c;var h=re(r);Bi(h,f=>a(f),()=>a()),oe(r),Fe(f=>c=vn(r,1,"video-wrapper s-7",null,c,f),[()=>({hidden:o()!=="video"})]),ve(t,r),pt(),n()}var Sp=Ce("<!> <!> <!> <!>",1),Ip=Ce('<div class="player-wrapper s-4"><!></div>'),Np={hash:"s-4",code:".player-wrapper.s-4{height:100%;position:absolute;width:100%}.player-wrapper.s-4 .player-media{background:var(--black);height:100%;left:0;position:absolute;top:0;transition:transform .2s ease-in-out;width:100%}"};function ma(t,e){ct(e,!0),ft(t,Np);let[i,n]=Wi(),o=()=>di(f,"$language$",i),a=()=>di(l,"$playerPhase",i),d=()=>di(u,"$crashed",i),r=()=>di(v,"$debugPanelVisible",i),c=xe(e,"videoContainer",15),h=Ri(),f=h.interfaceLanguage$,l=h.playerPhase,u=h.state.crashed$,v=h.ui.debugPanelVisible,b=He(void 0);var y=Ip(),g=re(y);Ur(g,o,C=>{var D=Sp(),N=un(D);fa(N,{get videoContainer(){return c()},set videoContainer(x){c(x)}});var w=he(N,2);let A=xi(()=>a()!=="thumb"||d()&&e.autoplay);ca(w,{get hidden(){return j(A)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var M=he(w,2);{var I=x=>{to(x,{})};Ye(M,x=>{d()&&x(I)})}var m=he(M,2);{var U=x=>{la(x,{})};Ye(m,x=>{r()&&x(U)})}ve(C,D)}),oe(y),Bi(y,C=>Ne(b,C),()=>j(b)),ve(t,y),pt(),n()}var Lp=Ce('<div class="vk-vp-tv-root s-2"><!></div>'),kp={hash:"s-2",code:'.vk-vp-tv-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px}'};function ha(t,e){ct(e,!0),ft(t,kp);let[i,n]=Wi(),o=()=>di(ee,"$isLive$",i),a=()=>di(te,"$availableSubtitlesList$",i),d=xe(e,"sources",7),r=xe(e,"store",7),c=xe(e,"videoConfig",7),h=xe(e,"uiConfig",7),f=xe(e,"title",7),l=xe(e,"thumbUrl",7),u=xe(e,"subtitles",7),v=xe(e,"subtitlesForcedLanguage",7),b=xe(e,"live",7),y=xe(e,"preload",7),g=xe(e,"autoplay",7),C=xe(e,"volume",7,void 0),D=xe(e,"muted",7,void 0),N=xe(e,"fromTime",7),w=xe(e,"canRewindLive",7),A=xe(e,"showAds",7),M=xe(e,"adsSlotId",7,void 0),I=xe(e,"adsParams",7,void 0),m=xe(e,"adsAutoplayParam",7,void 0),U=xe(e,"duration",7,void 0),x=xe(e,"supportLink",7),P=xe(e,"shadowRootContainer",7),k=xe(e,"outerContainerRef",7),Z=xe(e,"fullScreenTarget",7,void 0),ae=xe(e,"failoverHosts",7,void 0),V=xe(e,"saveRate",7),G=xe(e,"volumeMultiplier",7),F=xe(e,"showEndScreen",7,!0);Il(h());let J=_n(),Ee=r().ui.debugPanelVisible,ee=r().state.isLive$,de=He(void 0),Y=He(!1);r().getAdmanWrapper().init({switchFromAdsToVideo:r().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:r().actions.internal.switchFromVideoToAds,setMuted:r().actions.external.setMuted},r().ads,{vsid:r().vsid}),Rl(r()),Si(()=>{var E,z;(z=(E=c().callbacks)==null?void 0:E.onDomReady)==null||z.call(E)});let _e=(E=!1)=>{Ne(Y,!0),E?r().actions.external.firstStart(A()):r().actions.internal.firstStart(A())},B=()=>{Zl(r().videoId),ia()&&r().actions.internal.setTrafficSavingEnabled(!0);let z=ta(r().videoId);z&&r().actions.internal.setQuality(z)};function je(E){var Q,ie,Re;let z=d()||E;z&&r().initVideo({container:j(de),sources:z,failoverHosts:ae(),subtitles:u(),subtitlesForcedLanguage:v(),volumeMultiplier:G()});let X=rd.safeStorage.get(Jn)==="true";Ee.set(X),N()>0&&r().actions.external.seekTime(N());let fe=(ie=(Q=C())!=null?Q:Po())!=null?ie:J.volumeDefault,_=(Re=D())!=null?Re:Bl();if(r().actions.external.setVolume(fe),r().actions.external.setMuted(_),r().getAdmanWrapper().setInitialVolume(_?0:fe),B(),J.features.saveRate&&V()){let Le=Kl();Le&&!o()&&r().actions.internal.setPlaybackRate(Le)}r().ui.isAutoplay.set(g()),g()&&_e(),y()&&J.features.preload&&r().actions.internal.preload()}hn(()=>{var z,X,fe,_;let E=()=>r().destroy();return((z=b())==null?void 0:z.status)==="upcoming"?(r().actions.internal.setLiveWaitingStart(!0),E):((X=b())==null?void 0:X.status)==="waiting"?(r().actions.internal.setLiveWaitingRecover(!0),E):(((fe=b())==null?void 0:fe.status)==="finished"||((_=b())==null?void 0:_.status)==="postlive")&&!(d()&&(0,od.areValidLiveRecordSources)(d()))?(r().actions.internal.setLiveWaitingRecord(!0),E):(je(),E)});function De(){j(Y)?r().actions.external.play():_e(!0)}function ue(){r().actions.external.pause()}function O(E){r().actions.external.setMuted(E)}function pe(){r().actions.external.toggleSubtitle()}function le(E,z){r().actions.external.changeSubtitle(E,z)}function me(E){r().actions.external.changeAudioStream(E)}function Me(E){E>=0&&E<=1&&r().actions.external.setVolume(E)}function Se(E){r().actions.internal.seekTime(E,ad.SeekAction.UNKNOWN)}function Ue(E){r().actions.external.setPlaybackRate(E)}function T(E){r().actions.external.setAutoQualityLimits(E)}function S(){r().actions.external.setQuality("auto")}function L(E){r().actions.external.setTrafficSavingEnabled(E)}function R(E){r().actions.external.setHighQualityEnabled(E)}let te=r().state.availableSubtitlesList$;if(J.features.initSubtitles){let E=!1;Si(()=>{var z;if(!E&&a().length){E=!0;let X;if(J.features.userVideoPrefs&&r().videoId){let _=jo(J.userSalt,String(r().videoId));_!=null&&_.subtitleTrackId&&(X=a().find(Q=>Q.value===_.subtitleTrackId))}let fe=(z=v())!=null?z:na();fe&&(X=a().find(_=>_.language===fe)),r().actions.internal.setSubtitle(X)}})}var se=Lp(),Ie=re(se);ma(Ie,{get thumbUrl(){return l()},firstStart:_e,get autoplay(){return g()},get videoContainer(){return j(de)},set videoContainer(E){Ne(de,E,!0)}}),oe(se),ve(t,se);var $e=pt({initVideo:je,play:De,pause:ue,setMuted:O,toggleSubtitle:pe,changeSubtitle:le,changeAudioStream:me,setVolume:Me,seekTime:Se,setPlaybackRate:Ue,setAutoQualityLimits:T,setAutoQuality:S,toggleTrafficSaving:L,toggleHighQuality:R,get sources(){return d()},set sources(E){d(E)},get store(){return r()},set store(E){r(E)},get videoConfig(){return c()},set videoConfig(E){c(E)},get uiConfig(){return h()},set uiConfig(E){h(E)},get title(){return f()},set title(E){f(E)},get thumbUrl(){return l()},set thumbUrl(E){l(E)},get subtitles(){return u()},set subtitles(E){u(E)},get subtitlesForcedLanguage(){return v()},set subtitlesForcedLanguage(E){v(E)},get live(){return b()},set live(E){b(E)},get preload(){return y()},set preload(E){y(E)},get autoplay(){return g()},set autoplay(E){g(E)},get volume(){return C()},set volume(E){C(E)},get muted(){return D()},set muted(E){D(E)},get fromTime(){return N()},set fromTime(E){N(E)},get canRewindLive(){return w()},set canRewindLive(E){w(E)},get showAds(){return A()},set showAds(E){A(E)},get adsSlotId(){return M()},set adsSlotId(E){M(E)},get adsParams(){return I()},set adsParams(E){I(E)},get adsAutoplayParam(){return m()},set adsAutoplayParam(E){m(E)},get duration(){return U()},set duration(E){U(E)},get supportLink(){return x()},set supportLink(E){x(E)},get shadowRootContainer(){return P()},set shadowRootContainer(E){P(E)},get outerContainerRef(){return k()},set outerContainerRef(E){k(E)},get fullScreenTarget(){return Z()},set fullScreenTarget(E){Z(E)},get failoverHosts(){return ae()},set failoverHosts(E){ae(E)},get saveRate(){return V()},set saveRate(E){V(E)},get volumeMultiplier(){return G()},set volumeMultiplier(E){G(E)},get showEndScreen(){return F()},set showEndScreen(E){F(E)}});return n(),$e}var Cp=gi('<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>',1);function va(t,e){let i=xe(e,"isWhite",3,!1),n=xi(()=>i()?"#fff":"#909499");qi(t,{width:"57",height:"60",get fill(){return j(n)},testId:"stub-icon",children:(o,a)=>{var d=Cp();dn(9),ve(o,d)},$$slots:{default:!0}})}var $p=Ce('<div class="title s-0"> </div>'),Op=Ce('<div class="playerStub s-0"><!> <!></div>'),Rp={hash:"s-0",code:".playerStub.s-0{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-0{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function ga(t,e){ft(t,Rp);var i=Op(),n=re(i);{var o=r=>{var c=$p(),h=re(c,!0);oe(c),Fe(()=>tt(h,e.title)),ve(r,c)};Ye(n,r=>{e.title&&r(o)})}var a=he(n,2);{var d=r=>{let c=xi(()=>!!e.thumbUrl);va(r,{get isWhite(){return j(c)}})};Ye(a,r=>{(!e.title||!e.thumbUrl)&&r(d)})}oe(i),Fe(()=>Oi(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),ve(t,i)}var Pp=Ce('<div class="playerError s-1"><!></div>'),Vp={hash:"s-1",code:".playerError.s-1{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function _a(t){ft(t,Vp);var e=Pp(),i=re(e);to(i,{}),oe(e),ve(t,e)}var Be=require("@vkontakte/videoplayer-core/es2018"),ce=require("@vkontakte/videoplayer-shared/es2018"),An=require("@vkontakte/videoplayer-statistics/es2018");var K=require("@vkontakte/videoplayer-shared/es2018"),at=require("@vkontakte/videoplayer-shared/es2018"),Up="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",Fo=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 at.Subject,loadStarted$:new at.Subject,loadEnded$:new at.Subject,loadError$:new at.Subject,ready$:new at.Subject,slotRequested$:new at.Subject,started$:new at.Subject,timeRemained$:new at.Subject,paused$:new at.Subject,resumed$:new at.Subject,ended$:new at.Subject,empty$:new at.Subject,skipped$:new at.Subject,clicked$:new at.Subject,closed$:new at.Subject,error$:new at.Subject};this.loadAdman=e=>(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[(0,K.now)()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));this.loadAdmanMailRu=e=>new Promise((i,n)=>{let o;this.events.loadStarted$.next();let a=()=>{clearTimeout(o),delete window.admanAsyncInit,window.AdmanHTML?(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[(0,K.now)()]}),i(),this.events.loadEnded$.next()):(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[(0,K.now)()]}),n())};(0,at.addScript)(Up,e,this.loadTimeout).then(()=>{K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[(0,K.now)()]}),window.AdmanHTML?(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[(0,K.now)()]}),i(),this.events.loadEnded$.next()):(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[(0,K.now)()]}),window.admanAsyncInit=a,o=window.setTimeout(a,this.initTimeout))}).catch(d=>{K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(d)],numbers:[(0,K.now)()]}),n(),clearTimeout(o)})});this.loadAdmanNPM=e=>new Promise((i,n)=>{let o;this.events.loadStarted$.next();let a=()=>{clearTimeout(o),delete window.admanAsyncInit,window.AdmanHTML?(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[(0,K.now)()]}),i(),this.events.loadEnded$.next()):(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[(0,K.now)()]}),n())},d=()=>{r=!0,n()},r=!1,c=window.setTimeout(()=>{K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[(0,K.now)()]}),d()},this.loadTimeout);e.addEventListener("abort",d),e.aborted&&(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[(0,K.now)()]}),d()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>Lu(sd(),1)).then(()=>{K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(r)],numbers:[(0,K.now)()]}),!r&&(window.AdmanHTML?(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[(0,K.now)()]}),i(),this.events.loadEnded$.next()):(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[(0,K.now)()]}),window.admanAsyncInit=a,o=window.setTimeout(a,this.initTimeout)))},d).finally(()=>{clearTimeout(o),clearTimeout(c),e.removeEventListener("abort",d)})});this.onAdsReady=()=>{K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[(0,K.now)()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var n;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[(0,K.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?Ae(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;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[(0,K.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;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.now)()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.now)()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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")=>{K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[(0,K.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"),K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[(0,K.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 N,w;if(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[(0,K.now)(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:i,height:n,isAutoplay:o,adsContainer:a,adsVideoElement:d,slotId:r,params:c={},paramsOverride:h={},duration:f,externalApi:l}=e;this.externalApi=l;let u,v=this.playerState&&Ae(this.playerState.vsid);v&&(this.isVsidOriginal?u=v:u=parseInt(v,36));let{isEmbed:b,immediateOrigin:y}=(0,K.detectEmbed)(),g=(N=b?y:window.location.href)!=null?N:window.location.href,C={...c,dl:encodeURIComponent(g),autoplay:o?1:0,player_width:i,player_height:n,...u?{request_id:u}:{},duration:f,...h};C=Object.fromEntries(Object.entries(C).filter(([A,M])=>(0,K.isNonNullable)(M)));let D={slot:r,wrapper:a,videoEl:d,videoQuality:n,params:C,browser:{mobile:!1}};try{let A=new window.AdmanHTML;if(A.onReady(this.onAdsReady),A.onStarted(this.onAdStarted),A.onPlayed(this.onAdPlayed),A.onPaused(this.onAdPaused),A.adMidrollPoint(this.onAdMidrollPoint),A.onClosed(this.onAdClosed),A.onSkipped(this.onAdSkipped),A.onClicked(this.onAdClicked),A.onTimeRemained(this.onAdTimeRemained),A.onCompleted(this.onAdCompleted),A.onError(this.onAdError),A.setDebug(!1),(w=this.externalApi)!=null&&w.videoGetAds){let M=await this.safeExternalCall(this.externalApi.videoGetAds,C);M&&(delete D.slot,delete D.params,Object.assign(D,{json:M}))}A.init(D),this.adman=A,this.videoElement=d,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(D)}`})}catch(A){K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[(0,K.now)()]}),this.onAdError("could not init adman")}}switchToVideo(e=!1){var n,o,a;if(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(n=this.currentAdSection)!=null?n:"","force: "+e],numbers:[(0,K.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 d="Switch to video: Adman state was not updated correctly";this.log({message:d}),this.events.error$.next(d)}(a=(o=this.actions).switchFromAdsToVideo)==null||a.call(o,!i)}}setPostrollPassed(e){var i;(i=this.adsState)==null||i.postrollPassed.set(e),this.log({message:"postroll passed"})}togglePlay(){var e;if(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.now)()]}),this.adsState){this.log({message:"toggle play"});let i=Ae(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(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[(0,K.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(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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(K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[(0,K.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,o,a,d,r,c,h,f,l,u;K.devNull.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[(0,K.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),(o=this.adman)==null||o.onPaused(void 0),(a=this.adman)==null||a.adMidrollPoint(void 0),(d=this.adman)==null||d.onClosed(void 0),(r=this.adman)==null||r.onSkipped(void 0),(c=this.adman)==null||c.onClicked(void 0),(h=this.adman)==null||h.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,at.clearVideoElement)(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...i){var n;try{return await e(...i)}catch(o){return this.onAdError((n=o==null?void 0:o.message)!=null?n:"External call failed"),null}}};var ld=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,dd=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},zp=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},ud=()=>!!zp();var cd=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 ya=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(e,i){let n=[],o=e.split(this.twoLinesRegExp);for(let a of o){let d={startTime:0,endTime:0,texts:[],lang:i},r=a.split(this.oneLineRegExp);for(let c of r)if(!d.startTime&&!d.endTime){let h=new Ho,{startTime:f,endTime:l}=h.parse(c);d.startTime=f,d.endTime=l}else if(c.trim()!==""){let h=new ba,{texts:f}=h.parse(c);d.texts=[...d.texts,...f]}(d.startTime||d.endTime)&&d.texts.length>0&&n.push(d)}return n}},Ho=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",o="0"){let a=Number(e)*60*60,d=Number(i)*60,r=Number(n),c=+`0.${o}`;return a+d+r+c}},ba=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(e){let i={texts:[]},o=e.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](d){let r=0,c=[];for(;r<d.length;){let h=["<",">"].reduce((f,l)=>{let u=d.indexOf(l,r);return f===-1||f>u?u:f},-1);if(h===-1){c.push(d.substring(r));break}c.push(d.substring(r,h)),r=h+1}return c}}),a=new Ho;for(let d of o)a.isTime(d)?i.texts.push({type:"timestamp",value:a.parseTime(d)}):i.texts.push({type:"text",value:d});return i}},pd=ya;var Yo=require("@vkontakte/videoplayer-shared/es2018"),Ki,Je,Aa=0,xa=!1,fd="",md=(t,e=0,i=0)=>t<e&&t<i,Qo=(t,e=0,i=0)=>t>=e&&t<=i,Fp=(t,e=0,i=0)=>t>e&&t>i,hd=(t,e,i,n=!1)=>{var r;let o=(r=i.find(({id:c})=>c===e.value))==null?void 0:r.subtitles;if(n)return o==null?void 0:o.find(({startTime:h,endTime:f})=>Qo(t,h,f));let a=t>=Aa,d=t<Aa;if(Aa=t,d&&(xa=!1),(0,Yo.isNonNullable)(Ki)&&Qo(t,Ki.startTime,Ki.endTime)&&fd===e.value)return Ki;if(!(0,Yo.isNonNullable)(Je)&&(o!=null&&o.length)&&!xa){Je=o.find(({startTime:h,endTime:f})=>Qo(t,h,f)||a&&md(t,h,f)),Ki=void 0,!(0,Yo.isNonNullable)(Je)&&o[o.length-1].endTime<t&&(xa=!0);return}else{if(Qo(t,Je==null?void 0:Je.startTime,Je==null?void 0:Je.endTime))return Ki=Je,Je=void 0,fd=e.value,Ki;(a&&Fp(t,Je==null?void 0:Je.startTime,Je==null?void 0:Je.endTime)||d&&md(t,Je==null?void 0:Je.startTime,Je==null?void 0:Je.endTime))&&(Je=void 0)}};var Bo={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"},Hp={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"},Ea=t=>{var e,i;return(i=(e=Bo[t])!=null?e:Bo[Hp[t]])!=null?i:void 0};var vd=require("@vkontakte/videoplayer-shared/es2018"),E0=require("@vkontakte/videoplayer-statistics/es2018"),Wo=class{constructor(e,i,n,o=new vd.Subscription){this.oneStat=e;this.thinOneStat=i;this.mediascopePixel=n;this.statSubscription=o}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 ui="off";var gd=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isLiveCatchUpMode:n,statAuthToken:o,isAudioDisabled:a,canDownload:d,callbacks:r,webApi:c,previewThumbsData:h,uiConfig:f,coreConfig:l,player:u,stopPlayer:v,looped:b=!1,statistics:y,saveRate:g,internalsExposure:C,playerId:D,metaConfig:N})=>{var rs;let w={...l,isAudioDisabled:a,live:{...(rs=l.live)!=null?rs:{},isLiveCatchUpMode:!!n}},A=f,M=ce.TracerFactory.createRootTracer(!1),I=M.createComponentTracer("Store"),m=u||new Be.Player(w,M,{playerId:D,onDevNullLog:r==null?void 0:r.onDevNullLog});C==null||C.expose({corePlayer:m});let U=new ce.Logger,x=new Fo(U,{loadTimeout:A.ads.loadTimeout,initTimeout:A.ads.initTimeout,runtimeTimeout:A.ads.runtimeTimeout,useAdmanFromNPM:A.ads.useAdmanFromNPM,volumeMultiplier:A.ads.volumeMultiplier,isVsidOriginal:A.ads.isVsidOriginal}),P=c==null?void 0:c.focusManager,k=U.createComponentLog("Store"),Z,ae,V={},G=new $o,F=new ce.Subscription,J="",Ee=H(!1),ee=y&&y.oneStat?Ve(y.oneStat.vsid$):Jt(void 0),de=H(ud()),Y=H(!1),_e=()=>ld(document,Be.clientChecker.device.isIOS),B=H(!1),je=H([]),De=(0,ce.merge)(m.events.fatalError$,m.events.managedError$).subscribe(s=>je.update(p=>[...p,s])),ue=Jt(!1,s=>{let p=m.events.fatalError$.subscribe(()=>s(!0));return()=>p.unsubscribe()}),O=async s=>{var q;let p=Object.values(ce.InterfaceLanguage).includes(s);if(A.downloadVKLanguages&&(p&&A.updateBuiltinLanguages||!ra(s))){let ne;try{ne=await(0,ce.loadVKLangPack)(s,Nl,Dl)}catch(ke){(q=y==null?void 0:y.oneStat)==null||q.logError({errorType:"VKLangPack",fatal:!1})}ne&&(oa({language:s,pack:ne,fallback:A.defaultLanguage}),pe.set(s),le.update(ke=>ke+1))}ra(s)&&pe.set(s)},pe=H(t),le=H(0),me=H(e);O(t);let Me=(s,p)=>{let $=Ae(pe);return aa($,s,p,A.defaultLanguage)},Se=H("thumb");Se.subscribe(s=>{s==="ads"&&m.info.playbackState$.getValue()&&S()});let Ue=(()=>{let s=rt([ue,Se],([p,$])=>p?"crashed":$);return{...s,is:p=>Ae(s)===p}})(),T=H(),S=()=>{T.set({muted:m.info.muted$.getValue()})},L=H({width:0,height:0}),R=null,te=m.info.isBuffering$,se=Jt(te.getValue(),s=>{let p=te.subscribe($=>{$&&R===null?R=window.setTimeout(()=>{s(te.getValue()),R=null},A.loaderDelay):s($)});return()=>{p.unsubscribe(),R&&clearTimeout(R)}});I.log("create store"),k({message:"create store"});let Ie=s=>{k({message:`init video, config: ${JSON.stringify(s)}`}),ce.devNull.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[(0,ce.now)()]}),m.initVideo(s),I.log("init video"),s.subtitles&&m.setExternalTextTracks(s.subtitles),Z=s,J=s.subtitlesForcedLanguage||""},$e=new ce.Subject,E=new ce.Subject,z=new ce.Subject,X={actionRewind$:$e,actionSeek$:E,inFullscreen$:new ce.Observable(s=>de.subscribe(p=>s.next(p))),actionSetSubtitle$:z},fe=new ce.Subject,_=new ce.Subject,Q={actionSeek$:E,actionSubtitlesSwitched$:fe,actionQuality$:_,playerSize$:new ce.Observable(s=>L.subscribe(p=>s.next(p))),inFullscreen$:new ce.Observable(s=>de.subscribe(p=>s.next(p))),isLoaderVisible$:new ce.Observable(s=>se.subscribe(p=>s.next(p)))};if(y){let{oneStat:s,thinOneStat:p,mediascopePixel:$,statSubscription:q}=y;s&&(q.add(s.attachToUi(X)),q.add(s.attachToAds(x.events)),s.authorize(o).catch(ne=>{k({message:`onestat auth error ${String(ne)}`})}),$&&$.attachTo(m)),p&&(q.add(p.attachTo(m,x.events)),q.add(p.attachToUi(Q)),q.add(p.attachToAds(x.events)),p.updateContext({isMobile:Ae(Ee)}),p.authorize(o))}let ie=()=>{if(Be.clientChecker.device.isIOS&&ae)try{dd(ae)}catch(s){k({message:`exitIosSafariFullscreen failed: ${s}`})}};F.add(m.experimental.element$.subscribe(s=>{s&&(ae=s,s.classList.add("player-media"))})).add(m.events.ended$.subscribe(()=>{var s;ie(),(s=r==null?void 0:r.onEnded)==null||s.call(r)})).add(m.events.looped$.subscribe(()=>{var s;(s=r==null?void 0:r.onLooped)==null||s.call(r)})).add(m.events.started$.subscribe(async()=>{var p,$;let s=m.info.muted$.getValue();(p=r==null?void 0:r.onStarted)==null||p.call(r),($=V.onStarted)==null||$.call(V,s)})).add(m.events.willSeek$.subscribe(({from:s,to:p})=>{var $;($=r==null?void 0:r.onSeek)==null||$.call(r,s,p)})).add(m.events.autoplaySoundProhibited$.subscribe(()=>{var s;(s=r==null?void 0:r.onAutoplaySoundProhibited)==null||s.call(r)})).add(m.info.position$.subscribe(s=>{var $;let p=m.info.duration$.getValue();isFinite(p)&&p>0&&(($=r==null?void 0:r.onTimeupdate)==null||$.call(r,p,s),x.setPosition(s,p))})).add(m.events.fatalError$.subscribe(s=>{var p;(p=r==null?void 0:r.onCrashed)==null||p.call(r,s?`${s.id}: ${s.message}`:void 0)})).add(m.events.fetcherRecoverableError$.subscribe(s=>{var p;(p=r==null?void 0:r.onRecoverableError)==null||p.call(r,s?`${s.id}: ${s.message}`:void 0)})).add(m.events.loadedMetadata$.subscribe(()=>{B.set(!0)})).add(m.info.liveTime$.subscribe(s=>{var p;(p=r==null?void 0:r.onLiveTime)==null||p.call(r,s)})).add(m.info.isStalled$.subscribe(s=>{var p;(p=r==null?void 0:r.onStalledChanged)==null||p.call(r,s)})).add(m.info.isLiveEnded$.subscribe(s=>{var p;return s&&((p=r==null?void 0:r.onLiveEnded)==null?void 0:p.call(r))})).add(x.events.loadStarted$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onLoadStarted)==null?void 0:p.call(s)})).add(x.events.loadEnded$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onLoadEnded)==null?void 0:p.call(s)})).add(x.events.loadError$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onLoadError)==null?void 0:p.call(s)})).add(x.events.init$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onInit)==null?void 0:p.call(s)})).add(x.events.ready$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onReady)==null?void 0:p.call(s)})).add(x.events.started$.subscribe(s=>{var p,$;return($=(p=r==null?void 0:r.adsInfo)==null?void 0:p.onStarted)==null?void 0:$.call(p,s)})).add(x.events.timeRemained$.subscribe(s=>{var p,$;return($=(p=r==null?void 0:r.adsInfo)==null?void 0:p.onTimeRemained)==null?void 0:$.call(p,s)})).add(x.events.ended$.subscribe(s=>{var p,$;return($=(p=r==null?void 0:r.adsInfo)==null?void 0:p.onCompleted)==null?void 0:$.call(p,s)})).add(x.events.empty$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onEmpty)==null?void 0:p.call(s)})).add(x.events.clicked$.subscribe(s=>{var p,$;return($=(p=r==null?void 0:r.adsInfo)==null?void 0:p.onClicked)==null?void 0:$.call(p,s)})).add(x.events.closed$.subscribe(s=>{var p,$;return($=(p=r==null?void 0:r.adsInfo)==null?void 0:p.onClosed)==null?void 0:$.call(p,s)})).add(x.events.error$.subscribe(s=>{var p,$;return($=(p=r==null?void 0:r.adsInfo)==null?void 0:p.onError)==null?void 0:$.call(p,s)})).add(x.events.paused$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onPaused)==null?void 0:p.call(s)})).add(x.events.resumed$.subscribe(()=>{var s,p;return(p=(s=r==null?void 0:r.adsInfo)==null?void 0:s.onResumed)==null?void 0:p.call(s)}));let Re=Jt(m.info.position$.getValue(),s=>{let p,$,q=()=>{let ne=m.info.playbackState$.getValue(),ke=m.info.isLive$.getValue(),Pe=m.info.duration$.getValue(),Oe=m.info.position$.getValue();if(ne&&[Be.PlaybackState.PLAYING,Be.PlaybackState.PAUSED].includes(ne)){let vt=ke?Oe-Pe:m.getExactTime();vt!==$&&s(vt),$=vt}p=requestAnimationFrame(q)};return q(),()=>cancelAnimationFrame(p)}),Le=Ve(m.info.playbackState$),it=Ve(m.info.isBuffering$),Ke=rt([Le,it],([s,p])=>p?"buffering":s),st=Ve(m.info.currentBuffer$),et=Ve(m.info.isEnded$),ci=Ve(m.info.isLive$),Gt=A.features.playbackRate?Ve(m.info.canChangePlaybackSpeed$):Jt(!1),pi=Ve(m.info.liveBufferTime$),_i=Ve(m.info.volume$),Pi=Ve(m.info.muted$),Di=Ro(m.info.predefinedQualityLimitType$.pipe((0,ce.map)(s=>s===Be.PredefinedQualityLimits.TRAFFIC_SAVING)),m.info.predefinedQualityLimitType$.getValue()===Be.PredefinedQualityLimits.TRAFFIC_SAVING),Qe=Ro(m.info.predefinedQualityLimitType$.pipe((0,ce.map)(s=>s===Be.PredefinedQualityLimits.HIGH_QUALITY)),m.info.predefinedQualityLimitType$.getValue()===Be.PredefinedQualityLimits.HIGH_QUALITY),ze=Ve(m.info.autoQualityLimitingAvailable$),nt=Ve(m.info.availableQualities$),er=Ve(m.info.availableQualitiesFps$),Zi=Ve(m.info.chromecastState$),xt=Ve(m.info.chromecastDeviceName$),Xe=Ve(m.info.currentFormat$),Ji=Ve(m.info.throughputEstimation$),Xi=Ve(m.info.videoBitrate$),Ad=Ve(m.info.intrinsicVideoSize$),Ma=Ve(m.info.duration$),xd=Ve(m.info.isAudioAvailable$),Ed=()=>{R&&clearTimeout(R),R=null},no=rt([Ma,ci],([s,p])=>p?-s:s),wa=rt([Le],([s])=>s===Be.PlaybackState.PLAYING),Sa=Ve(m.info.atLiveEdge$),Ia=Ve(m.info.atLiveDurationEdge$),Na=Ve(m.info.position$),Td=rt([Na,Ma],([s,p])=>isFinite(s)&&isFinite(p)&&!!p),Md=rt([Zi],([s])=>s===Be.ChromecastState.CONNECTED),wd=Ve(m.info.availableVideoStreams$),Da=A.features.audioLanguages?Ve(m.info.availableAudioStreams$):Jt([]),Sd=Ve(m.info.currentVideoStream$),La=Ve(m.info.currentAudioStream$),Id=s=>{s.language&&Gl(s.language),m.setVideoStream(s)},ka=s=>{m.setAudioStream(s)},Ca=s=>{let p;if(s.length===1&&(p=s.at(0)),p!=null||(p=s.find(q=>"isDefault"in q&&q.isDefault)),A.features.userVideoPrefs&&i){let q=jo(A.userSalt,String(i));if(q!=null&&q.audioTrackId){let ne=s.find(ke=>ke.id===q.audioTrackId);p=ne!=null?ne:p}}let $=Wl();return $&&(p!=null||(p=s.find(({language:q})=>$===q))),p!=null||(p=s.at(0)),p},Nd=s=>{I.log("change audio stream",{id:s});let p=m.info.availableAudioStreams$.getValue().find($=>$.id===s);p&&ka(p)},$a=!1;F.add(m.info.availableAudioStreams$.subscribe(s=>{if(!$a&&s.length){let p=Ca(s);p&&(m.setAudioStream(p),$a=!0)}})),Da.subscribe(s=>{var p;(p=r==null?void 0:r.onAvailableAudioStreamsChanged)==null||p.call(r,s.map(({label:$="",id:q="",language:ne=""})=>({label:$,language:ne,id:q})))}),La.subscribe(s=>{var p;return s&&((p=r==null?void 0:r.onAudioStreamChanged)==null?void 0:p.call(r,s.id))});let Oa=!1;F.add(m.info.availableVideoStreams$.subscribe(s=>{if(!Oa&&s.length){let p=Ca(s);p&&(m.setVideoStream(p),Oa=!0)}}));let oo=H(void 0),Ra=Ve(m.info.isAutoQualityEnabled$,s=>s&&oo.set(void 0)),Dd=Ve(m.info.currentQuality$,()=>oo.set(void 0)),Pa=rt([oo,Dd],([s,p])=>s!=null?s:p),Va=rt(Xe,s=>s!==Be.VideoFormat.MPEG),Ld=rt([nt,er,Ra,Pa,Va],([s,p,$,q,ne])=>{let ke=[];ne&&ke.push({value:"auto",displayValue:Me("auto_quality_option"),selected:$});let Pe=s.filter(Oe=>!(0,ce.isInvariantQuality)(Oe));for(let Oe of Pe){let vt=p[Oe];ke.push({value:Oe,displayValue:`${Oe}${vt?cd(vt):""}`,selected:$?!1:Oe===q})}return ke}),tr=Ve(m.info.currentPlaybackRate$),ir=rt([tr,Sa,Ia],([s,p,$])=>{let q=$?1:A.controls.playbackRateMin,ne=p?1:A.controls.playbackRateMax,ke=A.controls.playbackRateStep,Pe=[];for(let Oe=q;Oe<=ne;Oe+=ke)Pe.push({value:Oe,displayValue:Oe===1?Me("playback_rate_1"):Me("playback_rate",{multiplier:Oe.toString(10)}),selected:s===Oe});return Pe}),ro=()=>({displayValue:Me("subtitles_off"),value:ui,language:""}),ja=H(ro()),Li=rt([ja,le],([s],p)=>{s.value===ui?p(ro()):p(s)}),nr=A.features.subtitles?Ve(m.info.availableTextTracks$):Jt([]),Ua=Ul(),kd=rt([nr,Li],([s,p],$)=>{var ke;let q=[],ne=s.find(({id:Pe})=>Pe===p.value);if(ne!=null&&ne.url){let[,Pe]=(ke=Ua.find(ne.url))!=null?ke:[];if(Pe){$(Pe);return}G.download(ne.url).then(Oe=>{if(!Oe||G.isDestroyed())return;let vt=new pd,wn=ne.language;if(wn){let Au=!!ne.isAuto,xu=vt.parse(Oe,wn);q.push({lang:wn,subtitles:xu,isAuto:Au,id:ne.id})}Ua.add(ne.url,q),Ae(Li).value===p.value&&$(q)}).catch(()=>{var Oe;(Oe=y==null?void 0:y.oneStat)==null||Oe.logError({errorType:"Subtitles download",fatal:!1})})}$(q)}),Cd=rt([tr,wa,Li],([s,p,$],q)=>{let Pe;if(m.info.isLive$.getValue()&&p&&$.value!==ui){let vt=()=>{let wn=1e3/(3*s);Pe=setTimeout(vt,wn),q(Date.now())};return vt(),()=>clearTimeout(Pe)}}),za=rt([nr,Li],([s,p])=>{if(!s.length)return[];let $=[];for(let{language:q,isAuto:ne,id:ke}of s){let Pe=q&&Ea(q);q&&Pe&&$.push({displayValue:ne?Me("subtitles_auto",{language:Pe}):Pe,value:ke,selected:(p==null?void 0:p.value)===ke,isAuto:ne,language:q})}return $.length?($.unshift({...ro(),selected:(p==null?void 0:p.value)===ui}),$):[]}),Tn={available:[],prev:[]},$d=()=>{var p,$;let s=m.experimental.getCurrentTime$.getValue();return($=(p=s==null?void 0:s())!=null?p:ae==null?void 0:ae.currentTime)!=null?$:0},Od=rt([Re,Li,kd,Cd],([s,p,$,q])=>{var ke;let ne=m.info.isLive$.getValue();if(ne&&Tn.prev!==$){let Pe=$.find(({id:vt})=>vt===p.value),Oe=Tn.prev.find(({id:vt})=>vt===p.value);if(Pe){let vt={...Pe,subtitles:[...(ke=Oe==null?void 0:Oe.subtitles)!=null?ke:[],...Pe.subtitles]};Tn.available=[vt],Tn.prev=$}}if(p&&p.value!==ui){let Pe=ne?$d():s,Oe=ne?Tn.available:$;return hd(Pe,p,Oe,ne)}}),Rd=rt([Od],([s])=>s!=null&&s.texts?s.texts:[]);F.add(Li.subscribe(s=>{var p,$;if(s.value===ui)(p=r==null?void 0:r.onSubtitleOff)==null||p.call(r);else{let q=Object.entries(Bo).find(([ne,ke])=>ke===s.displayValue);($=r==null?void 0:r.onSubtitleOn)==null||$.call(r,q?q[0]:"",s.value)}}));let Pd=H(!0),Vd=rt([st,no,Na,pi],([s,p,$,q])=>{var Oe;let ne=(Oe=s==null?void 0:s.end)!=null?Oe:0;if(!q)return ne/p;let Pe=-$+q-p;return(ne-Pe)/p}),Fa=Ve(m.info.availableSources$),jd=rt([Fa],([s])=>Object.keys((s==null?void 0:s[Be.VideoFormat.MPEG])||{}).length>0),Ud=()=>{var $,q,ne;let s=Object.keys(((q=($=m.info.availableSources$)==null?void 0:$.getValue())==null?void 0:q[Be.VideoFormat.MPEG])||{}),p=(0,ce.getHighestQuality)(s)||ce.VideoQuality.Q_144P;return(ne=Z.sources[Be.VideoFormat.MPEG])==null?void 0:ne[p]},zd=()=>{var p;let s=Ud();if(s)I.log("download video",{url:s}),jl(s,((p=Z==null?void 0:Z.meta)==null?void 0:p.title)||"video");else{let $="There is no URL for download video";I.log("download video",{message:$}),k({message:$})}},Fd=()=>{k({message:"toggle muted"});let s=m.info.muted$.getValue();m.info.volume$.getValue()===0&&!s?rr(or()):Mn(!s)},Hd=()=>{Ge.ui.settingsMenu.visible$.set(!1),I.log("close settings menu")},Qd=async(s,p=()=>Promise.resolve())=>{Ge.ui.settingsMenu.visible$.set(!0),await p(),I.log("open settings menu",{wasOpenedByKeyboard:s})},or=()=>{var p;let s=Math.max(A.volumeMinRestore,(p=Po())!=null?p:0);return s===0?A.volumeDefault:s},rr=s=>{let p=s===0?or():s,$=m.info.muted$.getValue();k({message:`set volume, volume: ${s}, preferredVolume: ${p}`});let q=!a||Ue.is("ads");$&&s>0&&q&&($=!1),m.setVolume(s,$),x.setVolume(s)},Mn=s=>{let p=m.info.volume$.getValue();k({message:`set muted, currentVolume: ${p}, mute: ${s}`});let $=Ue.is("ads");if(m.setMuted(s,$),x.setVolume(s?0:p),!s&&p===0){let q=or();m.setVolume(q),x.setVolume(q)}},Ha=H(!1),Qa=s=>{I.log("set looped",{isLooped:s}),Ha.set(s),m.setLooped(s)};Qa(b);let Yd=()=>{m.prepare()},Bd=()=>{(0,ce.assertNonNullable)(Ge);let s=Ae(Ge.playerPhase),p={playerPhase:s,isVideoEnded:!1,action:"none"};if(k({message:"toggle play"}),s==="ads"){p.action="play",I.log("toggle adman play",p),x.togglePlay();return}let $=()=>{var ne;k({message:"toggle play, call player.play"}),p.action="play",m.play(),(ne=r==null?void 0:r.onPlay)==null||ne.call(r)},q=()=>{var ne;k({message:"toggle play, call player.pause"}),p.action="pause",m.pause(),(ne=r==null?void 0:r.onPause)==null||ne.call(r)};m.info.isEnded$.getValue()?(k({message:"toggle play, video ended, seek to 0"}),$e.next(),E.next(An.SeekAction.REWIND),m.seekTime(0),$()):m.info.playbackState$.getValue()!==Be.PlaybackState.PLAYING?$():q(),I.log("toggle play",p)},Ya=(s,{byUser:p=!1}={})=>{k({message:`set quality, quality: ${s}`}),I.log("set quality",{quality:s}),p&&_.next(s),m.setAutoQuality(s==="auto"),Vo(),s!=="auto"&&(ea(i,s),oo.set(s),m.setQuality(s))},Ba=s=>{k({message:`set trafficSavingEnabled, value: ${s}`}),I.log("set traffic saving enabled",{trafficSavingEnabled:s});let p=s?Be.PredefinedQualityLimits.TRAFFIC_SAVING:Be.PredefinedQualityLimits.UNKNOWN;m.setPredefinedQualityLimits(p)},Wa=s=>{k({message:`set highQualityEnabled, value: ${s}`}),I.log("set high quality enabled",{highQualityEnabled:s}),Wd(s?Be.PredefinedQualityLimits.HIGH_QUALITY:Be.PredefinedQualityLimits.UNKNOWN)},Wd=s=>{m.setPredefinedQualityLimits(s)},ar=(s,p=!0)=>{I.log("set playback rate",{playbackRate:s}),m.setPlaybackRate(s),A.features.saveRate&&g&&!m.info.isLive$.getValue()&&p&&ql(s)},Gd=()=>{let s=Ae(Gt),p=Ae(ir),$=p.findIndex(({selected:ne})=>ne);if($===p.length-1||!s)return p[$];let q=p[$+1];return ar(q.value),q},qd=()=>{let s=Ae(Gt),p=Ae(ir),$=p.findIndex(({selected:ne})=>ne);if($===0||!s)return p[$];let q=p[$-1];return ar(q.value),q},sr=(s={...ro(),selected:!1})=>{I.log("set subtitles",{...s}),s.value!==ui&&z.next(s.isAuto?s.value+"_auto":s.value),fe.next({enabled:s.value!==ui,lang:s.language,auto:!!s.isAuto}),ja.set(s)},Ga=s=>{I.log("toggle subtitles");let p=Ae(Li);(p==null?void 0:p.value)===ui?qa(s):Ka()},Kd=(s,p)=>{I.log("change subtitle",{enabled:s}),s?qa(!0,p):Ka()},qa=(s,p)=>{I.log("subtitle on");let $=Ae(za),q=Ae(pe),ne=J!=null?J:q,ke;p&&(ke=$.find(Pe=>Pe.value===p)),ke!=null||(ke=$.filter(Pe=>Pe.value!==ui).find(Pe=>Pe.language===ne)),sr(ke!=null?ke:$[1])},Ka=()=>{I.log("subtitle off"),sr(void 0)};F.add(m.info.availableTextTracks$.subscribe(s=>{var $;function p(){let q=[];for(let{language:ne,isAuto:ke,id:Pe}of s){let Oe=ne&&Ea(ne);ne&&Oe&&q.push({id:Pe,language:ne,title:ke?Me("subtitles_auto",{language:Oe}):Oe})}return q}($=r==null?void 0:r.onAvailableSubtitlesChanged)==null||$.call(r,p())}));let Za=H(!0),Ja=s=>{Za.set(s)},Xa=(s,p,$=!0)=>{var q;if(k({message:`seek to time, time: ${s}`}),I.log("seek to time",{time:s,action:p,forcePrecise:$}),E.next(p),m.info.isLive$.getValue()){let ne=m.info.duration$.getValue(),ke=Math.min(0,ne+s);m.seekTime(ke,$)}else m.info.isEnded$.getValue()&&(k({message:"seek after ended, call callbacks.onPlay"}),(q=r==null?void 0:r.onPlay)==null||q.call(r)),m.seekTime(s,$)},es=(s,p,$=!1)=>{k({message:`seek to percent, percent: ${s}`}),I.log("seek to percent",{percent:s,action:p});let q=Ae(no)*s;Xa(q,p,$)},Zd=s=>{k({message:`seek external, time: ${s}`}),I.log("seek external",{time:s}),E.next(An.SeekAction.UNKNOWN),m.seekTime(m.info.isLive$.getValue()?-s:s)},Jd=s=>{var q,ne;let p=(q=s.max)!=null?q:"none",$=(ne=s.min)!=null?ne:"none";k({message:`set auto quality limitation. Max: ${p}. Min: ${$}`}),I.log("set auto quality limits",{max:p,min:$}),m.setAutoQualityLimits(s)},Xd=s=>{k({message:`set playback rate to: ${s}`}),I.log("set playback rate external",{playbackRate:s}),m.setPlaybackRate(s)},lr=H(void 0),dr=H(!1),eu=s=>{k({message:`start scrubbing, progress: ${s}`}),I.log("start scrubbing",{progress:s}),dr.set(!0),ts(s)},ts=s=>{lr.set(s)},tu=()=>{lr.set(void 0),dr.set(!1)},iu=(s,p=!1)=>{k({message:`complete scrubbing, progress: ${s}`}),I.log("complete scrubbing",{progress:s}),es(s,An.SeekAction.SLIDER,p),tu()},nu=rt([Re,no,lr],([s,p,$],q)=>{q((0,ce.isNonNullable)($)?$*p:s)}),ur=H(!1),ou=()=>{ur.set(!0)},ru=()=>{ur.set(!1)},au=s=>{E.next(An.SeekAction.LIVE),k({message:"live switch to low latency "+s}),I.log("live switch to low latency "+s),m.setLiveLowLatency(s)},su=()=>{E.next(An.SeekAction.LIVE),k({message:"switch to active live"}),I.log("switch to active live"),m.seekTime(0),m.info.playbackState$.getValue()!==Be.PlaybackState.PLAYING&&Ge.actions.internal.togglePlay()},lu=()=>{I.log("skip adman"),x.skip()},du=(s=!0)=>{var q;(0,ce.assertNonNullable)(Ge),k({message:`switch from ads to video, callPlay: ${s}`}),I.log("switch from ads to video",{callPlay:s}),Se.set("video"),s&&m.play(),a&&Mn(!0);let p=(q=Ae(T))==null?void 0:q.muted,$=!m.info.muted$.getValue();p!==void 0&&!$&&Mn(p),T.set(void 0)},uu=()=>{(0,ce.assertNonNullable)(Ge),k({message:"switch from video to ads"}),I.log("switch from video to ads"),Ge.actions.internal.pause(),ie(),Se.set("ads")},cu=s=>{(0,ce.assertNonNullable)(Ge);let p=s?"LiveWaitingStart":"thumb";I.log("set live waiting start",{state:s,playerPhase:p}),Se.set(p)},pu=s=>{(0,ce.assertNonNullable)(Ge);let p=s?"LiveWaitingRecover":"thumb";I.log("set live waiting recover",{state:s,playerPhase:p}),Se.set(p)},fu=s=>{(0,ce.assertNonNullable)(Ge);let p=s?"LiveWaitingRecord":"thumb";I.log("set live waiting record",{state:s,playerPhase:p}),Se.set(p)},mu=()=>((0,ce.assertNonNullable)(Ge),I.log("get debug text data"),Pl(m,Z,Ge,M.getTraceId(),N)),hu=()=>((0,ce.assertNonNullable)(Ge),JSON.stringify(M.getFinishedSpans())),vu=()=>((0,ce.assertNonNullable)(Ge),Vl(m,Z,Ge)),gu=()=>ae,is=s=>{var $;if((0,ce.assertNonNullable)(Ge),m.info.isEnded$.getValue())return;let p=!s;if(Ae(Ge.playerPhase)==="ads"){k({message:`pause ads, internalCall: ${p}`}),I.log("pause ads",{internalCall:p}),x.pause();return}k({message:`pause video, internalCall: ${p}`}),I.log("pause video",{internalCall:p}),p&&(($=r==null?void 0:r.onPause)==null||$.call(r)),m.pause()},ns=s=>{var $;(0,ce.assertNonNullable)(Ge);let p=!s;if(Ae(Ge.playerPhase)==="ads"){k({message:`play ads, internalCall: ${p}`}),I.log("play ads",{internalCall:p}),x.play();return}k({message:`play video, internalCall: ${p}`}),I.log("play video",{internalCall:p}),p&&(($=r==null?void 0:r.onPlay)==null||$.call(r)),m.play()},_u=s=>{(0,ce.assertNonNullable)(Ge);let p=!s;if(Ae(Ge.playerPhase)==="ads"){k({message:"player cannot be stopped during ads via external method"});return}k({message:`player will be stopped, internalCall: ${p}`}),v==null||v()},os=(s,p)=>{(0,ce.assertNonNullable)(Ge),k({message:`first start, show ads: ${s}, internalCall: ${!p}`}),I.log("first start",{showAds:s,external:p}),s?Se.set("ads"):(Se.set("video"),p?m.play():Ge.actions.internal.togglePlay())},yu=()=>(k({message:"getting preview thumbs data"}),I.log("get preview thumbs data",{...h}),h),bu=()=>{I.log("destroy store"),F.unsubscribe(),m.destroy(),x.destroy(),y==null||y.destroy(),De.unsubscribe(),G.destroy()},Ge={interfaceLanguage$:pe,isCyrillicRelatedInterface$:me,initVideo:Ie,videoId:i,playerPhase:Ue,vsid:ee,state:{positionExact$:Re,positionWithScrubbing$:nu,duration$:no,playbackState$:Le,playbackStateRealistic$:Ke,isPlaying$:wa,isLoaderVisible:se,bufferedProgress$:Vd,isLive$:ci,canChangePlaybackSpeed$:Gt,isActiveLive$:Sa,isOldestAvailableLive$:Ia,isRewindableLive$:Td,isEnded$:et,muted$:Pi,volume$:_i,trafficSavingEnabled$:Di,highQualityEnabled$:Qe,autoQualityLimitingAvailable$:ze,availableVideoStreams$:wd,availableAudioStreams$:Da,videoStream$:Sd,audioStream$:La,currentQuality$:Pa,isAutoQualityEnabled$:Ra,availableQualities$:Ld,currentPlaybackRate$:tr,availablePlaybackRates$:ir,currentSubtitle$:Li,availableTextTracks$:nr,availableSubtitlesList$:za,currentSubtitleCaptions$:Rd,isAutoSubtitleCaptionVisible$:Pd,chromecastState$:Zi,chromecastDeviceName$:xt,chromecastConnected$:Md,currentFormat$:Xe,throughputEstimation$:Ji,videoBitrate$:Xi,videoSize$:Ad,errorLog$:je,crashed$:ue,isAudioAvailable$:xd,isAudioDisabled:!!a,canDownload:A.features.download&&!!d,availableSources$:Fa,hasMpegSources$:jd,looped$:Ha,loadedMetadata$:B,isAutoQualityAvailable$:Va},ui:{t:Me,controlsVisible:H(!1),touched:H(!1),controls:{prevButton:H(void 0),playButton:H(void 0),replayButton:H(void 0),nextButton:H(void 0),playPrevChapterButton:H(void 0),seekToInteractiveButton:H(void 0),interactiveGraphButton:H(void 0),liveButton:H(void 0),time:H(void 0),episodes:H(void 0),volume:H(void 0),subtitles:H(void 0),settings:H(void 0),context:H(void 0),chromecast:H(void 0),pip:H(void 0),fullscreen:H(void 0),vkLogo:H(void 0),interactiveTimeIndicator:H(void 0),timeline:H(void 0),autoplayNextToggle:H(void 0)},modals:{hotKeyMap:{show:H(!1),data:H({title:"",closeBtnText:"",groups:[]})}},isFullscreen:de,isFullscreenOpenedByKeyboard:Y,isAutoplay:H(!1),debugPanelVisible:H(!1),episodes:{panelOpened$:H(!1),openedByKeyboard$:H(!1)},contextMenu:{visible$:H(!1),btnRef$:H(void 0),openedByBtnKeyboard$:H(!1),openedByHotKey$:H(!1),lastActiveElem$:H(void 0),showContextMenuBtn$:H(!1),position$:H({top:0,left:0})},playerSize:L,isMobile:Ee,icon3DVideoVisible:H(!1),scrubbingInProgress:dr,volumeChangingInProgress:ur,interactiveHideMobileControls:H(!1),overlayContainer$:H(void 0),startedByKeyboard$:H(!1),autoplayNextEnabled$:H(!1),timerNextVideoRunning$:H(!0),settingsMenu:{visible$:H(!1),ref$:H(void 0),openedByBtnKeyboard$:H(!1)},settingsSubMenu:{visible$:H(!1),ref$:H(void 0),name$:H(void 0)},userActionsDisabled:H(!1),hiddenControls:{volume:H(!1),vkLogo:H(!1),pip:H(!1),chromecast:H(!1),settings:H(!1)},isControlsAvailable:Za,controlBlocks:{topLeft:H(void 0),topRight:H(void 0),middle:H(void 0),bottom:H(void 0),bottomLeft:H(void 0),bottomRight:H(void 0)},videoTitleInfo:H(void 0),previewTrackNotificationVisible:H(!1)},ads:{position:H(0),duration:H(0),playbackState:H("inactive"),canSkip:H(!1),secondsToWatchBeforeSkip:H(0),postrollPassed:H(!1)},webApi:{focusManager:P},actions:{internal:{preload:Yd,firstStart:s=>os(s,!1),play:()=>ns(!1),pause:()=>is(!1),togglePlay:Bd,toggleMuted:Fd,openSettingsMenu:Qd,closeSettingsMenu:Hd,setVolume:s=>rr(s),setMuted:s=>Mn(s),startVolumeChanging:ou,stopVolumeChanging:ru,setVideoStream:Id,setAudioStream:s=>ka(s),setQuality:(s,p)=>Ya(s,p),setTrafficSavingEnabled:s=>Ba(s),setHighQualityEnabled:s=>Wa(s),setPlaybackRate:ar,incrementPlaybackRate:Gd,decrementPlaybackRate:qd,setSubtitle:s=>sr(s),toggleSubtitle:()=>Ga(!1),startScrubbing:eu,progressScrubbing:ts,completeScrubbing:iu,switchToActiveLive:su,switchFromAdsToVideo:du,switchFromVideoToAds:uu,skipAd:lu,setLiveWaitingStart:cu,setLiveWaitingRecover:pu,setLiveWaitingRecord:fu,getDebugTextData:mu,getTraceTextData:hu,getDebugPanelData:vu,getVideoElement:gu,seekTime:(s,p,$)=>Xa(s,p,$),clearDelayedBufferingCheckTimeout:Ed,seekToPercent:es,getPreviewThumbsData:yu,downloadVideo:zd,addLanguage:oa,setLanguage:O,setLooped:Qa,checkFullscreenSupport:_e},external:{firstStart:s=>os(s,!0),play:()=>ns(!0),pause:()=>is(!0),stop:()=>_u(!0),seekTime:s=>Zd(s),setPlaybackRate:s=>Xd(s),setAutoQualityLimits:s=>Jd(s),setMuted:s=>Mn(s),toggleSubtitle:()=>Ga(!0),changeSubtitle:Kd,setVolume:s=>rr(s),setLiveLowLatency:au,hideControls:()=>Ja(!1),showControls:()=>Ja(!0),setQuality:s=>Ya(s),setTrafficSavingEnabled:s=>Ba(s),setHighQualityEnabled:s=>Wa(s),changeAudioStream:Nd}},callbacks:r,setUiCallbacks:s=>{V={...s}},getAdmanWrapper:()=>x,getLogger:()=>U,getPlayer:()=>m,destroy:bu};return Ge};var Jo=require("@vkontakte/videoplayer-shared/es2018"),jt=require("@vkontakte/videoplayer-shared/es2018"),bd=require("@vkontakte/videoplayer-core/es2018"),xn=require("@vkontakte/videoplayer-statistics/es2018");function io(t,e){var o,a;let i=new Set([...Object.keys(t),...Object.keys(e)]),n={};for(let d of i)n[d]=(a=(o=e[d])!=null?o:t[d])!=null?a:void 0;return n}var Ko=require("@vkontakte/videoplayer-shared/es2018");var Go=class{constructor(e){this.getActiveElement=e;this.focusableElements=[];this.isActive=!1;this.handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],n=this.focusableElements[this.focusableElements.length-1],o=this.getActiveElement();e.shiftKey&&o===i?(e.preventDefault(),n.focus()):!e.shiftKey&&o===n&&(e.preventDefault(),i.focus())}}activate(){this.isActive||(document.addEventListener("keydown",this.handleTabKey),this.isActive=!0)}deactivate(){this.isActive&&(document.removeEventListener("keydown",this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=["button:not([disabled])","[href]:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])'].join(", ");return Array.from(this.container.querySelectorAll(e)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}};var qo=class{constructor(e){this.shadowRoot=e;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{var e;(e=this.lastFocusedNode)==null||e.focus()};this.focusLock=new Go(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener("focusin",this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}};var _d=require("@vkontakte/videoplayer-shared/es2018"),Ta=(0,_d.getWindow)().HTMLElement||class{constructor(){this.isConnected=!1}};var Qp=Object.defineProperty,Yp=(t,e,i)=>e in t?Qp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,qe=(t,e,i)=>Yp(t,typeof e!="symbol"?e+"":e,i),Bp={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:jt.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},yd=He(void 0),Zo=class extends Ta{constructor(){super(),qe(this,"svelteStubComponent"),qe(this,"svelteRootComponent"),qe(this,"svelteErrorComponent"),qe(this,"store"),qe(this,"statistics"),qe(this,"_shadowRoot"),qe(this,"playerContainer"),qe(this,"rootContainer"),qe(this,"stateContainer"),qe(this,"shadowRootContainer"),qe(this,"playerId"),qe(this,"uiConfig"),qe(this,"coreConfig"),qe(this,"statisticsConfig"),qe(this,"metaConfig"),qe(this,"currentPlayingVideoIndex",0),qe(this,"videoConfig"),qe(this,"subscription"),qe(this,"focusManager"),qe(this,"prevIsid"),qe(this,"isInited",!1),qe(this,"postponedInitParams",null),qe(this,"internalsExposure",null),qe(this,"fatalError$",new Jo.ValueSubject(null)),qe(this,"createOneStat",(e,i={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:o,statUserSalt:a,statTrackCode:d,statVKAppId:r,refreshStatAuthToken:c,autoplay:h,isTouch:f,refDomain:l,deviceId:u}=io(this.videoConfig,i),{unitedVideoId:v,isClip:b=!1}=e;if(this.uiConfig.features.statistics&&v)try{return new xn.OneStat({movieId:v,albumId:n,place:o,trackCode:d,vkAppId:r,autoplay:h!=null?h:!1,mobile:f,clip:b,refDomain:l,deviceId:u,isPreviewPlayerView:!1},{refreshAuthToken:c,userSalt:a,config:this.statisticsConfig})}catch(g){console.error(g)}}),this.subscription=new jt.Subscription,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=$i(_a,{target:this.playerContainer}))})}connectedCallback(){var e,i;if(this.rootContainer)return;this.initPlayerRootContainers();let n=(e=this.getAttribute("stub-title"))!=null?e:void 0,o=(i=this.getAttribute("stub-thumb-url"))!=null?i:void 0,a=Mt({title:n,thumbUrl:o}),d={target:this.playerContainer,props:a};this.svelteStubComponent=$i(ga,d),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}disconnectedCallback(){var e,i;(e=this.focusManager)==null||e.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.subscription.unsubscribe(),(i=this.internalsExposure)==null||i.destroy()}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}createThinOneStat(e,i={}){if(!this.videoConfig)return;let{deviceId:n,preload:o,refreshStatAuthToken:a}=io(this.videoConfig,i),{unitedVideoId:d}=e;if(this.uiConfig.features.thinStatistics&&d)return new xn.ThinOneStat.ThinOneStat({deviceId:n,movieId:d,preload:o,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:a})}createPlayer(e,i={},n){var o;if(!this.videoConfig)return;let{statAuthToken:a,preload:d,autoplay:r,volume:c,muted:h,fromTime:f,canRewindLive:l,supportLink:u,showAds:v,adsSlotId:b,adsParams:y={},adsAutoplayParam:g,interfaceLanguage:C,isCyrillicRelatedInterface:D,isAudioDisabled:N,isLiveCatchUpMode:w,fullScreenTarget:A,failoverHosts:M,canDownload:I,callbacks:m,saveRate:U,volumeMultiplier:x,showEndScreen:P,mediascopePixels:k}=io(this.videoConfig,i),{sources:Z,title:ae,thumbUrl:V,unitedVideoId:G,duration:F,adsParams:J={},previewThumbsData:Ee,subtitles:ee,subtitlesForcedLanguage:de,live:Y,adsExternalApi:_e}=e;if(!Z&&!Y){let le=new Error("empty sources and live");this.fatalError$.next(le),(o=m==null?void 0:m.onCrashed)==null||o.call(m,le.message);return}let B={...y,...J},je={focusManager:this.focusManager},De=this.createOneStat(e,i),ue=this.createThinOneStat(e,i),O;k&&(O=new xn.MediascopePixel({pixels:k})),(De||ue)&&(this.statistics=new Wo(De,ue,O)),this.store=gd({player:n,interfaceLanguage:C,isCyrillicRelatedInterface:D,videoId:G,isLiveCatchUpMode:w,isAudioDisabled:N,statAuthToken:a,callbacks:m,webApi:je,previewThumbsData:Ee,canDownload:I,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:U,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let pe=()=>{var le,me,Me,Se,Ue,T;if(!this.store||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(L=>{var R;return(R=m==null?void 0:m.onCurrentFormatChanged)==null?void 0:R.call(m,L)})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(L=>{var R;return(R=m==null?void 0:m.onThroughputEstimationChanged)==null?void 0:R.call(m,L)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(L=>{var R;return(R=m==null?void 0:m.onTrafficSavingEnabledChanged)==null?void 0:R.call(m,L)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(L=>{var R;return(R=m==null?void 0:m.onHighQualityEnabledChanged)==null?void 0:R.call(m,L)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(L=>{var R;return(R=m==null?void 0:m.onAutoQualityEnabledChanged)==null?void 0:R.call(m,!!L)})),this.subscription.add(new jt.Observable(L=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(R=>L.next(R)))}).pipe((0,jt.skip)(1)).subscribe(L=>{var R;return(R=m==null?void 0:m.onCurrentPlaybackRateChanged)==null?void 0:R.call(m,L)})),this.subscription.add(this.store.state.volume$.subscribe(L=>{var R;return(R=m==null?void 0:m.onVolumeChange)==null?void 0:R.call(m,L)})),this.subscription.add(this.store.state.muted$.subscribe(L=>{var R,te,se,Ie;if(L)(R=m==null?void 0:m.onMute)==null||R.call(m);else{let $e=(se=((te=this.store)==null?void 0:te.state.volume$)&&Ae(this.store.state.volume$))!=null?se:0;(Ie=m==null?void 0:m.onUnmute)==null||Ie.call(m,$e)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(L=>{var R;return(R=m==null?void 0:m.onVideoBitrateChanged)==null?void 0:R.call(m,L)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(L=>{var R;return(R=m==null?void 0:m.onVSIDChanged)==null?void 0:R.call(m,L)})),Ne(yd,{sources:Z,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:ae,thumbUrl:V,subtitles:ee,subtitlesForcedLanguage:de,live:Y,preload:d,autoplay:r,muted:h,volume:c,fromTime:f,canRewindLive:l,supportLink:u,showAds:v,adsSlotId:b,adsParams:B,adsAutoplayParam:g,duration:F,failoverHosts:M,fullScreenTarget:A,saveRate:U,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:x,showEndScreen:P,adsExternalApi:_e,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let S={target:this.playerContainer,props:j(yd)};this.svelteRootComponent=$i(ha,S),this.isInited||(this.isInited=!0,(Me=(me=(le=this.videoConfig)==null?void 0:le.callbacks)==null?void 0:me.onInited)==null||Me.call(me)),(Se=this.internalsExposure)==null||Se.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig}),this.uiConfig.devNullLog&&((T=(Ue=this.videoConfig)==null?void 0:Ue.callbacks)!=null&&T.onDevNullLog)?Ko.devNull.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ko.devNull.destroy("ui")};this.coreConfig.asyncResolveClientChecker?bd.clientChecker.isInited$.subscribe(le=>{le&&(console.log("UI TV SDK async start"),pe())}):pe()}initPlayer(e,i={}){var n,o,a,d,r,c,h,f,l,u,v,b,y;if(!this.isConnected){this.postponedInitParams=[e,i];return}if(!Array.isArray(e.videos)||e.videos.length===0){let g=new Error("empty videos");this.fatalError$.next(g),(o=(n=e.callbacks)==null?void 0:n.onCrashed)==null||o.call(n,g.message);return}else this.fatalError$.next(null);this.videoConfig=io(Bp,(0,jt.cloneDeepWith)(e,g=>g instanceof Ta?g:void 0)),this.playerId=(0,jt.getPlayerId)(e.playerId),this.uiConfig=Sl((a=i.ui)!=null?a:{}),this.coreConfig=(d=i.core)!=null?d:{},this.statisticsConfig=(r=i.statistics)!=null?r:{},this.metaConfig=i.meta,this.uiConfig.features.exposeInternalsToGlobal&&((c=this.internalsExposure)!=null||(this.internalsExposure=new jt.InternalsExposure("ui",this.playerId))),Ko.devNull.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+((h=this.videoConfig)==null?void 0:h.showAds)],numbers:[(0,Jo.now)()]}),(f=this.videoConfig).autoplay&&(f.autoplay=this.uiConfig.features.autoplay),this.videoConfig.showAds=(l=this.uiConfig.ads.enable)!=null?l:this.videoConfig.showAds,this.videoConfig.adsSlotId=(u=this.uiConfig.ads.slot)!=null?u:this.videoConfig.adsSlotId,(v=this.videoConfig).canRewindLive&&(v.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=(b=this.videoConfig.supportLink)!=null?b:this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&((y=this.videoConfig.videos)!=null&&y[this.videoConfig.videoIndex])?this.videoConfig.videoIndex:0,this.focusManager=this._shadowRoot?new qo(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex])}play(){var e,i,n,o;(e=this.store)!=null&&e.playerPhase.is("LiveWaitingStart")||(i=this.store)!=null&&i.playerPhase.is("LiveWaitingRecover")||(n=this.store)!=null&&n.playerPhase.is("LiveWaitingRecord")||(o=this.svelteRootComponent)==null||o.play()}pause(){var e;(e=this.svelteRootComponent)==null||e.pause()}stop(){if(!this.videoConfig)return;this.unmountComponent(this.svelteStubComponent);let e=this.videoConfig.videos[0];e&&(this.unmountComponent(this.svelteRootComponent),this.createPlayer(e))}setMuted(e){var i;(i=this.svelteRootComponent)==null||i.setMuted(e)}toggleSubtitle(){var e;(e=this.svelteRootComponent)==null||e.toggleSubtitle()}changeSubtitle(e,i){var n;(n=this.svelteRootComponent)==null||n.changeSubtitle(e,i)}setVolume(e){var i;(i=this.svelteRootComponent)==null||i.setVolume(e)}seekTime(e){var i;(i=this.svelteRootComponent)==null||i.seekTime(e)}setPlaybackRate(e){var i;(i=this.svelteRootComponent)==null||i.setPlaybackRate(e)}setAutoQualityLimits(e){var i;(i=this.svelteRootComponent)==null||i.setAutoQualityLimits(e)}setAutoQuality(){var e;(e=this.svelteRootComponent)==null||e.setAutoQuality()}toggleTrafficSaving(e){var i;(i=this.svelteRootComponent)==null||i.toggleTrafficSaving(e)}toggleHighQuality(e){var i;(i=this.svelteRootComponent)==null||i.toggleHighQuality(e)}changeAudioStream(e){var i;(i=this.svelteRootComponent)==null||i.changeAudioStream(e)}addLanguage(e){var i;(i=this.store)==null||i.actions.internal.addLanguage(e)}async setLanguage(e){var i;await((i=this.store)==null?void 0:i.actions.internal.setLanguage(e))}setLiveStart(e){var i,n;this.isLiveTailPlaying()||((i=this.store)==null||i.actions.internal.setLiveWaitingRecover(!1),(n=this.store)==null||n.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){var e;(e=this.store)==null||e.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){var e;let i=(e=this.store)==null?void 0:e.getPlayer();if(!i)return!1;let{info:n}=i;return n.canPlayLiveTailBuffer$.getValue()&&!n.isStalled$.getValue()&&!n.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){var i;let n=this.isLiveTailPlaying(),o=e||!n,a=()=>{var d;(d=this.store)==null||d.actions.internal.setLiveWaitingRecover(!0)};o&&a(),(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var d;o||a(),(d=this.store)==null||d.destroy()})}setLiveWaitingRecord(){var e;let n=!this.isLiveTailPlaying(),o=()=>{var a;(a=this.store)==null||a.actions.internal.setLiveWaitingRecord(!0)};n&&o(),(e=this.store)!=null&&e.callbacks&&(this.store.callbacks.onLiveEnded=()=>{var a;n||o(),(a=this.store)==null||a.destroy()})}setLiveEnd(e){var i;let o=!this.isLiveTailPlaying(),a=()=>{var d,r;(d=this.store)==null||d.actions.internal.setLiveWaitingRecover(!1),(r=this.store)==null||r.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(o){a();return}(i=this.store)!=null&&i.callbacks&&(this.store.callbacks.onLiveEnded=a)}setLiveLowLatency(e){var i;(i=this.store)==null||i.actions.external.setLiveLowLatency(e)}setLooped(e){var i;(i=this.store)==null||i.actions.internal.setLooped(e)}getDebugData(){var e,i;return(i=(e=this.store)==null?void 0:e.actions.internal.getDebugTextData())!=null?i:""}getDeviceId(){var e,i,n;return(n=(i=(e=this.statistics)==null?void 0:e.oneStat)==null?void 0:i.getDeviceId())!=null?n:void 0}switchToActiveLive(){var e;(e=this.store)==null||e.actions.internal.switchToActiveLive()}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}restoreFocus(){var e;(e=this.focusManager)==null||e.restoreFocus()}getTotalViewTime(){var e,i;return(i=(e=this.statistics)==null?void 0:e.thinOneStat)==null?void 0:i.getTotalViewTime()}unmountComponent(e){e&&Kn(e)}};var En=require("@vkontakte/videoplayer-shared/es2018"),Xo=require("@vkontakte/videoplayer-core/es2018"),Wp=()=>{window.customElements.define("vk-video-player-tv",Zo)};
|
|
58
|
+
Audio: ${(G(a).audioCodec||``)??``} ${G(a).audioLanguage?`(${G(a).audioLanguage})`:``}`)),q(e,t)};Hc(k,e=>{(G(a).videoCodec||G(a).audioCodec)&&e(A)});var j=H(k,2),M=e=>{var t=_d(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(()=>Cc(r,G(a).viewport)),q(e,t)};Hc(j,e=>{G(a).viewport&&e(M)});var N=H(j,2),P=e=>{var t=vd(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(()=>Cc(r,G(a).videoSize)),q(e,t)};Hc(N,e=>{G(a).videoSize&&e(P)});var ee=H(N,2),te=e=>{var t=yd(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(()=>Cc(r,G(a).cdn)),q(e,t)};Hc(ee,e=>{G(a).cdn&&e(te)});var ne=H(ee,2),re=e=>{var t=bd(),n=H(V(t),2),r=V(n);z(n),z(t),bs(()=>Cc(r,`${G(a).volume??``} %`)),q(e,t)};Hc(ne,e=>{G(a).volume&&e(re)});var ie=H(ne,2),ae=e=>{var t=xd(),n=H(V(t),2),r=V(n);z(n),z(t),bs(e=>Cc(r,`${e??``} s`),[()=>G(a).position.toFixed(2)]),q(e,t)};Hc(ie,e=>{G(a).position&&e(ae)});var oe=H(ie,2),se=e=>{var t=Sd(),n=H(V(t),2),r=V(n);z(n),z(t),bs(e=>Cc(r,`${e??``} s`),[()=>G(a).buffer.toFixed(2)]),q(e,t)};Hc(oe,e=>{G(a).buffer&&e(se)});var ce=H(oe,2),le=e=>{var t=Cd(),n=H(V(t),2),r=V(n);z(n),z(t),bs(e=>Cc(r,`${e??``} s`),[()=>G(a).nativeBuffer.toFixed(2)]),q(e,t)};Hc(ce,e=>{G(a).nativeBuffer&&e(le)});var ue=H(ce,2),de=e=>{var t=wd(),n=H(V(t),2),r=V(n);z(n),z(t),bs(e=>Cc(r,`${e??``} s`),[()=>G(a).liveLatency.toFixed(2)]),q(e,t)};Hc(ue,e=>{G(a).liveLatency&&e(de)});var fe=H(ue,2),pe=e=>{var t=Td(),n=H(V(t),2),r=V(n,!0);z(n),z(t),bs(e=>Cc(r,e),[()=>[{value:G(a).currentVideoSegmentLength,title:`Video:`},{value:G(a).currentAudioSegmentLength,title:`Audio:`}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(` & `)]),q(e,t)};Hc(fe,e=>{(G(a).currentVideoSegmentLength||G(a).currentAudioSegmentLength)&&e(pe)});var me=H(fe,2),he=H(V(me),2),ge=V(he);z(he),z(me);var _e=H(me,2),ve=e=>{var t=Ed(),n=H(V(t),2);ed(n,{get values(){return G(m)}});var r=H(n,2),i=V(r);z(r),z(t),bs(e=>Cc(i,`${e??``} Kbps`),[()=>G(a).speed.toFixed(2)]),q(e,t)};Hc(_e,e=>{G(a).speed&&e(ve)});var ye=H(_e,2),be=e=>{var t=Dd(),n=H(V(t),2);ed(n,{get values(){return G(h)}});var r=H(n,2),i=V(r);z(r),z(t),bs(e=>Cc(i,`${e??``} Kbps`),[()=>G(a).bitrate.toFixed(2)]),q(e,t)};Hc(ye,e=>{G(a).bitrate&&e(be)});var xe=H(ye,2),Se=H(V(xe),2);ed(Se,{get values(){return G(p)}});var Ce=H(Se,2),we=V(Ce,!0);z(Ce),z(xe),z(y),z(_),bs(()=>{rl(_,`aria-label`,g),Cc(S,G(a).version),Cc(ge,`${G(c)??``} / ${G(s)??``} frames`),Cc(we,G(l))}),uc(`click`,v,i),q(e,_),Ki()}dc([`click`]),Mi();var jd=`var(--btn-color, #fff)`,Md=yc(`<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),Nd=yc(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>`);function Pd(e,t){Gi(t,!0);let n=X(t,`width`,19,()=>`24`),r=X(t,`height`,19,()=>`24`),i=X(t,`fill`,3,jd),a=t.viewBox??`0 0 ${n()} ${r()}`;var o=Nd(),s=V(o),c=e=>{var n=Md(),r=is(n);Lc(V(r),()=>t.children),z(r),Ci(),q(e,n)},l=e=>{var n=bc();Lc(is(n),()=>t.children),q(e,n)};Hc(s,e=>{t.shadow?e(c):e(l,!1)}),z(o),bs(()=>{rl(o,`aria-label`,t.ariaLabel),rl(o,`aria-hidden`,!t.ariaLabel),rl(o,`width`,n()),rl(o,`height`,r()),rl(o,`viewBox`,a),rl(o,`fill`,i()),$c(o,t.style),rl(o,`data-testid`,t.testId)}),q(e,o),Ki()}var Fd=yc(`<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 Id(e){Pd(e,{width:`200`,height:`200`,viewBox:`460 190 130 90`,testId:`error-icon`,children:(e,t)=>{q(e,Fd())},$$slots:{default:!0}})}var Ld=K(`<div class="container s-4"><!></div>`),Rd={hash:`s-4`,code:`.container.s-4 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}`};function zd(e){Gc(e,Rd);var t=Ld();Id(V(t),{}),z(t),q(e,t)}var Bd=e=>`width:${e}px;height:${e}px;`,Vd=yc(`<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 Hd(e,t){Gi(t,!0);let n=xo(()=>Bd(t.size));Pd(e,{get width(){return`48`},get height(){return`48`},get fill(){return t.fill},get style(){return G(n)},testId:`play-icon`,get shadow(){return t.shadow},children:(e,t)=>{q(e,Vd())},$$slots:{default:!0}}),Ki()}var Ud=K(`<div class="playButton s-6" tabindex="0" role="button"><div class="playButtonBackground s-6"></div> <!></div>`),Wd=K(`<div data-testid="unstarted-thumb"><!></div>`),Gd={hash:`s-6`,code:`.container.s-6 {position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:contain;background-repeat:no-repeat;cursor:pointer;transition:opacity 0.2s,
|
|
59
|
+
visibility 0.2s;will-change:opacity;}.container.hidden.s-6 {opacity:0;visibility:hidden;}.container.bgCover.s-6 {background-size:cover;}.playButton.s-6 {position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;}.playButtonBackground.s-6 {position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);transition:background 0.2s,
|
|
60
|
+
transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.s-6:hover .playButtonBackground:where(.s-6) {background-color:var(--big-play-hover-bg-color);transform:scale(1.15);}.playButton.s-6 svg {position:relative;}`};function Kd(e,t){Gi(t,!0),Gc(e,Gd);let n=X(t,`iconVisible`,3,!0),r=Rl(),i=fd(`tooltip_play`),a=e=>{e.stopPropagation(),t.startVideo?.call(t),t.onClick?.call(t,e)};var o={handleClick:a},s=Wd();let c;var l=V(s),u=e=>{var t=Ud();Hd(H(V(t),2),{get size(){return`48`}}),z(t),bs(()=>rl(t,`aria-label`,i)),q(e,t)};return Hc(l,e=>{n()&&e(u)}),z(s),bs(()=>{c=Zc(s,1,`container s-6`,null,c,{hidden:t.hidden,bgCover:r.features.previewNoEmptySpace}),$c(s,`background-color: #222; background-image: url('${t.thumbUrl||``}')`)}),uc(`click`,s,a),uc(`contextmenu`,s,function(...e){t.onContextMenu?.apply(this,e)}),q(e,s),Ki(o)}dc([`click`,`contextmenu`]);var qd=K(`<div><div class="video-container s-7"></div></div>`),Jd={hash:`s-7`,code:`.video-wrapper.s-7,
|
|
61
|
+
.video-container.s-7 {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.s-7 {z-index:var(--video-container-z-index);background:var(--black);}.video-container.s-7 {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}`};function Yd(e,t){Gi(t,!0),Gc(e,Jd);let n=()=>Tl(o,`$playerPhase`,r),[r,i]=El(),a=X(t,`videoContainer`,15),{playerPhase:o}=du();var s=qd();let c;vl(V(s),e=>a(e),()=>a()),z(s),bs(()=>c=Zc(s,1,`video-wrapper s-7`,null,c,{hidden:n()!==`video`})),q(e,s),Ki(),i()}var Xd=K(`<!> <!> <!> <!>`,1),Zd=K(`<div class="player-wrapper s-3"><!></div>`),Qd={hash:`s-3`,code:`.player-wrapper.s-3 {position:absolute;width:100%;height:100%;}.player-wrapper.s-3 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}`};function $d(e,t){Gi(t,!0),Gc(e,Qd);let n=()=>Tl(u,`$language$`,o),r=()=>Tl(d,`$playerPhase`,o),i=()=>Tl(f,`$crashed`,o),a=()=>Tl(p,`$debugPanelVisible`,o),[o,s]=El(),c=X(t,`videoContainer`,15),l=du(),u=l.interfaceLanguage$,d=l.playerPhase,f=l.state.crashed$,p=l.ui.debugPanelVisible,m=Io(void 0);var h=Zd();Wc(V(h),n,e=>{var n=Xd(),o=is(n);Yd(o,{get videoContainer(){return c()},set videoContainer(e){c(e)}});var s=H(o,2);{let e=xo(()=>r()!==`thumb`||i()&&t.autoplay);Kd(s,{get hidden(){return G(e)},get thumbUrl(){return t.thumbUrl},get startVideo(){return t.firstStart}})}var l=H(s,2),u=e=>{zd(e,{})};Hc(l,e=>{i()&&e(u)});var d=H(l,2),f=e=>{Ad(e,{})};Hc(d,e=>{a()&&e(f)}),q(e,n)}),z(h),vl(h,e=>Ro(m,e),()=>G(m)),q(e,h),Ki(),s()}var ef=K(`<div class="vk-vp-tv-root s-1"><!></div>`),tf={hash:`s-1`,code:`.vk-vp-tv-root.s-1 {--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;}`};function nf(e,t){Gi(t,!0),Gc(e,tf);let n=()=>Tl(te,`$isLive$`,i),r=()=>Tl(be,`$availableSubtitlesList$`,i),[i,a]=El(),o=X(t,`sources`,7),s=X(t,`store`,7),c=X(t,`videoConfig`,7),l=X(t,`uiConfig`,7),u=X(t,`title`,7),d=X(t,`thumbUrl`,7),f=X(t,`subtitles`,7),p=X(t,`subtitlesForcedLanguage`,7),m=X(t,`live`,7),h=X(t,`preload`,7),g=X(t,`autoplay`,7),_=X(t,`volume`,7,void 0),v=X(t,`muted`,7,void 0),y=X(t,`fromTime`,7),b=X(t,`canRewindLive`,7),x=X(t,`showAds`,7),S=X(t,`adsSlotId`,7,void 0),C=X(t,`adsParams`,7,void 0),w=X(t,`adsAutoplayParam`,7,void 0),T=X(t,`duration`,7,void 0),E=X(t,`supportLink`,7),D=X(t,`shadowRootContainer`,7),O=X(t,`outerContainerRef`,7),k=X(t,`fullScreenTarget`,7,void 0),A=X(t,`failoverHosts`,7,void 0),j=X(t,`saveRate`,7),M=X(t,`volumeMultiplier`,7),N=X(t,`showEndScreen`,7,!0);Ll(l());let P=Rl(),ee=s().ui.debugPanelVisible,te=s().state.isLive$,ne=Io(void 0),re=Io(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),uu(s()),ms(()=>{var e,t;(e=c().callbacks)==null||(t=e.onDomReady)==null||t.call(e)});let ie=(e=!1)=>{Ro(re,!0),e?s().actions.external.firstStart(x()):s().actions.internal.firstStart(x())},ae=()=>{qu(s().videoId),zu()&&s().actions.internal.setTrafficSavingEnabled(!0);let e=Pu(s().videoId);e&&s().actions.internal.setQuality(e)};function oe(e){let t=o()||e;t&&s().initVideo({container:G(ne),sources:t,failoverHosts:A(),subtitles:f(),subtitlesForcedLanguage:p(),volumeMultiplier:M()});let r=Ml.safeStorage.get(zl)===`true`;ee.set(r),y()>0&&s().actions.external.seekTime(y());let i=_()??ju()??P.volumeDefault,a=v()??Lu();if(s().actions.external.setVolume(i),s().actions.external.setMuted(a),s().getAdmanWrapper().setInitialVolume(a?0:i),ae(),P.features.saveRate&&j()){let e=Gu();e&&!n()&&s().actions.internal.setPlaybackRate(e)}s().ui.isAutoplay.set(g()),g()&&ie(),h()&&P.features.preload&&s().actions.internal.preload()}Rc(()=>{let e=()=>s().destroy();return m()?.status===`upcoming`?(s().actions.internal.setLiveWaitingStart(!0),e):m()?.status===`waiting`?(s().actions.internal.setLiveWaitingRecover(!0),e):(m()?.status===`finished`||m()?.status===`postlive`)&&!(o()&&jl.areValidLiveRecordSources(o()))?(s().actions.internal.setLiveWaitingRecord(!0),e):(oe(),e)});function se(){G(re)?s().actions.external.play():ie(!0)}function ce(){s().actions.external.pause()}function le(e){s().actions.external.setMuted(e)}function ue(){s().actions.external.toggleSubtitle()}function de(e,t){s().actions.external.changeSubtitle(e,t)}function fe(e){s().actions.external.changeAudioStream(e)}function pe(e){e>=0&&e<=1&&s().actions.external.setVolume(e)}function me(e){s().actions.internal.seekTime(e,Nl.SeekAction.UNKNOWN)}function he(e){s().actions.external.setPlaybackRate(e)}function ge(e){s().actions.external.setAutoQualityLimits(e)}function _e(){s().actions.external.setQuality(`auto`)}function ve(e){s().actions.external.setTrafficSavingEnabled(e)}function ye(e){s().actions.external.setHighQualityEnabled(e)}let be=s().state.availableSubtitlesList$;if(P.features.initSubtitles){let e=!1;ms(()=>{if(!e&&r().length){e=!0;let t;if(P.features.userVideoPrefs&&s().videoId){let e=Yu(P.userSalt,String(s().videoId));e?.subtitleTrackId&&(t=r().find(t=>t.value===e.subtitleTrackId))}let n=p()??Hu();n&&(t=r().find(e=>e.language===n)),s().actions.internal.setSubtitle(t)}})}var xe={initVideo:oe,play:se,pause:ce,setMuted:le,toggleSubtitle:ue,changeSubtitle:de,changeAudioStream:fe,setVolume:pe,seekTime:me,setPlaybackRate:he,setAutoQualityLimits:ge,setAutoQuality:_e,toggleTrafficSaving:ve,toggleHighQuality:ye,get sources(){return o()},set sources(e){o(e)},get store(){return s()},set store(e){s(e)},get videoConfig(){return c()},set videoConfig(e){c(e)},get uiConfig(){return l()},set uiConfig(e){l(e)},get title(){return u()},set title(e){u(e)},get thumbUrl(){return d()},set thumbUrl(e){d(e)},get subtitles(){return f()},set subtitles(e){f(e)},get subtitlesForcedLanguage(){return p()},set subtitlesForcedLanguage(e){p(e)},get live(){return m()},set live(e){m(e)},get preload(){return h()},set preload(e){h(e)},get autoplay(){return g()},set autoplay(e){g(e)},get volume(){return _()},set volume(e){_(e)},get muted(){return v()},set muted(e){v(e)},get fromTime(){return y()},set fromTime(e){y(e)},get canRewindLive(){return b()},set canRewindLive(e){b(e)},get showAds(){return x()},set showAds(e){x(e)},get adsSlotId(){return S()},set adsSlotId(e){S(e)},get adsParams(){return C()},set adsParams(e){C(e)},get adsAutoplayParam(){return w()},set adsAutoplayParam(e){w(e)},get duration(){return T()},set duration(e){T(e)},get supportLink(){return E()},set supportLink(e){E(e)},get shadowRootContainer(){return D()},set shadowRootContainer(e){D(e)},get outerContainerRef(){return O()},set outerContainerRef(e){O(e)},get fullScreenTarget(){return k()},set fullScreenTarget(e){k(e)},get failoverHosts(){return A()},set failoverHosts(e){A(e)},get saveRate(){return j()},set saveRate(e){j(e)},get volumeMultiplier(){return M()},set volumeMultiplier(e){M(e)},get showEndScreen(){return N()},set showEndScreen(e){N(e)}},Se=ef();$d(V(Se),{get thumbUrl(){return d()},firstStart:ie,get autoplay(){return g()},get videoContainer(){return G(ne)},set videoContainer(e){Ro(ne,e,!0)}}),z(Se),q(e,Se);var Ce=Ki(xe);return a(),Ce}var rf=yc(`<defs><path id="rect" d="m2.72 0c.45 0 .6.05.77.13a1 1 0 01.38.38c.09.16.13.33.13.77v1.44c0 .44-.04.6-.13.77a1 1 0 01-.38.38c-.16.08-.32.13-.77.13h-1.44c-.44 0-.6-.05-.77-.13a1 1 0 01-.37-.38c-.1-.16-.14-.33-.14-.77v-1.44c0-.44.05-.6.13-.77a1 1 0 01.38-.38c.17-.08.33-.13.77-.13z"></path></defs><path d="M38.24 6c3.57 0 4.86.37 6.17 1.07a7.3 7.3 0 0 1 3.02 3.02c.7 1.3 1.07 2.6 1.07 6.17v23.49c0 3.56-.37 4.85-1.07 6.16a7.3 7.3 0 0 1-3.02 3.02c-1.3.7-2.6 1.07-6.16 1.07h-19.5c-3.56 0-4.85-.37-6.16-1.07a7.3 7.3 0 0 1-3.02-3.02c-.7-1.3-1.07-2.6-1.07-6.16v-23.5c0-3.56.37-4.85 1.07-6.16a7.3 7.3 0 0 1 3.02-3.02C13.9 6.37 15.2 6 18.76 6zm.32 3h-19.8c-2.8 0-3.77.19-4.75.71a4.3 4.3 0 0 0-1.8 1.8c-.5.95-.7 1.87-.7 4.43l-.01 23.8c0 2.8.19 3.76.71 4.75a4.3 4.3 0 0 0 1.8 1.8c.98.52 1.95.71 4.75.71h19.49c2.8 0 3.76-.19 4.74-.71a4.3 4.3 0 0 0 1.8-1.8c.52-.98.71-1.95.71-4.74v-23.5c0-2.8-.19-3.75-.71-4.74a4.3 4.3 0 0 0-1.8-1.8c-.95-.5-1.87-.7-4.43-.7z"></path><use xlink:href="#rect" x="16.5" y="14"></use><use xlink:href="#rect" x="16.5" y="22"></use><use xlink:href="#rect" x="16.5" y="30"></use><use xlink:href="#rect" x="16.5" y="38"></use><use xlink:href="#rect" x="37" y="14"></use><use xlink:href="#rect" x="37" y="22"></use><use xlink:href="#rect" x="37" y="30"></use><use xlink:href="#rect" x="37" y="38"></use>`,1);function af(e,t){let n=X(t,`isWhite`,3,!1),r=xo(()=>n()?`#fff`:`#909499`);Pd(e,{width:`57`,height:`60`,get fill(){return G(r)},testId:`stub-icon`,children:(e,t)=>{var n=rf();Ci(9),q(e,n)},$$slots:{default:!0}})}var of=K(`<div class="title s-0"> </div>`),sf=K(`<div class="playerStub s-0"><!> <!></div>`),cf={hash:`s-0`,code:`.playerStub.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;}.title.s-0 {position:absolute;left:0;top:0;width:100%;font-size:15px;color:#fff;box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}`};function lf(e,t){Gc(e,cf);var n=sf(),r=V(n),i=e=>{var n=of(),r=V(n,!0);z(n),bs(()=>Cc(r,t.title)),q(e,n)};Hc(r,e=>{t.title&&e(i)});var a=H(r,2),o=e=>{{let n=xo(()=>!!t.thumbUrl);af(e,{get isWhite(){return G(n)}})}};Hc(a,e=>{(!t.title||!t.thumbUrl)&&e(o)}),z(n),bs(()=>$c(n,t.thumbUrl?`background-image: url('${t.thumbUrl}')`:``)),q(e,n)}var uf=K(`<div class="playerError s-2"><!></div>`),df={hash:`s-2`,code:`.playerError.s-2 {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 ff(e){Gc(e,df);var t=uf();zd(V(t),{}),z(t),q(e,t)}var pf=_(at(),1),mf=_(en(),1),hf=_(an(),1),gf=_(tt(),1),_f=require(`@vkontakte/videoplayer-core/es2018`),Q=require(`@vkontakte/videoplayer-shared/es2018`),vf=require(`@vkontakte/videoplayer-statistics/es2018`),yf=_(Hn(),1),bf=_(tt(),1),xf=_(zt(),1),$=require(`@vkontakte/videoplayer-shared/es2018`),Sf=require(`@vkontakte/videoplayer-shared/es2018`),Cf=`//ad.mail.ru/static/admanhtml/rbadman-html5.min.js`;class wf{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 Sf.Subject,loadStarted$:new Sf.Subject,loadEnded$:new Sf.Subject,loadError$:new Sf.Subject,ready$:new Sf.Subject,slotRequested$:new Sf.Subject,started$:new Sf.Subject,timeRemained$:new Sf.Subject,paused$:new Sf.Subject,resumed$:new Sf.Subject,ended$:new Sf.Subject,empty$:new Sf.Subject,skipped$:new Sf.Subject,clicked$:new Sf.Subject,closed$:new Sf.Subject,error$:new Sf.Subject}),e(this,`loadAdman`,e=>($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_start`,this.useAdmanFromNPM?`npm`:`http`],numbers:[$.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?($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_async_init_done`,`http`],numbers:[$.now()]}),t(),this.events.loadEnded$.next()):($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`http`],numbers:[$.now()]}),n())};Sf.addScript(Cf,e,this.loadTimeout).then(()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_loaded`,`http`],numbers:[$.now()]}),window.AdmanHTML?($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`http`],numbers:[$.now()]}),t(),this.events.loadEnded$.next()):($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`http`],numbers:[$.now()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout))}).catch(e=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_load_error`,`http`,String(e)],numbers:[$.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?($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_done`,`npm`],numbers:[$.now()]}),t(),this.events.loadEnded$.next()):($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`npm`],numbers:[$.now()]}),n())},a=()=>{o=!0,n()},o=!1,s=window.setTimeout(()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_timed_out`,`npm`],numbers:[$.now()]}),a()},this.loadTimeout);e.addEventListener(`abort`,a),e.aborted&&($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_aborted`,`npm`],numbers:[$.now()]}),a()),window.AdmanHTML=window.AdmanHTML||null,yf.default(import(`@adtech/rbadman/out/rbadman-html5.min.js`).then(()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_chunk_imorted`,`npm`,`failed: `+String(o)],numbers:[$.now()]}),!o&&(window.AdmanHTML?($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`npm`],numbers:[$.now()]}),t(),this.events.loadEnded$.next()):($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`npm`],numbers:[$.now()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout)))},a),()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener(`abort`,a)})})),e(this,`onAdsReady`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ads_ready`],numbers:[$.now()]}),this.log({message:`ads ready`}),this.events.ready$.next(),this.startPreroll()}),e(this,`onAdStarted`,(e,t)=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_started`,e,`muted: `+t.muted],numbers:[$.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?Y(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`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_pased`,this.currentAdSection??``],numbers:[$.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`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_played`,this.currentAdSection??``],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_midroll_pioint`],numbers:[$.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`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_skipped`,this.currentAdSection??``],numbers:[$.now()]}),this.log({message:`ad skipped`}),this.stopWatchDog()}),e(this,`onAdClosed`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_closed`,this.currentAdSection??``],numbers:[$.now()]}),this.log({message:`ad closed`}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()}),e(this,`onAdCompleted`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_completed`,this.currentAdSection??``],numbers:[$.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`,()=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_clicked`,this.currentAdSection??``],numbers:[$.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`)=>{$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_error`,e],numbers:[$.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`),$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_created`],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init`,`already inited: `+!!this.adman],numbers:[$.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&&Y(this.playerState.vsid);f&&(d=this.isVsidOriginal?f:parseInt(f,36));let{isEmbed:p,immediateOrigin:m}=$.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=xf.default(bf.default(g).filter(([e,t])=>$.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){$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_threw`,String(e)],numbers:[$.now()]}),this.onAdError(`could not init adman`)}}switchToVideo(e=!1){if($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_switch_to_video`,this.currentAdSection??``,`force: `+e],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_toggle_play`,this.currentAdSection??``],numbers:[$.now()]}),this.adsState){this.log({message:`toggle play`});let e=Y(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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_preroll`],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_postroll`,this.currentAdSection??``],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pplay`,this.currentAdSection??``],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pause`,this.currentAdSection??``],numbers:[$.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($.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_skip`,this.currentAdSection??``],numbers:[$.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(){$.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_destroy`],numbers:[$.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&&Sf.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 Tf=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,Ef=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},Df=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},Of=()=>!!Df(),kf=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:``};class Af{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 jf().parse(e);r.startTime=t,r.endTime=n}else if(e.trim()!==``){let{texts:t}=new Mf().parse(e);r.texts=[...r.texts,...t]}(r.startTime||r.endTime)&&r.texts.length>0&&n.push(r)}return n}}class jf{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 Mf{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 jf;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 Nf=Af,Pf=require(`@vkontakte/videoplayer-shared/es2018`),Ff,If,Lf=0,Rf=!1,zf=``,Bf=(e,t=0,n=0)=>e<t&&e<n,Vf=(e,t=0,n=0)=>e>=t&&e<=n,Hf=(e,t=0,n=0)=>e>t&&e>n,Uf=(e,t,n,r=!1)=>{let i=n.find(({id:e})=>e===t.value)?.subtitles;if(r)return i?.find(({startTime:t,endTime:n})=>Vf(e,t,n));let a=e>=Lf,o=e<Lf;if(Lf=e,o&&(Rf=!1),Pf.isNonNullable(Ff)&&Vf(e,Ff.startTime,Ff.endTime)&&zf===t.value)return Ff;if(!Pf.isNonNullable(If)&&i?.length&&!Rf){If=i.find(({startTime:t,endTime:n})=>Vf(e,t,n)||a&&Bf(e,t,n)),Ff=void 0,!Pf.isNonNullable(If)&&i[i.length-1].endTime<e&&(Rf=!0);return}else if(Vf(e,If?.startTime,If?.endTime))return Ff=If,If=void 0,zf=t.value,Ff;else (a&&Hf(e,If?.startTime,If?.endTime)||o&&Bf(e,If?.startTime,If?.endTime))&&(If=void 0)},Wf={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`},Gf={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`},Kf=e=>Wf[e]??Wf[Gf[e]]??void 0,qf=`off`,Jf=({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})=>{let b={...d,isAudioDisabled:a,live:{...d.live,isLiveCatchUpMode:!!r}},x=u,S=Q.TracerFactory.createRootTracer(!1),C=S.createComponentTracer(`Store`),w=f||new _f.Player(b,S,{playerId:v,onDevNullLog:s?.onDevNullLog});_?.expose({corePlayer:w});let T=new Q.Logger,E=new wf(T,{loadTimeout:x.ads.loadTimeout,initTimeout:x.ads.initTimeout,runtimeTimeout:x.ads.runtimeTimeout,useAdmanFromNPM:x.ads.useAdmanFromNPM,volumeMultiplier:x.ads.volumeMultiplier,isVsidOriginal:x.ads.isVsidOriginal}),D=c?.focusManager,O=T.createComponentLog(`Store`),k,A,j={},M=new _u,N=new Q.Subscription,P=``,ee=J(!1),te=h&&h.oneStat?Z(h.oneStat.vsid$):xl(void 0),ne=J(Of()),re=J(!1),ie=()=>Tf(document,_f.clientChecker.device.isIOS),ae=J(!1),oe=J([]),se=Q.merge(w.events.fatalError$,w.events.managedError$).subscribe(e=>oe.update(t=>[...t,e])),ce=xl(!1,e=>{let t=w.events.fatalError$.subscribe(()=>e(!0));return()=>t.unsubscribe()}),le=async e=>{let t=mf.default(pf.default(Q.InterfaceLanguage),e);if(x.downloadVKLanguages&&(t&&x.updateBuiltinLanguages||!ud(e))){let t;try{t=await Q.loadVKLangPack(e,Bl,Vl)}catch{var n;h==null||(n=h.oneStat)==null||n.logError({errorType:`VKLangPack`,fatal:!1})}t&&(ld({language:e,pack:t,fallback:x.defaultLanguage}),ue.set(e),de.update(e=>e+1))}ud(e)&&ue.set(e)},ue=J(e),de=J(0),fe=J(t);le(e);let pe=(e,t)=>dd(Y(ue),e,t,x.defaultLanguage),me=J(`thumb`);me.subscribe(e=>{e===`ads`&&w.info.playbackState$.getValue()&&_e()});let he=(()=>{let e=Sl([ce,me],([e,t])=>e?`crashed`:t);return{...e,is:t=>Y(e)===t}})(),ge=J(),_e=()=>{ge.set({muted:w.info.muted$.getValue()})},ve=J({width:0,height:0}),ye=null,be=w.info.isBuffering$,xe=xl(be.getValue(),e=>{let t=be.subscribe(t=>{t&&ye===null?ye=window.setTimeout(()=>{e(be.getValue()),ye=null},x.loaderDelay):e(t)});return()=>{t.unsubscribe(),ye&&clearTimeout(ye)}});C.log(`create store`),O({message:`create store`});let Se=e=>{O({message:`init video, config: ${JSON.stringify(e)}`}),Q.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`core_init_video`],numbers:[Q.now()]}),w.initVideo(e),C.log(`init video`),e.subtitles&&w.setExternalTextTracks(e.subtitles),k=e,P=e.subtitlesForcedLanguage||``},Ce=new Q.Subject,we=new Q.Subject,Te=new Q.Subject,Ee={actionRewind$:Ce,actionSeek$:we,inFullscreen$:new Q.Observable(e=>ne.subscribe(t=>e.next(t))),actionSetSubtitle$:Te},De=new Q.Subject,Oe=new Q.Subject,ke={actionSeek$:we,actionSubtitlesSwitched$:De,actionQuality$:Oe,playerSize$:new Q.Observable(e=>ve.subscribe(t=>e.next(t))),inFullscreen$:new Q.Observable(e=>ne.subscribe(t=>e.next(t))),isLoaderVisible$:new Q.Observable(e=>xe.subscribe(t=>e.next(t)))};if(h){let{oneStat:e,thinOneStat:t,mediascopePixel:n,statSubscription:r}=h;e&&(r.add(e.attachToUi(Ee)),r.add(e.attachToAds(E.events)),e.authorize(i).catch(e=>{O({message:`onestat auth error ${String(e)}`})}),n&&n.attachTo(w)),t&&(r.add(t.attachTo(w,E.events)),r.add(t.attachToUi(ke)),r.add(t.attachToAds(E.events)),t.updateContext({isMobile:Y(ee)}),t.authorize(i))}let Ae=()=>{if(_f.clientChecker.device.isIOS&&A)try{Ef(A)}catch(e){O({message:`exitIosSafariFullscreen failed: ${e}`})}};N.add(w.experimental.element$.subscribe(e=>{e&&(A=e,e.classList.add(`player-media`))})).add(w.events.ended$.subscribe(()=>{var e;Ae(),s==null||(e=s.onEnded)==null||e.call(s)})).add(w.events.looped$.subscribe(()=>{var e;s==null||(e=s.onLooped)==null||e.call(s)})).add(w.events.started$.subscribe(async()=>{var e;let t=w.info.muted$.getValue();s==null||(e=s.onStarted)==null||e.call(s),j.onStarted?.call(j,t)})).add(w.events.willSeek$.subscribe(({from:e,to:t})=>{var n;s==null||(n=s.onSeek)==null||n.call(s,e,t)})).add(w.events.autoplaySoundProhibited$.subscribe(()=>{var e;s==null||(e=s.onAutoplaySoundProhibited)==null||e.call(s)})).add(w.info.position$.subscribe(e=>{let t=w.info.duration$.getValue();if(isFinite(t)&&t>0){var n;s==null||(n=s.onTimeupdate)==null||n.call(s,t,e),E.setPosition(e,t)}})).add(w.events.fatalError$.subscribe(e=>{var t;s==null||(t=s.onCrashed)==null||t.call(s,e?`${e.id}: ${e.message}`:void 0)})).add(w.events.fetcherRecoverableError$.subscribe(e=>{var t;s==null||(t=s.onRecoverableError)==null||t.call(s,e?`${e.id}: ${e.message}`:void 0)})).add(w.events.loadedMetadata$.subscribe(()=>{ae.set(!0)})).add(w.info.liveTime$.subscribe(e=>{var t;s==null||(t=s.onLiveTime)==null||t.call(s,e)})).add(w.info.isStalled$.subscribe(e=>{var t;s==null||(t=s.onStalledChanged)==null||t.call(s,e)})).add(w.info.isLiveEnded$.subscribe(e=>{var t;return e&&(s==null||(t=s.onLiveEnded)==null?void 0:t.call(s))})).add(E.events.loadStarted$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onLoadStarted)==null?void 0:t.call(e)})).add(E.events.loadEnded$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onLoadEnded)==null?void 0:t.call(e)})).add(E.events.loadError$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onLoadError)==null?void 0:t.call(e)})).add(E.events.init$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onInit)==null?void 0:t.call(e)})).add(E.events.ready$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onReady)==null?void 0:t.call(e)})).add(E.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(E.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(E.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(E.events.empty$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onEmpty)==null?void 0:t.call(e)})).add(E.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(E.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(E.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(E.events.paused$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onPaused)==null?void 0:t.call(e)})).add(E.events.resumed$.subscribe(()=>{var e,t;return s==null||(e=s.adsInfo)==null||(t=e.onResumed)==null?void 0:t.call(e)}));let je=xl(w.info.position$.getValue(),e=>{let t,n,r=()=>{let i=w.info.playbackState$.getValue(),a=w.info.isLive$.getValue(),o=w.info.duration$.getValue(),s=w.info.position$.getValue();if(i&&mf.default([_f.PlaybackState.PLAYING,_f.PlaybackState.PAUSED],i)){let t=a?s-o:w.getExactTime();t!==n&&e(t),n=t}t=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(t)}),Me=Z(w.info.playbackState$),Ne=Sl([Me,Z(w.info.isBuffering$)],([e,t])=>t?`buffering`:e),Pe=Z(w.info.currentBuffer$),Fe=Z(w.info.isEnded$),Ie=Z(w.info.isLive$),Le=x.features.playbackRate?Z(w.info.canChangePlaybackSpeed$):xl(!1),Re=Z(w.info.liveBufferTime$),ze=Z(w.info.volume$),Be=Z(w.info.muted$),Ve=fu(w.info.predefinedQualityLimitType$.pipe(Q.map(e=>e===_f.PredefinedQualityLimits.TRAFFIC_SAVING)),w.info.predefinedQualityLimitType$.getValue()===_f.PredefinedQualityLimits.TRAFFIC_SAVING),He=fu(w.info.predefinedQualityLimitType$.pipe(Q.map(e=>e===_f.PredefinedQualityLimits.HIGH_QUALITY)),w.info.predefinedQualityLimitType$.getValue()===_f.PredefinedQualityLimits.HIGH_QUALITY),Ue=Z(w.info.autoQualityLimitingAvailable$),We=Z(w.info.availableQualities$),Ge=Z(w.info.availableQualitiesFps$),Ke=Z(w.info.chromecastState$),qe=Z(w.info.chromecastDeviceName$),Je=Z(w.info.currentFormat$),Ye=Z(w.info.throughputEstimation$),Xe=Z(w.info.videoBitrate$),Ze=Z(w.info.intrinsicVideoSize$),Qe=Z(w.info.duration$),$e=Z(w.info.isAudioAvailable$),et=()=>{ye&&clearTimeout(ye),ye=null},tt=Sl([Qe,Ie],([e,t])=>t?-e:e),nt=Sl([Me],([e])=>e===_f.PlaybackState.PLAYING),rt=Z(w.info.atLiveEdge$),it=Z(w.info.atLiveDurationEdge$),at=Z(w.info.position$),ot=Sl([at,Qe],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),st=Sl([Ke],([e])=>e===_f.ChromecastState.CONNECTED),ct=Z(w.info.availableVideoStreams$),lt=x.features.audioLanguages?Z(w.info.availableAudioStreams$):xl([]),ut=Z(w.info.currentVideoStream$),dt=Z(w.info.currentAudioStream$),ft=e=>{e.language&&Vu(e.language),w.setVideoStream(e)},pt=e=>{w.setAudioStream(e)},mt=e=>{let t;if(e.length===1&&(t=hf.default(e,0)),t??=e.find(e=>`isDefault`in e&&e.isDefault),x.features.userVideoPrefs&&n){let r=Yu(x.userSalt,String(n));r?.audioTrackId&&(t=e.find(e=>e.id===r.audioTrackId)??t)}let r=Bu();return r&&(t??=e.find(({language:e})=>r===e)),t??=hf.default(e,0),t},ht=e=>{C.log(`change audio stream`,{id:e});let t=w.info.availableAudioStreams$.getValue().find(t=>t.id===e);t&&pt(t)},gt=!1;N.add(w.info.availableAudioStreams$.subscribe(e=>{if(!gt&&e.length){let t=mt(e);t&&(w.setAudioStream(t),gt=!0)}})),lt.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})))}),dt.subscribe(e=>{var t;return e&&(s==null||(t=s.onAudioStreamChanged)==null?void 0:t.call(s,e.id))});let _t=!1;N.add(w.info.availableVideoStreams$.subscribe(e=>{if(!_t&&e.length){let t=mt(e);t&&(w.setVideoStream(t),_t=!0)}}));let vt=J(void 0),yt=Z(w.info.isAutoQualityEnabled$,e=>e&&vt.set(void 0)),bt=Sl([vt,Z(w.info.currentQuality$,()=>vt.set(void 0))],([e,t])=>e??t),xt=Sl(Je,e=>e!==_f.VideoFormat.MPEG),St=Sl([We,Ge,yt,bt,xt],([e,t,n,r,i])=>{let a=[];i&&a.push({value:`auto`,displayValue:pe(`auto_quality_option`),selected:n});let o=e.filter(e=>!Q.isInvariantQuality(e));for(let e of o){let i=t[e];a.push({value:e,displayValue:`${e}${i?kf(i):``}`,selected:n?!1:e===r})}return a}),Ct=Z(w.info.currentPlaybackRate$),wt=Sl([Ct,rt,it],([e,t,n])=>{let r=n?1:x.controls.playbackRateMin,i=t?1:x.controls.playbackRateMax,a=x.controls.playbackRateStep,o=[];for(let t=r;t<=i;t+=a)o.push({value:t,displayValue:t===1?pe(`playback_rate_1`):pe(`playback_rate`,{multiplier:t.toString(10)}),selected:e===t});return o}),Tt=()=>({displayValue:pe(`subtitles_off`),value:qf,language:``}),Et=J(Tt()),Dt=Sl([Et,de],([e],t)=>{e.value===qf?t(Tt()):t(e)}),Ot=x.features.subtitles?Z(w.info.availableTextTracks$):xl([]),kt=gu(),At=Sl([Ot,Dt],([e,t],n)=>{let r=[],i=e.find(({id:e})=>e===t.value);if(i?.url){let[,e]=kt.find(i.url)??[];if(e){n(e);return}M.download(i.url).then(e=>{if(!e||M.isDestroyed())return;let a=new Nf,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})}kt.add(i.url,r),Y(Dt).value===t.value&&n(r)}).catch(()=>{var e;h==null||(e=h.oneStat)==null||e.logError({errorType:`Subtitles download`,fatal:!1})})}n(r)}),jt=Sl([Ct,nt,Dt],([e,t,n],r)=>{let i;if(w.info.isLive$.getValue()&&t&&n.value!==qf){let t=()=>{let n=1e3/(3*e);i=setTimeout(t,n),r(Date.now())};return t(),()=>clearTimeout(i)}}),Mt=Sl([Ot,Dt],([e,t])=>{if(!e.length)return[];let n=[];for(let{language:r,isAuto:i,id:a}of e){let e=r&&Kf(r);r&&e&&n.push({displayValue:i?pe(`subtitles_auto`,{language:e}):e,value:a,selected:t?.value===a,isAuto:i,language:r})}return n.length?(n.unshift({...Tt(),selected:t?.value===qf}),n):[]}),Nt={available:[],prev:[]},Pt=()=>w.experimental.getCurrentTime$.getValue()?.()??A?.currentTime??0,Ft=Sl([Sl([je,Dt,At,jt],([e,t,n,r])=>{let i=w.info.isLive$.getValue();if(i&&Nt.prev!==n){let e=n.find(({id:e})=>e===t.value),r=Nt.prev.find(({id:e})=>e===t.value);e&&(Nt.available=[{...e,subtitles:[...r?.subtitles??[],...e.subtitles]}],Nt.prev=n)}if(t&&t.value!==qf)return Uf(i?Pt():e,t,i?Nt.available:n,i)})],([e])=>e?.texts?e.texts:[]);N.add(Dt.subscribe(e=>{if(e.value===qf){var t;s==null||(t=s.onSubtitleOff)==null||t.call(s)}else{var n;let t=gf.default(Wf).find(([t,n])=>n===e.displayValue);s==null||(n=s.onSubtitleOn)==null||n.call(s,t?t[0]:``,e.value)}}));let It=J(!0),Lt=Sl([Pe,tt,at,Re],([e,t,n,r])=>{let i=e?.end??0;return r?(i-(-n+r-t))/t:i/t}),Rt=Z(w.info.availableSources$),zt=Sl([Rt],([e])=>Object.keys(e?.[_f.VideoFormat.MPEG]||{}).length>0),Bt=()=>{var e;let t=Object.keys(((e=w.info.availableSources$)==null||(e=e.getValue())==null?void 0:e[_f.VideoFormat.MPEG])||{}),n=Q.getHighestQuality(t)||Q.VideoQuality.Q_144P;return k.sources[_f.VideoFormat.MPEG]?.[n]},Vt=()=>{let e=Bt();if(e){var t;C.log(`download video`,{url:e}),hu(e,(k==null||(t=k.meta)==null?void 0:t.title)||`video`)}else{let e=`There is no URL for download video`;C.log(`download video`,{message:e}),O({message:e})}},Ht=()=>{O({message:`toggle muted`});let e=w.info.muted$.getValue();w.info.volume$.getValue()===0&&!e?Kt(Gt()):qt(!e)},Ut=()=>{F.ui.settingsMenu.visible$.set(!1),C.log(`close settings menu`)},Wt=async(e,t=()=>Promise.resolve())=>{F.ui.settingsMenu.visible$.set(!0),await t(),C.log(`open settings menu`,{wasOpenedByKeyboard:e})},Gt=()=>{let e=Math.max(x.volumeMinRestore,ju()??0);return e===0?x.volumeDefault:e},Kt=e=>{let t=e===0?Gt():e,n=w.info.muted$.getValue();O({message:`set volume, volume: ${e}, preferredVolume: ${t}`});let r=!a||he.is(`ads`);n&&e>0&&r&&(n=!1),w.setVolume(e,n),E.setVolume(e)},qt=e=>{let t=w.info.volume$.getValue();O({message:`set muted, currentVolume: ${t}, mute: ${e}`});let n=he.is(`ads`);if(w.setMuted(e,n),E.setVolume(e?0:t),!e&&t===0){let e=Gt();w.setVolume(e),E.setVolume(e)}},Jt=J(!1),Yt=e=>{C.log(`set looped`,{isLooped:e}),Jt.set(e),w.setLooped(e)};Yt(m);let Xt=()=>{w.prepare()},Zt=()=>{Q.assertNonNullable(F);let e=Y(F.playerPhase),t={playerPhase:e,isVideoEnded:!1,action:`none`};if(O({message:`toggle play`}),e===`ads`){t.action=`play`,C.log(`toggle adman play`,t),E.togglePlay();return}let n=()=>{var e;O({message:`toggle play, call player.play`}),t.action=`play`,w.play(),s==null||(e=s.onPlay)==null||e.call(s)};w.info.isEnded$.getValue()?(O({message:`toggle play, video ended, seek to 0`}),Ce.next(),we.next(vf.SeekAction.REWIND),w.seekTime(0),n()):w.info.playbackState$.getValue()===_f.PlaybackState.PLAYING?(()=>{var e;O({message:`toggle play, call player.pause`}),t.action=`pause`,w.pause(),s==null||(e=s.onPause)==null||e.call(s)})():n(),C.log(`toggle play`,t)},Qt=(e,{byUser:t=!1}={})=>{O({message:`set quality, quality: ${e}`}),C.log(`set quality`,{quality:e}),t&&Oe.next(e),w.setAutoQuality(e===`auto`),Nu(),e!==`auto`&&(Mu(n,e),vt.set(e),w.setQuality(e))},$t=e=>{O({message:`set trafficSavingEnabled, value: ${e}`}),C.log(`set traffic saving enabled`,{trafficSavingEnabled:e});let t=e?_f.PredefinedQualityLimits.TRAFFIC_SAVING:_f.PredefinedQualityLimits.UNKNOWN;w.setPredefinedQualityLimits(t)},en=e=>{O({message:`set highQualityEnabled, value: ${e}`}),C.log(`set high quality enabled`,{highQualityEnabled:e}),tn(e?_f.PredefinedQualityLimits.HIGH_QUALITY:_f.PredefinedQualityLimits.UNKNOWN)},tn=e=>{w.setPredefinedQualityLimits(e)},nn=(e,t=!0)=>{C.log(`set playback rate`,{playbackRate:e}),w.setPlaybackRate(e),x.features.saveRate&&g&&!w.info.isLive$.getValue()&&t&&Wu(e)},rn=()=>{let e=Y(Le),t=Y(wt),n=t.findIndex(({selected:e})=>e);if(n===t.length-1||!e)return t[n];let r=t[n+1];return nn(r.value),r},an=()=>{let e=Y(Le),t=Y(wt),n=t.findIndex(({selected:e})=>e);if(n===0||!e)return t[n];let r=t[n-1];return nn(r.value),r},on=(e={...Tt(),selected:!1})=>{C.log(`set subtitles`,{...e}),e.value!==qf&&Te.next(e.isAuto?e.value+`_auto`:e.value),De.next({enabled:e.value!==qf,lang:e.language,auto:!!e.isAuto}),Et.set(e)},sn=e=>{C.log(`toggle subtitles`),Y(Dt)?.value===qf?ln(e):un()},cn=(e,t)=>{C.log(`change subtitle`,{enabled:e}),e?ln(!0,t):un()},ln=(e,t)=>{C.log(`subtitle on`);let n=Y(Mt),r=Y(ue),i=P??r,a;t&&(a=n.find(e=>e.value===t)),a??=n.filter(e=>e.value!==qf).find(e=>e.language===i),on(a??n[1])},un=()=>{C.log(`subtitle off`),on(void 0)};N.add(w.info.availableTextTracks$.subscribe(e=>{var t;function n(){let t=[];for(let{language:n,isAuto:r,id:i}of e){let e=n&&Kf(n);n&&e&&t.push({id:i,language:n,title:r?pe(`subtitles_auto`,{language:e}):e})}return t}s==null||(t=s.onAvailableSubtitlesChanged)==null||t.call(s,n())}));let dn=J(!0),fn=e=>{dn.set(e)},pn=(e,t,n=!0)=>{if(O({message:`seek to time, time: ${e}`}),C.log(`seek to time`,{time:e,action:t,forcePrecise:n}),we.next(t),w.info.isLive$.getValue()){let t=w.info.duration$.getValue(),r=Math.min(0,t+e);w.seekTime(r,n)}else{if(w.info.isEnded$.getValue()){var r;O({message:`seek after ended, call callbacks.onPlay`}),s==null||(r=s.onPlay)==null||r.call(s)}w.seekTime(e,n)}},mn=(e,t,n=!1)=>{O({message:`seek to percent, percent: ${e}`}),C.log(`seek to percent`,{percent:e,action:t}),pn(Y(tt)*e,t,n)},hn=e=>{O({message:`seek external, time: ${e}`}),C.log(`seek external`,{time:e}),we.next(vf.SeekAction.UNKNOWN),w.seekTime(w.info.isLive$.getValue()?-e:e)},gn=e=>{let t=e.max??`none`,n=e.min??`none`;O({message:`set auto quality limitation. Max: ${t}. Min: ${n}`}),C.log(`set auto quality limits`,{max:t,min:n}),w.setAutoQualityLimits(e)},_n=e=>{O({message:`set playback rate to: ${e}`}),C.log(`set playback rate external`,{playbackRate:e}),w.setPlaybackRate(e)},vn=J(void 0),yn=J(!1),bn=e=>{O({message:`start scrubbing, progress: ${e}`}),C.log(`start scrubbing`,{progress:e}),yn.set(!0),xn(e)},xn=e=>{vn.set(e)},Sn=()=>{vn.set(void 0),yn.set(!1)},Cn=(e,t=!1)=>{O({message:`complete scrubbing, progress: ${e}`}),C.log(`complete scrubbing`,{progress:e}),mn(e,vf.SeekAction.SLIDER,t),Sn()},wn=Sl([je,tt,vn],([e,t,n],r)=>{r(Q.isNonNullable(n)?n*t:e)}),Tn=J(!1),En=()=>{Tn.set(!0)},Dn=()=>{Tn.set(!1)},On=e=>{we.next(vf.SeekAction.LIVE),O({message:`live switch to low latency `+e}),C.log(`live switch to low latency `+e),w.setLiveLowLatency(e)},kn=()=>{we.next(vf.SeekAction.LIVE),O({message:`switch to active live`}),C.log(`switch to active live`),w.seekTime(0),w.info.playbackState$.getValue()!==_f.PlaybackState.PLAYING&&F.actions.internal.togglePlay()},An=()=>{C.log(`skip adman`),E.skip()},jn=(e=!0)=>{Q.assertNonNullable(F),O({message:`switch from ads to video, callPlay: ${e}`}),C.log(`switch from ads to video`,{callPlay:e}),me.set(`video`),e&&w.play(),a&&qt(!0);let t=Y(ge)?.muted,n=!w.info.muted$.getValue();t!==void 0&&!n&&qt(t),ge.set(void 0)},Mn=()=>{Q.assertNonNullable(F),O({message:`switch from video to ads`}),C.log(`switch from video to ads`),F.actions.internal.pause(),Ae(),me.set(`ads`)},Nn=e=>{Q.assertNonNullable(F);let t=e?`LiveWaitingStart`:`thumb`;C.log(`set live waiting start`,{state:e,playerPhase:t}),me.set(t)},Pn=e=>{Q.assertNonNullable(F);let t=e?`LiveWaitingRecover`:`thumb`;C.log(`set live waiting recover`,{state:e,playerPhase:t}),me.set(t)},Fn=e=>{Q.assertNonNullable(F);let t=e?`LiveWaitingRecord`:`thumb`;C.log(`set live waiting record`,{state:e,playerPhase:t}),me.set(t)},In=()=>(Q.assertNonNullable(F),C.log(`get debug text data`),pu(w,k,F,S.getTraceId(),y)),Ln=()=>(Q.assertNonNullable(F),JSON.stringify(S.getFinishedSpans())),Rn=()=>(Q.assertNonNullable(F),mu(w,k,F)),zn=()=>A,Bn=e=>{var t;if(Q.assertNonNullable(F),w.info.isEnded$.getValue())return;let n=!e;if(Y(F.playerPhase)===`ads`){O({message:`pause ads, internalCall: ${n}`}),C.log(`pause ads`,{internalCall:n}),E.pause();return}O({message:`pause video, internalCall: ${n}`}),C.log(`pause video`,{internalCall:n}),n&&(s==null||(t=s.onPause)==null||t.call(s)),w.pause()},Vn=e=>{var t;Q.assertNonNullable(F);let n=!e;if(Y(F.playerPhase)===`ads`){O({message:`play ads, internalCall: ${n}`}),C.log(`play ads`,{internalCall:n}),E.play();return}O({message:`play video, internalCall: ${n}`}),C.log(`play video`,{internalCall:n}),n&&(s==null||(t=s.onPlay)==null||t.call(s)),w.play()},Hn=e=>{Q.assertNonNullable(F);let t=!e;if(Y(F.playerPhase)===`ads`){O({message:`player cannot be stopped during ads via external method`});return}O({message:`player will be stopped, internalCall: ${t}`}),p?.()},Un=(e,t)=>{Q.assertNonNullable(F),O({message:`first start, show ads: ${e}, internalCall: ${!t}`}),C.log(`first start`,{showAds:e,external:t}),e?me.set(`ads`):(me.set(`video`),t?w.play():F.actions.internal.togglePlay())},F={interfaceLanguage$:ue,isCyrillicRelatedInterface$:fe,initVideo:Se,videoId:n,playerPhase:he,vsid:te,state:{positionExact$:je,positionWithScrubbing$:wn,duration$:tt,playbackState$:Me,playbackStateRealistic$:Ne,isPlaying$:nt,isLoaderVisible:xe,bufferedProgress$:Lt,isLive$:Ie,canChangePlaybackSpeed$:Le,isActiveLive$:rt,isOldestAvailableLive$:it,isRewindableLive$:ot,isEnded$:Fe,muted$:Be,volume$:ze,trafficSavingEnabled$:Ve,highQualityEnabled$:He,autoQualityLimitingAvailable$:Ue,availableVideoStreams$:ct,availableAudioStreams$:lt,videoStream$:ut,audioStream$:dt,currentQuality$:bt,isAutoQualityEnabled$:yt,availableQualities$:St,currentPlaybackRate$:Ct,availablePlaybackRates$:wt,currentSubtitle$:Dt,availableTextTracks$:Ot,availableSubtitlesList$:Mt,currentSubtitleCaptions$:Ft,isAutoSubtitleCaptionVisible$:It,chromecastState$:Ke,chromecastDeviceName$:qe,chromecastConnected$:st,currentFormat$:Je,throughputEstimation$:Ye,videoBitrate$:Xe,videoSize$:Ze,errorLog$:oe,crashed$:ce,isAudioAvailable$:$e,isAudioDisabled:!!a,canDownload:x.features.download&&!!o,availableSources$:Rt,hasMpegSources$:zt,looped$:Jt,loadedMetadata$:ae,isAutoQualityAvailable$:xt},ui:{t:pe,controlsVisible:J(!1),touched:J(!1),controls:{prevButton:J(void 0),playButton:J(void 0),replayButton:J(void 0),nextButton:J(void 0),playPrevChapterButton:J(void 0),seekToInteractiveButton:J(void 0),interactiveGraphButton:J(void 0),liveButton:J(void 0),time:J(void 0),episodes:J(void 0),volume:J(void 0),subtitles:J(void 0),settings:J(void 0),context:J(void 0),chromecast:J(void 0),pip:J(void 0),fullscreen:J(void 0),vkLogo:J(void 0),interactiveTimeIndicator:J(void 0),timeline:J(void 0),autoplayNextToggle:J(void 0)},modals:{hotKeyMap:{show:J(!1),data:J({title:``,closeBtnText:``,groups:[]})}},isFullscreen:ne,isFullscreenOpenedByKeyboard:re,isAutoplay:J(!1),debugPanelVisible:J(!1),episodes:{panelOpened$:J(!1),openedByKeyboard$:J(!1)},contextMenu:{visible$:J(!1),btnRef$:J(void 0),openedByBtnKeyboard$:J(!1),openedByHotKey$:J(!1),lastActiveElem$:J(void 0),showContextMenuBtn$:J(!1),position$:J({top:0,left:0})},playerSize:ve,isMobile:ee,icon3DVideoVisible:J(!1),scrubbingInProgress:yn,volumeChangingInProgress:Tn,interactiveHideMobileControls:J(!1),overlayContainer$:J(void 0),startedByKeyboard$:J(!1),autoplayNextEnabled$:J(!1),timerNextVideoRunning$:J(!0),settingsMenu:{visible$:J(!1),ref$:J(void 0),openedByBtnKeyboard$:J(!1)},settingsSubMenu:{visible$:J(!1),ref$:J(void 0),name$:J(void 0)},userActionsDisabled:J(!1),hiddenControls:{volume:J(!1),vkLogo:J(!1),pip:J(!1),chromecast:J(!1),settings:J(!1)},isControlsAvailable:dn,controlBlocks:{topLeft:J(void 0),topRight:J(void 0),middle:J(void 0),bottom:J(void 0),bottomLeft:J(void 0),bottomRight:J(void 0)},videoTitleInfo:J(void 0),previewTrackNotificationVisible:J(!1)},ads:{position:J(0),duration:J(0),playbackState:J(`inactive`),canSkip:J(!1),secondsToWatchBeforeSkip:J(0),postrollPassed:J(!1)},webApi:{focusManager:D},actions:{internal:{preload:Xt,firstStart:e=>Un(e,!1),play:()=>Vn(!1),pause:()=>Bn(!1),togglePlay:Zt,toggleMuted:Ht,openSettingsMenu:Wt,closeSettingsMenu:Ut,setVolume:e=>Kt(e),setMuted:e=>qt(e),startVolumeChanging:En,stopVolumeChanging:Dn,setVideoStream:ft,setAudioStream:e=>pt(e),setQuality:(e,t)=>Qt(e,t),setTrafficSavingEnabled:e=>$t(e),setHighQualityEnabled:e=>en(e),setPlaybackRate:nn,incrementPlaybackRate:rn,decrementPlaybackRate:an,setSubtitle:e=>on(e),toggleSubtitle:()=>sn(!1),startScrubbing:bn,progressScrubbing:xn,completeScrubbing:Cn,switchToActiveLive:kn,switchFromAdsToVideo:jn,switchFromVideoToAds:Mn,skipAd:An,setLiveWaitingStart:Nn,setLiveWaitingRecover:Pn,setLiveWaitingRecord:Fn,getDebugTextData:In,getTraceTextData:Ln,getDebugPanelData:Rn,getVideoElement:zn,seekTime:(e,t,n)=>pn(e,t,n),clearDelayedBufferingCheckTimeout:et,seekToPercent:mn,getPreviewThumbsData:()=>(O({message:`getting preview thumbs data`}),C.log(`get preview thumbs data`,{...l}),l),downloadVideo:Vt,addLanguage:ld,setLanguage:le,setLooped:Yt,checkFullscreenSupport:ie},external:{firstStart:e=>Un(e,!0),play:()=>Vn(!0),pause:()=>Bn(!0),stop:()=>Hn(!0),seekTime:e=>hn(e),setPlaybackRate:e=>_n(e),setAutoQualityLimits:e=>gn(e),setMuted:e=>qt(e),toggleSubtitle:()=>sn(!0),changeSubtitle:cn,setVolume:e=>Kt(e),setLiveLowLatency:On,hideControls:()=>fn(!1),showControls:()=>fn(!0),setQuality:e=>Qt(e),setTrafficSavingEnabled:e=>$t(e),setHighQualityEnabled:e=>en(e),changeAudioStream:ht}},callbacks:s,setUiCallbacks:e=>{j={...e}},getAdmanWrapper:()=>E,getLogger:()=>T,getPlayer:()=>w,destroy:()=>{C.log(`destroy store`),N.unsubscribe(),w.destroy(),E.destroy(),h?.destroy(),se.unsubscribe(),M.destroy()}};return F},Yf=require(`@vkontakte/videoplayer-shared/es2018`),Xf=require(`@vkontakte/videoplayer-shared/es2018`),Zf=require(`@vkontakte/videoplayer-core/es2018`),Qf=require(`@vkontakte/videoplayer-statistics/es2018`);function $f(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 ep=require(`@vkontakte/videoplayer-shared/es2018`);class tp{constructor(t=void 0,n=void 0,r=void 0,i=new ep.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 np=require(`@vkontakte/videoplayer-shared/es2018`);class rp{constructor(t){e(this,`getActiveElement`,void 0),e(this,`focusableElements`,[]),e(this,`isActive`,!1),e(this,`container`,void 0),e(this,`handleTabKey`,e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let t=this.focusableElements[0],n=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===t?(e.preventDefault(),n.focus()):!e.shiftKey&&r===n&&(e.preventDefault(),t.focus())}),this.getActiveElement=t}activate(){this.isActive||=(document.addEventListener(`keydown`,this.handleTabKey),!0)}deactivate(){this.isActive&&(document.removeEventListener(`keydown`,this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=[`button:not([disabled])`,`[href]:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"]):not([disabled])`].join(`, `);return Array.from(this.container.querySelectorAll(e)).filter(e=>!e.disabled&&e.offsetParent!==null)}destroy(){this.deactivate()}setContainer(e){this.container=e}}class ip{constructor(t){e(this,`shadowRoot`,void 0),e(this,`lastFocusedNode`,null),e(this,`focusLock`,void 0),e(this,`init`,()=>{this.shadowRoot.addEventListener(`focusin`,this.handleFocusChange)}),e(this,`handleFocusChange`,()=>{this.lastFocusedNode=this.shadowRoot.activeElement}),e(this,`restoreFocus`,()=>{this.lastFocusedNode?.focus()}),this.shadowRoot=t,this.focusLock=new rp(()=>this.lastFocusedNode),this.init()}destroy(){this.shadowRoot.removeEventListener(`focusin`,this.handleFocusChange),this.focusLock.destroy()}getLastFocusedNode(){return this.lastFocusedNode}activateLock(){this.focusLock.activate()}deactivateLock(){this.focusLock.deactivate()}setContainerForFocusLock(e){this.focusLock.setContainer(e)}}var ap=require(`@vkontakte/videoplayer-shared/es2018`).getWindow().HTMLElement||class{constructor(){e(this,`isConnected`,!1)}},op={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Xf.InterfaceLanguage.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},sp=Io(void 0);class cp extends ap{constructor(){super(),e(this,`svelteStubComponent`,void 0),e(this,`svelteRootComponent`,void 0),e(this,`svelteErrorComponent`,void 0),e(this,`store`,void 0),e(this,`statistics`,void 0),e(this,`_shadowRoot`,void 0),e(this,`playerContainer`,void 0),e(this,`rootContainer`,void 0),e(this,`stateContainer`,void 0),e(this,`shadowRootContainer`,void 0),e(this,`playerId`,void 0),e(this,`uiConfig`,void 0),e(this,`coreConfig`,void 0),e(this,`statisticsConfig`,void 0),e(this,`metaConfig`,void 0),e(this,`currentPlayingVideoIndex`,0),e(this,`videoConfig`,void 0),e(this,`subscription`,void 0),e(this,`focusManager`,void 0),e(this,`prevIsid`,void 0),e(this,`isInited`,!1),e(this,`postponedInitParams`,null),e(this,`internalsExposure`,null),e(this,`fatalError$`,new Yf.ValueSubject(null)),e(this,`createOneStat`,(e,t={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:r,statUserSalt:i,statTrackCode:a,statVKAppId:o,refreshStatAuthToken:s,autoplay:c,isTouch:l,refDomain:u,deviceId:d}=$f(this.videoConfig,t),{unitedVideoId:f,isClip:p=!1}=e;if(this.uiConfig.features.statistics&&f)try{return new Qf.OneStat({movieId:f,albumId:n,place:r,trackCode:a,vkAppId:o,autoplay:c??!1,mobile:l,clip:p,refDomain:u,deviceId:d,isPreviewPlayerView:!1},{refreshAuthToken:s,userSalt:i,config:this.statisticsConfig})}catch(e){console.error(e)}}),this.subscription=new Xf.Subscription,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=wc(ff,{target:this.playerContainer}))})}connectedCallback(){if(this.rootContainer)return;this.initPlayerRootContainers();let e=Wo({title:this.getAttribute(`stub-title`)??void 0,thumbUrl:this.getAttribute(`stub-thumb-url`)??void 0});this.svelteStubComponent=wc(lf,{target:this.playerContainer,props:e}),this.postponedInitParams&&=(this.initPlayer(...this.postponedInitParams),null)}disconnectedCallback(){this.focusManager?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.subscription.unsubscribe(),this.internalsExposure?.destroy()}initPlayerRootContainers(){this.rootContainer=document.createElement(`div`),this.rootContainer.style.position=`relative`,this.rootContainer.className=`root-container`,this.rootContainer.style.width=`100%`,this.rootContainer.style.height=`100%`,this.rootContainer.style.minHeight=`206px`,this.shadowRootContainer=document.createElement(`div`),this.shadowRootContainer.style.position=`absolute`,this.shadowRootContainer.className=`shadow-root-container`,this.shadowRootContainer.style.width=`100%`,this.shadowRootContainer.style.height=`100%`,this._shadowRoot=this.shadowRootContainer.attachShadow({mode:`open`}),this.playerContainer=document.createElement(`div`),this.playerContainer.style.all=`initial`,this.playerContainer.style.display=`block`,this.playerContainer.style.contain=`strict`,this.playerContainer.style.width=`100%`,this.playerContainer.style.height=`100%`,this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement(`div`),this.stateContainer.className=`state-container`,this.stateContainer.style.width=`1px`,this.stateContainer.style.height=`1px`,this.stateContainer.style.position=`absolute`,this.stateContainer.style.backgroundColor=`transparent`,this.stateContainer.style.left=`-100000px`,this.append(this.rootContainer),this.append(this.stateContainer)}createThinOneStat(e,t={}){if(!this.videoConfig)return;let{deviceId:n,preload:r,refreshStatAuthToken:i}=$f(this.videoConfig,t),{unitedVideoId:a}=e;if(this.uiConfig.features.thinStatistics&&a)return new Qf.ThinOneStat.ThinOneStat({deviceId:n,movieId:a,preload:r,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:i})}createPlayer(e,t={},n){if(!this.videoConfig)return;let{statAuthToken:r,preload:i,autoplay:a,volume:o,muted:s,fromTime:c,canRewindLive:l,supportLink:u,showAds:d,adsSlotId:f,adsParams:p={},adsAutoplayParam:m,interfaceLanguage:h,isCyrillicRelatedInterface:g,isAudioDisabled:_,isLiveCatchUpMode:v,fullScreenTarget:y,failoverHosts:b,canDownload:x,callbacks:S,saveRate:C,volumeMultiplier:w,showEndScreen:T,mediascopePixels:E}=$f(this.videoConfig,t),{sources:D,title:O,thumbUrl:k,unitedVideoId:A,duration:j,adsParams:M={},previewThumbsData:N,subtitles:P,subtitlesForcedLanguage:ee,live:te,adsExternalApi:ne}=e;if(!D&&!te){var re;let e=Error(`empty sources and live`);this.fatalError$.next(e),S==null||(re=S.onCrashed)==null||re.call(S,e.message);return}let ie={...p,...M},ae={focusManager:this.focusManager},oe=this.createOneStat(e,t),se=this.createThinOneStat(e,t),ce;E&&(ce=new Qf.MediascopePixel({pixels:E})),(oe||se)&&(this.statistics=new tp(oe,se,ce)),this.store=Jf({player:n,interfaceLanguage:h,isCyrillicRelatedInterface:g,videoId:A,isLiveCatchUpMode:v,isAudioDisabled:_,statAuthToken:r,callbacks:S,webApi:ae,previewThumbsData:N,canDownload:x,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:C,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let le=()=>{var e;if(!(!this.store||!this.videoConfig)){if(this.subscription.add(this.store.state.currentFormat$.subscribe(e=>{var t;return S==null||(t=S.onCurrentFormatChanged)==null?void 0:t.call(S,e)})),this.subscription.add(this.store.state.throughputEstimation$.subscribe(e=>{var t;return S==null||(t=S.onThroughputEstimationChanged)==null?void 0:t.call(S,e)})),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(e=>{var t;return S==null||(t=S.onTrafficSavingEnabledChanged)==null?void 0:t.call(S,e)})),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(e=>{var t;return S==null||(t=S.onHighQualityEnabledChanged)==null?void 0:t.call(S,e)})),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(e=>{var t;return S==null||(t=S.onAutoQualityEnabledChanged)==null?void 0:t.call(S,!!e)})),this.subscription.add(new Xf.Observable(e=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(t=>e.next(t)))}).pipe(Xf.skip(1)).subscribe(e=>{var t;return S==null||(t=S.onCurrentPlaybackRateChanged)==null?void 0:t.call(S,e)})),this.subscription.add(this.store.state.volume$.subscribe(e=>{var t;return S==null||(t=S.onVolumeChange)==null?void 0:t.call(S,e)})),this.subscription.add(this.store.state.muted$.subscribe(e=>{if(e){var t;S==null||(t=S.onMute)==null||t.call(S)}else{var n;let e=(this.store?.state.volume$&&Y(this.store.state.volume$))??0;S==null||(n=S.onUnmute)==null||n.call(S,e)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(e=>{var t;return S==null||(t=S.onVideoBitrateChanged)==null?void 0:t.call(S,e)})),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(e=>{var t;return S==null||(t=S.onVSIDChanged)==null?void 0:t.call(S,e)})),Ro(sp,{sources:D,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:O,thumbUrl:k,subtitles:P,subtitlesForcedLanguage:ee,live:te,preload:i,autoplay:a,muted:s,volume:o,fromTime:c,canRewindLive:l,supportLink:u,showAds:d,adsSlotId:f,adsParams:ie,adsAutoplayParam:m,duration:j,failoverHosts:b,fullScreenTarget:y,saveRate:C,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:w,showEndScreen:T,adsExternalApi:ne,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0),this.svelteRootComponent=wc(nf,{target:this.playerContainer,props:G(sp)}),!this.isInited){var t,n;this.isInited=!0,(t=this.videoConfig)==null||(t=t.callbacks)==null||(n=t.onInited)==null||n.call(t)}this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig}),this.uiConfig.devNullLog&&!((e=this.videoConfig)==null||(e=e.callbacks)==null)&&e.onDevNullLog?np.devNull.subscribe(`ui`,this.videoConfig.callbacks.onDevNullLog):np.devNull.destroy(`ui`)}};this.coreConfig.asyncResolveClientChecker?Zf.clientChecker.isInited$.subscribe(e=>{e&&(console.log(`UI TV SDK async start`),le())}):le()}initPlayer(e,t={}){var n,r;if(!this.isConnected){this.postponedInitParams=[e,t];return}if(!Array.isArray(e.videos)||e.videos.length===0){var i,a;let t=Error(`empty videos`);this.fatalError$.next(t),(i=e.callbacks)==null||(a=i.onCrashed)==null||a.call(i,t.message);return}else this.fatalError$.next(null);this.videoConfig=$f(op,Xf.cloneDeepWith(e,e=>e instanceof ap?e:void 0)),this.playerId=Xf.getPlayerId(e.playerId),this.uiConfig=Il(t.ui??{}),this.coreConfig=t.core??{},this.statisticsConfig=t.statistics??{},this.metaConfig=t.meta,this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new Xf.InternalsExposure(`ui`,this.playerId)),np.devNull.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`player_init_player`,`ads.enable: `+this.uiConfig.ads.enable,`showAds: `+this.videoConfig?.showAds],numbers:[Yf.now()]}),(n=this.videoConfig).autoplay&&(n.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,(r=this.videoConfig).canRewindLive&&(r.canRewindLive=this.uiConfig.features.liveRewind),this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.focusManager=this._shadowRoot?new ip(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex])}play(){this.store?.playerPhase.is(`LiveWaitingStart`)||this.store?.playerPhase.is(`LiveWaitingRecover`)||this.store?.playerPhase.is(`LiveWaitingRecord`)||this.svelteRootComponent?.play()}pause(){this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.unmountComponent(this.svelteStubComponent);let e=this.videoConfig.videos[0];e&&(this.unmountComponent(this.svelteRootComponent),this.createPlayer(e))}setMuted(e){this.svelteRootComponent?.setMuted(e)}toggleSubtitle(){this.svelteRootComponent?.toggleSubtitle()}changeSubtitle(e,t){this.svelteRootComponent?.changeSubtitle(e,t)}setVolume(e){this.svelteRootComponent?.setVolume(e)}seekTime(e){this.svelteRootComponent?.seekTime(e)}setPlaybackRate(e){this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.svelteRootComponent?.setAutoQualityLimits(e)}setAutoQuality(){this.svelteRootComponent?.setAutoQuality()}toggleTrafficSaving(e){this.svelteRootComponent?.toggleTrafficSaving(e)}toggleHighQuality(e){this.svelteRootComponent?.toggleHighQuality(e)}changeAudioStream(e){this.svelteRootComponent?.changeAudioStream(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.isLiveTailPlaying()||(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){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()}setLiveWaitingRecover(e=!1){let t=this.isLiveTailPlaying(),n=e||!t,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=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};e&&t(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{e||t(),this.store?.destroy()})}setLiveEnd(e){let t=!this.isLiveTailPlaying(),n=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(t){n();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=n)}setLiveLowLatency(e){this.store?.actions.external.setLiveLowLatency(e)}setLooped(e){this.store?.actions.internal.setLooped(e)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??``}getDeviceId(){var e;return((e=this.statistics)==null||(e=e.oneStat)==null?void 0:e.getDeviceId())??void 0}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}restoreFocus(){this.focusManager?.restoreFocus()}getTotalViewTime(){var e;return(e=this.statistics)==null||(e=e.thinOneStat)==null?void 0:e.getTotalViewTime()}unmountComponent(e){e&&Oc(e)}}var lp=require(`@vkontakte/videoplayer-shared/es2018`),up=require(`@vkontakte/videoplayer-core/es2018`),dp=()=>{window.customElements.define(`vk-video-player-tv`,cp)};
|