PageSourceSearch

https://redpandaai.com/_nuxt/WfB1fimY.js

js redpandaai.com collected 2026-10-05 01:28:01 UTC 14,354 bytes, 1 lines download raw bytes

1import{d as B,c as I,m as K,q as F,I as H,b as R,e,z as X,C as Y,o as A,j as u,E as q,J as G,u as J,a as Q,i as b,t as s,f as a,y as P,l as Z,w as j,s as N,x as V,g as E,h as O,_ as ee}from"./B4hK4J7v.js";import{_ as te}from"./0WzGIfUW.js";import"./OmuqJ8O0.js";import{u as se}from"./CjcrTOvE.js";import{u as ie}from"./DS1qkodH.js";const re=new Set(["USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL","USER_ALREADY_EXISTS","EMAIL_ALREADY_EXISTS","ACCOUNT_ALREADY_EXISTS"]);function oe(C){const r=C??{},n=typeof r.status=="number"?r.status:null,l=String(r.code??r.error?.code??"").toUpperCase(),o=String(r.message??r.error?.message??""),f=o.toUpperCase();return n===409||re.has(l)||f.includes("ALREADY EXISTS")?{kind:"existing_user",status:n,code:l,message:o}:l==="PASSWORD_TOO_SHORT"?{kind:"password_too_short",status:n,code:l,message:o}:l==="VALIDATION_ERROR"?{kind:"validation",status:n,code:l,message:o}:{kind:"generic",status:n,code:l,message:o}}const ne={key:0,class:"turnstile-wrap"},le=B({__name:"Turnstile",props:{modelValue:{default:""},siteKey:{default:""},theme:{default:"auto"}},emits:["update:modelValue","verified","expired","error"],setup(C,{expose:r,emit:n}){const l=C,o=n,f=u(null),d=u(null),w=I(()=>l.siteKey.trim());let $=null;function M(){return window.turnstile?Promise.resolve():$||($=new Promise((h,v)=>{const m=document.querySelector('script[src^="https://challenges.cloudflare.com/turnstile/v0/api.js"]');if(m){m.addEventListener("load",()=>h(),{once:!0}),m.addEventListener("error",()=>v(new Error("load")),{once:!0});return}const c=document.createElement("script");c.src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",c.async=!0,c.defer=!0,c.addEventListener("load",()=>h(),{once:!0}),c.addEventListener("error",()=>v(new Error("load")),{once:!0}),document.head.appendChild(c)}),$)}async function g(){!w.value||d.value||(await M(),await Y(),!(!f.value||!window.turnstile)&&(d.value=window.turnstile.render(f.value,{sitekey:w.value,theme:l.theme,callback(h){o("update:modelValue",h),o("verified",h)},"expired-callback"(){o("update:modelValue",""),o("expired")}
1,"error-callback"(){o("update:modelValue",""),o("error")}})))}function x(){!d.value||!window.turnstile||(window.turnstile.reset(d.value),o("update:modelValue",""))}function p(){d.value&&window.turnstile&&window.turnstile.remove(d.value),d.value=null,o("update:modelValue","")}return r({reset:x}),K(()=>{g()}),F(w,()=>{p(),g()}),H(()=>{p()}),(h,v)=>w.value?(A(),R("div",ne,[e("div",{ref_key:"containerRef",ref:f,class:"turnstile-widget"},null,512)])):X("",!0)}}),ae=q(le,[["__scopeId","data-v-ac7e0e42"]]);function de(){const r=G().public,n=u(""),l=u(null),o=I(()=>String(r?.turnstileSiteKey??"").trim()),f=I(()=>!!o.value);function d(){l.value?.reset(),n.value=""}function w(){return n.value?{headers:{"X-Captcha-Response":n.value}}:void 0}return{enabled:f,siteKey:o,token:n,widgetRef:l,reset:d,getFetchOptions:w}}const ce={class:"min-h-screen text-white"},ue={class:"relative mx-auto flex min-h-screen w-full items-center py-16"},me={class:"grid w-full grid-cols-1 gap-12 lg:grid-cols-[0.95fr_1.05fr]"},pe={class:"flex flex-col justify-center"},fe={class:"text-4xl font-extrabold leading-tight md:text-5xl"},ge={class:"block bg-gradient-to-r from-red-400 via-orange-300 to-amber-200 bg-clip-text text-transparent"},he={class:"mt-4 max-w-lg text-lg text-white/70"},ve={class:"mt-10 rounded-3xl border border-white/10 bg-white/[0.06] p-8 shadow-[0_30px_80px_-50px_rgba(0,0,0,0.9)]"},be={class:"mb-6"},we={class:"text-2xl font-bold"},_e={class:"mt-2 text-sm text-white/60"},xe=["disabled"],ye={class:"flex items-center justify-center gap-3"},ke={class:"relative my-6"},$e={class:"relative flex justify-center text-xs uppercase tracking-widest text-white/40"},Se={class:"bg-[#0b0b0d] px-3"},Ee={for:"email",class:"text-sm font-medium text-white/80"},Ce=["placeholder"],Ue={for:"password",class:"text-sm font-medium text-white/80"},Re=["placeholder"],Ae={class:"mt-1.5 text-xs text-white/40"},Ie=["disabled"],Me={key:0},Te={key:1,class:"flex items-center justify-center gap-2"},Ve={class:"mt-6 text-center text-sm text-white/60"},Oe={class:"mt-6 text-center text-xs text-white/40"},Le={class:"flex flex-col justify-center"},Pe={class:"rounded-3xl border border-white/10 bg-white/[0.04] p-10"},je={class:"mb-6"},Ne={class:"text-sm uppercase tracking-[0.3em] text-red-300/70"},Be={class:"mt-3 text-3xl font-extrabold"},De={class:"mt-3 text-white/60"},We={class:"grid gap-4"},ze={class:"rounded-2xl border border-white/10 bg-black/20 p-5"},Ke={class:"flex items-center gap-4"},Fe={class:"text-base font-semibold text-white"},He={class:"text-sm text-white/60"},Xe={class:"rounded-2xl border border-white/10 bg-black/20 p-5"},Ye={class:"flex items-center gap-4"},qe={class:"text-base font-semibold text-white"},Ge={class:"text-sm text-white/60"},Je={class:"rounded-2xl border border-white/10 bg-black/20 p-5"},Qe={class:"flex items-center gap-4"},Ze={class:"text-base font-semibold text-white"},et={class:"text-sm text-white/60"},tt={class:"rounded-2xl border border-white/10 bg-black/20 p-5"},st={class:"flex items-center gap-4"},it={class:"text-base font-semibold text-white"},rt={class:"text-sm text-white/60"},ot={class:"mt-8 rounded-2xl border border-white/10 bg-gradient-to-r from-red-500/10 to-orange-400/10 p-6"},nt={class:"flex items-center justify-between gap-4"},lt={class:"text-sm text-white/60"},at={class:"text-lg font-semibold"},dt={class:"rounded-full bg-white/10 px-4 py-2 text-xs font-semibold text-white/80"},ct={class:"mt-6 flex flex-wrap items-center gap-3 text-xs text-white/50"},ut={class:"rounded-full border border-white/10 px-3 py-1"},mt={class:"rounded-full border border-white/10 px-3 py-1"},pt={class:"rounded-full border border-white/10 px-3 py-1"},wt=B({__name:"register",setup(C){const{t:r}=J(),n=Q(),l=ie(),{enabled:o,siteKey:f,token:d,widgetRef:w,reset:$,getFetchOptions:M}=de(),g=u(""),x=u(""),p=u(!1),h=u(!1),v=u(r("register.modals.failed.title")),m=u("We could not create your account right now. Please try again."),c=u("error"),D=I(()=>c.value==="warning"?[{key:"close",label:r("register.modals.existUser.close"),variant:"secondary",onClick:()=>_(!1)},{key:"signin",label:r("register.modals.existUser.signIn"),variant:"primary",to:"/login"}]:[{key:"close",label:r("register.modals.failed.close"),variant:"secondary",onClick:()=>_(!1)}]),_=t=>{h.value=t},L=u(!1),T=t=>{L.value=t},W=async()=>
1{if(g.value&&x.value){if(o.value&&!d.value){v.value=r("register.modals.failed.title"),m.value="Please complete the security check.",c.value="error",_(!0);return}p.value=!0;try{const t=g.value.split("@")[0]||"User",i=M(),{data:U,error:S}=await l.signUp.email({email:g.value,password:x.value,name:t,callbackURL:`${window.location.origin}${n("/confirm")}`,...i?{fetchOptions:i}:{}});if(S){const y=oe(S);y.kind==="existing_user"?(v.value=r("register.modals.existUser.title"),m.value=r("register.modals.existUser.message"),c.value="warning",_(!0)):(v.value=r("register.modals.failed.title"),c.value="error",y.kind==="password_too_short"?m.value="Password is too short. Use at least 8 characters.":y.kind==="validation"?m.value=y.message||"Please check your email and password, then try again.":m.value="We could not create your account right now. Please try again.",_(!0));return}U&&U.user&&T(!0)}catch{v.value=r("register.modals.failed.title"),m.value="We could not create your account right now. Please try again.",c.value="error",_(!0)}finally{p.value=!1,$()}}},z=async()=>{p.value=!0;const{error:t}=await l.signIn.social({provider:"google",callbackURL:`${window.location.origin}${n("/confirm")}`});t&&(p.value=!1,_(!0))};return se({titleKey:"seo.register.title",descriptionKey:"seo.register.description",keywords:["red panda ai register","ai image generator sign up","free ai art account","red panda ai sign up"]}),(t,i)=>{const U=ae,S=ee,y=te;return A(),R("div",ce,[e("div",ue,[e("div",me,[e("div",pe,[e("h1",fe,[b(s(t.$t("register.hero.title"))+" ",1),e("span",ge,s(t.$t("register.hero.titleHighlight")),1)]),e("p",he,s(t.$t("register.hero.description")),1),e("div",ve,[e("div",be,[e("h2",we,s(t.$t("register.form.title")),1),e("p",_e,s(t.$t("register.form.subtitle")),1)]),e("button",{onClick:P(z,["prevent"]),type:"button",disabled:a(p),class:"w-full rounded-xl bg-white px-6 py-3.5 text-sm font-semibold text-gray-900 shadow-lg transition hover:shadow-xl disabled:opacity-50 disabled:cursor-not-allowed"},[e("span",ye,[i[5]||(i[5]=Z('<svg class="h-5 w-5" viewBox="0 0 24 24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="#4285F4"></path><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"></path><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"></path><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"></path></svg>',1)),b(" "+s(t.$t("register.form.continueWithGoogle")),1)])],8,xe),e("div",ke,[i[6]||(i[6]=e("div",{class:"absolute inset-0 flex items-center"},[e("div",{class:"w-full border-t border-white/10"})],-1)),e("div",$e,[e("span",Se,s(t.$t("register.form.orSignUpWithEmail")),1)])]),e("form",{onSubmit:P(W,["prevent"]),class:"space-y-4"},[e("div",null,[e("label",Ee,s(t.$t("register.form.email")),1),j(e("input",{"onUpdate:modelValue":i[0]||(i[0]=k=>V(g)?g.value=k:null),type:"email",id:"email",required:"",autocomplete:"email",class:"mt-2 w-full rounded-xl border border-white/10 bg-white/5 px-4 py-3 text-white placeholder-white/40 outline-none transition focus:border-red-400/60 focus:ring-2 focus:ring-red-500/20",placeholder:t.$t("register.form.emailPlaceholder",{email:"@"})},null,8,Ce),[[N,a(g)]])]),e("div",null,[e("label",Ue,s(t.$t("register.form.password")),1),j(e("input",{"onUpdate:modelValue":i[1]||(i[1]=k=>V(x)?x.value=k:null),type:"password",id:"password",required:"",autocomplete:"new-password",class:"mt-2 w-full rounded-xl border border-white/10 bg-white/5 px-4 py-3 text-white placeholder-white/40 outline-none transition focus:border-red-400/60 focus:ring-2 focus:ring-red-500/20",placeholder:t.$t("register.form.passwordPlaceholder")},null,8,Re),[[N,a(x)]]),e("p",Ae,s(t.$t("register.form.passwordHint")),1)]),E(U,{ref_key:"turnstileWidgetRef",ref:w,modelValue:a(d),"onUpdate:modelValue":i[2]||(i[2]=k=>V(d)?d.value=k:null),"site-key":a(f),theme:"dark"},null,8,["modelValue","site-key"]),e("button",{type:"submit",disabled:a(p),class:"mt-2 w-full rounded-xl bg-gradient-to-r from-red-500 to-red-600 px-6 py-3.5 text-base font-semibold text-white shadow-lg shadow-red-500/30 transition hover:from-red-400 hover:to-red-500 hover:shadow-red-500/40 disabled:opacity-50 disabled:cursor-not-allowed"},[a(p)?(A(),R("span",Te,[i[7]||(i[7]=e("svg",{class:"h-5 w-5 animate-spin",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),b(" "+s(t.$t("register.form.createAccount")),1)])):(A(),R("span",Me,s(t.$t("register.form.createAccount")),1))],8,Ie)],32),e("p",Ve,[b(s(t.$t("register.form.signInLink"))+" ",1),E(S,{to:a(n)("/login"),
1class:"font-semibold text-red-300 hover:text-red-200"},{default:O(()=>[b(s(t.$t("register.form.signIn")),1)]),_:1},8,["to"])]),e("p",Oe,[b(s(t.$t("register.form.terms"))+" ",1),E(S,{to:a(n)("/terms-and-conditions"),class:"text-red-300 hover:text-red-200"},{default:O(()=>[b(s(t.$t("register.form.termsOfService")),1)]),_:1},8,["to"]),b(" "+s(t.$t("register.form.and"))+" ",1),E(S,{to:a(n)("/privacy"),class:"text-red-300 hover:text-red-200"},{default:O(()=>[b(s(t.$t("register.form.privacyPolicy")),1)]),_:1},8,["to"])])])]),e("div",Le,[e("div",Pe,[e("div",je,[e("p",Ne,s(t.$t("register.benefits.kicker")),1),e("h2",Be,s(t.$t("register.benefits.title")),1),e("p",De,s(t.$t("register.benefits.subtitle")),1)]),e("div",We,[e("div",ze,[e("div",Ke,[i[8]||(i[8]=e("div",{class:"flex h-11 w-11 items-center justify-center rounded-xl bg-red-500/20 text-red-200"}," 🚀 ",-1)),e("div",null,[e("p",Fe,s(t.$t("register.benefits.items.speed.title")),1),e("p",He,s(t.$t("register.benefits.items.speed.description")),1)])])]),e("div",Xe,[e("div",Ye,[i[9]||(i[9]=e("div",{class:"flex h-11 w-11 items-center justify-center rounded-xl bg-orange-500/20 text-orange-200"}," 🧩 ",-1)),e("div",null,[e("p",qe,s(t.$t("register.benefits.items.tools.title")),1),e("p",Ge,s(t.$t("register.benefits.items.tools.description")),1)])])]),e("div",Je,[e("div",Qe,[i[10]||(i[10]=e("div",{class:"flex h-11 w-11 items-center justify-center rounded-xl bg-amber-500/20 text-amber-200"}," 📚 ",-1)),e("div",null,[e("p",Ze,s(t.$t("register.benefits.items.history.title")),1),e("p",et,s(t.$t("register.benefits.items.history.description")),1)])])]),e("div",tt,[e("div",st,[i[11]||(i[11]=e("div",{class:"flex h-11 w-11 items-center justify-center rounded-xl bg-emerald-500/20 text-emerald-200"}," 💼 ",-1)),e("div",null,[e("p",it,s(t.$t("register.benefits.items.commercial.title")),1),e("p",rt,s(t.$t("register.benefits.items.commercial.description")),1)])])])]),e("div",ot,[e("div",nt,[e("div",null,[e("p",lt,s(t.$t("register.benefits.ctaOverline")),1),e("p",at,s(t.$t("register.benefits.ctaLine")),1)]),e("div",dt,s(t.$t("register.benefits.ctaBadge")),1)])]),e("div",ct,[e("span",ut,s(t.$t("register.benefits.badges.noCard")),1),e("span",mt,s(t.$t("register.benefits.badges.cancel")),1),e("span",pt,s(t.$t("register.benefits.badges.security")),1)])])])])]),E(y,{isOpen:a(L),title:t.$t("register.modals.success.title"),message:t.$t("register.modals.success.message"),variant:"success",actions:[{key:"gotit",label:t.$t("register.modals.success.gotIt"),variant:"primary",onClick:()=>T(!1)}],onClose:i[3]||(i[3]=k=>T(!1))},null,8,["isOpen","title","message","actions"]),E(y,{isOpen:a(h),title:a(v),message:a(m),variant:a(c),actions:a(D),onClose:i[4]||(i[4]=k=>_(!1))},null,8,["isOpen","title","message","variant","actions"])])}}});export{wt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.