1import{E as St,A as wt,B as It,w as He,t}from"./chunk-KS7C4IRE-CP5eQ6tW.js";import{c as ve}from"./compiler-runtime-B5BSPr4P.js";import{B as We}from"./button-Ce7pKXr7.js";import{S as Qe}from"./skeleton-nAwncRYo.js";import{F as kt}from"./footer-BpbESnfC.js";import{N as Lt}from"./nav-public-xLRfhy-M.js";import{c as Ze,b as At,T as _t}from"./tabs-3lEB5tXK.js";import{C as et,d as tt,e as st,b as at,a as rt,c as lt}from"./card-Q5_z9wp_.js";import{I as Mt}from"./InfinityIcon-VQ0UiupL.js";import{I as Tt}from"./InfinityPlusIcon-Dkb4TnMU.js";import{I as Ft}from"./InfinityMaxIcon-C_97_viv.js";import{P as Je,b as Ge,a as Ke,i as nt,c as Et,p as ut}from"./plan-tiers-CaBNW8LR.js";import{u as Ut}from"./use-subscription-context-BJeoRIVR.js";import{u as $t,d as Rt}from"./use-billing-status-BhvZwAOv.js";import{s as Dt}from"./subscription-features-DQ9Rb2bl.js";import{u as Bt}from"./use-auth-CD5yh6W8.js";import{u as Ot}from"./use-start-checkout-CL-zlYIs.js";import{b as Yt,u as zt}from"./return-destination-DZhZCGCE.js";import{t as Ht}from"./track-paywall-event-yyg4h9X7.js";import{s as Jt}from"./pending-plan-intent-lYw9Jew1.js";import{b as Gt,u as Kt,A as Xt,t as qt,p as Vt}from"./plan-pricing-C2dlXJ0h.js";import{a as G}from"./utils-D5SiPLAW.js";import{p as Wt,e as Qt}from"./seo-BOA_4nQu.js";import{e as ot}from"./analytics-49y-JQN0.js";import{S as Zt}from"./smartphone-MfrB-M0I.js";import{L as es}from"./loader-circle-B28vMxI8.js";import{X as ts}from"./x-D2Tr4tCj.js";import{C as ft}from"./check-Ct5DAYAx.js";import"./Logo-BaapV-yp.js";import"./BerryMark-BcBlrpUl.js";import"./character-hubs-BxvHEkvO.js";import"./world-hubs-HaNsddDO.js";import"./cookie-consent-DFylvJGu.js";import"./createLucideIcon-DKb5F5jK.js";import"./index-C8eT2PRP.js";import"./index-DAJbX1iz.js";import"./index-Kp_DyJPc.js";import"./index-D7jLNvJZ.js";import"./index-CHxj89e0.js";import"./index-BTSTkiGa.js";import"./index-BirKmjAe.js";import"./useQuery-CWVUnSQ0.js";import"./supabase-iBSU8uuj.js";import"./api-PqJCq3Jj.js";import"./module-LwoiOy5B.js";import"./useMutation-DYDDfloe.js";import"./circle-alert-D9vWNt9Y.js";const it="pricing_page",ct="checkout",ss="cancelled";function ea(){return Wt({image:Qt("pricing"),title:"Pricing: Free, Infinity, Infinity+ and Infinity Max Plans | Junipero",description:"Junipero is free to chat. Compare Infinity, Infinity+ and Infinity Max for premium models, deeper memory, lorebooks, group chats, voice calls and Story Mode.",path:"/pricing"})}const as={[Je]:{title:"Infinity",description:"Everything you need for chatting and in-depth roleplaying",icon:t.jsx(Mt,{className:"h-5 w-5"}),cardClassName:"border-border",accentBarClassName:"bg-linear-to-r from-peach/60 to-peach-bright/60",checkClassName:"text-peach",buttonClassName:"bg-linear-to-r from-peach to-peach-bright hover:from-peach-deep hover:to-peach text-on-peach"},[Ge]:{title:"Infinity+",description:"Story Mode, voice calls, group chats and every model but Aurora",icon:t.jsx(Tt,{className:"h-5 w-5"}),ribbon:{label:"Most popular",className:"bg-peach text-on-peach"},cardClassName:"border-peach shadow-md shadow-peach/20",accentBarClassName:"bg-linear-to-r from-peach to-plum",checkClassName:"text-peach",buttonClassName:"bg-linear-to-r from-peach to-plum hover:from-peach-deep hover:to-plum/90 text-on-peach"},[Ke]:{title:"Infinity Max",description:"Deep Memory, no slowdowns, monthly Aurora and voice minutes",icon:t.jsx(Ft,{className:"h-5 w-5"}),ribbon:{label:"Max",className:"bg-linear-to-r from-plum to-peach text-on-plum"},cardClassName:"border-plum shadow-md shadow-plum/30",accentBarClassName:"bg-linear-to-r from-plum via-peach to-plum",checkClassName:"text-plum",buttonClassName:"bg-linear-to-r from-plum to-peach hover:brightness-110 text-on-plum"}},mt=[Je,Ge,Ke];function pt(){const h=ve.c(1);let e;return h[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-gooseberry/15 px-2 py-0.5 text-[11px] font-semibold text-gooseberry",children:[t.jsx(ft,{className:"h-3 w-3",strokeWidth:3}),"Current plan"]}),h[0]=e):e=h[0],e}function rs(h){const e=ve.c(12),{option:r,showMonthlyOnlyNote:n}=h;if(!r){let P;return e[0]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs("div",{className:"mt-2 space-y-2","aria-hidden":"true",children:[t.jsx(Qe,{className:"h-9 w-28"}),t.jsx(Qe,{className:"h-3 w-24"})]}),e[0]=P):P=e[0],P}let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("span",{className:"text-sm text-muted-foreground font-normal",children:"/mo"}),e[1]=c):c=e[1];let p;e[2]!==r.perMonthAmountLabel?(p=t.jsxs("div",{className:"font-bold text-3xl tabular-nums",children:[r.perMonthAmountLabel,c]}),e[2]=r.perMonthAmountLabel,e[3]=p):p=e[3];let d;e[4]!==r.billingLabel?(d=r.billingLabel.charAt(0).toUpperCase(),e[4]=r.billingLabel,e[5]=d):d=e[5];const o=d+r.billingLabel.slice(1),g=n?". Monthly only":"";let i;e[6]!==o||e[7]!==g?(i=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[o,g]}),e[6]=o,e[7]=g,e[8]=i):i=e[8];let m;return e[9]!==p||e[10]!==i?(m=t.jsxs("div",{className:"mt-2",children:[p,i]}),e[9]=p,e[10]=i,e[11]=m):m=e[11],m}function dt(h){const e=ve.c(7),{features:r,checkClassName:n}=h;let c;if(e[0]!==n||e[1]!==r){let d;e[3]!==n?(d=o=>t.jsxs("li",{className:"flex items-start gap-2 text-sm leading-relaxed",children:[t.jsx(ft,{className:G("h-4 w-4 shrink-0 mt-[0.2rem]",n)}),t.jsx("span",{children:o})]},o),e[3]=n,e[4]=d):d=e[4],c=r.map(d),e[0]=n,e[1]=r,e[2]=c}else c=e[2];let p;return e[5]!==c?(p=t.jsx("ul",{className:"space-y-2",children:c}),e[5]=c,e[6]=p):p=e[6],p}function ls(h){const e=h.filter(n=>n>0);if(e.length===0)return null;const r=Math.max(...e);return e.every(n=>n===r)?`save ${r}%`:`save up to ${r}%`}const ta=St(function(){const e=ve.c(138),r=wt(),n=It(),{availableProducts:c,data:p,isPlanUnknown:d}=Ut(),o=$t(),g=Rt(),i=Ot(),m=Yt(),{status:P,setAuthModalOpen:Se,setAuthMode:we}=Bt(),u=P==="authenticated",l=u&&!d?o.activePlan:null,C=u&&o.isStripeSubscriber,x=u&&o.isAppStoreSubscriber,b=C&&o.hasPaymentIssue,[ht,xt]=He.useState(null),bt=o.hasSubscription?Gt(p.interval):"yearly",f=ht??bt,[K,v]=He.useState(null),[Ie,ke]=He.useState(!1),S=i.isPending||m.isPending,Le=(i.error??m.error)?.message??null;let X;
1e[0]!==Ie||e[1]!==r.search?(X=!Ie&&new URLSearchParams(r.search).get(ct)===ss,e[0]=Ie,e[1]=r.search,e[2]=X):X=e[2];const Ae=X;let q;e[3]!==c?(q=s=>c.find(a=>a.name===`Junipero ${s}`),e[3]=c,e[4]=q):q=e[4];const y=q;let V;e[5]!==y?(V=y("Infinity"),e[5]=y,e[6]=V):V=e[6];let W;e[7]!==y?(W=y("Infinity+"),e[7]=y,e[8]=W):W=e[8];let Q;e[9]!==y?(Q=y("Infinity Max"),e[9]=y,e[10]=Q):Q=e[10];const{getInfinityFeatures:gt,getInfinityPlusFeatures:yt,getInfinityMaxFeatures:_e}=Kt(p,V,W,Q),Xe=qt(f),Nt=Je,Me=gt(Xe),jt=Ge,Te=yt(Xe);let w;e[11]!==_e?(w=_e(),e[11]=_e,e[12]=w):w=e[12];let Z;e[13]!==Me||e[14]!==Te||e[15]!==w?(Z={[Nt]:Me,[jt]:Te,[Ke]:w},e[13]=Me,e[14]=Te,e[15]=w,e[16]=Z):Z=e[16];const Fe=Z;let ee;e[17]!==g||e[18]!==f?(ee=s=>Vt(g[s],nt(s)?"monthly":f),e[17]=g,e[18]=f,e[19]=ee):ee=e[19];const I=ee;let te;e[20]!==g?(te=ls(mt.map(s=>g[s].yearly?.savingsPercent??0)),e[20]=g,e[21]=te):te=e[21];const qe=te;let se;e[22]!==l?(se=s=>!l||!Et(l,s),e[22]=l,e[23]=se):se=e[23];const k=se;let ae;e[24]!==o.billedPlan||e[25]!==b?(ae=s=>b&&o.billedPlan===s,e[24]=o.billedPlan,e[25]=b,e[26]=ae):ae=e[26];const N=ae,Ct=ns;let re;e[27]!==l||e[28]!==x||e[29]!==N||e[30]!==C||e[31]!==k||e[32]!==b?(re=s=>{const a=ut(s);return b?N(s)?Ct(s):"Update your card first":l===s?"Current plan":x?"Change in the app":C?k(s)?`Upgrade to ${a}`:`Switch to ${a}`:`Get ${a}`},e[27]=l,e[28]=x,e[29]=N,e[30]=C,e[31]=k,e[32]=b,e[33]=re):re=e[33];const Ee=re;let le;e[34]!==Se||e[35]!==we?(le=()=>{we("signup"),Se(!0)},e[34]=Se,e[35]=we,e[36]=le):le=e[36];const L=le;let ne;e[37]!==r.pathname||e[38]!==r.search||e[39]!==n||e[40]!==ke?(ne=()=>{ke(!0);
1const s=new URLSearchParams(r.search);s.delete(ct);const a=s.toString();n(`${r.pathname}${a?`?${a}`:""}`,{replace:!0})},e[37]=r.pathname,e[38]=r.search,e[39]=n,e[40]=ke,e[41]=ne):ne=e[41];const Ue=ne;let oe;e[42]!==l||e[43]!==u||e[44]!==n||e[45]!==L?(oe=()=>{if(ot("free","pricing_page",l),!u){L();return}n("/explore")},e[42]=l,e[43]=u,e[44]=n,e[45]=L,e[46]=oe):oe=e[46];const $e=oe;let ie;e[47]!==i||e[48]!==m||e[49]!==v?(ie=async s=>{i.reset(),m.reset(),v(s),await m.openPortal({flow:"payment_method_update"})},e[47]=i,e[48]=m,e[49]=v,e[50]=ie):ie=e[50];const Re=ie;let ce;e[51]!==i||e[52]!==l||e[53]!==x||e[54]!==N||e[55]!==d||e[56]!==u||e[57]!==C||e[58]!==k||e[59]!==n||e[60]!==b||e[61]!==L||e[62]!==m||e[63]!==I||e[64]!==v||e[65]!==Re?(ce=async s=>{if(b){N(s)&&await Re(s);return}const a=I(s);if(ot(s,"pricing_page",l),!u){a&&Jt({plan:s,period:a.period}),L();return}if(!(!a||l===s||x)){if(Ht({action:"cta_clicked",surface:it,plan:s,period:a.period}),d){const j=new URLSearchParams({plan:s});a.period==="monthly"&&j.set("period","months"),n(`/manage-subscription?${j}`);return}if(i.reset(),m.reset(),v(s),C){const j=k(s);await m.openPortal({flow:j?"upgrade":"switch",targetPriceId:a.priceId,...j?{returnTo:zt(s,void 0)}:{}});return}await i.startCheckout({priceId:a.priceId,surface:it})}},e[51]=i,e[52]=l,e[53]=x,e[54]=N,e[55]=d,e[56]=u,e[57]=C,e[58]=k,e[59]=n,e[60]=b,e[61]=L,e[62]=m,e[63]=I,e[64]=v,e[65]=Re,e[66]=ce):ce=e[66];const De=ce;let me;e[67]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(Lt,{}),e[67]=me):me=e[67];let pe,de;e[68]===Symbol.for("react.memo_cache_sentinel")?(pe=t.jsx("h1",{className:"text-5xl md:text-7xl font-bold mb-6 tracking-tight text-center text-foreground",children:"Simple, transparent pricing"}),de=t.jsx("p",{className:"text-xl text-muted-foreground mb-10 text-center max-w-2xl",children:"Start for free, upgrade when you need more. No hidden fees, cancel anytime."}),e[68]=pe,e[69]=de):(pe=e[68],de=e[69]);let ue;e[70]===Symbol.for("react.memo_cache_sentinel")?(ue=s=>xt(s==="monthly"?"monthly":"yearly"),e[70]=ue):ue=e[70];let fe;e[71]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx(Ze,{value:"monthly",children:"Monthly"}),e[71]=fe):fe=e[71];const Be=qe?` (${qe})`:"";let A;e[72]!==Be?(A=t.jsxs("span",{className:"relative z-10",children:["Yearly",Be]}),e[72]=Be,e[73]=A):A=e[73];let _;e[74]!==f?(_=f==="yearly"&&t.jsx("span",{className:"absolute inset-0 bg-linear-to-r from-gooseberry/20 to-juniper/20 rounded-sm"}),e[74]=f,e[75]=_):_=e[75];let M;e[76]!==A||e[77]!==_?(M=t.jsxs(At,{className:"grid w-full grid-cols-2",children:[fe,t.jsxs(Ze,{value:"yearly",className:"relative overflow-visible group",children:[A,_]})]}),e[76]=A,e[77]=_,e[78]=M):M=e[78];let T;e[79]!==f||e[80]!==M?(T=t.jsx(_t,{value:f,onValueChange:ue,className:"w-full max-w-[400px] mx-auto relative mb-16",children:M}),e[79]=f,e[80]=M,e[81]=T):T=e[81];let F;e[82]!==Ue||e[83]!==Ae?(F=Ae&&t.jsxs("div",{role:"status",className:"flex items-center justify-between gap-3 rounded-xl border border-goldenberry/30 bg-goldenberry/10 px-4 py-3 text-sm",children:[t.jsx("span",{children:"Checkout cancelled. You weren't charged."}),t.jsx("button",{type:"button","aria-label":"Dismiss",onClick:Ue,className:"rounded-lg p-1 text-muted-foreground hover:text-foreground",children:t.jsx(ts,{className:"h-4 w-4"})})]}),e[82]=Ue,e[83]=Ae,e[84]=F):F=e[84];let E;e[85]!==o.appStoreName||e[86]!==x?(E=x&&t.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-blueberry/30 bg-blueberry/10 p-4",children:[t.jsx(Zt,{className:"h-5 w-5 text-blueberry shrink-0 mt-0.5"}),t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your plan is billed through ",o.appStoreName,". Change plans in the Junipero app."]})]}),e[85]=o.appStoreName,e[86]=x,e[87]=E):E=e[87];const Oe=l==="free"&&"ring-2 ring-gooseberry/40";let U;e[88]!==Oe?(U=G("relative overflow-hidden h-full flex flex-col",Oe),e[88]=Oe,e[89]=U):U=e[89];let $;e[90]!==l?($=l==="free"&&t.jsx(pt,{}),e[90]=l,e[91]=$):$=e[91];let he,xe;e[92]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(st,{children:"Free"}),xe=t.jsx(at,{children:"Start chatting for free, no card needed"}),e[92]=he,e[93]=xe):(he=e[92],xe=e[93]);let R;e[94]!==$?(R=t.jsxs("div",{className:"space-y-1.5",children:[$,he,xe]}),e[94]=$,e[95]=R):R=e[95];let be;e[96]===Symbol.for("react.memo_cache_sentinel")?(be=t.jsx("div",{className:"font-bold text-3xl mt-2",children:"$0"}),e[96]=be):be=e[96];let D;e[97]!==R?(D=t.jsxs(tt,{children:[R,be]}),e[97]=R,e[98]=D):D=e[98];let ge;e[99]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsx(rt,{className:"space-y-4 pt-0 grow",children:t.jsx(dt,{features:Dt.free,checkClassName:"text-gooseberry"})}),e[99]=ge):ge=e[99];const Ye=l==="free",ze=l==="free"?"Current plan":u?"Explore characters":"Start free";let B;e[100]!==$e||e[101]!==Ye||e[102]!==ze?(B=t.jsx(lt,{className:"mt-auto",children:t.jsx(We,{className:"w-full rounded-full bg-secondary hover:bg-secondary/90",onClick:$e,disabled:Ye,children:ze})}),e[100]=$e,e[101]=Ye,e[102]=ze,e[103]=B):B=e[103];let O;e[104]!==U||e[105]!==D||e[106]!==B?(O=t.jsxs(et,{className:U,children:[D,ge,B
1]}),e[104]=U,e[105]=D,e[106]=B,e[107]=O):O=e[107];let Y;e[108]!==Le||e[109]!==Ee||e[110]!==l||e[111]!==Fe||e[112]!==De||e[113]!==x||e[114]!==S||e[115]!==N||e[116]!==u||e[117]!==b||e[118]!==K||e[119]!==I||e[120]!==f?(Y=mt.map(s=>{const a=as[s],j=l===s,Pt=S&&K===s,Ve=I(s),vt=b?!N(s)||S:j||x||S||u&&!Ve;return t.jsxs(et,{className:G("relative overflow-hidden border h-full flex flex-col",a.cardClassName,j&&"ring-2 ring-gooseberry/40"),children:[a.ribbon&&t.jsx("div",{className:G("absolute top-0 right-0 p-1 text-xs font-medium px-2 uppercase rounded-bl-md z-10",a.ribbon.className),children:a.ribbon.label}),t.jsx("div",{className:G("absolute top-0 left-0 w-full h-1",a.accentBarClassName)}),t.jsxs(tt,{children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[j&&t.jsx(pt,{}),t.jsx(st,{children:a.title}),t.jsx(at,{children:a.description})]}),t.jsx("span",{className:"shrink-0 mt-1",children:a.icon})]}),t.jsx(rs,{option:Ve,showMonthlyOnlyNote:nt(s)&&f==="yearly"})]}),t.jsx(rt,{className:"space-y-4 pt-0 grow",children:t.jsx(dt,{features:Fe[s],checkClassName:a.checkClassName})}),t.jsxs(lt,{className:"mt-auto flex-col items-stretch gap-2",children:[t.jsxs(We,{className:G("w-full rounded-full",a.buttonClassName),onClick:()=>De(s),disabled:vt,children:[Pt&&t.jsx(es,{className:"mr-2 h-4 w-4 animate-spin"}),Ee(s)]}),t.jsx(Xt,{message:!S&&K===s?Le:null})]})]},s)}),e[108]=Le,e[109]=Ee,e[110]=l,e[111]=Fe,e[112]=De,e[113]=x,e[114]=S,e[115]=N,e[116]=u,e[117]=b,e[118]=K,e[119]=I,e[120]=f,e[121]=Y):Y=e[121];let z;e[122]!==O||e[123]!==Y?(z=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6",children:[O,Y]}),e[122]=O,e[123]=Y,e[124]=z):z=e[124];let H;e[125]!==F||e[126]!==E||e[127]!==z?(H=t.jsxs("div",{className:"w-full max-w-6xl mx-auto space-y-6",children:[F,E,z]}),e[125]=F,e[126]=E,e[127]=z,e[128]=H):H=e[128];let ye;e[129]===Symbol.for("react.memo_cache_sentinel")?(ye=t.jsx("p",{className:"text-sm text-muted-foreground",children:"All plans include secure payment processing. Cancel anytime."}),e[129]=ye):ye=e[129];let Ne;e[130]===Symbol.for("react.memo_cache_sentinel")?(Ne=t.jsxs("div",{className:"text-center space-y-2 mt-16",children:[ye,t.jsxs("p",{className:"text-sm",children:["Need help?"," ",t.jsx("a",{href:"/support",className:"text-primary hover:underline",children:"Contact support"})]})]}),e[130]=Ne):Ne=e[130];let J;e[131]!==T||e[132]!==H?(J=t.jsxs("main",{className:"relative z-10 flex flex-col items-center justify-center px-6 pt-20 pb-32",children:[pe,de,T,H,Ne]}),e[131]=T,e[132]=H,e[133]=J):J=e[133];let je;e[134]===Symbol.for("react.memo_cache_sentinel")?(je=t.jsx(kt,{}),e[134]=je):je=e[134];let Ce;e[135]===Symbol.for("react.memo_cache_sentinel")?(Ce=t.jsxs("div",{className:"absolute inset-0 z-0",children:[t.jsx("div",{className:"absolute inset-0 bg-linear-to-t from-transparent to-background"}),t.jsx("div",{className:"absolute left-1/2 top-2/3 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-linear-to-r from-plum/20 via-peach/20 to-plum/20 blur-3xl opacity-50 rounded-full dark:opacity-30"})]}),e[135]=Ce):Ce=e[135];let Pe;return e[136]!==J?(Pe=t.jsxs("div",{className:"min-h-dvh bg-background relative overflow-hidden flex flex-col",children:[me,J,je,Ce]}),e[136]=J,e[137]=Pe):Pe=e[137],Pe});function ns(h){return`Update card to get ${ut(h)} back`}export{ta as default,ea as meta};
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.