1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89954,e=>{"use strict";var a=e.i(43476),s=e.i(71645),l=e.i(23409),r=e.i(18566),i=e.i(4575),t=e.i(24415);let n=()=>{let[e,i]=(0,s.useState)(""),[t,n]=(0,s.useState)(""),[o,c]=(0,s.useState)(""),[d,u]=(0,s.useState)(!1),h=(0,r.useSearchParams)().get("redirect"),m=async a=>{a.preventDefault(),u(!0),c("");try{let a=await l.Auth.login({email:e,password:t});a?.data?.token?window.location.href=h||"/":c(a?.message||"Login failed. Please check your credentials.")}catch(e){c("An error occurred. Please try again.")}finally{u(!1)}};return(0,a.jsxs)("form",{className:"login-form",onSubmit:m,children:[(0,a.jsx)("h2",{children:"Login"}),(0,a.jsx)("p",{className:"form-subtitle",children:"Welcome back to Appsmmo"}),o&&(0,a.jsx)("p",{className:"error-message",children:o}),(0,a.jsxs)("div",{className:"form-group",children:[(0,a.jsx)("label",{children:"Email"}),(0,a.jsx)("input",{type:"email",value:e,onChange:e=>i(e.target.value),required:!0,placeholder:"[email protected]"})]}),(0,a.jsxs)("div",{className:"form-group",children:[(0,a.jsx)("label",{children:"Password"}),(0,a.jsx)("input",{type:"password",value:t,onChange:e=>n(e.target.value),required:!0,placeholder:"Enter your password"})]}),(0,a.jsx)("button",{type:"submit",className:"login-btn",disabled:d,children:d?"Logging in...":"Login"}),(0,a.jsx)("div",{className:"form-footer",children:(0,a.jsxs)("p",{children:["Don't have an account? ",(0,a.jsx)("a",{href:"/register",children:"Register here"})]})})]})};e.s(["default",0,()=>(0,a.jsxs)("div",{className:"login-page-wrapper",children:[(0,a.jsx)(i.default,{}),(0,a.jsx)("div",{className:"login-content",children:(0,a.jsx)(s.default.Suspense,{fallback:(0,a.jsx)("div",{className:"loading",children:"Loading..."}),children:(0,a.jsx)(n,{})})}),(0,a.jsx)(t.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.