import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{$n as n,Cr as r,Nn as i,Qn as a,Rr as o,Ut as s,Wt as ee,Xr as c,Zn as l,_n as u,ai as d,ar as f,br as p,er as m,ir as h,sr as g,ui as _,vn as v}from"./vendor-primevue-D50rA9nL.js";import{cn as y,ln as b,ot as x,sn as S,st as C}from"./vendor-other-BnH5nyVX.js";import{an as w,in as T,on as E,sn as D}from"./api-z_dXWY_S.js";import{n as O,t as k}from"./Button-DzMg17Os.js";import{C as A,D as te,E as ne,Oo as re,S as ie,in as j,ko as M,rn as N}from"./dialogService-Cr3DyAja.js";import{n as P,t as F}from"./_plugin-vue_export-helper-Ckv1EJQX.js";import{n as I,t as L}from"./previousFullPath-D16Vbmo4.js";var R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q=t((()=>{i(),s(),u(),x(),S(),A(),O(),re(),I(),E(),N(),T(),ne(),R={class:`flex h-full items-center justify-center p-8`},z={class:`max-w-screen p-2 lg:w-96`},B={class:`mb-8 flex flex-col gap-4`},V={class:`my-0 text-xl leading-normal font-medium`},H={class:`my-0 text-base`},U={class:`text-muted`},W={class:`text-muted`},G={class:`flex flex-col gap-6`},K={class:`mt-5 text-sm text-gray-600`},q={href:`https://www.comfy.org/terms-of-service`,target:`_blank`,class:`cursor-pointer text-blue-400 no-underline`},J={href:`/privacy-policy`,target:`_blank`,class:`cursor-pointer text-blue-400 no-underline`},Y={class:`mt-2`},X={href:`https://support.comfy.org`,class:`cursor-pointer text-blue-400 no-underline`,target:`_blank`,rel:`noopener noreferrer`},Z=g({__name:`CloudSignupView`,setup(e){let{t}=C(),i=b(),s=y(),u=M(),g=globalThis.isSecureContext,x=c(``),S=c(!1),T=w(),navigateToLogin=async()=>{await i.push({name:`cloud-login`,query:s.query})},onSuccess=async()=>{T.add({severity:`success`,summary:`Sign up Completed`,life:2e3});let e=L(s.query);if(e){await i.replace(e);return}await i.push({path:`/`,query:s.query})},signInWithGoogle=async()=>{x.value=``,await u.signInWithGoogle()&&await onSuccess()},signInWithGithub=async()=>{x.value=``,await u.signInWithGithub()&&await onSuccess()},signUpWithEmail=async e=>{x.value=``,await u.signUpWithEmail(e.email,e.password)&&await onSuccess()};return p(async()=>{D&&j()?.trackSignupOpened(),S.value=await te()}),(e,i)=>(r(),m(`div`,R,[l(`div`,z,[l(`div`,B,[l(`h1`,V,_(d(t)(`auth.signup.title`)),1),l(`p`,H,[l(`span`,U,_(d(t)(`auth.signup.alreadyHaveAccount`)),1),l(`span`,{class:`ml-1 cursor-pointer text-blue-500`,onClick:navigateToLogin},_(d(t)(`auth.signup.signIn`)),1)])]),d(g)?n(``,!0):(r(),a(d(v),{key:0,severity:`warn`,class:`mb-4`},{default:o(()=>[h(_(d(t)(`auth.login.insecureContextWarning`)),1)]),_:1})),S.value?(r(),a(d(v),{key:1,severity:`warn`,class:`mb-4`},{default:o(()=>[h(_(d(t)(`auth.signup.regionRestrictionChina`)),1)]),_:1})):(r(),a(ie,{key:2,"auth-error":x.value,onSubmit:signUpWithEmail},null,8,[`auth-error`])),f(d(ee),{align:`center`,layout:`horizontal`,class:`my-8`},{default:o(()=>[l(`span`,W,_(d(t)(`auth.login.orContinueWith`)),1)]),_:1}),l(`div`,G,[f(k,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGoogle},{default:o(()=>[i[0]||=l(`i`,{class:`pi pi-google mr-2`},null,-1),h(` `+_(d(t)(`auth.signup.signUpWithGoogle`)),1)]),_:1}),f(k,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGithub},{default:o(()=>[i[1]||=l(`i`,{class:`pi pi-github mr-2`},null,-1),h(` `+_(d(t)(`auth.signup.signUpWithGithub`)),1)]),_:1})]),l(`div`,K,[h(_(d(t)(`auth.login.termsText`))+` `,1),l(`a`,q,_(d(t)(`auth.login.termsLink`)),1),h(` `+_(d(t)(`auth.login.andText`))+` `,1),l(`a`,J,_(d(t)(`auth.login.privacyLink`)),1),i[3]||=h(`. `),l(`p`,Y,[h(_(d(t)(`cloudWaitlist_questionsText`))+` `,1),l(`a`,X,_(d(t)(`cloudWaitlist_contactLink`)),1),i[2]||=h(`. `)])])])]))}})})),ae=t((()=>{})),$;t((()=>{Q(),Q(),ae(),P(),$=F(Z,[[`__scopeId`,`data-v-89909ff5`]])}))();export{$ as default};
//# sourceMappingURL=CloudSignupView-BsmYoDnv.js.map