import{c as t,G as e,S as o,H as l,I as n}from"./_auto-entry_fotbollskanalen-BEv9dkCS.js";export{E as calculateScaleFactor,K as getAspectRatio,J as scaleAdIpadAirPortrait}from"./_auto-entry_fotbollskanalen-BEv9dkCS.js";import"react/jsx-runtime";const a=a=>{var i,d,s,r,c,u;const{adScaleConfig:f,pageContext:{deviceType:v}}=t.get();if(!(null==f?void 0:f.enabled))return;if(e(a,o.ANY_FULLSCREEN))return;const p=null!==(i=f.adsToBeScaled[v])&&void 0!==i?i:[],m=l(a.targetId.split("-")[0]);if(!p.includes(m))return;const g=null!==(s=null===(d=f.offset)||void 0===d?void 0:d[m])&&void 0!==s?s:0,w=document.getElementById(a.targetId),E=null!==(r=null==w?void 0:w.offsetWidth)&&void 0!==r?r:window.screen.width,I=null!==(u=null===(c=null==w?void 0:w.parentElement)||void 0===c?void 0:c.offsetWidth)&&void 0!==u?u:window.screen.width;n(a,(E<I?E:I)-g)};export{n as scaleAd,a as scaleAds};
