{"version":3,"file":"BitrixCode.C26gvEmq.mjs","names":[],"sources":["https:/framerusercontent.com/modules/inWg7xF8ecelmqdJxqQU/2ujFO3AS3scKSy5P1zXS/BitrixCode.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";/**\n * Función auxiliar centralizada para abrir el Popup\n */const openBitrixPopup=(e,url,elementName)=>{if(e){e.preventDefault();e.stopPropagation();}// Limpieza de popups previos\nconst existing=document.getElementById(\"bitrix-popup-container\");if(existing)existing.remove();// Contenedor principal\nconst container=document.createElement(\"div\");container.id=\"bitrix-popup-container\";// Atributo 'name' para Clarity\ncontainer.setAttribute(\"name\",elementName);container.style.cssText=`\n        position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;\n        background: rgba(0,0,0,0.6); z-index: 999999;\n        display: flex; align-items: center; justify-content: center;\n        backdrop-filter: blur(4px);\n    `;// Caja de contenido\nconst content=document.createElement(\"div\");content.style.cssText=`\n        position: relative; width: 90%; max-width: 500px; height: 90vh;\n        background: white; border-radius: 12px; overflow: hidden;\n        box-shadow: 0 20px 50px rgba(0,0,0,0.3);\n    `;// Botón cerrar\nconst closeBtn=document.createElement(\"button\");closeBtn.innerText=\"✕\";closeBtn.setAttribute(\"name\",`close-${elementName}`);closeBtn.style.cssText=`\n        position: absolute; top: 10px; right: 10px; z-index: 10;\n        border: none; background: #eee; border-radius: 50%; width: 30px; height: 30px;\n        cursor: pointer; font-weight: bold;\n    `;closeBtn.onclick=()=>container.remove();// Construcción de la URL con tus parámetros específicos\n// Formato: ?utm_source=framer&utm_campaign=finpay-2026\nconst trackingParams=\"?utm_source=framer&utm_campaign=finpay-2026\";const iframe=document.createElement(\"iframe\");iframe.src=`${url}${trackingParams}`;iframe.style.cssText=\"width: 100%; height: 100%; border: none;\";content.appendChild(closeBtn);content.appendChild(iframe);container.appendChild(content);document.body.appendChild(container);container.onclick=event=>{if(event.target===container)container.remove();};};// --- Componentes para Exportar ---\nexport function withBitrixSponsor(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,name:\"btn_sponsor_finpay\"// Nombre que verá Clarity\n,onClick:e=>openBitrixPopup(e,\"https://b24-chqr1u.bitrix24.site/crm_form_ntg6o/\",\"popup_sponsor_finpay\")});};}export function withBitrixContacto(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,name:\"btn_contacto_finpay\"// Nombre que verá Clarity\n,onClick:e=>openBitrixPopup(e,\"https://b24-chqr1u.bitrix24.site/crm_form_myjo5/\",\"popup_contacto_finpay\")});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withBitrixSponsor\":{\"type\":\"reactHoc\",\"name\":\"withBitrixSponsor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBitrixContacto\":{\"type\":\"reactHoc\",\"name\":\"withBitrixContacto\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BitrixCode.map"],"mappings":"oGAuBA,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,qBAC7G,QAAQ,GAAG,EAAgB,EAAE,mDAAmD,uBAAuB,CAAC,CAAC,CAAI,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,sBAC5N,QAAQ,GAAG,EAAgB,EAAE,mDAAmD,wBAAwB,CAAC,CAAC,oBAzBhE,CAElC,GAAiB,EAAE,EAAI,IAAc,CAAI,IAAG,EAAE,gBAAgB,CAAC,EAAE,iBAAiB,EAC3F,IAAM,EAAS,SAAS,eAAe,yBAAyB,CAAI,GAAS,EAAS,QAAQ,CAC9F,IAAM,EAAU,SAAS,cAAc,MAAM,CAAC,EAAU,GAAG,yBAC3D,EAAU,aAAa,OAAO,EAAY,CAAC,EAAU,MAAM,QAAQ;;;;;MAMnE,IAAM,EAAQ,SAAS,cAAc,MAAM,CAAC,EAAQ,MAAM,QAAQ;;;;MAKlE,IAAM,EAAS,SAAS,cAAc,SAAS,CAAC,EAAS,UAAU,IAAI,EAAS,aAAa,OAAO,SAAS,IAAc,CAAC,EAAS,MAAM,QAAQ;;;;MAI7I,EAAS,YAAY,EAAU,QAAQ,CAE7C,IAAyE,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,GAAG,+CAAuB,EAAO,MAAM,QAAQ,2CAA2C,EAAQ,YAAY,EAAS,CAAC,EAAQ,YAAY,EAAO,CAAC,EAAU,YAAY,EAAQ,CAAC,SAAS,KAAK,YAAY,EAAU,CAAC,EAAU,QAAQ,GAAO,CAAI,EAAM,SAAS,GAAU,EAAU,QAAQ"}