{"version":3,"file":"WithUTMs.b07HAdFd.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/b9e2NzGL1rwPTvCbld0X/T7ho4l8vvMbA3e9Vzdgw/WithUTMs.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback}from\"react\";export function withUTMs(Component){return /*#__PURE__*/forwardRef(function WithUTMsOverride(props,ref){const handleClick=useCallback(event=>{if(typeof props.onClick===\"function\"){props.onClick(event);}if(typeof window===\"undefined\")return;if(event?.preventDefault){event.preventDefault();}const target=props?.href??props?.link;if(!target||typeof target!==\"string\")return;const currentParams=new URLSearchParams(window.location.search);const nextURL=new URL(target,window.location.origin);currentParams.forEach((value,key)=>{if(!nextURL.searchParams.has(key)){nextURL.searchParams.set(key,value);}});const isInternalTarget=target.startsWith(\"/\")&&!target.startsWith(\"//\");const destination=isInternalTarget?`${nextURL.pathname}${nextURL.search}${nextURL.hash}`:nextURL.toString();window.location.assign(destination);},[props]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withUTMs\":{\"type\":\"reactHoc\",\"name\":\"withUTMs\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithUTMs.map"],"mappings":"kIAAqF,SAAgB,EAAS,EAAU,CAAC,OAAoB,EAAW,SAA0B,EAAM,EAAI,CAAC,IAAM,EAAYA,EAAY,GAAO,CAA6D,GAAzD,OAAO,EAAM,SAAU,YAAY,EAAM,QAAQ,CAAK,EAAa,IAAS,OAAY,OAAU,GAAO,gBAAgB,EAAM,eAAe,EAAG,IAAM,EAAO,GAAO,MAAM,GAAO,KAAK,GAAG,CAAC,GAAQ,OAAO,GAAS,SAAS,OAAO,IAAM,EAAc,IAAI,gBAAgB,EAAO,SAAS,MAAM,EAAQ,EAAQ,IAAI,IAAI,EAAO,EAAO,SAAS,MAAM,EAAE,EAAc,SAAS,EAAM,IAAM,CAAK,EAAQ,aAAa,IAAI,CAAG,GAAG,EAAQ,aAAa,IAAI,EAAI,CAAK,CAAG,CAAC,EAA0E,IAAM,EAAvD,EAAO,WAAW,GAAG,GAAG,CAAC,EAAO,WAAW,IAAI,EAAqC,GAAG,EAAQ,WAAW,EAAQ,SAAS,EAAQ,OAAO,EAAQ,SAAS,EAAE,EAAO,SAAS,OAAO,CAAW,CAAE,EAAE,CAAC,CAAK,CAAC,EAAE,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,CAAW,CAAC,CAAE,CAAC,CAAE,qBAAp7B,IAA0C"}