{"version":3,"file":"TalkSoonQueryOverride.VszbMIHS.mjs","names":["useCallback","__esmMin","ne","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","c","init_jsx_runtime","J","withSanitizedTalkSoonQuery","receiptValues","location","receiptPattern","sanitizedSearch","sanitizedParams","nextUrl","history","Component","props","withRegistrationMovedLink","handleNavigate","event","withRegistrationMovedRedirect","init_TalkSoonQueryOverride"],"sources":["https:/framerusercontent.com/modules/yNIZFjmwYJg4LMc071RG/YhKJXFYFGCdyf2CNggV1/TalkSoonQueryOverride.js"],"sourcesContent":["// Request: Create a Framer code override named withSanitizedTalkSoonQuery for /talksoon that sanitizes query params on client mount, only preserving a single valid `receipt` value, preserving hash, and using history.replaceState without visual changes.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useCallback,useEffect}from\"react\";export function withSanitizedTalkSoonQuery(Component){return /*#__PURE__*/forwardRef(function WithSanitizedTalkSoonQuery(props,ref){useEffect(()=>{if(typeof window===\"undefined\")return;const{location,history}=window;const params=new URLSearchParams(location.search);const receiptValues=params.getAll(\"receipt\");const receiptPattern=/^[A-Za-z0-9_-]{8,64}$/;let sanitizedSearch=\"\";if(receiptValues.length===1&&receiptPattern.test(receiptValues[0])){const sanitizedParams=new URLSearchParams;sanitizedParams.set(\"receipt\",receiptValues[0]);sanitizedSearch=`?${sanitizedParams.toString()}`;}const nextUrl=`${location.pathname}${sanitizedSearch}${location.hash}`;const currentUrl=`${location.pathname}${location.search}${location.hash}`;if(nextUrl!==currentUrl){history.replaceState(history.state,\"\",nextUrl);}},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}export function withRegistrationMovedLink(Component){return /*#__PURE__*/forwardRef(function WithRegistrationMovedLink(props,ref){const handleNavigate=useCallback(event=>{if(event&&typeof event.preventDefault===\"function\"){event.preventDefault();}if(event&&typeof event.stopPropagation===\"function\"){event.stopPropagation();}if(typeof window!==\"undefined\"){window.location.replace(\"/contact?topic=events&source_page=%2Fregistration\");}},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:handleNavigate,onTap:handleNavigate});});}export function withRegistrationMovedRedirect(Component){return /*#__PURE__*/forwardRef(function WithRegistrationMovedRedirect(props,ref){useEffect(()=>{if(typeof window!==\"undefined\"){window.location.replace(\"/contact?topic=events&source_page=%2Fregistration\");}},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSanitizedTalkSoonQuery\":{\"type\":\"reactHoc\",\"name\":\"withSanitizedTalkSoonQuery\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRegistrationMovedRedirect\":{\"type\":\"reactHoc\",\"name\":\"withRegistrationMovedRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRegistrationMovedLink\":{\"type\":\"reactHoc\",\"name\":\"withRegistrationMovedLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TalkSoonQueryOverride.map"],"mappings":"A,8IAC+F,SAAgBU,EAA2B,EAAU,CAAC,MAAoB,gBAAW,SAAoC,EAAM,EAAI,CAAwqB,OAAvqBJ,MAAc,CAAC,GAAUH,IAAS,OAAY,OAAO,GAAK,CAAC,WAAS,WAASA,EAA+DQ,EAAc,IAArD,gBAAgBC,EAAS,MAAiC,CAAC,CAAC,OAAO,SAAS,EAAQC,EAAe,wBAA4BC,EAAgB,GAAG,GAAGH,EAAc,SAAS,GAAGE,EAAe,KAAKF,EAAc,EAAE,EAAE,CAAC,IAAMI,EAAgB,IAAI,gBAAgBA,EAAgB,IAAI,UAAUJ,EAAc,EAAE,EAAE,EAAgB,IAAII,EAAgB,SAAS,GAAI,CAAC,IAAMC,EAAQ,GAAGJ,EAAS,WAAWE,IAAkBF,EAAS,OAAoFI,IAAU,GAAnEJ,EAAS,WAAWA,EAAS,SAASA,EAAS,QAAgCK,EAAQ,aAAaA,EAAQ,MAAM,GAAGD,CAAO,CAAG,EA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