(()=>{let e;const t=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=768,n=[{slot:"/22562061343/0469-01_lado-mx_footer_",tagId:"embi_footer_intop_51f3b59b",type:"FOOTER_INTOP",ubication:"",position:"FOOTER",manualInsertion:!1,mobileSizes:[[320,50],[320,100],[300,50]],desktopSizes:[[728,90],[970,90],[970,250]],offset:20,tbLoaderURL:"",adunitMobile:{code:"embi_footer_intop_51f3b59b",mediaTypes:{banner:{sizes:[[320,50],[320,100],[300,50]]}},bids:[],ortb2Imp:{ext:{gpid:"/22562061343/0469-01_lado-mx_footer_",data:{pbadslot:"/22562061343/0469-01_lado-mx_footer_"}}}},adunitDesktop:{code:"embi_footer_intop_51f3b59b",mediaTypes:{banner:{sizes:[[728,90],[970,90],[970,250]]}},bids:[],ortb2Imp:{ext:{gpid:"/22562061343/0469-01_lado-mx_footer_",data:{pbadslot:"/22562061343/0469-01_lado-mx_footer_"}}}}}];!function(e,t){if(!document.querySelector(`script[src='${e}']`)){const n=document.createElement("script");n.async=t,n.type="text/javascript",n.src=e,document.head.appendChild(n)}}("https://securepubads.g.doubleclick.net/tag/js/gpt.js",!1);var o=window.googletag||(window.googletag={cmd:[]});o.cmd.push(function(){n.filter(e=>"TABOOLA_INTEGRATION"!==e.type).forEach(e=>{const n=t?e.mobileSizes:e.desktopSizes;e.adSlot=o.defineSlot(e.slot,n,e.tagId).setForceSafeFrame(!1).addService(o.pubads()),"DOUBLE_BOX"===e.type&&(e.adSlotB=o.defineSlot(e.slot2,n,e.tagId2).setForceSafeFrame(!1).addService(o.pubads()))}),o.pubads().enableSingleRequest(),o.pubads().enableLazyLoad({fetchMarginPercent:200,renderMarginPercent:100,mobileScaling:1}),o.pubads().collapseEmptyDivs(!0),o.pubads().setCentering(!0),o.pubads().addEventListener("slotRenderEnded",function(t){const o=t.slot.getSlotElementId();n.forEach(n=>{var a;o!==n.tagId||t.isEmpty||("DISPLAY_VIDEO_STICKY"===n.type&&showCornerAd(cornerContainer),"FOOTER_INTOP"===n.type&&(a=e)&&(a.style.display="block"),"HIGH_IMPACT"!==n.type||isIntertitialAdShown||showEmbiIntertitial(INTERSTITIAL_CONTAINER))})}),o.enableServices(),n.map(n=>{!function(n){if(n.manualInsertion&&"TABOOLA_INTEGRATION"!==n.type){const e=n.tagId;new MutationObserver((t,n)=>{document.getElementById(e)&&(o.cmd.push(function(){o.display(e)}),n.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}else{const i=n.type,d=n.position,s=n.ubication,r=n.tagId,c=n.offset;try{if("TABOOLA_INTEGRATION"===i)createTaboolaContainer(n);else if("HIGH_IMPACT"===i)INTERSTITIAL_CONTAINER=createInterstitialContainer(r);else if("DISPLAY_VIDEO_STICKY"===i)cornerContainer=createCornerContainer(r,d,c);else if("FOOTER_INTOP"===i)e=function(e,t="TOP"){const n=document.createElement("div");n.id="embi-footer-intop-ad-container",function(e,t){e.style.position="fixed",e.style.left="50%",e.style.transform="translateX(-50%)",e.style.bottom="FOOTER"===t?"0px":"auto",e.style.top="TOP"===t?"0px":"auto",e.style.zIndex="2147483647",e.style.background="transparent",e.style.boxShadow="black 0 3px 10px 0",e.style.display="none",e.style.transition="bottom 0.3s ease-in-out"}(n,t);const o=document.createElement("div");o.id=e;const a=document.createElement("script");return a.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${e}');\n });\n `,o.appendChild(a),n.appendChild(o),n.appendChild(function(e,t){const n=document.createElement("div");return n.textContent="X",Object.assign(n.style,{position:"absolute",right:"0",top:"FOOTER"===t?"0px":"auto",bottom:"TOP"===t?"0px":"auto",border:"none",background:"white",fontSize:"16px",lineHeight:"16px",width:"18px",height:"18px",cursor:"pointer",boxShadow:"black 0 2px 4px 0",borderRadius:"50%",transform:"translate(50%, -50%)",display:"flex",justifyContent:"center",alignItems:"center"}),n.onclick=()=>{e.style.display="none"},n}(n,t)),document.body.appendChild(n),n}(r,d);else if("DOUBLE_BOX"===i){const e=document.querySelector(`${s}`);if(!e)return console.error(`Elemento con clase '${s}' no encontrado en el DOM para el anuncio ${r}. No se pudo insertar el DIV.`),!1;const o=n.tagId2,i=document.createElement("div");i.id=`container_${r}`,(a=i).style.display="flex",a.style.flexDirection=t?"column":"row",a.style.gap="24px",a.style.marginBottom="24px",a.style.background="transparent",a.style.justifyContent="center";const c=document.createElement("div");c.id=r,i.appendChild(c);const l=document.createElement("script");l.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${r}');\n });\n `,c.appendChild(l);const p=document.createElement("div");p.id=o,i.appendChild(p);const u=document.createElement("script");switch(u.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${o}');\n });\n `,p.appendChild(u),d){case"INSERT_BEFORE":e.insertAdjacentElement("beforebegin",i);break;case"INSERT_AFTER":e.insertAdjacentElement("afterend",i);break;default:e.appendChild(i)}}else{const e=document.querySelector(`${s}`);if(!e)return void console.error(`Elemento con clase '.${s}' no encontrado en el DOM para el anuncio ${r}.`);const t=document.createElement("div");t.id=r,t.style.marginBottom="24px";const n=document.createElement("script");switch(n.textContent=`\n googletag.cmd.push(function() {\n googletag.display('${r}');\n });\n `,t.appendChild(n),d){case"INSERT_BEFORE":e.insertAdjacentElement("beforebegin",t);break;case"INSERT_AFTER":e.insertAdjacentElement("afterend",t);break;default:e.appendChild(t)}}setInterval(function(){if(n.adSlot){if("HIGH_IMPACT"===n.type&&isIntertitialAdShown)return;o.pubads().refresh([n.adSlot])}n.adSlotB&&o.pubads().refresh([n.adSlotB])},3e4)}catch(e){console.error(`Error procesando el anuncio ${r}:`,e)}}var a}(n)})})})();