PageSourceSearch

https://cdn.azmen.com/react/v101/chunks/SignupPage.js

js azmen.com collected 2026-09-28 06:30:53 UTC 8,635 bytes, 1 lines download raw bytes

1import{r,o as $,j as e,a as f,X as z,s as P,b as F,d as J,c as Y,G as q,B as H,V as X}from"../app.js";import{s as K,c as R}from"./authActions.js";import{S as n}from"./sentry.js";import{p as Q,u as T,f as M}from"./profileHelpers.js";import{A as ee}from"./AuthLayout.js";import{S as te}from"./SocialLoginModal.js";import{P as se}from"./PasswordStrengthChecklist.js";const ae=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),e.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),oe=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),re=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),ie=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#666",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"}),e.jsx("path",{d:"m1 1 22 22"}),e.jsx("path",{d:"M14.12 14.12a3 3 0 1 1-4.24-4.24"})]});function _(b){const p=new Date(b.metadata.creationTime)<new Date("2026-01-01T00:00:00Z")?"1":"0";document.cookie=`az_legacy_user=${p}; path=/; max-age=86400; SameSite=Strict; Secure`}function ne(){const[b,k]=r.useState(!1),[j,p]=r.useState(!1),[U,N]=r.useState(""),[v,W]=r.useState(""),[m,D]=r.useState(""),[C,I]=r.useState(!1),[A,G]=r.useState(!1),[g,w]=r.useState({open:!1,provider:""}),y=r.useRef(!1),E=varValues.cdn||"cdn.aznude.com",L=new URLSearchParams(window.location.search).get("next"),O=L?`?next=${encodeURIComponent(L)}`:"",h=r.useCallback(a=>N(a),[]),x=r.useCallback(()=>N(""),[]);r.useEffect(()=>{const a=$(f,async o=>{try{n.addBreadcrumb({category:"auth",message:"onAuthStateChanged",level:"info"})}catch{}if(o){try{n.setUser({id:o.uid||void 0,email:o.email||void 0});const s=await o.getIdTokenResult(!0);try{n.setContext("firebaseClaims",s?.claims||{})}catch{}if(s.claims.isBanned)return h("Your account has been permanently banned due to a violation of our Community Guidelines and Terms of Service."),localStorage.removeItem("azn_id"),K(f)}catch(s){try{n.captureException(s,{tags:{area:"auth",op:"getIdTokenResult"}})}catch{}}if(!y.current){let s="/profile.html";try{const t=new URLSearchParams(window.location.search).get("next");if(t){const c=new URL(t,window.location.origin);c.origin===window.location.origin&&(s=c.pathname+c.search+c.hash)}}catch{}window.location.href=s;return}}else try{n.setUser(null)}catch{}k(!1)});return()=>a()},[]);const B=async a=>{a.preventDefault();try{n.addBreadcrumb({category:"auth",message:"email signup submit",level:"info"})}catch{}x();let o="";if(v.length||(o+="Enter a valid email.<br>"),m.length?Q(m)||(o+="Password must be at least 8 characters and meet 3 of 5 strength criteria.<br>"):o+="Enter a valid password.<br>",o)return h(o);p(!0),y.current=!0;try{const t=(await z(f,v,m)).user;if(!t.emailVerified)try{await P(t,{url:varValues.domainFull||window.location.origin})}catch{}const c=F(J,"users/"+t.uid);await Y(c,{id:t.uid,subscribedNewsletter:A});const S=await window.grecaptcha?.execute("6LeGdvEZAAAAAEW8ZT6hkZWJykDD4bHc9EY9Odob",{action:"submit"}),u=await(await fetch(T.signupUser,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:S,uid:t.uid,website:document.querySelector('meta[name="website"]')?.getAttribute("content")})})).json();if(u.status==="ok"){_(t);let l="/profile.html";try{const d=new URLSearchParams(window.location.search).get("next");if(d){const i=new URL(d,window.location.origin);i.origin===window.location.origin&&(l=i.pathname+i.search+i.hash)}}catch{}await R(t),window.location.href=l}else throw new Error(u.errorMessage||"Signup backend error")}catch(s){try{n.captureException(s,{tags:{area:"auth",op:"email-signup"}})}catch{}h(M[s.code]||s.message||"An unknown error occurred.")}finally{p(!1)}},V=async()=>{const o=g.provider==="google"?new q:new H;y.current=!0;try{const t=(await X(f,o)).user;try{n.setUser({id:t.uid||void 0,email:t.email||void 0})}catch{}const{token:c}=await t.getIdTokenResult(!0),S=await window.grecaptcha?.execute("6LeGdvEZAAAAAEW8ZT6hkZWJykDD4bHc9EY9Odob",{action:"submit"}),u=await(await fetch(T.signupWithSocial,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:c,response:S,website:document.querySelector('meta[name="website"]')?.getAttribute("content")})})).json();if(!t.emailVerified)try{await P(t,{url:varValues.domainFull||window.location.origin})}catch{}if(u.status==="ok"){_(t);let l="/profile.html";try{const d=new URLSearchParams(window.location.search).get("next");if(d){const i=new URL(d,window.location.origin);i.origin===window.location.origin&&(l=i.pathname+i.search+i.hash)}}catch{}await R(t),window.location.href=l}else u.status==="error"?h(u.errorMessage):h("An unknown error occurred.")}catch(s){try{n.captureException(s,{tags:{area:"auth",op:"social-signup"},extra:{provider:g.provider}})}catch{}h(M[s.code]||s.message||"An unknown error occurred.")}finally{w({open:!1,provider:""})}};return e.jsxs(ee,{message:U,onDismissMessage:x,loading:b,children:[e.jsxs("div",{className:"card-dark",children:[e.jsx("h1",{className:"text-center mb-6 text-2xl font-bold",children:"SIGN UP"}),e.jsxs("form",{onSubmit:B,className:"max-w-[420px] mx-auto",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{htmlFor:"email",children:"Email"}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("div",{className:"icon-input-left",children:e.jsx(ae,{})}),e.jsx("input",{id:"email",name:"email",type:"email",className:"form-input-dark !pl-9",value:v,onCh
1ange:a=>W(a.target.value),placeholder:"Email address",autoComplete:"username"})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{htmlFor:"password",children:"Password"}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx("div",{className:"icon-input-left",children:e.jsx(oe,{})}),e.jsx("input",{id:"password",name:"password",type:C?"text":"password",className:"form-input-dark !pl-9 pr-10",value:m,onChange:a=>D(a.target.value),placeholder:"Your password",autoComplete:"new-password"}),e.jsx("button",{type:"button",className:"icon-input-right",onClick:()=>I(a=>!a),children:C?e.jsx(ie,{}):e.jsx(re,{})})]}),e.jsx(se,{password:m})]}),e.jsx("div",{className:"mb-5",children:e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:A,onChange:a=>G(a.target.checked),className:"form-checkbox"}),e.jsx("span",{className:"text-sm",children:"Subscribe to our newsletter"})]})}),e.jsx("button",{type:"submit",className:"btn-primary-tw w-full",disabled:j,children:j?"Signing up...":"Sign up"}),e.jsxs("p",{className:"text-center text-xs mt-3",style:{color:"#888"},children:["By signing up, you agree to our"," ",e.jsx("a",{href:"/terms.html",children:"Terms and Condition"}),","," ",e.jsx("a",{href:"/privacy.html",children:"Privacy Policy"})," and"," ",e.jsx("a",{href:"/communityguidelines.html",children:"Community Guidelines"}),"."]}),e.jsxs("p",{className:"text-center text-sm mt-4",children:["Already have an account? ",e.jsx("a",{href:`/signin.html${O}`,children:"Sign in"})]})]}),e.jsx("div",{className:"auth-divider",children:e.jsx("span",{children:"OR"})}),e.jsxs("div",{className:"flex justify-center gap-4",children:[e.jsx("button",{type:"button",className:"social-btn-react",onClick:()=>{x(),w({open:!0,provider:"google"})},children:e.jsx("img",{src:`https://${E}/images/firebase/google.svg`,alt:"Google",width:"24",height:"24"})}),e.jsx("button",{type:"button",className:"social-btn-react",onClick:()=>{x(),w({open:!0,provider:"x"})},children:e.jsx("img",{src:`https://${E}/images/firebase/x-black.svg`,alt:"X",width:"24",height:"24"})})]})]}),e.jsx(te,{isOpen:g.open,provider:g.provider,onConfirm:V,onClose:()=>w({open:!1,provider:""}),showLegal:!0})]})}function ge(){return e.jsx(ne,{})}export{ge 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.