PageSourceSearch

https://joinaligned.ai/assets/ChoosePlanPage-CmFwTDH_.js

js joinaligned.ai collected 2026-10-05 12:59:36 UTC 4,772 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C8rJ6Qwf.js","assets/react-query-B4i0_DlC.js","assets/radix-ui-DdHDrzfD.js","assets/firebase-core-BLTXy0Gd.js","assets/firebase-firestore-CgPjk0t4.js","assets/firebase-database-ClaLrFE5.js","assets/firebase-storage-Dvs5WDrb.js","assets/utils-BcRwgjx2.js","assets/icons-BBbjOIlu.js","assets/framer-motion-DW1bmm4j.js","assets/md-react-Br4KiRmz.js","assets/index-CLHRsBNL.css"])))=>i.map(i=>d[i]);
2import{u as G,l as O,m as S,o as f,a as T,n as y,bA as P,bB as k,ad as I,G as _,e as g,j as b,b as R,c as B,y as F,A as H,z as M,bp as D,N as W,bC as z,_ as j,bD as J,t as V}from"./index-C8rJ6Qwf.js";import{r as p,j as e}from"./react-query-B4i0_DlC.js";import{G as Y,a as K}from"./GuestChoosePlanCard-B_Ey_GL5.js";import{L as q}from"./LogInOrSignUpModal-DeBsFagL.js";import{S as L}from"./signup-plan-options-DsPmrBRd.js";import{s as Q}from"./start-paid-plan-billing-BEtfOHBs.js";import{M as X,s as Z}from"./MarketingJsonLd-Dk2vmHWg.js";import{L as $}from"./icons-BBbjOIlu.js";import"./radix-ui-DdHDrzfD.js";import"./firebase-core-BLTXy0Gd.js";import"./firebase-firestore-CgPjk0t4.js";import"./firebase-database-ClaLrFE5.js";import"./firebase-storage-Dvs5WDrb.js";import"./utils-BcRwgjx2.js";import"./framer-motion-DW1bmm4j.js";import"./md-react-Br4KiRmz.js";import"./otp-form-Bu8xZpA6.js";import"./otp-input-JP8rTctL.js";import"./react-Bo6yiPQy.js";import"./reviewer-account-Bk_Iaq40.js";import"./signup-flow-test-account-CjDT9GiS.js";import"./email-verification-token-B5ypoSbS.js";function be(){const[,i]=G(),{user:a,isAuthenticated:l,isLoading:c}=O(),[A,E]=p.useState(!1),[d,C]=p.useState("monthly"),[v,h]=p.useState(null),x=l&&!!a,m=S(),w=!c&&l&&!!a&&!m&&f(a);T(),p.useEffect(()=>{if(c||!l||!a)return;if(m){const s=y(a);s!=="/choose-plan"&&i(s);return}if(f(a)){i(P());return}if(k(a)){I(a).then(i);return}const t=y(a);t!=="/choose-plan"&&i(t)},[c,m,l,i,a]);const N=async t=>{const s=L.find(o=>o.id===t);if(s){h(t);try{if(z(s.id,s.category),l&&a){if(f(a)){i(P());return}const{getAuth:o}=await j(async()=>{const{getAuth:r}=await import("./firebase-core-BLTXy0Gd.js").then(n=>n.a6);return{getAuth:r}},[]),{updateUserProfile:U}=await j(async()=>{const{updateUserProfile:r}=await import("./index-C8rJ6Qwf.js").then(n=>n.iW);return{updateUserProfile:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),u=o().currentUser;if(u){const r=await Q({planId:s.id,billingInterval:d,returnPath:"/signup-name"});if(r.kind==="redirected")return;if(r.kind==="error"){alert(r.message);return}const n={selectedPlan:s.id,usagePreference:s.category,billingInterval:d};s.category==="family"&&(n.familyAdmin=u.uid,n.isFamilyMember=!1,n.familyMode="parent",n.familyId=u.uid),await U(u.uid,n)}J(),S()&&V(),i("/signup-name");return}i("/signup")}catch(o){console.error("Error saving plan selection:",o),alert("Something went wrong. Please try again.")}finally{h(null)}}};return c&&x||w?e.jsx("div",{className:g(b,"items-center justify-center"),style:{backgroundColor:_},children:e.jsx($,{className:"size-8 animate-spin text-[#2a2a2a]","aria-label":"Loading"})}):e.jsxs("div",{className:g(b,"font-['DM_Sans',ui-sans-serif,system-ui,sans-serif] text-[#2a2a2a]"),style:{backgroundColor:_},"data-testid":"choose-plan-page",children:[e.jsx(X,{data:Z()}),e.jsxs("div",{className:B,style:{backgroundColor:R},children:[e.jsx(F,{}),e.jsx("main",{className:"flex min-h-0 flex-1 flex-col items-center overflow-y-auto px-[18px] pb-[18px]",children:e.jsxs("div",{className:"flex w-full max-w-[1403px] flex-col items-center gap-[18px] py-2",children:[e.jsxs("div",{className:"flex w-full flex-col items-center",children:[e.jsx("div",{className:g(M,"h-[72px]"),children:e.jsx(H,{})}),e.jsx("div",{className:"flex h-[54px] w-full items-start justify-center",children:e.jsx("h1",{className:"w-full text-center text-[27px] font-normal leading-[36px] tracking-[-0.81px] text-[#2a2a2a]","data-testid":"heading-choose-plan",children:"Choose plan to continue"})})]}),e.jsx("div",{className:"flex w-full flex-wrap items-stretch justify-center gap-[18px]",children:L.map(t=>e.jsx(Y,{plan:t,billing:d,isLoading:v===t.id,onSelect:()=>void N(t.id)},t.id))}),e.jsx("div",{className:"flex min-h-[54px] w-full shrink-0 items-center justify-center py-[9px]",children:e.jsxs("label",{className:"flex items-center gap-[9px]",children:[e.jsx("span",{className:"text-[14px] font-medium leading-[18px] text-[#8a8a8a]",children:"Save with yearly billing"}),e.jsx(D,{checked:d==="yearly",onCheckedChange:t=>C(t?"yearly":"monthly"),className:K,"data-testid":"switch-yearly-billing","aria-label":"Save with yearly billing"})]})})]})}),x?null:e.jsx(W,{variant:"legalOnly"})]}),e.jsx(q,{isOpen:A,onClose:()=>E(!1),onEmailSubmitted:()=>i("/signup")})]})}export{be as default};

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.