import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{Q as t,Y as n}from"./vendor-primevue-DxVRNMbC.js";import"./vendor-firebase-CdLSXhbt.js";import{A as r,D as i,Dt as a,It as o,O as s,R as c,Vt as l,Z as u,a as d,et as f,j as p,k as m,o as h}from"./vendor-vue-core-X6q-rGJs.js";import"./vendor-other-CyG3qq8S.js";import"./useFeatureFlags-CxRWjdi1.js";import{V as g}from"./vendor-vueuse-B_IQhD9R.js";import"./api-DQLKc1Xa.js";import"./vendor-markdown-Cola12Wc.js";import"./colorUtil-Cth7eqhK.js";import{n as _}from"./vendor-i18n-B5g6Drzm.js";import"./i18n-DjV_9lZM.js";import"./vendor-reka-ui-CHPbCe4i.js";import"./Button-C7dWyQyS.js";import{ln as v,vn as y}from"./dialogService-Cqui0UMO.js";import"./systemStatsStore-D9aNY5gT.js";import{t as b}from"./useErrorHandling-BFB8eSj5.js";import"./dialogStore-CXD5Bcfy.js";import"./useCopyToClipboard-C74olorb.js";import"./vendor-tiptap-BXSIIPYY.js";import"./markdownRendererUtil-Bm7Umh6C.js";import"./useExternalLink-Cc30SNi3.js";import{t as x}from"./comfy-logo-single-Bysw-Xq3.js";import{t as S}from"./subscriptionCheckoutUtil-CGin9rh7.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=c({__name:`CloudSubscriptionRedirectView`,setup(e){let{t:c}=_(),D=d(),O=h(),{reportError:k,accessBillingPortal:A}=y(),{wrapWithErrorHandlingAsync:j}=b(),{isActiveSubscription:M,isInitialized:N}=v(),P=a(null),F=i(()=>P.value?{standard:c(`subscription.tiers.standard.name`),creator:c(`subscription.tiers.creator.name`),pro:c(`subscription.tiers.pro.name`),founder:c(`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 u(()=>{I()}),(e,i)=>(f(),p(`div`,C,[s(`div`,w,[s(`img`,{src:x,alt:o(c)(`g.comfyOrgLogoAlt`),class:`h-16 w-16`},null,8,T),P.value?(f(),p(`p`,E,l(o(c)(`subscription.subscribeTo`,{plan:F.value})),1)):r(``,!0),P.value?(f(),m(o(n),{key:1,class:`h-8 w-8`,"stroke-width":`4`})):r(``,!0),P.value?(f(),m(o(t),{key:2,as:`a`,href:`/`,link:``,label:o(c)(`cloudOnboarding.skipToCloudApp`)},null,8,[`label`])):r(``,!0)])]))}});export{D as default};
//# sourceMappingURL=CloudSubscriptionRedirectView-1DMTdJdL.js.map