@vkontakte/videoplayer-tv 1.0.4-dev.04f0bb5f.0 → 1.0.4-dev.ffe03d52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2015.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @vkontakte/videoplayer-tv v1.0.4-dev.04f0bb5f.0
3
- * Tue, 24 Feb 2026 12:57:41 GMT
2
+ * @vkontakte/videoplayer-tv v1.0.4-dev.ffe03d52.0
3
+ * Tue, 24 Feb 2026 12:48:16 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-4/doc/
5
5
  */
6
6
  var wu=Object.create;var dr=Object.defineProperty,Su=Object.defineProperties,Iu=Object.getOwnPropertyDescriptor,Nu=Object.getOwnPropertyDescriptors,Du=Object.getOwnPropertyNames,ls=Object.getOwnPropertySymbols,Lu=Object.getPrototypeOf,ds=Object.prototype.hasOwnProperty,ku=Object.prototype.propertyIsEnumerable;var us=t=>{throw TypeError(t)};var lr=(t,e,i)=>e in t?dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Be=(t,e)=>{for(var i in e||(e={}))ds.call(e,i)&&lr(t,i,e[i]);if(ls)for(var i of ls(e))ku.call(e,i)&&lr(t,i,e[i]);return t},dt=(t,e)=>Su(t,Nu(e));var Cu=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var $u=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Du(e))!ds.call(t,o)&&o!==i&&dr(t,o,{get:()=>e[o],enumerable:!(n=Iu(e,o))||n.enumerable});return t};var Ou=(t,e,i)=>(i=t!=null?wu(Lu(t)):{},$u(e||!t||!t.__esModule?dr(i,"default",{value:t,enumerable:!0}):i,t));var Zt=(t,e,i)=>lr(t,typeof e!="symbol"?e+"":e,i),cs=(t,e,i)=>e.has(t)||us("Cannot "+i);var Dt=(t,e,i)=>(cs(t,e,"read from private field"),i?i.call(t):e.get(t)),ro=(t,e,i)=>e.has(t)?us("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),ao=(t,e,i,n)=>(cs(t,e,"write to private field"),n?n.call(t,i):e.set(t,i),i);var Ut=(t,e,i)=>new Promise((n,o)=>{var a=u=>{try{r(i.next(u))}catch(h){o(h)}},d=u=>{try{r(i.throw(u))}catch(h){o(h)}},r=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,d);r((i=i.apply(t,e)).next())});var dd=Cu(()=>{"use strict";AdmanHTML=function(){"use strict";function t(_){_&&typeof _=="string"&&new AdmanHTML.OpenLinkPopupRender(O).open(_)}function e(_){Ee.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(),te=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:te,hostnameEncoded:encodeURIComponent(te||"")},Ee.rb(Ee.code.ADMAN_SUCCESSFULLY_INITIALIZED),O.stats.metrics("initing"),T=_.midrollPointsP||null,Ue=!T&&_.midrollPoints?_.midrollPoints:null,O.config.vpaidJsInterface||(O.config.vpaidJsInterface=se),O.config.vpaidHtmlInterface||(O.config.vpaidHtmlInterface=pe);var Ne="https://ad.mail.ru/vp/"+O.slotId+"?app_name=admanhtml&version="+this.getVersion();if(_.params&&_.params.constructor&&_.params.constructor===Object){var tt=[];"flash"in _.params||(_.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var qe in _.params)_.params.hasOwnProperty(qe)&&tt.push(qe+"="+_.params[qe]);var at=AdmanHTML.Utils.getUserIdQuery();at&&tt.push(at),tt.length&&(Ne+="&"+tt.join("&"))}if((O.slotId||_.json||_.adUrl)&&!O.browser.adBlock){var Xe={},fi=this;O.slotId?Xe.url=Ne:_.adUrl?(_.adUrl.indexOf("ad.mail.ru/")!==-1&&(_.adUrl+=_.adUrl.indexOf("?")===-1?"?":"&",_.adUrl+="version="+this.getVersion()),Xe.url=_.adUrl):Xe.data=_.json,le=new AdmanHTML.AdSlot(O,Xe,function(){var mi=le.getRootSettings()||{},bi=mi.requestHostname;if(bi&&!AdmanHTML.Utils.matchHostname(O.location.hostname,bi,z))return O.stats.logError("HOSTNAME_MISMATCH:"+bi+":"+O.location.topEncoded,{impressionID:mi.impressionID,padID:mi.padID,bannerIDs:mi.bannerIDs}),void(O.callbacks.onError&&O.callbacks.onError());O.location.hostname||O.stats.logError("HOSTNAME_EMPTY:"+bi+":"+O.location.topEncoded),O.cb("onReady",[{settings:le.settings}]);var Ui=1e6,ki=[],Qe=[],ze=_.params&&_.params.duration?parseInt(_.params.duration,10):Ui;ze===0&&(ze=Ui),Ue&&Ue.sort(AdmanHTML.Utils.numSorter),T&&T.sort(AdmanHTML.Utils.numSorter);var it=le.getSection("midroll")||[],Zo=le.getServices("midroll",function(xt){return!xt.started()&&xt.isAfter()})||[];it=it.concat(Zo),it.forEach(function(xt){var Je=xt.getAd();Je.point||Je.pointP||(Je.pointP=50)}),it.sort(function(xt,Je){var en=xt.getAd(),tn=Je.getAd();return en.pointP&&tn.pointP?en.pointP-tn.pointP:(en.point||en.pointP/100*ze)-(tn.point||tn.pointP/100*ze)}).forEach(function(xt){if(!xt.isEmpty||!xt.isEmpty()){var Je=xt.getAd();Ue&&Ue.length?(Je.point=Ue.shift(),Je.pointP=null,Qe.push(Je.point),xt.addImmutableProperty("point",Je.point)):T&&T.length?(Je.pointP=T.shift(),Je.point=null,ki.push(Je.pointP),xt.addImmutableProperty("pointP",Je.pointP)):Ue||T||(Je.point?(xt.addImmutableProperty("point",Je.point),Qe.push(Je.point)):Je.pointP&&(xt.addImmutableProperty("pointP",Je.pointP),ki.push(Je.pointP)))}}),L=ki.sort(AdmanHTML.Utils.numSorter),S=Qe.sort(AdmanHTML.Utils.numSorter);var Xi=le.getSection("research");Xi&&Xi.length>0&&(Ie=Xi[0]),O.pauseOnHide&&Ae(fi)})}else{Ee.logError("Adman init failed");var Kt=O.callbacks.onError;Kt&&Kt(),B=ve=Y=null}}function i(_,Q){Q=Q||!1;var te;if(B&&(B.log("sectionShown"),B.disposed||(B.dispose(),B.disposed=!0,N(B,Y)),_&&B.log("closedByUser")),Y&&!ce[Y]&&(ce[Y]=Y!=="midroll",te=_?O.callbacks.onClosed:O.callbacks.onCompleted),ke[Y]&&ve&&(ke[Y]=ke[Y].concat(ve.splice(0,ve.length))),B=ve=Y=null,d(),typeof Q=="object"&&Q.force===!0)return void((te=O.callbacks.onError)&&te(Q.message));te&&te()}function n(_){var Q=le.getSettings(Y).maxBannersShow||0,te=we[Y]||0,Re=!Q||te<Q;if(B&&!B.disposed&&(B.complete&&B.log("playbackCompleted"),B.dispose(),B.disposed=!0,N(B,Y)),ve&&ve.length&&Re)B=ve.shift(),we[Y]=te+(B.isEmpty()?0:1),B.reset(),B.started=!0,B.start();else{var Ne=le.getNextAfterService(Y);Y!=="midroll"&&Ne&&Re?Ne.start(function(){ve=le.getSection(Y),n()}):le.getSettings(Y).loop&&ke[Y]&&ke[Y].length?(ve=ke[Y],ke[Y]=[],n()):i(!1,_)}}function o(_){ve||(Y=_||"preroll",le.resetServices(Y),ce[Y]=!1,ve=le.getSection(Y),_==="midroll"&&(ve=u(ve)),n(),Y&&(ke[Y]=ke[Y]||[]),B&&(B.log("sectionStarted"),O.debugMode&&console.log(Y,B.getAd(),B.getSettings(),ve)),a(Y),O.stats.metrics("started"))}function a(_){(je=le.getDebug(_))&&je.start()}function d(){je&&je.dispose(),je=null}function r(_,Q){function te(Qe,ze){for(var it=0;it<Qe.length&&!(Math.abs(Qe[it])>ze);it++);return it>0?[Qe[it-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<=mi||ze.pointP&&ze.pointP<=bi)}function Ne(){R=L.reduce(function(Qe,ze){var it=Math.ceil(Q*ze/100);Qe.indexOf(it)===-1&&Qe.push(it)},S).sort(AdmanHTML.Utils.numSorter)}function tt(Qe){return R.reduce(function(ze,it){return ze===0&&it>0&&it-Qe>=0?it-Qe:ze},0)}if(!isNaN(_)&&!isNaN(Q)){var qe=parseInt(_),at=Math.floor(100*_/Q);de=Q,ee=L&&isFinite(at)?te(L,at):[],ae=S?te(S,qe):[],ee[0]&&ae[0]&&(Math.abs(ee[0]*de/100)>Math.abs(ae[0])?ae=[]:ee=[]);var Xe=typeof le=="object"&&typeof le.getSettings=="function"?le.getSettings("midroll").midpointAllowableDelta:void 0;E=Xe!=null?Xe:E;var fi=100*E/Q,Kt=E!==0&&E<5?E:5,mi=qe+Kt,bi=at+Kt/Q*100;if(le.getServices("midroll",function(Qe){return!(!Qe.isAfter()||Qe.started()||!Re(Qe))}).forEach(function(Qe){var ze=qe-Qe.getAd().point,it=at-Qe.getAd().pointP;ze<E||it<fi||E===0?Qe.start():O.debugMode&&console.log("skip midroll fetch")}),ee.length&&ee[0]>0||ae.length&&ae[0]>0){var Ui=!1,ki=le.getSection("midroll");ki&&ki.forEach(function(Qe){var ze=Qe.getAd();(ze.pointP&&~ee.indexOf(ze.pointP)||ze.point&&~ae.indexOf(ze.point))&&(Ui=!0)}),Ui&&O.cb("adMidrollPoint",[_])}return O.forcePreloadAdditionalData?(Ne(),tt(_)):void 0}}function u(_){function Q(Re,Ne){var tt=Re.getAd(),qe=Ne.getAd();return(tt.point||tt.pointP*de/100)-(qe.point||qe.pointP*de/100)}var te=[];return _&&_.forEach(function(Re){var Ne=Re.getAd();(Ne.pointP&&~ee.indexOf(Ne.pointP)||Ne.point&&~ae.indexOf(Ne.point))&&te.push(Re)}),S.forEach(function(Re,Ne){~ae.indexOf(Re)&&(S[Ne]=-S[Ne])}),L.forEach(function(Re,Ne){~ee.indexOf(Re)&&(L[Ne]=-L[Ne])}),te.sort(Q),te}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 c(_){_=_<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=[],te=le.getSection(_||"preroll");return te&&te.forEach(function(Re){Re.isEmpty()||Q.push(Re.getExtendedAdForApp())}),Q}function D(_){return le.getAfterServices(_||"preroll")}function N(_,Q){_.isEmpty()||_.isStat()||ke[Q]&&ke[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 te=_.document,Re=Q==="width"?"clientWidth":"clientHeight",Ne=Q==="width"?"innerWidth":"innerHeight",tt=_[Ne],qe=te.body[Re],at=te.documentElement[Re],Xe=1/0;return Xe=M(qe)||Xe,Xe=M(at)||Xe,tt&&!isNaN(tt)&&(Xe=Math.min(Xe,tt)),Xe}function m(_){return{width:I(_,"width"),height:I(_,"height")}}function U(_,Q){var te=m(Q);return{left:Math.max(0,_.left),right:Math.min(te.width,_.right),top:Math.max(0,_.top),bottom:Math.min(te.height,_.bottom)}}function x(_,Q){try{for(var te=_.getBoundingClientRect(),Re=w(te),Ne=Q,tt=Ne.parent;Ne!==tt;){var qe=Ne.frameElement.getBoundingClientRect();te=A(te,qe);var at=Math.max(qe.left,te.left),Xe=Math.min(qe.right,te.right),fi=Math.max(qe.top,te.top),Kt=Math.min(qe.bottom,te.bottom);te.left=at,te.right=Xe<at?at:Xe,te.top=fi,te.bottom=Kt<fi?fi:Kt,Ne=Ne.parent}te=U(te,tt);var mi=w(te);return{left:te.left,right:te.right,top:te.top,bottom:te.bottom,percent:mi/Re*100}}catch(bi){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(te){}return"XD_FRAME"}function K(_){return!P(_)&&k(_)!=="XD_FRAME"}function re(_,Q,te){Z(te,x(_,window).percent>=100*Q)}function V(_){return _.mozVisibilityState?"mozvisibilitychange":_.webkitVisibilityState?"webkitvisibilitychange":_.visibilityState?"visibilitychange":""}function G(_){Z(_,!0)}function F(_){Z(_,!1)}function Z(_,Q){var te=_.getPlayStatus();_.prevVisibility!==Q&&(_.prevVisibility=Q,te.curStatus!==void 0&&te.curStatus!==te.prevStatus&&(Q?_.resume():_.pause()))}function Ae(_){var Q=_,te=O.viewabilityValue,Re=O.viewabilityEl;if(Re){if(P()){var Ne=new IntersectionObserver(function(at){at.forEach(function(Xe){Z(Q,Xe.intersectionRatio>=te)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});Ne.observe(Re)}else if(K){var tt=function(){re(Re,te,Q)};window.addEventListener("resize",tt,!1),window.addEventListener("scroll",tt,!1)}}var qe=(V(document),J.hasFocus());setInterval(function(){var at=J.hasFocus();qe!==at&&(qe=at,qe?G(Q):F(Q))},500)}function X(){return O.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:O.playStatus}var le,Y,ve,B,je,Ie,de,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 te=O.callbacks[_];te&&te.apply(this,Q)}}},ue=window.location.protocol==="http:"?"http:":"https:",se=ue+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",pe=ue+"//ad.mail.ru/static/rbadman-vpaid.html",Ee=new AdmanHTML.Stats(O),Me=new AdmanHTML.Viewability,Ue=[],T=[],S=[],L=[],R=[],ee=[],ae=[],we={},ke={},E=3,z=function(){for(var _=window,Q=frameElement;Q;){try{Q=_.parent.frameElement}catch(te){break}_=_.parent}return _}(),J=z.document;O.stats=Ee,O.viewability=Me,O.protocol=ue,O.stats.metrics();var ce={};return{init:e,start:o,stop:y,pause:f,resume:l,setVolume:c,fullscreenOn:v,fullscreenOff:b,setFullscreen:function(_){_?v():b()},skip:h,destroy:y,getPlayStatus:X,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(){Ie&&Ie.pause()},resume:function(){Ie&&Ie.resume()},complete:function(){Ie&&Ie.setComplete()},setVolume:function(_){Ie&&Ie.setVolume(_)},setFullscreen:function(_){Ie&&Ie.setFullscreen(_)},setPosition:function(_,Q){Ie&&Ie.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,K="";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||(K=M.unload?"unload":"complete"));var re={name:m,value:I,url:w,percent:P,viewable:k,start:U,end:x,onevent:K};"target"in M&&(re.target=M.target),e.stats.push(re)}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 u(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&&u.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 c(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 K=N["thresholdPValue."+k];K&&(x=x.concat(K))}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):c(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),c(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:u,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,K,re,V){function G(Z){t.stats.metrics("inited");var Ae={};--w,Z&&(A++,Z=typeof Z=="string"?Z.trim():Z,typeof Z=="object"||Z.charAt(0)==="{"?(Ae=r(Z,x,P,k||0,K,re,V),M++):Z.charAt(0)==="<"?(Ae=u(Z,x,P,k||0,K,re,V),M++):(t.stats.rb(t.stats.code.UNKNOWN_DATA_FORMAT),t.stats.logError("UNKNOWN_DATA_FORMAT"))),x.id&&(Ae.banners||Ae.services?Ae.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,K,re,V,G){function F(de){return de?de.filter(function(O){return O.type&&(O.type==="sectionShown"||O.type==="sectionStarted"||O.type==="sectionEmpty")}):[]}function Z(de,O,ue,se){var pe=k?k.clone():new AdmanHTML.Ad(t);if(pe.addStatCollection(de.statistics),pe.addStatCollection(de.serviceStatistics),de.type==="additionalData"){var Ee;de.id=de.id||AdmanHTML.Utils.createIntUID(),le.services++;var Me=!g[ue]||g[ue].length===0;if(O>0&&Me&&(m[ue]=!0),de.extensions)for(var Ue in de.extensions)de.extensions.hasOwnProperty(Ue)&&h(pe,de.extensions[Ue],Ue);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function(L){L in de&&pe.addImmutableProperty(L,de[L])}),t.forcePreloadAdditionalData||de.doAfter!=="true"&&de.doAfter!==!0&&!de.doOnEmptyResponseFromId)Ee=new AdmanHTML.ServiceAd(t),l(ue,P.id,Ee,de),O===0&&Me?o(de,pe,K+1,ue,I.PRE,G):o(de,pe,K+1,ue,null,G);else{var T=de.doAfter==="true"||de.doAfter===!0?I.POST:null,S=function(L,R){o(de,L||pe,de.allowRepeat?0:K+1,ue,T,function(){R&&R()})};Ee=new AdmanHTML.ServiceAd(t,null,S),l(ue,P.id,Ee,de,pe)}}else f(ue,se,pe,de),le.banners++;return pe}var Ae,X=x,le={banners:0,services:0};if(typeof x=="string")try{X=JSON.parse(x)}catch(de){return t.stats.rb(t.stats.code.ERROR_CONVERTING_STRING_TO_JSON),void t.stats.logError("ERROR_CONVERTING_STRING_TO_JSON")}if(X.settings&&X.settings.requestHostname&&!D.requestHostname&&(D.requestHostname=X.settings.requestHostname),X&&X.settings&&(D=t.slot&&t.slot.getRootSettings()||D||{},n&&typeof n=="function")){var Y=X.sections&&X.sections.preroll&&X.sections.preroll.length&&X.sections.preroll[0]||null;n({impressionID:X.settings.impressionID||"",padID:X.settings.padID||"",bannerIDs:Y&&Y.bannerID||""})}for(var ve in X.sections)if(X.sections.hasOwnProperty(ve)){var B=X.sections[ve],je=0;if(X.settings&&(Ae=X.settings[ve])&&(Ae.controlsStyle=X.settings.controlsStyle||0,v(ve,Ae)),B.forEach(function(de){if(de.type==="debugData"){var O=new AdmanHTML.Ad(t);return O.addClick(de.url),void c(ve,O,de)}var ue=re===ve?V:"",se=Z(de,je,ve,ue);Ae&&(se.addStatCollection(F(Ae.statistics)),se.addSettings(Ae)),je++}),B.length===0){var Ie=new AdmanHTML.Ad(t);Ae&&Ie.addStatCollection(F(Ae.statistics)),f(ve,"",Ie,{type:"empty"})}}return X.type&&Z(X,0,re,V),le}function u(x,P,k,K,re,V,G){function F(B,je,Ie){Ae(B.getElementsByTagName(je),Ie)}function Z(B,je,Ie,de){F(B,je,function(O){de(le(O),Ie?X(O,Ie):null,O)})}function Ae(B,je){Array.prototype.forEach.call(B,je.bind(this))}function X(B,je){var Ie=B.attributes.getNamedItem(je);return Ie?Ie.value:null}function le(B){return B&&B.childNodes&&B.childNodes[0]&&B.childNodes[0].wholeText?B.childNodes[0].wholeText.trim():null}var Y,ve={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 ue=k?k.clone():new AdmanHTML.Ad(t);Z(B,"Impression","id",function(pe){try{ue.addStat(pe,"playbackStarted")}catch(Ee){}}),Z(B,"Extension","type",function(pe,Ee){h(ue,pe,Ee)}),Z(B,"Error",null,function(pe){ue.addStat(pe,"error")}),Z(O,"Tracking","event",ue.addStat);var se=O.getElementsByTagName("VideoClicks")[0];return se&&Ae(se.childNodes,function(pe){pe.tagName==="ClickThrough"?ue.addClick(le(pe)):pe.tagName==="ClickTracking"&&ue.addStat(le(pe),"click")}),ue}function Ie(O){var ue={width:X(O,"width"),height:X(O,"height"),id:X(O,"id"),assetWidth:X(O,"assetWidth"),assetHeight:X(O,"assetHeight"),expandedWidth:X(O,"expandedWidth"),expandedHeight:X(O,"expandedHeight"),apiFramework:X(O,"apiFramework"),adSlotID:X(O,"adSlotID"),statistics:[]};return Z(O,"StaticResource",null,function(se){ue.staticResource=se}),Z(O,"HTMLResource",null,function(se){ue.htmlResource=se}),Z(O,"IFrameResource",null,function(se){ue.iframeResource=se}),Z(O,"CompanionClickTracking",null,function(se){ue.statistics.push({type:"click",url:se})}),Z(O,"Tracking","event",function(se,pe){ue.statistics.push({type:pe,url:se})}),Z(O,"CompanionClickThrough",null,function(se){ue.urlToNavigateOnClick=se}),ue}var de=X(B,"id");F(B,"InLine",function(O){var ue=[];F(O,"CompanionAds",function(se){var pe=X(se,"required")||"none";F(O,"Companion",function(Ee){var Me=Ie(Ee);Me.required=pe,ue.push(Me)})}),F(O,"Linear",function(se){var pe,Ee=je(se),Me=se.parentNode;Me&&(pe=X(Me,"adId")||X(Me,"adID")||X(Me,"AdId")||X(Me,"AdID")||X(Me,"id")),pe=pe||de;var Ue={bannerID:pe,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(le(se.getElementsByTagName("Duration")[0]))};P.urlToNavigateOnClick&&(Ue.urlToNavigateOnClick=P.urlToNavigateOnClick),F(se,"MediaFile",function(T){Ue.mediafiles.push({apiFramework:X(T,"apiFramework"),type:X(T,"type"),width:X(T,"width"),height:X(T,"height"),src:le(T)})}),F(se,"AdParameters",function(T){Ue.params=le(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)}}),ue.length&&(Ue.companionAds=ue),f(re||"preroll",V,Ee,Ue),ve.banners++}),F(O,"NonLinear",function(se){var pe=je(se),Ee={width:X(se,"width"),height:X(se,"height"),duration:AdmanHTML.Utils.convertDuration(X(se,"minSuggestedDuration")),mediafiles:[]};Z(se,"NonLinearClickThrough",null,function(Me){pe.addStat(Me,"click")}),Z(se,"StaticResource","creativeType",function(Me,Ue){Ee.mediafiles.push({type:Ue,src:Me})}),f(re||"overlay",V,pe,Ee),ve.banners++})}),F(B,"VASTAdTagURI",function(O){ve.services++,o({url:le(O),id:P.id},je(B),K+1,re,V,G)})}),ve}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,K){k.addAd(K)&&(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,K,re){k.addAd(K),k.addInheritedAd(re),k.addStatCollection(K.statistics),k.addStatCollection(K.serviceStatistics),k.sectionType=x,U.addService(k,P)}function c(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],K=g[I.POST+x];g[x]=[].concat(P||[],k||[],K||[]),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 u(v){c=!0,i&&i(e.inheritedAd,v)}function h(){c=!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 c=!1;return{addStatCollection:d,addStat:r,addAd:n,addInheritedAd:o,addImmutableProperty:a,getAd:function(){return e.ad},start:u,reset:h,started:function(){return c},log:l,isAfter:f}},AdmanHTML.ServiceStorage=function(t){"use strict";function e(y,g){var C=y.getAd();v.push(C.id),c[C.id]={service:y},g&&c[g]&&(c[g].children=c[g].children||[],c[g].children.push(C.id)),t.forcePreloadAdditionalData||C.doAfter!=="true"&&C.doAfter!==!0&&!C.doOnEmptyResponseFromId||l.push(y)}function i(y){return c[y]?c[y].service:null}function n(y){var g=typeof y=="string"||typeof y=="number"?y:y.getAd().id;delete c[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 c)c.hasOwnProperty(C)&&(D=c[C].service,D.sectionType!==y||g&&!g(D)||N.push(D));return N}function a(y){v.forEach(function(g,C){y===g?(c[g].service.log("serviceAnswerEmpty"),v.splice(C,1),b.push(y),delete c[g]):c[g].children&&c[g].children.indexOf(y)!==-1&&c[g].children.splice(c[g].children.indexOf(y),1)})}function d(y){var g=c[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 u(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=[],c={},v=[],b=[];return{addService:e,getService:i,getServices:o,removeService:n,resetAll:f,markEmptyService:a,markNonEmptyService:d,getAfterServices:u,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(c){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()-u})}catch(A){}else y.sessionId=AdmanHTML.Utils._genSessionId();u=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),c=!0):AdmanHTML.Utils.xhr(w,function(A){if(c=!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 u,h="slot",f=3107,l=!1,c=!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(u){return u.replace(/-+(.)?/g,function(h,f){return f?f.toUpperCase():""})}function e(u,h,f){var l,c=d[h];if(!c){for(l=0;l<r.length;l++)if(c=r[l]===""?h:t(r[l]+"-"+h),u[c]!==void 0){d[h]=c;break}}u[c]=f}function i(u){return parseInt(u)+"px"}function n(u,h){function f(l,c){return l=parseInt(l,16),c=c||1,"rgba("+(l>>16&255)+","+(l>>8&255)+","+(255&l)+","+c+")"}return Array.isArray(u)?"linear-gradient("+u.map(function(l){return f(l,h)}).join(", ")+")":f(u,h)}function o(u,h,f){var l=u.style;(f||Object.keys(h)).forEach(function(c){h.hasOwnProperty(c)&&a(l,c,h[c],h)})}function a(u,h,f,l){var c,v,b;switch(h){case"fontFace":c="fontFamily",v=f;break;case"hasBackground":f||(c="background",v="none",delete l.backgroundColor);break;case"backgroundColor":c="background",v=n(f,l.backgroundAlpha);break;case"cornerRounding":case"borderCornerRounding":c="borderRadius",v=i(Math.floor(f/2));break;case"headerColor":case"bodyColor":case"hyperlinkColor":case"textColor":c="color",v=n(f);break;case"headerSize":case"bodySize":case"hyperlinkSize":case"textSize":c="fontSize",v=i(f);break;case"headerUnderline":case"bodyUnderline":case"hyperlinkUnderline":case"textUnderline":c="text-decoration",v=f?"underline":"none",b="";break;case"headerUnderlineOnRollOver":c="text-decoration",v=f?"":"none",b=f?"":"important";break;case"headerBold":case"bodyBold":case"hyperlinkBold":case"textBold":c="fontWeight",v=f?"bold":"normal";break;case"headerIndent":case"bodyIndent":case"hyperlinkIndent":c="marginTop",v=i(f);break;case"bodyPaddingRight":c="marginRight",v=i(f);break;case"width":case"height":c=h,v=i(f);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":c="padding",v=i(f);break;case"maxImageWidth":case"maxImageHeight":c=h==="maxImageWidth"?"maxWidth":"maxHeight",v=i(f);break;case"borderSize":c="borderWidth",v=i(f);break;case"borderColor":c="borderColor",v=n(f,l.borderAlpha);break;case"paddingLeft":case"paddingTop":c=h==="paddingLeft"?"left":"top",v=i(f);break;case"controlsPaddingTop":case"controlsPaddingRight":c=h==="controlsPaddingRight"?"right":"top",v=i(f)}c&&v&&(b!==void 0?u.setProperty(c,v,b):e(u,c,v))}var d={},r=["","webkit","Moz","O","ms"];return{applyStyle:o,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function t(){return de||(de=function(){try{if(window===window.top)return O;for(var T=window;T!==T.parent;){if(T.document.domain!==T.parent.document.domain)return se;T=T.parent}return ue}catch(S){}return se}())}function e(){if(pe!==null)return pe;var T=window;try{for(;T.parent!==T&&T.document.domain===T.parent.document.domain;)T=T.parent}catch(S){}return pe=T,T}function i(){var T=window,S="",L=e();try{S=T.top.location.href}catch(ee){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?Me:Ee}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 u(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,ee){R=R||"GET";var ae=new XMLHttpRequest;return ae.open(R,T,!0),ae.withCredentials=!ee,ae.setRequestHeader("Content-Type","text/plain"),ae.send(L||null),S&&(ae.onreadystatechange=function(){ae.readyState===4&&(ae.status===200?S(ae.response):S())},ae.onerror=function(){ee?S():f(T,S,L,R,!0)}),ae}function l(T,S,L,R,ee){ee===void 0&&(ee=!0);var ae=S*L<T*R;ee&&(ae=!ae);var we=ae?R/S:L/T,ke=Math.floor(T*we),E=Math.floor(S*we);return{x:Math.floor((L-ke)/2),y:Math.floor((R-E)/2),width:Math.floor(ke),height:Math.floor(E)}}function c(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],c(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 K(T){var S=T.ownerDocument;return S.defaultView||S.parentWindow}function re(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),ee=S[2].split("."),ae=parseInt(ee[0],10),we=0;if(ee.length===2&&(we=parseInt(ee[1],10)),!(isNaN(L)||isNaN(R)||isNaN(ae)||isNaN(we)))return 3600*L+60*R+ae+we/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 Z(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(ee){return setTimeout(T,S)}return L}return setTimeout(T,S)}function Ae(){function T(we){var ke={};try{var E=window[we].getItem("rb_sync_id");E&&typeof(ke=JSON.parse(E))!="object"&&(ke={})}catch(z){}return ke}var S=[],L=T("localStorage"),R=T("sessionStorage"),ee=b(L,R);for(var ae in ee)ee.hasOwnProperty(ae)&&S.push(ae+"="+encodeURIComponent(ee[ae]));return S.join("&")}function X(T){return/nr-vpaid(\.min)?\.js/.test(T)}function le(T,S){T&&T.style&&Y(T,S,!0)}function Y(T,S,L){L=L||!1;var R=L?function(ee,ae){T.style.setProperty(ee,ae,"important")}:function(ee,ae){T.style.setProperty(ee,ae)};Object.getOwnPropertyNames(S).forEach(function(ee){R(ee,S[ee])})}function ve(){function T(ke,E){return function(){return ke.apply(E,arguments)}}function S(ke){var E=ke.toString(16);return E.length===1?"0"+E:E}function L(ke,E,z){for(var J="",ce=E;ce<=z;ce++)J+=S(ke[ce]);return J}var R="undefined",ee=typeof crypto!==R&&crypto.getRandomValues&&T(crypto.getRandomValues,crypto)||typeof msCrypto!==R&&window.msCrypto.getRandomValues&&T(window.msCrypto.getRandomValues,window.msCrypto),ae=function(){if(ee){var ke=new Uint8Array(16);return function(){return ee(ke),ke}}var E=new Array(16);return function(){for(var z,J=0;J<16;J++)(3&J)==0&&(z=4294967296*Math.random()),E[J]=z>>>((3&J)<<3)&255;return E}}(),we=ae();return we[6]=15&we[6]|64,we[8]=63&we[8]|128,L(we,0,3)+"-"+L(we,4,5)+"-"+L(we,6,7)+"-"+L(we,8,9)+"-"+L(we,10,15)}function B(T,S){var L=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,R=[S,T].reduce(function(ee,ae){return ae&&Object.keys(L).forEach(function(we){ee[we]!==ae[we]&&(ee[we]=ae[we]?ae[we]:ee[we]),typeof ae.members=="object"&&(ee.members=ae.members)}),ee},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 Ie(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 de,O=1,ue=2,se=3,pe=null,Ee=0,Me=1,Ue=function(){var T="undefined",S="Shockwave Flash",L="application/x-shockwave-flash",R={major:0,minor:0,release:0},ee=null;if(typeof navigator.plugins!==T&&typeof navigator.plugins[S]=="object")(ee=navigator.plugins[S].description)&&typeof navigator.mimeTypes!==T&&navigator.mimeTypes[L]&&navigator.mimeTypes[L].enabledPlugin&&(ee=ee.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),R.major=parseInt(ee.replace(/^(.*)\..*$/,"$1"),10),R.minor=parseInt(ee.replace(/^.*\.(.*)\s.*$/,"$1"),10),R.release=/[a-zA-Z]/.test(ee)?parseInt(ee.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==T)try{var ae=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");ae&&(ee=ae.GetVariable("$version"))&&(ee=ee.split(" ")[1].split(","),R.major=parseInt(ee[0],10),R.minor=parseInt(ee[1],10),R.release=parseInt(ee[2],10))}catch(we){}return R}();return{setStyle:le,isNRVpaid:X,addCss:d,loadCss:r,loadJs:u,loadImg:h,xhr:f,scaleBySide:l,isEmptyObject:v,mixin:b,deepExtend:y,validateMinMax:g,numSorter:C,createIntUID:D,getQueryParams:N,triggerEvent:w,getUserIdQuery:Ae,getPageLocation:i,getDomain:A,getHostname:M,_genSessionId:ve,matchHostname:m,isLeftButtonPressed:x,isElementInDocument:P,isElement:k,getElementViewport:K,preventDefault:re,parseXml:V,convertDuration:G,renderTemplate:F,setTimeout:Z,checkFlash:n,checkFlashAsync:o,FLASH_READY:Me,FLASH_MISSING:Ee,getServingType:t,servingTypes:{ON_PAGE:O,S_FRAME:ue,XD_FRAME:se},adActionsConfigPrepare:B,isMobile:Ie}}(),AdmanHTML.Viewability=function(){"use strict";function t(V,G,F){return V.forEach(function(Z){Z.duration=G.focus&&G.percent>=Z.threshold?Z.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:K})}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(re,V,w),g&&(g.logMRC(re)||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(),Z=r(F),Ae=AdmanHTML.Utils.getElementViewport(V)||window;for(G=G||window.top;Ae!==G;){var X=Ae.frameElement.getBoundingClientRect();F=u(F,X),F.left=Math.max(X.left,F.left),F.right=Math.min(X.right,F.right),F.top=Math.max(X.top,F.top),F.bottom=Math.min(X.bottom,F.bottom),F.right<F.left&&(F.right=F.left),F.bottom<F.top&&(F.bottom=F.top),Ae=Ae.parent}F=h(F,G);var le=r(F);return F.percent=le/Z*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 u(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={},Z=f(G);return F.left=Math.max(0,V.left),F.right=Math.min(Z.width,V.right),F.top=Math.max(0,V.top),F.bottom=Math.min(Z.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(Z){k=100*Z}),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",c)}function c(){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(re),N&&N.disconnect(),window.removeEventListener("unload",c)}function y(){D&&(clearInterval(D),D=void 0,e(re))}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,K=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],re=[];return K.forEach(function(V){re.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 u(){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 c(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:u,onStart:h,registerTimer:r,setView:l,setWrapper:c,onTimeRemained:f,onResize:b}},AdmanHTML.AudioAdRenderer=function(t,e){"use strict";function i(){d.mainEl=t.audioEl||document.createElement("audio"),r.forEach(function(u){d.mainEl.addEventListener(u,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(u){d.mainEl.removeEventListener(u,o)})}function o(u){var h,f;switch(u.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(u){var h=d.mainEl.muted?0:d.mainEl.volume;d.mainEl.muted=u===0,d.mainEl.volume=u,(h===0&&u>0||h>0&&u===0)&&e.log(u?"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(){c.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(),u=a(),v.setCustomStyles(u),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(),c.dispose()}if(!t.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var r,u,h,f,l,c=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,c=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(u,{img:c,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}],u='<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("&#9874; "+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,c,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('"+c+"') 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(),c=e.getAd();if(typeof c=="object"&&typeof c.adActionsConfig=="object"&&c.adActionsConfig.members===null||typeof l=="object"&&typeof l.adActionsConfig=="object"&&l.adActionsConfig.members===null)return void d();var v={originalBannerId:c.bannerID,cipherBannerID:c.cipherBannerID?c.cipherBannerID:null,bannerOrdId:c.ordID||null,advData:c.advData||null},b=AdmanHTML.Utils.adActionsConfigPrepare(c?c.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,c){var v=Math.floor(c-l);v||(v="00"),f.updateRemainTime(v)}function d(){r&&r(),u&&typeof u=="object"&&typeof u.remove=="function"&&u.remove(),h.dispose()}if(!t.disclaimer)return{render:Function.prototype,onTimeRemained:Function.prototype,dispose:Function.prototype};var r,u,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,c){this.config=l,this.data=c,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;}";u=document.createElement("style"),u.styleSheet?u.styleSheet.cssText=l:u.appendChild(document.createTextNode(l)),this.adActionsEl.appendChild(u),this._setStyles(this.adChoiceEl,{width:"14px",height:"14px"})},n.prototype._setStyles=function(l,c){AdmanHTML.Utils.setStyle(l,c)},n.prototype.updateRemainTime=function(l){var c=Math.trunc(l/60),v=l-60*c;c=c.toString(),v=v.toString(),v.length===1&&(v="0"+v),this.remainTimeEl.innerText=c+":"+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 c=this.data.advData?"data":"id",v=this.data.advData?this.data.advData:this.data.cipherBannerID;window.open(this._advPageUrlPart+c+"="+v,"_blank")},n.prototype._copyToClipboard=function(l){var c=document.createElement("textarea");document.body.appendChild(c),c.value=l,c.select(),document.execCommand("copy"),document.body.removeChild(c)},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 c=window.getComputedStyle(l).width,v=this.actionsWrapperWidth+parseInt(this.adActionsEl.style.paddingLeft)+parseInt(this.adActionsEl.style.paddingRight);(c?parseInt(c):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 ve=D.contentWindow.document.body||D.contentDocument.body;ve&&ve.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&&(Z=F.style.display,F.style.display="none"),(Ae=document.querySelector("div.videoplayer_ads_skip"))&&(X=Ae.style.display,Ae.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),u(),M.onStart()}function a(){k||(k=!0,K+=Date.now()-re,clearInterval(w),w=null,F?F.style.display=Z:V&&c("pauseAd",[]),t.cb("onPaused"))}function d(){return P.creativeType==="video-motion"}function r(){k&&(k=!1,u(),t.cb("onPlayed"))}function u(){if(!w){if(V){if(!G)return;F?F.style.display="none":c("startAd",[])}w=setInterval(f,251),re=Date.now(),k=!1}}function h(){le||t.cb("onCompleted")}function f(){K+=Date.now()-re,re=Date.now(),M.onTimeRemained(K/1e3,N),V?c("timeUpdateAd",[K/1e3,N]):m.onTimeRemained(K/1e3,N),K>=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(ve){}}}function c(Y,ve){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:ve},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,u();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"),le=null,g();break;case"UserAction":le=Date.now()}}function b(){F&&(F.style.display=Z),Ae&&(Ae.style.display=X)}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,K=0,re=0,V=d(),G=!1,F=null,Z="flex",Ae=null,X="block",le=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(u,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(),c=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(c,b),AdmanHTML.StyleUtils.applyStyle(c.querySelector(".rb-adman_age_content"),b,["textUnderline"]))}f.ageRestrictions||c.parentNode.removeChild(c),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",u=".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 u=window;u.parent&&u.parent.frameElement;)u=u.parent;return u}function i(u){t.isPopupOpen=!0,t.pause(),d=n(u)}function n(u){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 c=r.createElement("iframe");c.classList.add("rb-adman-popup-frame"),c.setAttribute("src",u),h.appendChild(c),r.body.append(d)}function o(){var u=r.createElement("style");u.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(u)}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 u(){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,c=e.getExtendedAdForApp().statistics,v=new AdmanHTML.Viewability,b=!1,y=!1,g=!1,C=null,D=null,N=i(c,"mrcValue"),w=i(c,"timerValue");return{pause:o,resume:a,setVolume:r,setPosition:f,setComplete:u,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 u,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(u in f)f.hasOwnProperty(u)&&(h+=" "+u+'="'+f[u]+'"');h+=">";for(u in l)l.hasOwnProperty(u)&&(h+='<param name="'+u+'" value="'+l[u]+'" />');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(u,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 c=l.advertisment.text;AdmanHTML.StyleUtils.applyStyle(o.mainEl,c,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header"),c,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header_text"),c,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_body"),c,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_link"),c,"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(c.noImage)y.parentNode.removeChild(y);else if(c.contentPadding&&(y.style.marginRight=AdmanHTML.StyleUtils.getLength(c.contentPadding)),c.maxImageHeight||c.maxImageWidth){var g=f.width/f.height;y.style.width=AdmanHTML.StyleUtils.getLength(Math.round(c.maxImageWidth||c.maxImageHeight*g)),y.style.height=AdmanHTML.StyleUtils.getLength(Math.round(c.maxImageHeight||c.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",u=".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"),u(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(),c.render(),v.render()}function n(w){return w.indexOf("videolink.mycdn.me")!==-1}function o(){c.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(),u(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"),c.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),c.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 u(w){if(l.mainEl)try{l.mainEl.currentTime=w}catch(A){}}var h,f,l=new AdmanHTML.AdRenderer(t,e),c=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(!u)return M.duration;try{k=u.callGet("adDuration"),k===void 0&&(k=M.duration)}catch(K){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 K=e.getSettings();K&&(K.loadTimeout&&(I=K.loadTimeout),K.startTimeout&&(m=K.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"),u.urlToNavigateOnClick=e.getAd().urlToNavigateOnClick,w.setView(u.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(),u.destroy(),A.dispose(),w.dispose()}function a(k,K){d(),C=K,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 u,h,f,l,c,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,K){u&&u.call("resizeAd",[k,K,"normal"])},w.onClick=function(){};var U=function(k,K){if(!g){var re,V;switch(k){case"loaded":a(I,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":d();break;case"inited":u.call("handshakeVersion",["2.0"])?(a(m,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),u.call("initAd",[w.mainEl.offsetWidth,w.mainEl.offsetHeight,"normal",M.bitrate,{AdParameters:M.params}])):t.cb("onError");break;case"AdStarted":d(),y=u.callGet("adVolume"),b===void 0||u.autoMuted||u.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"),u.call("startAd"),t.stats.metrics("ready"),t.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":re=i(),V=u.callGet("adRemainingTime"),re>0&&V>=0?(w.onTimeRemained(re-V,re),A.onTimeRemained(re-V,re)):t.cb("onDurationChanged",[{remained:V,duration:re}]);break;case"AdVolumeChange":var G=u.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",re=i(),w.onTimeRemained(re,re);break;case"AdStopped":case"AdSkipped":D||(D=!0,setTimeout(function(){c?c():t.cb("onCompleted")})),t.stats.metrics(k==="AdStopped"?"completed":"skipped");break;case"AdClickThru":K.url&&K.playerHandles&&window.open(K.url,"_blank"),e.log("click"),t.cb("onClicked");break;case"AdError":t.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(K&&K.message||"")),t.stats.metrics("vpaid_error_message",K&&K.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||u&&u.call("pauseAd");break;case"video:play":N&&u&&u.call("resumeAd")}}},x=t.wrapper.ownerDocument,P=x.defaultView||x.parentWindow;return u=new AdmanHTML.VpaidLoader(t.videoEl,P),u.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",u&&u.call("pauseAd")},resume:function(){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="play",u&&u.call("resumeAd")},setVolume:function(k){u&&u.callSet("adVolume",k),b=k},skip:function(k){t.playStatus||(t.playStatus={}),t.playStatus.prevStatus=t.playStatus.curStatus,t.playStatus.curStatus="pause",c=k;try{u&&u.call("skipAd")}catch(K){}t.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(t,e){"use strict";function i(){var A;if(!u)return C.duration;try{A=u.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 u,h,f,l,c,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){u&&u.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":u=g.mainEl.getElementsByTagName("object")[0],u.call("handshakeVersion",["2.0"])?(a(w),u.call("initAd",[g.mainEl.offsetWidth,g.mainEl.offsetHeight,"normal",C.bitrate,C.params,""])):t.cb("onError");break;case"AdStarted":d(),c=u.callGet("adVolume"),l!==void 0&&u.callSet("adVolume",l),e.log("playbackStarted"),t.viewability.start(g.mainEl,e),t.cb("onVPAIDStarted");break;case"AdLoaded":a(w),u.call("startAd");break;case"AdRemainingTimeChange":I=i(),g.onTimeRemained(I-u.callGet("adRemainingTime"),I),y.onTimeRemained(I-u.callGet("adRemainingTime"),I);break;case"AdVolumeChange":var m=u.callGet("adVolume");(c===0&&m>0||c>0&&m===0)&&e.log(m?"volumeOn":"volumeOff"),c=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(){u&&u.call("pauseAd")},resume:function(){u&&u.call("resumeAd")},setVolume:function(A){u&&u.callSet("adVolume",A),l=A},skip:function(A){h=A;try{u&&u.call("skipAd")}catch(M){}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var $i="[",zi="[!",nn="]",Ai={};var nt=Symbol(),ti=Symbol("filename"),ps=Symbol("hmr"),fs="http://www.w3.org/1999/xhtml";var hs,vs,ms=(vs=(hs=globalThis.process)==null?void 0:hs.env)==null?void 0:vs.NODE_ENV,W=ms&&!ms.toLowerCase().startsWith("prod");var ii=Array.isArray,gs=Array.prototype.indexOf,ur=Array.from,cr=Object.keys,ut=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,pr=Object.getOwnPropertyDescriptors,fr=Object.prototype,_s=Array.prototype,on=Object.getPrototypeOf,mr=Object.isExtensible;var mt=()=>{};function rn(t){for(var e=0;e<t.length;e++)t[e]()}var Rt=Symbol("$state"),Mn=Symbol("legacy props"),ys=Symbol(""),so=Symbol("proxy path");var wn=3,ni=8;function lo(t){return t===this.v}function an(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function bs(t,e){return t!==e}function sn(t){return!an(t,this.v)}function As(){if(W){let t=new Error(`derived_references_self
@@ -37,7 +37,7 @@ ${o}
37
37
  `}),t.stack&&ut(t,"stack",{value:t.stack.split(`
38
38
  `).filter(u=>!u.includes("svelte/src/internal")).join(`
39
39
  `)})}}var Wi=!1,mn=null,Gi=!1,Mi=!1;function Mr(t){Mi=t}var Fn=[],Hn=[],_e=null,Ht=!1;function ht(t){_e=t}var ge=null;function Tt(t){ge=t}var yt=null;function ho(t){_e!==null&&_e.f&2097152&&(yt===null?yt=[_e,[t]]:yt[1].push(t))}var $t=null,Bt=0,Ft=null;function Ps(t){Ft=t}var nl=1,So=0,wi=!1,Io=null;function Cn(){return++nl}function Qi(t){var l,c;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&&ge!==null&&!wi,u=i.length;if(d||r){var h=t,f=h.parent;for(o=0;o<u;o++)a=i[o],(d||!((l=a==null?void 0:a.reactions)!=null&&l.includes(h)))&&((c=a.reactions)!=null?c:a.reactions=[]).push(h);d&&(h.f^=512),r&&f!==null&&(f.f&256)===0&&(h.f^=256)}for(o=0;o<u;o++)if(a=i[o],Qi(a)&&xr(a),a.wv>t.wv)return!0}(!n||ge!==null&&!wi)&&kt(t,1024)}return!1}function ol(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]===_e||((a.f&2)!==0?ol(a,e,!1):e===a&&(i?kt(a,2048):(a.f&1024)!==0&&kt(a,4096),On(a)))}}function fo(t){var v,b;var e=$t,i=Bt,n=Ft,o=_e,a=wi,d=yt,r=Te,u=Ht,h=t.f;$t=null,Bt=0,Ft=null,wi=(h&256)!==0&&(Ht||!Gi||_e===null),_e=(h&96)===0?t:null,yt=null,Nn(t.ctx),Ht=!1,So++,t.f|=2097152;try{var f=(0,t.fn)(),l=t.deps;if($t!==null){var c;if(jn(t,Bt),l!==null&&Bt>0)for(l.length=Bt+$t.length,c=0;c<$t.length;c++)l[Bt+c]=$t[c];else t.deps=l=$t;if(!wi||(h&2)!==0&&t.reactions!==null)for(c=Bt;c<l.length;c++)((b=(v=l[c]).reactions)!=null?b:v.reactions=[]).push(t)}else l!==null&&Bt<l.length&&(jn(t,Bt),l.length=Bt);if(gi()&&Ft!==null&&!Ht&&l!==null&&(t.f&6146)===0)for(c=0;c<Ft.length;c++)ol(Ft[c],t);return o!==null&&o!==t&&(So++,Ft!==null&&(n===null?n=Ft:n.push(...Ft))),f}catch(y){el(y)}finally{$t=e,Bt=i,Ft=n,_e=o,wi=a,yt=d,Nn(r),Ht=u,t.f^=2097152}}function Qu(t,e){let i=e.reactions;if(i!==null){var n=gs.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&&($t===null||!$t.includes(e))&&(kt(e,4096),(e.f&768)===0&&(e.f^=512),po(e),jn(e,0))}function jn(t,e){var i=t.deps;if(i!==null)for(var n=e;n<i.length;n++)Qu(t,i[n])}function un(t){var e=t.f;if((e&16384)===0){kt(t,1024);var i=ge,n=Gi;if(ge=t,Gi=!0,W){var o=ri;Dn(t.component_function)}try{(e&16)!==0?Ws(t):Ir(t),Sr(t);var a=fo(t);if(t.teardown=typeof a=="function"?a:null,t.wv=nl,W&&vi&&(t.f&2048)!==0&&t.deps!==null)for(var d of t.deps)d.set_during_effect&&(d.wv=Cn(),d.set_during_effect=!1);W&&Hn.push(t)}finally{Gi=n,ge=i,W&&Dn(o)}}}function tl(){console.error("Last ten effects were: ",Hn.slice(-10).map(t=>t.fn)),Hn=[]}function Yu(){try{Ms()}catch(t){if(W&&ut(t,"stack",{value:""}),mn!==null)if(W)try{zn(t,mn)}catch(e){throw tl(),e}else zn(t,mn);else throw W&&tl(),t}}function Cr(){var t=Gi;try{var e=0;for(Gi=!0;Fn.length>0;){e++>1e3&&Yu();var i=Fn,n=i.length;Fn=[];for(var o=0;o<n;o++){var a=Wu(i[o]);Bu(a)}ln.clear()}}finally{Wi=!1,Gi=t,mn=null,W&&(Hn=[])}}function Bu(t){var e=t.length;if(e!==0)for(var i=0;i<e;i++){var n=t[i];(n.f&24576)===0&&Qi(n)&&(un(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Nr(n):n.fn=null))}}function On(t){Wi||(Wi=!0,queueMicrotask(Cr));for(var e=mn=t;e.parent!==null;){e=e.parent;var i=e.f;if((i&96)!==0){if((i&1024)===0)return;e.f^=1024}}Fn.push(e)}function Wu(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:Qi(i)&&un(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 Qn(t){var e;for(t&&(Wi=!0,Cr(),Wi=!0,e=t());;){if(Js(),Fn.length===0)return Wi=!1,mn=null,W&&(Hn=[]),e;Wi=!0,Cr()}}function j(t){var e=t.f,i=(e&2)!==0;if(Io!==null&&Io.add(t),_e!==null&&!Ht){if(!(yt!=null&&yt[1].includes(t))||yt[0]!==_e){var n=_e.deps;t.rv<So&&(t.rv=So,$t===null&&n!==null&&n[Bt]===t?Bt++:$t===null?$t=[t]:(!wi||!$t.includes(t))&&$t.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,Qi(o)&&xr(o)),W&&vi&&!Ht&&Sn!==null&&_e!==null&&Sn.reaction===_e)if(t.trace)t.trace();else{var d=xi("TracedAt");if(d){var r=Sn.entries.get(t);r===void 0&&(r={traces:[]},Sn.entries.set(t,r));var u=r.traces[r.traces.length-1];d.stack!==(u==null?void 0:u.stack)&&r.traces.push(d)}}return Mi&&ln.has(t)?ln.get(t):t.v}function Ke(t){var e=Ht;try{return Ht=!0,t()}finally{Ht=e}}var Gu=-7169;function kt(t,e){t.f=t.f&Gu|e}var $r=new Set,No=new Set;function hn(t){for(var e=0;e<t.length;e++)$r.add(t[e]);for(var i of No)i(t)}function Yn(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 u=o.indexOf(r);if(u!==-1&&(e===document||e===window)){t.__root=e;return}var h=o.indexOf(e);if(h===-1)return;u<=h&&(d=u)}if(a=o[d]||t.target,a!==e){ut(t,"currentTarget",{configurable:!0,get(){return a||i}});var f=_e,l=ge;ht(null),Tt(null);try{for(var c,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(ii(y)){var[g,...C]=y;g.apply(a,[t,...C])}else y.call(a,t)}catch(N){c?v.push(N):c=N}if(t.cancelBubble||b===e||b===null)break;a=b}if(c){for(let N of v)queueMicrotask(()=>{throw N});throw c}}finally{t.__root=e,delete t.currentTarget,ht(f),Tt(l)}}}var Ku;function al(){Ku=void 0}function Bn(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Wt(t,e){var i=ge;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function Le(t,e){var i=(e&1)!==0,n=(e&2)!==0,o,a=!t.startsWith("<!>");return()=>{if(he)return Wt(xe,null),xe;o===void 0&&(o=Bn(a?t:"<!>"+t),i||(o=lt(o)));var d=n||Pn?document.importNode(o,!0):o.cloneNode(!0);if(i){var r=lt(d),u=d.lastChild;Wt(r,u)}else Wt(d,d);return d}}function Xu(t,e,i="svg"){var n=!t.startsWith("<!>"),o=(e&1)!==0,a=`<${i}>${n?t:"<!>"+t}</${i}>`,d;return()=>{if(he)return Wt(xe,null),xe;if(!d){var r=Bn(a),u=lt(r);if(o)for(d=document.createDocumentFragment();lt(u);)d.appendChild(lt(u));else d=lt(u)}var h=d.cloneNode(!0);if(o){var f=lt(h),l=h.lastChild;Wt(f,l)}else Wt(h,h);return h}}function yi(t,e){return Xu(t,e,"svg")}function Or(){if(he)return Wt(xe,null),xe;var t=document.createDocumentFragment(),e=document.createComment(""),i=si();return t.append(e,i),Wt(e,i),t}function me(t,e){if(he){ge.nodes_end=xe,St();return}t!==null&&t.before(e)}var ec=["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 Nv=[...ec,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var tc=["touchstart","touchmove"];function dl(t){return tc.includes(t)}var ic=["$state","$state.raw","$derived","$derived.by"],Dv=[...ic,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var Rr=!0;function et(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 Ri(t,e){return ul(t,e)}function Vr(t,e){var d;bo(),e.intro=(d=e.intro)!=null?d:!1;let i=e.target,n=he,o=xe;try{for(var a=lt(i);a&&(a.nodeType!==ni||a.data!==$i);)a=Ct(a);if(!a)throw Ai;Yt(!0),st(a),St();let r=ul(t,dt(Be({},e),{anchor:a}));if(xe===null||xe.nodeType!==ni||xe.data!==nn)throw Yi(),Ai;return Yt(!1),r}catch(r){if(r===Ai)return e.recover===!1&&ws(),bo(),Ao(i),Yt(!1),Ri(t,e);throw r}finally{Yt(n),st(o),al()}}var vn=new Map;function ul(t,{target:e,anchor:i,props:n={},events:o,context:a,intro:d=!0}){bo();var r=new Set,u=l=>{for(var c=0;c<l.length;c++){var v=l[c];if(!r.has(v)){r.add(v);var b=dl(v);e.addEventListener(v,Yn,{passive:b});var y=vn.get(v);y===void 0?(document.addEventListener(v,Yn,{passive:b}),vn.set(v,1)):vn.set(v,y+1)}}};u(ur($r)),No.add(u);var h=void 0,f=Bs(()=>{var l=i!=null?i:e.appendChild(si());return At(()=>{if(a){ct({});var c=Te;c.c=a}o&&(n.$$events=o),he&&Wt(l,null),Rr=d,h=t(l,n)||{},Rr=!0,he&&(ge.nodes_end=xe),a&&pt()}),()=>{var b;for(var c of r){e.removeEventListener(c,Yn);var v=vn.get(c);--v===0?(document.removeEventListener(c,Yn),vn.delete(c)):vn.set(c,v)}No.delete(u),l!==i&&((b=l.parentNode)==null||b.removeChild(l))}});return Pr.set(h,f),h}var Pr=new WeakMap;function Wn(t,e){let i=Pr.get(t);return i?(Pr.delete(t),i(e)):(W&&js(),Promise.resolve())}function Do(t,e,...i){var n=t,o=mt,a;bt(()=>{o!==(o=e())&&(a&&(_t(a),a=null),W&&o==null&&Ss(),a=At(()=>o(n,...i)))},65536),he&&(n=xe)}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;Ns(e)},set:n=>{i=n}})}};ac=t,t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}var ac;function gn(t){Te===null&&In("onMount"),hi&&Te.l!==null?rc(Te).m.push(t):Ni(()=>{let e=Ke(t);if(typeof e=="function")return e})}function rc(t){var i;var e=t.l;return(i=e.u)!=null?i:e.u={a:[],b:[],m:[]}}var ml=new Map;function hl(t,e){var i=ml.get(t);i||(i=new Set,ml.set(t,i)),i.add(e)}function Ye(t,e,[i,n]=[0,0]){he&&i===0&&St();var o=t,a=null,d=null,r=nt,u=i>0?65536:0,h=!1;let f=(c,v=!0)=>{h=!0,l(v,c)},l=(c,v)=>{if(r===(r=c))return;let b=!1;if(he&&n!==-1){if(i===0){let g=Er(o);g===$i?n=0:g===zi?n=1/0:(n=parseInt(g.substring(1)),n!==n&&(n=r?1/0:-1))}let y=n>i;!!r===y&&(o=Rn(),st(o),Yt(!1),b=!0,n=-1)}r?(a?fn(a):v&&(a=At(()=>v(o))),d&&di(d,()=>{d=null})):(d?fn(d):v&&(d=At(()=>v(o,[i+1,n]))),a&&di(a,()=>{a=null})),b&&Yt(!0)};bt(()=>{h=!1,e(f),h||l(null,null)},u),he&&(o=xe)}function jr(t,e,i){he&&St();var n=t,o=nt,a,d=gi()?bs:an;bt(()=>{d(o,o=e())&&(a&&di(a),a=At(()=>i(n)))}),he&&(n=xe)}var Fr;function vl(t){return Fr=t.target,new zr(t)}var Di,Xt,zr=class{constructor(e){ro(this,Di);ro(this,Xt);var a,d;var i=new Map,n=(r,u)=>{var h=Ii(u,!1,!1);return i.set(r,h),h};let o=new Proxy(dt(Be({},e.props||{}),{$$events:{}}),{get(r,u){var h;return j((h=i.get(u))!=null?h:n(u,Reflect.get(r,u)))},has(r,u){var h;return u===Mn?!0:(j((h=i.get(u))!=null?h:n(u,Reflect.get(r,u))),Reflect.has(r,u))},set(r,u,h){var f;return Se((f=i.get(u))!=null?f:n(u,h),h),Reflect.set(r,u,h)}});ao(this,Xt,(e.hydrate?Vr:Ri)(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)&&Qn(),ao(this,Di,o.$$events);for(let r of Object.keys(Dt(this,Xt)))r==="$set"||r==="$destroy"||r==="$on"||ut(this,r,{get(){return Dt(this,Xt)[r]},set(u){Dt(this,Xt)[r]=u},enumerable:!0});Dt(this,Xt).$set=r=>{Object.assign(o,r)},Dt(this,Xt).$destroy=()=>{Wn(Dt(this,Xt))}}$set(e){Dt(this,Xt).$set(e)}$on(e,i){Dt(this,Di)[e]=Dt(this,Di)[e]||[];let n=(...o)=>i.call(this,...o);return Dt(this,Di)[e].push(n),()=>{Dt(this,Di)[e]=Dt(this,Di)[e].filter(o=>o!==n)}}$destroy(){Dt(this,Xt).$destroy()}};Di=new WeakMap,Xt=new WeakMap;function ft(t,e){ui(()=>{var o,a,d;var i=t.getRootNode(),n=i.host?i:(d=(o=i.head)!=null?o:i.ownerDocument.head)!=null?d:(a=Fr)==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&&hl(e.hash,r)}})}var _l=[...`
40
- \r\f \v\uFEFF`];function bl(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||_l.includes(n[d-1]))&&(r===n.length||_l.includes(n[r]))?n=(d===0?"":n.substring(0,d))+n.substring(r+1):d=r}}return n===""?null:n}function yl(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 Hr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Al(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,u=[];n&&u.push(...Object.keys(n).map(Hr)),o&&u.push(...Object.keys(o).map(Hr));var h=0,f=-1;let y=t.length;for(var l=0;l<y;l++){var c=t[l];if(r?c==="/"&&t[l-1]==="*"&&(r=!1):a?a===c&&(a=!1):c==="/"&&t[l+1]==="*"?r=!0:c==='"'||c==="'"?a=c:c==="("?d++:c===")"&&d--,!r&&a===!1&&d===0){if(c===":"&&f===-1)f=l;else if(c===";"||l===y-1){if(f!==-1){var v=Hr(t.substring(h,f).trim());if(!u.includes(v)){c!==";"&&l++;var b=t.substring(h,l).trim();i+=" "+b+";"}}h=l+1,f=-1}}}}return n&&(i+=yl(n)),o&&(i+=yl(o,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function _n(t,e,i,n,o,a){var d=t.__className;if(he||d!==i||d===void 0){var r=bl(i,n,a);(!he||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 u in a){var h=!!a[u];(o==null||h!==!!o[u])&&t.classList.toggle(u,h)}return a}function Qr(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 Pi(t,e,i,n){var o=t.__style;if(he||o!==e){var a=Al(e,n);(!he||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else n&&(Array.isArray(n)?(Qr(t,i==null?void 0:i[0],n[0]),Qr(t,i==null?void 0:i[1],n[1],"important")):Qr(t,i,n));return n}var Ec=Symbol("class"),Tc=Symbol("style"),Mc=Symbol("is custom element"),wc=Symbol("is html");function Gt(t,e,i,n){var o=Sc(t);if(he&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||Nc(t,e,i!=null?i:"");return}o[e]!==(o[e]=i)&&(e==="loading"&&(t[ys]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Ic(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function Sc(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[Mc]:t.nodeName.includes("-"),[wc]:t.namespaceURI===fs}}var xl=new Map;function Ic(t){var e=xl.get(t.nodeName);if(e)return e;xl.set(t.nodeName,e=[]);for(var i,n=t,o=Element.prototype;o!==n;){i=pr(n);for(var a in i)i[a].set&&e.push(a);n=on(n)}return e}function Nc(t,e,i){var n;W&&(e==="srcset"&&Dc(t,i)||Yr((n=t.getAttribute(e))!=null?n:"",i)||Vs(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Yr(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function El(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Dc(t,e){var i=El(t.srcset),n=El(e);return n.length===i.length&&n.every(([o,a],d)=>a===i[d][1]&&(Yr(i[d][0],o)||Yr(o,i[d][0])))}function Tl(t,e){return t===e||(t==null?void 0:t[Rt])===e}function qi(t={},e,i,n){return Pt(()=>{var o,a;return It(()=>{o=a,a=(n==null?void 0:n())||[],Ke(()=>{t!==i(...a)&&(e(t,...a),o&&Tl(i(...o),t)&&e(null,...o))})}),()=>{ui(()=>{a&&Tl(i(...a),t)&&e(null,...a)})}}),t}function Gn(t,e,i){if(t==null)return e(void 0),i&&i(void 0),mt;let n=Ke(()=>t.subscribe(e,i));return n.unsubscribe?()=>n.unsubscribe():n}var yn=[];function ei(t,e){return{subscribe:H(t,e).subscribe}}function H(t,e=mt){let i=null,n=new Set;function o(r){if(an(t,r)&&(t=r,i)){let u=!yn.length;for(let h of n)h[1](),yn.push(h,t);if(u){for(let h=0;h<yn.length;h+=2)yn[h][0](yn[h+1]);yn.length=0}}}function a(r){o(r(t))}function d(r,u=mt){let h=[r,u];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 ot(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 ei(i,(d,r)=>{let u=!1,h=[],f=0,l=mt,c=()=>{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)=>Gn(b,g=>{h[y]=g,f&=~(1<<y),u&&c()},()=>{f|=1<<y}));return u=!0,c(),function(){rn(v),l(),u=!1}})}function ye(t){let e;return Gn(t,i=>e=i)(),e}var ko=!1,Br=Symbol();function ci(t,e,i){var a;let n=(a=i[e])!=null?a:i[e]={store:null,source:Ii(void 0),unsubscribe:mt};if(n.store!==t&&!(Br 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=Gn(t,d=>{o?n.source.v=d:Se(n.source,d)}),o=!1}return t&&Br in i?ye(t):j(n.source)}function Ki(){let t={};function e(){Lt(()=>{for(var i in t)t[i].unsubscribe();ut(t,Br,{enumerable:!1,value:!0})})}return[t,e]}function Wr(t){var e=ko;try{return ko=!1,[t(),ko]}finally{ko=e}}function Ml(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function be(t,e,i,n){var I,m;var o=(i&1)!==0,a=!hi||(i&2)!==0,d=(i&8)!==0,r=(i&16)!==0,u=!1,h;d?[h,u]=Wr(()=>t[e]):h=t[e];var f=Rt in t||Mn in t,l=d&&((m=(I=Ot(t,e))==null?void 0:I.set)!=null?m:f&&e in t&&(U=>t[e]=U))||void 0,c=n,v=!0,b=!1,y=()=>(b=!0,v&&(v=!1,r?c=Ke(n):c=n),c);h===void 0&&n!==void 0&&(l&&a&&Is(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?Ei:mo)(()=>t[e]);C.f|=131072,g=()=>{var U=j(C);return U!==void 0&&(c=void 0),U===void 0?c: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||u)&&l(x?g():U),U):g()}}var N=!1,w=!1,A=Ii(h),M=Ei(()=>{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=sn),function(U,x){if(Io!==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,Se(A,P),b&&c!==void 0&&(c=P),Ml(M))return U;Ke(()=>j(M))}return U}return Ml(M)?M.v:j(M)}}var jc;typeof HTMLElement=="function"&&(jc=class extends HTMLElement{constructor(e,i,n){super();Zt(this,"$$ctor");Zt(this,"$$s");Zt(this,"$$c");Zt(this,"$$cn",!1);Zt(this,"$$d",{});Zt(this,"$$r",!1);Zt(this,"$$p_d",{});Zt(this,"$$l",{});Zt(this,"$$l_u",new Map);Zt(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))}}connectedCallback(){return Ut(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return d=>{let r=document.createElement("slot");a!=="default"&&(r.name=a),me(d,r)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let n={},o=Uc(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]=Gr(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=vl({component:this.$$ctor,target:this.shadowRoot||this,props:dt(Be({},this.$$d),{$$slots:n,$$host:this})}),this.$$me=Mo(()=>{It(()=>{var a;this.$$r=!0;for(let d of cr(this.$$c)){if(!((a=this.$$p_d[d])!=null&&a.reflect))continue;this.$$d[d]=this.$$c[d];let r=Gr(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]=Gr(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 cr(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function Gr(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 Uc(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var wl="5";var Sl,Il,Nl;typeof window!="undefined"&&((Nl=(Il=(Sl=window.__svelte)!=null?Sl:window.__svelte={}).v)!=null?Nl:Il.v=new Set).add(wl);import{areValidLiveRecordSources as Up}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{safeStorage as zp}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Fp}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as zc,fillWithDefault as Fc,VideoQuality as Dl}from"@vkontakte/videoplayer-shared/es2015";var Hc={debugLog:!1,devNullLog:!1,defaultLanguage:zc.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:Dl.Q_480P,highQualityLimit:Dl.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"},Ll=t=>Fc(t,Hc),kl=t=>kn("ui-config",t),bn=()=>Ln("ui-config");var qn="vk_player_debug_panel_opened";var Cl="videoplayer",$l="videoplayer";import{assertNonNullable as Qc,VERSION as Yc}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as Bc}from"@vkontakte/videoplayer-core/es2015";import{VERSION as Wc}from"@vkontakte/videoplayer-statistics/es2015";var Ol="prod",Co="1.0.4-dev.04f0bb5f.0";var Rl=(t,e,i)=>{let n=document.createElement("a");n.href=t,n.download=`${e}.${i}`,n.style.display="none",n.click()};var Pl=Symbol("storeContext"),Vl=t=>{kn(Pl,t),Ol==="dev"&&(window.app={store:t})},Vi=()=>{let t=Ln(Pl);return Qc(t,"Store context is empty!"),t},Ve=(t,e)=>Oo(t,t.getValue(),e),Oo=(t,e,i)=>ei(e,n=>{let o=t.subscribe(a=>{n(a),i==null||i(a)});return()=>o.unsubscribe()}),jl=(t,e,i,n,o=["meta config not provided"])=>{var m,U,x,P,k,K,re,V,G;let a=t.info,{width:d,height:r}=ye(i.ui.playerSize),u=(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=`${Co} (core: ${Bc}, stat: ${Wc}, shared: ${Yc})`,c=ye(i.state.errorLog$),v=c.length?`
40
+ \r\f \v\uFEFF`];function bl(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||_l.includes(n[d-1]))&&(r===n.length||_l.includes(n[r]))?n=(d===0?"":n.substring(0,d))+n.substring(r+1):d=r}}return n===""?null:n}function yl(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 Hr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Al(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,u=[];n&&u.push(...Object.keys(n).map(Hr)),o&&u.push(...Object.keys(o).map(Hr));var h=0,f=-1;let y=t.length;for(var l=0;l<y;l++){var c=t[l];if(r?c==="/"&&t[l-1]==="*"&&(r=!1):a?a===c&&(a=!1):c==="/"&&t[l+1]==="*"?r=!0:c==='"'||c==="'"?a=c:c==="("?d++:c===")"&&d--,!r&&a===!1&&d===0){if(c===":"&&f===-1)f=l;else if(c===";"||l===y-1){if(f!==-1){var v=Hr(t.substring(h,f).trim());if(!u.includes(v)){c!==";"&&l++;var b=t.substring(h,l).trim();i+=" "+b+";"}}h=l+1,f=-1}}}}return n&&(i+=yl(n)),o&&(i+=yl(o,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function _n(t,e,i,n,o,a){var d=t.__className;if(he||d!==i||d===void 0){var r=bl(i,n,a);(!he||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 u in a){var h=!!a[u];(o==null||h!==!!o[u])&&t.classList.toggle(u,h)}return a}function Qr(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 Pi(t,e,i,n){var o=t.__style;if(he||o!==e){var a=Al(e,n);(!he||a!==t.getAttribute("style"))&&(a==null?t.removeAttribute("style"):t.style.cssText=a),t.__style=e}else n&&(Array.isArray(n)?(Qr(t,i==null?void 0:i[0],n[0]),Qr(t,i==null?void 0:i[1],n[1],"important")):Qr(t,i,n));return n}var Ec=Symbol("class"),Tc=Symbol("style"),Mc=Symbol("is custom element"),wc=Symbol("is html");function Gt(t,e,i,n){var o=Sc(t);if(he&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")){n||Nc(t,e,i!=null?i:"");return}o[e]!==(o[e]=i)&&(e==="loading"&&(t[ys]=i),i==null?t.removeAttribute(e):typeof i!="string"&&Ic(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function Sc(t){var e;return(e=t.__attributes)!=null?e:t.__attributes={[Mc]:t.nodeName.includes("-"),[wc]:t.namespaceURI===fs}}var xl=new Map;function Ic(t){var e=xl.get(t.nodeName);if(e)return e;xl.set(t.nodeName,e=[]);for(var i,n=t,o=Element.prototype;o!==n;){i=pr(n);for(var a in i)i[a].set&&e.push(a);n=on(n)}return e}function Nc(t,e,i){var n;W&&(e==="srcset"&&Dc(t,i)||Yr((n=t.getAttribute(e))!=null?n:"",i)||Vs(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(i)))}function Yr(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function El(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function Dc(t,e){var i=El(t.srcset),n=El(e);return n.length===i.length&&n.every(([o,a],d)=>a===i[d][1]&&(Yr(i[d][0],o)||Yr(o,i[d][0])))}function Tl(t,e){return t===e||(t==null?void 0:t[Rt])===e}function qi(t={},e,i,n){return Pt(()=>{var o,a;return It(()=>{o=a,a=(n==null?void 0:n())||[],Ke(()=>{t!==i(...a)&&(e(t,...a),o&&Tl(i(...o),t)&&e(null,...o))})}),()=>{ui(()=>{a&&Tl(i(...a),t)&&e(null,...a)})}}),t}function Gn(t,e,i){if(t==null)return e(void 0),i&&i(void 0),mt;let n=Ke(()=>t.subscribe(e,i));return n.unsubscribe?()=>n.unsubscribe():n}var yn=[];function ei(t,e){return{subscribe:H(t,e).subscribe}}function H(t,e=mt){let i=null,n=new Set;function o(r){if(an(t,r)&&(t=r,i)){let u=!yn.length;for(let h of n)h[1](),yn.push(h,t);if(u){for(let h=0;h<yn.length;h+=2)yn[h][0](yn[h+1]);yn.length=0}}}function a(r){o(r(t))}function d(r,u=mt){let h=[r,u];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 ot(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 ei(i,(d,r)=>{let u=!1,h=[],f=0,l=mt,c=()=>{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)=>Gn(b,g=>{h[y]=g,f&=~(1<<y),u&&c()},()=>{f|=1<<y}));return u=!0,c(),function(){rn(v),l(),u=!1}})}function ye(t){let e;return Gn(t,i=>e=i)(),e}var ko=!1,Br=Symbol();function ci(t,e,i){var a;let n=(a=i[e])!=null?a:i[e]={store:null,source:Ii(void 0),unsubscribe:mt};if(n.store!==t&&!(Br 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=Gn(t,d=>{o?n.source.v=d:Se(n.source,d)}),o=!1}return t&&Br in i?ye(t):j(n.source)}function Ki(){let t={};function e(){Lt(()=>{for(var i in t)t[i].unsubscribe();ut(t,Br,{enumerable:!1,value:!0})})}return[t,e]}function Wr(t){var e=ko;try{return ko=!1,[t(),ko]}finally{ko=e}}function Ml(t){var e,i;return(i=(e=t.ctx)==null?void 0:e.d)!=null?i:!1}function be(t,e,i,n){var I,m;var o=(i&1)!==0,a=!hi||(i&2)!==0,d=(i&8)!==0,r=(i&16)!==0,u=!1,h;d?[h,u]=Wr(()=>t[e]):h=t[e];var f=Rt in t||Mn in t,l=d&&((m=(I=Ot(t,e))==null?void 0:I.set)!=null?m:f&&e in t&&(U=>t[e]=U))||void 0,c=n,v=!0,b=!1,y=()=>(b=!0,v&&(v=!1,r?c=Ke(n):c=n),c);h===void 0&&n!==void 0&&(l&&a&&Is(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?Ei:mo)(()=>t[e]);C.f|=131072,g=()=>{var U=j(C);return U!==void 0&&(c=void 0),U===void 0?c: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||u)&&l(x?g():U),U):g()}}var N=!1,w=!1,A=Ii(h),M=Ei(()=>{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=sn),function(U,x){if(Io!==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,Se(A,P),b&&c!==void 0&&(c=P),Ml(M))return U;Ke(()=>j(M))}return U}return Ml(M)?M.v:j(M)}}var jc;typeof HTMLElement=="function"&&(jc=class extends HTMLElement{constructor(e,i,n){super();Zt(this,"$$ctor");Zt(this,"$$s");Zt(this,"$$c");Zt(this,"$$cn",!1);Zt(this,"$$d",{});Zt(this,"$$r",!1);Zt(this,"$$p_d",{});Zt(this,"$$l",{});Zt(this,"$$l_u",new Map);Zt(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))}}connectedCallback(){return Ut(this,null,function*(){if(this.$$cn=!0,!this.$$c){let i=function(a){return d=>{let r=document.createElement("slot");a!=="default"&&(r.name=a),me(d,r)}};var e=i;if(yield Promise.resolve(),!this.$$cn||this.$$c)return;let n={},o=Uc(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]=Gr(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=vl({component:this.$$ctor,target:this.shadowRoot||this,props:dt(Be({},this.$$d),{$$slots:n,$$host:this})}),this.$$me=Mo(()=>{It(()=>{var a;this.$$r=!0;for(let d of cr(this.$$c)){if(!((a=this.$$p_d[d])!=null&&a.reflect))continue;this.$$d[d]=this.$$c[d];let r=Gr(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]=Gr(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 cr(this.$$p_d).find(i=>this.$$p_d[i].attribute===e||!this.$$p_d[i].attribute&&i.toLowerCase()===e)||e}});function Gr(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 Uc(t){let e={};return t.childNodes.forEach(i=>{e[i.slot||"default"]=!0}),e}var wl="5";var Sl,Il,Nl;typeof window!="undefined"&&((Nl=(Il=(Sl=window.__svelte)!=null?Sl:window.__svelte={}).v)!=null?Nl:Il.v=new Set).add(wl);import{areValidLiveRecordSources as Up}from"@vkontakte/videoplayer-core/es2015";import"@vkontakte/videoplayer-core/es2015";import{safeStorage as zp}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as Fp}from"@vkontakte/videoplayer-statistics/es2015";import{InterfaceLanguage as zc,fillWithDefault as Fc,VideoQuality as Dl}from"@vkontakte/videoplayer-shared/es2015";var Hc={debugLog:!1,devNullLog:!1,defaultLanguage:zc.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:Dl.Q_480P,highQualityLimit:Dl.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"},Ll=t=>Fc(t,Hc),kl=t=>kn("ui-config",t),bn=()=>Ln("ui-config");var qn="vk_player_debug_panel_opened";var Cl="videoplayer",$l="videoplayer";import{assertNonNullable as Qc,VERSION as Yc}from"@vkontakte/videoplayer-shared/es2015";import{VERSION as Bc}from"@vkontakte/videoplayer-core/es2015";import{VERSION as Wc}from"@vkontakte/videoplayer-statistics/es2015";var Ol="prod",Co="1.0.4-dev.ffe03d52.0";var Rl=(t,e,i)=>{let n=document.createElement("a");n.href=t,n.download=`${e}.${i}`,n.style.display="none",n.click()};var Pl=Symbol("storeContext"),Vl=t=>{kn(Pl,t),Ol==="dev"&&(window.app={store:t})},Vi=()=>{let t=Ln(Pl);return Qc(t,"Store context is empty!"),t},Ve=(t,e)=>Oo(t,t.getValue(),e),Oo=(t,e,i)=>ei(e,n=>{let o=t.subscribe(a=>{n(a),i==null||i(a)});return()=>o.unsubscribe()}),jl=(t,e,i,n,o=["meta config not provided"])=>{var m,U,x,P,k,K,re,V,G;let a=t.info,{width:d,height:r}=ye(i.ui.playerSize),u=(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=`${Co} (core: ${Bc}, stat: ${Wc}, shared: ${Yc})`,c=ye(i.state.errorLog$),v=c.length?`
41
41
  `+c.map((F,Z)=>{var Y;let Ae=`${Z}) Type: ${F.id}
42
42
  `,X=`Message: ${F.message} (${F.thrown})
43
43
  `,le=`Trace: ${(Y=F.thrown)==null?void 0:Y.stack}
@@ -47,6 +47,6 @@ ${o}
47
47
  качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
48
48
  попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},ed=rp;var ap={auto_quality_invariant:"Auto",auto_quality:"Auto ({actual})",auto_quality_option:"Auto",other_quality:"Other",high_quality:"High quality",high_quality_description:"Uses more data",auto_quality_limit:"Auto",traffic_saving_quality:"Data saving",traffic_saving_quality_description:"Videos load faster but at lower quality",quality_applience:"You can {action} the default quality",quality_applience_action:"change",default_quality_for_any_video:"Quality for all videos",menu_quality:"Quality",menu_playback_rate:"Playback rate",menu_traffic_saving:"Data saving",menu_report:"Report a problem",menu_pip:"Picture in picture",menu_pip_close:"Expand video",menu_copy_video_link:"Copy video link",menu_copy_video_link_with_timestamp:"Copy link with timestamp",menu_video_rotate:"Rotate",menu_video_loop_on:"Enable loop",menu_video_loop_off:"Disable loop",menu_chromecast:"Chromecast stream",menu_copy_debug:"Copy debug info",menu_save_debug:"Save debug info",menu_debug_overlay:"Tech stats",menu_copy_embed_code:"Copy embed code",menu_audio_languages:"Audio track",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Audio track {index}",pip_dummy_title:"Video plays in picture-in-picture mode",submenu_quality:"Quality",submenu_playback_rate:"Playback rate",submenu_traffic_saving:"Data saving",submenu_settings:"Settings",submenu_audio_languages:"Audio track",playing_ads:"Ads {timeleft}",skip_ads_after:"Skip ads",skip_ads_now:"Skip {time}s",visit_advertiser:"Visit site",aria_timeline:"Time scale slider",aria_timeline_value:"{position} out of {duration}",doubletap_seek_step:"{seconds} seconds",playback_rate_1:"Normal",playback_rate:"{multiplier}x",video360:"spherical video",subtitles_caption:"Subtitles",subtitles_auto:"{language} (Auto-generated)",subtitles_off:"Off",subtitles_auto_caption:"Auto subtitles",subtitles_turn_on:"Turn on subtitles",subtitles_turn_off:"Turn off subtitles",traffic_saving_off:"Off",traffic_saving_on:"On",traffic_saving_helper_text:"When turned on the video quality will be reduced to save data",tooltip_button_disabled:"Button disabled",tooltip_previous:"Previous video",tooltip_restart:"Watch again",tooltip_play:"Play",tooltip_pause:"Pause",tooltip_next:"Next video",tooltip_interactive_go_back:"Back to previous chapter",tooltip_interactive_go_back_disabled:"Interactive history unavailable",tooltip_interactive_go_back_disabled_first:"You're watching the first chapter",tooltip_interactive_go_back_disabled_limit:"Go-back limit exceeded",tooltip_chapter_without_interactive:"This chapter has no interactive segment",tooltip_interactive_of_chapter_completed:"Chapter's interactive segments already watched",tooltip_interactive_seek:"Go to interactive",tooltip_interactive_graph_off:"Show interactive graph",tooltip_interactive_graph_on:"Hide interactive graph",tooltip_live:"Go to the live edge",tooltip_episodes:"Episodes",tooltip_volume:"Volume off",tooltip_volume_muted:"Turn volume on",tooltip_sound_unavailable:"Sound unavailable",tooltip_subtitles_off:"Turn subtitles on",tooltip_subtitles_on:"Turn subtitles off",tooltip_settings_off:"Open settings",tooltip_settings_on:"Close settings",tooltip_fullscreen_off:"Enter fullscreen mode",tooltip_fullscreen_on:"Exit fullscreen mode",tooltip_chromecast_off:"Turn Chromecast on",tooltip_chromecast_on:"Turn Chromecast off",tooltip_episode_finished:"You have already viewed interactive episode",tooltip_episode_unfinished:"Interactive episode not finished",tooltip_disabled_when_interactive:"Interactive video in progress",tooltip_disabled_when_graph_on:"Button is disabled when graph is opened",tooltip_interactive_interaction_time_indicator:"Press the interactive element",tooltip_vk_logo:"Open in VK Video",tooltip_vk_video_logo:"Go to VK Video",tooltip_autoplay_off:"Turn autoplay on",tooltip_autoplay_on:"Turn autoplay off",tooltip_context_menu_open:"Open context menu",tooltip_context_menu_close:"Close context menu",download_video_caption:"Download video",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Keyboard shortcuts",hotkey_map_modal_close_btn_text:"Close",hotkey_map_group_title_common:"Common",hotkey_map_group_title_playback:"Playback",hotkey_map_group_title_subtitles:"Subtitles",hotkey_map_group_title_episodes:"Episodes",hotkey_map_item_mute_description:"Toggle mute",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Increase volume",hotkey_map_item_volume_up_value:"Arrow up",hotkey_map_item_volume_down_description:"Decrease volume",hotkey_map_item_volume_down_value:"Arrow down",hotkey_map_item_pip_description:"Toggle miniplayer",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Toggle full screen",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Hide or show context menu",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Hide or show list of hotkeys",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Toggle play/pause",hotkey_map_item_play_toggle_value:"Space (or k)",hotkey_map_item_seek_backward_description:"Rewind 10 seconds",hotkey_map_item_seek_backward_value:"Arrow left (or j)",hotkey_map_item_seek_forward_description:"Forward 10 seconds",hotkey_map_item_seek_forward_value:"Arrow right (or l)",hotkey_map_item_fast_seek_backward_description:"Fast rewind",hotkey_map_item_fast_seek_backward_value:"Shift + Arrow left",hotkey_map_item_fast_seek_forward_description:"Fast forward",hotkey_map_item_fast_seek_forward_value:"Shift + Arrow right",hotkey_map_item_rate_down_description:"Decrease playback rate",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Increase playback rate",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Previous frame (while paused)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Next frame (while paused)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Seek to specific point in the video (7 advances to 70% of duration)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Toggle captions ON/OFF",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Seek to previous episode",hotkey_map_item_prev_episode_pc_value:"Ctrl + Arrow left",hotkey_map_item_prev_episode_mac_value:"Option + Arrow left",hotkey_map_item_next_episode_description:"Seek to next episode",hotkey_map_item_next_episode_pc_value:"Ctrl + Arrow right",hotkey_map_item_next_episode_mac_value:"Option + Arrow right",hotkey_map_item_next_video_description:"Next video",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Previous video",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"d",waiting_live_hour_value:"h",waiting_live_minute_value:"min",waiting_live_second_value:"sec",waiting_live_colon:":",waiting_live_upcoming_title:"The broadcast hasn't started yet",waiting_live_timer_title:"Before the start of the broadcast left",waiting_live_recover_title:"The broadcast has been paused - it will resume when the author returns",waiting_record_title:"The broadcast completed - recording will appear later",aria_label_video_player:"Video player",aria_label_spherical_control:"Spherical video control. Use the arrow keys to pan the video.",aria_label_debug_panel:"Technical information area, take a screenshot for technical support",aria_label_new_tab_alert:"Opens in a new tab.",aria_label_menu_quality:"Quality: {actual}",aria_label_menu_audio_languages:"Audio language: {actual}",aria_label_menu_rate:"Rate: {actual}",aria_label_menu_subtitle:"Subtitles: {actual}",aria_label_menu_download:"Download video",aria_label_menu_debug_overlay:"Display of technical information",aria_label_menu_rotate:"Rotate video 90 degrees",aria_label_menu_loop:"Toggle loop",aria_label_submenu_back:"Return to settings menu",aria_label_submenu_traffic_saving:"Data saving mode",aria_label_settings:"Settings",aria_label_context_menu:"Context menu",aria_label_autoplay:"Autoplay",end_screen_next_video:"Next video",end_screen_recommended_video:"Recommended video",slow_video_notification_button:"Select Auto quality",slow_video_notification_force_description:`The video is loading too slowly,
49
49
  so the quality was changed to Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
50
- Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},td=ap;var Li=new Map;Li.set(nd.EN,td);Li.set(nd.RU,ed);var od=new Map,oa=({language:t,pack:e,fallback:i})=>{if(Li.has(t)){let n=Li.get(t);Li.set(t,Be(Be({},n),e))}else Li.set(t,e);od.set(t,i)},ra=t=>Li.has(t),aa=(t,e,i,n)=>{var d;let o=Li.get(t),a=o==null?void 0:o[e];if(id(a)){let r=(d=od.get(t))!=null?d:n,u=r?Li.get(r):void 0;a=u==null?void 0:u[e]}return id(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(r,u)=>{var h;return(h=i[u])!=null?h:""}):a},Uo=(t,e)=>{let{interfaceLanguage$:i}=Vi(),n=ye(i),o=bn();return aa(n,t,e,o.defaultLanguage)};var sp=(t,e)=>{t.stopPropagation(),rd.remove(qn),e.set(!1)},lp=Le('<div class="s-6"><div class="s-6">Video id</div> <span> </span></div>'),dp=Le('<div class="s-6"><div class="s-6">VSID</div> <span> </span></div>'),up=Le('<div class="s-6"><div class="s-6">Provider</div> <span> </span></div>'),cp=Le('<div class="s-6"><div class="s-6">Streams</div> <span> </span></div>'),pp=Le('<div class="s-6"><div class="s-6">Viewport</div> <span> </span></div>'),fp=Le('<div class="s-6"><div class="s-6">Video size</div> <span> </span></div>'),mp=Le('<div class="s-6"><div class="s-6">CDN host</div> <span> </span></div>'),hp=Le('<div class="s-6"><div class="s-6">Volume</div> <span> </span></div>'),vp=Le('<div class="s-6"><div class="s-6">Position</div> <span> </span></div>'),gp=Le('<div class="s-6"><div class="s-6">Buffer</div> <span> </span></div>'),_p=Le('<div class="s-6"><div class="s-6">Nbuffer</div> <span> </span></div>'),yp=Le('<div class="s-6"><div class="s-6">Live latency</div> <span> </span></div>'),bp=Le('<div class="s-6"><div class="s-6">Segment</div> <span> </span></div>'),Ap=Le('<div class="s-6"><div class="s-6">Network</div> <!> <span> </span></div>'),xp=Le('<div class="s-6"><div class="s-6">V bitrate</div> <!> <span> </span></div>'),Ep=Le('<div class="container s-6" role="region"><button class="close s-6" title="закрыть">[x]</button> <div class="content s-6"><div class="s-6"><div class="s-6">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-6"><div class="s-6">Dropped</div> <span> </span></div> <!> <!> <div class="s-6"><div class="s-6">FPS</div> <!> <span> </span></div></div></div>'),Tp={hash:"s-6",code:".container.s-6{background:rgba(28,28,28,.8);border-radius:4px;font-size:10px;left:20px;min-width:160px;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container.s-6,button.close.s-6{color:#fff;position:absolute}button.close.s-6{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-6{padding:5px}.content.s-6>div:where(.s-6)>div:where(.s-6){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function sa(t,e){ct(e,!0),ft(t,Tp);let i=Vi(),n=i.ui.debugPanelVisible,o=He(Mt(i.actions.internal.getDebugPanelData())),a=i.actions.internal.getVideoElement(),d=He(0),r=He(0),u=He(0),h=new An(60),f=new An(60),l=new An(60),c=He(Mt([])),v=He(Mt([])),b=He(Mt([])),y=Uo("aria_label_debug_panel");gn(()=>{rd.set(qn,"true"),a&&(Se(r,a.getVideoPlaybackQuality().droppedVideoFrames,!0),Se(d,a.getVideoPlaybackQuality().totalVideoFrames,!0));let E=window.setInterval(()=>{Se(o,i.actions.internal.getDebugPanelData(),!0)},500),z;return a&&(z=window.setInterval(()=>{if(a){Se(r,a.getVideoPlaybackQuality().droppedVideoFrames,!0);let J=a.getVideoPlaybackQuality().totalVideoFrames;Se(u,J-j(d)),Se(d,J,!0),h.push(j(u)),j(o).speed&&f.push(j(o).speed),j(o).bitrate&&l.push(j(o).bitrate),Se(c,h.getValuesFromBottom(),!0),Se(v,f.getValuesFromBottom(),!0),Se(b,l.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(E),z&&clearInterval(z)}});var g=Ep(),C=oe(g);C.__click=[sp,n];var D=fe(C,2),N=oe(D),w=fe(oe(N),2),A=oe(w,!0);ne(w),ne(N);var M=fe(N,2);{var I=E=>{var z=lp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).id)),me(E,z)};Ye(M,E=>{j(o).id&&E(I)})}var m=fe(M,2);{var U=E=>{var z=dp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).vsid)),me(E,z)};Ye(m,E=>{j(o).vsid&&E(U)})}var x=fe(m,2);{var P=E=>{var z=up(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).provider)),me(E,z)};Ye(x,E=>{j(o).provider&&E(P)})}var k=fe(x,2);{var K=E=>{var z=cp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(()=>{var _,Q;return et(ce,`Video: ${(_=j(o).videoCodec||"")!=null?_:""} ${j(o).hdr?"(HDR)":""}
50
+ Try switching the quality to Auto.`,double_forward_label:"2x",preview_track_notification_text:"pull up to open precise rewind",preview_track_close_tooltip:"dismiss precise rewind"},td=ap;var Li=new Map;Li.set(nd.EN,td);Li.set(nd.RU,ed);var od=new Map,oa=({language:t,pack:e,fallback:i})=>{if(Li.has(t)){let n=Li.get(t);Li.set(t,Be(Be({},n),e))}else Li.set(t,e);od.set(t,i)},ra=t=>Li.has(t),aa=(t,e,i,n)=>{var d;let o=Li.get(t),a=o==null?void 0:o[e];if(id(a)){let r=(d=od.get(t))!=null?d:n,u=r?Li.get(r):void 0;a=u==null?void 0:u[e]}return id(a)?e+Object.values(i!=null?i:{}).join(" "):i?a.replaceAll(/{(\w+?)}/g,(r,u)=>{var h;return(h=i[u])!=null?h:""}):a},Uo=(t,e)=>{let{interfaceLanguage$:i}=Vi(),n=ye(i),o=bn();return aa(n,t,e,o.defaultLanguage)};var sp=(t,e)=>{t.stopPropagation(),rd.remove(qn),e.set(!1)},lp=Le('<div class="s-7"><div class="s-7">Video id</div> <span> </span></div>'),dp=Le('<div class="s-7"><div class="s-7">VSID</div> <span> </span></div>'),up=Le('<div class="s-7"><div class="s-7">Provider</div> <span> </span></div>'),cp=Le('<div class="s-7"><div class="s-7">Streams</div> <span> </span></div>'),pp=Le('<div class="s-7"><div class="s-7">Viewport</div> <span> </span></div>'),fp=Le('<div class="s-7"><div class="s-7">Video size</div> <span> </span></div>'),mp=Le('<div class="s-7"><div class="s-7">CDN host</div> <span> </span></div>'),hp=Le('<div class="s-7"><div class="s-7">Volume</div> <span> </span></div>'),vp=Le('<div class="s-7"><div class="s-7">Position</div> <span> </span></div>'),gp=Le('<div class="s-7"><div class="s-7">Buffer</div> <span> </span></div>'),_p=Le('<div class="s-7"><div class="s-7">Nbuffer</div> <span> </span></div>'),yp=Le('<div class="s-7"><div class="s-7">Live latency</div> <span> </span></div>'),bp=Le('<div class="s-7"><div class="s-7">Segment</div> <span> </span></div>'),Ap=Le('<div class="s-7"><div class="s-7">Network</div> <!> <span> </span></div>'),xp=Le('<div class="s-7"><div class="s-7">V bitrate</div> <!> <span> </span></div>'),Ep=Le('<div class="container s-7" role="region"><button class="close s-7" title="закрыть">[x]</button> <div class="content s-7"><div class="s-7"><div class="s-7">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-7"><div class="s-7">Dropped</div> <span> </span></div> <!> <!> <div class="s-7"><div class="s-7">FPS</div> <!> <span> </span></div></div></div>'),Tp={hash:"s-7",code:".container.s-7{background:rgba(28,28,28,.8);border-radius:4px;font-size:10px;left:20px;min-width:160px;text-align:left;top:45px;user-select:text;z-index:var(--debug-panel-z-index)}.container.s-7,button.close.s-7{color:#fff;position:absolute}button.close.s-7{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-7{padding:5px}.content.s-7>div:where(.s-7)>div:where(.s-7){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function sa(t,e){ct(e,!0),ft(t,Tp);let i=Vi(),n=i.ui.debugPanelVisible,o=He(Mt(i.actions.internal.getDebugPanelData())),a=i.actions.internal.getVideoElement(),d=He(0),r=He(0),u=He(0),h=new An(60),f=new An(60),l=new An(60),c=He(Mt([])),v=He(Mt([])),b=He(Mt([])),y=Uo("aria_label_debug_panel");gn(()=>{rd.set(qn,"true"),a&&(Se(r,a.getVideoPlaybackQuality().droppedVideoFrames,!0),Se(d,a.getVideoPlaybackQuality().totalVideoFrames,!0));let E=window.setInterval(()=>{Se(o,i.actions.internal.getDebugPanelData(),!0)},500),z;return a&&(z=window.setInterval(()=>{if(a){Se(r,a.getVideoPlaybackQuality().droppedVideoFrames,!0);let J=a.getVideoPlaybackQuality().totalVideoFrames;Se(u,J-j(d)),Se(d,J,!0),h.push(j(u)),j(o).speed&&f.push(j(o).speed),j(o).bitrate&&l.push(j(o).bitrate),Se(c,h.getValuesFromBottom(),!0),Se(v,f.getValuesFromBottom(),!0),Se(b,l.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(E),z&&clearInterval(z)}});var g=Ep(),C=oe(g);C.__click=[sp,n];var D=fe(C,2),N=oe(D),w=fe(oe(N),2),A=oe(w,!0);ne(w),ne(N);var M=fe(N,2);{var I=E=>{var z=lp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).id)),me(E,z)};Ye(M,E=>{j(o).id&&E(I)})}var m=fe(M,2);{var U=E=>{var z=dp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).vsid)),me(E,z)};Ye(m,E=>{j(o).vsid&&E(U)})}var x=fe(m,2);{var P=E=>{var z=up(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).provider)),me(E,z)};Ye(x,E=>{j(o).provider&&E(P)})}var k=fe(x,2);{var K=E=>{var z=cp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(()=>{var _,Q;return et(ce,`Video: ${(_=j(o).videoCodec||"")!=null?_:""} ${j(o).hdr?"(HDR)":""}
51
51
  &
52
- Audio: ${(Q=j(o).audioCodec||"")!=null?Q:""} ${j(o).audioLanguage?`(${j(o).audioLanguage})`:""}`)}),me(E,z)};Ye(k,E=>{(j(o).videoCodec||j(o).audioCodec)&&E(K)})}var re=fe(k,2);{var V=E=>{var z=pp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).viewport)),me(E,z)};Ye(re,E=>{j(o).viewport&&E(V)})}var G=fe(re,2);{var F=E=>{var z=fp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).videoSize)),me(E,z)};Ye(G,E=>{j(o).videoSize&&E(F)})}var Z=fe(G,2);{var Ae=E=>{var z=mp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).cdn)),me(E,z)};Ye(Z,E=>{j(o).cdn&&E(Ae)})}var X=fe(Z,2);{var le=E=>{var z=hp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(()=>{var _;return et(ce,`${(_=j(o).volume)!=null?_:""} %`)}),me(E,z)};Ye(X,E=>{j(o).volume&&E(le)})}var Y=fe(X,2);{var ve=E=>{var z=vp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).position.toFixed(2)]),me(E,z)};Ye(Y,E=>{j(o).position&&E(ve)})}var B=fe(Y,2);{var je=E=>{var z=gp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).buffer.toFixed(2)]),me(E,z)};Ye(B,E=>{j(o).buffer&&E(je)})}var Ie=fe(B,2);{var de=E=>{var z=_p(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).nativeBuffer.toFixed(2)]),me(E,z)};Ye(Ie,E=>{j(o).nativeBuffer&&E(de)})}var O=fe(Ie,2);{var ue=E=>{var z=yp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).liveLatency.toFixed(2)]),me(E,z)};Ye(O,E=>{j(o).liveLatency&&E(ue)})}var se=fe(O,2);{var pe=E=>{var z=bp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(_=>et(ce,_),[()=>[{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(" & ")]),me(E,z)};Ye(se,E=>{(j(o).currentVideoSegmentLength||j(o).currentAudioSegmentLength)&&E(pe)})}var Ee=fe(se,2),Me=fe(oe(Ee),2),Ue=oe(Me);ne(Me),ne(Ee);var T=fe(Ee,2);{var S=E=>{var z=Ap(),J=fe(oe(z),2);Kn(J,{get values(){return j(v)}});var ce=fe(J,2),_=oe(ce);ne(ce),ne(z),Fe(Q=>et(_,`${Q!=null?Q:""} Kbps`),[()=>j(o).speed.toFixed(2)]),me(E,z)};Ye(T,E=>{j(o).speed&&E(S)})}var L=fe(T,2);{var R=E=>{var z=xp(),J=fe(oe(z),2);Kn(J,{get values(){return j(b)}});var ce=fe(J,2),_=oe(ce);ne(ce),ne(z),Fe(Q=>et(_,`${Q!=null?Q:""} Kbps`),[()=>j(o).bitrate.toFixed(2)]),me(E,z)};Ye(L,E=>{j(o).bitrate&&E(R)})}var ee=fe(L,2),ae=fe(oe(ee),2);Kn(ae,{get values(){return j(c)}});var we=fe(ae,2),ke=oe(we,!0);ne(we),ne(ee),ne(D),ne(g),Fe(()=>{var E,z;Gt(g,"aria-label",y),et(A,j(o).version),et(Ue,`${(E=j(r))!=null?E:""} / ${(z=j(d))!=null?z:""} frames`),et(ke,j(u))}),me(t,g),pt()}hn(["click"]);Cs();var ad="var(--btn-color, #fff)";var Mp=yi('<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),wp=yi('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Zi(t,e){var f;ct(e,!0);let i=be(e,"width",19,()=>"24"),n=be(e,"height",19,()=>"24"),o=be(e,"fill",3,ad),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${n()}`;var d=wp(),r=oe(d);{var u=l=>{var c=Mp(),v=pn(c),b=oe(v);Do(b,()=>e.children),ne(v),cn(),me(l,c)},h=l=>{var c=Or(),v=pn(c);Do(v,()=>e.children),me(l,c)};Ye(r,l=>{e.shadow?l(u):l(h,!1)})}ne(d),Fe(()=>{Gt(d,"aria-label",e.ariaLabel),Gt(d,"aria-hidden",!e.ariaLabel),Gt(d,"width",i()),Gt(d,"height",n()),Gt(d,"viewBox",a),Gt(d,"fill",o()),Pi(d,e.style),Gt(d,"data-testid",e.testId)}),me(t,d),pt()}var Sp=yi('<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 la(t){Zi(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var n=Sp();me(e,n)},$$slots:{default:!0}})}var Ip=Le('<div class="container s-3"><!></div>'),Np={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 Zn(t){ft(t,Np);var e=Ip(),i=oe(e);la(i,{}),ne(e),me(t,e)}var ld=t=>`width:${t}px;height:${t}px;`;var Dp=yi('<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 da(t,e){ct(e,!0);let i=Ti(()=>ld(e.size));Zi(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=Dp();me(n,a)},$$slots:{default:!0}}),pt()}var Lp=Le('<div class="playButton s-5" tabindex="0" role="button"><div class="playButtonBackground s-5"></div> <!></div>'),kp=Le('<div data-testid="unstarted-thumb"><!></div>'),Cp={hash:"s-5",code:".container.s-5{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-5{opacity:0;visibility:hidden}.container.bgCover.s-5{background-size:cover}.playButton.s-5{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-5,.playButtonBackground.s-5{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-5{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-5:hover .playButtonBackground:where(.s-5){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-5 svg{position:relative}"};function ua(t,e){ct(e,!0),ft(t,Cp);let i=be(e,"iconVisible",3,!0),n=bn(),o=Uo("tooltip_play"),a=f=>{var l,c;f.stopPropagation(),(l=e.startVideo)==null||l.call(e),(c=e.onClick)==null||c.call(e,f)};var d=kp();let r;d.__click=a,d.__contextmenu=function(...f){var l;(l=e.onContextMenu)==null||l.apply(this,f)};var u=oe(d);{var h=f=>{var l=Lp(),c=fe(oe(l),2);da(c,{get size(){return"48"}}),ne(l),Fe(()=>Gt(l,"aria-label",o)),me(f,l)};Ye(u,f=>{i()&&f(h)})}return ne(d),Fe(f=>{r=_n(d,1,"container s-5",null,r,f),Pi(d,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),me(t,d),pt({handleClick:a})}hn(["click","contextmenu"]);var $p=Le('<div><div class="video-container s-7"></div></div>'),Op={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 pa(t,e){ct(e,!0),ft(t,Op);let[i,n]=Ki(),o=()=>ci(d,"$playerPhase",i),a=be(e,"videoContainer",15),{playerPhase:d}=Vi();var r=$p();let u;var h=oe(r);qi(h,f=>a(f),()=>a()),ne(r),Fe(f=>u=_n(r,1,"video-wrapper s-7",null,u,f),[()=>({hidden:o()!=="video"})]),me(t,r),pt(),n()}var Rp=Le("<!> <!> <!> <!>",1),Pp=Le('<div class="player-wrapper s-4"><!></div>'),Vp={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 fa(t,e){ct(e,!0),ft(t,Vp);let[i,n]=Ki(),o=()=>ci(f,"$language$",i),a=()=>ci(l,"$playerPhase",i),d=()=>ci(c,"$crashed",i),r=()=>ci(v,"$debugPanelVisible",i),u=be(e,"videoContainer",15),h=Vi(),f=h.interfaceLanguage$,l=h.playerPhase,c=h.state.crashed$,v=h.ui.debugPanelVisible,b=He(void 0);var y=Pp(),g=oe(y);jr(g,o,C=>{var D=Rp(),N=pn(D);pa(N,{get videoContainer(){return u()},set videoContainer(x){u(x)}});var w=fe(N,2);let A=Ti(()=>a()!=="thumb"||d()&&e.autoplay);ua(w,{get hidden(){return j(A)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var M=fe(w,2);{var I=x=>{Zn(x,{})};Ye(M,x=>{d()&&x(I)})}var m=fe(M,2);{var U=x=>{sa(x,{})};Ye(m,x=>{r()&&x(U)})}me(C,D)}),ne(y),qi(y,C=>Se(b,C),()=>j(b)),me(t,y),pt(),n()}var Hp=Le('<div class="vk-vp-tv-root s-1"><!></div>'),Qp={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,.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 ma(t,e){ct(e,!0),ft(t,Qp);let[i,n]=Ki(),o=()=>ci(X,"$isLive$",i),a=()=>ci(ee,"$availableSubtitlesList$",i),d=be(e,"sources",7),r=be(e,"store",7),u=be(e,"videoConfig",7),h=be(e,"uiConfig",7),f=be(e,"title",7),l=be(e,"thumbUrl",7),c=be(e,"subtitles",7),v=be(e,"subtitlesForcedLanguage",7),b=be(e,"live",7),y=be(e,"preload",7),g=be(e,"autoplay",7),C=be(e,"volume",7,void 0),D=be(e,"muted",7,void 0),N=be(e,"fromTime",7),w=be(e,"canRewindLive",7),A=be(e,"showAds",7),M=be(e,"adsSlotId",7,void 0),I=be(e,"adsParams",7,void 0),m=be(e,"adsAutoplayParam",7,void 0),U=be(e,"duration",7,void 0),x=be(e,"supportLink",7),P=be(e,"shadowRootContainer",7),k=be(e,"outerContainerRef",7),K=be(e,"fullScreenTarget",7,void 0),re=be(e,"failoverHosts",7,void 0),V=be(e,"saveRate",7),G=be(e,"volumeMultiplier",7),F=be(e,"showEndScreen",7,!0);kl(h());let Z=bn(),Ae=r().ui.debugPanelVisible,X=r().state.isLive$,le=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}),Vl(r()),Ni(()=>{var E,z;(z=(E=u().callbacks)==null?void 0:E.onDomReady)==null||z.call(E)});let ve=(E=!1)=>{Se(Y,!0),E?r().actions.external.firstStart(A()):r().actions.internal.firstStart(A())},B=()=>{Xl(r().videoId),ia()&&r().actions.internal.setTrafficSavingEnabled(!0);let z=ta(r().videoId);z&&r().actions.internal.setQuality(z)};function je(E){var Q,te,Re;let z=d()||E;z&&r().initVideo({container:j(le),sources:z,failoverHosts:re(),subtitles:c(),subtitlesForcedLanguage:v(),volumeMultiplier:G()});let J=zp.get(qn)==="true";Ae.set(J),N()>0&&r().actions.external.seekTime(N());let ce=(te=(Q=C())!=null?Q:Ro())!=null?te:Z.volumeDefault,_=(Re=D())!=null?Re:Gl();if(r().actions.external.setVolume(ce),r().actions.external.setMuted(_),r().getAdmanWrapper().setInitialVolume(_?0:ce),B(),Z.features.saveRate&&V()){let Ne=Jl();Ne&&!o()&&r().actions.internal.setPlaybackRate(Ne)}r().ui.isAutoplay.set(g()),g()&&ve(),y()&&Z.features.preload&&r().actions.internal.preload()}gn(()=>{var z,J,ce,_;let E=()=>r().destroy();return((z=b())==null?void 0:z.status)==="upcoming"?(r().actions.internal.setLiveWaitingStart(!0),E):((J=b())==null?void 0:J.status)==="waiting"?(r().actions.internal.setLiveWaitingRecover(!0),E):(((ce=b())==null?void 0:ce.status)==="finished"||((_=b())==null?void 0:_.status)==="postlive")&&!(d()&&Up(d()))?(r().actions.internal.setLiveWaitingRecord(!0),E):(je(),E)});function Ie(){j(Y)?r().actions.external.play():ve(!0)}function de(){r().actions.external.pause()}function O(E){r().actions.external.setMuted(E)}function ue(){r().actions.external.toggleSubtitle()}function se(E,z){r().actions.external.changeSubtitle(E,z)}function pe(E){r().actions.external.changeAudioStream(E)}function Ee(E){E>=0&&E<=1&&r().actions.external.setVolume(E)}function Me(E){r().actions.internal.seekTime(E,Fp.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 ee=r().state.availableSubtitlesList$;if(Z.features.initSubtitles){let E=!1;Ni(()=>{var z;if(!E&&a().length){E=!0;let J;if(Z.features.userVideoPrefs&&r().videoId){let _=Vo(Z.userSalt,String(r().videoId));_!=null&&_.subtitleTrackId&&(J=a().find(Q=>Q.value===_.subtitleTrackId))}let ce=(z=v())!=null?z:na();ce&&(J=a().find(_=>_.language===ce)),r().actions.internal.setSubtitle(J)}})}var ae=Hp(),we=oe(ae);fa(we,{get thumbUrl(){return l()},firstStart:ve,get autoplay(){return g()},get videoContainer(){return j(le)},set videoContainer(E){Se(le,E,!0)}}),ne(ae),me(t,ae);var ke=pt({initVideo:je,play:Ie,pause:de,setMuted:O,toggleSubtitle:ue,changeSubtitle:se,changeAudioStream:pe,setVolume:Ee,seekTime:Me,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 u()},set videoConfig(E){u(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 c()},set subtitles(E){c(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 K()},set fullScreenTarget(E){K(E)},get failoverHosts(){return re()},set failoverHosts(E){re(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(),ke}var Yp=yi('<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 ha(t,e){let i=be(e,"isWhite",3,!1),n=Ti(()=>i()?"#fff":"#909499");Zi(t,{width:"57",height:"60",get fill(){return j(n)},testId:"stub-icon",children:(o,a)=>{var d=Yp();cn(9),me(o,d)},$$slots:{default:!0}})}var Bp=Le('<div class="title s-0"> </div>'),Wp=Le('<div class="playerStub s-0"><!> <!></div>'),Gp={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 va(t,e){ft(t,Gp);var i=Wp(),n=oe(i);{var o=r=>{var u=Bp(),h=oe(u,!0);ne(u),Fe(()=>et(h,e.title)),me(r,u)};Ye(n,r=>{e.title&&r(o)})}var a=fe(n,2);{var d=r=>{let u=Ti(()=>!!e.thumbUrl);ha(r,{get isWhite(){return j(u)}})};Ye(a,r=>{(!e.title||!e.thumbUrl)&&r(d)})}ne(i),Fe(()=>Pi(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),me(t,i)}var qp=Le('<div class="playerError s-2"><!></div>'),Kp={hash:"s-2",code:".playerError.s-2{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}"};function ga(t){ft(t,Kp);var e=qp(),i=oe(e);Zn(i,{}),ne(e),me(t,e)}import{ChromecastState as lf,PlaybackState as Jn,Player as df,PredefinedQualityLimits as ji,VideoFormat as Bo,clientChecker as _d}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as qt,getHighestQuality as uf,InterfaceLanguage as cf,isInvariantQuality as pf,isNonNullable as ff,loadVKLangPack as mf,Logger as hf,map as yd,merge as vf,Observable as Wo,Subject as Xn,Subscription as gf,TracerFactory as _f,VideoQuality as yf,devNull as bf,now as Af}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as eo}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Jp,devNull as $e,isNonNullable as Xp,now as Oe}from"@vkontakte/videoplayer-shared/es2015";import{addScript as ef,Subject as Nt,clearVideoElement as tf}from"@vkontakte/videoplayer-shared/es2015";var nf="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",zo=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 Nt,loadStarted$:new Nt,loadEnded$:new Nt,loadError$:new Nt,ready$:new Nt,slotRequested$:new Nt,started$:new Nt,timeRemained$:new Nt,paused$:new Nt,resumed$:new Nt,ended$:new Nt,empty$:new Nt,skipped$:new Nt,clicked$:new Nt,closed$:new Nt,error$:new Nt};this.loadAdman=e=>($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[Oe()]}),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?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[Oe()]}),n())};ef(nf,e,this.loadTimeout).then(()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[Oe()]}),window.AdmanHTML?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[Oe()]}),window.admanAsyncInit=a,o=window.setTimeout(a,this.initTimeout))}).catch(d=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(d)],numbers:[Oe()]}),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?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[Oe()]}),n())},d=()=>{r=!0,n()},r=!1,u=window.setTimeout(()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[Oe()]}),d()},this.loadTimeout);e.addEventListener("abort",d),e.aborted&&($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[Oe()]}),d()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>Ou(dd(),1)).then(()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(r)],numbers:[Oe()]}),!r&&(window.AdmanHTML?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[Oe()]}),window.admanAsyncInit=a,o=window.setTimeout(a,this.initTimeout)))},d).finally(()=>{clearTimeout(o),clearTimeout(u),e.removeEventListener("abort",d)})});this.onAdsReady=()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[Oe()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var n;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[Oe(),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?ye(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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[Oe()]}),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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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")=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[Oe()]}),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"),$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[Oe()]}),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")}initAdman(e){return Ut(this,null,function*(){var N,w;if($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[Oe(),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:u={},paramsOverride:h={},duration:f,externalApi:l}=e;this.externalApi=l;let c,v=this.playerState&&ye(this.playerState.vsid);v&&(this.isVsidOriginal?c=v:c=parseInt(v,36));let{isEmbed:b,immediateOrigin:y}=Jp(),g=(N=b?y:window.location.href)!=null?N:window.location.href,C=Be(dt(Be(dt(Be({},u),{dl:encodeURIComponent(g),autoplay:o?1:0,player_width:i,player_height:n}),c?{request_id:c}:{}),{duration:f}),h);C=Object.fromEntries(Object.entries(C).filter(([A,M])=>Xp(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=yield 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){$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[Oe()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var n,o,a;if($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(n=this.currentAdSection)!=null?n:"","force: "+e],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),this.adsState){this.log({message:"toggle play"});let i=ye(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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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,u,h,f,l,c;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[Oe()]}),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),(u=this.adman)==null||u.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),(c=this.adman)==null||c.destroy(),this.videoElement&&tf(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return Ut(this,null,function*(){var n;try{return yield e(...i)}catch(o){return this.onAdError((n=o==null?void 0:o.message)!=null?n:"External call failed"),null}})}};var ud=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,cd=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},of=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},pd=()=>!!of();var fd=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 _a=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 u of r)if(!d.startTime&&!d.endTime){let h=new Fo,{startTime:f,endTime:l}=h.parse(u);d.startTime=f,d.endTime=l}else if(u.trim()!==""){let h=new ya,{texts:f}=h.parse(u);d.texts=[...d.texts,...f]}(d.startTime||d.endTime)&&d.texts.length>0&&n.push(d)}return n}},Fo=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),u=+`0.${o}`;return a+d+r+u}},ya=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,u=[];for(;r<d.length;){let h=["<",">"].reduce((f,l)=>{let c=d.indexOf(l,r);return f===-1||f>c?c:f},-1);if(h===-1){u.push(d.substring(r));break}u.push(d.substring(r,h)),r=h+1}return u}}),a=new Fo;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}},md=_a;import{isNonNullable as ba}from"@vkontakte/videoplayer-shared/es2015";var Ji,Ze,Aa=0,xa=!1,hd="",vd=(t,e=0,i=0)=>t<e&&t<i,Ho=(t,e=0,i=0)=>t>=e&&t<=i,rf=(t,e=0,i=0)=>t>e&&t>i,gd=(t,e,i,n=!1)=>{var r;let o=(r=i.find(({id:u})=>u===e.value))==null?void 0:r.subtitles;if(n)return o==null?void 0:o.find(({startTime:h,endTime:f})=>Ho(t,h,f));let a=t>=Aa,d=t<Aa;if(Aa=t,d&&(xa=!1),ba(Ji)&&Ho(t,Ji.startTime,Ji.endTime)&&hd===e.value)return Ji;if(!ba(Ze)&&(o!=null&&o.length)&&!xa){Ze=o.find(({startTime:h,endTime:f})=>Ho(t,h,f)||a&&vd(t,h,f)),Ji=void 0,!ba(Ze)&&o[o.length-1].endTime<t&&(xa=!0);return}else{if(Ho(t,Ze==null?void 0:Ze.startTime,Ze==null?void 0:Ze.endTime))return Ji=Ze,Ze=void 0,hd=e.value,Ji;(a&&rf(t,Ze==null?void 0:Ze.startTime,Ze==null?void 0:Ze.endTime)||d&&vd(t,Ze==null?void 0:Ze.startTime,Ze==null?void 0:Ze.endTime))&&(Ze=void 0)}};var Qo={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"},af={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=Qo[t])!=null?e:Qo[af[t]])!=null?i:void 0};import{Subscription as sf}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Yo=class{constructor(e,i,n,o=new sf){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 pi="off";var bd=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isLiveCatchUpMode:n,statAuthToken:o,isAudioDisabled:a,canDownload:d,callbacks:r,webApi:u,previewThumbsData:h,uiConfig:f,coreConfig:l,player:c,stopPlayer:v,looped:b=!1,statistics:y,saveRate:g,internalsExposure:C,playerId:D,metaConfig:N})=>{var ss;let w=dt(Be({},l),{isAudioDisabled:a,live:dt(Be({},(ss=l.live)!=null?ss:{}),{isLiveCatchUpMode:!!n})}),A=f,M=_f.createRootTracer(!1),I=M.createComponentTracer("Store"),m=c||new df(w,M,{playerId:D,onDevNullLog:r==null?void 0:r.onDevNullLog});C==null||C.expose({corePlayer:m});let U=new hf,x=new zo(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=u==null?void 0:u.focusManager,k=U.createComponentLog("Store"),K,re,V={},G=new $o,F=new gf,Z="",Ae=H(!1),X=y&&y.oneStat?Ve(y.oneStat.vsid$):ei(void 0),le=H(pd()),Y=H(!1),ve=()=>ud(document,_d.device.isIOS),B=H(!1),je=H([]),Ie=vf(m.events.fatalError$,m.events.managedError$).subscribe(s=>je.update(p=>[...p,s])),de=ei(!1,s=>{let p=m.events.fatalError$.subscribe(()=>s(!0));return()=>p.unsubscribe()}),O=s=>Ut(null,null,function*(){var q;let p=Object.values(cf).includes(s);if(A.downloadVKLanguages&&(p&&A.updateBuiltinLanguages||!ra(s))){let ie;try{ie=yield mf(s,Cl,$l)}catch(De){(q=y==null?void 0:y.oneStat)==null||q.logError({errorType:"VKLangPack",fatal:!1})}ie&&(oa({language:s,pack:ie,fallback:A.defaultLanguage}),ue.set(s),se.update(De=>De+1))}ra(s)&&ue.set(s)}),ue=H(t),se=H(0),pe=H(e);O(t);let Ee=(s,p)=>{let $=ye(ue);return aa($,s,p,A.defaultLanguage)},Me=H("thumb");Me.subscribe(s=>{s==="ads"&&m.info.playbackState$.getValue()&&S()});let Ue=(()=>{let s=ot([de,Me],([p,$])=>p?"crashed":$);return dt(Be({},s),{is:p=>ye(s)===p})})(),T=H(),S=()=>{T.set({muted:m.info.muted$.getValue()})},L=H({width:0,height:0}),R=null,ee=m.info.isBuffering$,ae=ei(ee.getValue(),s=>{let p=ee.subscribe($=>{$&&R===null?R=window.setTimeout(()=>{s(ee.getValue()),R=null},A.loaderDelay):s($)});return()=>{p.unsubscribe(),R&&clearTimeout(R)}});I.log("create store"),k({message:"create store"});let we=s=>{k({message:`init video, config: ${JSON.stringify(s)}`}),bf.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Af()]}),m.initVideo(s),I.log("init video"),s.subtitles&&m.setExternalTextTracks(s.subtitles),K=s,Z=s.subtitlesForcedLanguage||""},ke=new Xn,E=new Xn,z=new Xn,J={actionRewind$:ke,actionSeek$:E,inFullscreen$:new Wo(s=>le.subscribe(p=>s.next(p))),actionSetSubtitle$:z},ce=new Xn,_=new Xn,Q={actionSeek$:E,actionSubtitlesSwitched$:ce,actionQuality$:_,playerSize$:new Wo(s=>L.subscribe(p=>s.next(p))),inFullscreen$:new Wo(s=>le.subscribe(p=>s.next(p))),isLoaderVisible$:new Wo(s=>ae.subscribe(p=>s.next(p)))};if(y){let{oneStat:s,thinOneStat:p,mediascopePixel:$,statSubscription:q}=y;s&&(q.add(s.attachToUi(J)),q.add(s.attachToAds(x.events)),s.authorize(o).catch(ie=>{k({message:`onestat auth error ${String(ie)}`})}),$&&$.attachTo(m)),p&&(q.add(p.attachTo(m,x.events)),q.add(p.attachToUi(Q)),q.add(p.attachToAds(x.events)),p.updateContext({isMobile:ye(Ae)}),p.authorize(o))}let te=()=>{if(_d.device.isIOS&&re)try{cd(re)}catch(s){k({message:`exitIosSafariFullscreen failed: ${s}`})}};F.add(m.experimental.element$.subscribe(s=>{s&&(re=s,s.classList.add("player-media"))})).add(m.events.ended$.subscribe(()=>{var s;te(),(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(()=>Ut(null,null,function*(){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=ei(m.info.position$.getValue(),s=>{let p,$,q=()=>{let ie=m.info.playbackState$.getValue(),De=m.info.isLive$.getValue(),Pe=m.info.duration$.getValue(),Ce=m.info.position$.getValue();if(ie&&[Jn.PLAYING,Jn.PAUSED].includes(ie)){let vt=De?Ce-Pe:m.getExactTime();vt!==$&&s(vt),$=vt}p=requestAnimationFrame(q)};return q(),()=>cancelAnimationFrame(p)}),Ne=Ve(m.info.playbackState$),tt=Ve(m.info.isBuffering$),qe=ot([Ne,tt],([s,p])=>p?"buffering":s),at=Ve(m.info.currentBuffer$),Xe=Ve(m.info.isEnded$),fi=Ve(m.info.isLive$),Kt=A.features.playbackRate?Ve(m.info.canChangePlaybackSpeed$):ei(!1),mi=Ve(m.info.liveBufferTime$),bi=Ve(m.info.volume$),Ui=Ve(m.info.muted$),ki=Oo(m.info.predefinedQualityLimitType$.pipe(yd(s=>s===ji.TRAFFIC_SAVING)),m.info.predefinedQualityLimitType$.getValue()===ji.TRAFFIC_SAVING),Qe=Oo(m.info.predefinedQualityLimitType$.pipe(yd(s=>s===ji.HIGH_QUALITY)),m.info.predefinedQualityLimitType$.getValue()===ji.HIGH_QUALITY),ze=Ve(m.info.autoQualityLimitingAvailable$),it=Ve(m.info.availableQualities$),Zo=Ve(m.info.availableQualitiesFps$),Xi=Ve(m.info.chromecastState$),xt=Ve(m.info.chromecastDeviceName$),Je=Ve(m.info.currentFormat$),en=Ve(m.info.throughputEstimation$),tn=Ve(m.info.videoBitrate$),Td=Ve(m.info.intrinsicVideoSize$),Sa=Ve(m.info.duration$),Md=Ve(m.info.isAudioAvailable$),wd=()=>{R&&clearTimeout(R),R=null},io=ot([Sa,fi],([s,p])=>p?-s:s),Ia=ot([Ne],([s])=>s===Jn.PLAYING),Na=Ve(m.info.atLiveEdge$),Da=Ve(m.info.atLiveDurationEdge$),La=Ve(m.info.position$),Sd=ot([La,Sa],([s,p])=>isFinite(s)&&isFinite(p)&&!!p),Id=ot([Xi],([s])=>s===lf.CONNECTED),Nd=Ve(m.info.availableVideoStreams$),ka=A.features.audioLanguages?Ve(m.info.availableAudioStreams$):ei([]),Dd=Ve(m.info.currentVideoStream$),Ca=Ve(m.info.currentAudioStream$),Ld=s=>{s.language&&Kl(s.language),m.setVideoStream(s)},$a=s=>{m.setAudioStream(s)},Oa=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=Vo(A.userSalt,String(i));if(q!=null&&q.audioTrackId){let ie=s.find(De=>De.id===q.audioTrackId);p=ie!=null?ie:p}}let $=ql();return $&&(p!=null||(p=s.find(({language:q})=>$===q))),p!=null||(p=s.at(0)),p},kd=s=>{I.log("change audio stream",{id:s});let p=m.info.availableAudioStreams$.getValue().find($=>$.id===s);p&&$a(p)},Ra=!1;F.add(m.info.availableAudioStreams$.subscribe(s=>{if(!Ra&&s.length){let p=Oa(s);p&&(m.setAudioStream(p),Ra=!0)}})),ka.subscribe(s=>{var p;(p=r==null?void 0:r.onAvailableAudioStreamsChanged)==null||p.call(r,s.map(({label:$="",id:q="",language:ie=""})=>({label:$,language:ie,id:q})))}),Ca.subscribe(s=>{var p;return s&&((p=r==null?void 0:r.onAudioStreamChanged)==null?void 0:p.call(r,s.id))});let Pa=!1;F.add(m.info.availableVideoStreams$.subscribe(s=>{if(!Pa&&s.length){let p=Oa(s);p&&(m.setVideoStream(p),Pa=!0)}}));let no=H(void 0),Va=Ve(m.info.isAutoQualityEnabled$,s=>s&&no.set(void 0)),Cd=Ve(m.info.currentQuality$,()=>no.set(void 0)),ja=ot([no,Cd],([s,p])=>s!=null?s:p),Ua=ot(Je,s=>s!==Bo.MPEG),$d=ot([it,Zo,Va,ja,Ua],([s,p,$,q,ie])=>{let De=[];ie&&De.push({value:"auto",displayValue:Ee("auto_quality_option"),selected:$});let Pe=s.filter(Ce=>!pf(Ce));for(let Ce of Pe){let vt=p[Ce];De.push({value:Ce,displayValue:`${Ce}${vt?fd(vt):""}`,selected:$?!1:Ce===q})}return De}),Jo=Ve(m.info.currentPlaybackRate$),Xo=ot([Jo,Na,Da],([s,p,$])=>{let q=$?1:A.controls.playbackRateMin,ie=p?1:A.controls.playbackRateMax,De=A.controls.playbackRateStep,Pe=[];for(let Ce=q;Ce<=ie;Ce+=De)Pe.push({value:Ce,displayValue:Ce===1?Ee("playback_rate_1"):Ee("playback_rate",{multiplier:Ce.toString(10)}),selected:s===Ce});return Pe}),oo=()=>({displayValue:Ee("subtitles_off"),value:pi,language:""}),za=H(oo()),Ci=ot([za,se],([s],p)=>{s.value===pi?p(oo()):p(s)}),er=A.features.subtitles?Ve(m.info.availableTextTracks$):ei([]),Fa=Fl(),Od=ot([er,Ci],([s,p],$)=>{var De;let q=[],ie=s.find(({id:Pe})=>Pe===p.value);if(ie!=null&&ie.url){let[,Pe]=(De=Fa.find(ie.url))!=null?De:[];if(Pe){$(Pe);return}G.download(ie.url).then(Ce=>{if(!Ce||G.isDestroyed())return;let vt=new md,Tn=ie.language;if(Tn){let Tu=!!ie.isAuto,Mu=vt.parse(Ce,Tn);q.push({lang:Tn,subtitles:Mu,isAuto:Tu,id:ie.id})}Fa.add(ie.url,q),ye(Ci).value===p.value&&$(q)}).catch(()=>{var Ce;(Ce=y==null?void 0:y.oneStat)==null||Ce.logError({errorType:"Subtitles download",fatal:!1})})}$(q)}),Rd=ot([Jo,Ia,Ci],([s,p,$],q)=>{let Pe;if(m.info.isLive$.getValue()&&p&&$.value!==pi){let vt=()=>{let Tn=1e3/(3*s);Pe=setTimeout(vt,Tn),q(Date.now())};return vt(),()=>clearTimeout(Pe)}}),Ha=ot([er,Ci],([s,p])=>{if(!s.length)return[];let $=[];for(let{language:q,isAuto:ie,id:De}of s){let Pe=q&&Ea(q);q&&Pe&&$.push({displayValue:ie?Ee("subtitles_auto",{language:Pe}):Pe,value:De,selected:(p==null?void 0:p.value)===De,isAuto:ie,language:q})}return $.length?($.unshift(dt(Be({},oo()),{selected:(p==null?void 0:p.value)===pi})),$):[]}),xn={available:[],prev:[]},Pd=()=>{var p,$;let s=m.experimental.getCurrentTime$.getValue();return($=(p=s==null?void 0:s())!=null?p:re==null?void 0:re.currentTime)!=null?$:0},Vd=ot([Re,Ci,Od,Rd],([s,p,$,q])=>{var De;let ie=m.info.isLive$.getValue();if(ie&&xn.prev!==$){let Pe=$.find(({id:vt})=>vt===p.value),Ce=xn.prev.find(({id:vt})=>vt===p.value);if(Pe){let vt=dt(Be({},Pe),{subtitles:[...(De=Ce==null?void 0:Ce.subtitles)!=null?De:[],...Pe.subtitles]});xn.available=[vt],xn.prev=$}}if(p&&p.value!==pi){let Pe=ie?Pd():s,Ce=ie?xn.available:$;return gd(Pe,p,Ce,ie)}}),jd=ot([Vd],([s])=>s!=null&&s.texts?s.texts:[]);F.add(Ci.subscribe(s=>{var p,$;if(s.value===pi)(p=r==null?void 0:r.onSubtitleOff)==null||p.call(r);else{let q=Object.entries(Qo).find(([ie,De])=>De===s.displayValue);($=r==null?void 0:r.onSubtitleOn)==null||$.call(r,q?q[0]:"",s.value)}}));let Ud=H(!0),zd=ot([at,io,La,mi],([s,p,$,q])=>{var Ce;let ie=(Ce=s==null?void 0:s.end)!=null?Ce:0;if(!q)return ie/p;let Pe=-$+q-p;return(ie-Pe)/p}),Qa=Ve(m.info.availableSources$),Fd=ot([Qa],([s])=>Object.keys((s==null?void 0:s[Bo.MPEG])||{}).length>0),Hd=()=>{var $,q,ie;let s=Object.keys(((q=($=m.info.availableSources$)==null?void 0:$.getValue())==null?void 0:q[Bo.MPEG])||{}),p=uf(s)||yf.Q_144P;return(ie=K.sources[Bo.MPEG])==null?void 0:ie[p]},Qd=()=>{var p;let s=Hd();if(s)I.log("download video",{url:s}),zl(s,((p=K==null?void 0:K.meta)==null?void 0:p.title)||"video");else{let $="There is no URL for download video";I.log("download video",{message:$}),k({message:$})}},Yd=()=>{k({message:"toggle muted"});let s=m.info.muted$.getValue();m.info.volume$.getValue()===0&&!s?ir(tr()):En(!s)},Bd=()=>{We.ui.settingsMenu.visible$.set(!1),I.log("close settings menu")},Wd=(s,p=()=>Promise.resolve())=>Ut(null,null,function*(){We.ui.settingsMenu.visible$.set(!0),yield p(),I.log("open settings menu",{wasOpenedByKeyboard:s})}),tr=()=>{var p;let s=Math.max(A.volumeMinRestore,(p=Ro())!=null?p:0);return s===0?A.volumeDefault:s},ir=s=>{let p=s===0?tr():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)},En=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=tr();m.setVolume(q),x.setVolume(q)}},Ya=H(!1),Ba=s=>{I.log("set looped",{isLooped:s}),Ya.set(s),m.setLooped(s)};Ba(b);let Gd=()=>{m.prepare()},qd=()=>{qt(We);let s=ye(We.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 ie;k({message:"toggle play, call player.play"}),p.action="play",m.play(),(ie=r==null?void 0:r.onPlay)==null||ie.call(r)},q=()=>{var ie;k({message:"toggle play, call player.pause"}),p.action="pause",m.pause(),(ie=r==null?void 0:r.onPause)==null||ie.call(r)};m.info.isEnded$.getValue()?(k({message:"toggle play, video ended, seek to 0"}),ke.next(),E.next(eo.REWIND),m.seekTime(0),$()):m.info.playbackState$.getValue()!==Jn.PLAYING?$():q(),I.log("toggle play",p)},Wa=(s,{byUser:p=!1}={})=>{k({message:`set quality, quality: ${s}`}),I.log("set quality",{quality:s}),p&&_.next(s),m.setAutoQuality(s==="auto"),Po(),s!=="auto"&&(ea(i,s),no.set(s),m.setQuality(s))},Ga=s=>{k({message:`set trafficSavingEnabled, value: ${s}`}),I.log("set traffic saving enabled",{trafficSavingEnabled:s});let p=s?ji.TRAFFIC_SAVING:ji.UNKNOWN;m.setPredefinedQualityLimits(p)},qa=s=>{k({message:`set highQualityEnabled, value: ${s}`}),I.log("set high quality enabled",{highQualityEnabled:s}),Kd(s?ji.HIGH_QUALITY:ji.UNKNOWN)},Kd=s=>{m.setPredefinedQualityLimits(s)},nr=(s,p=!0)=>{I.log("set playback rate",{playbackRate:s}),m.setPlaybackRate(s),A.features.saveRate&&g&&!m.info.isLive$.getValue()&&p&&Zl(s)},Zd=()=>{let s=ye(Kt),p=ye(Xo),$=p.findIndex(({selected:ie})=>ie);if($===p.length-1||!s)return p[$];let q=p[$+1];return nr(q.value),q},Jd=()=>{let s=ye(Kt),p=ye(Xo),$=p.findIndex(({selected:ie})=>ie);if($===0||!s)return p[$];let q=p[$-1];return nr(q.value),q},or=(s=dt(Be({},oo()),{selected:!1}))=>{I.log("set subtitles",Be({},s)),s.value!==pi&&z.next(s.isAuto?s.value+"_auto":s.value),ce.next({enabled:s.value!==pi,lang:s.language,auto:!!s.isAuto}),za.set(s)},Ka=s=>{I.log("toggle subtitles");let p=ye(Ci);(p==null?void 0:p.value)===pi?Za(s):Ja()},Xd=(s,p)=>{I.log("change subtitle",{enabled:s}),s?Za(!0,p):Ja()},Za=(s,p)=>{I.log("subtitle on");let $=ye(Ha),q=ye(ue),ie=Z!=null?Z:q,De;p&&(De=$.find(Pe=>Pe.value===p)),De!=null||(De=$.filter(Pe=>Pe.value!==pi).find(Pe=>Pe.language===ie)),or(De!=null?De:$[1])},Ja=()=>{I.log("subtitle off"),or(void 0)};F.add(m.info.availableTextTracks$.subscribe(s=>{var $;function p(){let q=[];for(let{language:ie,isAuto:De,id:Pe}of s){let Ce=ie&&Ea(ie);ie&&Ce&&q.push({id:Pe,language:ie,title:De?Ee("subtitles_auto",{language:Ce}):Ce})}return q}($=r==null?void 0:r.onAvailableSubtitlesChanged)==null||$.call(r,p())}));let Xa=H(!0),es=s=>{Xa.set(s)},ts=(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 ie=m.info.duration$.getValue(),De=Math.min(0,ie+s);m.seekTime(De,$)}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,$)},is=(s,p,$=!1)=>{k({message:`seek to percent, percent: ${s}`}),I.log("seek to percent",{percent:s,action:p});let q=ye(io)*s;ts(q,p,$)},eu=s=>{k({message:`seek external, time: ${s}`}),I.log("seek external",{time:s}),E.next(eo.UNKNOWN),m.seekTime(m.info.isLive$.getValue()?-s:s)},tu=s=>{var q,ie;let p=(q=s.max)!=null?q:"none",$=(ie=s.min)!=null?ie:"none";k({message:`set auto quality limitation. Max: ${p}. Min: ${$}`}),I.log("set auto quality limits",{max:p,min:$}),m.setAutoQualityLimits(s)},iu=s=>{k({message:`set playback rate to: ${s}`}),I.log("set playback rate external",{playbackRate:s}),m.setPlaybackRate(s)},rr=H(void 0),ar=H(!1),nu=s=>{k({message:`start scrubbing, progress: ${s}`}),I.log("start scrubbing",{progress:s}),ar.set(!0),ns(s)},ns=s=>{rr.set(s)},ou=()=>{rr.set(void 0),ar.set(!1)},ru=(s,p=!1)=>{k({message:`complete scrubbing, progress: ${s}`}),I.log("complete scrubbing",{progress:s}),is(s,eo.SLIDER,p),ou()},au=ot([Re,io,rr],([s,p,$],q)=>{q(ff($)?$*p:s)}),sr=H(!1),su=()=>{sr.set(!0)},lu=()=>{sr.set(!1)},du=s=>{E.next(eo.LIVE),k({message:"live switch to low latency "+s}),I.log("live switch to low latency "+s),m.setLiveLowLatency(s)},uu=()=>{E.next(eo.LIVE),k({message:"switch to active live"}),I.log("switch to active live"),m.seekTime(0),m.info.playbackState$.getValue()!==Jn.PLAYING&&We.actions.internal.togglePlay()},cu=()=>{I.log("skip adman"),x.skip()},pu=(s=!0)=>{var q;qt(We),k({message:`switch from ads to video, callPlay: ${s}`}),I.log("switch from ads to video",{callPlay:s}),Me.set("video"),s&&m.play(),a&&En(!0);let p=(q=ye(T))==null?void 0:q.muted,$=!m.info.muted$.getValue();p!==void 0&&!$&&En(p),T.set(void 0)},fu=()=>{qt(We),k({message:"switch from video to ads"}),I.log("switch from video to ads"),We.actions.internal.pause(),te(),Me.set("ads")},mu=s=>{qt(We);let p=s?"LiveWaitingStart":"thumb";I.log("set live waiting start",{state:s,playerPhase:p}),Me.set(p)},hu=s=>{qt(We);let p=s?"LiveWaitingRecover":"thumb";I.log("set live waiting recover",{state:s,playerPhase:p}),Me.set(p)},vu=s=>{qt(We);let p=s?"LiveWaitingRecord":"thumb";I.log("set live waiting record",{state:s,playerPhase:p}),Me.set(p)},gu=()=>(qt(We),I.log("get debug text data"),jl(m,K,We,M.getTraceId(),N)),_u=()=>(qt(We),JSON.stringify(M.getFinishedSpans())),yu=()=>(qt(We),Ul(m,K,We)),bu=()=>re,os=s=>{var $;if(qt(We),m.info.isEnded$.getValue())return;let p=!s;if(ye(We.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()},rs=s=>{var $;qt(We);let p=!s;if(ye(We.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()},Au=s=>{qt(We);let p=!s;if(ye(We.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()},as=(s,p)=>{qt(We),k({message:`first start, show ads: ${s}, internalCall: ${!p}`}),I.log("first start",{showAds:s,external:p}),s?Me.set("ads"):(Me.set("video"),p?m.play():We.actions.internal.togglePlay())},xu=()=>(k({message:"getting preview thumbs data"}),I.log("get preview thumbs data",Be({},h)),h),Eu=()=>{I.log("destroy store"),F.unsubscribe(),m.destroy(),x.destroy(),y==null||y.destroy(),Ie.unsubscribe(),G.destroy()},We={interfaceLanguage$:ue,isCyrillicRelatedInterface$:pe,initVideo:we,videoId:i,playerPhase:Ue,vsid:X,state:{positionExact$:Re,positionWithScrubbing$:au,duration$:io,playbackState$:Ne,playbackStateRealistic$:qe,isPlaying$:Ia,isLoaderVisible:ae,bufferedProgress$:zd,isLive$:fi,canChangePlaybackSpeed$:Kt,isActiveLive$:Na,isOldestAvailableLive$:Da,isRewindableLive$:Sd,isEnded$:Xe,muted$:Ui,volume$:bi,trafficSavingEnabled$:ki,highQualityEnabled$:Qe,autoQualityLimitingAvailable$:ze,availableVideoStreams$:Nd,availableAudioStreams$:ka,videoStream$:Dd,audioStream$:Ca,currentQuality$:ja,isAutoQualityEnabled$:Va,availableQualities$:$d,currentPlaybackRate$:Jo,availablePlaybackRates$:Xo,currentSubtitle$:Ci,availableTextTracks$:er,availableSubtitlesList$:Ha,currentSubtitleCaptions$:jd,isAutoSubtitleCaptionVisible$:Ud,chromecastState$:Xi,chromecastDeviceName$:xt,chromecastConnected$:Id,currentFormat$:Je,throughputEstimation$:en,videoBitrate$:tn,videoSize$:Td,errorLog$:je,crashed$:de,isAudioAvailable$:Md,isAudioDisabled:!!a,canDownload:A.features.download&&!!d,availableSources$:Qa,hasMpegSources$:Fd,looped$:Ya,loadedMetadata$:B,isAutoQualityAvailable$:Ua},ui:{t:Ee,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:le,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:Ae,icon3DVideoVisible:H(!1),scrubbingInProgress:ar,volumeChangingInProgress:sr,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:Xa,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:Gd,firstStart:s=>as(s,!1),play:()=>rs(!1),pause:()=>os(!1),togglePlay:qd,toggleMuted:Yd,openSettingsMenu:Wd,closeSettingsMenu:Bd,setVolume:s=>ir(s),setMuted:s=>En(s),startVolumeChanging:su,stopVolumeChanging:lu,setVideoStream:Ld,setAudioStream:s=>$a(s),setQuality:(s,p)=>Wa(s,p),setTrafficSavingEnabled:s=>Ga(s),setHighQualityEnabled:s=>qa(s),setPlaybackRate:nr,incrementPlaybackRate:Zd,decrementPlaybackRate:Jd,setSubtitle:s=>or(s),toggleSubtitle:()=>Ka(!1),startScrubbing:nu,progressScrubbing:ns,completeScrubbing:ru,switchToActiveLive:uu,switchFromAdsToVideo:pu,switchFromVideoToAds:fu,skipAd:cu,setLiveWaitingStart:mu,setLiveWaitingRecover:hu,setLiveWaitingRecord:vu,getDebugTextData:gu,getTraceTextData:_u,getDebugPanelData:yu,getVideoElement:bu,seekTime:(s,p,$)=>ts(s,p,$),clearDelayedBufferingCheckTimeout:wd,seekToPercent:is,getPreviewThumbsData:xu,downloadVideo:Qd,addLanguage:oa,setLanguage:O,setLooped:Ba,checkFullscreenSupport:ve},external:{firstStart:s=>as(s,!0),play:()=>rs(!0),pause:()=>os(!0),stop:()=>Au(!0),seekTime:s=>eu(s),setPlaybackRate:s=>iu(s),setAutoQualityLimits:s=>tu(s),setMuted:s=>En(s),toggleSubtitle:()=>Ka(!0),changeSubtitle:Xd,setVolume:s=>ir(s),setLiveLowLatency:du,hideControls:()=>es(!1),showControls:()=>es(!0),setQuality:s=>Wa(s),setTrafficSavingEnabled:s=>Ga(s),setHighQualityEnabled:s=>qa(s),changeAudioStream:kd}},callbacks:r,setUiCallbacks:s=>{V=Be({},s)},getAdmanWrapper:()=>x,getLogger:()=>U,getPlayer:()=>m,destroy:Eu};return We};import{now as Sf,ValueSubject as If}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as Nf,InterfaceLanguage as Df,Observable as Lf,Subscription as kf,InternalsExposure as Cf,skip as $f,getPlayerId as Of}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Rf}from"@vkontakte/videoplayer-core/es2015";import{OneStat as Pf,ThinOneStat as Vf,MediascopePixel as jf}from"@vkontakte/videoplayer-statistics/es2015";function to(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}import{devNull as Ma}from"@vkontakte/videoplayer-shared/es2015";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)}};import{getWindow as xf}from"@vkontakte/videoplayer-shared/es2015";var Ta=xf().HTMLElement||class{constructor(){this.isConnected=!1}};var Ef=Object.defineProperty,Ad=Object.getOwnPropertySymbols,Tf=Object.prototype.hasOwnProperty,Mf=Object.prototype.propertyIsEnumerable,wa=(t,e,i)=>e in t?Ef(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,xd=(t,e)=>{for(var i in e||(e={}))Tf.call(e,i)&&wa(t,i,e[i]);if(Ad)for(var i of Ad(e))Mf.call(e,i)&&wa(t,i,e[i]);return t},Ge=(t,e,i)=>wa(t,typeof e!="symbol"?e+"":e,i),wf=(t,e,i)=>new Promise((n,o)=>{var a=u=>{try{r(i.next(u))}catch(h){o(h)}},d=u=>{try{r(i.throw(u))}catch(h){o(h)}},r=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,d);r((i=i.apply(t,e)).next())}),Uf={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Df.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},Ed=He(void 0),Ko=class extends Ta{constructor(){super(),Ge(this,"svelteStubComponent"),Ge(this,"svelteRootComponent"),Ge(this,"svelteErrorComponent"),Ge(this,"store"),Ge(this,"statistics"),Ge(this,"_shadowRoot"),Ge(this,"playerContainer"),Ge(this,"rootContainer"),Ge(this,"stateContainer"),Ge(this,"shadowRootContainer"),Ge(this,"playerId"),Ge(this,"uiConfig"),Ge(this,"coreConfig"),Ge(this,"statisticsConfig"),Ge(this,"metaConfig"),Ge(this,"currentPlayingVideoIndex",0),Ge(this,"videoConfig"),Ge(this,"subscription"),Ge(this,"focusManager"),Ge(this,"prevIsid"),Ge(this,"isInited",!1),Ge(this,"postponedInitParams",null),Ge(this,"internalsExposure",null),Ge(this,"fatalError$",new If(null)),Ge(this,"createOneStat",(e,i={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:o,statUserSalt:a,statTrackCode:d,statVKAppId:r,refreshStatAuthToken:u,autoplay:h,isTouch:f,refDomain:l,deviceId:c}=to(this.videoConfig,i),{unitedVideoId:v,isClip:b=!1}=e;if(this.uiConfig.features.statistics&&v)try{return new Pf({movieId:v,albumId:n,place:o,trackCode:d,vkAppId:r,autoplay:h!=null?h:!1,mobile:f,clip:b,refDomain:l,deviceId:c,isPreviewPlayerView:!1},{refreshAuthToken:u,userSalt:a,config:this.statisticsConfig})}catch(g){console.error(g)}}),this.subscription=new kf,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Ri(ga,{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=Ri(va,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}=to(this.videoConfig,i),{unitedVideoId:d}=e;if(this.uiConfig.features.thinStatistics&&d)return new Vf.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:u,muted:h,fromTime:f,canRewindLive:l,supportLink:c,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}=to(this.videoConfig,i),{sources:K,title:re,thumbUrl:V,unitedVideoId:G,duration:F,adsParams:Z={},previewThumbsData:Ae,subtitles:X,subtitlesForcedLanguage:le,live:Y,adsExternalApi:ve}=e;if(!K&&!Y){let se=new Error("empty sources and live");this.fatalError$.next(se),(o=m==null?void 0:m.onCrashed)==null||o.call(m,se.message);return}let B=xd(xd({},y),Z),je={focusManager:this.focusManager},Ie=this.createOneStat(e,i),de=this.createThinOneStat(e,i),O;k&&(O=new jf({pixels:k})),(Ie||de)&&(this.statistics=new Yo(Ie,de,O)),this.store=bd({player:n,interfaceLanguage:C,isCyrillicRelatedInterface:D,videoId:G,isLiveCatchUpMode:w,isAudioDisabled:N,statAuthToken:a,callbacks:m,webApi:je,previewThumbsData:Ae,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 ue=()=>{var se,pe,Ee,Me,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 Lf(L=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(R=>L.next(R)))}).pipe($f(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,ee,ae,we;if(L)(R=m==null?void 0:m.onMute)==null||R.call(m);else{let ke=(ae=((ee=this.store)==null?void 0:ee.state.volume$)&&ye(this.store.state.volume$))!=null?ae:0;(we=m==null?void 0:m.onUnmute)==null||we.call(m,ke)}})),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)})),Se(Ed,{sources:K,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:re,thumbUrl:V,subtitles:X,subtitlesForcedLanguage:le,live:Y,preload:d,autoplay:r,muted:h,volume:u,fromTime:f,canRewindLive:l,supportLink:c,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:ve,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let S={target:this.playerContainer,props:j(Ed)};this.svelteRootComponent=Ri(ma,S),this.isInited||(this.isInited=!0,(Ee=(pe=(se=this.videoConfig)==null?void 0:se.callbacks)==null?void 0:pe.onInited)==null||Ee.call(pe)),(Me=this.internalsExposure)==null||Me.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)?Ma.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ma.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Rf.isInited$.subscribe(se=>{se&&(console.log("UI TV SDK async start"),ue())}):ue()}initPlayer(e,i={}){var n,o,a,d,r,u,h,f,l,c,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=to(Uf,Nf(e,g=>g instanceof Ta?g:void 0)),this.playerId=Of(e.playerId),this.uiConfig=Ll((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&&((u=this.internalsExposure)!=null||(this.internalsExposure=new Cf("ui",this.playerId))),Ma.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:[Sf()]}),(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=(c=this.uiConfig.ads.slot)!=null?c: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)}setLanguage(e){return wf(this,null,function*(){var i;yield(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&&Wn(e)}};import{InterfaceLanguage as VN,VKNumericLanguage as jN,loadVKLangPack as UN}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as FN,VideoFormat as HN}from"@vkontakte/videoplayer-core/es2015";var $N=()=>{window.customElements.define("vk-video-player-tv",Ko)};export{VN as InterfaceLanguage,Co as VERSION,jN as VKNumericLanguage,HN as VideoFormat,FN as VideoQuality,UN as loadVKLangPack,$N as registerPlayerWebComponent};
52
+ Audio: ${(Q=j(o).audioCodec||"")!=null?Q:""} ${j(o).audioLanguage?`(${j(o).audioLanguage})`:""}`)}),me(E,z)};Ye(k,E=>{(j(o).videoCodec||j(o).audioCodec)&&E(K)})}var re=fe(k,2);{var V=E=>{var z=pp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).viewport)),me(E,z)};Ye(re,E=>{j(o).viewport&&E(V)})}var G=fe(re,2);{var F=E=>{var z=fp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).videoSize)),me(E,z)};Ye(G,E=>{j(o).videoSize&&E(F)})}var Z=fe(G,2);{var Ae=E=>{var z=mp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(()=>et(ce,j(o).cdn)),me(E,z)};Ye(Z,E=>{j(o).cdn&&E(Ae)})}var X=fe(Z,2);{var le=E=>{var z=hp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(()=>{var _;return et(ce,`${(_=j(o).volume)!=null?_:""} %`)}),me(E,z)};Ye(X,E=>{j(o).volume&&E(le)})}var Y=fe(X,2);{var ve=E=>{var z=vp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).position.toFixed(2)]),me(E,z)};Ye(Y,E=>{j(o).position&&E(ve)})}var B=fe(Y,2);{var je=E=>{var z=gp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).buffer.toFixed(2)]),me(E,z)};Ye(B,E=>{j(o).buffer&&E(je)})}var Ie=fe(B,2);{var de=E=>{var z=_p(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).nativeBuffer.toFixed(2)]),me(E,z)};Ye(Ie,E=>{j(o).nativeBuffer&&E(de)})}var O=fe(Ie,2);{var ue=E=>{var z=yp(),J=fe(oe(z),2),ce=oe(J);ne(J),ne(z),Fe(_=>et(ce,`${_!=null?_:""} s`),[()=>j(o).liveLatency.toFixed(2)]),me(E,z)};Ye(O,E=>{j(o).liveLatency&&E(ue)})}var se=fe(O,2);{var pe=E=>{var z=bp(),J=fe(oe(z),2),ce=oe(J,!0);ne(J),ne(z),Fe(_=>et(ce,_),[()=>[{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(" & ")]),me(E,z)};Ye(se,E=>{(j(o).currentVideoSegmentLength||j(o).currentAudioSegmentLength)&&E(pe)})}var Ee=fe(se,2),Me=fe(oe(Ee),2),Ue=oe(Me);ne(Me),ne(Ee);var T=fe(Ee,2);{var S=E=>{var z=Ap(),J=fe(oe(z),2);Kn(J,{get values(){return j(v)}});var ce=fe(J,2),_=oe(ce);ne(ce),ne(z),Fe(Q=>et(_,`${Q!=null?Q:""} Kbps`),[()=>j(o).speed.toFixed(2)]),me(E,z)};Ye(T,E=>{j(o).speed&&E(S)})}var L=fe(T,2);{var R=E=>{var z=xp(),J=fe(oe(z),2);Kn(J,{get values(){return j(b)}});var ce=fe(J,2),_=oe(ce);ne(ce),ne(z),Fe(Q=>et(_,`${Q!=null?Q:""} Kbps`),[()=>j(o).bitrate.toFixed(2)]),me(E,z)};Ye(L,E=>{j(o).bitrate&&E(R)})}var ee=fe(L,2),ae=fe(oe(ee),2);Kn(ae,{get values(){return j(c)}});var we=fe(ae,2),ke=oe(we,!0);ne(we),ne(ee),ne(D),ne(g),Fe(()=>{var E,z;Gt(g,"aria-label",y),et(A,j(o).version),et(Ue,`${(E=j(r))!=null?E:""} / ${(z=j(d))!=null?z:""} frames`),et(ke,j(u))}),me(t,g),pt()}hn(["click"]);Cs();var ad="var(--btn-color, #fff)";var Mp=yi('<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),wp=yi('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Zi(t,e){var f;ct(e,!0);let i=be(e,"width",19,()=>"24"),n=be(e,"height",19,()=>"24"),o=be(e,"fill",3,ad),a=(f=e.viewBox)!=null?f:`0 0 ${i()} ${n()}`;var d=wp(),r=oe(d);{var u=l=>{var c=Mp(),v=pn(c),b=oe(v);Do(b,()=>e.children),ne(v),cn(),me(l,c)},h=l=>{var c=Or(),v=pn(c);Do(v,()=>e.children),me(l,c)};Ye(r,l=>{e.shadow?l(u):l(h,!1)})}ne(d),Fe(()=>{Gt(d,"aria-label",e.ariaLabel),Gt(d,"aria-hidden",!e.ariaLabel),Gt(d,"width",i()),Gt(d,"height",n()),Gt(d,"viewBox",a),Gt(d,"fill",o()),Pi(d,e.style),Gt(d,"data-testid",e.testId)}),me(t,d),pt()}var Sp=yi('<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 la(t){Zi(t,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(e,i)=>{var n=Sp();me(e,n)},$$slots:{default:!0}})}var Ip=Le('<div class="container s-3"><!></div>'),Np={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 Zn(t){ft(t,Np);var e=Ip(),i=oe(e);la(i,{}),ne(e),me(t,e)}var ld=t=>`width:${t}px;height:${t}px;`;var Dp=yi('<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 da(t,e){ct(e,!0);let i=Ti(()=>ld(e.size));Zi(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=Dp();me(n,a)},$$slots:{default:!0}}),pt()}var Lp=Le('<div class="playButton s-5" tabindex="0" role="button"><div class="playButtonBackground s-5"></div> <!></div>'),kp=Le('<div data-testid="unstarted-thumb"><!></div>'),Cp={hash:"s-5",code:".container.s-5{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-5{opacity:0;visibility:hidden}.container.bgCover.s-5{background-size:cover}.playButton.s-5{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-5,.playButtonBackground.s-5{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-5{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-5:hover .playButtonBackground:where(.s-5){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-5 svg{position:relative}"};function ua(t,e){ct(e,!0),ft(t,Cp);let i=be(e,"iconVisible",3,!0),n=bn(),o=Uo("tooltip_play"),a=f=>{var l,c;f.stopPropagation(),(l=e.startVideo)==null||l.call(e),(c=e.onClick)==null||c.call(e,f)};var d=kp();let r;d.__click=a,d.__contextmenu=function(...f){var l;(l=e.onContextMenu)==null||l.apply(this,f)};var u=oe(d);{var h=f=>{var l=Lp(),c=fe(oe(l),2);da(c,{get size(){return"48"}}),ne(l),Fe(()=>Gt(l,"aria-label",o)),me(f,l)};Ye(u,f=>{i()&&f(h)})}return ne(d),Fe(f=>{r=_n(d,1,"container s-5",null,r,f),Pi(d,`background-color: #222; background-image: url('${e.thumbUrl||""}')`)},[()=>({hidden:e.hidden,bgCover:n.features.previewNoEmptySpace})]),me(t,d),pt({handleClick:a})}hn(["click","contextmenu"]);var $p=Le('<div><div class="video-container s-6"></div></div>'),Op={hash:"s-6",code:".video-container.s-6,.video-wrapper.s-6{height:100%;left:0;position:absolute;top:0;width:100%}.video-wrapper.s-6{background:var(--black)}.video-container.s-6,.video-wrapper.s-6{z-index:var(--video-container-z-index)}.video-container.s-6{transition:var(--rotate-transition-duration) ease all}"};function pa(t,e){ct(e,!0),ft(t,Op);let[i,n]=Ki(),o=()=>ci(d,"$playerPhase",i),a=be(e,"videoContainer",15),{playerPhase:d}=Vi();var r=$p();let u;var h=oe(r);qi(h,f=>a(f),()=>a()),ne(r),Fe(f=>u=_n(r,1,"video-wrapper s-6",null,u,f),[()=>({hidden:o()!=="video"})]),me(t,r),pt(),n()}var Rp=Le("<!> <!> <!> <!>",1),Pp=Le('<div class="player-wrapper s-4"><!></div>'),Vp={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 fa(t,e){ct(e,!0),ft(t,Vp);let[i,n]=Ki(),o=()=>ci(f,"$language$",i),a=()=>ci(l,"$playerPhase",i),d=()=>ci(c,"$crashed",i),r=()=>ci(v,"$debugPanelVisible",i),u=be(e,"videoContainer",15),h=Vi(),f=h.interfaceLanguage$,l=h.playerPhase,c=h.state.crashed$,v=h.ui.debugPanelVisible,b=He(void 0);var y=Pp(),g=oe(y);jr(g,o,C=>{var D=Rp(),N=pn(D);pa(N,{get videoContainer(){return u()},set videoContainer(x){u(x)}});var w=fe(N,2);let A=Ti(()=>a()!=="thumb"||d()&&e.autoplay);ua(w,{get hidden(){return j(A)},get thumbUrl(){return e.thumbUrl},get startVideo(){return e.firstStart}});var M=fe(w,2);{var I=x=>{Zn(x,{})};Ye(M,x=>{d()&&x(I)})}var m=fe(M,2);{var U=x=>{sa(x,{})};Ye(m,x=>{r()&&x(U)})}me(C,D)}),ne(y),qi(y,C=>Se(b,C),()=>j(b)),me(t,y),pt(),n()}var Hp=Le('<div class="vk-vp-tv-root s-0"><!></div>'),Qp={hash:"s-0",code:'.vk-vp-tv-root.s-0{--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 ma(t,e){ct(e,!0),ft(t,Qp);let[i,n]=Ki(),o=()=>ci(X,"$isLive$",i),a=()=>ci(ee,"$availableSubtitlesList$",i),d=be(e,"sources",7),r=be(e,"store",7),u=be(e,"videoConfig",7),h=be(e,"uiConfig",7),f=be(e,"title",7),l=be(e,"thumbUrl",7),c=be(e,"subtitles",7),v=be(e,"subtitlesForcedLanguage",7),b=be(e,"live",7),y=be(e,"preload",7),g=be(e,"autoplay",7),C=be(e,"volume",7,void 0),D=be(e,"muted",7,void 0),N=be(e,"fromTime",7),w=be(e,"canRewindLive",7),A=be(e,"showAds",7),M=be(e,"adsSlotId",7,void 0),I=be(e,"adsParams",7,void 0),m=be(e,"adsAutoplayParam",7,void 0),U=be(e,"duration",7,void 0),x=be(e,"supportLink",7),P=be(e,"shadowRootContainer",7),k=be(e,"outerContainerRef",7),K=be(e,"fullScreenTarget",7,void 0),re=be(e,"failoverHosts",7,void 0),V=be(e,"saveRate",7),G=be(e,"volumeMultiplier",7),F=be(e,"showEndScreen",7,!0);kl(h());let Z=bn(),Ae=r().ui.debugPanelVisible,X=r().state.isLive$,le=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}),Vl(r()),Ni(()=>{var E,z;(z=(E=u().callbacks)==null?void 0:E.onDomReady)==null||z.call(E)});let ve=(E=!1)=>{Se(Y,!0),E?r().actions.external.firstStart(A()):r().actions.internal.firstStart(A())},B=()=>{Xl(r().videoId),ia()&&r().actions.internal.setTrafficSavingEnabled(!0);let z=ta(r().videoId);z&&r().actions.internal.setQuality(z)};function je(E){var Q,te,Re;let z=d()||E;z&&r().initVideo({container:j(le),sources:z,failoverHosts:re(),subtitles:c(),subtitlesForcedLanguage:v(),volumeMultiplier:G()});let J=zp.get(qn)==="true";Ae.set(J),N()>0&&r().actions.external.seekTime(N());let ce=(te=(Q=C())!=null?Q:Ro())!=null?te:Z.volumeDefault,_=(Re=D())!=null?Re:Gl();if(r().actions.external.setVolume(ce),r().actions.external.setMuted(_),r().getAdmanWrapper().setInitialVolume(_?0:ce),B(),Z.features.saveRate&&V()){let Ne=Jl();Ne&&!o()&&r().actions.internal.setPlaybackRate(Ne)}r().ui.isAutoplay.set(g()),g()&&ve(),y()&&Z.features.preload&&r().actions.internal.preload()}gn(()=>{var z,J,ce,_;let E=()=>r().destroy();return((z=b())==null?void 0:z.status)==="upcoming"?(r().actions.internal.setLiveWaitingStart(!0),E):((J=b())==null?void 0:J.status)==="waiting"?(r().actions.internal.setLiveWaitingRecover(!0),E):(((ce=b())==null?void 0:ce.status)==="finished"||((_=b())==null?void 0:_.status)==="postlive")&&!(d()&&Up(d()))?(r().actions.internal.setLiveWaitingRecord(!0),E):(je(),E)});function Ie(){j(Y)?r().actions.external.play():ve(!0)}function de(){r().actions.external.pause()}function O(E){r().actions.external.setMuted(E)}function ue(){r().actions.external.toggleSubtitle()}function se(E,z){r().actions.external.changeSubtitle(E,z)}function pe(E){r().actions.external.changeAudioStream(E)}function Ee(E){E>=0&&E<=1&&r().actions.external.setVolume(E)}function Me(E){r().actions.internal.seekTime(E,Fp.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 ee=r().state.availableSubtitlesList$;if(Z.features.initSubtitles){let E=!1;Ni(()=>{var z;if(!E&&a().length){E=!0;let J;if(Z.features.userVideoPrefs&&r().videoId){let _=Vo(Z.userSalt,String(r().videoId));_!=null&&_.subtitleTrackId&&(J=a().find(Q=>Q.value===_.subtitleTrackId))}let ce=(z=v())!=null?z:na();ce&&(J=a().find(_=>_.language===ce)),r().actions.internal.setSubtitle(J)}})}var ae=Hp(),we=oe(ae);fa(we,{get thumbUrl(){return l()},firstStart:ve,get autoplay(){return g()},get videoContainer(){return j(le)},set videoContainer(E){Se(le,E,!0)}}),ne(ae),me(t,ae);var ke=pt({initVideo:je,play:Ie,pause:de,setMuted:O,toggleSubtitle:ue,changeSubtitle:se,changeAudioStream:pe,setVolume:Ee,seekTime:Me,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 u()},set videoConfig(E){u(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 c()},set subtitles(E){c(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 K()},set fullScreenTarget(E){K(E)},get failoverHosts(){return re()},set failoverHosts(E){re(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(),ke}var Yp=yi('<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 ha(t,e){let i=be(e,"isWhite",3,!1),n=Ti(()=>i()?"#fff":"#909499");Zi(t,{width:"57",height:"60",get fill(){return j(n)},testId:"stub-icon",children:(o,a)=>{var d=Yp();cn(9),me(o,d)},$$slots:{default:!0}})}var Bp=Le('<div class="title s-2"> </div>'),Wp=Le('<div class="playerStub s-2"><!> <!></div>'),Gp={hash:"s-2",code:".playerStub.s-2{align-items:center;background-color:#222;background-position:50%;background-size:cover;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;height:100%;justify-content:center;position:relative;width:100%}.title.s-2{box-sizing:border-box;color:#fff;font-size:15px;left:0;overflow:hidden;padding:18px 20px 10px;position:absolute;text-overflow:ellipsis;top:0;white-space:nowrap;width:100%}"};function va(t,e){ft(t,Gp);var i=Wp(),n=oe(i);{var o=r=>{var u=Bp(),h=oe(u,!0);ne(u),Fe(()=>et(h,e.title)),me(r,u)};Ye(n,r=>{e.title&&r(o)})}var a=fe(n,2);{var d=r=>{let u=Ti(()=>!!e.thumbUrl);ha(r,{get isWhite(){return j(u)}})};Ye(a,r=>{(!e.title||!e.thumbUrl)&&r(d)})}ne(i),Fe(()=>Pi(i,e.thumbUrl?`background-image: url('${e.thumbUrl}')`:"")),me(t,i)}var qp=Le('<div class="playerError s-1"><!></div>'),Kp={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 ga(t){ft(t,Kp);var e=qp(),i=oe(e);Zn(i,{}),ne(e),me(t,e)}import{ChromecastState as lf,PlaybackState as Jn,Player as df,PredefinedQualityLimits as ji,VideoFormat as Bo,clientChecker as _d}from"@vkontakte/videoplayer-core/es2015";import{assertNonNullable as qt,getHighestQuality as uf,InterfaceLanguage as cf,isInvariantQuality as pf,isNonNullable as ff,loadVKLangPack as mf,Logger as hf,map as yd,merge as vf,Observable as Wo,Subject as Xn,Subscription as gf,TracerFactory as _f,VideoQuality as yf,devNull as bf,now as Af}from"@vkontakte/videoplayer-shared/es2015";import{SeekAction as eo}from"@vkontakte/videoplayer-statistics/es2015";import{detectEmbed as Jp,devNull as $e,isNonNullable as Xp,now as Oe}from"@vkontakte/videoplayer-shared/es2015";import{addScript as ef,Subject as Nt,clearVideoElement as tf}from"@vkontakte/videoplayer-shared/es2015";var nf="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",zo=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 Nt,loadStarted$:new Nt,loadEnded$:new Nt,loadError$:new Nt,ready$:new Nt,slotRequested$:new Nt,started$:new Nt,timeRemained$:new Nt,paused$:new Nt,resumed$:new Nt,ended$:new Nt,empty$:new Nt,skipped$:new Nt,clicked$:new Nt,closed$:new Nt,error$:new Nt};this.loadAdman=e=>($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[Oe()]}),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?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[Oe()]}),n())};ef(nf,e,this.loadTimeout).then(()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[Oe()]}),window.AdmanHTML?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[Oe()]}),window.admanAsyncInit=a,o=window.setTimeout(a,this.initTimeout))}).catch(d=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(d)],numbers:[Oe()]}),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?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[Oe()]}),n())},d=()=>{r=!0,n()},r=!1,u=window.setTimeout(()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[Oe()]}),d()},this.loadTimeout);e.addEventListener("abort",d),e.aborted&&($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[Oe()]}),d()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>Ou(dd(),1)).then(()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(r)],numbers:[Oe()]}),!r&&(window.AdmanHTML?($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[Oe()]}),i(),this.events.loadEnded$.next()):($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[Oe()]}),window.admanAsyncInit=a,o=window.setTimeout(a,this.initTimeout)))},d).finally(()=>{clearTimeout(o),clearTimeout(u),e.removeEventListener("abort",d)})});this.onAdsReady=()=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[Oe()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(e,i)=>{var n;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",e,"muted: "+i.muted],numbers:[Oe(),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?ye(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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[Oe()]}),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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{var e;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{var e;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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")=>{$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",e],numbers:[Oe()]}),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"),$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[Oe()]}),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")}initAdman(e){return Ut(this,null,function*(){var N,w;if($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[Oe(),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:u={},paramsOverride:h={},duration:f,externalApi:l}=e;this.externalApi=l;let c,v=this.playerState&&ye(this.playerState.vsid);v&&(this.isVsidOriginal?c=v:c=parseInt(v,36));let{isEmbed:b,immediateOrigin:y}=Jp(),g=(N=b?y:window.location.href)!=null?N:window.location.href,C=Be(dt(Be(dt(Be({},u),{dl:encodeURIComponent(g),autoplay:o?1:0,player_width:i,player_height:n}),c?{request_id:c}:{}),{duration:f}),h);C=Object.fromEntries(Object.entries(C).filter(([A,M])=>Xp(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=yield 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){$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(A)],numbers:[Oe()]}),this.onAdError("could not init adman")}})}switchToVideo(e=!1){var n,o,a;if($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",(n=this.currentAdSection)!=null?n:"","force: "+e],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),this.adsState){this.log({message:"toggle play"});let i=ye(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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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($e.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",(e=this.currentAdSection)!=null?e:""],numbers:[Oe()]}),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,u,h,f,l,c;$e.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[Oe()]}),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),(u=this.adman)==null||u.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),(c=this.adman)==null||c.destroy(),this.videoElement&&tf(this.videoElement),this.isDestroyed=!0}safeExternalCall(e,...i){return Ut(this,null,function*(){var n;try{return yield e(...i)}catch(o){return this.onAdError((n=o==null?void 0:o.message)!=null?n:"External call failed"),null}})}};var ud=(t,e)=>e?!0:t.fullscreenEnabled||!!t.webkitFullscreenEnabled||!!t.mozFullscreenEnabled||!!t.msFullscreenEnabled,cd=t=>{let e=t;e!=null&&e.webkitExitFullscreen&&(e==null||e.webkitExitFullscreen())},of=()=>{let t=document;return t.fullscreenElement||t.mozFullScreenElement||t.webkitFullscreenElement||t.msFullscreenElement},pd=()=>!!of();var fd=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 _a=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 u of r)if(!d.startTime&&!d.endTime){let h=new Fo,{startTime:f,endTime:l}=h.parse(u);d.startTime=f,d.endTime=l}else if(u.trim()!==""){let h=new ya,{texts:f}=h.parse(u);d.texts=[...d.texts,...f]}(d.startTime||d.endTime)&&d.texts.length>0&&n.push(d)}return n}},Fo=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),u=+`0.${o}`;return a+d+r+u}},ya=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,u=[];for(;r<d.length;){let h=["<",">"].reduce((f,l)=>{let c=d.indexOf(l,r);return f===-1||f>c?c:f},-1);if(h===-1){u.push(d.substring(r));break}u.push(d.substring(r,h)),r=h+1}return u}}),a=new Fo;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}},md=_a;import{isNonNullable as ba}from"@vkontakte/videoplayer-shared/es2015";var Ji,Ze,Aa=0,xa=!1,hd="",vd=(t,e=0,i=0)=>t<e&&t<i,Ho=(t,e=0,i=0)=>t>=e&&t<=i,rf=(t,e=0,i=0)=>t>e&&t>i,gd=(t,e,i,n=!1)=>{var r;let o=(r=i.find(({id:u})=>u===e.value))==null?void 0:r.subtitles;if(n)return o==null?void 0:o.find(({startTime:h,endTime:f})=>Ho(t,h,f));let a=t>=Aa,d=t<Aa;if(Aa=t,d&&(xa=!1),ba(Ji)&&Ho(t,Ji.startTime,Ji.endTime)&&hd===e.value)return Ji;if(!ba(Ze)&&(o!=null&&o.length)&&!xa){Ze=o.find(({startTime:h,endTime:f})=>Ho(t,h,f)||a&&vd(t,h,f)),Ji=void 0,!ba(Ze)&&o[o.length-1].endTime<t&&(xa=!0);return}else{if(Ho(t,Ze==null?void 0:Ze.startTime,Ze==null?void 0:Ze.endTime))return Ji=Ze,Ze=void 0,hd=e.value,Ji;(a&&rf(t,Ze==null?void 0:Ze.startTime,Ze==null?void 0:Ze.endTime)||d&&vd(t,Ze==null?void 0:Ze.startTime,Ze==null?void 0:Ze.endTime))&&(Ze=void 0)}};var Qo={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"},af={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=Qo[t])!=null?e:Qo[af[t]])!=null?i:void 0};import{Subscription as sf}from"@vkontakte/videoplayer-shared/es2015";import"@vkontakte/videoplayer-statistics/es2015";var Yo=class{constructor(e,i,n,o=new sf){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 pi="off";var bd=({interfaceLanguage:t,isCyrillicRelatedInterface:e,videoId:i,isLiveCatchUpMode:n,statAuthToken:o,isAudioDisabled:a,canDownload:d,callbacks:r,webApi:u,previewThumbsData:h,uiConfig:f,coreConfig:l,player:c,stopPlayer:v,looped:b=!1,statistics:y,saveRate:g,internalsExposure:C,playerId:D,metaConfig:N})=>{var ss;let w=dt(Be({},l),{isAudioDisabled:a,live:dt(Be({},(ss=l.live)!=null?ss:{}),{isLiveCatchUpMode:!!n})}),A=f,M=_f.createRootTracer(!1),I=M.createComponentTracer("Store"),m=c||new df(w,M,{playerId:D,onDevNullLog:r==null?void 0:r.onDevNullLog});C==null||C.expose({corePlayer:m});let U=new hf,x=new zo(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=u==null?void 0:u.focusManager,k=U.createComponentLog("Store"),K,re,V={},G=new $o,F=new gf,Z="",Ae=H(!1),X=y&&y.oneStat?Ve(y.oneStat.vsid$):ei(void 0),le=H(pd()),Y=H(!1),ve=()=>ud(document,_d.device.isIOS),B=H(!1),je=H([]),Ie=vf(m.events.fatalError$,m.events.managedError$).subscribe(s=>je.update(p=>[...p,s])),de=ei(!1,s=>{let p=m.events.fatalError$.subscribe(()=>s(!0));return()=>p.unsubscribe()}),O=s=>Ut(null,null,function*(){var q;let p=Object.values(cf).includes(s);if(A.downloadVKLanguages&&(p&&A.updateBuiltinLanguages||!ra(s))){let ie;try{ie=yield mf(s,Cl,$l)}catch(De){(q=y==null?void 0:y.oneStat)==null||q.logError({errorType:"VKLangPack",fatal:!1})}ie&&(oa({language:s,pack:ie,fallback:A.defaultLanguage}),ue.set(s),se.update(De=>De+1))}ra(s)&&ue.set(s)}),ue=H(t),se=H(0),pe=H(e);O(t);let Ee=(s,p)=>{let $=ye(ue);return aa($,s,p,A.defaultLanguage)},Me=H("thumb");Me.subscribe(s=>{s==="ads"&&m.info.playbackState$.getValue()&&S()});let Ue=(()=>{let s=ot([de,Me],([p,$])=>p?"crashed":$);return dt(Be({},s),{is:p=>ye(s)===p})})(),T=H(),S=()=>{T.set({muted:m.info.muted$.getValue()})},L=H({width:0,height:0}),R=null,ee=m.info.isBuffering$,ae=ei(ee.getValue(),s=>{let p=ee.subscribe($=>{$&&R===null?R=window.setTimeout(()=>{s(ee.getValue()),R=null},A.loaderDelay):s($)});return()=>{p.unsubscribe(),R&&clearTimeout(R)}});I.log("create store"),k({message:"create store"});let we=s=>{k({message:`init video, config: ${JSON.stringify(s)}`}),bf.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Af()]}),m.initVideo(s),I.log("init video"),s.subtitles&&m.setExternalTextTracks(s.subtitles),K=s,Z=s.subtitlesForcedLanguage||""},ke=new Xn,E=new Xn,z=new Xn,J={actionRewind$:ke,actionSeek$:E,inFullscreen$:new Wo(s=>le.subscribe(p=>s.next(p))),actionSetSubtitle$:z},ce=new Xn,_=new Xn,Q={actionSeek$:E,actionSubtitlesSwitched$:ce,actionQuality$:_,playerSize$:new Wo(s=>L.subscribe(p=>s.next(p))),inFullscreen$:new Wo(s=>le.subscribe(p=>s.next(p))),isLoaderVisible$:new Wo(s=>ae.subscribe(p=>s.next(p)))};if(y){let{oneStat:s,thinOneStat:p,mediascopePixel:$,statSubscription:q}=y;s&&(q.add(s.attachToUi(J)),q.add(s.attachToAds(x.events)),s.authorize(o).catch(ie=>{k({message:`onestat auth error ${String(ie)}`})}),$&&$.attachTo(m)),p&&(q.add(p.attachTo(m,x.events)),q.add(p.attachToUi(Q)),q.add(p.attachToAds(x.events)),p.updateContext({isMobile:ye(Ae)}),p.authorize(o))}let te=()=>{if(_d.device.isIOS&&re)try{cd(re)}catch(s){k({message:`exitIosSafariFullscreen failed: ${s}`})}};F.add(m.experimental.element$.subscribe(s=>{s&&(re=s,s.classList.add("player-media"))})).add(m.events.ended$.subscribe(()=>{var s;te(),(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(()=>Ut(null,null,function*(){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=ei(m.info.position$.getValue(),s=>{let p,$,q=()=>{let ie=m.info.playbackState$.getValue(),De=m.info.isLive$.getValue(),Pe=m.info.duration$.getValue(),Ce=m.info.position$.getValue();if(ie&&[Jn.PLAYING,Jn.PAUSED].includes(ie)){let vt=De?Ce-Pe:m.getExactTime();vt!==$&&s(vt),$=vt}p=requestAnimationFrame(q)};return q(),()=>cancelAnimationFrame(p)}),Ne=Ve(m.info.playbackState$),tt=Ve(m.info.isBuffering$),qe=ot([Ne,tt],([s,p])=>p?"buffering":s),at=Ve(m.info.currentBuffer$),Xe=Ve(m.info.isEnded$),fi=Ve(m.info.isLive$),Kt=A.features.playbackRate?Ve(m.info.canChangePlaybackSpeed$):ei(!1),mi=Ve(m.info.liveBufferTime$),bi=Ve(m.info.volume$),Ui=Ve(m.info.muted$),ki=Oo(m.info.predefinedQualityLimitType$.pipe(yd(s=>s===ji.TRAFFIC_SAVING)),m.info.predefinedQualityLimitType$.getValue()===ji.TRAFFIC_SAVING),Qe=Oo(m.info.predefinedQualityLimitType$.pipe(yd(s=>s===ji.HIGH_QUALITY)),m.info.predefinedQualityLimitType$.getValue()===ji.HIGH_QUALITY),ze=Ve(m.info.autoQualityLimitingAvailable$),it=Ve(m.info.availableQualities$),Zo=Ve(m.info.availableQualitiesFps$),Xi=Ve(m.info.chromecastState$),xt=Ve(m.info.chromecastDeviceName$),Je=Ve(m.info.currentFormat$),en=Ve(m.info.throughputEstimation$),tn=Ve(m.info.videoBitrate$),Td=Ve(m.info.intrinsicVideoSize$),Sa=Ve(m.info.duration$),Md=Ve(m.info.isAudioAvailable$),wd=()=>{R&&clearTimeout(R),R=null},io=ot([Sa,fi],([s,p])=>p?-s:s),Ia=ot([Ne],([s])=>s===Jn.PLAYING),Na=Ve(m.info.atLiveEdge$),Da=Ve(m.info.atLiveDurationEdge$),La=Ve(m.info.position$),Sd=ot([La,Sa],([s,p])=>isFinite(s)&&isFinite(p)&&!!p),Id=ot([Xi],([s])=>s===lf.CONNECTED),Nd=Ve(m.info.availableVideoStreams$),ka=A.features.audioLanguages?Ve(m.info.availableAudioStreams$):ei([]),Dd=Ve(m.info.currentVideoStream$),Ca=Ve(m.info.currentAudioStream$),Ld=s=>{s.language&&Kl(s.language),m.setVideoStream(s)},$a=s=>{m.setAudioStream(s)},Oa=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=Vo(A.userSalt,String(i));if(q!=null&&q.audioTrackId){let ie=s.find(De=>De.id===q.audioTrackId);p=ie!=null?ie:p}}let $=ql();return $&&(p!=null||(p=s.find(({language:q})=>$===q))),p!=null||(p=s.at(0)),p},kd=s=>{I.log("change audio stream",{id:s});let p=m.info.availableAudioStreams$.getValue().find($=>$.id===s);p&&$a(p)},Ra=!1;F.add(m.info.availableAudioStreams$.subscribe(s=>{if(!Ra&&s.length){let p=Oa(s);p&&(m.setAudioStream(p),Ra=!0)}})),ka.subscribe(s=>{var p;(p=r==null?void 0:r.onAvailableAudioStreamsChanged)==null||p.call(r,s.map(({label:$="",id:q="",language:ie=""})=>({label:$,language:ie,id:q})))}),Ca.subscribe(s=>{var p;return s&&((p=r==null?void 0:r.onAudioStreamChanged)==null?void 0:p.call(r,s.id))});let Pa=!1;F.add(m.info.availableVideoStreams$.subscribe(s=>{if(!Pa&&s.length){let p=Oa(s);p&&(m.setVideoStream(p),Pa=!0)}}));let no=H(void 0),Va=Ve(m.info.isAutoQualityEnabled$,s=>s&&no.set(void 0)),Cd=Ve(m.info.currentQuality$,()=>no.set(void 0)),ja=ot([no,Cd],([s,p])=>s!=null?s:p),Ua=ot(Je,s=>s!==Bo.MPEG),$d=ot([it,Zo,Va,ja,Ua],([s,p,$,q,ie])=>{let De=[];ie&&De.push({value:"auto",displayValue:Ee("auto_quality_option"),selected:$});let Pe=s.filter(Ce=>!pf(Ce));for(let Ce of Pe){let vt=p[Ce];De.push({value:Ce,displayValue:`${Ce}${vt?fd(vt):""}`,selected:$?!1:Ce===q})}return De}),Jo=Ve(m.info.currentPlaybackRate$),Xo=ot([Jo,Na,Da],([s,p,$])=>{let q=$?1:A.controls.playbackRateMin,ie=p?1:A.controls.playbackRateMax,De=A.controls.playbackRateStep,Pe=[];for(let Ce=q;Ce<=ie;Ce+=De)Pe.push({value:Ce,displayValue:Ce===1?Ee("playback_rate_1"):Ee("playback_rate",{multiplier:Ce.toString(10)}),selected:s===Ce});return Pe}),oo=()=>({displayValue:Ee("subtitles_off"),value:pi,language:""}),za=H(oo()),Ci=ot([za,se],([s],p)=>{s.value===pi?p(oo()):p(s)}),er=A.features.subtitles?Ve(m.info.availableTextTracks$):ei([]),Fa=Fl(),Od=ot([er,Ci],([s,p],$)=>{var De;let q=[],ie=s.find(({id:Pe})=>Pe===p.value);if(ie!=null&&ie.url){let[,Pe]=(De=Fa.find(ie.url))!=null?De:[];if(Pe){$(Pe);return}G.download(ie.url).then(Ce=>{if(!Ce||G.isDestroyed())return;let vt=new md,Tn=ie.language;if(Tn){let Tu=!!ie.isAuto,Mu=vt.parse(Ce,Tn);q.push({lang:Tn,subtitles:Mu,isAuto:Tu,id:ie.id})}Fa.add(ie.url,q),ye(Ci).value===p.value&&$(q)}).catch(()=>{var Ce;(Ce=y==null?void 0:y.oneStat)==null||Ce.logError({errorType:"Subtitles download",fatal:!1})})}$(q)}),Rd=ot([Jo,Ia,Ci],([s,p,$],q)=>{let Pe;if(m.info.isLive$.getValue()&&p&&$.value!==pi){let vt=()=>{let Tn=1e3/(3*s);Pe=setTimeout(vt,Tn),q(Date.now())};return vt(),()=>clearTimeout(Pe)}}),Ha=ot([er,Ci],([s,p])=>{if(!s.length)return[];let $=[];for(let{language:q,isAuto:ie,id:De}of s){let Pe=q&&Ea(q);q&&Pe&&$.push({displayValue:ie?Ee("subtitles_auto",{language:Pe}):Pe,value:De,selected:(p==null?void 0:p.value)===De,isAuto:ie,language:q})}return $.length?($.unshift(dt(Be({},oo()),{selected:(p==null?void 0:p.value)===pi})),$):[]}),xn={available:[],prev:[]},Pd=()=>{var p,$;let s=m.experimental.getCurrentTime$.getValue();return($=(p=s==null?void 0:s())!=null?p:re==null?void 0:re.currentTime)!=null?$:0},Vd=ot([Re,Ci,Od,Rd],([s,p,$,q])=>{var De;let ie=m.info.isLive$.getValue();if(ie&&xn.prev!==$){let Pe=$.find(({id:vt})=>vt===p.value),Ce=xn.prev.find(({id:vt})=>vt===p.value);if(Pe){let vt=dt(Be({},Pe),{subtitles:[...(De=Ce==null?void 0:Ce.subtitles)!=null?De:[],...Pe.subtitles]});xn.available=[vt],xn.prev=$}}if(p&&p.value!==pi){let Pe=ie?Pd():s,Ce=ie?xn.available:$;return gd(Pe,p,Ce,ie)}}),jd=ot([Vd],([s])=>s!=null&&s.texts?s.texts:[]);F.add(Ci.subscribe(s=>{var p,$;if(s.value===pi)(p=r==null?void 0:r.onSubtitleOff)==null||p.call(r);else{let q=Object.entries(Qo).find(([ie,De])=>De===s.displayValue);($=r==null?void 0:r.onSubtitleOn)==null||$.call(r,q?q[0]:"",s.value)}}));let Ud=H(!0),zd=ot([at,io,La,mi],([s,p,$,q])=>{var Ce;let ie=(Ce=s==null?void 0:s.end)!=null?Ce:0;if(!q)return ie/p;let Pe=-$+q-p;return(ie-Pe)/p}),Qa=Ve(m.info.availableSources$),Fd=ot([Qa],([s])=>Object.keys((s==null?void 0:s[Bo.MPEG])||{}).length>0),Hd=()=>{var $,q,ie;let s=Object.keys(((q=($=m.info.availableSources$)==null?void 0:$.getValue())==null?void 0:q[Bo.MPEG])||{}),p=uf(s)||yf.Q_144P;return(ie=K.sources[Bo.MPEG])==null?void 0:ie[p]},Qd=()=>{var p;let s=Hd();if(s)I.log("download video",{url:s}),zl(s,((p=K==null?void 0:K.meta)==null?void 0:p.title)||"video");else{let $="There is no URL for download video";I.log("download video",{message:$}),k({message:$})}},Yd=()=>{k({message:"toggle muted"});let s=m.info.muted$.getValue();m.info.volume$.getValue()===0&&!s?ir(tr()):En(!s)},Bd=()=>{We.ui.settingsMenu.visible$.set(!1),I.log("close settings menu")},Wd=(s,p=()=>Promise.resolve())=>Ut(null,null,function*(){We.ui.settingsMenu.visible$.set(!0),yield p(),I.log("open settings menu",{wasOpenedByKeyboard:s})}),tr=()=>{var p;let s=Math.max(A.volumeMinRestore,(p=Ro())!=null?p:0);return s===0?A.volumeDefault:s},ir=s=>{let p=s===0?tr():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)},En=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=tr();m.setVolume(q),x.setVolume(q)}},Ya=H(!1),Ba=s=>{I.log("set looped",{isLooped:s}),Ya.set(s),m.setLooped(s)};Ba(b);let Gd=()=>{m.prepare()},qd=()=>{qt(We);let s=ye(We.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 ie;k({message:"toggle play, call player.play"}),p.action="play",m.play(),(ie=r==null?void 0:r.onPlay)==null||ie.call(r)},q=()=>{var ie;k({message:"toggle play, call player.pause"}),p.action="pause",m.pause(),(ie=r==null?void 0:r.onPause)==null||ie.call(r)};m.info.isEnded$.getValue()?(k({message:"toggle play, video ended, seek to 0"}),ke.next(),E.next(eo.REWIND),m.seekTime(0),$()):m.info.playbackState$.getValue()!==Jn.PLAYING?$():q(),I.log("toggle play",p)},Wa=(s,{byUser:p=!1}={})=>{k({message:`set quality, quality: ${s}`}),I.log("set quality",{quality:s}),p&&_.next(s),m.setAutoQuality(s==="auto"),Po(),s!=="auto"&&(ea(i,s),no.set(s),m.setQuality(s))},Ga=s=>{k({message:`set trafficSavingEnabled, value: ${s}`}),I.log("set traffic saving enabled",{trafficSavingEnabled:s});let p=s?ji.TRAFFIC_SAVING:ji.UNKNOWN;m.setPredefinedQualityLimits(p)},qa=s=>{k({message:`set highQualityEnabled, value: ${s}`}),I.log("set high quality enabled",{highQualityEnabled:s}),Kd(s?ji.HIGH_QUALITY:ji.UNKNOWN)},Kd=s=>{m.setPredefinedQualityLimits(s)},nr=(s,p=!0)=>{I.log("set playback rate",{playbackRate:s}),m.setPlaybackRate(s),A.features.saveRate&&g&&!m.info.isLive$.getValue()&&p&&Zl(s)},Zd=()=>{let s=ye(Kt),p=ye(Xo),$=p.findIndex(({selected:ie})=>ie);if($===p.length-1||!s)return p[$];let q=p[$+1];return nr(q.value),q},Jd=()=>{let s=ye(Kt),p=ye(Xo),$=p.findIndex(({selected:ie})=>ie);if($===0||!s)return p[$];let q=p[$-1];return nr(q.value),q},or=(s=dt(Be({},oo()),{selected:!1}))=>{I.log("set subtitles",Be({},s)),s.value!==pi&&z.next(s.isAuto?s.value+"_auto":s.value),ce.next({enabled:s.value!==pi,lang:s.language,auto:!!s.isAuto}),za.set(s)},Ka=s=>{I.log("toggle subtitles");let p=ye(Ci);(p==null?void 0:p.value)===pi?Za(s):Ja()},Xd=(s,p)=>{I.log("change subtitle",{enabled:s}),s?Za(!0,p):Ja()},Za=(s,p)=>{I.log("subtitle on");let $=ye(Ha),q=ye(ue),ie=Z!=null?Z:q,De;p&&(De=$.find(Pe=>Pe.value===p)),De!=null||(De=$.filter(Pe=>Pe.value!==pi).find(Pe=>Pe.language===ie)),or(De!=null?De:$[1])},Ja=()=>{I.log("subtitle off"),or(void 0)};F.add(m.info.availableTextTracks$.subscribe(s=>{var $;function p(){let q=[];for(let{language:ie,isAuto:De,id:Pe}of s){let Ce=ie&&Ea(ie);ie&&Ce&&q.push({id:Pe,language:ie,title:De?Ee("subtitles_auto",{language:Ce}):Ce})}return q}($=r==null?void 0:r.onAvailableSubtitlesChanged)==null||$.call(r,p())}));let Xa=H(!0),es=s=>{Xa.set(s)},ts=(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 ie=m.info.duration$.getValue(),De=Math.min(0,ie+s);m.seekTime(De,$)}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,$)},is=(s,p,$=!1)=>{k({message:`seek to percent, percent: ${s}`}),I.log("seek to percent",{percent:s,action:p});let q=ye(io)*s;ts(q,p,$)},eu=s=>{k({message:`seek external, time: ${s}`}),I.log("seek external",{time:s}),E.next(eo.UNKNOWN),m.seekTime(m.info.isLive$.getValue()?-s:s)},tu=s=>{var q,ie;let p=(q=s.max)!=null?q:"none",$=(ie=s.min)!=null?ie:"none";k({message:`set auto quality limitation. Max: ${p}. Min: ${$}`}),I.log("set auto quality limits",{max:p,min:$}),m.setAutoQualityLimits(s)},iu=s=>{k({message:`set playback rate to: ${s}`}),I.log("set playback rate external",{playbackRate:s}),m.setPlaybackRate(s)},rr=H(void 0),ar=H(!1),nu=s=>{k({message:`start scrubbing, progress: ${s}`}),I.log("start scrubbing",{progress:s}),ar.set(!0),ns(s)},ns=s=>{rr.set(s)},ou=()=>{rr.set(void 0),ar.set(!1)},ru=(s,p=!1)=>{k({message:`complete scrubbing, progress: ${s}`}),I.log("complete scrubbing",{progress:s}),is(s,eo.SLIDER,p),ou()},au=ot([Re,io,rr],([s,p,$],q)=>{q(ff($)?$*p:s)}),sr=H(!1),su=()=>{sr.set(!0)},lu=()=>{sr.set(!1)},du=s=>{E.next(eo.LIVE),k({message:"live switch to low latency "+s}),I.log("live switch to low latency "+s),m.setLiveLowLatency(s)},uu=()=>{E.next(eo.LIVE),k({message:"switch to active live"}),I.log("switch to active live"),m.seekTime(0),m.info.playbackState$.getValue()!==Jn.PLAYING&&We.actions.internal.togglePlay()},cu=()=>{I.log("skip adman"),x.skip()},pu=(s=!0)=>{var q;qt(We),k({message:`switch from ads to video, callPlay: ${s}`}),I.log("switch from ads to video",{callPlay:s}),Me.set("video"),s&&m.play(),a&&En(!0);let p=(q=ye(T))==null?void 0:q.muted,$=!m.info.muted$.getValue();p!==void 0&&!$&&En(p),T.set(void 0)},fu=()=>{qt(We),k({message:"switch from video to ads"}),I.log("switch from video to ads"),We.actions.internal.pause(),te(),Me.set("ads")},mu=s=>{qt(We);let p=s?"LiveWaitingStart":"thumb";I.log("set live waiting start",{state:s,playerPhase:p}),Me.set(p)},hu=s=>{qt(We);let p=s?"LiveWaitingRecover":"thumb";I.log("set live waiting recover",{state:s,playerPhase:p}),Me.set(p)},vu=s=>{qt(We);let p=s?"LiveWaitingRecord":"thumb";I.log("set live waiting record",{state:s,playerPhase:p}),Me.set(p)},gu=()=>(qt(We),I.log("get debug text data"),jl(m,K,We,M.getTraceId(),N)),_u=()=>(qt(We),JSON.stringify(M.getFinishedSpans())),yu=()=>(qt(We),Ul(m,K,We)),bu=()=>re,os=s=>{var $;if(qt(We),m.info.isEnded$.getValue())return;let p=!s;if(ye(We.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()},rs=s=>{var $;qt(We);let p=!s;if(ye(We.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()},Au=s=>{qt(We);let p=!s;if(ye(We.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()},as=(s,p)=>{qt(We),k({message:`first start, show ads: ${s}, internalCall: ${!p}`}),I.log("first start",{showAds:s,external:p}),s?Me.set("ads"):(Me.set("video"),p?m.play():We.actions.internal.togglePlay())},xu=()=>(k({message:"getting preview thumbs data"}),I.log("get preview thumbs data",Be({},h)),h),Eu=()=>{I.log("destroy store"),F.unsubscribe(),m.destroy(),x.destroy(),y==null||y.destroy(),Ie.unsubscribe(),G.destroy()},We={interfaceLanguage$:ue,isCyrillicRelatedInterface$:pe,initVideo:we,videoId:i,playerPhase:Ue,vsid:X,state:{positionExact$:Re,positionWithScrubbing$:au,duration$:io,playbackState$:Ne,playbackStateRealistic$:qe,isPlaying$:Ia,isLoaderVisible:ae,bufferedProgress$:zd,isLive$:fi,canChangePlaybackSpeed$:Kt,isActiveLive$:Na,isOldestAvailableLive$:Da,isRewindableLive$:Sd,isEnded$:Xe,muted$:Ui,volume$:bi,trafficSavingEnabled$:ki,highQualityEnabled$:Qe,autoQualityLimitingAvailable$:ze,availableVideoStreams$:Nd,availableAudioStreams$:ka,videoStream$:Dd,audioStream$:Ca,currentQuality$:ja,isAutoQualityEnabled$:Va,availableQualities$:$d,currentPlaybackRate$:Jo,availablePlaybackRates$:Xo,currentSubtitle$:Ci,availableTextTracks$:er,availableSubtitlesList$:Ha,currentSubtitleCaptions$:jd,isAutoSubtitleCaptionVisible$:Ud,chromecastState$:Xi,chromecastDeviceName$:xt,chromecastConnected$:Id,currentFormat$:Je,throughputEstimation$:en,videoBitrate$:tn,videoSize$:Td,errorLog$:je,crashed$:de,isAudioAvailable$:Md,isAudioDisabled:!!a,canDownload:A.features.download&&!!d,availableSources$:Qa,hasMpegSources$:Fd,looped$:Ya,loadedMetadata$:B,isAutoQualityAvailable$:Ua},ui:{t:Ee,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:le,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:Ae,icon3DVideoVisible:H(!1),scrubbingInProgress:ar,volumeChangingInProgress:sr,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:Xa,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:Gd,firstStart:s=>as(s,!1),play:()=>rs(!1),pause:()=>os(!1),togglePlay:qd,toggleMuted:Yd,openSettingsMenu:Wd,closeSettingsMenu:Bd,setVolume:s=>ir(s),setMuted:s=>En(s),startVolumeChanging:su,stopVolumeChanging:lu,setVideoStream:Ld,setAudioStream:s=>$a(s),setQuality:(s,p)=>Wa(s,p),setTrafficSavingEnabled:s=>Ga(s),setHighQualityEnabled:s=>qa(s),setPlaybackRate:nr,incrementPlaybackRate:Zd,decrementPlaybackRate:Jd,setSubtitle:s=>or(s),toggleSubtitle:()=>Ka(!1),startScrubbing:nu,progressScrubbing:ns,completeScrubbing:ru,switchToActiveLive:uu,switchFromAdsToVideo:pu,switchFromVideoToAds:fu,skipAd:cu,setLiveWaitingStart:mu,setLiveWaitingRecover:hu,setLiveWaitingRecord:vu,getDebugTextData:gu,getTraceTextData:_u,getDebugPanelData:yu,getVideoElement:bu,seekTime:(s,p,$)=>ts(s,p,$),clearDelayedBufferingCheckTimeout:wd,seekToPercent:is,getPreviewThumbsData:xu,downloadVideo:Qd,addLanguage:oa,setLanguage:O,setLooped:Ba,checkFullscreenSupport:ve},external:{firstStart:s=>as(s,!0),play:()=>rs(!0),pause:()=>os(!0),stop:()=>Au(!0),seekTime:s=>eu(s),setPlaybackRate:s=>iu(s),setAutoQualityLimits:s=>tu(s),setMuted:s=>En(s),toggleSubtitle:()=>Ka(!0),changeSubtitle:Xd,setVolume:s=>ir(s),setLiveLowLatency:du,hideControls:()=>es(!1),showControls:()=>es(!0),setQuality:s=>Wa(s),setTrafficSavingEnabled:s=>Ga(s),setHighQualityEnabled:s=>qa(s),changeAudioStream:kd}},callbacks:r,setUiCallbacks:s=>{V=Be({},s)},getAdmanWrapper:()=>x,getLogger:()=>U,getPlayer:()=>m,destroy:Eu};return We};import{now as Sf,ValueSubject as If}from"@vkontakte/videoplayer-shared/es2015";import{cloneDeepWith as Nf,InterfaceLanguage as Df,Observable as Lf,Subscription as kf,InternalsExposure as Cf,skip as $f,getPlayerId as Of}from"@vkontakte/videoplayer-shared/es2015";import{clientChecker as Rf}from"@vkontakte/videoplayer-core/es2015";import{OneStat as Pf,ThinOneStat as Vf,MediascopePixel as jf}from"@vkontakte/videoplayer-statistics/es2015";function to(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}import{devNull as Ma}from"@vkontakte/videoplayer-shared/es2015";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)}};import{getWindow as xf}from"@vkontakte/videoplayer-shared/es2015";var Ta=xf().HTMLElement||class{constructor(){this.isConnected=!1}};var Ef=Object.defineProperty,Ad=Object.getOwnPropertySymbols,Tf=Object.prototype.hasOwnProperty,Mf=Object.prototype.propertyIsEnumerable,wa=(t,e,i)=>e in t?Ef(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,xd=(t,e)=>{for(var i in e||(e={}))Tf.call(e,i)&&wa(t,i,e[i]);if(Ad)for(var i of Ad(e))Mf.call(e,i)&&wa(t,i,e[i]);return t},Ge=(t,e,i)=>wa(t,typeof e!="symbol"?e+"":e,i),wf=(t,e,i)=>new Promise((n,o)=>{var a=u=>{try{r(i.next(u))}catch(h){o(h)}},d=u=>{try{r(i.throw(u))}catch(h){o(h)}},r=u=>u.done?n(u.value):Promise.resolve(u.value).then(a,d);r((i=i.apply(t,e)).next())}),Uf={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Df.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},Ed=He(void 0),Ko=class extends Ta{constructor(){super(),Ge(this,"svelteStubComponent"),Ge(this,"svelteRootComponent"),Ge(this,"svelteErrorComponent"),Ge(this,"store"),Ge(this,"statistics"),Ge(this,"_shadowRoot"),Ge(this,"playerContainer"),Ge(this,"rootContainer"),Ge(this,"stateContainer"),Ge(this,"shadowRootContainer"),Ge(this,"playerId"),Ge(this,"uiConfig"),Ge(this,"coreConfig"),Ge(this,"statisticsConfig"),Ge(this,"metaConfig"),Ge(this,"currentPlayingVideoIndex",0),Ge(this,"videoConfig"),Ge(this,"subscription"),Ge(this,"focusManager"),Ge(this,"prevIsid"),Ge(this,"isInited",!1),Ge(this,"postponedInitParams",null),Ge(this,"internalsExposure",null),Ge(this,"fatalError$",new If(null)),Ge(this,"createOneStat",(e,i={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:o,statUserSalt:a,statTrackCode:d,statVKAppId:r,refreshStatAuthToken:u,autoplay:h,isTouch:f,refDomain:l,deviceId:c}=to(this.videoConfig,i),{unitedVideoId:v,isClip:b=!1}=e;if(this.uiConfig.features.statistics&&v)try{return new Pf({movieId:v,albumId:n,place:o,trackCode:d,vkAppId:r,autoplay:h!=null?h:!1,mobile:f,clip:b,refDomain:l,deviceId:c,isPreviewPlayerView:!1},{refreshAuthToken:u,userSalt:a,config:this.statisticsConfig})}catch(g){console.error(g)}}),this.subscription=new kf,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Ri(ga,{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=Ri(va,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}=to(this.videoConfig,i),{unitedVideoId:d}=e;if(this.uiConfig.features.thinStatistics&&d)return new Vf.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:u,muted:h,fromTime:f,canRewindLive:l,supportLink:c,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}=to(this.videoConfig,i),{sources:K,title:re,thumbUrl:V,unitedVideoId:G,duration:F,adsParams:Z={},previewThumbsData:Ae,subtitles:X,subtitlesForcedLanguage:le,live:Y,adsExternalApi:ve}=e;if(!K&&!Y){let se=new Error("empty sources and live");this.fatalError$.next(se),(o=m==null?void 0:m.onCrashed)==null||o.call(m,se.message);return}let B=xd(xd({},y),Z),je={focusManager:this.focusManager},Ie=this.createOneStat(e,i),de=this.createThinOneStat(e,i),O;k&&(O=new jf({pixels:k})),(Ie||de)&&(this.statistics=new Yo(Ie,de,O)),this.store=bd({player:n,interfaceLanguage:C,isCyrillicRelatedInterface:D,videoId:G,isLiveCatchUpMode:w,isAudioDisabled:N,statAuthToken:a,callbacks:m,webApi:je,previewThumbsData:Ae,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 ue=()=>{var se,pe,Ee,Me,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 Lf(L=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(R=>L.next(R)))}).pipe($f(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,ee,ae,we;if(L)(R=m==null?void 0:m.onMute)==null||R.call(m);else{let ke=(ae=((ee=this.store)==null?void 0:ee.state.volume$)&&ye(this.store.state.volume$))!=null?ae:0;(we=m==null?void 0:m.onUnmute)==null||we.call(m,ke)}})),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)})),Se(Ed,{sources:K,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:re,thumbUrl:V,subtitles:X,subtitlesForcedLanguage:le,live:Y,preload:d,autoplay:r,muted:h,volume:u,fromTime:f,canRewindLive:l,supportLink:c,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:ve,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let S={target:this.playerContainer,props:j(Ed)};this.svelteRootComponent=Ri(ma,S),this.isInited||(this.isInited=!0,(Ee=(pe=(se=this.videoConfig)==null?void 0:se.callbacks)==null?void 0:pe.onInited)==null||Ee.call(pe)),(Me=this.internalsExposure)==null||Me.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)?Ma.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):Ma.destroy("ui")};this.coreConfig.asyncResolveClientChecker?Rf.isInited$.subscribe(se=>{se&&(console.log("UI TV SDK async start"),ue())}):ue()}initPlayer(e,i={}){var n,o,a,d,r,u,h,f,l,c,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=to(Uf,Nf(e,g=>g instanceof Ta?g:void 0)),this.playerId=Of(e.playerId),this.uiConfig=Ll((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&&((u=this.internalsExposure)!=null||(this.internalsExposure=new Cf("ui",this.playerId))),Ma.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:[Sf()]}),(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=(c=this.uiConfig.ads.slot)!=null?c: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)}setLanguage(e){return wf(this,null,function*(){var i;yield(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&&Wn(e)}};import{InterfaceLanguage as VN,VKNumericLanguage as jN,loadVKLangPack as UN}from"@vkontakte/videoplayer-shared/es2015";import{VideoQuality as FN,VideoFormat as HN}from"@vkontakte/videoplayer-core/es2015";var $N=()=>{window.customElements.define("vk-video-player-tv",Ko)};export{VN as InterfaceLanguage,Co as VERSION,jN as VKNumericLanguage,HN as VideoFormat,FN as VideoQuality,UN as loadVKLangPack,$N as registerPlayerWebComponent};