import"./rolldown-runtime-DIIn1E2Q.js";import{K as e,Q as t}from"./vendor-primevue-CSt9JbQD.js";import"./vendor-firebase-D7u00oy9.js";import{A as n,D as r,O as i,R as a,Rt as o,Ut as s,Z as c,a as l,et as u,j as d,k as f,kt as p,o as m}from"./vendor-vue-core-DO0afONr.js";import"./vendor-other-Bo3xiN_p.js";import"./useFeatureFlags-Bq93lbLe.js";import{Y as h}from"./vendor-vueuse-DUMtJaL2.js";import"./api-Bzi--8-2.js";import"./vendor-markdown-Da9QPS2x.js";import"./colorUtil-Bc1n5Dsf.js";import{n as g}from"./vendor-i18n-JbyM4Qz7.js";import"./i18n-xfNY32Ho.js";import"./vendor-reka-ui-D1HCh14_.js";import"./Button-DcKkUh7N.js";import{Si as _,xi as v}from"./dialogService-B4eN_yjE.js";import"./extensionStore-BKzl_b6L.js";import"./userStore-COx1oLYZ.js";import{t as y}from"./useErrorHandling-BvGYTWYe.js";import"./useExternalLink-Dz8tO2Wt.js";import"./vendor-tiptap-DU4sLNDM.js";import"./markdownRendererUtil-BmSNgBXi.js";import"./Popover-DBaEFrTX.js";import{t as b}from"./comfy-logo-single-CUiSWsrd.js";import{t as x}from"./subscriptionCheckoutUtil-BZJ4O6nv.js";var S={class:`bg-comfy-menu-secondary-bg flex size-full items-center justify-center`},C={class:`flex flex-col items-center gap-4`},w=[`alt`],T={key:0,class:`font-inter text-base/normal font-normal text-base-foreground`},E=a({__name:`CloudSubscriptionRedirectView`,setup(a){let{t:E}=g(),D=l(),O=m(),{reportError:k,accessBillingPortal:A}=v(),{wrapWithErrorHandlingAsync:j}=y(),{isActiveSubscription:M,isInitialized:N}=_(),P=p(null),F=r(()=>P.value?{free:E(`subscription.tiers.free.name`),standard:E(`subscription.tiers.standard.name`),creator:E(`subscription.tiers.creator.name`),pro:E(`subscription.tiers.pro.name`),founder:E(`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 h(N).toBe(!0),M.value?await A(void 0,!1):await x(i,r,!1)},k);return c(()=>{I()}),(r,a)=>(u(),d(`div`,S,[i(`div`,C,[i(`img`,{src:b,alt:o(E)(`g.comfyOrgLogoAlt`),class:`size-16`},null,8,w),P.value?(u(),d(`p`,T,s(o(E)(`subscription.subscribeTo`,{plan:F.value})),1)):n(``,!0),P.value?(u(),f(o(t),{key:1,class:`size-8`,"stroke-width":`4`})):n(``,!0),P.value?(u(),f(o(e),{key:2,as:`a`,href:`/`,link:``,label:o(E)(`cloudOnboarding.skipToCloudApp`)},null,8,[`label`])):n(``,!0)])]))}});export{E as default};
//# sourceMappingURL=CloudSubscriptionRedirectView-BGBooXFh.js.map