PageSourceSearch

https://smartcontractauditor.ai/assets/login-CbNALXKY.js

js smartcontractauditor.ai collected 2026-10-05 12:56:37 UTC 8,432 bytes, 1 lines download raw bytes

1import{r as t,at as D,aL as B,u as V,j as e,aM as q,L as r,S as f,az as i,aw as b,aA as l,h as z,an as Y,ao as H,as as T,i as M,B as c,aq as p,E as g,aB as O}from"./index-DJZuVyTC.js";import{I as j}from"./input-CmCeL_gc.js";import{A as U}from"./arrow-left-T0E6zDbk.js";import{R as W}from"./refresh-cw-UcLF5XYY.js";import{E as G}from"./eye-off-BEfU6tFV.js";import{E as J}from"./eye-4sB3_9V3.js";function ee(){var u,h;const[n,w]=t.useState(""),[d,v]=t.useState(""),[o,N]=t.useState(!1),[y,S]=t.useState(!1),[C,L]=t.useState(!1),[,E]=D(),{login:k,isLoginLoading:m,loginError:s,resendVerification:A,isResendVerificationLoading:x,resendVerificationError:P}=B(),{toast:F}=V();t.useEffect(()=>{new URLSearchParams(window.location.search).get("expired")==="true"&&(L(!0),F({title:"Session expired",description:"Your session has expired. Please log in again to continue.",variant:"destructive"}),window.history.replaceState({},"","/login"))},[]);const I=async a=>{a.preventDefault();try{const R=await k({email:n,password:d});setTimeout(()=>{E("/dashboard")},500)}catch{}};return e.jsxs("div",{className:"min-h-screen bg-[#0a0b14] relative flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-[#6366f1]/20 rounded-full blur-[120px] animate-pulse-glow"}),e.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-80 h-80 bg-[#8b5cf6]/15 rounded-full blur-[110px] animate-pulse-glow",style:{animationDelay:"2s"}}),e.jsx("div",{className:"absolute top-3/4 right-1/3 w-72 h-72 bg-[#06b6d4]/15 rounded-full blur-[100px] animate-pulse-glow",style:{animationDelay:"4s"}})]}),e.jsxs("div",{className:"relative z-10 flex flex-col h-full",children:[e.jsx(q,{title:"Login - SmartContractAuditor.ai | Sign In to Your Account",description:"Sign in to your SmartContractAuditor.ai account to access AI-powered smart contract analysis, vulnerability scanning, and comprehensive security reports.",noIndex:!0}),e.jsx("div",{className:"w-full px-4 py-4",children:e.jsx("div",{className:"glass-card backdrop-blur-xl border border-white/10 rounded-lg px-6 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(r,{href:"/",className:"flex items-center space-x-2 text-[#8b92b8] hover:text-white transition-colors group",children:[e.jsx(U,{className:"h-5 w-5 group-hover:translate-x-[-2px] transition-transform"}),e.jsx("span",{className:"font-medium",children:"Back to Home"})]}),e.jsxs(r,{href:"/",className:"flex items-center space-x-2 text-white hover:text-[#6366f1] transition-colors",children:[e.jsx("div",{className:"w-6 h-6 bg-gradient-to-br from-[#6366f1] to-[#8b5cf6] rounded flex items-center justify-center cyber-glow",children:e.jsx(f,{className:"h-4 w-4 text-white"})}),e.jsx("span",{className:"font-bold text-lg",children:"SmartContractAuditor.ai"})]})]})})}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md 
1space-y-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mx-auto h-16 w-16 bg-gradient-to-br from-[#6366f1] to-[#8b5cf6] rounded-xl flex items-center justify-center mb-4 cyber-glow gradient-animate",children:e.jsx(f,{className:"h-10 w-10 text-white"})}),e.jsx("h1",{className:"text-3xl font-bold text-white",children:"Welcome Back"}),e.jsx("p",{className:"text-[#8b92b8] mt-2",children:"Sign in to continue your smart contract analysis"})]}),C&&e.jsxs(i,{className:"bg-red-500/10 border border-red-500/30 text-red-400",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx(l,{children:"Your session has expired. Please log in again to continue where you left off."})]}),e.jsxs(z,{className:"glass-card glass-card-hover card-hover-animate border border-[#6366f1]/30",children:[e.jsxs(Y,{children:[e.jsx(H,{className:"text-foreground",children:"Sign In"}),e.jsx(T,{className:"text-muted-foreground",children:"Enter your credentials to access your account"})]}),e.jsxs("form",{onSubmit:I,children:[e.jsxs(M,{className:"space-y-4",children:[s&&((u=s==null?void 0:s.message)==null?void 0:u.includes("verify your email"))&&e.jsx(i,{className:"bg-amber-950 border-amber-700",children:e.jsx(l,{className:"text-amber-200",children:e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"font-medium",children:"📧 Email Verification Required"}),e.jsx("p",{className:"text-sm",children:"Please check your inbox and click the verification link to activate your account."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(c,{type:"button",variant:"outline",size:"sm",onClick:async()=>{try{await A(n),S(!0)}catch{}},disabled:x||!n,className:"bg-amber-900 border-amber-600 text-amber-100 hover:bg-amber-800","data-testid":"button-resend-verification",children:x?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"w-3 h-3 mr-1 animate-spin"}),"Sending..."]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"w-3 h-3 mr-1"}),"Resend Email"]})}),e.jsx(r,{href:"/contact",children:e.jsx(c,{type:"button",variant:"ghost",size:"sm",className:"text-amber-200 hover:text-amber-100 hover:bg-amber-900",children:"Contact Support"})})]})]})})}),y&&e.jsx(i,{className:"bg-green-950 border-green-700",children:e.jsx(l,{className:"text-green-200",children:"✅ Verification email sent! Please check your inbox and spam folder."})}),s&&!((h=s==null?void 0:s.message)!=null&&h.includes("verify your email"))&&e.jsx(i,{variant:"destructive",className:"bg-red-900 border-red-700",children:e.jsx(l,{className:"text-red-200",children:(s==null?void 0:s.message)||"Login failed. Please check your credentials and try again."})}),P&&e.jsx(i,{variant:"destructive",className:"bg-red-900 border-red-700",children:e.jsx(l,{className:"text-red-200",children:"Failed to resend verification email. Please try again or contact support."})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{htmlFor:"email",className:"text-slate-200",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx(p,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-slate-400 h-4 w-4"}),e.jsx(j,{id:"email",type:"email",placeholder:"Enter your email",value:n,onChange:a=>w(a.target.value),required:!0,className:"pl-10 bg-slate-700 border-slate-600 text-white placeholder-slate-400 focus:border-blue-500 focus:ring-blue-500","data-testid":"input-email"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{htmlFor:"password",className:"text-slate-200",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(b,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-slate-400 h-4 w-4"}),e.jsx(j,{id:"password",type:o?"text":"password",placeholder:"Enter your password",value:d,onChange:a=>v(a.target.value),required:!0,className:"pl-10 pr-10 bg-slate-700 border-slate-600 text-white placeholder-slate-400 focus:border-blue-500 focus:ring-blue-500","data-testid":"input-password"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-slate-400 hover:text-slate-300",onClick:()=>N(!o),"data-testid":"button-toggle-password",children:o?e.jsx(G,{className:"h-4 w-4"}):e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(r,{href:"/forgot-password",className:"text-sm text-blue-400 hover:text-blue-300 font-medium underline-offset-2 hover:underline",children:"🔑 Forgot your password?"})})]}),e.jsxs(O,{className:"flex flex-col space-y-4",children:[e.jsx(c,{type:"submit",className:"w-full bg-gradient-to-r from-[#6366f1] to-[#8b5cf6] hover:opacity-90 text-white font-medium py-2 px-4 roun
1ded-lg cyber-glow gradient-animate transition-all",disabled:m,"data-testid":"button-login",children:m?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"animate-spin w-4 h-4 border-2 border-white border-t-transparent rounded-full mr-2"}),"Signing In..."]}):"Sign In"}),e.jsxs("div",{className:"text-center text-sm text-slate-400",children:["Don't have an account?"," ",e.jsx(r,{href:"/signup",className:"text-blue-400 hover:text-blue-300 font-medium underline-offset-2 hover:underline","data-testid":"link-signup",children:"Sign Up"})]})]})]})]}),e.jsx("div",{className:"text-center text-xs text-slate-500",children:e.jsx("p",{children:"Your data is protected with enterprise-grade security"})})]})})]})]})}export{ee 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.