PageSourceSearch

https://vitrtualtwinning.ai/assets/SignInPage-23e196cd.js

js vitrtualtwinning.ai collected 2026-10-05 14:47:08 UTC 3,431 bytes, 1 lines download raw bytes

1import{e as I,g as k,f as A,r as m,b as L,j as e,m as E,a as x,I as p,B as h,L as g,S as C,d as D,s as F}from"./index-c2671603.js";import{E as P,a as U}from"./eye-64013272.js";const W=()=>{const{signIn:b}=I(),{loginWithUnstoppable:w,udLoading:n}=k(),{toast:l}=A(),[s,v]=m.useState({login:"",password:""}),[o,c]=m.useState(!1),[a,j]=m.useState(!1),f=L(),u=d=>{const{id:t,value:i}=d.target;v(r=>({...r,[t]:i}))},y=async d=>{d.preventDefault(),c(!0);let t=s.login;if(!s.login.includes("@")){const{data:r,error:S}=await F.rpc("get_email_by_username",{p_username:s.login});if(S||!r){l({title:"Activation Failed",description:"Invalid username or password.",variant:"destructive"}),c(!1);return}t=r}const{error:i}=await b(t,s.password);i?(l({title:"Activation Failed",description:i.message||"Invalid username or password.",variant:"destructive"}),c(!1)):(l({title:"Activation Successful! ✅",description:"Welcome back! Redirecting you now..."}),f("/profile"))},N=async()=>{await w()};return e.jsx("div",{className:"min-h-screen flex items-center justify-center p-4 main-bg",children:e.jsx(E.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.5},className:"w-full max-w-md",children:e.jsxs("div",{className:"glass rounded-2xl p-8 shadow-2xl",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold animate-gradient-text",children:"Activate"}),e.jsx("p",{className:"text-gray-300 mt-2",children:"Welcome back to One Putt Digital."})]}),e.jsxs("form",{onSubmit:y,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx(x,{htmlFor:"login",className:"text-gray-300",children:"Username or Email"}),e.jsx(p,{id:"login",type:"text",value:s.login,onChange:u,className:"bg-black/20 border-gray-600 text-white",required:!0})]}),e.jsxs("div",{children:[e.jsx(x,{htmlFor:"password",className:"text-gray-300",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(p,{id:"password",type:a?"text":"password",value:s.password,onChange:u,className:"bg-black/20 border-gray-600 text-white pr-10",required:!0}),e.jsx("button",{type:"button",onClick:()=>j(!a),className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-400 hover:text-white","aria-label":a?"Hide password":"Show password",children:a?e.jsx(P,{className:"h-5 w-5"}):e.jsx(U,{className:"h-5 w-5"})})]})]}),e.jsxs(h,{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-700 text-white",size:"lg",disabled:o||n,children:[o&&e.jsx(g,{className:"mr-2 h-4 w-4 animate-spin"}),"Activate"]})]}),e.jsxs("div",{className:"relative my-6",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-gray-600"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-gray-800/60 px-2 text-gray-400 backdrop-blur-sm",children:"Or continue with"})})]}),e.jsxs(h,{onClick:N,variant:"outline",className:"w-full bg-purple-600/20 border-purple-500 hover:bg-purple-600/40 text-white",size:"lg",disabled:o||n,children:[n&&e.jsx(g,{className:"mr-2 h-4 w-4 animate-spin"}),e.jsx(C,{className:"mr-2 h-5 w-5"}),"Sign In with Unstoppable"]}),e.jsxs("p",{className:"text-center text-sm text-gray-400 mt-6",children:["Don't have an account?"," ",e.jsx(D,{to:"/signup",className:"font-medium text-blue-400 hover:underline",children:"Create Account"})]})]})})})};export{W 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.