1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="669c175a-62a7-d4c3-b656-f593882cdf27")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,789954,e=>{"use strict";var t=e.i(843476),n=e.i(271645),o=e.i(522016),r=e.i(697815),a=e.i(117927),i=e.i(604570);e.s(["default",0,function(){let{login:e}=(0,r.useAuth)(),[s,l]=(0,n.useState)(""),[d,c]=(0,n.useState)(""),[u,g]=(0,n.useState)(""),[p,h]=(0,n.useState)(!1),[m,f]=(0,n.useState)(!1),[y,x]=(0,n.useState)(!1),[b,j]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("email");t&&l(t),"1"===e.get("reset")&&f(!0)},[]);let v=async t=>{if(t.preventDefault(),!s||!d)return void g("Please enter your email and password.");g(""),h(!0);try{await e(s,d),i.default.identify(s,{email:s}),i.default.capture("user_signed_in",{method:"email"})}catch(e){g(e.message||"Invalid credentials"),i.default.captureException(e)}finally{h(!1)}},B=async e=>{if(e.preventDefault(),!s)return void g("Enter your email address.");g(""),j(!0);let{error:t}=await a.supabase.auth.resetPasswordForEmail(s,{redirectTo:`${window.location.origin}/auth/callback?type=recovery`});(j(!1),t)?g(t.message):(x(!0),i.default.capture("password_reset_requested"))},w=u?(0,t.jsx)("div",{style:{background:"rgba(163,45,45,0.06)",border:"1px solid rgba(163,45,45,0.2)",borderRadius:6,padding:"10px 14px",fontSize:13,color:"var(--accent-red)",marginBottom:16},children:u}):null;return(0,t.jsxs)("div",{style:{minHeight:"100vh",background:"#FAF7F2",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"24px",backgroundImage:"radial-gradient(ellipse 60% 40% at 50% 0%, rgba(127,119,221,0.08) 0%, transparent 70%)",fontFamily:"var(--font-sans, DM Sans), system-ui, sans-serif"},children:[(0,t.jsx)("div",{style:{position:"absolute",top:24,left:24},children:(0,t.jsxs)(o.default,{href:"/",style:{display:"flex",alignItems:"center",gap:6,color:"#6B6899",textDecoration:"none",fontSize:13,fontWeight:500,transition:"color 0.15s",fontFamily:"var(--font-mono, JetBrains Mono), monospace",letterSpacing:"0.02em"},onMouseEnter:e=>e.currentTarget.style.color="#1E1B4B",onMouseLeave:e=>e.currentTarget.style.color="#6B6899",children:[(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M10 3L5 8L10 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),"Back"]})}),(0,t.jsxs)(o.default,{href:"/",style:{textDecoration:"none",display:"flex",alignItems:"center",gap:8,marginBottom:40},children:[(0,t.jsx)("img",{src:"/amazaspend-logo.png",alt:"AmazaSpend logo",style:{height:30,objectFit:"contain"}}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-syne, Syne), system-ui, sans-serif",fontWeight:700,fontSize:17,letterSpacing:"-0.3px",color:"#1E1B4B"},children:"AmazaSpend"})]}),(0,t.jsx)("div",{style:{background:"#FFFFFF",border:"0.5px solid #DEDBD8",borderRadius:"12px",padding:"40px 44px",width:"100%",maxWidth:"420px",boxShadow:"0 2px 16px rgba(30,27,75,0.07), 0 1px 4px rgba(30,27,75,0.04)"},children:m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{marginBottom:6},children:(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono, JetBrains Mono), monospace",fontSize:11,color:"#F59E0B",letterSpacing:"0.04em"},children:"| Password reset"})}),(0,t.jsx)("h1",{style:{fontFamily:"var(--font-syne, Syne), system-ui, sans-serif",fontSize:26,fontWeight:700,color:"#1E1B4B",marginBottom:6,letterSpacing:"-0.02em",lineHeight:1.15},children:"Reset your password"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#6B6899",marginBottom:32,lineHeight:1.5},children:"Enter your email address and we will send you a link to set a new password."}),(0,t.jsxs)("form",{onSubmit:B,noValidate:!0,children:[(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsx)("label",{className:"form-label",htmlFor:"reset-email",children:"Email address"}),(0,t.jsx)("input",{id:"reset-email",type:"email",className:"form-input",placeholder:"[email protected]",value:s,onChange:e=>l(e.target.value),autoComplete:"email",autoFocus:!0})]}),y&&(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",ga
2p:8,background:"rgba(29,158,117,0.08)",border:"1px solid rgba(29,158,117,0.25)",borderRadius:6,padding:"10px 14px",fontSize:13,color:"#0F6E56",marginBottom:16,lineHeight:1.45},children:[(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{flexShrink:0,marginTop:1},"aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.3"}),(0,t.jsx)("path",{d:"M5 8.2L7.1 10.3L11 6.4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,t.jsx)("span",{children:"Reset link sent. Check your email."})]}),w,(0,t.jsx)("button",{type:"submit",disabled:b,style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,background:"#1E1B4B",color:"#FAF7F2",border:"none",borderRadius:4,padding:"13px 24px",fontSize:14,fontWeight:500,cursor:b?"not-allowed":"pointer",fontFamily:"var(--font-sans, DM Sans), sans-serif",opacity:b?.7:1,transition:"background 0.15s ease, transform 0.15s ease"},onMouseEnter:e=>{b||(e.currentTarget.style.background="#3D3A9E")},onMouseLeave:e=>{b||(e.currentTarget.style.background="#1E1B4B")},children:b?"Sendingâ¦":y?"Send it again":"Reset password â"})]}),(0,t.jsx)("p",{style:{textAlign:"center",fontSize:13,color:"#6B6899",marginTop:28},children:(0,t.jsx)("button",{type:"button",onClick:()=>{g(""),x(!1),f(!1)},style:{color:"#3D3A9E",background:"none",border:"none",padding:0,cursor:"pointer",fontFamily:"inherit",fontSize:13,fontWeight:600},children:"Back to sign in"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{marginBottom:6},children:(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono, JetBrains Mono), monospace",fontSize:11,color:"#F59E0B",letterSpacing:"0.04em"},children:"| Welcome back"})}),(0,t.jsx)("h1",{style:{fontFamily:"var(--font-syne, Syne), system-ui, sans-serif",fontSize:26,fontWeight:700,color:"#1E1B4B",marginBottom:6,letterSpacing:"-0.02em",lineHeight:1.15},children:"Sign in to AmazaSpend"}),(0,t.jsx)("p",{style:{fontSize:14,color:"#6B6899",marginBottom:32,lineHeight:1.5},children:"Track your Amazon spending and take control of your habits."}),(0,t.jsxs)("form",{onSubmit:v,noValidate:!0,children:[(0,t.jsxs)("div",{style:{marginBottom:16},children:[(0,t.jsx)("label",{className:"form-label",htmlFor:"email",children:"Email"}),(0,t.jsx)("input",{id:"email",type:"email",className:"form-input",placeholder:"[email protected]",value:s,onChange:e=>l(e.target.value),autoComplete:"email"})]}),(0,t.jsxs)("div",{style:{marginBottom:24},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,t.jsx)("label",{className:"form-label",htmlFor:"password",style:{margin:0},children:"Password"}),(0,t.jsx)("button",{type:"button",onClick:()=>{g(""),x(!1),f(!0)},style:{fontSize:12,color:"#3D3A9E",textDecoration:"none",background:"none",border:"none",cursor:"pointer",padding:0,fontFamily:"inherit",fontWeight:500},children:"Forgot password?"})]}),(0,t.jsx)("input",{id:"password",type:"password",className:"form-input",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:d,onChange:e=>c(e.target.value),autoComplete:"current-password"})]}),w,(0,t.jsx)("button",{type:"submit",disabled:p,style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,background:"#1E1B4B",color:"#FAF7F2",border:"none",borderRadius:4,padding:"13px 24px",fontSize:14,fontWeight:500,cursor:p?"not-allowed":"pointer",fontFamily:"var(--font-sans, DM Sans), sans-serif",opacity:p?.7:1,transition:"background 0.15s ease, transform 0.15s ease"},onMouseEnter:e=>{p||(e.currentTarget.style.background="#3D3A9E")},onMouseLeave:e=>{p||(e.currentTarget.style.background="#1E1B4B")},children:p?"Signing inâ¦":"Sign in â"}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,margin:"20px 0"},children:[(0,t.jsx)("div",{style:{flex:1,height:"0.5px",background:"#DEDBD8"}}),(0,t.jsx)("span",{style:{fontSize:11,color:"#6B6899",fontFamily:"var(--font-mono, JetBrains Mono), monospace",letterSpacing:"0.04em"},children:"or"}),(0,t.jsx)("div",{style:{flex:1,height:"0.5px",background:"#DEDBD8"}})]}),(0,t.jsxs)("button",{type:"button",onClick:async()=>{try{let{data:e,error:t}=await a.supabase.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/auth/callback`}});if(t)return void g(t.message);e?.url?(i.default.capture("user_signed_in",{method:"google"}),window.location.href=e.url):g("Google sign-in is not configured. Please use email/password or contact support.")}catch(e){g(e?.message||"Google sign-in failed"),i.default.captureException(e)}},style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:10,padding:"11px 16px",borderRadius:4,border:"1px solid #DEDBD8",background:"#FAF7F2",curs
2or:"pointer",fontSize:14,fontWeight:500,color:"#1E1B4B",fontFamily:"var(--font-sans, DM Sans), sans-serif",transition:"background 0.15s ease, border-color 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#EEEDF9",e.currentTarget.style.borderColor="#AFA9EC"},onMouseLeave:e=>{e.currentTarget.style.background="#FAF7F2",e.currentTarget.style.borderColor="#DEDBD8"},children:[(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",children:[(0,t.jsx)("path",{fill:"#4285F4",d:"M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"}),(0,t.jsx)("path",{fill:"#34A853",d:"M9 18c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z"}),(0,t.jsx)("path",{fill:"#FBBC05",d:"M3.964 10.71A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.71V4.958H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.042l3.007-2.332z"}),(0,t.jsx)("path",{fill:"#EA4335",d:"M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.958L3.964 6.29C4.672 4.163 6.656 3.58 9 3.58z"})]}),"Continue with Google"]}),(0,t.jsxs)("button",{type:"button",onClick:async()=>{try{let{data:e,error:t}=await a.supabase.auth.signInWithOAuth({provider:"apple",options:{redirectTo:`${window.location.origin}/auth/callback`}});if(t){g("Apple sign-in is not available right now. Please use another option."),i.default.captureException(t);return}e?.url?(i.default.capture("user_signed_in",{method:"apple"}),window.location.href=e.url):g("Apple sign-in is not available right now. Please use another option.")}catch(e){g(e instanceof Error&&e.message?e.message:"Apple sign-in failed"),i.default.captureException(e)}},style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:10,padding:"11px 16px",borderRadius:4,border:"1px solid #000",marginTop:10,background:"#000",cursor:"pointer",fontSize:14,fontWeight:600,color:"#fff",fontFamily:"var(--font-sans, DM Sans), sans-serif",transition:"background 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#1F1F1F"},onMouseLeave:e=>{e.currentTarget.style.background="#000"},children:[(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{fill:"currentColor",d:"M16.365 1.43c0 1.14-.493 2.27-1.177 3.08-.744.9-1.99 1.57-2.987 1.57-.12 0-.23-.02-.3-.03-.01-.06-.04-.22-.04-.39 0-1.15.572-2.27 1.206-2.98.804-.94 2.142-1.64 3.248-1.68.03.13.05.28.05.43zm4.565 15.71c-.03.07-.463 1.58-1.518 3.12-.945 1.34-1.94 2.71-3.43 2.71-1.517 0-1.9-.88-3.63-.88-1.698 0-2.302.91-3.67.91-1.377 0-2.332-1.26-3.428-2.8-1.287-1.82-2.323-4.63-2.323-7.28 0-4.28 2.797-6.55 5.552-6.55 1.448 0 2.675.95 3.6.95.865 0 2.222-1.01 3.902-1.01.613 0 2.886.06 4.374 2.19-.13.09-2.383 1.37-2.383 4.19 0 3.26 2.854 4.42 2.955 4.45z"})}),"Continue with Apple"]})]}),(0,t.jsxs)("p",{style:{textAlign:"center",fontSize:13,color:"#6B6899",marginTop:28},children:["Don't have an account?"," ",(0,t.jsx)(o.default,{href:"/register",style:{color:"#3D3A9E",textDecoration:"none",fontWeight:600},children:"Create an account"})]})]})})]})}])}]); 3 4//# debugId=669c175a-62a7-d4c3-b656-f593882cdf27
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.