PageSourceSearch

https://goexpired.com/assets/Auth-FFnbKL_F.js

js goexpired.com collected 2026-10-09 22:42:18 UTC 10,894 bytes, 1 lines download raw bytes

1import{c as W,r as o,b as U,s as d,j as e,y as B,S as $,Q as z}from"./index-DocTL6Xp.js";const O=1,q="8eead4b4-fd08-4652-a1b3-e1441c3d5318",H="25210763-c931-4df9-aca0-d42b22c5597f",X="/__l5e/assets-v1/8eead4b4-fd08-4652-a1b3-e1441c3d5318/goexpired-four-leaf-logo.png",J="a/v1/25210763-c931-4df9-aca0-d42b22c5597f/8eead4b4-fd08-4652-a1b3-e1441c3d5318/goexpired-four-leaf-logo.png",Q="goexpired-four-leaf-logo.png",V=137807,Z="image/png",K="2026-06-15T22:24:25Z",Y={version:O,asset_id:q,project_id:H,url:X,r2_key:J,original_filename:Q,size:V,content_type:Z,created_at:K},s={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#C96442",accentDark:"#B25438",border:"#E8E5DD",borderStrong:"#D8D3C5"},F="'Inter', system-ui, -apple-system, sans-serif",te=()=>{const P=W(),[g,S]=o.useState(null),[a,v]=o.useState(!0),[f,A]=o.useState(""),[i,C]=o.useState(""),[w,T]=o.useState(""),[u,n]=o.useState(!1),[M,j]=o.useState(!1),[c,E]=o.useState(null),{toast:l}=U(),_="border-0 text-white bg-[#2563EB] [&_div]:!text-white [&_button]:!text-white",m="border border-[#E8C5B6] bg-[#FDF4F0] text-[#9B3412] [&_div]:!text-[#9B3412] [&_button]:!text-[#9B3412]";o.useEffect(()=>{document.title=a?"Sign in - GoExpired.com":"Sign up - GoExpired.com"},[a]),o.useEffect(()=>{const t=new URLSearchParams(window.location.search);t.get("mode")==="signup"&&v(!1);const r=t.get("tier"),x=localStorage.getItem("pendingTier");r==="pro"?(localStorage.setItem("pendingTier","pro"),E("pro"),v(!1)):x==="pro"&&E("pro"),d.auth.getSession().then(({data:{session:p}})=>{S((p==null?void 0:p.user)??null)});const{data:{subscription:h}}=d.auth.onAuthStateChange((p,k)=>{S((k==null?void 0:k.user)??null)});return()=>h.unsubscribe()},[]),o.useEffect(()=>{if(g){const r=new URLSearchParams(window.location.search).get("returnUrl");if(localStorage.getItem("pendingTier")==="pro")window.location.href="/complete-upgrade";else{const h=r?decodeURIComponent(r):"/",p=h.startsWith("/")&&!h.startsWith("//")?h:"/";window.location.href=p}}},[g==null?void 0:g.id]);const N=`${window.location.origin}/auth/callback`,I=async t=>{t.preventDefault(),n(!0);try{if(a){const{error:r}=await d.auth.signInWithPassword({email:i,password:w});if(r)throw r}else{const{data:r,error:x}=await d.auth.signUp({email:i,password:w,options:{emailRedirectTo:N,data:{pending_tier:c==="pro"||c==="pro_yearly"?c:"free",...f?{display_name:f,full_name:f}:{}}}});if(x)throw x;if(r.session){l({title:"Account created!",description:c==="pro"||c==="pro_yearly"?"Continuing to checkout…":"Welcome to GoExpired.",className:_});return}localStorage.setItem("newsletter_email",i),P("/check-email")}}catch(r){l({title:"Something went wrong",description:r.message,variant:"destructive",className:m})}finally{n(!1)}},R=async()=>{if(!i){l({title:"Email required",description:"Please enter your email address.",variant:"destructive",className:m});return}n(!0);try{const{error:t}=await d.auth.signInWithOtp({email:i,options:{emailRedirectTo:N}});if(t)throw t;l({title:"Magic link sent!",description:"Check your email for the login link.",className:_})}catch(t){l({title:"Something went wrong",description:t.message,variant:"destructive",className:m})}finally{n(!1)}},L=async()=>{if(!i){l({title:"Email required",description:"Please enter your email address.",variant:"destructive",className:m});return}n(!0);try{const{error:t}=await d.auth.resetPasswordForEmail(i,{redirectTo:`${window.location.origin}/reset-password`});if(t)throw t;z.success("Password reset email sent",{description:"Check your email for the password reset link."}),j(!1)}catch(t){l({title:"Something went wrong",description:t.message,variant:"destructive",className:m})}finally{n(!1)}},D=async()=>{n(!0);try{const{error:t}=await d.auth.signInWithOAuth({provider:"google",options:{redirectTo:N}});if(t)throw t}catch(t){l({title:"Something went wrong",description:t.message,variant:"destructive",className:m}),n(!1)}},y={backgroundColor:s.bg,border:`1px solid ${s.border}`,color:s.ink,fontFamily:F},b="w-full h-12 px-4 rounded-full text-base outline-none transition-colors focus:border-[#C96442]",G={backgroundColor:s.surface,border:`1px solid ${s.border}`,boxShadow:"0 1px 2px rgba(26,26,26,0.04), 0 8px 32px -16px rgba(26,26,26,0.08)",fontFamily:F};return e.jsxs("div",{className:"min-h-screen flex flex-col",style:{backgroundColor:s.bg,color:s.ink,fontFamily:F},children:[e.jsx("header",{className:"px-6 md:px-8 py-5 border-b",style:{borderColor:s.border},children:e.jsxs("div",{className:"max-w-6xl mx-auto flex items-center justify-between",children:[e.jsx("a",{href:"/",className:"flex items-center",children:e.jsx("img",{src:Y.url,alt:"GoExpired",className:"h-[32px] w-auto"})}),e.jsx("a",{href:"/",className:"text-sm hover:opacity-70 transition-opacity",style:{color:s.inkMuted},children:"← Back to home"})]})}),e.jsx("main",{className:"flex-1 flex items-center justify-center px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-md",children:[e.jsx("div",{className:"rounded-3xl p-8 md:p-10",style:G,children:M?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-semibold tracking-tight mb-2",style:{color:s.ink},children:"Reset your password"}),e.jsx("p",{className:"text-sm",style:{color:s.inkMuted},children:"We'll email you a link to set a new password."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("input",{type:"email",placeholder:"[email protected]",value:i,onChange:t=>C(t.target.value),className:b,style:y}),e.jsx("button",{onClick:L,disabled:u,className:"w-full h-12 rounded-full text-sm font-medium transition-all duration-200 hover:-translate-y-[1px] disabled:opacity-60 disabled:hover:translate-y-0 flex items-center justify-center gap-2",style:{backgroundColor:"#2563EB",color:"#FFFFFF",boxShadow:"0 4px 14px -4px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255,255,255,0.25)"},children:u?e.jsx(B,{className:"h-4 w-4 animate-spin"}):"Send reset email"})]}),e.jsx("div",{className:"text-center mt-6",children:e.jsx("button",{type:"button",onClick:()=>j(!1),className:"text-sm hover:opacity-70 transition-opacity",style:{color:s.inkMuted},children:"Back to sign in"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-semibold tracking-tight mb-2",style:{color:s.ink},children:a?"Welcome back":"Create your account"}),e.jsx("p",{className:"text-sm",style:{color:s.inkMuted},children:a?"Sign in to access curated expired auctions and your appraisals.":c==="pro"?"Create your account - you'll continue to secure checkout right after.":"Free forever. No credit card required."})]}),!a&&c==="pro"&&e.jsxs("div",{className:"flex items-start gap-3 px-4 py-3 rounded-2xl mb-5",style:{backgroundColor:"rgba(37, 99, 235, 0.06)",border:"1px solid rgba(37, 99, 235, 0.2)",color:"#1E3A8A"},children:[e.jsx($,{className:"h-4 w-4 mt-0.5 shrink-0",style:{color:"#2563EB"}}),e.jsxs("div",{className:"text-sm leading-relaxed",children:[e.jsx("div",{className:"font-medium",children:"Signing up for GX PRO"}),e.jsx("div",{className:"text-xs opacity-80",children:"After verifying your email, you'll be sent to secure checkout to activate GX PRO ($9.99/month)."})]})]}),e.jsxs("form",{onSubmit:I,className:"space-y-3",children:[!a&&e.jsx("input",{type:"text",placeholder:"First name",value:f,onChange:t=>A(t.target.value),className:b,style:y}),e.jsx("input",{type:"email",placeholder:"[email protected]",value:i,onChange:t=>C(t.target.value),required:!0,className:b,style:y}),e.jsx("input",{type:"password",placeholder:"Password",value:w,onChange:t=>T(t.target.value),required:!0,className:b,style:y}),e.jsx("button",{type:"submit",disabled:u,className:"w-full h-12 rounded-full text-sm font-medium transition-all duration-200 hover:-translate-y-[1px] disabled:opacity-60 disabled:hover:translate-y-0 flex items-center justify-center gap-2 mt-2",style:{backgroundColor:"#2563EB",color:"#FFFFFF",boxShadow:"0 4px 14px -4px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255,255,255,0.25)"},children:u?e.jsx(B,{className:"h-4 w-4 animate-spin"}):a?"Sign in":"Sign up"})]}),a&&e.jsx("div",{className:"text-center mt-4",children:e.jsx("button",{type:"button",onClick:()=>j(!0),className:"text-sm hover:opacity-70 transition-opacity",style:{color:s.inkMuted},children:"Forgot your password?"})}),e.jsxs("div",{className:"relative my-6",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("div",{className:"w-full border-t",style:{borderColor:s.border}})}),e.jsx("div",{className:"relative flex justify-center",children:e.jsx("span",{className:"px-3 text-xs uppercase tracking-wider",style:{backgroundColor:s.surface,color:s.inkMuted},children:"or"})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("button",{type:"button",onClick:D,disabled:u,className:"w-full h-12 rounded-full text-sm font-medium flex items-center justify-center gap-2 transition-colors hover:bg-[#F2F0E8] disabled:opacity-60",style:{backgroundColor:s.bg,border:`1px solid ${s.border}`,color:s.ink},children:[e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{fill:"#4285F4",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"}),e.jsx("path",{fill:"#34A853",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"}),e.jsx("path",{fill:"#FBBC05",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"}),e.jsx("path",{fill:"#EA4335",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"})]}),"Continue with Google"]}),e.jsx("button",{type:"button",onClick:R,disabled:u,className:"w-full h-12 rounded-full text-sm font-medium transition-colors hover:bg-[#F2F0E8] disabled:opacity-60",style:{backgroundColor:s.bg,border:`1px solid ${s.border}`,color:s.ink},children:"Send magic link"})]}),e.jsx("div",{className:"text-center mt-8",children:e.jsx("button",{type:"button",onClick:()=>v(!a),className:"text-sm hover:opacity-70 transition-opacity",style:{color:s.inkMuted},children:a?e.jsxs(e.Fragment,{children:["Don't have an account? ",e.jsx("span",{style:{color:"#2563EB"},className:"font-medium",children:"Sign up"})]}):e.jsxs(e.Fragment,{children:["Already have an account? ",e.jsx("span",{style:{color:"#2563EB"},className:"font-medium",children:"Sign in"})]})})})]})}),e.jsxs("div",{className:"text-center mt-6 flex justify-center gap-5 text-xs",style:{color:s.inkMuted},children:[e.jsx("a",{href:"/privacy",className:"hover:opacity-70 transition-opacity",children:"Privacy"}),e.jsx("a",{href:"/terms",className:"hover:opacity-70 transition-opacity",children:"Terms"})]})]})})]})};export{te 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.