{"version":3,"file":"TypeRewriteShop.BiLci2JM.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx","useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/5AUNAUY1rbzFgGQ1zqkh/pRzZieb7HOQkKqPzCSFt/DynamicCartAbandonmentHeader.js","https:/framerusercontent.com/modules/vk10QaftrnVKfU0pjxyt/gP31F8FU2ZnJ6f4mpQFt/TypeRewriteShop.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function ShopMessage(){const[text,setText]=useState(null);useEffect(()=>{const params=new URLSearchParams(window.location.search);const shop=params.get(\"shop\")?.trim();const newText=shop?`Companies like ${decodeURIComponent(shop)} lose 20% monthly revenue on Cart Abandonment`:\"E-commerce Companies lose 20% monthly revenue on Cart Abandonment\";setText(newText);},[]);return{text:text??\"\"};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withShopMessage(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ShopMessage(props)});};}withShopMessage.displayName=\"ShopMessage\";\nexport const __FramerMetadata__ = {\"exports\":{\"withShopMessage\":{\"type\":\"reactHoc\",\"name\":\"withShopMessage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ShopMessage\":{\"type\":\"override\",\"name\":\"ShopMessage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicCartAbandonmentHeader.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function TypeRewriteShop(){const baseText=\"Your mobile app is ready to go live. Are you?\";const suffix=\"mobile app is ready to go live. Are you?\";const[displayedText,setDisplayedText]=useState(baseText);useEffect(()=>{if(typeof window===\"undefined\")return;const params=new URLSearchParams(window.location.search);const shop=params.get(\"shop\")?.trim();if(!shop)return;const delay=ms=>new Promise(res=>setTimeout(res,ms));async function animate(){await delay(1e3)// Wait before animating\n;// Step 1: Backspace \"Your\" with cursor active\nlet prefix=\"Your\";for(let i=prefix.length;i>=0;i--){const current=prefix.slice(0,i)+\"|\"+suffix;setDisplayedText(current);await delay(100);}// Step 2: Type shop name with cursor\nlet typed=\"\";for(let i=0;i<shop.length;i++){typed+=shop[i];setDisplayedText(typed+\"|\"+\" \"+suffix);await delay(100);}// Step 3: Final text without cursor\nsetDisplayedText(typed+\" \"+suffix);}animate();},[]);return{text:displayedText};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withTypeRewriteShop(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...TypeRewriteShop(props)});};}withTypeRewriteShop.displayName=\"TypeRewriteShop\";\nexport const __FramerMetadata__ = {\"exports\":{\"TypeRewriteShop\":{\"type\":\"override\",\"name\":\"TypeRewriteShop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTypeRewriteShop\":{\"type\":\"reactHoc\",\"name\":\"withTypeRewriteShop\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TypeRewriteShop.map"],"mappings":"ySAAiF,SAAgB,GAAa,CAAC,GAAK,CAAC,EAAK,GAASG,EAAS,KAAK,CAAuT,OAAtT,MAAc,CAA0D,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAmB,IAAI,OAAO,EAAE,MAAM,CAAO,EAAQ,EAAK,kBAAkB,mBAAmB,EAAK,CAAC,+CAA+C,oEAAoE,EAAQ,EAAQ,EAAG,EAAE,CAAC,CAAO,CAAC,KAAK,GAAM,GAAG,CAAqJ,SAAgB,EAAgB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAA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