{"version":3,"file":"Form.tleQJSVD.mjs","names":[],"sources":["https:/framerusercontent.com/modules/syZoTwlOp4swLg4Lmey8/Pg7YuMKxdT2Ixp1dD97r/Form.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// Made with love by Clément: https://lionneclement.com/\n// Full tutorial: https://framermart.com/tutorial/how-to-track-utm-parameters-in-framer-forms\nexport function withAllParams(Component){return props=>{useEffect(()=>{if(typeof window!==\"undefined\"){const params=new URLSearchParams(window.location.search);const form=document.querySelector(`form.${props.className}`);if(form){params.forEach((value,key)=>{const input=document.createElement(\"input\");input.type=\"hidden\";input.name=key;input.value=value;form.appendChild(input);});}}},[props.className]);return /*#__PURE__*/_jsx(Component,{...props});};}export function withUTMParams(Component){return props=>{useEffect(()=>{if(typeof window!==\"undefined\"){const params=new URLSearchParams(window.location.search);const form=document.querySelector(`form.${props.className}`);if(form){params.forEach((value,key)=>{if(key.startsWith(\"utm\")||key===\"gclid\"||key===\"gbraid\"){const input=document.createElement(\"input\");input.type=\"hidden\";input.name=key;input.value=value;form.appendChild(input);}});}}},[props.className]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withAllParams\":{\"type\":\"reactHoc\",\"name\":\"withAllParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUTMParams\":{\"type\":\"reactHoc\",\"name\":\"withUTMParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Form.map"],"mappings":"gIAEwc,SAAgB,EAAc,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAC,GAAU,IAAS,OAAY,CAAC,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAO,EAAK,SAAS,cAAc,QAAQ,EAAM,YAAY,CAAI,GAAM,EAAO,SAAS,EAAM,IAAM,CAAC,GAAG,EAAI,WAAW,MAAM,EAAE,IAAM,SAAS,IAAM,SAAS,CAAC,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,KAAK,SAAS,EAAM,KAAK,EAAI,EAAM,MAAM,EAAM,EAAK,YAAY,EAAM,GAAI,GAAK,CAAC,EAAM,UAAU,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,uBAF35B,IAA6B"}