"use strict";!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([[633],{2467:(e,t,n)=>{n.r(t),n.d(t,{isChromeMobile:()=>_,isDesktop:()=>a,isIos:()=>l,isIphone:()=>u,isSafari:()=>s,isSafariMobile:()=>c,isTv:()=>d});const{type:o,os_family:i,ua_family:r}=window.__PLAYER_CONFIG__.context.device,a=()=>"desktop"===o,d=()=>"tv"===o,l=()=>"iOS"===i,s=()=>"Safari"===r,c=()=>"Safari mobile"===r,_=()=>"Chrome Mobile"===r,u=()=>"mobile"===o&&l()},3958:(e,t,n)=>{n.d(t,{C:()=>s,x:()=>l});var o=n(7966),i=n(5402),r=n(9083),a=n(3940);const d=(0,n(7638).jl)("Player","VideoLoader");function l(){if(!window.dmp_isGKEnabled("PV5_BLOCK_EMPTY_EMBEDDER"))return!1;const e=window.__PLAYER_CONFIG__?.context?.http_referer;if("string"==typeof e&&e.length>0)return!1;if(window.DMP_INLINE_PLAYER_ROOT||window.DMP_IS_NATIVE_APP)return!1;try{if(window.self===window.top)return!1}catch{}return!0}function s(e){const t=e.error||function(e){const t=window.DMP_TOPDOMAIN||"",n=e.owner||{},{id:o="",parent:i=""}="object"==typeof n?n:{};d.log(`Checking embedding restrictions for this video: ownerid=${o}, parent=${i}, embedder=${t}`);if(("x1sc0sv"===o||"x1sc0sv"===i)&&t.indexOf("drollmotion.net")>-1)return{code:r.Kt,title:"Content not Available",message:"",raw_message:"",status_code:403,refresh:0};return null}(e);return o._G.value?(0,i.T)({from:a.IT,code:o._G.value}):t?(0,i.T)({from:a.IS,extra:{metadata:e},...t}):void 0}},5402:(e,t,n)=>{n.d(t,{T:()=>a});var o=n(9083),i=n(3940),r=n(5709);function a(e){let{from:t,type:n,code:a,extra:d,title:l,message:s}=e;return{from:(0,i.P$)(t),type:(0,r.oL)(n,a),code:(0,o.Cq)(a),extra:d,title:l,message:s}}},9083:(e,t,n)=>{n.d(t,{Cq:()=>i,HT:()=>o.API_ERR_PLAYER_NOT_READY,Kt:()=>o.DM016,cv:()=>o.DM003,he:()=>o.PLAYER_ERR_VIDEO_NOT_SUPPORTED,kt:()=>d,rn:()=>o.PLAYER_ERR_UNSUPPORTED_MEDIA_TYPE,sp:()=>o.DM018,uQ:()=>r,xL:()=>o.PLAYER_ERR_WRONG_CONTENT_ID,yR:()=>o.PLAYER_ERR_XHR_CALL_FAILED});var o=n(7764);function i(e){return"404"===e&&(e="DM001"),void 0!==o[e]?e:o.PLAYER_ERR_UNKNOWN}function r(e){switch(e.code){case e.MEDIA_ERR_ABORTED:return o.MEDIA_ERR_ABORTED;case e.MEDIA_ERR_NETWORK:return o.MEDIA_ERR_NETWORK;case e.MEDIA_ERR_DECODE:return o.MEDIA_ERR_DECODE;case e.MEDIA_ERR_SRC_NOT_SUPPORTED:return o.MEDIA_ERR_SRC_NOT_SUPPORTED;default:return o.PLAYER_ERR_UNKNOWN}}const a=[o.MEDIA_ERR_ABORTED,o.AD_DIRECTOR_XHR_CALL_FAILED,o.AD_DIRECTOR_INVALID_VMAP,o.API_ERR_PLAYER_NOT_READY];function d(e){return a.includes(e)}},3940:(e,t,n)=>{n.d(t,{IS:()=>i,IT:()=>o,P$:()=>a,_P:()=>r});const o="context",i="metadata",r="runtime";function a(e){return~[o,i,r].indexOf(e)?e:r}},5709:(e,t,n)=>{n.d(t,{PU:()=>a,oL:()=>l,wI:()=>i});var o=n(9083);const i="LIVE",r="MEDIA",a="password_protected",d="UNKNOWN";function l(e,t){if(~[i,r,a,d].indexOf(e))return e;switch(t){case o.cv:case o.sp:return i;default:return d}}},7764:(e,t,n)=>{n.r(t),n.d(t,{AD_DIRECTOR_INVALID_VMAP:()=>g,AD_DIRECTOR_XHR_CALL_FAILED:()=>y,API_ERR_PLAYER_NOT_READY:()=>D,DM001:()=>o,DM002:()=>i,DM003:()=>r,DM005:()=>a,DM006:()=>d,DM007:()=>l,DM008:()=>s,DM010:()=>c,DM011:()=>_,DM012:()=>u,DM013:()=>w,DM014:()=>p,DM016:()=>m,DM017:()=>E,DM018:()=>P,DM019:()=>f,DM020:()=>h,MEDIA_ERR_ABORTED:()=>A,MEDIA_ERR_DECODE:()=>I,MEDIA_ERR_NETWORK:()=>T,MEDIA_ERR_SRC_NOT_SUPPORTED:()=>b,PLAYER_ERR_CHUNK_LOADING_FAILED:()=>R,PLAYER_ERR_DEVICE_NOT_SUPPORTED:()=>M,PLAYER_ERR_EMPTY_EMBEDDER:()=>j,PLAYER_ERR_HAS_GLOBAL_RESTRICTION:()=>v,PLAYER_ERR_NO_CONTEXTUAL_VIDEO_FOUND:()=>Y,PLAYER_ERR_NO_STREAM:()=>S,PLAYER_ERR_STATUS_DELETED:()=>L,PLAYER_ERR_STATUS_NOT_FOUND:()=>C,PLAYER_ERR_STATUS_SERVER:()=>O,PLAYER_ERR_STREAM_BLOCKED:()=>N,PLAYER_ERR_UNEXPECTED:()=>k,PLAYER_ERR_UNKNOWN:()=>x,PLAYER_ERR_UNSUPPORTED_MEDIA_TYPE:()=>U,PLAYER_ERR_VERSION:()=>G,PLAYER_ERR_VIDEO_NOT_SUPPORTED:()=>$,PLAYER_ERR_WRONG_CONTENT_ID:()=>V,PLAYER_ERR_XHR_CALL_FAILED:()=>F,PLAYER_PAYMENT_TYPE_NOT_SUPPORTED:()=>K,QUALITY_SWITCHER_ERROR:()=>B,SSAI_SESSION_INIT_ERROR:()=>z,STREAMING_MANIFEST_LOAD_ERROR:()=>H,STREAMING_QUALITY_LOAD_ERROR:()=>q});const o="DM001",i="DM002",r="DM003",a="DM005",d="DM006",l="DM007",s="DM008",c="DM010",_="DM011",u="DM012",w="DM013",p="DM014",m="DM016",E="DM017",P="DM018",f="DM019",h="DM020",g="AD_DIRECTOR_INVALID_VMAP",y="AD_DIRECTOR_XHR_CALL_FAILED",D="API_ERR_PLAYER_NOT_READY",A="MEDIA_ERR_ABORTED",I="MEDIA_ERR_DECODE",T="MEDIA_ERR_NETWORK",b="MEDIA_ERR_SRC_NOT_SUPPORTED",R="PLAYER_ERR_CHUNK_LOADING_FAILED",M="PLAYER_ERR_DEVICE_NOT_SUPPORTED",v="PLAYER_ERR_HAS_GLOBAL_RESTRICTION",S="PLAYER_ERR_NO_STREAM",L="PLAYER_ERR_STATUS_DELETED",C="PLAYER_ERR_STATUS_NOT_FOUND",O="PLAYER_ERR_STATUS_SERVER",N="PLAYER_ERR_STREAM_BLOCKED",k="PLAYER_ERR_UNEXPECTED",x="PLAYER_ERR_UNKNOWN",U="PLAYER_ERR_UNSUPPORTED_MEDIA_TYPE",G="PLAYER_ERR_VERSION",$="PLAYER_ERR_VIDEO_NOT_SUPPORTED",V="PLAYER_ERR_WRONG_CONTENT_ID",F="PLAYER_ERR_XHR_CALL_FAILED",Y="PLAYER_ERR_NO_CONTEXTUAL_VIDEO_FOUND",j="PLAYER_ERR_EMPTY_EMBEDDER",K="PLAYER_PAYMENT_TYPE_NOT_SUPPORTED",B="QUALITY_SWITCHER_ERROR",H="STREAMING_MANIFEST_LOAD_ERROR",q="STREAMING_QUALITY_LOAD_ERROR",z="SSAI_SESSION_INIT_ERROR"},7638:(e,t,n)=>{n.d(t,{Q6:()=>h,wG:()=>f,jl:()=>p,B1:()=>E,hn:()=>m,u0:()=>g,C5:()=>P});const o={Airplay:{color:"#007AFF:white"},API:{color:"#e10098:white"},AdNonLinearBreak:{color:"gold"},AdSdkWeb:{color:"goldenrod"},AdStackDM:{color:"goldenrod",children:{VAST:{color:"goldenrod",children:{ElementShield:{color:"lemonchiffon"},IMAIntegrator:{color:"goldenrod"},IMANativeIntegrator:{color:"goldenrod"},SkipHandler:{color:"goldenrod"},VPAID:{color:"lemonchiffon"}}}}},Ads:{color:"orange",children:{CookieSync:{color:"goldenrod"},GlobalTimeout:{color:"darkgoldenrod"},HeavyAds:{color:"white"},IMASdkHandler:{color:"goldenrod"},ParallelAdCalls:{color:"gold"}}},AttentionPeaks:{color:"midnightblue:white"},AudienceBroker:{color:"chocolate:white"},Autoskip:{color:"pink:black"},Bootstrapper:{color:"#e10098:white",children:{API:{color:"#e10098"}}},CSSLoader:{color:"blue:white"},Chromecast:{color:"#a9a9a9",children:{GoogleAPI:{color:"gray"},Injector:{color:"gray"},Sender:{color:"gray"}}},Consent:{color:"tan"},ContextualEmbed:{color:"#98cc2d"},EID:{color:"blue:white"},Error:{color:"crimson:white"},ExceptionLogger:{color:"orange"},GraphQL:{color:"#e10098:white"},Infopack:{color:"blue:white"},Mediafile:{color:"royalblue:white",children:{IntegratorProxy:{color:"dodgerblue:white"}}},NeonData:{color:"#00cef4:white"},Nielsen:{color:"gray:yellow"},Perf:{color:"orange"},PerfBasics:{color:"orange",children:{LCP:{color:"#f5f5f5"},CLS:{color:"#d3d3d3"}}},Player:{color:"orange",children:{AdEventsAdapter:{color:"pink"},Autoplay:{color:"orange"},PlayerDataLayer:{color:"lemonchiffon"},Scheduler:{color:"gold",children:{AdLinearBreak:{color:"gold"},AdsFetching:{color:"cornflowerblue:white"},AdsScheduling:{color:"goldenrod"}}},PreloadManager:{color:"teal:white"},VideoLoader:{color:"brown:white"},MetadataLoader:{color:"brown:white"}}},PosterSooner:{color:"pink:green"},Preloading:{color:"green:white"},Quality:{color:"#ff4040:white",children:{DynamicQuality:{color:"#cd3333:white"},HLS:{color:"pink"},StaticQuality:{color:"#ee3b3b:white"},DRM:{color:"#8b0000:white"}}},Services:{color:"darkviolet"},Stats:{color:"green:white",children:{Emitter:{color:"lawngreen"},EventBus:{color:"lawngreen"},IAS:{color:"greenyellow"},Omsdk:{color:"seagreen:white"}}},StreamIntegrator:{color:"goldenrod"},StreamSimidIntegrator:{color:"goldenrod"},Tracking:{color:"darkgreen:white"},UI:{color:"lightsalmon",children:{Filmstrip:{color:"lightskyblue"},Gradient:{color:"#f5cac3"},MediaSession:{color:"rebeccapurple:white"},Spinner:{color:"gold"}}},VAST:{color:"goldenrod",children:{AryaProxy:{color:"lemonchiffon"}}},VPAIDIntegrator:{color:"goldenrod"},Video:{color:"blue:white",children:{Ads:{color:"orange"},Buffering:{color:"dodgerblue:white"}}},VideoSlot:{color:"deepskyblue"},ViewId:{color:"palevioletred"},Watchtower:{color:"#e72f08:white"},Chapters:{color:"green"}},i=window.__PLAYER_CONFIG__,r=i?.context?.is_dm_network,a=800,d=500,l=19e5,s=function(){const e=[];i&&i.context&&(e.push(i.context.envFrontend),e.push(i.context.envGeo));window.DMP_APP&&e.push(window.DMP_APP);window.DMP_EMBEDDER&&e.push(window.dmp_getHostname(window.DMP_EMBEDDER));i&&i.player&&i.player.id&&e.push(`Player:${i.player.id}`);window.DMP_INITIAL_VIDEO_ID&&e.push(`Video:${window.DMP_INITIAL_VIDEO_ID}`);window.DMP_INITIAL_PLAYLIST_ID&&e.push(`Playlist:${window.DMP_INITIAL_PLAYLIST_ID}`);i&&i.context&&(e.push(i.context.device.type),e.push(i.context.device.ua_name),e.push(i.context.device.os_name));return e.join("/").replace(/ /g,"-")}(),c="__dmp_globals_logger";let _;window[c]?_=window[c]:(_={remoteConsoleQueueTimeout:null,remoteConsoleEnabled:!1,remoteConsoleQueue:[],loggerConfig:{logger:"",source:null}},window[c]=_);const u={};["log","error","warn","group","groupCollapsed","groupEnd","table"].forEach((e=>{u[e]=window.console[e],window.console[e]=function(){for(var t=arguments.length,n=new Array(t),o=0;o0;){const n=_.remoteConsoleQueue.shift();try{const o=JSON.stringify(n);if(t+=o.length,t>=l){_.remoteConsoleQueue.unshift(n);break}e.push(o)}catch(e){const t=`Could not encode remote log (${e.message})`;u.warn(t,n),_.remoteConsoleQueue.push({playerId:s,method:"warn",args:[t]})}}const n={method:"POST",body:`{"playerId":"${s}","commands":[${e.join(",")}]}`,headers:{"Content-Type":"application/json"}};window.fetch("https://playerlab.k8s.dm.gg/remoteconsole",n).catch((function(e){u.warn("Could not post remote console payload",e.message)})).finally((function(){y()}))}function A(e){const t=document.createElement("div"),n={position:"absolute",zIndex:10,top:0,left:"0.75rem",right:"0.75rem",padding:"0.5rem 0.75rem 0.4375rem 0.75rem",color:"#ffffff",fontFamily:"Helvetica, sans-serif",fontSize:"0.875rem",fontWeight:"bold",background:"red",borderRadius:"0.25rem",borderTopLeftRadius:0,borderTopRightRadius:0,textAlign:"center",cursor:"n-resize"};for(const e in n)t.style[e]=n[e];t.innerText=e,t.innerHTML+=`
${s.replace(/\//g," / ")}
`,document.body.appendChild(t);const o=setTimeout((()=>{document.body.removeChild(t)}),8e3);t.addEventListener("click",(e=>{e.preventDefault(),clearTimeout(o),document.body.removeChild(t)}))}function I(e,t,n){const i="border-radius: 0.125rem; padding: 0.0625rem 0.1875rem; margin: 0 0.0625rem; color: white;",a=[];if(n){if(w<2){let e="%cDM";for(let n=0;n0?a:void 0)}function T(e,t){_.remoteConsoleQueue.push({playerId:s,method:e,args:Array.prototype.slice.call(t)}),_.remoteConsoleQueue.length>d&&_.remoteConsoleQueue.shift()}function b(e){const t=_.loggerConfig.logger.split(",");e=e.map((e=>e.toLowerCase()));const n=t.filter((e=>!e.startsWith("-"))).map((e=>e.toLowerCase())),o=t.filter((e=>e.startsWith("-"))).map((e=>e.substring(1).toLowerCase()));return!e.find((e=>o.includes(e)))&&!(!e.find((e=>n.includes(e)))&&!n.includes("1"))}window.addEventListener("error",(function(e){if(!e||"object"!=typeof e)return;const t={url:e.filename,line:e.lineno,column:e.colno};T("error",[`Error: ${e.message}`,t])})),window.addEventListener("unhandledrejection",(function(e){if(!e||!e.reason||"object"!=typeof e.reason)return;const t={url:e.reason.fileName,line:e.reason.lineNumber,column:e.reason.columnNumber};T("error",[`Uncaught rejection: ${e.reason.message}`,t])})),r&&function(){try{const e=new URL(window.DMP_PLAYER_URL).searchParams;return["1","true"].includes(e.get("dmDevRemoteConsole")||"")}catch{return!1}}()&&f()},7966:(e,t,n)=>{n.d(t,{Hz:()=>i,NV:()=>a,W3:()=>r,_G:()=>d});var o=n(2328);const i=(0,o.td)({}),r=(0,o.td)(!1),a=(0,o.td)({metrics:{}}),d=(0,o.td)(null)},6247:(e,t,n)=>{function o(e){return"string"==typeof e&&e.match(/^[kqx][a-zA-Z0-9-_]+$/)}function i(e){return"string"==typeof e&&e.match(/^x[a-zA-Z0-9]+$/)}function r(e){return"string"==typeof e&&e.match(/^x[a-zA-Z0-9]+$/)}n.d(t,{Cv:()=>o,aI:()=>r,sK:()=>i})},1918:(e,t,n)=>{function o(e){let{videoId:t,playlistId:n,podcastId:o,episodeId:i}=e;return!o||t||n?null:{podcastId:o,episodeId:i||null}}function i(e){let{videoId:t,playlistId:n,podcastId:o,episodeId:i}=e;return o||i?null:{videoId:t,playlistId:n}}n.d(t,{F:()=>o,N:()=>i})},5382:(e,t,n)=>{n.r(t);var o=n(8050);window.__PLAYER_CONFIG__?.player&&(window.__PLAYER_CONFIG__.player=(0,o.j)(window.__PLAYER_CONFIG__.player));var i=n(7638);const r=(0,i.jl)("Error");function a(){return"https:"===window.location.protocol}window.dmp_readCookie=e=>{try{const t=window.document.cookie.split(";").map((e=>e.trim().split(/=(.*)/))).find((t=>{let[n]=t;return n===e}));return t?.[1]||null}catch(t){return r.warn(`[cookies] Error reading cookie "${e}":`,t.message),null}},window.dmp_writeCookie=(e,t,n)=>{try{const{path:o,domain:i,maxAge:r,samesite:d,secure:l}={path:"/",samesite:!!a()&&"none",secure:a(),...n},s=[`${e}=${t}`,o?`path=${o}`:null,i?`domain=${i}`:null,r?`max-age=${r}`:null,d?`samesite=${d}`:null,l?`secure=${l}`:null];document.cookie=s.join(";")}catch(t){r.warn(`[cookies] Error writing cookie "${e}":`,t.message)}},window.dmp_removeCookie=e=>{try{const t=[`${e}=`,"path=/","max-age=0"];document.cookie=t.join(";")}catch(t){r.warn(`[cookies] Error removing cookie "${e}":`,t.message)}};var d=n(3529),l=n(1128);const s=e=>performance.getEntriesByType&&performance.getEntriesByType("navigation").length>0?performance.getEntriesByType("navigation")[0][e]:performance.timing?performance.timing[e]-performance.timing.navigationStart:null,c=(e,t)=>{if("number"!=typeof e||"number"!=typeof t)return null;const n=t-e;return n<0?null:Math.round(n)},_=()=>{const e={cache_hits:-1,max_response_end:-1,cache_hit:{locale:null,photon_vendor:null,hlsjs:null,hlsjs_newer:null,photon_boot:null,photon_app:null,photon_player:null}},t={locale:/\/dmp.locale-[a-z]+(-[A-Z]+)?(\.dev)?(\.[0-9a-f]+)?.json/,photon_vendor:/\/dmp\.photon_vendor(\.[0-9a-f]+)?\.js/,hlsjs:/\/dmp\.hlsjs(\.[0-9a-f]+)?\.js/,hlsjs_newer:/\/dmp\.hlsjs_newer(\.[0-9a-f]+)?\.js/,photon_boot:/\/dmp\.photon_boot(\.[0-9a-f]+)?\.js/,photon_app:/\/dmp\.photon_app(\.[0-9a-f]+)?\.js/,photon_player:/\/dmp\.photon_player(\.[0-9a-f]+)?\.js/};if(window.PerformanceResourceTiming&&"transferSize"in PerformanceResourceTiming.prototype){const n={};performance.getEntriesByType("resource").forEach((e=>{const t=new URL(e.name).href;n[t]=e}));const o=Object.keys(t);let i=0,r=0;o.forEach((o=>{const a=t[o],d=Object.keys(n).find((e=>e.match(a)));if(e.cache_hit[o]="unknown",d){const t=n[d];i++;const a="deliveryType"in(l=t)&&"cache"===l.deliveryType||0===l.transferSize&&l.decodedBodySize>0?"hit":l.transferSize>0&&l.encodedBodySize>0&&l.transferSize0&&l.transferSize>=l.encodedBodySize?"miss":l.duration<20?"hit":"miss";"hit"===a&&r++,e.cache_hit[o]=a;const s=Math.round(t.responseEnd);s>e.max_response_end&&(e.max_response_end=s)}var l})),e.cache_hits=-1;const a=o.length-1;i===a&&(e.cache_hits=Math.round(100*r/i))}return e},u=()=>{const e=performance.now();window.dmp_onVisibilityChange(null,e);let t=0;const n=window.dmp_visibilityStatesHistory;for(let e=0;e100?null:o},w=function(){let{time:e=null,context:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null===e&&(e=performance.now()),null===t&&(t=window.DMP_INLINE_PLAYER_ROOT?"page":"iframe"),!window.DMP_IS_PES)return Math.round(e);if("page"===t)return Math.round(e-window.DMP_PES_PERF.requestStart);const n=window.performance.timeOrigin||0;return Math.round(n+e-(window.DMP_PES_PERF.pageTimeOrigin+window.DMP_PES_PERF.requestStart))},p=e=>w(e);let m=null;(0,l.N2)((()=>w()));const E={defineMetric:l.Tc,metric:l.oF,getMetricsSnapshot:l.WT,getRelativeTimeSincePlayerOrigin:w,getEventBusPayload:()=>{const{t_html_dns:e,t_html_tcp:t,t_html_tls:n,t_html_connection:o,t_html_response_start_end:i}=(()=>{const e=c(s("domainLookupStart"),s("domainLookupEnd")),t=s("secureConnectionStart");let n=null,o=null;return t>0&&(n=c(s("connectStart"),t),o=c(t,s("connectEnd"))),{t_html_dns:e,t_html_tcp:n,t_html_tls:o,t_html_connection:c(s("connectStart"),s("connectEnd")),t_html_response_start_end:c(s("responseStart"),s("responseEnd"))}})(),r=(0,l.uj)("metadataLoad"),a=(0,l.uj)("playerScripts"),d=(0,l.uj)("photonInjection"),w=(0,l.uj)("initAdSdks"),p=(0,l.uj)("imaIframeCallback");return{data_center:window.__PLAYER_CONFIG__.context.data_center,t_html_dns:e,t_html_tcp:t,t_html_tls:n,t_html_connection:o,t_html_response_start_end:i,iframe_nav:{request:Math.round(s("requestStart")),response_start:Math.round(s("responseStart")),response_end:Math.round(s("responseEnd")),dom_interactive:Math.round(s("domInteractive")),dom_content_loaded:Math.round(s("domContentLoadedEventStart")),dom_complete:Math.round(s("domComplete"))},iframe_custom:{metadata_load_start:r?r.start:null,metadata_load_end:r?r.end:null,network_script_start:a?a.start:null,network_script_end:a?a.end:null,player_injection_start:d?d.start:null,player_injection_end:d?d.end:null,init_ad_sdks:w?w.start:null,ima_iframe_callback:p?p.start:null},resource_data:_(),visibility_index:u()}},setLoadVideoOrigin:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now();m=e},getRelativeTimeSinceLoadVideo:()=>null===m?null:Math.floor(performance.now()-m)};window.dm.perf=E,window.DMP_IS_PES&&((0,l.Tc)("pesRequest",{description:"PES request (from PES fetch start to JS execution start)",color:"#0d47a1",initialRun:{start:0,end:p({time:window.DMP_PES_PERF.requestEnd,context:"page"})}}),(0,l.Tc)("pesInit",{description:"PES init (from PES execution start to API ready to inject a player)",color:"#1565c0",initialRun:{start:p({time:window.DMP_PES_PERF.initStart,context:"page"}),end:p({time:window.DMP_PES_PERF.initEnd,context:"page"})}})),(0,l.Tc)("playerRequest",{description:"From player injection in DOM to player.html execution start",color:"#ed6c02",initialRun:{start:null!==window.DMP_PES_PERF.playerRequestStart?p({time:window.DMP_PES_PERF.playerRequestStart,context:"page"}):0,end:p({time:window.DMP_PERF_PLAYER_REQUEST_END})}}),(0,l.Tc)("playerInit",{description:"From player.html top to bottom (scripts preload & injection, styles...)",color:"#7b1fa2",initialRun:{start:p({time:window.DMP_PERF_PLAYER_INIT_START})}}),(0,l.Tc)("playerScripts",{description:"Script tags in player.html",color:"#8e24aa",initialRun:{start:p({time:window.DMP_PERF_PLAYER_SCRIPTS_START})}}),(0,l.Tc)("metadataLoad",{description:"Video metadata fetch",color:"#6a1b9a"}),(0,l.Tc)("bootstrapperInjection",{description:"From photon_boot execution start to photon_app being ready to load",color:"#7986cb"}),(0,l.Tc)("photonInjection",{description:"photon_app JS chunk load and execution",color:"#5c6bc0"}),(0,l.Tc)("initAdSdks",{description:"Ad SDK load and setup",color:"#b71c1c"}),(0,l.Tc)("imaIframeCallback",{description:"IMA SDK initialization",color:"#c62828"}),(0,l.Tc)("autoplayResolution",{description:"Browser autoplay policy probe (muted vs unmuted)",color:"#ab47bc"}),(0,l.Tc)("vmapLoad",{description:"VMAP fetch and parse",color:"#d32f2f"}),(0,l.Tc)("adPrerollToImpression",{description:"Preroll ad stack start to AD_IMPRESSION (legacy) or AD_START (Ad SDK Web), or AD_ERROR",color:"#e53935",maxDuration:3e4}),(0,l.Tc)("playbackReadyToPlay",{description:"Playback ready until play is requested (autoplay or user/API)",color:"#ff8f00",maxDuration:3e5}),(0,l.Tc)("hlsMasterPlaylistLoad",{description:"HLS multivariant (master) playlist load",color:"#00695c"}),(0,l.Tc)("hlsMediaPlaylistLoad",{description:"HLS media playlist load",color:"#00838f"}),(0,l.Tc)("hlsFirstSegmentReady",{description:"HLS first media segment ready in buffer",color:"#26a69a",maxDuration:3e4}),(0,l.Tc)("hlsDrmLicenseLoad",{description:"HLS first DRM license request (request to response)",color:"#7e57c2",maxDuration:15e3}),(0,l.Tc)("hlsFetchDrmToken",{description:"DRM token retrieval with PES fetchDrmToken public method",color:"#9575cd",maxDuration:15e3});const P=(0,i.jl)("ExceptionLogger");function f(e){let{message:t="no message",url:n="no url",line:o=-1,column:i=-1}=e;window.dmp_sendEarlyEvent("life_cycle.errorPlayer",{error_from:"runtime",error_displayed:!1,error_message:`${t} at ${n}:${o}:${i}`,error_code:"PLAYER_ERR_JS_EXCEPTION"})}window?.__PLAYER_CONFIG__?.dmInternalData?.gatekeepers?.includes("PV5_LOG_EXCEPTIONS")&&(P.log("Listening for errors & unhandled rejections"),window.addEventListener("error",(function(e){if(!e||"object"!=typeof e)return;P.log("Caught error",e),f({message:e.message,url:e.filename,line:e.lineno,column:e.colno})})),window.addEventListener("unhandledrejection",(function(e){if(!e||!e.reason||"object"!=typeof e.reason)return;P.log("Caught unhandled promise rejection",e),f({message:e.reason.message,url:e.reason.fileName,line:e.reason.lineNumber,column:e.reason.columnNumber})})));const h=(0,i.jl)("Player"),g="en-US";let y=null;window.dm.helpers.i18n=(e,t)=>{let n=y&&y[e]?y[e]:e;if(t)for(const e in t){const o=t[e];n=n.replace(`%${e}%`,o)}return n};let D={};try{D={ar:"dmp.locale-ar.73d0b44ed72f9c5a79cc.json",de:"dmp.locale-de.8cce66fa67aba4700cbd.json","en-GB":"dmp.locale-en-GB.3300ad083523b7d8f4a9.json","en-US":"dmp.locale-en-US.64e7b129d1c22a801e14.json",en:"dmp.locale-en.64e7b129d1c22a801e14.json","es-ES":"dmp.locale-es-ES.2646507848395a094caf.json",es:"dmp.locale-es.2afeb6aa77c6c64abf10.json",fr:"dmp.locale-fr.a5109eb39bac560b652a.json",id:"dmp.locale-id.d491605b556ae9ba05db.json",it:"dmp.locale-it.7caa02b90ca23eb3027d.json",ja:"dmp.locale-ja.39401ab037ceac55a154.json",ko:"dmp.locale-ko.8c0c0c1f19c75e224d57.json",ms:"dmp.locale-ms.633e21a6fafc94737473.json","pt-BR":"dmp.locale-pt-BR.cac1f32764bf42283a02.json",pt:"dmp.locale-pt.4577a308de45759f5dc5.json",th:"dmp.locale-th.845d29b7c035f7c37164.json",tr:"dmp.locale-tr.4c8163b589ae9dfc1ab7.json",vi:"dmp.locale-vi.f104985585e6619d2100.json","zh-TW":"dmp.locale-zh-TW.6cdf4d22b0551e676c07.json",zh:"dmp.locale-zh.4360751e2a45bedbcf1d.json"}}catch(e){}const A=window.navigator.languages||[window.navigator.language||g],I=function(e){if("string"!=typeof e)return null;if(!window.__PLAYER_CONFIG__||!window.__PLAYER_CONFIG__.context.is_dm_network)return null;const t=e.match(new RegExp("[?&]dmDevLocale=([^&]+)"));return t&&t[1]?t[1]:null}(new URL(window.DMP_PLAYER_URL).search);window.dm.vars.effectiveLocale=function(e,t,n){"string"==typeof n&&(t=[n]);for(let n=0;n1&&(o=`${i[0].toLowerCase()}-${i[1].toUpperCase()}`),e.indexOf(o)>-1)return o;if(i.length>1&&e.indexOf(i[0])>-1)return i[0]}return g}(Object.keys(D),A,I),window.dm.vars.effectiveLocaleShort=window.dm.vars.effectiveLocale.slice(0,2).toLowerCase(),window.dm.vars.localeLoadedPromise=async function(){try{const e=window.dm.vars.localesPath+D[window.dm.vars.effectiveLocale],t=await window.fetch(e);y=await t.json()}catch(e){h.error("Error when loading translations",e)}}();var T=n(7966);let b;b=window.DMP_INLINE_PLAYER_ROOT?window.DMP_INLINE_PLAYER_ROOT:document;const R=b.querySelector(".spinner"),M=b.querySelector(".spinner_label"),v=b.querySelector(".spinner_image"),S=b.querySelector(".spinner_background"),L=b.querySelector(".spinner_label_sr"),C=(0,i.jl)("UI","Spinner");let O=null,N=null;function k(e){const t=(e=e||{}).readyForExtendedMode,n=e.label,o=e.labelEnabled;if(t&&n&&o)M.textContent=n,M.style.opacity="100%",M.style.transitionDelay="200ms",M.style.transitionDuration="1ms",v.style.transitionDuration="200ms",v.style.transform="translateX(0%)",S.style.transform="scaleX(1)",S.style.opacity="100%",S.style.borderRadius="6.25rem",S.style.transitionDuration="200ms";else{M.textContent="";const e=R.getBoundingClientRect().width,t=R.getBoundingClientRect().height/e,n=v.getBoundingClientRect().height,o=.5*e-.5*n-.5*(e*t-n);M.style.opacity="0%",M.style.transitionDelay="0ms",M.style.transitionDuration="0ms",v.style.transitionDuration="0ms",S.style.opacity="0%",S.style.transitionDuration="0ms",S.style.transform=`scaleX(${t})`,v.style.transform=`translateX(${o}px)`,S.style.borderRadius="50%"}}window.dm.spinner={_reasonsToKeepHidden:[],_reasonsToDisplay:[],readyForExtendedMode:!1,labelEnabled:!0,isDisplayed:!1,label:null,onDisplayChange(){},addReasonToDisplay(e){-1===this._reasonsToDisplay.indexOf(e)&&this._reasonsToDisplay.push(e),this._render()},removeReasonToDisplay(e){const t=this._reasonsToDisplay.indexOf(e);-1!==t&&this._reasonsToDisplay.splice(t,1),this._render()},addReasonToKeepHidden(e){-1===this._reasonsToKeepHidden.indexOf(e)&&this._reasonsToKeepHidden.push(e),this._render()},removeReasonToKeepHidden(e){const t=this._reasonsToKeepHidden.indexOf(e);-1!==t&&this._reasonsToKeepHidden.splice(t,1),this._render()},_render(){if(C.log("render _reasonsToKeepHidden",this._reasonsToKeepHidden),C.log("render _reasonsToDisplay:",this._reasonsToDisplay),!T.Hz.value.enableSpinner||this._reasonsToKeepHidden.length>0)this.isDisplayed&&(clearTimeout(O),clearTimeout(N),this.readyForExtendedMode=!1,this.label=null,k({readyForExtendedMode:this.readyForExtendedMode}),R.style.visibility="hidden",R.classList.remove("spinner--visible"),L.textContent="",this.isDisplayed=!1,this.onDisplayChange(!1));else{if(this._reasonsToDisplay.length>0){const e={loadingvideo:dm.helpers.i18n("loading.loading_video"),retrievingad:dm.helpers.i18n("loading.retrieving_ad"),buffering:dm.helpers.i18n("loading.buffering")};return this.label=e[this._reasonsToDisplay.slice(-1).pop()],this.isDisplayed||(this.isDisplayed=!0,this.onDisplayChange(!0),O=setTimeout(function(){R.style.visibility="visible",R.classList.add("spinner--visible"),L.textContent=dm.helpers.i18n("terms.loading")}.bind(this),200),this.readyForExtendedMode||(N=setTimeout(function(){this.readyForExtendedMode=!0,k({readyForExtendedMode:this.readyForExtendedMode,label:this.label,labelEnabled:this.labelEnabled})}.bind(this),4500))),void k({readyForExtendedMode:this.readyForExtendedMode,label:this.label,labelEnabled:this.labelEnabled})}this.isDisplayed&&(clearTimeout(O),clearTimeout(N),this.readyForExtendedMode=!1,this.label=null,R.style.visibility="hidden",R.classList.remove("spinner--visible"),L.textContent="",k({readyForExtendedMode:this.readyForExtendedMode}),this.isDisplayed=!1,this.onDisplayChange(!1))}}},k({readyForExtendedMode:window.dm.spinner.readyForExtendedMode,label:window.dm.spinner.label,labelEnabled:window.dm.spinner.labelEnabled}),window.addEventListener("resize",(function(){k({readyForExtendedMode:window.dm.spinner.readyForExtendedMode,label:window.dm.spinner.label,labelEnabled:window.dm.spinner.labelEnabled})}));const x=(0,i.jl)("PosterSooner"),U=(e,t,n)=>{x.log(`player size = ${t}x${n}`);const o=Object.keys(e);if(0===o.length)return null;const i=(e=>{let{availableHeights:t,playerSizeWidth:n,playerSizeHeight:o}=e;return t.find((e=>{if(n>o){return 1.7777777777777777*e>=n*(window.devicePixelRatio||1)}return e>=o*(window.devicePixelRatio||1)}))||t[t.length-1]})({availableHeights:o.map(Number).sort(((e,t)=>e-t)),playerSizeHeight:n,playerSizeWidth:t});return e[i]},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.DMP_IS_PES){(window.DMP_INLINE_PLAYER_ROOT?window:window.parent).postMessage(JSON.stringify({event:"poster_sooner",id:window.DMP_IFRAME_ID}),window.DMP_TARGET_ORIGIN)}const n=window.dm.nodes.player?.getBoundingClientRect()||0,o=Math.floor(n.width),i=Math.floor(n.height);window.dm.nodes.posterImage.src=U(e,o,i),window.dm.posterSooner.thumbnailUrl=t?"":window.dm.nodes.posterImage.src,window.dm.nodes.posterImage.onload=()=>{if(window.dm.nodes.posterImage.style.display="block",window.dm.nodes.poster.style.display="block",window.DMP_IS_PES){(window.DMP_INLINE_PLAYER_ROOT?window:window.parent).postMessage(JSON.stringify({event:"posterdisplay",id:window.DMP_IFRAME_ID}),window.DMP_TARGET_ORIGIN)}x.log(`${t?"First frame url displayed:":"Thumbnail url displayed:"} ${window.dm.nodes.posterImage.src}`)}},$=()=>{window.dm.nodes.posterImage.src="data:,",window.dm.nodes.posterImage.style.display="none",window.dm.nodes.poster.style.display="none",x.log("Poster sooner is removed")};"audio"!==window.__PLAYER_CONFIG__?.player?.type&&(window.dm.posterSooner={displayPosterSooner:G,removePosterSooner:$,getAndStorePosterUrlResolution:U,thumbnailUrl:null});var V=n(6918);window.dmp_sendEarlyEvent=(e,t)=>{const n=window.__PLAYER_CONFIG__,o=(0,i.jl)("Stats","EventBus"),r=(0,i.jl)("NeonData");if(void 0!==n){const i=n.context,a=n.player,d={};a&&window.DMP_PLAYER_SETTINGS&&window.DMP_PLAYER_SETTINGS.forEach((e=>{let{key:t,trackableKey:n}=e;null!==n&&(d[n]=a[t])}));const l=window.DMP_EMBED_INDEX,s={name:e,version:"1.0",data:{context:{screen:`${window.screen.availWidth}x${window.screen.availHeight}`,visitor_group:window.DMP_VISITOR_GROUP},created_ts:Date.now(),info:{app:{id:window.DMP_APP,is_native:window.DMP_IS_NATIVE_APP,type:window.DMP_CLIENT_TYPE,sdk_version:window.DMP_SDK_VERSION},browser:{locale:window.dm.vars.effectiveLocale,os_family:i.device.os_family,os_name:i.device.os_name,ua_family:i.device.ua_family,ua_name:i.device.ua_name,ua_version:i.device.ua_version,user_agent:window.navigator.userAgent,cookies_available:window.DMP_COOKIES_3RD_PARTY_AVAILABLE},device:{type:i.device.type,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},player:{config:d,embedder:window.DMP_EMBEDDER,embedder_hostname:window.dmp_getHostname(window.DMP_EMBEDDER),env:i.envFrontend,instance_uuid:window.DMP_INSTANCE_UUID,secure:!0,topdomain:window.DMP_TOPDOMAIN.length>0?window.DMP_TOPDOMAIN:null,version:window.dm.vars.playerVersion,x_requested_with:i.http_x_requested_with.length>0?i.http_x_requested_with:null},view:{video_index:0,is_fullscreen:!1,display_mode:"regular",is_active_tab:"visible"===document.visibilityState},visitor:{as_number:i.as_number,continent:i.continent,country:i.country,id:window.DMP_V1ST,onsite:window.DMP_ONSITE,referer:window.DMP_REFERER,region:i.region,timezone_offset:(0,V.pQ)(),traffic_segment:window.DMP_TS}},settings:{api:window.DMP_API_SETTING||"false",autoplay:window.DMP_IS_AUTOPLAY_ENABLED,controls:T.Hz.value.enablePlaybackControls,embed_index:parseInt(l)||null,pubtool:window.DMP_PUBTOOL},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}}};if(void 0!==i.publisher_xid&&(s.data.info.publisher={xid:i.publisher_xid,type:i.publisher_type}),window.DMP_NEON_TRACKING_DATA?.info&&(r.log("Updated from dailymotion.forwardNeonTrackingData(), filtered data:",window.DMP_NEON_TRACKING_DATA),s.data.info.landing={id:window.DMP_NEON_TRACKING_DATA.info?.landing.id},s.data.info.visitor.visit_id=window.DMP_NEON_TRACKING_DATA.info?.visitor.visit_id,s.data.info.visitor.visit_number=window.DMP_NEON_TRACKING_DATA.info?.visitor.visit_number),"object"==typeof t){const e=Object.keys(t);for(let n=0;n0?window.DMP_TOPDOMAIN:null,version:window.dm.vars.playerVersion},timestamp:{},visitor:{as_number:F.as_number,id:window.DMP_V1ST,city:F.city,continent:F.continent,country:F.country,onsite:window.DMP_ONSITE,referer:window.DMP_REFERER,region:F.region,timezone_offset:(0,V.pQ)(),traffic_segment:window.DMP_TS}},version:"1.0"};F.publisher_xid&&(j.data.publisher={xid:F.publisher_xid}),window.__PLAYER_CONFIG__.player&&window.DMP_PLAYER_SETTINGS&&(j.data.player.settings={},window.DMP_PLAYER_SETTINGS.forEach((e=>{let{key:t,trackableKey:n}=e;null!==n&&(j.data.player.settings[n]=window.__PLAYER_CONFIG__.player[t])})));const K={collection_xid:!window.DMP_INITIAL_VIDEO_ID&&window.DMP_INITIAL_PLAYLIST_ID?window.DMP_INITIAL_PLAYLIST_ID:null,display_mode:"regular",is_fullscreen:!1,is_pip_custom_position:null,last_created_event:window.DMP_PES_LAST_EVENT_TS||null,last_event:null,pip_position_x:null,pip_position_y:null,play_reason:null,video:null,video_index:null,view_id:null,volume:null},B=[];let H=[];const q=function(e){let{name:t}=e,{extra:n={},oncePerInstance:o,oncePerPlayback:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return;if(o){if(B.includes(t))return;B.push(t)}if(i){if(H.includes(t))return;H.push(t)}const r=Date.now();let a,d,l={...j};if(l.name=t,l.data.created_ts=r,l.data.timestamp.created_event=r,l.data.timestamp.delta_time_origin=Math.floor(performance.now()),l.data.timestamp.delta_previous_event=K.last_created_event?l.data.timestamp.created_event-K.last_created_event:null,window.performance.mark(t),window.performance.measure(t,K.last_event||"vital_origin",t),K.last_event=t,K.last_created_event=l.data.timestamp.created_event,l.data.browser.cookies_3rd_party_available=window.DMP_COOKIES_3RD_PARTY_AVAILABLE,window.DMP_INLINE_PLAYER_ROOT?(a=Math.floor(window.dm.nodes.player?.getBoundingClientRect()?.width||0),d=Math.floor(window.dm.nodes.player?.getBoundingClientRect()?.height||0)):(a=window.innerWidth,d=window.innerHeight),l.data.player.height=d,l.data.player.pes_uuid=window.DMP_PES_UUID,l.data.player.pes_iframe_index=window.DMP_PES_IFRAME_INDEX,l.data.player.pes_integration_type=window.DMP_PES_INTEGRATION_TYPE,l.data.player.volume=K.volume,l.data.player.width=a,l.data.video=K.video,l.data.video&&(l.data.view={collection_xid:K.collection_xid,display_mode:K.is_fullscreen?"fullscreen":K.display_mode,is_active_tab:"visible"===window.document.visibilityState,is_pip_custom_position:K.is_pip_custom_position,pip_position_x:K.pip_position_x,pip_position_y:K.pip_position_y,play_reason:K.play_reason,suggested_content:K.suggested_content,video_index:K.video_index,view_id:K.view_id,viewport_height:window.DMP_VIEWPORT_SIZE?.height,viewport_width:window.DMP_VIEWPORT_SIZE?.width}),"dev_monitor"===t){if(!n.subname)return;l.data.extra=n}l=window.dmp_removeUselessKeys(l);const s={channel:"player",edward:"1.1",events:[l],sent_ts:Date.now()};window.fetch(window.DMP_EVENTBUS_URL,{method:"POST",body:JSON.stringify(s),headers:{"content-type":"text/plain; charset=UTF-8"}}).then((e=>{200===e.status?Y.log(l.name,"sent",l):Y.error(l.name,"failed (",e.status,")",l)})).catch((e=>{Y.error(l.name,"failed (",e.message,")",l)}))};window.performance.mark("vital_origin",{startTime:0}),q({name:"vital_player_enter"},{oncePerInstance:!0}),window.dm.watchtower={beforeMetadataCall:()=>{K.play_reason=null,K.video_index=null===K.video_index?0:K.video_index+1,K.view_id=null,K.video=null,H=[]},notify:q,setCollectionXid:e=>{K.collection_xid=e},setDisplayMode:e=>{K.display_mode=e},setIsFullscreen:e=>{K.is_fullscreen=e},setIsPipCustomPosition:e=>{K.is_pip_custom_position=e},setPipPositionX:e=>{K.pip_position_x=e},setPipPositionY:e=>{K.pip_position_y=e},setPlayReason:e=>{K.play_reason="user"!==e?"api"!==e?"autoplay":"programmatic":"user"},setSuggestedContent:e=>{K.suggested_content=e},setVideo:e=>{const t=e.info||{};K.video={duration:t.duration,id:e.id,is_critical:window.DMP_IS_CRITICAL_METADATA||!1,is_geo_metadata_cached:window.DMP_IS_GEO_METADATA_CACHED||!1,is_password_protected:t.is_password_protected,is_private:t.is_private,media_type:t.media_type,owner_id:e.owner?.id,owner_parent_id:e.owner?.parent?.id,protected_delivery:e.infra?.is_protected_delivery,stream_type:e.stream?.stream_type}},setViewId:e=>{K.view_id=e},setVolume:e=>{K.volume=e}};const z=(0,i.jl)("GraphQL");window.dmp_queryGraph=e=>{let{name:t,query:n,variables:o={}}=e;const i=new window.AbortController;return z.log("Environment is",window.DMP_GRAPHQL_URL),{queryPromise:X({name:t,query:n,variables:o,abortController:i}),cancelQuery:()=>{i.abort()}}};const X=async e=>{let{name:t,query:n,variables:o,abortController:i}=e;const r={graph:{oauth:{fetched_token:null,duration:null,error:null},query:{name:t,duration:null,error:null}}},{oauthToken:a,oauthError:d,oauthDuration:l,oauthFetched:s}=await W({abortController:i});if(r.graph.oauth.fetched_token=s,r.graph.oauth.duration=l,d)throw r.graph.oauth.error=`${d.name}: ${d.message}`,window.dmp_sendEarlyEvent("life_cycle.graphRequested",r),d;const{queryData:c,queryError:_,queryDuration:u}=await Q({abortController:i,queryName:t,query:n,variables:o,oauthToken:a});if(r.graph.query.duration=u,_)throw r.graph.query.error=`${_.name}: ${_.message}`,window.dmp_sendEarlyEvent("life_cycle.graphRequested",r),_;return window.dmp_sendEarlyEvent("life_cycle.graphRequested",r),c},W=async e=>{let{abortController:t}=e,n=window.dmp_readCookie("client_token"),o=null;if(n)return z.log("Found client_token"),{oauthToken:n,oauthError:o,oauthDuration:null,oauthFetched:!1};z.log("Fetching client_token");const i=Date.now();try{const e=await window.fetch(`${window.DMP_GRAPHQL_URL}/oauth/token`,{method:"POST",body:new URLSearchParams({client_id:"f1a362d288c1b98099c7",client_secret:"eea605b96e01c796ff369935357eca920c5da4c5",traffic_segment:window.DMP_TS,visitor_id:window.DMP_V1ST,grant_type:"client_credentials",scope:"userinfo,manage_subscriptions,manage_videos"}).toString(),headers:{"Content-Type":"application/x-www-form-urlencoded",...J()},signal:t.signal});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);const o=await e.json();z.log(`Got client_token (maxAge ${o.expires_in})`),window.dmp_writeCookie("client_token",o.access_token,{maxAge:o.expires_in}),n=o.access_token}catch(e){const t=new Error(`Token fetching failed (${e.message})`);z.log(t.message),o=t}return{oauthToken:n,oauthError:o,oauthDuration:Date.now()-i,oauthFetched:!0}},Q=async e=>{let{abortController:t,queryName:n,query:o,variables:i,oauthToken:r}=e;o=o.replace(/query\(/,`query ${n}(`);const a=J();z.log("Querying Graph API",o,i,a);let d=null,l=null;const s=Date.now(),c=JSON.stringify({query:o,variables:i,operationName:n});z.log(`Body size: ~${Math.round(c.length/1e3*100)/100}kb`);try{const e=await window.fetch(window.DMP_GRAPHQL_URL,{method:"POST",body:c,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`,...a},signal:t.signal});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);const n=await e.json(),o=n.errors&&n.errors.length>0;if(z.log("Graph query "+(o?"errored":"responded"),n),o){const e=n.errors.find((e=>"string"==typeof e.reason))||n.errors[0],t=new Error(e.message);throw t.code=e.code||null,t}d=n.data}catch(e){l=e}return l&&"not_authorized"===l.code&&(z.log("Token is not authorized, dropping cookie"),window.dmp_removeCookie("client_token")),{queryData:d,queryError:l,queryDuration:Date.now()-s}},J=()=>{const e={"X-DM-AppInfo-Id":window.DMP_APP,"X-DM-AppInfo-Type":window.DMP_CLIENT_TYPE,"X-DM-PlayerInfo-Version":window.dm.vars.playerVersion,"X-DM-PlayerInfo-Embedder":window.dmp_getEmbedderOriginWithPath(window.DMP_EMBEDDER),"X-DM-PlayerInfo-Referer":window.DMP_REFERER,"X-DM-VisitorInfo-Onsite":window.DMP_ONSITE?"1":"0","X-DM-Visitor-Id":window.DMP_V1ST,"X-DM-Traffic-Segment":window.DMP_TS},t={};return Object.keys(e).forEach((n=>{"string"==typeof e[n]&&e[n].length>0&&(t[n]=e[n])})),t};var Z=n(9993);const ee=(0,i.jl)("Player","PreloadManager"),te=8,ne=new Map,oe=new Map;let ie=0;async function re(e){if(ee.log(`Preload fetch start > ${e} > activeCount=${ie}`),ie>=3)return void ee.log(`Preload fetch skipped (concurrency cap) > ${e}`);if(oe.has(e))return ee.log(`Preload fetch deduped (in-flight) > ${e}`),oe.get(e);ie++;const t=window.dmp_generateViewId(),n=(0,Z.zU)({videoId:e,isPreload:!0,viewId:t}).then((n=>{let{metadata:o,features:i={}}=n;return function(){if(ne.size>=te){const e=ne.keys().next().value;ne.delete(e),ee.log(`Preload cache evicted > ${e}`)}}(),ne.set(e,{metadata:o,features:i,viewId:t}),ee.log(`Preload cached > ${e} > id=${o?.id} > viewId=${t}`),o})).catch((t=>{ee.log(`Preload failed > ${e} > ${t}`)})).finally((()=>{oe.delete(e),ie--}));return oe.set(e,n),n}const ae={preload(e){const t=[].concat(e).filter(Boolean);for(const e of t)ne.has(e)||oe.has(e)||re(e)},consume(e){ee.log(`Preload consume called > ${e} > cacheSize=${ne.size} > inFlight=${oe.has(e)} > cached=${ne.has(e)}`);const t=ne.get(e)??null;return t?(ne.delete(e),ee.log(`Preload consumed > ${e}`)):ee.log(`Preload consume miss > ${e}`),t},has:e=>ne.has(e),invalidate(e){ne.delete(e),ee.log(`Preload invalidated > ${e}`)}};var de=n(7764),le=n(6247);const se=(0,i.jl)("Player","VideoLoader");window.dmp_fetchAndStoreVideoMetadata=function(e){let{videoId:t,playlistId:n,extraQS:o,isLoadingFromApi:i,videoIndex:r}=e;if(T._G.value)return Promise.reject(new Error("Early error: metadata fetch skipped"));const a=window.dmp_shouldUseClientSideAdUrl(t,n),d=!Ee&&t&&a,l=null!=t&&!(0,le.Cv)(t),s=null!=n&&!(0,le.aI)(n),c="string"==typeof window.DMP_INITIAL_VIDEO_ID&&window.DMP_INITIAL_VIDEO_ID.match(/^q[a-zA-Z0-9]+$/)&&!i;l&&(t=null);s&&(n=null);const _=!(!l||n)||!(!s||t)||!t&&!n||!!c;_&&(T._G.value=de.PLAYER_ERR_WRONG_CONTENT_ID);return window.dm.watchtower.beforeMetadataCall(),window.dm.watchtower.notify({name:"vital_first_ui_displayed"},{oncePerInstance:!0}),new Promise(((e,i)=>{window.dm.spinner&&window.dm.spinner.addReasonToDisplay("selectingvideo"),ce.abort(),De();const l=Date.now();if(_)i(new TypeError("Wrong video or playlist Id"));else if(t||n)if(d&&t){const n=window.dmp_isGKEnabled("PV5_METADATA_PRELOAD");if(se.log(`[fetchMetadata] useGeoVideoEndpoint=true > GK PV5_METADATA_PRELOAD=${n} > videoId=${t}`),n){const n=ae.consume(t);if(se.log(`[fetchMetadata] preload consume result for ${t} > hit=${Boolean(n)}`),n)return window.dm.perf.metric("metadataLoad").start(),n.viewId&&window.dmp_setViewIdForVideoIndex(r,n.viewId),(0,Z.Mg)(n.metadata,r),void(0,Z.t1)(n.features,t).finally((()=>{e({metadata:window.__PLAYER_CONFIG__.metadata,restStats:{}})}))}(0,Z.zU)({videoId:t,videoIndex:r,startTime:l}).then((t=>{e(t)})).catch((e=>{se.log(`Critical video endpoint failed, falling back to legacy > ${t} > ${e}`),s()}))}else s();else i(new Error("Could not request metadata (no videoId & playlistId)"));function s(){window.dm.perf.metric("metadataLoad").start(),Ee||a||window.fetch(ye(_e,t,n,Pe,r,!0,o),{method:"GET",credentials:"include"}).then((e=>{e?.json().then((e=>{se.log(`Geo metadata, async geo call > ${t||n} > ${JSON.stringify(e)}`)}))})).catch((e=>{se.log(`Geo metadata, async geo call error > ${t||n} > ${e}`)}));const d=ye(_e,t,n,Pe,r,a,o);function s(){const e=new URLSearchParams(window.location.search);ce.open("GET",d),me?(ce.withCredentials=!0,ce.setRequestHeader("Authorization",`Bearer ${me}`)):a?(null!==window.DMP_PES_AUTH_TOKEN&&ce.setRequestHeader("Authorization",`Bearer ${window.DMP_PES_AUTH_TOKEN}`),e.has("dmDevCountry")&&ce.setRequestHeader("X-Dm-Dev-Country",e.get("dmDevCountry")),e.has("dmDevStreamEnv")&&ce.setRequestHeader("X-Dm-Dev-Stream-Env",e.get("dmDevStreamEnv"))):ce.withCredentials=!0,ce.send()}function c(){!function(e,t,n){if(window.DMP_LOAD_METADATA_RETRY_COUNT{e()}),t),se.log(`retry fetch metadata loading ${window.DMP_LOAD_METADATA_RETRY_COUNT} in ${t} ms`)}else De(),n(t)}(s,new TypeError("Metadata request failed"),(e=>{window.dm.perf.metric("metadataLoad").end(),i(e)}))}ce.onload=()=>{if(200!==ce.status)window.DMP_FETCH_METADATA_END_TIME=null,c();else{const n=JSON.parse(ce.responseText),o=ge(n);let i=o;if(n.error&&(i=function(e,t){const n={...e};if(!t||"object"!=typeof t)return n;for(const e of Object.keys(t))void 0!==t[e]&&(n[e]=t[e]);return n}(o,{error:n.error})),!window.DMP_IS_CRITICAL_METADATA){const e=i.media?.posters_url;e&&window.DMP_IS_AUTOPLAY_ENABLED&&window.dm.posterSooner&&window.dm.posterSooner.displayPosterSooner(e)}if(a){const e=ce.getResponseHeader("x-dm-geo-metadata-cache");window.DMP_IS_GEO_METADATA_CACHED=e?.startsWith("hit")||!1}window.__PLAYER_CONFIG__.metadata=i;const r=Date.now();window.DMP_FETCH_METADATA_END_TIME=r,window.dm.perf.metric("metadataLoad").end(),window.dm.watchtower.setViewId(i.view_id),window.dm.watchtower.setVideo(i),window.dm.watchtower.notify({name:"vital_first_meaningful_content"},{oncePerPlayback:!0}),se.log(`Metadata loaded > ${t}`),window.DMP_IS_CRITICAL_METADATA?(window.dispatchEvent(new Event("metadatafetched")),Promise.all([fe,he]).then((()=>{const e=window.dm?.metadataUpdatedEventEmitter,t=window.__PLAYER_CONFIG__.metadata;e&&t&&(e.emit({metadata:t}),se.log(`Metadata updated > ${t.id}`))}))):e({metadata:i,restStats:{queryDuration:r-l}})}},ce.onerror=c;const{manifestUrl:_}=_e.criticalMetadata||{},u=_e.criticalMetadata||{},w=_&&`${_}&dmV1st=${window.DMP_V1ST}&dmTs=${window.DMP_TS}`;if(window.DMP_IS_CRITICAL_METADATA=a&&(u.stream?.url||w)&&0===r&&t&&!n,window.DMP_IS_CRITICAL_METADATA){const n=u.stream?.url??w,o={id:u.id??t,access_id:u.access_id??t,view_id:u.view_id,stream:n?{url:n,content_type:u.stream?.content_type??"application/x-mpegURL",stream_type:u.streamType??null}:{},media:u.media||{}};window.__PLAYER_CONFIG__.metadata=o;const i=u.media?.posters_url;i&&window.DMP_IS_AUTOPLAY_ENABLED&&window.dm.posterSooner&&window.dm.posterSooner.displayPosterSooner(i),se.log(`Critical metadata loaded > ${t}`),window.dm.perf.metric("metadataLoad").end(),e({metadata:o,restStats:{}})}s()}}))},window.dmp_preloadMetadata=e=>ae.preload(e);const ce=new XMLHttpRequest,_e=window.__PLAYER_CONFIG__;window.DMP_LOAD_METADATA_RETRY_COUNT=0;const ue=5;let we=-1;const pe=500;let me=null,Ee=null;_e&&_e.context&&_e.context.is_dm_network&&(me=window.dmp_getDailyQsParam(window.DMP_PLAYER_URL,"dminternaltoolstoken"),Ee=window.dmp_getDailyQsParam(window.DMP_PLAYER_URL,"dminternaltoolsmetadataurl"));const Pe=window.dmp_parseQueryString(new URL(window.DMP_PLAYER_URL).search,!0);window.DMP_IS_CRITICAL_METADATA=!1,window.DMP_IS_GEO_METADATA_CACHED=!1;const fe=new Promise((e=>{window.addEventListener("metadatafetched",e,{once:!0})})),he=new Promise((e=>{window.addEventListener("playercomponentsready",e,{once:!0})}));function ge(e){if(!e||"object"!=typeof e)return{};const t=e.qualities?.auto?.[0]?.url,n=e.qualities?.auto?.[0]?.type,o="string"==typeof e.channel?{id:e.channel_id,name:e.channel}:e.channel||void 0,i={access_id:e.access_id??e.id,advertising:e.advertising,category:o,features:{has_attention_peaks:Boolean(e.has_attention_peaks??!0),has_chapters:Boolean(e.has_chapters??!0)},id:e.id,infra:{data_center:e.data_center,is_protected_delivery:e.protected_delivery},info:{aspect_ratio:e.aspect_ratio,country:e.country,created_at:e.created_time??e.created_at,custom_classification:e.custom_classification,detected_language:e.detected_language,duration:e.duration,has_live_show_viewers:e.live_show_viewers,has_paid_partnership:e.has_paid_partnership,is_created_for_kids:e.is_created_for_kids,is_explicit:e.explicit,is_partner:e.partner,is_password_protected:e.is_password_protected,is_private:e.private,is_verified:e.verified,language:e.language,live_audience_url:e.audience_url,live_dvr_window:e.live_dvr_window,media_type:e.media_type,tags:e.tags,title:e.title,url:e.url,video_class:e.video_class??e.class},media:{filmstrip_url:e.filmstrip_url,seeker_url:e.seeker_url,watermark:e.watermark},stream:{content_type:n,formats:e.stream_formats,is_altered_with_ai:e.stream_altered_with_ai,ssai_session_url:e.ssai_session_url,stream_type:e.stream_type,url:t}};return e.owner?.id&&(i.owner={id:e.owner.id,screenname:e.owner.screenname,username:e.owner.username,url:e.owner.url,type:e.owner.type,country:e.owner.country,created_at:e.owner.created_time,avatars:e.owner.avatars,parent:e.owner.parent_id?{id:e.owner.parent_id,screenname:e.owner.parent_username}:null}),e.publisher?.id&&(i.publisher=e.publisher),e.thumbnails&&(i.media.thumbnails_url=e.thumbnails),e.dynamic_thumbnail_url&&(i.media||(i.media={}),i.media.dynamic_thumbnail_url=e.dynamic_thumbnail_url),e.chapters_url&&(i.media||(i.media={}),i.media.chapters_url=e.chapters_url),null!=e.view_id&&(i.view_id=e.view_id),null!=e.start_time&&(i.start_time=e.start_time),null!=e.end_time&&(i.end_time=e.end_time),null!=e.reporting&&(i.reporting=e.reporting),null!=e.attention_peaks&&(i.attention_peaks=e.attention_peaks),null!=e.sharing&&(i.sharing=Array.isArray(e.sharing)?e.sharing:Object.entries(e.sharing).filter((e=>{let[,t]=e;return t?.url})).map((e=>{let[t,{url:n}]=e;return{service:t,url:n}}))),i}function ye(e,t,n,i,r,a){let d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=Ee;Ee||(l=t?a?`${window.DMP_GEO_URL}/video/${t}.json`:`${window.DMP_WEBSITE_URL}/player/metadata/video/${t}`:a?`${window.DMP_GEO_URL}/playlist/${n}.json`:`${window.DMP_WEBSITE_URL}/player/metadata/playlist/${n}`);const s=(0,o.j)(e?.player??{}),c=new URLSearchParams;return a&&c.append("legacy",!0),null!==window.DMP_EMBEDDER&&c.append("embedder",window.dmp_getEmbedderOriginWithPath(window.DMP_EMBEDDER)),null!==window.DMP_REFERER&&c.append("referer",window.DMP_REFERER),Object.keys(i).forEach((e=>{"GK_PV5_"!==e.substring(0,7)&&"GK_DMX_"!==e.substring(0,7)||c.append(e,i[e])})),c.append("geo","1"),s.id&&c.append("player-id",s.id),e?.context?.publisher_xid&&c.append("publisher-id",e.context.publisher_xid),s.enableAds||c.append("enableAds","0"),i.syndicationKey&&c.append("syndicationKey",i.syndicationKey),c.append("locale",window.dm.vars.effectiveLocale),c.append("dmV1st",window.DMP_V1ST),c.append("dmTs",window.DMP_TS),c.append("is_native_app",window.DMP_IS_NATIVE_APP?"1":"0"),null!==window.DMP_APP&&c.append("app",window.DMP_APP),null!==window.DMP_CLIENT_TYPE&&c.append("client_type",window.DMP_CLIENT_TYPE),null!==window.DMP_DEVICE_ID&&c.append("ads_device_id",window.DMP_DEVICE_ID),window.DMP_SHARING_URL_LOCATION&&c.append("dmSharingUrlLocation",window.DMP_SHARING_URL_LOCATION),c.append("dmViewId",window.dmp_getViewIdForVideoIndex(r)),`${l}?${c.toString()}${d}`}function De(){clearTimeout(we),we=-1,window.DMP_LOAD_METADATA_RETRY_COUNT=0}var Ae=n(1514);const Ie=n(1793).Z,Te=(0,i.jl)("ContextualEmbed");let be=Me(window.dmp_parseQueryString(window.location.search,!0));const Re=e=>(T._G.value=de.PLAYER_ERR_XHR_CALL_FAILED,Te.warn("Initial metadata fetch failed",e),Promise.reject(e));if(T._G.value||window.DMP_IS_EMPTY_PLAYER?T._G.value&&Te.log("Early error, skipping initial metadata",T._G.value):(window.DMP_INITIAL_PLAYLIST_ID&&!window.DMP_INITIAL_VIDEO_ID&&(be+=`&playlist=${encodeURIComponent(window.DMP_INITIAL_PLAYLIST_ID)}`),be+="¶llelCalls="+(window.dmp_canUseParallelAdCalls(window.DMP_INITIAL_VIDEO_ID,window.DMP_INITIAL_PLAYLIST_ID)?1:0),window.DMP_INITIAL_FETCH_METADATA_START_TIME=Date.now(),window.DMP_INITIAL_FETCH_METADATA_PROMISE=((0,d.TS)(window.__PLAYER_CONFIG__?.player)?(0,Ae.C)({podcastId:d.g8,episodeId:d.e_,episodeIndex:0}):window.dmp_fetchAndStoreVideoMetadata({videoId:window.DMP_INITIAL_VIDEO_ID,playlistId:window.DMP_INITIAL_PLAYLIST_ID,extraQS:be,isLoadingFromApi:!1,videoIndex:0})).catch(Re)),!T._G.value&&window.DMP_IS_EMPTY_PLAYER&&window.DMP_IS_PES&&window.DMP_CONTEXTUAL_PAGE_DATA){Te.log("Fetching contextual videos",window.DMP_CONTEXTUAL_PAGE_DATA);const{ownerId:e,contextualContentFreshness:t,contextualContentSource:n,contextualContentSourceChannels:o,enableContextualContentFallback:i,enableContextualContentFreshness:r,userChannelOrganization:a}=window.__PLAYER_CONFIG__.player,{language:d,url:l,title:s,content:c}=window.DMP_CONTEXTUAL_PAGE_DATA;let _="playerContextualVideosQuery",u=Ie,w=[],p="";"organization"===n&&(o?.length>0&&(w=o),p=a),"channel"===n&&(w=[e],p=a);const m={channelXids:w,language:d,url:l,title:s,content:c,organizationXid:p,hasFallback:i};if(r){const e=new Date;e.setUTCDate(e.getUTCDate()-t);const n=function(e){const t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0"),o=String(e.getUTCDate()).padStart(2,"0"),i=String(e.getUTCHours()).padStart(2,"0"),r=String(e.getUTCMinutes()).padStart(2,"0"),a=String(e.getUTCSeconds()).padStart(2,"0"),d=String(e.getUTCMilliseconds()).padStart(3,"0");return`${t}-${n}-${o}T${i}:${r}:${a}.${d}Z`}(e);m.freshnessDate=n}const E=window.dmp_queryGraph({name:_,query:u,variables:m});window.DMP_GRAPH_QUERY_CONTEXTUAL_VIDEO=E.queryPromise,window.DMP_INITIAL_FETCH_METADATA_PROMISE=E.queryPromise.then((e=>{const t=e?.player?.queue?.recordings?.edges[0]?.node?.recording?.xid,n=e?.player?.queue?.recordings?.metadata?.algorithm?.version||"unknown",o=e?.player?.queue?.recordings?.metadata?.algorithm?.uuid;return t?(Te.log(`Found contextual videos (from ${n})`,e.player.queue.recordings.edges),Te.log("Loading video",t),window.DMP_CONTEXTUAL_RESPONSE={responseUUID:o,videos:e.player.queue.recordings.edges.map((e=>{let{node:t}=e;return{...t.recording,...t.algorithm}}))},window.DMP_INITIAL_VIDEO_ID=t,be+="¶llelCalls="+(window.dmp_canUseParallelAdCalls(window.DMP_INITIAL_VIDEO_ID,window.DMP_INITIAL_PLAYLIST_ID)?1:0),window.DMP_INITIAL_FETCH_METADATA_START_TIME=Date.now(),window.dmp_fetchAndStoreVideoMetadata({videoId:t,playlistId:null,extraQS:be,isLoadingFromApi:!1,videoIndex:0})):(Te.warn("No contextual video found",e),void(T._G.value=de.PLAYER_ERR_NO_CONTEXTUAL_VIDEO_FOUND))})).catch(Re)}else T._G.value||Te.log("feature disabled");function Me(e){let t="";return window.DMP_CUSTOM_CONFIG_KEYS_FOR_METADATA.forEach((n=>{const o=`customConfig[${n}]`,i=e[o];t+=i?`&${o}=${encodeURIComponent(i)}`:""})),t}var ve=n(8721),Se=n(5088);const Le="dm-gpp-mspa",Ce=function(){let{country:e="",region:t="",is_dm_network:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{...window.__PLAYER_CONFIG__.context};const o=new URLSearchParams(window.location.search);return n&&(e=o.get("dmDevCountry")||e,t=o.get("dmDevRegion")||t),"US"===e&&["CA","VA","CO","CT","UT"].includes(t)},Oe=()=>!!Ce(),Ne=(0,i.jl)("Infopack"),ke=[1,2,3,4,5,6,7,8,9,10],xe=[1,2,3,4,5,6,7,8,9,10,11],Ue=[2,7,9,10],Ge={purposesConsent:[1,8],pubPurposesConsent:[1]},$e={DAILYMOTION:573,GOOGLE:755,MEDIAMETRIE:769},Ve=[4,5];let Fe=null,Ye=null;const je=e=>new Promise((t=>{Se.GVL.baseUrl=Ve.includes(e)?"https://vendorlist.dmcdn.net/v3/":"https://vendorlist.dmcdn.net/v2/";const n=new Se.GVL(Ve.includes(e)?63:204);n.readyPromise.then((()=>{Ve.includes(e)?(Ye=n,Ne.log("GVL v3 fetched :",n)):(Fe=n,Ne.log("GVL v2 fetched :",n)),t()})).catch((()=>{Ne.error("Failed to fetch GVL"),t()}))})),Ke=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.infopack.getTcfConsentString(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be();if(!o)return!1;if(!o.vendors[e])return!1;if(!n)return!1;try{t=Se.TCString.decode(n)}catch(e){return!1}return!!t.vendorConsents.has(e)&&o.vendors[e].purposes.every((e=>t.purposeConsents.has(e)))},Be=()=>window.infopack.isTCF2_2()?Ye:Fe,He=(0,i.jl)("Infopack"),qe={tcf:{},gpp:{}};let ze="",Xe="",We="",Qe="",Je=[-1],Ze=[-1],et=null;const tt=["dailymotion.com/partner/","dailymotion.com/dm/partner/"],nt=e=>{const t=window.document.cookie.split(";").map((e=>e.trim().split(/=(.*)/))).find((t=>{let[n]=t;return n===e}));return t?t[1]:null},ot=()=>{try{return Boolean(window.top.frames.__tcfapiLocator)}catch(e){return!1}},it=()=>{try{return Boolean(window.top.frames.__gppLocator)}catch(e){return!1}},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.DMP_ENABLE_ADS,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.DMP_IS_GDPR_APPLICABLE;return!1!==e&&(!!t&&!!n)},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.DMP_ENABLE_ADS,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Oe();return!1!==e&&(!!t&&!!n)},dt=(e,t,n)=>{const o=(0,ve.Z)(),i={command:e,version:t,callId:o};qe.tcf[o]=n,window.top.postMessage({__tcfapiCall:i},"*"),He.log("Tcf PostMessage sent",{__tcfapiCall:i})},lt=e=>{const t=st(e);if(!t)return;const{returnValue:n,success:o,callId:i}=t;n?qe.tcf[i]?(He.log("PostMessage tcf response",{response:t}),qe.tcf[i](n,o)):qe.gpp[i]?(He.log("PostMessage gpp response",{response:t}),qe.gpp[i](n,o)):He.warn("< Unknown callId",{response:t}):He.warn("< Empty returnValue",{response:t})},st=e=>{if(!e)return!1;if(!e.data)return!1;let t;try{t="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){return!1}return t.__gppReturn?!(!t.__gppReturn.callId||!t.__gppReturn.returnValue.pingData)&&t.__gppReturn:!!t.__tcfapiReturn&&(!!t.__tcfapiReturn.callId&&t.__tcfapiReturn)},ct=()=>Object.keys(qe.tcf).length?Promise.resolve():new Promise((e=>{const t=t=>{et=t.tcfPolicyVersion,He.log("Collect tcf consent",t),Ve.includes(t.tcfPolicyVersion)?Xe=t.tcString:ze=t.tcString,e()};setTimeout(e,2e3),dt("addEventListener",2,t),dt("getTCData",2,t)})),_t=()=>new Promise((e=>{((e,t)=>{const n=(0,ve.Z)(),o={command:e,callId:n};qe.gpp[n]=t,window.top.postMessage({__gppCall:o},"*"),He.log("Gpp PostMessage sent",{__gppCall:o})})("addEventListener",(t=>{He.log("Collect gpp-pb",t),We=t?.pingData?.gppString,Je=t?.pingData?.applicableSections,e()}))})),ut=()=>{Qe=nt(Le)||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"DBABLA~BVQqAAAAAWA";return window.dmp_writeCookie(Le,e,{maxAge:34128e3,domain:window.DMP_COOKIES_DOMAIN}),e}(),Ze=[7],He.log("create or collect gpp-pl",Qe)},wt=()=>et,pt=()=>4===wt()||5===wt(),mt=e=>{let{tcfEnabled:t,gppEnabled:n,gppListened:o,areAdsEnabled:i}=e;t||n?(t&&ct(),n&&(ut(),_t()),window.addEventListener("message",lt)):(o&&i&&ut(),He.warn("Consent from infopack is disabled"))};window.DMP_ENABLE_ADS&&je().then((()=>je(Ve[Ve.length-1]))),mt({tcfEnabled:rt(),gppEnabled:at(),gppListened:Oe(),areAdsEnabled:window.DMP_ENABLE_ADS}),window.infopack={applicableSectionsIsSet:e=>e?!!e.length&&!(e[0]<1):null,collectPublisherConsentForGpp:_t,collectConsentForTcf:ct,collectPlayerConsentForGppMspa:ut,gdprConsentDialogShouldBeDisplayed:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.DMP_ENABLE_ADS,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.DMP_IS_GDPR_APPLICABLE,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.DMP_IS_NATIVE_APP,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window.DMP_EMBEDDER||"";return!1!==e&&(!t&&(!!n&&(!o&&!tt.some((e=>i.includes(e))))))},isConsentMonitoringEnabled:()=>!window.DMP_ONSITE,getGppApplicableSectionsFromPlayer:()=>Ze,getGppApplicableSectionsFromPublisher:()=>Je,getGppConsentStringFromPlayer:()=>Qe,getGppConsentStringFromPublisher:()=>We,getTcfConsentString:()=>rt()?pt()?Xe:ze:nt("dm-euconsent-v2")||"",getTcfPolicyVersion:wt,isGppLocatorAvailable:it,iabtcfcore:{GVL:Se.GVL,TCString:Se.TCString,TCModel:Se.TCModel,Segment:Se.Segment,PurposeRestriction:Se.PurposeRestriction,RestrictionType:Se.RestrictionType},isEnabledForGpp:at,isEnabledForTcf:rt,isGppListened:Oe,isUserUnderUsConsentLaw:Ce,isTCF2_2:pt,isTcfapiLocatorAvailable:ot,initInfopack:mt,onMessage:lt,resetGppSignal:()=>{We="",Qe="",Je=[-1],Ze=[-1]},TCF2HasConsentForAllPurposes:function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.infopack.getTcfConsentString(),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.infopack.isTCF2_2();try{e=Se.TCString.decode(t)}catch(e){return!1}return n?xe.every((t=>e.purposeConsents.has(t))):ke.every((t=>e.purposeConsents.has(t)))},TCF2HasConsentForDailymotion:()=>Ke($e.DAILYMOTION),TCF2HasConsentForGoogle:()=>Ke($e.GOOGLE),TCF2HasConsentForNielsen:function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.infopack.getTcfConsentString();if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be()))return!1;if(!t)return!1;try{e=Se.TCString.decode(t)}catch(e){return!1}const n=Ge.pubPurposesConsent.every((t=>e.publisherConsents.has(t))),o=Ge.purposesConsent.every((t=>e.purposeConsents.has(t)));return!!e.vendorConsents.has($e.MEDIAMETRIE)&&(!(!window.DMP_ONSITE&&!e.vendorConsents.has($e.DAILYMOTION))&&(!(window.DMP_ONSITE&&!n)&&!!o))},TCF2HasConsentForPurposesRequired:function(){let e,{consentString:t=window.infopack.getTcfConsentString(),gvl:n=Be(),id:o=$e.DAILYMOTION,loggerSubtitle:i="uid_dm cookie",purposeList:r=Ue}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!n||!n.vendors||!n.vendors[o])return Ne.log(i," - Invalid GVL / vendor ID"),!1;try{e=Se.TCString.decode(t)}catch(e){return Ne.log(i," - Invalid consentString"),!1}const a=n.vendors[o].flexiblePurposes??null,d=n.vendors[o].specialPurposes??null,l={consent:n.vendors[o].purposes,li:n.vendors[o].legIntPurposes},s=e.purposeLegitimateInterests,c=e.publisherRestrictions.getRestrictions(o),_=e.purposeConsents,u=e.vendorLegitimateInterests.has(o),w=e.vendorConsents.has(o),p=0===_.size&&0===s.size;let m=!0,E=[];if(Ne.log(i," - Require purposes",r),p&&d.length&&u)return Ne.log(i," - Special purposes enabled and LI consent allowed for vendor"),!0;if(!w)return Ne.log(i," - Vendor is not allowed"),!1;for(const e of r){const t=a&&a.includes(e),n=l.consent.includes(e),o=l.li.includes(e),i=c?c.find((t=>t.purposeId===e)):null,r=i&&0==i.restrictionType,d=i&&1==i.restrictionType,w=i&&2==i.restrictionType;i&&r?(E.push(`Publisher doesn't allow purpose ${e}`),m=!1):t||!o||s.has(e)&&u?t||!n||_.has(e)?!t&&o&&d?(E.push(`purpose ${e} - No-flexible LI and publisher requires consent`),m=!1):!t&&n&&w?(E.push(`purpose ${e} - No-flexible purpose consent and publisher requires LI`),m=!1):t&&o&&d&&!_.has(e)?(E.push(`purpose ${e} - Flexible LI has been switched by the publisher to purpose consent and doesn't have consent for it`),m=!1):!t||!o||d||s.has(e)&&u?!(t&&n&&w)||s.has(e)&&u?!t||!n||w||_.has(e)||(E.push(`purpose ${e} - Flexible purpose without restriction doesn't have consent`),m=!1):(E.push(`purpose ${e} - Flexible purpose consent has been switched by the publisher to LI and doesn't have consent for it`),m=!1):(E.push(`purpose ${e} - Flexible LI without restriction doesn't have consent`),m=!1):(E.push(`purpose ${e} - No-flexible purpose consent doesn't have consent`),m=!1):(E.push(`purpose ${e} - No-flexible LI doesn't have consent`),m=!1)}return m?Ne.log(i," - consent is given"):Ne.log(i," - consent is not given",E),m}}},1514:(e,t,n)=>{n.d(t,{C:()=>h});var o=n(7638),i=n(8050);const r=(0,o.jl)("Player","MetadataLoader"),a=5,d=500;let l=-1;function s(){clearTimeout(l),l=-1,window.DMP_LOAD_METADATA_RETRY_COUNT=0}function c(){let{podcastId:e,isCritical:t=!1,episodeIndex:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=window.__PLAYER_CONFIG__,r=(0,i.j)(o?.player??{}),a=window.dmp_getDailyQsParam(document.URL,"dminternaltoolstoken"),d=new URLSearchParams(window.location.search),l=window.dmp_parseQueryString(window.location.search,!0),s=new Headers({Accept:"application/json"});return a?s.set("Authorization",`Bearer ${a}`):null!==window.DMP_PES_AUTH_TOKEN&&s.set("Authorization",`Bearer ${window.DMP_PES_AUTH_TOKEN}`),d.has("dmDevCountry")&&s.set("X-Dm-Dev-Country",d.get("dmDevCountry")),d.has("dmDevStreamEnv")&&s.set("X-Dm-Dev-Stream-Env",d.get("dmDevStreamEnv")),window.DMP_APP&&s.set("X-DM-Geo-App",String(window.DMP_APP)),window.DMP_CLIENT_TYPE&&s.set("X-DM-Geo-Type",String(window.DMP_CLIENT_TYPE)),window.DMP_EMBEDDER&&s.set("X-DM-Geo-Embedder",String(window.DMP_EMBEDDER)),r.enableAds||s.set("X-DM-Geo-Enable-Ads","0"),r.id&&s.set("X-DM-Geo-Player-Id",String(r.id)),o?.context?.publisher_xid&&s.set("X-DM-Geo-Publisher-Id",String(o.context.publisher_xid)),window.DMP_REFERER&&s.set("X-DM-Geo-Referer",String(window.DMP_REFERER)),l.syndicationKey&&s.set("X-DM-Geo-Syndication-Key",String(l.syndicationKey)),e&&s.set("X-DM-Geo-Podcast-Id",String(e)),t&&(s.set("X-DM-Geo-View-Id",String(window.dmp_getViewIdForVideoIndex(n))),s.set("X-DM-Geo-Preload","0"),s.set("X-DM-Geo-Traffic-Segment",String(window.DMP_TS??"")),s.set("X-DM-Geo-V1st",String(window.DMP_V1ST??""))),s}async function _(e,t,n){const o=await fetch(function(e){return e?`${window.DMP_GEO_URL}/episodes/${encodeURIComponent(e)}`:`${window.DMP_GEO_URL}/episodes`}(t),{method:"GET",credentials:"include",headers:c({podcastId:e,isCritical:!0,episodeIndex:n})}),i=o.headers.get("x-dm-geo-metadata-cache");i&&(window.DMP_IS_GEO_METADATA_CACHED=i.startsWith("hit"));const r=await o.json();if(!o.ok&&!r?.error)throw new TypeError(`Episode critical metadata HTTP ${o.status}`);return r?.error&&!r.error.status_code&&(r.error.status_code=o.status),r}async function u(e,t){try{const n=await fetch(function(e){return`${window.DMP_GEO_URL}/episodes/${encodeURIComponent(e)}/details`}(t),{method:"GET",headers:c({podcastId:e})});if(!n.ok)throw new TypeError(`Episode details HTTP ${n.status}`);const o=await n.json();return o?.error?{}:o}catch(e){return r.log(`Episode details error > ${t} > ${e}`),{}}}async function w(e){let{podcastId:t,episodeId:n=null,episodeIndex:o=null,startTime:i}=e;window.dm.perf.metric("metadataLoad").start(),window.DMP_IS_CRITICAL_METADATA=!1;const c=await async function(e,t,n){for(let o=1;;o++)try{const o=await _(e,t,n);return s(),o}catch(e){if(window.DMP_LOAD_METADATA_RETRY_COUNT=o,o>a)throw s(),e;const t=Math.pow(2,o)*d;r.log(`retry episode critical metadata ${o} in ${t} ms`),await new Promise((e=>{l=setTimeout(e,t)}))}}(t,n,o).catch((e=>{throw r.log(`Episode critical endpoint failed > ${t} > ${e}`),new Error(`Episode request failed: ${e.message}`)})),w=n??c?.episode_id,p=c?.access_id??c?.id;if(!c?.error&&!p)throw new TypeError(`Podcast ${t} has no episode to load`);let m=function(e,t,n){const o={stream:{}};return null!=e.view_id&&(o.view_id=e.view_id),t&&(o.id=e.id??t,o.access_id=t),n&&(o.episode_id=n),e.stream?.url&&(o.stream.url=e.stream.url),e.stream?.content_type&&(o.stream.content_type=e.stream.content_type),e.stream?.stream_type&&(o.stream.stream_type=e.stream.stream_type),null!=e.media?.posters_url&&(o.media={posters_url:e.media.posters_url}),null!=e.error&&(o.error=e.error),o}(c,p,w);if(window.__PLAYER_CONFIG__.metadata=m,window.dm.watchtower.setViewId(m.view_id),window.dm.watchtower.setVideo(m),window.dm.watchtower.notify({name:"vital_first_meaningful_content"},{oncePerPlayback:!0}),window.dm.perf.metric("metadataLoad").end(),!c.error){const e=await u(t,p);m={...m,...e,stream:{...m.stream,...e.stream},media:{...m.media,...e.media}},window.__PLAYER_CONFIG__.metadata=m,window.dm.watchtower.setViewId(m.view_id),window.dm.watchtower.setVideo(m)}const E=Date.now();return window.DMP_FETCH_METADATA_END_TIME=E,{metadata:m,restStats:{queryDuration:E-i}}}var p=n(7966),m=n(7764),E=n(6247);const P=(0,o.jl)("Player","MetadataLoader");let f=null;function h(e){let{podcastId:t=f,episodeId:n,episodeIndex:o}=e;if(p._G.value)return Promise.reject(new Error("Early error: metadata fetch skipped"));if(!t||n&&!(0,E.sK)(n))return p._G.value=m.PLAYER_ERR_WRONG_CONTENT_ID,Promise.reject(new TypeError("Wrong podcast or episode Id"));f=t,window.dm.watchtower.beforeMetadataCall(),window.dm.watchtower.notify({name:"vital_first_ui_displayed"},{oncePerInstance:!0}),window.dm.spinner&&window.dm.spinner.addReasonToDisplay("selectingvideo");const i=0===o;return P.log(`[fetchAudioMetadata] podcast=${t} > episode=${n}`),w({podcastId:t,episodeId:n,episodeIndex:o,startTime:Date.now()}).then((e=>(i&&e.metadata?.access_id&&(window.DMP_INITIAL_VIDEO_ID=e.metadata.access_id),e)))}},9993:(e,t,n)=>{n.d(t,{JQ:()=>I,Mg:()=>y,t1:()=>A,zU:()=>D});var o=n(7638),i=n(5709),r=n(8050);const a=(0,o.jl)("Player","VideoLoader"),d=window.__PLAYER_CONFIG__,l=window.dmp_parseQueryString(window.location.search,!0),s=5,c=500;let _=-1;function u(){clearTimeout(_),_=-1,window.DMP_LOAD_METADATA_RETRY_COUNT=0}function w(e){return`${window.DMP_GEO_URL}/videos/${e}`}function p(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{isPreload:t=!1,videoIndex:n=null,viewId:o=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=(0,r.j)(d?.player??{}),a=window.dmp_getDailyQsParam(document.URL,"dminternaltoolstoken"),s=new URLSearchParams(window.location.search),c={Accept:"application/json"};return e.includes("auth")&&(a?c.Authorization=`Bearer ${a}`:null!==window.DMP_PES_AUTH_TOKEN&&(c.Authorization=`Bearer ${window.DMP_PES_AUTH_TOKEN}`)),null!==o?c["X-DM-Geo-View-Id"]=String(o):null!==n&&(c["X-DM-Geo-View-Id"]=String(window.dmp_getViewIdForVideoIndex(n))),s.has("dmDevCountry")&&(c["X-Dm-Dev-Country"]=s.get("dmDevCountry")),s.has("dmDevStreamEnv")&&(c["X-Dm-Dev-Stream-Env"]=s.get("dmDevStreamEnv")),e.includes("app")&&window.DMP_APP&&(c["X-DM-Geo-App"]=String(window.DMP_APP)),e.includes("clientLocale")&&window.dm?.vars?.effectiveLocale&&(c["X-DM-Geo-Client-Locale"]=String(window.dm.vars.effectiveLocale)),e.includes("clientType")&&window.DMP_CLIENT_TYPE&&(c["X-DM-Geo-Type"]=String(window.DMP_CLIENT_TYPE)),e.includes("embedder")&&window.DMP_EMBEDDER&&(c["X-DM-Geo-Embedder"]=window.dmp_getEmbedderOriginWithPath(String(window.DMP_EMBEDDER))),e.includes("enableAds")&&!i.enableAds&&(c["X-DM-Geo-Enable-Ads"]="0"),e.includes("playerId")&&i.id&&(c["X-DM-Geo-Player-Id"]=String(i.id)),e.includes("publisherId")&&d?.context?.publisher_xid&&(c["X-DM-Geo-Publisher-Id"]=String(d.context.publisher_xid)),e.includes("referer")&&window.DMP_REFERER&&(c["X-DM-Geo-Referer"]=String(window.DMP_REFERER)),e.includes("trafficSegment")&&(c["X-DM-Geo-Traffic-Segment"]=String(window.DMP_TS??"")),e.includes("syndicationKey")&&l.syndicationKey&&(c["X-DM-Geo-Syndication-Key"]=String(l.syndicationKey)),e.includes("v1st")&&(c["X-DM-Geo-V1st"]=String(window.DMP_V1ST??"")),e.includes("preload")&&(c["X-DM-Geo-Preload"]=t?"1":"0"),new Headers(c)}function m(e,t){if(!e||"object"!=typeof e)return{};const n={};null!=e.view_id&&(n.view_id=e.view_id),null!=e.id?n.id=e.id:t&&(n.id=t),null!=e.access_id&&(n.access_id=e.access_id),n.stream||(n.stream={}),e.stream?.url&&(n.stream.url=e.stream.url),e.stream?.content_type&&(n.stream.content_type=e.stream.content_type),e.stream?.stream_type&&(n.stream.stream_type=e.stream.stream_type);const o=e.media?.posters_url||e.thumbnails,r=e.media?.dynamic_thumbnail_url||e.dynamic_thumbnail_url;return null==o&&null==r||(n.media||(n.media={}),null!=o&&(n.media.posters_url=o),null!=r&&(n.media.dynamic_thumbnail_url=r)),null!=e.features&&(n.features=e.features),null!=e.error&&(n.error=e.error,"content_password_protected"===e.error.reason&&(n.error.type=i.PU),null!=e.error.live_waiting_time&&(n.start_time=e.error.live_waiting_time)),null!=e.start_time&&(n.start_time=e.start_time),null!=e.end_time&&(n.end_time=e.end_time),n}function E(e,t){if(!t||"object"!=typeof t)return e&&"object"==typeof e?{...e}:{};const n=e&&"object"==typeof e?{...e}:{};for(const e of Object.keys(t))if(void 0!==t[e])if("stream"===e&&"object"==typeof t.stream)n.stream={...n.stream||{},...t.stream};else if("media"===e&&"object"==typeof t.media){const e={...n.media||{},...t.media};(n.media?.watermark||t.media?.watermark)&&(e.watermark={...n.media?.watermark||{},...t.media?.watermark||{}}),n.media=e}else n[e]=t[e];return n}function P(e){if(window.DMP_IS_CRITICAL_METADATA)return;const t=e.media?.posters_url;t&&window.DMP_IS_AUTOPLAY_ENABLED&&window.dm.posterSooner&&window.dm.posterSooner.displayPosterSooner(t)}function f(e){window.dm.watchtower.setViewId(e.view_id),window.dm.watchtower.setVideo(e),window.dm.watchtower.notify({name:"vital_first_meaningful_content"},{oncePerPlayback:!0})}async function h(e,t,n){let{isPreload:o=!1,once:i=!1,viewId:r=null}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const d=p(["app","auth","clientLocale","clientType","embedder","enableAds","playerId","preload","publisherId","referer","syndicationKey","trafficSegment","v1st","viewId"],{isPreload:o,videoIndex:t,viewId:r}),l=async()=>{const t=await fetch(e,{method:"GET",credentials:"include",headers:d,signal:n}),o=t.headers.get("x-dm-geo-metadata-cache");o&&(window.DMP_IS_GEO_METADATA_CACHED=o.startsWith("hit")||!1);const i=await t.json();if(!t.ok&&!i?.error)throw new TypeError(`Critical metadata HTTP ${t.status}`);return i?.error&&!i?.error?.status_code&&(i.error.status_code=t.status),i};if(i)return l();let w=0;for(;w<=s;)try{const e=await l();return u(),window.DMP_LOAD_METADATA_RETRY_COUNT=0,e}catch(e){if(w+=1,window.DMP_LOAD_METADATA_RETRY_COUNT=w,w>s)throw a.log(`Critical metadata failed after ${w} attempts > ${e}`),u(),e;const t=Math.pow(2,w)*c;a.log(`retry critical metadata ${w} in ${t} ms`),await new Promise((e=>{_=setTimeout(e,t)}))}}function g(e){if(window.DMP_IS_CRITICAL_METADATA){const t=new Promise((e=>{window.addEventListener("metadatafetched",e,{once:!0})})),n=new Promise((e=>{window.addEventListener("playercomponentsready",e,{once:!0})}));window.dispatchEvent(new Event("metadatafetched")),Promise.all([t,n]).then((()=>{const t=window.dm?.metadataUpdatedEventEmitter;t&&e&&(t.emit({metadata:e}),a.log(`Metadata updated > ${e.id}`))}))}else{const t=window.dm?.metadataUpdatedEventEmitter;t&&e&&(t.emit({metadata:e}),a.log(`Video metadata merged > ${e.id}`))}}function y(e,t){const n=d.criticalMetadata||{},o=n.manifestUrl&&`${n.manifestUrl}&dmV1st=${window.DMP_V1ST}&dmTs=${window.DMP_TS}`;window.DMP_IS_CRITICAL_METADATA=Boolean((n.stream?.url||o)&&0===t&&e?.id),window.__PLAYER_CONFIG__.metadata=e,P(e),f(e),window.dm.perf.metric("metadataLoad").end(),window.DMP_FETCH_METADATA_END_TIME=Date.now(),g(e)}async function D(e){let{videoId:t,videoIndex:n=null,startTime:o,isPreload:i=!1,viewId:r=null}=e;if(i)return async function(e,t){const n=w(e),o=await h(n,null,(new AbortController).signal,{isPreload:!0,once:!0,viewId:t}).catch((t=>(a.log(`Preload critical metadata failed > ${e} > ${t}`),null))),i=o?.features??{},r=o?m(o,e):{};return t&&(r.view_id=t),{metadata:r,features:i}}(t,r);window.dm.perf.metric("metadataLoad").start();const l=w(t),s=d.criticalMetadata||{},c=s.manifestUrl&&`${s.manifestUrl}&dmV1st=${window.DMP_V1ST}&dmTs=${window.DMP_TS}`;window.DMP_IS_CRITICAL_METADATA=Boolean((s.stream?.url||c)&&0===n&&t);let _={};if(window.DMP_IS_CRITICAL_METADATA){const e=s.stream?.url??c;_={id:s.id??t,access_id:s.access_id??t,view_id:s.view_id,stream:e?{url:e,content_type:s.stream?.content_type??"application/x-mpegURL",stream_type:s.stream?.stream_type??null}:{},media:s.media||{}},window.__PLAYER_CONFIG__.metadata=_;const n=s.media?.posters_url;n&&window.DMP_IS_AUTOPLAY_ENABLED&&window.dm.posterSooner&&window.dm.posterSooner.displayPosterSooner(n),a.log(`Critical metadata loaded > ${t}`),window.dm.perf.metric("metadataLoad").end()}if(window.DMP_IS_CRITICAL_METADATA){const e=await h(l,n,(new AbortController).signal,{once:!0}).catch((e=>(a.log(`Critical metadata (async) error > ${t} > ${e}`),null))),o=e?.features??{};if(e){const n=m(e,t);Object.keys(n).length>0&&(window.__PLAYER_CONFIG__.metadata=E(window.__PLAYER_CONFIG__.metadata||{},n))}return e?.error||await A(o,t),{metadata:_,restStats:{}}}const u=await h(l,n,(new AbortController).signal,{once:!1}).catch((e=>(a.log(`Critical endpoint failed, fallback not ready > ${t} > ${e}`),null)));let p={},g={};u&&(g=u.features??{},p=m(u,t)),_=E(_,p),window.__PLAYER_CONFIG__.metadata=_,P(_),f(_),window.dm.perf.metric("metadataLoad").end(),u?.error||await A(g,t);const y=Date.now();return window.DMP_FETCH_METADATA_END_TIME=y,{metadata:window.__PLAYER_CONFIG__.metadata||_,restStats:{queryDuration:y-o}}}async function A(e,t){const n={},o=function(e){return`${window.DMP_GEO_URL}/videos/${e}/details`}(t),i=function(e){return`${window.DMP_GEO_URL}/videos/${e}/attention-peaks`}(t),r=function(e){return`${window.DMP_GEO_URL}/videos/${e}/chapters`}(t),d=function(e){return`${window.DMP_GEO_URL}/videos/${e}/reporting`}(t),l=function(e){return`${window.DMP_GEO_URL}/videos/${e}/sharing`}(t),s=[fetch(o,{method:"GET",headers:p(["app","auth","clientType","embedder","enableAds","playerId","publisherId","referer","syndicationKey"]),signal:(new AbortController).signal}).then((e=>{if(!e.ok)throw new TypeError(`Video details HTTP ${e.status}`);return e.json()})).then((e=>{e?.error||Object.assign(n,E(n,e))})).catch((e=>{a.log(`Video details error > ${t} > ${e}`)}))];if(e?.has_reporting&&s.push(fetch(d,{method:"GET",headers:p(["app","auth","clientType","embedder"]),signal:(new AbortController).signal}).then((e=>{if(!e.ok)throw new TypeError(`Reporting HTTP ${e.status}`);return e.json()})).then((e=>{n.reporting=e})).catch((e=>{a.log(`Video reporting error > ${t} > ${e}`)}))),e?.has_sharing&&s.push(fetch(l,{method:"GET",headers:p(["app","auth","clientType","embedder"]),signal:(new AbortController).signal}).then((e=>{if(!e.ok)throw new TypeError(`Sharing HTTP ${e.status}`);return e.json()})).then((e=>{n.sharing=Object.entries(e).filter((e=>{let[,t]=e;return t?.url})).map((e=>{let[t,{url:n}]=e;return{service:t,url:n}}))})).catch((e=>{a.log(`Video sharing error > ${t} > ${e}`)}))),e?.has_chapters&&s.push(fetch(r,{method:"GET",headers:p(["app","auth","clientType","embedder"]),signal:(new AbortController).signal}).then((e=>{if(!e.ok)throw new TypeError(`Chapters HTTP ${e.status}`);return e.json()})).then((e=>{Object.assign(n,E(n,{media:{chapters_url:e.url}}))})).catch((e=>{a.log(`Video chapters error > ${t} > ${e}`)}))),e?.has_attention_peaks&&s.push(fetch(i,{method:"GET",headers:p(),signal:(new AbortController).signal}).then((e=>{if(!e.ok)throw new TypeError(`Attention peaks HTTP ${e.status}`);return e.json()})).then((e=>{n.attention_peaks=e})).catch((e=>{a.log(`Video attention peaks error > ${t} > ${e}`),n.attention_peaks={}}))),await Promise.allSettled(s),Object.keys(n).length>0){const e=E(window.__PLAYER_CONFIG__.metadata||{},n);window.__PLAYER_CONFIG__.metadata=e,P(e),window.DMP_IS_CRITICAL_METADATA?f(e):(window.dm.watchtower.setViewId(e.view_id),window.dm.watchtower.setVideo(e)),window.DMP_FETCH_METADATA_END_TIME=Date.now(),g(e)}}async function I(e){const t=function(e){return`${window.DMP_GEO_URL}/videos/${e}/subtitles`}(e);try{const n=await fetch(t,{method:"GET",headers:p(["app","auth","clientLocale","clientType","embedder"])});if(!n.ok)throw new TypeError(`Subtitles HTTP ${n.status}`);const o=await n.json(),i=window.__PLAYER_CONFIG__.metadata||{};i.subtitles||(i.subtitles={}),i.subtitles.data=o,window.__PLAYER_CONFIG__.metadata=i;const r=window.dm?.metadataUpdatedEventEmitter;return r&&(r.emit({metadata:i}),a.log(`Video subtitles loaded lazy > ${e}`)),o}catch(t){return a.log(`Video subtitles lazy error > ${e} > ${t}`),null}}},3529:(e,t,n)=>{n.d(t,{e_:()=>h,g8:()=>f,TS:()=>T});var o=n(8050);const i=new RegExp(/^[a-zA-Z0-9-]+$/);var r=n(8164),a=n(7966),d=n(7638),l=n(3958),s=n(2467),c=n(7764);function _(e){if(!e)return null;const t=e.match(/^v-?(\d+)\.(\d+)\.(\d+)(?:-([\w.]+))?(?:\+[\w.]+)?$/);if(!t)return null;const n=t[4]?t[4].match(/^rc(\d+)$/):null;return{major:parseInt(t[1],10),minor:parseInt(t[2],10),patch:parseInt(t[3],10),rc:n?parseInt(n[1],10):null}}var u=n(6918),w=n(1918);window.DMP_PLAYER_URL=window.DMP_INLINE_PLAYER_ROOT?window.DMP_INLINE_PLAYER_URL:document.URL,window.dmp_visibilityStatesHistory=[{time:0,state:document.visibilityState}],window.dmp_onVisibilityChange=function(e,t){window.dmp_visibilityStatesHistory.push({time:t||e.timeStamp,state:document.visibilityState})},window.addEventListener("visibilitychange",window.dmp_onVisibilityChange);const p=window.__PLAYER_CONFIG__,m=function(){const e=function(){if(!window.__PLAYER_CONFIG__||"object"!=typeof window.__PLAYER_CONFIG__.dmInternalData)return{};return window.__PLAYER_CONFIG__.dmInternalData}(),t=function(){if(window.dmpNativeBridge&&"object"==typeof window.dmpNativeBridge.dmInternalData)return window.dmpNativeBridge.dmInternalData;if(window.dmpNativeBridge&&"function"==typeof window.dmpNativeBridge.getDmInternalData){const e=window.dmpNativeBridge.getDmInternalData();if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return null}return{}}(),n=function(){try{let e=window.DMP_INLINE_PLAYER_ROOT?window.DMP_PES_INLINE_INTERNAL_DATA:window.name;if("string"!=typeof e||0===e.length)return{};const t=JSON.parse(decodeURIComponent(e));return"object"==typeof t.dmInternalData?t.dmInternalData:{}}catch(e){return{}}}(),o={logger:null};"string"==typeof n.logger&&(o.logger=n.logger);o.cookies3rdPartyAvailable=function(){return(0,r.ej)("v1st").length>0}(),o.v1st=e.v1st,"string"==typeof n.v1st&&n.v1st.match(i)&&(o.v1st=n.v1st);o.v1stDm=null,"string"==typeof n.v1stDm&&n.v1stDm.match(i)&&(o.v1stDm=n.v1stDm);o.uid=null,"string"==typeof n.uid&&(o.uid=n.uid);o.iframeId=null,"string"==typeof n.iframeId&&(o.iframeId=n.iframeId);o.pubtool=null,"string"==typeof n.pubtool&&(o.pubtool=n.pubtool);"string"==typeof t.pubtool&&(o.pubtool=t.pubtool);o.embedIndex=null,"number"==typeof n.embedIndex&&(o.embedIndex=parseInt(n.embedIndex));o.pesUUID=null,"string"==typeof n.pesUUID&&(o.pesUUID=n.pesUUID);o.pesIframeIndex=null,"number"==typeof n.pesIframeIndex&&(o.pesIframeIndex=parseInt(n.pesIframeIndex));o.pesIntegrationType=null,"string"==typeof n.pesIntegrationType&&(o.pesIntegrationType=n.pesIntegrationType);o.pesPlayerVersion=null,"string"==typeof n.pesPlayerVersion&&(o.pesPlayerVersion=n.pesPlayerVersion);o.pesPerf=n.pesPerf,o.ts=e.ts,"number"==typeof n.ts&&(o.ts=parseInt(n.ts));if(o.gatekeepers=e.gatekeepers,Array.isArray(n.gatekeepers)){o.gatekeepers=[];for(let e=0;e0&&(o.apiMode="postMessage");window.dmpNativeBridge&&(window.dmpNativeBridge.dmInternalData||window.dmpNativeBridge.getDmInternalData)&&(o.apiMode="nativeBridge");o.appName=null,"string"==typeof t.appName&&(o.appName=t.appName);o.appType=null,"string"==typeof t.appType&&(o.appType=t.appType);o.deviceId=null,"string"==typeof t.deviceId&&(o.deviceId=t.deviceId);o.nativeChromecastStarted=!1,"boolean"==typeof t.nativeChromecastStarted&&(o.nativeChromecastStarted=t.nativeChromecastStarted);o.delegateFullscreen=!1,"boolean"==typeof t.delegateFullscreen&&(o.delegateFullscreen=t.delegateFullscreen);o.sdkVersion=null,"string"==typeof t.sdkVersion&&(o.sdkVersion=t.sdkVersion);o.imaNativeVersion=null,"string"==typeof t.ima&&(o.imaNativeVersion=t.ima);o.omSdk=null,"string"==typeof t.omSdk&&(o.omSdk=t.omSdk);o.omVersion=null,"string"==typeof t.omVersion&&(o.omVersion=t.omVersion);o.omPartner=null,"string"==typeof t.omPartner&&(o.omPartner=t.omPartner);o.atts=null,"number"==typeof t.atts&&(o.atts=t.atts);o.trackingAllowed=null,"boolean"==typeof t.trackingAllowed&&(o.trackingAllowed=t.trackingAllowed);o.limitAdTracking=null,"boolean"==typeof t.limitAdTracking&&(o.limitAdTracking=t.limitAdTracking);o.initialViewportSize=null,"object"==typeof n.initialViewportSize&&(o.initialViewportSize=n.initialViewportSize);o.pesLastEventTs=null,"number"==typeof n.pesLastEventTs&&(o.pesLastEventTs=n.pesLastEventTs);o.referer=null,"string"==typeof n.referer&&(o.referer=n.referer);o.pesAuthToken=null,"string"==typeof n.pesAuthToken&&(o.pesAuthToken=n.pesAuthToken);window.DMP_NEON_TRACKING_DATA={},"object"==typeof n.neonTrackingData&&null!==n.neonTrackingData&&A(n.neonTrackingData);o.embedder=null,"string"==typeof n.embedder&&(o.embedder=n.embedder);o.contextualPageData=null,"object"==typeof n.contextualPageData&&(o.contextualPageData=n.contextualPageData);o.pesDomain=null,"string"==typeof n.pesDomain&&(o.pesDomain=n.pesDomain);return o}(),E=function(e){if(m.appName)return m.appName;if(e&&e.context&&e.context.http_x_requested_with)return e.context.http_x_requested_with;if(window.DMP_NEON_TRACKING_DATA?.info?.app?.id)return window.DMP_NEON_TRACKING_DATA?.info?.app?.id;return null}(p),P=function(){if(m.appType)return m.appType;if(window.DMP_NEON_TRACKING_DATA?.info?.app?.type)return window.DMP_NEON_TRACKING_DATA?.info?.app?.type;return null}();a.Hz.value=p&&p.player?{...p.player,...m.forcedSettings}:{},a.W3.value=T(p?.player),window.DMP_PLAYER_SETTINGS=o.b,window.DMP_PUBLISHER={xid:p&&p.context?p.context.publisher_xid:null,type:p&&p.context?p.context.publisher_type:null},window.DMP_INITIAL_VIDEO_ID=function(e){if("string"==typeof e){const t=document.createElement("a");t.href=e;const n=b(t.search,!0);return n.video?n.video:null}return null}(window.DMP_PLAYER_URL),window.DMP_INITIAL_PLAYLIST_ID=function(e){if("string"==typeof e){const t=document.createElement("a");t.href=e;const n=b(t.search,!0);return n.playlist?n.playlist:null}return null}(window.DMP_PLAYER_URL);const f=function(e){if("string"==typeof e){const t=document.createElement("a");t.href=e;const n=b(t.search,!0);return n.podcast?n.podcast:null}return null}(window.DMP_PLAYER_URL),h=function(e){if("string"==typeof e){const t=document.createElement("a");t.href=e;const n=b(t.search,!0);return n.episode?n.episode:null}return null}(window.DMP_PLAYER_URL);if(window.DMP_IS_EMPTY_PLAYER=null===window.DMP_INITIAL_VIDEO_ID&&null===window.DMP_INITIAL_PLAYLIST_ID&&null===f&&null===h,window.DMP_APP=E,window.DMP_CLIENT_TYPE=P,window.DMP_DEVICE_ID=function(){const e=/^([A-Fa-f0-9]{4}-?){8}$/;if(m.deviceId)return m.deviceId.match(e)?m.deviceId:null;return null}(),window.DMP_SDK_VERSION=m.sdkVersion||null,window.DMP_INSTANCE_UUID=function(){const e=[],t=new window.Uint16Array(8);window.crypto.getRandomValues(t);for(let n=0;n0)return e}const e=I(window.DMP_EMBEDDER);if("string"!=typeof e||!e.endsWith(".dailymotion.com"))return null;return m.referer}(),window.DMP_IS_NATIVE_APP=Boolean(function(e,t,n){if(null!==n)return!1;if("amp"===e)return!1;if("string"==typeof t&&""!==t){return-1===["website","webapp","webtv","samsungtv","playstation","lgtv","sonytv","samsungv3","orangetv","orangetv31"].indexOf(t)}return"string"==typeof e&&""!==e}(E,P,window.DMP_EMBEDDER)),window.DMP_ONSITE=function(){const e=I(window.DMP_EMBEDDER);return"string"==typeof e&&e.endsWith(".dailymotion.com")}(),window.DMP_IMA_NATIVE_VERSION=m.imaNativeVersion,window.DMP_API_SETTING=m.apiMode,window.DMP_IS_PES="string"==typeof m.pubtool&&m.pubtool.startsWith("pes"),window.DMP_IS_AUTOPLAY_ENABLED=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Hz.value?.autostart??"off",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.DMP_IS_PES;const n=e??"off";return"on"===n||"firstTimeViewable"===n&&!t}(),window.DMP_ARE_CONTROLS_ENABLED=a.Hz.value.enablePlaybackControls,window.DMP_V1ST=function(e){let{id:t,are3PCEnabled:n,v1st:o,v1stDm:i}=e;if(n)return o;if(!i){return(window.DMP_INLINE_PLAYER_ROOT?window:window.top).postMessage(JSON.stringify({event:"pes_write_v1st_dm",id:t}),"*"),o}return i}({id:m.iframeId,are3PCEnabled:m.cookies3rdPartyAvailable,v1st:m.v1st,v1stDm:m.v1stDm}),window.DMP_UID=m.uid,window.DMP_IFRAME_ID=m.iframeId,window.DMP_PUBTOOL=m.pubtool,window.DMP_SHARING_URL_LOCATION=a.Hz.value.enableSharingUrlLocation?m.embedder:null,window.DMP_CONTEXTUAL_PAGE_DATA=a.Hz.value.enableContextualContent?m.contextualPageData:null,window.DMP_CONTEXTUAL_NO_VIDEO_FOUND=!1,window.DMP_EMBED_INDEX=m.embedIndex,window.DMP_TS=m.ts,window.DMP_VISITOR_GROUP=Math.ceil(window.DMP_TS/1e4),window.DMP_GATEKEEPERS=m.gatekeepers,window.DMP_CHROMECAST_NATIVE_STARTED=m.nativeChromecastStarted,window.DMP_DELEGATE_FULLSCREEN=m.delegateFullscreen,window.DMP_OM_SDK=m.omSdk,window.DMP_OM_VERSION=m.omVersion,window.DMP_OM_PARTNER=m.omPartner,window.DMP_ATTS=m.atts,window.DMP_TRACKING_ALLOWED=m.trackingAllowed,window.DMP_LIMIT_AD_TRACKING=m.limitAdTracking,window.DMP_FORCED_SETTINGS=m.forcedSettings,window.DMP_TARGET_ORIGIN=m.targetOrigin,window.DMP_VIEWPORT_SIZE=m.initialViewportSize,window.DMP_PES_UUID=m.pesUUID,window.DMP_PES_IFRAME_INDEX=m.pesIframeIndex,window.DMP_PES_INTEGRATION_TYPE=m.pesIntegrationType,window.DMP_PES_LAST_EVENT_TS=m.pesLastEventTs,window.DMP_PES_PERF=m.pesPerf||{requestStart:null,requestEnd:null,initStart:null,initEnd:null,playerRequestStart:null,pageTimeOrigin:null},window.DMP_PES_AUTH_TOKEN=m.pesAuthToken,window.DMP_CUSTOM_CONFIG_KEYS_FOR_METADATA=["customParams","utmSource","utmCampaign","utmMedium","utmTerm"],window.DMP_WEBSITE_URL="https://www.dailymotion.com",window.DMP_GEO_URL=window.DMP_INLINE_PLAYER_ROOT?m.pesDomain:window.origin,window.DMP_GRAPHQL_URL="https://graphql.api.dailymotion.com",window.DMP_EVENTBUS_URL=(0,u.uP)({gatekeepers:m.gatekeepers,env:p&&p.context&&p.context.is_dm_network?new URL(window.DMP_PLAYER_URL).searchParams.get(u.EI):null}),window.DMP_COOKIES_DOMAIN=".dailymotion.com",window.DMP_COOKIES_3RD_PARTY_AVAILABLE=m.cookies3rdPartyAvailable,window.DMP_IS_BOT=p&&p.context&&"bot"===p.context.device.type,window.DMP_EID=null,window.DMP_SUPPORTS_TOUCH_EVENTS="ontouchstart"in window,window.DMP_IS_GDPR_APPLICABLE=function(){const e=new URL(window.DMP_PLAYER_URL).searchParams,t=p&&p.context&&p.context.is_dm_network&&e.has("dmDevCountry")?e.get("dmDevCountry"):p&&p.context&&p.context.country||"";return["AD","AW","AT","BE","BV","BG","HR","CW","CY","CZ","DK","EE","FK","FO","FI","FR","GF","PF","TF","DE","GI","GR","GL","GP","GG","VA","HU","IS","IE","IM","IT","JE","LV","LI","LT","LU","MT","MQ","YT","MC","NL","NC","NO","PL","PT","RO","RE","BL","MF","PM","SM","SX","SK","SI","ES","SE","CH","TC","GB","VG","WF"].includes(t)}(),window.DMP_REFRESH_VIEW_ID_DELAY=function(){if(p&&p.context&&p.context.is_dm_network){const e=M(window.DMP_PLAYER_URL,"dmDevRefreshViewIdDelay");if("string"==typeof e&&e.length>0)return 1e3*e}return 144e5}(),window.dmp_isGKEnabled=S,window.dmp_isAdSdkWebEnabled=L,window.dmp_isLegacyAdSdkEnabled=function(){return window.DMP_ENABLE_ADS&&!L()},window.dmp_getDailyProcessedQueryString=R,window.dmp_getHostname=I,window.dmp_getEmbedderOriginWithPath=function(e){try{if("string"==typeof e){const t=new URL(e);if("localhost"===t.hostname||!t.hostname)return null;const n="/"===t.pathname?"":t.pathname;return t.origin+n}}catch{}return null},window.dmp_getDailyQsParam=M,window.dmp_removeUselessKeys=function e(t){const n={};return Object.keys(t).forEach((function(o){const i=t[o];null!=i&&""!==i&&(!function(e){if(null===e)return!1;if("object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}(i)?n[o]=i:n[o]=e(i))})),n},window.dmp_parseQueryString=b,window.dmp_setEmbedder=function(e){try{if(!new URL(window.DMP_EMBEDDER).hostname.match(/\.dailymotion\.com$/))throw new Error("Current embedder must be onsite");if(!new URL(e).hostname.match(/\.dailymotion\.com$/))throw new Error("New embedder must be onsite");window.DMP_EMBEDDER=e}catch(e){}},window.dmp_setNeonTrackingData=A,window.dmp_getViewIdForVideoIndex=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e=C.videoIndex);if(e>C.videoIndex||!C.viewId){const t=O();C.videoIndex=e,C.viewId=t;(0,d.jl)("ViewId").log(`Generated a view_id for video index ${e}:`,t)}return C.viewId},window.dmp_generateViewId=O,window.dmp_setViewIdForVideoIndex=function(e,t){C.videoIndex=e,C.viewId=t;(0,d.jl)("ViewId").log(`Adopted a view_id for video index ${e}:`,t)},window.dmp_canUseParallelAdCalls=x,window.dmp_shouldUseClientSideAdUrl=function(e,t){if(x(e,t))return!0;return k()&&N(e,t)},window.dmp_isPremiumPartner=function(){return $(["lequipe.fr","capital.fr","programme-tv.net","femmeactuelle.fr","geo.fr","leparisien.fr","footmercato.net","marieclaire.fr","cosmopolitan.fr","huffingtonpost.fr","caminteresse.fr","cuisineactuelle.fr","voici.fr","konbini.com"])},window.dmp_isPremiumPartnerInParallelAdCallRollout=U,window.dmp_isPremiumPartnerInParallelAdCallForProgressiveRollout=G,(0,l.x)())a._G.value=c.PLAYER_ERR_EMPTY_EMBEDDER;else if(p?.player){const{player:e}=p;"not_found"===e.status?a._G.value=c.PLAYER_ERR_STATUS_NOT_FOUND:"deleted"===e.status?a._G.value=c.PLAYER_ERR_STATUS_DELETED:"server_error"===e.status?a._G.value=c.PLAYER_ERR_STATUS_SERVER:!e.hasReachedPlaybackLimits&&!e.hasSubscriptionStatusRestricted||window.DMP_ONSITE||(a._G.value=c.PLAYER_ERR_HAS_GLOBAL_RESTRICTION)}const g={videoId:window.DMP_INITIAL_VIDEO_ID,playlistId:window.DMP_INITIAL_PLAYLIST_ID,podcastId:f,episodeId:h},y=Object.values(g).some((e=>null!==e)),D=T(p?.player)?w.F:w.N;if(a._G.value||!y||D(g)||(a._G.value=c.PLAYER_ERR_WRONG_CONTENT_ID),(0,d.C5)(function(){const e=new URL(window.DMP_PLAYER_URL).searchParams.get("dmLogger");if(e)return{logger:e,source:"iframe URL"};if(m.logger)return{logger:m.logger,source:"PES"};if(window.DMP_EMBEDDER){const e=new URL(window.DMP_EMBEDDER).searchParams.get("dmLogger");if(e)return{logger:e,source:"embedder URL"}}return{logger:"",source:null}}()),"default"===a.Hz.value.id){const e=["A player on this page has been initialized without a player id.","This can negatively impact monetization.","Please implement your player according to our Player Embeds guidelines:","https://faq.dailymotion.com/hc/en-us/articles/4411096679954-Integrate-your-Player-Embed"];console.warn(e.join(" "))}if(window.DMP_IS_PES&&!window.DMP_IS_BOT){const e=m.pesPlayerVersion,t=window.dm.vars.playerVersion;e&&t&&("v0.0.0"===e||function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const o=_(e),i=_(t);if(!o||!i)return!1;if(o.major!==i.major)return!1;const r=Math.abs(o.minor-i.minor);return!(r>3)&&(0!==r||Math.abs(o.patch-i.patch)<=n)}(e,t))||(window.DMP_IS_WRONG_PLAYER_VERSION=!0,console.warn("Player integration error, the library can only be loaded from Dailymotion properties, please do not host it yourself"))}function A(){let e,t,n,o,i,{action:r,info:a,screen:d,section:l,component:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r&&(e={uuid:r.uuid,gesture:r.gesture}),d&&(t={id:d.id,name:d.name,refresh_id:d.refresh_id,space:d.space}),a&&(n={app:{id:a.app.id,type:a.app.type},visitor:{user_xid:a.visitor.user_xid,visit_id:a.visitor.visit_id,visit_number:a.visitor.visit_number},landing:{id:a.landing.id,referer:a.landing.referer}}),l&&(o={type:l.type,template:l.template}),s&&(i={style:s.style}),window.DMP_NEON_TRACKING_DATA={...window.DMP_NEON_TRACKING_DATA,...n&&{info:n},action:e,screen:t,section:o,component:i}}function I(e){if("string"==typeof e){const t=document.createElement("a");return t.href=e,"localhost"!==t.hostname?t.hostname:null}return null}function T(e){return"audio"===(e?.type?.mode||e?.type||"video")}function b(e,t){const n={};if(!e)return n;return e.substring(1).split(/[;&]/).forEach((function(e){e=e.split("=");const o=decodeURIComponent(e[0]),i=decodeURIComponent(e[1]);!0===t?n[o]=i:(n[o]||(n[o]=[]),n[o].push(i))})),n}function R(e){const t=b(new URL(e).search,!0),n={};return Object.keys(t).forEach((function(e){n[e.replace(/_/g,"-").toLowerCase()]=t[e]})),n}function M(e,t){return R(e)[t=t.toLowerCase()]||null}function v(e){let t="";try{if(""===window.top.location.href)throw new Error("window.top.location not available");t=window.top.location.href}catch(e){const n=window.location.ancestorOrigins;n&&n.length>0&&(t=n[n.length-1])}try{const n=new URL(t);return n.hostname?e?n.hostname:t:""}catch(e){return""}}function S(e){return!!Array.isArray(m.gatekeepers)&&m.gatekeepers.indexOf(e)>-1}function L(){if(!window.DMP_ENABLE_ADS)return!1;const e=!(0,s.isDesktop)()&&(0,s.isIos)();return window.DMP_ONSITE&&e&&S("PV5_AD_SDK_WEB_IOS")||window.DMP_ONSITE&&!e&&S("PV5_AD_SDK_WEB")||!window.DMP_ONSITE&&S("PV5_AD_SDK_WEB_OFFSITE")}window.dmpNativeBridgeSendCommand=function(e,t){window.player&&"string"==typeof e&&window.player.api(e,t)};const C={videoIndex:0,viewId:null};function O(){const e=new Uint8Array(5);window.crypto.getRandomValues(e);const t=Array.from(e,(e=>e.toString(16))).join("").padStart(10,"0");return`${Date.now().toString(32)}${t}`}function N(e,t){if(window.DMP_ONSITE)return window.dmp_isGKEnabled("PV5_PARALLEL_ADS_CALL_ONSITE");if(!e&&t&&!window.dmp_isGKEnabled("PV5_PARALLEL_ADS_CALL_PLAYLIST_OFFSITE"))return!1;const n=window.dmp_isGKEnabled("PV5_PARALLEL_ADS_CALL");return n&&U()?window.dmp_isGKEnabled("PV5_TMP_PARALLEL_ADS_CALL_PREMIUM_PARTNER"):n&&G()?window.dmp_isGKEnabled("PV5_TMP_PARALLEL_ADS_CALL_PREMIUM_PARTNER_PROGRESSIVE_ROLLOUT"):n}function k(){return!window.DMP_IS_AUTOPLAY_ENABLED&&!a.Hz.value.enableAdPreload}function x(e,t){return!k()&&N(e,t)}function U(){return $(["capital.fr","programme-tv.net","femmeactuelle.fr","geo.fr","footmercato.net","marieclaire.fr","cosmopolitan.fr","huffingtonpost.fr","caminteresse.fr"])}function G(){return $(["lequipe.fr","leparisien.fr","cuisineactuelle.fr"])}function $(e){const t=(window.DMP_EMBEDDER||"").replace(/^https?:\/\//,"").split("/")[0],n=t.split(".").filter(Boolean),o=n.length>2?n.slice(-2).join("."):t;return e.some((e=>o.toLowerCase()===e.toLowerCase()))}},1128:(e,t,n)=>{n.d(t,{Tc:()=>E,l_:()=>p,uj:()=>P,WT:()=>f,N2:()=>s,oF:()=>g});var o=n(7638),i=n(7966);const r=e=>{if(window.DMP_INLINE_PLAYER_ROOT&&"function"==typeof window.dailymotionSavePlayerPerfSnapshot)return void window.dailymotionSavePlayerPerfSnapshot(e);if(!(()=>{try{return"1"===new URL(window.DMP_PLAYER_URL).searchParams.get("dmPerfMetrics")}catch{return!1}})())return;const t=window.parent;t&&"function"==typeof t.postMessage&&t.postMessage(JSON.stringify({type:"dm_perf_snapshot",snapshot:e}),window.DMP_TARGET_ORIGIN||"*")},a=(0,o.jl)("Perf"),d=new Map;let l=()=>performance.now();const s=e=>{l=e},c=(e,t,n)=>{if("number"!=typeof e||"number"!=typeof t)return null;const o=t-e;return o<0?null:o>n?n:Math.round(o)},_=e=>d.get(e),u=e=>e.runs.at(-1),w=(e,t)=>({id:e.id,description:e.description,color:e.color,...t}),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.entries(e.metrics).map((e=>{let[n,o]=e;const i=null===t?o.runs.at(-1):o.runs[t];return i?w({...o,id:o.id||n},i):null})).filter(Boolean)},m=(e,t)=>{const n=_(e),o=f(),d=u(n),l=n?.runs.length?n.runs.length-1:"?";a.groupCollapsed(`${e} ${t} (run ${l}): ${d?.start??d?.end??""}`),a.log(p(f(),null).filter((e=>"number"==typeof e.start)).sort(((e,t)=>e.start-t.start)).map((e=>{let t="not fired yet";return null!==e.duration&&(t=`${e.duration}ms (from ${e.start}ms to ${e.end}ms)`),`${e.id}:\n ${t}`})).join("\n")),a.groupEnd(),(e=>{i.NV.value=e})(o),r(o)},E=function(e){let{description:t=null,color:n=null,maxDuration:o=6e3,initialRun:i=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={id:e,description:t,color:n,maxDuration:o,runs:[]};if(d.set(e,r),i){const t=Math.round(i.start),n=null!=i.end?Math.round(i.end):null;r.runs.push({start:t,end:n,duration:null!==n?c(t,n,o):null}),m(e,"seed")}},P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=_(e);if(!n||0===n.runs.length)return null;const o=null===t?u(n):((e,t)=>e.runs[t])(n,t);return o?w(n,o):null},f=()=>{const e={};return d.forEach((t=>{let{id:n,description:o,color:i,runs:r}=t;0!==r.length&&(e[n]={id:n,description:o,color:i,runs:[...r]})})),{metrics:e}},h=new Map,g=e=>(h.has(e)||h.set(e,{start:()=>(e=>{_(e)||E(e),_(e).runs.push({start:l(),end:null,duration:null}),m(e,"start")})(e),end:()=>(e=>{const t=_(e);if(!t)return;const n=u(t);n&&null===n.end&&(n.end=l(),n.duration=c(n.start,n.end,t.maxDuration),m(e,"end"))})(e),get startTime(){const t=P(e);return t?t.start:null},get endTime(){const t=P(e);return t?t.end:null},get duration(){const t=P(e);return t?t.duration:null}}),h.get(e))},7558:(e,t,n)=>{const o=function(){const e=new URL(window.location.href).searchParams.get("dmLogger");return e||""}();o.split(",").includes("pes")},8164:(e,t,n)=>{n.d(t,{ej:()=>o});n(7558);const o=e=>{const t=window.document.cookie.split(";").map((e=>e.trim().split(/=(.*)/))).find((([t])=>t===e));return t?.[1]||""}},6918:(e,t,n)=>{n.d(t,{EI:()=>o,pQ:()=>r,uP:()=>i});const o="dmDevEventBusEnv",i=({gatekeepers:e,env:t}={})=>{const n="staging"===t;return Array.isArray(e)&&e.includes("PV5_PLAYER_EVENT_BUS")?n?"https://player-stg.dm-event.net":"https://player.dm-event.net":n?"https://pebed.stg.dm.gg":"https://pebed.dm-event.net"};function r(){return 60*(new Date).getTimezoneOffset()*1e3*-1}},8050:(e,t,n)=>{n.d(t,{b:()=>o,j:()=>i});const o=[{key:"adPressureOptimization",isPublic:!0,trackableKey:"adPressureOptimization"},{key:"aspectRatio",isPublic:!0,trackableKey:"aspectRatio"},{key:"autonextAfter",isPublic:!0,trackableKey:"autonextAfter"},{key:"autoskipAfter",isPublic:!0,trackableKey:"autoskipAfter"},{key:"autostart",isPublic:!0,trackableKey:"autostart"},{key:"color",isPublic:!0,trackableKey:"color"},{key:"contextualContentFreshness",isPublic:!0,trackableKey:"contextualContentDayRange"},{key:"contextualContentSource",isPublic:!0,trackableKey:"contextualContentSource"},{key:"contextualContentSourceChannels",isPublic:!0,trackableKey:null},{key:"enableAdPreload",isPublic:!0,trackableKey:"enableAdPreload"},{key:"enableAds",isPublic:!0,trackableKey:"enableAds"},{key:"enableAdsControls",isPublic:!0,trackableKey:"enableAdsControls"},{key:"enableAttentionPeaks",isPublic:!0,trackableKey:"enableAttentionPeaks"},{key:"enableAutomaticRecommendations",isPublic:!0,trackableKey:"enableAutomaticRecommendations"},{key:"enableAutonext",isPublic:!0,trackableKey:"enableAutonext"},{key:"enableAutoskip",isPublic:!0,trackableKey:"enableAutoskip"},{key:"enableContentPreload",isPublic:!0,trackableKey:"enableContentPreload"},{key:"enableChannelLink",isPublic:!0,trackableKey:"enableChannelLink"},{key:"enableContextualContent",isPublic:!0,trackableKey:"enableContextualContent"},{key:"enableContextualContentFallback",isPublic:!0,trackableKey:"enableContextualContentFallback"},{key:"enableContextualContentFreshness",isPublic:!0,trackableKey:"enableContextualContentDayRange"},{key:"enableCustomRecommendations",isPublic:!0,trackableKey:"enableCustomRecommendations"},{key:"enableDmLogo",isPublic:!0,trackableKey:"enableDmLogo"},{key:"enableDynamicThumbnail",isPublic:!0,trackableKey:"enableDynamicThumbnail"},{key:"enableEcoMode",isPublic:!0,trackableKey:"enableEcoMode"},{key:"enableEidCollection",isPublic:!0,trackableKey:"enableEidCollection"},{key:"enableGooglePolicyUi",isPublic:!0,trackableKey:"enableGooglePolicyUi"},{key:"enableHoldToFastforward",isPublic:!0,trackableKey:"enableHoldToFastforward"},{key:"enableInlinePlayer",isPublic:!1,trackableKey:"enableInlinePlayer"},{key:"enableKeyboardShortcuts",isPublic:!0,trackableKey:"enableKeyboardShortcuts"},{key:"enableLiveOffairScreen",isPublic:!0,trackableKey:"enableLiveOffairScreen"},{key:"enableLegacyPip",isPublic:!0,trackableKey:"enableLegacyPip"},{key:"enableMute",isPublic:!0,trackableKey:"enableMute"},{key:"enablePaidPartnershipLabel",isPublic:!0,trackableKey:"enablePaidPartnershipLabel"},{key:"enablePipLargeSize",isPublic:!0,trackableKey:"enablePipLargeSize"},{key:"enablePipPlacement",isPublic:!0,trackableKey:"enablePipPlacement"},{key:"enablePlaybackControls",isPublic:!0,trackableKey:"enablePlaybackControls"},{key:"enableReceiveUrlLocation",isPublic:!0,trackableKey:"enableReceiveUrlLocation"},{key:"enableSharing",isPublic:!0,trackableKey:"enableSharing"},{key:"enableSharingUrlLocation",isPublic:!0,trackableKey:"enableSharingUrlLocation"},{key:"enableSpinner",isPublic:!0,trackableKey:"enableSpinner"},{key:"enableStartPipExpanded",isPublic:!0,trackableKey:"enableStartPipExpanded"},{key:"enableStartscreenDmLink",isPublic:!0,trackableKey:"enableStartscreenDmLink"},{key:"enableSubtitles",isPublic:!0,trackableKey:"enableSubtitles"},{key:"enableTitlesInVideoCards",isPublic:!0,trackableKey:"enableTitlesInVideoCards"},{key:"enableVideoTitleLink",isPublic:!0,trackableKey:"enableVideoTitleLink"},{key:"enableVideoTitle",isPublic:!0,trackableKey:"enableVideoTitle"},{key:"enableVideoOwner",isPublic:!0,trackableKey:"enableVideoOwner"},{key:"enableWaitForCustomConfig",isPublic:!0,trackableKey:"enableWaitForCustomConfig"},{key:"enableWatchNowCard",isPublic:!0,trackableKey:"enableWatchNowCard"},{key:"hasReachedPlaybackLimits",isPublic:!1,trackableKey:"hasReachedPlaybackLimits"},{key:"hasSubscriptionStatusRestricted",isPublic:!1,trackableKey:"hasSubscriptionStatusRestricted"},{key:"hasRecommendationsFromOrgOnly",isPublic:!1,trackableKey:"hasRecommendationsFromOrgOnly"},{key:"hasSsai",isPublic:!1,trackableKey:"hasSsai"},{key:"id",isPublic:!0,trackableKey:"id"},{key:"ownerId",isPublic:!1,trackableKey:null},{key:"pip",isPublic:!0,trackableKey:"pip"},{key:"pipSelectedPlacement",isPublic:!0,trackableKey:"pipSelectedPlacement"},{key:"recommendationsOptimisation",isPublic:!0,trackableKey:"recommendationsOptimisation"},{key:"status",isPublic:!1,trackableKey:null},{key:"type",isPublic:!1,trackableKey:null},{key:"userChannelOrganization",isPublic:!1,trackableKey:null},{key:"waitForCustomConfigDelay",isPublic:!0,trackableKey:null},{key:"watermarkImageType",isPublic:!0,trackableKey:"watermarkImageType"},{key:"watermarkImageUrl",isPublic:!0,trackableKey:null},{key:"watermarkLinkType",isPublic:!0,trackableKey:"watermarkLinkType"},{key:"watermarkLinkUrl",isPublic:!0,trackableKey:null}],i=e=>e&&"object"==typeof e?e.status&&"ok"!==e.status||void 0===e.player_id?e:(e=>{const{player_id:t,error:n,profile:o={},endpoints:i={},advertising:r={},content:a={},contextual:d={},interface:l={},pip:s={},playback:c={},recommendations:_={},type:u={},watermark:w={},status:p}=e;return{id:t,status:n?.code??p??"ok",adPressureOptimization:r.pressure_mode,aspectRatio:l.aspect_ratio,autonextAfter:c.autonext_duration,autoskipAfter:c.autoskip_duration,autostart:c.autostart_mode,color:l.color,contextualContentFreshness:d.freshness_days,contextualContentSource:d.source,contextualContentSourceChannels:d.profiles_sources??d.profile_sources,enableAdPreload:r.enable_preload,enableAds:r.enable_ads,enableAdsControls:l.enable_ads_controls,enableAttentionPeaks:l.enable_attention_peaks,enableAutomaticRecommendations:_.enable_automatic,enableAutonext:c.enable_autonext,enableAutoskip:c.enable_autoskip,enableChannelLink:a.enable_profile_link,enableContentPreload:c.enable_content_preload,enableContextualContent:d.enable_contextual_content,enableContextualContentFallback:d.enable_fallback,enableContextualContentFreshness:d.enable_freshness,enableCustomRecommendations:_.enable_custom,enableDmLogo:l.enable_dm_logo,enableDynamicThumbnail:l.enable_dynamic_thumbnail,enableEcoMode:c.enable_eco_mode,enableEidCollection:r.enable_eid_collection,enableGooglePolicyUi:s.enable_google_policy_ui,enableHoldToFastforward:c.enable_hold_to_fastforward,enableInlinePlayer:u.enable_inline,enableKeyboardShortcuts:l.enable_keyboard_shortcuts,enableLegacyPip:s.enable_legacy_pip,enableLiveOffairScreen:l.enable_live_offair_screen,enableMute:c.enable_mute,enablePaidPartnershipLabel:l.enable_paid_partnership_label,enablePipLargeSize:s.enable_large_size,enablePipPlacement:s.enable_selected_placement,enablePlaybackControls:l.enable_controls,enableReceiveUrlLocation:c.enable_receive_url_location,enableSharing:l.enable_sharing,enableSharingUrlLocation:l.enable_sharing_url_location,enableSpinner:l.enable_spinner,enableStartPipExpanded:s.enable_start_pip_expanded,enableStartscreenDmLink:l.enable_startscreen_dm_link,enableSubtitles:l.enable_subtitles,enableTitlesInVideoCards:l.enable_titles_in_video_cards,enableVideoOwner:a.enable_profile,enableVideoTitle:a.enable_title,enableVideoTitleLink:a.enable_title_link,enableWaitForCustomConfig:r.enable_wait_for_custom_config,enableWatchNowCard:l.enable_watch_now_card,embedHtmlUrl:i.iframe_url,embedScriptUrl:i.embed_url,hasReachedPlaybackLimits:c.has_reached_playback_limits,hasRecommendationsFromOrgOnly:_.has_from_org_only,hasSsai:r.has_ssai,hasSubscriptionStatusRestricted:c.has_subscription_status_restricted,libScriptUrl:i.lib_url,ownerId:o.profile_id,pip:s.mode,pipSelectedPlacement:s.selected_placement,recommendationsOptimisation:_.optimization_mode,type:u.mode,userChannelOrganization:o.organization_id,waitForCustomConfigDelay:r.wait_for_custom_config_delay,watermarkImageType:w.image_type,watermarkImageUrl:w.image_url,watermarkLinkType:w.link_type,watermarkLinkUrl:w.link_url}})(e):e},1793:(e,t,n)=>{n.d(t,{Z:()=>o});const o="query($channelXids:[String!]$language:String $url:String! $title:String! $content:String! $organizationXid:String! $freshnessDate:Date $hasFallback:Boolean!){player(page:{language:$language url:$url title:$title content:$content}embed:CONTEXTUAL){queue{recordings(filter:{organizationXid:{eq:$organizationXid},creatorXid:{in:$channelXids},createDate:{gte:$freshnessDate}}fallback:$hasFallback,page:1,first:30){metadata{algorithm{uuid version}}edges{node{algorithm{version}recording{...VideoFields}}}}}}}fragment VideoFields on Video{title xid duration thumbnail(height:PORTRAIT_480){url}detected_langage:language(auto:true){codeAlpha2}}"}},e=>(e.O(0,[758],(()=>{return t=5382,e(e.s=t);var t})),e.O())])));