!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dmp=t():e.dmp=t()}(this,(()=>(this.dmpJsonp=this.dmpJsonp||[]).push([[721],{8775:(e,t,a)=>{"use strict";a.d(t,{az:()=>Ve,gH:()=>He,Ss:()=>De,GS:()=>rt,Kl:()=>Ie,ET:()=>mt,Sn:()=>k,__:()=>ke,NF:()=>Se,BM:()=>Ce,O0:()=>o});const i=e=>!isNaN(parseFloat(e))&&isFinite(e);class n{on(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("function"==typeof t)return this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({func:t,scope:a}),this}off(e,t){if("function"!=typeof t)this.listeners[e]=[];else if(null!=this.listeners?.[e])for(let a=this.listeners[e].length-1;a>=0;a--){this.listeners[e][a].func===t&&this.listeners[e].splice(a,1)}}trigger(e){if(this.listeners&&this.listeners[e]){for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i=0;t--){const i=this.listeners[e][t];if(!1===i.func.apply(i.scope,a))return}}}}let r=null;const o=e=>{r=e},s=function(){for(var e=arguments.length,t=new Array(e),a=0;ai??=r?.getLogger(...t);return{log:function(){for(var e=arguments.length,t=new Array(e),a=0;a(g??0)&&e>_+c.minBufferTime&&(d.log("Got rebuffering!!"),f.trigger("rebuffering"),D(),p=!0)}function D(){null!==m&&(d.log("Stoping rebuffering watcher"),clearInterval(m),m=null,E=!1,h=null,_=null,g=null)}function S(){null!==A&&(d.log("Stoping buffering watcher"),clearTimeout(A),A=null)}function w(){null===m&&null===A&&(d.log("Starting buffering watcher"),A=setTimeout((function(){d.log("Got buffering!!"),f.trigger("buffering"),S()}),c.startBufferTime))}function R(){return+Date.now()}const T={init(e){c=Object.assign({},u,e)},on:(e,t)=>f.on(e,t),off:(e,t)=>f.off(e,t),startWatching(){p=!0},stopWatching(){p=!1,D(),S()},onTimeUpdate(){if(v)return;if(p&&null===m&&(d.log("Starting rebuffering watcher"),m=setInterval(y,c.watcherInterval),p=!1),null===m)return;const e=R();h||(h=e),g=e},onPlaying(){S()},onWaiting(){_=R(),w()},onSeek(){v=!0,p=!0,D()},onSeeked(){v=!1},reset(){this.stopWatching(),m=null,A=null,E=!1,p=!1,h=null,g=null,_=null,v=!1}},P=s("Quality","HLS"),I=(e,t)=>`${t}/mp4;codecs=${e}`,L=function(){if("undefined"==typeof self)return;return(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource},b=()=>{if(!L())return!1;const e=self.SourceBuffer||self.WebKitSourceBuffer;return Boolean(!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove)},C=()=>{if(!b())return!1;const e=L();return Boolean("function"==typeof e?.isTypeSupported&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((t=>e.isTypeSupported(I(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(I(t,"audio"))))))};function N(e,t){if(!e||0===e.length)return-1;if(!t||0===t.offsetHeight)return-1;const a=e[0].width/e[0].height<=t.offsetWidth/t.offsetHeight?e.findIndex((e=>{let{height:a}=e;return a>=t.offsetHeight}))??-1:e.findIndex((e=>{let{width:a}=e;return a>=t.offsetWidth}))??-1;return P.log(`Capped quality for player (${t.offsetWidth}x${t.offsetHeight}): ${e.map(((e,t)=>{let{name:i,width:n,height:r}=e;return`\n${t===a?"✔":"✘"} ${i} (${n}x${r})`})).join("")}`,`\n${-1===a?"✔":"✘"} auto`),a}const O=s("Video"),M=e=>setTimeout(e,0),k=e=>{let{isVideoStart:t,isRecovering:a,startAt:n,videoSlotMetrics:r,config:o,onSpeedChange:s,chromecastRemoteEnabledEventEmitter:l,speedChangeRequestedEventEmitter:d,qualityChangeRequestedEventEmitter:u,streamTechChangeEventEmitter:c,videoWaitEventEmitter:m,stateHelpers:A,seekRequestedEventEmitter:E,videoSeekedEventEmitter:p,videoSeekingEventEmitter:h,loadVideoEventEmitter:g,videoDurationChangeEventEmitter:_,videoStartEventEmitter:v,togglePlaybackRequestedEventEmitter:f,playRequestedEventEmitter:y,pauseRequestedEventEmitter:D,videoPauseEventEmitter:S,videoCanPlayEventEmitter:w,videoPlayEventEmitter:R,videoPlayingEventEmitter:P,videoTimeUpdateEventEmitter:I,videoBufferingEventEmitter:L,videoRebufferingEventEmitter:b,videoBufferUpdateEventEmitter:N,videoSteadyPlayEventEmitter:k,videoLoadedDataEventEmitter:U,videoEndedEventEmitter:x,adLinearWillStartEventEmitter:V,lastFragmentBufferedEndSignal:H,liveEdgeDelayChangedEventEmitter:q,seekIsRequestedSignal:F,timeOffsetChangedEventEmitter:B,videoNode:G,watchtower:Y}=e,W=0;const Q=C(),j=()=>{y.off(Te),D.off(Pe),f.off(Re),E.off(Le),d.off(Ie),l.off(He),V.off(qe),be(),O.log("Torn down")};let K,$,z,Z,X,J=!1,ee=!1;const te={watched:0,played:0,time:0,buffer:0},ae=null!=G?G.controls:void 0;let ie=!1;const ne=()=>{(G.src||G.currentSrc)&&R.emit()},re=()=>{if(J=!0,P.emit(),!ee)if(ee=!0,"function"==typeof G.requestVideoFrameCallback)G.requestVideoFrameCallback((()=>{window.dm?.posterSooner&&window.dm.posterSooner.removePosterSooner()}));else{const e=()=>{window.dm?.posterSooner&&window.dm.posterSooner.removePosterSooner(),G.removeEventListener("timeupdate",e)};G.addEventListener("timeupdate",e)}},oe=()=>{m.emit()},se=()=>{k.emit()},le=()=>{L.emit()},de=()=>{b.emit()},ue=()=>{O.log("set initial quality from stream tech change"),ke()},ce=()=>{G.removeEventListener("play",ce),G.addEventListener("pause",Ae),G.addEventListener("timeupdate",Ee),Y.notify({name:"vital_content_ready_to_play"},{oncePerPlayback:!0}),v.emit()},me=()=>{if(K=!0,U.emit(),z){const e=z;z=!1,E.emit(e)}c.off(ue)},Ae=()=>{(G.src||G.currentSrc)&&(null!=G.currentTime&&G.currentTime===G.duration||(O.log(`core video PAUSE (seeking: ${G.seeking})`),S.emit()))},Ee=()=>{if(!K)return;if(!$)return;if(ge(),z||Z)return;const{currentTime:e}=G;te.time=e;let{lastCurrentTime:t,playedTimeRanges:a,lastWatched:i}=r;if(null!=t){const a=e-t;a>0&&a<1&&(i+=a)}const s=G.played.length;if(s>0){for(let e=0;e{te.played+=e.end-e.start})),te.played=Me(n,te.played),te.watched=Math.max(i,te.played);const l=pe();te.buffer=null!=l?l-e:0,r.lastCurrentTime=e,r.lastWatched=i,r.playedTimeRanges=a,A.isAdRunning()||I.emit(te),ie&&o.isVideoSeekable()&&!Q&&ve()},pe=()=>{let e;const t=G.buffered.length;if(t>0){let a=[];for(let e=0;e=n.start&&i{const a=[];let i;e.sort((function(e,t){const a=e.start-t.start;return a||t.end-e.end}));const n=e.length;for(let r=0;rn.start-t?i.end{const e=pe();null!=e&&X!==e&&(X=e,H.value=e||0,N.emit({buffer:e}))},_e=()=>new Promise((e=>{if(G.duration!==1/0)e(G.duration);else{const t=setInterval((()=>{if(!K)return;const a=G.played.length&&G.played.end(0);e(a||0),clearInterval(t)}),100)}})),ve=()=>{o.isVideoSeekable()?_e().then((e=>{_.emit({duration:e-W}),0===e&&G.removeEventListener("durationchange",ve)})):(_.emit({duration:0}),G.removeEventListener("durationchange",ve))},fe=()=>{w.emit(),G.removeEventListener("canplay",fe)},ye=()=>{Z=!1,null!=r&&(r.lastCurrentTime=G.currentTime),p.emit({time:G.currentTime})},De=()=>{J&&(x.emit(),xe())},Se=()=>!o.isVideoSeekable(),we=e=>{O.log("Reloading instead of resuming the current live"),g.emit({videoId:o.metadata.access_id,interactionType:e,isReloadingLiveAfterPause:!0,from:"playbackButton"})},Re=e=>{G.paused?Se()?we(e.interactionType):y.emit(e):D.emit(e)},Te=e=>{G.paused&&(Se()?we(e.interactionType):G.play())},Pe=()=>{G.paused||G.pause()},Ie=e=>{let{speed:t}=e;G.playbackRate=t,setTimeout((()=>{s(t)}),500)},Le=e=>{_e().then((t=>{if(F.value=!1,ie||(t-=W),!i(t)||0===t)return void(K&&(z=e));let a,n,r=NaN;null!=e.perc?r=e.perc/100*t:null!=e.time&&(r=e.time),r+=W;const s=o.metadata.info?.live_dvr_window||0;s>0?(n=t>s?t-s:0,a=t-5):(n=0,a=Math.floor(10*t)/10),r=Math.min(Math.max(n,r),a);const{currentTime:l}=G;l!==r&&(Z=!0,h.emit({time:l,interactionType:e.interactionType}),G.currentTime=r)}))},be=()=>{T.off("steadyplay",se),T.off("buffering",le),T.off("rebuffering",de),G.removeEventListener("timeupdate",T.onTimeUpdate),G.removeEventListener("play",T.startWatching),G.removeEventListener("waiting",T.onWaiting),G.removeEventListener("playing",T.onPlaying),G.removeEventListener("seeking",T.onSeek),G.removeEventListener("seeked",T.onSeeked),G.removeEventListener("pause",T.stopWatching),G.removeEventListener("ended",T.stopWatching),G.removeEventListener("error",T.stopWatching),T.reset(),G.removeEventListener("play",ce),G.removeEventListener("play",ne),G.removeEventListener("pause",Ae),G.removeEventListener("playing",re),G.removeEventListener("waiting",oe),G.removeEventListener("timeupdate",Ee),G.removeEventListener("durationchange",ve),G.removeEventListener("canplay",fe),G.removeEventListener("loadeddata",me),G.removeEventListener("seeked",ye),G.removeEventListener("ended",De),G.removeEventListener("progress",ge)},Ce=()=>{if(n=G.duration===1/0?G.played.end(0):G.duration,ie&&o.isVideoSeekable()){if(!Q)return void q.emit({delay:24});G.currentTime{n=Oe(0,n,G.duration),n&&E.emit({time:n,interactionType:"programmatic"}),window.DMP_ENABLE_ADS&&A.contentShouldResumePaused()&&M((()=>{D.emit({interactionType:"programmatic"})}))},Oe=(e,t,a)=>Math.min(Math.max(e,t),a),Me=(e,t)=>ie&&G.played.length&&0===G.played.start(0)&&t>=e?t-e:t,ke=()=>{M((()=>{u.emit({startPlayback:!0,isRecovering:a})}))},Ue=()=>{const e=A.getPlaybackSpeed();M((()=>{d.emit({speed:e})}))},xe=()=>{K=!1,$=!1,Ve(),j()},Ve=()=>{G.pause(),["autoplay","height","loop","muted","poster","preload","src","type","width"].forEach((e=>{G.removeAttribute(e)})),ae?G.setAttribute("controls","controls"):G.removeAttribute("controls"),G.load()};y.on(Te),D.on(Pe),f.on(Re),B.on((e=>{W=e.timeOffset,_e().then((e=>{_.emit({duration:e-W})}))})),null==r.lastCurrentTime&&(r.lastCurrentTime=0,r.lastWatched=0,r.playedTimeRanges=[]),E.on(Le),d.on(Ie);const He=()=>{G.pause(),j()};l.on(He);const qe=e=>{let{position:t}=e;["midroll","liveadbreak"].indexOf(t??"")>-1&&j()};return V.on(qe),(()=>{t?G.addEventListener("play",ce):(G.addEventListener("pause",Ae),G.addEventListener("timeupdate",Ee)),G.addEventListener("play",ne),G.addEventListener("playing",re),G.addEventListener("waiting",oe),G.addEventListener("durationchange",ve),G.addEventListener("canplay",fe),G.addEventListener("loadeddata",me),G.addEventListener("seeked",ye),G.addEventListener("ended",De),G.addEventListener("progress",ge),T.on("steadyplay",se),T.on("buffering",le),T.on("rebuffering",de),G.addEventListener("timeupdate",T.onTimeUpdate),G.addEventListener("play",T.startWatching),G.addEventListener("waiting",T.onWaiting),G.addEventListener("playing",T.onPlaying),G.addEventListener("seeking",T.onSeek),G.addEventListener("seeked",T.onSeeked),G.addEventListener("pause",T.stopWatching),G.addEventListener("ended",T.stopWatching),G.addEventListener("error",T.stopWatching),ie="live"===o.metadata.stream?.stream_type;const e=new Promise((e=>{const t=()=>{w.off(t),e()};w.on(t)})),a=new Promise((e=>{const t=()=>{_.off(t),e()};_.on(t)}));Promise.all([e,a]).then((()=>{ie?Ce():Ne(),$=!0,Ue()})),ke(),c.on(ue)})(),O.log("Initialized"),{teardown:j,cleanUpVideoTag:Ve}},U=document.createElement("video");function x(){return"function"==typeof U.canPlayType&&""!==U.canPlayType("application/x-mpegURL")}const V={UNKNOWN:0,RUNTIME:1e3,NETWORK:2e3,MEDIA:3e3},H={UNKNOWN:0,INVALID_ARG:100,HTTP_ERROR:101,HTTP_ABORT:102,HTTP_TIMEOUT:103,M3U8_PARSE_ERROR:104};function q(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return a="string"==typeof a?a:"",{category:e=parseInt(String(e),10)||V.UNKNOWN,code:t=parseInt(String(t),10)||H.UNKNOWN,message:a}}function F(e,t){return q(V.MEDIA,e,t)}function B(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e||"string"!=typeof e)throw F(H.INVALID_ARG,'parseM3U8Master() expects "str" to be a string');if(0!==e.indexOf("#EXTM3U"))throw F(H.M3U8_PARSE_ERROR,"Failed to parse the master manifest: format-identifier tag is missing");return{url:t,renditions:G(Q(e,t)),subtitles:j(e,t)}}function G(e){if(0===e.length)throw F(H.M3U8_PARSE_ERROR,"Failed to parse the master manifest: renditions are missing");const t={},a=[];return e.sort(((e,t)=>e.bandwidth-t.bandwidth)).forEach((e=>{e.bandwidth in t?a[t[e.bandwidth]].backups.push(e):t[e.bandwidth]=a.push(e)-1})),a}const Y=/#EXT-X-STREAM-INF:([^\r\n]*)[\r\n]+([^\r\n]+)/g,W=/#EXT-X-MEDIA:TYPE=SUBTITLES([^\r\n]*)/g;function Q(e,t){const a=[];let i=null;for(Y.lastIndex=0;null!==(i=Y.exec(e));){const e=$(i[1]);if(e)try{a.push({url:new URL(i[2],t).toString(),progressiveURL:e["PROGRESSIVE-URI"]||"",name:e.NAME||"",bandwidth:e.BANDWIDTH||0,codecs:e.CODECS||"",resolution:e.RESOLUTION||[0,0],backups:[]})}catch(e){throw F(H.M3U8_PARSE_ERROR,`Failed to parse rendition URL: ${e.message}`)}}return a}function j(e,t){const a=[];let i=null;W.lastIndex=0;let n=0;for(;null!==(i=W.exec(e));){const e=$(i[1]);e&&a.push({url:new URL(e.URI,t).toString(),name:e.NAME||"",lang:e.LANGUAGE||e["ASSOC-LANGUAGE"],groupId:e["GROUP-ID"]||"",id:n,code:e.LANGUAGE||`${e["ASSOC-LANGUAGE"]}-auto`}),n++}return a}const K=/\s*(.+?)\s*=\s*((?:".*?")|.*?)(?:,|$)/g;function $(e){let t=null,a=null;for(K.lastIndex=0;null!==(a=K.exec(e));)switch(null===t&&(t={}),a[1]){case"BANDWIDTH":t[a[1]]=parseInt(a[2],10)||0;break;case"RESOLUTION":t[a[1]]=[parseInt(a[2].split("x")[0],10)||0,parseInt(a[2].split("x")[1],10)||0];break;case"CODECS":case"NAME":case"PROGRESSIVE-URI":t[a[1]]=0===a[2].indexOf('"')?a[2].slice(1,-1):a[2];break;default:t[a[1]]=a[2].replace(/^"(.*)"$/,"$1")}return t}let z,Z;const X=e=>/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e),J=function(){let{startTime:e=null,endTime:t=null,maxDuration:a=6e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=()=>{const e=n.endTime-n.startTime;n.duration=e<0?null:e>a?a:Math.round(e)},n={isMetric:!0,startTime:e?Math.round(e):e,endTime:t?Math.round(t):t,duration:null,start:()=>{n.startTime=Math.round(performance.now())},end:()=>{n.endTime=Math.round(performance.now()),i()}};return e&&t&&i(),n},ee=async(e,t)=>{let{method:a="GET",headers:i={},signal:n,allocatedMs:r}=t;const o=te(),s=te();let l=new XMLHttpRequest;n&&(n.onabort=()=>{l&&l.abort()});const d=e=>{u(),o.settled?s.reject(e):o.reject(e)},u=()=>{l.ontimeout=null,l.onerror=null,l.onreadystatechange=null,l.onload=null,l=null};l.open(a,e),l.onabort=()=>{d(ie({url:e}))},"number"==typeof r&&r>0&&r!==1/0&&(l.timeout=r),l.ontimeout=()=>{d(ne({allocatedMs:r,url:e}))},l.onerror=()=>{d(re({url:e}))},l.onreadystatechange=()=>{2===l.readyState&&o.resolve()},l.onload=()=>{const e=l.responseText||"";u(),s.resolve(e)},Object.keys(i).forEach((e=>{l.setRequestHeader(e,i[e])})),l.withCredentials=!0,l.send(),await o;const c=parseInt(String(l.status),10)||0,m=String(l.statusText).toLowerCase(),A=ae(l);return{status:c,statusText:m,url:l.responseURL||A["x-request-url"]||e,headers:A,text:async()=>await s}},te=()=>{let e,t;const a=new Promise(((i,n)=>{e=e=>{a.settled=!0,i(e)},t=e=>{a.settled=!0,n(e)}}));return a.resolve=e,a.reject=t,a},ae=e=>{const t={},a=e.getAllResponseHeaders();if(""===a)return t;return a.trim().split(/[\r\n]+/).forEach((e=>{const a=e.split(": "),i=a.shift(),n=a.join(": ");t[i.toLowerCase()]=n})),t},ie=e=>{let{url:t}=e;const a=new Error(`request abort on ${t}`);return a.name="AbortError",a},ne=e=>{let{allocatedMs:t,url:a}=e;const i=new Error(`timeout after ${t}ms on ${a}`);return i.name="TimeoutError",i},re=e=>{let{url:t}=e;const a=new Error(`network error on ${t}`);return a.name="NetworkError",a},oe=e=>{let{status:t,url:a,subCode:i,canRetry:n}=e;const r=new Error(`unexpected response status ${t} on ${a}`);return r.name="ResponseStatusError",r.status=t,r.subCode=i,r.canRetry=n,r},se={144:{name:"144",label:"144p",width:176,height:144,tag:""},240:{name:"240",label:"240p",width:320,height:240,tag:""},380:{name:"380",label:"380p",width:512,height:380,tag:""},480:{name:"480",label:"480p",width:848,height:480,tag:"",supportHFR:!0},720:{name:"720",label:"720p",width:1280,height:720,tag:"HD",supportHFR:!0},1080:{name:"1080",label:"1080p",width:1920,height:1080,tag:"HD",supportHFR:!0},1440:{name:"1440",label:"1440p",width:2560,height:1440,tag:"HD",supportHFR:!0},2160:{name:"2160",label:"2160p",width:3840,height:2160,tag:"4K",supportHFR:!0},"AV1-380":{name:"380",label:"380p",width:512,height:380,tag:""},"AV1-480":{name:"480",label:"480p",width:848,height:480,tag:"",supportHFR:!0},"AV1-720":{name:"720",label:"720p",width:1280,height:720,tag:"HD",supportHFR:!0},"AV1-1080":{name:"1080",label:"1080p",width:1920,height:1080,tag:"HD",supportHFR:!0},"AV1-1440":{name:"1440",label:"1440p",width:2560,height:1440,tag:"HD",supportHFR:!0},"AV1-2160":{name:"2160",label:"2160p",width:3840,height:2160,tag:"4K",supportHFR:!0},source:{name:"source",label:"Source",tag:""},audio:{name:"audio",label:"Audio",tag:""}},le={3840:se[2160].name,2560:se[1440].name,1920:se[1080].name,1280:se[720].name,848:se[480].name,512:se[380].name,320:se[240].name,176:se[144].name},de={2160:se[2160].name,1440:se[1440].name,1080:se[1080].name,720:se[720].name,480:se[480].name,380:se[380].name,240:se[240].name,144:se[144].name},ue=25,ce=(e,t)=>e.reduce(((e,a)=>Math.abs(t-e)ue&&(e.label=`${e.label}${e.framerate}`),e}var i;return null}static async createFromLevels(e,t){const a=new me;for(let i=0;i=t?{mapping:le,dimension:e}:{mapping:de,dimension:t},n=ce(Object.keys(a),i);return a[Number(n)]}constructor(){this._qualities={},this.obsoleteIndexes=[],this.hasNumericQualities=!1}addQuality(e,t,a,n,r,o,s){let l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:-1,d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;if(this.hasQuality(e)||(this._qualities[e]={name:e,label:t,tag:o,width:a,height:n,framerate:r,resource:s,index:l,levels:[]}),i(e)&&(this.hasNumericQualities=!0),null!=d){if(null!=this._qualities[e].levels[0]&&this._qualities[e].levels[0].videoCodec!=d.videoCodec&&this._qualities[e].levels[0].bitrate>d.bitrate){const t=this._qualities[e].levels[0].index;return this._qualities[e].levels[0]=d,t}this._qualities[e].levels.push(d)}}hasQuality(e){return null!=this._qualities[e]}hasLevels(e){return this.hasQuality(e)&&this._qualities[e].levels.length>0}getQualityForLevel(e){for(const t in this._qualities){if(this._qualities[t].levels.find((t=>{let{index:a}=t;return a===e})))return this._qualities[t]}return null}getQualityForName(e){return this.hasQuality(e)?this._qualities[e]:null}hasOnePlayableQuality(){return null!=this.getFirstAvailable()||this.adaptiveSupported()}getFirstAvailable(){return this._qualities[Object.keys(this._qualities)[0]]}getLevelForQualityName(e){if(this.hasLevels(e)){if(1===this._qualities[e].length)return this._qualities[e].levels[0].index;const t=this._qualities[e].levels;let a=0,i=this._qualities[e].levels[a].bitrate;for(let n=1;n{const{levels:t,...a}=this._qualities[e];return a})).reverse();return{adaptiveSupported:this.adaptiveSupported(),qualities:e}}getObsoleteIndexes(){return this.obsoleteIndexes}}const Ae=me;const Ee=class extends Ae{constructor(e){super(),this._adaptiveResource=null,this._isNativeHlsSupported=x(),this._manifest=e,e&&(this._isNativeHlsSupported&&(this._adaptiveResource={type:"application/x-mpegURL",url:e.url}),e.renditions.forEach((e=>{const t=Ae.normalizeQuality(e.name);if(t){const a=this._isNativeHlsSupported?e.url:e.progressiveURL;if(a){const e=this._isNativeHlsSupported?"application/x-mpegURL":"video/mp4";this.addQuality(t.name,t.label,t.width,t.height,t.framerate,t.tag,{type:e,url:a})}}})))}hasOnePlayableQuality(){return!!this._manifest&&(null!=this.getFirstAvailable()||this.adaptiveSupported())}getAutoQuality(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{...Ae.normalizeQuality(e),resource:this._adaptiveResource}}adaptiveSupported(){return this._isNativeHlsSupported}},pe=s("Quality","StaticQuality"),he="dmp_quality",ge=(e,t)=>"object"==typeof e&&null!==e&&t in e?Reflect.get(e,t):void 0,_e=e=>{let{qualities:t,defaultQualityName:a="480",localStore:i,videoPauseEventEmitter:n,config:r,playerSizeAPI:o,speedChangeRequestedEventEmitter:s,qualitiesAvailableEventEmitter:l,qualityChangedEventEmitter:d,qualityChangeRequestedEventEmitter:u,qualityStatsRequestedEventEmitter:c,qualityStatsRespondedEventEmitter:m,streamTechChangeEventEmitter:A,utilsHelpers:E,onQualityLoadStart:p,seekRequestedEventEmitter:h,sequenceStartedEventEmitter:g,loadVideoEventEmitter:_,SSAI:v,canPlayOneSourceEventEmitter:f,videoPlayEventEmitter:y,videoLoadedMetadataEventEmitter:D,videoSlotStartedEventEmitter:S,videoSlotEndedEventEmitter:w,adLinearWillStartEventEmitter:R,errorPlayerEventEmitter:T,subtitlesChangeRequestedEventEmitter:P,subtitleIdSignal:I,subtitlesDataSignal:L,videoNode:b}=e;const C={onabort:()=>{}};let N=!1;const O=b;let M=null,k=!1,U=!1,V=()=>{};const H=new Promise((e=>{V=()=>e()}));let q,F,G,Y,W=0,Q=0,j=0,K={adaptive:null,quality:null},$={adaptive:null,quality:null},te=null,ae=2,ne=[];const re=()=>{if(!M)throw new Error("Quality list is not available yet");return M},se=e=>{const t=re(),i=t.getQualityNameOrClosestNumericQualityName(e??""),n=t.getQualityNameOrClosestNumericQualityName(a);return e&&i?(pe.log(`Choosing quality based on '${e}' (qs or requested value)`),t.getQualityForName(i)):n?(pe.log(`Choosing quality based on '${a}' (player size)`),t.getQualityForName(n)):(pe.log("No numeric quality available, picking the first one available..."),t.getFirstAvailable())},le=async e=>{if(M||await H,!k)return;pe.log("QUALITY_CHANGE_REQUESTED",e);const t={name:e&&e.qualityName?e.qualityName:"",adaptive:!(!e||!e.adaptive)&&e.adaptive},a=!(!e||!e.startPlayback)&&e.startPlayback,n=!(!e||!e.isRecovering)&&e.isRecovering,r={isStartup:a,isReplay:a&&j>0,isRecovering:n};let o;if(a)j++,ce($)&&de(),o=$;else if(n)o=$;else{if(ce(K)||K.adaptive&&t.adaptive||!K.adaptive&&!t.adaptive&&t.name===K.quality?.name)return void pe.log("Skipping quality change request");t.adaptive?(o={adaptive:re().adaptiveSupported(),quality:null},i.remove(he)):(o={adaptive:!1,quality:null},pe.log(`Save '${t.name}' quality in local storage`),i.set(he,t.name)),o.quality=se(t.name||K.quality?.name),o=ye(o)}null!=o.quality?($=o,De(o,r)):ve("PLAYER_ERR_UNEXPECTED","QUALITY_NOT_FOUND")},de=()=>{$=(()=>{const e=re(),t=i.get(he),n=r.settings("quality"),s=null==n?null:String(n),l=Ae.getNumericQualityNameFromVideoSize(o.width,o.height);a=l;let d={adaptive:e.adaptiveSupported(),quality:null};const u=e.getQualityNameOrClosestNumericQualityName(t??"");return t&&u?(d.adaptive=!1,d.quality=e.getQualityForName(u),pe.log(`Choosing quality based on '${t}' (local storage)`)):d.quality=se(s),d=ye(d),pe.log("Initial quality set",d),d})()},ue=()=>{clearInterval(G)},ce=e=>null===e.adaptive&&null===e.quality,me=()=>{b.addEventListener("error",be),b.addEventListener("loadedmetadata",Re),b.addEventListener("canplay",Te),b.addEventListener("loadeddata",Pe),b.addEventListener("playing",Ie),b.textTracks.onchange=()=>Le()},_e=()=>{b.removeEventListener("error",be),b.removeEventListener("loadedmetadata",Re),b.removeEventListener("canplay",Te),b.removeEventListener("loadeddata",Pe),b.removeEventListener("playing",Ie)},ve=(e,t)=>{const a={subCode:e,reason:t},n={from:"runtime",code:"QUALITY_SWITCHER_ERROR",extra:a};b&&(a.src=b.src,a.currentSrc=b.currentSrc,a.qualityUrl=$&&$.quality&&$.quality.resource&&$.quality.resource.url?$.quality.resource.url:null),i.remove(he),T.emit(E.createError(n))},fe=()=>{m.emit()},ye=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e.adaptive){const a=re();a.adaptiveSupported()&&(e.quality=a.getAutoQuality(t))}return e},De=(e,t)=>{const{isStartup:a,isRecovering:i}=t;!function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=K&&K.quality&&K.quality.name?K.quality.name:null,i=e&&e.quality&&e.quality.name?e.quality.name:null;if(t||e.adaptive!==K.adaptive||i!==a){pe.log("Quality change confirmed",e);const{resource:t}=e.quality;if("application/x-mpegURL"===t.type)return pe.log("Enabling HLS video specialization"),void(U=!0);pe.log("Disabling HLS video specialization"),U=!1,ue()}else pe.log("Skipping quality change confirmed, nothing changed")}(e,a||i);const n=e.quality.resource,r=n.url,o=!b.paused,s=b.currentTime;if(Y=b.playbackRate,e.adaptive){const e=re()._manifest.renditions,t=e[e.length-1];p(t.url)}else p(r);"application/x-mpegURL"===n.type?(O.type="application/vnd.apple.mpegurl",b.src=r):(O.type="video/mp4",b.src=r),(o||a)&&b.play(),s&&h.emit({time:s,interactionType:"programmatic"})},Se=e=>{const t=Array.from(b.textTracks).find((e=>"showing"===e.mode));t&&(t.mode="disabled"),-1!==e&&(b.textTracks[e].mode="showing")},we=()=>{if(!b||!b.src)return;let e=$;if(!e.quality||"source"!==e.quality.name&&"audio"!==e.quality.name){const t=Ee.getNumericQualityNameFromVideoSize(b.videoWidth,b.videoHeight);e.quality=re().getQualityForName(t),e=ye(e,t)}ae=2,(e=>{const t=b.videoWidth,a=b.videoHeight,i=t>0&&a>0,n=t!==W||a!==Q,o=e.adaptive!==K.adaptive,s="audio"===r.metadata.info?.media_type;if(i&&(n||o)||s){K=e,W=t,Q=a;const i={videoWidth:W,videoHeight:Q,...e};pe.log("QUALITY_CHANGED",i),d.emit(i)}})(e)},Re=()=>{we(),D.emit(),1!==Y&&s.emit({speed:Y}),U&&we()},Te=()=>{},Pe=()=>{var e;(e=ne)&&(ne=e,pe.log("SUBTITLES_AVAILABLE",ne),L.value=ne)},Ie=()=>{te=null},Le=()=>{const e=Array.from(b.textTracks).findIndex((e=>"showing"===e.mode));var t;t={subtitleId:e},pe.log("SUBTITLE CHANGED",t),I.value=t.subtitleId},be=e=>{const t=ge(e.target,"error")||{};let a;switch(ge(t,"code")){case ge(t,"MEDIA_ERR_ABORTED"):a="MEDIA_ERR_ABORTED";break;case ge(t,"MEDIA_ERR_NETWORK"):a="MEDIA_ERR_NETWORK";break;case ge(t,"MEDIA_ERR_DECODE"):a="MEDIA_ERR_DECODE";break;case ge(t,"MEDIA_ERR_SRC_NOT_SUPPORTED"):a="MEDIA_ERR_SRC_NOT_SUPPORTED";break;default:a="PLAYER_ERR_UNKNOWN"}Ce(a,ge(t,"message")||"Unknown error")},Ce=(e,t)=>{pe.warn("error received:",e),"MEDIA_ERR_DECODE"===e&&ae-- >0?Ne():te!==e&&(te=e,ve(e,t))},Ne=()=>{pe.log("Recovering from decode error, remaining attempts:",ae);const e=b.src,t=b.currentTime,a=e=>{let{type:t}=e;b.removeEventListener(t,a),b.play()},i=e=>{let{type:a}=e;b.removeEventListener(a,i),b.currentTime=t};b.removeAttribute("src"),b.load(),b.addEventListener("loadedmetadata",a),b.addEventListener("loadeddata",i),b.setAttribute("src",e)};u.on(le),S.on(me),P.on((e=>{pe.log("SUBTITLE_CHANGE_REQUESTED",e),Se(e.id)})),w.on((()=>{_e()})),c.on(fe),A.emit({streamTech:"native"}),pe.log("Initialized");const Oe=()=>{U&&"audio"!==r.metadata.info?.media_type&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;clearInterval(G),G=setInterval((()=>{we()}),e)}()};_.once((()=>{clearInterval(G),g.off(Me),u.off(le),S.off(me),w.off(_e),c.off(fe),n.off(ue),y.off(Oe),R.off(ke),C.onabort(),C.onabort=()=>{},pe.log("Torn down"),_e()}));const Me=async()=>{if(q=r.metadata.stream?.stream_type||null,r.metadata.stream?.ssai_session_url&&(({qualities:t}=await v.getStreamUrl()),v.start({hlsjs:null})),F=(e=>e&&e.auto&&e.auto.length>0?e.auto[0].url:null)(t),q&&F&&!N){if("live"===q&&!x())return pe.error("Attempting to play a live stream on a device not supporting MSE nor native HLS"),k=!1,f.emit({ok:!1}),T.emit(E.createError({code:"PLAYER_ERR_VIDEO_NOT_SUPPORTED"})),void V();N=!0;try{const e=await(async(e,t)=>{let{signal:a}=t;if(e===z)return Z;z=null,Z=null;let i=0;const n={time_to_first_byte:J()},r=async()=>{let t,o;n.time_to_first_byte.start();const s=await ee(e,{method:"GET",signal:a}),{status:l,body:d,url:u,headers:c}=s;if(n.time_to_first_byte.end(),l>=200&&l<=299){const t=await s.text();return X(t)?(e=d,r()):(z=e,Z={url:u,string:t,object:B(t,u),metrics:n},Z)}if(403===l&&(t=c["x-error-code"],o="yes"===c["x-retry"]?.toLowerCase()),i<2)return await new Promise(((t,n)=>{const r=setTimeout(t,500*(i+1));a.onabort=()=>{clearTimeout(r),n(ie({url:e}))}})),i++,r();throw oe({status:l,url:e,subCode:t,canRetry:o})};return r()})(F,{signal:C});return pe.log("The stream has been loaded"),N=!1,M=new Ee(e.object),pe.log("QUALITIES_AVAILABLE",M.availableQualities()),l.emit(M.availableQualities()),k=M.hasOnePlayableQuality(),f.emit({ok:k}),ne=e.object.subtitles,void V()}catch(e){N=!1;const t=ge(e,"name");if("AbortError"===t)return;if(pe.error("The stream loading has failed",e),k=!1,f.emit({ok:!1}),"ResponseStatusError"===t){const t=ge(e,"subCode"),a=ge(e,"canRetry");T.emit(E.createError({from:"runtime",code:"STREAMING_MANIFEST_LOAD_ERROR",extra:{http_status:ge(e,"status"),url:F,...t?{subCode:t}:{},...a?{canRetry:a}:{}}}))}else{const t=ge(e,"code")||"PLAYER_ERR_UNEXPECTED";T.emit(E.createError({code:t}))}return void V()}}};g.on(Me);const ke=e=>{let{position:t}=e;"midroll"!==t&&"liveadbreak"!==t||(b.removeAttribute("src"),b.load())};R.on(ke),(async()=>{M||await H,k&&de()})(),y.on(Oe),n.on(ue)};var ve=a(2328);let fe=null,ye=null;const De=(0,ve.td)(null),Se=e=>{let{isGKEnabled:t}=e;if(ye)return ye;const i=t("PV5_NEWER_HLSJS");return ye=(i?a.e(992).then(a.t.bind(a,9013,23)):a.e(602).then(a.t.bind(a,7631,23))).then((e=>{let{default:t}=e;return(e=>{fe=e,De.value=e})(t),t})),ye};var we=a(6961),Re=a.n(we),Te=a(2424);const Pe=s("Quality","HLS"),Ie=(0,ve.td)(null),Le=e=>{Ie.value=ke(e)?"pending":null},be=(e,t)=>{ke(t)?Ie.value=e?"worker":"main-thread":Ie.value=null},Ce=(e,t,a)=>{if(!e||!t)return;const i=()=>be(Boolean(e.config?.enableWorker),a);i(),e.on(t.Events.MEDIA_ATTACHED,i),e.on(t.Events.ERROR,i)},Ne="dmp.hls.worker.69b2a37506443ee3ac26.js";let Oe=null,Me=null;const ke=e=>(e=>e("PV5_HLS_JS_WORKER"))(e),Ue=()=>{const e="undefined"!=typeof window?window.dm?.vars?.assetsPath:"";if(!e)return Ne;return`${e.endsWith("/")?e:`${e}/`}${Ne}`},xe=e=>ke(e)?{enableWorker:!0,workerPath:Ue()}:{enableWorker:!1},Ve=async e=>{Le(e);const t=xe(e);if(!t.enableWorker)return be(!1,e),t;if((()=>{if("undefined"==typeof window)return!1;try{return new URL(Ue(),window.location.href).origin!==window.location.origin}catch{return!1}})())try{t.workerPath=await(async()=>{if(Oe)return Oe;if(!Me){const e=Ue(),t=new AbortController,a=setTimeout((()=>t.abort()),1e4);Me=fetch(e,{mode:"cors",signal:t.signal}).then((e=>{if(clearTimeout(a),!e.ok)throw new Error(`Failed to fetch hls worker (${e.status})`);return e.text()})).then((e=>{const t=new Blob([e],{type:"application/javascript"});return Oe=URL.createObjectURL(t),Oe})).catch((e=>{throw clearTimeout(a),Me=null,e}))}return Me})(),Pe.log("Using hls worker blob URL",{workerPath:t.workerPath})}catch(t){Pe.warn("Cross-origin hls worker unavailable, falling back to main-thread transmuxing",t);const a={enableWorker:!1};return be(!1,e),a}return be(t.enableWorker,e),t},He=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue();return ke(arguments.length>1?arguments[1]:void 0)?{hlsWorker:"enabled",workerPath:e}:{hlsWorker:"disabled"}};let qe=!1,Fe=null,Be=!1,Ge=0;const Ye=s("Preloading"),We=e=>{let{isGKEnabled:t,settingsSignal:a}=e;return Boolean(a.value.enableContentPreload)&&t("PV5_PRELOADING_CONTENT")};function Qe(e,t){const a=e.findIndex((e=>e.height===t));return a>=0?a:e.reduce(((a,i,n)=>{const r=a>=0?e[a]:null;return Math.abs(i.height-t)<(r?Math.abs(r.height-t):1/0)?n:a}),-1)}const je=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,r=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0;if(e&&"string"==typeof e)if(qe)Ye.log("Preload already in progress - skipping");else if(Be)Ye.log("Preload already completed - skipping");else{Ye.log("Starting video preload"),qe=!0,Ge=0;try{const s=await Se({isGKEnabled:o}),l=r;if(!l)return Ye.error("Main video element not found"),void Ke();const d=await Ve(o);Ye.log("create hls.js preload",He(d.workerPath,o)),Fe=new s({autoStartLoad:!0,maxBufferLength:5,maxMaxBufferLength:10,debug:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:1.5,capLevelToPlayerSize:!0,xhrSetup:(t,a)=>{a===e&&(t.withCredentials=!0)},...d}),Ce(Fe,s,o),Fe.attachMedia(l);const u=s.Events;Fe.on(u.MANIFEST_PARSED,(async(r,o)=>{const s=o.levels,d=s.map(((e,t)=>({index:t,quality:`${e.height}p`})));Ye.log("Manifest parsed - available qualities:",d);let u=await async function(e,t,a){const{savedQualityName:i,suggestedQualityName:n,playerWidth:r,playerHeight:o,hlsUrl:s}=a;let l=null;if(i){try{const t={url:s},a=await Ae.createFromLevels(e,t),n=a.getQualityNameOrClosestNumericQualityName(i);if(n){const t=a.getLevelForQualityName(n);null!=t&&t>=0&&t=0&&(l=t,Ye.log("Using saved quality preference (fallback):",i,"→",e[l].height,"p"))}}const d=!i||"auto"===String(i).toLowerCase();if(null===l&&d)try{const a={url:s},i=(await Ae.createFromLevels(e,a)).getObsoleteIndexes(),n=e.filter(((e,t)=>!i.includes(t)));if(n.length>0){const a=N(n,t);if(a>=0){const t=n[a];l=e.indexOf(t),l<0&&(l=t.index),Ye.log("Using auto quality (same as playback):",e[l].height,"p")}}}catch(e){Ye.error("Preload auto quality failed",e)}if(null===l&&n&&Number(n)>0){const t=Qe(e,Number(n));t>=0&&(l=t,Ye.log("Using suggested quality:",e[l].height,"p"))}if(null===l&&null!=r&&null!=o){const t=Qe(e,Number(Ae.getNumericQualityNameFromVideoSize(r,o)));t>=0&&(l=t,Ye.log("Using player-size quality:",e[l].height,"p"))}if(null===l){const a=N(e,t);a>=0&&(l=a,Ye.log("Using capped quality (video element):",e[a].height,"p"))}return null!=l&&l>=0&&l=0?(Fe.loadLevel=u,window._preloadQualityHeight=s[u].height,Ye.log("Quality locked to",s[u].height,"p (level index:",u,")")):Fe.startLevel>=0&&Fe.startLevel{if(Ge>=4)return;Ge++;const a=Fe.levels[t.frag.level];Ye.log("PRELOAD - Fragment loaded:",{sn:t.frag.sn,level:t.frag.level,quality:a?`${a.height}p`:"unknown",size:t.frag.stats?`${Math.round(t.frag.stats.total/1024)}KB`:"unknown",chunkCount:Ge,maxChunks:4}),Ge>=4&&(Ye.log(`Chunk limit reached (${Ge}/4) - stopping preload`),Fe.stopLoad())})),Fe.on(u.BUFFER_APPENDED,(()=>{if(4===l.readyState){const e=Fe.levels[Fe.currentLevel];Ye.log("PRELOAD - Video ready for instant playback",{quality:e?`${e.height}p`:"unknown",readyState:l.readyState,buffered:l.buffered.length>0?`${l.buffered.end(0).toFixed(1)}s`:"0s"})}})),Fe.on(u.ERROR,((e,t)=>{t.fatal&&(Ye.error("Preload failed:",t.type,t.details),Ke())})),Fe.loadSource(e),Be=!0}catch(e){Ye.error("Failed to start preload",e),Ke()}}else Ye.error("Invalid HLS URL provided")},Ke=()=>{const e=null!==Fe;if(Fe){try{Fe.destroy()}catch(e){Ye.error("Error destroying HLS instance:",e)}Fe=null,Ye.log("Preload cleaned up")}"undefined"!=typeof window&&void 0!==window._preloadQualityHeight&&(window._preloadQualityHeight=null),qe=!1,Ge=0,e&&(Be=!0)},$e=["Quality","HLS"],ze=s(...$e),Ze=s("Quality","DRM"),Xe="start",Je="current",et="replay",tt="recover";let at=null;const it=new WeakMap;const nt=class extends n{constructor(e){let{videoNode:t,subtitlesNode:a,resource:i,Hlsjs:n,streamType:r,drmTokenProvider:o,perf:s,isGKEnabled:d,settingsSignal:u,config:c}=e;super(),at=n,this.hlsVersion=at.version||"stable",this.videoTag=t,this.subtitlesNode=a,this.resource=i,this.boundListeners=null,this.hls=null,this._hlsInitPromise=null,this.manifestData=null,this.hashParams=null,this.mseAttached=!1,this._detachPromise=null,this.startLoad=!1,this._startLoadDeferred=!1,this.drmTokenProvider=o,this.perf=s,this.isGKEnabled=d,this.settingsSignal=u,this.config=c,this._drmLicenseLoadStarted=!1,this._drmLicenseLoadEnded=!1,this._hlsFirstSegmentReadyPerfStarted=!1,this.cumDownload=0,this.cumLatency=0,this.cumMux=0,this.cumBuffer=0,this.fragNb=0,this.fragDetailsNb=0,this.logArray=[],this.logMsg=null,this.resetStats(),this._cuesByTrackId={},this._pendingRecoveryRestart=!1,this._abortErrorHandler=e=>{this._pendingRecoveryRestart&&"AbortError"===e.reason?.name&&e.preventDefault()},window.addEventListener("unhandledrejection",this._abortErrorHandler),this._preloadUnlockListener=null,this._userAdaptiveMode=void 0,this.logForwarder={log:function(e,t){this.appendMsg("log",e,t)}.bind(this),warn:function(e,t){this.appendMsg("warn",e,t)}.bind(this),error:function(e,t){this.appendMsg("error",e,t)}.bind(this),debug(e,t){ze.log(e,t)},info(e,t){ze.log(e,t)}},this._preloadHeightForCache=null,this.encryptionKeyMap=new Map;const m=new URL(this.resource.url),A=`${c.metadata.id}.license`,E=e=>new URL(`/cdn/license/${e}/video/${A}`,m.href).href,p=E("widevine"),h=E("playready"),g=E("fairplay"),_=this.encryptionKeyMap,v=((e,t)=>{let a=0,i=null;return async()=>{const n=performance.now();if(e.tokenSignal.value&&n-e.issuedAt<6e4)return Ze.log("DRM token served from cache"),e.tokenSignal.value;i||(Ze.log("Requesting DRM token",{requestId:a+1}),t?.metric("hlsFetchDrmToken")?.start(),i=e.requestToken(++a).then((e=>{if(!e)throw new Error("DRM token unavailable");return e})).catch((e=>{throw Ze.error("DRM token fetch failed",{requestId:a},e),e})).finally((()=>{t?.metric("hlsFetchDrmToken")?.end(),i=null})));const r=await i;return Ze.log("DRM token fetched and cached",{requestId:a}),e.tokenSignal.value=r,e.issuedAt=n,r}})(this.drmTokenProvider,s),f=this;this.hlsConfig={ignoreDevicePixelRatio:!1,maxDevicePixelRatio:1.5,capLevelToPlayerSize:!0,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,autoStartLoad:!1,debug:l(...$e)?this.logForwarder:void 0,startLevel:void 0,fragLoadPolicy:{default:{maxTimeToFirstByteMs:2e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:5,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:5,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},highBufferWatchdogPeriod:4,liveSyncDuration:24,manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:5,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:5,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},maxLoadingDelay:4,backBufferLength:30,maxMaxBufferLength:30,maxStarvationDelay:4,maxSeekHole:4,nudgeMaxRetry:2,nudgeOffset:.3,playlistLoadPolicy:{default:{maxTimeToFirstByteMs:15e3,maxLoadTimeMs:15e3,timeoutRetry:{maxNumRetry:5,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:5,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},startFragPrefetch:"recorded"===r,xhrSetup:(e,t)=>{t===this.resource.url&&(e.withCredentials=!0)},preferManagedMediaSource:!1,renderTextTracksNatively:!1,emeEnabled:!0,drmSystems:{"com.widevine.alpha":{licenseUrl:p},"com.microsoft.playready":{licenseUrl:h},"com.apple.fps":{licenseUrl:g,serverCertificateUrl:"https://lic.drmtoday.com/license-server-fairplay/cert/6ca2722e29b94cd3846513d3dde14ffe"}},licenseXhrSetup:async(e,t,a)=>{f._drmLicenseLoadStarted||(f._drmLicenseLoadStarted=!0,f.perf?.metric("hlsDrmLicenseLoad")?.start()),Ze.log("License XHR setup",{url:t});const{uri:i}=a.decryptdata,n=_.get(i),r=n?.split("fmp4")[1]??"";e.setRequestHeader("x-license-context",r);const o=await v();Ze.log(o?"Token applied to license request":"No token available for license request"),o&&e.setRequestHeader("x-auth-token",o)},licenseResponseCallback(e,t,a){f._drmLicenseLoadStarted&&!f._drmLicenseLoadEnded&&(f._drmLicenseLoadEnded=!0,f.perf?.metric("hlsDrmLicenseLoad")?.end());const i=e.response;if("com.apple.fps"===a.keySystem)try{return Uint8Array.from(atob((new TextDecoder).decode(i).trim()),(e=>e.charCodeAt(0)))}catch(e){ze.error("Error while handling license callback",e)}return i},...xe(d)}}_mapEncryptionKeys(e){const t=e?.details,a=e?.networkDetails?.getResponseHeader("x-seed"),i=t?.encryptedFragments;if(i&&i.length>0){const e=i[0].levelkeys,n=t.url;if(e&&n){const t=Object.keys(e);for(const i of t){const t=a?`${n}&seed=${a}`:n;this.encryptionKeyMap.set(e[i].uri,t)}ze.log(`Mapped ${Object.keys(e).length} encryption keys to URL: ${n}`)}}}requireHls(){if(!this.hls)throw new Error("hls.js instance is not available");return this.hls}appendMsg(e,t,a){if(t){if(!this.logMsg){const i=this.logArray,n=this.stats.maxLogs||100,r=performance.now(),o=this.t0=this.t0||r,s=Math.round(r-o);i.length>=n&&i.shift(),i.push(`${s},${e}: ${t}${a?JSON.stringify(a):""}`)}ze[e](`${t}${a?JSON.stringify(a):""}`)}}async _ensureHlsInstance(){this.hls||(this._hlsInitPromise||(this._hlsInitPromise=(async()=>{try{const e=await Ve(this.isGKEnabled);Object.assign(this.hlsConfig,e),ze.log(`create hls.js (${this.hlsVersion})`,{...He(this.hlsConfig.workerPath,this.isGKEnabled),...this.hlsConfig}),this.hls=new at(this.hlsConfig),Ce(this.hls,at,this.isGKEnabled),this.bindListeners()}catch(e){throw this._hlsInitPromise=null,e}})()),await this._hlsInitPromise)}async waitForManifest(){return await this._ensureHlsInstance(),this.manifestData?this:new Promise(((e,t)=>{const a=(e,n)=>{n.fatal&&(this.perf?.metric("hlsMasterPlaylistLoad")?.end(),ze.error("catch fatal error at startup",n),this.requireHls().off(at.Events.ERROR,a),this.requireHls().off(at.Events.MANIFEST_PARSED,i),t(n))},i=(t,n)=>{this.perf?.metric("hlsMasterPlaylistLoad")?.end(),this.perf?.metric("hlsMediaPlaylistLoad")?.start();this.requireHls().once(at.Events.LEVEL_LOADED,(()=>{this.perf?.metric("hlsMediaPlaylistLoad")?.end(),this._hlsFirstSegmentReadyPerfStarted||(this._hlsFirstSegmentReadyPerfStarted=!0,this.perf?.metric("hlsFirstSegmentReady")?.start(),this.requireHls().once(at.Events.FRAG_BUFFERED,(()=>{this.perf?.metric("hlsFirstSegmentReady")?.end()})))})),ze.log("succeed to parse manifest",n),this.requireHls().off(at.Events.ERROR,a),this.requireHls().off(at.Events.MANIFEST_PARSED,i),this.manifestData=n;const r=n.levels.map(((e,t)=>({index:t,quality:`${e.height}p`})));ze.log("PLAYBACK - Manifest parsed, available qualities:",r),ze.log("PLAYBACK - Starting with quality level:",this.requireHls().startLevel>=0?this.requireHls().startLevel:"auto");const o=n.levels[n.firstLevel];this.parseHashParams(o.url[o.urlId]),e(this)};this.requireHls().on(at.Events.ERROR,a),this.requireHls().on(at.Events.MANIFEST_PARSED,i),this.perf?.metric("hlsMasterPlaylistLoad")?.start(),this.requireHls().loadSource(this.resource.url)}))}async attachVideo(){const e=it.get(this.videoTag);e&&await e,this.mseAttached||(await this._ensureHlsInstance(),this.hls?(We({isGKEnabled:this.isGKEnabled,settingsSignal:this.settingsSignal})&&null!=window._preloadQualityHeight&&(this._preloadHeightForCache=window._preloadQualityHeight),Ke(),this.videoTag.srcObject=null,this._patchSetMediaKeysWithRetry(this.videoTag),ze.log("Attach video to hls source"),this.requireHls().attachMedia(this.videoTag),this.mseAttached=!0,this.tvideo=performance.now()):ze.warn("Cannot attach video: hls instance unavailable"))}_patchSetMediaKeysWithRetry(e){const t=e.setMediaKeys?.bind(e);t&&(this._restoreSetMediaKeys=()=>{e.setMediaKeys=t,this._restoreSetMediaKeys=null},e.setMediaKeys=async e=>{for(let a=0;a<20;a++)try{return await t(e)}catch(e){if(!("InvalidStateError"===e.name&&a<19))throw e;await new Promise((e=>setTimeout(e,50)))}})}setLevel(e,t,a,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{prefetch:r=!1,heuristic:o=!1}=n;return this.maxLevel=a,this._userAdaptiveMode=t,We({isGKEnabled:this.isGKEnabled,settingsSignal:this.settingsSignal})&&null==this._preloadHeightForCache&&null!=window._preloadQualityHeight&&(this._preloadHeightForCache=window._preloadQualityHeight),i===et&&(this.manifestData=null),this.waitForManifest().then((()=>{const a=this.requireHls(),n=a.levels,s=We({isGKEnabled:this.isGKEnabled,settingsSignal:this.settingsSignal})?this._preloadHeightForCache:null;let l=!1;if(i===Xe){if(t){let t=!1;if(null!=s){const a=n.findIndex((e=>e.height===s));a>=0&&(e=a,t=!0,r||(this._preloadHeightForCache=null),ze.log(`Using preload height ${s}p for startup (disk cache), startLevel=${e}`))}!t&&o&&n.length>0&&(e=N(n,this.videoTag))<0&&(e=-1),ze.log(`set hls.startLevel=${e}`),a.startLevel=e,t&&!r&&(a.loadLevel=e,ze.log(`Locked to preload level ${e} for 12s (disk cache)`),this._schedulePreloadUnlock()),this.stats.startLevel=e}else{let t=-1;const i=a.levels;for(let a=0;a=0&&(ze.log(`set hls.loadLevel=${t}`),a.loadLevel=t)}this.startLoad||(this.drmTokenProvider.configuredSignal.value&&!this.mseAttached?(ze.log("Deferring hls.startLoad() during prefetch (DRM content)"),this._startLoadDeferred=!0):(ze.log("call hls.startLoad()"),a.startLoad(),this.startLoad=!0))}else if(i===Je)if(t)ze.log("set hls.nextLevel=-1"),a.nextLevel=-1,l=!0;else{let t=-1;const i=a.levels;for(let a=0;a=0&&(a.autoLevelEnabled&&a.currentLevel===t?(ze.log(`set hls.nextLevel=${t}`),a.nextLevel=t,l=!0):(ze.log(`set hls.nextLevel=${t}`),a.nextLevel=t))}else{if((i===tt||i===et)&&!t){const t=a.levels.findIndex((t=>t.index===e));t>=0&&(ze.log(`set hls.loadLevel=${t}`),a.loadLevel=t)}a.startLoad(i===et?0:-1)}if(l){const t=this._userAdaptiveMode??this.requireHls().autoLevelEnabled;this.notifyLevelStateChanged(t,e,this.maxLevel)}}))}notifyLevelStateChanged(e,t,a){this.trigger("level_state_changed",{adaptive:e,levelIndex:t,maxLevel:a})}_clearPreloadUnlock(){this._preloadUnlockListener&&(this.videoTag.removeEventListener("timeupdate",this._preloadUnlockListener),this._preloadUnlockListener=null)}_schedulePreloadUnlock(){this._clearPreloadUnlock();const e=this.videoTag,t=this;this._preloadUnlockListener=function(){e.currentTime>=12&&(t._clearPreloadUnlock(),t.hls&&(t.hls.nextLevel=-1,ze.log("Preload unlock: re-enabled ABR (auto) after cached range"),t.notifyLevelStateChanged(!0,t.hls.loadLevel,t.maxLevel)))},this.videoTag.addEventListener("timeupdate",this._preloadUnlockListener)}notifySubtitleChanged(e){this.trigger("subtitle_changed",{subtitleId:e})}async setSubtitle(e){await this.waitForManifest(),ze.log(`set hls.subtitleDisplay=${-1!==e}, hls.subtitleTrack=${e}`),this.requireHls().subtitleDisplay=-1!==e,this.requireHls().subtitleTrack=e,this.updateCuesOverlay(),this.notifySubtitleChanged(e)}notifyAudioTrackChanged(e){this.trigger("audio_track_changed",{audioTrackId:e})}setAudioTrack(e){e<0||!this.requireHls().audioTracks||e>=this.requireHls().audioTracks.length?ze.warn("setAudioTrack: invalid audioTrackId",e):(ze.log(`set hls.audioTrack=${e}`),this.requireHls().audioTrack=e,this.config.userIsOnSafari()&&this.requireHls().startLoad(),this.notifyAudioTrackChanged(e))}detachVideo(){ze.log("Detach video from hls source"),this._clearPreloadUnlock(),this._userAdaptiveMode=void 0;const e=this.hls;e&&null!==e.media?this._detachPromise=new Promise((t=>{e.once(at.Events.MEDIA_DETACHED,(()=>t())),e.detachMedia()})).then((()=>{this.tvideo=void 0,this.mseAttached=!1,this._detachPromise=null})):(this.tvideo=void 0,this.mseAttached=!1)}onHlsError(e,t){let a,i;switch(t.details){case at.ErrorDetails.BUFFER_NUDGE_ON_STALL:{const e=this.stats;e.nudgeNb=(e.nudgeNb||0)+1;break}case at.ErrorDetails.BUFFER_STALLED_ERROR:this.recoverDecodingError(!1);break;case at.ErrorDetails.BUFFER_SEEK_OVER_HOLE:this.stats.maxBufferHole=this.stats.maxBufferHole>0?Math.max(this.stats.maxBufferHole,t.hole):t.hole;break;case at.ErrorDetails.INTERNAL_EXCEPTION:this.stats.exceptionNb++,this.stats.exception={event:t.event,stack:t.error?.stack?JSON.stringify(t.error.stack).substr(0,1e3):t.error?.message},t.fatal=!1;break;case at.ErrorDetails.FRAG_LOAD_ERROR:"subtitle"===t.frag.type&&(this.setSubtitle(-1),this.requireHls().startLoad());break;case at.ErrorDetails.BUFFER_APPENDING_ERROR:ze.log("This error should be considered as fatal. We try to recover following HLS recommendation (https://github.com/video-dev/hls.js/blob/abb6945bd29eadc04c25b2522528ca6aa619992f/docs/design.md?plain=1#L299)"),this._pendingRecoveryRestart=!0,queueMicrotask((()=>{this.requireHls().recoverMediaError()}))}if(t.fatal){ze.error("Received fatal HLS error:",e,t);const n=this.getHTTPStats(t);null!==n&&(this.stats.http=n);try{if(403===t.response?.code){const e=t.loader;a=e.loader.getResponseHeader("X-Error-Code"),i="yes"===e.loader.getResponseHeader("X-Retry")?.toLowerCase()}}catch(e){ze.error(e)}this.trigger("fatal_error",{error:t.type+t.details,reason:t.reason,type:t.type,details:t.details,response:t.response,subCode:a,canRetry:i})}else ze.warn("Received non-fatal HLS error:",e,t)}getHTTPStats(e){if(!e||!e.response)return null;const t={},a=e.response,i=e.frag||e.context;return a&&(t.code=parseInt(String(a.code||0)),t.msg=(a.text||"").toLowerCase()),i&&(t.url=i.url||""),t}onAudioTrackLoaded(e,t){this._mapEncryptionKeys(t)}onLevelLoaded(e,t){const a=this.requireHls().config,i=this.requireHls().levels[t.level];this._mapEncryptionKeys(t),i.details.live&&(this._liveEdgeDelay=a.liveSyncDuration>0?a.liveSyncDuration:a.liveSyncDurationCount*t.details.targetduration),i.urlId>0&&(this.stats.redundant=!0)}onAudioTracksUpdated(e,t){this.trigger("audio_tracks_updated",t.audioTracks)}getAppendedOffset(e,t){let{frag:a}=t;if("main"===a.type&&"initSegment"!==a.sn&&a.elementaryStreams.video){const{start:e,elementaryStreams:t}=a,i=t.video.startPTS-e;this.requireHls().off(at.Events.BUFFER_APPENDED,this.boundListeners.getAppendedOffset),this.trigger("time_offset_changed",i)}}onCurrentFragmentChanged(e,t){const a=this.requireHls().levels[t.frag.level];if(!a)return;const i=this._userAdaptiveMode??this.requireHls().autoLevelEnabled;this.notifyLevelStateChanged(i,a.index,this.maxLevel)}onFragBuffered(e,t){const a=this.stats,i=t.stats,n=i.parsing.end,r=this.tvideo,o=r?Math.max(n,r):n,s=i.loading.end-i.loading.start,l=i.loading.first-i.loading.start,d=n-i.loading.end,u=i.tbuffered-o,c=s+d+u,m=a.minMs=a.minMs||{},A=a.maxMs=a.maxMs||{},E=this.cumDownload+=s,p=this.cumLatency+=l,h=this.cumMux+=d,g=this.cumBuffer+=u,_=E+h+g,v=++this.fragNb;a.HTTPDL+=i.loaded;const f=8*a.HTTPDL;this.appendFragDetails(t.frag,i),a.latency=Math.round(p/v),a.avgKbps={total:Math.round(f/_),dl:Math.round(f/E),mux:Math.round(f/h),buffer:Math.round(f/g)},a.avgMs={total:Math.round(_/v),dl:Math.round(E/v),mux:Math.round(h/v),buffer:Math.round(g/v)},c&&(m.total=Math.round(m.total?Math.min(m.total,c):c),A.total=Math.round(A.total?Math.max(A.total,c):c)),s&&(m.dl=Math.round(m.dl?Math.min(m.dl,s):s),A.dl=Math.round(A.dl?Math.max(A.dl,s):s)),d&&(m.mux=Math.round(m.mux?Math.min(m.mux,d):d),A.mux=Math.round(A.mux?Math.max(A.mux,d):d)),u&&(m.buffer=Math.round(m.buffer?Math.min(m.buffer,u):u),A.buffer=Math.round(A.buffer?Math.max(A.buffer,u):u))}onFragLoadEmergencyAborted(e,t){this.appendFragDetails(t.frag,t.stats),this.stats.emergencyNb++}appendFragDetails(e,t){if(this.fragDetailsNb<5){const a=this.videoTag,i=t.parsing.end,n=this.tvideo,r=n?Math.max(i,n):i,o=t.loading.end-t.loading.start,s=t.loading.first-t.loading.start,l=t.loaded,d=i-t.loading.end,u=t.tbuffered-r,c=e.duration,m={start:Math.round(1e3*e.start),end:Math.round(1e3*(e.start+c)),l:e.level,pos:a?Math.round(1e3*a.currentTime):-1};s>0&&(m.lat=Math.round(s)),o>0&&(m.DLdur=Math.round(o)),l>0&&(m.len=l),l>0&&(m.kbps=Math.round(8*l/(o+d+u))),t.aborted&&(m.aborted=!0),d>0&&(m.mux=Math.round(d)),u>0&&(m.buffer=Math.round(u));const A=this.stats,E=A.frags=A.frags||{},p=E.minDuration;E.minDuration=p?Math.min(Math.round(c),p):Math.round(c),E[`f${this.fragDetailsNb}`]=m,this.fragDetailsNb++}}recoverDecodingError(e){const t=!this.videoTag.paused;ze.log("playing state before recovery:",t);const a=()=>{this._pendingRecoveryRestart=!1,e?(this.requireHls().off(at.Events.MEDIA_ATTACHED,a),this.requireHls().startLoad()):(this.requireHls().off(at.Events.LEVEL_SWITCHED,a),this.requireHls().off(at.Events.FRAG_BUFFERED,a)),t&&(ze.log("video was playing before recovery, relaunch playback"),this.videoTag.play())};this._pendingRecoveryRestart=!0,e?(this.requireHls().recoverMediaError(),this.requireHls().on(at.Events.MEDIA_ATTACHED,a)):(this.requireHls().stopLoad(),this.videoTag.pause(),this._userAdaptiveMode&&(this.requireHls().nextLevel=-1),this.requireHls().startLoad(),this.requireHls().on(at.Events.LEVEL_SWITCHED,a),this.requireHls().on(at.Events.FRAG_BUFFERED,a))}swapAudioCodec(){this.requireHls().swapAudioCodec()}onFragLoaded(e,t){const a=this.requireHls().levels[t.frag.level],i=t.frag.stats.loading.end-t.frag.stats.loading.start,n=i<50;ze.log("PLAYBACK - Fragment loaded:",{sn:t.frag.sn,level:t.frag.level,quality:`${a.height}p`,size:`${Math.round(t.frag.stats.total/1024)}KB`,loadTime:`${Math.round(i)}ms`,cached:n?"YES":"NO"})}bindListeners(){null==this.boundListeners&&(this.boundListeners={onCurrentFragmentChanged:this.onCurrentFragmentChanged.bind(this),onFragBuffered:this.onFragBuffered.bind(this),onFragLoadEmergencyAborted:this.onFragLoadEmergencyAborted.bind(this),onHlsError:this.onHlsError.bind(this),onLevelLoaded:this.onLevelLoaded.bind(this),onAudioTracksUpdated:this.onAudioTracksUpdated.bind(this),getAppendedOffset:this.getAppendedOffset.bind(this),cuesParsed:this.cuesParsed.bind(this),updateCuesOverlay:this.updateCuesOverlay.bind(this),onFragLoaded:this.onFragLoaded.bind(this),onAudioTrackLoaded:this.onAudioTrackLoaded.bind(this)},this.requireHls().on(at.Events.FRAG_CHANGED,this.boundListeners.onCurrentFragmentChanged),this.requireHls().on(at.Events.FRAG_BUFFERED,this.boundListeners.onFragBuffered),this.requireHls().on(at.Events.MEDIA_ATTACHED,(()=>{this._pendingRecoveryRestart?(this._pendingRecoveryRestart=!1,this.requireHls().startLoad()):this._startLoadDeferred&&(this._startLoadDeferred=!1,ze.log("call hls.startLoad() (deferred, media now attached)"),this.requireHls().startLoad(),this.startLoad=!0)})),this.requireHls().on(at.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.boundListeners.onFragLoadEmergencyAborted),this.requireHls().on(at.Events.ERROR,this.boundListeners.onHlsError),this.requireHls().on(at.Events.LEVEL_LOADED,this.boundListeners.onLevelLoaded),this.requireHls().on(at.Events.AUDIO_TRACK_LOADED,this.boundListeners.onAudioTrackLoaded),this.requireHls().on(at.Events.AUDIO_TRACKS_UPDATED,this.boundListeners.onAudioTracksUpdated),this.requireHls().on(at.Events.BUFFER_APPENDED,this.boundListeners.getAppendedOffset),this.requireHls().on(at.Events.CUES_PARSED,this.boundListeners.cuesParsed),this.requireHls().on(at.Events.FRAG_LOADED,this.boundListeners.onFragLoaded),this.videoTag.addEventListener("timeupdate",this.boundListeners.updateCuesOverlay),this.videoTag.addEventListener("seeked",this.boundListeners.updateCuesOverlay))}cuesParsed(e,t){try{if(!t||!t.cues||!Array.isArray(t.cues))return;let e;const a=t.track;a&&(e=a.id||a.textTrack?.id),e||(e=this.hls?.subtitleTrack||0),e=String(e);const i=t.cues.map((e=>{const t="number"==typeof e.startTime?e.startTime:e.start,a="number"==typeof e.endTime?e.endTime:e.end,i=e.text||e.data||"";return"number"!=typeof t||"number"!=typeof a?null:{startTime:t,endTime:a,text:String(i)}})).filter((e=>null!==e));if(!i.length)return;this._cuesByTrackId[e]||(this._cuesByTrackId[e]=[]),this._cuesByTrackId[e].push(...i),this._cuesByTrackId[e].sort(((e,t)=>e.startTime-t.startTime)),this.updateCuesOverlay()}catch(e){ze.error("cuesParsed handling failed",e)}}unbindListeners(){null!=this.boundListeners&&(this.requireHls().off(at.Events.FRAG_CHANGED,this.boundListeners.onCurrentFragmentChanged),this.requireHls().off(at.Events.FRAG_BUFFERED,this.boundListeners.onFragBuffered),this.requireHls().off(at.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.boundListeners.onFragLoadEmergencyAborted),this.requireHls().off(at.Events.ERROR,this.boundListeners.onHlsError),this.requireHls().off(at.Events.LEVEL_LOADED,this.boundListeners.onLevelLoaded),this.requireHls().off(at.Events.AUDIO_TRACK_LOADED,this.boundListeners.onAudioTrackLoaded),this.requireHls().off(at.Events.AUDIO_TRACKS_UPDATED,this.boundListeners.onAudioTracksUpdated),this.requireHls().off(at.Events.BUFFER_APPENDED,this.boundListeners.getAppendedOffset),this.requireHls().off(at.Events.CUES_PARSED,this.boundListeners.cuesParsed),this.requireHls().off(at.Events.FRAG_LOADED,this.boundListeners.onFragLoaded),this.videoTag.removeEventListener("timeupdate",this.boundListeners.updateCuesOverlay),this.videoTag.removeEventListener("seeked",this.boundListeners.updateCuesOverlay),this.removeCueOverlay(),this.boundListeners=null)}streamComment(){return this.getHashParam("comment")}getHashParam(e){const t=this.hashParams;return t?t[e]:null}parseHashParams(e){if(this.hashParams)return;let t;try{t=new URL(e)}catch{return}const{hash:a}=t;if(!a)return;const i=a.slice(1),n=this.hashParams={},r=new URLSearchParams(i);for(const[e,t]of r){let a=t;const[i,r=null]=e.split("_");if(null===r)n[e]=a;else{if(n[i]||(n[i]={}),n[i][r]=a,"hls"===i){"function"==typeof a?ze.log(`update hlsjs config param: ${r}=function(){}`):ze.log(`update hlsjs config param: ${r}=${a}`);const e=this.hls?this.hls.config:this.hlsConfig;isNaN(Number(a))||"boolean"==typeof a||(a=parseFloat(t)),Object.assign(e,{[r]:a}),this.stats[r]=a}"ab"!==i&&"qos"!==i||(this.stats[r]=a)}}ze.log("Parsed hash-params:",n)}streamStats(){let e=arguments.length>1?arguments[1]:void 0;if(((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).verbose||!1)&&(this.logMsg||(this.logMsg=Re().compressToBase64(this.logArray.join("\n")),this.logArray=[]),this.stats.logs=this.logMsg),e){const t=this.hls;if(t&&t.autoLevelCapping>-1){const a=e.getQualityForLevel(t.levels[t.autoLevelCapping].index),i=null!==a?a.height:0;i>0&&(this.stats.autoLevelCapping=i)}}return this.stats}getLiveEdgeDelay(){return this._liveEdgeDelay||0}resetStats(){this.stats={version:this.hlsVersion,HTTPDL:0,emergencyNb:0,exceptionNb:0,latency:0}}async destroy(){ze.log("Destroy hls source"),Le(this.isGKEnabled),this.resetStats();const e=this.videoTag;let t;e&&it.set(e,new Promise((e=>{t=e}))),this.detachVideo(),this._detachPromise&&await this._detachPromise,this.unbindListeners();const a=this.hls;if(a&&(a.destroy(),this.hls=null,at=null),e&&e.mediaKeys)try{await e.setMediaKeys(null)}catch(e){ze.warn("Could not clear media keys after destroy:",e.message)}this._restoreSetMediaKeys?.(),t?.(),e&&it.delete(e),this._hlsInitPromise=null,this._hlsFirstSegmentReadyPerfStarted&&this.perf?.metric("hlsFirstSegmentReady")?.end(),this._drmLicenseLoadStarted&&!this._drmLicenseLoadEnded&&this.perf?.metric("hlsDrmLicenseLoad")?.end(),this.perf?.metric("hlsFetchDrmToken")?.end(),this.hlsVersion=null,this.manifestData=null,this._hlsFirstSegmentReadyPerfStarted=!1,this._drmLicenseLoadStarted=!1,this._drmLicenseLoadEnded=!1,this.hashParams=null,this.hlsConfig=null,this.startLoad=!1,this._startLoadDeferred=!1,this._cuesByTrackId={},this._pendingRecoveryRestart=!1,this.encryptionKeyMap.clear(),this._abortErrorHandler&&(window.removeEventListener("unhandledrejection",this._abortErrorHandler),this._abortErrorHandler=null)}removeCueOverlay(){this.subtitlesNode&&(this.subtitlesNode.innerHTML="")}onVideoTimeUpdate(){this.updateCuesOverlay()}getActiveSubtitleTrackId(){return this.hls&&this.requireHls().subtitleTrack>=0?String(this.requireHls().subtitleTrack):null}updateCuesOverlay(){if(!this.subtitlesNode||!this.videoTag)return;const e=this.videoTag.currentTime||0,t=this.getActiveSubtitleTrackId();if(!t)return void(this.subtitlesNode.textContent="");const a=this._cuesByTrackId[t]||[];if(!a.length)return void(this.subtitlesNode.textContent="");let i=null;for(let t=0;t=a[t].startTime&&e<=a[t].endTime){i=a[t];break}this.subtitlesNode.innerHTML=i?`
${Te.Z.sanitize(i.text)}
`:""}},rt=(0,ve.td)(null),ot="dmp_quality",st=s("Quality","DynamicQuality"),lt=e=>{let{resource:t,qualities:a,config:i,localStore:n,utilsHelpers:r,autoplay:o,autoplayAllowed:s,playerSizeAPI:l,drmTokenProvider:d,perf:u,isGKEnabled:c,settingsSignal:m,chromecastRemoteEnabledEventEmitter:A,chromecastSessionStoppedEventEmitter:E,qualitiesAvailableEventEmitter:p,qualityChangedEventEmitter:h,qualityChangeRequestedEventEmitter:g,qualityStatsRequestedEventEmitter:_,qualityStatsRespondedEventEmitter:v,liveOnToOffAirEventEmitter:f,streamTechChangeEventEmitter:y,onQualityLoadStart:D,sequenceStartedEventEmitter:S,loadVideoEventEmitter:w,SSAI:R,canPlayOneSourceEventEmitter:T,videoLoadedMetadataEventEmitter:P,videoEndedEventEmitter:I,videoSlotStartedEventEmitter:L,videoSlotEndedEventEmitter:b,adLinearWillStartEventEmitter:C,errorPlayerEventEmitter:N,debugUpdatedEventEmitter:O,liveEdgeDelayChangedEventEmitter:M,timeOffsetChangedEventEmitter:k,subtitlesChangeRequestedEventEmitter:U,subtitleIdSignal:x,subtitlesDataSignal:V,audioTrackChangeRequestedEventEmitter:H,audioTrackIdSignal:q,audioTracksDataSignal:F,videoNode:B,subtitlesNode:G}=e;const Y=(()=>{if(!fe)throw new Error("HLS.js is not loaded yet");return fe})();let W,Q,j="480",K=!1;const $=new Promise((e=>{Q=e}));let z,Z,X,J=null,ee=0,te=[null,null,null],ae=!1,ie=0,ne=0,re=0,oe=!1,se={adaptive:null,quality:null},le={adaptive:null,quality:null},de=0;const ue=()=>{if(!W)throw new Error("Quality list is not available yet");return W},ce=()=>{if(!J)throw new Error("HLS source is not available");return J},me=e=>{const t=ue(),a=t.getQualityNameOrClosestNumericQualityName(e??""),i=t.getQualityNameOrClosestNumericQualityName(j);return e&&a?(st.log(`Choosing quality based on '${e}' (qs or requested value)`),z=!1,t.getQualityForName(a)):i?(st.log(`Choosing quality based on '${j}' (player size)`),z=!0,t.getQualityForName(i)):(st.log("No numeric quality available, picking the first one available..."),t.getFirstAvailable())},Ee=async e=>{if(W||await $,!K)return;st.log("QUALITY_CHANGE_REQUESTED",e);const t=e&&e.qualityName?e.qualityName:"",a=!(!e||!e.adaptive)&&e.adaptive;let r;"live"!==i.metadata.stream?.stream_type&&(r=n.get("dmp_max_quality"));const o={name:t,adaptive:a},s=!(!e||!e.startPlayback)&&e.startPlayback,l=!(!e||!e.isRecovering)&&e.isRecovering,d={isStartup:s,isReplay:s&&re>0,isRecovering:l};let u=null;if(s)re++,ye(le)&&_e(),u=le;else if(l)u=le;else{if(r=e&&e.qualityMax?e.qualityMax:null,ye(se)||se.adaptive&&o.adaptive&&o.name===se.quality.name||!se.adaptive&&!o.adaptive&&o.name===se.quality.name)return st.log("Skipping quality change request");o.adaptive?(u={adaptive:ue().adaptiveSupported()},n.remove(ot)):(u={adaptive:!1},st.log(`Save '${o.name}' quality in local storage`),n.set(ot,o.name)),u.quality=me(o.name||se.quality.name)}null!=u.quality?(le=u,ke(u,r,d)):Re("PLAYER_ERR_UNEXPECTED","QUALITY_NOT_FOUND")},pe=async e=>{st.log("SUBTITLE_CHANGE_REQUESTED",e),await Ue(e.id)},he=e=>{st.log("AUDIO_TRACK_CHANGED",e),q.value=e.audioTrackId},ge=e=>{if(st.log("AUDIO_TRACK_CHANGE_REQUESTED",e),J&&null!=J.setAudioTrack)try{J.setAudioTrack(e.id),st.log("Audio track set successfully")}catch(e){st.error("Failed to set audio track:",e)}},_e=()=>{const e=n.get("dmp_max_quality");le=(()=>{const e=ue(),t=n.get(ot),a=i.settings("quality"),r=Ae.getNumericQualityNameFromVideoSize(l.width,l.height);j=r;let o={adaptive:e.adaptiveSupported()};const s=e.getQualityNameOrClosestNumericQualityName(t??"");return t&&s?(o.adaptive=!1,o.quality=e.getQualityForName(s),st.log(`Choosing quality based on '${t}' (local storage)`)):o.quality=me(a),st.log("Initial quality set",o),o})(),ke(le,e,{isStartup:!0,isReplay:!1,isRecovering:!1,prefetch:!0});const t=n.get("dmp_audio_track");null!=t&&t.xid==i.metadata("id")&&(q.value=t.trackId,ce().setAudioTrack(t.trackId))},ve=e=>{const t=B.videoWidth,a=B.videoHeight,n=t>0&&a>0,r=t!==ie||a!==ne,o=e.adaptive!==se.adaptive||e.maxLevel!==se.maxLevel,s="audio"===i.metadata.info?.media_type;if(n&&(r||o)||s){se=e,ie=t,ne=a;const i={videoWidth:ie,videoHeight:ne,...e};st.log("QUALITY_CHANGED",i),h.emit(i)}},ye=e=>null===e.adaptive&&null===e.quality,De=e=>{e&&e.length>0?(st.log("AUDIO_TRACKS_AVAILABLE",e),F.value=e):F.value=[]},Se=()=>{B.addEventListener("error",He),B.addEventListener("loadedmetadata",Ve)},we=()=>{B.removeEventListener("error",He),B.removeEventListener("loadedmetadata",Ve)},Re=(e,t)=>{const a={from:"runtime",code:"QUALITY_SWITCHER_ERROR",extra:{subCode:e,reason:t}};B&&(a.extra.src=B.src,a.extra.currentSrc=B.currentSrc,a.extra.qualityUrl=le&&le.quality&&le.quality.resource&&le.quality.resource.url?le.quality.resource.url:null),n.remove(ot),N.emit(r.createError(a))},Te=async e=>{if(null!==J){Ie();const e=J;J=null,await e.destroy()}d.tokenSignal.value=null,J=new nt({videoNode:B,subtitlesNode:G,resource:e,Hlsjs:Y,streamType:i.metadata.stream?.stream_type,drmTokenProvider:d,perf:u,isGKEnabled:c,settingsSignal:m,config:i}),Pe()},Pe=()=>{const e=ce();e.on("level_state_changed",Le),e.on("audio_tracks_updated",be),e.on("fatal_error",Ce),e.on("time_offset_changed",Ne),e.on("subtitle_changed",Oe),e.on("audio_track_changed",he)},Ie=()=>{const e=ce();e.off("level_state_changed",Le),e.off("audio_tracks_updated",be),e.off("fatal_error",Ce),e.off("time_offset_changed",Ne),e.off("subtitle_changed",Oe),e.off("audio_track_changed",he)},Le=e=>{const t=ce().getLiveEdgeDelay();t>0&&Z!==t&&(Z=t,M.emit({delay:Z}));const a={adaptive:e.adaptive,quality:ue().getQualityForLevel(e.levelIndex),maxLevel:e.maxLevel};te=[null,null,null],ve(a)},be=e=>{const t=e||[];if(t.length>0){const e=t.map((e=>({id:e.id,name:e.name})));De(e)}else De([])},Ce=e=>{if("manifestLoadError"!==e.details)if("levelLoadError"!==e.details){if("fragLoadError"===e.details){const t=e?.response?.url||"";if("string"==typeof t&&t.toLowerCase().includes(".vtt"))return void st.error("Ignoring subtitle fragment load error:",t)}oe&&qe(e.error,e.reason)}else N.emit(r.createError({from:"runtime",code:"STREAMING_QUALITY_LOAD_ERROR",extra:{http_status:e.response.code,url:e.response.url}}));else N.emit(r.createError({from:"runtime",code:"STREAMING_MANIFEST_LOAD_ERROR",extra:{http_status:e.response.code,url:t?.url??J?.resource.url,...e.subCode?{subCode:e.subCode}:{},...e.canRetry?{canRetry:e.canRetry}:{}}}))},Ne=e=>{st.log("TIME_OFFSET_CHANGED",e),k.emit({timeOffset:e})},Oe=e=>{(e=>{st.log("SUBTITLE CHANGED",e),x.value=e.subtitleId})(e)},Me=e=>{if(!J)return{};const t={decodeError:ee,freezeError:de},a=J.streamComment();if(a&&(t.comment=a),B)if("function"==typeof B.getVideoPlaybackQuality){const e=B.getVideoPlaybackQuality();t.droppedVideoFrames=e.droppedVideoFrames,t.corruptedVideoFrames=e.corruptedVideoFrames}else{const e=B.webkitDroppedFrameCount;e&&(t.droppedVideoFrames=e)}const i=J.streamStats(e,W);i&&(t.stream=i),v.emit(t)},ke=(e,t,a)=>{const{isStartup:i,isReplay:n,isRecovering:r,prefetch:o}=a;let s=null;s=r?"recover":n?"replay":i?"start":"current";const l=e.quality,d=ue().getLevelForQualityName(l.name),u={prefetch:o,heuristic:!1};i&&z&&(u.heuristic=!0),ae=r,D(e.quality.levels[0].url[0]),ce().setLevel(d,e.adaptive,t,s,u).then((()=>{i&&!o&&B&&B.play()}))},Ue=async e=>{try{await ce().setSubtitle(e),st.log("Subtitle set successfully")}catch(e){st.error("Failed to set subtitle:",e)}},xe=async()=>{const e=i.metadata.stream?.ssai_session_url;if(e&&({qualities:a,resource:t}=await R.getStreamUrl()),S.off(xe),!W){const r=t||a.auto.find((e=>{let{type:t}=e;return"application/x-mpegURL"===t})),o=()=>{K=Boolean(W&&W.hasOnePlayableQuality()),W&&(st.log("QUALITIES_AVAILABLE",W.availableQualities()),p.emit(W.availableQualities())),Q()};if(null==r)return void o();let s;await Te(r);try{s=await ce().waitForManifest()}catch{return void o()}e&&R.start({hlsjs:ce().hls});const l=s.manifestData.levels,d=s.resource;W=await Ae.createFromLevels(l,d);const u=W.getObsoleteIndexes();for(let e=0;e{e.code=e.attrs.LANGUAGE||`${e.attrs["ASSOC-LANGUAGE"]}-auto`})),(n=c)&&(st.log("SUBTITLES_AVAILABLE",n),V.value=n),O.emit({type:"stream_origin",payload:{url:d.url}}),"videogames"===i.metadata.category?.name&&"live"===i.metadata.stream?.stream_type){const e=W.getHighestQuality();null!==e&&(e.tag="Source")}}var n;K&&_e()},Ve=()=>{if(P.emit(),ae){ae=!1;const e=ce(),t={adaptive:e.hls.autoLevelEnabled,quality:ue().getQualityForLevel(e.hls.levels[e.hls.loadLevel].index)};ve(t)}},He=e=>{const t=e.target.error||{};let a=null;switch(t.code){case t.MEDIA_ERR_ABORTED:a="MEDIA_ERR_ABORTED";break;case t.MEDIA_ERR_NETWORK:a="MEDIA_ERR_NETWORK";break;case t.MEDIA_ERR_DECODE:a="MEDIA_ERR_DECODE";break;case t.MEDIA_ERR_SRC_NOT_SUPPORTED:a="MEDIA_ERR_SRC_NOT_SUPPORTED";break;default:a="PLAYER_ERR_UNKNOWN"}qe(a,t.message||"Unknown error")},qe=(e,t)=>{if(st.warn("error received:",e),"MEDIA_ERR_DECODE"===e||"mediaErrorbufferAppendError"===e){const e=Date.now(),t=(ee+2)%3,a=te[t];if(!a||e-a>3e3)return ee%2&&Be(),ee++,te[t]=e,Fe(!0)}if("mediaErrorbufferStalledError"===e){const e=Date.now(),t=++de,a=X;if(X=e,t<3&&(!a||e-a>1e4))return Fe(!1)}Re(e,t)},Fe=e=>{st.log("try to recover video decoding error"),ce().recoverDecodingError(e)},Be=()=>{st.log("try to swap audio codec"),ce().swapAudioCodec()},Ge=()=>{oe=!0,J&&J.attachVideo(),Se()},Ye=()=>{oe=!1,we()},We=()=>{oe=!1,we(),J&&(Ie(),J.detachVideo())},Qe=()=>ce().detachVideo(),je=e=>{let{position:t}=e;"midroll"!==t&&"liveadbreak"!==t||ce().detachVideo()},Ke=()=>{we(),ce().detachVideo()},$e=()=>{ie=0,ne=0,se={adaptive:null,quality:null},Se()},ze=()=>{g.on(Ee),U.on(pe),H.on(ge),L.on(Ge),b.on(Ye),f.on(We),_.on(Me),I.on(Qe),C.on(je),A.on(Ke),E.on($e)},Ze=()=>{S.off(xe),g.off(Ee),U.off(pe),H.off(ge),L.off(Ge),b.off(Ye),f.off(We),_.off(Me),I.off(Qe),C.off(je),A.off(Ke),E.off($e)};ze(),y.emit({streamTech:"hls.js"}),st.log("Initialized"),o&&s?xe():S.on(xe),T.emit({ok:!0});w.once((()=>{Ze(),F.value=[],q.value=0,st.log("Torn down"),J&&(Ie(),J.destroy(),J=null)}));const Xe=e=>{let{timeoutMs:t,onTimeoutCleanup:a}=e;return new Promise(((e,i)=>{let n=null;const r=()=>{n&&(clearTimeout(n),n=null),B.removeEventListener("loadedmetadata",o)},o=()=>{r(),e()};n=setTimeout((()=>{r(),a?.(),i(new Error("Timeout waiting for loadedmetadata"))}),t),B.addEventListener("loadedmetadata",o,{once:!0})}))},Je={isUsingHlsJs:()=>null!==J&&J.mseAttached,waitForLoadedMetadata:Xe,destroyHlsJsForAirPlay:()=>{if(!J||!J.mseAttached)return st.log("No hls.js instance to destroy for AirPlay"),null;st.log("Destroying hls.js for AirPlay");const e={resource:J.resource,qualityState:{adaptive:se.adaptive,qualityName:se.quality?se.quality.name:null,maxLevel:se.maxLevel}};return Ze(),Ie(),J.destroy(),J=null,B.innerHTML="",B.removeAttribute("src"),st.log("hls.js destroyed for AirPlay"),e},restoreHlsJsAfterAirPlay:e=>{const t=(e=>e&&e.resource?e.resource.url?(!e.qualityState||e.qualityState.adaptive||e.qualityState.qualityName||st.warn("Quality state exists but has no adaptive flag or quality name, will use adaptive mode"),{valid:!0,error:null}):{valid:!1,error:"Missing resource URL for hls.js restoration"}:{valid:!1,error:"Invalid saved data for hls.js restoration"})(e);return t.valid?(st.log("Restoring hls.js after AirPlay"),new Promise(((t,a)=>{Te(e.resource).then((()=>ce().waitForManifest())).then((()=>{const i=e.qualityState;if(null!==i.qualityName){const e=ue().getLevelForQualityName(i.qualityName)??-1,t=i.adaptive||!1,a=i.maxLevel||null;st.log("Directly restoring quality via setLevel:",{qualityName:i.qualityName,levelIndex:e,adaptive:t,maxLevel:a}),ce().setLevel(e,t,a,"recover")}else i.adaptive?st.log("Directly restoring adaptive mode via setLevel"):st.warn("No valid quality state, forcing adaptive mode via setLevel"),ce().setLevel(-1,!0,null,"recover");ce().attachVideo(),Xe({timeoutMs:1e4,onTimeoutCleanup:()=>{st.log("Timeout waiting for loadedmetadata in restoreHlsJsAfterAirPlay"),J&&(Ie(),J.destroy(),J=null)}}).then((()=>{st.log("hls.js restored after AirPlay, loadedmetadata received"),ze(),t()})).catch(a)})).catch((e=>{st.error("Error waiting for manifest during hls.js restoration:",e),J&&(Ie(),J.destroy(),J=null),a(e)}))}))):(st.error("Cannot restore hls.js:",t.error),Promise.reject(new Error(t.error)))}};rt.value=Je},dt=s("Quality","DynamicQuality"),ut=s("Quality"),ct=s("Preloading"),mt=e=>{let{videoPauseEventEmitter:t,chromecastRemoteEnabledEventEmitter:a,chromecastSessionStoppedEventEmitter:i,config:n,localStore:r,playerSizeAPI:o,drmTokenProvider:s,perf:l,SSAI:d,speedChangeRequestedEventEmitter:u,utilsHelpers:c,isGKEnabled:m,settingsSignal:A,onStreamingCellChange:E,qualitiesAvailableEventEmitter:p,qualityChangedEventEmitter:h,qualityChangeRequestedEventEmitter:g,qualityStatsRequestedEventEmitter:_,qualityStatsRespondedEventEmitter:v,liveOnToOffAirEventEmitter:f,streamTechChangeEventEmitter:y,videoSelectedEventEmitter:D,seekRequestedEventEmitter:S,sequenceStartedEventEmitter:w,loadVideoEventEmitter:R,autoplayResolutionEventEmitter:T,canPlayOneSourceEventEmitter:P,videoPlayEventEmitter:I,videoLoadedMetadataEventEmitter:L,videoEndedEventEmitter:b,videoSlotStartedEventEmitter:N,videoSlotEndedEventEmitter:O,adLinearWillStartEventEmitter:M,errorPlayerEventEmitter:k,debugUpdatedEventEmitter:U,liveEdgeDelayChangedEventEmitter:x,timeOffsetChangedEventEmitter:V,subtitlesChangeRequestedEventEmitter:H,subtitleIdSignal:q,subtitlesDataSignal:F,audioTrackChangeRequestedEventEmitter:B,audioTrackIdSignal:G,audioTracksDataSignal:Y,airplayIsActiveSignal:W,videoNode:Q,subtitlesNode:j}=e;const K=e=>{const t=At(e);E(t)};R.on((()=>{E(null),Ke()})),D.on((e=>{ut.log("on videoSelected",e.metadata.id);const E=n.metadata.stream?.ssai_session_url;E&&d.init({sessionUrl:E});const D=n.metadata.stream,$=D?.url?{url:D.url,type:D.content_type}:null,z=$?{auto:[$]}:{auto:[]};if($&&C()&&!W.value){const t=n.metadata.stream?.stream_type,u="live"===t,E=n.metadata.id||n.metadata.access_id;let D=null;const S="off"===A.value.autostart&&We({isGKEnabled:m,settingsSignal:A})&&!u&&E;if(!S){const e=[];We({isGKEnabled:m,settingsSignal:A})||e.push("preloading disabled (setting: false, GK: false)"),"off"!==A.value.autostart&&e.push(`autostart=${A.value.autostart}`),u&&e.push("live stream"),E||e.push("no videoId"),D=e.join(", ")}if(S){ct.log("Preload enabled - conditions met");const e=r.get("dmp_quality"),t=n.settings("quality");je($.url,e,o.width,o.height,t,Q,m)}else ct.log(`Preload skipped - reason: ${D}`);(async e=>{let{videoSettings:t,qualities:a,resource:i,config:n,localStore:r,utilsHelpers:o,playerSizeAPI:s,drmTokenProvider:l,perf:d,SSAI:u,isGKEnabled:c,settingsSignal:m,chromecastRemoteEnabledEventEmitter:A,chromecastSessionStoppedEventEmitter:E,qualitiesAvailableEventEmitter:p,qualityChangedEventEmitter:h,qualityChangeRequestedEventEmitter:g,qualityStatsRequestedEventEmitter:_,qualityStatsRespondedEventEmitter:v,liveOnToOffAirEventEmitter:f,streamTechChangeEventEmitter:y,onQualityLoadStart:D,sequenceStartedEventEmitter:S,loadVideoEventEmitter:w,autoplayResolutionEventEmitter:R,canPlayOneSourceEventEmitter:T,videoLoadedMetadataEventEmitter:P,videoEndedEventEmitter:I,videoSlotStartedEventEmitter:L,videoSlotEndedEventEmitter:b,adLinearWillStartEventEmitter:C,errorPlayerEventEmitter:N,debugUpdatedEventEmitter:O,liveEdgeDelayChangedEventEmitter:M,timeOffsetChangedEventEmitter:k,subtitlesChangeRequestedEventEmitter:U,subtitleIdSignal:x,subtitlesDataSignal:V,audioTrackChangeRequestedEventEmitter:H,audioTrackIdSignal:q,audioTracksDataSignal:F,videoNode:B,subtitlesNode:G}=e,Y=!1,W=!1;const Q=()=>{Y=!0},j=e=>{let{status:t}=e;W="Resolved"===t};S.on(Q),R.on(j),dt.log("Enabling quality switch by HLS"),S.off(Q),R.off(j),lt({resource:i,qualities:a,config:n,localStore:r,utilsHelpers:o,autoplay:t?.autoplay||Y,autoplayAllowed:W,playerSizeAPI:s,drmTokenProvider:l,perf:d,SSAI:u,isGKEnabled:c,settingsSignal:m,chromecastRemoteEnabledEventEmitter:A,chromecastSessionStoppedEventEmitter:E,qualitiesAvailableEventEmitter:p,qualityChangedEventEmitter:h,qualityChangeRequestedEventEmitter:g,qualityStatsRequestedEventEmitter:_,qualityStatsRespondedEventEmitter:v,liveOnToOffAirEventEmitter:f,streamTechChangeEventEmitter:y,onQualityLoadStart:D,sequenceStartedEventEmitter:S,loadVideoEventEmitter:w,canPlayOneSourceEventEmitter:T,videoLoadedMetadataEventEmitter:P,videoEndedEventEmitter:I,videoSlotStartedEventEmitter:L,videoSlotEndedEventEmitter:b,adLinearWillStartEventEmitter:C,errorPlayerEventEmitter:N,debugUpdatedEventEmitter:O,liveEdgeDelayChangedEventEmitter:M,timeOffsetChangedEventEmitter:k,subtitlesChangeRequestedEventEmitter:U,subtitleIdSignal:x,subtitlesDataSignal:V,audioTrackChangeRequestedEventEmitter:H,audioTrackIdSignal:q,audioTracksDataSignal:F,videoNode:B,subtitlesNode:G}),Y=!1})({videoSettings:e.videoSettings,resource:$,qualities:z,config:n,localStore:r,utilsHelpers:c,playerSizeAPI:o,drmTokenProvider:s,perf:l,SSAI:d,isGKEnabled:m,settingsSignal:A,chromecastRemoteEnabledEventEmitter:a,chromecastSessionStoppedEventEmitter:i,qualitiesAvailableEventEmitter:p,qualityChangedEventEmitter:h,qualityChangeRequestedEventEmitter:g,qualityStatsRequestedEventEmitter:_,qualityStatsRespondedEventEmitter:v,liveOnToOffAirEventEmitter:f,streamTechChangeEventEmitter:y,onQualityLoadStart:K,sequenceStartedEventEmitter:w,loadVideoEventEmitter:R,autoplayResolutionEventEmitter:T,canPlayOneSourceEventEmitter:P,videoLoadedMetadataEventEmitter:L,videoEndedEventEmitter:b,videoSlotStartedEventEmitter:N,videoSlotEndedEventEmitter:O,adLinearWillStartEventEmitter:M,errorPlayerEventEmitter:k,debugUpdatedEventEmitter:U,liveEdgeDelayChangedEventEmitter:x,timeOffsetChangedEventEmitter:V,subtitlesChangeRequestedEventEmitter:H,subtitleIdSignal:q,subtitlesDataSignal:F,audioTrackChangeRequestedEventEmitter:B,audioTrackIdSignal:G,audioTracksDataSignal:Y,videoNode:Q,subtitlesNode:j})}else ut.log("Enabling StaticQualitySwitcher (progressive or native HLS)"),_e({qualities:z,videoPauseEventEmitter:t,config:n,localStore:r,playerSizeAPI:o,SSAI:d,speedChangeRequestedEventEmitter:u,qualitiesAvailableEventEmitter:p,qualityChangedEventEmitter:h,qualityChangeRequestedEventEmitter:g,qualityStatsRequestedEventEmitter:_,qualityStatsRespondedEventEmitter:v,streamTechChangeEventEmitter:y,utilsHelpers:c,onQualityLoadStart:K,seekRequestedEventEmitter:S,sequenceStartedEventEmitter:w,loadVideoEventEmitter:R,canPlayOneSourceEventEmitter:P,videoPlayEventEmitter:I,videoLoadedMetadataEventEmitter:L,videoSlotStartedEventEmitter:N,videoSlotEndedEventEmitter:O,adLinearWillStartEventEmitter:M,errorPlayerEventEmitter:k,subtitlesChangeRequestedEventEmitter:H,subtitleIdSignal:q,subtitlesDataSignal:F,videoNode:Q})}))},At=e=>{let t;try{t=new URL(e)}catch{return null}const{hash:a}=t;if(!a)return null;const i=a.slice(1);return new URLSearchParams(i).get("cell")}},91:(e,t,a)=>{"use strict";a.d(t,{B:()=>i});const i={SKIPPED:"skipped",SMART_SKIPPED:"smart_skipped",COMPLETED:"completed",INTERRUPTED:"interrupted",CLOSED:"closed"}},1638:(e,t,a)=>{"use strict";a.d(t,{e:()=>i});const i={PREROLL:"preroll",MIDROLL:"midroll",POSTROLL:"postroll",LIVEADBREAK:"liveadbreak"}},4993:(e,t,a)=>{"use strict";a.d(t,{z0:()=>Qe,Bj:()=>fe.B,k3:()=>i,r0:()=>Te,ev:()=>ye.e,nF:()=>r,dx:()=>Ie,w3:()=>Pe,YK:()=>ve,Z4:()=>l,VS:()=>o,L0:()=>n,Uk:()=>s});var i={};a.r(i),a.d(i,{BUFFER_FINISH:()=>W,BUFFER_START:()=>Y,CLICK_THRU:()=>d,DURATION_CHANGE:()=>u,ERROR:()=>c,EXPANDED_CHANGE:()=>m,FULLSCREEN_ENTERED:()=>A,FULLSCREEN_EXITED:()=>E,IMPRESSION:()=>p,INTERACTION:()=>h,LINEAR_CHANGE:()=>g,LOADED:()=>_,LOG:()=>v,MUTED:()=>f,PAUSED:()=>y,PLAYING:()=>D,POD_ERROR:()=>S,RATIO_CHANGE:()=>C,REMAINING_TIME_CHANGE:()=>w,RESIZE_AD_REQUESTED:()=>Q,SIZE_CHANGE:()=>R,SKIPPABLE_REMAINING_TIME_CHANGE:()=>T,SKIPPABLE_STATE_CHANGE:()=>P,SKIPPED:()=>I,STARTED:()=>L,STOPPED:()=>b,UNMUTED:()=>N,USER_ACCEPT:()=>O,USER_CLOSE:()=>M,USER_MINIMIZE:()=>k,VIDEO_COMPLETE:()=>V,VIDEO_FIRST_QUARTILE:()=>U,VIDEO_MIDPOINT:()=>H,VIDEO_START:()=>q,VIDEO_THIRD_QUARTILE:()=>x,VOLUME_CHANGE:()=>F,WILL_AD_BREAK:()=>B,WILL_START:()=>G});var n={};a.r(n),a.d(n,{e7:()=>j,aH:()=>K,pn:()=>$,zD:()=>z,nt:()=>Z,b1:()=>X,dU:()=>J,tE:()=>ee,sY:()=>te,rf:()=>ae,Z$:()=>ie,gx:()=>ne,DA:()=>re,of:()=>oe,kb:()=>se,Hw:()=>le,il:()=>de,q2:()=>ue,g_:()=>ce,LL:()=>me,rp:()=>pe,VQ:()=>Ae,ck:()=>he,Om:()=>ge,sk:()=>Ee,Y7:()=>_e});var r={};a.r(r),a.d(r,{IO:()=>Se,jY:()=>we,fn:()=>Re,LN:()=>De});var o={};a.r(o),a.d(o,{Aq:()=>Me,$U:()=>xe,xU:()=>Ue,Od:()=>Ne,Kd:()=>Oe,xq:()=>ke});var s={};a.r(s),a.d(s,{wr:()=>Fe,R4:()=>Ve,pc:()=>He,Bp:()=>qe});var l={};a.r(l),a.d(l,{Hs:()=>Ge,Vf:()=>Ye,iF:()=>Be,cV:()=>We});const d="AdClickThru",u="AdDurationChange",c="AdError",m="AdExpandedChange",A="AdFullscreenEntered",E="AdFullscreenExited",p="AdImpression",h="AdInteraction",g="AdLinearChange",_="AdLoaded",v="AdLog",f="AdMuted",y="AdPaused",D="AdPlaying",S="AdPodError",w="AdRemainingTimeChange",R="AdSizeChange",T="AdSkippableRemainingTimeChange",P="AdSkippableStateChange",I="AdSkipped",L="AdStarted",b="AdStopped",C="AdRatioChange",N="AdUnmuted",O="AdUserAccept",M="AdUserClose",k="AdUserMinimize",U="AdVideoFirstQuartile",x="AdVideoThirdQuartile",V="AdVideoComplete",H="AdVideoMidpoint",q="AdVideoStart",F="AdVolumeChange",B="AdWillAdBreak",G="AdWillStart",Y="AdBufferStart",W="AdBufferFinish",Q="ResizeAdRequested",j="AdClickThru",K="AdDurationChange",$="AdError",z="AdExpandedChange",Z="AdImpression",X="AdInteraction",J="AdLinearChange",ee="AdLoaded",te="AdLog",ae="AdPaused",ie="AdPlaying",ne="AdRemainingTimeChange",re="AdSizeChange",oe="AdSkippableStateChange",se="AdSkipped",le="AdStarted",de="AdStopped",ue="AdUserAcceptInvitation",ce="AdUserClose",me="AdUserMinimize",Ae="AdVideoFirstQuartile",Ee="AdVideoThirdQuartile",pe="AdVideoComplete",he="AdVideoMidpoint",ge="AdVideoStart",_e="AdVolumeChange",ve={STARTED:"started",LOADED:"loaded",IMPRESSION:"impression",SKIPPED:"skipped",COMPLETE:"complete",ALL_ADS_COMPLETED:"all_ads_completed",CONTENT_PAUSE_REQUESTED:"content_pause_requested",CONTENT_RESUME_REQUESTED:"content_resume_requested",AD_ERROR:"ad_error",PAUSED:"pause",RESUMED:"resume",CLICK:"clicked",VOLUME_CHANGED:"volume_changed",FIRST_QUARTILE:"first_quartile",MIDPOINT:"midpoint",THIRD_QUARTILE:"third_quartile",FULLSCREEN:"fullscreen",INLINE:"inline",DURATION_CHANGED:"ad_durationchange",AD_PROGRESS:"ad_timeupdate"};var fe=a(91),ye=a(1638);const De=2,Se=7,we=8,Re=9,Te={AD_RESOLVED_ERROR:{id:"adResolvedError"},AD_RESOLVED_OK:{id:"adResolvedOk"},CONSECUTIVE_EXCLUSION:{id:"consecutive_exclusion",value:10002},ELEMENT_SHIELD:{id:"adElementShield"},IAS_LOADED:{id:"ias_loaded"},IMA_RECOVERABLE_AD_ERROR:{id:"ima_recoverable_ad_error"},OMID_NEEDED:{id:"omidNeeded"},OMID_SCRIPT_URL_LOADED:{id:"omidScriptUrlLoaded"},OMID_SESSION_OBSERVER_VENDOR:{id:"omidSessionObserverVendor"},OMID_VERIFICATION_NOT_EXECUTED:{id:"omidVerificationNotExecuted"},PERMANENT_EXCLUSION:{id:"permanent_exclusion",value:10003},SIMID_REQUEST_EXIT_FULLSCREEN:{id:"simidRequestExitFullscreen"},SIMID_REQUEST_FULLSCREEN:{id:"simidRequestFullscreen"},SIMID_REQUEST_CHANGE_AD_DURATION:{id:"simidRequestChangeAdDuration"},TEMPORARY_EXCLUSION:{id:"temporary_exclusion",value:10001},TOPICS_API:{id:"topics_api"},VAST_URI_MIXED_CONTENT:{id:"vastAdTagURIMixedContent"},VPAID_EARLY_START_AD_EVENT:{id:"vpaid_early_start_ad_event"},VPAID_SAFE_OBJECT_WRAP_ERROR:{id:"vpaidSafeObjectWrapError"},VPAID_VERSION_SUPPORT:{id:"vpaidVersionSupport"},AD_READY_TO_FETCH_TIMEOUT:{id:"adReadyToFetchTimeout"},VMAP_RECEIVED_DURATION:{id:"vmapReceivedDuration"}},Pe={URL:"url",ADBUFFET:"adbuffet"},Ie={DISABLED_IN_PLAYER_SETTINGS:"player_settings",CHROMECAST_SESSION:"chromecast_session",VIDEO_REPLAY:"video_replay",SCHEDULER_DISABLED:"scheduler_disabled",LIVE_ADBREAKS_DVR_NOT_LIVE:"live_adbreaks_dvr_not_live",LIVE_ADBREAKS_PAUSED_PLAYBACK:"live_adbreaks_paused_playback",STREAM_NOT_HLS:"stream_not_hls",LIVE_MIDROLL_DISABLED:"live_midroll_disabled",NON_DVR_LIVE_PLAYBACK_TOGGLING:"non_dvr_playback_toggling"},Le="image/jpeg",be="image/png",Ce="image/webp",Ne="application/x-mpegURL",Oe=["video/mp4","video/webm"],Me=["audio/mp4","audio/mpeg","audio/aac","audio/mpeg3","audio/mp3","audio/vnd.wave","audio/wav","audio/wave","audio/ogg","audio/vorbis"],ke=["application/javascript","application/x-javascript","text/javascript"],Ue=[Le,be,Ce],xe=[Le,be,Ce,"image/svg+xml"],Ve=403,He=405,qe=501,Fe=901,Be="StreamIntegrator",Ge="ImaIntegrator",Ye="ImaNativeIntegrator",We="VPAIDIntegrator",Qe="AdSense"},9736:(e,t,a)=>{"use strict";a.d(t,{C:()=>s,Z:()=>o});const i={messages:[],currentTime:0,imaLoaded:!1},n=e=>{switch(e){case"AD_SDK_READY":return{method:"initAd",events:["AD_LOADED","AD_ERROR"]};case"AD_LOADED":return{method:"startAd",events:["AD_START","AD_ERROR"]};case"AD_STARTED":return{method:null,events:["AD_STOPPED","AD_SKIPPED","AD_ERROR"]};default:return null}},r=(e,t)=>{const{type:a,__type:i,position:r,message:o,code:s,internalCode:l,prefetch:d,integrator:u}=(e=>"AD_ERROR"!==e.type?e:{...e.adError||{},type:e.type,__type:e.adError?.type||null})(t);let c=[];if(null!=i&&c.push(i),d&&c.push("prefetch"),u&&c.push(u.replace("Integrator","")),"AD_ERROR"===a){const e=l&&l!==s?`${s} | ${l}`:s;c=c.concat([o,e])}return{type:i,position:r,event:a,next:d?null:n(a),extraArgs:c,time:e,integrator:u}};function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOAD_VIDEO":return{...e,messages:[],currentTime:0};case"VIDEO_TIME_UPDATE":return{...e,currentTime:t.time};case"AD_SDK_READY":case"AD_LOADED":case"AD_STARTED":case"AD_STOPPED":case"AD_SKIPPED":case"AD_ERROR":return{...e,messages:[...e.messages,r(e.currentTime,t)]};default:return e}}const s=e=>e.adConsole.messages},2873:(e,t,a)=>{"use strict";a.d(t,{$:()=>_,AD:()=>I,AG:()=>b,Ao:()=>m,BU:()=>x,DI:()=>H,Gv:()=>f,Hs:()=>M,Hy:()=>u,Js:()=>c,Km:()=>N,LS:()=>V,MP:()=>B,Ms:()=>v,PF:()=>k,RT:()=>S,Sf:()=>l,So:()=>w,UI:()=>U,US:()=>o,W0:()=>y,ZC:()=>n,Zg:()=>L,av:()=>p,bZ:()=>F,bn:()=>q,cl:()=>E,eB:()=>P,k7:()=>C,lf:()=>h,lo:()=>r,nN:()=>O,nY:()=>A,pr:()=>s,qz:()=>D,sC:()=>T,tH:()=>g,u4:()=>d,y$:()=>G,zU:()=>R});var i=a(7465);const n=(0,i.I)("AD_SDK_WEB_CONTENT_PAUSE_REQUESTED"),r=(0,i.I)("AD_SDK_WEB_CONTENT_RESUME_REQUESTED"),o=(0,i.I)("AD_SDK_WEB_AD_ERROR"),s=(0,i.I)("AD_SDK_WEB_AD_BREAK_START"),l=(0,i.I)("AD_SDK_WEB_AD_START"),d=(0,i.I)("AD_SDK_WEB_AD_END"),u=(0,i.I)("AD_SDK_WEB_AD_PLAY"),c=(0,i.I)("AD_SDK_WEB_AD_PAUSE"),m=(0,i.I)("AD_SDK_WEB_AD_READY_TO_FETCH"),A=(0,i.I)("AD_SDK_WEB_AD_LOADED"),E=(0,i.I)("AD_SDK_WEB_VOLUME_CHANGE"),p=(0,i.I)("AD_BREAK_WILL_START"),h=(0,i.I)("AD_BUFFER_FINISH"),g=(0,i.I)("AD_BUFFER_START"),_=(0,i.I)("AD_CLICK"),v=(0,i.I)("AD_COMPANIONS_RECEIVED"),f=(0,i.I)("AD_ERROR"),y=(0,i.I)("AD_IMPRESSION"),D=(0,i.I)("AD_LOADED"),S=(0,i.I)("AD_SDK_READY"),w=(0,i.I)("AD_LINEAR_BREAK_ENDED"),R=(0,i.I)("AD_LINEAR_BREAK_STARTED"),T=(0,i.I)("AD_LINEAR_STARTED"),P=(0,i.I)("AD_LINEAR_STOPPED"),I=(0,i.I)("AD_LINEAR_WILL_START"),L=(0,i.I)("AD_NON_LINEAR_DISPLAY_STARTED"),b=(0,i.I)("AD_SKIPPED"),C=(0,i.I)("AD_STARTED"),N=(0,i.I)("AD_STOPPED"),O=(0,i.I)("AD_VIDEO_COMPLETE"),M=(0,i.I)("AD_VIDEO_SKIPPABLE_REMAINING_TIME"),k=(0,i.I)("AD_VIDEO_SKIPPABLE_STATE"),U=(0,i.I)("AD_VIDEO_START"),x=(0,i.I)("AD_VIDEO_VOLUME_CHANGED"),V=(0,i.I)("AD_VMAP_RECEIVED"),H=(0,i.I)("IMA_NATIVE_AD_REQUESTED"),q=(0,i.I)("IMA_NATIVE_AD_STOPPED"),F=(0,i.I)("IMA_NATIVE_EVENT"),B=(0,i.I)("HEAVY_ADS_INTERVENTION_CHANGED"),G=(0,i.I)("RESET_CURRENT_AD_BREAK")},5617:(e,t,a)=>{"use strict";a.d(t,{R1:()=>Oe,Aj:()=>Ue,P3:()=>Me,vs:()=>ke});var i=a(2403),n=a(242),r=a(3692),o=a(6473),s=a(5141),l=a(4265),d=a(889),u=a(2689),c=a(3579),m=a(2606),A=a(2810);const E=()=>{const e=(0,A.m)();return"string"==typeof e?{reader_us_privacy:e}:{reader_us_privacy:(0,m.p)()}};var p=a(9371),h=a(3823),g=a(3176),_=a(8974),v=a(7006);const f=(e,t)=>{const a=(0,o.bh)()?.getState?.()?.settings;if(!(0,p.s7)())return a?a[e]:t;if(!a)return t;const i=a[e]??r.Z?.settings?.(e);return void 0===i?t:i},y=e=>{const t=window.infopack;return{ccpaConsent:e?.reader_us_privacy||"",tcfConsent:t?.getTcfConsentString?.()||"",tcf2HasConsentForGoogle:t?.TCF2HasConsentForGoogle?.()||!1,tcf2HasConsentForDailymotion:t?.TCF2HasConsentForDailymotion?.()||!1,isGdprApplicable:window.DMP_IS_GDPR_APPLICABLE||!1,isGdprConsentFromInfopack:t?.isEnabledForTcf?.()||!1,gppConsentStringFromPlayer:t?.getGppConsentStringFromPlayer?.()||"",gppApplicableSectionsFromPlayer:t?.getGppApplicableSectionsFromPlayer?.()||[]}},D=e=>{let{selector:t,context:a,backendConfig:i,videoId:n="",playlistId:o="",isAutoplay:m}=e;return{id:t(d.$d)||n||"",isAutoplay:m??(s.VO.value||!1),type:l.Zo.value?"LIVE":"STREAM",isCurrentTimeDVR:l.kb.value,isSeekable:r.Z?.isVideoSeekable?.()||!1,viewId:window.dmp_getViewIdForVideoIndex(c.t.value)||"",duration:t(d.xj)||0,publisherId:a.publisher_xid||"",publisherType:a.publisher_type||"",publisherReference:i.id||f("syndication","")||"",playlistId:window.DMP_INITIAL_PLAYLIST_ID||r.Z?.get?.()?.suggestedContent?.source?.xid||o||"",streamTech:u.Kk.value||"",ownerId:t(d.wD)||"",ownerParentId:t(d.pJ)||"",protectedDelivery:t(d.tw)||!1,createdTime:t(d.Te)||0,isPasswordProtected:t(d.vT)||!1,isPrivate:t(d.ek)||!1,mimeType:u.R_.value||"video/mp4"}},S=(e,t)=>{const a=e.device||{};return{appName:window.DMP_APP||"",locale:window.dm?.vars?.effectiveLocale||"",topDomain:window.DMP_TOPDOMAIN||"",embedder:window.DMP_EMBEDDER||window.location.href,clientType:window.DMP_CLIENT_TYPE||"website",deviceType:a.type||"",deviceId:window.DMP_DEVICE_ID||"",eid:window.DMP_EID||void 0,playerDisplayMode:t(v.P),isNativeApp:window.DMP_IS_NATIVE_APP||!1,appTrackingTransparencyAuthorizationStatus:window.DMP_ATTS,isTrackingAllowed:window.DMP_TRACKING_ALLOWED,isLimitAdTracking:window.DMP_LIMIT_AD_TRACKING,trafficSegment:window.DMP_TS||0,v1st:window.DMP_V1ST||"",is3rdPartyCookiesAvailable:window.DMP_COOKIES_3RD_PARTY_AVAILABLE||!1,osFamily:a.os_family||"",osName:a.os_name||"",uaFamily:a.ua_family||"",uaName:a.ua_name||"",uaVersion:a.ua_version||"",uid:window.DMP_UID||"",readerId:e.reader_id||null,dailymotionAdvertisingId:(0,g.vQ)("dmaid")||null,asNumber:e.as_number,continent:e.continent,country:e.country,region:e.region}},w=e=>{const t=window.dmp_isGKEnabled?.("PV5_DYNAMIC_AD_PRESSURE_CC")||!1,a=window.DMP_ONSITE||!1;if(!t||!a)return null;const{action:i}=(0,_.gq)(e.getState())||{};return i?.gesture||null},R=(e,t,a)=>({videoTag:window.dm?.nodes?.video,isPlayerControlsEnabled:f("controls",!0),playerMetadataParams:{isCreatedForKids:a(d.Ie)||!1},waitForCustomConfig:Boolean(f("waitForCustomConfig",!1)),waitForCustomConfigDelay:e.waitForCustomConfigDelay,adPressureOptimization:e.adPressureOptimization??"monetization",userGesture:w(t)}),T=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{videoId:t,playlistId:a,isAutoplay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,o.bh)(),r=e=>e(n.getState()),s=E(),l=window.__PLAYER_CONFIG__?.context||{},d=window.__PLAYER_CONFIG__?.player||{},u=P(e);return{consent:y(s),video:D({selector:r,context:l,backendConfig:d,videoId:t,playlistId:a,isAutoplay:i}),environment:S(l,r),player:R(d,n,r),...u}},P=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{customConfig:{permanent:h.Fe.value||{},temporary:h.D9.value||{}}}:{}};var I=a(2873),L=a(9886),b=a(7638);var C=a(7906),N=a(7022),O=a(4206),M=a(7966);let k=null,U=!1,x=(0,b.jl)("AdSdkWeb"),V=!0,H=null,q=null;const F=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Content pause requested",t),I.ZC.emit({position:t})},B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=k?.getAdDetails(),a=e.position||t?.position||"preroll";x.log("Content resume requested",a),I.lo.emit({position:a})},G=function(){let{muted:e,volume:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x.log("Ad volume changed",{muted:e,volume:t}),I.cl.emit({muted:e,volume:t})},Y=e=>{const{vastAd:t,creative:a,mediaFile:i,duration:n}=e||{};return{id:t?.id||null,adId:a?.adId||null,creativeId:a?.id||null,title:t?.title||null,description:t?.description||null,advertiserName:t?.advertiser||t?.system?.value||null,width:i?.width||null,height:i?.height||null,adDuration:n||null}},W=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Ad loaded",t),I.nY.emit({adVerifications:e?.vastAd?.adVerifications})},Q=function(){let{companionAds:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=k?.getAdDetails(),a=t?.position||"preroll";x.log("Ad started",a),I.Sf.emit({position:a,type:"linear",adData:Y(t)}),I.Hy.emit({position:a}),e?.length&&(x.log("Companion ads received",a,e),I.Ms.emit({companionAds:e}))},j=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Ad ended",t),I.u4.emit({position:t})},K=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Ad is playing",t),I.Hy.emit({position:t})},$=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Ad is paused",t),I.Js.emit({position:t})},z=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Ad break started",t),L.N.value=!0,I.pr.emit({position:t})},Z=()=>{const e=k?.getAdDetails(),t=e?.position||"preroll";x.log("Ad break ended",t),L.N.value=!1},X=e=>{const t=k?.getAdDetails(),a=t?.position||"preroll";x.error("Ad error",a,e),I.US.emit({position:a,error:e})},J=function(){let{position:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x.log("Ad ready to fetch from Ad SDK Web",e),I.Ao.emit({position:e})},ee=e=>{k&&U?(x.log("Setting custom config for Ad SDK Web",e),k.setCustomConfig(function(){let{persistentCustomConfig:e,temporaryCustomConfig:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{permanent:e||{},temporary:t||{}}}(e))):x.warn("Ad SDK Web setCustomConfig ignored: SDK not initialized")},te=function(){let{responseTime:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x.log("ADS_SEQUENCE_LOADED received, triggering AD_VMAP_RECEIVED",{responseTime:e}),I.LS.emit({shouldSubscribeEvent:!0})},ae=async e=>{const t=new n.S;await t.initialize(e),k=t,U=!0},ie=async function(){let{videoId:e,playlistId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!k||!U){const e=new Error("Ad SDK Web not initialized");throw x.error(e.message),(0,C.u)("temp_load_ads_sequence_not_initialized",e),e}x.log("Loading ads sequence"),window.dm?.perf?.metric("vmapLoad")?.start();try{(()=>{if(!k)return;const{Events:e}=k;k.on(e.CONTENT_PAUSE_REQUESTED,F),k.on(e.CONTENT_RESUME_REQUESTED,B),k.on(e.AD_LOAD,W),k.on(e.AD_START,Q),k.on(e.AD_END,j),k.on(e.AD_BREAK_START,z),k.on(e.AD_BREAK_END,Z),k.on(e.AD_PLAY,K),k.on(e.AD_PAUSE,$),k.on(e.AD_ERROR,X),k.on(e.AD_READY_TO_FETCH,J),k.on(e.ADS_SEQUENCE_LOADED,te),k.on(e.VOLUME_CHANGE,G)})();const{isAutoplay:a,reason:n}=await(async e=>{if(c.t.value>=1)return{isAutoplay:e,reason:null};try{return{isAutoplay:!0,reason:await(0,N.P$)({from:"ad"})}}catch{return{isAutoplay:!1,reason:null}}})(s.VO.value||!1);(e=>{const t=window.dm?.nodes?.video;if(!t)return;const{value:a,muted:i}=(0,o.bh)()?.getState?.()?.volume||{},n=(0,O.FT)(i,a)||Boolean(M.Hz.value.enableMute)||e===N.xo;(0,O.IF)(t,{volume:a,muted:n})})(n);const l=T(V,{videoId:e,playlistId:t,isAutoplay:a}),d=(()=>{const e=r.Z.settings("vmapurl",null),t=new URLSearchParams(window.location.search).get("access_mode");return{useFakeAd:window.dmp_isGKEnabled?.("PV5_AD_SDK_WEB_FAKE_AD")||!1,featureFlipping:window.DMP_GATEKEEPERS||[],...e?{vmapUrl:e}:{},...t?{omidAccessMode:t}:{}}})();V&&(i.jE.on(ee),V=!1),x.log("Loading ads sequence with appState:",l),H=k.loadAdsSequence(l,d),await H}catch(e){throw(0,C.u)("temp_failed_to_load_ad_sequence",e),x.error("Failed to load ads sequence",e),e}finally{window.dm?.perf?.metric("vmapLoad")?.end()}};i.zG.on((()=>{k&&U&&k.pauseAd()}));const ne=function(){let{videoId:e,playlistId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!k||!U)return;const a=T(!1,{videoId:e,playlistId:t});x.log("Updating Ad SDK Web app state:",a),k.updateAppState(a)},re={updatePlayerDependencies:ne,initAdSdkWeb:async()=>{if(U)return void x.log("Ad SDK Web already initialized");const e=window.dm?.nodes?.main;if(!e){const e=new Error("Container not found for Ad SDK Web initialization");return x.error(e.message),void(0,C.u)("temp_init_ad_sdk_standalone_container_missing",e)}for(let t=1;t<=2;t++)try{return await ae(e),void x.log("Ad SDK Web initialized successfully")}catch(e){if(t<2){x.warn(`Ad SDK Web initialization attempt ${t} failed, retrying`,e);continue}x.error("Failed to initialize Ad SDK Web after retry, continuing without ads",e),(0,C.u)("temp_init_ad_sdk_standalone_failed_after_retry",e),k=null,U=!1}},prepareForNewVideoAdSdkWeb:()=>{(()=>{if(!k)return;const{Events:e}=k;k.off(e.CONTENT_PAUSE_REQUESTED,F),k.off(e.CONTENT_RESUME_REQUESTED,B),k.off(e.AD_LOAD,W),k.off(e.AD_START,Q),k.off(e.AD_END,j),k.off(e.AD_BREAK_START,z),k.off(e.AD_BREAK_END,Z),k.off(e.AD_PLAY,K),k.off(e.AD_PAUSE,$),k.off(e.AD_ERROR,X),k.off(e.AD_READY_TO_FETCH,J),k.off(e.ADS_SEQUENCE_LOADED,te),k.off(e.VOLUME_CHANGE,G)})(),L.N.value=!1,H=null,q=null,k&&k.reset()},loadAdsSequenceWithAdSdkWeb:ie,startAdsSequenceWithAdSdkWeb:async()=>{if(!k||!U){const e=new Error("Ad SDK Web not initialized");throw x.error(e.message),(0,C.u)("temp_start_ads_sequence_not_initialized",e),e}return q||(q=(async()=>{try{H?await H:(x.log("No ads sequence loaded yet, loading before starting"),await ie()),ne(),x.log("Starting ads sequence"),await k.startAdsSequence()}catch(e){throw(0,C.u)("temp_failed_to_start_ad_sequence",e),x.error("Failed to start ads sequence",e),e}})(),q)},isAdSdkWebInitialized:()=>U,getAd:()=>k?.getAdDetails()||null,getAdBreak:()=>null,start:()=>{},fetchAds:()=>{},startLiveAdBreak:()=>{k&&U?(x.log("Starting live ad break"),k.startLiveAdBreak()):x.warn("startLiveAdBreak ignored: SDK not initialized")},stopAd:()=>{},positions:{PREROLL:"preroll",MIDROLL:"midroll",POSTROLL:"postroll",LIVEADBREAK:"liveadbreak"},isSkipIgnored:()=>!1,adsDisabledReason:()=>U?"":"Ad SDK Web not initialized",catchUserAction:async()=>{k&&U?await k.catchUserAction():(0,C.u)("temp_standalone_catch_user_action_failed")},AdSdkHandler:{},IMASdkHandler:{},OmSdkUtils:{},getClickTrackingMacro:()=>"",getTrackingMacros:()=>({}),subscribe:()=>{},unsubscribe:()=>{}};var oe=a(155);const se=async()=>(await re.initAdSdkWeb(),re),le=async()=>{(0,oe.bR)((0,o.bh)().getState())||(re.prepareForNewVideoAdSdkWeb(),re.isAdSdkWebInitialized()||await re.initAdSdkWeb())};var de=a(9115),ue=a(376),ce=a(5402),me=a(8499),Ae=a(6785),Ee=a(1644),pe=a(4947),he=a(6649),ge=a(8041),_e=a(1399),ve=a(4754),fe=a(9254);const ye=e=>t=>t(e.getState()),De=(e,t,a)=>(i,n)=>(e(i,(()=>t.dispatchEvent(n))),i(a.getState())),Se=(e,t)=>{const a=(e=>{const t=[];return e.subscribe((()=>{t.forEach((t=>{const{selector:a,onChange:i,currentValue:n}=t,r=a(e.getState());r!==n&&(t.currentValue=r,i())}))})),(a,i)=>{t.push({selector:a,onChange:i,currentValue:a(e.getState())})}})(e);return{selector:ye(e),syncSelector:De(a,t,e)}};var we=a(1303),Re=a(1402),Te=a(2467),Pe=a(2816),Ie=a(6898),Le=a(8775);const be=(e,t,a)=>{const{selector:n,syncSelector:m}=Se((0,o.bh)(),t);return{config:r.Z||a,injectStyles:de.f,playerSizeAPI:ue.b,playerAPI:{isParallelAdCallsEnabled:p.s7,shouldUseClientSideAdUrl:p.IN,createError:ce.T,getStore:o.bh,getLogger:b.jl,getPlayerVolume:()=>({volume:n(me.gG),muted:n(me.oM)}),getFullscreenState:()=>({isOpened:Ae._.value,isSupported:Ae.A.value,viewMode:Ee.Z.getViewMode()}),getVideoSettings:()=>({autoplay:s.DM.value}),getVideoState:()=>({isLive:l.Zo.value,mimeType:u.R_.value}),isRealAutoplay:()=>s.VO.value,getTryAutoplay:e=>(0,N.P$)(e),getPlaybackState:()=>({isPaused:he.au.value,isPlaying:he.L8.value,currentTime:he.nd.value,videoDuration:n(pe.O5),playedVideosCounter:c.t.value,isCurrentTimeDVR:l.kb.value,isVideoSeekable:r.Z.isVideoSeekable()}),getNativeSdkCapabilities:()=>n(ge.yK),getChromecastStatus:()=>({isConnecting:m(_e.Dr,e?.PLAYER_CHROMECAST_STATUS_CHANGED),isActive:m(_e.nA,e?.PLAYER_CHROMECAST_STATUS_CHANGED)||window.DMP_CHROMECAST_NATIVE_STARTED}),getSequenceState:()=>({isReplay:n(oe.oj),isSchedulerEnabled:n(oe.kX),isReloadingLiveAfterPause:n(oe.bR)}),getCcpaToLeoParam:E,dispatchFromPlayer:ve.Pj,onFallbackToVideoContent:()=>{i._g.emit()},getMetadata:()=>({accessId:n(d.$d),adErrorUrl:r.Z.metadata.advertising?.ad_error_url,adSyncScriptUrl:r.Z.metadata.advertising?.ad_sync_script_url,adUrl:r.Z.metadata.advertising?.ad_url,createdTime:n(d.Te),duration:n(d.xj),isCreatedForKids:n(d.Ie),isPasswordProtected:n(d.vT),isPrivate:n(d.ek),ownerId:n(d.wD),ownerParentId:n(d.pJ),protectedDelivery:n(d.tw),streamTech:u.Kk.value,streamUrl:n(d.V$),viewId:window.dmp_getViewIdForVideoIndex(c.t.value)}),isPlayerFeatureEnabled:e=>window.dmp_isGKEnabled(e),getGatekeepers:()=>window.DMP_GATEKEEPERS,getInfopack:()=>window.infopack,getClientType:()=>window.DMP_CLIENT_TYPE,isNativeApp:()=>window.DMP_IS_NATIVE_APP,getImaNativeVersion:()=>window.DMP_IMA_NATIVE_VERSION,getAppId:()=>window.DMP_APP,getOmsdk:()=>window.DMP_OM_SDK,getOmVersion:()=>window.DMP_OM_VERSION,getOmPartner:()=>window.DMP_OM_PARTNER,isOnsite:()=>window.DMP_ONSITE,isPesPipRevampEnabled:()=>Pe.yX.value,getUID:()=>window.DMP_UID,getEID:()=>window.DMP_EID,getDeviceHelpers:()=>({...Te}),getDeviceId:()=>window.DMP_DEVICE_ID,getAtts:()=>window.DMP_ATTS,isTrackingAllowed:()=>window.DMP_TRACKING_ALLOWED,getLimitAdTracking:()=>window.DMP_LIMIT_AD_TRACKING,getCustomConfig:()=>h.hy.value,getPermanentCustomConfig:()=>h.Fe.value,getTemporaryCustomConfig:()=>h.D9.value,getCustomConfigKeysForMetadata:()=>window.DMP_CUSTOM_CONFIG_KEYS_FOR_METADATA,isCookies3rdPartyAvailable:()=>window.DMP_COOKIES_3RD_PARTY_AVAILABLE,isPes:()=>window.DMP_IS_PES,getPlayerVideoTag:()=>window.dm.nodes.video,getPlayerMainNode:()=>window.dm.nodes.main,getPerformance:()=>window.dm.perf,getPlayerTrafficSegment:()=>window.DMP_TS,getPlayerV1st:()=>window.DMP_V1ST,getPlayerPlaylistId:()=>window.DMP_INITIAL_PLAYLIST_ID,getPlayerViewId:()=>window.dmp_getViewIdForVideoIndex(c.t.value),getPlayerCookie:e=>(0,g.vQ)(e),isGdprApplicable:()=>window.DMP_IS_GDPR_APPLICABLE,getPlayerBackendConfig:()=>window.__PLAYER_CONFIG__.player,getEmbedder:()=>window.DMP_EMBEDDER,getTopDomain:()=>window.DMP_TOPDOMAIN,getEffectiveLocale:()=>window.dm.vars.effectiveLocale,getEffectiveLocaleShort:()=>window.dm.vars.effectiveLocaleShort,isPlayerInViewport:()=>n(Re.$e),isPesPipIsRunning:()=>n(Re.H6),getPlayerDisplayMode:()=>n(v.P),getContext:()=>window.__PLAYER_CONFIG__.context,getHls:()=>Le.Ss.value||null,getConsentGdprCollectionRequested:()=>Ie.sI.value},eventBus:{getEventBusPayload:_.gq,createEventBusEvent:fe.i5,sendEventToEventBus:fe.z2,eventBusEmitter:we.UD}}};var Ce=a(8035);async function Ne(e){if(!window.DMP_ENABLE_ADS)return null;if(window.dmp_isAdSdkWebEnabled?.()){(0,C.u)("temp_init_ad_sdk_standalone_attempt");const e=await se().catch((e=>{throw(0,C.u)("temp_init_ad_sdk_standalone_failed",e),new Error(`Couldn't initialize ad stack: ${e}`)}));return{adSdk:e,resetAdStack:le}}(0,C.u)("temp_init_ad_sdk_legacy_attempt");const{adSdk:t,resetAdStack:i,AdEvents:n,adEventEmitter:r}=await async function(e){const{initAdStack:t,resetAdStack:i,AdEvents:n,adEventEmitter:r}=await a.e(124).then(a.bind(a,4285));return(0,p.s7)()||(0,Ce.C)(n,r),{adSdk:await t(be(n,r,e)),resetAdStack:i,AdEvents:n,adEventEmitter:r}}(e).catch((e=>{throw(0,C.u)("temp_init_ad_sdk_legacy_failed",e),new Error("Couldn't initialize ad stack")}));return{adSdk:t,resetAdStack:i,AdEvents:n,adEventEmitter:r}}let Oe=null;async function Me(e){const t=await Ne(e);t&&(Oe=t.adSdk,i.AO.on(t.resetAdStack))}const ke=()=>{Oe&&(window.dmp_isAdSdkWebEnabled?.()?Oe.updatePlayerDependencies():Oe.updatePlayerDependencies(be(Oe.AdEvents,Oe.adEventEmitter)))},Ue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe?.adEventEmitter?.dispatchEvent&&e&&Oe.adEventEmitter.dispatchEvent(e,{...t,eventFromPlayer:!0})}},7785:(e,t,a)=>{"use strict";a.d(t,{Js:()=>g,L1:()=>d,X2:()=>u,Yd:()=>f,ZP:()=>r,au:()=>h,b3:()=>A,ds:()=>c,ep:()=>E,fP:()=>o,jE:()=>m,ou:()=>l,xU:()=>p,xV:()=>s,yz:()=>_,zB:()=>v});var i=a(2279);const n={creativeType:null,isAdBreakRunning:!1,displayedCompanion:null,companions:null,adType:null,isNonLinearDisplayRunning:!1,isSkippable:!1,hasStarted:!1,skippableRemainingTime:0,currentTime:0,adEndedReason:null,adError:null,duration:0,adPodIndex:0,adPodTotal:0};function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"AD_LOADED":return{...e,creativeType:t.creativeType,adType:t.adType,adPodIndex:t.adPodIndex,adPodTotal:t.adPodTotal};case"AD_LINEAR_WILL_START":return{...e,isAdBreakRunning:!0};case"AD_COMPANIONS_RECEIVED":return{...e,companions:t.companionAds,displayedCompanion:t.displayedCompanion};case"AD_NON_LINEAR_DISPLAY_STARTED":return{...e,isNonLinearDisplayRunning:t.isNonLinearDisplayRunning};case"AD_VIDEO_SKIPPABLE_STATE":return{...e,isSkippable:t.adSkippable};case"AD_STARTED":return{...e,hasStarted:!0,...t.adPodIndex&&{adPodIndex:t.adPodIndex},...t.adPodTotal&&{adPodTotal:t.adPodTotal}};case"AD_VIDEO_SKIPPABLE_REMAINING_TIME":return{...e,skippableRemainingTime:t.time};case"VIDEO_TIME_UPDATE":return e.isAdBreakRunning?{...e,currentTime:t.time}:e;case"VIDEO_DURATION_CHANGE":return e.isAdBreakRunning?{...e,duration:t.duration||0}:e;case"RESET_CURRENT_AD_BREAK":case"VIDEO_SELECTED":return n;case"AD_SKIPPED":case"AD_STOPPED":case"AD_ERROR":return{...n,...t.adError&&{adError:t.adError},isAdBreakRunning:e.isAdBreakRunning};case"AD_LINEAR_STOPPED":return{...e,adEndedReason:t.reason};case"AD_LINEAR_BREAK_ENDED":return{...e,isAdBreakRunning:!1};default:return e}}const o=e=>"nonlinear"===e.ads.creativeType,s=e=>e.ads.isAdBreakRunning,l=e=>e.ads.hasStarted,d=e=>"audio"===e.ads.adType,u=e=>e.ads.isNonLinearDisplayRunning,c=e=>e.ads.isSkippable,m=e=>e.ads.skippableRemainingTime,A=e=>e.ads.currentTime,E=e=>e.ads.companions,p=e=>e.ads.adEndedReason,h=e=>e.ads.adError,g=e=>e.ads.duration,_=e=>e.ads.adPodIndex,v=e=>e.ads.adPodTotal,f=(0,i.P1)([s,d,e=>e.ads.displayedCompanion],((e,t,a)=>t&&e&&a&&a.resource?.url&&a.variation&&a.vastTracker?{companionImgUrl:a.resource.url,companionClickThruUrl:a.variation.companionClickThroughURLTemplate,companionAltText:a.variation.altText,companionSlotWidth:a.variation.width,companionSlotHeight:a.variation.height,companionAssetWidth:a.variation.assetWidth,companionAssetHeight:a.variation.assetHeight,companionVastTracker:a.vastTracker}:null))},9886:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});const i=(0,a(2328).td)(!1)},9481:(e,t,a)=>{"use strict";a.d(t,{X:()=>r,Z:()=>n});const i={isEnabled:!1};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;switch((arguments.length>1?arguments[1]:void 0).type){case"AD_SDK_READY":return{...e,isEnabled:!0};case"AD_ERROR":case"AD_LINEAR_BREAK_ENDED":case"LOAD_VIDEO":case"AD_SKIPPED":case"AD_STOPPED":return{...e,isEnabled:!1};default:return e}}const r=e=>e.adEventsAdapter.isEnabled},22:(e,t,a)=>{"use strict";a.d(t,{Ym:()=>r,ZP:()=>n,kA:()=>s,t:()=>o});const i={destroyCampaignImmediatly:!1,monitorCampaign:!1,resetIas:!0};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;switch((arguments.length>1?arguments[1]:void 0).type){case"AD_LOADED":return{...e,resetIas:!1,monitorCampaign:!0};case"AD_ERROR":case"AD_LINEAR_STOPPED":case"AD_SKIPPED":case"AD_STOPPED":return{...e,destroyCampaignAsync:!0,monitorCampaign:!1};case"VIDEO_SELECTED":return i;default:return e}}const r=e=>e.ias.destroyCampaignAsync,o=e=>e.ias.monitorCampaign,s=e=>e.ias.resetIas},8035:(e,t,a)=>{"use strict";a.d(t,{C:()=>s});var i=a(2403),n=a(2873),r=a(5617);let o=!1;function s(e,t){if(!t||o)return;o=!0,i.TK.on((()=>{(0,r.Aj)(e.PLAYER_GDPR_CONSENT_COLLECTION_REQUESTED)})),i.AM.on((()=>{(0,r.Aj)(e.PLAYER_GDPR_CONSENT_COLLECTION_RESOLVED)})),i.tY.on((()=>{(0,r.Aj)(e.PLAYER_CHROMECAST_SESSION_AVAILABLE)})),i.Ur.on((()=>{(0,r.Aj)(e.PLAYER_VIDEO_SELECTED)})),i.bJ.on((()=>{(0,r.Aj)(e.PLAYER_SEEK_REQUESTED)})),i.fS.on((()=>{(0,r.Aj)(e.PLAYER_SEQUENCE_ENDED)})),i.AO.on((t=>{(0,r.Aj)(e.PLAYER_LOAD_VIDEO,t)}));const a={[e.AD_BREAK_WILL_START]:n.av,[e.AD_BUFFER_FINISH]:n.lf,[e.AD_BUFFER_START]:n.tH,[e.AD_CLICK]:n.$,[e.AD_COMPANIONS_RECEIVED]:n.Ms,[e.AD_ERROR]:n.Gv,[e.AD_IMPRESSION]:n.W0,[e.AD_LOADED]:n.qz,[e.AD_SDK_READY]:n.RT,[e.AD_LINEAR_STARTED]:n.sC,[e.AD_LINEAR_STOPPED]:n.eB,[e.AD_LINEAR_BREAK_ENDED]:n.So,[e.AD_LINEAR_BREAK_STARTED]:n.zU,[e.AD_LINEAR_WILL_START]:n.AD,[e.AD_NON_LINEAR_DISPLAY_STARTED]:n.Zg,[e.AD_SKIPPED]:n.AG,[e.AD_STARTED]:n.k7,[e.AD_STOPPED]:n.Km,[e.AD_VIDEO_COMPLETE]:n.nN,[e.AD_VIDEO_SKIPPABLE_REMAINING_TIME]:n.Hs,[e.AD_VIDEO_SKIPPABLE_STATE]:n.PF,[e.AD_VIDEO_START]:n.UI,[e.AD_VIDEO_VOLUME_CHANGED]:n.BU,[e.AD_VMAP_RECEIVED]:n.LS,[e.IMA_NATIVE_AD_REQUESTED]:n.DI,[e.IMA_NATIVE_AD_STOPPED]:n.bn,[e.PLAYER_IMA_NATIVE_EVENT]:n.bZ,[e.PLAYER_HEAVYADSINTERVENTION_CHANGED]:n.MP,[e.RESET_CURRENT_AD_BREAK]:n.y$,[e.PLAYER_API_CUST_CONFIG_CONSUMED]:i.U9,[e.PLAYER_API_SET_CUST_CONFIG]:i.jE,[e.PLAYER_CONTENT_SIZE_CHANGED]:i.qB,[e.PLAYER_VIDEO_DURATION_CHANGE]:i.yn,[e.PLAYER_VIDEO_VOLUME_CHANGED]:i.OI,[e.PLAYER_TOGGLE_PLAYBACK_REQUESTED]:i.gy,[e.PLAYER_PLAY_REQUESTED]:i.MB,[e.PLAYER_ERROR]:i.yj,[e.PLAYER_PAUSE_REQUESTED]:i.zG,[e.PLAYER_SCHEDULER_END_SEQUENCE]:i.mW,[e.PLAYER_VIDEO_PAUSE]:i.Ir,[e.PLAYER_VIDEO_PLAY]:i.H5,[e.PLAYER_VIDEO_PLAYING]:i.lF,[e.PLAYER_VIDEO_TIME_UPDATE]:i.Iu,[e.PLAYER_VIDEO_ENDED]:i.Gr};for(const[e,i]of Object.entries(a))t.addEventListener(e,(e=>{e?.eventFromPlayer||(e?.type&&(e.__type=e.type,delete e.type),i.emit({...e,eventFromAdStack:!0}))})),i.on((t=>{t?.eventFromAdStack||(0,r.Aj)(e,t)}))}},9371:(e,t,a)=>{"use strict";a.d(t,{Dq:()=>u,IN:()=>d,s7:()=>l});var i=a(7638),n=a(7966);let r=null,o=null;const s=(0,i.jl)("Ads","ParallelAdCalls"),l=()=>(null===r&&s.log("Parallel ad calls getter called before any setter, disabling it"),r),d=()=>!!l()||(null===o&&s.log("Non-autoplay getter called before any setter, using metadata ad URL"),o),u=e=>{let{videoId:t,playlistId:a,autoplay:i}=e;const n=A(t,a)||E();o=c(i)&&n,r=m(t,a,i,n),s.log("Parallel ad calls setter, enabled:",r),o&&s.log("Click-to-play and scroll-to-play client-side ad URL enabled")},c=e=>!(e??window.DMP_IS_AUTOPLAY_ENABLED)&&!n.Hz.value.enableAdPreload,m=(e,t,a,i)=>c(a)?(s.log("Parallel ad calls disabled for click-to-play or scroll-to-play (enableAdPreload)"),!1):i,A=(e,t)=>{if(window.DMP_ONSITE)return!1;if(!e&&t&&!window.dmp_isGKEnabled("PV5_PARALLEL_ADS_CALL_PLAYLIST_OFFSITE"))return s.log("Parallel ad calls disabled for offsite, playlist only is not enabled"),!1;const a=window.dmp_isGKEnabled("PV5_PARALLEL_ADS_CALL");a||s.log("Missing GK_PV5_PARALLEL_ADS_CALL, cannot enable parallel ad calls");const i=window.dmp_isPremiumPartnerInParallelAdCallRollout(),n=window.dmp_isPremiumPartnerInParallelAdCallForProgressiveRollout();if(a&&(i||n)){const e=i&&window.dmp_isGKEnabled("PV5_TMP_PARALLEL_ADS_CALL_PREMIUM_PARTNER"),t=n&&window.dmp_isGKEnabled("PV5_TMP_PARALLEL_ADS_CALL_PREMIUM_PARTNER_PROGRESSIVE_ROLLOUT"),a=e||t;return s.log(`Parallel ad calls ${a?"ENABLED":"DISABLED"} for this premium partner`),a}return a},E=()=>window.DMP_ONSITE&&window.dmp_isGKEnabled("PV5_PARALLEL_ADS_CALL_ONSITE")},7906:(e,t,a)=>{"use strict";a.d(t,{u:()=>n});var i=a(9254);const n=(e,t)=>{if(!window.dmp_isGKEnabled?.("PV5_AD_SDK_TEMP_LOGS"))return;const a=(0,i.i5)({name:"advertising.adLog",data:{...(0,i.gq)(),ad_log_id:e,...null!=t&&{ad_log_value:String(t)}}});(0,i.z2)(a,{priority:"low"})}},4754:(e,t,a)=>{"use strict";a.d(t,{bd:()=>p,Pj:()=>E,P7:()=>f});var i=a(3692);const n={_EVENT_HANDLERS:{},dispatchEvent(e,t,a){let i;const n={bubbles:!1,cancelable:!1,detail:a};if("function"==typeof CustomEvent)i=new CustomEvent(t,n);else if(document.createEvent)try{i=document.createEvent("CustomEvent"),i.initCustomEvent(t,n.bubbles,n.cancelable,n.detail)}catch(e){i=document.createEvent("Event"),i.initEvent(t,n.bubbles,n.cancelable)}else i=document.createEventObject(),i.eventType=t,i.detail=n.detail;e.dispatchEvent?e.dispatchEvent(i):e.fireEvent&&(`on${t}`in e?e.fireEvent(`on${t}`,i):t in this._EVENT_HANDLERS&&Array.from(this._EVENT_HANDLERS[t]).map((e=>e(t))))}};var r=a(4155),o=a(7638);const s=(0,o.jl)("API"),l={init(){return window.player=window.dm.nodes.main,this.parsedEmbedderProperties=null,this},postMessage(e){(0,r.nextTick)((()=>{window.dmpNativeBridge&&"function"==typeof window.dmpNativeBridge.triggerEvent&&window.dmpNativeBridge.triggerEvent(e)}))},getEmbedderProperties(){if("function"==typeof window.dmpNativeBridge?.getEmbedderProperties&&null===this.parsedEmbedderProperties)try{this.parsedEmbedderProperties=JSON.parse(window.dmpNativeBridge.getEmbedderProperties())}catch(e){s.error("[NativeBridge] Could not retreive native embedder properties",e)}return this.parsedEmbedderProperties||{}},destroy(){this.parsedEmbedderProperties=null}},d={init(){var e=this;const t=i.Z.settings("origin");return this.origin="string"==typeof t&&-1!==t.search(/^https?:\/\//gi)?t:"*",window.addEventListener("message",(function(){return e.receiveMessage(...arguments)})),this},destroy(){window.removeEventListener("message"),this.origin=null},postMessage(e){window.DMP_INLINE_PLAYER_ROOT?window.postMessage(e,this.origin):window.parent.postMessage(e,this.origin)},receiveMessage(e){let t,a;if(e){if(window.DMP_INLINE_PLAYER_ROOT){if(e.source!==window)return}else if(e.source!==window.parent)return;if(("*"===this.origin||e.origin===this.origin)&&e.data){if("string"==typeof e.data){if(e.data.match(/^event|"event":/))return;if(e.data.match(/__cmpReturn/))return;if(e.data.match(/__tcfapiReturn/))return}if("object"!=typeof e.data||!e.data.event){if("object"==typeof e.data)({command:t,parameters:a=[]}=e.data);else if("string"==typeof e.data)try{({command:t,parameters:a=[]}=JSON.parse(e.data))}catch(i){let n;[t,n]=e.data.split("="),a=n?[n]:[]}if(t)return window.dm.nodes.main.api(t,...a),!1}}}}};var u=a(8973);const c=(0,o.jl)("API"),m=(0,o.jl)("Bootstrapper","API"),A=[u.PG,u.MH,u.ad],E=(e,t)=>{-1===A.indexOf(e)&&c.log("dispatch to player node:",e,t||""),n.dispatchEvent(window.dm.nodes.main,e,t),v&&(-1===A.indexOf(e)&&m.log("dispatch to public API:",e,t||""),p(e,t))},p=(e,t)=>{(t=Object.assign({},t))&&t.id&&c.error(`postMessage must not be called with an 'id' property: ${t.id}`);let a=null;"json"===i.Z.settings("apimode")&&(a=h(e,t)),v.postMessage(a)},h=(e,t)=>("object"!=typeof t&&(t={}),t.event=e,i.Z.settings("id")&&(t.id=i.Z.settings("id")),JSON.stringify(t)),g={nativeBridge:l,postMessage:d};let _,v;const f=()=>(_=i.Z.settings("api"),_?(c.log("Initializing player API"),v=g[_].init(),c.log(`External mode: ${_}`),v):(c.log("Player API disabled"),null))},3332:(e,t,a)=>{"use strict";a.d(t,{V:()=>n,f:()=>r});let i=!1;const n=()=>{i=!0},r=()=>i},5603:(e,t,a)=>{"use strict";a.d(t,{T:()=>o,l:()=>s});var i=a(9083),n=a(3332);const r=(0,a(7638).jl)("Bootstrapper","API"),o=(e,t)=>{let{get:a,set:i}=t;Object.defineProperty(window.dm.nodes.main,e,{get:a,set:i})},s=(e,t)=>{Object.defineProperty(window.dm.nodes.main,e,{value:function(){for(var a=arguments.length,o=new Array(a),s=0;s{"use strict";a.d(t,{Ax:()=>d,D:()=>V,DF:()=>c,E7:()=>T,EJ:()=>i,FH:()=>w,GI:()=>te,Ht:()=>C,Hx:()=>D,Kq:()=>$,LX:()=>s,MH:()=>Q,NH:()=>P,NZ:()=>x,OW:()=>h,Oc:()=>re,Om:()=>z,PE:()=>L,PG:()=>A,Qw:()=>R,Rt:()=>m,TC:()=>ae,TO:()=>l,V:()=>S,WE:()=>u,WH:()=>H,Xn:()=>E,Y7:()=>Z,Z$:()=>M,Zl:()=>oe,Zm:()=>J,aH:()=>v,ad:()=>k,bZ:()=>B,bo:()=>p,du:()=>W,eM:()=>_,fd:()=>j,h8:()=>ne,hL:()=>F,hl:()=>U,hs:()=>X,jt:()=>I,kL:()=>q,mY:()=>r,o0:()=>n,pn:()=>y,q4:()=>Y,qI:()=>K,rw:()=>ee,sj:()=>ie,tj:()=>G,uR:()=>f,uc:()=>N,ut:()=>g,wk:()=>O,yj:()=>o,zA:()=>b});const i="ad_durationchange",n="ad_end",r="ad_loaded",o="ad_bufferStart",s="ad_bufferEnd",l="ad_impression",d="ad_pause",u="ad_play",c="ad_start",m="ad_click",A="ad_timeupdate",E="ad_companions",p="ad_readytofetch",h="apiready",g="controlschange",_="debug",v="durationchange",f="end",y="error",D="gesture_end",S="gesture_start",w="info_requested",R="loadedmetadata",T="pause",P="play",I="playback_ready",L="playback_resolution",b="player_heavyadsintervention",C="player_preview_computed",N="playerstate",O="videolistchange",M="playing",k="progress",U="qualitiesavailable",x="qualitychange",V="recodisplay",H="scalemodechange",q="seeked",F="seeking",B="playbackspeedchange",G="start",Y="subtitlechange",W="subtitlesavailable",Q="timeupdate",j="videochange",K="video_durationchange",$="video_end",z="video_start",Z="volumechange",X="waiting",J="watermark_requested",ee="contentsizechange",te="pes_pip_close_requested",ae="pes_pip_expand_requested",ie="pes_pip_collapse_requested",ne="pes_pip_back_to_inline_display_requested",re="ima_ad_requested",oe="ima_ad_stopped"},2403:(e,t,a)=>{"use strict";a.d(t,{$:()=>T,AM:()=>R,AO:()=>I,Am:()=>y,CW:()=>te,Dz:()=>P,FT:()=>X,Gd:()=>ce,Gr:()=>ne,Gt:()=>j,H5:()=>le,Hr:()=>d,Ir:()=>se,Iu:()=>_e,Jv:()=>$,K$:()=>O,KO:()=>Ee,Kq:()=>he,M6:()=>N,MB:()=>M,N9:()=>me,OI:()=>ve,OO:()=>s,PE:()=>U,Sz:()=>x,T8:()=>oe,TK:()=>w,U9:()=>r,Ur:()=>Ae,YY:()=>G,ZN:()=>W,Zs:()=>ye,__:()=>z,_g:()=>S,aJ:()=>ae,bJ:()=>F,d5:()=>L,fS:()=>B,fU:()=>C,fu:()=>m,gg:()=>k,gk:()=>fe,gr:()=>c,gy:()=>Z,i7:()=>Y,iO:()=>A,jE:()=>o,jL:()=>J,jN:()=>h,jw:()=>re,l6:()=>pe,lF:()=>de,lm:()=>ue,mW:()=>q,mY:()=>f,mp:()=>V,pC:()=>ee,qB:()=>v,qP:()=>ge,sA:()=>u,tY:()=>E,w7:()=>_,wH:()=>l,xA:()=>Q,xX:()=>g,y2:()=>p,yj:()=>D,yn:()=>ie,yq:()=>K,zG:()=>b,zz:()=>H});var i=a(7465),n=a(5971);const r=(0,i.I)("API_CUST_CONFIG_CONSUMED"),o=(0,i.I)("API_SET_CUST_CONFIG"),s=(0,i.I)("API_SET_DRM_CONFIG"),l=(0,i.I)("AUTOPLAY_RESOLUTION"),d=(0,i.I)(),u=(0,i.I)("CHANGE_CURRENT_INTERACTION_MODE"),c=(0,i.I)("CHROMECAST_CHANGE_REQUESTED"),m=(0,i.I)(),A=(0,i.I)(),E=(0,i.I)(),p=(0,i.I)(),h=(0,i.I)(),g=(0,i.I)("COMPONENTS_READY"),_=(0,i.I)("CONTENT_OFFAIR"),v=(0,i.I)(),f=(0,i.I)(),y=(0,i.I)("ERROR_DISPLAY_REQUESTED"),D=(0,i.I)((e=>({...e,type:"ERROR_PLAYER",__type:e.type}))),S=(0,i.I)(),w=(0,i.I)("GDPR_CONSENT_COLLECTION_REQUESTED"),R=(0,i.I)("GDPR_CONSENT_COLLECTION_RESOLVED"),T=(0,i.I)("LIVE_EDGE_DELAY_CHANGED"),P=(0,i.I)(),I=(0,i.I)((e=>{let{videoId:t,playlistId:a,withSettings:i,videoSettings:r,...o}=e;return window.dm.perf.setLoadVideoOrigin(),{...o,type:"LOAD_VIDEO",video:t,playlist:a,videoSettings:i?(0,n.s)(r):{}}}),{interactionType:"user",withSettings:!0,videoSettings:{},isReplay:!1,isReloadingLiveAfterPause:!1,refreshRecommendations:!0,resetCurrentContent:!1}),L=(0,i.I)("PASSWORD_REQUIRED"),b=(0,i.I)("PAUSE_REQUESTED"),C=(0,i.I)("PLAYBACK_READY"),N=(0,i.I)(),O=(0,i.I)(),M=(0,i.I)("PLAY_REQUESTED"),k=(0,i.I)("QUALITIES_AVAILABLE"),U=(0,i.I)("QUALITY_CHANGED"),x=(0,i.I)(),V=(0,i.I)(),H=(0,i.I)(),q=(0,i.I)(),F=(0,i.I)(),B=(0,i.I)("SEQUENCE_ENDED"),G=(0,i.I)("SEQUENCE_READY"),Y=(0,i.I)("SEQUENCE_STARTED"),W=(0,i.I)(),Q=(0,i.I)("SPEED_CHANGE_REQUESTED"),j=(0,i.I)("STREAM_TECH_CHANGE"),K=(0,i.I)("SUGGESTED_CONTENT_SET_CUSTOM_RECOMMENDATIONS"),$=(0,i.I)("SUGGESTED_CONTENT_SET_NAV"),z=(0,i.I)("SUGGESTED_CONTENT_UPDATED"),Z=(0,i.I)(),X=(0,i.I)(),J=(0,i.I)("VIDEO_BUFFERING"),ee=(0,i.I)("METADATA_UPDATED"),te=(0,i.I)(),ae=(0,i.I)(),ie=(0,i.I)("VIDEO_DURATION_CHANGE"),ne=(0,i.I)("VIDEO_ENDED"),re=(0,i.I)("VIDEO_LOADED_DATA"),oe=(0,i.I)("VIDEO_LOADED_METADATA"),se=(0,i.I)("VIDEO_PAUSE"),le=(0,i.I)("VIDEO_PLAY"),de=(0,i.I)("VIDEO_PLAYING"),ue=(0,i.I)("VIDEO_REBUFFERING"),ce=(0,i.I)("VIDEO_SEEKED"),me=(0,i.I)("VIDEO_SEEKING"),Ae=(0,i.I)("VIDEO_SELECTED"),Ee=(0,i.I)("VIDEO_SLOT_ENDED"),pe=(0,i.I)("VIDEO_SLOT_STARTED"),he=(0,i.I)(),ge=(0,i.I)("VIDEO_STEADYPLAY"),_e=(0,i.I)("VIDEO_TIME_UPDATE"),ve=(0,i.I)("VIDEO_VOLUME_CHANGED",{interactionType:"user"}),fe=(0,i.I)(),ye=(0,i.I)()},8939:(e,t,a)=>{"use strict";a.d(t,{$V:()=>c,Pi:()=>p,RJ:()=>A,Z8:()=>h,dI:()=>m,iq:()=>E});var i=a(2279),n=a(889),r=a(1838),o=a(4947),s=a(155),l=a(5141),d=a(2816),u=a(4753);const c=e=>e.playerSize.height,m=(0,i.P1)([e=>e.playerSize.width,e=>e.playerSize.height,()=>d.KB.value],((e,t,a)=>(0,u.Ym)(e,t,a))),A=(0,i.P1)([n.yB,r.tC],((e,t)=>!e&&!1!==t)),E=(0,i.P1)([n.M$,r.Yb],((e,t)=>t?`${e}?syndication=${t}`:e)),p=(0,i.P1)([s.xf,o.De,()=>l.DM.value],((e,t,a)=>e&&!1===t&&!1===a)),h=(0,i.P1)([s.xf,o.De],((e,t)=>e&&t))},5141:(e,t,a)=>{"use strict";a.d(t,{D8:()=>m,DM:()=>s,GJ:()=>A,LZ:()=>E,VO:()=>c,Ww:()=>d,fh:()=>o,py:()=>u,vD:()=>l});var i=a(2328),n=a(2403),r=a(7022);const o=(0,i.td)(window.DMP_IS_AUTOPLAY_ENABLED??!1),s=(0,i.td)(!1),l=(0,i.td)(null),d=(0,i.td)(null),u=(0,i.td)(null),c=(0,i.td)(!1),m=(0,i.td)(null),A=(0,i.Fl)((()=>l.value===r.l_)),E=(0,i.Fl)((()=>{const e=l.value,t=d.value;return e===r.l_?t===r.xo?"allowedFallbackMuted":"allowed":t===r.u_?"rejectedInactiveTab":"rejectedByBrowser"}));n.AO?.on((e=>{let{videoSettings:t}=e;s.value=!1,l.value=null,d.value=null,c.value=!1,void 0!==t?.autoplay&&(s.value=Boolean(t.autoplay))})),n.Ur?.on((e=>{let{videoSettings:t}=e;void 0!==t?.autoplay&&(s.value=Boolean(t.autoplay))})),n.YY?.on((e=>{let{willStartImmediately:t}=e;s.value=Boolean(t)})),n.wH?.on((e=>{let{status:t,reason:a,isRealAutoplay:i}=e;l.value=t,d.value=a,u.value=t===r.l_?{status:t,reason:a}:null,c.value=i}))},7022:(e,t,a)=>{"use strict";a.d(t,{mV:()=>R,Ot:()=>T,l_:()=>g,r5:()=>v,xo:()=>f,u_:()=>D,cZ:()=>S,P$:()=>I});var i=a(7764),n=a(9083),r=a(5141),o=a(7638);const s=(0,o.jl)("Player","Autoplay");let l=null;const d=1e4,u="data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAwZtZGF03gIATGF2YzU3Ljg5LjEwMABCIAjBGDgAAAKgBgX//5zcRem95tlIt5Ys2CDZI+7veDI2NCAtIGNvcmUgMTQ4IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNyAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTQgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAM2WIhAAr//72c3wKa22wlS4Fdvdmo+XQkuX7EGD64nYPR/2Pt2VZmG6AAAFGAoOIGAtXgSEQBGCMHCEQBGCMHAAABQJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAARgABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAACKXRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAABAAAAAJAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAACgAAAAAAAEAAAAAAaFtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAADIAAAACAFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAFMbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABDHN0YmwAAACoc3RzZAAAAAAAAAABAAAAmGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABAACQAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFkAAz/4QAZZ2QADKzZQQE7ARAAAAMAEAAAAwMg8UKZYAEABmjr48siwAAAABBwYXNwAAAAAQAAAAEAAAAYc3R0cwAAAAAAAAABAAAAAQAAAgAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC2wAAAAEAAAAUc3RjbwAAAAAAAAABAAAARwAAAgN0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAAEYAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAAuAAAEAAABAAAAAAF7bWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAADABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAABJm1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAA6nN0YmwAAABqc3RzZAAAAAAAAAABAAAAWm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAAD7MFgICABRIQVuUABoCAgAECAAAAGHN0dHMAAAAAAAAAAQAAAAMAAAQAAAAAKHN0c2MAAAAAAAAAAgAAAAEAAAABAAAAAQAAAAIAAAACAAAAAQAAACBzdHN6AAAAAAAAAAAAAAADAAAAFwAAAAYAAAAGAAAAGHN0Y28AAAAAAAAAAgAAADAAAAMiAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ny43MS4xMDA=",c={ALLOWED:"Allowed",MUTED_ONLY:"MutedOnly",REJECTED:"Rejected"};function m(e){if(null!==r.D8.value)return Promise.resolve();if(l)return l;const t=e.cloneNode(!1);return window.dm.perf.metric("autoplayResolution").start(),l=function(e){return new Promise(((t,a)=>{let r,o=!1,s=!1;const l=e=>{o||(E(),a(e))},c=e=>{o||(s&&(e=f),E(),t(e))},m=e=>{if(o)return;const r=(0,n.uQ)(e.target.error);if(E(),r===i.MEDIA_ERR_SRC_NOT_SUPPORTED)t(r);else a(r)},A=t=>{if(o)return;const i=t.name||t.message||"Error";s?(E(),a(i)):(s=!0,e.pause(),p({tryMuted:!0}))},E=()=>{e.pause(),e.removeAttribute("src"),e.load(),o=!0,clearTimeout(r),e.removeEventListener("error",m)},p=t=>{let{tryMuted:a}=t;e.muted=a,e.play().then((()=>c(v)),A)};e.src=u,r=setTimeout((()=>{l(S)}),d),e.addEventListener("error",m),p({tryMuted:!1})}))}(t).then((e=>{if(null===r.D8.value){const t=e===f?c.MUTED_ONLY:c.ALLOWED,a={policy:t};t===c.ALLOWED&&(a.resolveReason=e===i.MEDIA_ERR_SRC_NOT_SUPPORTED?i.MEDIA_ERR_SRC_NOT_SUPPORTED:v),r.D8.value=a,s.log(`Browser policy: ${t}`)}return e}),(e=>{if(null===r.D8.value){const t=e instanceof Error?e.name||e.message||"Error":e??"Error";r.D8.value={policy:c.REJECTED,rejectReason:t},s.log(`Browser policy: REJECTED (both configs tested, reason: ${t})`)}throw e})).finally((()=>{window.dm.perf.metric("autoplayResolution").end(),l=null})),l}var A=a(5312),E=a(2403),p=a(7966);const h=(0,o.jl)("Player","Autoplay"),g="Resolved",_="Rejected",v="Allowed",f="MuteForced",y="AlreadyResolved",D="PageHidden",S="Timeout",w="NotAllowedError",R="AUTOPLAY_REJECTED_PAGE_HIDDEN",T="AUTOPLAY_REJECTED_PAGE_VISIBLE";function P(e,t,a,i){if("ad"!==t){window.dm.watchtower.setPlayReason(a);const t=e!==y&&i;E.wH.emit({status:g,reason:e,isRealAutoplay:i,...t?{browserPolicy:r.D8.value?.policy}:{}})}return e}async function I(){let{from:e="player",interactionType:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=window.dm.nodes.video,i=r.fh.value,n="ad"!==e&&t&&t!==A.xR,o="ad"===e||t===A.bl||!0===i||p.Hz.value.enableMute;try{if(document.hidden)throw new Error(D);if("ad"!==e&&null!==r.py.value)return h.log(`[tryAutoplay][${e}] Resolved(cache hit): ${y}`),P(y,e,t,n);if(null===r.D8.value){h.log(`[tryAutoplay][${e}] Discovering browser policy`);try{await m(a)}catch{}}const i=r.D8.value?.policy;if("ad"!==e&&t===A.xR){const a=i===c.REJECTED,s=i===c.MUTED_ONLY&&!o;if(a||s){a?h.log(`[tryAutoplay][${e}] User gesture: bypass REJECTED policy (probe: ${r.D8.value?.rejectReason??"unknown"})`):h.log(`[tryAutoplay][${e}] User gesture: bypass MUTED_ONLY (no muted fallback; probe required mute)`);return P(p.Hz.value.enableMute?f:v,e,t,n)}}if(i===c.ALLOWED){if(p.Hz.value.enableMute)return h.log(`[tryAutoplay][${e}] Resolved(policy): ALLOWED + enableMute=true → ${f}`),P(f,e,t,n);const a=r.D8.value?.resolveReason??v;return h.log(`[tryAutoplay][${e}] Resolved(policy): ${a}`),P(a,e,t,n)}if(i===c.MUTED_ONLY){if(!o)throw h.log("[tryAutoplay] Rejected: MUTED_ONLY and no muted playback path"),new Error(w);return h.log(`[tryAutoplay][${e}] Resolved(policy): ${f}`),P(f,e,t,n)}if(i===c.REJECTED){const e=r.D8.value?.rejectReason??w;throw h.log(`[tryAutoplay] Rejected(policy): ${e}`),new Error(e)}throw h.log("[tryAutoplay] Rejected: missing browser policy after discovery"),new Error(w)}catch(t){const a=t.message;throw h.log(`[tryAutoplay][${e}] Rejected: ${a}`),"ad"!==e?(E.wH.emit({status:_,reason:a,isRealAutoplay:!1,...null!=r.D8.value?{browserPolicy:r.D8.value.policy}:{}}),a===D?new Error(R):new Error(T)):t}}},4588:(e,t,a)=>{"use strict";a.d(t,{ch:()=>r,dT:()=>o,mc:()=>n});var i=a(2328);const n=(0,i.td)(!1),r=(0,i.td)(!1),o=(0,i.td)(!1)},8041:(e,t,a)=>{"use strict";a.d(t,{Zb:()=>r,ne:()=>n,yK:()=>o});const i={touch:window.DMP_SUPPORTS_TOUCH_EVENTS,nativeSdk:{}},n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;return(arguments.length>1?arguments[1]:void 0).type,e},r=e=>e.capabilities.touch,o=e=>e.capabilities.nativeSdk.capabilities||null},2051:(e,t,a)=>{"use strict";a.d(t,{M:()=>i});const i=(0,a(2328).td)([])},1399:(e,t,a)=>{"use strict";a.d(t,{Dr:()=>o,J5:()=>r,ZP:()=>n,nA:()=>s});const i={isAvailable:!1,status:"IDLE"};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CHROMECAST_NOT_AVAILABLE":return{...e,isAvailable:!1};case"CHROMECAST_READY":return{...e,isAvailable:!0};case"CHROMECAST_SESSION_STOPPED":return{...e,status:"IDLE"};case"CHROMECAST_LAUNCH_REQUESTED":return"IDLE"===e.status?{...e,status:"PRESSED"}:e;case"CHROMECAST_REMOTE_ENABLED":return{...e,status:"ACTIVE"};case"CHROMECAST_SESSION_AVAILABLE":return{...e,status:"CONNECTING"};case"CHROMECAST_CANCEL":return"PRESSED"===e.status?{...e,status:"IDLE"}:e;case"CHROMECAST_CHANGE_REQUESTED":return{...e,isAvailable:t.chromecast};default:return e}}const r=e=>e.chromecast.isAvailable,o=e=>"CONNECTING"===e.chromecast.status,s=e=>"ACTIVE"===e.chromecast.status},6294:(e,t,a)=>{"use strict";a.d(t,{z:()=>i});const i=(0,a(2328).td)(null)},3284:(e,t,a)=>{"use strict";a.d(t,{x5:()=>r,y:()=>n});var i=a(3176);const n=()=>(0,i.vQ)(i.o0),r=(e,t)=>{let{domain:a}=t;(0,i.wn)(i.o0,e,{maxAge:34128e3,domain:a})}},2606:(e,t,a)=>{"use strict";a.d(t,{p:()=>i});const i=()=>window.DMP_IS_NATIVE_APP?window.infopack.isUserUnderUsConsentLaw()?"1YYY":"1---":window.infopack.isUserUnderUsConsentLaw()?"1YNY":"1---"},2810:(e,t,a)=>{"use strict";a.d(t,{m:()=>r});var i=a(3284),n=a(6898);const r=()=>{const e=(0,i.y)();return"string"==typeof e?e:n.bs.value}},6898:(e,t,a)=>{"use strict";a.d(t,{QZ:()=>o,TS:()=>s,bs:()=>d,sI:()=>l});var i=a(2328),n=a(9977),r=a(2403);const o=(0,i.td)((()=>{const e=window.infopack?.gdprConsentDialogShouldBeDisplayed?.();if(!e)return!1;return!n.W.get("dmp_consent_fallback_shown")})()),s=(0,i.td)(null);(0,i.cE)((()=>{o.value&&n.W.set("dmp_consent_fallback_shown",!0,2592e3)}));const l=(0,i.td)(!1),d=(0,i.td)(null);r.TK.on((()=>{l.value=!0})),r.AM.on((()=>{l.value=!1}))},4977:(e,t,a)=>{"use strict";a.d(t,{Xi:()=>c,Ci:()=>m,vh:()=>A,xv:()=>E,JY:()=>_,dV:()=>g,aH:()=>v,o5:()=>h});var i=a(8721),n=a(9254),r=a(2810),o=a(2606);const s=e=>{const[t,a,i,n]=e.split("");return{version:t,..."-"===a?{}:{notice:"Y"===a},..."-"===i?{}:{sale_optout:"Y"===i},..."-"===n?{}:{lspact:"Y"===n}}};var l=a(3176),d=a(7638);const u=(0,d.jl)("Consent"),c=()=>{const e=(0,n.i5)({name:"app_consent",data:{...(0,n.gq)(),id:(0,i.Z)(),consent:{iab:{consent_string:window.infopack.getTcfConsentString()},us_privacy:s((0,r.m)()||(0,o.p)())},wording_version:3,wording_locale:window.dm.vars.effectiveLocale,consent_for:"ccpa",_testdm:(0,l.Qy)(l.vl)}});u.log("generate app_consent event for CCPA",e.data),(0,n.z2)(e,{priority:"critical"})},m=e=>{let{pb:t,pbs:a,pl:r,pls:o}=e;const s=(0,n.i5)({name:"app_consent",data:{...(0,n.gq)(),id:(0,i.Z)(),consent:{iab:{gpp:{pb:t,pbs:a,pl:r,pls:o}}},consent_for:"gpp",_testdm:(0,l.Qy)(l.vl)}});u.log("generate app_consent event for GPP",s.data),(0,n.z2)(s,{priority:"critical"})},A=()=>{(0,n.z2)(p(window.infopack.getTcfConsentString(),!0))},E=()=>{(0,n.z2)(p(window.infopack.getTcfConsentString()))},p=(e,t,a)=>(0,n.i5)({name:"app_consent",data:{...(0,n.gq)(),id:(0,i.Z)(),consent:{iab:{consent_string:e,comes_from_infopack:t,gvl_error:a}},wording_version:3,wording_locale:window.dm.vars.effectiveLocale,consent_for:"gdpr",_testdm:(0,l.Qy)(l.vl)}}),h=(e,t,a)=>{const r=(0,n.i5)({name:"consent_monitoring",data:{...(0,n.gq)(),id:(0,i.Z)(),monitoring:{tcfapi_locator:e,tcf_policy_version:t,gpp_locator:a}}});(0,n.z2)(r,{priority:"critical"})},g=()=>{(0,n.z2)((0,n.CT)({component:{type:"consentDialog"}}))},_=()=>{(0,n.z2)((0,n.hM)({component:{type:"consentDialog"},action:{gesture:"click",ui_element:"consent_dialog_dismiss_button",uuid:(0,i.Z)()}}))},v=()=>{(0,n.z2)((0,n.hM)({component:{type:"consentDialog"},action:{gesture:"click",ui_element:"consent_dialog_learn_more_link",uuid:(0,i.Z)()}}))}},4934:(e,t,a)=>{"use strict";a.d(t,{Gq:()=>d,EQ:()=>l});const i={playbackSize:{minPx:64,maxPx:80,minRem:4,deltaRem:1,cssVar:"--controls-playback-size"},playbackSvgSize:{minPx:48,maxPx:64,minRem:3,deltaRem:1,cssVar:"--controls-playback-svg-size"},prevNextSize:{minPx:48,maxPx:64,minRem:3,deltaRem:1,cssVar:"--controls-prev-next-size"},prevNextSvgSize:{minPx:32,maxPx:48,minRem:2,deltaRem:1,cssVar:"--controls-prev-next-svg-size"},iconButtonSize:{minPx:40,maxPx:48,minRem:2.5,deltaRem:.5,cssVar:"--controls-icon-button-size"},iconSvgSize:{minPx:24,maxPx:32,minRem:1.5,deltaRem:.5,cssVar:"--controls-icon-svg-size"},centerGap:{minPx:24,maxPx:48,minRem:1.5,deltaRem:1.5,cssVar:"--controls-center-gap"},barGap:{minPx:4,maxPx:8,minRem:.25,deltaRem:.25,cssVar:"--vod-bottom-row-gap"},bottomCenterMargin:{minPx:10,maxPx:12,minRem:.625,deltaRem:.125,cssVar:"--controls-bottom-center-margin-h"},volumeTrackLength:{minPx:72,maxPx:92,minRem:4.5,deltaRem:1.25,cssVar:"--controls-volume-track-length"},volumeExpandedPaddingTop:{minPx:16,maxPx:20,minRem:1,deltaRem:.25,cssVar:"--controls-volume-expanded-padding-top"}};var n=a(4753);const r=(e,t,a,i)=>(0,n.Qm)({width:e,height:t,minPx:a,maxPx:i,minArea:n.CC,maxArea:n.wH}),o=(e,t,a)=>{let{canShowSubtitlesToggle:i,showFullscreen:n}=a;const r=1+Number(n)+Number(i),o=Math.round(t/2),s=t+e;return Math.round(o+e+(r-1)*s+o)},s=e=>{let{playerWidth:t,barGapPx:a,bottomCenterMarginPx:i,leftColumnPx:n,bottomRightWidthPx:r}=e;return t-r-n-2*i-2*a},l=function(e,t){let{verticalLayout:a=!1,showMoreContent:l=!0,showFullscreen:d=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{playbackSize:u,prevNextSize:c,iconButtonSize:m,centerGap:A,barGap:E,bottomCenterMargin:p}=i,h=r(e,t,u.minPx,u.maxPx),g=r(e,t,c.minPx,c.maxPx),_=r(e,t,A.minPx,A.maxPx),v=r(e,t,m.minPx,m.maxPx),f=r(e,t,E.minPx,E.maxPx),y=r(e,t,p.minPx,p.maxPx),D=(0,n.pk)(e,t);let S=D,w=D&&l,R=w?v+f:0,T=a?v:o(v,f,{canShowSubtitlesToggle:S,showFullscreen:d}),P=s({playerWidth:e,barGapPx:f,bottomCenterMarginPx:y,leftColumnPx:R,bottomRightWidthPx:T});!a&&S&&P<48&&(S=!1,T=o(v,f,{canShowSubtitlesToggle:!1,showFullscreen:d}),P=s({playerWidth:e,barGapPx:f,bottomCenterMarginPx:y,leftColumnPx:R,bottomRightWidthPx:T})),l&&w&&P<48&&(w=!1,R=0,P=s({playerWidth:e,barGapPx:f,bottomCenterMarginPx:y,leftColumnPx:R,bottomRightWidthPx:T}));const I=(0,n.Ym)(e,t,a);return{bottomRightWidthPx:T,isSideAtLeast180:D,canShowSubtitlesToggle:S,canShowMoreContent:w,canShowPrevNext:!(2*g+h+2*_>e||I),canShowSeekRowTrailing:!(P<96||I)}},d=(e,t)=>{if(!e)return;const a=t.bottomRightWidthPx/16+"rem";e.style.getPropertyValue("--controls-bottom-right-width")!==a&&e.style.setProperty("--controls-bottom-right-width",a)}},4105:(e,t,a)=>{"use strict";a.d(t,{Jt:()=>m,Mr:()=>c,Sc:()=>u,Zn:()=>s,hd:()=>o});var i=a(2328),n=a(4754),r=a(2403);const o=(0,i.td)(null),s=(0,i.td)(!1),l=new Map;let d=1e3;const u=e=>{d=e},c=e=>new Promise(((t,a)=>{const i=setTimeout((()=>{l.delete(e),a(new Error(`DRM token request timed out (requestId: ${e})`))}),d);l.set(e,(e=>{clearTimeout(i),t(e)})),(0,n.bd)("playerDrmTokenRequest",{requestId:e})})),m=(e,t)=>{const a=l.get(e);a&&(l.delete(e),a(t))};r.OO?.on((e=>{let{drmConfig:t}=e;o.value=t?.token??null,s.value=!0}))},432:(e,t,a)=>{"use strict";a.d(t,{O:()=>r});var i=a(2279),n=a(4116);const r=(0,i.P1)([n.pz],(e=>!!e))},1216:(e,t,a)=>{"use strict";a.d(t,{X:()=>r,Z:()=>n});const i={data:null,displayedTitle:"",displayedMessage:""};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ERROR_PLAYER":return{...e,data:{from:t.from,type:t.__type,code:t.code,extra:t.extra,title:t.title,message:t.message}};case"ERROR_DISPLAYED":return{...e,displayedTitle:t.displayedTitle,displayedMessage:t.displayedMessage};case"LOAD_VIDEO":case"VIDEO_PLAYING":return i;default:return e}}const r=e=>e.error.data},4066:(e,t,a)=>{"use strict";a.d(t,{Uy:()=>n,eH:()=>s,sn:()=>o,vH:()=>r});var i=a(2279);const n=e=>{const{data:t}=e.error;return t?t.code:null},r=e=>{const{data:t}=e.error;return t?t.type:null},o=(0,i.P1)([e=>e.error.displayedTitle,e=>e.error.displayedMessage],((e,t)=>!(!e&&!t))),s=e=>null!==e?.error?.data?{title:e.error.displayedTitle,message:e.error.displayedMessage,code:e.error.data.code}:null},2845:(e,t,a)=>{"use strict";let i;a.d(t,{D:()=>n,u:()=>r});const n=e=>{i=e},r=()=>i},1303:(e,t,a)=>{"use strict";function i(e){let{url:t,payload:a,useBeacon:i}=e;return new Promise(((e,n)=>{let r="";try{r=JSON.stringify(a)}catch(e){return void n(new Error(`Could not encode payload (${e.message})`))}e(function(e,t,a,i){return i?window.navigator.sendBeacon(e,t):fetch(e,{headers:a,method:"POST",body:t})}(t,r,{"Content-Type":"text/plain; charset=UTF-8"},i))}))}function n(e){const t=`Failed to post to event bus: ${e.message}`;throw new Error(t)}async function r(e){if(200!==e.status)throw new Error(`Invalid Edward code: ${e.status}`);const t=await e.json();if("nok"===t.status){let e=`Invalid Edward response: ${t.error_code}`;throw t.error_message&&(e=`${e} - ${t.error_message}`),new Error(e)}return t.message}a.d(t,{UD:()=>u,z2:()=>c});var o=a(7638);const s=(0,o.jl)("Stats","Emitter"),l=(0,o.jl)("Stats","EventBus"),d={critical:1,high:.7,medium:.5,low:.3,trivial:.1};const u=new class{constructor(e){this.channelName="player",this.emissionMinDelay=50,this.emissionMaxDelay=5e3,this.listeners={},this._resetEmissionState(!0),this.updateConf(e)}_emit(e){let{url:t,payload:a,callback:o,useBeacon:s}=e;i({url:t,payload:a,useBeacon:s}).catch(n).then(r).then((e=>o({ok:!0,message:e}))).catch((e=>o({ok:!1,message:e.message})))}updateConf(){let{endpointURL:e,v1st:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.v1st=t||this.v1st,this.endpointURL=e||this.endpointURL}send(e){let{priority:t,update:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=e.data.created_ts;this._queueEvent(e,a),this._scheduleNextEmission(this._getNextEmissionDelay(i,t))}_queueEvent(e,t){t&&(this.eventsQueue=this.eventsQueue.filter((t=>t.name!==e.name))),this.eventsQueue.push(e)}_getNextEmissionDelay(e,t){let a=0;const i=this.lastEmissionTime?e-this.lastEmissionTime:-1,n=null!=d[t]?d[t]:d.trivial;return this.emissionWeight+=n,this.emissionWeight>=1?i>0&&i0?(clearTimeout(this.emissionTimer),this.emissionTimer=setTimeout((()=>this._sendEvents()),e)):this._sendEvents()}_sendEvents(){this.eventsQueue&&this.eventsQueue.length&&(clearTimeout(this.immediateTimeout),this.immediateTimeout=setTimeout((()=>this._emitEvents()),0))}_emitEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=Date.now(),a=this._buildPayload(t);s.log(`Send batch of ${a.events.length} event to ${this.endpointURL} (${a.events.map((e=>e.name))})`,a),this._emit({url:this.endpointURL,payload:a,callback:this._handleEmitterResponse,useBeacon:e}),this._resetEmissionState()}_buildPayload(e){return{channel:this.channelName,edward:"1.1",sent_ts:e,v1st:this.v1st,events:this.eventsQueue,stack_ctx:{player_stack:"noworker"}}}_handleEmitterResponse(e){e.ok?s.log("Response: ok"):s.warn(`Error: ${e.message}`)}_resetEmissionState(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||(this.lastEmissionTime=Date.now()),this.eventsQueue=[],this.emissionWeight=0,clearTimeout(this.emissionTimer),this.emissionTimer=null}},c=(e,t)=>{u.updateConf({endpointURL:window.DMP_EVENTBUS_URL,v1st:window.DMP_V1ST}),e=window.dmp_removeUselessKeys(e),l.log(`send ${e.name} event`,e),u.send(e,t)}},9254:(e,t,a)=>{"use strict";a.d(t,{CT:()=>l,cC:()=>r.cC,gq:()=>r.gq,hM:()=>d,i5:()=>m,z2:()=>n.z2});var i=a(8721),n=a(1303),r=a(8974),o=a(6473),s=a(889);const l=e=>{let{screen:t=c(),section:a,component:i}=e;return m({name:"ui_display",data:{...(0,r.gq)(),screen:t,section:a,component:i}})},d=e=>{let{screen:t=c(),section:a,component:i,action:n}=e;return m({name:"ui_action",data:{...(0,r.gq)(),screen:t,section:a,component:i,action:n}})},u=(0,i.Z)(),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.bh)().getState();const{screen:t}=window.DMP_NEON_TRACKING_DATA;return t||{id:u,name:"player",xid:(0,s.o7)(e)}},m=e=>{let{name:t,data:a}=e;return{name:t,version:"1.0",data:{created_ts:Date.now(),...a}}}},7006:(e,t,a)=>{"use strict";a.d(t,{P:()=>r});var i=a(2279),n=a(1402);const r=(0,i.P1)([n.H6,n.fQ,n.co],((e,t,a)=>e?t?"pip_expanded":a?"pip_collapsed":"pip_corner":"regular"))},8974:(e,t,a)=>{"use strict";a.d(t,{gq:()=>v,cC:()=>T,Au:()=>S});var i=a(3692),n=a(7966),r=a(3579),o=a(6473),s=a(6785),l=a(7006),d=a(3511);const u=()=>{const{player:e}=window.__PLAYER_CONFIG__;if(!e)return null;const t={};return window.DMP_PLAYER_SETTINGS.forEach((a=>{let{key:i,trackableKey:n}=a;null!==n&&(t[n]=e[i])})),t};var c=a(6918);var m=a(1838),A=a(889),E=a(5268),p=a(2689),h=a(8499),g=a(2845),_=a(5141);const v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.bh)().getState();const{screen:t,action:a}=window.DMP_NEON_TRACKING_DATA;return{screen:t,action:(0,g.u)()||a,context:f(),info:y(e),metadata:T(e),..._.vD.value?{real_autoplay:_.VO.value}:{},settings:P(e),view_id:window.dmp_getViewIdForVideoIndex(),empty_player:window.DMP_IS_EMPTY_PLAYER,timestamp:{delta_time_origin:Math.floor(performance.now()),delta_time_origin_pes:window.DMP_IS_PES?window.dm.perf.getRelativeTimeSincePlayerOrigin():null,delta_time_load_video:window.dm.perf.getRelativeTimeSinceLoadVideo()}}},f=()=>({screen:`${window.screen.availWidth}x${window.screen.availHeight}`,visitor_group:window.DMP_VISITOR_GROUP}),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.bh)().getState();const{info:t}=function(){let{state:e=(0,o.bh)().getState(),context:t=window.__PLAYER_CONFIG__.context}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{os_family:a,os_name:m,type:A,ua_family:E,ua_name:p,ua_version:h}=t.device,{as_number:g,continent:_,country:v,envFrontend:f,http_x_requested_with:y,reader_id:D,region:S}=t,{source:w}=i.Z.get().suggestedContent,R=(0,d.Y1)(e),T=window.dm.nodes.main;return{info:{visitor:{id:window.DMP_V1ST,user_xid:D,traffic_segment:window.DMP_TS,as_number:g,continent:_,country:v,region:S,referer:window.DMP_REFERER,onsite:window.DMP_ONSITE,timezone_offset:(0,c.pQ)()},player:{type:"photon",version:window.dm.vars.playerVersion,env:f,embedder:window.DMP_EMBEDDER,embedder_hostname:i.Z.getEmbedderHostname(),instance_uuid:window.DMP_INSTANCE_UUID,topdomain:window.DMP_TOPDOMAIN||null,x_requested_with:y,is_inline:Boolean(window.DMP_INLINE_PLAYER_ROOT),config:u()},view:{collection_xid:w?.xid&&(w?.embed||R>0)?w?.xid:null,queue_mode:w?.mode||"deactivated",video_index:r.t.value,width:T.offsetWidth,height:T.offsetHeight,is_fullscreen:s._.value,display_mode:n.W3.value?"regular":(0,l.P)(e)},browser:{user_agent:window.navigator.userAgent,os_family:a,os_name:m,ua_family:E,ua_name:p,ua_version:h,locale:window.dm.vars.effectiveLocale,cookies_available:window.DMP_COOKIES_3RD_PARTY_AVAILABLE},app:{id:window.DMP_APP,type:window.DMP_CLIENT_TYPE,is_native:window.DMP_IS_NATIVE_APP,sdk_version:window.DMP_SDK_VERSION},device:{type:A,width:window.DMP_VIEWPORT_SIZE?Math.max(0,window.DMP_VIEWPORT_SIZE.width):null,height:window.DMP_VIEWPORT_SIZE?Math.max(0,window.DMP_VIEWPORT_SIZE.height):null},publisher:{xid:window.DMP_PUBLISHER.xid,type:window.DMP_PUBLISHER.type}}}}({state:e}),{info:a={}}=window.DMP_NEON_TRACKING_DATA,{app:m,device:A,visitor:E}=t,{app:p,landing:g,visitor:_}=a;return{...t,app:{...m,...p},device:{...A},player:{...t.player,config:u(),pes_integration_type:window.DMP_PES_INTEGRATION_TYPE},view:{...t.view,volume:n.W3.value?10:(0,h.C0)(e),is_active_tab:"visible"===document.visibilityState},landing:g,visitor:{...E,..._}}};let D=null;const S=e=>{D=e},w=()=>{const{episode_id:e,info:t,owner:a,infra:i,stream:n,is_private:r,private:o}=E.Ox.value;return{duration:t?.duration||0,id:e||null,stream_type:n?.stream_type||null,owner_id:a?a.id:null,owner_parent_id:a?.parent?.id,protected_delivery:i?.is_protected_delivery||!1,is_password_protected:t?.is_password_protected||!1,is_private:Boolean(t?.is_private||r||o),media_type:t?.media_type||null}},R=e=>({duration:(0,A.xj)(e),id:(0,A.o7)(e),stream_type:(0,A.bI)(e),owner_id:(0,A.wD)(e),owner_parent_id:(0,A.pJ)(e),protected_delivery:(0,A.tw)(e),is_password_protected:(0,A.vT)(e),is_private:(0,A.ek)(e),media_type:(0,A.vX)(e)}),T=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.bh)().getState();return{...n.W3.value?w():R(e),is_critical:window.DMP_IS_CRITICAL_METADATA||!1,is_geo_cached:window.DMP_IS_GEO_METADATA_CACHED||!1,stream_tech:p.Kk.value,mime_type:p.R_.value,cell:D}},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.bh)().getState();const t=n.W3.value;return{api:String(t?i.Z.settings("api")||!1:(0,m.bW)(e)),app:window.DMP_APP,autoplay:_.fh.value||!1,controls:i.Z.settings("controls"),pubtool:window.DMP_PUBTOOL,embed_index:t?i.Z.settings("embed_index")||null:(0,m.Ym)(e)}}},1644:(e,t,a)=>{"use strict";a.d(t,{Z:()=>r});var i=a(2772);let n=null;const r={saveCurrentFullscreenAPI(e){n=e},getViewMode:()=>n?.isFullscreen()?i.d.FULLSCREEN:i.d.NORMAL}},6785:(e,t,a)=>{"use strict";a.d(t,{A:()=>n,_:()=>r});var i=a(2328);const n=(0,i.td)(!1),r=(0,i.td)(!1)},2772:(e,t,a)=>{"use strict";a.d(t,{d:()=>i});const i={NORMAL:"normal",FULLSCREEN:"fullscreen"}},9487:(e,t,a)=>{"use strict";a.d(t,{S:()=>r,Z:()=>n});const i={current:"desktop",currentFrom:"default"};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;return"CHANGE_CURRENT_INTERACTION_MODE"===t.type?{...e,current:t.isTouch?"touch":"desktop",currentFrom:t.from}:e}const r=e=>"touch"===e.interactionMode.current},5525:(e,t,a)=>{"use strict";a.d(t,{AG:()=>h,MN:()=>f,O$:()=>v,Ss:()=>p,VI:()=>T,Yz:()=>R,Z0:()=>y,e_:()=>_,ez:()=>S,mm:()=>D,xR:()=>g});var i=a(3579),n=a(9083),r=a(6473),o=a(3511),s=a(8323),l=a(889),d=a(6649),u=a(4645),c=a(9254),m=a(9371);let A=!1,E=null;const p=()=>{const e=T("videoStart");(0,c.z2)(e,{priority:"critical"})},h=()=>{const e=T("videoEnd",L());(0,c.z2)(e)},g=e=>{const t="undefined"!=typeof window?window.dm?.perf:void 0,a=t?.hlsMasterPlaylistLoad?.duration,i=t?.hlsMediaPlaylistLoad?.duration,n=T("videoPlaying",{...e,master_manifest_load_duration:a,level_manifest_load_duration:i});(0,c.z2)(n)},_=e=>{let{startTimeData:t,playbackTime:a}=e;const i=T("videoTimeupdate1st",{...t,time:(0,s.WB)(a)});(0,c.z2)(i,{priority:"critical"})},v=()=>{A=!1;const e=(0,r.bh)().getState(),t=T("loadVideo",(0,o.IT)(e)?I():void 0);(0,c.z2)(t)},f=e=>{let{code:t,from:a,message:i,extra:r}=e;const o=window.DMP_FETCH_METADATA_END_TIME;o&&(r||(r={}),r.metadataRequestAge=Date.now()-o);const s=T("errorPlayer",{error_from:a,error_displayed:!(0,n.kt)(t),..."metadata"===a?{}:{error_message:"string"==typeof i?i:i?.message},...t?{error_code:String(t)}:{},...r?{error_details:r}:{}});(0,c.z2)(s)},y=e=>{let{interactionType:t,restStats:a,state:n=(0,r.bh)().getState()}=e,s=(0,o.I5)(n);!s&&0===i.t.value&&window.DMP_INITIAL_FETCH_METADATA_START_TIME&&(s=window.DMP_INITIAL_FETCH_METADATA_START_TIME);const{metadata_load_start:l,metadata_load_end:d}=window.dm.perf.getEventBusPayload().iframe_custom,u=T("videoSelected",{...P(a),...t?{interaction_type:t}:{},...s?{metadata_load_duration:Date.now()-s}:{},metadata_load_retries:window.DMP_LOAD_METADATA_RETRY_COUNT,metadata_load_start:l,metadata_load_end:d});A=!0,E&&w(),(0,c.z2)(u)},D=e=>{let{status:t,reason:a,isRealAutoplay:i,browserPolicy:n}=e;const r=T("autoplayResolution",{resolution_status:t,resolution_reason:a,resolution_duration:window.dm.perf.metric("autoplayResolution").duration,real_autoplay:i,...void 0!==n?{browser_policy:n}:{}});(0,c.z2)(r)},S=()=>{const e=T("vmapReceived",{response_time:window.dm.perf.metric("vmapLoad").duration,parallel_ad_calls_enabled:(0,m.s7)()});A?((0,c.z2)(e),A=!1):E=e},w=()=>{E.data.metadata=(0,c.cC)(),(0,c.z2)(E),E=null},R=()=>{const e=T("initEnd",{perf:window.dm.perf.getEventBusPayload()});(0,c.z2)(e)},T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,c.i5)({name:`life_cycle.${e}`,data:{...(0,c.gq)(),...t}})},P=e=>null===e||"object"!=typeof e?{}:{rest:{query:{duration:e.queryDuration||null,is_critical_metadata:window.DMP_IS_CRITICAL_METADATA||!1,is_geo_metadata_cached:window.DMP_IS_GEO_METADATA_CACHED||!1}}},I=()=>({playback_time:(0,s.WB)(d.wD.value)}),L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.bh)().getState();return{channel:(0,l.Pc)(e)||"",explicit:(0,l.MZ)(e),owner_username:(0,l.q$)(e)||"",partner:(0,l.PW)(e),player_width:(0,u.Vm)(e),repost:!1,verified:(0,l.yk)(e)}}},5260:(e,t,a)=>{"use strict";a.d(t,{$:()=>l,H:()=>o});var i=a(2403),n=a(4977);const r=(0,a(7638).jl)("Infopack"),o="CONSENT_REQUIRED";let s=!1;const l=()=>{if(window.infopack.isGppListened()){const e={};window.infopack.getGppConsentStringFromPublisher().length&&(e.pb=window.infopack.getGppConsentStringFromPublisher()),window.infopack.applicableSectionsIsSet(window.infopack.getGppApplicableSectionsFromPublisher())&&(e.pbs=window.infopack.getGppApplicableSectionsFromPublisher()),window.infopack.getGppConsentStringFromPlayer().length&&(e.pl=window.infopack.getGppConsentStringFromPlayer()),window.infopack.applicableSectionsIsSet(window.infopack.getGppApplicableSectionsFromPlayer())&&(e.pls=window.infopack.getGppApplicableSectionsFromPlayer()),(0,n.Ci)(e),r.log("Gpp payload send to app_consent: ",e)}return window.infopack.isEnabledForTcf()?window.infopack.getTcfConsentString()?((0,n.vh)(),Promise.resolve()):(i.TK.emit(),window.infopack.collectConsentForTcf().then((()=>{(0,n.vh)(),i.AM.emit()})),new Promise((e=>{const t=i.AM.on((()=>{t(),e()}))}))):window.infopack.gdprConsentDialogShouldBeDisplayed()&&!s?(s=!0,(0,n.xv)(),window.infopack.getTcfConsentString()?Promise.resolve():Promise.reject(new Error(o))):Promise.resolve()}},4265:(e,t,a)=>{"use strict";a.d(t,{Yf:()=>l,Zo:()=>A,eQ:()=>c,kb:()=>m,mj:()=>d});var i=a(2328),n=a(2403),r=a(6649),o=a(5268),s=a(2816);const l=(0,i.td)(!1),d=(0,i.td)(!1),u=(0,i.td)(null),c=(0,i.td)(0),m=(0,i.Fl)((()=>{const e=u.value,t=r.wD.value,a=r.FC.value;return null!==e&&t>a-e})),A=(0,i.Fl)((()=>!s.vx.value&&(o.H2.value||d.value)));n.AO?.on((e=>{let{isReloadingLiveAfterPause:t=!1}=e;d.value=!1,t||(c.value=0)})),n.w7?.on((()=>{d.value=!0})),n.$?.on((e=>{let{delay:t}=e;u.value=t})),n.yj?.on((()=>{l.value=!1})),n.jw?.on((()=>{l.value=!0}))},889:(e,t,a)=>{"use strict";a.d(t,{$d:()=>c,$f:()=>b,EI:()=>g,FW:()=>u,GH:()=>W,Gx:()=>E,Ie:()=>ne,KC:()=>L,Kz:()=>x,M$:()=>C,MZ:()=>te,NT:()=>h,PW:()=>ae,Pc:()=>ee,SN:()=>A,Te:()=>Z,Tg:()=>oe,V$:()=>J,Vv:()=>le,W3:()=>N,YK:()=>j,YV:()=>V,Yb:()=>P,ZP:()=>s,Zb:()=>de,_T:()=>I,bI:()=>w,bL:()=>se,cr:()=>re,cw:()=>Q,db:()=>D,ek:()=>$,gE:()=>f,gp:()=>U,hK:()=>q,hg:()=>H,nf:()=>S,o7:()=>p,pJ:()=>B,q$:()=>G,rb:()=>Y,sO:()=>y,tw:()=>z,v8:()=>T,vT:()=>X,vX:()=>_,wD:()=>F,wc:()=>m,wq:()=>O,xj:()=>K,yB:()=>R,yk:()=>ie});var i=a(5312),n=a(4828),r=a(9383),o=a(2689);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOAD_VIDEO":return t.video===e.access_id&&t.interactionType===i.xR?e:{...e.info?{info:e.info}:{},...e.features?{features:e.features}:{}};case"VIDEO_SELECTED":case"CONTENT_OFFAIR":case"METADATA_UPDATED":return t.metadata;case"ERROR_PLAYER":return"metadata"===t.from&&t.extra&&t.extra.metadata?t.extra.metadata:e;default:return e}}const l={screenname:"",url:null,id:null},d={},u=e=>e.metadata,c=e=>e.metadata.access_id||null,m=e=>e.metadata.end_time||0,A=e=>e.metadata.media?.filmstrip_url||null,E=e=>e.metadata.media?.seeker_url||null,p=e=>e.metadata.id||null,h=e=>null!==p(e)&&!(e=>(e=>{const{error:t}=e;return"object"==typeof t&&403===t.status_code})(e.metadata))(e),g=e=>e.metadata.info?.live_dvr_window||0,_=e=>e.metadata.info?.media_type||null,v=e=>e.metadata&&e.metadata.owner||l,f=e=>e.metadata.sharing||[],y=e=>e.metadata.start_time||null,D=e=>null!==y(e),S=e=>e.metadata.error||null,w=e=>e.metadata.stream?.stream_type||null,R=e=>"live"===w(e)||!1,T=e=>"recorded"===w(e)||!0,P=e=>e.metadata.subtitles?.data||{},I=e=>e.metadata.info?.title||"",L=e=>e.metadata.media?.watermark?.image_url||null,b=e=>e.metadata.media?.watermark?.link_url||null,C=e=>e.metadata.info?.url||null,N=e=>e.metadata.advertising||{},O=e=>N(e).custom_target||null,M=e=>e.metadata.reporting||{},k=e=>M(e).ias||{},U=e=>k(e).anid||null,x=e=>k(e).partner||null,V=e=>M(e).nielsen||n.X8,H=e=>e.metadata.info?.has_live_show_viewers||null,q=e=>e.metadata.info?.aspect_ratio||null,F=e=>v(e).id,B=e=>v(e).parent?.id,G=e=>v(e).username,Y=e=>v(e).screenname,W=e=>v(e).url,Q=e=>v(e).avatars||null,j=e=>e.metadata.media?.thumbnails_url||e.metadata.media?.posters_url||d,K=e=>e.metadata.info?.duration||0,$=e=>Boolean(e.metadata.info?.is_private||e.metadata.is_private||e.metadata.private),z=e=>e.metadata.infra?.is_protected_delivery||!1,Z=e=>e.metadata.info?.created_at||0,X=e=>e.metadata.info?.is_password_protected||!1,J=e=>e.metadata.stream?.url||null,ee=e=>e.metadata.category?.name||null,te=e=>e.metadata.info?.is_explicit||!1,ae=e=>e.metadata.info?.is_partner,ie=e=>e.metadata.info?.is_verified||!1,ne=e=>e.metadata.info?.is_created_for_kids,re=e=>e.metadata.info?.detected_language||"",oe=e=>e.metadata.attention_peaks,se=e=>!0===e.metadata.features?.has_attention_peaks,le=e=>e.metadata.media?.chapters_url||null,de=e=>(0,r.X)(e.metadata.stream?.formats,o.gX.value,o.WK.value)},5268:(e,t,a)=>{"use strict";a.d(t,{Di:()=>s,H2:()=>l,Ox:()=>o,WG:()=>m,Z0:()=>u,a_:()=>c,dv:()=>A,gH:()=>d});var i=a(2328),n=a(5312),r=a(2403);const o=(0,i.td)({}),s=(0,i.td)(!1),l=(0,i.Fl)((()=>"live"===o.value.stream?.stream_type)),d=(0,i.Fl)((()=>o.value.end_time??0)),u=(0,i.Fl)((()=>o.value.start_time??null)),c=(0,i.Fl)((()=>o.value.access_id??null)),m=(0,i.Fl)((()=>o.value.episode_id??null)),A=(0,i.Fl)((()=>o.value.info?.live_audience_url??null));r.AO?.on((e=>{let{videoId:t,episodeId:a,interactionType:i}=e;s.value=!0;const r=o.value;(a?a===r.episode_id:t===r.access_id)&&i===n.xR||(o.value={...r.info?{info:r.info}:{},...r.features?{features:r.features}:{}})})),r.Ur?.on((e=>{let{metadata:t}=e;s.value=!1,o.value=t})),r.w7?.on((e=>{let{metadata:t}=e;s.value=!1,o.value=t})),r.pC?.on((e=>{let{metadata:t}=e;s.value=!1,o.value=t})),r.yj?.on((e=>{let{from:t,extra:a}=e;s.value=!1,"metadata"===t&&a?.metadata&&(o.value=a.metadata)}))},9383:(e,t,a)=>{"use strict";a.d(t,{X:()=>i});const i=(e,t,a)=>{const i=e||{},n="Auto"!==t&&"Eco"!==t?t:a;return i.all??i[n]??null}},4828:(e,t,a)=>{"use strict";a.d(t,{Ac:()=>s,L3:()=>o,TH:()=>i,X8:()=>n});const i="dmPlayerWebSdkInstance",n="c11",r=()=>{const e={appId:"P5C5A2950-D9C6-4316-9D7E-D94FE4DC6F10",instanceName:i};return window.DMP_IS_NATIVE_APP&&("androidapp"===window.DMP_CLIENT_TYPE?.toLowerCase()||"androidtabletapp"===window.DMP_CLIENT_TYPE?.toLowerCase()?(e.appId="PBD45602A-03E9-4B7D-B292-AEDE49434920",e.instanceName="dmPlayerAndroidSdkInstance"):"iosapp"!==window.DMP_CLIENT_TYPE?.toLowerCase()&&"ipadosapp"!==window.DMP_CLIENT_TYPE?.toLowerCase()||(e.appId="P930D0D76-E283-4317-AE43-AF28F4DA990D",e.instanceName="dmPlayerIosSdkInstance")),e},o=r().appId,s=r().instanceName},6157:(e,t,a)=>{"use strict";a.d(t,{N:()=>o,m:()=>r});var i=a(2328),n=a(2403);const r=(0,i.td)(!1),o=(0,i.td)(null);n.AO.on((()=>{r.value=!1,o.value=null})),n.d5.on((e=>{let{id:t}=e;r.value=!0,o.value=t})),n.Ur.on((()=>{r.value=!1}))},1402:(e,t,a)=>{"use strict";a.d(t,{$e:()=>p,Bx:()=>E,Cb:()=>l,DJ:()=>d,F$:()=>c,H6:()=>i,LM:()=>m,WI:()=>o,co:()=>n,fQ:()=>r,pO:()=>A,v_:()=>u,x$:()=>s});const i=e=>e.pesPip.isRunning,n=e=>e.pesPip.isSmallViewportDisplay,r=e=>e.pesPip.isExpanded,o=e=>e.pesPip.hasPipBanner,s=e=>e.pesPip.uiActionOrigin,l=e=>e.pesPip.screenId,d=e=>e.pesPip.hasRequestedPipNative,u=e=>n(e)&&!r(e),c=e=>e.pesPip.isPipCustomPosition,m=e=>e.pesPip.pipPositionX,A=e=>e.pesPip.pipPositionY,E=e=>e.pesPip.pipTransformSmallViewportCollapsed,p=e=>e.pesPip.playerIsInViewport},4755:(e,t,a)=>{"use strict";a.d(t,{C:()=>i});const i=(0,a(2328).td)(!1)},4947:(e,t,a)=>{"use strict";a.d(t,{De:()=>o,O5:()=>r,ZP:()=>n,aC:()=>s,kc:()=>l});const i={isAdBreakRunning:!1,videoDuration:0,videoHasPlayedOnce:!1,isReady:!1,playbackRequest:null,hasLoadedData:!1,hasLoadedMetadata:!1};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOAD_VIDEO":return{...i,playbackRequest:t.videoSettings.autoplay?"play_requested":i.playbackRequest};case"SEQUENCE_READY":return{...e,playbackRequest:t.willStartImmediately?"play_requested":i.playbackRequest};case"PLAY_REQUESTED":return{...e,playbackRequest:"play_requested"};case"PAUSE_REQUESTED":return{...e,playbackRequest:"pause_requested"};case"VIDEO_PLAYING":return{...e,videoHasPlayedOnce:!0,playbackRequest:null};case"VIDEO_PAUSE":return{...e,playbackRequest:null};case"VIDEO_DURATION_CHANGE":return e.isAdBreakRunning?e:{...e,videoDuration:t.duration||0};case"AD_LINEAR_WILL_START":return{...e,isAdBreakRunning:!0};case"AD_LINEAR_BREAK_ENDED":return{...e,isAdBreakRunning:!1};case"VIDEO_LOADED_DATA":return{...e,hasLoadedData:!0};case"VIDEO_LOADED_METADATA":return{...e,hasLoadedMetadata:!0};case"PLAYBACK_READY":return{...e,isReady:!0};default:return e}}const r=e=>e.playback.videoDuration,o=e=>e.playback.videoHasPlayedOnce,s=e=>e.playback.hasLoadedMetadata,l=e=>e.playback.isReady},6649:(e,t,a)=>{"use strict";a.d(t,{FC:()=>p,HG:()=>R,Hf:()=>h,L8:()=>u,Ql:()=>s,SK:()=>m,UU:()=>E,Ws:()=>_,ZL:()=>w,Zz:()=>T,au:()=>c,gu:()=>g,hM:()=>v,nJ:()=>S,nd:()=>o,no:()=>d,nr:()=>A,wD:()=>l,xE:()=>f});var i=a(2328),n=a(2403),r=a(2873);const o=(0,i.td)(0),s=(0,i.Fl)((()=>Math.trunc(o.value))),l=(0,i.td)(0),d=(0,i.td)(!0),u=(0,i.td)(!1),c=(0,i.td)(!1),m=(0,i.td)(!1),A=(0,i.td)(!1),E=(0,i.td)(!1),p=(0,i.td)(0),h=(0,i.Fl)((()=>0===p.value?0:l.value/p.value*100)),g=(0,i.td)(0),_=(0,i.td)(1),v=(0,i.td)(0),f=(0,i.Fl)((()=>{const e=p.value,t=v.value;return!Number.isFinite(e)||e<=0||t<=0?0:Math.min(Math.max(t/e*100,0),100)}));let y=!1;n.AO?.on((e=>{let{videoSettings:t}=e;v.value=0,g.value=t?.start??0,c.value=!1,E.value=!0,l.value=0,o.value=0,A.value=!1,m.value=!1,u.value=!1,y=!1})),n.Ur?.on((e=>{let{videoSettings:t}=e;g.value=t?.start??0,E.value=!1,d.value=!1})),n.H5?.on((()=>{A.value=!1})),n.lF?.on((()=>{c.value=!1,u.value=!0})),n.Ir?.on((()=>{c.value=!0,u.value=!1})),n.Gr?.on((()=>{u.value=!1,A.value=!0})),n.Gd?.on((e=>{let{time:t}=e;l.value=Math.max(t,0),o.value=t})),n.yn?.on((e=>{let{duration:t}=e;p.value=t||0})),n.jL?.on((()=>{m.value=!0})),n.lm?.on((()=>{m.value=!0})),n.qP?.on((()=>{m.value=!1})),n.xA?.on((e=>{let{speed:t}=e;_.value=t}));const D=()=>{l.value=0,p.value=0},S=e=>{let{time:t}=e;l.value=Math.max(t,0),y||(o.value=t)};n.Iu?.on(S),n.l6?.on((()=>{D()})),r.Km?.on((e=>{let{creativeType:t}=e;"linear"===t&&D()}));const w=()=>{y=!0,D()};r.AD?.on(w);const R=()=>{y=!1};r.So?.on(R);const T=()=>{window.dmp_isAdSdkWebEnabled?.()||D()};r.eB?.on(T),r.AG?.on(T)},3511:(e,t,a)=>{"use strict";a.d(t,{$0:()=>d,CA:()=>s,I5:()=>r,IT:()=>o,Y1:()=>u,ZP:()=>n,_W:()=>c,yT:()=>l});const i={hasPlayedOnce:!1,videoSelected:!1,areComponentsReady:!1,loadVideoData:null,loadVideoDataCurrentIndex:0,loadVideoFrom:null};function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"VIDEO_PLAYING":return{...e,hasPlayedOnce:!0};case"VIDEO_SELECTED":return{...e,videoSelected:!0,loadVideoData:null};case"LOAD_VIDEO":return{...e,videoSelected:!1,loadVideoStartTime:Date.now(),loadVideoData:t,loadVideoDataCurrentIndex:t.videoIdx,loadVideoFrom:t.from};case"COMPONENTS_READY":return{...e,areComponentsReady:!0};default:return e}}const r=e=>e.player.loadVideoStartTime,o=e=>e.player.hasPlayedOnce,s=e=>e.player.videoSelected,l=e=>e.player.areComponentsReady,d=e=>e.player.loadVideoData,u=e=>e.player.loadVideoDataCurrentIndex,c=e=>e.player.loadVideoFrom},3111:(e,t,a)=>{"use strict";a.d(t,{Wx:()=>l,ZP:()=>s,eZ:()=>d});var i=a(6774),n=a.n(i),r=a(4993);const o={eventSource:[],subscribers:[]};function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.k3.CLICK_THRU:case r.k3.DURATION_CHANGE:case r.k3.ERROR:case r.k3.EXPANDED_CHANGE:case r.k3.IMPRESSION:case r.k3.INTERACTION:case r.k3.LINEAR_CHANGE:case r.k3.LOG:case r.k3.PAUSED:case r.k3.PLAYING:case r.k3.REMAINING_TIME_CHANGE:case r.k3.RESIZE_AD_REQUESTED:case r.k3.SKIPPABLE_STATE_CHANGE:case r.k3.SKIPPED:case r.k3.STARTED:case r.k3.STOPPED:case r.k3.USER_ACCEPT:case r.k3.USER_CLOSE:case r.k3.USER_MINIMIZE:case r.k3.VIDEO_COMPLETE:case r.k3.VIDEO_FIRST_QUARTILE:case r.k3.VIDEO_MIDPOINT:case r.k3.VIDEO_START:case r.k3.VIDEO_THIRD_QUARTILE:case r.k3.VOLUME_CHANGE:case r.k3.BUFFER_START:case r.k3.BUFFER_FINISH:case"FULLSCREEN_EXITED":case"FULLSCREEN_ENTERED":case"AD_ERROR":case"AD_IMPRESSION":case"AD_LOADED":case"AD_SKIPPED":case"AD_STOPPED":case"AD_VIDEO_START":case"AD_VIDEO_COMPLETE":case"VIDEO_PAUSE":case"VIDEO_PLAY":case"VIDEO_VOLUME_CHANGED":{const a=e.eventSource.length;return a>0&&n()(e.eventSource[a-1],t)?e:{...e,eventSource:e.eventSource.concat(t)}}case"SUBSCRIBE_PLAYER_DATA_LAYER":{const{name:a,events:i,callback:n,options:r={}}=t;return e.subscribers.find((e=>e.name===a))?e:{...e,subscribers:e.subscribers.concat({name:a,events:i,callback:n,options:r})}}case"UNSUBSCRIBE_PLAYER_DATA_LAYER":return{...e,subscribers:e.subscribers.filter((e=>e.name!==t.name))};case"VIDEO_SELECTED":return{...e,eventSource:[]};default:return e}}const l=e=>e.playerDataLayer.eventSource,d=e=>e.playerDataLayer.subscribers},2689:(e,t,a)=>{"use strict";a.d(t,{$H:()=>g,Ew:()=>l,Kk:()=>E,R_:()=>A,WK:()=>u,gX:()=>d,kO:()=>h,oi:()=>s,yF:()=>p});var i=a(2328),n=a(2403),r=a(5268),o=a(9383);const s=(0,i.td)(!1),l=(0,i.td)([]),d=(0,i.td)(null),u=(0,i.td)(null),c=(0,i.td)(0),m=(0,i.td)(0),A=(0,i.td)(null),E=(0,i.td)(null),p=(0,i.td)(null),h=(0,i.Fl)((()=>(0,o.X)(r.Ox.value.stream?.formats,d.value,u.value))),g=(0,i.Fl)((()=>{const e=m.value;if(e<=0)return 16/9;const t=c.value/e;return t>0?t:16/9}));n.AO?.on((()=>{s.value=!1,l.value=[],d.value=null,u.value=null,c.value=0,m.value=0,A.value=null,E.value=null,p.value=null})),n.gg?.on((e=>{let{adaptiveSupported:t,qualities:a}=e;s.value=t,l.value=a})),n.PE?.on((e=>{let{adaptive:t,maxLevel:a,qualityName:i,quality:n,videoHeight:r,videoWidth:o}=e;d.value=t?a?"Eco":"Auto":i||n.name,u.value=t&&null!=n&&null!=n.name?n.name:u.value,m.value=r,c.value=o,A.value=n&&n.resource?n.resource.type:A.value,p.value=(e=>{const t=e?.levels?.[0];if(!t)return null;const a=t.videoCodec??t.codecSet?.split(",")[0];return a?a.split(".")[0]:null})(n)})),n.Gt?.on((e=>{let{streamTech:t}=e;E.value=t}))},4645:(e,t,a)=>{"use strict";a.d(t,{A7:()=>l,Vm:()=>o,ZP:()=>r,dX:()=>s});var i=a(2816);const n={width:0,height:0,playerSizeHasChanged:!1};function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0;return"PLAYER_SIZE_CHANGED"===t.type?{...e,width:t.width,height:t.height,playerSizeHasChanged:!0}:e}const o=()=>i.ze.value,s=e=>e.playerSize.height,l=e=>e.playerSize.playerSizeHasChanged},376:(e,t,a)=>{"use strict";a.d(t,{b:()=>A});var i=a(6473),n=a(7465),r=a(2816),o=a(2328),s=a(4934),l=a(4753);let d=null;const u=(0,n.I)(),c=window.dm.nodes.player.getBoundingClientRect();r.ze.value=Math.floor(c.width),r.Zx.value=Math.floor(c.height),d||(d=(0,o.cE)((()=>{r.ze.value,r.Zx.value,r.KB.value,(()=>{const e=r.ze.value,t=r.Zx.value,a=window.dm?.nodes?.main;!a||e<=0||t<=0||((0,l.iR)(a,e,t),(0,s.Gq)(a,(0,s.EQ)(e,t,{verticalLayout:r.KB.value})))})()})));let m=null;const A={width:Math.floor(c.width),height:Math.floor(c.height),set:e=>{let{width:t,height:a}=e;if(r.ze.value=t,r.Zx.value=a,t===A.width&&a===A.height)return;A.width=t,A.height=a;(0,i.bh)().dispatch({type:"PLAYER_SIZE_CHANGED",width:t,height:a}),u.emit(),m?.()},on:u.on,off:u.off,waitForPlayerSize:new Promise((e=>{if(m=e,c.width&&c.height)return m();setTimeout((()=>{m()}),2e3)}))}},2404:(e,t,a)=>{"use strict";a.d(t,{oo:()=>u,gf:()=>d,S2:()=>s,Cz:()=>l});var i=a(2328);const n=["fit","fill","fillLeft","fillRight","fillTop","fillBottom"],r=n.filter((e=>e.includes("fill"))),o={fill:"center",fillLeft:"left",fillRight:"right",fillTop:"top",fillBottom:"bottom"},s=(0,i.td)(void 0),l=(0,i.Fl)((()=>o[s.value]||null)),d=(0,i.Fl)((()=>r.includes(s.value))),u=e=>{n.includes(e)&&(s.value=e)}},4028:(e,t,a)=>{"use strict";a.d(t,{oW:()=>A,l7:()=>g,zT:()=>m});const i=async e=>{let{url:t,mimeType:a,responseType:i,headers:n,error:r,timeout:o}=e;const s=o?new AbortController:void 0,l=o?setTimeout((()=>s.abort()),o||5e3):void 0;try{const e=await fetch(t,{method:"GET",headers:n,signal:s?s.signal:void 0});if(l&&clearTimeout(l),!e.ok)throw{...r,status:e.status,detail:e.statusText};switch(i){case"json":return await e.json();case"blob":return await e.blob();case"arraybuffer":return await e.arrayBuffer();default:return await e.text()}}catch(e){return"AbortError"===e.name?Promise.reject({...r,status:0,detail:"Request timed out"}):Promise.reject({...r,status:e.status||0,detail:e.detail||e.message||"Network error"})}};const n=(0,a(7638).jl)("UI","Filmstrip"),r=10,o=100,s={STARTING_BYTE_INDEX:4096,SLOT_DURATION:75,SPRITE_LENGTH:5,FRAMES_IN_SPRITE:25};let l={};const d={FOR_SMALL_PLAYER:{"16/9":192,"9/16":108},FOR_LARGE_PLAYER:{"16/9":256,"9/16":144}},u={"16/9":32,"9/16":48},c=e=>{let{isLargePlayerWidth:t,frameRatio:a,activeChapter:i}=e;const n=a>=1?"16/9":"9/16",r=t?d.FOR_LARGE_PLAYER[n]:d.FOR_SMALL_PLAYER[n],o=r/a+(i?u[n]:0);return{width:Math.round(r),height:Math.round(o)}},m=async e=>{let{previewTimestamp:t,resourceUrl:a}=e;const r=((o=a)in l||(l={},n.log("UI","Filmstrip","Loading multiple filmstrip manifest"),l[o]=new Promise(((e,t)=>{i({url:o,mimeType:"application/json",responseType:"json",headers:{Range:"bytes=0-"+(s.STARTING_BYTE_INDEX-1)},error:{type:"manifest",message:"Unable to load multiple filmstrip manifest"}}).then((t=>{var a;e({videoDuration:t[0],frameWidth:t[1],frameHeight:t[2],map:(a=t[3],a.reduce(((e,t)=>{const a=0===e.length?s.STARTING_BYTE_INDEX:e[e.length-1].maxByteIndex+1,i=a+t-1;return e.push({minByteIndex:a,maxByteIndex:i,promise:null}),e}),[]))})})).catch((e=>{l={},t(e)}))}))),l[o]);var o;let d=null;try{d=await r}catch(e){return r}const{videoDuration:u,frameWidth:c,frameHeight:m,map:A}=d,E=t*u;let p=Math.floor(E/Math.min(u,s.SLOT_DURATION));if(p=p>A.length-1?A.length-1:p,null===A[p].promise){const{minByteIndex:e,maxByteIndex:t}=A[p];n.log("UI","Filmstrip",`fetchBinaryFilmstripSheet ${p} :`,e,t),A[p].promise=(e=>{let{indexSlot:t,minByteIndex:a,maxByteIndex:n,frameWidth:r,frameHeight:o,url:s,videoDuration:l,subMap:d}=e;return new Promise(((e,u)=>{i({url:s,mimeType:"application/octet-stream",responseType:"blob",headers:{Range:`bytes=${a}-${n}`},error:{type:"binary sheet",message:"Unable to load single binary sheet resource"}}).then((a=>{e({indexSlot:t,frameWidth:r,frameHeight:o,videoDuration:l,resource:window.URL.createObjectURL(a)})})).catch((e=>{d.promise=null,u(e)}))}))})({indexSlot:p,url:a,minByteIndex:e,maxByteIndex:t,frameWidth:c,frameHeight:m,videoDuration:u,subMap:A[p]})}return A[p].promise},A=async e=>{let{activeChapterSignal:t,previewWidth:a,isLargePlayerWidth:i,previewTimestamp:n,indexSlot:r,frameWidth:o,frameHeight:l,resource:d,videoDuration:u}=e;const m=n*u,{FRAMES_IN_SPRITE:A,SLOT_DURATION:E,SPRITE_LENGTH:p}=s,g=m-r*Math.min(u,E),_=Math.floor(g/(Math.min(u,E)/A)),v=_%p,f=Math.floor(_/p),y=o/l,{width:D,height:w}=c({activeChapterSignal:t,isLargePlayerWidth:i,frameRatio:y}),R=a??D,T=a?a/y:w,P=await h(d);return{filmstripSheetWidth:R*p,filmstripSheetHeight:T*p,filmstripSheetLeftPosition:-R*v,filmstripSheetTopPosition:-T*f,frameRatio:y,imageTooltipWidth:D,imageTooltipHeight:w,resourceUrl:d,preview:P?await S(P,v*o,f*l,o,l,R,T):null}},E=5,p={};function h(e){if(!e||"undefined"==typeof window)return Promise.resolve(null);let t=p[e];if(t)return Promise.resolve(t);return new Promise((t=>{const a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{if(p[e]=a,Object.keys(p).length>E){const e=Object.keys(p)[0];void 0!==e&&delete p[e]}t(a)},a.onerror=()=>t(null),a.src=e}))}const g=async e=>{let{activeChapterSignal:t,isLargePlayerWidth:a,previewTimestamp:i,qualityVideoRatio:n,resourceUrl:s,previewWidth:l}=e;const d=Math.floor(i*o),u=d%r,m=Math.floor(d/r),{width:A,height:E}=c({isLargePlayerWidth:a,frameRatio:n,activeChapterSignal:t}),p=l||A,g=l/n||E,_=await h(s),v=_?await S(_,u*(_.width/r),m*(_.height/r),_.width/r,_.height/r,p,g):null;return{filmstripSheetWidth:p*r,filmstripSheetHeight:g*r,filmstripSheetLeftPosition:-p*u,filmstripSheetTopPosition:-g*m,frameRatio:n,imageTooltipWidth:A,imageTooltipHeight:E,resourceUrl:s,preview:v}},_=32,v={};let f=null,y=null;function D(e,t){return f||(f=document.createElement("canvas"),y=f.getContext("2d")),f.width===e&&f.height===t||(f.width=e,f.height=t),{thumbnailCanvas:f,thumbnailCtx:y}}function S(e,t,a,i,n,r,o){const s=`${e.src}_${t}_${a}_${i}_${n}_${r}_${o}`,l=v[s];if(void 0!==l)return Promise.resolve(l);const{thumbnailCanvas:d,thumbnailCtx:u}=D(r,o);u.drawImage(e,t,a,i,n,0,0,r,o);const c=d.toDataURL("image/png");if(Object.keys(v).length>=_){const e=Object.keys(v)[0];void 0!==e&&delete v[e]}return v[s]=c,Promise.resolve(c)}},155:(e,t,a)=>{"use strict";a.d(t,{Yy:()=>d,ZP:()=>r,bR:()=>E,gd:()=>l,kX:()=>m,kt:()=>u,o4:()=>c,oj:()=>A,xf:()=>s});var i=a(2816);const n={step:null,canAttachVideoSlot:!0,isLoadingNext:!1,isSchedulerEnabled:!1,isReplay:!1,isReloadingLiveAfterPause:!1};function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOAD_VIDEO":return i.vx.value=!1,i.X$.value=!1,{...e,isSchedulerEnabled:!1,isReplay:!!t.isReplay,isReloadingLiveAfterPause:Boolean(t.isReloadingLiveAfterPause)};case"VIDEO_SELECTED":return{...e,isSchedulerEnabled:!0};case"ERROR_DISPLAY_REQUESTED":return{...e,isLoadingNext:!1};case"SEQUENCE_READY":return{...e,step:"ready"};case"GDPR_CONSENT_COLLECTION_REQUESTED":case"SEQUENCE_STARTED":return{...e,step:"running"};case"SEQUENCE_ENDED":return{...e,step:null!==e.step?"ended":null};case"AD_LINEAR_BREAK_STARTED":return i.vx.value=!0,{...e,canAttachVideoSlot:!1};case"AD_LINEAR_WILL_START":return{...e,canAttachVideoSlot:!0};case"AD_LINEAR_BREAK_ENDED":return i.vx.value=!1,{...e};case"VIDEO_SLOT_STARTED":return i.X$.value=!0,{...e};case"VIDEO_SLOT_ENDED":return i.X$.value=!1,{...e};default:return e}}const o=e=>e.sequence.step,s=e=>"ready"===o(e),l=e=>"running"===o(e),d=()=>i.vx.value,u=e=>e.sequence.canAttachVideoSlot,c=()=>i.X$.value,m=e=>e.sequence.isSchedulerEnabled,A=e=>e.sequence.isReplay,E=e=>e.sequence.isReloadingLiveAfterPause},1838:(e,t,a)=>{"use strict";a.d(t,{AO:()=>h,WF:()=>u,Y_:()=>R,Yb:()=>D,Ym:()=>c,ZP:()=>l,b2:()=>_,bW:()=>d,bd:()=>A,fL:()=>T,nS:()=>y,tC:()=>v,vj:()=>p,wT:()=>m,w_:()=>f,yI:()=>w,yT:()=>g,yh:()=>S});var i=a(6679),n=a(7966),r=a(2816),o=a(3823);const s={sharingUrlLocation:void 0};function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOOP_CHANGE_REQUESTED":return{...e,loop:t.value};case"LOAD_VIDEO":default:return e;case"API_SET_CUST_CONFIG":{const a=(0,i.bC)(t.persistentCustomConfig,t.temporaryCustomConfig);return o.Fe.value=(0,i.wk)(o.Fe.value,a.persistentCustomConfig),o.D9.value=(0,i.wk)(o.D9.value,a.temporaryCustomConfig),e}case"API_CUST_CONFIG_CONSUMED":return o.D9.value={},e}}const d=e=>e.settings.api||!1,u=e=>e.settings.advertising.controls,c=e=>e.settings.embed_index||null,m=e=>e.settings.sharing,A=e=>e.settings.sharingUrlLocation,E=e=>e.settings.ui||{},p=e=>E(e).logo,h=e=>E(e).startscreenDmLink||!1,g=e=>(e=>e.settings.info||{})(e).action||"use_built_in",_=e=>e.settings.fullscreen||{},v=e=>e.settings.autoplay_next,f=e=>e.settings.video_title_link,y=e=>e.settings.chromecast.action||"use_built_in",D=e=>e.settings.syndication,S=e=>e.settings.loop,w=()=>!!n.Hz.value.enableKeyboardShortcuts&&r.by.value,R=()=>o.A1.value,T=()=>o.hy.value},3823:(e,t,a)=>{"use strict";a.d(t,{A1:()=>s,D9:()=>r,Fe:()=>n,hy:()=>o});var i=a(2328);const n=(0,i.td)({}),r=(0,i.td)({}),o=(0,i.Fl)((()=>({...n.value,...r.value}))),s=(0,i.td)(0)},2816:(e,t,a)=>{"use strict";a.d(t,{$l:()=>d,Au:()=>A,Cw:()=>H,J5:()=>u,Jh:()=>S,KB:()=>V,N8:()=>T,Ob:()=>g,QE:()=>O,RL:()=>R,RR:()=>I,SB:()=>x,X$:()=>f,Zx:()=>U,a3:()=>D,bt:()=>N,by:()=>C,dQ:()=>v,fM:()=>h,gC:()=>b,gS:()=>_,hm:()=>l,iR:()=>w,nd:()=>P,oB:()=>M,qE:()=>L,uV:()=>m,vx:()=>y,wj:()=>p,yX:()=>E,ze:()=>k,zt:()=>c});var i=a(2328),n=a(9977),r=a(7966),o=a(4588),s=a(9886);const l=(0,i.td)(!1),d=(0,i.td)(!1),u=(0,i.td)(!1),c=(0,i.td)(!1),m=(0,i.td)(!1),A=(0,i.td)(!1),E=(0,i.Fl)((()=>!r.Hz.value.enableLegacyPip)),p=(0,i.Fl)((()=>!g.value&&(!_.value&&(!o.mc.value&&(!R.value&&(!s.N.value&&!!h.value)))))),h=(0,i.td)(!1),g=(0,i.td)(!1),_=(0,i.td)(!1),v=(0,i.td)(!1),f=(0,i.td)(!1),y=(0,i.td)(!1),D=(0,i.td)(!1),S=(0,i.td)(!1),w=(0,i.td)(!1),R=(0,i.td)(!1),T=(0,i.td)(!1),P=(0,i.td)(!1),I=(0,i.td)(null),L=(0,i.td)(!1),b=(0,i.td)(!1),C=(0,i.td)(n.W.get("dmp_keyboard_shortcuts")??!0);(0,i.cE)((()=>{C.value?n.W.remove("dmp_keyboard_shortcuts"):(P.value=!1,n.W.set("dmp_keyboard_shortcuts",C.value,2592e3))}));const N=(0,i.td)(!1),O=(0,i.td)(window.dm.spinner?.isDisplayed??!1),M=(0,i.td)(1),k=(0,i.td)(0),U=(0,i.td)(0),x=(0,i.Fl)((()=>k.value>=640)),V=(0,i.Fl)((()=>U.value>k.value)),H=(0,i.Fl)((()=>x.value||V.value&&U.value>=640))},6835:(e,t,a)=>{"use strict";a.d(t,{ZP:()=>m,t6:()=>A,ui:()=>E});var i=a(2279),n=a(7638);let r;const o={},s=[];let l=null,d=null;function u(e){return Array.isArray(e)?e:[e]}function c(e){return s.findIndex((t=>t instanceof e))}const m=e=>(r=(0,n.jl)("Services"),l=t=>(0,i.P1)([t],(e=>e))(e.getState()),d=e.dispatch,t=>a=>{const i=t(a),{type:n}=a,r=o[n];return void 0!==r&&r.forEach((t=>{let{handler:i}=t;i(a,e.dispatch)})),i});class A{constructor(e){this.parameters=e,this.start(d)}start(){throw new Error("start() method is not implemented")}stop(){}on(e,t){u(e).forEach((e=>{!function(e,t,a,i){void 0===o[t]&&(o[t]=[]),o[t].push({handler:a.bind(i),refHandler:a,service:e})}(this.constructor.name,e,t,this)}))}off(e,t){u(e).forEach((e=>{!function(e,t,a){void 0!==o[t]&&(o[t]=o[t].filter((t=>t.service!==e||t.refHandler!==a)))}(this.constructor.name,e,t)}))}select(e){return l(e)}}function E(e,t){~c(e)?r.warn(`'${e.name}' already exists`):(r.log("Start:",e.name,t),s.push(new e(t)))}},6473:(e,t,a)=>{"use strict";a.d(t,{xC:()=>O,bh:()=>N});var i=a(6983),n=a(3894);var r=a(6835),o=a(9487),s=a(889),l=a(4947),d=a(3511),u=a(4645),c=a(4116),m=a(155),A=a(1838),E=a(9736),p=a(9481),h=a(7785),g=a(1399),_=a(22),v=a(2816);const f={isRunning:!1,hasPipBanner:!1,hasRequestedPipNative:!1,isSmallViewportDisplay:!1,isExpanded:!1,isPipCustomPosition:!1,uiActionOrigin:null,screenId:null,pipPositionX:null,pipPositionY:null,pipTransformSmallViewportCollapsed:null,playerIsInViewport:!1};var y=a(3111),D=a(7022);const S={},w={isReadyToUpdate:!1};var R=a(1216),T=a(8041);const P={adConsole:E.Z,adEventsAdapter:p.Z,capabilities:T.ne,chromecast:g.ZP,ads:h.ZP,error:R.Z,interactionMode:o.Z,ias:_.ZP,metadata:s.ZP,pesPip:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"NOTIFY_PES_PIP_CHANGED":return"hasPipBanner"in t.value&&(v.uV.value=t.value.hasPipBanner),{...e,...t.value};case"PLAYER_VISIBILITY":return{...e,playerIsInViewport:t.value};default:return e}},playback:l.ZP,player:d.ZP,playerDataLayer:y.ZP,playerSize:u.ZP,suggestedContent:c.ZP,sequence:m.ZP,settings:A.ZP,volume:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"COMPONENTS_READY":return{...e,...w};case"VIDEO_VOLUME_CHANGED":case"AD_VIDEO_VOLUME_CHANGED":return{...e,..."muted"in t&&void 0!==t.muted?{muted:t.muted}:null,..."volume"in t&&void 0!==t.volume?{value:(a=t.volume,i=e.value,"number"!=typeof a||isNaN(a)?i:Math.max(0,Math.min(a,1)))}:null};case"AUTOPLAY_RESOLUTION":return t.reason===D.xo?{...e,isReadyToUpdate:!0,muted:!0}:{...e,isReadyToUpdate:!0};case"CHROMECAST_SESSION_STOPPED":case"AD_LINEAR_STOPPED":return{...e,isReadyToUpdate:!0};case"CHROMECAST_REMOTE_ENABLED":case"AD_LINEAR_STARTED":return{...e,isReadyToUpdate:!1};default:return e}var a,i}},I=("undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0})||i.qC)((0,i.md)(n.Z,(function(e){let{dispatch:t,getState:a}=e,i=[];return e=>n=>{if("@@service/waitUntil"===n.type)return i.push(n),null;const r=e(n);return function(e){const n=[],r=[];for(const t in i){const a=i[t];a.predicate(e)?n.push(a):r.push(a)}i=r;for(const i in n)n[i].run(t,a,e)}(n),r}}),r.ZP));let L;let b=null;function C(e){b=e}b=O({});const N=()=>b;function O(e){const t=(0,i.MT)(M(),e,I);return C(t),t.asyncReducers={},L=(e,a)=>{t.asyncReducers[e]=a,t.replaceReducer(M(t.asyncReducers))},t}function M(e){return(0,i.UY)({...P,...e})}},8738:(e,t,a)=>{"use strict";a.d(t,{SG:()=>l,ik:()=>c,mX:()=>s});var i=a(2279),n=a(889),r=a(5312),o=a(1207);const s=()=>{return(e=o.lw.value)?Array.isArray(e)?e.map((e=>e.code)).filter(Boolean):Object.keys(e):[];var e},l=e=>{const t=e.settings.subtitles;return t?t.default:void 0},d=e=>e?e.split("-")[0].toLowerCase():"",u=(e,t)=>{if(!t||!e)return null;if(Array.isArray(e)){if(!e.length)return null;let a=e.find((e=>e.code===t));if(a)return{code:a.code,from:r.kP};if(a=e.find((e=>e.code.startsWith(t))),a)return{code:a.code,from:r.kP};if(a=e.find((e=>t.startsWith(e.code))),a)return{code:a.code,from:r.kP};const i=d(t);return a=e.find((e=>d(e.code)===i)),a?{code:a.code,from:r.kP}:null}if(t in e)return{code:t,from:r.kP};const a=Object.keys(e).filter((e=>e.startsWith(t)));if(a.length)return{code:a[0],from:r.kP};const i=Object.keys(e).filter((e=>t.startsWith(e)));if(i.length)return{code:i[0],from:r.kP};const n=d(t),o=Object.keys(e).find((e=>d(e)===n));return o?{code:o,from:r.kP}:null},c=(0,i.P1)([n.cr,()=>o.lw.value,n.Yb],((e,t,a)=>{const i=u(t,e);if(!i)return null;const n=u(a,i.code)||u(a,e);return n?{code:n.code,from:r.kP}:null}))},1207:(e,t,a)=>{"use strict";a.d(t,{Go:()=>o,ip:()=>r,lw:()=>n,sK:()=>d,ux:()=>s,zJ:()=>l});var i=a(2328);const n=(0,i.td)([]),r=(0,i.td)(-1),o=(0,i.td)(null),s=(0,i.td)({disableRequested:!1,enableRequested:!1}),l=(0,i.Fl)((()=>-1!==r.value)),d=(0,i.Fl)((()=>n.value.find((e=>e.id===r.value))?.code||-1))},4116:(e,t,a)=>{"use strict";a.d(t,{DF:()=>u,DN:()=>_,KZ:()=>g,PU:()=>v,QB:()=>A,TC:()=>m,Tm:()=>d,ZP:()=>r,_:()=>h,ci:()=>s,ek:()=>l,ov:()=>c,pz:()=>p,qO:()=>E});const i={},n={nav:{},customRecommendations:[]};function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"COMPONENTS_READY":return{...e,...n};case"SUGGESTED_CONTENT_UPDATED":return{...e,source:t.source};case"SUGGESTED_CONTENT_SET_NAV":return{...e,nav:t.nav};case"SUGGESTED_CONTENT_SET_CUSTOM_RECOMMENDATIONS":return{...e,customRecommendations:t.customRecommendations};default:return e}}const o=e=>e.suggestedContent.source||{},s=e=>o(e).mode,l=e=>"contextual"===o(e).mode,d=e=>"custom"===o(e).mode,u=e=>"playlist_and_recommended"===o(e).mode,c=e=>"playlist_and_custom"===o(e).mode,m=e=>"playlist"===o(e).mode,A=e=>"playlist"===o(e).type,E=e=>o(e).xid,p=e=>"deactivated"!==o(e).mode,h=e=>o(e).embed,g=e=>e.suggestedContent.nav.prev,_=e=>e.suggestedContent.nav.next,v=e=>e.suggestedContent.customRecommendations},3176:(e,t,a)=>{"use strict";a.d(t,{Qy:()=>d,o0:()=>r,vQ:()=>l,vl:()=>o,wn:()=>u});var i=a(7738),n=a(7638);const r="usprivacy",o="_testdm",s=(0,n.jl)("Error");function l(e){try{const t=window.document.cookie.split(";").map((e=>e.trim().split(/=(.*)/))).find((t=>{let[a]=t;return a===e}));return t?.[1]||null}catch(t){return s.warn(`[cookies] Error reading cookie "${e}":`,t.message),null}}function d(e){const t=l(e);return(0,i.Z)(t)?t:null}function u(e,t,a){try{const{path:i,domain:n,maxAge:r,samesite:o,secure:s}={path:"/",samesite:!!c()&&"none",secure:c(),...a},l=[`${e}=${t}`,i?`path=${i}`:null,n?`domain=${n}`:null,r?`max-age=${r}`:null,o?`samesite=${o}`:null,s?`secure=${s}`:null];document.cookie=l.join(";")}catch(t){s.warn(`[cookies] Error writing cookie "${e}":`,t.message)}}function c(){return"https:"===window.location.protocol}},6679:(e,t,a)=>{"use strict";a.d(t,{bC:()=>o,sV:()=>n,wk:()=>r});const i=(e,t)=>{const a={...e};return Object.keys(t).forEach((e=>{if(null===t[e]&&a[e])return delete a[e];if("customParams"===e){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("string"!=typeof e)try{e=JSON.stringify(e)}catch(e){}return e}(t[e]);0!==i?.trim().length&&(a[e]=i)}else"string"==typeof t[e]&&t[e]?.trim()&&(a[e]=t[e])})),a},n=e=>Object.keys(e).reduce((function(t,a){const i=a.match(/customConfig\[([a-zA-Z0-9]+)\]/);return i&&i[1]&&(t[i[1]]=e[a]),t}),{}),r=function(e){return i(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},o=(e,t)=>{for(const a in e)"hb"===a.slice(0,2)&&(t[a]=e[a],delete e[a]);return{persistentCustomConfig:e,temporaryCustomConfig:t}}},7465:(e,t,a)=>{"use strict";a.d(t,{I:()=>n});var i=a(6473);const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const a=new Set,n=e=>(a.add(e),()=>{a.delete(e)}),r=e=>{a.delete(e)};return{on:n,off:r,emit:function(){let n=(arguments.length<=0?void 0:arguments[0])??{};t&&(n={...t,...n}),n.timeStamp=Date.now(),e&&(0,i.bh)().dispatch("function"==typeof e?e(n):{type:e,...n}),a.forEach((e=>{e(n)}))},once:e=>{const t=function(){r(t),e(...arguments)};n(t)},clear:()=>{a.clear()}}}},2282:(e,t,a)=>{"use strict";function i(e){window.open(e)}a.d(t,{n:()=>i})},4753:(e,t,a)=>{"use strict";a.d(t,{CC:()=>i,Qm:()=>d,Ym:()=>s,iR:()=>u,p8:()=>r,pk:()=>o,wH:()=>n});const i=57600,n=230400,r=511200,o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!(e<=0&&t<=0)&&(!(e>0&&e<180)&&!(t>0&&t<180))},s=function(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t<320:e<320},l=e=>{let{width:t,height:a,minArea:n=i,maxArea:o=r}=e;return!t||!a||t<=0||a<=0?0:(s=(t*a-n)/(o-n),l=0,d=1,Math.min(d,Math.max(l,s)));var s,l,d},d=e=>{let{width:t,height:a,minPx:n,maxPx:o,minArea:s=i,maxArea:d=r}=e;const u=l({width:t,height:a,minArea:s,maxArea:d});return Math.round(n+(o-n)*u)},u=(e,t,a)=>{if(!e||t<=0||a<=0)return;const r=String(((e,t)=>l({width:e,height:t,minArea:i,maxArea:n}))(t,a));e.style.getPropertyValue("--player-surface-controls-t")!==r&&e.style.setProperty("--player-surface-controls-t",r)}},5971:(e,t,a)=>{"use strict";function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={autoplay:"boolean"!=typeof e.autoplay||e.autoplay,start:"number"==typeof e.start?e.start:0,...e.ads_params?{ads_params:e.ads_params}:{},...e.cust_params?{cust_params:e.cust_params}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_term?{utm_term:e.utm_term}:{}};return Object.keys(e).forEach((function(a){"hb"===a.slice(0,2)&&(t[a]=e[a])})),t}a.d(t,{s:()=>i})},8499:(e,t,a)=>{"use strict";a.d(t,{C0:()=>s,Cb:()=>l,KD:()=>o,gG:()=>n,oM:()=>r});var i=a(2279);const n=e=>e.volume.value,r=e=>e.volume.muted,o=(0,i.P1)([r],(e=>e)),s=(0,i.P1)([r,n],((e,t)=>e?-1:Math.round(10*t))),l=e=>e.volume.isReadyToUpdate},4206:(e,t,a)=>{"use strict";function i(e,t){return!0===e||0===t}function n(e,t){let{volume:a,muted:n}=t;e.volume=a??e.volume,e.muted=i(n,a)}function r(e){if("number"==typeof e&&!isNaN(e))return 0===Math.max(0,Math.min(e,1))}a.d(t,{FT:()=>i,IF:()=>n,ji:()=>r})},3955:(e,t,a)=>{"use strict";a.r(t);a(8432);var i=a(6473),n=a(4754),r=a(5603),o=a(3332),s=a(8973);var l=a(4755),d=a(5525),u=a(3692),c=a(7022),m=a(7638);const A="border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #000000; background: #55c7ff;",E="border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #000000; background: #55c7ff33;",p={local:"border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #ffffff; background: #e05555;",staging:"border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #000000; background: #55c7ff;",preview:"border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #000000; background: #f5a623;",prod:"border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #000000; background: #94ca11;",other:"border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; color: #000000; background: #f99136;"},h=new URL(window.DMP_PLAYER_URL);function g(){const e=(0,m.B1)(),t=e.source?`(logger "${e.logger}" from ${e.source})`:"(no logger detected)";let a=window.__PLAYER_CONFIG__.context.envFrontend;window.DMP_INLINE_PLAYER_ROOT&&(a=`${a} (inline)`),console.groupCollapsed([`%cDailymotion%c Player ${window.dm.vars.playerVersion} (${h.pathname})`,` %cgeo: ${window.__PLAYER_CONFIG__.context.envGeo}%c %cfrontend: ${a}`].join(""),A,"",p[window.__PLAYER_CONFIG__.context.envGeo]||p.other,"",p[window.__PLAYER_CONFIG__.context.envFrontend]||p.other,t),function(){const e=window?.__PLAYER_CONFIG__?.player||null,t=e?.id||"none";console.groupCollapsed(`⏯️ Player settings (xid: ${t})`),console.log(null!==e?JSON.stringify(e,null,2):"No settings"),console.groupEnd()}(),function(){console.groupCollapsed("❓ Player query parameters");const e={};h.searchParams.forEach(((t,a)=>{e[a]=t}));const t=Array.from(h.searchParams).length>0;console.log(t?JSON.stringify(e,null,2):"No parameters"),console.groupEnd()}(),console.groupCollapsed("🏡 Player environment info"),console.log("Embedder:",window.DMP_EMBEDDER),console.log("Referer:",window.DMP_REFERER),console.log("Pubtool:",window.DMP_PUBTOOL),console.log("Cookies available (3rd party):",window.DMP_COOKIES_3RD_PARTY_AVAILABLE),console.groupEnd(),function(){const e=window.__PLAYER_CONFIG__.dmInternalData.envFlipper||"unknown",t=window.DMP_GATEKEEPERS.length;console.groupCollapsed(`🐬 Flipper rules (${t} from ${e} env) (ts: ${window.DMP_TS}) (visitor group: ${window.DMP_VISITOR_GROUP})`),console.log(JSON.stringify(window.DMP_GATEKEEPERS.sort(),null,2)),console.groupEnd()}(),console.group("💡 Help"),console.groupCollapsed("💬 Available loggers"),[{name:"Airplay",description:"AirPlay functionality lifecycle"},{name:"API",description:"Internal event-based player API"},{name:"AdNonLinearBreak",description:"Non-linear ad global lifecycle"},{name:"AdStackDM - VAST - ElementShield",description:"Internal Arya proxy helper"},{name:"AdStackDM - VAST - IMAIntegrator",description:"IMA ads integrator"},{name:"AdStackDM - VAST - IMANativeIntegrator",description:"Native (mobile) IMA ads integrator"},{name:"AdStackDM - VAST - SkipHandler",description:"Smart skip lifecycle"},{name:"AdStackDM - VAST - VPAID",description:"VPAID listeners"},{name:"Ads - CookieSync",description:"Ads cookie sync lifecycle"},{name:"Ads - GlobalTimeout",description:"Timeout when retrieving ads"},{name:"Ads - HeavyAds",description:"Google's Heavy Ads monitoring"},{name:"Ads - IMASdkHandler",description:"IMA SDK lifecycle"},{name:"AttentionPeaks",description:"AttentionPeaks lifecycle"},{name:"AudienceBroker",description:"Live video audience broker lifecycle (also known as audience meter)"},{name:"Autoskip",description:"Autoskip button lifecycle"},{name:"Bootstrapper",description:"Player startup information"},{name:"Bootstrapper - API",description:"Public player API commands & events"},{name:"CSSLoader",description:"Internal CSS loader driven by JSX components"},{name:"Chromecast - GoogleAPI",description:"Chromecast internal Google API lifecycle"},{name:"Chromecast - Injector",description:"Chromecast Sender library loader"},{name:"Chromecast - Sender",description:"ChromeCast Sender lifecycle"},{name:"Consent",description:"GDPR Consent banner lifecycle"},{name:"ContextualEmbed",description:"Contextual Embed feature"},{name:"EID",description:"Extended User Identifiers"},{name:"Error",description:"Error screen lifecycle"},{name:"ExceptionLogger",description:"Internal JS exceptions tracking"},{name:"GraphQL",description:"GraphQL requests monitoring"},{name:"Infopack",description:"GDPR Infopack & TCF2 lifecycle"},{name:"Mediafile - IntegratorProxy",description:"Internal communication between ad integrators & rest of the player"},{name:"NeonData",description:"Internal communication lifecycle with DM website"},{name:"Perf",description:"Performance metrics"},{name:"PerfBasics",description:"Internal performance observers (Core Vitals Metrics)"},{name:"PerfBasics - LCP",description:"Largest Contentful Paint"},{name:"PerfBasics - CLS",description:"Content Layout Shift"},{name:"Player - AdEventsAdapter",description:"Internal ad events communication"},{name:"Player - Autoplay",description:"Autoplay resolution"},{name:"Player - PlayerDataLayer",description:"FlightJS events lifecycle"},{name:"Player - Scheduler - AdLinearBreak",description:"Linear ad global lifecycle"},{name:"Player - Scheduler - AdsFetching",description:"Internal ads fetching info"},{name:"Player - Scheduler - AdsScheduling",description:"Ads scheduling logic"},{name:"Player - PreloadManager",description:"Metadata preload cache lifecycle"},{name:"Player - VideoLoader",description:"Video loading global lifecycle"},{name:"Player - MetadataLoader",description:"Metadata loading global lifecycle"},{name:"Poster Sooner",description:"Poster sooner lifecycle"},{name:"Preloading",description:"Preloading lifecycle"},{name:"Quality - DynamicQuality",description:"HLS.js quality switcher"},{name:"Quality - HLS",description:"HLS.js internal logger"},{name:"Quality - StaticQuality",description:"Native HLS quality switcher"},{name:"Quality - DRM",description:"DRM token lifecycle (fetch, cache, license request)"},{name:"Services",description:'Redux "Services" middlewares'},{name:"Stats - Emitter",description:"Event Bus batches emitter"},{name:"Stats - EventBus",description:"Event Bus events"},{name:"Stats - IAS",description:"IAS tracking"},{name:"Stats - Omsdk",description:"OMSDK tracking"},{name:"StreamIntegrator",description:"Stream ads integrator"},{name:"StreamSimidIntegrator",description:"SIMID ads integrator"},{name:"Tracking",description:'Internal "logger URLs" tracking'},{name:"UI - Filmstrip",description:"Video fimmstrip lifecycle"},{name:"UI - Gradient",description:"Black top gradient lifecycle"},{name:"UI - MediaSession",description:"Browser media session lifecycle"},{name:"UI - Spinner",description:"Spinner lifecycle"},{name:"VAST - AryaProxy",description:"Video tag proxy when playing ads"},{name:"VPAIDIntegrator",description:"VPAID ad lifecycle"},{name:"Video - Ads",description:"Global ad slot lifecycle"},{name:"Video - Buffering",description:"Internal video buffering logic"},{name:"VideoSlot",description:"Global video slot lifecycle"},{name:"ViewId",description:"View ID refresh lifecycle"},{name:"Watchtower",description:"Watchtower events"},{name:"Chapters",description:"Chapters fetch lifecycle"}].forEach((e=>{const t=`%c${e.name}%c ${e.description}`;console.log(t,A,"")})),console.groupEnd(),function(){function e(){return[{name:"dmDevAudienceUrl",restrictions:"VPN only",usage:"Override the Audience Broken URL for live videos"},{name:"dmFrontendVersion",restrictions:"No restrictions",usage:"Select the frontend version to use (0.0.20, PR-[PR_NUMBER], staging, prod, local, local-prod)"},{name:"dmDevEmbedder",restrictions:"VPN only",usage:"Override the embedder URL"},{name:"dmDevEmulateHeavyAdsAfterDelay",restrictions:"VPN only",usage:"Trigger a fake Heavy Ads report after the given amount of milliseconds"},{name:"dmDevLocale",restrictions:"VPN & geo player only",usage:"Override the UI language"},{name:"dmDevReferer",restrictions:"VPN only",usage:"Override the referer URL"},{name:"dmDevRefreshViewIdDelay",restrictions:"VPN only",usage:"Override the refresh delay for the view ID policy (in seconds)"},{name:"dmDevUnsupportedBrowser",restrictions:"VPN only",usage:"Emulate unsupported browser mode (param can be set in the iframe or PES URLs)"},{name:"dmDevVmapUrl",restrictions:"VPN only",usage:"Override the AdDirector URL"},{name:"dmDevPlayerConsole",restrictions:"VPN only",usage:"Open the Player Console on load"},{name:"dmPerfMetrics",restrictions:"No restrictions",usage:"Export perf metric snapshots to the parent embedder via postMessage"},{name:"dmDevRemoteConsole",restrictions:"VPN only",usage:"Enable the remote console early"},{name:"dmLogger",restrictions:"No restrictions",usage:"Enable the player logger in the browser console (can be set in the iframe or page URL"},{name:"dmDevCountry",restrictions:"VPN only",usage:"Emulate country regarding GDPR logic (example: FR = GDPR applies, US = GDPR does not apply)"},{name:"dmDevRegion",restrictions:"VPN only",usage:"Emulate US region"},{name:"dmDevStreamEnv",restrictions:"VPN only",usage:"Override the HLS stream environment (stage-01|preprod|prod)"},{name:"dmDevEventBusEnv",restrictions:"VPN only",usage:"Select the Event Bus environment (staging|prod, default: prod)"}]}console.groupCollapsed("🛠️ Internal query parameters"),e().forEach((function(e){const t=`%c?${e.name}=%c ${e.usage} %c(${e.restrictions})`;console.log(t,A,"",E)})),console.groupEnd()}(),console.groupCollapsed("📚 Debugging tools (right click or long press on the player)"),console.log("%cRemote console%c Redirect the player loggers to the player lab (Useful to debug native and mobile apps, more info in the wiki) %c(VPN only)",A,"",E),console.log("%cAdvertising console%c Show a console on top of the player UI with the main advertising events & debug info %c(No restrictions)",A,"",E),console.log("%cPlayer Console%c Show a swim-lane timeline of player load metrics",A,"",E),console.groupEnd(),console.groupEnd(),console.log("%cThis debug panel is visible because you are connected to the Dailymotion VPN.\nAny questions? Ask on the #player Slack channel.\nPlayer Team ❤️","font-style: italic; font-size: 90%"),console.groupEnd()}var _=a(9083),v=a(1918),f=a(3529);const y={catchUserAction(e,t){if(void 0===e)throw new Error("`catchUserAction()` can not be called without a mainNode element");if(void 0===t)throw new Error("`catchUserAction()` can not be called without a videoTag element");if("1"!==e.getAttribute("data-got-user-action")&&"function"==typeof t.play&&"function"==typeof t.pause){const a=t.paused,i=t.play();e.setAttribute("data-got-user-action","1"),void 0!==i&&"function"==typeof i.catch&&i.catch((()=>{})),a&&t.pause()}}},D=(0,m.jl)("PerfBasics"),S=(0,m.jl)("PerfBasics","LCP"),w=(0,m.jl)("PerfBasics","CLS");const R=()=>window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("element");var T=a(5617),P=a(8035),I=a(2845),L=a(2282),b=a(8939),C=a(2403),N=a(2279),O=a(7785),M=a(4066),k=a(889),U=a(4947),x=a(6649),V=a(5141),H=a(8499),q=a(6157),F=a(432),B=a(2689),G=a(1207),Y=a(8738),W=a(4116),Q=a(9886),j=a(2051),K=a(3511);const $=(0,N.P1)([O.xU],(e=>{switch(e){case"REASON_AD_SKIPPED":return"skipped";case"REASON_AD_STOPPED":return"stopped";case"REASON_AD_ERROR":return"error";case"REASON_AD_INTERRUPTED":return"interrupted";default:return null}})),z=(0,N.P1)([O.xV,O.jE],((e,t)=>e?t:-1)),Z=e=>Math.round(100*e)/100,X=(0,N.P1)([M.eH,H.oM,H.gG,()=>V.LZ.value,()=>V.GJ.value,()=>x.L8.value,()=>x.SK.value,()=>x.Ws.value,()=>x.nd.value,U.O5,()=>B.Ew.value.map((e=>{let{name:t}=e;return t})),()=>B.gX.value,Y.mX,()=>G.sK.value,k.$d,k.o7,k._T,U.kc,O.xV,O.b3,O.ep,O.ds,z,O.au,$,W.KZ,W.DN,b.Pi,M.sn,()=>q.m.value,F.O,b.Z8,k.hK,k.cw,k.wD,k.q$,k.rb,k.YK,k.Te,k.xj,k.Ie,k.V$,()=>window.dmp_getViewIdForVideoIndex(),()=>j.M.value,K._W,()=>Q.N.value],((e,t,a,i,n,r,o,s,l,d,u,c,m,A,E,p,h,g,_,v,f,y,D,S,w,R,P,I,L,b,C,N,O,M,k,U,x,V,H,q,F,B,G,Y,W,Q)=>{const j=Q||_;let K={};if(T.R1){const e=T.R1.getAd(),t=T.R1.getAdBreak(),a=window.dmp_isAdSdkWebEnabled?.();a&&e?K=((e,t)=>{const{vastAd:a,creative:i,mediaFile:n,position:r,isSkippable:o,skipOffset:s,companionCreatives:l,currentTime:d}=e;return{adAdvertiserName:a?.advertiser||a?.system?.value||null,adBreakId:a?.id||null,adTitle:a?.title||null,adId:a?.id||null,adPosition:r||null,adCreativeAdId:i?.adId||null,adCreativeId:i?.id||null,adDescription:a?.description||null,adHeight:n?.height||null,adWidth:n?.width||null,adDuration:i?.duration?Z(i.duration):null,adIsSkippable:o,adSkipOffset:Z(s??0),adIsPlaying:t,adCompanion:l,adTime:Z(d??0),adEndedReason:null,adError:null}})(e,j):e?.adData&&(K=((e,t,a,i,n,r,o,s,l)=>({adAdvertiserName:e.adData.advertiserName||null,adBreakId:t?.nextAdBreak?.id||t?.current?.id||null,adTitle:e.adData.title||null,adId:e.adData.id||null,adPosition:t?.position||t?.nextPosition,adCreativeAdId:e.adData.adId||null,adCreativeId:e.adData.creativeId||null,adDescription:e.adData.description||null,adHeight:e.height,adWidth:e.width,adDuration:Z(e.duration),adIsSkippable:a,adSkipOffset:Z(i),adIsPlaying:n,adCompanion:r,adEndedReason:o,adError:s?{code:s.type,message:s.message}:null,adTime:Z(l)}))(e,t,y,D,j,f,w,S,v))}return{...K,adIsPlaying:j,playerError:e,playerInstanceId:window.DMP_INSTANCE_UUID,playerIsAlertDialogDisplayed:L,playerIsBuffering:o,playerIsCriticalPathReady:g,playerIsMuted:!!t,playerIsNavigationEnabled:C,playerIsPlaybackAllowed:n,playerIsPlaying:r,playerIsReplayScreen:N,playerIsStartScreen:I,playerNextVideo:P?.xid,playerPlaybackPermissionReason:i,playerPlaybackSpeed:j?1:s,playerPrevVideo:R?.xid,playerVolume:a,playerRecommendedVideosDisplayed:Y,videoCreatedTime:H,videoDuration:Z(d||q),videoId:window.DMP_ONSITE?E:p,videoIsCreatedForKids:F,videoIsPasswordRequired:b,videoLoadedFrom:W,videoAspectRatio:O,videoOwnerAvatars:M,videoOwnerId:k,videoOwnerScreenname:x,videoOwnerUsername:U,videoThumbnails:V,videoQuality:c,videoQualitiesList:u,videoSubtitles:-1!==A?A:null,videoSubtitlesList:m,videoTime:Z(l),videoTitle:h,..."nativeBridge"===window.DMP_API_SETTING?{videoStreamUrl:B}:{},videoViewId:G}}));var J=a(4206),ee=a(5312),te=a(2404),ae=a(9371),ie=a(2873),ne=a(7966),re=a(2816),oe=a(5268),se=a(5260),le=a(4028),de=a(6294),ue=a(4588),ce=a(4105),me=a(8775);(0,me.O0)({getLogger:m.jl,isLoggerEnabled:m.hn}),window.dm.perf.metric("bootstrapperInjection").start();const Ae=(0,m.jl)("Bootstrapper"),Ee=(0,m.jl)("NeonData"),pe=window.dm.nodes.main,he=window.__PLAYER_CONFIG__,ge=e=>parseFloat(e)||0,_e=async()=>{await(0,me.NF)({isGKEnabled:window.dmp_isGKEnabled});return"audio"===(he.player?.type||"video")?await Promise.all([a.e(277),a.e(206)]).then(a.bind(a,2908)):await Promise.all([a.e(277),a.e(46)]).then(a.bind(a,3136))},ve=async()=>{if(!(window.DMP_IS_EMPTY_PLAYER&&window.DMP_IS_PES&&window.DMP_CONTEXTUAL_PAGE_DATA))return{videoId:window.DMP_INITIAL_VIDEO_ID,playlistId:window.DMP_INITIAL_PLAYLIST_ID};const e=await window.DMP_GRAPH_QUERY_CONTEXTUAL_VIDEO;return{videoId:e?.player?.queue?.recordings?.edges[0]?.node?.recording?.xid,playlistId:null}},fe=async()=>{if(Ae.log(`Player is ${window.DMP_INITIAL_FETCH_METADATA_PROMISE?"not ":""}empty`),!ne._G.value&&window.DMP_INITIAL_FETCH_METADATA_PROMISE)try{Ae.log("Waiting for initial metadata"),(0,ae.s7)()?(await Promise.allSettled([window.DMP_INITIAL_FETCH_METADATA_PROMISE,new Promise((e=>{if(ne._G.value)return e();if(window.DMP_ENABLE_ADS){const t=(0,m.jl)("AdStackDM");return window.dm.perf.metric("initAdSdks").start(),(0,T.P3)(he).then(se.$).then(ve).then((a=>{let{videoId:i,playlistId:n}=a;if(!i&&!n)throw new Error("No videoId or playlistId found");return window.dmp_isAdSdkWebEnabled?.()?T.R1.loadAdsSequenceWithAdSdkWeb({videoId:i,playlistId:n}).then((()=>{t.log("AdSDK initialized"),window.dm.perf.metric("initAdSdks").end()})).catch((a=>{t.log("Error while getting ads (VMAP)",a),window.dm.perf.metric("initAdSdks").end(),e()})):T.R1.fetchAds(window.dmp_getViewIdForVideoIndex(),i,n).then((()=>{t.log("AdSDK initialized"),window.dm.perf.metric("initAdSdks").end()})).catch((a=>{t.log("Error while getting ads (VMAP)",a),window.dm.perf.metric("initAdSdks").end(),e()})),e()})).catch((a=>{t.log("Error while initializing ads ",a),window.dm.perf.metric("initAdSdks").end(),e()}))}return e()}))]),T.R1&&window.dmp_isAdSdkWebEnabled?.()&&(0,T.vs)()):await window.DMP_INITIAL_FETCH_METADATA_PROMISE}catch(e){Ae.log("fetch metadata error",e)}(()=>{try{const e=document.createElement("video");return"function"==typeof e.canPlayType&&!!e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")}catch(e){return!1}})()||(ne._G.value=_.he)};(async()=>{if(!he)throw new Error("window.__PLAYER_CONFIG__ is missing");const e=(0,f.TS)(he.player);(0,ae.Dq)({videoId:window.DMP_INITIAL_VIDEO_ID,playlistId:window.DMP_INITIAL_PLAYLIST_ID}),(0,ae.s7)()||await fe(),u.Z.set(he),(0,ae.s7)()&&(await fe(),u.Z.setMetadata(he));let t=!1;let a=!0;let m=0,A=0,E=NaN,p=NaN,h=NaN,_=!1;let N=!1,O=!1,M=[],k=null;let U=null;const x=()=>{t=!1,m=0,A=0,h=NaN,_=!1,O=!1,M=[],k=null,U=null},V={"set-ads-config":"setCustConfig","watch-on-site":"watchOnSite","set-prop":"setProp"};he.context.is_dm_network&&g(),Ae.log("Settings:",u.Z.settings()),Ae.log("Player:",window?.__PLAYER_CONFIG__?.player),Ae.log("Internal data:",Object.keys(window).filter((e=>e.startsWith("DMP_"))).reduce(((e,t)=>Object.assign(e,{[t]:window[t]})),{})),(0,r.T)("adDuration",{get:()=>E}),(0,r.T)("adRunning",{get:()=>O}),(0,r.T)("autoplay",{get:()=>false}),(0,r.T)("bufferedTime",{get:()=>A}),(0,r.T)("duration",{get:()=>h}),(0,r.T)("ended",{get:()=>t}),(0,r.T)("error",{get:()=>null}),(0,r.T)("paused",{get:()=>a}),(0,r.T)("presentationMode",{get:()=>"inline"}),(0,r.T)("qualities",{get:()=>M}),(0,r.T)("ready",{get:()=>(0,o.f)()}),(0,r.T)("seeking",{get:()=>_}),(0,r.T)("type",{get:()=>{}}),(0,r.T)("video",{get:()=>U}),(0,r.T)("videoDuration",{get:()=>p}),(0,r.T)("volume",{get:()=>1,set:t=>{if(e)return;const a=parseFloat(t);(e=>{let{method:t,arg:a}=e;const i={subname:"api_volume_mute_call",method:t};void 0!==a&&("object"==typeof a&&null!==a?i.params=a:i.value=String(a)),window.dm.watchtower.notify({name:"dev_monitor"},{extra:i})})({method:"setVolume",arg:a});const i=(0,J.ji)(a);C.OI.emit({volume:a,...void 0!==i?{muted:i}:{},interactionType:ee.bl})}}),(0,r.T)("currentTime",{get:()=>m,set:e=>{const t=parseFloat(e);C.bJ.emit({time:t,interactionType:ee.bl})}}),(0,r.T)("quality",{get:()=>k,set:t=>{if(e)return;const a="default"===t?{adaptive:!0,qualityName:"480",interactionType:ee.bl}:{adaptive:!1,qualityName:t,interactionType:ee.bl};C.Sz.emit(a)}}),(0,r.T)("chromecast",{get:()=>N,set:e=>{N="1"===e||1===e||"true"===e||!0===e,C.gr.emit({chromecast:N,interactionType:ee.bl})}}),(0,r.T)("scaleMode",{get:()=>"fit",set:t=>{e||(0,te.oo)(t)}}),(0,r.T)("loop",{get:()=>null,set:t=>{if(e)return;const a="1"===t||1===t||"true"===t||!0===t;(0,i.bh)().dispatch({type:"LOOP_CHANGE_REQUESTED",value:a})}}),(0,r.l)("api",(function(e){const t=V[e]||e,a=Object.getOwnPropertyDescriptor(pe,t);if(a){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r{const i="object"==typeof t&&null!==t?t:{video:t,...a};i.video&&i.video.startsWith("q")&&delete i.video;const{video:n,playlist:r,podcast:o,episode:s,...l}=i,d=(e?v.F:v.N)({videoId:n,playlistId:r,podcastId:o,episodeId:s});d?(window.DMP_CONTEXTUAL_RESPONSE=null,C.AO.emit({...d,refreshConfig:!0,interactionType:ee.bl,videoSettings:l,resetCurrentContent:!0,refreshRecommendations:!0,from:"api",...l})):Ae.warn("player.load ignored, no valid content to load:",i)})),(0,r.l)("setCustConfig",(function(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e||C.jE.emit({persistentCustomConfig:t,temporaryCustomConfig:a,interactionType:ee.bl})})),(0,r.l)("drmConfigured",(function(){let{drmTokenFetchTimeout:t,token:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e||("number"==typeof t&&(0,ce.Sc)(t),"string"==typeof a&&C.OO.emit({drmConfig:{token:a},interactionType:ee.bl}),ce.Zn.value=!0)})),(0,r.l)("respondDrmToken",(function(){let{token:t,requestId:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e||(0,ce.Jt)(a,t)})),(0,r.l)("play",(()=>{C.MB.emit({interactionType:ee.bl})})),(0,r.l)("pause",(()=>{C.zG.emit({interactionType:ee.bl})})),(0,r.l)("togglePlay",(()=>{C.gy.emit({interactionType:ee.bl})})),(0,r.l)("seek",(e=>{const t=parseFloat(e);C.bJ.emit({time:t,interactionType:ee.bl})})),(0,r.l)("watchOnSite",(()=>{const e=(0,i.bh)(),t=e.getState();e.dispatch({type:"PAUSE_REQUESTED",interactionType:ee.bl});const a=(0,b.iq)(t);(0,L.n)(a)})),(0,r.l)("notifyEmbedderURLChanged",(e=>{window.dmp_setEmbedder(e)})),(0,r.l)("catchUserAction",(()=>{y.catchUserAction(pe,window.dm.nodes.video)})),(0,r.l)("notifyPesPipChanged",(t=>{e||(0,i.bh)().dispatch({type:"NOTIFY_PES_PIP_CHANGED",value:t})})),(0,r.l)("notifyPesViewportSizeChanged",(e=>{let{width:t,height:a}=e;window.DMP_VIEWPORT_SIZE.width=t,window.DMP_VIEWPORT_SIZE.height=a})),(0,r.l)("notifyPesPlayerVisibility",(e=>{(0,i.bh)().dispatch({type:"PLAYER_VISIBILITY",value:e})})),(0,r.l)("initPesPipChunk",(()=>{e||(l.C.value=!0)})),(0,r.l)("playerstate",(()=>{const e=(0,i.bh)().getState(),t=X(e);(0,n.Pj)(s.uc,t)})),(0,r.l)("updateNeonTrackingData",(e=>{window.dmp_setNeonTrackingData(e);const{action:t}=window.DMP_NEON_TRACKING_DATA;t&&(0,I.D)(t),Ee.log("Updated from dailymotion.forwardNeonTrackingData(), filtered data:",window.DMP_NEON_TRACKING_DATA)})),(0,r.l)("updatePesAuthToken",(e=>{window.DMP_PES_AUTH_TOKEN=e})),(0,r.l)("updatePesParams",(t=>{let{customConfig:a,loop:n,scaleMode:r}=t;if(e)return;C.jE.emit({persistentCustomConfig:a,interactionType:ee.bl});(0,i.bh)().dispatch({type:"LOOP_CHANGE_REQUESTED",value:n}),(0,te.oo)(r)})),(0,r.l)("ima",(e=>{ie.bZ.emit(e)})),(0,r.l)("speed",(t=>{const a=e?(e=>"number"!=typeof e?1:e>1.5?2:e>1?1.5:e>.5?1:.5)(t):(e=>"number"!=typeof e?1:e>1.75?2:e>1.5?1.75:e>1.25?1.5:e>1?1.25:e>.75?1:e>.5?.75:e>.25?.5:.25)(t);C.xA.emit({speed:a,interactionType:ee.bl})})),(0,r.l)("nativeChromecastStarted",(()=>{window.DMP_CHROMECAST_NATIVE_STARTED=!0,C.tY.emit()})),(0,r.l)("nativeChromecastStopped",(()=>{window.DMP_CHROMECAST_NATIVE_STARTED=!1,C.tY.off()})),(0,r.l)("preload",(e=>{const t=window.dmp_isGKEnabled("PV5_METADATA_PRELOAD");if(Ae.log(`[preload] handler called > GK PV5_METADATA_PRELOAD=${t} > entries=`,e),!t)return;const a=e.map((e=>e?.video)).filter(Boolean);Ae.log(`[preload] dispatching xids > ${a.join(", ")}`),a.length&&window.dmp_preloadMetadata?.(a)})),(0,r.l)("customRecommendations",(t=>{e||(u.Z.switchSuggestedContentToCustom(),C.__.emit(u.Z.get().suggestedContent),C.yq.emit({customRecommendations:t}))})),(0,r.l)("getPreview",(async t=>{let{requestedTimestamp:a,previewWidth:r}=t;if(e)return;const o=(0,i.bh)().getState(),l=X(o),{videoDuration:d}=l,u=oe.Ox.value.media||{},c=oe.Ox.value.info||{},m=u.seeker_url,A=u.filmstrip_url,E=c.aspect_ratio,p=re.SB.value;if(d{C.ZN.emit({state:"collected",eid:e})})),(0,r.l)("cancelAutoskip",(()=>{e||(ue.dT.value=!0)})),(0,n.P7)();{let e;C.mY.on((e=>{(0,n.Pj)(s.eM,{info:e})})),C.T8.on((()=>{t=!1,(0,n.Pj)(s.Qw)})),C.w7.on((e=>{let{metadata:t=null}=e;U=l(t),(0,n.Pj)(s.fd,U)})),C.Ur.on((e=>{let{metadata:t}=e;U=l(t),(0,n.Pj)(s.fd,U)})),C.Iu.on((e=>{let{time:t}=e;t=ge(t),m=t,(0,n.Pj)(O?s.PG:s.MH,{time:t})})),C.CW.on((e=>{let{buffer:t}=e;t=ge(t),A=t,(0,n.Pj)(s.ad,{time:t})}));const i=e=>{const t=ge(e.duration);h=t,(0,n.Pj)(s.aH,{duration:h}),O?(E=h,(0,n.Pj)(s.EJ,{duration:h})):(p=h,(0,n.Pj)(s.qI,{duration:h}))};C.yn.on((e=>{i(e)})),C.PE.on((e=>{let{quality:t}=e;t=t.name,(0,n.Pj)(s.NZ,{quality:t})})),C.gg.on((e=>{let{qualities:t}=e;t=t.map((e=>{let{name:t}=e;return t})),(0,n.Pj)(s.hl,{qualities:t})})),C.fU.on((()=>{(0,n.Pj)(s.jt)}));const r=(t,a)=>{const i=t===c.l_,r=e===c.l_;if(i&&r)return;e=t;const o=i?"allowed":"rejected";let l;l=i?a===c.xo?"allowed_fallback_muted":"allowed":a===c.u_?"rejected_inactive_tab":"rejected_by_browser",(0,n.Pj)(s.PE,{status:o,reason:l})};C.wH.on((e=>{let{status:t,reason:a}=e;r(t,a)})),C.lF.on((()=>{O||(0,n.Pj)(s.Z$)})),C.H5.on((()=>{a=!1,(0,n.Pj)(O?s.WE:s.NH)})),C.Ir.on((()=>{a=!0,(0,n.Pj)(O?s.Ax:s.E7)})),C.Kq.on((()=>{(0,n.Pj)(s.Om)})),C.Gr.on((()=>{(0,n.Pj)(s.Kq)})),C.N9.on((e=>{let{time:t}=e;t=ge(t),_=!0,(0,n.Pj)(s.hL,{time:t})})),C.Gd.on((e=>{let{time:t}=e;t=ge(t),_=!1,(0,n.Pj)(s.kL,{time:t})})),C.gk.on((()=>{(0,n.Pj)(s.hs)})),ie.Sf.on((function(){let{position:e,type:t,adData:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O=!0,(0,n.Pj)(s.DF,{type:t,position:e,adData:a}),(0,n.Pj)(s.TO)})),ie.u4.on((()=>{O=!1,(0,n.Pj)(s.o0)})),ie.Hy.on((()=>{a=!1,(0,n.Pj)(s.WE)})),ie.Js.on((()=>{a=!0,(0,n.Pj)(s.Ax)})),ie.sC.on((e=>{let{vastDuration:t,integrator:a,timeoutInfo:i,position:r,type:o,...l}=e;l.adDuration=t,O=!0,(0,n.Pj)(s.DF,{type:o,position:r,adData:l})})),ie.eB.on((e=>{let{type:t,position:a,reason:i}=e;if(!O&&"REASON_AD_INTERRUPTED"!==i)return;O=!1;const r={type:t,position:a,reason:i?.replace("REASON_","")};if("REASON_AD_ERROR"===i){const e=T.R1?.getAd()?.adError;r.error=e?.message}(0,n.Pj)(s.o0,r)})),ie.$.on((e=>{let{type:t,position:i}=e;a=!0,(0,n.Pj)(s.Rt,{type:t,position:i})})),ie.qz.on((function(){let{adVerifications:e,omSdkParams:t,canNativeAppUseOmSdk:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.Pj)(s.mY,{...a?{verificationScripts:e}:{},...t})})),ie.nY.on((function(){let{adVerifications:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.Pj)(s.mY,{verificationScripts:e})})),ie.W0.on((()=>{(0,n.Pj)(s.TO)})),ie.tH.on((()=>{(0,n.Pj)(s.yj)})),ie.lf.on((()=>{(0,n.Pj)(s.LX)})),ie.av.on((e=>{let{position:t}=e;(0,n.Pj)(s.bo,{position:t})})),ie.Ao.on((e=>{let{position:t}=e;(0,n.Pj)(s.bo,{position:t})})),C.AO.on((()=>{C.fS.off(u),x()}));const l=e=>{if(!e)return null;const t=e.info||{},a=String(e.access_id).substring(0,1);return window.DMP_ONSITE||["x","k"].includes(a)?{createdTime:t.created_at,duration:t.duration,isCreatedForKids:t.is_created_for_kids,ownerId:e.owner?.id,ownerScreenname:e.owner?.screenname,ownerUsername:e.owner?.username,title:t.title,videoId:e.access_id}:{videoId:e.id}},d=()=>{(0,n.Pj)(s.tj),C.fS.on(u)},u=()=>{t=!0,(0,n.Pj)(s.uR),C.fS.off(u)};C.i7.on(d),C.xX.on((()=>{Ae.log("Player loaded"),(0,o.V)(),Ae.log(`trigger '${s.OW.name}'`),(0,n.Pj)(s.OW)})),ie.Ms.on((e=>{let{companionAds:t}=e;(0,n.Pj)(s.Xn,{companionAds:t})})),C.qB.on((e=>{(0,n.Pj)(s.rw,e)})),C.K$.on((()=>{(0,n.Pj)(s.wk)})),ie.MP.on((e=>{(0,n.Pj)(s.zA,e)})),ie.DI.on((e=>{(0,n.Pj)(s.Oc,e)})),ie.bn.on((()=>{(0,n.Pj)(s.Zl)}))}Ae.log("Injecting HTML5 Player..."),function(){if(R()){let e=0;new PerformanceObserver((t=>{t.getEntries().forEach((function(t){"largest-contentful-paint"===t.entryType&&S.log(`LCP: ${Math.round(t.renderTime)}`,t),"layout-shift"===t.entryType&&(e+=t.value,w.log(`CLS: ${e}`,t))}))})).observe({entryTypes:["element","largest-contentful-paint","layout-shift"]})}else D.log("PerformanceObserver (to check CLS/LCP metrics) is not supported in your browser")}(),Ae.log(`Effective locale: ${window.dm.vars.effectiveLocale}`),window.DMP_INLINE_PLAYER_ROOT||(document.documentElement.lang=window.dm.vars.effectiveLocale),window.dm.perf.metric("bootstrapperInjection").end(),window.dm.perf.metric("photonInjection").start();const H=(await Promise.all([window.dm.vars.localeLoadedPromise,_e()]))[1],{initialize:q}=H;await q({initialPodcastId:f.g8,initialEpisodeId:f.e_}),window.dm.metadataUpdatedEventEmitter=C.pC,C.pC.on((()=>{window.dmp_isAdSdkWebEnabled?.()&&(0,T.vs)()})),C.wH.on((()=>{window.dmp_isAdSdkWebEnabled?.()&&(0,T.vs)()})),window.dm.perf.metric("photonInjection").end(),(0,ae.s7)()&&T.R1&&((0,T.vs)(),window.dmp_isLegacyAdSdkEnabled?.()&&(0,P.C)(T.R1.AdEvents,T.R1.adEventEmitter)),(0,d.Yz)(),Ae.log("playerInjector success callback")})()},3692:(e,t,a)=>{"use strict";a.d(t,{Z:()=>S});var i=a(2845),n=a(6679),r=a(3823);var o=a(9371),s=a(2467),l=a(5268),d=a(7966),u=a(2404),c=a(6247);const{device:m,is_dm_network:A}=window.__PLAYER_CONFIG__.context;let E={},p={},h={},g={},_=!1;function v(){E.vmapurl&&p.advertising&&function(){if(A)return!0;return y()}()&&(p.advertising.ad_url=E.vmapurl),E.audienceurl&&A&&(p.info??={},p.info.live_audience_url=E.audienceurl)}function f(e,t){if(window.DMP_CONTEXTUAL_RESPONSE)return{type:"contextual",xid:null,mode:"contextual",embed:!1};const a=(0,c.aI)(t);return a&&d.Hz.value.enableCustomRecommendations?{type:"playlist",xid:t,mode:"playlist_and_custom",embed:null===e&&null!==t}:a&&d.Hz.value.enableAutomaticRecommendations?{type:"playlist",xid:t,mode:"playlist_and_recommended",embed:null===e&&null!==t}:a&&!d.Hz.value.enableAutomaticRecommendations?{type:"playlist",xid:t,mode:"playlist",embed:null===e&&null!==t}:d.Hz.value.enableCustomRecommendations?{type:"custom",xid:null,mode:"custom",embed:!1}:t||d.Hz.value.enableAutomaticRecommendations?E.disable_suggested_content?{type:"auto",xid:null,mode:"deactivated",embed:!0}:{type:"auto",xid:null,mode:"recommended",embed:!0}:{type:"auto",xid:null,mode:"deactivated",embed:!0}}function y(){return A||function(){try{const e=new URL(document.referrer||"");if("string"!=typeof e.hostname)return!1;return new RegExp("(adtester(.*)?\\.dailymotion\\.com)|(ad(-)?tester(.*)?\\.kube\\.dm\\.gg)","gi").test(e.hostname)}catch{return!1}}()}function D(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if("string"==typeof e&&(e=e.split(".")),null==e||0===e.length)return t;if(e.length>1){const i=e.shift();return null!=t[i]?D(e,t[i],a):a}return null!=t[e[0]]?t[e[0]]:a}const S={canBroadcastAdLog:y,get:function(){return{settings:E,metadata:p,suggestedContent:h,volume:g}},getEmbedderHostname:function(){try{if(!window.DMP_EMBEDDER)return null;return new URL(window.DMP_EMBEDDER).hostname||null}catch{return null}},hasMetadata:function(){return 0!==Object.keys(p).length},isVideoSeekable:function(){const e=l.Ox.value,t=e.stream?.stream_type;if(null==t)return!1;if("live"!==t)return!0;const a=0===(e.info?.live_dvr_window||0),i=((0,s.isSafari)()||(0,s.isSafariMobile)())&&m.ua_version<15;return!a&&!i},get metadata(){return p},reset:function(){E={},p={},l.Ox.value={},l.Di.value=!1,h={},g={},u.S2.value=void 0,_=!1,(0,i.D)(void 0)},set:function(e){if(_)throw new Error("Config already set, cannot modify it.");{const t=function(e,t){const a=new URL(e).searchParams,i=(0,n.bC)((0,n.wk)({},(0,n.sV)(window.dmp_parseQueryString(new URL(e).search,!0))),{});r.Fe.value=i.persistentCustomConfig,r.D9.value=i.temporaryCustomConfig;const o={loop:function(e,t){const i=a.get(e);return"true"===i||"false"!==i&&t}("loop",!1),scalemode:function(e,t,i){const n=a.get(e);return t.includes(n)?n:i}("scaleMode",["fit","fill","fillLeft","fillRight","fillTop","fillBottom"],"fit"),start:d("startTime",0),syndication:u("syndicationKey",void 0)};r.A1.value=o.start;const s={api:window.DMP_API_SETTING,embed_index:window.DMP_EMBED_INDEX,id:window.DMP_IFRAME_ID,pubtool:window.DMP_PUBTOOL,sharingUrlLocation:t?.enableSharingUrlLocation?window.DMP_SHARING_URL_LOCATION:void 0},l={vmapurl:u("dmDevVmapUrl",null),audienceurl:u("dmDevAudienceUrl",null)};return function(){const{loop:e,start:t}=o;window.dm.watchtower.notify({name:"dev_monitor"},{extra:{subname:"data_params",loop:e,start:t}})}(),{...o,...s,...l,...function(e){let{autostart:t,enableAdsControls:a,enableAutonext:i,enableChannelLink:n,enableDmLogo:r,enablePlaybackControls:o,enableSharing:s,enableStartscreenDmLink:l,enableTitlesInVideoCards:u,enableVideoTitleLink:c,enableWaitForCustomConfig:m,watermarkImageType:A,watermarkImageUrl:E,watermarkLinkType:p,watermarkLinkUrl:h}=e;return{advertising:{controls:a},apimode:"json",autoplay:window.DMP_IS_AUTOPLAY_ENABLED,autostart:t,autoplay_next:i,channel_link:n,chromecast:{action:"use_built_in"},chromeless:!1,controls:o,fullscreen:{action:"toggle_fullscreen",enable:!0,state:"normal"},pespip:{enable:!1},quality:null,reporting:{enable:!0},sharing:{action:void 0,enable:s},subtitles:{default:void 0},ui:{logo:r,titlesInVideoCards:u,startscreenDmLink:l,watermark_image_type:A,watermark_image_url:E,watermark_link_type:p,watermark_link_url:h},video_title_link:c,watchlater:{action:void 0,enable:!1},endscreen:{enable:!0},waitForCustomConfig:m,origin:window.DMP_TARGET_ORIGIN,emulateHeavyAdsAfterMs:d("dmDevEmulateHeavyAdsAfterDelay",null)}}({...t,...window.DMP_FORCED_SETTINGS})};function d(e,t){const i=a.get(e);return"string"==typeof i&&i.match(/^[0-9.]+$/)?parseInt(i):t}function u(e,t){const i=a.get(e);return"string"==typeof i&&i.length>0?i:t}}(window.DMP_PLAYER_URL,window.__PLAYER_CONFIG__.player);E={...E,...t},(0,o.s7)()||(p={...p,...e.metadata},l.Ox.value=p),h={source:f(window.DMP_INITIAL_VIDEO_ID,window.DMP_INITIAL_PLAYLIST_ID)},g={value:1,muted:d.Hz.value.enableMute},u.S2.value=t.scalemode,p&&!(0,o.s7)()&&v(),_=!0}},setMetadata:function(e){p={...p,...e.metadata},l.Ox.value=p,p&&v()},settings:function(){return D(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,E,arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0)},switchSuggestedContentToCustom:function(){"contextual"===h.source.type&&(h={source:{type:"custom",xid:null,mode:"custom",embed:!1}})},updateMetadata:function(e){p=e,l.Ox.value=p,l.Di.value=!1,v()},updateSuggestedContent:function(e,t){h={source:f(e,t)}},userIsOnSafari:function(){return(0,s.isSafari)()||(0,s.isSafariMobile)()}}},5312:(e,t,a)=>{"use strict";a.d(t,{bl:()=>n,kP:()=>r,xR:()=>i});const i="user",n="api",r="programmatic"},9977:(e,t,a)=>{"use strict";a.d(t,{W:()=>r});const i=(0,a(7638).jl)("Error"),n=e=>{try{localStorage.removeItem(e)}catch(t){i.warn(`[localStorage] Error removing item "${e}":`,t.message)}},r={get:e=>{try{const t=JSON.parse(localStorage.getItem(e)),a=null!=t?t.expires:void 0;return Date.now()<=a?t.data:(n(e),null)}catch(t){return i.warn(`[localStorage] Error getting item "${e}":`,t.message),null}},set:function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:86400;if(null!=t)try{t={expires:Date.now()+1e3*a,data:t},localStorage.setItem(e,JSON.stringify(t))}catch(t){i.warn(`[localStorage] Error setting item "${e}":`,t.message)}},remove:n,clear:()=>{try{localStorage.clear()}catch(e){i.warn("[localStorage] Error clearing storage:",e.message)}}}},3579:(e,t,a)=>{"use strict";a.d(t,{t:()=>n});let i=0;const n={get value(){return i},increment(){i++}}},8323:(e,t,a)=>{"use strict";a.d(t,{HL:()=>n,WB:()=>s,dH:()=>r,mr:()=>i});const i=e=>{if(isNaN(parseInt(e,10)))return"";const{hours:t,minutes:a,seconds:i}=o(e,{padSeconds:!0});return t>0?dm.helpers.i18n("duration.colon.%hours%_%minutes%_%seconds%",{hours:t,minutes:a,seconds:i}):a>0?dm.helpers.i18n("duration.colon.%minutes%_%seconds%",{minutes:a,seconds:i}):dm.helpers.i18n("duration.colon.%minutes%_%seconds%",{minutes:0,seconds:i})};function n(e){const{hours:t,minutes:a,seconds:i}=o(e);return t>0?dm.helpers.i18n("duration.coma.%hours%hours_%minutes%minutes_%seconds%seconds",{hours:t,minutes:a,seconds:i}):a>0?dm.helpers.i18n("duration.coma.%minutes%minutes_%seconds%seconds",{minutes:a,seconds:i}):dm.helpers.i18n("duration.%seconds%seconds",{seconds:i})}function r(e){const t=Math.floor(e/86400),a=e%86400,i=Math.floor(a/3600),n=a%3600,r=Math.floor(n/60),o=Math.floor(n%60);return t?dm.helpers.i18n("duration.space.%days%d_%hours%h_%minutes%m",{days:t,hours:i,minutes:r}):i?dm.helpers.i18n("duration.space.%hours%h_%minutes%m_%seconds%s",{hours:i,minutes:r,seconds:o}):r?dm.helpers.i18n("duration.space.%minutes%m_%seconds%s",{minutes:r,seconds:o}):dm.helpers.i18n("duration.%seconds%s",{seconds:o})}function o(e){let{padSeconds:t=!1,padMinutes:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=parseInt(e,10);const i=Math.floor(e/3600);let n=Math.floor((e-3600*i)/60),r=e-3600*i-60*n;return(i>0||a)&&n<10&&(n=`0${n}`),(n>0||t)&&r<10&&(r=`0${r}`),{hours:i,minutes:n,seconds:r}}const s=e=>Math.floor(1e3*e)},9115:(e,t,a)=>{"use strict";a.d(t,{f:()=>r});const i=(0,a(7638).jl)("CSSLoader"),n={};function r(e,t){if(!e||!t)return;if(n[t])return;i.log(`Injecting style: ${t}`,e);const a=window.document.createElement("style");a.id=t,window.DMP_INLINE_PLAYER_ROOT?(a.textContent=function(e){return e.replace(/:root\s*\{/g,":host {").replace(/html\s*,\s*body\s*\{/g,":host {").replace(/(^|[},\s])body\s*\{/gm,"$1:host {").replace(/@media\s+screen\s+and\s+\(/g,"@container (")}(String(e)),window.DMP_INLINE_PLAYER_ROOT.appendChild(a),function(e,t){const a=e.match(/@font-face\s*\{[^}]*\}/g);if(!a||0===a.length)return;const i=window.document.createElement("style");i.id=`${t}--fonts`,i.textContent=a.join("\n"),window.document.head.appendChild(i)}(String(e),t)):(a.textContent=String(e),window.document.head.appendChild(a)),n[t]=!0}},219:(e,t,a)=>{a.p=window.dm.vars.assetsPath}},e=>{var t=t=>e(e.s=t);return e.O(0,[758,633],(()=>(t(219),t(6774),t(6400),t(5977),t(6983),t(3894),t(2279),t(2413),t(3955)))),e.O()}])));