import"./rolldown-runtime-DIIn1E2Q.js";import{K as e,Q as t}from"./vendor-primevue-_eYbXsHY.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-D7fTIduy.js";import"./useFeatureFlags-ChmiVSwD.js";import"./api-BebQfoGK.js";import"./vendor-markdown-Da9QPS2x.js";import"./colorUtil-xHrUTSza.js";import{n as h}from"./vendor-i18n-JbyM4Qz7.js";import"./i18n-dAUEhQVe.js";import"./vendor-reka-ui-D1HCh14_.js";import"./Button-hTbieW3T.js";import{Si as g,xi as _}from"./dialogService-Cm1GEBK8.js";import"./formatUtil-Gr6H7233.js";import"./userStore-DMlTsx5E.js";import{t as v}from"./useErrorHandling-DudkVSep.js";import"./extensionStore-P-YqST__.js";import"./useExternalLink-DY6FqhTr.js";import"./vendor-tiptap-CcjHVRxb.js";import"./markdownRendererUtil-PltcX2Bi.js";import"./Popover-BhkpNQxC.js";import"./electronDownloadStore-BYrGQ7mS.js";import{t as y}from"./comfy-logo-single-CTKe8r7z.js";import{t as b}from"./subscriptionCheckoutUtil-cpmmH4Fl.js";var x={class:`bg-comfy-menu-secondary-bg flex size-full items-center justify-center`},S={class:`flex flex-col items-center gap-4`},C=[`alt`],w={key:0,class:`font-inter text-base/normal font-normal text-base-foreground`},T=a({__name:`CloudSubscriptionRedirectView`,setup(a){let{t:T}=h(),E=l(),D=m(),{reportError:O,accessBillingPortal:k}=_(),{wrapWithErrorHandlingAsync:A}=v(),{isActiveSubscription:j,isInitialized:M,initialize:N}=g(),P=p(null),F=r(()=>P.value?{free:T(`subscription.tiers.free.name`),standard:T(`subscription.tiers.standard.name`),creator:T(`subscription.tiers.creator.name`),pro:T(`subscription.tiers.pro.name`),founder:T(`subscription.tiers.founder.name`)}[P.value]:``),I=A(async()=>{let e=E.query.tier,t=E.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 D.push(`/`);return}if(![`standard`,`creator`,`pro`,`founder`].includes(n)){await D.push(`/`);return}let i=n;P.value=i,(!r||![`monthly`,`yearly`].includes(r))&&(r=`monthly`),M.value||await N(),j.value?await k(void 0,!1):await b(i,r,!1)},O);return c(()=>{I()}),(r,a)=>(u(),d(`div`,x,[i(`div`,S,[i(`img`,{src:y,alt:o(T)(`g.comfyOrgLogoAlt`),class:`size-16`},null,8,C),P.value?(u(),d(`p`,w,s(o(T)(`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(T)(`cloudOnboarding.skipToCloudApp`)},null,8,[`label`])):n(``,!0)])]))}});export{T as default};
//# sourceMappingURL=CloudSubscriptionRedirectView-FyjhMqeR.js.map