import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{$n as n,Gt as r,Kt as i,Nn as a,Qn as o,Sr as s,Xn as c,Xt as l,Yr as u,Yt as d,Zn as f,er as p,ii as m,li as h,or as g,yr as _}from"./vendor-primevue-D1-E3-0M.js";import{Un as v,an as y,at as b,cn as x,in as S,it as C,rn as w}from"./vendor-other-CT05lTmi.js";import{n as T,t as E}from"./useErrorHandling-DNVxJ2sn.js";import{fo as D,ho as O,l as k,mo as A,po as j,u as M}from"./dialogService-DIdX_hbW.js";import{n as N,t as P}from"./subscriptionCheckoutUtil-CYIrqReh.js";var F,I,L,R,z,B=t((()=>{a(),M(),x(),d(),r(),C(),w(),D(),E(),A(),P(),F={class:`flex h-full w-full items-center justify-center bg-comfy-menu-secondary-bg`},I={class:`flex flex-col items-center gap-4`},L=[`alt`],R={key:0,class:`font-inter text-base font-normal leading-normal text-base-foreground`},z=g({__name:`CloudSubscriptionRedirectView`,setup(e){let{t}=b(),r=S(),a=y(),{reportError:d,accessBillingPortal:g}=j(),{wrapWithErrorHandlingAsync:x}=T(),{isActiveSubscription:C,isInitialized:w}=O(),E=u(null),D=c(()=>E.value?{standard:t(`subscription.tiers.standard.name`),creator:t(`subscription.tiers.creator.name`),pro:t(`subscription.tiers.pro.name`),founder:t(`subscription.tiers.founder.name`)}[E.value]:``),A=x(async()=>{let e=r.query.tier,t=r.query.cycle,n=null,i=`monthly`;if(typeof e==`string`?n=e:Array.isArray(e)&&e[0]&&(n=e[0]),typeof t==`string`?i=t:Array.isArray(t)&&t[0]&&(i=t[0]),!n){await a.push(`/`);return}if(![`standard`,`creator`,`pro`,`founder`].includes(n)){await a.push(`/`);return}let o=n;E.value=o,(!i||![`monthly`,`yearly`].includes(i))&&(i=`monthly`),w.value||await v(w).toBe(!0),C.value?await g(void 0,!1):await N(o,i,!1)},d);return _(()=>{A()}),(e,r)=>(s(),p(`div`,F,[f(`div`,I,[f(`img`,{src:k,alt:m(t)(`g.comfyOrgLogoAlt`),class:`h-16 w-16`},null,8,L),E.value?(s(),p(`p`,R,h(m(t)(`subscription.subscribeTo`,{plan:D.value})),1)):n(``,!0),E.value?(s(),o(m(i),{key:1,class:`h-8 w-8`,"stroke-width":`4`})):n(``,!0),E.value?(s(),o(m(l),{key:2,as:`a`,href:`/`,link:``,label:m(t)(`cloudOnboarding.skipToCloudApp`)},null,8,[`label`])):n(``,!0)])]))}})})),V;t((()=>{B(),B(),V=z}))();export{V as default};
//# sourceMappingURL=CloudSubscriptionRedirectView-D-PvJRS1.js.map