{"version":3,"file":"BitrixCode.Db1-cysi.mjs","names":[],"sources":["https:/framerusercontent.com/modules/inWg7xF8ecelmqdJxqQU/NVuLoHlKxLkgOScFIxYD/BitrixCode.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";const openBitrixPopup=(e,url,elementName,clarityValue)=>{if(e){e.preventDefault();e.stopPropagation();}// Esto dispara el evento en Clarity\nif(typeof clarity===\"function\"){clarity(\"set\",\"form_open\",clarityValue);}const existing=document.getElementById(\"bitrix-popup-container\");if(existing)existing.remove();const container=document.createElement(\"div\");container.id=\"bitrix-popup-container\";container.setAttribute(\"name\",`popup_${clarityValue}`);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    `;const 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    `;const closeBtn=document.createElement(\"button\");closeBtn.innerText=\"✕\";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();// --- LÓGICA DINÁMICA DE UTMs PARA FINPAY ---\nlet trackingParams=\"\";if(typeof window!==\"undefined\"&&window.location.search){const currentParams=new URLSearchParams(window.location.search);// Verificamos si la URL de la web trae al menos un UTM_SOURCE o un UTM_CAMPAIGN\nif(currentParams.has(\"utm_source\")||currentParams.has(\"utm_campaign\")){// Si el navegador ya tiene UTMs, los usamos textualmente\ntrackingParams=window.location.search;}}// Si la URL no tenía UTMs de campaña externa, aplicamos el fallback de Finpay\nif(!trackingParams){trackingParams=\"?utm_source=framer&utm_campaign=finpay-2026\";}// -------------------------------------------\nconst 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();};};// --- HOCs con el Tracking de Clarity ---\nexport function withBitrixSponsor(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,name:\"btn_sponsor_finpay\",onClick:e=>openBitrixPopup(e,\"https://b24-chqr1u.bitrix24.site/crm_form_ntg6o/\",\"btn_sponsor_finpay\",\"sponsor_finpay\")});}export function withBitrixContacto(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,name:\"btn_contacto_finpay\",onClick:e=>openBitrixPopup(e,\"https://b24-chqr1u.bitrix24.site/crm_form_myjo5/\",\"btn_contacto_finpay\",\"contacto_finpay\")});}// --- AUTO-OPEN POR URL ---\nif(typeof window!==\"undefined\"){window.addEventListener(\"load\",()=>{const params=new URLSearchParams(window.location.search);const openAction=params.get(\"open\");if(openAction===\"contacto\"){openBitrixPopup(null,\"https://b24-chqr1u.bitrix24.site/crm_form_myjo5/\",\"btn_contacto_finpay\",\"contacto_finpay\");}else if(openAction===\"sponsor\"){openBitrixPopup(null,\"https://b24-chqr1u.bitrix24.site/crm_form_ntg6o/\",\"btn_sponsor_finpay\",\"sponsor_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":"kHAoBA,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,qBAAqB,QAAQ,GAAG,EAAgB,EAAE,mDAAmD,qBAAqB,gBAAgB,C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