{"version":3,"file":"shared-lib.D2yDIPpg.mjs","names":["__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","init_jsx_runtime","J","c","ce","init_framer_BisrWwwE","RenderTarget","shouldSuppressSillySeasonOffer","CAMPAIGN_SESSION_KEY","suppressedInMemory","withSillySeasonCampaignTracking","capture","CAMPAIGN_SUPPRESSION_EVENT","originalPush","originalReplace","push","args","replace","Component","props","init_SillySeasonCampaignTracking"],"sources":["https:/framerusercontent.com/modules/pG5ZJQ9vs3VT78cRHUBY/pb9se6F2aZcREmTTY0I6/SillySeasonCampaignTracking.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{forwardRef}from\"react\";import{RenderTarget}from\"framer\";const CAMPAIGN_SESSION_KEY=\"undermaps-silly-season-campaign-suppressed\";let suppressedInMemory=false;export const CAMPAIGN_SUPPRESSION_EVENT=\"undermaps:silly-season-suppressed\";export function shouldSuppressSillySeasonOffer(){if(typeof window===\"undefined\")return false;const campaignSeen=new URLSearchParams(window.location.search).getAll(\"utm_campaign\").includes(\"silly-season\");if(campaignSeen){suppressedInMemory=true;try{window.sessionStorage.setItem(CAMPAIGN_SESSION_KEY,\"1\");}catch{}}try{if(window.sessionStorage.getItem(CAMPAIGN_SESSION_KEY)===\"1\")suppressedInMemory=true;}catch{}return suppressedInMemory;}export function withSillySeasonCampaignTracking(Component){return /*#__PURE__*/forwardRef(function CampaignTracking(props,ref){React.useEffect(()=>{if(RenderTarget.current()===RenderTarget.canvas)return;const capture=()=>{if(shouldSuppressSillySeasonOffer())window.dispatchEvent(new Event(CAMPAIGN_SUPPRESSION_EVENT));};capture();const originalPush=window.history.pushState;const originalReplace=window.history.replaceState;const push=function(...args){originalPush.apply(window.history,args);capture();};const replace=function(...args){originalReplace.apply(window.history,args);capture();};window.history.pushState=push;window.history.replaceState=replace;window.addEventListener(\"popstate\",capture);window.addEventListener(\"pageshow\",capture);return()=>{if(window.history.pushState===push)window.history.pushState=originalPush;if(window.history.replaceState===replace)window.history.replaceState=originalReplace;window.removeEventListener(\"popstate\",capture);window.removeEventListener(\"pageshow\",capture);};},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSillySeasonCampaignTracking\":{\"type\":\"reactHoc\",\"name\":\"withSillySeasonCampaignTracking\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CAMPAIGN_SUPPRESSION_EVENT\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"shouldSuppressSillySeasonOffer\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SillySeasonCampaignTracking.map"],"mappings":"A,yLAAuT,SAAgBU,GAAgC,CAAC,GAAUT,IAAS,OAAY,MAAO,GAAqH,GAA5F,IAAI,gBAAgBA,EAAO,SAAS,MAAM,CAAC,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,cAA8B,EAAE,CAAC,EAAmB,GAAK,GAAG,CAACA,EAAO,eAAe,QAAQU,EAAqB,GAAG,CAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAIV,EAAO,eAAe,QAAQU,CAAoB,IAAI,MAAI,EAAmB,GAAK,MAAM,CAAC,CAAC,OAAOC,CAAmB,CAAC,SAAgBC,EAAgC,EAAU,CAAC,MAAoB,gBAAW,SAA0B,EAAM,EAAI,CAA23B,OAA13BN,MAAoB,CAAC,GAAGE,EAAa,QAAQ,IAAIA,EAAa,OAAO,OAAO,IAAMK,MAAY,CAAIJ,EAA+B,GAAET,EAAO,cAAc,IAAI,MAAMc,CAA0B,CAAC,CAAE,EAAED,EAAQ,EAAE,IAAME,EAAaf,EAAO,QAAQ,UAAgBgB,EAAgBhB,EAAO,QAAQ,aAAmBiB,EAAK,SAAS,GAAGC,EAAK,CAACH,EAAa,MAAMf,EAAO,QAAQkB,CAAI,EAAEL,EAAQ,CAAE,EAAQM,EAA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