{"version":3,"file":"Testbutton.DvRhIDYY.mjs","names":[],"sources":["https:/framerusercontent.com/modules/RRhsCyW1E7ansSw6k6A2/pewKUfguZpyv9EB4voTu/Testbutton.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function withTypeformPopup(Component){return props=>{const openPopup=()=>{// Sécurité : Évite d'ouvrir plusieurs iframes si on clique plusieurs fois\nif(document.getElementById(\"typeform-overlay\"))return;// 1. Création de la surcouche noire (overlay)\nconst overlay=document.createElement(\"div\");overlay.id=\"typeform-overlay\";Object.assign(overlay.style,{position:\"fixed\",top:\"0\",left:\"0\",width:\"100vw\",height:\"100vh\",backgroundColor:\"rgba(0, 0, 0, 0.75)\",zIndex:\"99999\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\"});// 2. Création de l'iframe Typeform\nconst iframe=document.createElement(\"iframe\");iframe.src=\"https://form.typeform.com/to/Is3sxpgD?typeform-embed-id=32829872163927953&typeform-embed=popup-blank&typeform-source=oscar-seo.ai&typeform-medium=embed-sdk&typeform-medium-version=next&typeform-embed-handles-redirect=1&typeform-embed-no-heading=true\";Object.assign(iframe.style,{width:\"90%\",height:\"90%\",border:\"none\",borderRadius:\"8px\",backgroundColor:\"white\",boxShadow:\"0 4px 15px rgba(0,0,0,0.2)\"});iframe.setAttribute(\"allow\",\"camera; microphone; autoplay; encrypted-media;\");// 3. Création du bouton fermer (la croix)\nconst closeBtn=document.createElement(\"button\");closeBtn.innerHTML=\"&times;\";Object.assign(closeBtn.style,{position:\"absolute\",top:\"15px\",right:\"25px\",fontSize:\"45px\",color:\"white\",background:\"transparent\",border:\"none\",cursor:\"pointer\",lineHeight:\"1\",padding:\"0\"});// Fonction pour tout fermer\nconst closePopup=()=>{document.body.removeChild(overlay);document.body.style.overflow=\"auto\"// Réactive le scroll\n;};// Actions au clic pour fermer\ncloseBtn.onclick=closePopup;overlay.onclick=e=>{if(e.target===overlay)closePopup();};// 4. Assemblage et affichage sur la page\noverlay.appendChild(closeBtn);overlay.appendChild(iframe);document.body.appendChild(overlay);// Empêche de scroller la page derrière la popup\ndocument.body.style.overflow=\"hidden\";};// On retourne le bouton Framer intact, mais on lui greffe l'action au clic\nreturn /*#__PURE__*/_jsx(Component,{...props,onClick:openPopup});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTypeformPopup\":{\"type\":\"reactHoc\",\"name\":\"withTypeformPopup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Testbutton.map"],"mappings":"oGAA2C,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,MAAc,CAC3H,GAAG,SAAS,eAAe,mBAAmB,CAAC,OAC/C,IAAM,EAAQ,SAAS,cAAc,MAAM,CAAC,EAAQ,GAAG,mBAAmB,OAAO,OAAO,EAAQ,MAAM,CAAC,SAAS,QAAQ,IAAI,IAAI,KAAK,IAAI,MAAM,QAAQ,OAAO,QAAQ,gBAAgB,sBAAsB,OAAO,QAAQ,QAAQ,OAAO,eAAe,SAAS,WAAW,SAAS,CAAC,CACvR,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,4PAA4P,OAAO,OAAO,EAAO,MAAM,CAAC,MAAM,MAAM,OAAO,MAAM,OAAO,OAAO,aAAa,MAAM,gBAAgB,QAAQ,UAAU,6BAA6B,CAAC,CAAC,EAAO,aAAa,QAAQ,iDAAiD,CACzhB,IAAM,EAAS,SAAS,cAAc,SAAS,CAAC,EAAS,UAAU,UAAU,OAAO,OAAO,EAAS,MAAM,CAAC,SAAS,WAAW,IAAI,OAAO,MAAM,OAAO,SAAS,OAAO,MAAM,QAAQ,WAAW,cAAc,OAAO,OAAO,OAAO,UAAU,WAAW,IAAI,QAAQ,IAAI,CAAC,CACzQ,IAAM,MAAe,CAAC,SAAS,KAAK,YAAY,EAAQ,CAAC,SAAS,KAAK,MAAM,SAAS,QAEtF,EAAS,QAAQ,EAAW,EAAQ,QAAQ,GAAG,CAAI,EAAE,SAAS,GAAQ,GAAY,EAClF,EAAQ,YAAY,EAAS,CAAC,EAAQ,YAAY,EAAO,CAAC,SAAS,KAAK,YAAY,EAAQ,CAC5F,SAAS,KAAK,MAAM,SAAS,UAC7B,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAU,CAAC,mBAVrB"}