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