PageSourceSearch

https://soundryhealth.com/assets/complete-Bi-nJHYM.js

js soundryhealth.com collected 2026-10-07 06:48:07 UTC 3,362 bytes, 1 lines download raw bytes

1import{Z as m,r as l,j as e,B as x}from"./main-Culg7Cil.js";import{f as h}from"./finalizeSignupHandoff-BGPHP8qh.js";const f=new Set;function w(){if(typeof window>"u")return[];const t=window;return t.dataLayer=t.dataLayer??[],t.dataLayer}function y(t){const n=w(),i=n.length;n.push({event:"trial_signup",transaction_id:t}),n.push({event:"new_signup",transaction_id:t});const s=n[i],a=n[i+1],c=t===void 0?!0:s?.transaction_id===t&&a?.transaction_id===t;return n.length===i+2&&s?.event==="trial_signup"&&a?.event==="new_signup"&&c}function _(t){let n=!1;try{typeof window<"u"&&(n=y(t),n||console.warn("[signup] dataLayer trial_signup / new_signup verification failed after push"))}catch(i){console.warn("[signup] GTM dataLayer tracking failed",i)}try{typeof window<"u"&&"umami"in window&&window.umami?.track("trial_signup")}catch(i){console.warn("[signup] Umami tracking failed",i)}try{typeof window<"u"&&"gtag"in window&&(window.gtag?.("event","trial_signup",{event_category:"signup",transaction_id:t}),window.gtag?.("event","new_signup",{event_category:"signup",transaction_id:t}))}catch(i){console.warn("[signup] gtag tracking failed",i)}return{dataLayerVerified:n}}function b(){const{token:t,setup_intent_id:n,test:i}=m.useSearch(),[s,a]=l.useState(null),[c,j]=l.useState(!1),[u,g]=l.useState(null),[p,o]=l.useState(()=>!!t);return l.useEffect(()=>{let d=!1;return(async()=>{if(!t){a("Missing signup session details."),o(!1);return}try{const{redirectUrl:r}=await h({data:{token:t,setup_intent_id:n||void 0}});if(!r){a("Unable to complete signup."),o(!1);return}if(f.has(t)||(f.add(t),_(n||void 0)),d)return;g(r),o(!1)}catch(r){if(d)return;a(r instanceof Error?r.message:"Unable to complete signup."),o(!1)}})(),()=>{d=!0}},[n,t,i]),c?e.jsxs("main",{className:"mx-auto max-w-(--breakpoint-md) px-4 py-24 text-center",children:[e.jsx("h1",{className:"text-3xl font-semibold",children:"Test Mode"}),e.jsx("p",{className:"mt-4 text-gray-600",children:"Tracking events have been fired. Check your browser console and GTM debugger."}),e.jsxs("ul",{className:"mt-6 text-left mx-auto max-w-sm text-sm text-gray-500",children:[e.jsx("li",{children:"- Umami: trial_signup"}),e.jsx("li",{children:"- gtag: trial_signup + new_signup (with transaction_id)"}),e.jsx("li",{children:"- dataLayer: trial_signup + new_signup (with transaction_id)"})]})]}):e.jsx("main",{className:"mx-auto max-w-(--breakpoint-md) px-4 py-24 text-center space-y-6",children:s?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-3xl font-semibold",children:"Verification link expired"}),e.jsx("p",{className:"text-gray-600",children:s})]}):p?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-3xl font-semibold",children:"Email verified"}),e.jsx("p",{className:"text-gray-600",children:"Setting up your account…"})]}):u?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-3xl font-semibold",children:"Account Created"}),e.jsxs("ul",{className:"mx-auto max-w-md list-disc space-y-2 pl-5 text-left text-gray-600",children:[e.jsx("li",{children:"You can now use your email to sign in the future."}),e.jsx("li",{children:"Next, we'll help you configure your practice."})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(x,{asChild:!0,size:"lg",className:"min-w-56",children:e.jsx("a",{href:u,children:"Configure my Practice"})})})]}):null})}export{b as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.