{"version":3,"file":"UTMTracking.0XhW6Pyu.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ZBtknl42Zn5SvMVx3ucW/pwhbl2YBeHPTXu0OMPzL/UTMTracking.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\")){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=./UTMTracking.map"],"mappings":"mMAEA,SAAgB,EAAc,EAAU,CAAC,MAAO,CAAA,IAAQ,EAAU,IAAI,CAAC,GAAU,WAAqB,CAAC,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,QAAc,EAAK,SAAS,eAAe,OAAO,EAAM,YAAY,CAAC,AAAG,GAAM,EAAO,QAAQ,CAAC,EAAM,IAAM,CAAC,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAsD,AAArD,EAAM,KAAK,SAAS,EAAM,KAAK,EAAI,EAAM,MAAM,EAAM,EAAK,YAAY,EAAM,AAAE,EAAC,AAAG,CAAC,EAAC,CAAC,EAAM,SAAU,EAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,CAAM,EAAC,CAAI,kBAFxc,GAA2C,IAA6B"}