1import{D as e,E as t,O as n,Ot as r,P as i,Q as a,T as o,at as s,dn as c,nt as l,qt as u,rt as d,w as f,zt as p}from"./BaBhFZm2.js";import{l as m,s as h}from"./Cm8_Znr6.js";import{n as g}from"./CU89Zi3L.js";import{d as _}from"./BF2bkrIi.js";import{i as v}from"./BTh3bplG.js";import{t as y}from"./D4jAZI6Q.js";import{t as b}from"./DFQ7m00a.js";import{t as x}from"./C2ANWNt82.js";import{Dt as S}from"./C79yY4dD2.js";import"./BwRft_g-2.js";import{n as C}from"./BzFEvhmp2.js";var w=[`data-onefield-config`],T={__name:`PlayFlyAdvert`,props:{adSlotName:{type:String,default:``}},setup(e){let t=e,r=p(null),i=f(()=>t.adSlotName.replace(/^htlad-/,``));return l(()=>{try{window.oneField.cmd.push(function(){window.oneField.unitAdded()})}catch(e){console.error(`[PlayFlyAdvert] PlayFly unitAdded failed`,{slot:t.adSlotName,e})}}),a(()=>{let e=r.value;if(e)try{window.oneField.cmd.push(function(){let n=e.id;n?window.oneField.unitRemoved(n):console.warn(`[PlayFlyAdvert] PlayFly unitRemoved skipped â no id was ever assigned`,{slot:t.adSlotName})})}catch(e){console.error(`[PlayFlyAdvert] PlayFly unitRemoved failed`,{slot:t.adSlotName,e})}}),(e,t)=>(s(),n(`div`,{ref_key:`playFlySlotRef`,ref:r,"data-onefield-config":u(i),class:`w-full min-h-[50px] min-w-[300px]`},null,8,w))}},E={__name:`HTLAdvert`,props:{adSlotName:{type:String,default:``},adHidden:{type:Boolean,default:!1}},setup(e){return(t,r)=>(s(),n(`div`,{class:c([e.adSlotName,{"s-advert__slot--hidden":e.adHidden}])},null,2))}},D=class{adsSettingsResource=`/api/v2/Ads/settings`;fetch;constructor({fetch:e}){this.fetch=e}async getAdsSettings(){try{let e=await this.fetch(this.adsSettingsResource);return e?_(e):null}catch(e){return console.error(`[AdsConfigRepo] getAdsSettings() Request Failed`,e),null}}},O=g(`ads-config`,{state:()=>({adsSettings:null}),actions:{async fetchAdsSettings({fetch:e}){this.adsSettings||=await new D({fetch:e}).getAdsSettings()}},getters:{getAdsSettings:e=>e.adsSettings}}),k=()=>{let e=O(),t=y(),n=f(()=>e.getAdsSettings);return{adsSettings:n,adProvider:f(()=>n.value?.usePlayFly&&n.value?.adFullUnitName?`playfly`:t.htlbid?.siteId?`htlbid`:`none`)}},A=[`aria-label`],j=[`href`],M={class:`s-advert__inner`},N=[`aria-pressed`],P=[`data-promotion-name`],F=300,I={__name:`SAdvert`,props:{...b(),adSlotName:{type:String,default:``},width:{type:String,default:`0`},height:{type:String,default:`0`},backgroundColor:String,textColor:String,text:String,ariaLabel:String,nextSectionId:String},setup(a){let g=a,{adProvider:_,adsSettings:y}=k(),b=v(),w=f(()=>{let e=!!y.value?.usePlayFly,t=g.adSlotName??``,n=t.includes(`sponsorlogo`)||t.includes(`common-navigation_dropdown`);return e&&n||t.startsWith(`cmsad`)}),D=f(()=>g.adSlotName.replace(`htlad`,`cmsad`)),O=p(!0),I=p(null),L=p(!1),R=p({width:0,height:0}),z=p(!1),B=()=>{L.value=!L.value},V=p(null),H=()=>{O.value=!!I?.value?.querySelector(`iframe`),V.value=new MutationObserver(function(){O.value=!!I?.value?.querySelector(`iframe`)}),V.value.observe(I.value,{attributes:!1,childList:!0,subtree:!0})},U=null,W=null,G=null,K=null,q=e=>{G?.disconnect(),G=new ResizeObserver(e=>{let t=e[0];if(!t)return;let{width:n,height:r}=t.contentRect,i=Math.round(n),a=Math.round(r);R.value={width:i,height:a},z.value=i>150&&a>=50}),G.observe(e)},J=()=>{if(!I.value)return;W=new MutationObserver(()=>{let e=I.value?.querySelector(`iframe`);e&&e!==U?(K!==null&&(clearTimeout(K),K=null),U=e,O.value=!0,q(U)):!e&&U&&(U=null,G?.disconnect(),K===null&&(K=setTimeout(()=>{z.value=!1,R.value={width:0,height:0},K=null},F)))}),W.observe(I.value,{childList:!0,subtree:!0});let e=I.value?.querySelector(`iframe`);e&&(U=e,O.value=!0,q(U))},Y=e=>{};return l(()=>{try{window?.navigator?.userAgent?.match(/firefox|fxios/i)&&H(),J()}catch(e){console.error(`[SAdvert] Ad Observer not loaded`,{slot:g.adSlotName,error:e})}let{focusOnNextElement:e}=S(I);Y=t=>{if(g.nextSectionId&&g.nextSectionId?.length){let e=document.querySelector(`#${g.nextSectionId}`);if(e){e?.focus();return}}e(t)}}),d(()=>{try{V.value&&V.value?.disconnect(),W&&(W?.disconnect(),G?.disconnect()),K!==null&&(clearTimeout(K),K=null)}catch(e){console.error(`[SAdvert] Ad Observer not disconnected`,{slot:g.adSlotName,error:e})}}),(l,d)=>{let f=x,p=C,g=T,v=E;return r((s(),n(`div`,{ref_key:`sAdvertRef`,ref:I,class:c([`s-advert sidearm-ad-state flex flex-row justify-center`,{"s-advert--playfly":u(_)===`playfly`&&!u(w),"s-advert--cms-promotion":u(w)}]),"aria-label":a.ariaLabel?a.ariaLabel:`Interactive Ad`,role:`group`,"data-test-id":`s-advert__root`},[u(O)?(s(),n(`a`,{key:0,href:a.nextSectionId?`#${a.nextSectionId}`:`#`,class:`s-advert__skip-link sidearm-skip-link`,"data-test-id":`s-advert__skip-ad-link`,onClick:d[0]||=(...e)=>u(Y)&&u(Y)(...e),onEnter:d[1]||=(...e)=>u(Y)&&u(Y)(...e)}
1,`Skip Ad`,40,j)):e(``,!0),o(`div`,M,[u(z)&&!u(w)?(s(),n(`button`,{key:0,type:`button`,class:`s-advert__hide-btn`,"aria-pressed":u(L),"aria-label":`Hide advertisement`,"data-test-id":`s-advert__hide-ad-btn`,onClick:m(B,[`stop`])},[i(f,{name:`icon-close`,size:`small`})],8,N)):e(``,!0),u(w)?(s(),n(`div`,{key:1,class:`s-advert__promotion w-full`,"data-test-id":`s-advert__cms-promotion`,"data-promotion-name":u(D)},[i(p,{sportId:u(b),name:u(D)},null,8,[`sportId`,`name`])],8,P)):u(_)===`playfly`?(s(),t(g,{key:2,adSlotName:a.adSlotName},null,8,[`adSlotName`])):(s(),t(v,{key:3,adSlotName:a.adSlotName,adHidden:u(L)},null,8,[`adSlotName`,`adHidden`]))])],10,A)),[[h,!u(L)]])}}};export{k as n,O as r,I as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.