1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="53b35580-6582-eabf-2d42-1a6fbe3de2c6")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,822995,e=>{"use strict";var t=e.i(322106);let r={name:"credit-card",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}],["path",{d:"M6 14h2",key:"mk7k0u"}]]};r.node;let i=(0,t.default)(r);e.s(["CreditCardIcon",0,i],822995)},646560,e=>{"use strict";var t=e.i(322106);let r={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
2],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};r.node;let i=(0,t.default)(r);e.s(["default",0,i])},106973,e=>{"use strict";var t=e.i(646560);e.s(["SparklesIcon",()=>t.default])},748471,e=>{"use strict";let t;var r=e.i(665553),i=e.i(155579),a=e.i(870080),n=e.i(821422),s=e.i(714418),l=e.i(181091),o=e.i(135130),u=e.i(978218),c=e.i(368501),d=e.i(526319),p=e.i(924844),f=e.i(249872),m=e.i(54797),g=e.i(662813),x=e.i(139104),h=e.i(915173),v=e.i(461651),A=e.i(749814),N=e.i(254728),_=e.i(373585),S=e.i(610254),b=e.i(846916),y=e.i(354134),E=((t=E||{})[t.RegisterOption=0]="RegisterOption",t[t.UnregisterOption=1]="UnregisterOption",t);let L={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:(0,h.sortByDomNode)(r,e=>e.element.current)}},1(e,t){let r=e.options.slice(),i=e.options.findIndex(e=>e.id===t.id);return -1===i?e:(r.splice(i,1),{...e,options:r})}},I=(0,a.createContext)(null);function R(e){let t=(0,a.useContext)(I);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,R),t}return t}I.displayName="RadioGroupDataContext";let P=(0,a.createContext)(null);function T(e){let t=(0,a.useContext)(P);if(null===t){let t=Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,T),t}return t}function C(e,t){return(0,A.match)(t.type,L,e,t)}P.displayName="RadioGroupActionsContext";let w=(0,_.forwardRefWithAs)(function(e,t){let r=(0,a.useId)(),i=(0,f.useDisabled)(),{id:u=`headlessui-radiogroup-${r}`,value:c,form:g,name:x,onChange:A,by:E,disabled:L=i||!1,defaultValue:R,tabIndex:T=0,...w}=e,j=(0,n.useByComparator)(E),[U,D]=(0,a.useReducer)(C,{options:[]}),O=U.options,[B,k]=(0,y.useLabels)(),[M,Y]=(0,S.useDescriptions)(),F=(0,a.useRef)(null),H=(0,p.useSyncRefs)(F,t),G=(0,l.useDefaultValue)(R),[K,W]=(0,s.useControllable)(c,A,G),X=(0,a.useMemo)(()=>O.find(e=>!e.propsRef.current.disabled),[O]),q=(0,a.useMemo)(()=>O.some(e=>j(e.propsRef.current.value,K)),[O,K]),z=(0,o.useEvent)(e=>{var t;if(L||j(e,K))return!1;let r=null==(t=O.find(t=>j(t.propsRef.current.value,e)))?void 0:t.propsRef.current;return(null==r||!r.disabled)&&(null==W||W(e),!0)}),V=(0,o.useEvent)(e=>{if(!F.current)return;let t=O.filter(e=>!1===e.propsRef.current.disabled).map(e=>e.element.current);switch(e.key){case b.Keys.Enter:(0,v.attemptSubmit)(e.currentTarget);break;case b.Keys.ArrowLeft:case b.Keys.ArrowUp:if(e.preventDefault(),e.stopPropagation(),(0,h.focusIn)(t,h.Focus.Previous|h.Focus.WrapAround)===h.FocusResult.Success){let e=O.find(e=>(0,N.isActiveElement)(e.element.current));e&&z(e.propsRef.current.value)}break;case b.Keys.ArrowRight:case b.Keys.ArrowDown:if(e.preventDefault(),e.stopPropagation(),(0,h.focusIn)(t,h.Focus.Next|h.Focus.WrapAround)===h.FocusResult.Success){let e=O.find(e=>(0,N.isActiveElement)(e.element.current));e&&z(e.propsRef.current.value)}break;case b.Keys.Space:{e.preventDefault(),e.stopPropagation();let t=O.find(e=>(0,N.isActiveElement)(e.element.current));t&&z(t.propsRef.current.value)}}}),Z=(0,o.useEvent)(e=>(D({type:0,...e}),()=>D({type:1,id:e.id}))),$=(0,a.useMemo)(()=>({value:K,firstOption:X,containsCheckedOption:q,disabled:L,compare:j,tabIndex:T,...U}),[K,X,q,L,j,T,U]),Q=(0,a.useMemo)(()=>({registerOption:Z,change:z}),[Z,z]),J=(0,d.useSlot)({value:K}),ee=(0,a.useCallback)(()=>{if(void 0!==G)return z(G)},[z,G]),et=(0,_.useRender)();return a.default.createElement(Y,{name:"RadioGroup.Description"},a.default.createElement(k,{name:"RadioGroup.Label"},a.default.createElement(P.Provider,{value:Q},a.default.createElement(I.Provider,{value:$},null!=x&&a.default.createElement(m.FormFields,{disabled:L,data:{[x]:K||"on"},overrides:{type:"radio",checked:null!=K},form:g,onReset:ee}),et({ourProps:{ref:H,id:u,role:"radiogroup","aria-labelledby":B,"aria-describedby":M,onKeyDown:V},theirProps:w,slot:J,defaultTag:"div",name:"RadioGroup"})))))}),j=(0,_.forwardRefWithAs)(function(e,t){var n;let s=R("RadioGroup.Option"),l=T("RadioGroup.Option"),f=(0,a.useId)(),{id:m=`headlessui-radiogroup-option-${f}`,value:g,disabled:h=s.disabled||!1,autoFocus:v=!1,...A}=e,N=(0,a.useRef)(null),b=(0,p.useSyncRefs)(N,t),[E,L]=(0,y.useLabels)(),[I,P]=(0,S.useDescriptions)(),C=(0,c.useLatestValue)({value:g,disabled:h});(0,u.useIsoMorphicEffect)(()=>l.registerOption({id:m,element:N,propsRef:C}),[m,l,N,C]);let w=(0,o.useEvent)(e=>{var t;if((0,x.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();
2l.change(g)&&(null==(t=N.current)||t.focus())}),j=(null==(n=s.firstOption)?void 0:n.id)===m,{isFocusVisible:U,focusProps:D}=(0,r.useFocusRing)({autoFocus:v}),{isHovered:O,hoverProps:B}=(0,i.useHover)({isDisabled:h}),k=s.compare(s.value,g),M=(0,_.mergeProps)({ref:b,id:m,role:"radio","aria-checked":k?"true":"false","aria-labelledby":E,"aria-describedby":I,"aria-disabled":!!h||void 0,tabIndex:h?-1:k||!s.containsCheckedOption&&j?s.tabIndex:-1,onClick:h?void 0:w,autoFocus:v},D,B),Y=(0,d.useSlot)({checked:k,disabled:h,active:U,hover:O,focus:U,autofocus:v}),F=(0,_.useRender)();return a.default.createElement(P,{name:"RadioGroup.Description"},a.default.createElement(L,{name:"RadioGroup.Label"},F({ourProps:M,theirProps:A,slot:Y,defaultTag:"div",name:"RadioGroup.Option"})))}),U=(0,_.forwardRefWithAs)(function(e,t){var n;let s=R("Radio"),l=T("Radio"),m=(0,a.useId)(),h=(0,g.useProvidedId)(),v=(0,f.useDisabled)(),{id:A=h||`headlessui-radio-${m}`,value:N,disabled:b=s.disabled||v||!1,autoFocus:E=!1,...L}=e,I=(0,a.useRef)(null),P=(0,p.useSyncRefs)(I,t),C=(0,y.useLabelledBy)(),w=(0,S.useDescribedBy)(),j=(0,c.useLatestValue)({value:N,disabled:b});(0,u.useIsoMorphicEffect)(()=>l.registerOption({id:A,element:I,propsRef:j}),[A,l,I,j]);let U=(0,o.useEvent)(e=>{var t;if((0,x.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();l.change(N)&&(null==(t=I.current)||t.focus())}),{isFocusVisible:D,focusProps:O}=(0,r.useFocusRing)({autoFocus:E}),{isHovered:B,hoverProps:k}=(0,i.useHover)({isDisabled:b}),M=(null==(n=s.firstOption)?void 0:n.id)===A,Y=s.compare(s.value,N),F=(0,_.mergeProps)({ref:P,id:A,role:"radio","aria-checked":Y?"true":"false","aria-labelledby":C,"aria-describedby":w,"aria-disabled":!!b||void 0,tabIndex:b?-1:Y||!s.containsCheckedOption&&M?s.tabIndex:-1,autoFocus:E,onClick:b?void 0:U},O,k),H=(0,d.useSlot)({checked:Y,disabled:b,hover:B,focus:D,autofocus:E});return(0,_.useRender)()({ourProps:F,theirProps:L,slot:H,defaultTag:"span",name:"Radio"})}),D=Object.assign(w,{Option:j,Radio:U,Label:y.Label,Description:S.Description});e.s(["Radio",0,U,"RadioGroup",0,D])},958143,389873,e=>{"use strict";var t=e.i(764362),r=e.i(870080),i=e.i(822995),a=e.i(228961),n=e.i(449907),s=e.i(466691),l=e.i(935308),o=e.i(246342),u=e.i(966970);let c=(0,u.createServerReference)("7fbaf625d81927653ac712345e34164cee9bd392ab",u.callServer,void 0,u.findSourceMapURL,"getBillingPortalUrlAction");e.s(["getBillingPortalUrlAction",0,c],389873);var d=e.i(97021),p=e.i(873521);function f(){let[e,t]=(0,r.useState)(!1);return{loading:e,openBillingPortal:async()=>{t(!0);let e=await c({});t(!1);let r=e?.data?.url;e?.serverError||!r?(0,l.toastError)({description:e?.serverError||"Error loading billing portal. Please contact support."}):(0,p.redirectToSafeUrl)(r,{allowExternal:!0})}}}e.s(["ManageSubscription",0,function({premium:e}){let{loading:r,openBillingPortal:l}=f(),u=(0,d.hasActiveAppleSubscription)(e?.appleExpiresAt||null,e?.appleRevokedAt||null,e?.appleSubscriptionStatus||null),c=!!(e?.stripeSubscriptionId&&e?.lemonSqueezyCustomerId);return(0,t.jsxs)(t.Fragment,{children:[e?.stripeSubscriptionStatus==="trialing"&&(0,t.jsx)(o.EndTrialButton,{variant:"outline"}),e?.stripeSubscriptionId&&(0,t.jsxs)(s.Button,{loading:r,onClick:l,children:[(0,t.jsx)(i.CreditCardIcon,{className:"mr-2 h-4 w-4"}),"Manage",c?" Stripe":""," subscription"]}),e?.lemonSqueezyCustomerId&&(0,t.jsx)(s.Button,{asChild:!0,children:(0,t.jsxs)(a.default,{href:`https://${n.env.NEXT_PUBLIC_LEMON_STORE_ID}.lemonsqueezy.com/billing`,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(i.CreditCardIcon,{className:"mr-2 h-4 w-4"}),"Manage",c?" Lemon":""," subscription"]})}),u&&(0,t.jsx)(s.Button,{asChild:!0,variant:"outline",children:(0,t.jsxs)(a.default,{href:"https://support.apple.com/en-us/118428",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(i.CreditCardIcon,{className:"mr-2 h-4 w-4"}),"Manage in App Store"]})})]})},"ViewInvoicesButton",0,function({premium:{stripeCustomerId:e,lemonSqueezyCustomerId:r}}){let{loading:i,openBillingPortal:l}=f();if(!e&&!r)return null;let o=!!(e&&r);return(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(s.Button,{variant:"link",size:"sm",loading:i,onClick:l,children:o?"Stripe invoices":"Invoices"}),r&&(0,t.jsx)(s.Button,{asChild:!0,variant:"link",size:"sm",children:(0,t.jsx)(a.default,{href:`https://${n.env.NEXT_PUBLIC_LEMON_STORE_ID}.lemonsqueezy.com/billing`,target:"_blank",rel:"noopener noreferrer",children:o?"Lemon invoices":"Invoices"})})]})}],958143)},164013,e=>{"use strict";var t=e.i(764362),r=e.i(870080),i=e.i(195955),a=e.i(841285),n=e.i(683951),s=e.i(106973),l=e.i(228961),o=e.i(278321),u=e.i(449907),c=e.i(421207),d=e.i(443901),p=e.i(160171),f=e.i(466691),m=e.i(50862),g=e.i(97021),x=e.i(429080),h=e.i(604932),v=e.i(816718),A=e.i(935308),N=e.i(313952),_=e.i(389873),S=e.i(850062),b=e.i(452675),y=e.i(958143),E=e.i(335711),L=e.i(873521);function I({tier:e,userPremiumTier:a,frequency:s,defaultFrequency:l,frequencySource:c,pricingFrequencyDefaultVariant:d,stripeSubscriptionId:p,stripeSubscriptionStatus:f,hasActiveAppleManagedSubscription:g,isLoggedIn:x,router:h,userId:y,pricingSource:R,checkoutReturnTo:P}){let T=(0,o.usePostHog)(),[C,w]=(0,r.useState)(!1),j=e.tiers[s.value]===a,U=!!p&&!!f&&["active","trialing"].includes(f);function D(){return j?"Current plan":a&&!e.ctaLink?"Switch to this plan":e.cta}return(0,t.jsxs)("div",{className:"flex flex-col rounded-3xl bg-white p-6 ring-1 ring-gray-200 sm:p-8 xl:p-10",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-x-4",children:[(0,t.jsx)("h3",{id:e.name,className:(0,b.cn)(e.mostPopular?"text-blue-600":"text-gray-900","font-title text-lg leading-8"),children:e.name}),e.mostPopular?(0,t.jsx)(m.DiscountBadge,{children:"Popular"}):null]}),(0,t.jsx)("p",{className:"mt-4 text-sm leading-6 text-gray-600",children:e.description}),(0,t.jsxs)("p",{className:"mt-6 flex items-baseline gap-x-1",children:[0===e.price[s.value]?(0,t.jsx)("span",{className:"text-4xl font-bold tracking-tight text-gray-900",children:"Let's talk"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"text-4xl font-bold tracking-tight text-gray-900",children:["$",e.price[s.value]]}),(0,t.jsx)("span",{className:"text-sm font-semibold leading-6 text-gray-600",children:"/u
2ser"})]}),!!e.discount?.[s.value]&&(0,t.jsx)(m.DiscountBadge,{children:(0,t.jsxs)("span",{className:"tracking-wide",children:["SAVE ",e.discount[s.value].toFixed(0),"%"]})})]}),(0,t.jsx)("p",{className:"mt-2 text-sm leading-6 text-gray-600",children:e.price[s.value]?s.priceSuffix:"Â "}),(0,t.jsx)("ul",{className:"mt-8 space-y-3 text-sm leading-6 text-gray-600",children:e.features.map(e=>(0,t.jsxs)("li",{className:"flex gap-x-3",children:[(0,t.jsx)(n.CheckIcon,{className:"h-6 w-5 flex-none text-blue-600","aria-hidden":"true"}),(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[e.text,e.tooltip&&(0,t.jsx)(v.TooltipExplanation,{text:e.tooltip})]})]},e.text))})]}),(0,t.jsx)("button",{type:"button",disabled:C,onClick:async()=>{let t=e.tiers[s.value];if(T.capture("pricing_cta_clicked",{source:R,tier:e.name,billingTier:t??null,frequency:s.value,defaultFrequency:l.value,frequencySource:c,pricingFrequencyDefaultVariant:d,cta:D(),isCurrentPlan:j,isLoggedIn:x,hasExternalCta:!!e.ctaLink,hasActiveStripeSubscription:U}),e.ctaLink)return void(0,L.redirectToSafeUrl)(e.ctaLink,{allowExternal:!0});if(!x)return void h.push("/login");async function r(){let r;if(e.tiers[s.value]===a)return void i.toast.info("You are already on this plan");if(g)return void i.toast.info("This subscription is managed through the App Store. To change or cancel it, use your iPhone or iPad subscription settings.");if(r=U?await (0,_.getBillingPortalUrlAction)({tier:t}):await (0,N.generateCheckoutSessionAction)({tier:t,returnTo:P}),!r?.data?.url||r?.serverError){let e=U?`We couldn't open the plan change page. Your subscription has not been changed. Please contact support at ${u.env.NEXT_PUBLIC_SUPPORT_EMAIL}`:r?.serverError||`Error creating checkout session. Please contact support at ${u.env.NEXT_PUBLIC_SUPPORT_EMAIL}`;(0,E.captureException)(Error("Error opening Stripe billing flow"),{extra:{tier:t,frequency:s.value,userId:y,serverError:r?.serverError,result:r}}),(0,A.toastError)({description:e});return}(0,L.redirectToSafeUrl)(r.data.url,{allowExternal:!0})}w(!0);try{await r()}catch(e){console.error(e),(0,A.toastError)({description:e instanceof Error?e.message:`Error creating checkout session. Please contact support at ${u.env.NEXT_PUBLIC_SUPPORT_EMAIL}`})}finally{w(!1)}},"aria-describedby":e.name,className:(0,b.cn)(e.mostPopular?"bg-blue-600 text-white shadow-sm hover:bg-blue-500":"text-blue-600 ring-1 ring-inset ring-blue-200 hover:ring-blue-300","mt-8 block rounded-md px-3 py-2 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"),children:C?(0,t.jsx)("div",{className:"flex items-center justify-center py-1",children:(0,t.jsx)(S.LoadingMiniSpinner,{})}):D()})]})}e.s(["default",0,function(e){let i=(0,o.usePostHog)(),{premium:n,isPremium:u,isLoading:v,error:A,data:N,canManageBilling:_}=(0,d.usePremium)(),S=(0,r.useRef)(!1),E=!!N?.id,L=e.showSkipUpgrade?"welcome_upgrade":"app_premium",R=e.displayTiers||x.tiers,P=(0,g.hasActiveAppleSubscription)(n?.appleExpiresAt||null,n?.appleRevokedAt||null,n?.appleSubscriptionStatus||null),T=!!(u||n?.stripeSubscriptionId||n?.lemonSqueezyCustomerId||P),C=(0,x.shouldShowLegacyStripePricingNotice)(n),w=(0,p.usePricingFrequencyDefault)(),j="annually"===w?m.frequencies[1]:m.frequencies[0],[U,D]=(0,r.useState)(null),O=U??j,B=(0,g.getUserTier)(n),k=e.header||(0,t.jsxs)("div",{className:"mb-12",children:[(0,t.jsxs)("div",{className:"mx-auto max-w-2xl text-center lg:max-w-4xl",children:[(0,t.jsx)("h2",{className:"font-title text-base leading-7 text-blue-600",children:"Pricing"}),(0,t.jsx)("p",{className:"mt-2 font-title text-4xl text-gray-900 sm:text-5xl",children:"Try for free, affordable paid plans"})]}),(0,t.jsx)("p",{className:"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600",children:"No hidden fees. Cancel anytime."})]}),M=(0,a.useRouter)();return((0,r.useEffect)(()=>{v||void 0===w||S.current||(S.current=!0,i.capture("pricing_page_viewed",{source:L,isLoggedIn:E,hasExistingSubscription:T,showSkipUpgrade:!!e.showSkipUpgrade,displayedTiers:R.map(e=>e.name),frequency:O.value,defaultFrequency:j.value,frequencySource:U?"user_selected":"default",pricingFrequencyDefaultVariant:w}))},[U,j.value,R,O.value,T,v,E,i,w,L,e.showSkipUpgrade]),E&&!_)?(0,t.jsx)("div",{className:"mx-auto max-w-2xl px-6 py-12",children:(0,t.jsx)(h.AlertBasic,{variant:"blue",title:"Billing access restricted",description:"Only organization owners and admins can manage billing."})}):(0,t.jsx)(c.LoadingContent,{loading:v,error:A,children:(0,t.jsxs)("div",{id:"pricing",className:(0,b.cn)("relative isolate mx-auto max-w-7xl bg-white px-6 pt-6 sm:pt-10 lg:px-8",e.className),children:[k,T&&(0,t.jsxs)("div",{className:"mb-8 mt-8 text-center",children:[(0,t.jsx)(y.ManageSubscription,{premium:n??null}),B&&(0,t.jsx)(f.Button,{className:"ml-2",asChild:!0,children:(0,t.jsxs)(l.default,{href:"/setup",children:[(0,t.jsx)(s.SparklesIcon,{className:"mr-2 h-4 w-4"}),"Go to app"]})}),P&&(0,t.jsx)("div",{className:"mx-auto mt-4 max-w-2xl text-left",children:(0,t.jsx)(h.AlertBasic,{variant:"blue",title:"Managed
2in the App Store",description:"This subscription is billed by Apple. To change or cancel it, use your iPhone or iPad subscription settings."})}),C&&(0,t.jsx)("div",{className:"mx-auto mt-4 max-w-2xl text-left",children:(0,t.jsx)(h.AlertBasic,{variant:"blue",title:"Grandfathered pricing",description:`You're on a legacy ${(0,x.getPremiumTierName)(n?.tier)} Stripe plan. The prices below are the current rates for new subscriptions and may be higher than your actual billing.`})})]}),(0,t.jsx)(m.PricingFrequencyToggle,{frequency:O,setFrequency:e=>{i.capture("pricing_frequency_changed",{source:L,previousFrequency:O.value,frequency:e.value,defaultFrequency:j.value,pricingFrequencyDefaultVariant:w??null}),D(e)},children:(0,t.jsx)("div",{className:"ml-1",children:(0,t.jsx)(m.DiscountBadge,{children:"Save up to 20%"})})}),(0,t.jsx)("div",{className:(0,b.cn)("isolate mx-auto mt-6 grid grid-cols-1 gap-y-8 gap-4 sm:mt-10",2===R.length?"max-w-3xl lg:grid-cols-2":"max-w-7xl lg:mx-0 lg:max-w-none lg:grid-cols-3"),children:R.map(r=>(0,t.jsx)(I,{tier:r,userPremiumTier:B,frequency:O,defaultFrequency:j,frequencySource:U?"user_selected":"default",pricingFrequencyDefaultVariant:w??null,stripeSubscriptionId:n?.stripeSubscriptionId,stripeSubscriptionStatus:n?.stripeSubscriptionStatus,hasActiveAppleManagedSubscription:P,isLoggedIn:E,router:M,userId:N?.id,pricingSource:L,checkoutReturnTo:e.checkoutReturnTo},r.name))})]})})}])},50862,313952,e=>{"use strict";var t=e.i(764362),r=e.i(354134),i=e.i(748471),a=e.i(452675);let n=[{value:"monthly",label:"Monthly",priceSuffix:"/month, billed monthly"},{value:"annually",label:"Annually",priceSuffix:"/month, billed annually"}];e.s(["DiscountBadge",0,function({children:e}){return(0,t.jsx)("span",{className:"rounded-full bg-blue-600/10 px-2.5 py-1 text-xs font-semibold leading-5 text-blue-600",children:e})},"PricingFrequencyToggle",0,function({frequency:e,setFrequency:s,className:l,children:o}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex items-center justify-center",l),children:[(0,t.jsxs)(i.RadioGroup,{value:e,onChange:s,className:"grid grid-cols-2 gap-x-1 rounded-full p-1 text-center text-xs font-semibold leading-5 ring-1 ring-inset ring-gray-200",children:[(0,t.jsx)(r.Label,{className:"sr-only",children:"Payment frequency"}),n.map(e=>(0,t.jsx)(i.Radio,{value:e,className:({checked:e})=>(0,a.cn)(e?"bg-black text-white":"text-gray-500","cursor-pointer rounded-full px-2.5 py-1"),children:(0,t.jsx)("span",{children:e.label})},e.value))]}),o]})},"frequencies",0,n],50862);var s=e.i(966970);let l=(0,s.createServerReference)("7f7a13578fa7fd90cb213d2b01f972e7b8a1b32320",s.callServer,void 0,s.findSourceMapURL,"generateCheckoutSessionAction");e.s(["generateCheckoutSessionAction",0,l],313952)},429080,e=>{"use strict";var t=e.i(449907);t.env.NEXT_PUBLIC_BASIC_MONTHLY_VARIANT_ID,t.env.NEXT_PUBLIC_BASIC_ANNUALLY_VARIANT_ID,t.env.NEXT_PUBLIC_PRO_MONTHLY_VARIANT_ID,t.env.NEXT_PUBLIC_PRO_ANNUALLY_VARIANT_ID,t.env.NEXT_PUBLIC_BUSINESS_MONTHLY_VARIANT_ID,t.env.NEXT_PUBLIC_BUSINESS_ANNUALLY_VARIANT_ID,t.env.NEXT_PUBLIC_COPILOT_MONTHLY_VARIANT_ID,t.env.NEXT_PUBLIC_STRIPE_PLUS_MONTHLY_PRICE_ID,t.env.NEXT_PUBLIC_STRIPE_BUSINESS_PLUS_MONTHLY_PRICE_ID;let r={BASIC_MONTHLY:{priceId:"price_1RfeDLKGf8mwZWHn6UW8wJcY"},BASIC_ANNUALLY:{priceId:"price_1RfeDLKGf8mwZWHn5kfC8gcM"},PRO_MONTHLY:{},PRO_ANNUALLY:{},STARTER_MONTHLY:{priceId:t.env.NEXT_PUBLIC_STRIPE_BUSINESS_MONTHLY_PRICE_ID,oldPriceIds:["price_1T9FhCKGf8mwZWHn1olNzv6X","price_1S5u73KGf8mwZWHn8VYFdALA","price_1RMSnIKGf8mwZWHnlHP0212n","price_1RfoILKGf8mwZWHnDiUMj6no","price_1RfeAFKGf8mwZWHnnnPzFEky","price_1RfSoHKGf8mwZWHnxTsSDTqW","price_1Rg0QfKGf8mwZWHnDsiocBVD","price_1Rg0LEKGf8mwZWHndYXYg7ie","price_1Rg03pKGf8mwZWHnWMNeQzLc","price_1SjoaXKGf8mwZWHnOdyaf2IN"]},STARTER_ANNUALLY:{priceId:t.env.NEXT_PUBLIC_STRIPE_BUSINESS_ANNUALLY_PRICE_ID,oldPriceIds:["price_1S5u6uKGf8mwZWHnEvPWuQzG","price_1S1QGGKGf8mwZWHnYpUcqNua","price_1RMSnIKGf8mwZWHnymtuW2s0","price_1RfSoxKGf8mwZWHngHcug4YM","price_1SjoawKGf8mwZWHnfAeShYhb"]},PLUS_MONTHLY:{priceId:t.env.NEXT_PUBLIC_STRIPE_PLUS_MONTHLY_PRICE_ID},PLUS_ANNUALLY:{priceId:t.env.NEXT_PUBLIC_STRIPE_PLUS_ANNUALLY_PRICE_ID},PROFESSIONAL_MONTHLY:{priceId:t.env.NEXT_PUBLIC_STRIPE_BUSINESS_PLUS_MONTHLY_PRICE_ID,oldPriceIds:["price_1S5u6NKGf8mwZWHnZCfy4D5n","price_1RMSoMKGf8mwZWHn5fAKBT19"]},PROFESSIONAL_ANNUALLY:{priceId:t.env.NEXT_PUBLIC_STRIPE_BUSINESS_PLUS_ANNUALLY_PRICE_ID,oldPriceIds:["price_1S5u6XKGf8mwZWHnba8HX1H2","price_1RMSoMKGf8mwZWHnGjf6fRmh"]},COPILOT_MONTHLY:{},LIFETIME:{}};t.env.NEXT_PUBLIC_APPLE_IAP_STARTER_MONTHLY_PRODUCT_ID,t.env.NEXT_PUBLIC_APPLE_IAP_STARTER_ANNUALLY_PRODUCT_ID;let i="Starter";e.s(["getPremiumTierName",0,function(e){return e?({STARTER_MONTHLY:"Starter",STARTER_ANNUALLY:"Starter",PLUS_MONTHLY:"Plus",PLUS_ANNUALLY:"Plus",PROFESSIONAL_MONTHLY:"Professional",PROFESSIONAL_ANNUALLY:"Professional",COPILOT_MONTHLY:"Enterprise",BASIC_MONTHLY:"Basic",BASIC_ANNUALLY:"Basic",PRO_MONTHLY:"Pro",PRO_ANNUALLY:"Pro",LIFETIME:"Lifetime"})[e]??"Premium":"Premium"},"shouldShowLegacyStripePricingNotice",0,function(e){return!!e?.
2stripeSubscriptionStatus&&!!["active","trialing"].includes(e.stripeSubscriptionStatus)&&function({tier:e,priceId:t}){if(!t)return!1;let i=e||function({priceId:e}){for(let[t,i]of Object.entries(r))if(i.priceId===e||i.oldPriceIds?.includes(e))return t;return null}({priceId:t});if(!i)return!1;let a=r[i];return!!a&&a.priceId!==t&&(a.oldPriceIds?.includes(t)??!1)}({tier:e.tier,priceId:e.stripePriceId})},"starterTierName",0,i,"tiers",0,[{name:i,tiers:{monthly:"STARTER_MONTHLY",annually:"STARTER_ANNUALLY"},price:{monthly:20,annually:18},discount:{monthly:0,annually:10},description:"For individuals, entrepreneurs, and executives looking to buy back their time.",features:[{text:"Sorts and labels every email"},{text:"Drafts replies in your voice"},{text:"Blocks cold emails"},{text:"Bulk unsubscribe and archive emails"},{text:"Email analytics"},{text:"Pre-meeting briefings",tooltip:"Get AI briefings before every meeting with research on attendees and context from your inbox."}],cta:"Try free for 7 days",mostPopular:!1},{name:"Plus",tiers:{monthly:"PLUS_MONTHLY",annually:"PLUS_ANNUALLY"},price:{monthly:35,annually:28},discount:{monthly:0,annually:20},description:"For power users who need integrations and deeper knowledge base support.",features:[{text:"Everything in Starter, plus:"},{text:"2 email accounts included per user",tooltip:"Each user gets 2 email accounts included. Additional email accounts are billed at the standard per-seat rate."},{text:"AI meeting notetaker",tooltip:"A notetaker joins your video calls and turns them into transcripts, summaries, recap emails, and follow-up drafts."},{text:"Slack integration",tooltip:"Forward important emails and notifications to your Slack channels automatically."},{text:"App integrations",tooltip:"Connect Notion, Stripe, Monday.com, and more so the AI can use data from your tools when drafting replies and meeting briefs."},{text:"Email digests",tooltip:"Group emails from selected rules into a scheduled summary instead of reading each message individually."},{text:"Auto-file attachments",tooltip:"Automatically organize and file email attachments to your preferred storage."},{text:"Unlimited knowledge base",tooltip:"The knowledge base is used to help draft responses. Store unlimited content in your knowledge base."}],cta:"Try free for 7 days",mostPopular:!0},{name:"Professional",tiers:{monthly:"PROFESSIONAL_MONTHLY",annually:"PROFESSIONAL_ANNUALLY"},price:{monthly:50,annually:42},discount:{monthly:0,annually:16},description:"For teams and growing businesses handling high email volumes.",features:[{text:"Everything in Plus, plus:"},{text:"Team-wide analytics"},{text:"Priority support"},{text:"Dedicated onboarding manager",tooltip:"We'll help you get set up on an onboarding call. Book as many free calls as needed."}],cta:"Try free for 7 days",mostPopular:!1}]])},604932,e=>{"use strict";var t=e.i(764362),r=e.i(683745),i=e.i(322106);let a={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};a.node;let n=(0,i.default)(a);var s=e.i(524365),l=e.i(452675);e.s(["AlertBasic",0,function({title:e,description:r,icon:i,variant:a,className:l}){return(0,t.jsxs)(s.Alert,{variant:a,className:l,children:[null===i?null:i||(0,t.jsx)(n,{className:"h-4 w-4"}),e?(0,t.jsx)(s.AlertTitle,{children:e}):null,r?(0,t.jsx)(s.AlertDescription,{children:r}):null]})},"AlertError",0,function({title:e,description:i,className:a}){return(0,t.jsxs)(s.Alert,{variant:"destructive",className:a,children:[(0,t.jsx)(r.AlertCircle,{className:"h-4 w-4"}),(0,t.jsx)(s.AlertTitle,{children:e}),(0,t.jsx)(s.AlertDescription,{children:i})]})},"AlertWithButton",0,function({title:e,description:r,icon:i,variant:a,button:o,className:u}){return(0,t.jsxs)(s.Alert,{variant:a,className:(0,l.cn)("bg-background pb-3 pt-5",u),children:[null===i?null:i||(0,t.jsx)(n,{className:"h-4 w-4"}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.AlertTitle,{children:e}),(0,t.jsx)(s.AlertDescription,{children:r})]}),(0,t.jsx)("div",{children:o})]})]})}],604932)},246342,e=>{"use strict";var t=e.i(764362),r=e.i(870080),i=e.i(228961),a=e.i(822995),n=e.i(195955),s=e.i(456332),l=e.i(766679),o=e.i(878835),u=e.i(466691),c=e.i(421207),d=e.i(935308),p=e.i(966970);let f=(0,p.createServerReference)("7f4b505e3379fc1d07a2ab99c54944c8d51cb6ee33",p.callServer,void 0,p.findSourceMapURL,"endStripeTrialAction");var m=e.i(263809);function g(e,t){let r=new Intl.NumberFormat("en-US",{style:"currency",currency:t.toUpperCase()}),{maximumFractionDigits:i=2}=r.resolvedOptions();return r.format(e/10**i)}let x={day:"daily",week:"weekly",month:"monthly",year:"yearly"};e.s(["EndTrialButton",0,function({variant:e,size:p,className:h}){let[v,A]=(0,r.useState)(!1),[N,_]=(0,r.useState)(!1),{mutate:S}=(0,l.useSWRConfig)(),{data:b,isLoading:y,isValidating:E,error:L}=(0,s.default)(v?"/api/user/trial-preview":null),I=async()=>{_(!0);let e=await f().finally(()=>{_(!1)});e?.serverError?(0,d.toastError)({description:e.serverError}):(A(!1),e?.data?.status==="active"?n.toast.success("Your paid plan is active."):n.toast.message("Your trial has ended."),await Promise.all([S("/api/user/me"),S("/api/user/ai-automation-status")]))};return(0,t.jsxs)(o.AlertDialog,{open:v,onOpenChange:A,children:[(0,t.jsx)(o.AlertDialogTrigger,{asChild:!0,children:(0,t.jsxs)(u.Button,{variant:e,size:p,className:h,children:[(0,t.jsx)(a.CreditCardIcon,{className:"mr-2 h-4 w-4"}),"Start paid plan now"]})}),(0,t.jsxs)(o.AlertDialogContent,{children:[(0,t.jsxs)(o.AlertDialogHeader,{children:[(0,t.jsx)(o.AlertDialogTitle,{children:"End your free trial and pay now?"}),(0,t.jsx)(c.LoadingContent,{loading:y,error:L,children:b&&(0,t.jsx)(o.AlertDialogDescription,{asChild:!0,children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("p",{children:["We will charge your card"," ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:g(b.amountDue,b.currency)})," ","immediately for the ",b.planName," plan",b.interval?`, billed ${x[b.interval]}`:"","."]}),b.trialEnd&&(0,t.jsxs)("p",{children:["You do not need to do this to keep using Inbox Zero. Your trial already includes every paid feature and runs free until ",(0,m.formatDateSimple)(new Date(b.trialEnd)),", when the same charge happens automatically."]}),(0,t.jsxs)("p",{children:["Want a different plan or to pay monthly?"," ",(0,t.jsx)(i.default,{href:"/premium",className:"underline",children:"Change your plan first"}),"."]})]})})})]}),(0,t.jsxs)(o.AlertDialogFooter,{children:[(0,t.jsx)(o.AlertDialogCancel,{children:"Keep my free trial"}),(0,t.jsx)(u.Button,{loading:N,disabled:!b||E,onClick:I,children:b?`Pay ${g(b.amountDue,b.currency)} now`:"Pay now"})]})]})]})}],246342)},878835,e=>{"use strict";var t=e.i(764362),r=e.i(870080),i=e.i(43630),a=e.i(219276),n=e.i(318334),s=e.i(690471),l=Object.defineProperty,o=(e,t)=>l(e,"name",{value:t,configurable:!0}),[u,c]=(0,i.createContextScope)("AlertDialog",[n.createDialogScope]),d=(0,n.createDialogScope)(),p=o(e=>{let{__scopeAlertDialog:r,...i}=e,a=d(r);return(0,t.jsx)(n.Root,{...a,...i,modal:!0})},"AlertDialog"),f=r.forwardRef(o(function(e,r){let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Trigger,{...s,...a,ref:r})},"AlertDialogTrigger")),m=o(e=>{let{__scopeAlertDialog:r,...i}=e,a=d(r);return(0,t.jsx)(n.Portal,{...a,...i})},"AlertDialogPortal"),g=r.forwardRef(o(function(e,r){let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Overlay,{...s,...a,ref:r})},"AlertDialogOverlay")),[x,h]=u("AlertDialogContent"),v=r.forwardRef(o(function(e,i){let{__scopeAlertDialog:l,children:o,...u}=e,c=d(l),p=r.useRef(null),f=(0,a.useComposedRefs)(i,p),m=r.useRef(null);return(0,t.jsx)(x,{scope:l,cancelRef:m,children:(0,t.jsx)(n.Content,{role:"alertdialog",...c,...u,ref:f,onOpenAutoFocus:(0,s.composeEventHandlers)(u.onOpenAutoFocus,e=>{e.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})},"AlertDialogContent")),A=r.forwardRef(o(function(e,r){let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Title,{...s,...a,ref:r})},"AlertDialogTitle")),N=r.forwardRef(o(function(e,r){let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Description,{...s,...a,ref:r})},"AlertDialogDescription")),_=r.forwardRef(o(function(e,r){let{__scopeAlertDialog:i,...a}=e,s=d(i);return(0,t.jsx)(n.Close,{...s,...a,ref:r})},"AlertDialogAction")),S=r.forwardRef(o(function(e,r){let{__scopeAlertDialog:i,...s}=e,{cancelRef:l}=h("AlertDialogCancel",i),o=d(i),u=(0,a.useComposedRefs)(r,l);return(0,t.jsx)(n.Close,{...o,...s,ref:u})},"AlertDialogCancel")),b=e.i(452675),y=e.i(466691);let E=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(g,{className:(0,b.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:i}));E.displayName=g.displayName;let L=r.forwardRef(({className:e,...r},i)=>(0,t.jsxs)(m,{children:[(0,t.jsx)(E,{}),(0,t.jsx)(v,{ref:i,className:(0,b.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
2nded-lg",e),...r})]}));L.displayName=v.displayName;let I=({className:e,...r})=>(0,t.jsx)("div",{className:(0,b.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...r});I.displayName="AlertDialogHeader";let R=({className:e,...r})=>(0,t.jsx)("div",{className:(0,b.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});R.displayName="AlertDialogFooter";let P=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(A,{ref:i,className:(0,b.cn)("text-lg font-semibold",e),...r}));P.displayName=A.displayName;let T=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(N,{ref:i,className:(0,b.cn)("text-sm text-muted-foreground",e),...r}));T.displayName=N.displayName;let C=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(_,{ref:i,className:(0,b.cn)((0,y.buttonVariants)(),e),...r}));C.displayName=_.displayName;let w=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(S,{ref:i,className:(0,b.cn)((0,y.buttonVariants)({variant:"outline"}),"mt-2 sm:mt-0",e),...r}));w.displayName=S.displayName,e.s(["AlertDialog",0,p,"AlertDialogAction",0,C,"AlertDialogCancel",0,w,"AlertDialogContent",0,L,"AlertDialogDescription",0,T,"AlertDialogFooter",0,R,"AlertDialogHeader",0,I,"AlertDialogTitle",0,P,"AlertDialogTrigger",0,f],878835)},524365,e=>{"use strict";var t=e.i(764362),r=e.i(870080),i=e.i(452799),a=e.i(452675);let n=(0,i.cva)("relative w-full rounded-lg border border-slate-200 p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-slate-950 dark:border-slate-800 dark:[&>svg]:text-slate-50",{variants:{variant:{default:"text-slate-950 bg-background dark:text-slate-50",destructive:"border-red-500/50 text-red-500 dark:border-red-500 [&>svg]:text-red-500",success:"border-green-500/50 text-green-500 dark:border-green-500 [&>svg]:text-green-500",blue:"border-blue-500/50 text-blue-500 dark:border-blue-500 [&>svg]:text-blue-500"}},defaultVariants:{variant:"default"}}),s=r.forwardRef(({className:e,variant:r,...i},s)=>(0,t.jsx)("div",{ref:s,role:"alert",className:(0,a.cn)(n({variant:r}),e),...i}));s.displayName="Alert";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("h5",{ref:i,className:(0,a.cn)("mb-1 font-title leading-none",e),...r}));l.displayName="AlertTitle";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,className:(0,a.cn)("whitespace-pre-wrap text-sm [&_p]:leading-relaxed",e),...r}));o.displayName="AlertDescription",e.s(["Alert",0,s,"AlertDescription",0,o,"AlertTitle",0,l])},160171,734433,e=>{"use strict";var t=e.i(278321),r=e.i(449907);let i="integration-actions";function a(){return!0===r.env.NEXT_PUBLIC_INTEGRATION_ACTION_ENABLED}e.s(["INTEGRATION_ACTION_FEATURE_FLAG",0,i,"isIntegrationActionGloballyEnabled",0,a],734433),e.s(["useBookingLinksEnabled",0,function(){let e=(0,t.useFeatureFlagEnabled)("booking-links");return r.env.NEXT_PUBLIC_BOOKING_LINKS_ENABLED||e},"useCleanerEnabled",0,function(){let e=(0,t.useFeatureFlagEnabled)("inbox-cleaner");return r.env.NEXT_PUBLIC_CLEANER_ENABLED||e},"useFollowUpRemindersEnabled",0,function(){let e=(0,t.useFeatureFlagEnabled)("follow-up-reminders");return r.env.NEXT_PUBLIC_FOLLOW_UP_REMINDERS_ENABLED||e},"useIntegrationActionsEnabled",0,function(){let e=(0,t.useFeatureFlagEnabled)(i);return a()||!0===e},"useIntegrationsEnabled",0,function(){let e=(0,t.useFeatureFlagEnabled)("integrations");return!!r.env.NEXT_PUBLIC_INTEGRATIONS_ENABLED||!!r.env.NEXT_PUBLIC_POSTHOG_KEY&&e},"useMeetingBriefsEnabled",0,function(){return r.env.NEXT_PUBLIC_MEETING_BRIEFS_ENABLED},"useMeetingRecorderEnabled",0,function(){return r.env.NEXT_PUBLIC_MEETING_RECORDER_ENABLED},"usePricingFrequencyDefault",0,function(){return(0,t.useFeatureFlagVariantKey)("pricing-frequency-default")},"useTeamsEnabled",0,function(){let e=(0,t.useFeatureFlagEnabled)("microsoft-teams");return r.env.NEXT_PUBLIC_TEAMS_ENABLED||e}],160171)},443901,e=>{"use strict";var t=e.i(449907),r=e.i(905214),i=e.i(97021);e.s(["usePremium",0,function(){let e=(0,r.useUser)(),{data:a}=e,n=a?.premium,s=a?.hasAiApiKey,l=a?.canManageBilling??!1,o=a?.unsubscribeCreditsRemaining;if(t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS)return{...e,premium:n,canManageBilling:l,isPremium:!0,hasUnsubscribeAccess:!0,unsubscribeCreditsRemaining:o,hasAiAccess:!0,isProPlanWithoutApiKey:!1,tier:"PROFESSIONAL_ANNUALLY"};let u=(0,i.isPremiumRecord)(n),c=(0,i.getUserTier)(n),d=("PRO_MONTHLY"===c||"PRO_ANNUALLY"===c)&&!s;return{...e,premium:n,canManageBilling:l,isPremium:u,hasUnsubscribeAccess:u||(0,i.hasUnsubscribeAccess)(c||null,o),unsubscribeCreditsRemaining:o,hasAiAccess:u&&(0,i.hasAiAccess)(c||null,s),isProPlanWithoutApiKey:d,tier:c}}])},905214,e=>{"use strict";var t=e.i(456332),r=e.i(590403);e.s(["useUser",0,function(e=!0){let i=(0,t.default)(e?"/api/user/me":null),a=(0,r.processSWRResponse)(i),n=i.error;return n?.status===401?{...a,data:null,error:void 0,isLoading:!1}:a}])},97021,e=>{"use strict";var t=e.i(449907);let r=new Set(["ACTIVE","BILLING_GRACE_PERIOD","BILLING_RETRY"]);function i(e){return!!e&&["active","trialing"].includes(e)}function a(e){return!!e&&new Date(e)>new Date}function n(e){return!!e&&new Date(e)>new Date}function s(e,t,i){return!t&&(!!(i&&r.has(i))||!!e&&new Date(e)>new Date)}let l={BASIC_MONTHLY:1,BASIC_ANNUALLY:2,PRO_MONTHLY:3,PRO_ANNUALLY:4,STARTER_MONTHLY:5,STARTER_ANNUALLY:6,PLUS_MONTHLY:7,PLUS_ANNUALLY:8,PROFESSIONAL_MONTHLY:9,PROFESSIONAL_ANNUALLY:10,COPILOT_MONTHLY:11,LIFETIME:12};function o(e){return!!e.adminGrantTier&&n(e.adminGrantExpiresAt??null)}e.s(["getUserTier",0,e=>{var r,o;
2if(t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS)return"PROFESSIONAL_ANNUALLY";if(!e)return null;let u=(i(e.stripeSubscriptionStatus??null)||a(e.lemonSqueezyRenewsAt??null)||s(e.appleExpiresAt??null,e.appleRevokedAt??null,e.appleSubscriptionStatus))&&e.tier||null,c=n(e.adminGrantExpiresAt??null)&&e.adminGrantTier||null;return u?c&&(r=c,o=u,(r?l[r]:0)>(o?l[o]:0))?c:u:c},"hasActiveAppleSubscription",0,s,"hasAiAccess",0,(e,r)=>{if(t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS)return!0;if(!e)return!1;let i=l[e];return!!(i>=l.STARTER_MONTHLY||i>=l.PRO_MONTHLY&&r)},"hasTierAccess",0,({tier:e,minimumTier:r})=>!!t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS||!!e&&l[e]>=l[r],"hasUnsubscribeAccess",0,(e,r)=>!!t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS||!!e||(r??0)>0,"isActivePremium",0,e=>{var r;return!!t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS||!!e&&(!!(r=e).tier&&("active"===(r.stripeSubscriptionStatus??null)||a(r.lemonSqueezyRenewsAt??null)||s(r.appleExpiresAt??null,r.appleRevokedAt??null,r.appleSubscriptionStatus))||o(e))},"isPremiumRecord",0,e=>{var r;return!!t.env.NEXT_PUBLIC_BYPASS_PREMIUM_CHECKS||!!e&&(!!(r=e).tier&&(i(r.stripeSubscriptionStatus??null)||a(r.lemonSqueezyRenewsAt??null)||s(r.appleExpiresAt??null,r.appleRevokedAt??null,r.appleSubscriptionStatus))||o(e))}])},590403,e=>{"use strict";var t=e.i(456332),r=e.i(395910);e.s(["getAccountScopedKey",0,function(e,t){return void 0===t?e:t?[e,t]:null},"processSWRResponse",0,function(e){let t=e.error,r=e.data;return t instanceof Error?{...e,data:null,error:{error:t.message}}:t?{...e,data:null,error:{error:String(t)}}:r&&"object"==typeof r&&"error"in r&&"string"==typeof r.error?{...e,data:null,error:{error:r.error}}:{...e,data:r,error:void 0}},"shouldResetSwrCacheForAccountId",0,function(e,t){return!!t&&null!==e&&e!==t},"shouldRevalidateAllLiveSwrKeysForAccountId",0,function(e,t){return""===e&&!!t},"useSWRWithEmailAccount",0,function(e){let{emailAccountId:i}=(0,r.useAccount)();return(0,t.default)(i?e:null)}])}]); 3 4//# debugId=53b35580-6582-eabf-2d42-1a6fbe3de2c6
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.