1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9566],{70089:(e,n,r)=>{"use strict";r.d(n,{ReservePricingPanel:()=>u});var t=r(95155),o=r(19749),i=r(34636),a=r(41871),l=r(7678),s=r(52336),c=r(98517),d=[{k:"One payment",v:"Add money once instead of approving a charge every month."},{k:"Two uses",v:"The same reserve pays for your plan and for credit packs."},{k:"No lock-in",v:"Keep a card as well. Switching either way changes nothing about the price."}];function u(e){var n,r,u,g,x,f,p,b,j,y,S,v,w,k,C,T,_=(0,o.c)(19),P=e.waitTimeAnswer;_[0]===Symbol.for("react.memo_cache_sentinel")?(n={q:"What happens if there is not enough on renewal day?",a:"Your plan stops that day and the account goes to Free. We do not take a part payment and nothing is deleted. Top up any time and the plan resumes on a cycle starting from the day the transfer confirms. We email you 14, 7 and 2 days ahead when the money is going to be short, so the last day is never a surprise."},r={q:"Can I get the money back out?",a:"No. Crypto payments cannot be reversed, so anything you add stays on the account until you spend it. It does not expire, and it can go to any plan or any credit pack. Spending it only goes one way, though: credits you buy with it cannot turn back into balance. So there is no wrong amount to add, other than more than you want to spend here."},_[0]=n,_[1]=r):(n=_[0],r=_[1]),_[2]!==P?(u={q:"How long does a top up take?",a:P},_[2]=P,_[3]=u):u=_[3],_[4]===Symbol.for("react.memo_cache_sentinel")?(g={q:"Do I have to use it for my plan?",a:"No. Open Change plan and pick Free as what renews next. Your reserve then stops buying months and stays available for credit packs, and you can keep a card for the plan."},_[4]=g):g=_[4],_[5]!==u?(x=[n,r,u,g],_[5]=u,_[6]=x):x=_[6];var z=x;return _[7]===Symbol.for("react.memo_cache_sentinel")?(f={base:14,md:20},p={base:12,md:14},_[7]=f,_[8]=p):(f=_[7],p=_[8]),_[9]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(i.Box,{position:"absolute",top:"-40%",right:"-6%",w:"40%",h:"160%",pointerEvents:"none",bg:{_light:"radial-gradient(closest-side, rgba(176,138,47,0.08), transparent 70%)",_dark:"radial-gradient(closest-side, rgba(221,186,94,0.06), transparent 70%)"}}),_[9]=b):b=_[9],_[10]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsxs)(a.HStack,{gap:"2.5",children:[(0,t.jsx)(i.Box,{w:"5",h:"0.5",bg:"border.hairline.strong"}),(0,t.jsx)(l.Text,{fontSize:"xs",letterSpacing:"label",color:"fg.subtle",children:"Paying in crypto"})]}),j=(0,t.jsx)(l.Text,{as:"h2",fontFamily:"heading",fontWeight:400,fontSize:"3xl",lineHeight:"tight",letterSpacing:"tight-em",mt:"3",mb:"2",children:"Fund a reserve, and it pays the rest."}),y=(0,t.jsx)(l.Text,{fontSize:"sm",lineHeight:"dense",color:"fg.muted",maxW:"60ch",children:"Add money once. Your plan takes what it needs on renew
1al day, credit packs come out of the same place, and there is no invoice to remember. Card billing is unchanged and works exactly as it always has."}),_[10]=j,_[11]=y,_[12]=S):(j=_[10],y=_[11],S=_[12]),_[13]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsxs)(i.Box,{position:"relative",overflow:"hidden",w:"100%",borderWidth:"1px",borderColor:"border.hairlineWarm",borderRadius:"surface",bg:"bg.panel",boxShadow:"cardLift",px:"7",py:"6",children:[b,(0,t.jsxs)(i.Box,{position:"relative",children:[S,j,y,(0,t.jsx)(a.HStack,{gap:"6",flexWrap:"wrap",mt:"5",align:"flex-start",children:d.map(m)})]})]}),_[13]=v):v=_[13],_[14]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsxs)(l.Text,{as:"h3",fontFamily:"heading",fontWeight:400,fontSize:"2xl",letterSpacing:"tight-em",mb:"1",children:["Before you"," ",(0,t.jsx)(l.Text,{as:"span",fontStyle:"italic",color:"credit.gold",children:"fund one."})]}),_[14]=w):w=_[14],_[15]===Symbol.for("react.memo_cache_sentinel")?(k={base:1,md:2},C={base:0,md:14},_[15]=k,_[16]=C):(k=_[15],C=_[16]),_[17]!==z?(T=(0,t.jsxs)(s.Stack,{gap:"6",align:"center",w:"100%",mt:f,pt:p,borderTop:"1px solid",borderColor:"border",children:[v,(0,t.jsxs)(i.Box,{w:"100%",children:[w,(0,t.jsx)(c.SimpleGrid,{columns:k,columnGap:C,rowGap:0,children:z.map(h)})]})]}),_[17]=z,_[18]=T):T=_[18],T}function h(e){return(0,t.jsxs)(i.Box,{borderTopWidth:"1px",borderColor:"border.hairline.default",pt:"4",pb:"4",mt:"4",children:[(0,t.jsx)(l.Text,{as:"h4",fontSize:"sm",fontWeight:600,color:"fg",children:e.q}),(0,t.jsx)(l.Text,{fontSize:"sm",lineHeight:"dense",color:"fg.muted",mt:"1.5",maxW:{base:"70ch",md:"none"},children:e.a})]},e.q)}function m(e){return(0,t.jsxs)(i.Box,{flex:"1 1 170px",minW:"40",children:[(0,t.jsx)(l.Text,{fontSize:"xs",letterSpacing:"label",color:"credit.slate",children:e.k}),(0,t.jsx)(l.Text,{fontSize:"sm",lineHeight:"dense",color:"fg.muted",mt:"1.5",children:e.v})]},e.k)}},74971:(e,n,r)=>{"use strict";r.d(n,{default:()=>er});var t=r(42021),o=r(43078),i=r(96843),a=r(64084),l=r(77828),s=r(95155),c=r(19749),d=r(7678),u=r(92206),h=r(2857),m=r(56342),g=r(79863),x=r(41871),f=r(34636),p=r(55863),b=r(98517),j=r(52336),y=r(92049),S=r(41155),v=r(39970),w=r(50153),k=r(12115),C=r(34028),T=r(82222),_=r(7801),P=r(28209),z=r(99812),F=r(92355),E=r(15865),W=r(60490),B=r(32007),R=r(14547),A=r(72775),H=r(74372),D=r(58079),Y=r(81705),I=r(20695),N=r(61534),U=r(83973),M=r(52011),L=r(41830);function $(e){var n,r,t,o,i,a,l,u,h,m,g,x,p,b=(0,c.c)(38),S=e.name,v=e.credits,w=e.priceCents,k=e.badge,C=e.recommended,T=e.onSelect,_=e.purchasable,P=void 0===_||_,z=Math.round((v/w-1)*100),F=C?"gold.500":"border.default",E=C?"goldGlow":void 0;return(b[0]!==P||b[1]!==C?(n=P?{borderColor:C?"gold.400":"border.hover",transform:"translateY(-2px)"}:void 0,b[0]=P,b[1]=C,b[2]=n):n=b[2],b[3]!==k||b[4]!==C?(r=k&&(0,s.jsx)(y.Ex,{position:"absolute",top:3,right:3,fontSize:"xs",letterSpacing:"widest",fontWeight:"semibold",px:2,py:1,borderRadius:"chip",color:C?L.eA:"credit.gold",style:C?{background:L.iN}:void 0,bg:C?void 0:"credit.goldTint",children:k}),b[3]=k,b[4]=C,b[5]=r):r=b[5],b[6]!==S?(t=(0,s.jsx)(d.Text,{fontSize:"sm",color:"fg.subtle",children:S}),b[6]=S,b[7]=t):t=b[7],b[8]!==v?(o=v.toLocaleString(),b[8]=v,b[9]=o):o=b[9],b[10]!==o?(i=(0,s.jsx)(d.Text,{fontFamily:"heading",fontSize:"5xl",fontWeight:"normal",lineHeight:"1",color:"fg",whiteSpace:"nowrap",children:o}),b[10]=o,b[11]=i):i=b[11],b[12]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)(d.Text,{fontSize:"xs",letterSpacing:"label",color:"fg.subtle",mt:1.5,children:"Credits"}),b[12]=a):a=b[12],b[13]!==i?(l=(0,s.jsxs)(j.Stack,{gap:0,children:[i,a]}),b[13]=i,b[14]=l):l=b[14],b[15]!==z?(u=z>0?(0,s.jsxs)(d.Text,{fontSize:"xs",fontWeight:"medium",color:"credit.gold",children:["+",z,"% bonus"]}):(0,s.jsx)(d.Text,{fontSize:"xs",color:"fg.muted",children:"no bonus"}),b[15]=z,b[16]=u):u=b[16],b[17]!==v||b[18]!==w)?(h=(w/100/v).toFixed(4),b[17]=v,b[18]=w,b[19]=h):h=b[19],b[20]!==h?(m=(0,s.jsxs)(d.Text,{fontSize:"xs",color:"fg.subtle",children:["$",h,"/cr"]}),b[20]=h,b[21]=m):m=b[21],b[22]!==T||b[23]!==P||b[24]!==C?(g=P?C?(0,s.jsx)(N.Jf,{w:"full",h:"11",fontSize:"sm",onClick:T,children:"Buy now"}):(0,s.jsx)(N.a6,{w:"full",h:"11",fontSize:"sm",onClick:T,_hover:{bg:"rgba(221,186,94,0.08)",borderColor:"border.hover"},children:"Select"}):null,b[22]=T,b[23]=P,b[24]=C,b[25]=g):g=b[25],b[26]!==l||b[27]!==u||b[28]!==m||b[29]!==g||b[30]!==t?(x=(0,s.jsxs)(j.Stack,{gap:3,children:[t,l,u,m,g]}),b[26]=l,b[27]=u,b[28]=m,b[29]=g,b[30]=t,b[31]=x):x=b[31],b[32]!==x||b[33]!==F||b[34]!==E||b[35]!==n||b[36]!==r?(p=(0,s.jsxs)(f.Box,{position:"relative",borderRadius:"surface",borderWidth:"1px",borderColor:F,bg:L.$M,p:5,boxSh
1adow:E,transition:"border-color 150ms ease, transform 150ms ease",_hover:n,children:[r,x]}),b[32]=x,b[33]=F,b[34]=E,b[35]=n,b[36]=r,b[37]=p):p=b[37],p}var q=r(59298),K=["pack500","pack1050","pack2750","pack5750","pack12000"],O={pack500:{name:"$5"},pack1050:{name:"$10"},pack2750:{name:"$25",badge:"Recommended",recommended:!0},pack5750:{name:"$50"},pack12000:{name:"$100",badge:"Best value"}};function X(e){var n,r,t,o,i,a=(0,c.c)(13),l=e.onSelect,u=e.withHeader,h=e.purchasable,m=void 0===u||u,g=void 0===h||h;return a[0]!==m?(n=m&&(0,s.jsxs)(j.Stack,{gap:1,children:[(0,s.jsx)(d.Text,{fontFamily:"heading",fontWeight:"semibold",fontSize:"2xl",color:"fg",children:"Add credits"}),(0,s.jsx)(d.Text,{fontSize:"sm",color:"fg.muted",children:"Buy once, keep forever. Larger packs include a bigger bonus."})]}),a[0]=m,a[1]=n):n=a[1],a[2]!==l||a[3]!==g?(r=K.map(function(e){var n=q.N[e],r=O[e];return(0,s.jsx)($,{name:r.name,credits:n.credits,priceCents:n.priceCents,badge:r.badge,recommended:r.recommended,onSelect:function(){return l(e)},purchasable:g},e)}),a[2]=l,a[3]=g,a[4]=r):r=a[4],a[5]!==r?(t=(0,s.jsx)(b.SimpleGrid,{minChildWidth:"185px",gap:4,children:r}),a[5]=r,a[6]=t):t=a[6],a[7]!==m?(o=m&&(0,s.jsx)(d.Text,{fontSize:"xs",color:"fg.subtle",children:"Purchased credits never expire. 1 credit = $0.01. All sales final."}),a[7]=m,a[8]=o):o=a[8],a[9]!==n||a[10]!==t||a[11]!==o?(i=(0,s.jsxs)(j.Stack,{gap:5,children:[n,t,o]}),a[9]=n,a[10]=t,a[11]=o,a[12]=i):i=a[12],i}function G(e){var n,r,t,o,i=(0,c.c)(7),a=e.onSelect,l=e.purchasable,u=void 0===l||l;return i[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(J,{}),i[0]=n):n=i[0],i[1]!==a||i[2]!==u?(r=(0,s.jsx)(f.Box,{w:"full",maxW:"5xl",mx:"auto",children:(0,s.jsx)(X,{onSelect:a,withHeader:!1,purchasable:u})}),i[1]=a,i[2]=u,i[3]=r):r=i[3],i[4]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsxs)(d.Text,{fontFamily:"heading",fontSize:"xs",color:"fg.subtle",textAlign:"center",children:["Purchased credits never expire. All sales final. For duplicate charges or processing errors,"," ",(0,s.jsx)(p.Link,{href:"mailto:[email protected]",color:"fg.muted",fontWeight:"medium",textDecoration:"underline",children:"contact us"}),"."]}),i[4]=t):t=i[4],i[5]!==r?(o=(0,s.jsxs)(j.Stack,{gap:8,children:[n,r,t]}),i[5]=r,i[6]=o):o=i[6],o}function J(){var e,n,r,t=(0,c.c)(3);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsxs)(x.HStack,{gap:3,justify:"center",align:"center",fontSize:"xs",fontWeight:"medium",letterSpacing:"label-wide",color:"brand.fg",children:[(0,s.jsx)(f.Box,{w:"7",h:"0.5",bg:"brand.border"}),(0,s.jsx)(d.Text,{as:"span",children:"Pay-as-you-go"}),(0,s.jsx)(f.Box,{w:"7",h:"0.5",bg:"brand.border"})]}),t[0]=e):e=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(g.Heading,{as:"h2",fontFamily:"heading",fontSize:{base:"4xl",md:"5xl"},fontWeight:"medium",letterSpacing:"tight-em",lineHeight:"none",color:"fg",children:"Credits."}),t[1]=n):n=t[1],t[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,s.jsxs)(j.Stack,{gap:4,textAlign:"center",maxW:"2xl",mx:"auto",children:[e,n,(0,s.jsx)(d.Text,{fontFamily:"heading",fontSize:{base:"md",md:"lg"},color:"fg.muted",lineHeight:"base",maxW:"lg",mx:"auto",children:"Credits buy add-on usage for heavier features, stack on with your tier allowance. Purchased credits never expire."})]}),t[2]=r):r=t[2],r}var V=r(21370),Z=r(6755),Q={FREE:{positioning:"No card, no commitment.",features:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"10 messages"})," / day"]}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"1 document"})," per chat"]}),(0,s.jsx)(s.Fragment,{children:"Vision and web research"})],cta:"Start free"},STANDARD:{positioning:"Everyday use, with memory.",features:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"50 messages"})," / day"]}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"5 documents"})," per chat"]}),(0,s.jsx)(s.Fragment,{children:"Memory, transcription, sandbox"})],cta:"Switch to Standard"},PRO:{positioning:"For heavy daily use.",features:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"150 messages"})," / day"]}),(0,s.jsx)(s.Fragment,{children:"Premium export"}),(0,s.jsx)(s.Fragment,{children:"Everything in Standard"})],cta:"Upgrade to Pro"},MAX:{positioning:"No cap on messaging.",features:[(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{children:"Unlimited"})," messages"]}
1),(0,s.jsx)(s.Fragment,{children:"Highest daily credits"}),(0,s.jsx)(s.Fragment,{children:"Everything in Pro"})],cta:"Upgrade to Max"}};function ee(){var e=document.getElementById("compare");e&&e.scrollIntoView({behavior:"smooth",block:"start"})}function en(e){var n,r,o,i,m,g,x,f=(0,c.c)(21),p=e.tier,b=e.onSuccess,j=e.onCancel,y=(0,z.t2)(),S=(0,z.HH)(),v=(0,a._)((0,k.useState)(null),2),w=v[0],C=v[1],T=(0,a._)((0,k.useState)(!1),2),_=T[0],P=T[1];f[0]!==S||f[1]!==b||f[2]!==y?(n=function(e){return(0,t._)(function(){var n;return(0,l.YH)(this,function(r){switch(r.label){case 0:if(e.preventDefault(),!y||!S)return[2];return P(!0),C(null),[4,y.confirmPayment({elements:S,confirmParams:{return_url:"".concat(window.location.origin,"/dashboard?subscribed=true")},redirect:"if_required"})];case 1:return(n=r.sent().error)?(C(n.message||"Payment failed"),P(!1)):b(),[2]}})})()},f[0]=S,f[1]=b,f[2]=y,f[3]=n):n=f[3];var F=n;f[4]===Symbol.for("react.memo_cache_sentinel")?(r=(0,s.jsx)(z.He,{options:{layout:"tabs"}}),f[4]=r):r=f[4],f[5]!==w?(o=w&&(0,s.jsx)(d.Text,{color:"red.400",fontSize:"sm",mt:3,children:w}),f[5]=w,f[6]=o):o=f[6];var E=!y||_,W="Subscribe to ".concat(p);return f[7]!==_||f[8]!==E||f[9]!==W?(i=(0,s.jsx)(N.Jf,{type:"submit",disabled:E,loading:_,loadingText:"Processing...",flex:1,children:W}),f[7]=_,f[8]=E,f[9]=W,f[10]=i):i=f[10],f[11]!==j||f[12]!==_?(m=(0,s.jsx)(u.Button,{variant:"ghost",color:"fg.muted",onClick:j,disabled:_,children:"Back"}),f[11]=j,f[12]=_,f[13]=m):m=f[13],f[14]!==i||f[15]!==m?(g=(0,s.jsxs)(h.Flex,{gap:3,mt:4,children:[i,m]}),f[14]=i,f[15]=m,f[16]=g):g=f[16],f[17]!==F||f[18]!==o||f[19]!==g?(x=(0,s.jsxs)("form",{onSubmit:F,children:[r,o,g]}),f[17]=F,f[18]=o,f[19]=g,f[20]=x):x=f[20],x}function er(e){var n,r,c,v,w=e.isAuthenticated,z=e.initialCurrentTier,D=e.initialSubscription,Y=e.initialCrypto,L=e.railsLabel,$=e.editorialHeader,q=e.comparisonTable,K=e.faq,O=e.reservePanel,X=(0,T.useRouter)(),J=(0,T.useSearchParams)(),er=_.y.useSession().data,et=(0,a._)((0,k.useState)(D),2),ei=et[0],ea=et[1],el=(0,a._)((0,k.useState)(null),2),es=el[0],ec=el[1],ed=(0,a._)((0,k.useState)(0),2),eu=ed[0],eh=ed[1],em=(0,a._)((0,k.useState)(null),2),eg=em[0],ex=em[1],ef=(0,a._)((0,k.useState)(null),2),ep=ef[0],eb=ef[1],ej=(0,a._)((0,k.useState)("paid"),2),ey=ej[0],eS=ej[1],ev=(0,a._)((0,k.useState)(!1),2),ew=ev[0],ek=ev[1],eC=(0,a._)((0,k.useState)(null),2),eT=eC[0],e_=eC[1],eP=(0,a._)((0,k.useState)(!1),2),ez=eP[0],eF=eP[1],eE=(0,Z.Lo)(function(e){return e.creditTopUpOpen}),eW=(0,Z.Lo)(function(e){return e.setCreditTopUpOpen}),eB=(0,Z.Lo)(function(e){return e.openCreditTopUp}),eR=(0,Z.Lo)(function(e){return e.openSubscribe}),eA=(0,Z.Lo)(function(e){return e.openCryptoRenewal}),eH=null!=(n=null==Y?void 0:Y.prepaidTier)?n:null,eD=(null==Y?void 0:Y.lockedUntil)?new Date(Y.lockedUntil):null;(0,k.useEffect)(function(){var e=J.get("tier");if(e&&w){var n=E.KM.find(function(n){return n.tier===e.toUpperCase()});if(n){if(null!=eD&&n.tier!==eH&&n.tier!==z&&"FREE"!==n.tier)return void eR(n.tier);ex(n),eh(1)}}},[]);var eY=function(e){if(!w||null===er)return void X.push("/signup?redirect=/pricing&tier=".concat(encodeURIComponent(e.tier)));if((null==ei?void 0:ei.status)==="active"&&z&&"FREE"!==z){ex(e),ec(null),eh(1);return}"FREE"!==e.tier?eR(e.tier):(ex(e),ec(null),eh(1))},eI=function(e){return(0,t._)(function(){var n,r,t,o;return(0,l.YH)(this,function(i){switch(i.label){case 0:if(!eg)return[2];if(!w||null===er)return X.push("/signup?redirect=/pricing&tier=".concat(encodeURIComponent(eg.tier))),[2];ek(!0),ec(null),i.label=1;case 1:return i.trys.push([1,4,5,6]),[4,fetch("/api/subscriptions/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e?{tier:eg.tier,confirmedUpgrade:e}:{tier:eg.tier})})];case 2:return[4,(n=i.sent()).json()];case 3:if(r=i.sent(),!n.ok){if("confirm_required"===r.code&&"string"==typeof r.error&&"string"==typeof r.fromPriceId&&"boolean"==typeof r.cancelAtPeriodEnd)return e_(t={summary:r.error,fromPriceId:r.fromPriceId,cancelAtPeriodEnd:r.cancelAtPeriodEnd,fromTier:"string"==typeof r.fromTier?r.fromTier:null,direction:"downgrade"===r.direction||"upgrade"===r.direction?r.direction:"unknown",intent:"keep_running"===r.intent?"keep_running":"change_plan",prorationCents:"number"==typeof r.prorationCents?r.prorationCents:null,prorationDate:"number"==typeof r.prorationDate?r.prorationDate:null}),eh(4),!0!==r.stale&&!1===r.cancelAtPeriodEnd&&null===t.prorationCents&&null!==t.fromTier&&t.fromTier===z&&r.toTier===eg.tier&&eI({fromPriceId:t.fromPriceId,toTier:eg.tier,cancelAtPeriodEnd:t.cancelAtPeriodEnd,prorationDate:t.prorationDate}),[2];return ec({message:r.error||"Something went wrong.",code:r.code,offerBillingPortal:!0===r.offerBillingPortal}),[2]}return"updated"===r.type?(eS((0,C.A)(r)),eh(3),!1===r.pending?(I.X.create({title:"Already on this plan",description:"Your account is on this plan at your card provider.",type:"success"}),(0,P.u)()):(I.X.create({title:"Plan updated",description:"Your new plan is being activated.",type:"success"}),o=eg.tier,(0,P.M)(function(e){return e.subscriptionTier===o}))):"checkout"===r.type&&r.clientSecret&&(eb(r.clientSecret),eh(2)),[3,6];case 4:return i.sent(),ec({message:"Network error. Please try again."}),[3,6];case 5:return ek(!1),[7];case 6:return[2]}})})()},eN=function(){eh(0),ex(null),eb(null),ec(null),e_(null)},eU=eg?E.AK[eg.tier]:null,eM=eT&&"unknown"!==eT.direction?eT.direction:eg&&eg.price>(null!=(r=null==(c=E.KM.find(function(e){return e.tier===z}))?void 0:c.price)?r:0)?"upgrade":"downgrade";return(0,s.jsxs)(s.Fragment,{children:[0===eu?$:(0,s.jsx)(m.T,{gap:8,mb:8,children:(0,s.jsx)(g.Heading,{size:"2xl",color:"fg",children:3===eu?"Welcome Aboard":"Pricing."})}),eu>0&&eu<3&&(0,s.jsx)(h.Flex,{justify:"center",mb:8,children:(0,s.jsx)(x.HStack,{gap:2,children:["Plan","Confirm","Payment"].map(function(e,n){return(0,s.jsxs)(x.HStack,{gap:2,children:[(0,s.jsx)(h.Flex,{w:"7",h:"7",borderRadius:"full",bg:n<=eu?"brand.muted":"bg.active",border:"2px s
1olid",borderColor:n<=eu?"brand.solid":"border",align:"center",justify:"center",fontSize:"xs",fontWeight:"bold",color:n<=eu?"brand.fg":"fg.subtle",children:n<eu?(0,s.jsx)(R.A,{size:14}):n+1}),(0,s.jsx)(d.Text,{fontSize:"xs",color:n<=eu?"fg.muted":"fg.subtle",children:e}),n<2&&(0,s.jsx)(f.Box,{w:"8",h:"0.5",bg:n<eu?"brand.solid":"border",borderRadius:"full"})]},e)})})}),es&&(0,s.jsxs)(f.Box,{mb:6,p:4,bg:"red.900/30",border:"1px solid",borderColor:"red.600",borderRadius:"lg",textAlign:"center",children:[(0,s.jsx)(d.Text,{color:"red.300",children:es.message}),es.offerBillingPortal&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(M.q,{align:"center"}),(0,s.jsx)(p.Link,{href:"mailto:[email protected]",fontSize:"sm",fontWeight:"medium",color:"red.200",display:"inline-block",mt:2,children:"Contact support"})]})]}),0===eu&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b.SimpleGrid,{columns:{base:1,md:2,lg:4},gap:{base:4,md:3.5},mb:{base:10,md:12},alignItems:"stretch",children:E.KM.map(function(e){var n,r=z===e.tier,t="PRO"===e.tier,o=E.KM.findIndex(function(e){return e.tier===z}),i=E.KM.findIndex(function(n){return n.tier===e.tier}),a=z&&i>o,l=z&&i<o&&"FREE"!==e.tier,c=Q[e.tier],h=w?a?"Upgrade":l?"Switch to ".concat(e.name):c.cta:"FREE"===e.tier?c.cta:"Sign up";return(0,s.jsxs)(j.Stack,{gap:4,px:6,py:t?7:6,pt:t?8:6,bg:"bg.panel",border:"1px solid",borderColor:t?"brand.border":r?"accent.border":"border",borderRadius:"xl",h:"100%",position:"relative",mt:{base:0,md:t?-5:0},boxShadow:t?"0 0 0 1px color-mix(in oklab, var(--chakra-colors-brand-solid) 8%, transparent), 0 24px 48px -12px color-mix(in oklab, var(--chakra-colors-brand-solid) 18%, transparent), 0 8px 24px rgba(0,0,0,0.4)":void 0,backgroundImage:t?"radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--chakra-colors-brand-solid) 14%, transparent), transparent 70%)":r?"radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--chakra-colors-gold-500) 10%, transparent), transparent 70%)":void 0,transition:"border-color {durations.medium} {easings.standard}, transform {durations.medium} {easings.standard}",_hover:t||r?void 0:{borderColor:"border.strong",transform:"translateY(-2px)"},children:[t&&(0,s.jsx)(y.Ex,{position:"absolute",top:"-11px",left:"50%",transform:"translateX(-50%)",bg:"brand.solid",color:"brand.contrast",fontSize:"xs",letterSpacing:"widest",fontWeight:"semibold",px:2.5,py:1,borderRadius:"full",whiteSpace:"nowrap",children:"Recommended"}),r&&!t&&(0,s.jsx)(y.Ex,{position:"absolute",top:"-11px",left:"50%",transform:"translateX(-50%)",bg:"accent.solid",color:"accent.onSolid",fontSize:"xs",letterSpacing:"widest",fontWeight:"semibold",px:2.5,py:1,borderRadius:"full",whiteSpace:"nowrap",children:"Current"}),(0,s.jsx)(d.Text,{fontSize:"xs",letterSpacing:"widest",color:t?"brand.fg":r?"accent.fg":"fg.subtle",children:e.name}),(0,s.jsxs)(x.HStack,{gap:1.5,align:"baseline",children:[(0,s.jsxs)(g.Heading,{as:"div",fontFamily:"heading",fontSize:"6xl",fontWeight:"medium",letterSpacing:"tight",lineHeight:"1",color:"fg",children:["$",e.price]}),(0,s.jsx)(d.Text,{fontFamily:"heading",fontStyle:"italic",fontSize:"sm",color:"fg.subtle",children:0===e.price?"forever":"/ month"})]}),(0,s.jsxs)(x.HStack,{gap:2,align:"baseline",children:[(0,s.jsx)(d.Text,{fontSize:"xl",fontWeight:"bold",color:"credit.gold",lineHeight:"1",children:E.AK[e.tier].creditStipend}),(0,s.jsx)(d.Text,{fontSize:"xs",fontWeight:"medium",letterSpacing:"label",color:"fg.muted",children:"credits / day"})]}),(0,s.jsx)(d.Text,{fontFamily:"heading",fontStyle:"italic",fontSize:"md",color:"fg",lineHeight:"1.4",minH:"11",children:c.positioning}),(0,s.jsx)(f.Box,{h:"0.5",bg:"border",mx:-1}),(0,s.jsx)(j.Stack,{as:"ul",gap:2,flex:1,listStyleType:"none",m:0,p:0,children:c.features.map(function(e,n){return(0,s.jsxs)(x.HStack,{as:"li",gap:2.5,align:"baseline",fontSize:"sm",color:"fg.muted",lineHeight:"1.45",children:[(0,s.jsx)(d.Text,{as:"span",fontSize:"xs",fontWeight:"semibold",color:"accent.fg",flexShrink:0,w:"3",children:"\xb7"}),(0,s.jsx)(d.Text,{as:"span",css:{"& strong":{color:"var(--chakra-colors-fg)",fontWeight:500}},children:e})]},n)})}),(0,s.jsx)(f.Box,{mt:2,children:eH===e.tier&&(r||null!=eD)?(0,s.jsxs)(N.a6,{w:"100%",onClick:function(){return eA(e.tier)},children:["Renew ",e.name]}):(n=e.tier,null!=eD&&n!==eH&&n!==z&&"FREE"!==n)?(0,s.jsx)(N.a6,{w:"100%",onClick:function(){return eY(e)},children:"Set as next renewal"}):r?(0,s.jsx)(u.Button,{w:"100%",variant:"outline",borderStyle:"dashed",borderColor:"accent.border",color:"accent.fg",bg:"transparent",disabled:!0,_disabled:{borderColor:"accent.border",color:"accent.fg",opacity:1,cursor:"default"},children:"Current plan"}):"FREE"===e.tier&&z&&"FREE"!==z?(0,s.jsx)(U.k,{href:"/dashboard",display:"flex",alignItems:"center",justifyContent:"center",w:"100%",h:"10",borderWidth:"1px",borderRadius:"md",borderColor:"border.strong",color:"fg.muted",fontSize:"sm",_hover:{bg:"bg.muted",color:"fg"},children:"Manage from dashboard"}):"FREE"!==e.tier||z?t?(0,s.jsx)(N.Jf,{w:"100%",onClick:function(){return eY(e)},children:h}):(0,s.jsx)(N.a6,{w:"100%",onClick:function(){return eY(e)},children:h}):(0,s.jsx)(u.Button,{w:"100%",variant:"outline",borderColor:"border.strong",color:"fg",_hover:{bg:"bg.muted",borderColor:"fg.subtle"},onClick:function(){return eY(e)},children:h})})]},e.tier)})}),(0,s.jsxs)(d.Text,{mt:"4.5",textAlign:"center",fontSize:"xs",color:"fg.subtle",letterSpacing:"label",children:[L,"."," ",eD?"You are on the crypto plan.":"Choose at checkout."]}),(0,s.jsx)(d.Text,{mt:"1.5",textAlign:"center",fontSize:"sm",color:"fg.muted",children:eD?"Same plan, same price, whichever you use.":"Same plan, same price, either way."}),(null==ei?void 0:ei.cancelAtPeriodEnd)&&(0,s.jsx)(f.Box,{mb:8,p:4,bg:"bg.warning",border:"1px solid",borderColor:"border.warning",borderRadius:"lg",textAlign:"center",children:(0,s.jsxs)(d.Text,{color:"fg.warning",children:["Your subscription ends"," ",new Date(ei.currentPeriodEnd).toLocaleDateString("en-US",{timeZone:"UTC"}),"."," ",(0,s.jsx)(u.Button,{variant:"plain",color:"fg.warning",textDecoration:"underline",onClick:function(){return eF(!0)},p:0,h:"auto",minW:0,children:"Reactivate"})]})}),(0,s.jsx)(f.Box,{pt:{base:14,md:18},mb:{base:14,md:18}
1,children:(0,s.jsx)(G,{onSelect:function(e){w&&null!==er?eB(e):X.push("/signup?redirect=/pricing")},purchasable:w})}),(0,s.jsx)(h.Flex,{justify:"center",mb:{base:14,md:18},children:(0,s.jsxs)(u.Button,{onClick:ee,variant:"ghost",color:"fg.muted",fontSize:"sm",fontWeight:"medium",_hover:{color:"fg",bg:"bg.muted"},transition:"color {durations.medium} {easings.standard}, background-color {durations.medium} {easings.standard}",children:["Compare all features",(0,s.jsx)(A.A,{size:16,style:{marginLeft:6}})]})}),q,void 0===O?null:O,K]}),1===eu&&eg&&eU&&(0,s.jsx)(f.Box,{maxW:"md",mx:"auto",children:(0,s.jsx)(S.CardRoot,{children:(0,s.jsx)(S.CardBody,{children:(0,s.jsxs)(m.T,{gap:5,align:"start",children:[(0,s.jsxs)(f.Box,{children:[(0,s.jsx)(d.Text,{color:"fg.subtle",fontSize:"xs",letterSpacing:"wider",children:"You selected"}),(0,s.jsx)(g.Heading,{size:"xl",color:"fg",children:eg.name})]}),(0,s.jsxs)(x.HStack,{align:"baseline",children:[(0,s.jsxs)(d.Text,{fontSize:"4xl",fontWeight:"bold",color:"fg",children:["$",eg.price]}),(0,s.jsx)(d.Text,{color:"fg.subtle",fontSize:"sm",children:"/month"})]}),(0,s.jsx)(m.T,{align:"start",gap:2,w:"100%",children:[{label:"Messages \xb7 ".concat(-1===eU.messagesPerDay?"Unlimited":"".concat(eU.messagesPerDay,"/day")),included:!0},{label:"Studio credits \xb7 ".concat(eU.creditStipend,"/day"),included:!0},{label:-1===eU.maxConversations?"Conversations \xb7 Unlimited":"Conversations \xb7 ".concat(eU.maxConversations),included:!0},{label:"Vision support",included:!0},{label:"Long-term memory",included:eU.maxContextChars>0},{label:"Code execution",included:eU.hasSandbox},{label:"Documents \xb7 ".concat(eU.maxDocumentsPerConversation," per chat"),included:eU.hasDocuments},{label:"Transcription",included:eU.hasTranscription},{label:"Temporary chat",included:eU.hasTemporaryChat},{label:"Priority queue",included:"FREE"!==eg.tier}].sort(function(e,n){return e.included===n.included?0:e.included?-1:1}).map(function(e){return(0,s.jsx)(eo,{label:e.label,included:e.included},e.label)})}),(0,s.jsxs)(f.Box,{w:"100%",pt:2,borderTop:"1px solid",borderColor:"border.subtle",children:[(0,s.jsxs)(h.Flex,{justify:"space-between",align:"center",mb:4,children:[(0,s.jsx)(d.Text,{color:"fg.muted",fontSize:"sm",children:"Billed monthly"}),(0,s.jsxs)(d.Text,{color:"fg",fontWeight:"bold",fontSize:"lg",children:["$",eg.price,"/mo"]})]}),(0,s.jsx)(u.Button,{w:"100%",colorPalette:"brand",onClick:z&&"FREE"!==z?function(){return eh(4)}:function(){return eI(null)},disabled:ew,loading:ew,loadingText:"Setting up payment...",children:"Continue"}),(0,s.jsxs)(u.Button,{w:"100%",variant:"ghost",color:"fg.subtle",mt:2,onClick:eN,children:[(0,s.jsx)(H.A,{size:14})," Choose a different plan"]})]})]})})})}),2===eu&&ep&&F.AR&&eg&&(0,s.jsx)(f.Box,{maxW:"md",mx:"auto",children:(0,s.jsx)(S.CardRoot,{children:(0,s.jsxs)(S.CardBody,{children:[(0,s.jsx)(h.Flex,{justify:"space-between",align:"center",mb:6,children:(0,s.jsxs)(f.Box,{children:[(0,s.jsx)(d.Text,{color:"fg.subtle",fontSize:"xs",children:"Subscribing to"}),(0,s.jsxs)(d.Text,{color:"fg",fontWeight:"semibold",children:[eg.name,": $",eg.price,"/mo"]})]})}),(0,s.jsx)(F.YP,{clientSecret:ep,children:(0,s.jsx)(en,{tier:eg.name,onSuccess:function(){eS("paid"),eh(3);var e=null==eg?void 0:eg.tier;e&&(0,P.M)(function(n){return n.subscriptionTier===e}).then(function(e){e||I.X.create({title:"Finalizing your upgrade",description:"Your new plan will be active in a moment.",type:"info"})})},onCancel:function(){eh(1),eb(null)}})})]})})}),3===eu&&(0,s.jsx)(f.Box,{maxW:"md",mx:"auto",textAlign:"center",children:(0,s.jsx)(S.CardRoot,{borderColor:"border.success",children:(0,s.jsxs)(S.CardBody,{children:[(0,s.jsx)(h.Flex,{w:"14",h:"14",borderRadius:"full",bg:"green.solid",mx:"auto",mb:4,align:"center",justify:"center",children:(0,s.jsx)(R.A,{size:28,color:"white"})}),(0,s.jsx)(g.Heading,{size:"lg",color:"fg",mb:2,children:"none"===ey?"Already on ".concat(null==eg?void 0:eg.name):"unchanged"===ey?"".concat(null==eg?void 0:eg.name," is staying on"):"You're in!"}),(0,s.jsx)(d.Text,{color:"fg.muted",mb:6,children:"none"===ey?"Nothing was charged. Your plan with your card provider is already ".concat(null==eg?void 0:eg.name,", and our record of it is catching up."):"unchanged"===ey?"Nothing was charged. Your plan is no longer scheduled to end, and it renews as usual from here.":"next_invoice"===ey?"Nothing was charged today. The difference is prorated onto y
1our next invoice, and ".concat(null==eg?void 0:eg.name," is ready when you are."):"Your ".concat(null==eg?void 0:eg.name," subscription is active. Lexi's ready when you are.")}),(0,s.jsx)(U.k,{href:"/chat",_hover:{textDecoration:"none"},children:(0,s.jsx)(u.Button,{bg:"brand.solid",color:"white",_hover:{opacity:.9},w:"100%",children:"Start Chatting"})})]})})}),4===eu&&eg&&(0,s.jsx)(f.Box,{maxW:"md",mx:"auto",children:(0,s.jsx)(S.CardRoot,{textAlign:"center",children:(0,s.jsxs)(S.CardBody,{children:[(0,s.jsx)(g.Heading,{size:"lg",color:"fg",mb:3,children:"Confirm plan change"}),eT?(0,s.jsx)(d.Text,{color:"fg.muted",mb:6,children:eT.summary}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(d.Text,{color:"fg.muted",mb:2,children:["You're changing from"," ",(0,s.jsx)(d.Text,{as:"span",fontWeight:"semibold",color:"fg",children:(null==(v=E.KM.find(function(e){return e.tier===z}))?void 0:v.name)||z})," ","to"," ",(0,s.jsx)(d.Text,{as:"span",fontWeight:"semibold",color:"brand.fg",children:eg.name}),"."]}),(0,s.jsx)(d.Text,{color:"fg.subtle",fontSize:"sm",mb:6,children:"downgrade"===eM?"The difference is prorated and credited to your next invoice.":"The difference is prorated and added to your next invoice."})]}),(0,s.jsx)(N.Jf,{w:"100%",onClick:function(){eh(1),eI(eT?{fromPriceId:eT.fromPriceId,toTier:eg.tier,cancelAtPeriodEnd:eT.cancelAtPeriodEnd,prorationDate:eT.prorationDate}:null)},disabled:ew,loading:ew,loadingText:"Processing...",mb:2,children:(null==eT?void 0:eT.intent)==="keep_running"?"Keep My Plan":"Confirm ".concat("downgrade"===eM?"Downgrade":"Upgrade")}),(0,s.jsx)(u.Button,{w:"100%",variant:"ghost",color:"fg.subtle",onClick:eN,children:"Cancel"})]})})}),(0,s.jsx)(B.i,{open:ez,onClose:function(){return eF(!1)},onConfirm:function(){return(0,t._)(function(){var e;return(0,l.YH)(this,function(n){switch(n.label){case 0:eF(!1),ec(null),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,W.y)()];case 2:if("error"in(e=n.sent()))return I.X.create({title:"Reactivation failed",description:e.error,type:"error"}),[2];return ea(function(e){return e?(0,i._)((0,o._)({},e),{cancelAtPeriodEnd:!1}):e}),I.X.create({title:"Subscription reactivated",description:"Your subscription will continue as normal.",type:"success"}),[3,4];case 3:return n.sent(),ec({message:"Network error."}),[3,4];case 4:return[2]}})})()},tierName:z?(0,E.PN)(z):null,periodEndDate:null==ei?void 0:ei.currentPeriodEnd}),(0,s.jsx)(V.P,{open:eE,onClose:function(){return eW(!1)},entryPoint:"dashboard_buy",currentTier:null!=z?z:"FREE"})]})}var et=E.lC;function eo(e){var n,r,t,o,i=(0,c.c)(12),a=e.label,l=e.included,u=void 0===l||l,m=et[a.split(" \xb7 ")[0]],g=u?1:.5;i[0]!==u?(n=u?(0,s.jsx)(R.A,{size:14,color:"var(--chakra-colors-brand-solid)",style:{flexShrink:0}}):(0,s.jsx)(D.A,{size:14,color:"var(--chakra-colors-fg-error)",style:{flexShrink:0}}),i[0]=u,i[1]=n):n=i[1];var x=u?"fg.muted":"fg.subtle";return i[2]!==a||i[3]!==x?(r=(0,s.jsx)(d.Text,{color:x,fontSize:"sm",children:a}),i[2]=a,i[3]=x,i[4]=r):r=i[4],i[5]!==m?(t=m&&(0,s.jsxs)(v.yt,{positioning:{placement:"top"},children:[(0,s.jsx)(v.Wv,{asChild:!0,children:(0,s.jsx)(f.Box,{as:"span",cursor:"help",style:{flexShrink:0},color:"fg.subtle",_hover:{color:"fg.muted"},children:(0,s.jsx)(Y.A,{size:12})})}),(0,s.jsx)(w.Z,{children:(0,s.jsx)(v.Ug,{children:(0,s.jsx)(v.hl,{layerStyle:"glassSubtle",color:"fg.muted",fontSize:"xs",px:3,py:2,borderRadius:"md",borderColor:"border",border:"1px solid",maxW:"56",boxShadow:"xl",w:"auto",children:m})})})]}),i[5]=m,i[6]=t):t=i[6],i[7]!==g||i[8]!==n||i[9]!==r||i[10]!==t?(o=(0,s.jsxs)(h.Flex,{align:"center",gap:2,opacity:g,children:[n,r,t]}),i[7]=g,i[8]=n,i[9]=r,i[10]=t,i[11]=o):o=i[11],o}},99156:(e,n,r)=>{Promise.resolve().then(r.bind(r,74971)),Promise.resolve().then(r.bind(r,70089)),Promise.resolve().then(r.bind(r,34636)),Promise.resolve().then(r.bind(r,89881)),Promise.resolve().then(r.bind(r,79863)),Promise.resolve().then(r.bind(r,98517)),Promise.resolve().then(r.bind(r,41871)),Promise.resolve().then(r.bind(r,52336)),Promise.resolve().then(r.bind(r,75533)),Promise.resolve().then(r.bind(r,7678))}},e=>{e.O(0,[2150,2362,6351,7227,509,3549,7043,9380,8100,168,7401,682,4468,8673,9952,1945,9970,9554,9407,7067,3497,406,7135,1370,1904,8441,9342,570,7358],()=>e(e.s=99156)),_N_E=e.O()}]);
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.