{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/lPYI16OnvYrZ2nhbDGeg/efBjvQCZZgbhxj5isQoU/WithQueryParams.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";// Learn more: https://www.framer.com/docs/guides/overrides/\nexport function withQueryParams(Component){const handleClick=e=>{e.preventDefault();const paramKey=\"brand_experience\";const paramValue=\"new\";const voucherParam=\"voucher_code\";const search=window.location.search;const urlParams=new URLSearchParams(search);const pathname=window.location.pathname;const isHomePage=pathname===\"/\"||pathname.includes(\"/home\");if(!urlParams.has(paramKey)||urlParams.get(paramKey)!==paramValue){urlParams.set(paramKey,paramValue);}const targetEl=e.target;let anchorEl;if(targetEl instanceof HTMLAnchorElement){anchorEl=targetEl;}else{anchorEl=targetEl.closest(\"a[href]\");}if(anchorEl){const ctaUrl=new URL(anchorEl.href);if(ctaUrl.searchParams.has(voucherParam)&&isHomePage){ctaUrl.searchParams.delete(voucherParam);}const prefix=ctaUrl.searchParams.has(voucherParam)||ctaUrl.searchParams.toString().length?\"&\":\"?\";const redirectUrl=ctaUrl.href+prefix+urlParams.toString();window.location.assign(redirectUrl);}};return props=>{return /*#__PURE__*/_jsx(Component,{onClick:handleClick,...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withQueryParams\":{\"type\":\"reactHoc\",\"name\":\"withQueryParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithQueryParams.map"],
  "mappings": "kFACO,SAASA,EAAgBC,EAAU,CAAC,IAAMC,EAAY,GAAG,CAAC,EAAE,eAAe,EAAE,IAAMC,EAAS,mBAAyBC,EAAW,MAAYC,EAAa,eAAqBC,EAAOC,EAAO,SAAS,OAAaC,EAAU,IAAI,gBAAgBF,CAAM,EAAQG,EAASF,EAAO,SAAS,SAAeG,EAAWD,IAAW,KAAKA,EAAS,SAAS,OAAO,GAAK,CAACD,EAAU,IAAIL,CAAQ,GAAGK,EAAU,IAAIL,CAAQ,IAAIC,IAAYI,EAAU,IAAIL,EAASC,CAAU,EAAG,IAAMO,EAAS,EAAE,OAAWC,EAAiH,GAArGD,aAAoB,kBAAmBC,EAASD,EAAeC,EAASD,EAAS,QAAQ,SAAS,EAAMC,EAAS,CAAC,IAAMC,EAAO,IAAI,IAAID,EAAS,IAAI,EAAKC,EAAO,aAAa,IAAIR,CAAY,GAAGK,GAAYG,EAAO,aAAa,OAAOR,CAAY,EAAG,IAAMS,EAAOD,EAAO,aAAa,IAAIR,CAAY,GAAGQ,EAAO,aAAa,SAAS,EAAE,OAAO,IAAI,IAAUE,EAAYF,EAAO,KAAKC,EAAON,EAAU,SAAS,EAAED,EAAO,SAAS,OAAOQ,CAAW,CAAE,CAAC,EAAE,OAAOC,GAA4BC,EAAKhB,EAAU,CAAC,QAAQC,EAAY,GAAGc,CAAK,CAAC,CAAI",
  "names": ["withQueryParams", "Component", "handleClick", "paramKey", "paramValue", "voucherParam", "search", "window", "urlParams", "pathname", "isHomePage", "targetEl", "anchorEl", "ctaUrl", "prefix", "redirectUrl", "props", "p"]
}
