import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{$n as n,Lr as r,Nn as i,Qn as a,Sr as o,Ut as s,Wt as c,Yr as l,Zn as u,_n as d,er as f,ii as p,ir as m,li as h,or as g,rr as _,vn as v,yr as y}from"./vendor-primevue-D1-E3-0M.js";import{an as b,at as x,in as S,it as C,rn as w}from"./vendor-other-CT05lTmi.js";import{fn as T,hn as E,mn as D,pn as O}from"./api-DvJuMrZn.js";import{n as k,t as A}from"./Button-DXEyozJJ.js";import{an as j,fo as ee,h as te,m as ne,on as re,po as ie,v as M,y as N}from"./dialogService-DIdX_hbW.js";import{n as P,t as F}from"./_plugin-vue_export-helper-DrrwuIjt.js";import{n as I,t as L}from"./previousFullPath-BpgT7F4a.js";var R,z,B,V,H,U,W,G,K,q,J,Y,X,Z,Q=t((()=>{i(),s(),d(),C(),w(),te(),k(),ee(),I(),D(),j(),T(),M(),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}=x(),i=b(),s=S(),d=ie(),g=globalThis.isSecureContext,C=l(``),w=l(!1),T=O(),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()=>{C.value=``,await d.signInWithGoogle()&&await onSuccess()},signInWithGithub=async()=>{C.value=``,await d.signInWithGithub()&&await onSuccess()},signUpWithEmail=async e=>{C.value=``,await d.signUpWithEmail(e.email,e.password)&&await onSuccess()};return y(async()=>{E&&re()?.trackSignupOpened(),w.value=await N()}),(e,i)=>(o(),f(`div`,R,[u(`div`,z,[u(`div`,B,[u(`h1`,V,h(p(t)(`auth.signup.title`)),1),u(`p`,H,[u(`span`,U,h(p(t)(`auth.signup.alreadyHaveAccount`)),1),u(`span`,{class:`ml-1 cursor-pointer text-blue-500`,onClick:navigateToLogin},h(p(t)(`auth.signup.signIn`)),1)])]),p(g)?n(``,!0):(o(),a(p(v),{key:0,severity:`warn`,class:`mb-4`},{default:r(()=>[_(h(p(t)(`auth.login.insecureContextWarning`)),1)]),_:1})),w.value?(o(),a(p(v),{key:1,severity:`warn`,class:`mb-4`},{default:r(()=>[_(h(p(t)(`auth.signup.regionRestrictionChina`)),1)]),_:1})):(o(),a(ne,{key:2,"auth-error":C.value,onSubmit:signUpWithEmail},null,8,[`auth-error`])),m(p(c),{align:`center`,layout:`horizontal`,class:`my-8`},{default:r(()=>[u(`span`,W,h(p(t)(`auth.login.orContinueWith`)),1)]),_:1}),u(`div`,G,[m(A,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGoogle},{default:r(()=>[i[0]||=u(`i`,{class:`pi pi-google mr-2`},null,-1),_(` `+h(p(t)(`auth.signup.signUpWithGoogle`)),1)]),_:1}),m(A,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGithub},{default:r(()=>[i[1]||=u(`i`,{class:`pi pi-github mr-2`},null,-1),_(` `+h(p(t)(`auth.signup.signUpWithGithub`)),1)]),_:1})]),u(`div`,K,[_(h(p(t)(`auth.login.termsText`))+` `,1),u(`a`,q,h(p(t)(`auth.login.termsLink`)),1),_(` `+h(p(t)(`auth.login.andText`))+` `,1),u(`a`,J,h(p(t)(`auth.login.privacyLink`)),1),i[3]||=_(`. `),u(`p`,Y,[_(h(p(t)(`cloudWaitlist_questionsText`))+` `,1),u(`a`,X,h(p(t)(`cloudWaitlist_contactLink`)),1),i[2]||=_(`. `)])])])]))}})})),ae=t((()=>{})),$;t((()=>{Q(),Q(),ae(),P(),$=F(Z,[[`__scopeId`,`data-v-89909ff5`]])}))();export{$ as default};
//# sourceMappingURL=CloudSignupView-pLFPgXOr.js.map