{"version":3,"file":"WithUTMs.C4Hll7am.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/b9e2NzGL1rwPTvCbld0X/c3yrvYbzmguzddL22MLI/WithUTMs.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback}from\"react\";const CALENDLY_BASE_URL=\"https://calendly.com/salona-digital/salona-digital-introduction-meeting\";const UTM_KEYS=[\"utm_source\",\"utm_medium\",\"utm_campaign\",\"utm_content\",\"utm_term\"];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 currentParams=new URLSearchParams(window.location.search);const calendlyURL=new URL(CALENDLY_BASE_URL);UTM_KEYS.forEach(key=>{const value=currentParams.get(key);if(value){calendlyURL.searchParams.set(key,value);}});window.location.assign(calendlyURL.toString());},[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":"kIAA0Q,SAAgB,EAAS,EAAU,CAAC,OAAoB,EAAW,SAA0B,EAAM,EAAI,CAAC,IAAM,EAAYA,EAAY,GAAO,CAA6D,GAAzD,OAAO,EAAM,SAAU,YAAY,EAAM,QAAQ,EAAM,CAAY,IAAS,OAAY,OAAU,GAAO,gBAAgB,EAAM,gBAAgB,CAAE,IAAM,EAAc,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAO,EAAY,IAAI,IAAI,EAAkB,CAAC,EAAS,QAAQ,GAAK,CAAC,IAAM,EAAM,EAAc,IAAI,EAAI,CAAI,GAAO,EAAY,aAAa,IAAI,EAAI,EAAM,EAAI,CAAC,EAAO,SAAS,OAAO,EAAY,UAAU,CAAC,EAAG,CAAC,EAAM,CAAC,CAAC,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,EAAY,CAAC,EAAG,0BAAr2B,IAA0C,CAAM,EAAkB,0EAAgF,EAAS,CAAC,aAAa,aAAa,eAAe,cAAc,WAAW"}