PageSourceSearch

https://shaastra.org/assets/login-CrXU46jt.js

js shaastra.org collected 2026-10-03 21:18:07 UTC 4,872 bytes, 3 lines download raw bytes

1import{r as c,a as h,l as y,Q as w,j as e,L as d,T as a}from"./index-CJTTSP1I.js";const f=()=>e.jsx("style",{children:`
2      @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
3    `}),v=()=>{const[o,m]=c.useState(""),[i,p]=c.useState(""),g=h(),n=y(),[b,{loading:l}]=w(),u=async t=>{var x;t.preventDefault();try{const s=await b({variables:{data:{email:o,password:i}}});(x=s.data)!=null&&x.loginUser.token&&(localStorage.setItem("authToken",s.data.loginUser.token),await n.clearStore(),await n.resetStore(),a.success("ACCESS GRANTED! WELCOME TO THE WORLD"),g("/profile"))}catch(s){console.error("Login failed",s);const r=s.message.replace("GraphQL error: ","");r.includes("Invalid")||r.includes("password")?a.error("ACCESS DENIED: WRONG PASSWORD"):r.includes("Account not found")?a.error("USER NOT FOUND. SIGN UP FIRST?"):r.includes("verified")?a.warning("EMAIL NOT VERIFIED. CHECK INBOX."):a.error("SYSTEM FAILURE: "+r)}};return e.jsxs(e.Fragment,{children:[e.jsx(f,{}),e.jsx("div",{className:"font-press-start bg-black text-white min-h-screen flex items-center justify-center overflow-hidden relative p-4",style:{backgroundImage:"url('shaastra-home-page-bg.jpg')",backgroundRepeat:"repeat",backgroundSize:"200px",imageRendering:"pixelated"},children:e.jsx("div",{className:" font-press-start text-white min-h-screen flex items-center justify-center relative overflow-hidden p-3 sm:p-6",children:e.jsxs("div",{className:"relative z-10 w-full max-w-[1100px] grid grid-cols-1 md:grid-cols-2 border-4 border-gray-500 shadow-lg rounded-none",style:{backgroundColor:"rgba(0, 0, 0, 0.7)",backdropFilter:"blur(6px)"},children:[e.jsxs("div",{className:"hidden md:flex flex-col justify-center items-center border-b-4 md:border-b-0 md:border-r-4 border-gray-500 px-5 py-10 sm:py-16 md:py-20",children:[e.jsx("div",{className:"text-[32px] sm:text-[40px] lg:text-[64px] font-bold text-yellow-400 text-center tracking-wide mb-4 sm:mb-6",style:{textShadow:"4px 4px 0 #000"},children:"SHAASTRA"}),e.jsx("div",{className:"text-[20px] sm:text-[28px] lg:text-[32px] font-bold text-white text-center my-3 sm:my-6",children:"2026"}),e.jsx("div",{className:"w-40 sm:w-[200px] h-20 sm:h-[100px] bg-black border-4 border-gray-400 flex items-center justify-center my-5",children:e.jsx("span",{className:"text-yellow-400 text-lg sm:text-2xl md:text-3xl",children:"READY"})}),e.jsxs("div",{className:"flex justify-center gap-3 sm:gap-4 mt-4",children:[e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-yellow-700 border-2 border-black"}),e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-yellow-500 border-2 border-black"}),e.jsx("div",{className:"w-6 h-6 sm:w-8 sm:h-8 bg-gray-400 border-2 border-black"})]})]}),e.jsxs("div",{className:"flex flex-col justify-center px-5 py-10 sm:px-8 md:px-12 lg:px-16",children:[e.jsxs("div",{className:"mb-10 text-center",children:[e.jsx("h1",{className:"text-[22px] sm:text-[28px] md:text-[32px] font-bold text-yellow-400 mb-3",style:{textShadow:"3px 3px 0 #000"},children:"PLAYER LOGIN"}),e.jsx("p",{className:"text-[12px] sm:text-[14px] text-gray-300 tracking-wide",children:"Enter the Arena"})]}),e.jsxs("form",{onSubmit:u,children:[e.jsx("label",{className:"block text-[10px] sm:text-[12px] text-gray-400 mb-3 tracking-wide uppercase",children:"Email"}),e.jsx("input",{type:"text",className:"w-full p-3 sm:p-4 bg-gray-800 border-2 border-gray-500 text-white text-xs sm:text-sm outline-none focus:border-yellow-400 transition-all duration-300",placeholder:"Enter your player ID",value:o,onChange:t=>m(t.target.value),required:!0}),e.jsx("label",{className:"block text-[10px] sm:text-[12px] text-gray-400 mb-3 tracking-wide uppercase mt-2",children:"PASSWORD"}),e.jsx("input",{type:"password",className:"w-full p-3 sm:p-4 bg-gray-800 border-2 border-gray-500 text-white text-xs sm:text-sm outline-none focus:border-yellow-400 transition-all duration-300",placeholder:"Enter access code",value:i,onChange:t=>p(t.target.value),required:!0}),e.jsx("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center mb-6 text-[10px] sm:text-[12px] gap-3 sm:gap-0 mt-1",children:e.jsx(d,{to:"/forget",className:"text-yellow-400 hover:text-white",children:"Forgot password?"})}),e.jsx("button",{type:"submit",disabled:l,className:`w-full p-3 sm:p-4 text-[14px] sm:text-[16
3px] md:text-[18px] font-bold uppercase border-2 border-gray-500 transition-all duration-300 ${l?"bg-yellow-500 text-black":"bg-gray-200 text-black hover:bg-yellow-400 hover:text-black"} active:bg-gray-400 disabled:opacity-50`,children:l?"LOADING...":"START GAME"}),e.jsxs("div",{className:"text-center mt-6 text-gray-300 text-xs sm:text-sm",children:["New Player?"," ",e.jsx(d,{to:"/signup",className:"text-yellow-400 hover:text-yellow-600 hover:underline hover:cursor-pointer",children:"Create Account"})]})]})]})]})})})]})};export{v 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.