{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/XtnxHzWhsXFILQju0Nt2/G409buDt7sdbgX9nccls/UrlParamsCookie.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";const COOKIE_NAME=\"url_params\";function getCookie(cookieName){const cookiePrefix=`${cookieName}=`;const cookies=document.cookie.split(\"; \");const cookie=cookies.find(c=>c.startsWith(cookiePrefix));if(!cookie){return undefined;}return cookie.slice(cookiePrefix.length);}function setCookie(cookieName,cookieValue){const documentCookie=`${cookieName}=${cookieValue}; Domain=.sudowrite.com`;document.cookie=documentCookie;}/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function UrlParamsCookie(props){useEffect(()=>{const currentValue=getCookie(COOKIE_NAME);const urlParams=new URLSearchParams(window.location.search);const urlParamsObject={};for(const[key,value]of urlParams.entries()){urlParamsObject[key]=value;}if(urlParamsObject.utm_source===\"customer.io\"){return;// never save customer io utm tags\n}else{if(Object.keys(urlParamsObject).length>0){if(currentValue){Object.keys(urlParamsObject).forEach(key=>{if(key.startsWith(\"utm_\")){currentValue[key]=urlParamsObject[key];}});setCookie(COOKIE_NAME,JSON.stringify(currentValue));}else{// there is no current value, so we save it\nsetCookie(COOKIE_NAME,JSON.stringify(urlParamsObject));}}}},[]);return /*#__PURE__*/_jsx(\"div\",{});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"UrlParamsCookie\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UrlParamsCookie.map"],
  "mappings": "yFAAwE,IAAMA,EAAY,aAAa,SAASC,EAAUC,EAAW,CAAC,IAAMC,EAAa,GAAGD,CAAU,IAAoDE,EAAlC,SAAS,OAAO,MAAM,IAAI,EAAuB,KAAKC,GAAGA,EAAE,WAAWF,CAAY,CAAC,EAAE,GAAIC,EAA0B,OAAOA,EAAO,MAAMD,EAAa,MAAM,CAAE,CAAC,SAASG,EAAUJ,EAAWK,EAAY,CAAC,IAAMC,EAAe,GAAGN,CAAU,IAAIK,CAAW,0BAA0B,SAAS,OAAOC,CAAe,CAMxd,SAARC,EAAiCC,EAAM,CAAC,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAaX,EAAUD,CAAW,EAAQa,EAAU,IAAI,gBAAgBC,EAAO,SAAS,MAAM,EAAQC,EAAgB,CAAC,EAAE,OAAS,CAACC,EAAIC,CAAK,IAAIJ,EAAU,QAAQ,EAAGE,EAAgBC,CAAG,EAAEC,EAAUF,EAAgB,aAAa,eAC/R,OAAO,KAAKA,CAAe,EAAE,OAAO,IAAMH,GAAc,OAAO,KAAKG,CAAe,EAAE,QAAQC,GAAK,CAAIA,EAAI,WAAW,MAAM,IAAGJ,EAAaI,CAAG,EAAED,EAAgBC,CAAG,EAAG,CAAC,EAAEV,EAAUN,EAAY,KAAK,UAAUY,CAAY,CAAC,GACpON,EAAUN,EAAY,KAAK,UAAUe,CAAe,CAAC,EAAK,EAAE,CAAC,CAAC,EAAsBG,EAAK,MAAM,CAAC,CAAC,CAAE",
  "names": ["COOKIE_NAME", "getCookie", "cookieName", "cookiePrefix", "cookie", "c", "setCookie", "cookieValue", "documentCookie", "UrlParamsCookie", "props", "ue", "currentValue", "urlParams", "window", "urlParamsObject", "key", "value", "p"]
}
