1import{x as h,D as c,y,A as m,h as u,B as b,C as v,o as S,j as w,k as z}from"./B96vvYOO.js";function g(){return window.googletag}function E(t){const e=t.querySelector("iframe");if(!e)return;const n=e.parentElement,r=e.clientWidth,l=e.clientHeight,o=e.contentWindow?.document.querySelector(".img_ad");n.style.width=`${r}px`,n.style.maxWidth="100%",n.style.margin="0 auto",n.style.position="relative",n.style.overflow="hidden",n.style.aspectRatio=`${r} / ${l}`,e.removeAttribute("width"),e.removeAttribute("height"),e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",o&&(o.removeAttribute("width"),o.removeAttribute("height"),o.style.width="100%",o.style.height="auto")}function A(t,e){const n=h().public.falco.googleAds.enabled,r=c(!0),l=()=>{const a=g();if(typeof a?.pubads!="function")return;const i=a.pubads().getSlots().find(d=>d.getSlotElementId()===t.id);i&&a.destroySlots([i])};return{enabled:n,shouldVisible:r,initialize:()=>{const a=window;a.googletag=a.googletag||{cmd:[]},a.googletag.cmd.push(()=>{const i=g();if(typeof i?.pubads!="function")return;l(),r.value=!0;const d=i.defineSlot(t.path,t.size,t.id)?.addService(i.pubads());if(d){if(t.sizeMap?.length){const s=i.sizeMapping();t.sizeMap.forEach(([f,p])=>{s.addSize(f,p)}),d.defineSizeMapping(s.build())}t.targeting&&d.setConfig({targeting:{[t.targeting.name]:t.targeting.value}}),i.pubads().addEventListener("slotOnload",s=>{s.slot.getSlotElementId()===t.id&&e.value&&E(e.value)}),i.pubads().addEventListener("slotRenderEnded",s=>{s.slot.getSlotElementId()===t.id&&(r.value=!s.isEmpty)}),i.setConfig({collapseDiv:"BEFORE_FETCH"}),i.enableServices(),i.display(t.id)}})},destroy:l}}const _=["id"],C={__name:"GoogleAd",props:{id:{type:String,required:!0},path:{type:String,required:!0},size:{type:[String,Array],required:!0},sizeMap:{type:Array,default:()=>[]},targeting:{type:Object,default:null}},setup(t){const e=t,n=c(null),{enabled:r,shouldVisible:l,initialize:o,destroy:a}=A({id:e.id,path:e.path,size:e.size,sizeMap:e.sizeMap,targeting:e.targeting},n);return y(()=>{r&&o()}),m(()=>{r&&a()}),(i,d)=>u(r)?b((S(),w("div",{key:0,id:t.id,ref_key:"adSlotElement",ref:n},null,8,_)),[[v,u(l)]]):z("",!0)}};export{C as _};
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.