import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{K as t,Z as n}from"./vendor-primevue-DGevbYGF.js";import"./vendor-firebase-yTFzdAQf.js";import{A as r,D as i,O as a,R as o,Rt as s,Ut as c,Z as l,a as u,et as d,j as f,k as p,kt as m,o as h}from"./vendor-vue-core-BdhYaYlO.js";import"./vendor-other-D9HJWI2D.js";import"./useFeatureFlags-DLStzqlx.js";import{U as g}from"./vendor-vueuse-2ddMYtS4.js";import"./api-C1WIrB4Z.js";import"./vendor-markdown-th9BvURy.js";import"./colorUtil-DJbZtU1U.js";import{n as _}from"./vendor-i18n-JubCsGQ_.js";import"./i18n-DKtnmyh4.js";import"./vendor-reka-ui-CSo89nDv.js";import"./Button-DHxPjNdi.js";import{Jr as v,Yr as y}from"./dialogService-CwVeD8j9.js";import"./extensionStore-By6c6sCD.js";import"./userStore-ChcnLOkA.js";import{t as b}from"./useErrorHandling-CWU_3R6Y.js";import"./useExternalLink-DZBh_BZs.js";import"./vendor-tiptap-BZHcjrm1.js";import"./markdownRendererUtil-J4WlXR5e.js";import"./Popover-_oREh-V5.js";import{t as x}from"./comfy-logo-single-HT_W9ak1.js";import{t as S}from"./subscriptionCheckoutUtil-Dok662RH.js";var C={class:`flex h-full w-full items-center justify-center bg-comfy-menu-secondary-bg`},w={class:`flex flex-col items-center gap-4`},T=[`alt`],E={key:0,class:`font-inter text-base font-normal leading-normal text-base-foreground`},D=o({__name:`CloudSubscriptionRedirectView`,setup(e){let{t:o}=_(),D=u(),O=h(),{reportError:k,accessBillingPortal:A}=v(),{wrapWithErrorHandlingAsync:j}=b(),{isActiveSubscription:M,isInitialized:N}=y(),P=m(null),F=i(()=>P.value?{free:o(`subscription.tiers.free.name`),standard:o(`subscription.tiers.standard.name`),creator:o(`subscription.tiers.creator.name`),pro:o(`subscription.tiers.pro.name`),founder:o(`subscription.tiers.founder.name`)}[P.value]:``),I=j(async()=>{let e=D.query.tier,t=D.query.cycle,n=null,r=`monthly`;if(typeof e==`string`?n=e:Array.isArray(e)&&e[0]&&(n=e[0]),typeof t==`string`?r=t:Array.isArray(t)&&t[0]&&(r=t[0]),!n){await O.push(`/`);return}if(![`standard`,`creator`,`pro`,`founder`].includes(n)){await O.push(`/`);return}let i=n;P.value=i,(!r||![`monthly`,`yearly`].includes(r))&&(r=`monthly`),N.value||await g(N).toBe(!0),M.value?await A(void 0,!1):await S(i,r,!1)},k);return l(()=>{I()}),(e,i)=>(d(),f(`div`,C,[a(`div`,w,[a(`img`,{src:x,alt:s(o)(`g.comfyOrgLogoAlt`),class:`h-16 w-16`},null,8,T),P.value?(d(),f(`p`,E,c(s(o)(`subscription.subscribeTo`,{plan:F.value})),1)):r(``,!0),P.value?(d(),p(s(n),{key:1,class:`h-8 w-8`,"stroke-width":`4`})):r(``,!0),P.value?(d(),p(s(t),{key:2,as:`a`,href:`/`,link:``,label:s(o)(`cloudOnboarding.skipToCloudApp`)},null,8,[`label`])):r(``,!0)])]))}});export{D as default};
//# sourceMappingURL=CloudSubscriptionRedirectView-C3kwQl00.js.map