{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/4PINjqo48OHC6rcgYhOj/3FGqXF5fYrSoQLN4QIUP/SearchParamsPersist.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";export function RedirectCTA(){return{onTap:()=>{// Get all current search parameters\nconst search=new URLSearchParams(window.location.search);const pathname=window.location.pathname;// Check if it is coming from tutorial page\nconst tutorials=pathname.includes(\"tutorials\");const customerStories=pathname.includes(\"customer-stories\");const blog=pathname.includes(\"blog\");const heygen=pathname.includes(\"heygen\");const utm_source=search.get(\"utm_source\");if(!utm_source){if(tutorials){const slug=pathname.split(\"/\").pop();search.set(\"utm_source\",\"website\");search.set(\"utm_medium\",\"tutorials\");search.set(\"utm_campaign\",slug);}else if(customerStories){const slug=pathname.split(\"/\").pop();search.set(\"utm_source\",\"website\");search.set(\"utm_medium\",\"customer_stories\");search.set(\"utm_campaign\",slug);}else if(blog){const slug=pathname.split(\"/\").pop();search.set(\"utm_source\",\"website\");search.set(\"utm_medium\",\"blog\");search.set(\"utm_campaign\",slug);}else if(heygen){const slug=pathname.split(\"/\").pop();search.set(\"utm_source\",\"website\");search.set(\"utm_medium\",\"heygen\");search.set(\"utm_campaign\",slug);}}const searchParams=search.toString();// Redirect to the new URL with all search params\nwindow.location.href=`https://app.trupeer.ai/?${searchParams}`;}};}// export function RedirectCTA(): Override {\n//     return {\n//         onTap: () => {\n//             // \u2705 Ensure this only runs in the browser\n//             if (\n//                 typeof window === \"undefined\" ||\n//                 typeof document === \"undefined\"\n//             ) {\n//                 console.warn(\n//                     \"RedirectCTA tried to run on the server. Exiting...\"\n//                 )\n//                 return\n//             }\n//             // \u2705 Get all current search parameters safely\n//             const searchParams = new URLSearchParams(window.location.search)\n//             // \u2705 Get the cookie with key \"_fprom_tid\" safely\n//             const cookies = document.cookie ? document.cookie.split(\"; \") : []\n//             const fpromCookie = cookies.find((row) =>\n//                 row.startsWith(\"_fprom_tid=\")\n//             )\n//             // \u2705 If the cookie exists, append it to search params\n//             if (fpromCookie) {\n//                 const fpromValue = fpromCookie.split(\"=\")[1]\n//                 searchParams.set(\"_fprom_tid\", fpromValue)\n//             }\n//             // \u2705 Redirect to the new URL with updated search params\n//             window.location.href = `https://app.trupeer.ai?${searchParams.toString()}`\n//         },\n//     }\n// }\nimport{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withRedirectCTA(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...RedirectCTA(props)});};}withRedirectCTA.displayName=\"RedirectCTA\";\nexport const __FramerMetadata__ = {\"exports\":{\"RedirectCTA\":{\"type\":\"override\",\"name\":\"RedirectCTA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRedirectCTA\":{\"type\":\"reactHoc\",\"name\":\"withRedirectCTA\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SearchParamsPersist.map"],
  "mappings": "kIAAkD,SAASA,GAAa,CAAC,MAAM,CAAC,MAAM,IAAI,CAC1F,IAAMC,EAAO,IAAI,gBAAgBC,EAAO,SAAS,MAAM,EAAQC,EAASD,EAAO,SAAS,SAClFE,EAAUD,EAAS,SAAS,WAAW,EAAQE,EAAgBF,EAAS,SAAS,kBAAkB,EAAQG,EAAKH,EAAS,SAAS,MAAM,EAAQI,EAAOJ,EAAS,SAAS,QAAQ,EAA4C,GAAG,CAA5BF,EAAO,IAAI,YAAY,GAAkB,GAAGG,EAAU,CAAC,IAAMI,EAAKL,EAAS,MAAM,GAAG,EAAE,IAAI,EAAEF,EAAO,IAAI,aAAa,SAAS,EAAEA,EAAO,IAAI,aAAa,WAAW,EAAEA,EAAO,IAAI,eAAeO,CAAI,CAAE,SAASH,EAAgB,CAAC,IAAMG,EAAKL,EAAS,MAAM,GAAG,EAAE,IAAI,EAAEF,EAAO,IAAI,aAAa,SAAS,EAAEA,EAAO,IAAI,aAAa,kBAAkB,EAAEA,EAAO,IAAI,eAAeO,CAAI,CAAE,SAASF,EAAK,CAAC,IAAME,EAAKL,EAAS,MAAM,GAAG,EAAE,IAAI,EAAEF,EAAO,IAAI,aAAa,SAAS,EAAEA,EAAO,IAAI,aAAa,MAAM,EAAEA,EAAO,IAAI,eAAeO,CAAI,CAAE,SAASD,EAAO,CAAC,IAAMC,EAAKL,EAAS,MAAM,GAAG,EAAE,IAAI,EAAEF,EAAO,IAAI,aAAa,SAAS,EAAEA,EAAO,IAAI,aAAa,QAAQ,EAAEA,EAAO,IAAI,eAAeO,CAAI,CAAE,EAAE,IAAMC,EAAaR,EAAO,SAAS,EACn5BC,EAAO,SAAS,KAAK,2BAA2BO,CAAY,EAAG,CAAC,CAAE,CA8BwF,SAASC,EAAgBC,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASC,EAAKJ,EAAE,CAAC,GAAGC,EAAM,GAAGZ,EAAYY,CAAK,CAAC,CAAC,EAAI,CAACF,EAAgB,YAAY",
  "names": ["RedirectCTA", "search", "window", "pathname", "tutorials", "customerStories", "blog", "heygen", "slug", "searchParams", "withRedirectCTA", "C", "props", "re", "DataObserverContext", "p"]
}
