@vkontakte/videoplayer-tv 1.0.4-dev.74465ac5.0 → 1.0.4-dev.7be47b47.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.
Files changed (50) hide show
  1. package/esnext.esm.js +50 -41
  2. package/package.json +4 -4
  3. package/types/VKVideoPlayerTv/HTMLElement.d.ts +1 -1
  4. package/types/VKVideoPlayerTv/index.svelte.d.ts +94 -94
  5. package/types/components/Ads/admanWrapper.d.ts +75 -75
  6. package/types/components/Ads/types.d.ts +26 -26
  7. package/types/components/Controls/types.d.ts +3 -3
  8. package/types/components/Icons/constants.d.ts +5 -5
  9. package/types/components/Icons/utils.d.ts +1 -1
  10. package/types/components/Root/types.d.ts +49 -49
  11. package/types/config.d.ts +95 -95
  12. package/types/constans/index.d.ts +2 -2
  13. package/types/index.d.ts +10 -10
  14. package/types/services/statistics.d.ts +13 -13
  15. package/types/store/index.d.ts +207 -207
  16. package/types/store/utils.d.ts +34 -34
  17. package/types/translation/index.d.ts +2 -2
  18. package/types/translation/labels.d.ts +1 -1
  19. package/types/translation/packs/en.d.ts +1 -1
  20. package/types/translation/packs/ru.d.ts +1 -1
  21. package/types/translation/types.d.ts +5 -5
  22. package/types/types/index.d.ts +199 -199
  23. package/types/types/svg.d.d.ts +5 -0
  24. package/types/utils/WebVttParser.d.ts +11 -11
  25. package/types/utils/attachments/defferedDisableByCondition.d.ts +3 -3
  26. package/types/utils/changeVolume.d.ts +6 -6
  27. package/types/utils/elementHelpers.d.ts +2 -2
  28. package/types/utils/findCurrentSubtltlePhrase.d.ts +1 -1
  29. package/types/utils/fullscreen.d.ts +14 -14
  30. package/types/utils/roundFps.d.ts +1 -1
  31. package/types/utils/sanitizeHtml.d.ts +3 -3
  32. package/types/utils/sorts.d.ts +2 -2
  33. package/types/utils/stack/index.d.ts +7 -7
  34. package/types/utils/stack/node.d.ts +3 -3
  35. package/types/utils/subtitles.d.ts +8 -8
  36. package/types/utils/timeout.d.ts +2 -2
  37. package/types/utils/userSettings.d.ts +23 -18
  38. package/types/utils/videoConfig.d.ts +6 -2
  39. package/types/utils/volumeChange.d.ts +1 -1
  40. package/types/utils/webAPI/focusLock.d.ts +30 -30
  41. package/types/utils/webAPI/focusManager.d.ts +15 -15
  42. package/types/utils/webAPI/language.d.ts +1 -1
  43. package/es2015.cjs +0 -52
  44. package/es2015.esm.js +0 -52
  45. package/es2018.cjs +0 -52
  46. package/es2018.esm.js +0 -52
  47. package/es2024.cjs +0 -52
  48. package/es2024.esm.js +0 -52
  49. package/esnext.cjs +0 -52
  50. package/evergreen.esm.js +0 -52
package/esnext.esm.js CHANGED
@@ -1,52 +1,61 @@
1
1
  /**
2
- * @vkontakte/videoplayer-tv v1.0.4-dev.74465ac5.0
3
- * Mon, 02 Mar 2026 09:09:07 GMT
2
+ * @vkontakte/videoplayer-tv v1.0.4-dev.7be47b47.0
3
+ * Mon, 02 Mar 2026 14:59:55 GMT
4
4
  * https://st.mycdn.me/static/vkontakte-videoplayer/1-0-4/doc/
5
5
  */
6
- var tu=Object.create;var Ga=Object.defineProperty;var iu=Object.getOwnPropertyDescriptor;var nu=Object.getOwnPropertyNames;var ou=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var au=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var su=(e,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nu(t))!ru.call(e,o)&&o!==i&&Ga(e,o,{get:()=>t[o],enumerable:!(n=iu(t,o))||n.enumerable});return e};var lu=(e,t,i)=>(i=e!=null?tu(ou(e)):{},su(t||!e||!e.__esModule?Ga(i,"default",{value:e,enumerable:!0}):i,e));var zl=au(()=>{"use strict";AdmanHTML=function(){"use strict";function e(x){x&&typeof x=="string"&&new AdmanHTML.OpenLinkPopupRender(C).open(x)}function t(x){Me.initMode(x.slot?"slot":"json",{slot:x.slot,version:C.version}),C.slotId=x.slot,C.playerEl=x.playerEl,C.wrapper=x.wrapper,C.videoEl=x.videoEl,C.audioEl=x.audioEl,C.clickEl=x.clickEl,C.quality=parseInt(x.videoQuality||x.params&&x.params.videoQuality||360,10),C.browser=x.browser||{},C.config=x.config||{},C.pauseOnHide=x.pauseOnHide||!1,C.viewabilityValue=x.viewabilityValue||.5,C.viewabilityEl=x.viewabilityEl||C.videoEl,C.disclaimer=x.disclaimer!==!1,C.callToActionButton=x.callToActionButton!==!1,C.forcePreloadAdditionalData=!!x.forcePreloadAdditionalData,C.ctaStyles=x.ctaStyles,C.pause=p,C.resume=a,C.openPopup=e;var G=AdmanHTML.Utils.getPageLocation(),ie=AdmanHTML.Utils.getHostname(G||""),Re=AdmanHTML.Utils.isMobile(navigator.userAgent||navigator.vendor||window.opera);AdmanHTML.Utils.isElement(C.videoEl)&&Re&&C.videoEl.setAttribute("playsinline",""),C.location={top:G,topEncoded:encodeURIComponent(G||""),hostname:ie,hostnameEncoded:encodeURIComponent(ie||"")},Me.rb(Me.code.ADMAN_SUCCESSFULLY_INITIALIZED),C.stats.metrics("initing"),b=x.midrollPointsP||null,je=!b&&x.midrollPoints?x.midrollPoints:null,C.config.vpaidJsInterface||(C.config.vpaidJsInterface=q),C.config.vpaidHtmlInterface||(C.config.vpaidHtmlInterface=ce);var $e="https://ad.mail.ru/vp/"+C.slotId+"?app_name=admanhtml&version="+this.getVersion();if(x.params&&x.params.constructor&&x.params.constructor===Object){var Je=[];"flash"in x.params||(x.params.flash=AdmanHTML.Utils.checkFlash()?1:0);for(var Be in x.params)x.params.hasOwnProperty(Be)&&Je.push(Be+"="+x.params[Be]);var nt=AdmanHTML.Utils.getUserIdQuery();nt&&Je.push(nt),Je.length&&($e+="&"+Je.join("&"))}if((C.slotId||x.json||x.adUrl)&&!C.browser.adBlock){var Ke={},ai=this;C.slotId?Ke.url=$e:x.adUrl?(x.adUrl.indexOf("ad.mail.ru/")!==-1&&(x.adUrl+=x.adUrl.indexOf("?")===-1?"?":"&",x.adUrl+="version="+this.getVersion()),Ke.url=x.adUrl):Ke.data=x.json,de=new AdmanHTML.AdSlot(C,Ke,function(){var si=de.getRootSettings()||{},fi=si.requestHostname;if(fi&&!AdmanHTML.Utils.matchHostname(C.location.hostname,fi,j))return C.stats.logError("HOSTNAME_MISMATCH:"+fi+":"+C.location.topEncoded,{impressionID:si.impressionID,padID:si.padID,bannerIDs:si.bannerIDs}),void(C.callbacks.onError&&C.callbacks.onError());C.location.hostname||C.stats.logError("HOSTNAME_EMPTY:"+fi+":"+C.location.topEncoded),C.cb("onReady",[{settings:de.settings}]);var Li=1e6,Si=[],He=[],Ue=x.params&&x.params.duration?parseInt(x.params.duration,10):Li;Ue===0&&(Ue=Li),je&&je.sort(AdmanHTML.Utils.numSorter),b&&b.sort(AdmanHTML.Utils.numSorter);var Xe=de.getSection("midroll")||[],Uo=de.getServices("midroll",function(vt){return!vt.started()&&vt.isAfter()})||[];Xe=Xe.concat(Uo),Xe.forEach(function(vt){var qe=vt.getAd();qe.point||qe.pointP||(qe.pointP=50)}),Xe.sort(function(vt,qe){var Bi=vt.getAd(),Wi=qe.getAd();return Bi.pointP&&Wi.pointP?Bi.pointP-Wi.pointP:(Bi.point||Bi.pointP/100*Ue)-(Wi.point||Wi.pointP/100*Ue)}).forEach(function(vt){if(!vt.isEmpty||!vt.isEmpty()){var qe=vt.getAd();je&&je.length?(qe.point=je.shift(),qe.pointP=null,He.push(qe.point),vt.addImmutableProperty("point",qe.point)):b&&b.length?(qe.pointP=b.shift(),qe.point=null,Si.push(qe.pointP),vt.addImmutableProperty("pointP",qe.pointP)):je||b||(qe.point?(vt.addImmutableProperty("point",qe.point),He.push(qe.point)):qe.pointP&&(vt.addImmutableProperty("pointP",qe.pointP),Si.push(qe.pointP)))}}),$=Si.sort(AdmanHTML.Utils.numSorter),I=He.sort(AdmanHTML.Utils.numSorter);var Yi=de.getSection("research");Yi&&Yi.length>0&&(Se=Yi[0]),C.pauseOnHide&&xe(ai)})}else{Me.logError("Adman init failed");var Qt=C.callbacks.onError;Qt&&Qt(),F=he=Y=null}}function i(x,G){G=G||!1;var ie;if(F&&(F.log("sectionShown"),F.disposed||(F.dispose(),F.disposed=!0,k(F,Y)),x&&F.log("closedByUser")),Y&&!ue[Y]&&(ue[Y]=Y!=="midroll",ie=x?C.callbacks.onClosed:C.callbacks.onCompleted),Ce[Y]&&he&&(Ce[Y]=Ce[Y].concat(he.splice(0,he.length))),F=he=Y=null,s(),typeof G=="object"&&G.force===!0)return void((ie=C.callbacks.onError)&&ie(G.message));ie&&ie()}function n(x){var G=de.getSettings(Y).maxBannersShow||0,ie=ke[Y]||0,Re=!G||ie<G;if(F&&!F.disposed&&(F.complete&&F.log("playbackCompleted"),F.dispose(),F.disposed=!0,k(F,Y)),he&&he.length&&Re)F=he.shift(),ke[Y]=ie+(F.isEmpty()?0:1),F.reset(),F.started=!0,F.start();else{var $e=de.getNextAfterService(Y);Y!=="midroll"&&$e&&Re?$e.start(function(){he=de.getSection(Y),n()}):de.getSettings(Y).loop&&Ce[Y]&&Ce[Y].length?(he=Ce[Y],Ce[Y]=[],n()):i(!1,x)}}function o(x){he||(Y=x||"preroll",de.resetServices(Y),ue[Y]=!1,he=de.getSection(Y),x==="midroll"&&(he=c(he)),n(),Y&&(Ce[Y]=Ce[Y]||[]),F&&(F.log("sectionStarted"),C.debugMode&&console.log(Y,F.getAd(),F.getSettings(),he)),r(Y),C.stats.metrics("started"))}function r(x){(Le=de.getDebug(x))&&Le.start()}function s(){Le&&Le.dispose(),Le=null}function u(x,G){function ie(He,Ue){for(var Xe=0;Xe<He.length&&!(Math.abs(He[Xe])>Ue);Xe++);return Xe>0?[He[Xe-1]]:[]}function Re(He){var Ue=He.getAd();return!(Ue.point&&I.indexOf(Ue.point)===-1||Ue.pointP&&$.indexOf(Ue.pointP)===-1)&&(Ue.point&&Ue.point<=si||Ue.pointP&&Ue.pointP<=fi)}function $e(){U=$.reduce(function(He,Ue){var Xe=Math.ceil(G*Ue/100);He.indexOf(Xe)===-1&&He.push(Xe)},I).sort(AdmanHTML.Utils.numSorter)}function Je(He){return U.reduce(function(Ue,Xe){return Ue===0&&Xe>0&&Xe-He>=0?Xe-He:Ue},0)}if(!isNaN(x)&&!isNaN(G)){var Be=parseInt(x),nt=Math.floor(100*x/G);le=G,ee=$&&isFinite(nt)?ie($,nt):[],re=I?ie(I,Be):[],ee[0]&&re[0]&&(Math.abs(ee[0]*le/100)>Math.abs(re[0])?re=[]:ee=[]);var Ke=typeof de=="object"&&typeof de.getSettings=="function"?de.getSettings("midroll").midpointAllowableDelta:void 0;S=Ke??S;var ai=100*S/G,Qt=S!==0&&S<5?S:5,si=Be+Qt,fi=nt+Qt/G*100;if(de.getServices("midroll",function(He){return!(!He.isAfter()||He.started()||!Re(He))}).forEach(function(He){var Ue=Be-He.getAd().point,Xe=nt-He.getAd().pointP;Ue<S||Xe<ai||S===0?He.start():C.debugMode&&console.log("skip midroll fetch")}),ee.length&&ee[0]>0||re.length&&re[0]>0){var Li=!1,Si=de.getSection("midroll");Si&&Si.forEach(function(He){var Ue=He.getAd();(Ue.pointP&&~ee.indexOf(Ue.pointP)||Ue.point&&~re.indexOf(Ue.point))&&(Li=!0)}),Li&&C.cb("adMidrollPoint",[x])}return C.forcePreloadAdditionalData?($e(),Je(x)):void 0}}function c(x){function G(Re,$e){var Je=Re.getAd(),Be=$e.getAd();return(Je.point||Je.pointP*le/100)-(Be.point||Be.pointP*le/100)}var ie=[];return x&&x.forEach(function(Re){var $e=Re.getAd();($e.pointP&&~ee.indexOf($e.pointP)||$e.point&&~re.indexOf($e.point))&&ie.push(Re)}),I.forEach(function(Re,$e){~re.indexOf(Re)&&(I[$e]=-I[$e])}),$.forEach(function(Re,$e){~ee.indexOf(Re)&&($[$e]=-$[$e])}),ie.sort(G),ie}function h(){C.cb("onSkipped"),F&&(F.log("closedByUser"),F.skip(n))}function p(){F&&(F.log("playbackPaused"),F.pause())}function a(x){F&&(x||F.log("playbackResumed"),F.resume())}function d(x){x=x<0?0:x>1?1:x,F&&F.setVolume(x)}function m(){F&&F.log("fullscreenOn")}function g(){F&&F.log("fullscreenOff")}function _(){i()}function v(x,G){C.callbacks[x]=G}function L(x){var G=[],ie=de.getSection(x||"preroll");return ie&&ie.forEach(function(Re){Re.isEmpty()||G.push(Re.getExtendedAdForApp())}),G}function N(x){return de.getAfterServices(x||"preroll")}function k(x,G){x.isEmpty()||x.isStat()||Ce[G]&&Ce[G].push(x)}function y(x){return(x.right-x.left)*(x.bottom-x.top)}function T(x,G){return{left:x.left+G.left,right:x.right+G.left,top:x.top+G.top,bottom:x.bottom+G.top}}function w(x){return x&&!isNaN(x)?x:null}function E(x,G){var ie=x.document,Re=G==="width"?"clientWidth":"clientHeight",$e=G==="width"?"innerWidth":"innerHeight",Je=x[$e],Be=ie.body[Re],nt=ie.documentElement[Re],Ke=1/0;return Ke=w(Be)||Ke,Ke=w(nt)||Ke,Je&&!isNaN(Je)&&(Ke=Math.min(Ke,Je)),Ke}function f(x){return{width:E(x,"width"),height:E(x,"height")}}function B(x,G){var ie=f(G);return{left:Math.max(0,x.left),right:Math.min(ie.width,x.right),top:Math.max(0,x.top),bottom:Math.min(ie.height,x.bottom)}}function A(x,G){try{for(var ie=x.getBoundingClientRect(),Re=y(ie),$e=G,Je=$e.parent;$e!==Je;){var Be=$e.frameElement.getBoundingClientRect();ie=T(ie,Be);var nt=Math.max(Be.left,ie.left),Ke=Math.min(Be.right,ie.right),ai=Math.max(Be.top,ie.top),Qt=Math.min(Be.bottom,ie.bottom);ie.left=nt,ie.right=Ke<nt?nt:Ke,ie.top=ai,ie.bottom=Qt<ai?ai:Qt,$e=$e.parent}ie=B(ie,Je);var si=y(ie);return{left:ie.left,right:ie.right,top:ie.top,bottom:ie.bottom,percent:si/Re*100}}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function O(){return window.hasOwnProperty("IntersectionObserver")}function D(x){try{if(x===x.top)return"ON_PAGE";for(var G=x;G!==G.parent;){if(G.document.domain!==G.parent.document.domain)return"XD_FRAME";G=G.parent}return"S_FRAME"}catch{}return"XD_FRAME"}function Z(x){return!O(x)&&D(x)!=="XD_FRAME"}function ae(x,G,ie){te(ie,A(x,window).percent>=100*G)}function P(x){return x.mozVisibilityState?"mozvisibilitychange":x.webkitVisibilityState?"webkitvisibilitychange":x.visibilityState?"visibilitychange":""}function W(x){te(x,!0)}function H(x){te(x,!1)}function te(x,G){var ie=x.getPlayStatus();x.prevVisibility!==G&&(x.prevVisibility=G,ie.curStatus!==void 0&&ie.curStatus!==ie.prevStatus&&(G?x.resume():x.pause()))}function xe(x){var G=x,ie=C.viewabilityValue,Re=C.viewabilityEl;if(Re){if(O()){var $e=new IntersectionObserver(function(nt){nt.forEach(function(Ke){te(G,Ke.intersectionRatio>=ie)})},{threshold:[.1,.2,.3,.4,.5,.6,.7,.8,.9,1]});$e.observe(Re)}else if(Z){var Je=function(){ae(Re,ie,G)};window.addEventListener("resize",Je,!1),window.addEventListener("scroll",Je,!1)}}var Be=(P(document),X.hasFocus());setInterval(function(){var nt=X.hasFocus();Be!==nt&&(Be=nt,Be?W(G):H(G))},500)}function J(){return C.playStatus===void 0?{prevStatus:void 0,curStatus:void 0}:C.playStatus}var de,Y,he,F,Le,Se,le,C={version:"2.2.57",debugMode:!0,callbacks:{},cb:function(x,G){switch(x){case"onCompleted":F&&(F.complete=!0),n();break;case"onError":F&&(F.error=!0),n(G);break;case"onClosed":i(!0);break;default:var ie=C.callbacks[x];ie&&ie.apply(this,G)}}},se=window.location.protocol==="http:"?"http:":"https:",q=se+"//ad.mail.ru/static/admanhtml/vpaid-js-interface.swf",ce=se+"//ad.mail.ru/static/rbadman-vpaid.html",Me=new AdmanHTML.Stats(C),Ie=new AdmanHTML.Viewability,je=[],b=[],I=[],$=[],U=[],ee=[],re=[],ke={},Ce={},S=3,j=function(){for(var x=window,G=frameElement;G;){try{G=x.parent.frameElement}catch{break}x=x.parent}return x}(),X=j.document;C.stats=Me,C.viewability=Ie,C.protocol=se,C.stats.metrics();var ue={};return{init:t,start:o,stop:_,pause:p,resume:a,setVolume:d,fullscreenOn:m,fullscreenOff:g,setFullscreen:function(x){x?m():g()},skip:h,destroy:_,getPlayStatus:J,getSlot:function(){return C.slotId},setSlot:function(x){C.slotId=x},getVersion:function(){return C.version},getBannersForSection:L,getServicesForSection:N,hasSection:function(x){return x=x||"preroll",!(!L(x).length&&!N(x).length)},setDebug:function(x){C.debugMode=x},setPosition:u,getUserIdQuery:AdmanHTML.Utils.getUserIdQuery,onReady:v.bind(this,"onReady"),onError:v.bind(this,"onError"),onStarted:v.bind(this,"onStarted"),onPaused:v.bind(this,"onPaused"),onPlayed:v.bind(this,"onPlayed"),onCompleted:v.bind(this,"onCompleted"),onClosed:v.bind(this,"onClosed"),onSkipped:v.bind(this,"onSkipped"),onClicked:v.bind(this,"onClicked"),onTimeRemained:v.bind(this,"onTimeRemained"),onDurationChanged:v.bind(this,"onDurationChanged"),adMidrollPoint:v.bind(this,"adMidrollPoint"),_onVPAIDStarted:v.bind(this,"onVPAIDStarted"),research:{pause:function(){Se&&Se.pause()},resume:function(){Se&&Se.resume()},complete:function(){Se&&Se.setComplete()},setVolume:function(x){Se&&Se.setVolume(x)},setFullscreen:function(x){Se&&Se.setFullscreen(x)},setPosition:function(x,G){Se&&Se.setPosition(x,G)}}}},AdmanHTML.Ad=function(e,t){"use strict";function i(y){y&&y.forEach(function(T){n(T.url,T.type,T)})}function n(y,T,w){var E,f,B,A;if(y){try{y=decodeURIComponent(y)}catch{}if(T==="playheadReachedValue")w.thresholdValue!==void 0||w.value!==void 0?(E=parseInt(w.thresholdValue||w.value,10),t.stats.push({name:"thresholdValue",value:E,type:"thresholdValue."+E,url:y})):w.thresholdPValue===void 0&&w.pvalue===void 0||(E=parseInt(w.thresholdPValue||w.pvalue,10),t.stats.push({name:"thresholdPValue",value:E,type:"thresholdPValue."+E,url:y}));else if(T==="playheadViewabilityValue"){var O=parseInt(w.viewablePercent,10),D=w.ovv===void 0&&w.mrc===void 0||!!w.ovv||!!w.mrc,Z="";B=w.startTimer!==void 0?parseInt(w.startTimer,10):0,A=w.endTimer!==void 0?parseInt(w.endTimer,10):0,O=isNaN(O)?50:O,w.value!==void 0?(E=parseInt(w.value,10),f="ovvValue"):w.pvalue!==void 0?(E=parseInt(w.pvalue,10),f="ovvPValue"):w.duration!==void 0&&(E=parseInt(w.duration,10),f="mrcValue",D||(Z=w.unload?"unload":"complete"));var ae={name:f,value:E,url:y,percent:O,viewable:D,start:B,end:A,onevent:Z};"target"in w&&(ae.target=w.target),t.stats.push(ae)}else if(T==="playheadTimerValue"){B=w.startTimer!==void 0?parseInt(w.startTimer,10):0,A=w.endTimer!==void 0?parseInt(w.endTimer,10):0;var P=w.rate!==void 0?parseInt(w.rate,10):1;t.stats.push({name:"timerValue",rate:P,url:y,start:B,end:A})}else t.stats.push({name:T,type:T,url:y})}}function o(y){t.click=y,t.ad&&(t.ad.urlToNavigateOnClick=y)}function r(y,T){t.extensions[y]=T}function s(y,T,w){!w&&y in t.immutables||(t.immutables[y]=T)}function u(y){t.settings=t.settings||{},AdmanHTML.Utils.deepExtend(t.settings,y)}function c(y){function T(A){var O=A.type||"";return!(~O.indexOf("video")&&O!=="video/mp4"||~O.indexOf("audio")&&O!=="audio/mp3"&&O!=="audio/mpeg")}function w(){e.stats.rb(e.stats.code.UNKNOWN_ADV_TYPE),e.stats.logError("UNKNOWN_ADV_TYPE")}if(t.ad=y,t.click&&(t.ad.urlToNavigateOnClick=t.click),AdmanHTML.Utils.mixin(t.ad,t.extensions),AdmanHTML.Utils.mixin(t.ad,t.immutables),t.ad.mediafiles&&t.ad.mediafiles.length){var E;t.ad.mediafiles.forEach(function(A){T(A)&&(!E||Math.abs(parseInt(A.height)-e.quality)<Math.abs(parseInt(E.height)-e.quality))&&(E=A)}),E&&AdmanHTML.Utils.mixin(t.ad,E)}delete t.ad.statistics,delete t.ad.mediafiles;var f,B;switch(t.ad.type){case"swf":case"application/x-shockwave-flash":if(B=t.ad.apiFramework||t.ad.api,e.browser.mobile||B&&B!=="VPAID")return w(),!1;f=B?new AdmanHTML.VpaidSwfAdRenderer(e,this):new AdmanHTML.SwfAdRenderer(e,this);break;case"javascript":case"application/javascript":if((B=t.ad.apiFramework||t.ad.api)&&B!=="VPAID")return w(),!1;f=new AdmanHTML.VpaidJsAdRenderer(e,this);break;case"video":case"video/mp4":f=new AdmanHTML.VideoAdRenderer(e,this);break;case"audio":case"audio/mp3":case"audio/mpeg":f=new AdmanHTML.AudioAdRenderer(e,this);break;case"image":case"image/bmp":case"image/gif":case"image/jpeg":case"image/png":f=new AdmanHTML.ImgAdRenderer(e,this);break;case"text":f=new AdmanHTML.TextAdRenderer(e,this);break;case"html":f=new AdmanHTML.HtmlAdRenderer(e,this);break;case"empty":f=new AdmanHTML.EmptyAdRenderer(e,this);break;case"statistics":f=new AdmanHTML.StatisticsAdRenderer(e,this);break;case"debugData":f=new AdmanHTML.DebugAdRenderer(e,this);break;case"research":f=new AdmanHTML.ResearchAdRenderer(e,this);break;case"video/x-flv":default:return w(),!1}return t.renderer=f,!0}function h(){return new AdmanHTML.Ad(e,JSON.parse(JSON.stringify(t)))}function p(){this.started&&(t.ad&&c.call(this,t.ad),this.disposed=!1,this.completed=!1,this.error=!1,this.started=!1),t.statsBackup?t.stats=t.statsBackup.slice():t.statsBackup=t.stats.slice()}function a(y,T,w){var E=y.url;E=E.replace("{requesthostname}",e.location.hostnameEncoded||""),AdmanHTML.Utils.loadImg(E);var f=T.indexOf(y);~f&&w&&T.splice(f,1)}function d(y,T){var w=T.indexOf(y);~w&&T.splice(w,1)}function m(y,T){function w(D){D=25*Math.floor(D/25);var Z=k["thresholdPValue."+D];Z&&(A=A.concat(Z))}var E=t.stats.slice(0);if(Array.isArray(y)){var f;for(f=0;f<y.length&&!~E.findIndex(function(D){return D.name===y[f]});f++);y=y[f]||y.slice(-1)}if(!e.isPopupOpen||y!=="playbackPaused"&&y!=="playbackResumed"){var B=y+(T===void 0?"":"."+T),A=k[B]?k[B].slice(0):[];A.push(B),y==="thresholdPValue"&&w(T);var O=y==="thresholdPValue"||y==="thresholdValue"||y==="closedByUser";t.stats.forEach(function(D){(y==="thresholdPValue"&&D.name==="thresholdPValue"&&D.value<T||y==="thresholdValue"&&D.name==="thresholdValue"&&D.value<T)&&a(D,E,O),~A.indexOf(D.type)&&a(D,E,O)}),t.stats=E}}function g(y,T){function w(O,D){D[Math.ceil(O.percent/10)].duration>=1e3*O.value?O.viewable?a(O,f,!0):d(O,f):B++}function E(O){O.viewable||O.onevent===T&&a(O,f,!0)}var f=t.stats.slice(0),B=0,A=y&&y.length?w:E;return t.stats.forEach(function(O){O.name==="mrcValue"&&A(O,y)}),t.stats=f,B}function _(y,T){var w,E,f=t.stats.slice(0);t.stats.forEach(function(B){(B.name==="ovvValue"&&B.value<=y||B.name==="ovvPValue"&&B.value<=T)&&(w=w||e.viewability.getViewabilityState(),E=w.percent>B.percent&&w.focus,w.state!=="UNDETERMINED"&&(E&&B.viewable||!E&&!B.viewable)&&AdmanHTML.Utils.loadImg(B.url),d(B,f))}),t.stats=f}function v(y,T){t.renderer&&t.renderer[y]&&t.renderer[y](T)}function L(){var y={};return y=t.ad.type==="audio"||t.ad.type==="audio/mp3"||t.ad.type==="audio/mpeg"?{allowSeek:!1,allowSkip:!1,allowTrackChange:!1,allowVolumeChange:!1}:t.settings?{allowClose:!t.settings.hasOwnProperty("allowClose")||t.settings.allowClose,allowCloseDelay:t.settings.hasOwnProperty("allowCloseDelay")?t.settings.allowCloseDelay:0}:{allowClose:!0,allowCloseDelay:0},AdmanHTML.Utils.mixin(y,t.ad),y}function N(){var y=L();return y.statistics=t.stats.slice(0),y}t=t||{stats:[],extensions:{},immutables:{}};var k={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:r,addImmutableProperty:s,addSettings:u,getSettings:function(){return t.settings},addAd:c,getAd:function(){return t.ad},getAdForApp:L,getExtendedAdForApp:N,isEmpty:function(){return t.ad.type==="empty"},isStat:function(){return t.ad.type==="statistics"},clone:h,reset:p,log:m,logMRC:g,logOVV:_,start:v.bind(this,"start"),dispose:v.bind(this,"dispose"),pause:v.bind(this,"pause"),resume:v.bind(this,"resume"),setVolume:v.bind(this,"setVolume"),setFullscreen:v.bind(this,"setFullscreen"),setComplete:v.bind(this,"setComplete"),skip:v.bind(this,"skip"),setPosition:function(y,T){t.renderer&&t.renderer.setPosition&&t.renderer.setPosition(y,T)},complete:!1,error:!1}},AdmanHTML.AdSlot=function(e,t,i){"use strict";function n(A){N||(N={});for(var O in A)A.hasOwnProperty(O)&&(N[O]=A[O])}function o(A,O,D,Z,ae,P){function W(te){e.stats.metrics("inited");var xe={};--y,te&&(T++,te=typeof te=="string"?te.trim():te,typeof te=="object"||te.charAt(0)==="{"?(xe=u(te,A,O,D||0,Z,ae,P),w++):te.charAt(0)==="<"?(xe=c(te,A,O,D||0,Z,ae,P),w++):(e.stats.rb(e.stats.code.UNKNOWN_DATA_FORMAT),e.stats.logError("UNKNOWN_DATA_FORMAT"))),A.id&&(xe.banners||xe.services?xe.banners&&B.markNonEmptyService(A.id):B.markEmptyService(A.id)),r(P)}if(D&&D>4)return void r(P);var H=B.getService(A.id);H&&H.log("serviceRequested"),++y,A.url?(A.url.indexOf("ad.mail.ru/")!==-1&&A.url.indexOf("version="+e.version)===-1&&(A.url+=A.url.indexOf("?")===-1?"?":"&",A.url+="version="+e.version),AdmanHTML.Utils.xhr(A.url,W)):A.data&&setTimeout(W,0,A.data)}function r(A){if(!y){if(T&&w){var O=B.getNextOnEmptyService();if(O)return void O.start(r.bind(null,A));g();var D=A||i;return D.called||(D.called=!0,D()),void(e.debugMode&&console.log(v))}s()}}function s(){var A=e.callbacks.onError;A&&A()}function u(A,O,D,Z,ae,P,W){function H(le){return le?le.filter(function(C){return C.type&&(C.type==="sectionShown"||C.type==="sectionStarted"||C.type==="sectionEmpty")}):[]}function te(le,C,se,q){var ce=D?D.clone():new AdmanHTML.Ad(e);if(ce.addStatCollection(le.statistics),ce.addStatCollection(le.serviceStatistics),le.type==="additionalData"){var Me;le.id=le.id||AdmanHTML.Utils.createIntUID(),de.services++;var Ie=!v[se]||v[se].length===0;if(C>0&&Ie&&(f[se]=!0),le.extensions)for(var je in le.extensions)le.extensions.hasOwnProperty(je)&&h(ce,le.extensions[je],je);if(["point","pointP","hasVolume","hasPause","allowClose","allowCloseDelay","allowSeek","allowSkip","allowTrackChange","allowVolumeChange"].forEach(function($){$ in le&&ce.addImmutableProperty($,le[$])}),e.forcePreloadAdditionalData||le.doAfter!=="true"&&le.doAfter!==!0&&!le.doOnEmptyResponseFromId)Me=new AdmanHTML.ServiceAd(e),a(se,O.id,Me,le),C===0&&Ie?o(le,ce,Z+1,se,E.PRE,W):o(le,ce,Z+1,se,null,W);else{var b=le.doAfter==="true"||le.doAfter===!0?E.POST:null,I=function($,U){o(le,$||ce,le.allowRepeat?0:Z+1,se,b,function(){U&&U()})};Me=new AdmanHTML.ServiceAd(e,null,I),a(se,O.id,Me,le,ce)}}else p(se,q,ce,le),de.banners++;return ce}var xe,J=A,de={banners:0,services:0};if(typeof A=="string")try{J=JSON.parse(A)}catch{return e.stats.rb(e.stats.code.ERROR_CONVERTING_STRING_TO_JSON),void e.stats.logError("ERROR_CONVERTING_STRING_TO_JSON")}if(J.settings&&J.settings.requestHostname&&!N.requestHostname&&(N.requestHostname=J.settings.requestHostname),J&&J.settings&&(N=e.slot&&e.slot.getRootSettings()||N||{},n&&typeof n=="function")){var Y=J.sections&&J.sections.preroll&&J.sections.preroll.length&&J.sections.preroll[0]||null;n({impressionID:J.settings.impressionID||"",padID:J.settings.padID||"",bannerIDs:Y&&Y.bannerID||""})}for(var he in J.sections)if(J.sections.hasOwnProperty(he)){var F=J.sections[he],Le=0;if(J.settings&&(xe=J.settings[he])&&(xe.controlsStyle=J.settings.controlsStyle||0,m(he,xe)),F.forEach(function(le){if(le.type==="debugData"){var C=new AdmanHTML.Ad(e);return C.addClick(le.url),void d(he,C,le)}var se=ae===he?P:"",q=te(le,Le,he,se);xe&&(q.addStatCollection(H(xe.statistics)),q.addSettings(xe)),Le++}),F.length===0){var Se=new AdmanHTML.Ad(e);xe&&Se.addStatCollection(H(xe.statistics)),p(he,"",Se,{type:"empty"})}}return J.type&&te(J,0,ae,P),de}function c(A,O,D,Z,ae,P,W){function H(F,Le,Se){xe(F.getElementsByTagName(Le),Se)}function te(F,Le,Se,le){H(F,Le,function(C){le(de(C),Se?J(C,Se):null,C)})}function xe(F,Le){Array.prototype.forEach.call(F,Le.bind(this))}function J(F,Le){var Se=F.attributes.getNamedItem(Le);return Se?Se.value:null}function de(F){return F&&F.childNodes&&F.childNodes[0]&&F.childNodes[0].wholeText?F.childNodes[0].wholeText.trim():null}var Y,he={banners:0,services:0};try{Y=AdmanHTML.Utils.parseXml(A)}catch{return e.stats.rb(e.stats.code.ERROR_CONVERTING_STRING_TO_XML),void e.stats.logError("ERROR_CONVERTING_STRING_TO_XML")}return H(Y,"Ad",function(F){function Le(C){var se=D?D.clone():new AdmanHTML.Ad(e);te(F,"Impression","id",function(ce){try{se.addStat(ce,"playbackStarted")}catch{}}),te(F,"Extension","type",function(ce,Me){h(se,ce,Me)}),te(F,"Error",null,function(ce){se.addStat(ce,"error")}),te(C,"Tracking","event",se.addStat);var q=C.getElementsByTagName("VideoClicks")[0];return q&&xe(q.childNodes,function(ce){ce.tagName==="ClickThrough"?se.addClick(de(ce)):ce.tagName==="ClickTracking"&&se.addStat(de(ce),"click")}),se}function Se(C){var se={width:J(C,"width"),height:J(C,"height"),id:J(C,"id"),assetWidth:J(C,"assetWidth"),assetHeight:J(C,"assetHeight"),expandedWidth:J(C,"expandedWidth"),expandedHeight:J(C,"expandedHeight"),apiFramework:J(C,"apiFramework"),adSlotID:J(C,"adSlotID"),statistics:[]};return te(C,"StaticResource",null,function(q){se.staticResource=q}),te(C,"HTMLResource",null,function(q){se.htmlResource=q}),te(C,"IFrameResource",null,function(q){se.iframeResource=q}),te(C,"CompanionClickTracking",null,function(q){se.statistics.push({type:"click",url:q})}),te(C,"Tracking","event",function(q,ce){se.statistics.push({type:ce,url:q})}),te(C,"CompanionClickThrough",null,function(q){se.urlToNavigateOnClick=q}),se}var le=J(F,"id");H(F,"InLine",function(C){var se=[];H(C,"CompanionAds",function(q){var ce=J(q,"required")||"none";H(C,"Companion",function(Me){var Ie=Se(Me);Ie.required=ce,se.push(Ie)})}),H(C,"Linear",function(q){var ce,Me=Le(q),Ie=q.parentNode;Ie&&(ce=J(Ie,"adId")||J(Ie,"adID")||J(Ie,"AdId")||J(Ie,"AdID")||J(Ie,"id")),ce=ce||le;var je={bannerID:ce,mediafiles:[],duration:AdmanHTML.Utils.convertDuration(de(q.getElementsByTagName("Duration")[0]))};O.urlToNavigateOnClick&&(je.urlToNavigateOnClick=O.urlToNavigateOnClick),H(q,"MediaFile",function(b){je.mediafiles.push({apiFramework:J(b,"apiFramework"),type:J(b,"type"),width:J(b,"width"),height:J(b,"height"),src:de(b)})}),H(q,"AdParameters",function(b){je.params=de(b);try{var I=JSON.parse(je.params);if(I&&I.settings&&(N=e.slot&&e.slot.getRootSettings()||N||{},n&&typeof n=="function")){var $=I.sections&&I.sections.preroll&&I.sections.preroll.length&&I.sections.preroll[0]||null;I.settings&&I.settings.preroll,n({impressionID:I.settings.impressionID||"",padID:I.settings.padID||"",bannerIDs:$&&$.bannerID||""})}}catch(U){console.log(U)}}),se.length&&(je.companionAds=se),p(ae||"preroll",P,Me,je),he.banners++}),H(C,"NonLinear",function(q){var ce=Le(q),Me={width:J(q,"width"),height:J(q,"height"),duration:AdmanHTML.Utils.convertDuration(J(q,"minSuggestedDuration")),mediafiles:[]};te(q,"NonLinearClickThrough",null,function(Ie){ce.addStat(Ie,"click")}),te(q,"StaticResource","creativeType",function(Ie,je){Me.mediafiles.push({type:je,src:Ie})}),p(ae||"overlay",P,ce,Me),he.banners++})}),H(F,"VASTAdTagURI",function(C){he.services++,o({url:de(C),id:O.id},Le(F),Z+1,ae,P,W)})}),he}function h(A,O,D){D==="controls"?A.addExtension("showControls",!!parseInt(O,10)):D==="skipTime2"?(O=isNaN(O)?AdmanHTML.Utils.convertDuration("00:"+O):parseInt(O,10),A.addExtension("allowCloseDelay",O)):D==="linkTxt"&&(A.addExtension("linkText",O),A.addExtension("adText",O))}function p(A,O,D,Z){D.addAd(Z)&&(D.sectionType=A,O===E.PRE&&f[A]&&(O=""),A=(O||"")+A,v[A]=v[A]||[],v[A].push(D))}function a(A,O,D,Z,ae){D.addAd(Z),D.addInheritedAd(ae),D.addStatCollection(Z.statistics),D.addStatCollection(Z.serviceStatistics),D.sectionType=A,B.addService(D,O)}function d(A,O,D){O.addAd(D)&&(O.section=A,k[A]=O)}function m(A,O){L[A]=L[A]||{},AdmanHTML.Utils.mixin(L[A],O),delete L[A].statistics,delete L[A].view,delete L[A].advertisment}function g(){"preroll midroll pauseroll overlay postroll claimroll".split(" ").forEach(function(A){var O=f[A]?v[A]:v[E.PRE+A],D=f[A]?v[E.PRE+A]:v[A],Z=v[E.POST+A];v[A]=[].concat(O||[],D||[],Z||[]),_(E.PRE+A),_(E.POST+A)})}function _(A){v[A]=[]}var v={},L={},N={},k={},y=0,T=0,w=0,E={PRE:"pre-",POST:"post-"},f={},B=new AdmanHTML.ServiceStorage(e);return o({url:t.url,data:t.data}),{getSection:function(A){return v[A]},getAfterServices:B.getAfterServices,getNextAfterService:B.getNextAfterService,resetServices:B.resetAll,getServices:B.getServices,removeService:B.removeService,getSettings:function(A){return L[A]||{}},getRootSettings:function(){return N},getDebug:function(A){return k[A]}}},AdmanHTML.ServiceAd=function(e,t,i){"use strict";function n(m){return t.ad=m,!0}function o(m){t.inheritedAd=m}function r(m,g){t.inheritedAd.addImmutableProperty(m,g,!0)}function s(m){var g=m?m.filter(function(_){return _.type==="serviceRequested"||_.type==="serviceAnswerEmpty"}):[];g&&g.forEach(function(_){u(_.url,_.type,_)})}function u(m,g){m=decodeURIComponent(m),t.stats.push({name:g,type:g,url:m})}function c(m){d=!0,i&&i(t.inheritedAd,m)}function h(){d=!1}function p(){return!(e.forcePreloadAdditionalData||!t.ad||!t.ad.doAfter)&&(t.ad.doAfter===!0||t.ad.doAfter==="true")}function a(m){function g(v){AdmanHTML.Utils.loadImg(v.url);var L=_.indexOf(v);~L&&_.splice(L,1)}var _=t.stats.slice(0);t.stats.forEach(function(v){v.type===m&&g(v)}),t.stats=_}t=t||{stats:[]};var d=!1;return{addStatCollection:s,addStat:u,addAd:n,addInheritedAd:o,addImmutableProperty:r,getAd:function(){return t.ad},start:c,reset:h,started:function(){return d},log:a,isAfter:p}},AdmanHTML.ServiceStorage=function(e){"use strict";function t(_,v){var L=_.getAd();m.push(L.id),d[L.id]={service:_},v&&d[v]&&(d[v].children=d[v].children||[],d[v].children.push(L.id)),e.forcePreloadAdditionalData||L.doAfter!=="true"&&L.doAfter!==!0&&!L.doOnEmptyResponseFromId||a.push(_)}function i(_){return d[_]?d[_].service:null}function n(_){var v=typeof _=="string"||typeof _=="number"?_:_.getAd().id;delete d[v];var L,N;for(L=0,N=a.length;L<N;L++)if(_=a[L],_.getAd().id===v){a.splice(L,1);break}}function o(_,v){if(!_)return[];var L,N,k=[];for(L in d)d.hasOwnProperty(L)&&(N=d[L].service,N.sectionType!==_||v&&!v(N)||k.push(N));return k}function r(_){m.forEach(function(v,L){_===v?(d[v].service.log("serviceAnswerEmpty"),m.splice(L,1),g.push(_),delete d[v]):d[v].children&&d[v].children.indexOf(_)!==-1&&d[v].children.splice(d[v].children.indexOf(_),1)})}function s(_){var v=d[_];v&&(v.children=null)}function u(){var _,v,L,N;for(_=0,v=a.length;_<v;_++)if(L=a[_],(N=L.getAd().doOnEmptyResponseFromId)&&g.indexOf(N)!==-1&&!L.isAfter())return a.splice(_,1),L;return null}function c(_){if(!_)return[];var v,L,N,k=[];for(v=0,L=a.length;v<L;v++)N=a[v],N.sectionType===_&&N.isAfter()&&!N.started()&&k.push(N);return k}function h(_){if(!_)return null;var v,L,N,k;for(v=0,L=a.length;v<L;v++)if(N=a[v],N.sectionType===_&&N.isAfter()&&!N.started()){if((k=N.getAd().doOnEmptyResponseFromId)&&g.indexOf(k)===-1)continue;return N.getAd().allowRepeat||a.splice(v,1),N}return null}function p(_){var v,L,N;for(v=0,L=a.length;v<L;v++)N=a[v],_&&N.sectionType!==_||N.reset()}var a=[],d={},m=[],g=[];return{addService:t,getService:i,getServices:o,removeService:n,resetAll:p,markEmptyService:r,markNonEmptyService:s,getAfterServices:c,getNextAfterService:h,getNextOnEmptyService:u}},typeof define=="function"&&define.amd&&define(function(){"use strict";return AdmanHTML}),AdmanHTML.VpaidLoader=function(){"use strict";function e(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 t=300;return e.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},e.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{}},e.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<t)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>t?(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)}},e.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"))},e.prototype.vpaidMessageHandler=function(i){AdmanHTML.Utils.mixin(this._props,i.props),typeof this.onVpaidCallback=="function"&&this.onVpaidCallback(i.eventType,i.props)},e.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]},e.prototype.callGet=function(i){return this._props[i]},e.prototype.callSet=function(i,n){return i="set"+i.charAt(0).toUpperCase()+i.slice(1),this.call(i,[n])},e.prototype.send=function(i){this.adframe&&(i.id=this.id,this.adframe.contentWindow&&this.adframe.contentWindow.postMessage(JSON.stringify(i),"*"))},e.prototype.onVpaidEvent=function(i){this.onVpaidCallback=i},e.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},e}(),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(e){"use strict";function t(k){if(d){var y=g[k];y&&s("https://r.mail.ru/d"+y+".gif?rnd="+Math.random())}else m.push(k)}function i(k,y){if(!n()){if(k)try{Object.defineProperty(_,k,{writable:!1,enumerable:!0,value:y||Date.now()-c})}catch{}else _.sessionId=AdmanHTML.Utils._genSessionId();c=Date.now(),Object.keys(g).length&&s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&metrics="+encodeURIComponent(JSON.stringify(_))+"&slot="+(h==="slot"?e.slotId:"json"))}}function n(){return["media_error_code","vpaid_error_message","skipped","completed"].some(function(k){return _.hasOwnProperty(k)})}function o(k,y,T){var w=[];if(T)for(var E in T)T.hasOwnProperty(E)&&w.push(E+"="+String(T[E]));var f="";w.length&&(f="&"+w.join("&")),N||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&"+k+"="+encodeURI(y)+"&slot="+(h==="slot"?e.slotId:"json")+f),e.debugMode&&console&&console.log&&(console.log("MESSAGE: "+k+" = "+y),T&&console.log("MESSAGE EXTRA PARAMS: "+JSON.stringify(T)))}function r(k,y){var T=[];if(y)for(var w in y)y.hasOwnProperty(w)&&T.push(w+"="+String(y[w]));var E="";T.length&&(E="&"+T.join("&")),N||s("https://ad.mail.ru/admanhtml/?app=admanhtml&ver="+e.version+"&error="+encodeURI(k)+"&slot="+(h==="slot"?e.slotId:"json")+E),e.debugMode&&console&&console.warn&&console.warn("Error: "+k)}function s(k){AdmanHTML.Utils.loadImg(k)}function u(k){if(!a){var y="https://ad.mail.ru/vp/"+p+"?original="+(k.slot||"")+"&version="+k.version;a=!0,N?(console.log(y),d=!0):AdmanHTML.Utils.xhr(y,function(T){if(d=!0,T){if(typeof T=="string")try{g=JSON.parse(T.trim())}catch{}else typeof T=="object"&&(g=T);var w=m.slice();m=[],w.forEach(t)}})}}var c,h="slot",p=3107,a=!1,d=!1,m=[],g={},_={},v=AdmanHTML.Utils.getPageLocation(),L=AdmanHTML.Utils.getHostname(v||""),N=L.indexOf("localhost")!==-1;return{rb:t,logError:r,logMessage:o,simple:s,metrics:i,initMode:function(k,y){h=k,k==="slot"&&u(y)},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 e(c){return c.replace(/-+(.)?/g,function(h,p){return p?p.toUpperCase():""})}function t(c,h,p){var a,d=s[h];if(!d){for(a=0;a<u.length;a++)if(d=u[a]===""?h:e(u[a]+"-"+h),c[d]!==void 0){s[h]=d;break}}c[d]=p}function i(c){return parseInt(c)+"px"}function n(c,h){function p(a,d){return a=parseInt(a,16),d=d||1,"rgba("+(a>>16&255)+","+(a>>8&255)+","+(255&a)+","+d+")"}return Array.isArray(c)?"linear-gradient("+c.map(function(a){return p(a,h)}).join(", ")+")":p(c,h)}function o(c,h,p){var a=c.style;(p||Object.keys(h)).forEach(function(d){h.hasOwnProperty(d)&&r(a,d,h[d],h)})}function r(c,h,p,a){var d,m,g;switch(h){case"fontFace":d="fontFamily",m=p;break;case"hasBackground":p||(d="background",m="none",delete a.backgroundColor);break;case"backgroundColor":d="background",m=n(p,a.backgroundAlpha);break;case"cornerRounding":case"borderCornerRounding":d="borderRadius",m=i(Math.floor(p/2));break;case"headerColor":case"bodyColor":case"hyperlinkColor":case"textColor":d="color",m=n(p);break;case"headerSize":case"bodySize":case"hyperlinkSize":case"textSize":d="fontSize",m=i(p);break;case"headerUnderline":case"bodyUnderline":case"hyperlinkUnderline":case"textUnderline":d="text-decoration",m=p?"underline":"none",g="";break;case"headerUnderlineOnRollOver":d="text-decoration",m=p?"":"none",g=p?"":"important";break;case"headerBold":case"bodyBold":case"hyperlinkBold":case"textBold":d="fontWeight",m=p?"bold":"normal";break;case"headerIndent":case"bodyIndent":case"hyperlinkIndent":d="marginTop",m=i(p);break;case"bodyPaddingRight":d="marginRight",m=i(p);break;case"width":case"height":d=h,m=i(p);break;case"contentPadding":case"contentIndent":case"controlsSafeArea":d="padding",m=i(p);break;case"maxImageWidth":case"maxImageHeight":d=h==="maxImageWidth"?"maxWidth":"maxHeight",m=i(p);break;case"borderSize":d="borderWidth",m=i(p);break;case"borderColor":d="borderColor",m=n(p,a.borderAlpha);break;case"paddingLeft":case"paddingTop":d=h==="paddingLeft"?"left":"top",m=i(p);break;case"controlsPaddingTop":case"controlsPaddingRight":d=h==="controlsPaddingRight"?"right":"top",m=i(p)}d&&m&&(g!==void 0?c.setProperty(d,m,g):t(c,d,m))}var s={},u=["","webkit","Moz","O","ms"];return{applyStyle:o,getLength:i}}(),AdmanHTML.Utils=function(){"use strict";function e(){return le||(le=function(){try{if(window===window.top)return C;for(var b=window;b!==b.parent;){if(b.document.domain!==b.parent.document.domain)return q;b=b.parent}return se}catch{}return q}())}function t(){if(ce!==null)return ce;var b=window;try{for(;b.parent!==b&&b.document.domain===b.parent.document.domain;)b=b.parent}catch{}return ce=b,b}function i(){var b=window,I="",$=t();try{I=b.top.location.href}catch{if($&&$.parent===b.top&&(I=$.document.referrer),!I){var U=b.location.ancestorOrigins;U&&U.length&&(I=U[U.length-1])}}return I||(I=($||window).document.referrer),I}function n(){return je.major?Ie:Me}function o(b){b(n())}function r(b,I){I&&b.addEventListener("load",I,!1);var $=document.getElementsByTagName("head");if($&&$.length){var U=$[0];U&&U.appendChild(b)}}function s(b,I,$){var U=document.getElementById(I);if(U&&U.parentNode){if(!$)return;U.parentNode.removeChild(U)}U=document.createElement("style"),U.type="text/css",U.id=I,U.innerHTML=b,r(U)}function u(b){var I=document.querySelector("link[href*='"+b+"']");I||(I=document.createElement("link"),I.type="text/css",I.rel="stylesheet",I.href=b,r(I))}function c(b){var I=document.querySelector("script[src*='"+b+"']");I||(I=document.createElement("script"),I.setAttribute("type","text/javascript"),I.setAttribute("charset","utf8"),I.setAttribute("src",b),r(I))}function h(b,I){var $=AdmanHTML.Utils.getPageLocation();if(AdmanHTML.Utils.getHostname($||"").indexOf("localhost")===-1){var U=new Image;U.onload=function(){I&&I(U)},U.src=b}else console.log(b)}function p(b,I,$,U,ee){U=U||"GET";var re=new XMLHttpRequest;return re.open(U,b,!0),re.withCredentials=!ee,re.setRequestHeader("Content-Type","text/plain"),re.send($||null),I&&(re.onreadystatechange=function(){re.readyState===4&&(re.status===200?I(re.response):I())},re.onerror=function(){ee?I():p(b,I,$,U,!0)}),re}function a(b,I,$,U,ee){ee===void 0&&(ee=!0);var re=I*$<b*U;ee&&(re=!re);var ke=re?U/I:$/b,Ce=Math.floor(b*ke),S=Math.floor(I*ke);return{x:Math.floor(($-Ce)/2),y:Math.floor((U-S)/2),width:Math.floor(Ce),height:Math.floor(S)}}function d(b){return typeof b=="object"&&!!b&&!Array.isArray(b)}function m(b){var I;for(I in b)return!1;return!0}function g(b,I){if(!b)return null;if(I){var $;for($ in I)Object.prototype.hasOwnProperty.call(I,$)&&(b[$]=I[$])}return b}function _(b,I){if(I){var $,U;for($ in I)Object.prototype.hasOwnProperty.call(I,$)&&(U=I[$],d(U)?(b[$]=b[$]||{},b[$]=_(b[$],U)):b[$]=U)}return b}function v(b,I,$){return b=b||0,I=I||0,$=$||1,Math.min($,Math.max(I,b))}function L(b,I){return b-I}function N(){return Math.floor(Math.random()*Math.pow(2,48)).toString()}function k(b){b=b.split("+").join(" ");for(var I,$={},U=/[?&]?([^=]+)=([^&]*)/g;I=U.exec(b);)$[decodeURIComponent(I[1])]=decodeURIComponent(I[2]);return $}function y(b,I){var $;document.createEvent?($=document.createEvent("HTMLEvents"),$.initEvent(I,!0,!0)):($=document.createEventObject(),$.eventType=I),$.eventName=I,document.createEvent?b.dispatchEvent($):b.fireEvent("on"+$.eventType,$)}function T(b){return b?b.substring(b.indexOf("//")+2,b.indexOf("/?")):""}function w(b){var I=document.createElement("a");return I.href=b,I.hostname}function E(b){return b.replace(/^(www[0-9]?\.)?/,"")}function f(b,I,$){if(!b||!I)return!0;if(b=E(b),I=E(I),!($&&$.URL&&Array.prototype.includes))return new RegExp("^"+I.replace(/^(\*\.?)/,"([^/]*.)?").replace(/\./g,"\\.")+"$").test(b);try{b=new URL(b);try{return I=new URL(I),b.host.includes(I.host)}catch{return b.host.includes(I)}}catch{return b.includes(I)}}function B(b){var I=b.button,$=b.which;return $||I===void 0?$:1&I?1:2&I?3:4&I?2:0}function A(b){return B(b)===1}function O(b,I){return I=I||document.body,b!==I&&I.contains(b)}function D(b){return b&&b.nodeType===1}function Z(b){var I=b.ownerDocument;return I.defaultView||I.parentWindow}function ae(b){b.preventDefault()}function P(b){var I;if(window.DOMParser)I=new DOMParser().parseFromString(b,"text/xml");else{if(!window.ActiveXObject)return;I=new window.ActiveXObject("Microsoft.XMLDOM"),I.async=!1,I.loadXML(b)}return I.documentElement}function W(b){if(b){var I=b.split(":");if(I.length===3){var $=parseInt(I[0],10),U=parseInt(I[1],10),ee=I[2].split("."),re=parseInt(ee[0],10),ke=0;if(ee.length===2&&(ke=parseInt(ee[1],10)),!(isNaN($)||isNaN(U)||isNaN(re)||isNaN(ke)))return 3600*$+60*U+re+ke/1e3}}return NaN}function H(b,I){var $,U=b;for($ in I)I.hasOwnProperty($)&&(U=U.replace("{{"+$+"}}",I[$]));return U}function te(b,I){if(I=I||0,window.Worker&&window.Blob){var $,U=new Blob(['var timeout; onmessage = function(e) {clearTimeout(timeout); if (e.data === "start") {timeout = setTimeout(function() { postMessage({}); }, '+I+");}}"]);try{$=new Worker(window.URL.createObjectURL(U)),$.onmessage=function(){$.terminate(),b()},$.postMessage("start")}catch{return setTimeout(b,I)}return $}return setTimeout(b,I)}function xe(){function b(ke){var Ce={};try{var S=window[ke].getItem("rb_sync_id");S&&typeof(Ce=JSON.parse(S))!="object"&&(Ce={})}catch{}return Ce}var I=[],$=b("localStorage"),U=b("sessionStorage"),ee=g($,U);for(var re in ee)ee.hasOwnProperty(re)&&I.push(re+"="+encodeURIComponent(ee[re]));return I.join("&")}function J(b){return/nr-vpaid(\.min)?\.js/.test(b)}function de(b,I){b&&b.style&&Y(b,I,!0)}function Y(b,I,$){$=$||!1;var U=$?function(ee,re){b.style.setProperty(ee,re,"important")}:function(ee,re){b.style.setProperty(ee,re)};Object.getOwnPropertyNames(I).forEach(function(ee){U(ee,I[ee])})}function he(){function b(Ce,S){return function(){return Ce.apply(S,arguments)}}function I(Ce){var S=Ce.toString(16);return S.length===1?"0"+S:S}function $(Ce,S,j){for(var X="",ue=S;ue<=j;ue++)X+=I(Ce[ue]);return X}var U="undefined",ee=typeof crypto!==U&&crypto.getRandomValues&&b(crypto.getRandomValues,crypto)||typeof msCrypto!==U&&window.msCrypto.getRandomValues&&b(window.msCrypto.getRandomValues,window.msCrypto),re=function(){if(ee){var Ce=new Uint8Array(16);return function(){return ee(Ce),Ce}}var S=new Array(16);return function(){for(var j,X=0;X<16;X++)(3&X)==0&&(j=4294967296*Math.random()),S[X]=j>>>((3&X)<<3)&255;return S}}(),ke=re();return ke[6]=15&ke[6]|64,ke[8]=63&ke[8]|128,$(ke,0,3)+"-"+$(ke,4,5)+"-"+$(ke,6,7)+"-"+$(ke,8,9)+"-"+$(ke,10,15)}function F(b,I){var $=AdmanHTML.Constants.AD_ACTIONS_DEFAULT_CONFIG,U=[I,b].reduce(function(ee,re){return re&&Object.keys($).forEach(function(ke){ee[ke]!==re[ke]&&(ee[ke]=re[ke]?re[ke]:ee[ke]),typeof re.members=="object"&&(ee.members=re.members)}),ee},Object.assign({},$));return Le(U)?U:$}function Le(b){return!!Array.isArray(b.members)&&(b.members.forEach(function(I){if(["adchoice","disclaimer","timer"].indexOf(I)===-1)return!1}),typeof b.positionX=="string"&&["left","right"].indexOf(b.positionX)!==-1&&typeof b.positionY=="string"&&["top","bottom"].indexOf(b.positionY)!==-1&&typeof b.offsetX=="string"&&typeof b.offsetY=="string"&&!(typeof b.disclaimerText!="string"||!b.disclaimerText.length)&&!(typeof b.headerText!="string"||!b.headerText.length)&&!(typeof b.aboutText!="string"||!b.aboutText.length)&&!(typeof b.copyText!="string"||!b.copyText.length))}function Se(b){b=b||navigator.userAgent;var I=!1;return function($){(/(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($)||/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($.substr(0,4)))&&(I=!0)}(b),I}var le,C=1,se=2,q=3,ce=null,Me=0,Ie=1,je=function(){var b="undefined",I="Shockwave Flash",$="application/x-shockwave-flash",U={major:0,minor:0,release:0},ee=null;if(typeof navigator.plugins!==b&&typeof navigator.plugins[I]=="object")(ee=navigator.plugins[I].description)&&typeof navigator.mimeTypes!==b&&navigator.mimeTypes[$]&&navigator.mimeTypes[$].enabledPlugin&&(ee=ee.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),U.major=parseInt(ee.replace(/^(.*)\..*$/,"$1"),10),U.minor=parseInt(ee.replace(/^.*\.(.*)\s.*$/,"$1"),10),U.release=/[a-zA-Z]/.test(ee)?parseInt(ee.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof window.ActiveXObject!==b)try{var re=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash");re&&(ee=re.GetVariable("$version"))&&(ee=ee.split(" ")[1].split(","),U.major=parseInt(ee[0],10),U.minor=parseInt(ee[1],10),U.release=parseInt(ee[2],10))}catch{}return U}();return{setStyle:de,isNRVpaid:J,addCss:s,loadCss:u,loadJs:c,loadImg:h,xhr:p,scaleBySide:a,isEmptyObject:m,mixin:g,deepExtend:_,validateMinMax:v,numSorter:L,createIntUID:N,getQueryParams:k,triggerEvent:y,getUserIdQuery:xe,getPageLocation:i,getDomain:T,getHostname:w,_genSessionId:he,matchHostname:f,isLeftButtonPressed:A,isElementInDocument:O,isElement:D,getElementViewport:Z,preventDefault:ae,parseXml:P,convertDuration:W,renderTemplate:H,setTimeout:te,checkFlash:n,checkFlashAsync:o,FLASH_READY:Ie,FLASH_MISSING:Me,getServingType:e,servingTypes:{ON_PAGE:C,S_FRAME:se,XD_FRAME:q},adActionsConfigPrepare:F,isMobile:Se}}(),AdmanHTML.Viewability=function(){"use strict";function e(P,W,H){return P.forEach(function(te){te.duration=W.focus&&W.percent>=te.threshold?te.duration+H:0}),P}function t(P){P.forEach(function(W){W.duration=0})}function i(P){return new window.IntersectionObserver(function(W){W&&W.length&&W[0].intersectionRatio!==void 0&&(P(W[0].intersectionRatio),!O&&(W[0].intersectionRatio>0||W[0].isIntersecting)&&(O=!0,v.log("viewin")))},{threshold:Z})}function n(){return f?!document[f]:w===E.XD_FRAME||!window.top.document.hasFocus||window.top.document.hasFocus()}function o(){var P=r();if(P.state!=="UNDETERMINED")return e(ae,P,y),v&&(v.logMRC(ae)||_()),P}function r(){var P,W,H=n();return T?(P=D,W="DETERMINED"):w!==E.XD_FRAME?(P=s(L).percent,W="DETERMINED"):(P=0,W="UNDETERMINED"),{percent:P,focus:H,state:W,viewinOccured:O}}function s(P,W){try{var H=P.getBoundingClientRect(),te=u(H),xe=AdmanHTML.Utils.getElementViewport(P)||window;for(W=W||window.top;xe!==W;){var J=xe.frameElement.getBoundingClientRect();H=c(H,J),H.left=Math.max(J.left,H.left),H.right=Math.min(J.right,H.right),H.top=Math.max(J.top,H.top),H.bottom=Math.min(J.bottom,H.bottom),H.right<H.left&&(H.right=H.left),H.bottom<H.top&&(H.bottom=H.top),xe=xe.parent}H=h(H,W);var de=u(H);return H.percent=de/te*100,H}catch{return{left:0,right:0,top:0,bottom:0,percent:0}}}function u(P){return(P.right-P.left)*(P.bottom-P.top)}function c(P,W){return{left:P.left+W.left,right:P.right+W.left,top:P.top+W.top,bottom:P.bottom+W.top}}function h(P,W){var H={},te=p(W);return H.left=Math.max(0,P.left),H.right=Math.min(te.width,P.right),H.top=Math.max(0,P.top),H.bottom=Math.min(te.height,P.bottom),H}function p(P){var W={width:1/0,height:1/0};return!isNaN(P.document.body.clientWidth)&&P.document.body.clientWidth>0&&(W.width=P.document.body.clientWidth),!isNaN(P.document.body.clientHeight)&&P.document.body.clientHeight>0&&(W.height=P.document.body.clientHeight),P.document.documentElement&&P.document.documentElement.clientWidth&&!isNaN(P.document.documentElement.clientWidth)&&(W.width=P.document.documentElement.clientWidth),P.document.documentElement&&P.document.documentElement.clientHeight&&!isNaN(P.document.documentElement.clientHeight)&&(W.height=P.document.documentElement.clientHeight),P.innerWidth&&!isNaN(P.innerWidth)&&(W.width=Math.min(W.width,P.innerWidth)),P.innerHeight&&!isNaN(P.innerHeight)&&(W.height=Math.min(W.height,P.innerHeight)),W}function a(P,W,H){if(v=W,A=!H,L=P,T)k=k||i(function(te){D=100*te}),k.observe(P);else if(w===E.XD_FRAME)return B=!1,void v.log("viewabilityUnmeasurable");H||(N=setInterval(o,y)),B=!0,v.log("viewabilityMeasurable"),window.addEventListener("unload",d)}function d(){g("unload")}function m(){N||(N=setInterval(o,y))}function g(P){B&&v&&A&&v.logMRC([],P||"complete"),v=null,B=!1,A=!1,L=null,clearInterval(N),N=void 0,t(ae),k&&k.disconnect(),window.removeEventListener("unload",d)}function _(){N&&(clearInterval(N),N=void 0,t(ae))}var v,L,N,k,y=255,T=!!window.IntersectionObserver,w=AdmanHTML.Utils.getServingType(),E=AdmanHTML.Utils.servingTypes,f=function(){for(var P=["h","webkitH","mozH","msH","oH"],W=0;W<P.length;W++)if(document[P[W]+"idden"]!==void 0)return P[W]+"idden";return""}(),B=!1,A=!1,O=!1,D=0,Z=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1],ae=[];return Z.forEach(function(P){ae.push({threshold:Math.round(100*P),duration:0})}),{start:a,pause:_,resume:m,stop:g,getViewabilityState:r}},AdmanHTML.AdRenderer=function(e,t){"use strict";function i(){k.wrapperEl=k.wrapperEl||e.wrapper,k.mainEl=k.mainEl||document.createElement("div"),k.clickEl=k.clickEl||k.mainEl,AdmanHTML.Utils.isElement(k.mainEl)&&!k.mainEl.parentNode&&(k.wrapperEl.childNodes.length?k.wrapperEl.insertBefore(k.mainEl,k.wrapperEl.childNodes[0]):k.wrapperEl.appendChild(k.mainEl),N=!0),k.clickEl.addEventListener("click",k.onClick),window.addEventListener("resize",m)}function n(w){w()}function o(){e.viewability.stop(),window.removeEventListener("resize",m),k.clickEl&&k.clickEl.removeEventListener("click",k.onClick),clearTimeout(_),AdmanHTML.Utils.isElement(k.mainEl)&&N&&k.mainEl.parentNode&&k.mainEl.parentNode.removeChild(k.mainEl)}function r(){if(!y&&(y=!0,clearTimeout(_),v)){var w=Date.now()-v;L=1e3*T.duration-w}}function s(){y&&(y=!1,u())}function u(){v=Date.now();var w=L||1e3*T.duration;_=setTimeout(function(){o(),e.cb("onCompleted")},w)}function c(){T.urlToNavigateOnClick&&(T.openLinkInPopup?e.openPopup(T.urlToNavigateOnClick||T.trackingLink):window.open(T.urlToNavigateOnClick,"_blank"),t.log("click"),e.cb("onClicked"))}function h(w){e.cb("onStarted",[t.sectionType,AdmanHTML.Utils.mixin(t.getAdForApp()||{},w||{})]),t.log("playbackStarted")}function p(w,E){var f=parseInt(w/E*100);e.cb("onTimeRemained",[{remained:E-w,percent:f,duration:E,currentTime:w}]),w=parseInt(w),t.log("thresholdPValue",f),t.log("thresholdValue",w),t.logOVV(w,f)}function a(w,E){typeof w!="string"&&w?k.mainEl.appendChild(w):k.mainEl.innerHTML=w,AdmanHTML.Utils.mixin(k.mainEl.style,E)}function d(w){k.wrapperEl=w}function m(){k.onResize(k.mainEl.offsetWidth,k.mainEl.offsetHeight)}function g(){}var _,v,L,N,k={},y=!1,T=t.getAd();return k={start:i,pause:r,resume:s,skip:n,dispose:o,onClick:c,onStart:h,registerTimer:u,setView:a,setWrapper:d,onTimeRemained:p,onResize:g}},AdmanHTML.AudioAdRenderer=function(e,t){"use strict";function i(){s.mainEl=e.audioEl||document.createElement("audio"),u.forEach(function(c){s.mainEl.addEventListener(c,o)}),e.audioEl||s.setView(null,{position:"absolute",width:"1px",height:"1px",top:"-10000px",left:"-10000px"}),r=t.getAd().duration,s.mainEl.src=t.getAd().src,s.mainEl.load(),t.log("render"),s.mainEl.play(),e.audioEl||s.start()}function n(){s.dispose(),u.forEach(function(c){s.mainEl.removeEventListener(c,o)})}function o(c){var h,p;switch(c.type){case"loadedmetadata":s.onStart();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":h=s.mainEl.duration,p=s.mainEl.currentTime,!isNaN(h)&&r&&Math.abs(r-h)>1&&(h=r,p=Math.min(p,h)),s.onTimeRemained(p,h);break;case"ended":e.cb("onCompleted");break;case"error":e.cb("onError")}}var r,s=new AdmanHTML.AdRenderer(e,t),u=["loadedmetadata","error","pause","play","timeupdate","ended"];return{start:i,skip:s.skip,dispose:n,pause:function(){s.mainEl.pause()},resume:function(){s.mainEl.play()},setVolume:function(c){var h=s.mainEl.muted?0:s.mainEl.volume;s.mainEl.muted=c===0,s.mainEl.volume=c,(h===0&&c>0||h>0&&c===0)&&t.log(c?"volumeOn":"volumeOff")}}},AdmanHTML.CallToActionBtnRenderer=function(e,t){"use strict";function i(){this.isRendered=!1,this.background="#1a79ff",this.boxShadow="0px 0px 4px 0px #0000000F",this.ctaButtonEl=document.createElement("div"),this.ctaButtonEl.className="rb-adman-cta-btn",this.ctaButtonTextEl=document.createElement("span"),this.ctaButtonTextEl.className="rb-adman-cta-btn-text",this.ctaButtonEl.appendChild(this.ctaButtonTextEl)}function n(g){g.propertyName==="transform"&&g.target===a&&m.moveWithControls()}function o(){d.start(),p=t.getAd(),h=t.getSettings(),a=document.querySelector("div.videoplayer_controls");var g=AdmanHTML.Utils.adActionsConfigPrepare(p?p.adActionsConfig:null,h?h.adActionsConfig:null);if(!p.ctaWebEnabled||g.positionY==="bottom"&&g.positionX==="left")return void(u=Function.prototype);m.setText(p.ctaText),m.setStyles(),c=r(),m.setCustomStyles(c),m.addListeners(),m.appendTo(e.wrapper),u=function(){m.destroy()},a&&a.addEventListener("transitionstart",n)}function r(){return[e,p,h].reduce(function(g,_){return Object.keys(g).length||typeof _.ctaStyles!="object"?g:_.ctaStyles},{})}function s(){a&&a.removeEventListener("transitionstart",n),u&&u(),d.dispose()}if(!e.callToActionButton)return{render:Function.prototype,dispose:Function.prototype};var u,c,h,p,a,d=new AdmanHTML.AdRenderer(e,t);i.prototype._setStyles=function(g,_){AdmanHTML.Utils.setStyle(g,_)},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:a?"20px":"16%",left:"20px"})},i.prototype.setCustomStyles=function(g){g.background&&(this.background=g.background),this._setStyles(this.ctaButtonEl,g)},i.prototype.setText=function(g){this.ctaButtonTextEl.innerText=g&&typeof g=="string"?g:"Перейти"},i.prototype.removeFromDOM=function(){this.ctaButtonEl.remove()},i.prototype.addListeners=function(){this.ctaButtonEl.addEventListener("mouseover",this._hoverCTABtnListener.bind(this,!0)),this.ctaButtonEl.addEventListener("mouseout",this._hoverCTABtnListener.bind(this,!1)),this.ctaButtonEl.addEventListener("click",this._clickCTABtnListener.bind(this))},i.prototype.removeListeners=function(){this.ctaButtonEl.removeEventListener("mouseover",this._hoverCTABtnListener.bind(this,!0)),this.ctaButtonEl.removeEventListener("mouseout",this._hoverCTABtnListener.bind(this,!1)),this.ctaButtonEl.removeEventListener("click",this._clickCTABtnListener.bind(this))},i.prototype.destroy=function(){this.removeListeners(),this.removeFromDOM()},i.prototype._clickCTABtnListener=function(){var g=p.ctaLink||p.urlToNavigateOnClick;p.openLinkInPopup?e.openPopup(g||p.trackingLink):window.open(g,"_blank"),t.log(["ctaClick","click"]),e.cb("onClicked")},i.prototype._hoverCTABtnListener=function(g){this._setStyles(this.ctaButtonEl,{background:g?"#1460C9":this.background,"box-shadow":g?"0px 4px 8px 0px #0000000A":this.boxShadow})},i.prototype.appendTo=function(g){g&&(g.appendChild(this.ctaButtonEl),this.isRendered=!0)},i.prototype.moveWithControls=function(){var g=a.classList.contains("hidden");this.ctaButtonEl.style.setProperty("transform","translateY("+(g?"0":"-"+Math.round(a.offsetHeight))+"px)")};var m=new i;return{render:o,dispose:s}},AdmanHTML.CloseBtnRenderer=function(e,t){"use strict";function i(){r.start();var p=t.getSettings(),a=p.controlsStyle||0,d=s[a],m=u[a];m.bg=m.bg||m.width;var g={};for(var _ in h)h.hasOwnProperty(_)&&(g[_]=p[_]!==void 0?p[_]:h[_]);if(g.controlsPaddingTop=g.controlsPaddingTop-g.controlsSafeArea,g.controlsPaddingRight=g.controlsPaddingRight-g.controlsSafeArea,r.setView(AdmanHTML.Utils.renderTemplate(c,{img:d,width:m.width,height:m.height,bg:m.bg}),{position:"absolute",cursor:"pointer"}),AdmanHTML.StyleUtils.applyStyle(r.mainEl,g),m.bg!==m.width){var v=m.bg-m.width,L=function(k){k.target.className==="rb-adman_close"&&(k.target.style.backgroundPosition="-"+v+"px 0")},N=function(k){k.target.className==="rb-adman_close"&&(k.target.style.backgroundPosition="0 0")};r.mainEl.addEventListener("mouseover",L),r.mainEl.addEventListener("mouseout",N),o=function(){r.mainEl.removeEventListener("mouseover",L),r.mainEl.removeEventListener("mouseout",N)}}}function n(){o&&o(),r.dispose()}var o,r=new AdmanHTML.AdRenderer(e,t),s=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAASCAMAAAAE/YwaAAABTVBMVEUAAAD4+PiLi4sAAAD////////q6uokJCT4+PiDg4MVFRUAAAD////9/f2AgICwsLC8vLyWlpaTk5MAAADq6urGxsYmJiZra2v29vZ2dnba2trQ0NCmpqbb29unp6c0NDTs7OzPz8+xsbH+/v7///9jY2P///+fn5+ysrLe3t5LS0uzs7PBwcEuLi66urpYWFi3t7cAAAD39/fW1tb8/PzGxsba2tpKSkpUVFR/f39sbGyRkZF2dnaqqqqioqLKyspERET6+vr////l5eX////w8PD////////a2tr////Y2Nj///+Pj4////+Dg4N6enq3t7dkZGSGhoaMjIz///+amppeXl7///9MTExxcXE9PT3///////9CQkL////////////n5+fKysrq6uq9vb2jo6Pk5OScnJyoqKjk5OS9vb2IiIhAQEBeXl7///8RDLJoAAAAbnRSTlNegIEhrIlmZmWAZkky/GeCgYFnBoCAdGbzq4GAgGZmZvHfzaefnJiXkpGKcG5uZmZDQ/fq466sqqeZmJeSd2xnZvnw7Onj2dHMyMfAvLe2tLCwpJGQjH92b25ubFpYUUhA4NrQzsrHvqqolnl5b4/gN4MAAAGhSURBVCjPZdFXbxpBEMDxORYSks1VDrgOpphqwKF34t7j3lt6n+//mOFtkX/Srlaj/8NKAzG2CoJVFns5AVZuhwXtMmP5JgqaeQa8I0UF0i/O01lJkE1zgNyrBTmANWnBGgAs+351PK761cq4UvX9ZYAN0yzYdsEsntqnRdPcoOh8WukgdipeCy11Oj0HaJnFDOLXgp1G68gxWxRFarXJd5R/f0G5OKnVIgBbjjNcQvlHE+WDguNsUSQFweTPJsqIbSMIAglg23U1e30+yQxd192m6MowDCVkIe4pBrkC2I3H4xcf3yN+7sfJLkV3iqLchGi0c6OQO4B9TdPO5tFSXyP7FEWTyeTlJn5APP5HzyjAoapenKTnk0xfVdVDiu7r9esdlM/2UB5e1+v3AGHPG9DHj+gcjDwvTNHj7PYY8eft309oXc5mjwBZfZRB/DboraN1outZip5SqZVEYoWu+Z16oh3oer7bzeujXrc30PUcRc+vFzzTDkILaAe88fBW8NDgvKS+EaglDizReCdoJBgrlyKCUplBjHEQcBZ7OfkPWYpTXkAiSDwAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANBAMAAACAxflPAAAAGFBMVEX///8AAAD///////////////////////8GrCwdAAAACHRSTlPMAKZNgI0NmlQIVC0AAABMSURBVAjXYxAUVmBQFhRgEFNgYGBQE2AQYgACJgEGA6YAhiAGAwYFVhEWcQaQpKOhAwMIMAsDCRgfLC8KlDdgKmAoYjCA6oebBzMfAF6oBtnQTZWMAAAAAElFTkSuQmCC","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAA0CAMAAABRjo0fAAAARVBMVEUAAAAAAAAAAAD///+3t7e3t7cAAAAtLS3FxcUAAAAtLS3z8/Px8fHIyMjCwsJKSkpKSkoAAAAAAAD29vbi4uLi4uL////qCBnnAAAAFnRSTlMAgE2Zx3c4jHxiVJLy0s2VWR8K9eSJJoi7pQAAAS1JREFUWMPs0DkSwzAIQNFoV+R90/2PGg0DTQI2RQoX/hUN84ReT09Pf22JViwu/E58G7F3ZFdWZERqZXaQEamVgdCRY95Hjiwx/2YvW37eZi6L/EEld46pywVOYg9KQ1+Z+iHxJ4EDDEuB9L0DzlaFNpBYKDuxLEFDFRtEqJOhToJ6GepFyJ0kQfWku0DHXLLDcpkPDbRPaazYmKZdBc1tCg4KbZw10NQmXyHfxkkFFQsSOrZooGRAQsckFZQtSgGGrIFGg5KHYdRABISAoAIiwHsEVRBJ6KggktDRQCSRo4FIIkcDkUSOBiKJnDtCn1EadIMtMVAheQ+uDEuNImhwFarUqCYGV8VHPYsGvnFCi+YW3RqQdGsS062RT69uC906YvTqWo6CUTAKqAkAIPxHpRLLbKUAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAAiCAMAAADRYI/HAAAAOVBMVEUAAAD///+7u7uxsbF9fX2Pj4/W1taJiYn39/eTk5PNzc2tra2CgoLx8fHIyMioqKiioqJ3d3fh4eHCLdXsAAAAAXRSTlMAQObYZgAAAPhJREFUSMfszksOgzAMRdFiYoKdL+x/sTWRDJXyppU66BtF6HLk13+/vbTCpac4AtzxFNYTmH32IoQceVrMIXzcQbpNU7pvOcxoNK2Z4reYcS5gJ/kpZigq1BRHyArYkCOx4aLFB9lwst0IEy6Iv4Jo3ZexvSpGUveiJ4woEe2jsIciJLFIuR5FhBNEKq2mDGOlipAuOcpVSMzSITJ+tpgGhpDCMZhiRohcEOKKGxPiCrMbAHHFDYAs44j3wM7BE8VAI4Bm4ItioClAMyBsyg2hsncoD1jKo5jyxEZBsueAJ3sqZsDBWJ5QXjxSXlBTXmVQo/KiZjUKAAVsE9yzWNzOAAAAAElFTkSuQmCC"],u=[{width:18,height:18,bg:36},{width:13,height:13},{width:26,height:26,bg:52},{width:17,height:17,bg:34}],c='<div class="rb-adman_close" style="background:url({{img}});background-size:{{bg}}px 100%;width:{{width}}px;height:{{height}}px""></div>',h={controlsPaddingTop:3,controlsPaddingRight:0,controlsSafeArea:0};return r.onClick=function(p){p.stopPropagation(),p.target.className==="rb-adman_close"&&e.cb("onClosed")},{start:i,dispose:n,setWrapper:r.setWrapper}},AdmanHTML.DebugAdRenderer=function(e,t){"use strict";function i(){n.mainEl=document.createElement("span"),n.start(),n.setView("&#9874; "+t.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(e,t),o=t.getAd();return n.onClick=function(){window.open(o.urlToNavigateOnClick,"_blank")},{start:i,dispose:n.dispose}},AdmanHTML.DisclaimerRenderer=function(e,t){"use strict";function i(a,d,m,g){var _=document.createElement("style");_.appendChild(document.createTextNode(" @font-face { font-family: "+a+"; font-style: normal; font-weight: 300; unicode-range: "+g+"; src: url('"+d+"') format('"+m+"'); } ")),document.head.appendChild(_)}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 a=t.getSettings(),d=t.getAd();if(typeof d=="object"&&typeof d.adActionsConfig=="object"&&d.adActionsConfig.members===null||typeof a=="object"&&typeof a.adActionsConfig=="object"&&a.adActionsConfig.members===null)return void s();var m={originalBannerId:d.bannerID,cipherBannerID:d.cipherBannerID?d.cipherBannerID:null,bannerOrdId:d.ordID||null,advData:d.advData||null},g=AdmanHTML.Utils.adActionsConfigPrepare(d?d.adActionsConfig:null,a?a.adActionsConfig:null);p.build(g,m),p.init(),p.addListeners(),p.appendTo(e.wrapper),u=function(){p.destroy()}}function r(a,d){var m=Math.floor(d-a);m||(m="00"),p.updateRemainTime(m)}function s(){u&&u(),c&&typeof c=="object"&&typeof c.remove=="function"&&c.remove(),h.dispose()}if(!e.disclaimer)return{render:Function.prototype,onTimeRemained:Function.prototype,dispose:Function.prototype};var u,c,h=new AdmanHTML.AdRenderer(e,t);[{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(a){i(a.name,a.url,a.format,a.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(a,d){this.config=a,this.data=d,this.config.members.forEach(function(m){switch(m){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 a={};this.config.positionX==="left"&&(a.left=this.config.offsetX),this.config.positionX==="right"&&(a.right=this.config.offsetX),this.config.positionY==="top"&&(a.top=this.config.offsetY),this.config.positionY==="bottom"&&(a.bottom=this.config.offsetY),this._setStyles(this.adActionsEl,a),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 a=".rb-adman-ad-actions { background-color: rgba(17,17,17,0.4)!important} .rb-adman-ad-actions:hover{ background-color: rgba(17,17,17,0.8)!important} div.videoplayer_ads_skip {border-radius: 5px !important; background: rgba(17, 17, 17, 0.4) !important; color: white !important; cursor: pointer !important; padding: 5px 8px 5px 8px !important; font-weight: 300 !important; font-size: 12px !important; line-height: 15px !important; right: 6px !important; top: 6px !important;}";c=document.createElement("style"),c.styleSheet?c.styleSheet.cssText=a:c.appendChild(document.createTextNode(a)),this.adActionsEl.appendChild(c),this._setStyles(this.adChoiceEl,{width:"14px",height:"14px"})},n.prototype._setStyles=function(a,d){AdmanHTML.Utils.setStyle(a,d)},n.prototype.updateRemainTime=function(a){var d=Math.trunc(a/60),m=a-60*d;d=d.toString(),m=m.toString(),m.length===1&&(m="0"+m),this.remainTimeEl.innerText=d+":"+m},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(a){a.stopPropagation();var d=this.data.advData?"data":"id",m=this.data.advData?this.data.advData:this.data.cipherBannerID;window.open(this._advPageUrlPart+d+"="+m,"_blank")},n.prototype._copyToClipboard=function(a){var d=document.createElement("textarea");document.body.appendChild(d),d.value=a,d.select(),document.execCommand("copy"),document.body.removeChild(d)},n.prototype._copyBannerOrdIdToClipboardListener=function(a){a.stopPropagation(),this._copyToClipboard(this.data.bannerOrdId)},n.prototype._setAdActionsHoverListener=function(a){a?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(a){a.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(a){a.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(a){a?(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(a){a?(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(a){a?this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconActiveSrc+'")'}):this._setStyles(this.actionsHeaderButton,{"background-image":'url("'+this.closeIconSrc+'")'})},n.prototype.appendTo=function(a){if(a){try{var d=window.getComputedStyle(a).width,m=this.actionsWrapperWidth+parseInt(this.adActionsEl.style.paddingLeft)+parseInt(this.adActionsEl.style.paddingRight);(d?parseInt(d):m+1)<=m&&(this.isSmall=!0,this._setStyles(this.adActionsEl,{"border-radius":"6px","font-size":"12px",padding:"5px 6px 5px 8px"}))}catch(g){console.warn("Failed detect small wrapper size",g)}this.appendedTo=a,a.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 p=new n;return p.preBuild(),{render:o,onTimeRemained:r,dispose:s}},AdmanHTML.EmptyAdRenderer=function(e,t){"use strict";function i(){t.log("sectionEmpty"),setTimeout(function(){e.cb("onCompleted")})}return{start:i}},AdmanHTML.HtmlAdRenderer=function(e,t){"use strict";function i(){w.start(),O=t.getAd(),k=O.duration,N=L(),N.width="100%",N.height="100%",N.setAttribute("style","display:block;width:100%;height:100%"),w.setView(N,{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),AdmanHTML.Utils.isElement(e.videoEl)&&e.videoEl.parentNode===w.mainEl.parentNode&&w.mainEl.parentNode.insertBefore(w.mainEl,e.videoEl.nextSibling),N.contentWindow||N.contentDocument?o():N.onload=function(Y){o()},f&&f.render(),E&&E.render()}function n(Y){Y.preventDefault(),Y.stopPropagation(),t.log("click"),e.cb("onClicked"),e.openPopup(O.urlToNavigateOnClick||O.trackingLink)}function o(){function Y(){var he=N.contentWindow.document.body||N.contentDocument.body;he&&he.addEventListener("click",n,!0)}A=N.contentWindow?N.contentWindow.document:N.contentDocument,A.open(),P?(A.write('<!DOCTYPE html><html style="width: 100%; height: 100%"><head></head><body>'),A.write(O.src),A.write("</body></html>"),H=document.querySelector("div.videoplayer_controls"),H&&(te=H.style.display,H.style.display="none"),(xe=document.querySelector("div.videoplayer_ads_skip"))&&(J=xe.style.display,xe.style.display="none")):(A.write(O.src),t.log("render")),A.close(),B=AdmanHTML.Utils.getElementViewport(e.wrapper),B.addEventListener("message",a),O.openLinkInPopup&&(O.urlToNavigateOnClick||O.trackingLink)&&(N.contentWindow.document.body||N.contentDocument.body?Y():N.onload=Y),e.viewability.start(w.mainEl,t),c(),w.onStart()}function r(){D||(D=!0,Z+=Date.now()-ae,clearInterval(y),y=null,H?H.style.display=te:P&&d("pauseAd",[]),e.cb("onPaused"))}function s(){return O.creativeType==="video-motion"}function u(){D&&(D=!1,c(),e.cb("onPlayed"))}function c(){if(!y){if(P){if(!W)return;H?H.style.display="none":d("startAd",[])}y=setInterval(p,251),ae=Date.now(),D=!1}}function h(){de||e.cb("onCompleted")}function p(){Z+=Date.now()-ae,ae=Date.now(),w.onTimeRemained(Z/1e3,k),P?d("timeUpdateAd",[Z/1e3,k]):f.onTimeRemained(Z/1e3,k),Z>=1e3*k&&(clearInterval(y),y=null,h())}function a(Y){if(Y.source===N.contentWindow){if(P&&typeof Y.data=="object")return void m(Y.data);try{switch(JSON.parse(Y.data).type){case"trg:click":t.log("click"),e.cb("onClicked")}}catch{}}}function d(Y,he){if(typeof N=="object"&&typeof N.contentWindow=="object")try{var F=N.contentWindow.origin;N.contentWindow.postMessage({initiator:"render-runner",id:T,method:Y,args:he},F)}catch{}}function m(Y){if(P&&typeof Y=="object"&&Y.initiator==="render-runner"&&Array.isArray(Y.args)&&Y.args[0]===T)switch(Y.event){case"AdStarted":W=!0,c();break;case"AdCanPlay":t.log("render");break;case"HeaderClick":t.log("click"),e.cb("onClicked",{type:"header"});break;case"ItemClick":t.log("card_"+Y.args[1]+"_click"),e.cb("onClicked",{type:"card",cardId:Y.args[1]});break;case"ItemShow":t.log("card_"+Y.args[1]+"_show");break;case"AdClickThru":t.log("click"),e.cb("onClicked",{type:"common"});break;case"AdError":e.cb("onError",Y.args[1]);break;case"ClosedByUser":t.log("closedByUser"),e.cb("onClosed"),e.cb("onSkipped"),de=null,v();break;case"UserAction":de=Date.now()}}function g(){H&&(H.style.display=te),xe&&(xe.style.display=J)}function _(){y&&clearInterval(y),y=null,g(),B.removeEventListener("message",a)}function v(){_(),w.dispose(),f&&f.dispose(),E&&E.dispose()}function L(){var Y=document.createElement("iframe");return Y.scrolling="no",Y.marginWidth="0",Y.marginHeight="0",Y.frameBorder="0",Y.id="ad-frame-"+Math.round(1e5*Math.random()),Y.onclose=g,Y}var N,k,y,T,w=new AdmanHTML.AdRenderer(e,t),E=new AdmanHTML.CallToActionBtnRenderer(e,t),f=null,B=null,A=null,O=t.getAd(),D=!1,Z=0,ae=0,P=s(),W=!1,H=null,te="flex",xe=null,J="block",de=null;return P?T="b"+O.bannerID:f=new AdmanHTML.DisclaimerRenderer(e,t),w.onClick=function(){},{start:i,pause:r,resume:u,skip:w.skip,dispose:v}},AdmanHTML.ImgAdRenderer=function(e,t){"use strict";function i(){o.start(),o.registerTimer(),AdmanHTML.Utils.addCss(c,u);var p=t.getAd();o.setView(AdmanHTML.Utils.renderTemplate(h,p),{position:"absolute",display:"inline-block",width:"100%","max-width":p.width+"px",left:"50%",bottom:0,transform:"translate(-50%,0)","box-sizing":"border-box",overflow:"hidden","z-index":"999999","text-align":"center"});var a=t.getSettings(),d=o.mainEl.querySelector(".rb-adman_age_wrapper");if(a&&a.advertisment&&a.advertisment.image){var m=a.advertisment.image;AdmanHTML.StyleUtils.applyStyle(o.mainEl,m,"fontFace contentIndent hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_image_wrapper"),m,"borderSize borderColor borderAlpha borderCornerRounding".split(" "));var g=a.advertisment.image.ageRestrictions;p.ageRestrictions&&g&&(AdmanHTML.StyleUtils.applyStyle(d,g),AdmanHTML.StyleUtils.applyStyle(d.querySelector(".rb-adman_age_content"),g,["textUnderline"]))}p.ageRestrictions||d.parentNode.removeChild(d),r.setWrapper(o.mainEl),r.start(),o.onStart(),s.render(),t.log("render")}function n(){o.dispose(),r.dispose(),s.dispose()}var o=new AdmanHTML.AdRenderer(e,t),r=new AdmanHTML.CloseBtnRenderer(e,t),s=new AdmanHTML.DisclaimerRenderer(e,t),u="rb-adman-img-style",c=".rb-adman_image_overlay {display:inline-block; overflow:hidden;vertical-align:middle;cursor:pointer;color:#fff}.rb-adman_image_overlay .rb-adman_image_wrapper {display:block;border:0px solid transparent;overflow:hidden;}.rb-adman_image_overlay .rb-adman_image_wrapper img {vertical-align:top;}.rb-adman_image_overlay .rb-adman_age_wrapper {display:block;position:absolute;top:0px;left:3px;border:0px solid transparent;margin-right:1px;text-decoration:none!important}",h='<div class="rb-adman_image_overlay"><div class="rb-adman_image_wrapper"><img src="{{src}}" width="100%" height="auto"></div><span class="rb-adman_age_wrapper"><span class="rb-adman_age_content">{{ageRestrictions}}</span></span></div>';return{start:i,pause:o.pause,resume:o.resume,skip:o.skip,dispose:n}},AdmanHTML.OpenLinkPopupRender=function(e){"use strict";function t(){for(var c=window;c.parent&&c.parent.frameElement;)c=c.parent;return c}function i(c){e.isPopupOpen=!0,e.pause(),s=n(c)}function n(c){s=u.createElement("div"),o(),s.classList.add("rb-adman-popup");var h=u.createElement("div");h.classList.add("rb-adman-popup-body"),s.appendChild(h);var p=u.createElement("div");p.classList.add("rb-adman-popup-closeButton");var a=s;r=function(){a.remove(),a=null,e.resume(!0),e.isPopupOpen=!1},p.onclick=r,h.appendChild(p);var d=u.createElement("iframe");d.classList.add("rb-adman-popup-frame"),d.setAttribute("src",c),h.appendChild(d),u.body.append(s)}function o(){var c=u.createElement("style");c.innerHTML=".rb-adman-popup{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;flex-direction:row;align-items:center;justify-content:center;overflow:auto;padding: 7vh 0;box-sizing:border-box;background:rgba(0,0,0,.4);z-index: 1000000;}.rb-adman-popup-body{position:relative;max-width:630px;min-width:500px;width:50%;height:100%;z-index:20;border-radius:12px;background-color:#FFF;-webkit-box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);-moz-box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);box-shadow: 12px 12px 8px 0px rgba(34, 60, 80, 0.2);color: #FEFEFE}.rb-adman-popup-frame{width:100%;height:100%;overflow:hidden;border-radius: 12px;border:none;}.rb-adman-popup-closeButton{background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZSIgdmlld0JveD0iMCAwIDE3IDE3IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im05LjIgOC41IDYuNjUgNi42NS0uNy43TDguNSA5LjIxbC02LjY1IDYuNjQtLjctLjdMNy43OSA4LjUgMS4xNSAxLjg1bC43LS43TDguNSA3Ljc5bDYuNjUtNi42NC43LjdMOS4yMSA4LjV6IiBzdHJva2U9Im5vbmUiLz48L3N2Zz4K);background-repeat:no-repeat;background-position:center;background-size:50%;position:absolute;top:0;right:-38px;width:28px;height:28px;border-radius:14px;padding: 4px;background-color:rgba(0,0,0,.35);background-color:#000;cursor:pointer;filter:opacity(35%);color:white;box-sizing:border-box;transition: transform .15s ease-in;}.rb-adman-popup-closeButton:hover{filter:opacity(55%);transform:scale(1.1) rotate(90deg);}",s.appendChild(c)}var r,s=null,u=t().document;return{open:i,close:r}},AdmanHTML.ResearchAdRenderer=function(e,t){"use strict";function i(T,w){var E=[];return T.forEach(function(f){f.name===w&&E.push(f)}),E}function n(T,w,E){return w<=T&&(!E||E>=T)}function o(){!_&&g&&(_=!0,t.log("playbackPaused"))}function r(){_&&g&&(_=!1,t.log("playbackResumed"))}function s(){g=!1,_=!1,m.stop()}function u(T){var w=!T;w!==v&&(v=w,t.log(w?"volumeOff":"volumeOn"))}function c(){g&&(N&&p(N,N),a&&k.forEach(function(T){T.completed||(T.completed=!0,!T.viewable&&AdmanHTML.Utils.loadImg(T.url))}),s())}function h(T){t.log(T?"fullscreenOn":"fullscreenOff")}function p(T,w){if(!isNaN(T)){g||(g=!0,m.start(e.playerEl,t,!0),t.log("playbackStarted")),T=Math.round(T);var E=L!==null?T-L:null;if(L=T,t.log("thresholdValue",T),!isNaN(w)&&isFinite(w)&&w>0&&(w=Math.round(w),N=w,t.log("thresholdPValue",Math.floor(T/w*100))),E<0&&t.log("rewind"),y.forEach(function(A){if(n(T,A.start,A.end)){var O=Math.floor((T-A.start)/A.rate);O>0&&A.last!==O&&(A.last=O,AdmanHTML.Utils.loadImg(A.url.replace("[CONTENTPLAYHEAD]",T)))}else A.last=null}),a!==!1&&E!==0){var f,B=E<0||E>1;k.forEach(function(A){if(n(T,A.start,A.end)&&!A.completed){f=f||m.getViewabilityState(),a=f.state==="DETERMINED";var O=f.percent>A.percent&&f.focus;A.duration=A.duration||0,A.lastViewable&&O&&!B?A.duration+=E:A.duration=0,A.lastViewable=O,A.duration>=A.value&&(A.completed=!0,A.viewable&&AdmanHTML.Utils.loadImg(A.url))}else A.duration=0,A.lastViewable=!1})}}}var a,d=t.getExtendedAdForApp().statistics,m=new AdmanHTML.Viewability,g=!1,_=!1,v=!1,L=null,N=null,k=i(d,"mrcValue"),y=i(d,"timerValue");return{pause:o,resume:r,setVolume:u,setPosition:p,setComplete:c,setFullscreen:h}},AdmanHTML.StatisticsAdRenderer=function(e,t){"use strict";function i(){t.log("playbackStarted"),AdmanHTML.Utils.setTimeout(function(){e.cb("onCompleted")})}return{start:i}},AdmanHTML.SwfAdRenderer=function(e,t){"use strict";function i(){o.start(),AdmanHTML.Utils.checkFlashAsync(function(r){r===AdmanHTML.Utils.FLASH_READY?(o.registerTimer(),o.setView(n(t.getAd().src,{width:"100%",height:"100%"},{}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"}),t.log("render"),o.onStart()):e.cb("onError")})}function n(r,s,u){var c,h,p=s||{},a=u||{};p.type="application/x-shockwave-flash",window.ActiveXObject?(p.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",a.movie=r):p.data=r,h="<object";for(c in p)p.hasOwnProperty(c)&&(h+=" "+c+'="'+p[c]+'"');h+=">";for(c in a)a.hasOwnProperty(c)&&(h+='<param name="'+c+'" value="'+a[c]+'" />');return h+="</object>"}var o=new AdmanHTML.AdRenderer(e,t);return{start:i,skip:o.skip,dispose:o.dispose,createSwfObject:n,super:o}},AdmanHTML.TextAdRenderer=function(e,t){"use strict";function i(){o.start(),o.registerTimer(),AdmanHTML.Utils.addCss(c,u);var p=AdmanHTML.Utils.mixin({header:"",body:"",hyperlinkText:""},t.getAd());o.setView(AdmanHTML.Utils.renderTemplate(h,p),{position:"absolute",margin:"0 auto",left:0,right:0,bottom:0,"box-sizing":"border-box",overflow:"hidden"});var a=t.getSettings();if(a&&a.advertisment&&a.advertisment.text){var d=a.advertisment.text;AdmanHTML.StyleUtils.applyStyle(o.mainEl,d,"fontFace width height contentPadding hasBackground backgroundColor backgroundAlpha cornerRounding".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header"),d,"headerColor headerSize headerUnderline headerBold headerIndent".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_header_text"),d,["headerUnderlineOnRollOver"]),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_body"),d,"bodyColor bodySize bodyUnderline bodyLeading bodyIndent bodyPaddingRight".split(" ")),AdmanHTML.StyleUtils.applyStyle(o.mainEl.querySelector(".rb-adman_link"),d,"hyperlinkColor hyperlinkSize hyperlinkUnderline hyperlinkIndent".split(" "));var m=a.advertisment.text.ageRestrictions,g=o.mainEl.querySelector(".rb-adman_age_wrapper");p.ageRestrictions?m&&(AdmanHTML.StyleUtils.applyStyle(g,m),AdmanHTML.StyleUtils.applyStyle(g.querySelector(".rb-adman_age_content"),m,["textUnderline"])):g.parentNode.removeChild(g);var _=o.mainEl.querySelector(".rb-adman_image_wrapper span");if(d.noImage)_.parentNode.removeChild(_);else if(d.contentPadding&&(_.style.marginRight=AdmanHTML.StyleUtils.getLength(d.contentPadding)),d.maxImageHeight||d.maxImageWidth){var v=p.width/p.height;_.style.width=AdmanHTML.StyleUtils.getLength(Math.round(d.maxImageWidth||d.maxImageHeight*v)),_.style.height=AdmanHTML.StyleUtils.getLength(Math.round(d.maxImageHeight||d.maxImageWidth/v))}}r.setWrapper(o.mainEl),r.start(),s.render(),t.log("render"),o.onStart()}function n(){o.dispose(),r.dispose(),s.dispose()}var o=new AdmanHTML.AdRenderer(e,t),r=new AdmanHTML.CloseBtnRenderer(e,t),s=new AdmanHTML.DisclaimerRenderer(e,t),u="rb-adman-text-style",c=".rb-adman_text_overlay {display:block; overflow:hidden;height:100%;cursor:pointer;color:#fff}.rb-adman_text_overlay .rb-adman_image_wrapper {display:block;float:left;position:relative;height:100%;vertical-align:middle}.rb-adman_text_overlay .rb-adman_image_wrapper span {display:inline-block;vertical-align:middle;background-size:contain;background-position:center}.rb-adman_text_overlay .rb-adman_text_wrapper {display:block;overflow:hidden;height:100%;vertical-align:top;line-height:1.2}.rb-adman_text_overlay .rb-adman_header {display:block;white-space:nowrap;margin-right:20px;overflow:hidden;text-overflow:ellipsis}.rb-adman_text_overlay .rb-adman_age_wrapper {display:inline-block; vertical-align:middle;border:0px solid transparent;margin-right:1px;text-decoration:none!important}.rb-adman_text_overlay .rb-adman_header_text {color:inherit;text-decoration:none;letter-spacing:normal;line-height:1.5;vertical-align:middle}.rb-adman_text_overlay .rb-adman_header_text:hover {color:inherit;text-decoration:underline}.rb-adman_text_overlay .rb-adman_body {padding:2px 0}.rb-adman_text_overlay .rb-adman_body, .rb-adman_link {display:block;text-decoration:none;padding-top:2px}",h='<div class="rb-adman_text_overlay"><div class="rb-adman_image_wrapper"><div style="display:table;height:100%;"><div style="display:table-cell;height:100%;vertical-align:middle"><span style="background-image: url({{src}});width:{{width}}px;height:{{height}}px"></span></div></div></div><div class="rb-adman_text_wrapper"><span class="rb-adman_header"><span class="rb-adman_age_wrapper"><span class="rb-adman_age_content">{{ageRestrictions}}</span></span><span class="rb-adman_header_text">{{header}}</span></span><span class="rb-adman_body">{{body}}</span><span class="rb-adman_link">{{hyperlinkText}}</span></div></div>';return{start:i,pause:o.pause,resume:o.resume,skip:o.skip,dispose:n}},AdmanHTML.VideoAdRenderer=function(e,t){"use strict";function i(){a.mainEl=e.videoEl,a.clickEl=e.clickEl||a.mainEl,g.forEach(function(y){a.mainEl.addEventListener(y,s)}),a.mainEl.parentNode?L={src:a.mainEl.src,time:a.mainEl.currentTime,muted:a.mainEl.muted}:a.setView(null,{position:"absolute",width:"100%",height:"100%",top:0}),a.mainEl.controls=e.browser.mobile,a.mainEl.src=t.getAd().src,a.mainEl.load(),t.log("render"),c(0),h=a.mainEl.play(),h&&h.then&&h.then(u,function(){a.mainEl.muted=!0,h=a.mainEl.play(),h.then(u,function(){})}),a.start(),d.render(),m.render()}function n(y){return y.indexOf("videolink.mycdn.me")!==-1}function o(){d.dispose(),m.dispose(),a.dispose(),g.forEach(function(y){a.mainEl.removeEventListener(y,s)}),L.src?(a.mainEl.src=L.src,a.mainEl.load(),a.mainEl.play(),c(L.time)):(a.mainEl.src="",a.mainEl.removeAttribute&&a.mainEl.removeAttribute("src"))}function r(y){if(y.indexOf("mradx")!==-1)return"rb";if(y.indexOf("videolink.mycdn.me")!==-1)return"ev";var T=new URL(y);return"evcdn:"+("hostname"in T?T.hostname:"")}function s(y){switch(y.type){case"loadstart":p=Date.now();break;case"loadeddata":N||(N=!0,k=Date.now()-p,e.stats.logMessage("firstLoadedData",k,{banner_id:v.bannerID,duration:Math.round(a.mainEl.duration),geo:v.geo!=="undefined"?v.geo:void 0,one_video_src:n(a.mainEl.src),slot:"slotId"in v?v.slotId:"no_slot_id",video_source:r(a.mainEl.src),resolution:("width"in v?v.width:"no_ad_width")+"x"+("height"in v?v.height:"no_ad_height"),label:"experimentLabel"in v?v.experimentLabel:""}));break;case"loadedmetadata":e.stats.metrics("ready"),e.stats.metrics("creative_type","video"),d.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration);break;case"playing":h||u();break;case"play":e.cb("onPlayed");break;case"pause":e.cb("onPaused");break;case"timeupdate":a.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration),d.onTimeRemained(a.mainEl.currentTime,a.mainEl.duration);break;case"ended":e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",e.cb("onCompleted"),e.stats.metrics("completed");break;case"error":var T=y.target&&typeof y.target=="object"&&y.target.error&&typeof y.target.error=="object"&&y.target.error.code?y.target.error.code:"unknown_code",w="video_el_err_code:"+T;e.stats.logError(w),e.stats.metrics("media_error_code",T),e.cb("onError")}}function u(){if(!_){_=!0;var y=AdmanHTML.Utils.isElement(a.mainEl)?a.mainEl:a.wrapperEl;e.viewability.start(y,t),a.onStart({muted:a.mainEl.muted})}}function c(y){if(a.mainEl)try{a.mainEl.currentTime=y}catch{}}var h,p,a=new AdmanHTML.AdRenderer(e,t),d=new AdmanHTML.DisclaimerRenderer(e,t),m=new AdmanHTML.CallToActionBtnRenderer(e,t),g=["loadstart","loadeddata","loadedmetadata","error","pause","play","playing","timeupdate","ended"],_=!1,v=t.getAd(),L={},N=!1,k=null;return{start:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",i(),e.stats.metrics("playing")},skip:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",e.stats.metrics("skipped"),a.skip.apply(e,arguments)},dispose:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",o()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",a.mainEl.pause()},resume:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",a.mainEl.play()},setVolume:function(y){var T=a.mainEl.muted?0:a.mainEl.volume;y>0&&a.mainEl.muted&&(a.mainEl.muted=!1),y===0&&(a.mainEl.muted=!0),a.mainEl.volume=y,(T===0&&y>0||T>0&&y===0)&&t.log(y?"volumeOn":"volumeOff")}}},AdmanHTML.VpaidJsAdRenderer=function(e,t){"use strict";function i(){var D;if(!c)return w.duration;try{D=c.callGet("adDuration"),D===void 0&&(D=w.duration)}catch{D=w.duration}return D}function n(){if(y.start(),T.render(),AdmanHTML.Utils.isElement(e.videoEl)){var D=AdmanHTML.Utils.getElementViewport;D(e.videoEl)===D(y.wrapperEl)&&(e.videoEl.parentNode?(p=e.videoEl.parentNode,a=e.videoEl.nextSibling):h=!0,y.wrapperEl.insertBefore(e.videoEl,y.wrapperEl.childNodes[0]),AdmanHTML.Utils.mixin(e.videoEl.style,{position:"absolute",width:"100%",height:"100%",top:0,display:"block"}))}var Z=t.getSettings();Z&&(Z.loadTimeout&&(E=Z.loadTimeout),Z.startTimeout&&(f=Z.startTimeout)),AdmanHTML.Utils.isNRVpaid(w.src)&&typeof w.timeoutsFactor=="number"&&w.timeoutsFactor>1&&(E*=w.timeoutsFactor,f*=w.timeoutsFactor),e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),r(E,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadInterface"),c.urlToNavigateOnClick=t.getAd().urlToNavigateOnClick,y.setView(c.load(w.src,e.config.vpaidHtmlInterface),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"transparent"}),t.log("render")}function o(){h&&e.videoEl.parentNode?e.videoEl.parentNode.removeChild(e.videoEl):p&&p.insertBefore(e.videoEl,a&&a.parentNode?a:null),s(),c.destroy(),T.dispose(),y.dispose()}function r(D,Z){s(),L=Z,m=setTimeout(u,D)}function s(){clearTimeout(m)}function u(){v=!0,s(),t.log("error"),L&&e.stats.logError(L,{bannerID:w.bannerID,isNRVpaid:AdmanHTML.Utils.isNRVpaid(w.src)}),e.cb("onError",{force:!0,message:L})}var c,h,p,a,d,m,g,_,v,L,N,k,y=new AdmanHTML.AdRenderer(e,t),T=new AdmanHTML.DisclaimerRenderer(e,t),w=t.getAd(),E=500,f=1e3;y.onResize=function(D,Z){c&&c.call("resizeAd",[D,Z,"normal"])},y.onClick=function(){};var B=function(D,Z){if(!v){var ae,P;switch(D){case"loaded":r(E,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:LoadJs");break;case"vpaidloaded":s();break;case"inited":c.call("handshakeVersion",["2.0"])?(r(f,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:InitAd"),c.call("initAd",[y.mainEl.offsetWidth,y.mainEl.offsetHeight,"normal",w.bitrate,{AdParameters:w.params}])):e.cb("onError");break;case"AdStarted":s(),_=c.callGet("adVolume"),g===void 0||c.autoMuted||c.callSet("adVolume",g),t.log("playbackStarted"),e.viewability.start(y.mainEl,t),e.cb("onVPAIDStarted"),e.stats.metrics("playing");break;case"AdLoaded":r(f,"EXTERNAL_JS_ADVERTISMENT_TIMEOUT:StartAd"),c.call("startAd"),e.stats.metrics("ready"),e.stats.metrics("creative_type","vpaid");break;case"AdRemainingTimeChange":ae=i(),P=c.callGet("adRemainingTime"),ae>0&&P>=0?(y.onTimeRemained(ae-P,ae),T.onTimeRemained(ae-P,ae)):e.cb("onDurationChanged",[{remained:P,duration:ae}]);break;case"AdVolumeChange":var W=c.callGet("adVolume");(_===0&&W>0||_>0&&W===0)&&t.log(W?"volumeOn":"volumeOff"),_=W;break;case"AdVideoComplete":e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",ae=i(),y.onTimeRemained(ae,ae);break;case"AdStopped":case"AdSkipped":N||(N=!0,setTimeout(function(){d?d():e.cb("onCompleted")})),e.stats.metrics(D==="AdStopped"?"completed":"skipped");break;case"AdClickThru":Z.url&&Z.playerHandles&&window.open(Z.url,"_blank"),t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_JS_ADVERTISMENT_ERROR:"+(Z&&Z.message||"")),e.stats.metrics("vpaid_error_message",Z&&Z.message||"vpaid script err"),e.cb("onError");break;case"AdPaused":k||(k=!0,e.cb("onPaused"));break;case"AdPlaying":k&&(k=!1,e.cb("onPlayed"));break;case"AdUserClose":t.log("closedByUser");break;case"video:pause":k||c&&c.call("pauseAd");break;case"video:play":k&&c&&c.call("resumeAd")}}},A=e.wrapper.ownerDocument,O=A.defaultView||A.parentWindow;return c=new AdmanHTML.VpaidLoader(e.videoEl,O),c.onVpaidEvent(B),{start:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",n()},dispose:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",o()},pause:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",c&&c.call("pauseAd")},resume:function(){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="play",c&&c.call("resumeAd")},setVolume:function(D){c&&c.callSet("adVolume",D),g=D},skip:function(D){e.playStatus||(e.playStatus={}),e.playStatus.prevStatus=e.playStatus.curStatus,e.playStatus.curStatus="pause",d=D;try{c&&c.call("skipAd")}catch{}e.stats.metrics("skipped")}}},AdmanHTML.VpaidSwfAdRenderer=function(e,t){"use strict";function i(){var T;if(!c)return L.duration;try{T=c.callGet("adDuration")||L.duration}catch{T=L.duration}return T}function n(){v.start();var T=t.getSettings();T&&(T.loadTimeout&&(k=T.loadTimeout),T.startTimeout&&(y=T.startTimeout)),AdmanHTML.Utils.checkFlashAsync(function(w){if(w===AdmanHTML.Utils.FLASH_READY){e.cb("onStarted",[t.sectionType,t.getAdForApp()||{}]),r(k);var E="vpaidSwfUrl="+encodeURIComponent(L.src)+"&proxyMethodName="+N;v.setView(g.createSwfObject(e.config.vpaidJsInterface,{width:"100%",height:"100%"},{flashvars:E,allowScriptAccess:"always",wmode:"opaque"}),{position:"absolute",top:0,left:0,right:0,bottom:0,"background-color":"black"})}else e.cb("onError")}),_.render(),t.log("render")}function o(){s(),v.dispose(),_.dispose(),window[N]=null}function r(T){s(),p=setTimeout(u,T)}function s(){clearTimeout(p)}function u(){m=!0,s(),t.log("error"),e.cb("onError")}var c,h,p,a,d,m,g=new AdmanHTML.SwfAdRenderer(e,t),_=new AdmanHTML.DisclaimerRenderer(e,t),v=g.super,L=t.getAd(),N="vpaidProxyMethod"+Date.now(),k=500,y=1e3;return v.onResize=function(T,w){c&&c.call("resizeAd",[T,w,"normal"])},v.onClick=function(){},window[N]=function(T,w){if(!m){var E;switch(T){case"loaded":r(k);break;case"vpaidloaded":s();break;case"inited":c=v.mainEl.getElementsByTagName("object")[0],c.call("handshakeVersion",["2.0"])?(r(y),c.call("initAd",[v.mainEl.offsetWidth,v.mainEl.offsetHeight,"normal",L.bitrate,L.params,""])):e.cb("onError");break;case"AdStarted":s(),d=c.callGet("adVolume"),a!==void 0&&c.callSet("adVolume",a),t.log("playbackStarted"),e.viewability.start(v.mainEl,t),e.cb("onVPAIDStarted");break;case"AdLoaded":r(y),c.call("startAd");break;case"AdRemainingTimeChange":E=i(),v.onTimeRemained(E-c.callGet("adRemainingTime"),E),_.onTimeRemained(E-c.callGet("adRemainingTime"),E);break;case"AdVolumeChange":var f=c.callGet("adVolume");(d===0&&f>0||d>0&&f===0)&&t.log(f?"volumeOn":"volumeOff"),d=f;break;case"AdVideoComplete":E=i(),v.onTimeRemained(E,E);break;case"AdStopped":case"AdSkipped":setTimeout(function(){h?h():e.cb("onCompleted")});break;case"AdClickThru":t.log("click"),e.cb("onClicked");break;case"AdError":e.stats.logError("EXTERNAL_SWF_ADVERTISMENT_ERROR:"+(w&&w.message||"")),e.cb("onError");break;case"AdPaused":e.cb("onPaused");break;case"AdPlaying":e.cb("onPlayed");break;case"AdUserClose":t.log("closedByUser")}}},{start:n,dispose:o,pause:function(){c&&c.call("pauseAd")},resume:function(){c&&c.call("resumeAd")},setVolume:function(T){c&&c.callSet("adVolume",T),a=T},skip:function(T){h=T;try{c&&c.call("skipAd")}catch{}}}};window.admanAsyncLoader?setTimeout(admanAsyncLoader):window.admanAsyncInit&&setTimeout(admanAsyncInit)});var Mi="[",Ci="[!",Gi="]",mi={};var et=Symbol(),Gt=Symbol("filename"),qa=Symbol("hmr"),Ka="http://www.w3.org/1999/xhtml";var Za=globalThis.process?.env?.NODE_ENV,Q=Za&&!Za.toLowerCase().startsWith("prod");var qt=Array.isArray,Ja=Array.prototype.indexOf,Jo=Array.from,Xo=Object.keys,at=Object.defineProperty,It=Object.getOwnPropertyDescriptor,er=Object.getOwnPropertyDescriptors,tr=Object.prototype,Xa=Array.prototype,qi=Object.getPrototypeOf,ir=Object.isExtensible;var ut=()=>{};function Ki(e){for(var t=0;t<e.length;t++)e[t]()}var kt=Symbol("$state"),vn=Symbol("legacy props"),es=Symbol(""),Kn=Symbol("proxy path");var gn=3,Kt=8;function Zn(e){return e===this.v}function Zi(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ts(e,t){return e!==t}function Ji(e){return!Zi(e,this.v)}function is(){if(Q){let e=new Error(`derived_references_self
6
+ var e=Object.create,t=Object.getPrototypeOf,n=Object.defineProperty,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty;function a(e){return this[e]}var o,s,c=(c,l,u)=>{var d=typeof c==`object`&&!!c;if(d){var f=l?o??=new WeakMap:s??=new WeakMap,p=f.get(c);if(p)return p}u=c==null?{}:e(t(c));let m=l||!c||!c.__esModule?n(u,`default`,{value:c,enumerable:!0}):u;for(let e of r(c))i.call(m,e)||n(m,e,{get:a.bind(c,e),enumerable:!0});return d&&f.set(c,m),m},l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),u=l((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||function(){return this}()||Function(`return this`)()}),d=l((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}}),f=l((e,t)=>{t.exports=!d()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})}),p=l((e,t)=>{var n=f(),r=Function.prototype,i=r.apply,a=r.call;t.exports=typeof Reflect==`object`&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})}),m=l((e,t)=>{var n=f(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}}),h=l((e,t)=>{var n=m(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}}),g=l((e,t)=>{var n=h(),r=m();t.exports=function(e){if(n(e)===`Function`)return r(e)}}),_=l((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}}),v=l((e,t)=>{t.exports=!d()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),y=l((e,t)=>{var n=f(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}}),b=l(e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t}),x=l((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}}),S=l((e,t)=>{var n=m(),r=d(),i=h(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a}),C=l((e,t)=>{t.exports=function(e){return e==null}}),w=l((e,t)=>{var n=C(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}}),T=l((e,t)=>{var n=S(),r=w();t.exports=function(e){return n(r(e))}}),E=l((e,t)=>{var n=_();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}}),D=l((e,t)=>{t.exports={}}),O=l((e,t)=>{var n=D(),r=u(),i=_(),a=function(e){return i(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?a(n[e])||a(r[e]):n[e]&&n[e][t]||r[e]&&r[e][t]}}),k=l((e,t)=>{t.exports=m()({}.isPrototypeOf)}),A=l((e,t)=>{var n=u().navigator,r=n&&n.userAgent;t.exports=r?String(r):``}),ee=l((e,t)=>{var n=u(),r=A(),i=n.process,a=n.Deno,o=i&&i.versions||a&&a.version,s=o&&o.v8,c,l;s&&(c=s.split(`.`),l=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!l&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(l=+c[1]))),t.exports=l}),te=l((e,t)=>{var n=ee(),r=d(),i=u().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})}),ne=l((e,t)=>{t.exports=te()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`}),j=l((e,t)=>{var n=O(),r=_(),i=k(),a=ne(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}}),M=l((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}}),re=l((e,t)=>{var n=_(),r=M(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}}),ie=l((e,t)=>{var n=re(),r=C();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}}),ae=l((e,t)=>{var n=y(),r=_(),i=E(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}}),oe=l((e,t)=>{t.exports=!0}),se=l((e,t)=>{var n=u(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}}),ce=l((e,t)=>{var n=oe(),r=u(),i=se(),a=`__core-js_shared__`,o=t.exports=r[a]||i(a,{});(o.versions||=[]).push({version:`3.43.0`,mode:n?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE`,source:`https://github.com/zloirock/core-js`})}),le=l((e,t)=>{var n=ce();t.exports=function(e,t){return n[e]||(n[e]=t||{})}}),ue=l((e,t)=>{var n=w(),r=Object;t.exports=function(e){return r(n(e))}}),de=l((e,t)=>{var n=m(),r=ue(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}}),fe=l((e,t)=>{var n=m(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}}),pe=l((e,t)=>{var n=u(),r=le(),i=de(),a=fe(),o=te(),s=ne(),c=n.Symbol,l=r(`wks`),d=s?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return i(l,e)||(l[e]=o&&i(c,e)?c[e]:d(`Symbol.`+e)),l[e]}}),me=l((e,t)=>{var n=y(),r=E(),i=j(),a=ie(),o=ae(),s=pe(),c=TypeError,l=s(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var s=a(e,l),u;if(s){if(t===void 0&&(t=`default`),u=n(s,e,t),!r(u)||i(u))return u;throw new c(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),o(e,t)}}),he=l((e,t)=>{var n=me(),r=j();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}}),ge=l((e,t)=>{var n=u(),r=E(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}}),_e=l((e,t)=>{var n=v(),r=d(),i=ge();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),`a`,{get:function(){return 7}}).a!==7})}),ve=l(e=>{var t=v(),n=y(),r=b(),i=x(),a=T(),o=he(),s=de(),c=_e(),l=Object.getOwnPropertyDescriptor;e.f=t?l:function(e,t){if(e=a(e),t=o(t),c)try{return l(e,t)}catch{}if(s(e,t))return i(!n(r.f,e,t),e[t])}}),ye=l((e,t)=>{var n=d(),r=_(),i=/#|\.prototype\./,a=function(e,t){var i=s[o(e)];return i===l?!0:i===c?!1:r(t)?n(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},s=a.data={},c=a.NATIVE=`N`,l=a.POLYFILL=`P`;t.exports=a}),be=l((e,t)=>{var n=g(),r=re(),i=f(),a=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:i?a(e,t):function(){return e.apply(t,arguments)}}}),xe=l((e,t)=>{var n=v(),r=d();t.exports=n&&r(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42})}),Se=l((e,t)=>{var n=E(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}}),Ce=l(e=>{var t=v(),n=_e(),r=xe(),i=Se(),a=he(),o=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=`enumerable`,u=`configurable`,d=`writable`;e.f=t?r?function(e,t,n){if(i(e),t=a(t),i(n),typeof e==`function`&&t===`prototype`&&`value`in n&&d in n&&!n[d]){var r=c(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:l in n?n[l]:r[l],writable:!1})}return s(e,t,n)}:s:function(e,t,r){if(i(e),t=a(t),i(r),n)try{return s(e,t,r)}catch{}if(`get`in r||`set`in r)throw new o(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}}),we=l((e,t)=>{var n=v(),r=Ce(),i=x();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}}),Te=l((e,t)=>{var n=u(),r=p(),i=g(),a=_(),o=ve().f,s=ye(),c=D(),l=be(),d=we(),f=de();ce();var m=function(e){var t=function(n,i,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,i)}return new e(n,i,a)}return r(e,this,arguments)};return t.prototype=e.prototype,t};t.exports=function(e,t){var r=e.target,u=e.global,p=e.stat,h=e.proto,g=u?n:p?n[r]:n[r]&&n[r].prototype,_=u?c:c[r]||d(c,r,{})[r],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in t)y=s(u?S:r+(p?`.`:`#`)+S,e.forced),b=!y&&g&&f(g,S),w=_[S],b&&(e.dontCallGetSet?(D=o(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:t[S],!(!y&&!h&&typeof w==typeof C)&&(E=e.bind&&b?l(C,n):e.wrap&&b?m(C):h&&a(C)?i(C):C,(e.sham||C&&C.sham||w&&w.sham)&&d(E,`sham`,!0),d(_,S,E),h&&(x=r+`Prototype`,f(c,x)||d(c,x,{}),d(c[x],S,C),e.real&&v&&(y||!v[S])&&d(v,S,C)))}}),Ee=l((e,t)=>{var n=le(),r=fe(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}}),De=l((e,t)=>{t.exports=!d()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}),Oe=l((e,t)=>{var n=de(),r=_(),i=ue(),a=Ee(),o=De(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}}),ke=l((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}}),Ae=l((e,t)=>{var n=ke();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}}),je=l((e,t)=>{var n=Ae(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}}),Me=l((e,t)=>{var n=Ae(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}}),Ne=l((e,t)=>{var n=Me();t.exports=function(e){return n(e.length)}}),Pe=l((e,t)=>{var n=T(),r=je(),i=Ne(),a=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}}),Fe=l((e,t)=>{t.exports={}}),Ie=l((e,t)=>{var n=m(),r=de(),i=T(),a=Pe().indexOf,o=Fe(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}}),Le=l((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]}),Re=l((e,t)=>{var n=Ie(),r=Le();t.exports=Object.keys||function(e){return n(e,r)}}),ze=l((e,t)=>{var n=v(),r=d(),i=m(),a=Oe(),o=Re(),s=T(),c=b().f,l=i(c),u=i([].push),f=n&&r(function(){var e=Object.create(null);return e[2]=2,!l(e,2)}),p=function(e){return function(t){for(var r=s(t),i=o(r),c=f&&a(r)===null,d=i.length,p=0,m=[],h;d>p;)h=i[p++],(!n||(c?h in r:l(r,h)))&&u(m,e?[h,r[h]]:r[h]);return m}};t.exports={entries:p(!0),values:p(!1)}}),Be=l(()=>{var e=Te(),t=ze().entries;e({target:`Object`,stat:!0},{entries:function(e){return t(e)}})}),Ve=l((e,t)=>{Be(),t.exports=D().Object.entries}),He=l((e,t)=>{t.exports=Ve()}),Ue=l((e,t)=>{t.exports=He()}),We=l(()=>{var e=Te(),t=ze().values;e({target:`Object`,stat:!0},{values:function(e){return t(e)}})}),Ge=l((e,t)=>{We(),t.exports=D().Object.values}),Ke=l((e,t)=>{t.exports=Ge()}),qe=l((e,t)=>{t.exports=Ke()}),Je=l((e,t)=>{t.exports=function(){}}),Ye=l((e,t)=>{t.exports={}}),Xe=l((e,t)=>{var n=u(),r=_(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))}),Ze=l((e,t)=>{var n=Xe(),r=u(),i=E(),a=we(),o=de(),s=ce(),c=Ee(),l=Fe(),d=`Object already initialized`,f=r.TypeError,p=r.WeakMap,m,h,g,_=function(e){return g(e)?h(e):m(e,{})},v=function(e){return function(t){var n;if(!i(t)||(n=h(t)).type!==e)throw new f(`Incompatible receiver, `+e+` required`);return n}};n||s.state?(y=s.state||=new p,y.get=y.get,y.has=y.has,y.set=y.set,m=function(e,t){if(y.has(e))throw new f(d);return t.facade=e,y.set(e,t),t},h=function(e){return y.get(e)||{}},g=function(e){return y.has(e)}):(b=c(`state`),l[b]=!0,m=function(e,t){if(o(e,b))throw new f(d);return t.facade=e,a(e,b,t),t},h=function(e){return o(e,b)?e[b]:{}},g=function(e){return o(e,b)});var y,b;t.exports={set:m,get:h,has:g,enforce:_,getterFor:v}}),Qe=l((e,t)=>{var n=v(),r=de(),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(i,`name`);t.exports={EXISTS:o,PROPER:o&&function(){}.name===`something`,CONFIGURABLE:o&&(!n||n&&a(i,`name`).configurable)}}),$e=l(e=>{var t=v(),n=xe(),r=Ce(),i=Se(),a=T(),o=Re();e.f=t&&!n?Object.defineProperties:function(e,t){i(e);for(var n=a(t),s=o(t),c=s.length,l=0,u;c>l;)r.f(e,u=s[l++],n[u]);return e}}),et=l((e,t)=>{t.exports=O()(`document`,`documentElement`)}),tt=l((e,t)=>{var n=Se(),r=$e(),i=Le(),a=Fe(),o=et(),s=ge(),c=Ee(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),m=function(){},h=function(e){return u+f+l+e+u+`/`+f+l},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(h(`document.F=Object`)),n.close(),n.F},v,y=function(){try{v=new ActiveXObject(`htmlfile`)}catch{}y=typeof document<`u`?document.domain&&v?g(v):_():g(v);for(var e=i.length;e--;)delete y[d][i[e]];return y()};a[p]=!0,t.exports=Object.create||function(e,t){var i;return e===null?i=y():(m[d]=n(e),i=new m,m[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}}),nt=l((e,t)=>{var n=we();t.exports=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e}}),rt=l((e,t)=>{var n=d(),r=_(),i=E(),a=tt(),o=Oe(),s=nt(),c=pe(),l=oe(),u=c(`iterator`),f=!1,p,m,h;[].keys&&(h=[].keys(),`next`in h?(m=o(o(h)),m!==Object.prototype&&(p=m)):f=!0),!i(p)||n(function(){var e={};return p[u].call(e)!==e})?p={}:l&&(p=a(p)),r(p[u])||s(p,u,function(){return this}),t.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:f}}),it=l((e,t)=>{var n=pe()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`}),at=l((e,t)=>{var n=it(),r=_(),i=h(),a=pe()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,c=function(e,t){try{return e[t]}catch{}};t.exports=n?i:function(e){var t,n,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=c(t=o(e),a))==`string`?n:s?i(t):(l=i(t))===`Object`&&r(t.callee)?`Arguments`:l}}),ot=l((e,t)=>{var n=it(),r=at();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}}),st=l((e,t)=>{var n=it(),r=Ce().f,i=we(),a=de(),o=ot(),s=pe()(`toStringTag`);t.exports=function(e,t,c,l){var u=c?e:e&&e.prototype;u&&(a(u,s)||r(u,s,{configurable:!0,value:t}),l&&!n&&i(u,`toString`,o))}}),ct=l((e,t)=>{var n=rt().IteratorPrototype,r=tt(),i=x(),a=st(),o=Ye(),s=function(){return this};t.exports=function(e,t,c,l){var u=t+` Iterator`;return e.prototype=r(n,{next:i(+!l,c)}),a(e,u,!1,!0),o[u]=s,e}}),lt=l((e,t)=>{var n=m(),r=re();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}}),ut=l((e,t)=>{var n=E();t.exports=function(e){return n(e)||e===null}}),dt=l((e,t)=>{var n=ut(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}}),ft=l((e,t)=>{var n=lt(),r=E(),i=w(),a=dt();t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch{}return function(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)}),pt=l((e,t)=>{var n=Te(),r=y(),i=oe(),a=Qe(),o=_(),s=ct(),c=Oe(),l=ft(),u=st(),d=we(),f=nt(),p=pe(),m=Ye(),h=rt(),g=a.PROPER,v=a.CONFIGURABLE,b=h.IteratorPrototype,x=h.BUGGY_SAFARI_ITERATORS,S=p(`iterator`),C=`keys`,w=`values`,T=`entries`,E=function(){return this};t.exports=function(e,t,a,p,h,_,y){s(a,t,p);var D=function(e){if(e===h&&te)return te;if(!x&&e&&e in A)return A[e];switch(e){case C:return function(){return new a(this,e)};case w:return function(){return new a(this,e)};case T:return function(){return new a(this,e)}}return function(){return new a(this)}},O=t+` Iterator`,k=!1,A=e.prototype,ee=A[S]||A[`@@iterator`]||h&&A[h],te=!x&&ee||D(h),ne=t===`Array`&&A.entries||ee,j,M,re;if(ne&&(j=c(ne.call(new e)),j!==Object.prototype&&j.next&&(!i&&c(j)!==b&&(l?l(j,b):o(j[S])||f(j,S,E)),u(j,O,!0,!0),i&&(m[O]=E))),g&&h===w&&ee&&ee.name!==w&&(!i&&v?d(A,`name`,w):(k=!0,te=function(){return r(ee,this)})),h)if(M={values:D(w),keys:_?te:D(C),entries:D(T)},y)for(re in M)(x||k||!(re in A))&&f(A,re,M[re]);else n({target:t,proto:!0,forced:x||k},M);return(!i||y)&&A[S]!==te&&f(A,S,te,{name:h}),m[t]=te,M}}),mt=l((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}}),ht=l((e,t)=>{var n=T(),r=Je(),i=Ye(),a=Ze(),o=Ce().f,s=pt(),c=mt(),l=oe(),u=v(),d=`Array Iterator`,f=a.set,p=a.getterFor(d);t.exports=s(Array,`Array`,function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case`keys`:return c(n,!1);case`values`:return c(t[n],!1)}return c([n,t[n]],!1)},`values`);var m=i.Arguments=i.Array;if(r(`keys`),r(`values`),r(`entries`),!l&&u&&m.name!==`values`)try{o(m,`name`,{value:`values`})}catch{}}),gt=l((e,t)=>{var n=pe(),r=Ye(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}}),_t=l((e,t)=>{var n=at(),r=ie(),i=C(),a=Ye(),o=pe()(`iterator`);t.exports=function(e){if(!i(e))return r(e,o)||r(e,`@@iterator`)||a[n(e)]}}),vt=l((e,t)=>{var n=y(),r=re(),i=Se(),a=M(),o=_t(),s=TypeError;t.exports=function(e,t){var c=arguments.length<2?o(e):t;if(r(c))return i(n(c,e));throw new s(a(e)+` is not iterable`)}}),yt=l((e,t)=>{var n=y(),r=Se(),i=ie();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}}),bt=l((e,t)=>{var n=be(),r=y(),i=Se(),a=M(),o=gt(),s=Ne(),c=k(),l=vt(),u=_t(),d=yt(),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;t.exports=function(e,t,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=n(t,g),S,C,w,T,E,D,O,k=function(e){return S&&d(S,`normal`),new p(!0,e)},A=function(e){return _?(i(e),b?x(e[0],e[1],k):x(e[0],e[1])):b?x(e,k):x(e)};if(v)S=e.iterator;else if(y)S=e;else{if(C=u(e),!C)throw new f(a(e)+` is not iterable`);if(o(C)){for(w=0,T=s(e);T>w;w++)if(E=A(e[w]),E&&c(m,E))return E;return new p(!1)}S=l(e,C)}for(D=v?e.next:S.next;!(O=r(D,S)).done;){try{E=A(O.value)}catch(e){d(S,`throw`,e)}if(typeof E==`object`&&E&&c(m,E))return E}return new p(!1)}}),xt=l((e,t)=>{var n=v(),r=Ce(),i=x();t.exports=function(e,t,a){n?r.f(e,t,i(0,a)):e[t]=a}}),St=l(()=>{var e=Te(),t=bt(),n=xt();e({target:`Object`,stat:!0},{fromEntries:function(e){var r={};return t(e,function(e,t){n(r,e,t)},{AS_ENTRIES:!0}),r}})}),Ct=l((e,t)=>{ht(),St(),t.exports=D().Object.fromEntries}),wt=l((e,t)=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),Tt=l(()=>{ht();var e=wt(),t=u(),n=st(),r=Ye();for(i in e)n(t[i],i),r[i]=r.Array;var i}),Et=l((e,t)=>{var n=Ct();Tt(),t.exports=n}),Dt=l((e,t)=>{t.exports=Et()}),Ot=l((e,t)=>{var n=E(),r=h(),i=pe()(`match`);t.exports=function(e){var t;return n(e)&&((t=e[i])===void 0?r(e)===`RegExp`:!!t)}}),kt=l((e,t)=>{var n=at(),r=String;t.exports=function(e){if(n(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return r(e)}}),At=l((e,t)=>{var n=u(),r=d(),i=n.RegExp;t.exports={correct:!r(function(){var e=!0;try{i(`.`,`d`)}catch{e=!1}var t={},n=``,r=e?`dgimsy`:`gimsy`,a=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)a(s,o[s]);return Object.getOwnPropertyDescriptor(i.prototype,`flags`).get.call(t)!==r||n!==r})}}),jt=l((e,t)=>{var n=Se();t.exports=function(){var e=n(this),t=``;return e.hasIndices&&(t+=`d`),e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.unicodeSets&&(t+=`v`),e.sticky&&(t+=`y`),t}}),Mt=l((e,t)=>{var n=y(),r=de(),i=k(),a=At(),o=jt(),s=RegExp.prototype;t.exports=a.correct?function(e){return e.flags}:function(e){return!a.correct&&i(s,e)&&!r(e,`flags`)?n(o,e):e.flags}}),Nt=l((e,t)=>{var n=m(),r=ue(),i=Math.floor,a=n(``.charAt),o=n(``.replace),s=n(``.slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(e,t,n,u,d,f){var p=n+e.length,m=u.length,h=l;return d!==void 0&&(d=r(d),h=c),o(f,h,function(r,o){var c;switch(a(o,0)){case`$`:return`$`;case`&`:return e;case"`":return s(t,0,n);case`'`:return s(t,p);case`<`:c=d[s(o,1,-1)];break;default:var l=+o;if(l===0)return r;if(l>m){var f=i(l/10);return f===0?r:f<=m?u[f-1]===void 0?a(o,1):u[f-1]+a(o,1):r}c=u[l-1]}return c===void 0?``:c})}}),Pt=l(()=>{var e=Te(),t=y(),n=m(),r=w(),i=_(),a=E(),o=Ot(),s=kt(),c=ie(),l=Mt(),u=Nt(),d=pe(),f=oe(),p=d(`replace`),h=TypeError,g=n(``.indexOf),v=n(``.replace),b=n(``.slice),x=Math.max;e({target:`String`,proto:!0},{replaceAll:function(e,n){var d=r(this),m,_,y,S,C,w,T,E,D,O,k=0,A=``;if(a(e)){if(m=o(e),m&&(_=s(r(l(e))),!~g(_,`g`)))throw new h("`.replaceAll` does not allow non-global regexes");if(y=c(e,p),y)return t(y,e,d,n);if(f&&m)return v(s(d),e,n)}for(S=s(d),C=s(e),w=i(n),w||(n=s(n)),T=C.length,E=x(1,T),D=g(S,C);D!==-1;)O=w?s(n(C,D,S)):u(C,S,D,[],void 0,n),A+=b(S,k,D)+O,k=D+T,D=D+E>S.length?-1:g(S,C,D+E);return k<S.length&&(A+=b(S,k)),A}})}),Ft=l((e,t)=>{t.exports=O()}),It=l((e,t)=>{Pt(),t.exports=Ft()(`String`,`replaceAll`)}),Lt=l((e,t)=>{t.exports=It()}),Rt=l((e,t)=>{t.exports=Lt()}),zt=l(()=>{var e=Te(),t=Pe().includes,n=d(),r=Je();e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`)}),Bt=l((e,t)=>{zt(),t.exports=Ft()(`Array`,`includes`)}),Vt=l((e,t)=>{t.exports=Bt()}),Ht=l((e,t)=>{t.exports=Vt()}),Ut=l(()=>{var e=Te(),t=ue(),n=Ne(),r=Ae(),i=Je();e({target:`Array`,proto:!0},{at:function(e){var i=t(this),a=n(i),o=r(e),s=o>=0?o:a+o;return s<0||s>=a?void 0:i[s]}}),i(`at`)}),Wt=l((e,t)=>{Ut(),t.exports=Ft()(`Array`,`at`)}),Gt=l((e,t)=>{t.exports=Wt()}),Kt=l((e,t)=>{t.exports=Gt()}),qt=l((e,t)=>{var n=u(),r=A(),i=h(),a=function(e){return r.slice(0,e.length)===e};t.exports=function(){return a(`Bun/`)?`BUN`:a(`Cloudflare-Workers`)?`CLOUDFLARE`:a(`Deno/`)?`DENO`:a(`Node.js/`)?`NODE`:n.Bun&&typeof Bun.version==`string`?`BUN`:n.Deno&&typeof Deno.version==`object`?`DENO`:i(n.process)===`process`?`NODE`:n.window&&n.document?`BROWSER`:`REST`}()}),Jt=l((e,t)=>{t.exports=qt()===`NODE`}),Yt=l((e,t)=>{var n=Ce();t.exports=function(e,t,r){return n.f(e,t,r)}}),Xt=l((e,t)=>{var n=O(),r=Yt(),i=pe(),a=v(),o=i(`species`);t.exports=function(e){var t=n(e);a&&t&&!t[o]&&r(t,o,{configurable:!0,get:function(){return this}})}}),Zt=l((e,t)=>{var n=k(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}}),Qt=l((e,t)=>{var n=m(),r=_(),i=ce(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource}),$t=l((e,t)=>{var n=m(),r=d(),i=_(),a=at(),o=O(),s=Qt(),c=function(){},l=o(`Reflect`,`construct`),u=/^\s*(?:class|function)\b/,f=n(u.exec),p=!u.test(c),h=function(e){if(!i(e))return!1;try{return l(c,[],e),!0}catch{return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return p||!!f(u,s(e))}catch{return!0}};g.sham=!0,t.exports=!l||r(function(){var e;return h(h.call)||!h(Object)||!h(function(){e=!0})||e})?g:h}),en=l((e,t)=>{var n=$t(),r=M(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a constructor`)}}),tn=l((e,t)=>{var n=Se(),r=en(),i=C(),a=pe()(`species`);t.exports=function(e,t){var o=n(e).constructor,s;return o===void 0||i(s=n(o)[a])?t:r(s)}}),nn=l((e,t)=>{t.exports=m()([].slice)}),rn=l((e,t)=>{var n=TypeError;t.exports=function(e,t){if(e<t)throw new n(`Not enough arguments`);return e}}),an=l((e,t)=>{var n=A();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)}),on=l((e,t)=>{var n=u(),r=p(),i=be(),a=_(),o=de(),s=d(),c=et(),l=nn(),f=ge(),m=rn(),h=an(),g=Jt(),v=n.setImmediate,y=n.clearImmediate,b=n.process,x=n.Dispatch,S=n.Function,C=n.MessageChannel,w=n.String,T=0,E={},D=`onreadystatechange`,O,k,A,ee;s(function(){O=n.location});var te=function(e){if(o(E,e)){var t=E[e];delete E[e],t()}},ne=function(e){return function(){te(e)}},j=function(e){te(e.data)},M=function(e){n.postMessage(w(e),O.protocol+`//`+O.host)};(!v||!y)&&(v=function(e){m(arguments.length,1);var t=a(e)?e:S(e),n=l(arguments,1);return E[++T]=function(){r(t,void 0,n)},k(T),T},y=function(e){delete E[e]},g?k=function(e){b.nextTick(ne(e))}:x&&x.now?k=function(e){x.now(ne(e))}:C&&!h?(A=new C,ee=A.port2,A.port1.onmessage=j,k=i(ee.postMessage,ee)):n.addEventListener&&a(n.postMessage)&&!n.importScripts&&O&&O.protocol!==`file:`&&!s(M)?(k=M,n.addEventListener(`message`,j,!1)):k=D in f(`script`)?function(e){c.appendChild(f(`script`))[D]=function(){c.removeChild(this),te(e)}}:function(e){setTimeout(ne(e),0)}),t.exports={set:v,clear:y}}),sn=l((e,t)=>{var n=u(),r=v(),i=Object.getOwnPropertyDescriptor;t.exports=function(e){if(!r)return n[e];var t=i(n,e);return t&&t.value}}),cn=l((e,t)=>{var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}},t.exports=n}),ln=l((e,t)=>{var n=A();t.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<`u`}),un=l((e,t)=>{var n=A();t.exports=/web0s(?!.*chrome)/i.test(n)}),dn=l((e,t)=>{var n=u(),r=sn(),i=be(),a=on().set,o=cn(),s=an(),c=ln(),l=un(),d=Jt(),f=n.MutationObserver||n.WebKitMutationObserver,p=n.document,m=n.process,h=n.Promise,g=r(`queueMicrotask`),_,v,y,b,x;g||=(S=new o,C=function(){var e,t;for(d&&(e=m.domain)&&e.exit();t=S.get();)try{t()}catch(e){throw S.head&&_(),e}e&&e.enter()},!s&&!d&&!l&&f&&p?(v=!0,y=p.createTextNode(``),new f(C).observe(y,{characterData:!0}),_=function(){y.data=v=!v}):!c&&h&&h.resolve?(b=h.resolve(void 0),b.constructor=h,x=i(b.then,b),_=function(){x(C)}):d?_=function(){m.nextTick(C)}:(a=i(a,n),_=function(){a(C)}),function(e){S.head||_(),S.add(e)});var S,C;t.exports=g}),fn=l((e,t)=>{t.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}}}),pn=l((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}}),mn=l((e,t)=>{t.exports=u().Promise}),hn=l((e,t)=>{var n=u(),r=mn(),i=_(),a=ye(),o=Qt(),s=pe(),c=qt(),l=oe(),d=ee(),f=r&&r.prototype,p=s(`species`),m=!1,h=i(n.PromiseRejectionEvent);t.exports={CONSTRUCTOR:a(`Promise`,function(){var e=o(r),t=e!==String(r);if(!t&&d===66||l&&!(f.catch&&f.finally))return!0;if(!d||d<51||!/native code/.test(e)){var n=new r(function(e){e(1)}),i=function(e){e(function(){},function(){})},a=n.constructor={};if(a[p]=i,m=n.then(function(){})instanceof i,!m)return!0}return!t&&(c===`BROWSER`||c===`DENO`)&&!h}),REJECTION_EVENT:h,SUBCLASSING:m}}),gn=l((e,t)=>{var n=re(),r=TypeError,i=function(e){var t,i;this.promise=new e(function(e,n){if(t!==void 0||i!==void 0)throw new r(`Bad Promise constructor`);t=e,i=n}),this.resolve=n(t),this.reject=n(i)};e.f=function(e){return new i(e)}}),_n=l(()=>{var e=Te(),t=oe(),n=Jt(),r=u(),i=D(),a=y(),o=nt(),s=ft(),c=st(),l=Xt(),d=re(),f=_(),p=E(),m=Zt(),h=tn(),g=on().set,v=dn(),b=fn(),x=pn(),S=cn(),C=Ze(),w=mn(),T=hn(),O=gn(),k=`Promise`,A=T.CONSTRUCTOR,ee=T.REJECTION_EVENT,te=T.SUBCLASSING,ne=C.getterFor(k),j=C.set,M=w&&w.prototype,ie=w,ae=M,se=r.TypeError,ce=r.document,le=r.process,ue=O.f,de=ue,fe=!!(ce&&ce.createEvent&&r.dispatchEvent),pe=`unhandledrejection`,me=`rejectionhandled`,he=0,ge=1,_e=2,ve=1,ye=2,be,xe,Se,Ce,we=function(e){var t;return p(e)&&f(t=e.then)?t:!1},Ee=function(e,t){var n=t.value,r=t.state===ge,i=r?e.ok:e.fail,o=e.resolve,s=e.reject,c=e.domain,l,u,d;try{i?(r||(t.rejection===ye&&je(t),t.rejection=ve),i===!0?l=n:(c&&c.enter(),l=i(n),c&&(c.exit(),d=!0)),l===e.promise?s(new se(`Promise-chain cycle`)):(u=we(l))?a(u,l,o,s):o(l)):s(n)}catch(e){c&&!d&&c.exit(),s(e)}},De=function(e,t){e.notified||(e.notified=!0,v(function(){for(var n=e.reactions,r;r=n.get();)Ee(r,e);e.notified=!1,t&&!e.rejection&&ke(e)}))},Oe=function(e,t,n){var i,a;fe?(i=ce.createEvent(`Event`),i.promise=t,i.reason=n,i.initEvent(e,!1,!0),r.dispatchEvent(i)):i={promise:t,reason:n},!ee&&(a=r[`on`+e])?a(i):e===pe&&b(`Unhandled promise rejection`,n)},ke=function(e){a(g,r,function(){var t=e.facade,r=e.value,i=Ae(e),a;if(i&&(a=x(function(){n?le.emit(`unhandledRejection`,r,t):Oe(pe,t,r)}),e.rejection=n||Ae(e)?ye:ve,a.error))throw a.value})},Ae=function(e){return e.rejection!==ve&&!e.parent},je=function(e){a(g,r,function(){var t=e.facade;n?le.emit(`rejectionHandled`,t):Oe(me,t,e.value)})},Me=function(e,t,n){return function(r){e(t,r,n)}},Ne=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=_e,De(e,!0))},Pe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new se(`Promise can't be resolved itself`);var r=we(t);r?v(function(){var n={done:!1};try{a(r,t,Me(Pe,n,e),Me(Ne,n,e))}catch(t){Ne(n,t,e)}}):(e.value=t,e.state=ge,De(e,!1))}catch(t){Ne({done:!1},t,e)}}};if(A&&(ie=function(e){m(this,ae),d(e),a(be,this);var t=ne(this);try{e(Me(Pe,t),Me(Ne,t))}catch(e){Ne(t,e)}},ae=ie.prototype,be=function(e){j(this,{type:k,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:he,value:null})},be.prototype=o(ae,`then`,function(e,t){var r=ne(this),i=ue(h(this,ie));return r.parent=!0,i.ok=f(e)?e:!0,i.fail=f(t)&&t,i.domain=n?le.domain:void 0,r.state===he?r.reactions.add(i):v(function(){Ee(i,r)}),i.promise}),xe=function(){var e=new be,t=ne(e);this.promise=e,this.resolve=Me(Pe,t),this.reject=Me(Ne,t)},O.f=ue=function(e){return e===ie||e===Se?new xe(e):de(e)},!t&&f(w)&&M!==Object.prototype)){Ce=M.then,te||o(M,`then`,function(e,t){var n=this;return new ie(function(e,t){a(Ce,n,e,t)}).then(e,t)},{unsafe:!0});try{delete M.constructor}catch{}s&&s(M,ae)}e({global:!0,constructor:!0,wrap:!0,forced:A},{Promise:ie}),Se=i.Promise,c(ie,k,!1,!0),l(k)}),vn=l((e,t)=>{var n=pe()(`iterator`),r=!1;try{i=0,a={next:function(){return{done:!!i++}},return:function(){r=!0}},a[n]=function(){return this},Array.from(a,function(){throw 2})}catch{}var i,a;t.exports=function(e,t){try{if(!t&&!r)return!1}catch{return!1}var i=!1;try{var a={};a[n]=function(){return{next:function(){return{done:i=!0}}}},e(a)}catch{}return i}}),yn=l((e,t)=>{var n=mn(),r=vn();t.exports=hn().CONSTRUCTOR||!r(function(e){n.all(e).then(void 0,function(){})})}),bn=l(()=>{var e=Te(),t=y(),n=re(),r=gn(),i=pn(),a=bt();e({target:`Promise`,stat:!0,forced:yn()},{all:function(e){var o=this,s=r.f(o),c=s.resolve,l=s.reject,u=i(function(){var r=n(o.resolve),i=[],s=0,u=1;a(e,function(e){var n=s++,a=!1;u++,t(r,o,e).then(function(e){a||(a=!0,i[n]=e,--u||c(i))},l)}),--u||c(i)});return u.error&&l(u.value),s.promise}})}),xn=l(()=>{var e=Te(),t=oe(),n=hn().CONSTRUCTOR,r=mn(),i=O(),a=_(),o=nt(),s=r&&r.prototype;e({target:`Promise`,proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&a(r)&&(c=i(`Promise`).prototype.catch,s.catch!==c&&o(s,`catch`,c,{unsafe:!0}));var c}),Sn=l(()=>{var e=Te(),t=y(),n=re(),r=gn(),i=pn(),a=bt();e({target:`Promise`,stat:!0,forced:yn()},{race:function(e){var o=this,s=r.f(o),c=s.reject,l=i(function(){var r=n(o.resolve);a(e,function(e){t(r,o,e).then(s.resolve,c)})});return l.error&&c(l.value),s.promise}})}),Cn=l(()=>{var e=Te(),t=gn(),n=hn().CONSTRUCTOR;e({target:`Promise`,stat:!0,forced:n},{reject:function(e){var n=t.f(this),r=n.reject;return r(e),n.promise}})}),wn=l((e,t)=>{var n=Se(),r=E(),i=gn();t.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var a=i.f(e),o=a.resolve;return o(t),a.promise}}),Tn=l(()=>{var e=Te(),t=O(),n=oe(),r=mn(),i=hn().CONSTRUCTOR,a=wn(),o=t(`Promise`),s=n&&!i;e({target:`Promise`,stat:!0,forced:n||i},{resolve:function(e){return a(s&&this===o?r:this,e)}})}),En=l(()=>{_n(),bn(),xn(),Sn(),Cn(),Tn()}),Dn=l(()=>{var e=Te(),t=oe(),n=mn(),r=d(),i=O(),a=_(),o=tn(),s=wn(),c=nt(),l=n&&n.prototype;e({target:`Promise`,proto:!0,real:!0,forced:!!n&&r(function(){l.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=o(this,i(`Promise`)),n=a(e);return this.then(n?function(n){return s(t,e()).then(function(){return n})}:e,n?function(n){return s(t,e()).then(function(){throw n})}:e)}}),!t&&a(n)&&(u=i(`Promise`).prototype.finally,l.finally!==u&&c(l,`finally`,u,{unsafe:!0}));var u}),On=l((e,t)=>{En(),Dn(),t.exports=Ft()(`Promise`,`finally`)}),kn=l((e,t)=>{t.exports=On()}),An=l((e,t)=>{t.exports=kn()}),jn=1,Mn=2,Nn=4,Pn=8,Fn=16,In=1,Ln=2,Rn=`[`,zn=`[!`,Bn=`]`,Vn={},Hn=Symbol(),Un=Symbol(`filename`),Wn=`http://www.w3.org/1999/xhtml`,N=!0,P=Array.isArray,Gn=Array.prototype.indexOf,Kn=Array.prototype.includes,qn=Array.from;Object.keys;var Jn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Xn=Object.getOwnPropertyDescriptors,Zn=Object.prototype,Qn=Array.prototype,$n=Object.getPrototypeOf,er=Object.isExtensible,tr=()=>{};function nr(e){for(var t=0;t<e.length;t++)e[t]()}function rr(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var ir=2,ar=4,or=8,sr=1<<24,cr=16,lr=32,ur=64,dr=128,fr=512,pr=1024,mr=2048,hr=4096,gr=8192,_r=16384,vr=32768,yr=65536,br=1<<17,xr=1<<18,Sr=1<<19,Cr=1<<20,wr=65536,Tr=1<<21,Er=1<<22,Dr=1<<23,Or=Symbol(`$state`),kr=Symbol(`legacy props`),Ar=Symbol(``),jr=Symbol(`proxy path`),Mr=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Nr=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),Pr=3,Fr=8;function Ir(e){if(N){let t=Error(`lifecycle_outside_component
7
+ \`${e}(...)\` can only be used during component initialisation
8
+ https://svelte.dev/e/lifecycle_outside_component`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Lr(){if(N){let e=Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Rr(){if(N){let e=Error(`derived_references_self
7
9
  A derived value cannot reference itself recursively
8
- https://svelte.dev/e/derived_references_self`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/derived_references_self")}function ns(e){if(Q){let t=new Error(`effect_in_teardown
10
+ https://svelte.dev/e/derived_references_self`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/derived_references_self`)}function zr(e){if(N){let t=Error(`effect_in_teardown
9
11
  \`${e}\` cannot be used inside an effect cleanup function
10
- https://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function os(){if(Q){let e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function rs(e){if(Q){let t=new Error(`effect_orphan
12
+ https://svelte.dev/e/effect_in_teardown`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Br(){if(N){let e=Error(`effect_in_unowned_derived
13
+ Effect cannot be created inside a \`$derived\` value that was not itself created inside an effect
14
+ https://svelte.dev/e/effect_in_unowned_derived`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Vr(e){if(N){let t=Error(`effect_orphan
11
15
  \`${e}\` can only be used inside an effect (e.g. during component initialisation)
12
- https://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_orphan")}function as(){if(Q){let e=new Error(`effect_update_depth_exceeded
13
- Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
14
- https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ss(){if(Q){let e=new Error(`hydration_failed
15
- Failed to hydrate the application
16
- https://svelte.dev/e/hydration_failed`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/hydration_failed")}function ls(){if(Q){let e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invalid_snippet")}function ds(e){if(Q){let t=new Error(`props_invalid_value
16
+ https://svelte.dev/e/effect_orphan`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/effect_orphan`)}function Hr(){if(N){let e=Error(`effect_update_depth_exceeded
17
+ Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
18
+ https://svelte.dev/e/effect_update_depth_exceeded`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ur(){if(N){let e=Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/invalid_snippet`)}function Wr(e){if(N){let t=Error(`props_invalid_value
17
19
  Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
18
- https://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/props_invalid_value")}function us(e){if(Q){let t=new Error(`rune_outside_svelte
20
+ https://svelte.dev/e/props_invalid_value`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/props_invalid_value`)}function Gr(e){if(N){let t=Error(`rune_outside_svelte
19
21
  The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
20
- https://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function cs(){if(Q){let e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ps(){if(Q){let e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fs(){if(Q){let e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}var li=!1,di=!1;function ms(){li=!0}var _n=null;function hi(e){let t=Error(),i=t.stack;if(i){let n=i.split(`
21
- `),o=[`
22
- `];for(let r=0;r<n.length;r++){let s=n[r];if(s!=="Error"){if(s.includes("validate_each_keys"))return null;s.includes("svelte/src/internal")||o.push(s)}}if(o.length===1)return null;at(t,"stack",{value:o.join(`
23
- `)}),at(t,"name",{value:`${e}Error`})}return t}function Zt(e,t){return e.label=t,Jn(e.v,t),e}function Jn(e,t){return e?.[Kn]?.(t),e}function yn(e){if(Q){let t=new Error(`lifecycle_outside_component
24
- \`${e}(...)\` can only be used during component initialisation
25
- https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var Te=null;function bn(e){Te=e}var Jt=null;function An(e){Jt=e}function xn(e){return vs("getContext").get(e)}function En(e,t){return vs("setContext").set(e,t),t}function st(e,t=!1,i){var n=Te={p:Te,c:null,d:!1,e:null,m:!1,s:e,x:null,l:null};li&&!t&&(Te.l={s:null,u:null,r1:[],r2:ci(!1)}),St(()=>{n.d=!0}),Q&&(Te.function=i,Jt=i)}function lt(e){let t=Te;if(t!==null){e!==void 0&&(t.x=e);let s=t.e;if(s!==null){var i=ve,n=ge;t.e=null;try{for(var o=0;o<s.length;o++){var r=s[o];_t(r.effect),ct(r.reaction),Nt(r.fn)}}finally{_t(i),ct(n)}}Te=t.p,Q&&(Jt=t.p?.function??null),t.m=!0}return e||{}}function ui(){return!li||Te!==null&&Te.l===null}function vs(e){return Te===null&&yn(e),Te.c??=new Map(cu(Te)||void 0)}function cu(e){let t=e.p;for(;t!==null;){let i=t.c;if(i!==null)return i;t=t.p}return null}var pu=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function yt(e){if(typeof e!="object"||e===null||kt in e)return e;let t=qi(e);if(t!==tr&&t!==Xa)return e;var i=new Map,n=qt(e),o=Fe(0),r=Q&&di?hi("CreatedAt"):null,s=ge,u=p=>{var a=ge;ct(s);var d=p();return ct(a),d};n&&i.set("length",Fe(e.length,r));var c="";function h(p){c=p,Zt(o,`${c} version`);for(let[a,d]of i)Zt(d,$i(c,a))}return new Proxy(e,{defineProperty(p,a,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&cs();var m=i.get(a);return m===void 0?m=u(()=>{var g=Fe(d.value,r);return i.set(a,g),Q&&typeof a=="string"&&Zt(g,$i(c,a)),g}):Ee(m,d.value,!0),!0},deleteProperty(p,a){var d=i.get(a);if(d===void 0){if(a in p){let _=u(()=>Fe(et,r));i.set(a,_),rr(o),Q&&Zt(_,$i(c,a))}}else{if(n&&typeof a=="string"){var m=i.get("length"),g=Number(a);Number.isInteger(g)&&g<m.v&&Ee(m,g)}Ee(d,et),rr(o)}return!0},get(p,a,d){if(a===kt)return e;if(Q&&a===Kn)return h;var m=i.get(a),g=a in p;if(m===void 0&&(!g||It(p,a)?.writable)&&(m=u(()=>{var v=yt(g?p[a]:et),L=Fe(v,r);return Q&&Zt(L,$i(c,a)),L}),i.set(a,m)),m!==void 0){var _=R(m);return _===et?void 0:_}return Reflect.get(p,a,d)},getOwnPropertyDescriptor(p,a){var d=Reflect.getOwnPropertyDescriptor(p,a);if(d&&"value"in d){var m=i.get(a);m&&(d.value=R(m))}else if(d===void 0){var g=i.get(a),_=g?.v;if(g!==void 0&&_!==et)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return d},has(p,a){if(a===kt)return!0;var d=i.get(a),m=d!==void 0&&d.v!==et||Reflect.has(p,a);if(d!==void 0||ve!==null&&(!m||It(p,a)?.writable)){d===void 0&&(d=u(()=>{var _=m?yt(p[a]):et,v=Fe(_,r);return Q&&Zt(v,$i(c,a)),v}),i.set(a,d));var g=R(d);if(g===et)return!1}return m},set(p,a,d,m){var g=i.get(a),_=a in p;if(n&&a==="length")for(var v=d;v<g.v;v+=1){var L=i.get(v+"");L!==void 0?Ee(L,et):v in p&&(L=u(()=>Fe(et,r)),i.set(v+"",L),Q&&Zt(L,$i(c,v)))}if(g===void 0)(!_||It(p,a)?.writable)&&(g=u(()=>Fe(void 0,r)),Ee(g,yt(d)),i.set(a,g),Q&&Zt(g,$i(c,a)));else{_=g.v!==et;var N=u(()=>yt(d));Ee(g,N)}var k=Reflect.getOwnPropertyDescriptor(p,a);if(k?.set&&k.set.call(m,d),!_){if(n&&typeof a=="string"){var y=i.get("length"),T=Number(a);Number.isInteger(T)&&T>=y.v&&Ee(y,T+1)}rr(o)}return!0},ownKeys(p){R(o);var a=Reflect.ownKeys(p).filter(g=>{var _=i.get(g);return _===void 0||_.v!==et});for(var[d,m]of i)m.v!==et&&!(d in p)&&a.push(d);return a},setPrototypeOf(){ps()}})}function $i(e,t){return typeof t=="symbol"?`${e}[Symbol(${t.description??""})]`:pu.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function rr(e,t=1){Ee(e,e.v+t)}function Xn(e){try{if(e!==null&&typeof e=="object"&&kt in e)return e[kt]}catch{}return e}function vi(e){var t=2050,i=ge!==null&&(ge.f&2)!==0?ge:null;ve===null||i!==null&&(i.f&256)!==0?t|=256:ve.f|=1048576;let n={ctx:Te,deps:null,effects:null,equals:Zn,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:i??ve};return Q&&di&&(n.created=hi("CreatedAt")),n}function gi(e){let t=vi(e);return no(t),t}function io(e){let t=vi(e);return t.equals=Ji,t}function eo(e){var t=e.effects;if(t!==null){e.effects=null;for(var i=0;i<t.length;i+=1)ft(t[i])}}var ar=[];function fu(e){for(var t=e.parent;t!==null;){if((t.f&2)===0)return t;t=t.parent}return null}function dr(e){var t,i=ve;if(_t(fu(e)),Q){let n=Oi;sr(new Set);try{ar.includes(e)&&is(),ar.push(e),eo(e),t=to(e)}finally{_t(i),sr(n),ar.pop()}}else try{eo(e),t=to(e)}finally{_t(i)}return t}function ur(e){var t=dr(e);if(e.equals(t)||(e.v=t,e.wv=Sn()),!_i){var i=(yi||(e.f&256)!==0)&&e.deps!==null?4096:1024;Tt(e,i)}}var Oi=new Set,Xi=new Map;function sr(e){Oi=e}function ci(e,t){var i={f:0,v:e,reactions:null,equals:Zn,rv:0,wv:0};return Q&&di&&(i.created=t??hi("CreatedAt"),i.updated=null,i.set_during_effect=!1,i.trace=null),i}function Fe(e,t){let i=ci(e,t);return no(i),i}function Ai(e,t=!1,i=!0){let n=ci(e);return t||(n.equals=Ji),li&&i&&Te!==null&&Te.l!==null&&(Te.l.s??=[]).push(n),n}function Ee(e,t,i=!1){ge!==null&&(!Rt||(ge.f&262144)!==0)&&ui()&&(ge.f&262162)!==0&&!(Ot?.[1].includes(e)&&Ot[0]===ge)&&fs();let n=i?yt(t):t;return Q&&Jn(n,e.label),oo(e,n)}function oo(e,t){if(!e.equals(t)){var i=e.v;if(_i?Xi.set(e,t):Xi.set(e,i),e.v=t,Q&&di&&(e.updated=hi("UpdatedAt"),ve!==null&&(e.set_during_effect=!0)),(e.f&2)!==0&&((e.f&2048)!==0&&dr(e),Tt(e,(e.f&256)===0?1024:4096)),e.wv=Sn(),gs(e,2048),ui()&&ve!==null&&(ve.f&1024)!==0&&(ve.f&96)===0&&(Pt===null?_s([e]):Pt.push(e)),Q&&Oi.size>0){let n=Array.from(Oi);for(let o of n)(o.f&1024)!==0&&Tt(o,4096),Pi(o)&&tn(o);Oi.clear()}}return t}function gs(e,t){var i=e.reactions;if(i!==null)for(var n=ui(),o=i.length,r=0;r<o;r++){var s=i[r],u=s.f;if((u&2048)===0&&!(!n&&s===ve)){if(Q&&(u&262144)!==0){Oi.add(s);continue}Tt(s,t),(u&1280)!==0&&((u&2)!==0?gs(s,4096):Mn(s))}}}var ro="font-weight: bold",ao="font-weight: normal";function ys(e,t,i){Q?console.warn(`%c[svelte] hydration_attribute_changed
26
- %cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${i}\`, will be ignored in favour of the server value
27
- https://svelte.dev/e/hydration_attribute_changed`,ro,ao):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function Ri(e){Q?console.warn(`%c[svelte] hydration_mismatch
28
- %c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
29
- https://svelte.dev/e/hydration_mismatch`,ro,ao):console.warn("https://svelte.dev/e/hydration_mismatch")}function bs(){Q?console.warn(`%c[svelte] lifecycle_double_unmount
22
+ https://svelte.dev/e/rune_outside_svelte`);throw t.name=`Svelte error`,t}else throw Error(`https://svelte.dev/e/rune_outside_svelte`)}function Kr(){if(N){let e=Error("set_context_after_init\n`setContext` must be called when a component first initializes, not in a subsequent effect or after an `await` expression\nhttps://svelte.dev/e/set_context_after_init");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/set_context_after_init`)}function qr(){if(N){let e=Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Jr(){if(N){let e=Error(`state_prototype_fixed
23
+ Cannot set prototype of \`$state\` object
24
+ https://svelte.dev/e/state_prototype_fixed`);throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Yr(){if(N){let e=Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Xr(){if(N){let e=Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name=`Svelte error`,e}else throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Zr=`font-weight: bold`,Qr=`font-weight: normal`;function $r(e,t){N?console.warn(`%c[svelte] await_waterfall
25
+ %cAn async derived, \`${e}\` (${t}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
26
+ https://svelte.dev/e/await_waterfall`,Zr,Qr):console.warn(`https://svelte.dev/e/await_waterfall`)}function ei(e,t,n){N?console.warn(`%c[svelte] hydration_attribute_changed
27
+ %cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${n}\`, will be ignored in favour of the server value
28
+ https://svelte.dev/e/hydration_attribute_changed`,Zr,Qr):console.warn(`https://svelte.dev/e/hydration_attribute_changed`)}function ti(e){N?console.warn(`%c[svelte] hydration_mismatch
29
+ %c${e?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${e}`:`Hydration failed because the initial UI does not match what was rendered on the server`}
30
+ https://svelte.dev/e/hydration_mismatch`,Zr,Qr):console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ni(){N?console.warn(`%c[svelte] lifecycle_double_unmount
30
31
  %cTried to unmount a component that was not mounted
31
- https://svelte.dev/e/lifecycle_double_unmount`,ro,ao):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function so(e){Q?console.warn(`%c[svelte] state_proxy_equality_mismatch
32
+ https://svelte.dev/e/lifecycle_double_unmount`,Zr,Qr):console.warn(`https://svelte.dev/e/lifecycle_double_unmount`)}function ri(e){N?console.warn(`%c[svelte] state_proxy_equality_mismatch
32
33
  %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
33
- https://svelte.dev/e/state_proxy_equality_mismatch`,ro,ao):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var me=!1;function jt(e){me=e}var Ae;function ot(e){if(e===null)throw Ri(),mi;return Ae=e}function At(){return ot(Mt(Ae))}function ne(e){if(me){if(Mt(Ae)!==null)throw Ri(),mi;Ae=e}}function nn(e=1){if(me){for(var t=e,i=Ae;t--;)i=Mt(i);Ae=i}}function wn(){for(var e=0,t=Ae;;){if(t.nodeType===Kt){var i=t.data;if(i===Gi){if(e===0)return t;e-=1}else(i===Mi||i===Ci)&&(e+=1)}var n=Mt(t);t.remove(),t=n}}function cr(e){if(!e||e.nodeType!==Kt)throw Ri(),mi;return e.data}function As(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:i,lastIndexOf:n,includes:o}=e;e.indexOf=function(r,s){let u=i.call(this,r,s);if(u===-1){for(let c=s??0;c<this.length;c+=1)if(Xn(this[c])===r){so("array.indexOf(...)");break}}return u},e.lastIndexOf=function(r,s){let u=n.call(this,r,s??this.length-1);if(u===-1){for(let c=0;c<=(s??this.length-1);c+=1)if(Xn(this[c])===r){so("array.lastIndexOf(...)");break}}return u},e.includes=function(r,s){let u=o.call(this,r,s);if(!u){for(let c=0;c<this.length;c+=1)if(Xn(this[c])===r){so("array.includes(...)");break}}return u},Array.__svelte_cleanup=()=>{e.indexOf=i,e.lastIndexOf=n,e.includes=o}}var pr,xs,In,Es,Ss;function lo(){if(pr===void 0){pr=window,xs=document,In=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,i=Text.prototype;Es=It(t,"firstChild").get,Ss=It(t,"nextSibling").get,ir(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),ir(i)&&(i.__t=void 0),Q&&(e.__svelte_meta=null,As())}}function ei(e=""){return document.createTextNode(e)}function rt(e){return Es.call(e)}function Mt(e){return Ss.call(e)}function oe(e,t){if(!me)return rt(e);var i=rt(Ae);if(i===null)i=Ae.appendChild(ei());else if(t&&i.nodeType!==gn){var n=ei();return i?.before(n),ot(n),n}return ot(i),i}function on(e,t){if(!me){var i=rt(e);return i.nodeType===8&&i.data===""?Mt(i):i}if(t&&Ae?.nodeType!==gn){var n=ei();return Ae?.before(n),ot(n),n}return Ae}function pe(e,t=1,i=!1){let n=me?Ae:e;for(var o;t--;)o=n,n=Mt(n);if(!me)return n;if(i&&n?.nodeType!==gn){var r=ei();return n===null?o?.after(r):n.before(r),ot(r),r}return ot(n),n}function uo(e){e.textContent=""}function Ms(e){ve===null&&ge===null&&rs(e),ge!==null&&(ge.f&256)!==0&&ve===null&&os(),_i&&ns(e)}function mu(e,t){var i=t.last;i===null?t.last=t.first=e:(i.next=e,e.prev=i,t.last=e)}function Vi(e,t,i,n=!0){var o=ve;if(Q)for(;o!==null&&(o.f&262144)!==0;)o=o.parent;var r={ctx:Te,deps:null,nodes_start:null,nodes_end:null,f:e|2048,first:null,fn:t,last:null,next:null,parent:o,prev:null,teardown:null,transitions:null,wv:0};if(Q&&(r.component_function=Jt),i)try{tn(r),r.f|=32768}catch(c){throw ft(r),c}else t!==null&&Mn(r);var s=i&&r.deps===null&&r.first===null&&r.nodes_start===null&&r.teardown===null&&(r.f&1048704)===0;if(!s&&n&&(o!==null&&mu(r,o),ge!==null&&(ge.f&2)!==0)){var u=ge;(u.effects??=[]).push(r)}return r}function St(e){let t=Vi(8,null,!1);return Tt(t,1024),t.teardown=e,t}function xi(e){Ms("$effect");var t=ve!==null&&(ve.f&32)!==0&&Te!==null&&!Te.m;if(Q&&at(e,"name",{value:"$effect"}),t){var i=Te;(i.e??=[]).push({fn:e,effect:ve,reaction:ge})}else{var n=Nt(e);return n}}function mo(e){let t=Vi(64,e,!0);return()=>{ft(t)}}function ws(e){let t=Vi(64,e,!0);return(i={})=>new Promise(n=>{i.outro?ii(t,()=>{ft(t),n(void 0)}):(ft(t),n(void 0))})}function Nt(e){return Vi(4,e,!1)}function xt(e){return Vi(8,e,!0)}function ze(e,t=[],i=vi){if(Q)return xt(()=>{var o=ve,r=()=>e(...s.map(R));at(o.fn,"name",{value:"{expression}"}),at(r,"name",{value:"{expression}"});let s=t.map(i);mt(r)});let n=t.map(i);return mt(()=>e(...n.map(R)))}function mt(e,t=0){return Vi(24|t,e,!0)}function ht(e,t=!0){return Vi(40,e,!0,t)}function hr(e){var t=e.teardown;if(t!==null){let i=_i,n=ge;fr(!0),ct(null);try{t.call(null)}finally{fr(i),ct(n)}}}function vr(e,t=!1){var i=e.first;for(e.first=e.last=null;i!==null;){var n=i.next;(i.f&64)!==0?i.parent=null:ft(i,t),i=n}}function Is(e){for(var t=e.first;t!==null;){var i=t.next;(t.f&32)===0&&ft(t),t=i}}function ft(e,t=!0){var i=!1;(t||(e.f&524288)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(ks(e.nodes_start,e.nodes_end),i=!0),vr(e,t&&!i),Nn(e,0),Tt(e,16384);var n=e.transitions;if(n!==null)for(let r of n)r.stop();hr(e);var o=e.parent;o!==null&&o.first!==null&&gr(e),Q&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function ks(e,t){for(;e!==null;){var i=e===t?null:Mt(e);e.remove(),e=i}}function gr(e){var t=e.parent,i=e.prev,n=e.next;i!==null&&(i.next=n),n!==null&&(n.prev=i),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=i))}function ii(e,t){var i=[];_r(e,i,!0),Ns(i,()=>{ft(e),t&&t()})}function Ns(e,t){var i=e.length;if(i>0){var n=()=>--i||t();for(var o of e)o.out(n)}else t()}function _r(e,t,i){if((e.f&8192)===0){if(e.f^=8192,e.transitions!==null)for(let s of e.transitions)(s.is_global||i)&&t.push(s);for(var n=e.first;n!==null;){var o=n.next,r=(n.f&65536)!==0||(n.f&32)!==0;_r(n,t,r?i:!1),n=o}}}function rn(e){Ds(e,!0)}function Ds(e,t){if((e.f&8192)!==0){e.f^=8192;for(var i=e.first;i!==null;){var n=i.next,o=(i.f&65536)!==0||(i.f&32)!==0;Ds(i,o?t:!1),i=n}if(e.transitions!==null)for(let r of e.transitions)(r.is_global||t)&&r.in()}}var Dn=[],yr=[];function Ls(){var e=Dn;Dn=[],Ki(e)}function hu(){var e=yr;yr=[],Ki(e)}function ni(e){Dn.length===0&&queueMicrotask(Ls),Dn.push(e)}function Cs(){Dn.length>0&&Ls(),yr.length>0&&hu()}function Os(e){var t=ve;if(Q&&e instanceof Error&&vu(e,t),(t.f&32768)===0){if((t.f&128)===0)throw e;t.fn(e)}else Ln(e,t)}function Ln(e,t){for(;t!==null;){if((t.f&128)!==0)try{t.fn(e);return}catch{}t=t.parent}throw e}var $s=new WeakSet;function vu(e,t){if($s.has(e))return;$s.add(e);let i=It(e,"message");if(!(i&&!i.configurable)){for(var n=In?" ":" ",o=`
34
- ${n}in ${t.fn?.name||"<unknown>"}`,r=t.ctx;r!==null;)o+=`
35
- ${n}in ${r.function?.[Gt].split("/").pop()}`,r=r.p;at(e,"message",{value:e.message+`
36
- ${o}
37
- `}),e.stack&&at(e,"stack",{value:e.stack.split(`
38
- `).filter(s=>!s.includes("svelte/src/internal")).join(`
39
- `)})}}var ji=!1,an=null,Ui=!1,_i=!1;function fr(e){_i=e}var Cn=[],$n=[],ge=null,Rt=!1;function ct(e){ge=e}var ve=null;function _t(e){ve=e}var Ot=null;function no(e){ge!==null&&ge.f&2097152&&(Ot===null?Ot=[ge,[e]]:Ot[1].push(e))}var wt=null,Ut=0,Pt=null;function _s(e){Pt=e}var Vs=1,vo=0,yi=!1,go=null;function Sn(){return++Vs}function Pi(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){var i=e.deps,n=(t&256)!==0;if(i!==null){var o,r,s=(t&512)!==0,u=n&&ve!==null&&!yi,c=i.length;if(s||u){var h=e,p=h.parent;for(o=0;o<c;o++)r=i[o],(s||!r?.reactions?.includes(h))&&(r.reactions??=[]).push(h);s&&(h.f^=512),u&&p!==null&&(p.f&256)===0&&(h.f^=256)}for(o=0;o<c;o++)if(r=i[o],Pi(r)&&ur(r),r.wv>e.wv)return!0}(!n||ve!==null&&!yi)&&Tt(e,1024)}return!1}function js(e,t,i=!0){var n=e.reactions;if(n!==null)for(var o=0;o<n.length;o++){var r=n[o];Ot?.[1].includes(e)&&Ot[0]===ge||((r.f&2)!==0?js(r,t,!1):t===r&&(i?Tt(r,2048):(r.f&1024)!==0&&Tt(r,4096),Mn(r)))}}function to(e){var t=wt,i=Ut,n=Pt,o=ge,r=yi,s=Ot,u=Te,c=Rt,h=e.f;wt=null,Ut=0,Pt=null,yi=(h&256)!==0&&(Rt||!Ui||ge===null),ge=(h&96)===0?e:null,Ot=null,bn(e.ctx),Rt=!1,vo++,e.f|=2097152;try{var p=(0,e.fn)(),a=e.deps;if(wt!==null){var d;if(Nn(e,Ut),a!==null&&Ut>0)for(a.length=Ut+wt.length,d=0;d<wt.length;d++)a[Ut+d]=wt[d];else e.deps=a=wt;if(!yi||(h&2)!==0&&e.reactions!==null)for(d=Ut;d<a.length;d++)(a[d].reactions??=[]).push(e)}else a!==null&&Ut<a.length&&(Nn(e,Ut),a.length=Ut);if(ui()&&Pt!==null&&!Rt&&a!==null&&(e.f&6146)===0)for(d=0;d<Pt.length;d++)js(Pt[d],e);return o!==null&&o!==e&&(vo++,Pt!==null&&(n===null?n=Pt:n.push(...Pt))),p}catch(m){Os(m)}finally{wt=t,Ut=i,Pt=n,ge=o,yi=r,Ot=s,bn(u),Rt=c,e.f^=2097152}}function gu(e,t){let i=t.reactions;if(i!==null){var n=Ja.call(i,e);if(n!==-1){var o=i.length-1;o===0?i=t.reactions=null:(i[n]=i[o],i.pop())}}i===null&&(t.f&2)!==0&&(wt===null||!wt.includes(t))&&(Tt(t,4096),(t.f&768)===0&&(t.f^=512),eo(t),Nn(t,0))}function Nn(e,t){var i=e.deps;if(i!==null)for(var n=t;n<i.length;n++)gu(e,i[n])}function tn(e){var t=e.f;if((t&16384)===0){Tt(e,1024);var i=ve,n=Ui;if(ve=e,Ui=!0,Q){var o=Jt;An(e.component_function)}try{(t&16)!==0?Is(e):vr(e),hr(e);var r=to(e);if(e.teardown=typeof r=="function"?r:null,e.wv=Vs,Q&&di&&(e.f&2048)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&(s.wv=Sn(),s.set_during_effect=!1);Q&&$n.push(e)}finally{Ui=n,ve=i,Q&&An(o)}}}function Ps(){console.error("Last ten effects were: ",$n.slice(-10).map(e=>e.fn)),$n=[]}function _u(){try{as()}catch(e){if(Q&&at(e,"stack",{value:""}),an!==null)if(Q)try{Ln(e,an)}catch(t){throw Ps(),t}else Ln(e,an);else throw Q&&Ps(),e}}function Ar(){var e=Ui;try{var t=0;for(Ui=!0;Cn.length>0;){t++>1e3&&_u();var i=Cn,n=i.length;Cn=[];for(var o=0;o<n;o++){var r=bu(i[o]);yu(r)}Xi.clear()}}finally{ji=!1,Ui=e,an=null,Q&&($n=[])}}function yu(e){var t=e.length;if(t!==0)for(var i=0;i<t;i++){var n=e[i];(n.f&24576)===0&&Pi(n)&&(tn(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?gr(n):n.fn=null))}}function Mn(e){ji||(ji=!0,queueMicrotask(Ar));for(var t=an=e;t.parent!==null;){t=t.parent;var i=t.f;if((i&96)!==0){if((i&1024)===0)return;t.f^=1024}}Cn.push(t)}function bu(e){for(var t=[],i=e;i!==null;){var n=i.f,o=(n&96)!==0,r=o&&(n&1024)!==0;if(!r&&(n&8192)===0){(n&4)!==0?t.push(i):o?i.f^=1024:Pi(i)&&tn(i);var s=i.first;if(s!==null){i=s;continue}}var u=i.parent;for(i=i.next;i===null&&u!==null;)i=u.next,u=u.parent}return t}function On(e){var t;for(e&&(ji=!0,Ar(),ji=!0,t=e());;){if(Cs(),Cn.length===0)return ji=!1,an=null,Q&&($n=[]),t;ji=!0,Ar()}}function R(e){var t=e.f,i=(t&2)!==0;if(go!==null&&go.add(e),ge!==null&&!Rt){if(!Ot?.[1].includes(e)||Ot[0]!==ge){var n=ge.deps;e.rv<vo&&(e.rv=vo,wt===null&&n!==null&&n[Ut]===e?Ut++:wt===null?wt=[e]:(!yi||!wt.includes(e))&&wt.push(e))}}else if(i&&e.deps===null&&e.effects===null){var o=e,r=o.parent;r!==null&&(r.f&256)===0&&(o.f^=256)}if(i&&(o=e,Pi(o)&&ur(o)),Q&&di&&!Rt&&_n!==null&&ge!==null&&_n.reaction===ge)if(e.trace)e.trace();else{var s=hi("TracedAt");if(s){var u=_n.entries.get(e);u===void 0&&(u={traces:[]},_n.entries.set(e,u));var c=u.traces[u.traces.length-1];s.stack!==c?.stack&&u.traces.push(s)}}return _i&&Xi.has(e)?Xi.get(e):e.v}function Ge(e){var t=Rt;try{return Rt=!0,e()}finally{Rt=t}}var Au=-7169;function Tt(e,t){e.f=e.f&Au|t}var xr=new Set,_o=new Set;function sn(e){for(var t=0;t<e.length;t++)xr.add(e[t]);for(var i of _o)i(e)}function Pn(e){var t=this,i=t.ownerDocument,n=e.type,o=e.composedPath?.()||[],r=o[0]||e.target,s=0,u=e.__root;if(u){var c=o.indexOf(u);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var h=o.indexOf(t);if(h===-1)return;c<=h&&(s=c)}if(r=o[s]||e.target,r!==t){at(e,"currentTarget",{configurable:!0,get(){return r||i}});var p=ge,a=ve;ct(null),_t(null);try{for(var d,m=[];r!==null;){var g=r.assignedSlot||r.parentNode||r.host||null;try{var _=r["__"+n];if(_!=null&&(!r.disabled||e.target===r))if(qt(_)){var[v,...L]=_;v.apply(r,[e,...L])}else _.call(r,e)}catch(N){d?m.push(N):d=N}if(e.cancelBubble||g===t||g===null)break;r=g}if(d){for(let N of m)queueMicrotask(()=>{throw N});throw d}}finally{e.__root=t,delete e.currentTarget,ct(p),_t(a)}}}var Eu;function zs(){Eu=void 0}function Rn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function zt(e,t){var i=ve;i.nodes_start===null&&(i.nodes_start=e,i.nodes_end=t)}function we(e,t){var i=(t&1)!==0,n=(t&2)!==0,o,r=!e.startsWith("<!>");return()=>{if(me)return zt(Ae,null),Ae;o===void 0&&(o=Rn(r?e:"<!>"+e),i||(o=rt(o)));var s=n||In?document.importNode(o,!0):o.cloneNode(!0);if(i){var u=rt(s),c=s.lastChild;zt(u,c)}else zt(s,s);return s}}function Mu(e,t,i="svg"){var n=!e.startsWith("<!>"),o=(t&1)!==0,r=`<${i}>${n?e:"<!>"+e}</${i}>`,s;return()=>{if(me)return zt(Ae,null),Ae;if(!s){var u=Rn(r),c=rt(u);if(o)for(s=document.createDocumentFragment();rt(c);)s.appendChild(rt(c));else s=rt(c)}var h=s.cloneNode(!0);if(o){var p=rt(h),a=h.lastChild;zt(p,a)}else zt(h,h);return h}}function pi(e,t){return Mu(e,t,"svg")}function Er(){if(me)return zt(Ae,null),Ae;var e=document.createDocumentFragment(),t=document.createComment(""),i=ei();return e.append(t,i),zt(t,i),e}function fe(e,t){if(me){ve.nodes_end=Ae,At();return}e!==null&&e.before(t)}var wu=["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 Zh=[...wu,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var Iu=["touchstart","touchmove"];function Qs(e){return Iu.includes(e)}var ku=["$state","$state.raw","$derived","$derived.by"],Jh=[...ku,"$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$inspect","$inspect().with","$inspect.trace","$host"];var Sr=!0;function Ze(e,t){var i=t==null?"":typeof t=="object"?t+"":t;i!==(e.__t??=e.nodeValue)&&(e.__t=i,e.nodeValue=i+"")}function Ii(e,t){return Ys(e,t)}function Mr(e,t){lo(),t.intro=t.intro??!1;let i=t.target,n=me,o=Ae;try{for(var r=rt(i);r&&(r.nodeType!==Kt||r.data!==Mi);)r=Mt(r);if(!r)throw mi;jt(!0),ot(r),At();let s=Ys(e,{...t,anchor:r});if(Ae===null||Ae.nodeType!==Kt||Ae.data!==Gi)throw Ri(),mi;return jt(!1),s}catch(s){if(s===mi)return t.recover===!1&&ss(),lo(),uo(i),jt(!1),Ii(e,t);throw s}finally{jt(n),ot(o),zs()}}var ln=new Map;function Ys(e,{target:t,anchor:i,props:n={},events:o,context:r,intro:s=!0}){lo();var u=new Set,c=a=>{for(var d=0;d<a.length;d++){var m=a[d];if(!u.has(m)){u.add(m);var g=Qs(m);t.addEventListener(m,Pn,{passive:g});var _=ln.get(m);_===void 0?(document.addEventListener(m,Pn,{passive:g}),ln.set(m,1)):ln.set(m,_+1)}}};c(Jo(xr)),_o.add(c);var h=void 0,p=ws(()=>{var a=i??t.appendChild(ei());return ht(()=>{if(r){st({});var d=Te;d.c=r}o&&(n.$$events=o),me&&zt(a,null),Sr=s,h=e(a,n)||{},Sr=!0,me&&(ve.nodes_end=Ae),r&&lt()}),()=>{for(var d of u){t.removeEventListener(d,Pn);var m=ln.get(d);--m===0?(document.removeEventListener(d,Pn),ln.delete(d)):ln.set(d,m)}_o.delete(c),a!==i&&a.parentNode?.removeChild(a)}});return Tr.set(h,p),h}var Tr=new WeakMap;function Vn(e,t){let i=Tr.get(e);return i?(Tr.delete(e),i(t)):(Q&&bs(),Promise.resolve())}function yo(e,t,...i){var n=e,o=ut,r;mt(()=>{o!==(o=t())&&(r&&(ft(r),r=null),Q&&o==null&&ls(),r=ht(()=>o(n,...i)))},65536),me&&(n=Ae)}if(Q){let e=function(t){if(!(t in globalThis)){let i;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(i!==void 0)return i;us(t)},set:n=>{i=n}})}};Cu=e,e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}var Cu;function dn(e){Te===null&&yn("onMount"),li&&Te.l!==null?Lu(Te).m.push(e):xi(()=>{let t=Ge(e);if(typeof t=="function")return t})}function Lu(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var qs=new Map;function Ks(e,t){var i=qs.get(e);i||(i=new Set,qs.set(e,i)),i.add(t)}function Qe(e,t,[i,n]=[0,0]){me&&i===0&&At();var o=e,r=null,s=null,u=et,c=i>0?65536:0,h=!1;let p=(d,m=!0)=>{h=!0,a(m,d)},a=(d,m)=>{if(u===(u=d))return;let g=!1;if(me&&n!==-1){if(i===0){let v=cr(o);v===Mi?n=0:v===Ci?n=1/0:(n=parseInt(v.substring(1)),n!==n&&(n=u?1/0:-1))}let _=n>i;!!u===_&&(o=wn(),ot(o),jt(!1),g=!0,n=-1)}u?(r?rn(r):m&&(r=ht(()=>m(o))),s&&ii(s,()=>{s=null})):(s?rn(s):m&&(s=ht(()=>m(o,[i+1,n]))),r&&ii(r,()=>{r=null})),g&&jt(!0)};mt(()=>{h=!1,t(p),h||a(null,null)},c),me&&(o=Ae)}function wr(e,t,i){me&&At();var n=e,o=et,r,s=ui()?ts:Zi;mt(()=>{s(o,o=t())&&(r&&ii(r),r=ht(()=>i(n)))}),me&&(n=Ae)}var Nr;function Zs(e){return Nr=e.target,new kr(e)}var kr=class{#t;#e;constructor(t){var i=new Map,n=(r,s)=>{var u=Ai(s,!1,!1);return i.set(r,u),u};let o=new Proxy({...t.props||{},$$events:{}},{get(r,s){return R(i.get(s)??n(s,Reflect.get(r,s)))},has(r,s){return s===vn?!0:(R(i.get(s)??n(s,Reflect.get(r,s))),Reflect.has(r,s))},set(r,s,u){return Ee(i.get(s)??n(s,u),u),Reflect.set(r,s,u)}});this.#e=(t.hydrate?Mr:Ii)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&On(),this.#t=o.$$events;for(let r of Object.keys(this.#e))r==="$set"||r==="$destroy"||r==="$on"||at(this,r,{get(){return this.#e[r]},set(s){this.#e[r]=s},enumerable:!0});this.#e.$set=r=>{Object.assign(o,r)},this.#e.$destroy=()=>{Vn(this.#e)}}$set(t){this.#e.$set(t)}$on(t,i){this.#t[t]=this.#t[t]||[];let n=(...o)=>i.call(this,...o);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(o=>o!==n)}}$destroy(){this.#e.$destroy()}};function dt(e,t){ni(()=>{var i=e.getRootNode(),n=i.host?i:i.head??i.ownerDocument.head??Nr?.parentNode;if(!n?.querySelector("#"+t.hash)){let o=document.createElement("style");o.id=t.hash,o.textContent=t.code,n.appendChild(o),Q&&Ks(t.hash,o)}})}var Xs=[...`
40
- \r\f \v\uFEFF`];function tl(e,t,i){var n=e==null?"":""+e;if(t&&(n=n?n+" "+t:t),i){for(var o in i)if(i[o])n=n?n+" "+o:o;else if(n.length)for(var r=o.length,s=0;(s=n.indexOf(o,s))>=0;){var u=s+r;(s===0||Xs.includes(n[s-1]))&&(u===n.length||Xs.includes(n[u]))?n=(s===0?"":n.substring(0,s))+n.substring(u+1):s=u}}return n===""?null:n}function el(e,t=!1){var i=t?" !important;":";",n="";for(var o in e){var r=e[o];r!=null&&r!==""&&(n+=" "+o+": "+r+i)}return n}function Dr(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function il(e,t){if(t){var i="",n,o;if(Array.isArray(t)?(n=t[0],o=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var r=!1,s=0,u=!1,c=[];n&&c.push(...Object.keys(n).map(Dr)),o&&c.push(...Object.keys(o).map(Dr));var h=0,p=-1;let _=e.length;for(var a=0;a<_;a++){var d=e[a];if(u?d==="/"&&e[a-1]==="*"&&(u=!1):r?r===d&&(r=!1):d==="/"&&e[a+1]==="*"?u=!0:d==='"'||d==="'"?r=d:d==="("?s++:d===")"&&s--,!u&&r===!1&&s===0){if(d===":"&&p===-1)p=a;else if(d===";"||a===_-1){if(p!==-1){var m=Dr(e.substring(h,p).trim());if(!c.includes(m)){d!==";"&&a++;var g=e.substring(h,a).trim();i+=" "+g+";"}}h=a+1,p=-1}}}}return n&&(i+=el(n)),o&&(i+=el(o,!0)),i=i.trim(),i===""?null:i}return e==null?null:String(e)}function un(e,t,i,n,o,r){var s=e.__className;if(me||s!==i||s===void 0){var u=tl(i,n,r);(!me||u!==e.getAttribute("class"))&&(u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u)),e.__className=i}else if(r&&o!==r)for(var c in r){var h=!!r[c];(o==null||h!==!!o[c])&&e.classList.toggle(c,h)}return r}function Lr(e,t={},i,n){for(var o in i){var r=i[o];t[o]!==r&&(i[o]==null?e.style.removeProperty(o):e.style.setProperty(o,r,n))}}function ki(e,t,i,n){var o=e.__style;if(me||o!==t){var r=il(t,n);(!me||r!==e.getAttribute("style"))&&(r==null?e.removeAttribute("style"):e.style.cssText=r),e.__style=t}else n&&(Array.isArray(n)?(Lr(e,i?.[0],n[0]),Lr(e,i?.[1],n[1],"important")):Lr(e,i,n));return n}var Ku=Symbol("class"),Zu=Symbol("style"),Ju=Symbol("is custom element"),Xu=Symbol("is html");function Ft(e,t,i,n){var o=ec(e);if(me&&(o[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||ic(e,t,i??"");return}o[t]!==(o[t]=i)&&(t==="loading"&&(e[es]=i),i==null?e.removeAttribute(t):typeof i!="string"&&tc(e).includes(t)?e[t]=i:e.setAttribute(t,i))}function ec(e){return e.__attributes??={[Ju]:e.nodeName.includes("-"),[Xu]:e.namespaceURI===Ka}}var nl=new Map;function tc(e){var t=nl.get(e.nodeName);if(t)return t;nl.set(e.nodeName,t=[]);for(var i,n=e,o=Element.prototype;o!==n;){i=er(n);for(var r in i)i[r].set&&t.push(r);n=qi(n)}return t}function ic(e,t,i){Q&&(t==="srcset"&&nc(e,i)||Cr(e.getAttribute(t)??"",i)||ys(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(i)))}function Cr(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function ol(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function nc(e,t){var i=ol(e.srcset),n=ol(t);return n.length===i.length&&n.every(([o,r],s)=>r===i[s][1]&&(Cr(i[s][0],o)||Cr(o,i[s][0])))}function rl(e,t){return e===t||e?.[kt]===t}function zi(e={},t,i,n){return Nt(()=>{var o,r;return xt(()=>{o=r,r=n?.()||[],Ge(()=>{e!==i(...r)&&(t(e,...r),o&&rl(i(...o),e)&&t(null,...o))})}),()=>{ni(()=>{r&&rl(i(...r),e)&&t(null,...r)})}}),e}function jn(e,t,i){if(e==null)return t(void 0),i&&i(void 0),ut;let n=Ge(()=>e.subscribe(t,i));return n.unsubscribe?()=>n.unsubscribe():n}var cn=[];function Bt(e,t){return{subscribe:V(e,t).subscribe}}function V(e,t=ut){let i=null,n=new Set;function o(u){if(Zi(e,u)&&(e=u,i)){let c=!cn.length;for(let h of n)h[1](),cn.push(h,e);if(c){for(let h=0;h<cn.length;h+=2)cn[h][0](cn[h+1]);cn.length=0}}}function r(u){o(u(e))}function s(u,c=ut){let h=[u,c];return n.add(h),n.size===1&&(i=t(o,r)||ut),u(e),()=>{n.delete(h),n.size===0&&i&&(i(),i=null)}}return{set:o,update:r,subscribe:s}}function tt(e,t,i){let n=!Array.isArray(e),o=n?[e]:e;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let r=t.length<2;return Bt(i,(s,u)=>{let c=!1,h=[],p=0,a=ut,d=()=>{if(p)return;a();let g=t(n?h[0]:h,s,u);r?s(g):a=typeof g=="function"?g:ut},m=o.map((g,_)=>jn(g,v=>{h[_]=v,p&=~(1<<_),c&&d()},()=>{p|=1<<_}));return c=!0,d(),function(){Ki(m),a(),c=!1}})}function _e(e){let t;return jn(e,i=>t=i)(),t}var Ao=!1,$r=Symbol();function oi(e,t,i){let n=i[t]??={store:null,source:Ai(void 0),unsubscribe:ut};if(n.store!==e&&!($r in i))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=ut;else{var o=!0;n.unsubscribe=jn(e,r=>{o?n.source.v=r:Ee(n.source,r)}),o=!1}return e&&$r in i?_e(e):R(n.source)}function Fi(){let e={};function t(){St(()=>{for(var i in e)e[i].unsubscribe();at(e,$r,{enumerable:!1,value:!0})})}return[e,t]}function Or(e){var t=Ao;try{return Ao=!1,[e(),Ao]}finally{Ao=t}}function al(e){return e.ctx?.d??!1}function ye(e,t,i,n){var o=(i&1)!==0,r=!li||(i&2)!==0,s=(i&8)!==0,u=(i&16)!==0,c=!1,h;s?[h,c]=Or(()=>e[t]):h=e[t];var p=kt in e||vn in e,a=s&&(It(e,t)?.set??(p&&t in e&&(E=>e[t]=E)))||void 0,d=n,m=!0,g=!1,_=()=>(g=!0,m&&(m=!1,u?d=Ge(n):d=n),d);h===void 0&&n!==void 0&&(a&&r&&ds(t),h=_(),a&&a(h));var v;if(r)v=()=>{var E=e[t];return E===void 0?_():(m=!0,g=!1,E)};else{var L=(o?vi:io)(()=>e[t]);L.f|=131072,v=()=>{var E=R(L);return E!==void 0&&(d=void 0),E===void 0?d:E}}if((i&4)===0&&r)return v;if(a){var N=e.$$legacy;return function(E,f){return arguments.length>0?((!r||!f||N||c)&&a(f?v():E),E):v()}}var k=!1,y=!1,T=Ai(h),w=vi(()=>{var E=v(),f=R(T);return k?(k=!1,y=!0,f):(y=!1,T.v=E)});return s&&R(w),o||(w.equals=Ji),function(E,f){if(go!==null&&(k=y,v(),R(T)),arguments.length>0){let B=f?R(w):r&&s?yt(E):E;if(!w.equals(B)){if(k=!0,Ee(T,B),g&&d!==void 0&&(d=B),al(w))return E;Ge(()=>R(w))}return E}return al(w)?w.v:R(w)}}var pc;typeof HTMLElement=="function"&&(pc=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,i){super(),this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){let n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return r=>{let s=document.createElement("slot");o!=="default"&&(s.name=o),fe(r,s)}};var e=t;if(await Promise.resolve(),!this.$$cn||this.$$c)return;let i={},n=fc(this);for(let o of this.$$s)o in n&&(o==="default"&&!this.$$d.children?(this.$$d.children=t(o),i.default=!0):i[o]=t(o));for(let o of this.attributes){let r=this.$$g_p(o.name);r in this.$$d||(this.$$d[r]=Pr(r,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=Zs({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:i,$$host:this}}),this.$$me=mo(()=>{xt(()=>{this.$$r=!0;for(let o of Xo(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];let r=Pr(o,this.$$d[o],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,r)}this.$$r=!1})});for(let o in this.$$l)for(let r of this.$$l[o]){let s=this.$$c.$on(o,r);this.$$l_u.set(r,s)}this.$$l={}}}attributeChangedCallback(e,t,i){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Pr(e,i,this.$$p_d,"toProp"),this.$$c?.$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 Xo(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Pr(e,t,i,n){let o=i[e]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!i[e])return t;if(n==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function fc(e){let t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}var sl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(sl);import{areValidLiveRecordSources as fp}from"@vkontakte/videoplayer-core";import"@vkontakte/videoplayer-core";import{safeStorage as mp}from"@vkontakte/videoplayer-shared";import{SeekAction as hp}from"@vkontakte/videoplayer-statistics";import{InterfaceLanguage as mc,fillWithDefault as hc,VideoQuality as ll}from"@vkontakte/videoplayer-shared";var vc={debugLog:!1,devNullLog:!1,defaultLanguage:mc.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:ll.Q_480P,highQualityLimit:ll.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"},dl=e=>hc(e,vc),ul=e=>En("ui-config",e),pn=()=>xn("ui-config");var Un="vk_player_debug_panel_opened";var cl="videoplayer",pl="videoplayer";import{assertNonNullable as gc,VERSION as _c}from"@vkontakte/videoplayer-shared";import{VERSION as yc}from"@vkontakte/videoplayer-core";import{VERSION as bc}from"@vkontakte/videoplayer-statistics";var fl="prod",xo="1.0.4-dev.74465ac5.0";var ml=(e,t,i)=>{let n=document.createElement("a");n.href=e,n.download=`${t}.${i}`,n.style.display="none",n.click()};var hl=Symbol("storeContext"),vl=e=>{En(hl,e),fl==="dev"&&(window.app={store:e})},Ni=()=>{let e=xn(hl);return gc(e,"Store context is empty!"),e},Oe=(e,t)=>So(e,e.getValue(),t),So=(e,t,i)=>Bt(t,n=>{let o=e.subscribe(r=>{n(r),i?.(r)});return()=>o.unsubscribe()}),gl=(e,t,i,n,o=["meta config not provided"])=>{let r=e.info,{width:s,height:u}=_e(i.ui.playerSize),c=r.throughputEstimation$.getValue()?.toFixed(0)??0,h=r.rttEstimation$.getValue()?.toFixed(0)??0,p=r.isAutoQualityEnabled$.getValue()?"auto":"manual",a=`${xo} (core: ${yc}, stat: ${bc}, shared: ${_c})`,d=_e(i.state.errorLog$),m=d.length?`
41
- `+d.map((f,B)=>{let A=`${B}) Type: ${f.id}
42
- `,O=`Message: ${f.message} (${f.thrown})
43
- `,D=`Trace: ${f.thrown?.stack}
44
- `;return A+O+D}).join(`
45
- `):void 0,g=i.state.isAudioDisabled?"disabled":_e(i.state.isAudioAvailable$)?void 0:"unavailable",_=e.info.currentVideoStream$.getValue(),v=e.info.currentAudioStream$.getValue(),L=[];_&&L.push(`Video: ${_?.codec??""}`+(_?.hdr?" (HDR)":"")),v&&L.push(`Audio: ${v?.codec??""}`+(v?.language?` (${v.language})`:""));let N=r.currentQuality$.getValue(),k="";if(N){let f=r.availableQualitiesFps$.getValue()[N];k=f?`${f}fps`:""}let y=r.httpConnectionType$.getValue(),T=r.currentBuffer$.getValue()?.end??0,w=Math.max(T-_e(i.state.positionExact$),0),E={Version:a,Browser:navigator.userAgent,Config:o.join(", "),"United video id":String(i.videoId),TraceId:n,VSID:_e(i.vsid),"Content host":r.hostname$.getValue(),"Connection type":y?y+(r.httpConnectionReused$.getValue()?" (reused)":""):"",Throughput:`${c}Kbps @ ${h}ms RTT`,Format:r.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(", "):"",Streams:L.join(", "),Quality:`${p} ${N??""} ${k}`,"Available qualities":r.availableQualities$.getValue().join(", "),Audio:g,Position:`${_e(i.state.positionExact$)}s`,Buffer:`${w}s`,State:`${_e(i.playerPhase)} ${r.playbackState$.getValue()??""}`,"Player size":`${s}x${u}`,URL:window.location.href,Errors:m};return Object.entries(E).filter(([f,B])=>B!==void 0).map(([f,B])=>`${f}: ${B}`).join(`
46
- `)},_l=(e,t,i)=>{let n=e.info,{width:o,height:r}=_e(i.ui.playerSize),s={version:xo,viewport:`${o}x${r}`,volume:Math.round(_e(i.state.volume$)*100)};s.id=i.videoId,n.currentFormat$.getValue()&&(s.provider=n.currentFormat$.getValue()),n.hostname$.getValue()&&(s.cdn=n.hostname$.getValue());let h=n.intrinsicVideoSize$.getValue();h&&(s.videoSize=`${h.width}x${h.height}`);let p=n.currentBuffer$.getValue(),a=n.currentNativeBuffer$.getValue(),d=n.isLive$.getValue(),m=n.liveBufferTime$.getValue();p&&a&&(d&&m?(s.buffer=p.end-m,s.nativeBuffer=a.end-m):(s.buffer=Math.max(p.end-_e(i.state.positionExact$),0),s.nativeBuffer=Math.max(a.end-_e(i.state.positionExact$),0))),s.position=_e(i.state.positionExact$);let g=n.throughputEstimation$.getValue();g&&(s.speed=g);let _=n.videoBitrate$.getValue();_&&(s.bitrate=_);let v=n.liveLatency$.getValue();v&&(s.liveLatency=v);let L=n.currentVideoSegmentLength$.getValue();L&&(s.currentVideoSegmentLength=L);let N=n.currentAudioSegmentLength$.getValue();N&&(s.currentAudioSegmentLength=N);let k=_e(i.vsid);typeof k=="string"&&(s.vsid=k);let y=e.info.currentVideoStream$.getValue()?.codec;y&&(s.videoCodec=y);let T=e.info.currentAudioStream$.getValue()?.codec;T&&(s.audioCodec=T),e.info.currentVideoStream$.getValue()?.hdr&&(s.hdr=!0);let E=e.info.currentAudioStream$.getValue()?.language;return E&&(s.audioLanguage=E),s},yl=(e,t)=>ml(e,t,"mp4"),bl=()=>{let t=[],i=0;return{add:(n,o)=>{t[i]=[n,o],i=(i+1)%10},find:n=>t.find(([o])=>o===n)}},Eo=class{constructor(){this.destroyController=new AbortController;this.pendingDownloads=new Set}async download(t){if(this.pendingDownloads.has(t))return null;this.pendingDownloads.add(t);try{let i=await fetch(t,{signal:this.destroyController.signal});if(i.ok)return await i.text();throw i}finally{this.pendingDownloads.delete(t)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}};import{isNullable as Ur,safeStorage as it}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-core";var Ac="vk_player_",xl="vk_player_prefer_traffic_saving_enabled",xc="vk_player_preferred_volume",Ec="vk_player_prefer_volume_mute",zr="vk_player_preferred_quality",Rr="vk_player_preferred_default_quality_settings",Vr="vk_player_preferred_quality_settings_by_video",El="vk_player_preferred_stream_language",Sl="vk_player_preferred_rate";var jr="vk_player_preferred_subtitles_language",Sc="vk_player_user_video_prefs",YM=`${Ac}preview_track_close_tooltip`,Tc=e=>e>1?1:e<0?0:e;var To=()=>{let e=it.get(xc);return Ur(e)?void 0:Tc(parseFloat(e))},Fr=(e,t)=>it.set(zr,JSON.stringify({videoId:e,value:t})),Mo=()=>it.remove(zr),Hr=e=>{let t=it.get(zr);if(Ur(t))return;let{videoId:i,value:n}=JSON.parse(t);if(e!==i){Mo();return}return n},Mc=(e,t)=>{t?it.set(e,"true"):it.remove(e)},Tl=e=>it.get(e)==="true";var Ml=()=>Tl(Ec),Al=e=>Mc(xl,e),Qr=()=>Tl(xl),wl=()=>it.get(El),Il=e=>it.set(El,e),Yr=()=>it.get(jr),wc=e=>{e?it.set(jr,e):it.remove(jr)},kl=e=>it.set(Sl,JSON.stringify({rate:e})),Nl=()=>{let e=it.get(Sl);if(Ur(e))return;let{rate:t}=JSON.parse(e);return t};var Ic=()=>{let e=p=>{it.set(Rr,JSON.stringify(p))},t=()=>{try{let p=it.get(Rr);return p?JSON.parse(p):null}catch{return null}},i=()=>{try{let p=it.get(Vr);return p?JSON.parse(p):null}catch{return null}},n=p=>{it.set(Vr,JSON.stringify(p))},o=p=>{h(p);let a=p?i():null;if(a&&a?.videoId===p)return{...a,appliesTo:"to-video"};a&&r();let d=t();return d?{...d,appliesTo:"as-default"}:(e({type:"auto_quality"}),{type:"auto_quality",appliesTo:"as-default"})},r=()=>{it.remove(Vr)},s=()=>{it.remove(Rr)},u=(p,a="as-default")=>{p.type==="exact_quality"||a==="to-video"?n(p):e(p)},c=p=>{let a=o(p);if(a){switch(a.type){case"traffic_saving":Al(!0);break;case"exact_quality":Fr(p,a.quality)}r(),s()}},h=p=>{let a=Hr(p);if(a){n({type:"exact_quality",videoId:p,quality:a});return}Qr()&&e({type:"traffic_saving",videoId:p}),Al(!1),Mo()};return{getPreferredQualitySettings:o,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:u,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:r,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:Yr,savePreferredSubtitlesLanguage:wc}},{getPreferredQualitySettings:BM,migrateSettingsToLegacyWay:Dl,savePreferredQualitySettings:WM,savePreferredDefaultQualitySettings:GM,removePreferredQualitySettingsByVideo:qM,getPreferredDefaultQualitySettings:KM}=Ic();var kc=()=>{let e=it.get(Sc);if(e)try{return JSON.parse(e)}catch{return null}return null},wo=(e,t)=>kc()?.[e]?.[t]??null;import"@vkontakte/videoplayer-core";var Io=class{constructor(t){this.value=t,this.next=null}};var fn=class{constructor(t){this.top=null,this.bottom=null,this.size=0,this.maxSize=t}push(t){let i=new Io(t);this.top?(this.top.next=i,this.top=i):(this.top=i,this.bottom=i),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let t=[],i=this.bottom;for(;i;)t.push(i.value),i=i.next;return t}};var Nc=we('<div class="container s-8"><canvas class="s-8"></canvas></div>'),Dc={hash:"s-8",code:".container.s-8{display:inline-block;height:16px;width:120px}canvas.s-8{margin-top:2px;transform:scaleY(-1)}"};function zn(e,t){st(t,!0),dt(e,Dc);let i=ye(t,"values",19,()=>[]),n=Fe(void 0),o=Fe(null),r=16,s=120,u=60,c=s/u;dn(()=>{R(n).width=s,R(n).height=r,Ee(o,R(n).getContext("2d"),!0)});function h(d,m,g,_,v){v===0&&(v=1),d.fillStyle="#fff",d.fillRect(m,g,_,v)}xi(()=>{let d="";if(R(o)){let m=i()[0];for(let _=1;_<i().length;_++)i()[_]>m&&(m=i()[_]);R(o).clearRect(0,0,s,r);let g=u-1;for(let _=i().length-1;_>=0;_--){let v=g*c,L=m>0?r*(i()[_]/m):0;h(R(o),v,0,c,L),d=L+" "+d,g--}}});var p=Nc(),a=oe(p);zi(a,d=>Ee(n,d),()=>R(n)),ne(p),fe(e,p),lt()}import{safeStorage as Rl}from"@vkontakte/videoplayer-shared";import{isNullable as $l,InterfaceLanguage as Ol}from"@vkontakte/videoplayer-shared";var Lc={auto_quality_invariant:"Авто",auto_quality:"Авто ({actual})",auto_quality_option:"Авто",other_quality:"Другое",high_quality:"Высокое качество",high_quality_description:"Будет использовано больше трафика",auto_quality_limit:"Автоматически",traffic_saving_quality:"Экономия трафика",traffic_saving_quality_description:"Видео грузятся быстрее, но качество ниже",default_quality_for_any_video:"Качество для всех видео",quality_applience:"Качество по умолчанию можно {action}",quality_applience_action:"изменить",menu_quality:"Качество",menu_traffic_saving:"Экономия данных",menu_playback_rate:"Скорость",menu_report:"Сообщить о проблеме",menu_pip:"Картинка в картинке",menu_pip_close:"Развернуть видео",menu_copy_video_link:"Скопировать ссылку на видео",menu_copy_video_link_with_timestamp:"Скопировать ссылку на кадр",menu_video_rotate:"Повернуть",menu_video_loop_on:"Включить повторение",menu_video_loop_off:"Отключить повторение",menu_chromecast:"Chromecast трансляция",menu_copy_debug:"Копировать данные для диагностики",menu_save_debug:"Сохранить данные для диагностики",menu_debug_overlay:"Техническая информация",menu_copy_embed_code:"Копировать код для встраивания",menu_audio_languages:"Звуковая дорожка",audio_stream_display_language_label:"{label} ({language})",audio_stream_display_language_label_index:"{label} {index} ({language})",audio_stream_display_label_index:"{label} {index}",audio_stream_display_language_index:"{language} {index}",audio_stream_display_unknown:"Дорожка {index}",pip_dummy_title:"Видео воспроизводится в режиме картинка в картинке",submenu_quality:"Качество",submenu_playback_rate:"Скорость",submenu_settings:"Настройки",submenu_traffic_saving:"Экономия данных",submenu_audio_languages:"Звуковая дорожка",playing_ads:"Реклама {timeleft}",skip_ads_now:"Пропустить рекламу",skip_ads_after:"Пропустить {time}с",visit_advertiser:"Перейти на сайт",aria_timeline:"Ползунок временной шкалы",aria_timeline_value:"{position} (общая длительность {duration}",doubletap_seek_step:"{seconds} секунд",playback_rate_1:"Обычная",playback_rate:"{multiplier}x",video360:"панорамное видео",subtitles_caption:"Субтитры",subtitles_auto:"{language} (Автоматические)",subtitles_off:"Выкл.",subtitles_auto_caption:"Автоматические субтитры",subtitles_turn_on:"Включить субтитры",subtitles_turn_off:"Выключить субтитры",traffic_saving_off:"Откл.",traffic_saving_on:"Вкл.",traffic_saving_helper_text:"При включении качество видео будет снижено для экономии трафика",tooltip_button_disabled:"Кнопка недоступна",tooltip_previous:"Предыдущее видео",tooltip_restart:"Начать заново",tooltip_play:"Смотреть",tooltip_pause:"Пауза",tooltip_next:"Следующее видео",tooltip_interactive_go_back:"Вернуться к предыдущей главе",tooltip_interactive_go_back_disabled:"История прохождения недоступна",tooltip_interactive_go_back_disabled_first:"Вы смотрите первую главу",tooltip_interactive_go_back_disabled_limit:"Лимит возвратов исчерпан",tooltip_chapter_without_interactive:"В этой главе нет интерактива",tooltip_interactive_of_chapter_completed:"Интерактивы этой главы уже пройдены",tooltip_interactive_seek:"Перейти к интерактиву",tooltip_interactive_graph_off:"Показать карту сюжета",tooltip_interactive_graph_on:"Скрыть карту сюжета",tooltip_live:"Перемотать на актуальный лайв",tooltip_episodes:"Эпизоды",tooltip_volume:"Включить звук",tooltip_volume_muted:"Выключить звук",tooltip_sound_unavailable:"Звук недоступен",tooltip_subtitles_off:"Включить субтитры",tooltip_subtitles_on:"Выключить субтитры",tooltip_settings_off:"Открыть настройки",tooltip_settings_on:"Закрыть настройки",tooltip_fullscreen_off:"На весь экран",tooltip_fullscreen_on:"Выйти из полноэкранного режима",tooltip_chromecast_off:"Включить Chromecast",tooltip_chromecast_on:"Выключить Chromecast",tooltip_episode_finished:"Вы уже сделали свой выбор",tooltip_episode_unfinished:"Не пройдено",tooltip_disabled_when_interactive:"Интерактив уже идёт",tooltip_disabled_when_graph_on:"Кнопка недоступна во время просмотра карты",tooltip_interactive_interaction_time_indicator:"Нажмите на элемент интерактива",tooltip_vk_logo:"Открыть в VK Видео",tooltip_vk_video_logo:"Перейти в VK Видео",tooltip_autoplay_off:"Включить автовоспроизведение",tooltip_autoplay_on:"Отключить автовоспроизведение",tooltip_context_menu_open:"Открыть контекстное меню",tooltip_context_menu_close:"Закрыть контекстное меню",download_video_caption:"Скачать видео",hotkey_helper_current_volume:"{value} %",hotkey_map_modal_title:"Быстрые клавиши",hotkey_map_modal_close_btn_text:"Закрыть",hotkey_map_group_title_common:"Общие",hotkey_map_group_title_playback:"Воспроизведение",hotkey_map_group_title_subtitles:"Субтитры",hotkey_map_group_title_episodes:"Эпизоды",hotkey_map_item_mute_description:"Включить или отключить звук",hotkey_map_item_mute_value:"m",hotkey_map_item_volume_up_description:"Увеличить громкость",hotkey_map_item_volume_up_value:"Стрелка вверх",hotkey_map_item_volume_down_description:"Уменьшить громкость",hotkey_map_item_volume_down_value:"Стрелка вниз",hotkey_map_item_pip_description:"Свернуть или развернуть мини-проигрыватель",hotkey_map_item_pip_value:"i",hotkey_map_item_full_screen_description:"Включить или выключить полноэкранный режим",hotkey_map_item_full_screen_value:"f",hotkey_map_item_show_context_menu_description:"Скрыть или показать контекстное меню",hotkey_map_item_show_context_menu_value:"Shift + !",hotkey_map_item_show_hotkey_map_description:"Скрыть или показать список горячих клавиш",hotkey_map_item_show_hotkey_map_value:"Shift + ?",hotkey_map_item_play_toggle_description:"Приостановить или продолжить воспроизведение",hotkey_map_item_play_toggle_value:"Пробел (или k)",hotkey_map_item_seek_backward_description:"Перемотать ролик на 10 секунд назад",hotkey_map_item_seek_backward_value:"Стрелка влево (или j)",hotkey_map_item_seek_forward_description:"Перемотать ролик на 10 секунд вперёд",hotkey_map_item_seek_forward_value:"Стрелка вправо (или l)",hotkey_map_item_fast_seek_backward_description:"Ускоренная перемотка назад",hotkey_map_item_fast_seek_backward_value:"Shift + Стрелка влево",hotkey_map_item_fast_seek_forward_description:"Ускоренная перемотка вперёд",hotkey_map_item_fast_seek_forward_value:"Shift + Стрелка вправо",hotkey_map_item_rate_down_description:"Уменьшить скорость воспроизведения",hotkey_map_item_rate_down_value:"< (Shift + ,)",hotkey_map_item_rate_up_description:"Увеличить скорость воспроизведения",hotkey_map_item_rate_up_value:"> (Shift + .)",hotkey_map_item_prev_frame_description:"Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_prev_frame_value:",",hotkey_map_item_next_frame_description:"Перейти к следующему кадру <br />(когда воспроизведение приостановлено)",hotkey_map_item_next_frame_value:".",hotkey_map_item_jump_seek_description:"Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)",hotkey_map_item_jump_seek_value:"0, 1, 2, 3, 4, 5, 6, 7, 8, 9",hotkey_map_item_subtitles_toggle_description:"Включить или отключить субтитры",hotkey_map_item_subtitles_toggle_value:"c",hotkey_map_item_prev_episode_description:"Перейти к предыдущему эпизоду",hotkey_map_item_prev_episode_pc_value:"Ctrl + Стрелка влево",hotkey_map_item_prev_episode_mac_value:"Option + Стрелка влево",hotkey_map_item_next_episode_description:"Перейти к следующему эпизоду",hotkey_map_item_next_episode_pc_value:"Ctrl + Стрелка вправо",hotkey_map_item_next_episode_mac_value:"Option + Стрелка вправо",hotkey_map_item_next_video_description:"Перейти к следующему видео",hotkey_map_item_next_video_value:"Shift + N",hotkey_map_item_prev_video_description:"Перейти к предыдущему видео",hotkey_map_item_prev_video_value:"Shift + P",waiting_live_day_value:"дн",waiting_live_hour_value:"ч",waiting_live_minute_value:"мин",waiting_live_second_value:"сек",waiting_live_colon:":",waiting_live_upcoming_title:"Трансляция еще не началась",waiting_live_timer_title:"До начала трансляции осталось",waiting_live_recover_title:"Трансляция приостановлена - она продолжится, когда автор вернётся",waiting_record_title:"Трансляция завершена - запись появится позже",aria_label_video_player:"Видео плеер",aria_label_spherical_control:"Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.",aria_label_debug_panel:"Область с технической информацией, сделайте скриншот для техподдержки",aria_label_new_tab_alert:"Откроется в новой вкладке.",aria_label_menu_quality:"Качество: {actual}",aria_label_menu_audio_languages:"Язык аудио: {actual}",aria_label_menu_rate:"Скорость: {actual}",aria_label_menu_subtitle:"Субтитры: {actual}",aria_label_menu_download:"Скачать видео",aria_label_menu_debug_overlay:"Отображение технической информации",aria_label_menu_rotate:"Повернуть видео на 90 градусов",aria_label_menu_loop:"Переключение режима повторения",aria_label_submenu_back:"Вернуться в меню настроек",aria_label_submenu_traffic_saving:"Режим экономии данных",aria_label_settings:"Настройки",aria_label_context_menu:"Контекстное меню",aria_label_autoplay:"Автовоспроизведение",end_screen_next_video:"Следующее видео",end_screen_recommended_video:"Рекомендуемое видео",slow_video_notification_button:"Выбрать качество «Авто»",slow_video_notification_force_description:`Видео грузится слишком медленно,
47
- качество изменено на «Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
48
- попробуйте изменить качество на «Авто»`,double_forward_label:"2x",preview_track_notification_text:"Потяните вверх для точной перемотки",preview_track_close_tooltip:"Выйти из режима точной перемотки"},Ll=Lc;var Cc={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
- 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"},Cl=Cc;var Ei=new Map;Ei.set(Ol.EN,Cl);Ei.set(Ol.RU,Ll);var Pl=new Map,Br=({language:e,pack:t,fallback:i})=>{if(Ei.has(e)){let n=Ei.get(e);Ei.set(e,{...n,...t})}else Ei.set(e,t);Pl.set(e,i)},Wr=e=>Ei.has(e),Gr=(e,t,i,n)=>{let r=Ei.get(e)?.[t];if($l(r)){let s=Pl.get(e)??n;r=(s?Ei.get(s):void 0)?.[t]}return $l(r)?t+Object.values(i??{}).join(" "):i?r.replaceAll(/{(\w+?)}/g,(s,u)=>i[u]??""):r},ko=(e,t)=>{let{interfaceLanguage$:i}=Ni(),n=_e(i),o=pn();return Gr(n,e,t,o.defaultLanguage)};var $c=(e,t)=>{e.stopPropagation(),Rl.remove(Un),t.set(!1)},Oc=we('<div class="s-5"><div class="s-5">Video id</div> <span> </span></div>'),Pc=we('<div class="s-5"><div class="s-5">VSID</div> <span> </span></div>'),Rc=we('<div class="s-5"><div class="s-5">Provider</div> <span> </span></div>'),Vc=we('<div class="s-5"><div class="s-5">Streams</div> <span> </span></div>'),jc=we('<div class="s-5"><div class="s-5">Viewport</div> <span> </span></div>'),Uc=we('<div class="s-5"><div class="s-5">Video size</div> <span> </span></div>'),zc=we('<div class="s-5"><div class="s-5">CDN host</div> <span> </span></div>'),Fc=we('<div class="s-5"><div class="s-5">Volume</div> <span> </span></div>'),Hc=we('<div class="s-5"><div class="s-5">Position</div> <span> </span></div>'),Qc=we('<div class="s-5"><div class="s-5">Buffer</div> <span> </span></div>'),Yc=we('<div class="s-5"><div class="s-5">Nbuffer</div> <span> </span></div>'),Bc=we('<div class="s-5"><div class="s-5">Live latency</div> <span> </span></div>'),Wc=we('<div class="s-5"><div class="s-5">Segment</div> <span> </span></div>'),Gc=we('<div class="s-5"><div class="s-5">Network</div> <!> <span> </span></div>'),qc=we('<div class="s-5"><div class="s-5">V bitrate</div> <!> <span> </span></div>'),Kc=we('<div class="container s-5" role="region"><button class="close s-5" title="закрыть">[x]</button> <div class="content s-5"><div class="s-5"><div class="s-5">Version</div> <span> </span></div> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="s-5"><div class="s-5">Dropped</div> <span> </span></div> <!> <!> <div class="s-5"><div class="s-5">FPS</div> <!> <span> </span></div></div></div>'),Zc={hash:"s-5",code:".container.s-5{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-5,button.close.s-5{color:#fff;position:absolute}button.close.s-5{background-color:transparent;border:none;cursor:pointer;outline:0;padding:0;right:5px;top:3px}.content.s-5{padding:5px}.content.s-5>div:where(.s-5)>div:where(.s-5){display:inline-block;padding:0 5px;text-align:right;width:60px}"};function qr(e,t){st(t,!0),dt(e,Zc);let i=Ni(),n=i.ui.debugPanelVisible,o=Fe(yt(i.actions.internal.getDebugPanelData())),r=i.actions.internal.getVideoElement(),s=Fe(0),u=Fe(0),c=Fe(0),h=new fn(60),p=new fn(60),a=new fn(60),d=Fe(yt([])),m=Fe(yt([])),g=Fe(yt([])),_=ko("aria_label_debug_panel");dn(()=>{Rl.set(Un,"true"),r&&(Ee(u,r.getVideoPlaybackQuality().droppedVideoFrames,!0),Ee(s,r.getVideoPlaybackQuality().totalVideoFrames,!0));let S=window.setInterval(()=>{Ee(o,i.actions.internal.getDebugPanelData(),!0)},500),j;return r&&(j=window.setInterval(()=>{if(r){Ee(u,r.getVideoPlaybackQuality().droppedVideoFrames,!0);let X=r.getVideoPlaybackQuality().totalVideoFrames;Ee(c,X-R(s)),Ee(s,X,!0),h.push(R(c)),R(o).speed&&p.push(R(o).speed),R(o).bitrate&&a.push(R(o).bitrate),Ee(d,h.getValuesFromBottom(),!0),Ee(m,p.getValuesFromBottom(),!0),Ee(g,a.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(S),j&&clearInterval(j)}});var v=Kc(),L=oe(v);L.__click=[$c,n];var N=pe(L,2),k=oe(N),y=pe(oe(k),2),T=oe(y,!0);ne(y),ne(k);var w=pe(k,2);{var E=S=>{var j=Oc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).id)),fe(S,j)};Qe(w,S=>{R(o).id&&S(E)})}var f=pe(w,2);{var B=S=>{var j=Pc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).vsid)),fe(S,j)};Qe(f,S=>{R(o).vsid&&S(B)})}var A=pe(f,2);{var O=S=>{var j=Rc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).provider)),fe(S,j)};Qe(A,S=>{R(o).provider&&S(O)})}var D=pe(A,2);{var Z=S=>{var j=Vc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(()=>Ze(ue,`Video: ${(R(o).videoCodec||"")??""} ${R(o).hdr?"(HDR)":""}
34
+ https://svelte.dev/e/state_proxy_equality_mismatch`,Zr,Qr):console.warn(`https://svelte.dev/e/state_proxy_equality_mismatch`)}function ii(){N?console.warn(`%c[svelte] state_proxy_unmount
35
+ %cTried to unmount a state proxy, rather than a component
36
+ https://svelte.dev/e/state_proxy_unmount`,Zr,Qr):console.warn(`https://svelte.dev/e/state_proxy_unmount`)}function ai(){N?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",Zr,Qr):console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var F=!1;function oi(e){F=e}var I;function si(e){if(e===null)throw ti(),Vn;return I=e}function ci(){return si(to(I))}function L(e){if(F){if(to(I)!==null)throw ti(),Vn;I=e}}function li(e=1){if(F){for(var t=e,n=I;t--;)n=to(n);I=n}}function ui(e=!0){for(var t=0,n=I;;){if(n.nodeType===Fr){var r=n.data;if(r===Bn){if(t===0)return n;--t}else (r===Rn||r===zn||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=to(n);e&&n.remove(),n=i}}function di(e){if(!e||e.nodeType!==Fr)throw ti(),Vn;return e.data}function fi(e){return e===this.v}function pi(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function mi(e){return!pi(e,this.v)}var hi=!1,gi=!1,_i=!1;function vi(){gi=!0}var yi=null;function bi(e,t){return e.label=t,xi(e.v,t),e}function xi(e,t){return e?.[jr]?.(t),e}function Si(e){let t=Error(),n=Ci();return n.length===0?null:(n.unshift(`
37
+ `),Jn(t,`stack`,{value:n.join(`
38
+ `)}),Jn(t,`name`,{value:e}),t)}function Ci(){let e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let t=Error().stack;if(Error.stackTraceLimit=e,!t)return[];let n=t.split(`
39
+ `),r=[];for(let e=0;e<n.length;e++){let t=n[e],i=t.replaceAll(`\\`,`/`);if(t.trim()!==`Error`){if(t.includes(`validate_each_keys`))return[];i.includes(`svelte/src/internal`)||i.includes(`node_modules/.vite`)||r.push(t)}}return r}var R=null;function wi(e){R=e}var Ti=null;function Ei(e){Ti=e}var Di=null;function Oi(e){Di=e}function ki(e){return Pi(`getContext`).get(e)}function Ai(e,t){let n=Pi(`setContext`);if(hi){var r=W.f;!U&&(r&lr)!==0&&!R.i||Kr()}return n.set(e,t),t}function ji(e,t=!1,n){R={p:R,i:!1,c:null,e:null,s:e,x:null,l:gi&&!t?{s:null,u:null,$:[]}:null},N&&(R.function=n,Di=n)}function Mi(e){var t=R,n=t.e;if(n!==null){t.e=null;for(var r of n)mo(r)}return e!==void 0&&(t.x=e),t.i=!0,R=t.p,N&&(Di=R?.function??null),e??{}}function Ni(){return!gi||R!==null&&R.l===null}function Pi(e){return R===null&&Ir(e),R.c??=new Map(Fi(R)||void 0)}function Fi(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var Ii=[];function Li(){var e=Ii;Ii=[],nr(e)}function Ri(e){if(Ii.length===0&&!ea){var t=Ii;queueMicrotask(()=>{t===Ii&&Li()})}Ii.push(e)}var zi=new WeakMap;function Bi(e){var t=W;if(t===null)return U.f|=Dr,e;if(N&&e instanceof Error&&!zi.has(e)&&zi.set(e,Hi(e,t)),(t.f&vr)===0&&(t.f&ar)===0)throw N&&!t.parent&&e instanceof Error&&Ui(e),e;Vi(e,t)}function Vi(e,t){for(;t!==null;){if((t.f&dr)!==0){if((t.f&vr)===0)throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw N&&e instanceof Error&&Ui(e),e}function Hi(e,t){let n=Yn(e,`message`);if(!(n&&!n.configurable)){for(var r=Ya?` `:` `,i=`
40
+ ${r}in ${t.fn?.name||`<unknown>`}`,a=t.ctx;a!==null;)i+=`
41
+ ${r}in ${a.function?.[Un].split(`/`).pop()}`,a=a.p;return{message:e.message+`
42
+ ${i}
43
+ `,stack:e.stack?.split(`
44
+ `).filter(e=>!e.includes(`svelte/src/internal`)).join(`
45
+ `)}}}function Ui(e){let t=zi.get(e);t&&(Jn(e,`message`,{value:t.message}),Jn(e,`stack`,{value:t.stack}))}var Wi=~(mr|hr|pr);function Gi(e,t){e.f=e.f&Wi|t}function Ki(e){(e.f&fr)!==0||e.deps===null?Gi(e,pr):Gi(e,hr)}function qi(e){if(e!==null)for(let t of e)(t.f&ir)===0||(t.f&wr)===0||(t.f^=wr,qi(t.deps))}function Ji(e,t,n){(e.f&mr)===0?(e.f&hr)!==0&&n.add(e):t.add(e),qi(e.deps),Gi(e,pr)}var Yi=new Set,z=null,Xi=null,Zi=[],Qi=null,$i=!1,ea=!1;class ta{committed=!1;current=new Map;previous=new Map;#commit_callbacks=new Set;#discard_callbacks=new Set;#pending=0;#blocking_pending=0;#deferred=null;#dirty_effects=new Set;#maybe_dirty_effects=new Set;#skipped_branches=new Map;is_fork=!1;#decrement_queued=!1;is_deferred(){return this.is_fork||this.#blocking_pending>0}skip_effect(e){this.#skipped_branches.has(e)||this.#skipped_branches.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#skipped_branches.get(e);if(t){this.#skipped_branches.delete(e);for(var n of t.d)Gi(n,mr),ca(n);for(n of t.m)Gi(n,hr),ca(n)}}process(e){Zi=[],this.apply();var t=[],n=[];for(let r of e)this.#traverse_effect_tree(r,t,n);if(this.is_deferred()){this.#defer_effects(n),this.#defer_effects(t);for(let[e,t]of this.#skipped_branches)la(e,t)}else{for(let e of this.#commit_callbacks)e();this.#commit_callbacks.clear(),this.#pending===0&&this.#commit(),z=null,aa(n),aa(t),this.#deferred?.resolve()}Xi=null}#traverse_effect_tree(e,t,n){e.f^=pr;for(var r=e.first,i=null;r!==null;){var a=r.f,o=(a&(lr|ur))!==0,s=o&&(a&pr)!==0||(a&gr)!==0||this.#skipped_branches.has(r);if(hi&&i===null&&(a&dr)!==0&&r.b?.is_pending&&(i=r),!s&&r.fn!==null){o?r.f^=pr:i!==null&&(a&(ar|or|sr))!==0?i.b.defer_effect(r):(a&ar)===0?hi&&(a&(or|sr))!==0?n.push(r):Zo(r)&&((a&cr)!==0&&this.#maybe_dirty_effects.add(r),ns(r)):t.push(r);var c=r.first;if(c!==null){r=c;continue}}for(;r!==null;){r===i&&(i=null);var l=r.next;if(l!==null){r=l;break}r=r.parent}}}#defer_effects(e){for(var t=0;t<e.length;t+=1)Ji(e[t],this.#dirty_effects,this.#maybe_dirty_effects)}capture(e,t){t!==Hn&&!this.previous.has(e)&&this.previous.set(e,t),(e.f&Dr)===0&&(this.current.set(e,e.v),Xi?.set(e,e.v))}activate(){z=this,this.apply()}deactivate(){z===this&&(z=null,Xi=null)}flush(){if(this.activate(),Zi.length>0){if(na(),z!==null&&z!==this)return}else this.#pending===0&&this.process([]);this.deactivate()}discard(){for(let e of this.#discard_callbacks)e(this);this.#discard_callbacks.clear()}#commit(){if(Yi.size>1){this.previous.clear();var e=Xi,t=!0;for(let e of Yi){if(e===this){t=!1;continue}let r=[];for(let[n,i]of this.current){if(e.current.has(n))if(t&&i!==e.current.get(n))e.current.set(n,i);else continue;r.push(n)}if(r.length===0)continue;let i=[...e.current.keys()].filter(e=>!this.current.has(e));if(i.length>0){var n=Zi;Zi=[];let t=new Set,a=new Map;for(let e of r)oa(e,i,t,a);if(Zi.length>0){z=e,e.apply();for(let t of Zi)e.#traverse_effect_tree(t,[],[]);e.deactivate()}Zi=n}}z=null,Xi=e}this.committed=!0,Yi.delete(this)}increment(e){this.#pending+=1,e&&(this.#blocking_pending+=1)}decrement(e){--this.#pending,e&&--this.#blocking_pending,!this.#decrement_queued&&(this.#decrement_queued=!0,Ri(()=>{this.#decrement_queued=!1,this.is_deferred()?Zi.length>0&&this.flush():this.revive()}))}revive(){for(let e of this.#dirty_effects)this.#maybe_dirty_effects.delete(e),Gi(e,mr),ca(e);for(let e of this.#maybe_dirty_effects)Gi(e,hr),ca(e);this.flush()}oncommit(e){this.#commit_callbacks.add(e)}ondiscard(e){this.#discard_callbacks.add(e)}settled(){return(this.#deferred??=rr()).promise}static ensure(){if(z===null){let e=z=new ta;Yi.add(z),ea||Ri(()=>{z===e&&e.flush()})}return z}apply(){if(!(!hi||!this.is_fork&&Yi.size===1)){Xi=new Map(this.current);for(let e of Yi)if(e!==this)for(let[t,n]of e.previous)Xi.has(t)||Xi.set(t,n)}}}function na(){$i=!0;var e=N?new Set:null;try{for(var t=0;Zi.length>0;){var n=ta.ensure();if(t++>1e3){if(N){var r=new Map;for(let e of n.current.keys())for(let[t,n]of e.updated??[]){var i=r.get(t);i||(i={error:n.error,count:0},r.set(t,i)),i.count+=n.count}for(let e of r.values())e.error&&console.error(e.error)}ra()}if(n.process(Zi),Aa.clear(),N)for(let t of n.current.keys())e.add(t)}}finally{if(Zi=[],$i=!1,Qi=null,N)for(let t of e)t.updated=null}}function ra(){try{Hr()}catch(e){N&&Jn(e,`stack`,{value:``}),Vi(e,Qi)}}var ia=null;function aa(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(_r|gr))===0&&Zo(r)&&(ia=new Set,ns(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Do(r),ia?.size>0)){Aa.clear();for(let e of ia){if((e.f&(_r|gr))!==0)continue;let t=[e],n=e.parent;for(;n!==null;)ia.has(n)&&(ia.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];(n.f&(_r|gr))===0&&ns(n)}}ia.clear()}}ia=null}}function oa(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;(e&ir)===0?(e&(Er|cr))!==0&&(e&mr)===0&&sa(i,t,r)&&(Gi(i,mr),ca(i)):oa(i,t,n,r)}}function sa(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(Kn.call(t,r))return!0;if((r.f&ir)!==0&&sa(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function ca(e){for(var t=Qi=e;t.parent!==null;){t=t.parent;var n=t.f;if($i&&t===W&&(n&cr)!==0&&(n&xr)===0)return;if((n&(ur|lr))!==0){if((n&pr)===0)return;t.f^=pr}}Zi.push(t)}function la(e,t){if(!((e.f&lr)!==0&&(e.f&pr)!==0)){(e.f&mr)===0?(e.f&hr)!==0&&t.m.push(e):t.d.push(e),Gi(e,pr);for(var n=e.first;n!==null;)la(n,t),n=n.next}}function ua(e){let t=0,n=Pa(0),r;return N&&bi(n,`createSubscriber version`),()=>{uo()&&(G(n),vo(()=>(t===0&&(r=as(()=>e(()=>za(n)))),t+=1,()=>{Ri(()=>{--t,t===0&&(r?.(),r=void 0,za(n))})})))}}var da=yr|Sr;function fa(e,t,n){new pa(e,t,n)}class pa{parent;is_pending=!1;#anchor;#hydrate_open=F?I:null;#props;#children;#effect;#main_effect=null;#pending_effect=null;#failed_effect=null;#offscreen_fragment=null;#local_pending_count=0;#pending_count=0;#pending_count_update_queued=!1;#dirty_effects=new Set;#maybe_dirty_effects=new Set;#effect_pending=null;#effect_pending_subscriber=ua(()=>(this.#effect_pending=Pa(this.#local_pending_count),N&&bi(this.#effect_pending,`$effect.pending()`),()=>{this.#effect_pending=null}));constructor(e,t,n){this.#anchor=e,this.#props=t,this.#children=e=>{var t=W;t.b=this,t.f|=dr,n(e)},this.parent=W.b,this.#effect=bo(()=>{if(F){let e=this.#hydrate_open;ci(),e.data===zn?this.#hydrate_pending_content():this.#hydrate_resolved_content()}else this.#render()},da),F&&(this.#anchor=I)}#hydrate_resolved_content(){try{this.#main_effect=xo(()=>this.#children(this.#anchor))}catch(e){this.error(e)}}#hydrate_pending_content(){let e=this.#props.pending;e&&(this.is_pending=!0,this.#pending_effect=xo(()=>e(this.#anchor)),Ri(()=>{var e=this.#offscreen_fragment=document.createDocumentFragment(),t=$a();e.append(t),this.#main_effect=this.#run(()=>(ta.ensure(),xo(()=>this.#children(t)))),this.#pending_count===0&&(this.#anchor.before(e),this.#offscreen_fragment=null,Oo(this.#pending_effect,()=>{this.#pending_effect=null}),this.is_pending=!1)}))}#render(){try{if(this.is_pending=this.has_pending_snippet(),this.#pending_count=0,this.#local_pending_count=0,this.#main_effect=xo(()=>{this.#children(this.#anchor)}),this.#pending_count>0){var e=this.#offscreen_fragment=document.createDocumentFragment();Mo(this.#main_effect,e);let t=this.#props.pending;this.#pending_effect=xo(()=>t(this.#anchor))}else this.is_pending=!1}catch(e){this.error(e)}}defer_effect(e){Ji(e,this.#dirty_effects,this.#maybe_dirty_effects)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#props.pending}#run(e){var t=W,n=U,r=R;zo(this.#effect),Ro(this.#effect),wi(this.#effect.ctx);try{return e()}catch(e){return Bi(e),null}finally{zo(t),Ro(n),wi(r)}}#update_pending_count(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#update_pending_count(e);return}if(this.#pending_count+=e,this.#pending_count===0){this.is_pending=!1;for(let e of this.#dirty_effects)Gi(e,mr),ca(e);for(let e of this.#maybe_dirty_effects)Gi(e,hr),ca(e);this.#dirty_effects.clear(),this.#maybe_dirty_effects.clear(),this.#pending_effect&&Oo(this.#pending_effect,()=>{this.#pending_effect=null}),this.#offscreen_fragment&&=(this.#anchor.before(this.#offscreen_fragment),null)}}update_pending_count(e){this.#update_pending_count(e),this.#local_pending_count+=e,!(!this.#effect_pending||this.#pending_count_update_queued)&&(this.#pending_count_update_queued=!0,Ri(()=>{this.#pending_count_update_queued=!1,this.#effect_pending&&La(this.#effect_pending,this.#local_pending_count)}))}get_effect_pending(){return this.#effect_pending_subscriber(),G(this.#effect_pending)}error(e){var t=this.#props.onerror;let n=this.#props.failed;if(!t&&!n)throw e;this.#main_effect&&=(To(this.#main_effect),null),this.#pending_effect&&=(To(this.#pending_effect),null),this.#failed_effect&&=(To(this.#failed_effect),null),F&&(si(this.#hydrate_open),li(),si(ui()));var r=!1,i=!1;let a=()=>{if(r){ai();return}r=!0,i&&Xr(),this.#failed_effect!==null&&Oo(this.#failed_effect,()=>{this.#failed_effect=null}),this.#run(()=>{ta.ensure(),this.#render()})};Ri(()=>{try{i=!0,t?.(e,a),i=!1}catch(e){Vi(e,this.#effect&&this.#effect.parent)}n&&(this.#failed_effect=this.#run(()=>{ta.ensure();try{return xo(()=>{var t=W;t.b=this,t.f|=dr,n(this.#anchor,()=>e,()=>a)})}catch(e){return Vi(e,this.#effect.parent),null}}))})}}function ma(e,t,n,r){let i=Ni()?va:xa;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=z,s=W,c=ha(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){c();try{r(e)}catch(e){(s.f&_r)===0&&Vi(e,s)}o?.deactivate(),ga()}if(n.length===0){l.then(()=>u(t.map(i)));return}function d(){c(),Promise.all(n.map(e=>ya(e))).then(e=>u([...t.map(i),...e])).catch(e=>Vi(e,s))}l?l.then(d):d()}function ha(){var e=W,t=U,n=R,r=z;if(N)var i=Ti;return function(a=!0){zo(e),Ro(t),wi(n),a&&r?.activate(),N&&Ei(i)}}function ga(){zo(null),Ro(null),wi(null),N&&Ei(null)}var _a=new Set;function va(e){var t=ir|mr,n=U!==null&&(U.f&ir)!==0?U:null;W!==null&&(W.f|=Sr);let r={ctx:R,deps:null,effects:null,equals:fi,f:t,fn:e,reactions:null,rv:0,v:Hn,wv:0,parent:n??W,ac:null};return N&&_i&&(r.created=Si(`created at`)),r}function ya(e,t,n){let r=W;r===null&&Lr();var i=r.b,a=void 0,o=Pa(Hn);N&&(o.label=t);var s=!U,c=new Map;return _o(()=>{var t=rr();a=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).then(()=>{r===z&&r.committed&&r.deactivate(),ga()})}catch(e){t.reject(e),ga()}var r=z;if(s){var l=i.is_rendered();i.update_pending_count(1),r.increment(l),c.get(r)?.reject(Mr),c.delete(r),c.set(r,t)}let u=(e,t=void 0)=>{if(r.activate(),t)t!==Mr&&(o.f|=Dr,La(o,t));else{(o.f&Dr)!==0&&(o.f^=Dr),La(o,e);for(let[e,t]of c){if(c.delete(e),e===r)break;t.reject(Mr)}N&&n!==void 0&&(_a.add(o),setTimeout(()=>{_a.has(o)&&($r(o.label,n),_a.delete(o))}))}s&&(i.update_pending_count(-1),r.decrement(l))};t.promise.then(u,e=>u(null,e||`unknown`))}),fo(()=>{for(let e of c.values())e.reject(Mr)}),N&&(o.f|=Er),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function ba(e){let t=va(e);return hi||Vo(t),t}function xa(e){let t=va(e);return t.equals=mi,t}function Sa(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)To(t[n])}}var Ca=[];function wa(e){for(var t=e.parent;t!==null;){if((t.f&ir)===0)return(t.f&_r)===0?t:null;t=t.parent}return null}function Ta(e){var t,n=W;if(zo(wa(e)),N){let r=ka;ja(new Set);try{Kn.call(Ca,e)&&Rr(),Ca.push(e),e.f&=~wr,Sa(e),t=$o(e)}finally{zo(n),ja(r),Ca.pop()}}else try{e.f&=~wr,Sa(e),t=$o(e)}finally{zo(n)}return t}function Ea(e){var t=Ta(e);if(!e.equals(t)&&(e.wv=Xo(),(!z?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){Gi(e,pr);return}Fo||(Xi===null?Ki(e):(uo()||z?.is_fork)&&Xi.set(e,t))}function Da(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Mr),t.teardown=tr,t.ac=null,ts(t,0),Co(t))}function Oa(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&ns(t)}var ka=new Set,Aa=new Map;function ja(e){ka=e}var Ma=!1;function Na(){Ma=!0}function Pa(e,t){var n={f:0,v:e,reactions:null,equals:fi,rv:0,wv:0};return N&&_i&&(n.created=t??Si(`created at`),n.updated=null,n.set_during_effect=!1,n.trace=null),n}function Fa(e,t){let n=Pa(e,t);return Vo(n),n}function Ia(e,t=!1,n=!0){let r=Pa(e);return t||(r.equals=mi),gi&&n&&R!==null&&R.l!==null&&(R.l.s??=[]).push(r),r}function B(e,t,n=!1){U!==null&&(!Lo||(U.f&br)!==0)&&Ni()&&(U.f&(ir|cr|Er|br))!==0&&(Bo===null||!Kn.call(Bo,e))&&Yr();let r=n?Ha(t):t;return N&&xi(r,e.label),La(e,r)}function La(e,t){if(!e.equals(t)){var n=e.v;Fo?Aa.set(e,t):Aa.set(e,n),e.v=t;var r=ta.ensure();if(r.capture(e,n),N){if(_i||W!==null){e.updated??=new Map;let t=(e.updated.get(``)?.count??0)+1;if(e.updated.set(``,{error:null,count:t}),_i||t>5){let t=Si(`updated at`);if(t!==null){let n=e.updated.get(t.stack);n||(n={error:t,count:0},e.updated.set(t.stack,n)),n.count++}}}W!==null&&(e.set_during_effect=!0)}if((e.f&ir)!==0){let t=e;(e.f&mr)!==0&&Ta(t),Ki(t)}e.wv=Xo(),Ba(e,mr),Ni()&&W!==null&&(W.f&pr)!==0&&(W.f&(lr|ur))===0&&(Wo===null?Go([e]):Wo.push(e)),!r.is_fork&&ka.size>0&&!Ma&&Ra()}return t}function Ra(){Ma=!1;for(let e of ka)(e.f&pr)!==0&&Gi(e,hr),Zo(e)&&ns(e);ka.clear()}function za(e){B(e,e.v+1)}function Ba(e,t){var n=e.reactions;if(n!==null)for(var r=Ni(),i=n.length,a=0;a<i;a++){var o=n[a],s=o.f;if(!(!r&&o===W)){if(N&&(s&br)!==0){ka.add(o);continue}var c=(s&mr)===0;if(c&&Gi(o,t),(s&ir)!==0){var l=o;Xi?.delete(l),(s&wr)===0&&(s&fr&&(o.f|=wr),Ba(l,hr))}else c&&((s&cr)!==0&&ia!==null&&ia.add(o),ca(o))}}}var Va=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Ha(e){if(typeof e!=`object`||!e||Or in e)return e;let t=$n(e);if(t!==Zn&&t!==Qn)return e;var n=new Map,r=P(e),i=Fa(0),a=N&&_i?Si(`created at`):null,o=Jo,s=e=>{if(Jo===o)return e();var t=U,n=Jo;Ro(null),Yo(o);var r=e();return Ro(t),Yo(n),r};r&&(n.set(`length`,Fa(e.length,a)),N&&(e=Ka(e)));var c=``;let l=!1;function u(e){if(!l){l=!0,c=e,bi(i,`${c} version`);for(let[e,t]of n)bi(t,Ua(c,e));l=!1}}return new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&qr();var i=n.get(t);return i===void 0?s(()=>{var e=Fa(r.value,a);return n.set(t,e),N&&typeof t==`string`&&bi(e,Ua(c,t)),e}):B(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>Fa(Hn,a));n.set(t,e),za(i),N&&bi(e,Ua(c,t))}}else B(r,Hn),za(i);return!0},get(t,r,i){if(r===Or)return e;if(N&&r===jr)return u;var o=n.get(r),l=r in t;if(o===void 0&&(!l||Yn(t,r)?.writable)&&(o=s(()=>{var e=Fa(Ha(l?t[r]:Hn),a);return N&&bi(e,Ua(c,r)),e}),n.set(r,o)),o!==void 0){var d=G(o);return d===Hn?void 0:d}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=G(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==Hn)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===Or)return!0;var r=n.get(t),i=r!==void 0&&r.v!==Hn||Reflect.has(e,t);return(r!==void 0||W!==null&&(!i||Yn(e,t)?.writable))&&(r===void 0&&(r=s(()=>{var n=Fa(i?Ha(e[t]):Hn,a);return N&&bi(n,Ua(c,t)),n}),n.set(t,r)),G(r)===Hn)?!1:i},set(e,t,o,l){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=o;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=s(()=>Fa(Hn,a)),n.set(f+``,p),N&&bi(p,Ua(c,f))):B(p,Hn)}if(u===void 0)(!d||Yn(e,t)?.writable)&&(u=s(()=>Fa(void 0,a)),N&&bi(u,Ua(c,t)),B(u,Ha(o)),n.set(t,u));else{d=u.v!==Hn;var m=s(()=>Ha(o));B(u,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(l,o),!d){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&B(g,_+1)}za(i)}return!0},ownKeys(e){G(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==Hn});for(var[r,a]of n)a.v!==Hn&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Jr()}})}function Ua(e,t){return typeof t==`symbol`?`${e}[Symbol(${t.description??``})]`:Va.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Wa(e){try{if(typeof e==`object`&&e&&Or in e)return e[Or]}catch{}return e}var Ga=new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);function Ka(e){return new Proxy(e,{get(e,t,n){var r=Reflect.get(e,t,n);return Ga.has(t)?function(...e){Na();var t=r.apply(this,e);return Ra(),t}:r}})}function qa(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:n,lastIndexOf:r,includes:i}=e;e.indexOf=function(e,t){let r=n.call(this,e,t);if(r===-1){for(let n=t??0;n<this.length;n+=1)if(Wa(this[n])===e){ri(`array.indexOf(...)`);break}}return r},e.lastIndexOf=function(e,t){let n=r.call(this,e,t??this.length-1);if(n===-1){for(let n=0;n<=(t??this.length-1);n+=1)if(Wa(this[n])===e){ri(`array.lastIndexOf(...)`);break}}return n},e.includes=function(e,t){let n=i.call(this,e,t);if(!n){for(let t=0;t<this.length;t+=1)if(Wa(this[t])===e){ri(`array.includes(...)`);break}}return n},Array.__svelte_cleanup=()=>{e.indexOf=n,e.lastIndexOf=r,e.includes=i}}var Ja,Ya,Xa,Za;function Qa(){if(Ja===void 0){Ja=window,document,Ya=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xa=Yn(t,`firstChild`).get,Za=Yn(t,`nextSibling`).get,er(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),er(n)&&(n.__t=void 0),N&&(e.__svelte_meta=null,qa())}}function $a(e=``){return document.createTextNode(e)}function eo(e){return Xa.call(e)}function to(e){return Za.call(e)}function V(e,t){if(!F)return eo(e);var n=eo(I);if(n===null)n=I.appendChild($a());else if(t&&n.nodeType!==Pr){var r=$a();return n?.before(r),si(r),r}return t&&ao(n),si(n),n}function no(e,t=!1){if(!F){var n=eo(e);return n instanceof Comment&&n.data===``?to(n):n}if(t){if(I?.nodeType!==Pr){var r=$a();return I?.before(r),si(r),r}ao(I)}return I}function H(e,t=1,n=!1){let r=F?I:e;for(var i;t--;)i=r,r=to(r);if(!F)return r;if(n){if(r?.nodeType!==Pr){var a=$a();return r===null?i?.after(a):r.before(a),si(a),a}ao(r)}return si(r),r}function ro(){return!hi||ia!==null?!1:(W.f&vr)!==0}function io(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??Wn,e,r)}function ao(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Pr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function oo(e){var t=U,n=W;Ro(null),zo(null);try{return e()}finally{Ro(t),zo(n)}}function so(e){W===null&&(U===null&&Vr(e),Br()),Fo&&zr(e)}function co(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function lo(e,t,n){var r=W;if(N)for(;r!==null&&(r.f&br)!==0;)r=r.parent;r!==null&&(r.f&gr)!==0&&(e|=gr);var i={ctx:R,deps:null,nodes:null,f:e|mr|fr,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(N&&(i.component_function=Di),n)try{ns(i)}catch(e){throw To(i),e}else t!==null&&ca(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&Sr)===0&&(a=a.first,(e&cr)!==0&&(e&yr)!==0&&a!==null&&(a.f|=yr)),a!==null&&(a.parent=r,r!==null&&co(a,r),U!==null&&(U.f&ir)!==0&&(e&ur)===0)){var o=U;(o.effects??=[]).push(a)}return i}function uo(){return U!==null&&!Lo}function fo(e){let t=lo(or,null,!1);return Gi(t,pr),t.teardown=e,t}function po(e){so(`$effect`),N&&Jn(e,`name`,{value:`$effect`});var t=W.f;if(!U&&(t&lr)!==0&&(t&vr)===0){var n=R;(n.e??=[]).push(e)}else return mo(e)}function mo(e){return lo(ar|Cr,e,!1)}function ho(e){ta.ensure();let t=lo(ur|Sr,e,!0);return(e={})=>new Promise(n=>{e.outro?Oo(t,()=>{To(t),n(void 0)}):(To(t),n(void 0))})}function go(e){return lo(ar,e,!1)}function _o(e){return lo(Er|Sr,e,!0)}function vo(e,t=0){return lo(or|t,e,!0)}function yo(e,t=[],n=[],r=[]){ma(r,t,n,t=>{lo(or,()=>e(...t.map(G)),!0)})}function bo(e,t=0){var n=lo(cr|t,e,!0);return N&&(n.dev_stack=Ti),n}function xo(e){return lo(lr|Sr,e,!0)}function So(e){var t=e.teardown;if(t!==null){let e=Fo,n=U;Io(!0),Ro(null);try{t.call(null)}finally{Io(e),Ro(n)}}}function Co(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&oo(()=>{e.abort(Mr)});var r=n.next;(n.f&ur)===0?To(n,t):n.parent=null,n=r}}function wo(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&lr)===0&&To(t),t=n}}function To(e,t=!0){var n=!1;(t||(e.f&xr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Eo(e.nodes.start,e.nodes.end),n=!0),Co(e,t&&!n),ts(e,0),Gi(e,_r);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();So(e);var i=e.parent;i!==null&&i.first!==null&&Do(e),N&&(e.component_function=null),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Eo(e,t){for(;e!==null;){var n=e===t?null:to(e);e.remove(),e=n}}function Do(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Oo(e,t,n=!0){var r=[];ko(e,r,!0);var i=()=>{n&&To(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function ko(e,t,n){if((e.f&gr)===0){e.f^=gr;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&yr)!==0||(i.f&lr)!==0&&(e.f&cr)!==0;ko(i,t,o?n:!1),i=a}}}function Ao(e){jo(e,!0)}function jo(e,t){if((e.f&gr)!==0){e.f^=gr,(e.f&pr)===0&&(Gi(e,mr),ca(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&yr)!==0||(n.f&lr)!==0;jo(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Mo(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:to(n);t.append(n),n=i}}var No=null,Po=!1,Fo=!1;function Io(e){Fo=e}var U=null,Lo=!1;function Ro(e){U=e}var W=null;function zo(e){W=e}var Bo=null;function Vo(e){U!==null&&(!hi||(U.f&ir)!==0)&&(Bo===null?Bo=[e]:Bo.push(e))}var Ho=null,Uo=0,Wo=null;function Go(e){Wo=e}var Ko=1,qo=0,Jo=qo;function Yo(e){Jo=e}function Xo(){return++Ko}function Zo(e){var t=e.f;if((t&mr)!==0)return!0;if(t&ir&&(e.f&=~wr),(t&hr)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Zo(a)&&Ea(a),a.wv>e.wv)return!0}(t&fr)!==0&&Xi===null&&Gi(e,pr)}return!1}function Qo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!hi&&Bo!==null&&Kn.call(Bo,e)))for(var i=0;i<r.length;i++){var a=r[i];(a.f&ir)===0?t===a&&(n?Gi(a,mr):(a.f&pr)!==0&&Gi(a,hr),ca(a)):Qo(a,t,!1)}}function $o(e){var t=Ho,n=Uo,r=Wo,i=U,a=Bo,o=R,s=Lo,c=Jo,l=e.f;Ho=null,Uo=0,Wo=null,U=(l&(lr|ur))===0?e:null,Bo=null,wi(e.ctx),Lo=!1,Jo=++qo,e.ac!==null&&(oo(()=>{e.ac.abort(Mr)}),e.ac=null);try{e.f|=Tr;var u=e.fn,d=u();e.f|=vr;var f=e.deps,p=z?.is_fork;if(Ho!==null){var m;if(p||ts(e,Uo),f!==null&&Uo>0)for(f.length=Uo+Ho.length,m=0;m<Ho.length;m++)f[Uo+m]=Ho[m];else e.deps=f=Ho;if(uo()&&(e.f&fr)!==0)for(m=Uo;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Uo<f.length&&(ts(e,Uo),f.length=Uo);if(Ni()&&Wo!==null&&!Lo&&f!==null&&(e.f&(ir|hr|mr))===0)for(m=0;m<Wo.length;m++)Qo(Wo[m],e);if(i!==null&&i!==e){if(qo++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=qo;if(t!==null)for(let e of t)e.rv=qo;Wo!==null&&(r===null?r=Wo:r.push(...Wo))}return(e.f&Dr)!==0&&(e.f^=Dr),d}catch(e){return Bi(e)}finally{e.f^=Tr,Ho=t,Uo=n,Wo=r,U=i,Bo=a,wi(o),Lo=s,Jo=c}}function es(e,t){let n=t.reactions;if(n!==null){var r=Gn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&ir)!==0&&(Ho===null||!Kn.call(Ho,t))){var a=t;(a.f&fr)!==0&&(a.f^=fr,a.f&=~wr),Ki(a),Da(a),ts(a,0)}}function ts(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)es(e,n[r])}function ns(e){var t=e.f;if((t&_r)===0){Gi(e,pr);var n=W,r=Po;if(W=e,Po=!0,N){var i=Di;Oi(e.component_function);var a=Ti;Ei(e.dev_stack??Ti)}try{(t&(cr|sr))===0?Co(e):wo(e),So(e);var o=$o(e);if(e.teardown=typeof o==`function`?o:null,e.wv=Ko,N&&_i&&(e.f&mr)!==0&&e.deps!==null)for(var s of e.deps)s.set_during_effect&&=(s.wv=Xo(),!1)}finally{Po=r,W=n,N&&(Oi(i),Ei(a))}}}function G(e){var t=(e.f&ir)!==0;if(No?.add(e),U!==null&&!Lo&&!(W!==null&&(W.f&_r)!==0)&&(Bo===null||!Kn.call(Bo,e))){var n=U.deps;if((U.f&Tr)!==0)e.rv<qo&&(e.rv=qo,Ho===null&&n!==null&&n[Uo]===e?Uo++:Ho===null?Ho=[e]:Ho.push(e));else{(U.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[U]:Kn.call(r,U)||r.push(U)}}if(N&&(_a.delete(e),_i&&!Lo&&yi!==null&&U!==null&&yi.reaction===U))if(e.trace)e.trace();else{var i=Si(`traced at`);if(i){var a=yi.entries.get(e);a===void 0&&(a={traces:[]},yi.entries.set(e,a));var o=a.traces[a.traces.length-1];i.stack!==o?.stack&&a.traces.push(i)}}if(Fo&&Aa.has(e))return Aa.get(e);if(t){var s=e;if(Fo){var c=s.v;return((s.f&pr)===0&&s.reactions!==null||is(s))&&(c=Ta(s)),Aa.set(s,c),c}var l=(s.f&fr)===0&&!Lo&&U!==null&&(Po||(U.f&fr)!==0),u=(s.f&vr)===0;Zo(s)&&(l&&(s.f|=fr),Ea(s)),l&&!u&&(Oa(s),rs(s))}if(Xi?.has(e))return Xi.get(e);if((e.f&Dr)!==0)throw e.v;return e.v}function rs(e){if(e.f|=fr,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),(t.f&ir)!==0&&(t.f&fr)===0&&(Oa(t),rs(t))}function is(e){if(e.v===Hn)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Aa.has(t)||(t.f&ir)!==0&&is(t))return!0;return!1}function as(e){var t=Lo;try{return Lo=!0,e()}finally{Lo=t}}var os=Symbol(`events`),ss=new Set,cs=new Set;function ls(e,t,n){(t[os]??={})[e]=n}function us(e){for(var t=0;t<e.length;t++)ss.add(e[t]);for(var n of cs)n(e)}var ds=null;function fs(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ds=e;var o=0,s=ds===e&&e[os];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[os]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){Jn(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=U,d=W;Ro(null),zo(null);try{for(var f,p=[];a!==null;){var m=a.assignedSlot||a.parentNode||a.host||null;try{var h=a[os]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble||m===t||m===null)break;a=m}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[os]=t,delete e.currentTarget,Ro(u),zo(d)}}}var ps=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ms(e){return ps?.createHTML(e)??e}function hs(e,t=!1){var n=io(`template`);return e=e.replaceAll(`<!>`,`<!---->`),n.innerHTML=t?ms(e):e,n.content}function gs(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var n=(t&In)!==0,r=(t&Ln)!==0,i,a=!e.startsWith(`<!>`);return()=>{if(F)return gs(I,null),I;i===void 0&&(i=hs(a?e:`<!>`+e,!0),n||(i=eo(i)));var t=r||Ya?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=eo(t),s=t.lastChild;gs(o,s)}else gs(t,t);return t}}function _s(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&In)!==0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(F)return gs(I,null),I;if(!o){var e=eo(hs(a,!0));if(i)for(o=document.createDocumentFragment();eo(e);)o.appendChild(eo(e));else o=eo(e)}var t=o.cloneNode(!0);if(i){var n=eo(t),r=t.lastChild;gs(n,r)}else gs(t,t);return t}}function vs(e,t){return _s(e,t,`svg`)}function ys(){if(F)return gs(I,null),I;var e=document.createDocumentFragment(),t=document.createComment(``),n=$a();return e.append(t,n),gs(t,n),e}function q(e,t){if(F){var n=W;((n.f&vr)===0||n.nodes.end===null)&&(n.nodes.end=I),ci();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var bs=[`touchstart`,`touchmove`];function xs(e){return bs.includes(e)}function Ss(e,t){var n=t==null?``:typeof t==`object`?t+``:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+``)}function Cs(e,t){return Ts(e,t)}var ws=new Map;function Ts(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0}){Qa();var s=void 0,c=ho(()=>{var o=n??t.appendChild($a());fa(o,{pending:()=>{}},t=>{ji({});var n=R;if(a&&(n.c=a),i&&(r.$$events=i),F&&gs(t,null),s=e(t,r)||{},F&&(W.nodes.end=I,I===null||I.nodeType!==Fr||I.data!==Bn))throw ti(),Vn;Mi()});var c=new Set,l=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!c.has(r)){c.add(r);var i=xs(r);for(let e of[t,document]){var a=ws.get(e);a===void 0&&(a=new Map,ws.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,fs,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return l(qn(ss)),cs.add(l),()=>{for(var e of c)for(let n of[t,document]){var r=ws.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,fs),r.delete(e),r.size===0&&ws.delete(n)):r.set(e,i)}cs.delete(l),o!==n&&o.parentNode?.removeChild(o)}});return Es.set(s,c),s}var Es=new WeakMap;function Ds(e,t){let n=Es.get(e);return n?(Es.delete(e),n(t)):(N&&(Or in e?ii():ni()),Promise.resolve())}class Os{anchor;#batches=new Map;#onscreen=new Map;#offscreen=new Map;#outroing=new Set;#transition=!0;constructor(e,t=!0){this.anchor=e,this.#transition=t}#commit=()=>{var e=z;if(this.#batches.has(e)){var t=this.#batches.get(e),n=this.#onscreen.get(t);if(n)Ao(n),this.#outroing.delete(t);else{var r=this.#offscreen.get(t);r&&(this.#onscreen.set(t,r.effect),this.#offscreen.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#batches){if(this.#batches.delete(t),t===e)break;let r=this.#offscreen.get(n);r&&(To(r.effect),this.#offscreen.delete(n))}for(let[e,r]of this.#onscreen){if(e===t||this.#outroing.has(e))continue;let i=()=>{if(Array.from(this.#batches.values()).includes(e)){var t=document.createDocumentFragment();Mo(r,t),t.append($a()),this.#offscreen.set(e,{effect:r,fragment:t})}else To(r);this.#outroing.delete(e),this.#onscreen.delete(e)};this.#transition||!n?(this.#outroing.add(e),Oo(r,i,!1)):i()}}};#discard=e=>{this.#batches.delete(e);let t=Array.from(this.#batches.values());for(let[e,n]of this.#offscreen)t.includes(e)||(To(n.effect),this.#offscreen.delete(e))};ensure(e,t){var n=z,r=ro();if(t&&!this.#onscreen.has(e)&&!this.#offscreen.has(e))if(r){var i=document.createDocumentFragment(),a=$a();i.append(a),this.#offscreen.set(e,{effect:xo(()=>t(a)),fragment:i})}else this.#onscreen.set(e,xo(()=>t(this.anchor)));if(this.#batches.set(n,e),r){for(let[t,r]of this.#onscreen)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#offscreen)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#commit),n.ondiscard(this.#discard)}else F&&(this.anchor=I),this.#commit()}}function ks(e,t,...n){var r=new Os(e);bo(()=>{let e=t()??null;N&&e==null&&Ur(),r.ensure(e,e&&(t=>e(t,...n)))},yr)}if(N){let e=function(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(t!==void 0)return t;Gr(e)},set:e=>{t=e}})}};e(`$state`),e(`$effect`),e(`$derived`),e(`$inspect`),e(`$props`),e(`$bindable`)}function As(e){R===null&&Ir(`onMount`),gi&&R.l!==null?js(R).m.push(e):po(()=>{let t=as(e);if(typeof t==`function`)return t})}function js(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var Ms=new Map;function Ns(e,t){var n=Ms.get(e);n||(n=new Set,Ms.set(e,n)),n.add(t)}function Ps(e,t,n=!1){F&&ci();var r=new Os(e),i=n?yr:0;function a(t,n){if(F){let a=di(e);if(t!==(a===Rn?0:a===zn?!1:parseInt(a.substring(1)))){var i=ui();si(i),r.anchor=i,oi(!1),r.ensure(t,n),oi(!0);return}}r.ensure(t,n)}bo(()=>{var e=!1;t((t,n=0)=>{e=!0,a(n,t)}),e||a(!1,null)},i)}var Fs=Symbol(`NaN`);function Is(e,t,n){F&&ci();var r=new Os(e),i=!Ni();bo(()=>{var e=t();e!==e&&(e=Fs),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function Ls(e,t){go(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=io(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e),N&&Ns(t.hash,e)}})}var Rs=[...`
46
+ \r\f\xA0\v`];function zs(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i in n)if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Rs.includes(r[o-1]))&&(s===r.length||Rs.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Bs(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i in e){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Vs(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Hs(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Vs)),i&&c.push(...Object.keys(i).map(Vs));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Vs(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Bs(r)),i&&(n+=Bs(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Us(e,t,n,r,i,a){var o=e.__className;if(F||o!==n||o===void 0){var s=zs(n,r,a);(!F||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Ws(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Gs(e,t,n,r){var i=e.__style;if(F||i!==t){var a=Hs(t,r);(!F||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Ws(e,n?.[0],r[0]),Ws(e,n?.[1],r[1],`important`)):Ws(e,n,r));return r}var Ks=Symbol(`is custom element`),qs=Symbol(`is html`),Js=Nr?`link`:`LINK`;function Ys(e,t,n,r){var i=Xs(e);if(F&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Js)){r||$s(e,t,n??``);return}i[t]!==(i[t]=n)&&(t===`loading`&&(e[Ar]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Qs(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Xs(e){return e.__attributes??={[Ks]:e.nodeName.includes(`-`),[qs]:e.namespaceURI===Wn}}var Zs=new Map;function Qs(e){var t=e.getAttribute(`is`)||e.nodeName,n=Zs.get(t);if(n)return n;Zs.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=Xn(i),r)r[o].set&&n.push(o);i=$n(i)}return n}function $s(e,t,n){N&&(t===`srcset`&&nc(e,n)||ec(e.getAttribute(t)??``,n)||ei(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&`...`),String(n)))}function ec(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function tc(e){return e.split(`,`).map(e=>e.trim().split(` `).filter(Boolean))}function nc(e,t){var n=tc(e.srcset),r=tc(t);return r.length===n.length&&r.every(([e,t],r)=>t===n[r][1]&&(ec(n[r][0],e)||ec(e,n[r][0])))}class rc{#listeners=new WeakMap;#observer;#options;static entries=new WeakMap;constructor(e){this.#options=e}observe(e,t){var n=this.#listeners.get(e)||new Set;return n.add(t),this.#listeners.set(e,n),this.#getObserver().observe(e,this.#options),()=>{var n=this.#listeners.get(e);n.delete(t),n.size===0&&(this.#listeners.delete(e),this.#observer.unobserve(e))}}#getObserver(){return this.#observer??=new ResizeObserver(e=>{for(var t of e){rc.entries.set(t.target,t);for(var n of this.#listeners.get(t.target)||[])n(t)}})}}function ic(e,t){return e===t||e?.[Or]===t}function ac(e={},t,n,r){return go(()=>{var i,a;return vo(()=>{i=a,a=r?.()||[],as(()=>{e!==n(...a)&&(t(e,...a),i&&ic(n(...i),e)&&t(null,...i))})}),()=>{Ri(()=>{a&&ic(n(...a),e)&&t(null,...a)})}}),e}function oc(e,t,n){if(e==null)return t(void 0),n&&n(void 0),tr;let r=as(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}var sc=[];function cc(e,t){return{subscribe:J(e,t).subscribe}}function J(e,t=tr){let n=null,r=new Set;function i(t){if(pi(e,t)&&(e=t,n)){let t=!sc.length;for(let t of r)t[1](),sc.push(t,e);if(t){for(let e=0;e<sc.length;e+=2)sc[e][0](sc[e+1]);sc.length=0}}}function a(t){i(t(e))}function o(o,s=tr){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||tr),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function lc(e,t,n){let r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw Error(`derived() expects stores as input, got a falsy value`);let a=t.length<2;return cc(n,(e,n)=>{let o=!1,s=[],c=0,l=tr,u=()=>{if(c)return;l();let i=t(r?s[0]:s,e,n);a?e(i):l=typeof i==`function`?i:tr},d=i.map((e,t)=>oc(e,e=>{s[t]=e,c&=~(1<<t),o&&u()},()=>{c|=1<<t}));return o=!0,u(),function(){nr(d),l(),o=!1}})}function Y(e){let t;return oc(e,e=>t=e)(),t}var uc=!1,dc=Symbol();function fc(e,t,n){let r=n[t]??={store:null,source:Ia(void 0),unsubscribe:tr};if(N&&(r.source.label=t),r.store!==e&&!(dc in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=tr;else{var i=!0;r.unsubscribe=oc(e,e=>{i?r.source.v=e:B(r.source,e)}),i=!1}return e&&dc in n?Y(e):G(r.source)}function pc(){let e={};function t(){fo(()=>{for(var t in e)e[t].unsubscribe();Jn(e,dc,{enumerable:!1,value:!0})})}return[e,t]}function mc(e){var t=uc;try{return uc=!1,[e(),uc]}finally{uc=t}}function X(e,t,n,r){var i=!gi||(n&Mn)!==0,a=(n&Pn)!==0,o=(n&Fn)!==0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?as(r):r),s),u;if(a){var d=Or in e||kr in e;u=Yn(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=mc(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&Wr(t),u(f)));var m=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&(n&Nn)===0)return m;if(u){var h=e.$$legacy;return function(e,t){return arguments.length>0?((!i||!t||h||p)&&u(t?m():e),e):m()}}var g=!1,_=((n&jn)===0?xa:va)(()=>(g=!1,m()));N&&(_.label=t),a&&G(_);var v=W;return function(e,t){if(arguments.length>0){let n=t?G(_):i&&a?Ha(e):e;return B(_,n),g=!0,s!==void 0&&(s=n),e}return Fo&&g||(v.f&_r)!==0?_.v:G(_)}}var hc=`5`;typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(hc);import{areValidLiveRecordSources as gc}from"@vkontakte/videoplayer-core";import{safeStorage as _c}from"@vkontakte/videoplayer-shared";import{SeekAction as vc}from"@vkontakte/videoplayer-statistics";import{InterfaceLanguage as yc,fillWithDefault as bc,VideoQuality as xc}from"@vkontakte/videoplayer-shared";var Sc={debugLog:!1,devNullLog:!1,defaultLanguage:yc.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:xc.Q_480P,highQualityLimit:xc.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`},Cc=e=>bc(e,Sc),wc=e=>Ai(`ui-config`,e),Tc=()=>ki(`ui-config`),Ec=`vk_player_debug_panel_opened`,Dc=`videoplayer`,Oc=`videoplayer`,kc=c(Ue(),1),{NativeAbortSignal:Ac,NativeAbortController:jc}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function Mc(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function Nc(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,`name`,{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class Pc{constructor(){Object.defineProperty(this,`listeners`,{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class Fc extends Pc{constructor(){super(),this.listeners||Pc.call(this),Object.defineProperty(this,`aborted`,{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,`onabort`,{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,`reason`,{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Ic;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Ic;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Ic{constructor(){Object.defineProperty(this,`signal`,{value:new Fc,writable:!0,configurable:!0})}abort(e){let t=Nc(e),n=Mc(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Ic.prototype[Symbol.toStringTag]=`AbortController`,Fc.prototype[Symbol.toStringTag]=`AbortSignal`);function Lc(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log(`__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill`),!0):typeof e.Request==`function`&&!e.Request.prototype.hasOwnProperty(`signal`)||!e.AbortController}function Rc(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Lc({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,`signal`,{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var zc=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,Bc=`fetch`in zc&&Lc({fetch:zc.fetch,Request:zc.Request,AbortController:zc.AbortController}),Vc=Bc?Rc({fetch:zc.fetch,Request:zc.Request,AbortController:zc.AbortController}):void 0,Hc=Bc?Vc.fetch:zc.fetch;Bc?Vc.Request:zc.Request;var Uc=Bc?Ic:zc.AbortController;Bc||zc.AbortSignal;import{assertNonNullable as Wc,VERSION as Gc}from"@vkontakte/videoplayer-shared";import{VERSION as Kc}from"@vkontakte/videoplayer-core";import{VERSION as qc}from"@vkontakte/videoplayer-statistics";var Jc=`prod`,Yc=`1.0.4-dev.7be47b47.0`,Xc=(e,t,n)=>{let r=document.createElement(`a`);r.href=e,r.download=`${t}.${n}`,r.style.display=`none`,r.click()},Zc=Symbol(`storeContext`),Qc=e=>{Ai(Zc,e),Jc===`dev`&&(window.app={store:e})},$c=()=>{let e=ki(Zc);return Wc(e,`Store context is empty!`),e},Z=(e,t)=>el(e,e.getValue(),t),el=(e,t,n)=>cc(t,t=>{let r=e.subscribe(e=>{t(e),n?.(e)});return()=>r.unsubscribe()}),tl=(e,t,n,r,i=[`meta config not provided`])=>{let a=e.info,{width:o,height:s}=Y(n.ui.playerSize),c=a.throughputEstimation$.getValue()?.toFixed(0)??0,l=a.rttEstimation$.getValue()?.toFixed(0)??0,u=a.isAutoQualityEnabled$.getValue()?`auto`:`manual`,d=`${Yc} (core: ${Kc}, stat: ${qc}, shared: ${Gc})`,f=Y(n.state.errorLog$),p=f.length?`
47
+ `+f.map((e,t)=>{let n=`${t}) Type: ${e.id}
48
+ `,r=`Message: ${e.message} (${e.thrown})
49
+ `,i=`Trace: ${e.thrown?.stack}
50
+ `;return n+r+i}).join(`
51
+ `):void 0,m=n.state.isAudioDisabled?`disabled`:Y(n.state.isAudioAvailable$)?void 0:`unavailable`,h=e.info.currentVideoStream$.getValue(),g=e.info.currentAudioStream$.getValue(),_=[];h&&_.push(`Video: ${h?.codec??``}`+(h?.hdr?` (HDR)`:``)),g&&_.push(`Audio: ${g?.codec??``}`+(g?.language?` (${g.language})`:``));let v=a.currentQuality$.getValue(),y=``;if(v){let e=a.availableQualitiesFps$.getValue()[v];y=e?`${e}fps`:``}let b=a.httpConnectionType$.getValue(),x=a.currentBuffer$.getValue()?.end??0,S=Math.max(x-Y(n.state.positionExact$),0),C={Version:d,Browser:navigator.userAgent,Config:i.join(`, `),"United video id":String(n.videoId),TraceId:r,VSID:Y(n.vsid),"Content host":a.hostname$.getValue(),"Connection type":b?b+(a.httpConnectionReused$.getValue()?` (reused)`:``):``,Throughput:`${c}Kbps @ ${l}ms RTT`,Format:a.currentFormat$.getValue(),"Available Formats":t?.sources?Object.keys(t.sources).join(`, `):``,Streams:_.join(`, `),Quality:`${u} ${v??``} ${y}`,"Available qualities":a.availableQualities$.getValue().join(`, `),Audio:m,Position:`${Y(n.state.positionExact$)}s`,Buffer:`${S}s`,State:`${Y(n.playerPhase)} ${a.playbackState$.getValue()??``}`,"Player size":`${o}x${s}`,URL:window.location.href,Errors:p};return kc.default(C).filter(([e,t])=>t!==void 0).map(([e,t])=>`${e}: ${t}`).join(`
52
+ `)},nl=(e,t,n)=>{let r=e.info,{width:i,height:a}=Y(n.ui.playerSize),o={version:Yc,viewport:`${i}x${a}`,volume:Math.round(Y(n.state.volume$)*100)};o.id=n.videoId,r.currentFormat$.getValue()&&(o.provider=r.currentFormat$.getValue()),r.hostname$.getValue()&&(o.cdn=r.hostname$.getValue());let s=r.intrinsicVideoSize$.getValue();s&&(o.videoSize=`${s.width}x${s.height}`);let c=r.currentBuffer$.getValue(),l=r.currentNativeBuffer$.getValue(),u=r.isLive$.getValue(),d=r.liveBufferTime$.getValue();c&&l&&(u&&d?(o.buffer=c.end-d,o.nativeBuffer=l.end-d):(o.buffer=Math.max(c.end-Y(n.state.positionExact$),0),o.nativeBuffer=Math.max(l.end-Y(n.state.positionExact$),0))),o.position=Y(n.state.positionExact$);let f=r.throughputEstimation$.getValue();f&&(o.speed=f);let p=r.videoBitrate$.getValue();p&&(o.bitrate=p);let m=r.liveLatency$.getValue();m&&(o.liveLatency=m);let h=r.currentVideoSegmentLength$.getValue();h&&(o.currentVideoSegmentLength=h);let g=r.currentAudioSegmentLength$.getValue();g&&(o.currentAudioSegmentLength=g);let _=Y(n.vsid);typeof _==`string`&&(o.vsid=_);let v=e.info.currentVideoStream$.getValue()?.codec;v&&(o.videoCodec=v);let y=e.info.currentAudioStream$.getValue()?.codec;y&&(o.audioCodec=y),e.info.currentVideoStream$.getValue()?.hdr&&(o.hdr=!0);let b=e.info.currentAudioStream$.getValue()?.language;return b&&(o.audioLanguage=b),o},rl=(e,t)=>Xc(e,t,`mp4`),il=()=>{let e=[],t=0;return{add:(n,r)=>{e[t]=[n,r],t=(t+1)%10},find:t=>e.find(([e])=>e===t)}};class al{destroyController=new Uc;pendingDownloads=new Set;async download(e){if(this.pendingDownloads.has(e))return null;this.pendingDownloads.add(e);try{let t=await Hc(e,{signal:this.destroyController.signal});if(t.ok)return await t.text();throw t}finally{this.pendingDownloads.delete(e)}}destroy(){this.destroyController.abort(),this.pendingDownloads.clear()}isDestroyed(){return this.destroyController.signal.aborted}}c(Ue(),1),c(qe(),1),c(Dt(),1);import{isNullable as ol,safeStorage as sl}from"@vkontakte/videoplayer-shared";var cl=`vk_player_`,ll=`vk_player_prefer_traffic_saving_enabled`,ul=`vk_player_preferred_volume`,dl=`vk_player_prefer_volume_mute`,fl=`vk_player_preferred_quality`,pl=`vk_player_preferred_default_quality_settings`,ml=`vk_player_preferred_quality_settings_by_video`,hl=`vk_player_preferred_stream_language`,gl=`vk_player_preferred_rate`,_l=`vk_player_preferred_subtitles_language`,vl=`vk_player_user_video_prefs`;`${cl}`;var yl=e=>e>1?1:e<0?0:e,bl=()=>{let e=sl.get(ul);return ol(e)?void 0:yl(parseFloat(e))},xl=(e,t)=>sl.set(fl,JSON.stringify({videoId:e,value:t})),Sl=()=>sl.remove(fl),Cl=e=>{let t=sl.get(fl);if(ol(t))return;let{videoId:n,value:r}=JSON.parse(t);if(e!==n){Sl();return}return r},wl=(e,t)=>{t?sl.set(e,`true`):sl.remove(e)},Tl=e=>sl.get(e)===`true`,El=()=>Tl(dl),Dl=e=>wl(ll,e),Ol=()=>Tl(ll),kl=()=>sl.get(hl),Al=e=>sl.set(hl,e),jl=()=>sl.get(_l),Ml=e=>{e?sl.set(_l,e):sl.remove(_l)},Nl=e=>sl.set(gl,JSON.stringify({rate:e})),Pl=()=>{let e=sl.get(gl);if(ol(e))return;let{rate:t}=JSON.parse(e);return t},Fl=(()=>{let e=e=>{sl.set(pl,JSON.stringify(e))},t=()=>{try{let e=sl.get(pl);return e?JSON.parse(e):null}catch{return null}},n=()=>{try{let e=sl.get(ml);return e?JSON.parse(e):null}catch{return null}},r=e=>{sl.set(ml,JSON.stringify(e))},i=r=>{l(r);let i=r?n():null;if(i&&i?.videoId===r)return{...i,appliesTo:`to-video`};i&&a();let o=t();return o?{...o,appliesTo:`as-default`}:(e({type:`auto_quality`}),{type:`auto_quality`,appliesTo:`as-default`})},a=()=>{sl.remove(ml)},o=()=>{sl.remove(pl)},s=(t,n=`as-default`)=>{t.type===`exact_quality`||n===`to-video`?r(t):e(t)},c=e=>{let t=i(e);if(t){switch(t.type){case`traffic_saving`:Dl(!0);break;case`exact_quality`:xl(e,t.quality)}a(),o()}},l=t=>{let n=Cl(t);if(n){r({type:`exact_quality`,videoId:t,quality:n});return}Ol()&&e({type:`traffic_saving`,videoId:t}),Dl(!1),Sl()};return{getPreferredQualitySettings:i,migrateSettingsToLegacyWay:c,savePreferredQualitySettings:s,savePreferredDefaultQualitySettings:e,removePreferredQualitySettingsByVideo:a,getPreferredDefaultQualitySettings:t,getPreferredSubtitlesLanguage:jl,savePreferredSubtitlesLanguage:Ml}})();Fl.getPreferredQualitySettings;var Il=Fl.migrateSettingsToLegacyWay;Fl.savePreferredQualitySettings,Fl.savePreferredDefaultQualitySettings,Fl.removePreferredQualitySettingsByVideo,Fl.getPreferredDefaultQualitySettings;var Ll=()=>{let e=sl.get(vl);if(e)try{return JSON.parse(e)}catch{return null}return null},Rl=(e,t)=>Ll()?.[e]?.[t]??null;class zl{value;next;constructor(e){this.value=e,this.next=null}}class Bl{top;bottom;size;maxSize;constructor(e){this.top=null,this.bottom=null,this.size=0,this.maxSize=e}push(e){let t=new zl(e);this.top?(this.top.next=t,this.top=t):(this.top=t,this.bottom=t),this.size++,this.size>this.maxSize&&this.bottom&&(this.bottom=this.bottom.next)}getValuesFromBottom(){let e=[],t=this.bottom;for(;t;)e.push(t.value),t=t.next;return e}}var Vl=K(`<div class="container s-8"><canvas class="s-8"></canvas></div>`),Hl={hash:`s-8`,code:`.container.s-8 {display:inline-block;width:120px;height:16px;}canvas.s-8 {transform:scale(1, -1);margin-top:2px;}`};function Ul(e,t){ji(t,!0),Ls(e,Hl);let n=X(t,`values`,19,()=>[]),r=Fa(void 0),i=Fa(null);As(()=>{G(r).width=120,G(r).height=16,B(i,G(r).getContext(`2d`),!0)});function a(e,t,n,r,i){i===0&&(i=1),e.fillStyle=`#fff`,e.fillRect(t,n,r,i)}po(()=>{let e=``;if(G(i)){let t=n()[0];for(let e=1;e<n().length;e++)n()[e]>t&&(t=n()[e]);G(i).clearRect(0,0,120,16);let r=59;for(let o=n().length-1;o>=0;o--){let s=r*2,c=t>0?16*(n()[o]/t):0;a(G(i),s,0,2,c),e=c+` `+e,r--}}});var o=Vl();ac(V(o),e=>B(r,e),()=>G(r)),L(o),q(e,o),Mi()}import{safeStorage as Wl}from"@vkontakte/videoplayer-shared";var Gl=c(qe(),1),Kl=c(Rt(),1);import{isNullable as ql,InterfaceLanguage as Jl}from"@vkontakte/videoplayer-shared";var Yl={auto_quality_invariant:`Авто`,auto_quality:`Авто ({actual})`,auto_quality_option:`Авто`,other_quality:`Другое`,high_quality:`Высокое качество`,high_quality_description:`Будет использовано больше трафика`,auto_quality_limit:`Автоматически`,traffic_saving_quality:`Экономия трафика`,traffic_saving_quality_description:`Видео грузятся быстрее, но качество ниже`,default_quality_for_any_video:`Качество для всех видео`,quality_applience:`Качество по умолчанию можно\xA0{action}`,quality_applience_action:`изменить`,menu_quality:`Качество`,menu_traffic_saving:`Экономия данных`,menu_playback_rate:`Скорость`,menu_report:`Сообщить о проблеме`,menu_pip:`Картинка в картинке`,menu_pip_close:`Развернуть видео`,menu_copy_video_link:`Скопировать ссылку на видео`,menu_copy_video_link_with_timestamp:`Скопировать ссылку на кадр`,menu_video_rotate:`Повернуть`,menu_video_loop_on:`Включить повторение`,menu_video_loop_off:`Отключить повторение`,menu_chromecast:`Chromecast трансляция`,menu_copy_debug:`Копировать данные для диагностики`,menu_save_debug:`Сохранить данные для диагностики`,menu_debug_overlay:`Техническая информация`,menu_copy_embed_code:`Копировать код для встраивания`,menu_audio_languages:`Звуковая дорожка`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Дорожка {index}`,pip_dummy_title:`Видео воспроизводится в режиме картинка в картинке`,submenu_quality:`Качество`,submenu_playback_rate:`Скорость`,submenu_settings:`Настройки`,submenu_traffic_saving:`Экономия данных`,submenu_audio_languages:`Звуковая дорожка`,playing_ads:`Реклама {timeleft}`,skip_ads_now:`Пропустить рекламу`,skip_ads_after:`Пропустить {time}с`,visit_advertiser:`Перейти на сайт`,aria_timeline:`Ползунок временной шкалы`,aria_timeline_value:`{position} (общая длительность {duration}`,doubletap_seek_step:`{seconds} секунд`,playback_rate_1:`Обычная`,playback_rate:`{multiplier}x`,video360:`панорамное видео`,subtitles_caption:`Субтитры`,subtitles_auto:`{language} (Автоматические)`,subtitles_off:`Выкл.`,subtitles_auto_caption:`Автоматические субтитры`,subtitles_turn_on:`Включить субтитры`,subtitles_turn_off:`Выключить субтитры`,traffic_saving_off:`Откл.`,traffic_saving_on:`Вкл.`,traffic_saving_helper_text:`При включении качество видео будет снижено для экономии трафика`,tooltip_button_disabled:`Кнопка недоступна`,tooltip_previous:`Предыдущее видео`,tooltip_restart:`Начать заново`,tooltip_play:`Смотреть`,tooltip_pause:`Пауза`,tooltip_next:`Следующее видео`,tooltip_interactive_go_back:`Вернуться к предыдущей главе`,tooltip_interactive_go_back_disabled:`История прохождения недоступна`,tooltip_interactive_go_back_disabled_first:`Вы смотрите первую главу`,tooltip_interactive_go_back_disabled_limit:`Лимит возвратов исчерпан`,tooltip_chapter_without_interactive:`В этой главе нет интерактива`,tooltip_interactive_of_chapter_completed:`Интерактивы этой главы уже пройдены`,tooltip_interactive_seek:`Перейти к интерактиву`,tooltip_interactive_graph_off:`Показать карту сюжета`,tooltip_interactive_graph_on:`Скрыть карту сюжета`,tooltip_live:`Перемотать на актуальный лайв`,tooltip_episodes:`Эпизоды`,tooltip_volume:`Включить звук`,tooltip_volume_muted:`Выключить звук`,tooltip_sound_unavailable:`Звук недоступен`,tooltip_subtitles_off:`Включить субтитры`,tooltip_subtitles_on:`Выключить субтитры`,tooltip_settings_off:`Открыть настройки`,tooltip_settings_on:`Закрыть настройки`,tooltip_fullscreen_off:`На весь экран`,tooltip_fullscreen_on:`Выйти из полноэкранного режима`,tooltip_chromecast_off:`Включить Chromecast`,tooltip_chromecast_on:`Выключить Chromecast`,tooltip_episode_finished:`Вы уже сделали свой выбор`,tooltip_episode_unfinished:`Не пройдено`,tooltip_disabled_when_interactive:`Интерактив уже идёт`,tooltip_disabled_when_graph_on:`Кнопка недоступна во время просмотра карты`,tooltip_interactive_interaction_time_indicator:`Нажмите на элемент интерактива`,tooltip_vk_logo:`Открыть в VK Видео`,tooltip_vk_video_logo:`Перейти в VK Видео`,tooltip_autoplay_off:`Включить автовоспроизведение`,tooltip_autoplay_on:`Отключить автовоспроизведение`,tooltip_context_menu_open:`Открыть контекстное меню`,tooltip_context_menu_close:`Закрыть контекстное меню`,download_video_caption:`Скачать видео`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Быстрые клавиши`,hotkey_map_modal_close_btn_text:`Закрыть`,hotkey_map_group_title_common:`Общие`,hotkey_map_group_title_playback:`Воспроизведение`,hotkey_map_group_title_subtitles:`Субтитры`,hotkey_map_group_title_episodes:`Эпизоды`,hotkey_map_item_mute_description:`Включить или отключить звук`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Увеличить громкость`,hotkey_map_item_volume_up_value:`Стрелка вверх`,hotkey_map_item_volume_down_description:`Уменьшить громкость`,hotkey_map_item_volume_down_value:`Стрелка вниз`,hotkey_map_item_pip_description:`Свернуть или развернуть мини-проигрыватель`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Включить или выключить полноэкранный режим`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Скрыть или показать контекстное меню`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Скрыть или показать список горячих клавиш`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Приостановить или продолжить воспроизведение`,hotkey_map_item_play_toggle_value:`Пробел (или k)`,hotkey_map_item_seek_backward_description:`Перемотать ролик на 10 секунд назад`,hotkey_map_item_seek_backward_value:`Стрелка влево (или j)`,hotkey_map_item_seek_forward_description:`Перемотать ролик на 10 секунд вперёд`,hotkey_map_item_seek_forward_value:`Стрелка вправо (или l)`,hotkey_map_item_fast_seek_backward_description:`Ускоренная перемотка назад`,hotkey_map_item_fast_seek_backward_value:`Shift + Стрелка влево`,hotkey_map_item_fast_seek_forward_description:`Ускоренная перемотка вперёд`,hotkey_map_item_fast_seek_forward_value:`Shift + Стрелка вправо`,hotkey_map_item_rate_down_description:`Уменьшить скорость воспроизведения`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Увеличить скорость воспроизведения`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Перейти к предыдущему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Перейти к следующему кадру <br />(когда воспроизведение приостановлено)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Перейти к определённому моменту видео <br />(например, при нажатии на цифру «7» ролик будет перемотан до временной отметки, которая соответствует 70% от длительности видео)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Включить или отключить субтитры`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Перейти к предыдущему эпизоду`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Стрелка влево`,hotkey_map_item_prev_episode_mac_value:`Option + Стрелка влево`,hotkey_map_item_next_episode_description:`Перейти к следующему эпизоду`,hotkey_map_item_next_episode_pc_value:`Ctrl + Стрелка вправо`,hotkey_map_item_next_episode_mac_value:`Option + Стрелка вправо`,hotkey_map_item_next_video_description:`Перейти к следующему видео`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Перейти к предыдущему видео`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`дн`,waiting_live_hour_value:`ч`,waiting_live_minute_value:`мин`,waiting_live_second_value:`сек`,waiting_live_colon:`:`,waiting_live_upcoming_title:`Трансляция еще не началась`,waiting_live_timer_title:`До начала трансляции осталось`,waiting_live_recover_title:`Трансляция приостановлена - она продолжится, когда автор вернётся`,waiting_record_title:`Трансляция завершена - запись появится позже`,aria_label_video_player:`Видео плеер`,aria_label_spherical_control:`Контроллер для сферического видео. Используйте клавиши со стрелками для панорамирования видео.`,aria_label_debug_panel:`Область с технической информацией, сделайте скриншот для техподдержки`,aria_label_new_tab_alert:`Откроется в новой вкладке.`,aria_label_menu_quality:`Качество: {actual}`,aria_label_menu_audio_languages:`Язык аудио: {actual}`,aria_label_menu_rate:`Скорость: {actual}`,aria_label_menu_subtitle:`Субтитры: {actual}`,aria_label_menu_download:`Скачать видео`,aria_label_menu_debug_overlay:`Отображение технической информации`,aria_label_menu_rotate:`Повернуть видео на 90 градусов`,aria_label_menu_loop:`Переключение режима повторения`,aria_label_submenu_back:`Вернуться в меню настроек`,aria_label_submenu_traffic_saving:`Режим экономии данных`,aria_label_settings:`Настройки`,aria_label_context_menu:`Контекстное меню`,aria_label_autoplay:`Автовоспроизведение`,end_screen_next_video:`Следующее видео`,end_screen_recommended_video:`Рекомендуемое видео`,slow_video_notification_button:`Выбрать качество «Авто»`,slow_video_notification_force_description:`Видео грузится слишком медленно,
53
+ качество изменено на\xA0«Авто»`,slow_video_notification_suggest_description:`Видео загружается слишком медленно -
54
+ попробуйте изменить качество на «Авто»`,double_forward_label:`2x`,preview_track_notification_text:`Потяните вверх для точной перемотки`,preview_track_close_tooltip:`Выйти из режима точной перемотки`},Xl={auto_quality_invariant:`Auto`,auto_quality:`Auto ({actual})`,auto_quality_option:`Auto`,other_quality:`Other`,high_quality:`High quality`,high_quality_description:`Uses more data`,auto_quality_limit:`Auto`,traffic_saving_quality:`Data saving`,traffic_saving_quality_description:`Videos load faster but\xA0at\xA0lower quality`,quality_applience:`You can\xA0{action} the\xA0default quality`,quality_applience_action:`change`,default_quality_for_any_video:`Quality for\xA0all videos`,menu_quality:`Quality`,menu_playback_rate:`Playback rate`,menu_traffic_saving:`Data saving`,menu_report:`Report a problem`,menu_pip:`Picture in picture`,menu_pip_close:`Expand video`,menu_copy_video_link:`Copy video link`,menu_copy_video_link_with_timestamp:`Copy link with timestamp`,menu_video_rotate:`Rotate`,menu_video_loop_on:`Enable loop`,menu_video_loop_off:`Disable loop`,menu_chromecast:`Chromecast stream`,menu_copy_debug:`Copy debug info`,menu_save_debug:`Save debug info`,menu_debug_overlay:`Tech stats`,menu_copy_embed_code:`Copy embed code`,menu_audio_languages:`Audio track`,audio_stream_display_language_label:`{label} ({language})`,audio_stream_display_language_label_index:`{label} {index} ({language})`,audio_stream_display_label_index:`{label} {index}`,audio_stream_display_language_index:`{language} {index}`,audio_stream_display_unknown:`Audio track {index}`,pip_dummy_title:`Video plays in picture-in-picture mode`,submenu_quality:`Quality`,submenu_playback_rate:`Playback rate`,submenu_traffic_saving:`Data saving`,submenu_settings:`Settings`,submenu_audio_languages:`Audio track`,playing_ads:`Ads {timeleft}`,skip_ads_after:`Skip ads`,skip_ads_now:`Skip {time}s`,visit_advertiser:`Visit site`,aria_timeline:`Time scale slider`,aria_timeline_value:`{position} out of {duration}`,doubletap_seek_step:`{seconds} seconds`,playback_rate_1:`Normal`,playback_rate:`{multiplier}x`,video360:`spherical video`,subtitles_caption:`Subtitles`,subtitles_auto:`{language} (Auto-generated)`,subtitles_off:`Off`,subtitles_auto_caption:`Auto subtitles`,subtitles_turn_on:`Turn on subtitles`,subtitles_turn_off:`Turn off subtitles`,traffic_saving_off:`Off`,traffic_saving_on:`On`,traffic_saving_helper_text:`When turned on the video quality will be reduced to save data`,tooltip_button_disabled:`Button disabled`,tooltip_previous:`Previous video`,tooltip_restart:`Watch again`,tooltip_play:`Play`,tooltip_pause:`Pause`,tooltip_next:`Next video`,tooltip_interactive_go_back:`Back to previous chapter`,tooltip_interactive_go_back_disabled:`Interactive history unavailable`,tooltip_interactive_go_back_disabled_first:`You're watching the first chapter`,tooltip_interactive_go_back_disabled_limit:`Go-back limit exceeded`,tooltip_chapter_without_interactive:`This chapter has no interactive segment`,tooltip_interactive_of_chapter_completed:`Chapter's interactive segments already watched`,tooltip_interactive_seek:`Go to interactive`,tooltip_interactive_graph_off:`Show interactive graph`,tooltip_interactive_graph_on:`Hide interactive graph`,tooltip_live:`Go to the live edge`,tooltip_episodes:`Episodes`,tooltip_volume:`Volume off`,tooltip_volume_muted:`Turn volume on`,tooltip_sound_unavailable:`Sound unavailable`,tooltip_subtitles_off:`Turn subtitles on`,tooltip_subtitles_on:`Turn subtitles off`,tooltip_settings_off:`Open settings`,tooltip_settings_on:`Close settings`,tooltip_fullscreen_off:`Enter fullscreen mode`,tooltip_fullscreen_on:`Exit fullscreen mode`,tooltip_chromecast_off:`Turn Chromecast on`,tooltip_chromecast_on:`Turn Chromecast off`,tooltip_episode_finished:`You have already viewed interactive episode`,tooltip_episode_unfinished:`Interactive episode not finished`,tooltip_disabled_when_interactive:`Interactive video in progress`,tooltip_disabled_when_graph_on:`Button is disabled when graph is opened`,tooltip_interactive_interaction_time_indicator:`Press the interactive element`,tooltip_vk_logo:`Open in VK Video`,tooltip_vk_video_logo:`Go to VK Video`,tooltip_autoplay_off:`Turn autoplay on`,tooltip_autoplay_on:`Turn autoplay off`,tooltip_context_menu_open:`Open context menu`,tooltip_context_menu_close:`Close context menu`,download_video_caption:`Download video`,hotkey_helper_current_volume:`{value} %`,hotkey_map_modal_title:`Keyboard shortcuts`,hotkey_map_modal_close_btn_text:`Close`,hotkey_map_group_title_common:`Common`,hotkey_map_group_title_playback:`Playback`,hotkey_map_group_title_subtitles:`Subtitles`,hotkey_map_group_title_episodes:`Episodes`,hotkey_map_item_mute_description:`Toggle mute`,hotkey_map_item_mute_value:`m`,hotkey_map_item_volume_up_description:`Increase volume`,hotkey_map_item_volume_up_value:`Arrow up`,hotkey_map_item_volume_down_description:`Decrease volume`,hotkey_map_item_volume_down_value:`Arrow down`,hotkey_map_item_pip_description:`Toggle miniplayer`,hotkey_map_item_pip_value:`i`,hotkey_map_item_full_screen_description:`Toggle full screen`,hotkey_map_item_full_screen_value:`f`,hotkey_map_item_show_context_menu_description:`Hide or show context menu`,hotkey_map_item_show_context_menu_value:`Shift + !`,hotkey_map_item_show_hotkey_map_description:`Hide or show list of hotkeys`,hotkey_map_item_show_hotkey_map_value:`Shift + ?`,hotkey_map_item_play_toggle_description:`Toggle play/pause`,hotkey_map_item_play_toggle_value:`Space (or k)`,hotkey_map_item_seek_backward_description:`Rewind 10 seconds`,hotkey_map_item_seek_backward_value:`Arrow left (or j)`,hotkey_map_item_seek_forward_description:`Forward 10 seconds`,hotkey_map_item_seek_forward_value:`Arrow right (or l)`,hotkey_map_item_fast_seek_backward_description:`Fast rewind`,hotkey_map_item_fast_seek_backward_value:`Shift + Arrow left`,hotkey_map_item_fast_seek_forward_description:`Fast forward`,hotkey_map_item_fast_seek_forward_value:`Shift + Arrow right`,hotkey_map_item_rate_down_description:`Decrease playback rate`,hotkey_map_item_rate_down_value:`< (Shift + ,)`,hotkey_map_item_rate_up_description:`Increase playback rate`,hotkey_map_item_rate_up_value:`> (Shift + .)`,hotkey_map_item_prev_frame_description:`Previous frame (while paused)`,hotkey_map_item_prev_frame_value:`,`,hotkey_map_item_next_frame_description:`Next frame (while paused)`,hotkey_map_item_next_frame_value:`.`,hotkey_map_item_jump_seek_description:`Seek to specific point in the video (7 advances to 70% of duration)`,hotkey_map_item_jump_seek_value:`0, 1, 2, 3, 4, 5, 6, 7, 8, 9`,hotkey_map_item_subtitles_toggle_description:`Toggle captions ON/OFF`,hotkey_map_item_subtitles_toggle_value:`c`,hotkey_map_item_prev_episode_description:`Seek to previous episode`,hotkey_map_item_prev_episode_pc_value:`Ctrl + Arrow left`,hotkey_map_item_prev_episode_mac_value:`Option + Arrow left`,hotkey_map_item_next_episode_description:`Seek to next episode`,hotkey_map_item_next_episode_pc_value:`Ctrl + Arrow right`,hotkey_map_item_next_episode_mac_value:`Option + Arrow right`,hotkey_map_item_next_video_description:`Next video`,hotkey_map_item_next_video_value:`Shift + N`,hotkey_map_item_prev_video_description:`Previous video`,hotkey_map_item_prev_video_value:`Shift + P`,waiting_live_day_value:`d`,waiting_live_hour_value:`h`,waiting_live_minute_value:`min`,waiting_live_second_value:`sec`,waiting_live_colon:`:`,waiting_live_upcoming_title:`The broadcast hasn't started yet`,waiting_live_timer_title:`Before the start of the broadcast left`,waiting_live_recover_title:`The broadcast has been paused - it will resume when the author returns`,waiting_record_title:`The broadcast completed - recording will appear later`,aria_label_video_player:`Video player`,aria_label_spherical_control:`Spherical video control. Use the arrow keys to pan the video.`,aria_label_debug_panel:`Technical information area, take a screenshot for technical support`,aria_label_new_tab_alert:`Opens in a new tab.`,aria_label_menu_quality:`Quality: {actual}`,aria_label_menu_audio_languages:`Audio language: {actual}`,aria_label_menu_rate:`Rate: {actual}`,aria_label_menu_subtitle:`Subtitles: {actual}`,aria_label_menu_download:`Download video`,aria_label_menu_debug_overlay:`Display of technical information`,aria_label_menu_rotate:`Rotate video 90 degrees`,aria_label_menu_loop:`Toggle loop`,aria_label_submenu_back:`Return to settings menu`,aria_label_submenu_traffic_saving:`Data saving mode`,aria_label_settings:`Settings`,aria_label_context_menu:`Context menu`,aria_label_autoplay:`Autoplay`,end_screen_next_video:`Next video`,end_screen_recommended_video:`Recommended video`,slow_video_notification_button:`Select Auto quality`,slow_video_notification_force_description:`The video is loading too slowly,
55
+ so\xA0the\xA0quality was changed to\xA0Auto`,slow_video_notification_suggest_description:`The video is loading too slowly.
56
+ Try switching the\xA0quality to\xA0Auto.`,double_forward_label:`2x`,preview_track_notification_text:`pull up to open precise rewind`,preview_track_close_tooltip:`dismiss precise rewind`},Zl=new Map;Zl.set(Jl.EN,Xl),Zl.set(Jl.RU,Yl);var Ql=new Map,$l=({language:e,pack:t,fallback:n})=>{if(Zl.has(e)){let n=Zl.get(e);Zl.set(e,{...n,...t})}else Zl.set(e,t);Ql.set(e,n)},eu=e=>Zl.has(e),tu=(e,t,n,r)=>{let i=Zl.get(e)?.[t];if(ql(i)){let n=Ql.get(e)??r;i=(n?Zl.get(n):void 0)?.[t]}return ql(i)?t+Gl.default(n??{}).join(` `):n?Kl.default(i,/{(\w+?)}/g,(e,t)=>n[t]??``):i},nu=(e,t)=>{let{interfaceLanguage$:n}=$c();return tu(Y(n),e,t,Tc().defaultLanguage)},ru=K(`<div class="s-6"><div class="s-6">Video id</div> <span> </span></div>`),iu=K(`<div class="s-6"><div class="s-6">VSID</div> <span> </span></div>`),au=K(`<div class="s-6"><div class="s-6">Provider</div> <span> </span></div>`),ou=K(`<div class="s-6"><div class="s-6">Streams</div> <span> </span></div>`),su=K(`<div class="s-6"><div class="s-6">Viewport</div> <span> </span></div>`),cu=K(`<div class="s-6"><div class="s-6">Video size</div> <span> </span></div>`),lu=K(`<div class="s-6"><div class="s-6">CDN host</div> <span> </span></div>`),uu=K(`<div class="s-6"><div class="s-6">Volume</div> <span> </span></div>`),du=K(`<div class="s-6"><div class="s-6">Position</div> <span> </span></div>`),fu=K(`<div class="s-6"><div class="s-6">Buffer</div> <span> </span></div>`),pu=K(`<div class="s-6"><div class="s-6">Nbuffer</div> <span> </span></div>`),mu=K(`<div class="s-6"><div class="s-6">Live latency</div> <span> </span></div>`),hu=K(`<div class="s-6"><div class="s-6">Segment</div> <span> </span></div>`),gu=K(`<div class="s-6"><div class="s-6">Network</div> <!> <span> </span></div>`),_u=K(`<div class="s-6"><div class="s-6">V bitrate</div> <!> <span> </span></div>`),vu=K(`<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>`),yu={hash:`s-6`,code:`.container.s-6 {background:rgba(28, 28, 28, 0.8);border-radius:4px;color:#fff;left:20px;position:absolute;z-index:var(--debug-panel-z-index);top:45px;min-width:160px;font-size:10px;text-align:left;user-select:text;}button.close.s-6 {position:absolute;right:5px;top:3px;cursor:pointer;outline:0;border:none;background-color:transparent;padding:0;color:#fff;}.content.s-6 {padding:5px;}.content.s-6 > div:where(.s-6) > div:where(.s-6) {display:inline-block;text-align:right;width:60px;padding:0 5px;}`};function bu(e,t){ji(t,!0),Ls(e,yu);let n=$c(),r=n.ui.debugPanelVisible,i=e=>{e.stopPropagation(),Wl.remove(Ec),r.set(!1)},a=Fa(Ha(n.actions.internal.getDebugPanelData())),o=n.actions.internal.getVideoElement(),s=Fa(0),c=Fa(0),l=Fa(0),u=new Bl(60),d=new Bl(60),f=new Bl(60),p=Fa(Ha([])),m=Fa(Ha([])),h=Fa(Ha([])),g=nu(`aria_label_debug_panel`);As(()=>{Wl.set(Ec,`true`),o&&(B(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0),B(s,o.getVideoPlaybackQuality().totalVideoFrames,!0));let e=window.setInterval(()=>{B(a,n.actions.internal.getDebugPanelData(),!0)},500),t;return o&&(t=window.setInterval(()=>{if(o){B(c,o.getVideoPlaybackQuality().droppedVideoFrames,!0);let e=o.getVideoPlaybackQuality().totalVideoFrames;B(l,e-G(s)),B(s,e,!0),u.push(G(l)),G(a).speed&&d.push(G(a).speed),G(a).bitrate&&f.push(G(a).bitrate),B(p,u.getValuesFromBottom(),!0),B(m,d.getValuesFromBottom(),!0),B(h,f.getValuesFromBottom(),!0)}},1e3)),()=>{clearInterval(e),t&&clearInterval(t)}});var _=vu(),v=V(_),y=H(v,2),b=V(y),x=H(V(b),2),S=V(x,!0);L(x),L(b);var C=H(b,2),w=e=>{var t=ru(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(()=>Ss(r,G(a).id)),q(e,t)};Ps(C,e=>{G(a).id&&e(w)});var T=H(C,2),E=e=>{var t=iu(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(()=>Ss(r,G(a).vsid)),q(e,t)};Ps(T,e=>{G(a).vsid&&e(E)});var D=H(T,2),O=e=>{var t=au(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(()=>Ss(r,G(a).provider)),q(e,t)};Ps(D,e=>{G(a).provider&&e(O)});var k=H(D,2),A=e=>{var t=ou(),n=H(V(t),2),r=V(n);L(n),L(t),yo(()=>Ss(r,`Video: ${(G(a).videoCodec||``)??``} ${G(a).hdr?`(HDR)`:``}
51
57
  &
52
- Audio: ${(R(o).audioCodec||"")??""} ${R(o).audioLanguage?`(${R(o).audioLanguage})`:""}`)),fe(S,j)};Qe(D,S=>{(R(o).videoCodec||R(o).audioCodec)&&S(Z)})}var ae=pe(D,2);{var P=S=>{var j=jc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).viewport)),fe(S,j)};Qe(ae,S=>{R(o).viewport&&S(P)})}var W=pe(ae,2);{var H=S=>{var j=Uc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).videoSize)),fe(S,j)};Qe(W,S=>{R(o).videoSize&&S(H)})}var te=pe(W,2);{var xe=S=>{var j=zc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(()=>Ze(ue,R(o).cdn)),fe(S,j)};Qe(te,S=>{R(o).cdn&&S(xe)})}var J=pe(te,2);{var de=S=>{var j=Fc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(()=>Ze(ue,`${R(o).volume??""} %`)),fe(S,j)};Qe(J,S=>{R(o).volume&&S(de)})}var Y=pe(J,2);{var he=S=>{var j=Hc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).position.toFixed(2)]),fe(S,j)};Qe(Y,S=>{R(o).position&&S(he)})}var F=pe(Y,2);{var Le=S=>{var j=Qc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).buffer.toFixed(2)]),fe(S,j)};Qe(F,S=>{R(o).buffer&&S(Le)})}var Se=pe(F,2);{var le=S=>{var j=Yc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).nativeBuffer.toFixed(2)]),fe(S,j)};Qe(Se,S=>{R(o).nativeBuffer&&S(le)})}var C=pe(Se,2);{var se=S=>{var j=Bc(),X=pe(oe(j),2),ue=oe(X);ne(X),ne(j),ze(x=>Ze(ue,`${x??""} s`),[()=>R(o).liveLatency.toFixed(2)]),fe(S,j)};Qe(C,S=>{R(o).liveLatency&&S(se)})}var q=pe(C,2);{var ce=S=>{var j=Wc(),X=pe(oe(j),2),ue=oe(X,!0);ne(X),ne(j),ze(x=>Ze(ue,x),[()=>[{value:R(o).currentVideoSegmentLength,title:"Video:"},{value:R(o).currentAudioSegmentLength,title:"Audio:"}].filter(({value:x})=>x).map(({value:x,title:G})=>`${G} ${((x??0)/1e3).toFixed(2)} s`).join(" & ")]),fe(S,j)};Qe(q,S=>{(R(o).currentVideoSegmentLength||R(o).currentAudioSegmentLength)&&S(ce)})}var Me=pe(q,2),Ie=pe(oe(Me),2),je=oe(Ie);ne(Ie),ne(Me);var b=pe(Me,2);{var I=S=>{var j=Gc(),X=pe(oe(j),2);zn(X,{get values(){return R(m)}});var ue=pe(X,2),x=oe(ue);ne(ue),ne(j),ze(G=>Ze(x,`${G??""} Kbps`),[()=>R(o).speed.toFixed(2)]),fe(S,j)};Qe(b,S=>{R(o).speed&&S(I)})}var $=pe(b,2);{var U=S=>{var j=qc(),X=pe(oe(j),2);zn(X,{get values(){return R(g)}});var ue=pe(X,2),x=oe(ue);ne(ue),ne(j),ze(G=>Ze(x,`${G??""} Kbps`),[()=>R(o).bitrate.toFixed(2)]),fe(S,j)};Qe($,S=>{R(o).bitrate&&S(U)})}var ee=pe($,2),re=pe(oe(ee),2);zn(re,{get values(){return R(d)}});var ke=pe(re,2),Ce=oe(ke,!0);ne(ke),ne(ee),ne(N),ne(v),ze(()=>{Ft(v,"aria-label",_),Ze(T,R(o).version),Ze(je,`${R(u)??""} / ${R(s)??""} frames`),Ze(Ce,R(c))}),fe(e,v),lt()}sn(["click"]);ms();var Vl="var(--btn-color, #fff)";var Jc=pi('<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),Xc=pi('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>');function Hi(e,t){st(t,!0);let i=ye(t,"width",19,()=>"24"),n=ye(t,"height",19,()=>"24"),o=ye(t,"fill",3,Vl),r=t.viewBox??`0 0 ${i()} ${n()}`;var s=Xc(),u=oe(s);{var c=p=>{var a=Jc(),d=on(a),m=oe(d);yo(m,()=>t.children),ne(d),nn(),fe(p,a)},h=p=>{var a=Er(),d=on(a);yo(d,()=>t.children),fe(p,a)};Qe(u,p=>{t.shadow?p(c):p(h,!1)})}ne(s),ze(()=>{Ft(s,"aria-label",t.ariaLabel),Ft(s,"aria-hidden",!t.ariaLabel),Ft(s,"width",i()),Ft(s,"height",n()),Ft(s,"viewBox",r),Ft(s,"fill",o()),ki(s,t.style),Ft(s,"data-testid",t.testId)}),fe(e,s),lt()}var ep=pi('<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 Kr(e){Hi(e,{width:"200",height:"200",viewBox:"460 190 130 90",testId:"error-icon",children:(t,i)=>{var n=ep();fe(t,n)},$$slots:{default:!0}})}var tp=we('<div class="container s-3"><!></div>'),ip={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 Fn(e){dt(e,ip);var t=tp(),i=oe(t);Kr(i,{}),ne(t),fe(e,t)}var Ul=e=>`width:${e}px;height:${e}px;`;var np=pi('<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 Zr(e,t){st(t,!0);let i=gi(()=>Ul(t.size));Hi(e,{get width(){return"48"},get height(){return"48"},get fill(){return t.fill},get style(){return R(i)},testId:"play-icon",get shadow(){return t.shadow},children:(n,o)=>{var r=np();fe(n,r)},$$slots:{default:!0}}),lt()}var op=we('<div class="playButton s-6" tabindex="0" role="button"><div class="playButtonBackground s-6"></div> <!></div>'),rp=we('<div data-testid="unstarted-thumb"><!></div>'),ap={hash:"s-6",code:".container.s-6{background-position:50%;background-repeat:no-repeat;background-size:contain;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:opacity .2s,visibility .2s;will-change:opacity}.container.hidden.s-6{opacity:0;visibility:hidden}.container.bgCover.s-6{background-size:cover}.playButton.s-6{align-items:center;display:flex;height:var(--big-play-size);justify-content:center;margin:auto;width:var(--big-play-size)}.playButton.s-6,.playButtonBackground.s-6{bottom:0;left:0;position:absolute;right:0;top:0}.playButtonBackground.s-6{background-color:var(--big-play-bg-color);border-radius:var(--big-play-radius);transition:background .2s,transform .2s;transition-timing-function:ease-out;will-change:background,transform}.container.s-6:hover .playButtonBackground:where(.s-6){background-color:var(--big-play-hover-bg-color);transform:scale(1.15)}.playButton.s-6 svg{position:relative}"};function Jr(e,t){st(t,!0),dt(e,ap);let i=ye(t,"iconVisible",3,!0),n=pn(),o=ko("tooltip_play"),r=p=>{p.stopPropagation(),t.startVideo?.(),t.onClick?.(p)};var s=rp();let u;s.__click=r,s.__contextmenu=function(...p){t.onContextMenu?.apply(this,p)};var c=oe(s);{var h=p=>{var a=op(),d=pe(oe(a),2);Zr(d,{get size(){return"48"}}),ne(a),ze(()=>Ft(a,"aria-label",o)),fe(p,a)};Qe(c,p=>{i()&&p(h)})}return ne(s),ze(p=>{u=un(s,1,"container s-6",null,u,p),ki(s,`background-color: #222; background-image: url('${t.thumbUrl||""}')`)},[()=>({hidden:t.hidden,bgCover:n.features.previewNoEmptySpace})]),fe(e,s),lt({handleClick:r})}sn(["click","contextmenu"]);var sp=we('<div><div class="video-container s-7"></div></div>'),lp={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 ea(e,t){st(t,!0),dt(e,lp);let[i,n]=Fi(),o=()=>oi(s,"$playerPhase",i),r=ye(t,"videoContainer",15),{playerPhase:s}=Ni();var u=sp();let c;var h=oe(u);zi(h,p=>r(p),()=>r()),ne(u),ze(p=>c=un(u,1,"video-wrapper s-7",null,c,p),[()=>({hidden:o()!=="video"})]),fe(e,u),lt(),n()}var dp=we("<!> <!> <!> <!>",1),up=we('<div class="player-wrapper s-4"><!></div>'),cp={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 ta(e,t){st(t,!0),dt(e,cp);let[i,n]=Fi(),o=()=>oi(p,"$language$",i),r=()=>oi(a,"$playerPhase",i),s=()=>oi(d,"$crashed",i),u=()=>oi(m,"$debugPanelVisible",i),c=ye(t,"videoContainer",15),h=Ni(),p=h.interfaceLanguage$,a=h.playerPhase,d=h.state.crashed$,m=h.ui.debugPanelVisible,g=Fe(void 0);var _=up(),v=oe(_);wr(v,o,L=>{var N=dp(),k=on(N);ea(k,{get videoContainer(){return c()},set videoContainer(A){c(A)}});var y=pe(k,2);let T=gi(()=>r()!=="thumb"||s()&&t.autoplay);Jr(y,{get hidden(){return R(T)},get thumbUrl(){return t.thumbUrl},get startVideo(){return t.firstStart}});var w=pe(y,2);{var E=A=>{Fn(A,{})};Qe(w,A=>{s()&&A(E)})}var f=pe(w,2);{var B=A=>{qr(A,{})};Qe(f,A=>{u()&&A(B)})}fe(L,N)}),ne(_),zi(_,L=>Ee(g,L),()=>R(g)),fe(e,_),lt(),n()}var vp=we('<div class="vk-vp-tv-root s-2"><!></div>'),gp={hash:"s-2",code:'.vk-vp-tv-root.s-2{--white:#fff;--black:#000;--red:#ff3347;--blue-light:#70c1ff;--black-alpha-40:rgba(0,0,0,.4);--white-alpha-24:hsla(0,0%,100%,.24);--white-alpha-72:hsla(0,0%,100%,.72);--devider-gray:#dce1e6;--text-gray:#626d7a;--font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--controls-height:40px;--controls-gradient-height:100px;--controls-transition-duration:0.25s;--controls-transition-fn:cubic-bezier(0.455,0.03,0.515,0.955);--controls-desktop-item-margin-left:4px;--controls-desktop-padding-horizontal:4px;--focused:var(--white);--focused-outline-width:2px;--focused-outline-radius:0;--focused-element-shadow:inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow:0 0 0 2px var(--focused);--big-play-size:96px;--big-play-radius:50%;--big-play-bg-color:rgba(0,0,0,.5);--big-play-hover-bg-color:rgba(0,0,0,.6);--big-play-icon-width:38px;--big-play-icon-height:33px}'};function ia(e,t){st(t,!0),dt(e,gp);let[i,n]=Fi(),o=()=>oi(J,"$isLive$",i),r=()=>oi(ee,"$availableSubtitlesList$",i),s=ye(t,"sources",7),u=ye(t,"store",7),c=ye(t,"videoConfig",7),h=ye(t,"uiConfig",7),p=ye(t,"title",7),a=ye(t,"thumbUrl",7),d=ye(t,"subtitles",7),m=ye(t,"subtitlesForcedLanguage",7),g=ye(t,"live",7),_=ye(t,"preload",7),v=ye(t,"autoplay",7),L=ye(t,"volume",7,void 0),N=ye(t,"muted",7,void 0),k=ye(t,"fromTime",7),y=ye(t,"canRewindLive",7),T=ye(t,"showAds",7),w=ye(t,"adsSlotId",7,void 0),E=ye(t,"adsParams",7,void 0),f=ye(t,"adsAutoplayParam",7,void 0),B=ye(t,"duration",7,void 0),A=ye(t,"supportLink",7),O=ye(t,"shadowRootContainer",7),D=ye(t,"outerContainerRef",7),Z=ye(t,"fullScreenTarget",7,void 0),ae=ye(t,"failoverHosts",7,void 0),P=ye(t,"saveRate",7),W=ye(t,"volumeMultiplier",7),H=ye(t,"showEndScreen",7,!0);ul(h());let te=pn(),xe=u().ui.debugPanelVisible,J=u().state.isLive$,de=Fe(void 0),Y=Fe(!1);u().getAdmanWrapper().init({switchFromAdsToVideo:u().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:u().actions.internal.switchFromVideoToAds,setMuted:u().actions.external.setMuted},u().ads,{vsid:u().vsid}),vl(u()),xi(()=>{c().callbacks?.onDomReady?.()});let he=(S=!1)=>{Ee(Y,!0),S?u().actions.external.firstStart(T()):u().actions.internal.firstStart(T())},F=()=>{Dl(u().videoId),Qr()&&u().actions.internal.setTrafficSavingEnabled(!0);let j=Hr(u().videoId);j&&u().actions.internal.setQuality(j)};function Le(S){let j=s()||S;j&&u().initVideo({container:R(de),sources:j,failoverHosts:ae(),subtitles:d(),subtitlesForcedLanguage:m(),volumeMultiplier:W()});let X=mp.get(Un)==="true";xe.set(X),k()>0&&u().actions.external.seekTime(k());let ue=L()??To()??te.volumeDefault,x=N()??Ml();if(u().actions.external.setVolume(ue),u().actions.external.setMuted(x),u().getAdmanWrapper().setInitialVolume(x?0:ue),F(),te.features.saveRate&&P()){let G=Nl();G&&!o()&&u().actions.internal.setPlaybackRate(G)}u().ui.isAutoplay.set(v()),v()&&he(),_()&&te.features.preload&&u().actions.internal.preload()}dn(()=>{let S=()=>u().destroy();return g()?.status==="upcoming"?(u().actions.internal.setLiveWaitingStart(!0),S):g()?.status==="waiting"?(u().actions.internal.setLiveWaitingRecover(!0),S):(g()?.status==="finished"||g()?.status==="postlive")&&!(s()&&fp(s()))?(u().actions.internal.setLiveWaitingRecord(!0),S):(Le(),S)});function Se(){R(Y)?u().actions.external.play():he(!0)}function le(){u().actions.external.pause()}function C(S){u().actions.external.setMuted(S)}function se(){u().actions.external.toggleSubtitle()}function q(S,j){u().actions.external.changeSubtitle(S,j)}function ce(S){u().actions.external.changeAudioStream(S)}function Me(S){S>=0&&S<=1&&u().actions.external.setVolume(S)}function Ie(S){u().actions.internal.seekTime(S,hp.UNKNOWN)}function je(S){u().actions.external.setPlaybackRate(S)}function b(S){u().actions.external.setAutoQualityLimits(S)}function I(){u().actions.external.setQuality("auto")}function $(S){u().actions.external.setTrafficSavingEnabled(S)}function U(S){u().actions.external.setHighQualityEnabled(S)}let ee=u().state.availableSubtitlesList$;if(te.features.initSubtitles){let S=!1;xi(()=>{if(!S&&r().length){S=!0;let j;if(te.features.userVideoPrefs&&u().videoId){let ue=wo(te.userSalt,String(u().videoId));ue?.subtitleTrackId&&(j=r().find(x=>x.value===ue.subtitleTrackId))}let X=m()??Yr();X&&(j=r().find(ue=>ue.language===X)),u().actions.internal.setSubtitle(j)}})}var re=vp(),ke=oe(re);ta(ke,{get thumbUrl(){return a()},firstStart:he,get autoplay(){return v()},get videoContainer(){return R(de)},set videoContainer(S){Ee(de,S,!0)}}),ne(re),fe(e,re);var Ce=lt({initVideo:Le,play:Se,pause:le,setMuted:C,toggleSubtitle:se,changeSubtitle:q,changeAudioStream:ce,setVolume:Me,seekTime:Ie,setPlaybackRate:je,setAutoQualityLimits:b,setAutoQuality:I,toggleTrafficSaving:$,toggleHighQuality:U,get sources(){return s()},set sources(S){s(S)},get store(){return u()},set store(S){u(S)},get videoConfig(){return c()},set videoConfig(S){c(S)},get uiConfig(){return h()},set uiConfig(S){h(S)},get title(){return p()},set title(S){p(S)},get thumbUrl(){return a()},set thumbUrl(S){a(S)},get subtitles(){return d()},set subtitles(S){d(S)},get subtitlesForcedLanguage(){return m()},set subtitlesForcedLanguage(S){m(S)},get live(){return g()},set live(S){g(S)},get preload(){return _()},set preload(S){_(S)},get autoplay(){return v()},set autoplay(S){v(S)},get volume(){return L()},set volume(S){L(S)},get muted(){return N()},set muted(S){N(S)},get fromTime(){return k()},set fromTime(S){k(S)},get canRewindLive(){return y()},set canRewindLive(S){y(S)},get showAds(){return T()},set showAds(S){T(S)},get adsSlotId(){return w()},set adsSlotId(S){w(S)},get adsParams(){return E()},set adsParams(S){E(S)},get adsAutoplayParam(){return f()},set adsAutoplayParam(S){f(S)},get duration(){return B()},set duration(S){B(S)},get supportLink(){return A()},set supportLink(S){A(S)},get shadowRootContainer(){return O()},set shadowRootContainer(S){O(S)},get outerContainerRef(){return D()},set outerContainerRef(S){D(S)},get fullScreenTarget(){return Z()},set fullScreenTarget(S){Z(S)},get failoverHosts(){return ae()},set failoverHosts(S){ae(S)},get saveRate(){return P()},set saveRate(S){P(S)},get volumeMultiplier(){return W()},set volumeMultiplier(S){W(S)},get showEndScreen(){return H()},set showEndScreen(S){H(S)}});return n(),Ce}var _p=pi('<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 na(e,t){let i=ye(t,"isWhite",3,!1),n=gi(()=>i()?"#fff":"#909499");Hi(e,{width:"57",height:"60",get fill(){return R(n)},testId:"stub-icon",children:(o,r)=>{var s=_p();nn(9),fe(o,s)},$$slots:{default:!0}})}var yp=we('<div class="title s-0"> </div>'),bp=we('<div class="playerStub s-0"><!> <!></div>'),Ap={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 oa(e,t){dt(e,Ap);var i=bp(),n=oe(i);{var o=u=>{var c=yp(),h=oe(c,!0);ne(c),ze(()=>Ze(h,t.title)),fe(u,c)};Qe(n,u=>{t.title&&u(o)})}var r=pe(n,2);{var s=u=>{let c=gi(()=>!!t.thumbUrl);na(u,{get isWhite(){return R(c)}})};Qe(r,u=>{(!t.title||!t.thumbUrl)&&u(s)})}ne(i),ze(()=>ki(i,t.thumbUrl?`background-image: url('${t.thumbUrl}')`:"")),fe(e,i)}var xp=we('<div class="playerError s-1"><!></div>'),Ep={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 ra(e){dt(e,Ep);var t=xp(),i=oe(t);Fn(i,{}),ne(t),fe(e,t)}import{ChromecastState as $p,PlaybackState as Hn,Player as Op,PredefinedQualityLimits as Di,VideoFormat as Oo,clientChecker as Kl}from"@vkontakte/videoplayer-core";import{assertNonNullable as Ht,getHighestQuality as Pp,InterfaceLanguage as Rp,isInvariantQuality as Vp,isNonNullable as jp,loadVKLangPack as Up,Logger as zp,map as Zl,merge as Fp,Observable as Po,Subject as Qn,Subscription as Hp,TracerFactory as Qp,VideoQuality as Yp,devNull as Bp,now as Wp}from"@vkontakte/videoplayer-shared";import{SeekAction as Yn}from"@vkontakte/videoplayer-statistics";import{detectEmbed as Tp,devNull as Ne,isNonNullable as Mp,now as De}from"@vkontakte/videoplayer-shared";import{addScript as wp,Subject as Et,clearVideoElement as Ip}from"@vkontakte/videoplayer-shared";var kp="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",No=class{constructor(t,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 Et,loadStarted$:new Et,loadEnded$:new Et,loadError$:new Et,ready$:new Et,slotRequested$:new Et,started$:new Et,timeRemained$:new Et,paused$:new Et,resumed$:new Et,ended$:new Et,empty$:new Et,skipped$:new Et,clicked$:new Et,closed$:new Et,error$:new Et};this.loadAdman=t=>(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_start",this.useAdmanFromNPM?"npm":"http"],numbers:[De()]}),this.useAdmanFromNPM?this.loadAdmanNPM(t):this.loadAdmanMailRu(t));this.loadAdmanMailRu=t=>new Promise((i,n)=>{let o;this.events.loadStarted$.next();let r=()=>{clearTimeout(o),delete window.admanAsyncInit,window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_async_init_done","http"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","http"],numbers:[De()]}),n())};wp(kp,t,this.loadTimeout).then(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_loaded","http"],numbers:[De()]}),window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","http"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","http"],numbers:[De()]}),window.admanAsyncInit=r,o=window.setTimeout(r,this.initTimeout))}).catch(s=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_script_load_error","http",String(s)],numbers:[De()]}),n(),clearTimeout(o)})});this.loadAdmanNPM=t=>new Promise((i,n)=>{let o;this.events.loadStarted$.next();let r=()=>{clearTimeout(o),delete window.admanAsyncInit,window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_done","npm"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_timed_out","npm"],numbers:[De()]}),n())},s=()=>{u=!0,n()},u=!1,c=window.setTimeout(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_timed_out","npm"],numbers:[De()]}),s()},this.loadTimeout);t.addEventListener("abort",s),t.aborted&&(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_load_aborted","npm"],numbers:[De()]}),s()),window.AdmanHTML=window.AdmanHTML||null,Promise.resolve().then(()=>lu(zl(),1)).then(()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_chunk_imorted","npm","failed: "+String(u)],numbers:[De()]}),!u&&(window.AdmanHTML?(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_already_inited","npm"],numbers:[De()]}),i(),this.events.loadEnded$.next()):(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_wait_async_init","npm"],numbers:[De()]}),window.admanAsyncInit=r,o=window.setTimeout(r,this.initTimeout)))},s).finally(()=>{clearTimeout(o),clearTimeout(c),t.removeEventListener("abort",s)})});this.onAdsReady=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ads_ready"],numbers:[De()]}),this.log({message:"ads ready"}),this.events.ready$.next(),this.startPreroll()};this.onAdStarted=(t,i)=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_started",t,"muted: "+i.muted],numbers:[De(),i.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${t}, banner: ${JSON.stringify(i)}`}),this.events.started$.next(t),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(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,t,String(i.bannerID))):this.onAdError("Started callback failed: Adman is not initialized")};this.onAdTimeRemained=t=>{(this.adsState?.playbackState?_e(this.adsState.playbackState):void 0)!=="inactive"&&(this.adsState?(this.adsState.position.set(t.currentTime),this.events.timeRemained$.next(t),this.startWatchDog()):this.onAdError("TimeRemained callback failed: Adman state is not initialized"))};this.onAdPaused=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_pased",this.currentAdSection??""],numbers:[De()]}),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=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_played",this.currentAdSection??""],numbers:[De()]}),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(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_midroll_pioint"],numbers:[De()]}),this.adman&&this.actions){this.log({message:"midroll point"}),this.actions.switchFromVideoToAds(),this.currentAdSection="midroll",this.startWatchDog();try{this.adman.start("midroll")}catch{this.onAdError("could not start midroll")}}else this.onAdError("Midroll callback failed: Adman is not initialized")};this.onAdSkipped=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_skipped",this.currentAdSection??""],numbers:[De()]}),this.log({message:"ad skipped"}),this.stopWatchDog()};this.onAdClosed=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_closed",this.currentAdSection??""],numbers:[De()]}),this.log({message:"ad closed"}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};this.onAdCompleted=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_completed",this.currentAdSection??""],numbers:[De()]}),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=()=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_clicked",this.currentAdSection??""],numbers:[De()]}),this.log({message:"ad clicked"}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};this.onAdError=(t="ad error")=>{Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_ad_error",t],numbers:[De()]}),this.log({message:t}),this.events.error$.next(t),this.currentAdSection==="postroll"&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};this.log=t.createComponentLog("AdmanWrapper"),Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_created"],numbers:[De()]}),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(t,i,n){this.actions=t,this.adsState=i,this.playerState=n}onAdmanLoadingError(){this.onAdError("adman loading error")}async initAdman(t){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init","already inited: "+!!this.adman],numbers:[De(),t.slotId]}),this.adman)return;this.events.init$.next(t.slotId),this.startWatchDog();let{width:i,height:n,isAutoplay:o,adsContainer:r,adsVideoElement:s,slotId:u,params:c={},paramsOverride:h={},duration:p,externalApi:a}=t;this.externalApi=a;let d,m=this.playerState&&_e(this.playerState.vsid);m&&(this.isVsidOriginal?d=m:d=parseInt(m,36));let{isEmbed:g,immediateOrigin:_}=Tp(),v=(g?_:window.location.href)??window.location.href,L={...c,dl:encodeURIComponent(v),autoplay:o?1:0,player_width:i,player_height:n,...d?{request_id:d}:{},duration:p,...h};L=Object.fromEntries(Object.entries(L).filter(([k,y])=>Mp(y)));let N={slot:u,wrapper:r,videoEl:s,videoQuality:n,params:L,browser:{mobile:!1}};try{let k=new window.AdmanHTML;if(k.onReady(this.onAdsReady),k.onStarted(this.onAdStarted),k.onPlayed(this.onAdPlayed),k.onPaused(this.onAdPaused),k.adMidrollPoint(this.onAdMidrollPoint),k.onClosed(this.onAdClosed),k.onSkipped(this.onAdSkipped),k.onClicked(this.onAdClicked),k.onTimeRemained(this.onAdTimeRemained),k.onCompleted(this.onAdCompleted),k.onError(this.onAdError),k.setDebug(!1),this.externalApi?.videoGetAds){let y=await this.safeExternalCall(this.externalApi.videoGetAds,L);y&&(delete N.slot,delete N.params,Object.assign(N,{json:y}))}k.init(N),this.adman=k,this.videoElement=s,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(N)}`})}catch(k){Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_init_threw",String(k)],numbers:[De()]}),this.onAdError("could not init adman")}}switchToVideo(t=!1){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_switch_to_video",this.currentAdSection??"","force: "+t],numbers:[De()]}),this.currentAdSection===null&&!t){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 n="Switch to video: Adman state was not updated correctly";this.log({message:n}),this.events.error$.next(n)}this.actions.switchFromAdsToVideo?.(!i)}}setPostrollPassed(t){this.adsState?.postrollPassed.set(t),this.log({message:"postroll passed"})}togglePlay(){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_toggle_play",this.currentAdSection??""],numbers:[De()]}),this.adsState){this.log({message:"toggle play"});let t=_e(this.adsState.playbackState);t==="playing"?this.pause():t==="paused"&&this.play()}else this.onAdError("Can not toggle play: Adman state is not initialized")}setInitialVolume(t){this.log({message:`set initial volume ${t}`}),this.initialVolume=t}setVolume(t){let i=t*this.volumeMultiplier;if(this.log({message:`set volume ${i}`}),this.adman)try{this.adman.setVolume(i)}catch{this.onAdError("could not set ad volume")}this.videoElement&&(this.videoElement.volume=i)}setFullscreen(t){if(this.log({message:`set fullscreen ${t}`}),this.adman)try{this.adman.setFullscreen(t)}catch{this.onAdError("could not set ad fullscreen")}}startPreroll(){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_preroll"],numbers:[De()]}),this.adman){if(!this.isDestroyed){this.log({message:"start preroll"}),this.setVolume(this.initialVolume),this.currentAdSection="preroll",this.startWatchDog();try{this.adman.start("preroll")}catch{this.onAdError("could not start preroll")}}}else this.onAdError("Can not start preroll: Adman is not initialized")}startPostroll(){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_start_postroll",this.currentAdSection??""],numbers:[De()]}),this.adman&&this.actions){this.log({message:"start postroll"}),this.actions.switchFromVideoToAds(),this.currentAdSection="postroll",this.startWatchDog();try{this.adman.start("postroll")}catch{this.onAdError("could not start postroll")}}else this.onAdError("Can not start postroll: Adman is not initialized")}startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError("Watchdog timeout"),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_pplay",this.currentAdSection??""],numbers:[De()]}),this.adman){this.log({message:"ad play"}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError("could not resume ad")}}else this.onAdError("Can not play: Adman is not initialized")}pause(){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_pause",this.currentAdSection??""],numbers:[De()]}),this.adman){this.stopWatchDog(),this.log({message:"ad pause"});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError("could not pause ad")}}else this.onAdError("Can not pause: Adman is not initialized")}skip(){if(Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_skip",this.currentAdSection??""],numbers:[De()]}),this.adman){this.stopWatchDog(),this.log({message:"ad skip"});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError("could not skip ad")}}else this.onAdError("Can not skip: Adman is not initialized")}setPosition(t,i){this.adman?.setPosition(Math.floor(t),Math.floor(i))}destroy(){Ne.push("ui",{key:"videoplayer_embed",strings:["new","adman_destroy"],numbers:[De()]}),this.log({message:"destroy"}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&Ip(this.videoElement),this.isDestroyed=!0}async safeExternalCall(t,...i){try{return await t(...i)}catch(n){return this.onAdError(n?.message??"External call failed"),null}}};var Fl=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,Hl=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},Np=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},Ql=()=>!!Np();var Yl=e=>{let t=Math.round(e);return isNaN(t)||t<40?"":t>=40&&t<55?50:t>=55&&t<90?60:t>=90&&t<180?120:t>=180?240:""};var aa=class{constructor(){this.oneLineRegExp=/\r\n|\n|\r/;this.twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/}parse(t,i){let n=[],o=t.split(this.twoLinesRegExp);for(let r of o){let s={startTime:0,endTime:0,texts:[],lang:i},u=r.split(this.oneLineRegExp);for(let c of u)if(!s.startTime&&!s.endTime){let h=new Do,{startTime:p,endTime:a}=h.parse(c);s.startTime=p,s.endTime=a}else if(c.trim()!==""){let h=new sa,{texts:p}=h.parse(c);s.texts=[...s.texts,...p]}(s.startTime||s.endTime)&&s.texts.length>0&&n.push(s)}return n}},Do=class{constructor(){this.timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;this.timingRegExp=new RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`)}parse(t){let i={startTime:0,endTime:0},n=this.timingRegExp.exec(t);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(t){let i=this.timeRegExp.exec(t);return i?this.calcTime(i[1],i[2],i[3],i[4]):0}isTime(t){return this.timeRegExp.test(t)}calcTime(t="0",i="0",n="0",o="0"){let r=Number(t)*60*60,s=Number(i)*60,u=Number(n),c=+`0.${o}`;return r+s+u+c}},sa=class{constructor(){this.letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/}parse(t){let i={texts:[]},o=t.replace(new RegExp(this.letterTagRegExp,"g"),"").split({[Symbol.split](s){let u=0,c=[];for(;u<s.length;){let h=["<",">"].reduce((p,a)=>{let d=s.indexOf(a,u);return p===-1||p>d?d:p},-1);if(h===-1){c.push(s.substring(u));break}c.push(s.substring(u,h)),u=h+1}return c}}),r=new Do;for(let s of o)r.isTime(s)?i.texts.push({type:"timestamp",value:r.parseTime(s)}):i.texts.push({type:"text",value:s});return i}},Bl=aa;import{isNonNullable as la}from"@vkontakte/videoplayer-shared";var Qi,Wt,da=0,ua=!1,Wl="",Gl=(e,t=0,i=0)=>e<t&&e<i,Lo=(e,t=0,i=0)=>e>=t&&e<=i,Dp=(e,t=0,i=0)=>e>t&&e>i,ql=(e,t,i,n=!1)=>{let o=i.find(({id:u})=>u===t.value)?.subtitles;if(n)return o?.find(({startTime:c,endTime:h})=>Lo(e,c,h));let r=e>=da,s=e<da;if(da=e,s&&(ua=!1),la(Qi)&&Lo(e,Qi.startTime,Qi.endTime)&&Wl===t.value)return Qi;if(!la(Wt)&&o?.length&&!ua){Wt=o.find(({startTime:c,endTime:h})=>Lo(e,c,h)||r&&Gl(e,c,h)),Qi=void 0,!la(Wt)&&o[o.length-1].endTime<e&&(ua=!0);return}else{if(Lo(e,Wt?.startTime,Wt?.endTime))return Qi=Wt,Wt=void 0,Wl=t.value,Qi;(r&&Dp(e,Wt?.startTime,Wt?.endTime)||s&&Gl(e,Wt?.startTime,Wt?.endTime))&&(Wt=void 0)}};var Co={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"},Lp={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"},ca=e=>Co[e]??Co[Lp[e]]??void 0;import{Subscription as Cp}from"@vkontakte/videoplayer-shared";import"@vkontakte/videoplayer-statistics";var $o=class{constructor(t,i,n,o=new Cp){this.oneStat=t;this.thinOneStat=i;this.mediascopePixel=n;this.statSubscription=o}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}};var ri="off";var Jl=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:i,isLiveCatchUpMode:n,statAuthToken:o,isAudioDisabled:r,canDownload:s,callbacks:u,webApi:c,previewThumbsData:h,uiConfig:p,coreConfig:a,player:d,stopPlayer:m,looped:g=!1,statistics:_,saveRate:v,internalsExposure:L,playerId:N,metaConfig:k})=>{let y={...a,isAudioDisabled:r,live:{...a.live??{},isLiveCatchUpMode:!!n}},T=p,w=Qp.createRootTracer(!1),E=w.createComponentTracer("Store"),f=d||new Op(y,w,{playerId:N,onDevNullLog:u?.onDevNullLog});L?.expose({corePlayer:f});let B=new zp,A=new No(B,{loadTimeout:T.ads.loadTimeout,initTimeout:T.ads.initTimeout,runtimeTimeout:T.ads.runtimeTimeout,useAdmanFromNPM:T.ads.useAdmanFromNPM,volumeMultiplier:T.ads.volumeMultiplier,isVsidOriginal:T.ads.isVsidOriginal}),O=c?.focusManager,D=B.createComponentLog("Store"),Z,ae,P={},W=new Eo,H=new Hp,te="",xe=V(!1),J=_&&_.oneStat?Oe(_.oneStat.vsid$):Bt(void 0),de=V(Ql()),Y=V(!1),he=()=>Fl(document,Kl.device.isIOS),F=V(!1),Le=V([]),Se=Fp(f.events.fatalError$,f.events.managedError$).subscribe(l=>Le.update(M=>[...M,l])),le=Bt(!1,l=>{let M=f.events.fatalError$.subscribe(()=>l(!0));return()=>M.unsubscribe()}),C=async l=>{let M=Object.values(Rp).includes(l);if(T.downloadVKLanguages&&(M&&T.updateBuiltinLanguages||!Wr(l))){let K;try{K=await Up(l,cl,pl)}catch{_?.oneStat?.logError({errorType:"VKLangPack",fatal:!1})}K&&(Br({language:l,pack:K,fallback:T.defaultLanguage}),se.set(l),q.update(be=>be+1))}Wr(l)&&se.set(l)},se=V(e),q=V(0),ce=V(t);C(e);let Me=(l,M)=>{let z=_e(se);return Gr(z,l,M,T.defaultLanguage)},Ie=V("thumb");Ie.subscribe(l=>{l==="ads"&&f.info.playbackState$.getValue()&&I()});let je=(()=>{let l=tt([le,Ie],([M,z])=>M?"crashed":z);return{...l,is:M=>_e(l)===M}})(),b=V(),I=()=>{b.set({muted:f.info.muted$.getValue()})},$=V({width:0,height:0}),U=null,ee=f.info.isBuffering$,re=Bt(ee.getValue(),l=>{let M=ee.subscribe(z=>{z&&U===null?U=window.setTimeout(()=>{l(ee.getValue()),U=null},T.loaderDelay):l(z)});return()=>{M.unsubscribe(),U&&clearTimeout(U)}});E.log("create store"),D({message:"create store"});let ke=l=>{D({message:`init video, config: ${JSON.stringify(l)}`}),Bp.push("ui",{key:"videoplayer_embed",strings:["new","core_init_video"],numbers:[Wp()]}),f.initVideo(l),E.log("init video"),l.subtitles&&f.setExternalTextTracks(l.subtitles),Z=l,te=l.subtitlesForcedLanguage||""},Ce=new Qn,S=new Qn,j=new Qn,X={actionRewind$:Ce,actionSeek$:S,inFullscreen$:new Po(l=>de.subscribe(M=>l.next(M))),actionSetSubtitle$:j},ue=new Qn,x=new Qn,G={actionSeek$:S,actionSubtitlesSwitched$:ue,actionQuality$:x,playerSize$:new Po(l=>$.subscribe(M=>l.next(M))),inFullscreen$:new Po(l=>de.subscribe(M=>l.next(M))),isLoaderVisible$:new Po(l=>re.subscribe(M=>l.next(M)))};if(_){let{oneStat:l,thinOneStat:M,mediascopePixel:z,statSubscription:K}=_;l&&(K.add(l.attachToUi(X)),K.add(l.attachToAds(A.events)),l.authorize(o).catch(be=>{D({message:`onestat auth error ${String(be)}`})}),z&&z.attachTo(f)),M&&(K.add(M.attachTo(f,A.events)),K.add(M.attachToUi(G)),K.add(M.attachToAds(A.events)),M.updateContext({isMobile:_e(xe)}),M.authorize(o))}let ie=()=>{if(Kl.device.isIOS&&ae)try{Hl(ae)}catch(l){D({message:`exitIosSafariFullscreen failed: ${l}`})}};H.add(f.experimental.element$.subscribe(l=>{l&&(ae=l,l.classList.add("player-media"))})).add(f.events.ended$.subscribe(()=>{ie(),u?.onEnded?.()})).add(f.events.looped$.subscribe(()=>{u?.onLooped?.()})).add(f.events.started$.subscribe(async()=>{let l=f.info.muted$.getValue();u?.onStarted?.(),P.onStarted?.(l)})).add(f.events.willSeek$.subscribe(({from:l,to:M})=>{u?.onSeek?.(l,M)})).add(f.events.autoplaySoundProhibited$.subscribe(()=>{u?.onAutoplaySoundProhibited?.()})).add(f.info.position$.subscribe(l=>{let M=f.info.duration$.getValue();isFinite(M)&&M>0&&(u?.onTimeupdate?.(M,l),A.setPosition(l,M))})).add(f.events.fatalError$.subscribe(l=>{u?.onCrashed?.(l?`${l.id}: ${l.message}`:void 0)})).add(f.events.fetcherRecoverableError$.subscribe(l=>{u?.onRecoverableError?.(l?`${l.id}: ${l.message}`:void 0)})).add(f.events.loadedMetadata$.subscribe(()=>{F.set(!0)})).add(f.info.liveTime$.subscribe(l=>{u?.onLiveTime?.(l)})).add(f.info.isStalled$.subscribe(l=>{u?.onStalledChanged?.(l)})).add(f.info.isLiveEnded$.subscribe(l=>l&&u?.onLiveEnded?.())).add(A.events.loadStarted$.subscribe(()=>u?.adsInfo?.onLoadStarted?.())).add(A.events.loadEnded$.subscribe(()=>u?.adsInfo?.onLoadEnded?.())).add(A.events.loadError$.subscribe(()=>u?.adsInfo?.onLoadError?.())).add(A.events.init$.subscribe(()=>u?.adsInfo?.onInit?.())).add(A.events.ready$.subscribe(()=>u?.adsInfo?.onReady?.())).add(A.events.started$.subscribe(l=>u?.adsInfo?.onStarted?.(l))).add(A.events.timeRemained$.subscribe(l=>u?.adsInfo?.onTimeRemained?.(l))).add(A.events.ended$.subscribe(l=>u?.adsInfo?.onCompleted?.(l))).add(A.events.empty$.subscribe(()=>u?.adsInfo?.onEmpty?.())).add(A.events.clicked$.subscribe(l=>u?.adsInfo?.onClicked?.(l))).add(A.events.closed$.subscribe(l=>u?.adsInfo?.onClosed?.(l))).add(A.events.error$.subscribe(l=>u?.adsInfo?.onError?.(l))).add(A.events.paused$.subscribe(()=>u?.adsInfo?.onPaused?.())).add(A.events.resumed$.subscribe(()=>u?.adsInfo?.onResumed?.()));let Re=Bt(f.info.position$.getValue(),l=>{let M,z,K=()=>{let be=f.info.playbackState$.getValue(),Ve=f.info.isLive$.getValue(),Pe=f.info.duration$.getValue(),We=f.info.position$.getValue();if(be&&[Hn.PLAYING,Hn.PAUSED].includes(be)){let Ct=Ve?We-Pe:f.getExactTime();Ct!==z&&l(Ct),z=Ct}M=requestAnimationFrame(K)};return K(),()=>cancelAnimationFrame(M)}),$e=Oe(f.info.playbackState$),Je=Oe(f.info.isBuffering$),Be=tt([$e,Je],([l,M])=>M?"buffering":l),nt=Oe(f.info.currentBuffer$),Ke=Oe(f.info.isEnded$),ai=Oe(f.info.isLive$),Qt=T.features.playbackRate?Oe(f.info.canChangePlaybackSpeed$):Bt(!1),si=Oe(f.info.liveBufferTime$),fi=Oe(f.info.volume$),Li=Oe(f.info.muted$),Si=So(f.info.predefinedQualityLimitType$.pipe(Zl(l=>l===Di.TRAFFIC_SAVING)),f.info.predefinedQualityLimitType$.getValue()===Di.TRAFFIC_SAVING),He=So(f.info.predefinedQualityLimitType$.pipe(Zl(l=>l===Di.HIGH_QUALITY)),f.info.predefinedQualityLimitType$.getValue()===Di.HIGH_QUALITY),Ue=Oe(f.info.autoQualityLimitingAvailable$),Xe=Oe(f.info.availableQualities$),Uo=Oe(f.info.availableQualitiesFps$),Yi=Oe(f.info.chromecastState$),vt=Oe(f.info.chromecastDeviceName$),qe=Oe(f.info.currentFormat$),Bi=Oe(f.info.throughputEstimation$),Wi=Oe(f.info.videoBitrate$),ed=Oe(f.info.intrinsicVideoSize$),ma=Oe(f.info.duration$),td=Oe(f.info.isAudioAvailable$),id=()=>{U&&clearTimeout(U),U=null},Wn=tt([ma,ai],([l,M])=>M?-l:l),ha=tt([$e],([l])=>l===Hn.PLAYING),va=Oe(f.info.atLiveEdge$),ga=Oe(f.info.atLiveDurationEdge$),_a=Oe(f.info.position$),nd=tt([_a,ma],([l,M])=>isFinite(l)&&isFinite(M)&&!!M),od=tt([Yi],([l])=>l===$p.CONNECTED),rd=Oe(f.info.availableVideoStreams$),ya=T.features.audioLanguages?Oe(f.info.availableAudioStreams$):Bt([]),ad=Oe(f.info.currentVideoStream$),ba=Oe(f.info.currentAudioStream$),sd=l=>{l.language&&Il(l.language),f.setVideoStream(l)},Aa=l=>{f.setAudioStream(l)},xa=l=>{let M;if(l.length===1&&(M=l.at(0)),M??=l.find(K=>"isDefault"in K&&K.isDefault),T.features.userVideoPrefs&&i){let K=wo(T.userSalt,String(i));K?.audioTrackId&&(M=l.find(Ve=>Ve.id===K.audioTrackId)??M)}let z=wl();return z&&(M??=l.find(({language:K})=>z===K)),M??=l.at(0),M},ld=l=>{E.log("change audio stream",{id:l});let M=f.info.availableAudioStreams$.getValue().find(z=>z.id===l);M&&Aa(M)},Ea=!1;H.add(f.info.availableAudioStreams$.subscribe(l=>{if(!Ea&&l.length){let M=xa(l);M&&(f.setAudioStream(M),Ea=!0)}})),ya.subscribe(l=>{u?.onAvailableAudioStreamsChanged?.(l.map(({label:M="",id:z="",language:K=""})=>({label:M,language:K,id:z})))}),ba.subscribe(l=>l&&u?.onAudioStreamChanged?.(l.id));let Sa=!1;H.add(f.info.availableVideoStreams$.subscribe(l=>{if(!Sa&&l.length){let M=xa(l);M&&(f.setVideoStream(M),Sa=!0)}}));let Gn=V(void 0),Ta=Oe(f.info.isAutoQualityEnabled$,l=>l&&Gn.set(void 0)),dd=Oe(f.info.currentQuality$,()=>Gn.set(void 0)),Ma=tt([Gn,dd],([l,M])=>l??M),wa=tt(qe,l=>l!==Oo.MPEG),ud=tt([Xe,Uo,Ta,Ma,wa],([l,M,z,K,be])=>{let Ve=[];be&&Ve.push({value:"auto",displayValue:Me("auto_quality_option"),selected:z});let Pe=l.filter(We=>!Vp(We));for(let We of Pe){let Ct=M[We];Ve.push({value:We,displayValue:`${We}${Ct?Yl(Ct):""}`,selected:z?!1:We===K})}return Ve}),zo=Oe(f.info.currentPlaybackRate$),Fo=tt([zo,va,ga],([l,M,z])=>{let K=z?1:T.controls.playbackRateMin,be=M?1:T.controls.playbackRateMax,Ve=T.controls.playbackRateStep,Pe=[];for(let We=K;We<=be;We+=Ve)Pe.push({value:We,displayValue:We===1?Me("playback_rate_1"):Me("playback_rate",{multiplier:We.toString(10)}),selected:l===We});return Pe}),qn=()=>({displayValue:Me("subtitles_off"),value:ri,language:""}),Ia=V(qn()),Ti=tt([Ia,q],([l],M)=>{l.value===ri?M(qn()):M(l)}),Ho=T.features.subtitles?Oe(f.info.availableTextTracks$):Bt([]),ka=bl(),cd=tt([Ho,Ti],([l,M],z)=>{let K=[],be=l.find(({id:Ve})=>Ve===M.value);if(be?.url){let[,Ve]=ka.find(be.url)??[];if(Ve){z(Ve);return}W.download(be.url).then(Pe=>{if(!Pe||W.isDestroyed())return;let We=new Bl,Ct=be.language;if(Ct){let Zo=!!be.isAuto,eu=We.parse(Pe,Ct);K.push({lang:Ct,subtitles:eu,isAuto:Zo,id:be.id})}ka.add(be.url,K),_e(Ti).value===M.value&&z(K)}).catch(()=>{_?.oneStat?.logError({errorType:"Subtitles download",fatal:!1})})}z(K)}),pd=tt([zo,ha,Ti],([l,M,z],K)=>{let Pe;if(f.info.isLive$.getValue()&&M&&z.value!==ri){let Ct=()=>{let Zo=1e3/(3*l);Pe=setTimeout(Ct,Zo),K(Date.now())};return Ct(),()=>clearTimeout(Pe)}}),Na=tt([Ho,Ti],([l,M])=>{if(!l.length)return[];let z=[];for(let{language:K,isAuto:be,id:Ve}of l){let Pe=K&&ca(K);K&&Pe&&z.push({displayValue:be?Me("subtitles_auto",{language:Pe}):Pe,value:Ve,selected:M?.value===Ve,isAuto:be,language:K})}return z.length?(z.unshift({...qn(),selected:M?.value===ri}),z):[]}),mn={available:[],prev:[]},fd=()=>f.experimental.getCurrentTime$.getValue()?.()??ae?.currentTime??0,md=tt([Re,Ti,cd,pd],([l,M,z,K])=>{let be=f.info.isLive$.getValue();if(be&&mn.prev!==z){let Ve=z.find(({id:We})=>We===M.value),Pe=mn.prev.find(({id:We})=>We===M.value);if(Ve){let We={...Ve,subtitles:[...Pe?.subtitles??[],...Ve.subtitles]};mn.available=[We],mn.prev=z}}if(M&&M.value!==ri){let Ve=be?fd():l,Pe=be?mn.available:z;return ql(Ve,M,Pe,be)}}),hd=tt([md],([l])=>l?.texts?l.texts:[]);H.add(Ti.subscribe(l=>{if(l.value===ri)u?.onSubtitleOff?.();else{let M=Object.entries(Co).find(([z,K])=>K===l.displayValue);u?.onSubtitleOn?.(M?M[0]:"",l.value)}}));let vd=V(!0),gd=tt([nt,Wn,_a,si],([l,M,z,K])=>{let be=l?.end??0;if(!K)return be/M;let Pe=-z+K-M;return(be-Pe)/M}),Da=Oe(f.info.availableSources$),_d=tt([Da],([l])=>Object.keys(l?.[Oo.MPEG]||{}).length>0),yd=()=>{let l=Object.keys(f.info.availableSources$?.getValue()?.[Oo.MPEG]||{}),M=Pp(l)||Yp.Q_144P;return Z.sources[Oo.MPEG]?.[M]},bd=()=>{let l=yd();if(l)E.log("download video",{url:l}),yl(l,Z?.meta?.title||"video");else{let M="There is no URL for download video";E.log("download video",{message:M}),D({message:M})}},Ad=()=>{D({message:"toggle muted"});let l=f.info.muted$.getValue();f.info.volume$.getValue()===0&&!l?Yo(Qo()):hn(!l)},xd=()=>{Ye.ui.settingsMenu.visible$.set(!1),E.log("close settings menu")},Ed=async(l,M=()=>Promise.resolve())=>{Ye.ui.settingsMenu.visible$.set(!0),await M(),E.log("open settings menu",{wasOpenedByKeyboard:l})},Qo=()=>{let l=Math.max(T.volumeMinRestore,To()??0);return l===0?T.volumeDefault:l},Yo=l=>{let M=l===0?Qo():l,z=f.info.muted$.getValue();D({message:`set volume, volume: ${l}, preferredVolume: ${M}`});let K=!r||je.is("ads");z&&l>0&&K&&(z=!1),f.setVolume(l,z),A.setVolume(l)},hn=l=>{let M=f.info.volume$.getValue();D({message:`set muted, currentVolume: ${M}, mute: ${l}`});let z=je.is("ads");if(f.setMuted(l,z),A.setVolume(l?0:M),!l&&M===0){let K=Qo();f.setVolume(K),A.setVolume(K)}},La=V(!1),Ca=l=>{E.log("set looped",{isLooped:l}),La.set(l),f.setLooped(l)};Ca(g);let Sd=()=>{f.prepare()},Td=()=>{Ht(Ye);let l=_e(Ye.playerPhase),M={playerPhase:l,isVideoEnded:!1,action:"none"};if(D({message:"toggle play"}),l==="ads"){M.action="play",E.log("toggle adman play",M),A.togglePlay();return}let z=()=>{D({message:"toggle play, call player.play"}),M.action="play",f.play(),u?.onPlay?.()},K=()=>{D({message:"toggle play, call player.pause"}),M.action="pause",f.pause(),u?.onPause?.()};f.info.isEnded$.getValue()?(D({message:"toggle play, video ended, seek to 0"}),Ce.next(),S.next(Yn.REWIND),f.seekTime(0),z()):f.info.playbackState$.getValue()!==Hn.PLAYING?z():K(),E.log("toggle play",M)},$a=(l,{byUser:M=!1}={})=>{D({message:`set quality, quality: ${l}`}),E.log("set quality",{quality:l}),M&&x.next(l),f.setAutoQuality(l==="auto"),Mo(),l!=="auto"&&(Fr(i,l),Gn.set(l),f.setQuality(l))},Oa=l=>{D({message:`set trafficSavingEnabled, value: ${l}`}),E.log("set traffic saving enabled",{trafficSavingEnabled:l});let M=l?Di.TRAFFIC_SAVING:Di.UNKNOWN;f.setPredefinedQualityLimits(M)},Pa=l=>{D({message:`set highQualityEnabled, value: ${l}`}),E.log("set high quality enabled",{highQualityEnabled:l}),Md(l?Di.HIGH_QUALITY:Di.UNKNOWN)},Md=l=>{f.setPredefinedQualityLimits(l)},Bo=(l,M=!0)=>{E.log("set playback rate",{playbackRate:l}),f.setPlaybackRate(l),T.features.saveRate&&v&&!f.info.isLive$.getValue()&&M&&kl(l)},wd=()=>{let l=_e(Qt),M=_e(Fo),z=M.findIndex(({selected:be})=>be);if(z===M.length-1||!l)return M[z];let K=M[z+1];return Bo(K.value),K},Id=()=>{let l=_e(Qt),M=_e(Fo),z=M.findIndex(({selected:be})=>be);if(z===0||!l)return M[z];let K=M[z-1];return Bo(K.value),K},Wo=(l={...qn(),selected:!1})=>{E.log("set subtitles",{...l}),l.value!==ri&&j.next(l.isAuto?l.value+"_auto":l.value),ue.next({enabled:l.value!==ri,lang:l.language,auto:!!l.isAuto}),Ia.set(l)},Ra=l=>{E.log("toggle subtitles"),_e(Ti)?.value===ri?Va(l):ja()},kd=(l,M)=>{E.log("change subtitle",{enabled:l}),l?Va(!0,M):ja()},Va=(l,M)=>{E.log("subtitle on");let z=_e(Na),K=_e(se),be=te??K,Ve;M&&(Ve=z.find(Pe=>Pe.value===M)),Ve??=z.filter(Pe=>Pe.value!==ri).find(Pe=>Pe.language===be),Wo(Ve??z[1])},ja=()=>{E.log("subtitle off"),Wo(void 0)};H.add(f.info.availableTextTracks$.subscribe(l=>{function M(){let z=[];for(let{language:K,isAuto:be,id:Ve}of l){let Pe=K&&ca(K);K&&Pe&&z.push({id:Ve,language:K,title:be?Me("subtitles_auto",{language:Pe}):Pe})}return z}u?.onAvailableSubtitlesChanged?.(M())}));let Ua=V(!0),za=l=>{Ua.set(l)},Fa=(l,M,z=!0)=>{if(D({message:`seek to time, time: ${l}`}),E.log("seek to time",{time:l,action:M,forcePrecise:z}),S.next(M),f.info.isLive$.getValue()){let K=f.info.duration$.getValue(),be=Math.min(0,K+l);f.seekTime(be,z)}else f.info.isEnded$.getValue()&&(D({message:"seek after ended, call callbacks.onPlay"}),u?.onPlay?.()),f.seekTime(l,z)},Ha=(l,M,z=!1)=>{D({message:`seek to percent, percent: ${l}`}),E.log("seek to percent",{percent:l,action:M});let K=_e(Wn)*l;Fa(K,M,z)},Nd=l=>{D({message:`seek external, time: ${l}`}),E.log("seek external",{time:l}),S.next(Yn.UNKNOWN),f.seekTime(f.info.isLive$.getValue()?-l:l)},Dd=l=>{let M=l.max??"none",z=l.min??"none";D({message:`set auto quality limitation. Max: ${M}. Min: ${z}`}),E.log("set auto quality limits",{max:M,min:z}),f.setAutoQualityLimits(l)},Ld=l=>{D({message:`set playback rate to: ${l}`}),E.log("set playback rate external",{playbackRate:l}),f.setPlaybackRate(l)},Go=V(void 0),qo=V(!1),Cd=l=>{D({message:`start scrubbing, progress: ${l}`}),E.log("start scrubbing",{progress:l}),qo.set(!0),Qa(l)},Qa=l=>{Go.set(l)},$d=()=>{Go.set(void 0),qo.set(!1)},Od=(l,M=!1)=>{D({message:`complete scrubbing, progress: ${l}`}),E.log("complete scrubbing",{progress:l}),Ha(l,Yn.SLIDER,M),$d()},Pd=tt([Re,Wn,Go],([l,M,z],K)=>{K(jp(z)?z*M:l)}),Ko=V(!1),Rd=()=>{Ko.set(!0)},Vd=()=>{Ko.set(!1)},jd=l=>{S.next(Yn.LIVE),D({message:"live switch to low latency "+l}),E.log("live switch to low latency "+l),f.setLiveLowLatency(l)},Ud=()=>{S.next(Yn.LIVE),D({message:"switch to active live"}),E.log("switch to active live"),f.seekTime(0),f.info.playbackState$.getValue()!==Hn.PLAYING&&Ye.actions.internal.togglePlay()},zd=()=>{E.log("skip adman"),A.skip()},Fd=(l=!0)=>{Ht(Ye),D({message:`switch from ads to video, callPlay: ${l}`}),E.log("switch from ads to video",{callPlay:l}),Ie.set("video"),l&&f.play(),r&&hn(!0);let M=_e(b)?.muted,z=!f.info.muted$.getValue();M!==void 0&&!z&&hn(M),b.set(void 0)},Hd=()=>{Ht(Ye),D({message:"switch from video to ads"}),E.log("switch from video to ads"),Ye.actions.internal.pause(),ie(),Ie.set("ads")},Qd=l=>{Ht(Ye);let M=l?"LiveWaitingStart":"thumb";E.log("set live waiting start",{state:l,playerPhase:M}),Ie.set(M)},Yd=l=>{Ht(Ye);let M=l?"LiveWaitingRecover":"thumb";E.log("set live waiting recover",{state:l,playerPhase:M}),Ie.set(M)},Bd=l=>{Ht(Ye);let M=l?"LiveWaitingRecord":"thumb";E.log("set live waiting record",{state:l,playerPhase:M}),Ie.set(M)},Wd=()=>(Ht(Ye),E.log("get debug text data"),gl(f,Z,Ye,w.getTraceId(),k)),Gd=()=>(Ht(Ye),JSON.stringify(w.getFinishedSpans())),qd=()=>(Ht(Ye),_l(f,Z,Ye)),Kd=()=>ae,Ya=l=>{if(Ht(Ye),f.info.isEnded$.getValue())return;let M=!l;if(_e(Ye.playerPhase)==="ads"){D({message:`pause ads, internalCall: ${M}`}),E.log("pause ads",{internalCall:M}),A.pause();return}D({message:`pause video, internalCall: ${M}`}),E.log("pause video",{internalCall:M}),M&&u?.onPause?.(),f.pause()},Ba=l=>{Ht(Ye);let M=!l;if(_e(Ye.playerPhase)==="ads"){D({message:`play ads, internalCall: ${M}`}),E.log("play ads",{internalCall:M}),A.play();return}D({message:`play video, internalCall: ${M}`}),E.log("play video",{internalCall:M}),M&&u?.onPlay?.(),f.play()},Zd=l=>{Ht(Ye);let M=!l;if(_e(Ye.playerPhase)==="ads"){D({message:"player cannot be stopped during ads via external method"});return}D({message:`player will be stopped, internalCall: ${M}`}),m?.()},Wa=(l,M)=>{Ht(Ye),D({message:`first start, show ads: ${l}, internalCall: ${!M}`}),E.log("first start",{showAds:l,external:M}),l?Ie.set("ads"):(Ie.set("video"),M?f.play():Ye.actions.internal.togglePlay())},Jd=()=>(D({message:"getting preview thumbs data"}),E.log("get preview thumbs data",{...h}),h),Xd=()=>{E.log("destroy store"),H.unsubscribe(),f.destroy(),A.destroy(),_?.destroy(),Se.unsubscribe(),W.destroy()},Ye={interfaceLanguage$:se,isCyrillicRelatedInterface$:ce,initVideo:ke,videoId:i,playerPhase:je,vsid:J,state:{positionExact$:Re,positionWithScrubbing$:Pd,duration$:Wn,playbackState$:$e,playbackStateRealistic$:Be,isPlaying$:ha,isLoaderVisible:re,bufferedProgress$:gd,isLive$:ai,canChangePlaybackSpeed$:Qt,isActiveLive$:va,isOldestAvailableLive$:ga,isRewindableLive$:nd,isEnded$:Ke,muted$:Li,volume$:fi,trafficSavingEnabled$:Si,highQualityEnabled$:He,autoQualityLimitingAvailable$:Ue,availableVideoStreams$:rd,availableAudioStreams$:ya,videoStream$:ad,audioStream$:ba,currentQuality$:Ma,isAutoQualityEnabled$:Ta,availableQualities$:ud,currentPlaybackRate$:zo,availablePlaybackRates$:Fo,currentSubtitle$:Ti,availableTextTracks$:Ho,availableSubtitlesList$:Na,currentSubtitleCaptions$:hd,isAutoSubtitleCaptionVisible$:vd,chromecastState$:Yi,chromecastDeviceName$:vt,chromecastConnected$:od,currentFormat$:qe,throughputEstimation$:Bi,videoBitrate$:Wi,videoSize$:ed,errorLog$:Le,crashed$:le,isAudioAvailable$:td,isAudioDisabled:!!r,canDownload:T.features.download&&!!s,availableSources$:Da,hasMpegSources$:_d,looped$:La,loadedMetadata$:F,isAutoQualityAvailable$:wa},ui:{t:Me,controlsVisible:V(!1),touched:V(!1),controls:{prevButton:V(void 0),playButton:V(void 0),replayButton:V(void 0),nextButton:V(void 0),playPrevChapterButton:V(void 0),seekToInteractiveButton:V(void 0),interactiveGraphButton:V(void 0),liveButton:V(void 0),time:V(void 0),episodes:V(void 0),volume:V(void 0),subtitles:V(void 0),settings:V(void 0),context:V(void 0),chromecast:V(void 0),pip:V(void 0),fullscreen:V(void 0),vkLogo:V(void 0),interactiveTimeIndicator:V(void 0),timeline:V(void 0),autoplayNextToggle:V(void 0)},modals:{hotKeyMap:{show:V(!1),data:V({title:"",closeBtnText:"",groups:[]})}},isFullscreen:de,isFullscreenOpenedByKeyboard:Y,isAutoplay:V(!1),debugPanelVisible:V(!1),episodes:{panelOpened$:V(!1),openedByKeyboard$:V(!1)},contextMenu:{visible$:V(!1),btnRef$:V(void 0),openedByBtnKeyboard$:V(!1),openedByHotKey$:V(!1),lastActiveElem$:V(void 0),showContextMenuBtn$:V(!1),position$:V({top:0,left:0})},playerSize:$,isMobile:xe,icon3DVideoVisible:V(!1),scrubbingInProgress:qo,volumeChangingInProgress:Ko,interactiveHideMobileControls:V(!1),overlayContainer$:V(void 0),startedByKeyboard$:V(!1),autoplayNextEnabled$:V(!1),timerNextVideoRunning$:V(!0),settingsMenu:{visible$:V(!1),ref$:V(void 0),openedByBtnKeyboard$:V(!1)},settingsSubMenu:{visible$:V(!1),ref$:V(void 0),name$:V(void 0)},userActionsDisabled:V(!1),hiddenControls:{volume:V(!1),vkLogo:V(!1),pip:V(!1),chromecast:V(!1),settings:V(!1)},isControlsAvailable:Ua,controlBlocks:{topLeft:V(void 0),topRight:V(void 0),middle:V(void 0),bottom:V(void 0),bottomLeft:V(void 0),bottomRight:V(void 0)},videoTitleInfo:V(void 0),previewTrackNotificationVisible:V(!1)},ads:{position:V(0),duration:V(0),playbackState:V("inactive"),canSkip:V(!1),secondsToWatchBeforeSkip:V(0),postrollPassed:V(!1)},webApi:{focusManager:O},actions:{internal:{preload:Sd,firstStart:l=>Wa(l,!1),play:()=>Ba(!1),pause:()=>Ya(!1),togglePlay:Td,toggleMuted:Ad,openSettingsMenu:Ed,closeSettingsMenu:xd,setVolume:l=>Yo(l),setMuted:l=>hn(l),startVolumeChanging:Rd,stopVolumeChanging:Vd,setVideoStream:sd,setAudioStream:l=>Aa(l),setQuality:(l,M)=>$a(l,M),setTrafficSavingEnabled:l=>Oa(l),setHighQualityEnabled:l=>Pa(l),setPlaybackRate:Bo,incrementPlaybackRate:wd,decrementPlaybackRate:Id,setSubtitle:l=>Wo(l),toggleSubtitle:()=>Ra(!1),startScrubbing:Cd,progressScrubbing:Qa,completeScrubbing:Od,switchToActiveLive:Ud,switchFromAdsToVideo:Fd,switchFromVideoToAds:Hd,skipAd:zd,setLiveWaitingStart:Qd,setLiveWaitingRecover:Yd,setLiveWaitingRecord:Bd,getDebugTextData:Wd,getTraceTextData:Gd,getDebugPanelData:qd,getVideoElement:Kd,seekTime:(l,M,z)=>Fa(l,M,z),clearDelayedBufferingCheckTimeout:id,seekToPercent:Ha,getPreviewThumbsData:Jd,downloadVideo:bd,addLanguage:Br,setLanguage:C,setLooped:Ca,checkFullscreenSupport:he},external:{firstStart:l=>Wa(l,!0),play:()=>Ba(!0),pause:()=>Ya(!0),stop:()=>Zd(!0),seekTime:l=>Nd(l),setPlaybackRate:l=>Ld(l),setAutoQualityLimits:l=>Dd(l),setMuted:l=>hn(l),toggleSubtitle:()=>Ra(!0),changeSubtitle:kd,setVolume:l=>Yo(l),setLiveLowLatency:jd,hideControls:()=>za(!1),showControls:()=>za(!0),setQuality:l=>$a(l),setTrafficSavingEnabled:l=>Oa(l),setHighQualityEnabled:l=>Pa(l),changeAudioStream:ld}},callbacks:u,setUiCallbacks:l=>{P={...l}},getAdmanWrapper:()=>A,getLogger:()=>B,getPlayer:()=>f,destroy:Xd};return Ye};import{now as qp,ValueSubject as Kp}from"@vkontakte/videoplayer-shared";import{cloneDeepWith as Zp,InterfaceLanguage as Jp,Observable as Xp,Subscription as ef,InternalsExposure as tf,skip as nf,getPlayerId as of}from"@vkontakte/videoplayer-shared";import{clientChecker as rf}from"@vkontakte/videoplayer-core";import{OneStat as af,ThinOneStat as sf,MediascopePixel as lf}from"@vkontakte/videoplayer-statistics";function Bn(e,t){let i=new Set([...Object.keys(e),...Object.keys(t)]),n={};for(let o of i)n[o]=t[o]??e[o]??void 0;return n}import{devNull as fa}from"@vkontakte/videoplayer-shared";var Ro=class{constructor(t){this.getActiveElement=t;this.focusableElements=[];this.isActive=!1;this.handleTabKey=t=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let i=this.focusableElements[0],n=this.focusableElements[this.focusableElements.length-1],o=this.getActiveElement();t.shiftKey&&o===i?(t.preventDefault(),n.focus()):!t.shiftKey&&o===n&&(t.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 t=["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(t)).filter(i=>!i.disabled&&i.offsetParent!==null)}destroy(){this.deactivate()}setContainer(t){this.container=t}};var Vo=class{constructor(t){this.shadowRoot=t;this.lastFocusedNode=null;this.init=()=>{this.shadowRoot.addEventListener("focusin",this.handleFocusChange)};this.handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};this.restoreFocus=()=>{this.lastFocusedNode?.focus()};this.focusLock=new Ro(()=>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(t){this.focusLock.setContainer(t)}};import{getWindow as Gp}from"@vkontakte/videoplayer-shared";var pa=Gp().HTMLElement||class{constructor(){this.isConnected=!1}};var df={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:Jp.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},Xl=Fe(void 0),jo=class extends pa{svelteStubComponent;svelteRootComponent;svelteErrorComponent;store;statistics;_shadowRoot;playerContainer;rootContainer;stateContainer;shadowRootContainer;playerId;uiConfig;coreConfig;statisticsConfig;metaConfig;currentPlayingVideoIndex=0;videoConfig=void 0;subscription;focusManager;prevIsid=void 0;isInited=!1;postponedInitParams=null;internalsExposure=null;fatalError$=new Kp(null);constructor(){super(),this.subscription=new ef,this.fatalError$.subscribe(t=>{this.unmountComponent(this.svelteErrorComponent),t&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Ii(ra,{target:this.playerContainer}))})}connectedCallback(){if(this.rootContainer)return;this.initPlayerRootContainers();let t=this.getAttribute("stub-title")??void 0,i=this.getAttribute("stub-thumb-url")??void 0,n=yt({title:t,thumbUrl:i}),o={target:this.playerContainer,props:n};this.svelteStubComponent=Ii(oa,o),this.postponedInitParams&&(this.initPlayer(...this.postponedInitParams),this.postponedInitParams=null)}disconnectedCallback(){this.focusManager?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.subscription.unsubscribe(),this.internalsExposure?.destroy()}initPlayerRootContainers(){this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.className="root-container",this.rootContainer.style.width="100%",this.rootContainer.style.height="100%",this.rootContainer.style.minHeight="206px",this.shadowRootContainer=document.createElement("div"),this.shadowRootContainer.style.position="absolute",this.shadowRootContainer.className="shadow-root-container",this.shadowRootContainer.style.width="100%",this.shadowRootContainer.style.height="100%",this._shadowRoot=this.shadowRootContainer.attachShadow({mode:"open"}),this.playerContainer=document.createElement("div"),this.playerContainer.style.all="initial",this.playerContainer.style.display="block",this.playerContainer.style.contain="strict",this.playerContainer.style.width="100%",this.playerContainer.style.height="100%",this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement("div"),this.stateContainer.className="state-container",this.stateContainer.style.width="1px",this.stateContainer.style.height="1px",this.stateContainer.style.position="absolute",this.stateContainer.style.backgroundColor="transparent",this.stateContainer.style.left="-100000px",this.append(this.rootContainer),this.append(this.stateContainer)}createOneStat=(t,i={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:o,statUserSalt:r,statTrackCode:s,statVKAppId:u,refreshStatAuthToken:c,autoplay:h,isTouch:p,refDomain:a,deviceId:d}=Bn(this.videoConfig,i),{unitedVideoId:m,isClip:g=!1}=t;if(this.uiConfig.features.statistics&&m)try{return new af({movieId:m,albumId:n,place:o,trackCode:s,vkAppId:u,autoplay:h??!1,mobile:p,clip:g,refDomain:a,deviceId:d,isPreviewPlayerView:!1},{refreshAuthToken:c,userSalt:r,config:this.statisticsConfig})}catch(v){console.error(v)}};createThinOneStat(t,i={}){if(!this.videoConfig)return;let{deviceId:n,preload:o,refreshStatAuthToken:r}=Bn(this.videoConfig,i),{unitedVideoId:s}=t;if(this.uiConfig.features.thinStatistics&&s)return new sf.ThinOneStat({deviceId:n,movieId:s,preload:o,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:r})}createPlayer(t,i={},n){if(!this.videoConfig)return;let{statAuthToken:o,preload:r,autoplay:s,volume:u,muted:c,fromTime:h,canRewindLive:p,supportLink:a,showAds:d,adsSlotId:m,adsParams:g={},adsAutoplayParam:_,interfaceLanguage:v,isCyrillicRelatedInterface:L,isAudioDisabled:N,isLiveCatchUpMode:k,fullScreenTarget:y,failoverHosts:T,canDownload:w,callbacks:E,saveRate:f,volumeMultiplier:B,showEndScreen:A,mediascopePixels:O}=Bn(this.videoConfig,i),{sources:D,title:Z,thumbUrl:ae,unitedVideoId:P,duration:W,adsParams:H={},previewThumbsData:te,subtitles:xe,subtitlesForcedLanguage:J,live:de,adsExternalApi:Y}=t;if(!D&&!de){let se=new Error("empty sources and live");this.fatalError$.next(se),E?.onCrashed?.(se.message);return}let he={...g,...H},F={focusManager:this.focusManager},Le=this.createOneStat(t,i),Se=this.createThinOneStat(t,i),le;O&&(le=new lf({pixels:O})),(Le||Se)&&(this.statistics=new $o(Le,Se,le)),this.store=Jl({player:n,interfaceLanguage:v,isCyrillicRelatedInterface:L,videoId:P,isLiveCatchUpMode:k,isAudioDisabled:N,statAuthToken:o,callbacks:E,webApi:F,previewThumbsData:te,canDownload:w,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:f,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let C=()=>{if(!this.store||!this.videoConfig)return;this.subscription.add(this.store.state.currentFormat$.subscribe(q=>E?.onCurrentFormatChanged?.(q))),this.subscription.add(this.store.state.throughputEstimation$.subscribe(q=>E?.onThroughputEstimationChanged?.(q))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(q=>E?.onTrafficSavingEnabledChanged?.(q))),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(q=>E?.onHighQualityEnabledChanged?.(q))),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(q=>E?.onAutoQualityEnabledChanged?.(!!q))),this.subscription.add(new Xp(q=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(ce=>q.next(ce)))}).pipe(nf(1)).subscribe(q=>E?.onCurrentPlaybackRateChanged?.(q))),this.subscription.add(this.store.state.volume$.subscribe(q=>E?.onVolumeChange?.(q))),this.subscription.add(this.store.state.muted$.subscribe(q=>{if(q)E?.onMute?.();else{let ce=(this.store?.state.volume$&&_e(this.store.state.volume$))??0;E?.onUnmute?.(ce)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(q=>E?.onVideoBitrateChanged?.(q))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(q=>E?.onVSIDChanged?.(q))),Ee(Xl,{sources:D,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:Z,thumbUrl:ae,subtitles:xe,subtitlesForcedLanguage:J,live:de,preload:r,autoplay:s,muted:c,volume:u,fromTime:h,canRewindLive:p,supportLink:a,showAds:d,adsSlotId:m,adsParams:he,adsAutoplayParam:_,duration:W,failoverHosts:T,fullScreenTarget:y,saveRate:f,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:B,showEndScreen:A,adsExternalApi:Y,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0);let se={target:this.playerContainer,props:R(Xl)};this.svelteRootComponent=Ii(ia,se),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?fa.subscribe("ui",this.videoConfig.callbacks.onDevNullLog):fa.destroy("ui")};this.coreConfig.asyncResolveClientChecker?rf.isInited$.subscribe(se=>{se&&(console.log("UI TV SDK async start"),C())}):C()}initPlayer(t,i={}){if(!this.isConnected){this.postponedInitParams=[t,i];return}if(!Array.isArray(t.videos)||t.videos.length===0){let n=new Error("empty videos");this.fatalError$.next(n),t.callbacks?.onCrashed?.(n.message);return}else this.fatalError$.next(null);this.videoConfig=Bn(df,Zp(t,n=>n instanceof pa?n:void 0)),this.playerId=of(t.playerId),this.uiConfig=dl(i.ui??{}),this.coreConfig=i.core??{},this.statisticsConfig=i.statistics??{},this.metaConfig=i.meta,this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new tf("ui",this.playerId)),fa.push("ui",{key:"videoplayer_embed",strings:["new","player_init_player","ads.enable: "+this.uiConfig.ads.enable,"showAds: "+this.videoConfig?.showAds],numbers:[qp()]}),this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.focusManager=this._shadowRoot?new Vo(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex])}play(){this.store?.playerPhase.is("LiveWaitingStart")||this.store?.playerPhase.is("LiveWaitingRecover")||this.store?.playerPhase.is("LiveWaitingRecord")||this.svelteRootComponent?.play()}pause(){this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.unmountComponent(this.svelteStubComponent);let t=this.videoConfig.videos[0];t&&(this.unmountComponent(this.svelteRootComponent),this.createPlayer(t))}setMuted(t){this.svelteRootComponent?.setMuted(t)}toggleSubtitle(){this.svelteRootComponent?.toggleSubtitle()}changeSubtitle(t,i){this.svelteRootComponent?.changeSubtitle(t,i)}setVolume(t){this.svelteRootComponent?.setVolume(t)}seekTime(t){this.svelteRootComponent?.seekTime(t)}setPlaybackRate(t){this.svelteRootComponent?.setPlaybackRate(t)}setAutoQualityLimits(t){this.svelteRootComponent?.setAutoQualityLimits(t)}setAutoQuality(){this.svelteRootComponent?.setAutoQuality()}toggleTrafficSaving(t){this.svelteRootComponent?.toggleTrafficSaving(t)}toggleHighQuality(t){this.svelteRootComponent?.toggleHighQuality(t)}changeAudioStream(t){this.svelteRootComponent?.changeAudioStream(t)}addLanguage(t){this.store?.actions.internal.addLanguage(t)}async setLanguage(t){await this.store?.actions.internal.setLanguage(t)}setLiveStart(t){this.isLiveTailPlaying()||(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!0}))}setLiveWaitingStart(){this.store?.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){let t=this.store?.getPlayer();if(!t)return!1;let{info:i}=t;return i.canPlayLiveTailBuffer$.getValue()&&!i.isStalled$.getValue()&&!i.atLiveEdge$.getValue()}setLiveWaitingRecover(t=!1){let i=this.isLiveTailPlaying(),n=t||!i,o=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};n&&o(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{n||o(),this.store?.destroy()})}setLiveWaitingRecord(){let i=!this.isLiveTailPlaying(),n=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};i&&n(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{i||n(),this.store?.destroy()})}setLiveEnd(t){let n=!this.isLiveTailPlaying(),o=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(t,{autoplay:!1})};if(n){o();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=o)}setLiveLowLatency(t){this.store?.actions.external.setLiveLowLatency(t)}setLooped(t){this.store?.actions.internal.setLooped(t)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??""}getDeviceId(){return this.statistics?.oneStat?.getDeviceId()??void 0}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateStatContext(t){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(t),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(t))}restoreFocus(){this.focusManager?.restoreFocus()}getTotalViewTime(){return this.statistics?.thinOneStat?.getTotalViewTime()}unmountComponent(t){t&&Vn(t)}};import{InterfaceLanguage as qI,VKNumericLanguage as KI,loadVKLangPack as ZI}from"@vkontakte/videoplayer-shared";import{VideoQuality as XI,VideoFormat as ek}from"@vkontakte/videoplayer-core";var YI=()=>{window.customElements.define("vk-video-player-tv",jo)};export{qI as InterfaceLanguage,xo as VERSION,KI as VKNumericLanguage,ek as VideoFormat,XI as VideoQuality,ZI as loadVKLangPack,YI as registerPlayerWebComponent};
58
+ Audio: ${(G(a).audioCodec||``)??``} ${G(a).audioLanguage?`(${G(a).audioLanguage})`:``}`)),q(e,t)};Ps(k,e=>{(G(a).videoCodec||G(a).audioCodec)&&e(A)});var ee=H(k,2),te=e=>{var t=su(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(()=>Ss(r,G(a).viewport)),q(e,t)};Ps(ee,e=>{G(a).viewport&&e(te)});var ne=H(ee,2),j=e=>{var t=cu(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(()=>Ss(r,G(a).videoSize)),q(e,t)};Ps(ne,e=>{G(a).videoSize&&e(j)});var M=H(ne,2),re=e=>{var t=lu(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(()=>Ss(r,G(a).cdn)),q(e,t)};Ps(M,e=>{G(a).cdn&&e(re)});var ie=H(M,2),ae=e=>{var t=uu(),n=H(V(t),2),r=V(n);L(n),L(t),yo(()=>Ss(r,`${G(a).volume??``} %`)),q(e,t)};Ps(ie,e=>{G(a).volume&&e(ae)});var oe=H(ie,2),se=e=>{var t=du(),n=H(V(t),2),r=V(n);L(n),L(t),yo(e=>Ss(r,`${e??``} s`),[()=>G(a).position.toFixed(2)]),q(e,t)};Ps(oe,e=>{G(a).position&&e(se)});var ce=H(oe,2),le=e=>{var t=fu(),n=H(V(t),2),r=V(n);L(n),L(t),yo(e=>Ss(r,`${e??``} s`),[()=>G(a).buffer.toFixed(2)]),q(e,t)};Ps(ce,e=>{G(a).buffer&&e(le)});var ue=H(ce,2),de=e=>{var t=pu(),n=H(V(t),2),r=V(n);L(n),L(t),yo(e=>Ss(r,`${e??``} s`),[()=>G(a).nativeBuffer.toFixed(2)]),q(e,t)};Ps(ue,e=>{G(a).nativeBuffer&&e(de)});var fe=H(ue,2),pe=e=>{var t=mu(),n=H(V(t),2),r=V(n);L(n),L(t),yo(e=>Ss(r,`${e??``} s`),[()=>G(a).liveLatency.toFixed(2)]),q(e,t)};Ps(fe,e=>{G(a).liveLatency&&e(pe)});var me=H(fe,2),he=e=>{var t=hu(),n=H(V(t),2),r=V(n,!0);L(n),L(t),yo(e=>Ss(r,e),[()=>[{value:G(a).currentVideoSegmentLength,title:`Video:`},{value:G(a).currentAudioSegmentLength,title:`Audio:`}].filter(({value:e})=>e).map(({value:e,title:t})=>`${t} ${((e??0)/1e3).toFixed(2)} s`).join(` & `)]),q(e,t)};Ps(me,e=>{(G(a).currentVideoSegmentLength||G(a).currentAudioSegmentLength)&&e(he)});var ge=H(me,2),_e=H(V(ge),2),ve=V(_e);L(_e),L(ge);var ye=H(ge,2),be=e=>{var t=gu(),n=H(V(t),2);Ul(n,{get values(){return G(m)}});var r=H(n,2),i=V(r);L(r),L(t),yo(e=>Ss(i,`${e??``} Kbps`),[()=>G(a).speed.toFixed(2)]),q(e,t)};Ps(ye,e=>{G(a).speed&&e(be)});var xe=H(ye,2),Se=e=>{var t=_u(),n=H(V(t),2);Ul(n,{get values(){return G(h)}});var r=H(n,2),i=V(r);L(r),L(t),yo(e=>Ss(i,`${e??``} Kbps`),[()=>G(a).bitrate.toFixed(2)]),q(e,t)};Ps(xe,e=>{G(a).bitrate&&e(Se)});var Ce=H(xe,2),we=H(V(Ce),2);Ul(we,{get values(){return G(p)}});var Te=H(we,2),Ee=V(Te,!0);L(Te),L(Ce),L(y),L(_),yo(()=>{Ys(_,`aria-label`,g),Ss(S,G(a).version),Ss(ve,`${G(c)??``} / ${G(s)??``} frames`),Ss(Ee,G(l))}),ls(`click`,v,i),q(e,_),Mi()}us([`click`]),vi();var xu=`var(--btn-color, #fff)`,Su=vs(`<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),Cu=vs(`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill-rule="evenodd" clip-rule="evenodd"><!></svg>`);function wu(e,t){ji(t,!0);let n=X(t,`width`,19,()=>`24`),r=X(t,`height`,19,()=>`24`),i=X(t,`fill`,3,xu),a=t.viewBox??`0 0 ${n()} ${r()}`;var o=Cu(),s=V(o),c=e=>{var n=Su(),r=no(n);ks(V(r),()=>t.children),L(r),li(),q(e,n)},l=e=>{var n=ys();ks(no(n),()=>t.children),q(e,n)};Ps(s,e=>{t.shadow?e(c):e(l,!1)}),L(o),yo(()=>{Ys(o,`aria-label`,t.ariaLabel),Ys(o,`aria-hidden`,!t.ariaLabel),Ys(o,`width`,n()),Ys(o,`height`,r()),Ys(o,`viewBox`,a),Ys(o,`fill`,i()),Gs(o,t.style),Ys(o,`data-testid`,t.testId)}),q(e,o),Mi()}var Tu=vs(`<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 Eu(e){wu(e,{width:`200`,height:`200`,viewBox:`460 190 130 90`,testId:`error-icon`,children:(e,t)=>{q(e,Tu())},$$slots:{default:!0}})}var Du=K(`<div class="container s-4"><!></div>`),Ou={hash:`s-4`,code:`.container.s-4 {position:absolute;top:0;bottom:0;left:0;right:0;background:#000;display:flex;align-items:center;justify-content:center;}`};function ku(e){Ls(e,Ou);var t=Du();Eu(V(t),{}),L(t),q(e,t)}var Au=e=>`width:${e}px;height:${e}px;`,ju=vs(`<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 Mu(e,t){ji(t,!0);let n=ba(()=>Au(t.size));wu(e,{get width(){return`48`},get height(){return`48`},get fill(){return t.fill},get style(){return G(n)},testId:`play-icon`,get shadow(){return t.shadow},children:(e,t)=>{q(e,ju())},$$slots:{default:!0}}),Mi()}var Nu=K(`<div class="playButton s-5" tabindex="0" role="button"><div class="playButtonBackground s-5"></div> <!></div>`),Pu=K(`<div data-testid="unstarted-thumb"><!></div>`),Fu={hash:`s-5`,code:`.container.s-5 {position:absolute;top:0;bottom:0;left:0;right:0;background-position:center;background-size:contain;background-repeat:no-repeat;cursor:pointer;transition:opacity 0.2s,
59
+ visibility 0.2s;will-change:opacity;}.container.hidden.s-5 {opacity:0;visibility:hidden;}.container.bgCover.s-5 {background-size:cover;}.playButton.s-5 {position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;width:var(--big-play-size);height:var(--big-play-size);display:flex;align-items:center;justify-content:center;}.playButtonBackground.s-5 {position:absolute;top:0;bottom:0;left:0;right:0;border-radius:var(--big-play-radius);background-color:var(--big-play-bg-color);transition:background 0.2s,
60
+ transform 0.2s;transition-timing-function:ease-out;will-change:background, transform;}.container.s-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 Iu(e,t){ji(t,!0),Ls(e,Fu);let n=X(t,`iconVisible`,3,!0),r=Tc(),i=nu(`tooltip_play`),a=e=>{e.stopPropagation(),t.startVideo?.(),t.onClick?.(e)};var o={handleClick:a},s=Pu();let c;var l=V(s),u=e=>{var t=Nu();Mu(H(V(t),2),{get size(){return`48`}}),L(t),yo(()=>Ys(t,`aria-label`,i)),q(e,t)};return Ps(l,e=>{n()&&e(u)}),L(s),yo(()=>{c=Us(s,1,`container s-5`,null,c,{hidden:t.hidden,bgCover:r.features.previewNoEmptySpace}),Gs(s,`background-color: #222; background-image: url('${t.thumbUrl||``}')`)}),ls(`click`,s,a),ls(`contextmenu`,s,function(...e){t.onContextMenu?.apply(this,e)}),q(e,s),Mi(o)}us([`click`,`contextmenu`]);var Lu=K(`<div><div class="video-container s-7"></div></div>`),Ru={hash:`s-7`,code:`.video-wrapper.s-7,
61
+ .video-container.s-7 {position:absolute;width:100%;height:100%;left:0;top:0;}.video-wrapper.s-7 {z-index:var(--video-container-z-index);background:var(--black);}.video-container.s-7 {z-index:var(--video-container-z-index);transition:var(--rotate-transition-duration) ease all;}`};function zu(e,t){ji(t,!0),Ls(e,Ru);let n=()=>fc(o,`$playerPhase`,r),[r,i]=pc(),a=X(t,`videoContainer`,15),{playerPhase:o}=$c();var s=Lu();let c;ac(V(s),e=>a(e),()=>a()),L(s),yo(()=>c=Us(s,1,`video-wrapper s-7`,null,c,{hidden:n()!==`video`})),q(e,s),Mi(),i()}var Bu=K(`<!> <!> <!> <!>`,1),Vu=K(`<div class="player-wrapper s-3"><!></div>`),Hu={hash:`s-3`,code:`.player-wrapper.s-3 {position:absolute;width:100%;height:100%;}.player-wrapper.s-3 .player-media {position:absolute;left:0;top:0;width:100%;height:100%;background:var(--black);transition:transform 0.2s ease-in-out;}`};function Uu(e,t){ji(t,!0),Ls(e,Hu);let n=()=>fc(u,`$language$`,o),r=()=>fc(d,`$playerPhase`,o),i=()=>fc(f,`$crashed`,o),a=()=>fc(p,`$debugPanelVisible`,o),[o,s]=pc(),c=X(t,`videoContainer`,15),l=$c(),u=l.interfaceLanguage$,d=l.playerPhase,f=l.state.crashed$,p=l.ui.debugPanelVisible,m=Fa(void 0);var h=Vu();Is(V(h),n,e=>{var n=Bu(),o=no(n);zu(o,{get videoContainer(){return c()},set videoContainer(e){c(e)}});var s=H(o,2);{let e=ba(()=>r()!==`thumb`||i()&&t.autoplay);Iu(s,{get hidden(){return G(e)},get thumbUrl(){return t.thumbUrl},get startVideo(){return t.firstStart}})}var l=H(s,2),u=e=>{ku(e,{})};Ps(l,e=>{i()&&e(u)});var d=H(l,2),f=e=>{bu(e,{})};Ps(d,e=>{a()&&e(f)}),q(e,n)}),L(h),ac(h,e=>B(m,e),()=>G(m)),q(e,h),Mi(),s()}var Wu=K(`<div class="vk-vp-tv-root s-0"><!></div>`),Gu={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, 0.4);--white-alpha-24: rgba(255, 255, 255, 0.24);--white-alpha-72: rgba(255, 255, 255, 0.72);--devider-gray: #dce1e6;--text-gray: #626d7a;--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;--controls-height: 40px;--controls-gradient-height: 100px;--controls-transition-duration: 0.25s;--controls-transition-fn: cubic-bezier(0.455, 0.03, 0.515, 0.955);--controls-desktop-item-margin-left: 4px;--controls-desktop-padding-horizontal: 4px;--focused: var(--white);--focused-outline-width: 2px;--focused-outline-radius: 0;--focused-element-shadow: inset 0 0 0 var(--focused-outline-width) var(--focused);--focused-slider-shadow: 0 0 0 2px var(--focused);--big-play-size: 96px;--big-play-radius: 50%;--big-play-bg-color: rgba(0, 0, 0, 0.5);--big-play-hover-bg-color: rgba(0, 0, 0, 0.6);--big-play-icon-width: 38px;--big-play-icon-height: 33px;}`};function Ku(e,t){ji(t,!0),Ls(e,Gu);let n=()=>fc(re,`$isLive$`,i),r=()=>fc(Se,`$availableSubtitlesList$`,i),[i,a]=pc(),o=X(t,`sources`,7),s=X(t,`store`,7),c=X(t,`videoConfig`,7),l=X(t,`uiConfig`,7),u=X(t,`title`,7),d=X(t,`thumbUrl`,7),f=X(t,`subtitles`,7),p=X(t,`subtitlesForcedLanguage`,7),m=X(t,`live`,7),h=X(t,`preload`,7),g=X(t,`autoplay`,7),_=X(t,`volume`,7,void 0),v=X(t,`muted`,7,void 0),y=X(t,`fromTime`,7),b=X(t,`canRewindLive`,7),x=X(t,`showAds`,7),S=X(t,`adsSlotId`,7,void 0),C=X(t,`adsParams`,7,void 0),w=X(t,`adsAutoplayParam`,7,void 0),T=X(t,`duration`,7,void 0),E=X(t,`supportLink`,7),D=X(t,`shadowRootContainer`,7),O=X(t,`outerContainerRef`,7),k=X(t,`fullScreenTarget`,7,void 0),A=X(t,`failoverHosts`,7,void 0),ee=X(t,`saveRate`,7),te=X(t,`volumeMultiplier`,7),ne=X(t,`showEndScreen`,7,!0);wc(l());let j=Tc(),M=s().ui.debugPanelVisible,re=s().state.isLive$,ie=Fa(void 0),ae=Fa(!1);s().getAdmanWrapper().init({switchFromAdsToVideo:s().actions.internal.switchFromAdsToVideo,switchFromVideoToAds:s().actions.internal.switchFromVideoToAds,setMuted:s().actions.external.setMuted},s().ads,{vsid:s().vsid}),Qc(s()),po(()=>{c().callbacks?.onDomReady?.()});let oe=(e=!1)=>{B(ae,!0),e?s().actions.external.firstStart(x()):s().actions.internal.firstStart(x())},se=()=>{Il(s().videoId),Ol()&&s().actions.internal.setTrafficSavingEnabled(!0);let e=Cl(s().videoId);e&&s().actions.internal.setQuality(e)};function ce(e){let t=o()||e;t&&s().initVideo({container:G(ie),sources:t,failoverHosts:A(),subtitles:f(),subtitlesForcedLanguage:p(),volumeMultiplier:te()});let r=_c.get(Ec)===`true`;M.set(r),y()>0&&s().actions.external.seekTime(y());let i=_()??bl()??j.volumeDefault,a=v()??El();if(s().actions.external.setVolume(i),s().actions.external.setMuted(a),s().getAdmanWrapper().setInitialVolume(a?0:i),se(),j.features.saveRate&&ee()){let e=Pl();e&&!n()&&s().actions.internal.setPlaybackRate(e)}s().ui.isAutoplay.set(g()),g()&&oe(),h()&&j.features.preload&&s().actions.internal.preload()}As(()=>{let e=()=>s().destroy();return m()?.status===`upcoming`?(s().actions.internal.setLiveWaitingStart(!0),e):m()?.status===`waiting`?(s().actions.internal.setLiveWaitingRecover(!0),e):(m()?.status===`finished`||m()?.status===`postlive`)&&!(o()&&gc(o()))?(s().actions.internal.setLiveWaitingRecord(!0),e):(ce(),e)});function le(){G(ae)?s().actions.external.play():oe(!0)}function ue(){s().actions.external.pause()}function de(e){s().actions.external.setMuted(e)}function fe(){s().actions.external.toggleSubtitle()}function pe(e,t){s().actions.external.changeSubtitle(e,t)}function me(e){s().actions.external.changeAudioStream(e)}function he(e){e>=0&&e<=1&&s().actions.external.setVolume(e)}function ge(e){s().actions.internal.seekTime(e,vc.UNKNOWN)}function _e(e){s().actions.external.setPlaybackRate(e)}function ve(e){s().actions.external.setAutoQualityLimits(e)}function ye(){s().actions.external.setQuality(`auto`)}function be(e){s().actions.external.setTrafficSavingEnabled(e)}function xe(e){s().actions.external.setHighQualityEnabled(e)}let Se=s().state.availableSubtitlesList$;if(j.features.initSubtitles){let e=!1;po(()=>{if(!e&&r().length){e=!0;let t;if(j.features.userVideoPrefs&&s().videoId){let e=Rl(j.userSalt,String(s().videoId));e?.subtitleTrackId&&(t=r().find(t=>t.value===e.subtitleTrackId))}let n=p()??jl();n&&(t=r().find(e=>e.language===n)),s().actions.internal.setSubtitle(t)}})}var Ce={initVideo:ce,play:le,pause:ue,setMuted:de,toggleSubtitle:fe,changeSubtitle:pe,changeAudioStream:me,setVolume:he,seekTime:ge,setPlaybackRate:_e,setAutoQualityLimits:ve,setAutoQuality:ye,toggleTrafficSaving:be,toggleHighQuality:xe,get sources(){return o()},set sources(e){o(e)},get store(){return s()},set store(e){s(e)},get videoConfig(){return c()},set videoConfig(e){c(e)},get uiConfig(){return l()},set uiConfig(e){l(e)},get title(){return u()},set title(e){u(e)},get thumbUrl(){return d()},set thumbUrl(e){d(e)},get subtitles(){return f()},set subtitles(e){f(e)},get subtitlesForcedLanguage(){return p()},set subtitlesForcedLanguage(e){p(e)},get live(){return m()},set live(e){m(e)},get preload(){return h()},set preload(e){h(e)},get autoplay(){return g()},set autoplay(e){g(e)},get volume(){return _()},set volume(e){_(e)},get muted(){return v()},set muted(e){v(e)},get fromTime(){return y()},set fromTime(e){y(e)},get canRewindLive(){return b()},set canRewindLive(e){b(e)},get showAds(){return x()},set showAds(e){x(e)},get adsSlotId(){return S()},set adsSlotId(e){S(e)},get adsParams(){return C()},set adsParams(e){C(e)},get adsAutoplayParam(){return w()},set adsAutoplayParam(e){w(e)},get duration(){return T()},set duration(e){T(e)},get supportLink(){return E()},set supportLink(e){E(e)},get shadowRootContainer(){return D()},set shadowRootContainer(e){D(e)},get outerContainerRef(){return O()},set outerContainerRef(e){O(e)},get fullScreenTarget(){return k()},set fullScreenTarget(e){k(e)},get failoverHosts(){return A()},set failoverHosts(e){A(e)},get saveRate(){return ee()},set saveRate(e){ee(e)},get volumeMultiplier(){return te()},set volumeMultiplier(e){te(e)},get showEndScreen(){return ne()},set showEndScreen(e){ne(e)}},we=Wu();Uu(V(we),{get thumbUrl(){return d()},firstStart:oe,get autoplay(){return g()},get videoContainer(){return G(ie)},set videoContainer(e){B(ie,e,!0)}}),L(we),q(e,we);var Te=Mi(Ce);return a(),Te}var qu=vs(`<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 Ju(e,t){let n=X(t,`isWhite`,3,!1),r=ba(()=>n()?`#fff`:`#909499`);wu(e,{width:`57`,height:`60`,get fill(){return G(r)},testId:`stub-icon`,children:(e,t)=>{var n=qu();li(9),q(e,n)},$$slots:{default:!0}})}var Yu=K(`<div class="title s-1"> </div>`),Xu=K(`<div class="playerStub s-1"><!> <!></div>`),Zu={hash:`s-1`,code:`.playerStub.s-1 {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}.title.s-1 {position:absolute;left:0;top:0;width:100%;font-size:15px;color:#fff;box-sizing:border-box;padding:18px 20px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}`};function Qu(e,t){Ls(e,Zu);var n=Xu(),r=V(n),i=e=>{var n=Yu(),r=V(n,!0);L(n),yo(()=>Ss(r,t.title)),q(e,n)};Ps(r,e=>{t.title&&e(i)});var a=H(r,2),o=e=>{{let n=ba(()=>!!t.thumbUrl);Ju(e,{get isWhite(){return G(n)}})}};Ps(a,e=>{(!t.title||!t.thumbUrl)&&e(o)}),L(n),yo(()=>Gs(n,t.thumbUrl?`background-image: url('${t.thumbUrl}')`:``)),q(e,n)}var $u=K(`<div class="playerError s-2"><!></div>`),ed={hash:`s-2`,code:`.playerError.s-2 {width:100%;height:100%;background-color:#222;display:flex;justify-content:center;align-items:center;position:relative;background-position:center;background-size:cover;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;}`};function td(e){Ls(e,ed);var t=$u();ku(V(t),{}),L(t),q(e,t)}var nd=c(qe(),1),rd=c(Ht(),1),id=c(Kt(),1),ad=c(Ue(),1);import{ChromecastState as od,PlaybackState as sd,Player as cd,PredefinedQualityLimits as ld,VideoFormat as ud,clientChecker as dd}from"@vkontakte/videoplayer-core";import{assertNonNullable as fd,getHighestQuality as pd,InterfaceLanguage as md,isInvariantQuality as hd,isNonNullable as gd,loadVKLangPack as _d,Logger as vd,map as yd,merge as bd,Observable as xd,Subject as Sd,Subscription as Cd,TracerFactory as wd,VideoQuality as Td,devNull as Ed,now as Dd}from"@vkontakte/videoplayer-shared";import{SeekAction as Od}from"@vkontakte/videoplayer-statistics";var kd=c(An(),1),Ad=c(Ue(),1),jd=c(Dt(),1);import{detectEmbed as Md,devNull as Q,isNonNullable as Nd,now as $}from"@vkontakte/videoplayer-shared";import{addScript as Pd,Subject as Fd,clearVideoElement as Id}from"@vkontakte/videoplayer-shared";var Ld=`//ad.mail.ru/static/admanhtml/rbadman-html5.min.js`;class Rd{adman=null;initialVolume=1;volumeMultiplier;videoElement=null;currentAdSection=null;actions=null;adsState=null;playerState=null;isDestroyed;log;loadTimeout;initTimeout;runtimeTimeout;useAdmanFromNPM;isVsidOriginal;watchDogTimeout;externalApi;events={init$:new Fd,loadStarted$:new Fd,loadEnded$:new Fd,loadError$:new Fd,ready$:new Fd,slotRequested$:new Fd,started$:new Fd,timeRemained$:new Fd,paused$:new Fd,resumed$:new Fd,ended$:new Fd,empty$:new Fd,skipped$:new Fd,clicked$:new Fd,closed$:new Fd,error$:new Fd};constructor(e,t){this.log=e.createComponentLog(`AdmanWrapper`),Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_created`],numbers:[$()]}),this.loadTimeout=t.loadTimeout,this.initTimeout=t.initTimeout,this.runtimeTimeout=t.runtimeTimeout,this.useAdmanFromNPM=t.useAdmanFromNPM,this.volumeMultiplier=Math.max(0,Math.min(t.volumeMultiplier,1)),this.isVsidOriginal=t.isVsidOriginal}init(e,t,n){this.actions=e,this.adsState=t,this.playerState=n}loadAdman=e=>(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_start`,this.useAdmanFromNPM?`npm`:`http`],numbers:[$()]}),this.useAdmanFromNPM?this.loadAdmanNPM(e):this.loadAdmanMailRu(e));loadAdmanMailRu=e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_async_init_done`,`http`],numbers:[$()]}),t(),this.events.loadEnded$.next()):(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`http`],numbers:[$()]}),n())};Pd(Ld,e,this.loadTimeout).then(()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_loaded`,`http`],numbers:[$()]}),window.AdmanHTML?(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`http`],numbers:[$()]}),t(),this.events.loadEnded$.next()):(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`http`],numbers:[$()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout))}).catch(e=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_script_load_error`,`http`,String(e)],numbers:[$()]}),n(),clearTimeout(r)})});loadAdmanNPM=e=>new Promise((t,n)=>{let r;this.events.loadStarted$.next();let i=()=>{clearTimeout(r),delete window.admanAsyncInit,window.AdmanHTML?(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_done`,`npm`],numbers:[$()]}),t(),this.events.loadEnded$.next()):(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_timed_out`,`npm`],numbers:[$()]}),n())},a=()=>{o=!0,n()},o=!1,s=window.setTimeout(()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_timed_out`,`npm`],numbers:[$()]}),a()},this.loadTimeout);e.addEventListener(`abort`,a),e.aborted&&(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_load_aborted`,`npm`],numbers:[$()]}),a()),window.AdmanHTML=window.AdmanHTML||null,kd.default(import(`@adtech/rbadman/out/rbadman-html5.min.js`).then(()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_chunk_imorted`,`npm`,`failed: `+String(o)],numbers:[$()]}),!o&&(window.AdmanHTML?(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_already_inited`,`npm`],numbers:[$()]}),t(),this.events.loadEnded$.next()):(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_wait_async_init`,`npm`],numbers:[$()]}),window.admanAsyncInit=i,r=window.setTimeout(i,this.initTimeout)))},a),()=>{clearTimeout(r),clearTimeout(s),e.removeEventListener(`abort`,a)})});onAdmanLoadingError(){this.onAdError(`adman loading error`)}async initAdman(e){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init`,`already inited: `+!!this.adman],numbers:[$(),e.slotId]}),this.adman)return;this.events.init$.next(e.slotId),this.startWatchDog();let{width:t,height:n,isAutoplay:r,adsContainer:i,adsVideoElement:a,slotId:o,params:s={},paramsOverride:c={},duration:l,externalApi:u}=e;this.externalApi=u;let d,f=this.playerState&&Y(this.playerState.vsid);f&&(d=this.isVsidOriginal?f:parseInt(f,36));let{isEmbed:p,immediateOrigin:m}=Md(),h=(p?m:window.location.href)??window.location.href,g={...s,dl:encodeURIComponent(h),autoplay:r?1:0,player_width:t,player_height:n,...d?{request_id:d}:{},duration:l,...c};g=jd.default(Ad.default(g).filter(([e,t])=>Nd(t)));let _={slot:o,wrapper:i,videoEl:a,videoQuality:n,params:g,browser:{mobile:!1}};try{let e=new window.AdmanHTML;if(e.onReady(this.onAdsReady),e.onStarted(this.onAdStarted),e.onPlayed(this.onAdPlayed),e.onPaused(this.onAdPaused),e.adMidrollPoint(this.onAdMidrollPoint),e.onClosed(this.onAdClosed),e.onSkipped(this.onAdSkipped),e.onClicked(this.onAdClicked),e.onTimeRemained(this.onAdTimeRemained),e.onCompleted(this.onAdCompleted),e.onError(this.onAdError),e.setDebug(!1),this.externalApi?.videoGetAds){let e=await this.safeExternalCall(this.externalApi.videoGetAds,g);e&&(delete _.slot,delete _.params,Object.assign(_,{json:e}))}e.init(_),this.adman=e,this.videoElement=a,this.events.slotRequested$.next(),this.log({message:`adman init, config: ${JSON.stringify(_)}`})}catch(e){Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_init_threw`,String(e)],numbers:[$()]}),this.onAdError(`could not init adman`)}}switchToVideo(e=!1){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_switch_to_video`,this.currentAdSection??``,`force: `+e],numbers:[$()]}),this.currentAdSection===null&&!e){this.log({message:`switch to video, no currentAdSection. can't switch`});return}let t=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: ${t}`});else{let e=`Switch to video: Adman state was not updated correctly`;this.log({message:e}),this.events.error$.next(e)}this.actions.switchFromAdsToVideo?.(!t)}}setPostrollPassed(e){this.adsState?.postrollPassed.set(e),this.log({message:`postroll passed`})}togglePlay(){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_toggle_play`,this.currentAdSection??``],numbers:[$()]}),this.adsState){this.log({message:`toggle play`});let e=Y(this.adsState.playbackState);e===`playing`?this.pause():e===`paused`&&this.play()}else this.onAdError(`Can not toggle play: Adman state is not initialized`)}setInitialVolume(e){this.log({message:`set initial volume ${e}`}),this.initialVolume=e}setVolume(e){let t=e*this.volumeMultiplier;if(this.log({message:`set volume ${t}`}),this.adman)try{this.adman.setVolume(t)}catch{this.onAdError(`could not set ad volume`)}this.videoElement&&(this.videoElement.volume=t)}setFullscreen(e){if(this.log({message:`set fullscreen ${e}`}),this.adman)try{this.adman.setFullscreen(e)}catch{this.onAdError(`could not set ad fullscreen`)}}startPreroll(){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_preroll`],numbers:[$()]}),this.adman){if(!this.isDestroyed){this.log({message:`start preroll`}),this.setVolume(this.initialVolume),this.currentAdSection=`preroll`,this.startWatchDog();try{this.adman.start(`preroll`)}catch{this.onAdError(`could not start preroll`)}}}else this.onAdError(`Can not start preroll: Adman is not initialized`)}startPostroll(){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_start_postroll`,this.currentAdSection??``],numbers:[$()]}),this.adman&&this.actions){this.log({message:`start postroll`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`postroll`,this.startWatchDog();try{this.adman.start(`postroll`)}catch{this.onAdError(`could not start postroll`)}}else this.onAdError(`Can not start postroll: Adman is not initialized`)}onAdsReady=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ads_ready`],numbers:[$()]}),this.log({message:`ads ready`}),this.events.ready$.next(),this.startPreroll()};onAdStarted=(e,t)=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_started`,e,`muted: `+t.muted],numbers:[$(),t.bannerID]}),this.adsState&&this.playerState&&this.actions?(this.log({message:`ad started, section: ${e}, banner: ${JSON.stringify(t)}`}),this.events.started$.next(e),t.muted&&(this.setVolume(0),this.actions.setMuted(!0),this.log({message:`ad muted start`})),this.adsState.duration.set(t.duration),this.adsState.playbackState.set(`playing`),this.adsState.canSkip.set(t.allowClose),this.adsState.secondsToWatchBeforeSkip.set(t.allowCloseDelay),this.startWatchDog(),this.externalApi?.videoTrackAdEvent&&this.safeExternalCall(this.externalApi.videoTrackAdEvent,e,String(t.bannerID))):this.onAdError(`Started callback failed: Adman is not initialized`)};onAdTimeRemained=e=>{(this.adsState?.playbackState?Y(this.adsState.playbackState):void 0)!==`inactive`&&(this.adsState?(this.adsState.position.set(e.currentTime),this.events.timeRemained$.next(e),this.startWatchDog()):this.onAdError(`TimeRemained callback failed: Adman state is not initialized`))};onAdPaused=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_pased`,this.currentAdSection??``],numbers:[$()]}),this.stopWatchDog(),this.adsState?(this.log({message:`ad paused`}),this.adsState.playbackState.set(`paused`)):this.onAdError(`Paused callback failed: Adman state is not initialized`)};onAdPlayed=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_played`,this.currentAdSection??``],numbers:[$()]}),this.startWatchDog(),this.adsState?(this.log({message:`ad played`}),this.adsState.playbackState.set(`playing`)):this.onAdError(`Player callback failed: Adman is not initialized`)};onAdMidrollPoint=()=>{if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_midroll_pioint`],numbers:[$()]}),this.adman&&this.actions){this.log({message:`midroll point`}),this.actions.switchFromVideoToAds(),this.currentAdSection=`midroll`,this.startWatchDog();try{this.adman.start(`midroll`)}catch{this.onAdError(`could not start midroll`)}}else this.onAdError(`Midroll callback failed: Adman is not initialized`)};onAdSkipped=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_skipped`,this.currentAdSection??``],numbers:[$()]}),this.log({message:`ad skipped`}),this.stopWatchDog()};onAdClosed=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_closed`,this.currentAdSection??``],numbers:[$()]}),this.log({message:`ad closed`}),this.currentAdSection&&this.events.closed$.next(this.currentAdSection),this.stopWatchDog(),this.switchToVideo()};onAdCompleted=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_completed`,this.currentAdSection??``],numbers:[$()]}),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()};onAdClicked=()=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_clicked`,this.currentAdSection??``],numbers:[$()]}),this.log({message:`ad clicked`}),this.videoElement?.pause(),this.currentAdSection&&this.events.clicked$.next(this.currentAdSection),this.stopWatchDog()};onAdError=(e=`ad error`)=>{Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_ad_error`,e],numbers:[$()]}),this.log({message:e}),this.events.error$.next(e),this.currentAdSection===`postroll`&&this.setPostrollPassed(!0),this.switchToVideo(!0),this.stopWatchDog()};startWatchDog(){this.watchDogTimeout&&this.stopWatchDog(),this.watchDogTimeout=window.setTimeout(()=>this.onAdError(`Watchdog timeout`),this.runtimeTimeout)}stopWatchDog(){clearTimeout(this.watchDogTimeout)}play(){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pplay`,this.currentAdSection??``],numbers:[$()]}),this.adman){this.log({message:`ad play`}),this.startWatchDog();try{this.adman.resume(),this.events.resumed$.next()}catch{this.onAdError(`could not resume ad`)}}else this.onAdError(`Can not play: Adman is not initialized`)}pause(){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_pause`,this.currentAdSection??``],numbers:[$()]}),this.adman){this.stopWatchDog(),this.log({message:`ad pause`});try{this.adman.pause(),this.events.paused$.next()}catch{this.onAdError(`could not pause ad`)}}else this.onAdError(`Can not pause: Adman is not initialized`)}skip(){if(Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_skip`,this.currentAdSection??``],numbers:[$()]}),this.adman){this.stopWatchDog(),this.log({message:`ad skip`});try{this.adman.skip(),this.events.skipped$.next()}catch{this.onAdError(`could not skip ad`)}}else this.onAdError(`Can not skip: Adman is not initialized`)}setPosition(e,t){this.adman?.setPosition(Math.floor(e),Math.floor(t))}destroy(){Q.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`adman_destroy`],numbers:[$()]}),this.log({message:`destroy`}),this.stopWatchDog(),this.adman?.onReady(void 0),this.adman?.onStarted(void 0),this.adman?.onPlayed(void 0),this.adman?.onPaused(void 0),this.adman?.adMidrollPoint(void 0),this.adman?.onClosed(void 0),this.adman?.onSkipped(void 0),this.adman?.onClicked(void 0),this.adman?.onTimeRemained(void 0),this.adman?.onCompleted(void 0),this.adman?.onError(void 0),this.adman?.destroy(),this.videoElement&&Id(this.videoElement),this.isDestroyed=!0}async safeExternalCall(e,...t){try{return await e(...t)}catch(e){return this.onAdError(e?.message??`External call failed`),null}}}var zd=(e,t)=>t?!0:e.fullscreenEnabled||!!e.webkitFullscreenEnabled||!!e.mozFullscreenEnabled||!!e.msFullscreenEnabled,Bd=e=>{let t=e;t?.webkitExitFullscreen&&t?.webkitExitFullscreen()},Vd=()=>{let e=document;return e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement},Hd=()=>!!Vd(),Ud=e=>{let t=Math.round(e);return isNaN(t)||t<40?``:t>=40&&t<55?50:t>=55&&t<90?60:t>=90&&t<180?120:t>=180?240:``};class Wd{oneLineRegExp=/\r\n|\n|\r/;twoLinesRegExp=/\r\n\r\n|\n\n|\r\r/;parse(e,t){let n=[],r=e.split(this.twoLinesRegExp);for(let e of r){let r={startTime:0,endTime:0,texts:[],lang:t},i=e.split(this.oneLineRegExp);for(let e of i)if(!r.startTime&&!r.endTime){let{startTime:t,endTime:n}=new Gd().parse(e);r.startTime=t,r.endTime=n}else if(e.trim()!==``){let{texts:t}=new Kd().parse(e);r.texts=[...r.texts,...t]}(r.startTime||r.endTime)&&r.texts.length>0&&n.push(r)}return n}}class Gd{timeRegExp=/(\d{2,})?:?(\d{2}):(\d{2}).(\d{2,3})/;timingRegExp=RegExp(`${this.timeRegExp.source}( ?--> ?)${this.timeRegExp.source}`);parse(e){let t={startTime:0,endTime:0},n=this.timingRegExp.exec(e);return n&&(t.startTime=this.calcTime(n[1],n[2],n[3],n[4]),t.endTime=this.calcTime(n[6],n[7],n[8],n[9])),t}parseTime(e){let t=this.timeRegExp.exec(e);return t?this.calcTime(t[1],t[2],t[3],t[4]):0}isTime(e){return this.timeRegExp.test(e)}calcTime(e=`0`,t=`0`,n=`0`,r=`0`){let i=Number(e)*60*60,a=Number(t)*60,o=Number(n),s=Number(`0.${r}`);return i+a+o+s}}class Kd{letterTagRegExp=/<[a-z]*>|<\/[a-z]*>/;parse(e){let t={texts:[]},n=e.replace(new RegExp(this.letterTagRegExp,`g`),``).split({[Symbol.split](e){let t=0,n=[];for(;t<e.length;){let r=[`<`,`>`].reduce((n,r)=>{let i=e.indexOf(r,t);return n===-1||n>i?i:n},-1);if(r===-1){n.push(e.substring(t));break}n.push(e.substring(t,r)),t=r+1}return n}}),r=new Gd;for(let e of n)r.isTime(e)?t.texts.push({type:`timestamp`,value:r.parseTime(e)}):t.texts.push({type:`text`,value:e});return t}}var qd=Wd;import{isNonNullable as Jd}from"@vkontakte/videoplayer-shared";var Yd,Xd,Zd=0,Qd=!1,$d=``,ef=(e,t=0,n=0)=>e<t&&e<n,tf=(e,t=0,n=0)=>e>=t&&e<=n,nf=(e,t=0,n=0)=>e>t&&e>n,rf=(e,t,n,r=!1)=>{let i=n.find(({id:e})=>e===t.value)?.subtitles;if(r)return i?.find(({startTime:t,endTime:n})=>tf(e,t,n));let a=e>=Zd,o=e<Zd;if(Zd=e,o&&(Qd=!1),Jd(Yd)&&tf(e,Yd.startTime,Yd.endTime)&&$d===t.value)return Yd;if(!Jd(Xd)&&i?.length&&!Qd){Xd=i.find(({startTime:t,endTime:n})=>tf(e,t,n)||a&&ef(e,t,n)),Yd=void 0,!Jd(Xd)&&i[i.length-1].endTime<e&&(Qd=!0);return}else if(tf(e,Xd?.startTime,Xd?.endTime))return Yd=Xd,Xd=void 0,$d=t.value,Yd;else (a&&nf(e,Xd?.startTime,Xd?.endTime)||o&&ef(e,Xd?.startTime,Xd?.endTime))&&(Xd=void 0)},af={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`},of={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`},sf=e=>af[e]??af[of[e]]??void 0,cf=`off`,lf=({interfaceLanguage:e,isCyrillicRelatedInterface:t,videoId:n,isLiveCatchUpMode:r,statAuthToken:i,isAudioDisabled:a,canDownload:o,callbacks:s,webApi:c,previewThumbsData:l,uiConfig:u,coreConfig:d,player:f,stopPlayer:p,looped:m=!1,statistics:h,saveRate:g,internalsExposure:_,playerId:v,metaConfig:y})=>{let b={...d,isAudioDisabled:a,live:{...d.live,isLiveCatchUpMode:!!r}},x=u,S=wd.createRootTracer(!1),C=S.createComponentTracer(`Store`),w=f||new cd(b,S,{playerId:v,onDevNullLog:s?.onDevNullLog});_?.expose({corePlayer:w});let T=new vd,E=new Rd(T,{loadTimeout:x.ads.loadTimeout,initTimeout:x.ads.initTimeout,runtimeTimeout:x.ads.runtimeTimeout,useAdmanFromNPM:x.ads.useAdmanFromNPM,volumeMultiplier:x.ads.volumeMultiplier,isVsidOriginal:x.ads.isVsidOriginal}),D=c?.focusManager,O=T.createComponentLog(`Store`),k,A,ee={},te=new al,ne=new Cd,j=``,M=J(!1),re=h&&h.oneStat?Z(h.oneStat.vsid$):cc(void 0),ie=J(Hd()),ae=J(!1),oe=()=>zd(document,dd.device.isIOS),se=J(!1),ce=J([]),le=bd(w.events.fatalError$,w.events.managedError$).subscribe(e=>ce.update(t=>[...t,e])),ue=cc(!1,e=>{let t=w.events.fatalError$.subscribe(()=>e(!0));return()=>t.unsubscribe()}),de=async e=>{let t=rd.default(nd.default(md),e);if(x.downloadVKLanguages&&(t&&x.updateBuiltinLanguages||!eu(e))){let t;try{t=await _d(e,Dc,Oc)}catch{h?.oneStat?.logError({errorType:`VKLangPack`,fatal:!1})}t&&($l({language:e,pack:t,fallback:x.defaultLanguage}),fe.set(e),pe.update(e=>e+1))}eu(e)&&fe.set(e)},fe=J(e),pe=J(0),me=J(t);de(e);let he=(e,t)=>tu(Y(fe),e,t,x.defaultLanguage),ge=J(`thumb`);ge.subscribe(e=>{e===`ads`&&w.info.playbackState$.getValue()&&ye()});let _e=(()=>{let e=lc([ue,ge],([e,t])=>e?`crashed`:t);return{...e,is:t=>Y(e)===t}})(),ve=J(),ye=()=>{ve.set({muted:w.info.muted$.getValue()})},be=J({width:0,height:0}),xe=null,Se=w.info.isBuffering$,Ce=cc(Se.getValue(),e=>{let t=Se.subscribe(t=>{t&&xe===null?xe=window.setTimeout(()=>{e(Se.getValue()),xe=null},x.loaderDelay):e(t)});return()=>{t.unsubscribe(),xe&&clearTimeout(xe)}});C.log(`create store`),O({message:`create store`});let we=e=>{O({message:`init video, config: ${JSON.stringify(e)}`}),Ed.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`core_init_video`],numbers:[Dd()]}),w.initVideo(e),C.log(`init video`),e.subtitles&&w.setExternalTextTracks(e.subtitles),k=e,j=e.subtitlesForcedLanguage||``},Te=new Sd,Ee=new Sd,De=new Sd,Oe={actionRewind$:Te,actionSeek$:Ee,inFullscreen$:new xd(e=>ie.subscribe(t=>e.next(t))),actionSetSubtitle$:De},ke=new Sd,Ae=new Sd,je={actionSeek$:Ee,actionSubtitlesSwitched$:ke,actionQuality$:Ae,playerSize$:new xd(e=>be.subscribe(t=>e.next(t))),inFullscreen$:new xd(e=>ie.subscribe(t=>e.next(t))),isLoaderVisible$:new xd(e=>Ce.subscribe(t=>e.next(t)))};if(h){let{oneStat:e,thinOneStat:t,mediascopePixel:n,statSubscription:r}=h;e&&(r.add(e.attachToUi(Oe)),r.add(e.attachToAds(E.events)),e.authorize(i).catch(e=>{O({message:`onestat auth error ${String(e)}`})}),n&&n.attachTo(w)),t&&(r.add(t.attachTo(w,E.events)),r.add(t.attachToUi(je)),r.add(t.attachToAds(E.events)),t.updateContext({isMobile:Y(M)}),t.authorize(i))}let Me=()=>{if(dd.device.isIOS&&A)try{Bd(A)}catch(e){O({message:`exitIosSafariFullscreen failed: ${e}`})}};ne.add(w.experimental.element$.subscribe(e=>{e&&(A=e,e.classList.add(`player-media`))})).add(w.events.ended$.subscribe(()=>{Me(),s?.onEnded?.()})).add(w.events.looped$.subscribe(()=>{s?.onLooped?.()})).add(w.events.started$.subscribe(async()=>{let e=w.info.muted$.getValue();s?.onStarted?.(),ee.onStarted?.(e)})).add(w.events.willSeek$.subscribe(({from:e,to:t})=>{s?.onSeek?.(e,t)})).add(w.events.autoplaySoundProhibited$.subscribe(()=>{s?.onAutoplaySoundProhibited?.()})).add(w.info.position$.subscribe(e=>{let t=w.info.duration$.getValue();isFinite(t)&&t>0&&(s?.onTimeupdate?.(t,e),E.setPosition(e,t))})).add(w.events.fatalError$.subscribe(e=>{s?.onCrashed?.(e?`${e.id}: ${e.message}`:void 0)})).add(w.events.fetcherRecoverableError$.subscribe(e=>{s?.onRecoverableError?.(e?`${e.id}: ${e.message}`:void 0)})).add(w.events.loadedMetadata$.subscribe(()=>{se.set(!0)})).add(w.info.liveTime$.subscribe(e=>{s?.onLiveTime?.(e)})).add(w.info.isStalled$.subscribe(e=>{s?.onStalledChanged?.(e)})).add(w.info.isLiveEnded$.subscribe(e=>e&&s?.onLiveEnded?.())).add(E.events.loadStarted$.subscribe(()=>s?.adsInfo?.onLoadStarted?.())).add(E.events.loadEnded$.subscribe(()=>s?.adsInfo?.onLoadEnded?.())).add(E.events.loadError$.subscribe(()=>s?.adsInfo?.onLoadError?.())).add(E.events.init$.subscribe(()=>s?.adsInfo?.onInit?.())).add(E.events.ready$.subscribe(()=>s?.adsInfo?.onReady?.())).add(E.events.started$.subscribe(e=>s?.adsInfo?.onStarted?.(e))).add(E.events.timeRemained$.subscribe(e=>s?.adsInfo?.onTimeRemained?.(e))).add(E.events.ended$.subscribe(e=>s?.adsInfo?.onCompleted?.(e))).add(E.events.empty$.subscribe(()=>s?.adsInfo?.onEmpty?.())).add(E.events.clicked$.subscribe(e=>s?.adsInfo?.onClicked?.(e))).add(E.events.closed$.subscribe(e=>s?.adsInfo?.onClosed?.(e))).add(E.events.error$.subscribe(e=>s?.adsInfo?.onError?.(e))).add(E.events.paused$.subscribe(()=>s?.adsInfo?.onPaused?.())).add(E.events.resumed$.subscribe(()=>s?.adsInfo?.onResumed?.()));let Ne=cc(w.info.position$.getValue(),e=>{let t,n,r=()=>{let i=w.info.playbackState$.getValue(),a=w.info.isLive$.getValue(),o=w.info.duration$.getValue(),s=w.info.position$.getValue();if(i&&rd.default([sd.PLAYING,sd.PAUSED],i)){let t=a?s-o:w.getExactTime();t!==n&&e(t),n=t}t=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(t)}),Pe=Z(w.info.playbackState$),Fe=lc([Pe,Z(w.info.isBuffering$)],([e,t])=>t?`buffering`:e),Ie=Z(w.info.currentBuffer$),Le=Z(w.info.isEnded$),Re=Z(w.info.isLive$),ze=x.features.playbackRate?Z(w.info.canChangePlaybackSpeed$):cc(!1),Be=Z(w.info.liveBufferTime$),Ve=Z(w.info.volume$),He=Z(w.info.muted$),Ue=el(w.info.predefinedQualityLimitType$.pipe(yd(e=>e===ld.TRAFFIC_SAVING)),w.info.predefinedQualityLimitType$.getValue()===ld.TRAFFIC_SAVING),We=el(w.info.predefinedQualityLimitType$.pipe(yd(e=>e===ld.HIGH_QUALITY)),w.info.predefinedQualityLimitType$.getValue()===ld.HIGH_QUALITY),Ge=Z(w.info.autoQualityLimitingAvailable$),Ke=Z(w.info.availableQualities$),qe=Z(w.info.availableQualitiesFps$),Je=Z(w.info.chromecastState$),Ye=Z(w.info.chromecastDeviceName$),Xe=Z(w.info.currentFormat$),Ze=Z(w.info.throughputEstimation$),Qe=Z(w.info.videoBitrate$),$e=Z(w.info.intrinsicVideoSize$),et=Z(w.info.duration$),tt=Z(w.info.isAudioAvailable$),nt=()=>{xe&&clearTimeout(xe),xe=null},rt=lc([et,Re],([e,t])=>t?-e:e),it=lc([Pe],([e])=>e===sd.PLAYING),at=Z(w.info.atLiveEdge$),ot=Z(w.info.atLiveDurationEdge$),st=Z(w.info.position$),ct=lc([st,et],([e,t])=>isFinite(e)&&isFinite(t)&&!!t),lt=lc([Je],([e])=>e===od.CONNECTED),ut=Z(w.info.availableVideoStreams$),dt=x.features.audioLanguages?Z(w.info.availableAudioStreams$):cc([]),ft=Z(w.info.currentVideoStream$),pt=Z(w.info.currentAudioStream$),mt=e=>{e.language&&Al(e.language),w.setVideoStream(e)},ht=e=>{w.setAudioStream(e)},gt=e=>{let t;if(e.length===1&&(t=id.default(e,0)),t??=e.find(e=>`isDefault`in e&&e.isDefault),x.features.userVideoPrefs&&n){let r=Rl(x.userSalt,String(n));r?.audioTrackId&&(t=e.find(e=>e.id===r.audioTrackId)??t)}let r=kl();return r&&(t??=e.find(({language:e})=>r===e)),t??=id.default(e,0),t},_t=e=>{C.log(`change audio stream`,{id:e});let t=w.info.availableAudioStreams$.getValue().find(t=>t.id===e);t&&ht(t)},vt=!1;ne.add(w.info.availableAudioStreams$.subscribe(e=>{if(!vt&&e.length){let t=gt(e);t&&(w.setAudioStream(t),vt=!0)}})),dt.subscribe(e=>{s?.onAvailableAudioStreamsChanged?.(e.map(({label:e=``,id:t=``,language:n=``})=>({label:e,language:n,id:t})))}),pt.subscribe(e=>e&&s?.onAudioStreamChanged?.(e.id));let yt=!1;ne.add(w.info.availableVideoStreams$.subscribe(e=>{if(!yt&&e.length){let t=gt(e);t&&(w.setVideoStream(t),yt=!0)}}));let bt=J(void 0),xt=Z(w.info.isAutoQualityEnabled$,e=>e&&bt.set(void 0)),St=lc([bt,Z(w.info.currentQuality$,()=>bt.set(void 0))],([e,t])=>e??t),Ct=lc(Xe,e=>e!==ud.MPEG),wt=lc([Ke,qe,xt,St,Ct],([e,t,n,r,i])=>{let a=[];i&&a.push({value:`auto`,displayValue:he(`auto_quality_option`),selected:n});let o=e.filter(e=>!hd(e));for(let e of o){let i=t[e];a.push({value:e,displayValue:`${e}${i?Ud(i):``}`,selected:n?!1:e===r})}return a}),Tt=Z(w.info.currentPlaybackRate$),Et=lc([Tt,at,ot],([e,t,n])=>{let r=n?1:x.controls.playbackRateMin,i=t?1:x.controls.playbackRateMax,a=x.controls.playbackRateStep,o=[];for(let t=r;t<=i;t+=a)o.push({value:t,displayValue:t===1?he(`playback_rate_1`):he(`playback_rate`,{multiplier:t.toString(10)}),selected:e===t});return o}),Dt=()=>({displayValue:he(`subtitles_off`),value:cf,language:``}),Ot=J(Dt()),kt=lc([Ot,pe],([e],t)=>{e.value===cf?t(Dt()):t(e)}),At=x.features.subtitles?Z(w.info.availableTextTracks$):cc([]),jt=il(),Mt=lc([At,kt],([e,t],n)=>{let r=[],i=e.find(({id:e})=>e===t.value);if(i?.url){let[,e]=jt.find(i.url)??[];if(e){n(e);return}te.download(i.url).then(e=>{if(!e||te.isDestroyed())return;let a=new qd,o=i.language;if(o){let t=!!i.isAuto,n=a.parse(e,o);r.push({lang:o,subtitles:n,isAuto:t,id:i.id})}jt.add(i.url,r),Y(kt).value===t.value&&n(r)}).catch(()=>{h?.oneStat?.logError({errorType:`Subtitles download`,fatal:!1})})}n(r)}),Nt=lc([Tt,it,kt],([e,t,n],r)=>{let i;if(w.info.isLive$.getValue()&&t&&n.value!==cf){let t=()=>{let n=1e3/(3*e);i=setTimeout(t,n),r(Date.now())};return t(),()=>clearTimeout(i)}}),Pt=lc([At,kt],([e,t])=>{if(!e.length)return[];let n=[];for(let{language:r,isAuto:i,id:a}of e){let e=r&&sf(r);r&&e&&n.push({displayValue:i?he(`subtitles_auto`,{language:e}):e,value:a,selected:t?.value===a,isAuto:i,language:r})}return n.length?(n.unshift({...Dt(),selected:t?.value===cf}),n):[]}),Ft={available:[],prev:[]},It=()=>w.experimental.getCurrentTime$.getValue()?.()??A?.currentTime??0,Lt=lc([lc([Ne,kt,Mt,Nt],([e,t,n,r])=>{let i=w.info.isLive$.getValue();if(i&&Ft.prev!==n){let e=n.find(({id:e})=>e===t.value),r=Ft.prev.find(({id:e})=>e===t.value);e&&(Ft.available=[{...e,subtitles:[...r?.subtitles??[],...e.subtitles]}],Ft.prev=n)}if(t&&t.value!==cf)return rf(i?It():e,t,i?Ft.available:n,i)})],([e])=>e?.texts?e.texts:[]);ne.add(kt.subscribe(e=>{if(e.value===cf)s?.onSubtitleOff?.();else{let t=ad.default(af).find(([t,n])=>n===e.displayValue);s?.onSubtitleOn?.(t?t[0]:``,e.value)}}));let Rt=J(!0),zt=lc([Ie,rt,st,Be],([e,t,n,r])=>{let i=e?.end??0;return r?(i-(-n+r-t))/t:i/t}),Bt=Z(w.info.availableSources$),Vt=lc([Bt],([e])=>Object.keys(e?.[ud.MPEG]||{}).length>0),Ht=()=>{let e=pd(Object.keys(w.info.availableSources$?.getValue()?.[ud.MPEG]||{}))||Td.Q_144P;return k.sources[ud.MPEG]?.[e]},Ut=()=>{let e=Ht();if(e)C.log(`download video`,{url:e}),rl(e,k?.meta?.title||`video`);else{let e=`There is no URL for download video`;C.log(`download video`,{message:e}),O({message:e})}},Wt=()=>{O({message:`toggle muted`});let e=w.info.muted$.getValue();w.info.volume$.getValue()===0&&!e?Jt(qt()):Yt(!e)},Gt=()=>{P.ui.settingsMenu.visible$.set(!1),C.log(`close settings menu`)},Kt=async(e,t=()=>Promise.resolve())=>{P.ui.settingsMenu.visible$.set(!0),await t(),C.log(`open settings menu`,{wasOpenedByKeyboard:e})},qt=()=>{let e=Math.max(x.volumeMinRestore,bl()??0);return e===0?x.volumeDefault:e},Jt=e=>{let t=e===0?qt():e,n=w.info.muted$.getValue();O({message:`set volume, volume: ${e}, preferredVolume: ${t}`});let r=!a||_e.is(`ads`);n&&e>0&&r&&(n=!1),w.setVolume(e,n),E.setVolume(e)},Yt=e=>{let t=w.info.volume$.getValue();O({message:`set muted, currentVolume: ${t}, mute: ${e}`});let n=_e.is(`ads`);if(w.setMuted(e,n),E.setVolume(e?0:t),!e&&t===0){let e=qt();w.setVolume(e),E.setVolume(e)}},Xt=J(!1),Zt=e=>{C.log(`set looped`,{isLooped:e}),Xt.set(e),w.setLooped(e)};Zt(m);let Qt=()=>{w.prepare()},$t=()=>{fd(P);let e=Y(P.playerPhase),t={playerPhase:e,isVideoEnded:!1,action:`none`};if(O({message:`toggle play`}),e===`ads`){t.action=`play`,C.log(`toggle adman play`,t),E.togglePlay();return}let n=()=>{O({message:`toggle play, call player.play`}),t.action=`play`,w.play(),s?.onPlay?.()};w.info.isEnded$.getValue()?(O({message:`toggle play, video ended, seek to 0`}),Te.next(),Ee.next(Od.REWIND),w.seekTime(0),n()):w.info.playbackState$.getValue()===sd.PLAYING?(O({message:`toggle play, call player.pause`}),t.action=`pause`,w.pause(),s?.onPause?.()):n(),C.log(`toggle play`,t)},en=(e,{byUser:t=!1}={})=>{O({message:`set quality, quality: ${e}`}),C.log(`set quality`,{quality:e}),t&&Ae.next(e),w.setAutoQuality(e===`auto`),Sl(),e!==`auto`&&(xl(n,e),bt.set(e),w.setQuality(e))},tn=e=>{O({message:`set trafficSavingEnabled, value: ${e}`}),C.log(`set traffic saving enabled`,{trafficSavingEnabled:e});let t=e?ld.TRAFFIC_SAVING:ld.UNKNOWN;w.setPredefinedQualityLimits(t)},nn=e=>{O({message:`set highQualityEnabled, value: ${e}`}),C.log(`set high quality enabled`,{highQualityEnabled:e}),rn(e?ld.HIGH_QUALITY:ld.UNKNOWN)},rn=e=>{w.setPredefinedQualityLimits(e)},an=(e,t=!0)=>{C.log(`set playback rate`,{playbackRate:e}),w.setPlaybackRate(e),x.features.saveRate&&g&&!w.info.isLive$.getValue()&&t&&Nl(e)},on=()=>{let e=Y(ze),t=Y(Et),n=t.findIndex(({selected:e})=>e);if(n===t.length-1||!e)return t[n];let r=t[n+1];return an(r.value),r},sn=()=>{let e=Y(ze),t=Y(Et),n=t.findIndex(({selected:e})=>e);if(n===0||!e)return t[n];let r=t[n-1];return an(r.value),r},cn=(e={...Dt(),selected:!1})=>{C.log(`set subtitles`,{...e}),e.value!==cf&&De.next(e.isAuto?e.value+`_auto`:e.value),ke.next({enabled:e.value!==cf,lang:e.language,auto:!!e.isAuto}),Ot.set(e)},ln=e=>{C.log(`toggle subtitles`),Y(kt)?.value===cf?dn(e):fn()},un=(e,t)=>{C.log(`change subtitle`,{enabled:e}),e?dn(!0,t):fn()},dn=(e,t)=>{C.log(`subtitle on`);let n=Y(Pt),r=Y(fe),i=j??r,a;t&&(a=n.find(e=>e.value===t)),a??=n.filter(e=>e.value!==cf).find(e=>e.language===i),cn(a??n[1])},fn=()=>{C.log(`subtitle off`),cn(void 0)};ne.add(w.info.availableTextTracks$.subscribe(e=>{function t(){let t=[];for(let{language:n,isAuto:r,id:i}of e){let e=n&&sf(n);n&&e&&t.push({id:i,language:n,title:r?he(`subtitles_auto`,{language:e}):e})}return t}s?.onAvailableSubtitlesChanged?.(t())}));let pn=J(!0),mn=e=>{pn.set(e)},hn=(e,t,n=!0)=>{if(O({message:`seek to time, time: ${e}`}),C.log(`seek to time`,{time:e,action:t,forcePrecise:n}),Ee.next(t),w.info.isLive$.getValue()){let t=w.info.duration$.getValue(),r=Math.min(0,t+e);w.seekTime(r,n)}else w.info.isEnded$.getValue()&&(O({message:`seek after ended, call callbacks.onPlay`}),s?.onPlay?.()),w.seekTime(e,n)},gn=(e,t,n=!1)=>{O({message:`seek to percent, percent: ${e}`}),C.log(`seek to percent`,{percent:e,action:t}),hn(Y(rt)*e,t,n)},_n=e=>{O({message:`seek external, time: ${e}`}),C.log(`seek external`,{time:e}),Ee.next(Od.UNKNOWN),w.seekTime(w.info.isLive$.getValue()?-e:e)},vn=e=>{let t=e.max??`none`,n=e.min??`none`;O({message:`set auto quality limitation. Max: ${t}. Min: ${n}`}),C.log(`set auto quality limits`,{max:t,min:n}),w.setAutoQualityLimits(e)},yn=e=>{O({message:`set playback rate to: ${e}`}),C.log(`set playback rate external`,{playbackRate:e}),w.setPlaybackRate(e)},bn=J(void 0),xn=J(!1),Sn=e=>{O({message:`start scrubbing, progress: ${e}`}),C.log(`start scrubbing`,{progress:e}),xn.set(!0),Cn(e)},Cn=e=>{bn.set(e)},wn=()=>{bn.set(void 0),xn.set(!1)},Tn=(e,t=!1)=>{O({message:`complete scrubbing, progress: ${e}`}),C.log(`complete scrubbing`,{progress:e}),gn(e,Od.SLIDER,t),wn()},En=lc([Ne,rt,bn],([e,t,n],r)=>{r(gd(n)?n*t:e)}),Dn=J(!1),On=()=>{Dn.set(!0)},kn=()=>{Dn.set(!1)},An=e=>{Ee.next(Od.LIVE),O({message:`live switch to low latency `+e}),C.log(`live switch to low latency `+e),w.setLiveLowLatency(e)},jn=()=>{Ee.next(Od.LIVE),O({message:`switch to active live`}),C.log(`switch to active live`),w.seekTime(0),w.info.playbackState$.getValue()!==sd.PLAYING&&P.actions.internal.togglePlay()},Mn=()=>{C.log(`skip adman`),E.skip()},Nn=(e=!0)=>{fd(P),O({message:`switch from ads to video, callPlay: ${e}`}),C.log(`switch from ads to video`,{callPlay:e}),ge.set(`video`),e&&w.play(),a&&Yt(!0);let t=Y(ve)?.muted,n=!w.info.muted$.getValue();t!==void 0&&!n&&Yt(t),ve.set(void 0)},Pn=()=>{fd(P),O({message:`switch from video to ads`}),C.log(`switch from video to ads`),P.actions.internal.pause(),Me(),ge.set(`ads`)},Fn=e=>{fd(P);let t=e?`LiveWaitingStart`:`thumb`;C.log(`set live waiting start`,{state:e,playerPhase:t}),ge.set(t)},In=e=>{fd(P);let t=e?`LiveWaitingRecover`:`thumb`;C.log(`set live waiting recover`,{state:e,playerPhase:t}),ge.set(t)},Ln=e=>{fd(P);let t=e?`LiveWaitingRecord`:`thumb`;C.log(`set live waiting record`,{state:e,playerPhase:t}),ge.set(t)},Rn=()=>(fd(P),C.log(`get debug text data`),tl(w,k,P,S.getTraceId(),y)),zn=()=>(fd(P),JSON.stringify(S.getFinishedSpans())),Bn=()=>(fd(P),nl(w,k,P)),Vn=()=>A,Hn=e=>{if(fd(P),w.info.isEnded$.getValue())return;let t=!e;if(Y(P.playerPhase)===`ads`){O({message:`pause ads, internalCall: ${t}`}),C.log(`pause ads`,{internalCall:t}),E.pause();return}O({message:`pause video, internalCall: ${t}`}),C.log(`pause video`,{internalCall:t}),t&&s?.onPause?.(),w.pause()},Un=e=>{fd(P);let t=!e;if(Y(P.playerPhase)===`ads`){O({message:`play ads, internalCall: ${t}`}),C.log(`play ads`,{internalCall:t}),E.play();return}O({message:`play video, internalCall: ${t}`}),C.log(`play video`,{internalCall:t}),t&&s?.onPlay?.(),w.play()},Wn=e=>{fd(P);let t=!e;if(Y(P.playerPhase)===`ads`){O({message:`player cannot be stopped during ads via external method`});return}O({message:`player will be stopped, internalCall: ${t}`}),p?.()},N=(e,t)=>{fd(P),O({message:`first start, show ads: ${e}, internalCall: ${!t}`}),C.log(`first start`,{showAds:e,external:t}),e?ge.set(`ads`):(ge.set(`video`),t?w.play():P.actions.internal.togglePlay())},P={interfaceLanguage$:fe,isCyrillicRelatedInterface$:me,initVideo:we,videoId:n,playerPhase:_e,vsid:re,state:{positionExact$:Ne,positionWithScrubbing$:En,duration$:rt,playbackState$:Pe,playbackStateRealistic$:Fe,isPlaying$:it,isLoaderVisible:Ce,bufferedProgress$:zt,isLive$:Re,canChangePlaybackSpeed$:ze,isActiveLive$:at,isOldestAvailableLive$:ot,isRewindableLive$:ct,isEnded$:Le,muted$:He,volume$:Ve,trafficSavingEnabled$:Ue,highQualityEnabled$:We,autoQualityLimitingAvailable$:Ge,availableVideoStreams$:ut,availableAudioStreams$:dt,videoStream$:ft,audioStream$:pt,currentQuality$:St,isAutoQualityEnabled$:xt,availableQualities$:wt,currentPlaybackRate$:Tt,availablePlaybackRates$:Et,currentSubtitle$:kt,availableTextTracks$:At,availableSubtitlesList$:Pt,currentSubtitleCaptions$:Lt,isAutoSubtitleCaptionVisible$:Rt,chromecastState$:Je,chromecastDeviceName$:Ye,chromecastConnected$:lt,currentFormat$:Xe,throughputEstimation$:Ze,videoBitrate$:Qe,videoSize$:$e,errorLog$:ce,crashed$:ue,isAudioAvailable$:tt,isAudioDisabled:!!a,canDownload:x.features.download&&!!o,availableSources$:Bt,hasMpegSources$:Vt,looped$:Xt,loadedMetadata$:se,isAutoQualityAvailable$:Ct},ui:{t:he,controlsVisible:J(!1),touched:J(!1),controls:{prevButton:J(void 0),playButton:J(void 0),replayButton:J(void 0),nextButton:J(void 0),playPrevChapterButton:J(void 0),seekToInteractiveButton:J(void 0),interactiveGraphButton:J(void 0),liveButton:J(void 0),time:J(void 0),episodes:J(void 0),volume:J(void 0),subtitles:J(void 0),settings:J(void 0),context:J(void 0),chromecast:J(void 0),pip:J(void 0),fullscreen:J(void 0),vkLogo:J(void 0),interactiveTimeIndicator:J(void 0),timeline:J(void 0),autoplayNextToggle:J(void 0)},modals:{hotKeyMap:{show:J(!1),data:J({title:``,closeBtnText:``,groups:[]})}},isFullscreen:ie,isFullscreenOpenedByKeyboard:ae,isAutoplay:J(!1),debugPanelVisible:J(!1),episodes:{panelOpened$:J(!1),openedByKeyboard$:J(!1)},contextMenu:{visible$:J(!1),btnRef$:J(void 0),openedByBtnKeyboard$:J(!1),openedByHotKey$:J(!1),lastActiveElem$:J(void 0),showContextMenuBtn$:J(!1),position$:J({top:0,left:0})},playerSize:be,isMobile:M,icon3DVideoVisible:J(!1),scrubbingInProgress:xn,volumeChangingInProgress:Dn,interactiveHideMobileControls:J(!1),overlayContainer$:J(void 0),startedByKeyboard$:J(!1),autoplayNextEnabled$:J(!1),timerNextVideoRunning$:J(!0),settingsMenu:{visible$:J(!1),ref$:J(void 0),openedByBtnKeyboard$:J(!1)},settingsSubMenu:{visible$:J(!1),ref$:J(void 0),name$:J(void 0)},userActionsDisabled:J(!1),hiddenControls:{volume:J(!1),vkLogo:J(!1),pip:J(!1),chromecast:J(!1),settings:J(!1)},isControlsAvailable:pn,controlBlocks:{topLeft:J(void 0),topRight:J(void 0),middle:J(void 0),bottom:J(void 0),bottomLeft:J(void 0),bottomRight:J(void 0)},videoTitleInfo:J(void 0),previewTrackNotificationVisible:J(!1)},ads:{position:J(0),duration:J(0),playbackState:J(`inactive`),canSkip:J(!1),secondsToWatchBeforeSkip:J(0),postrollPassed:J(!1)},webApi:{focusManager:D},actions:{internal:{preload:Qt,firstStart:e=>N(e,!1),play:()=>Un(!1),pause:()=>Hn(!1),togglePlay:$t,toggleMuted:Wt,openSettingsMenu:Kt,closeSettingsMenu:Gt,setVolume:e=>Jt(e),setMuted:e=>Yt(e),startVolumeChanging:On,stopVolumeChanging:kn,setVideoStream:mt,setAudioStream:e=>ht(e),setQuality:(e,t)=>en(e,t),setTrafficSavingEnabled:e=>tn(e),setHighQualityEnabled:e=>nn(e),setPlaybackRate:an,incrementPlaybackRate:on,decrementPlaybackRate:sn,setSubtitle:e=>cn(e),toggleSubtitle:()=>ln(!1),startScrubbing:Sn,progressScrubbing:Cn,completeScrubbing:Tn,switchToActiveLive:jn,switchFromAdsToVideo:Nn,switchFromVideoToAds:Pn,skipAd:Mn,setLiveWaitingStart:Fn,setLiveWaitingRecover:In,setLiveWaitingRecord:Ln,getDebugTextData:Rn,getTraceTextData:zn,getDebugPanelData:Bn,getVideoElement:Vn,seekTime:(e,t,n)=>hn(e,t,n),clearDelayedBufferingCheckTimeout:nt,seekToPercent:gn,getPreviewThumbsData:()=>(O({message:`getting preview thumbs data`}),C.log(`get preview thumbs data`,{...l}),l),downloadVideo:Ut,addLanguage:$l,setLanguage:de,setLooped:Zt,checkFullscreenSupport:oe},external:{firstStart:e=>N(e,!0),play:()=>Un(!0),pause:()=>Hn(!0),stop:()=>Wn(!0),seekTime:e=>_n(e),setPlaybackRate:e=>yn(e),setAutoQualityLimits:e=>vn(e),setMuted:e=>Yt(e),toggleSubtitle:()=>ln(!0),changeSubtitle:un,setVolume:e=>Jt(e),setLiveLowLatency:An,hideControls:()=>mn(!1),showControls:()=>mn(!0),setQuality:e=>en(e),setTrafficSavingEnabled:e=>tn(e),setHighQualityEnabled:e=>nn(e),changeAudioStream:_t}},callbacks:s,setUiCallbacks:e=>{ee={...e}},getAdmanWrapper:()=>E,getLogger:()=>T,getPlayer:()=>w,destroy:()=>{C.log(`destroy store`),ne.unsubscribe(),w.destroy(),E.destroy(),h?.destroy(),le.unsubscribe(),te.destroy()}};return P};import{now as uf,ValueSubject as df}from"@vkontakte/videoplayer-shared";import{cloneDeepWith as ff,InterfaceLanguage as pf,Observable as mf,Subscription as hf,InternalsExposure as gf,skip as _f,getPlayerId as vf}from"@vkontakte/videoplayer-shared";import{clientChecker as yf}from"@vkontakte/videoplayer-core";import{OneStat as bf,ThinOneStat as xf,MediascopePixel as Sf}from"@vkontakte/videoplayer-statistics";function Cf(e,t){let n=new Set([...Object.keys(e),...Object.keys(t)]),r={};for(let i of n)r[i]=t[i]??e[i]??void 0;return r}import{Subscription as wf}from"@vkontakte/videoplayer-shared";class Tf{oneStat;thinOneStat;mediascopePixel;statSubscription;constructor(e=void 0,t=void 0,n=void 0,r=new wf){this.oneStat=e,this.thinOneStat=t,this.mediascopePixel=n,this.statSubscription=r}destroy(){this.oneStat?.destroy(),this.thinOneStat?.destroy(),this.mediascopePixel?.destroy(),this.statSubscription.unsubscribe()}}import{devNull as Ef}from"@vkontakte/videoplayer-shared";class Df{getActiveElement;focusableElements=[];isActive=!1;container;constructor(e){this.getActiveElement=e}activate(){this.isActive||=(document.addEventListener(`keydown`,this.handleTabKey),!0)}deactivate(){this.isActive&&(document.removeEventListener(`keydown`,this.handleTabKey),this.isActive=!1,this.focusableElements=[])}updateFocusableElements(){this.isActive&&(this.focusableElements=this.getFocusableElements())}getFocusableElements(){let e=[`button:not([disabled])`,`[href]:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"]):not([disabled])`].join(`, `);return Array.from(this.container.querySelectorAll(e)).filter(e=>!e.disabled&&e.offsetParent!==null)}handleTabKey=e=>{if(this.updateFocusableElements(),!this.focusableElements.length)return;let t=this.focusableElements[0],n=this.focusableElements[this.focusableElements.length-1],r=this.getActiveElement();e.shiftKey&&r===t?(e.preventDefault(),n.focus()):!e.shiftKey&&r===n&&(e.preventDefault(),t.focus())};destroy(){this.deactivate()}setContainer(e){this.container=e}}class Of{shadowRoot;lastFocusedNode=null;focusLock;constructor(e){this.shadowRoot=e,this.focusLock=new Df(()=>this.lastFocusedNode),this.init()}init=()=>{this.shadowRoot.addEventListener(`focusin`,this.handleFocusChange)};handleFocusChange=()=>{this.lastFocusedNode=this.shadowRoot.activeElement};restoreFocus=()=>{this.lastFocusedNode?.focus()};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 kf}from"@vkontakte/videoplayer-shared";var Af=kf().HTMLElement||class{isConnected=!1},jf={preload:!0,autoplay:!1,repeat:!1,loop:!1,fromTime:0,canRewindLive:!0,showAds:!1,interfaceLanguage:pf.RU,isCyrillicRelatedInterface:!0,isTouch:!1,isAudioDisabled:!1,tuningConfig:{},saveRate:!0,volumeMultiplier:1,showEndScreen:!0,showNextPrevButtons:!1},Mf=Fa(void 0);class Nf extends Af{svelteStubComponent;svelteRootComponent;svelteErrorComponent;store;statistics;_shadowRoot;playerContainer;rootContainer;stateContainer;shadowRootContainer;playerId;uiConfig;coreConfig;statisticsConfig;metaConfig;currentPlayingVideoIndex=0;videoConfig=void 0;subscription;focusManager;prevIsid=void 0;isInited=!1;postponedInitParams=null;internalsExposure=null;fatalError$=new df(null);constructor(){super(),this.subscription=new hf,this.fatalError$.subscribe(e=>{this.unmountComponent(this.svelteErrorComponent),e&&(this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.svelteErrorComponent=Cs(td,{target:this.playerContainer}))})}connectedCallback(){if(this.rootContainer)return;this.initPlayerRootContainers();let e=Ha({title:this.getAttribute(`stub-title`)??void 0,thumbUrl:this.getAttribute(`stub-thumb-url`)??void 0});this.svelteStubComponent=Cs(Qu,{target:this.playerContainer,props:e}),this.postponedInitParams&&=(this.initPlayer(...this.postponedInitParams),null)}disconnectedCallback(){this.focusManager?.destroy(),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteErrorComponent),this.subscription.unsubscribe(),this.internalsExposure?.destroy()}initPlayerRootContainers(){this.rootContainer=document.createElement(`div`),this.rootContainer.style.position=`relative`,this.rootContainer.className=`root-container`,this.rootContainer.style.width=`100%`,this.rootContainer.style.height=`100%`,this.rootContainer.style.minHeight=`206px`,this.shadowRootContainer=document.createElement(`div`),this.shadowRootContainer.style.position=`absolute`,this.shadowRootContainer.className=`shadow-root-container`,this.shadowRootContainer.style.width=`100%`,this.shadowRootContainer.style.height=`100%`,this._shadowRoot=this.shadowRootContainer.attachShadow({mode:`open`}),this.playerContainer=document.createElement(`div`),this.playerContainer.style.all=`initial`,this.playerContainer.style.display=`block`,this.playerContainer.style.contain=`strict`,this.playerContainer.style.width=`100%`,this.playerContainer.style.height=`100%`,this._shadowRoot.append(this.playerContainer),this.rootContainer.append(this.shadowRootContainer),this.stateContainer=document.createElement(`div`),this.stateContainer.className=`state-container`,this.stateContainer.style.width=`1px`,this.stateContainer.style.height=`1px`,this.stateContainer.style.position=`absolute`,this.stateContainer.style.backgroundColor=`transparent`,this.stateContainer.style.left=`-100000px`,this.append(this.rootContainer),this.append(this.stateContainer)}createOneStat=(e,t={})=>{if(!this.videoConfig)return;let{albumId:n,statPlace:r,statUserSalt:i,statTrackCode:a,statVKAppId:o,refreshStatAuthToken:s,autoplay:c,isTouch:l,refDomain:u,deviceId:d}=Cf(this.videoConfig,t),{unitedVideoId:f,isClip:p=!1}=e;if(this.uiConfig.features.statistics&&f)try{return new bf({movieId:f,albumId:n,place:r,trackCode:a,vkAppId:o,autoplay:c??!1,mobile:l,clip:p,refDomain:u,deviceId:d,isPreviewPlayerView:!1},{refreshAuthToken:s,userSalt:i,config:this.statisticsConfig})}catch(e){console.error(e)}};createThinOneStat(e,t={}){if(!this.videoConfig)return;let{deviceId:n,preload:r,refreshStatAuthToken:i}=Cf(this.videoConfig,t),{unitedVideoId:a}=e;if(this.uiConfig.features.thinStatistics&&a)return new xf.ThinOneStat({deviceId:n,movieId:a,preload:r,isPreviewPlayerView:!1},{config:this.statisticsConfig,refreshAuthToken:i})}createPlayer(e,t={},n){if(!this.videoConfig)return;let{statAuthToken:r,preload:i,autoplay:a,volume:o,muted:s,fromTime:c,canRewindLive:l,supportLink:u,showAds:d,adsSlotId:f,adsParams:p={},adsAutoplayParam:m,interfaceLanguage:h,isCyrillicRelatedInterface:g,isAudioDisabled:_,isLiveCatchUpMode:v,fullScreenTarget:y,failoverHosts:b,canDownload:x,callbacks:S,saveRate:C,volumeMultiplier:w,showEndScreen:T,mediascopePixels:E}=Cf(this.videoConfig,t),{sources:D,title:O,thumbUrl:k,unitedVideoId:A,duration:ee,adsParams:te={},previewThumbsData:ne,subtitles:j,subtitlesForcedLanguage:M,live:re,adsExternalApi:ie}=e;if(!D&&!re){let e=Error(`empty sources and live`);this.fatalError$.next(e),S?.onCrashed?.(e.message);return}let ae={...p,...te},oe={focusManager:this.focusManager},se=this.createOneStat(e,t),ce=this.createThinOneStat(e,t),le;E&&(le=new Sf({pixels:E})),(se||ce)&&(this.statistics=new Tf(se,ce,le)),this.store=lf({player:n,interfaceLanguage:h,isCyrillicRelatedInterface:g,videoId:A,isLiveCatchUpMode:v,isAudioDisabled:_,statAuthToken:r,callbacks:S,webApi:oe,previewThumbsData:ne,canDownload:x,uiConfig:this.uiConfig,coreConfig:this.coreConfig,metaConfig:this.metaConfig,saveRate:C,stopPlayer:()=>this.stop(),statistics:this.statistics,internalsExposure:this.internalsExposure,playerId:this.playerId});let ue=()=>{!this.store||!this.videoConfig||(this.subscription.add(this.store.state.currentFormat$.subscribe(e=>S?.onCurrentFormatChanged?.(e))),this.subscription.add(this.store.state.throughputEstimation$.subscribe(e=>S?.onThroughputEstimationChanged?.(e))),this.subscription.add(this.store.state.trafficSavingEnabled$.subscribe(e=>S?.onTrafficSavingEnabledChanged?.(e))),this.subscription.add(this.store.state.highQualityEnabled$.subscribe(e=>S?.onHighQualityEnabledChanged?.(e))),this.subscription.add(this.store.state.isAutoQualityEnabled$.subscribe(e=>S?.onAutoQualityEnabledChanged?.(!!e))),this.subscription.add(new mf(e=>{this.store&&this.subscription.add(this.store.state.currentPlaybackRate$.subscribe(t=>e.next(t)))}).pipe(_f(1)).subscribe(e=>S?.onCurrentPlaybackRateChanged?.(e))),this.subscription.add(this.store.state.volume$.subscribe(e=>S?.onVolumeChange?.(e))),this.subscription.add(this.store.state.muted$.subscribe(e=>{if(e)S?.onMute?.();else{let e=(this.store?.state.volume$&&Y(this.store.state.volume$))??0;S?.onUnmute?.(e)}})),this.subscription.add(this.store.state.videoBitrate$.subscribe(e=>S?.onVideoBitrateChanged?.(e))),this.statistics&&this.statistics.oneStat&&this.subscription.add(this.statistics.oneStat.vsid$.subscribe(e=>S?.onVSIDChanged?.(e))),B(Mf,{sources:D,store:this.store,videoConfig:this.videoConfig,uiConfig:this.uiConfig,title:O,thumbUrl:k,subtitles:j,subtitlesForcedLanguage:M,live:re,preload:i,autoplay:a,muted:s,volume:o,fromTime:c,canRewindLive:l,supportLink:u,showAds:d,adsSlotId:f,adsParams:ae,adsAutoplayParam:m,duration:ee,failoverHosts:b,fullScreenTarget:y,saveRate:C,shadowRootContainer:this.shadowRootContainer,outerContainerRef:this.rootContainer,volumeMultiplier:w,showEndScreen:T,adsExternalApi:ie,getVideoDeeplink:this.videoConfig.getVideoDeeplink},!0),this.svelteRootComponent=Cs(Ku,{target:this.playerContainer,props:G(Mf)}),this.isInited||(this.isInited=!0,this.videoConfig?.callbacks?.onInited?.()),this.internalsExposure?.expose({player:this,videoConfig:this.videoConfig,coreConfig:this.coreConfig,uiConfig:this.uiConfig,statisticsConfig:this.statisticsConfig}),this.uiConfig.devNullLog&&this.videoConfig?.callbacks?.onDevNullLog?Ef.subscribe(`ui`,this.videoConfig.callbacks.onDevNullLog):Ef.destroy(`ui`))};this.coreConfig.asyncResolveClientChecker?yf.isInited$.subscribe(e=>{e&&(console.log(`UI TV SDK async start`),ue())}):ue()}initPlayer(e,t={}){if(!this.isConnected){this.postponedInitParams=[e,t];return}if(!Array.isArray(e.videos)||e.videos.length===0){let t=Error(`empty videos`);this.fatalError$.next(t),e.callbacks?.onCrashed?.(t.message);return}else this.fatalError$.next(null);this.videoConfig=Cf(jf,ff(e,e=>e instanceof Af?e:void 0)),this.playerId=vf(e.playerId),this.uiConfig=Cc(t.ui??{}),this.coreConfig=t.core??{},this.statisticsConfig=t.statistics??{},this.metaConfig=t.meta,this.uiConfig.features.exposeInternalsToGlobal&&(this.internalsExposure??=new gf(`ui`,this.playerId)),Ef.push(`ui`,{key:`videoplayer_embed`,strings:[`new`,`player_init_player`,`ads.enable: `+this.uiConfig.ads.enable,`showAds: `+this.videoConfig?.showAds],numbers:[uf()]}),this.videoConfig.autoplay&&=this.uiConfig.features.autoplay,this.videoConfig.showAds=this.uiConfig.ads.enable??this.videoConfig.showAds,this.videoConfig.adsSlotId=this.uiConfig.ads.slot??this.videoConfig.adsSlotId,this.videoConfig.canRewindLive&&=this.uiConfig.features.liveRewind,this.videoConfig.supportLink=this.videoConfig.supportLink??this.uiConfig.supportLink,this.videoConfig.showEndScreen=this.uiConfig.features.endScreen&&this.videoConfig.showEndScreen,this.currentPlayingVideoIndex=this.videoConfig.videoIndex&&this.videoConfig.videos?.[this.videoConfig.videoIndex]?this.videoConfig.videoIndex:0,this.focusManager=this._shadowRoot?new Of(this._shadowRoot):void 0,this.unmountComponent(this.svelteStubComponent),this.unmountComponent(this.svelteRootComponent),this.unmountComponent(this.svelteErrorComponent),this.isInited=!1,this.prevIsid=void 0,this.createPlayer(this.videoConfig.videos[this.currentPlayingVideoIndex])}play(){this.store?.playerPhase.is(`LiveWaitingStart`)||this.store?.playerPhase.is(`LiveWaitingRecover`)||this.store?.playerPhase.is(`LiveWaitingRecord`)||this.svelteRootComponent?.play()}pause(){this.svelteRootComponent?.pause()}stop(){if(!this.videoConfig)return;this.unmountComponent(this.svelteStubComponent);let e=this.videoConfig.videos[0];e&&(this.unmountComponent(this.svelteRootComponent),this.createPlayer(e))}setMuted(e){this.svelteRootComponent?.setMuted(e)}toggleSubtitle(){this.svelteRootComponent?.toggleSubtitle()}changeSubtitle(e,t){this.svelteRootComponent?.changeSubtitle(e,t)}setVolume(e){this.svelteRootComponent?.setVolume(e)}seekTime(e){this.svelteRootComponent?.seekTime(e)}setPlaybackRate(e){this.svelteRootComponent?.setPlaybackRate(e)}setAutoQualityLimits(e){this.svelteRootComponent?.setAutoQualityLimits(e)}setAutoQuality(){this.svelteRootComponent?.setAutoQuality()}toggleTrafficSaving(e){this.svelteRootComponent?.toggleTrafficSaving(e)}toggleHighQuality(e){this.svelteRootComponent?.toggleHighQuality(e)}changeAudioStream(e){this.svelteRootComponent?.changeAudioStream(e)}addLanguage(e){this.store?.actions.internal.addLanguage(e)}async setLanguage(e){await this.store?.actions.internal.setLanguage(e)}setLiveStart(e){this.isLiveTailPlaying()||(this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingStart(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!0}))}setLiveWaitingStart(){this.store?.actions.internal.setLiveWaitingStart(!0)}isLiveTailPlaying(){let e=this.store?.getPlayer();if(!e)return!1;let{info:t}=e;return t.canPlayLiveTailBuffer$.getValue()&&!t.isStalled$.getValue()&&!t.atLiveEdge$.getValue()}setLiveWaitingRecover(e=!1){let t=this.isLiveTailPlaying(),n=e||!t,r=()=>{this.store?.actions.internal.setLiveWaitingRecover(!0)};n&&r(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{n||r(),this.store?.destroy()})}setLiveWaitingRecord(){let e=!this.isLiveTailPlaying(),t=()=>{this.store?.actions.internal.setLiveWaitingRecord(!0)};e&&t(),this.store?.callbacks&&(this.store.callbacks.onLiveEnded=()=>{e||t(),this.store?.destroy()})}setLiveEnd(e){let t=!this.isLiveTailPlaying(),n=()=>{this.store?.actions.internal.setLiveWaitingRecover(!1),this.store?.actions.internal.setLiveWaitingRecord(!1),this.unmountComponent(this.svelteRootComponent),this.createPlayer(e,{autoplay:!1})};if(t){n();return}this.store?.callbacks&&(this.store.callbacks.onLiveEnded=n)}setLiveLowLatency(e){this.store?.actions.external.setLiveLowLatency(e)}setLooped(e){this.store?.actions.internal.setLooped(e)}getDebugData(){return this.store?.actions.internal.getDebugTextData()??``}getDeviceId(){return this.statistics?.oneStat?.getDeviceId()??void 0}switchToActiveLive(){this.store?.actions.internal.switchToActiveLive()}updateStatContext(e){this.statistics&&(this.statistics.oneStat&&this.statistics.oneStat.updateContext(e),this.statistics.thinOneStat&&this.statistics.thinOneStat.updateContext(e))}restoreFocus(){this.focusManager?.restoreFocus()}getTotalViewTime(){return this.statistics?.thinOneStat?.getTotalViewTime()}unmountComponent(e){e&&Ds(e)}}import{InterfaceLanguage as Pf,VKNumericLanguage as Ff,loadVKLangPack as If}from"@vkontakte/videoplayer-shared";import{VideoQuality as Lf,VideoFormat as Rf}from"@vkontakte/videoplayer-core";var zf=()=>{window.customElements.define(`vk-video-player-tv`,Nf)};export{zf as registerPlayerWebComponent,If as loadVKLangPack,Lf as VideoQuality,Rf as VideoFormat,Ff as VKNumericLanguage,Yc as VERSION,Pf as InterfaceLanguage};