1import{v as G,a as A,w as o,b7 as P,j as e,c as U,L as g,H as z,G as L,a9 as D,X as a,b9 as O,ba as M}from"./index-CRe3mQ38.js";import{P as Q}from"./password-input-BVk14pVd.js";import{Q as B,C as T,G as q,a as H,S as N}from"./index.esm-BIL4N57u.js";import"./eye-off-BKgBTG4L.js";import"./eye-BxF8eAzT.js";import"./index-D24EclUA.js";function $(){const l=G(),{user:i,hydrated:f,activeSuspension:h,setActiveSuspension:S,signIn:k,signInWithGoogle:I}=A(),[n,C]=o.useState(""),[c,E]=o.useState(""),[d,b]=o.useState({}),[u,v]=o.useState(!1),[x,m]=o.useState(null),[j,p]=o.useState(null);o.useEffect(()=>{P().then(r=>{r.google_client_id?m(r.google_client_id):m("78099706254-jljpuvglo832jh8qu72ugiss1haacrdr.apps.googleusercontent.com")}).catch(()=>m("78099706254-jljpuvglo832jh8qu72ugiss1haacrdr.apps.googleusercontent.com"))},[]),o.useEffect(()=>{f&&i&&(i.role==="admin"||i.email==="[email protected]"?l({to:"/admin/dashboard",replace:!0}):i.role==="support_admin"?l({to:"/support-admin/dashboard",replace:!0}):l({to:"/dashboard",replace:!0}))},[f,i,l]);const w=r=>{const s=sessionStorage.getItem("collab_invite_token");if(s){l({to:"/accept-invite",search:{token:s}});return}const t=r||i;t?.role==="admin"||t?.email==="[email protected]"?l({to:"/admin/dashboard"}):t?.role==="support_admin"?l({to:"/support-admin/dashboard"}):l({to:"/dashboard"})},_=async r=>{r.preventDefault();const s={};if(/^\S+@\S+\.\S+$/.test(n)||(s.email="Enter a valid email address"),c.length<4&&(s.password="Enter your password"),b(s),!Object.keys(s).length){v(!0);try{const t=await k(n,c);if(!t.ok){if(t.code==="ACCOUNT_SUSPENDED"||t.suspendedInfo){p(t.suspendedInfo||{email:n,reason:typeof t.error=="string"?t.error:"Account suspended by administrator"});return}const y=typeof t.error=="string"?t.error:"Login failed";a.error(y),b({password:y});return}a.success("Signed in â welcome back"),w(t.user)}finally{v(!1)}}};return e.jsxs("div",{className:"flex min-h-screen w-full bg-black font-sans",children:[e.jsxs("div",{className:"hidden lg:flex lg:w-[45%] flex-col items-center relative overflow-hidden p-8 lg:p-12 text-white min-h-screen",children:[e.jsx("div",{className:"text-[14px] text-white/60 tracking-wide mt-2 text-center relative z-30",children:"Quantum design made simple â intelligent solutions for you."}),e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-start relative w-full h-full",children:[e.jsxs("h1",{className:"text-[36px] xl:text-[48px] font-bold leading-[1.05] tracking-tight mt-24 xl:mt-32 z-30 font-['Mulish'] text-white text-center",children:["Design",e.jsx("br",{}),"Your Quantum Chips"]}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] rounded-full border border-white/30 pointer-events-none z-10"}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[400px] h-[400px] rounded-full border border-white/30 pointer-events-none z-10"}),e.jsx("div",{className:"absolute -bottom-8 -left-8 z-20 drop-shadow-[0_0_60px_rgba(255,255,255,0.15)]",children:e.jsx(B,{})})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col bg-white lg:rounded-l-[2.5rem] p-6 lg:p-10 xl:p-12 relative overflow-hidden shadow-2xl min-h-screen z-30",children:[e.jsxs("div",{className:"flex justify-between items-center w-full",children:[e.jsx(U,{className:"h-6"}),e.jsxs(g,{to:"/sign-up",className:"flex items-center gap-2 text-[15px] text-gray-600 hover:text-black font-medium transition-colors",children:[e.jsx(T,{className:"w-5 h-5 text-gray-400"}),"Sign Up"]})]}),e.jsxs("div",{className:"flex-1 flex flex-col justify-center w-full max-w-[400px] mx-auto mt-12 mb-8",children:[e.jsx("h2",{className:"text-[36px] font-medium text-black tracking-tight mb-12 font-display",children:"Sign In"}),e.jsxs("form",{onSubmit:_,className:"space-y-6",noValidate:!0,children:[e.jsxs("div",{children:[e.jsx(z,{id:"email",type:"email",value:n,onChange:r=>C(r.target.value),className:"h-12 rounded-full px-6 bg-white border border-gray-200 text-[15px] placeholder:text-gray-500 focus-visible:ring-1 focus-visible:ring-blue-600",placeholder:"Email or Username"}),d.email&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:d.email})]}),e.jsxs("div",{children:[e.jsx(Q,{id:"password",value:c,onChange:r=>E(r.target.value),className:"h-12 rounded-full px-6 bg-white border border-gray-200 text-[15px] placeholder:text-gray-500 pr-12 focus-visible:ring-1 focus-visible:ring-blue-600",placeholder:"Password"}),d.password&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:d.password})]}),e.jsx("div",{children:e.jsx(g,{to:"/forgot-password",className:"text-[14px] font-medium text-blue-600 hover:underline",children:"Forgot password?"})}),e.jsxs(L,{type:"submit",disabled:u,className:"w-full h-12 rounded-full bg-gradient-to-r from-blue-600 to-blue-500 hover:opacity-90 text-white font-medium text-[16px] flex items-center justify-center gap-2 shadow-md",children:[u?"Signing inâ¦":"Sign In",!u&&e.jsx(D,{className:"w-5 h-5"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-8 pt-8 border-t border-gray-100 items-center",children:[x===null?e.jsx("div",{className:"h-[40px] w-full animate-pulse rounded-full bg-gray-100"}):x?e.jsx(q,{clientId:x,children:e.jsx("div",{className:"w-full flex items-center justify-center h-[40px] [&>div]:w-full",children:e.jsx(H,{onSuccess:async r=>{if(r.credential){const s=await I(r.credential);if(!s.ok){if(s.code==="ACCOUNT_SUSPENDED"||s.suspendedInfo){p(s.suspendedInfo||{email:"",reason:typeof s.error=="string"?s.error:"Account suspended by administrator"});return}const t=typeof s.error=="string"?s.error:"Google sign in failed";a.error(t);return}a.success("Signed in with Google!"),w(s.user)}},onError:()=>{a.error("Google sign in failed")},theme:"outline",shape:"pill",size:"large",width:"100%",logo_alignment:"center"})})}):e.jsx(N,{provider:"google",label:"Google",disabled:!0}),e.jsx(N,{provider:"github",label:"GitHub",onClick:O})]})]})]}),e.jsxs("div",{className:"flex justify-between items-center w-full mt-auto pt-6 text-[13px] text-gray-500 font-medium",children:[e.jsx("div",{children:"© 2005-2026 Silicofeller Inc."}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsx(g,{to:"/support",className:"hover:text-black transition-colors",children:"Contact Us"}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-black transition-colors",children:["English",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"m6 9 6 6 6-6"})})]})]})]})]}),e.jsx(M,{isOpen:!!(j||h),info:j||h,onClose:()=>{p(null),S(null)}})]})}export{$ as component};
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.