{"version":3,"file":"Funnel.DRWFSawM.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx","useState"],"sources":["https:/framerusercontent.com/modules/9gihPp8BVZYvEsmKi1qM/W7cDNAY8DPMqvBeLmNk3/Funnel.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useState,useEffect}from\"react\";import{saveData,loadData}from\"https://framerusercontent.com/modules/Vsl2WObOFab7H2IKXect/iacceoMjlxBUZKwP9Rur/Storage.js\";// =========================================================\n// 🔀 FUNNEL INIT — saves funnel identity on landing page\n// =========================================================\n// Assign InitXxxFunnel to any element on the landing page.\n// It fires once on load and tags the session with funnelId.\n// This data flows through the quiz into Supabase on purchase.\n//\n// To add a new funnel:\n// 1. Duplicate 3 pages in Framer (landing, email, checkout)\n// 2. Adjust copy in Framer design\n// 3. Add a new InitXxxFunnel export below\n// 4. Assign it to the root frame of the new landing page\n// =========================================================\n// ─── Hormonal (default) ───────────────────────────────────\nexport function InitHormonalFunnel(){React.useEffect(()=>{saveData(\"funnelId\",\"hormonal\");saveData(\"funnel_label\",\"Hormonal Health Reset\");},[]);return{};}// ─── Keto (subscription pricing — 1/3/6 month) ────────────\nexport function InitKetoFunnel(){React.useEffect(()=>{saveData(\"funnelId\",\"keto\");saveData(\"funnel_label\",\"Keto Diet for Women 40+\");},[]);return{};}// ─── Keto Trial (paid trial pricing — 7/28/90 day) ────────\nexport function InitKetoTrialFunnel(){React.useEffect(()=>{saveData(\"funnelId\",\"keto_trial\");saveData(\"funnel_label\",\"Keto Diet for Women 40+ — Trial\");},[]);return{};}// ─── Carnivore ────────────────────────────────────────────\n// export function InitCarnivoreFunnel(): Override {\n//     React.useEffect(() => {\n//         saveData(\"funnelId\", \"carnivore\")\n//         saveData(\"funnel_label\", \"Carnivore Diet for Women 40+\")\n//     }, [])\n//     return {}\n// }\n// ─── Paleo ────────────────────────────────────────────────\n// export function InitPaleoFunnel(): Override {\n//     React.useEffect(() => {\n//         saveData(\"funnelId\", \"paleo\")\n//         saveData(\"funnel_label\", \"Paleo Diet for Women 40+\")\n//     }, [])\n//     return {}\n// }\n// =========================================================\n// 🔁 SMART ROUTING — routes to correct page per funnel\n// =========================================================\n// Replace manual Framer links on navigation buttons with\n// these overrides so each funnel goes to its own pages.\n// =========================================================\n// ─── Summary page → Email page ────────────────────────────\n// Assign to continue button on summary/last quiz page\nexport function ContinueToEmail(){return{onTap(){const funnelId=loadData(\"funnelId\",\"hormonal\");const routes={hormonal:\"/quiz-email\",keto:\"/keto-email\",keto_trial:\"/keto-email\"};window.location.href=routes[funnelId]||routes.hormonal;}};}// ─── Name page — checks first_name + routes to correct checkout ──\nexport const ContinueName=()=>{const[enabled,setEnabled]=useState(false);useEffect(()=>{const check=()=>{const val=loadData(\"first_name\",\"\");setEnabled(val.toString().trim()!==\"\");};check();const interval=setInterval(check,300);return()=>clearInterval(interval);},[]);return{style:{opacity:enabled?1:.4,pointerEvents:enabled?\"auto\":\"none\",cursor:enabled?\"pointer\":\"not-allowed\",transition:\"opacity 0.2s ease\"},onTap(){if(!enabled)return;const funnelId=loadData(\"funnelId\",\"hormonal\");const routes={hormonal:\"/quiz-checkout\",keto:\"/keto-checkout\",keto_trial:\"/keto-info-science\"};window.location.href=routes[funnelId]||routes.hormonal;}};};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withInitHormonalFunnel(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...InitHormonalFunnel(props)});};}withInitHormonalFunnel.displayName=\"InitHormonalFunnel\";export function withInitKetoFunnel(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...InitKetoFunnel(props)});};}withInitKetoFunnel.displayName=\"InitKetoFunnel\";export function withInitKetoTrialFunnel(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...InitKetoTrialFunnel(props)});};}withInitKetoTrialFunnel.displayName=\"InitKetoTrialFunnel\";export function withContinueToEmail(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ContinueToEmail(props)});};}withContinueToEmail.displayName=\"ContinueToEmail\";export function withContinueName(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ContinueName(props)});};}withContinueName.displayName=\"ContinueName\";\nexport const __FramerMetadata__ = {\"exports\":{\"withInitKetoTrialFunnel\":{\"type\":\"reactHoc\",\"name\":\"withInitKetoTrialFunnel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInitHormonalFunnel\":{\"type\":\"reactHoc\",\"name\":\"withInitHormonalFunnel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ContinueName\":{\"type\":\"override\",\"name\":\"ContinueName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ContinueToEmail\":{\"type\":\"override\",\"name\":\"ContinueToEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"InitKetoFunnel\":{\"type\":\"override\",\"name\":\"InitKetoFunnel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withInitKetoFunnel\":{\"type\":\"reactHoc\",\"name\":\"withInitKetoFunnel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withContinueName\":{\"type\":\"reactHoc\",\"name\":\"withContinueName\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withContinueToEmail\":{\"type\":\"reactHoc\",\"name\":\"withContinueToEmail\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"InitHormonalFunnel\":{\"type\":\"override\",\"name\":\"InitHormonalFunnel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"InitKetoTrialFunnel\":{\"type\":\"override\",\"name\":\"InitKetoTrialFunnel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./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