(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,531166,e=>{"use strict";var t=e.i(247865),a=e.i(695881),o=e.i(792461),i=e.i(546446),r=e.i(737801),n=e.i(725287),l=e.i(293163),s=e.i(283821),d=e.i(630986),c=e.i(64412),u=e.i(608201),m=e.i(236593),p=e.i(867059),v=e.i(540768),g=e.i(682142),y=e.i(782937),f=e.i(333350),b=e.i(950771),h=e.i(537989),w=e.i(695203),k=e.i(604323),x=e.i(158662),A=e.i(736677),S=e.i(220126),N=e.i(358273),C=e.i(777638),P=e.i(122124),I=e.i(409628),R=e.i(924776),E=e.i(605781);let _=(0,a.createLogger)("useTrackVideoEvent"),M=["auto","click","playlistClick","nextClick","externalLink"],T={complete:"completed",nextVideo:"next",pageExit:"pageExit",scrollAway:"newVideo"},V=e=>({adBlock:e.adBlock??!1,adsMetricsUnitAndZone:e.adsMetricsUnitAndZone,aspectRatio:e.aspectRatio,assetName:e.assetName,collection:e.collection,collectionId:e.collectionId,createdDate:e.createdDate,duration:e.duration,entitlements:e.entitlements,errorMessage:e.errorMessage,iabContent:e.iabContent,id:e.id??"",lastModifiedDate:e.lastModifiedDate,liveStream:e.liveStream,muted:e.muted??!1,playLists:e.playLists,playReason:e.playReason,premiumContent:null!=e.premiumContent?String(e.premiumContent):null,providerName:e.providerName,publishDate:e.publishDate,tagsGeo:e.tagsGeo,tagsKeyword:e.tagsKeyword,tagsStorm:e.tagsStorm,videoView:e.videoView}),L=e=>{let{providerName:t,...a}=V(e);return{...a,provider:t}},D=(e,t,a)=>{var o;return{adBlock:t.adBlock??!1,adsMetricsUnitAndZone:t.adsMetricsUnitAndZone,assetName:t.assetName,collection:t.collection,collectionId:t.collectionId,contentId:e.contentId??"",createdDate:t.createdDate,deviceTimeZone:a,entitlements:t.entitlements,errorMessage:t.errorMessage,iabContent:t.iabContent,lastModifiedDate:t.lastModifiedDate,liveStream:t.liveStream,orientation:t.orientation??"",playLists:t.playLists,playMethod:"scroll"===(o=t.playMethod)?"auto":M.find(e=>e===o)??"click",premiumContent:t.premiumContent,provider:t.providerName,publishDate:t.publishDate,tagsGeo:t.tagsGeo,tagsKeyword:t.tagsKeyword,tagsStorm:t.tagsStorm,videoLength:t.videoLength??0,videoView:t.videoView}},W={"video-started":(e,t)=>{let a=V(t);(0,E.trackVideoStarted)({...e,...a})},"video-completed":(e,t)=>{let a=V(t);(0,E.trackVideoCompleted)({...e,...a})},"video-played":(e,t)=>{let a=V(t);(0,E.trackVideoPlayed)({...e,...a})},"ad-started":(e,t)=>{(0,E.trackAdStarted)({...e,...L(t)})},"ad-complete":(e,t)=>{(0,E.trackAdComplete)({...e,...L(t)})},"ad-skipped":(e,t,{pageCount:a})=>{(0,E.trackAdSkipped)({...e,...L(t),pageCount:a})},"video-attempted":(e,t,{deviceTimeZone:a})=>{let o=D(e,t,a);(0,E.trackVideoAttempted)({...e,...o})},"video-begin":(e,t,{deviceTimeZone:a})=>{let o=D(e,t,a);(0,E.trackVideoBegin)({...e,...o,adLength:t.adLength??0,adSkipped:t.adSkipped,adWatchedLength:t.adWatchedLength})},"video-ended":(e,t,{deviceTimeZone:a})=>{let o=D(e,t,a),i=T[t.exitReason??""]??t.exitReason??"";(0,E.trackVideoEnded)({...e,...o,adLength:t.adLength??0,adSkipped:t.adSkipped,adWatchedLength:t.adWatchedLength,exitReason:i,rewind:t.rewind??!1,videoWatchedLength:t.videoWatchedLength??0})}},j=(0,a.createLogger)("useTrackVideoEvent");e.s(["useTrackVideoEvent",0,()=>{let e=(()=>{let e=(0,r.useEventAttributes)(),a=(0,d.useCMSAttributes)(),p=(0,n.usePathname)(),{location:v}=(0,c.useLocation)(),g=v?.ianaTimeZone||"Etc/UTC",y=(0,i.useAtomValue)(u.sourcePageAtom),f=(0,i.useAtomValue)(m.sourceModuleAtom),b=(0,o.useRefMemo)(e),h=(0,o.useRefMemo)(a),w=(0,o.useRefMemo)(p),k=(0,o.useRefMemo)(g),x=(0,t.useRef)(y),A=(0,t.useRef)(f);return(0,t.useCallback)(({eventName:e,eventAttributes:t={}})=>{if(!window.mParticle?.isInitialized?.())return void console.warn("MParticle is not initialized");let a=b.current,o=h.current,i=w.current,r=k.current,n=x.current,d=A.current,c={...t,author:o?.author||"",contentId:o?.contentId||t.contentId,...a,url:i?(0,l.stripLastPartOfSlug)(i):"",sourcePage:n??"",sourceModule:d?.id??null,sourceModuleName:d?.name??null,...d?.modulePosition!=null&&{sourcePosition:d.modulePosition},sourceElement:d?.element??null,siteMode:"normal"};["video-ended","video-begin","video-attempted","ad-started","ad-skipped","ad-complete"].includes(e)&&(void 0!==c.providerName&&(c.provider=c.providerName),delete c.providerName,c.deviceTimeZone=(0,s.getTimezoneOffsetInHours)(r)),["video-ended","video-begin","video-attempted"].includes(e)&&(delete c.duration,delete c.muted,delete c.id,delete c.aspectRatio,delete c.pageCount);try{window.mParticle?.logEvent?.(e,window.mParticle?.EventType?.Other,c),console.debug(`MParticle: Video Event tracked - "${e}"`,c)}catch(t){console.error(`MParticle: Failed to track Video Event - "${e}"`,t)}},[])})(),a=(()=>{let e=(0,i.useAtomValue)(h.pageIdAtom),a=(0,i.useAtomValue)(b.pageLocaleAtom),r=(0,i.useAtomValue)(w.deviceClassAtom),l=(0,i.useAtomValue)(k.metricsArticleDataAtom),d=(0,i.useAtomValue)(x.experimentJoinListAtom),u=(0,i.useAtomValue)(A.sourcePageAtom),m=(0,i.useAtomValue)(S.sourceModuleAtom),E=(0,n.usePathname)(),{location:M}=(0,c.useLocation)(),T=(0,R.useIsHightouchReady)(),V=(0,p.usePageViewCount)(),L=(0,o.useRefMemo)(e),D=(0,o.useRefMemo)(a),j=(0,o.useRefMemo)(r),U=(0,o.useRefMemo)(l),$=(0,o.useRefMemo)(d),O=(0,o.useRefMemo)(E),B=(0,o.useRefMemo)(V),H=(0,o.useRefMemo)(M),F=(0,o.useRefMemo)(T),z=(0,t.useRef)(u),J=(0,t.useRef)(m);return(0,t.useCallback)(({eventName:e,eventAttributes:t={}})=>{if(!f.default)return;let a=W[e];if(a){if(!F.current)return void _.warn(`Hightouch: Event "${e}" skipped - SDK not ready`);try{let o=U.current,i=H.current,r=O.current,n=z.current,l=J.current,d=(0,g.getCICookie)(),c=d?.["TWC-GeoIP-Country"]??(0,v.getCookie)("twc-location-country"),u=d?.["TWC-GeoIP-Region"]??(0,v.getCookie)("twc-location-region"),m=d?.["TWC-Privacy"]??(0,v.getCookie)("twc-privacy"),p=window.DprSdk?.getGdprConsentOptInsString()??"",f=window.DprSdk?.getCcpaSaleOptInString()??"",b=String(window.DprSdk?.getUserConsent("sale-of-data")!==!1),h=(0,v.getCookie)("partner")||"",w=(0,y.getPartnerByPattern)(h)??h,k=(0,N.getMetricsSession)(),x=new Date,A={pageId:L.current??"",schemaVersion:"nextgen",author:o?.author||"",contentId:o?.contentId||t.contentId||null,url:r?(0,P.stripLastPartOfSlug)(r):"",sourcePage:n??null,sourceModule:l?.id??null,sourceElement:l?.element??null,sourcePosition:l?.modulePosition??null,referrer:document.referrer,locale:D.current,deviceClass:j.current,partner:w,sessionId:k?.sessionId||"",sessionStartTime:new Date(k?.sessionStartTime||0).toISOString(),siteMode:"normal",dayOfWeek:I.WEEK_DAYS[x.getDay()]??"",hourOfDay:x.getHours(),regime:m??"",cookiesEnabled:navigator?.cookieEnabled??!1,gpcSignalOptOut:window.navigator?.globalPrivacyControl??!1,functionalTechnologies:p?.includes("functional-technology")??!1,geographicallyRelevantAds:window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,interestBasedAds:window.DprSdk?.getUserConsent("interest-based-ads")!==!1,priv:p,privProducts:f,saleOfData:b,saleOfDataAuthorization:b,sensitiveDataAuthorization:String(window.DprSdk?.getUserConsent("sensitive-data")!==!1),campaign:(0,C.getCampaign)(),linkReferral:(0,C.getLinkReferral)()??void 0,experimentJoinList:$.current,weatherMode:"normal",physicalCountry:c??"",physicalState:u??"",wlocCity:i?.city??null,wlocCountry:i?.countryCode??null,wlocState:i?.adminDistrictCode??null,wlocDMA:i?.dmaCd??null,samsungVersion:(0,C.getSamsungVersion)(),appVersion:"3d9f6c2d34c79fe983bdfcc8d3d447b1317ef888".slice(0,10)},S=(0,s.getTimezoneOffsetInHours)(i?.ianaTimeZone||"Etc/UTC");a(A,t,{deviceTimeZone:S,pageCount:B.current}),_.info(`Hightouch: Event "${e}" tracked`)}catch(t){_.error(`Hightouch: Event "${e}" failed`,t)}}},[])})();return(0,t.useCallback)(t=>{let o={...t.eventAttributes};delete o.rewind;try{e({eventName:t.eventName,eventAttributes:o})}catch(e){j.error(`mParticle video event "${t.eventName}" failed`,e)}try{a(t)}catch(e){j.error(`Hightouch video event "${t.eventName}" failed`,e)}},[e,a])}],531166)},506371,e=>{e.v({compactNextUp:"JWPlayer-module-scss-module__bzwBeG__compactNextUp",jwplayerContainer:"JWPlayer-module-scss-module__bzwBeG__jwplayerContainer"})},777430,e=>{"use strict";var t=e.i(902875),a=e.i(247865),o=e.i(632137),i=e.i(533760);let r={autoplayadsmuted:!1,client:"googima",vpaidcontrols:!0},n=new Map;var l=e.i(695881),s=e.i(506371),d=e.i(37429);let c=(0,l.createLogger)("JWPlayer"),u=(0,a.memo)(function({status:e,hasFile:a,playerDomId:i,aspectRatioClass:r,fill:n}){let l=(0,o.cn)(n&&"h-full");return"loading"===e&&a?(0,t.jsx)("div",{className:l,children:(0,t.jsx)("div",{className:(0,o.cn)("flex w-full items-center justify-center bg-black",r),children:(0,t.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-t-2 border-b-2 border-white"})})}):"error"===e?(0,t.jsx)("div",{className:l,children:(0,t.jsx)("div",{className:(0,o.cn)("flex w-full items-center justify-center bg-black text-white",r),children:"Failed to initialize video player"})}):(0,t.jsx)("div",{className:l,children:(0,t.jsx)("div",{id:i,className:(0,o.cn)("w-full bg-black",r)})})});e.s(["JWPlayer",0,({playlist:e,options:l={},setupParams:m={},events:p=[],className:v="",placeHolder:g,placeHolderImage:y,fill:f=!1,compactNextUp:b=!1,posterPriority:h=!1,posterSizes:w="(max-width: 767px) 100vw, 66vw"})=>{let k=`player-${(0,a.useId)()}`,{playerId:x="IdNDrRWQ"}=m,A=(0,a.useMemo)(()=>(({playlist:e,setupParams:t={},options:a={},fill:o=!1})=>({playlist:e,...(e=>{let{ads:t=!0,showDescriptions:a=!0,mute:o=!1}=e;return{aspectratio:"16:9",autostart:!0,backgroundLoading:!0,width:"100%",mute:o,autoPause:{pauseAds:!0,viewability:!0},captions:{backgroundOpacity:50,fontSize:14},...t?{advertising:{...r,autoplayadsmuted:o}}:{},...a?{displaytitle:!0,displaydescription:!0}:{displaytitle:!1,displaydescription:!1}}})(t),...a,...o&&{aspectratio:void 0,width:"100%",height:"100%"},floating:{dismissible:!0,...a.floating}}))({playlist:e,setupParams:m,options:l,fill:f}),[e,m,l,f]),S=f?"h-full":"9:16"===A.aspectratio?"aspect-[9/16]":"aspect-video",N="9:16"===A.aspectratio?{width:720,height:1280}:{width:1280,height:720},C=(0,a.useRef)(null),P=(0,a.useRef)(!1),I=e?.[0]?.file,[R,E]=(0,a.useState)(I?"loading":"error");(0,a.useEffect)(()=>{if(P.current||!("jwplayer"in window)||"ready"!==R||!I)return;let e=window.jwplayer(k);C.current=e,P.current=!0,n.set(k,e),c.info("initialized player"),e.setup(A),p.forEach(({eventName:t,callback:a})=>{e.on(t,t=>{a({event:t,player:e})}),c.lifecycle(`Registered event handler for ${t}`)});let t=(()=>{let e=new URLSearchParams(window.location.search).get("t");if(!e)return null;let t=Number(e);return isNaN(t)||t{try{e.seek(t),c.info(`Successfully seeked to ${t} seconds`)}catch(e){c.error("Error seeking to position",e)}}))},[A,p,I,k,R]),(0,a.useEffect)(()=>{P.current&&((e,t)=>{if(!e||!t)return;e.style.backgroundImage=`url("${t}")`;let a=e.querySelector(".jw-preview");a&&(a.style.backgroundImage=`url("${t}")`);let o=e.querySelector("video");o&&(o.poster=t)})(document.getElementById(k),y)},[y,k]),(0,a.useEffect)(()=>()=>{if(C.current)try{C.current.remove(),n.delete(k),C.current=null,P.current=!1}catch(e){c.error("Error removing JW Player",e)}},[k]);let _=g?y||e?.[0]?.image:"";return(0,t.jsxs)("div",{className:(0,o.cn)(f&&"absolute inset-0"),children:[I&&(0,t.jsx)(i.default,{src:`https://cdn.jwplayer.com/libraries/${x}.js`,onLoad:()=>E("ready"),onReady:()=>E("ready"),onError:()=>E("error")}),(0,t.jsxs)("div",{className:(0,o.cn)("relative overflow-hidden",f&&"h-full",s.default.jwplayerContainer,b&&s.default.compactNextUp,v),children:[_&&(0,t.jsx)(d.default,{priority:h,isFetchPriority:h,width:N.width,height:N.height,sizes:w,className:(0,o.cn)("absolute w-full",S,f&&"object-cover"),src:_,alt:""}),(0,t.jsx)(u,{status:R,hasFile:!!I,playerDomId:k,aspectRatioClass:S,fill:f})]})]})}],777430)},484758,e=>{"use strict";var t=e.i(695881);let a={mobile:"mobile_smart",desktop:"web_weather"},o={"en-US":"us"},i=[...new Set(Object.values(a))].join("|"),r=RegExp(`^(?:test_)?(?:${i})(?:_[a-z]+)*\\/`),n=RegExp(`^(?:test_)?(?:${i})(?:_[a-z]+)*$`),l=e=>{if("string"!=typeof e)return"";let t=e.trim().replace(/\s+/g,"").replace(/\/{2,}/g,"/").replace(/^\/+|\/+$/g,"");if(!t)return"";let a=t.replace(r,"");return n.test(a)?"":a};var s=e.i(965586);let d=(0,t.createLogger)("AdUtils"),c=async({player:e,user:t,ctx:a={},isMobile:o=!1})=>{if(!e)return;if(t?.isUserPremium)return void e.play();let i=await u(a,o);i?e.playAd(i):e.play()},u=async(e,t=!1)=>{let a;if(!g())return null;let o=p(e,t),i=e.iab,r=m(structuredClone(window?.__HeliosConfig?.generalConfig?.cModules?.iabc?.page??{}),i);window.__Helios.emit("UPDATE_AD_UNIT_PATH",o);try{window.__Helios.modules?.iabc?.update?.({page:r,site:{v1:["IAB15-10_Weather"],v3:["390_Weather"]}})}catch(e){d.error("Error updating IABC parameters",e)}try{a=await v()}catch(e){a=null,d.error("Error getting ad tag",e)}return window.__Helios.emit("UPDATE_AD_UNIT_PATH",o),a},m=(e,t)=>{let a={...e};for(let e in t)Array.isArray(t[e])?(a[e]=[...a[e]||[],...t[e]],a[e]=[...new Set(a[e])]):"object"==typeof t[e]&&null!==t[e]?a[e]=m(a[e]||{},t[e]):a[e]=t[e];return a},p=(e,t)=>{let i=window?.__HeliosConfig?.generalConfig,r=`/${(i?.targeting?.networkCode??"").trim().replace(/^\/+|\/+$/g,"")||"7646"}`,n=i?.targeting?.adUnits||(({deviceClass:e,locale:t="en-US"})=>{let i=o[t]??"intl",r=a[e]??"web_weather";return`${r}_${i}`})({deviceClass:t?"mobile":"desktop"}),d=(0,s.getCookie)("adstest");void 0===d||""===d||n.startsWith("test_")||(n=`test_${n}`);let c=l(e.collectionAdZone)||l(e.adzone)||l(i?.targeting?.adZone)||"video";return`${r}/${n}/${c}`},v=async()=>{let e=[];try{e=await window?.__Helios.video.requestVideoBids()}catch(e){d.error("Error getting video bids",e)}return await window.__Helios.modules.videoTag.createAdTag(e)},g=()=>{try{return"function"==typeof window.__Helios?.video?.requestVideoBids&&"function"==typeof window.__Helios?.modules?.videoTag?.createAdTag}catch{return!1}},y=e=>{let{collectionId:t,videoIndex:a,videoId:o}=e||{};return{videoCount:a,videoId:o,collectionId:t}},f=e=>"GDFP"===e||"AdSense/AdX"===e;var b=e.i(157112);let h=(0,t.createLogger)("AdEvents"),w=new Set(["amznbid","crt_pb","hb_pb"]),k=[{eventName:"ready",callback:({event:e})=>{(0,b.sendReumEvent)("videoReady",{isViewable:!!e.viewable,setupTime:e.setupTime})}},{eventName:"beforePlay",callback:async({event:e,player:t,isFirstPlayRef:a,user:o,isMobile:i})=>{if(!a?.current)return;let r=t.getPlaylistItem(),n=r?.custom?.ctx;n&&(n.videoIndex=t.getPlaylistIndex());let l=y(n);(0,b.sendReumEvent)("videoBeforePlay",{...l,isViewable:!!e.viewable,playReason:e.playReason}),t.stop(),await c({player:t,user:o,ctx:n,isMobile:i}),a.current=!1}},{eventName:"adRequest",callback:({event:e,player:t})=>{let a=t.getPlaylistItem(),o=a?.custom?.ctx,i={},r=y(o);try{var n;let t=((e,t="https")=>e.replace(/^\/\//,`${t}://`))(e.tag||""),a=(n=new URL(t).searchParams.get("cust_params"))?n.split("&").reduce((e,t)=>{let[a,o]=t.split("=");return a&&o&&(e[a]||(e[a]=[]),e[a].push(o)),e},{}):{};for(let e of Object.keys(a))w.has(e)&&(i[`kv_${e}`]=`${a[e]}`)}catch(e){h.error("Error parsing cust_params",e)}(0,b.sendReumEvent)("videoAdRequest",{...r,isViewable:!!e.viewable,roll:e.adposition,...i})}},{eventName:"adStarted",callback:({event:e,player:t})=>{let a=t.getPlaylistItem(),o=a?.custom?.ctx,{duration:i,adposition:r}=e,n=y(o),l="";try{let t=e.ima?.ad?.data;t&&(l=(e=>{let{adSystem:t,adId:a,adWrapperSystems:o,adWrapperIds:i}={adSystem:"",adId:"",adWrapperSystems:[],adWrapperIds:[],...e};if(f(t))return a;let r=o.findIndex(f);return r>=0&&r{let a=t.getPlaylistItem(),o=y(a?.custom?.ctx);(0,b.sendReumEvent)("videoStart",{...o,isViewable:!!e.viewable,loadTime:e.loadTime})}},{eventName:"complete",callback:({player:e})=>{let t=e.getPlaylistItem(),a=y(t?.custom?.ctx);(0,b.sendReumEvent)("videoComplete",{...a})}},{eventName:"adSkipped",callback:({player:e})=>{let t=e.getPlaylistItem(),a=y(t?.custom?.ctx);(0,b.sendReumEvent)("videoAdSkip",{...a})}},{eventName:"playlistItem",callback:async({event:e,player:t,isFirstPlayRef:a,user:o,isMobile:i})=>{if(a?.current)return;let{item:r}=e,n=r?.custom?.ctx;n.videoIndex=t.getPlaylistIndex(),t.stop(),await c({player:t,user:o,ctx:n,isMobile:i})}},{eventName:"adComplete",callback:async({player:e})=>{e.play()}},{eventName:"adError",callback:async({event:e,player:t})=>{let a=t.getPlaylistItem(),o=y(a?.custom?.ctx);(0,b.sendReumEvent)("videoAdError",{...o,message:e.message,code:e.code,vastCode:e.vastCode,roll:e.adposition}),h.error("Ad error occurred",e),t.play()}},{eventName:"error",callback:async({event:e,player:t})=>{let a=t.getPlaylistItem(),o=y(a?.custom?.ctx);(0,b.sendReumEvent)("videoError",{...o,message:e.message,code:e.code}),h.error("Video Player error",e)}},{eventName:"setupError",callback:({event:e})=>{(0,b.sendReumEvent)("videoSetupError",{message:e.message,code:e.code})}}];e.s(["adEvents",0,k],484758)},617843,e=>{"use strict";var t=e.i(293163),a=e.i(896363);let o="",i=!1,r="",n=1,l=0,s=0,d=!1,c=0,u=0,m=!1,p=0,v={adImpression:!1,videoAttempt:!1,videoStarted:!1,videoCompleted:!1},g={autostart:"auto",interaction:"click",external:"externalLink",playlist:"playlistClick","related-interaction":"nextClick","related-auto":"auto"};function y(e){return g[e]??"click"}function f(e){if(!e)return 0;let t=e.split(":").map(Number);if(2===t.length){let[e=0,a=0]=t,o=Math.floor(60*e+a);return isNaN(o)?0:o}if(3===t.length){let[e=0,a=0,o=0]=t,i=Math.floor(3600*e+60*a+o);return isNaN(i)?0:i}return 0}function b(){Object.keys(v).map(e=>{v[e]=!1}),l=0,s=0,d=!1,r=""}function h(e,o){let i=o||e.getPlaylistItem();return{adBlock:e.getAdBlock(),adsMetricsUnitAndZone:i?.custom?.ctx?.adzone,aspectRatio:i?.custom?.ctx?.aspectRatio,assetName:(0,t.stripLastPartOfSlug)(i?.custom?.ctx?.assetName??""),cmsUrl:i?.custom?.ctx?.cmsUrl??i?.custom?.ctx?.assetName??"",collection:i?.custom?.ctx?.pcollid,collectionId:i?.custom?.ctx?.pcollid,contentId:i?.custom?.ctx?.id,createdDate:i?.custom?.ctx?.createddate,duration:i?.custom?.duration,entitlements:(0,a.parseArrayToString)(i?.custom?.ctx?.entitlements??[]),iabContent:(0,t.mapIabTagsToIabContent)(i?.custom?.ctx?.iab||{}),id:i?.custom?.ctx?.id,lastModifiedDate:i?.custom?.ctx?.lastmodifieddate?.toString(),liveStream:i?.custom?.ctx?.liveStream??!1,muted:e.getMute(),playLists:(0,a.parseArrayToString)((i?.custom?.ctx?.playlists??[]).map(e=>e.id||Object.keys(e)[0]).filter(e=>!!e)),premiumContent:i?.custom?.ctx?.premium,publishDate:i?.custom?.ctx?.publishdate?.toString().slice(0,10),providerName:i?.custom?.ctx?.providername,tagsGeo:(0,a.parseArrayToString)(i?.custom?.ctx?.tagsGeo),tagsKeyword:(0,a.parseArrayToString)(i?.custom?.ctx?.tagsKeyword),tagsStorm:(0,a.parseArrayToString)(i?.custom?.ctx?.tagsStorm)}}let w=[{eventName:"ready",callback:({player:e,trackVideoEvent:t})=>{window.addEventListener("beforeunload",()=>{if(v.videoStarted&&!v.videoCompleted){let a=e.getPlaylistItem(),i=f(a?.custom?.ctx?.duration),s=a?.custom?.ctx?.aspectRatio;a&&!v.videoAttempt&&t&&t({eventName:"video-ended",eventAttributes:{rewind:d,errorMessage:r,videoWatchedLength:l,playMethod:o,videoView:n,...h(e),videoLength:i,adLength:c,adWatchedLength:u,adSkipped:m,exitReason:"pageExit",orientation:s}}),v.videoCompleted=!0}})}},{eventName:"adImpression",callback:async({player:e,trackVideoEvent:t})=>{let a=e.getPlaylistItem();if(r="",b(),console.debug("JW Player callback - adImpression eventSentFlags:",v),v.adImpression=!0,a&&!v.videoAttempt&&t){let i=f(a?.custom?.ctx?.duration),l=a?.custom?.ctx?.aspectRatio;t({eventName:"video-played",eventAttributes:{errorMessage:r,playReason:o,videoView:n,...h(e)}}),t({eventName:"video-attempted",eventAttributes:{errorMessage:r,playMethod:o,videoLength:i,videoView:n,orientation:l,...h(e)}}),v.videoAttempt=!0}}},{eventName:"viewable",callback:async({event:e})=>{n=e?.viewable}},{eventName:"playlistItem",callback:async({player:e,trackVideoEvent:t})=>{if(v.videoStarted&&!v.videoCompleted){let a=e.getPlaylistIndex(),i=e.getPlaylistItem(a-1),s=f(i?.custom?.ctx?.duration),p=i?.custom?.ctx?.aspectRatio;t({eventName:"video-ended",eventAttributes:{rewind:d,errorMessage:r,videoWatchedLength:l,playMethod:o,videoView:n,...h(e),videoLength:s,adLength:c,adWatchedLength:u,adSkipped:m,exitReason:"nextVideo",orientation:p}}),v.videoCompleted=!0}o=y("playlist"),i=!1}},{eventName:"playAttempt",callback:async({player:e,trackVideoEvent:t})=>{let a=e.getPlaylistItem();if(v.adImpression||(r="",b()),console.debug("JW Player callback - playAttempt eventSentFlags:",v),a&&!v.videoAttempt&&t){let i=f(a?.custom?.ctx?.duration),l=a?.custom?.ctx?.aspectRatio;v.videoAttempt=!0,t({eventName:"video-played",eventAttributes:{errorMessage:r,playReason:o,videoView:n,...h(e)}}),t({eventName:"video-attempted",eventAttributes:{errorMessage:r,videoLength:i,playMethod:o,videoView:n,orientation:l,...h(e)}})}}},{eventName:"firstFrame",callback:async({player:e,trackVideoEvent:t})=>{console.debug("JW Player callback - firstFrame eventSentFlags:",v);let a=e.getPlaylistItem();if(a&&!v.videoStarted&&t){let i=f(a?.custom?.ctx?.duration),l=a?.custom?.ctx?.aspectRatio;t({eventName:"video-begin",eventAttributes:{errorMessage:r,playMethod:o,videoView:n,...h(e),videoLength:i,adLength:c,adWatchedLength:u,adSkipped:m,orientation:l}}),t({eventName:"video-started",eventAttributes:{errorMessage:r,playReason:o,videoView:n,...h(e)}}),v.videoStarted=!0}}},{eventName:"complete",callback:async({player:e,trackVideoEvent:t})=>{let a=e.getPlaylistItem(),i=f(a?.custom?.ctx?.duration),s=a?.custom?.ctx?.aspectRatio;console.debug("JW Player callback - complete eventSentFlags:",v),a&&!v.videoCompleted&&t&&(t({eventName:"video-completed",eventAttributes:{errorMessage:r,playReason:o,videoView:n,...h(e)}}),t({eventName:"video-ended",eventAttributes:{rewind:d,errorMessage:r,videoWatchedLength:l,playMethod:o,videoView:n,...h(e),videoLength:i,adLength:c,adWatchedLength:u,adSkipped:m,exitReason:"complete",orientation:s}}),v.videoCompleted=!0)}},{eventName:"adStarted",callback:async({event:e,player:t,trackVideoEvent:a})=>{let i=t.getPlaylistItem();if(c=e.duration,console.debug("JW Player callback - adStarted eventSentFlags:",v),i&&a){let e=f(i?.custom?.ctx?.duration),l=i?.custom?.ctx?.aspectRatio;a({eventName:"ad-started",eventAttributes:{errorMessage:r,playMethod:o,videoLength:e,orientation:l,videoView:n,...h(t)}})}}},{eventName:"adSkipped",callback:async({player:e,trackVideoEvent:t})=>{let a=e.getPlaylistItem();if(m=!0,a&&t){let i=f(a?.custom?.ctx?.duration),l=a?.custom?.ctx?.aspectRatio;t({eventName:"ad-skipped",eventAttributes:{errorMessage:r,playMethod:o,videoLength:i,orientation:l,videoView:n,...h(e)}})}}},{eventName:"adComplete",callback:async({event:e,player:t,trackVideoEvent:a})=>{let i=t.getPlaylistItem();if(u=e.duration,console.debug("JW Player callback - adComplete eventSentFlags:",v),i&&a){let e=f(i?.custom?.ctx?.duration),l=i?.custom?.ctx?.aspectRatio;a({eventName:"ad-complete",eventAttributes:{errorMessage:r,playMethod:o,videoLength:e,orientation:l,videoView:n,...h(t)}})}}},{eventName:"beforePlay",callback:async({event:e})=>{i||(o=y(e?.playReason),i=!0)}},{eventName:"adError",callback:async({event:e})=>{console.error("Video ad error:",e)}},{eventName:"error",callback:async({event:e})=>{r=e?.message,console.error("Video Player error:",e)}},{eventName:"time",callback:({event:e})=>{if("number"==typeof e?.position){let t=e.position-s;l+=t,s=e.position}}},{eventName:"seek",callback:({event:e})=>{"number"==typeof e?.offset&&(e.offset{let t=Date.now();t-p>=1e3&&(u=parseFloat(e.position.toFixed(2)),p=t)}}];e.s(["durationToSeconds",0,f,"metricEvents",0,w])}]);