PageSourceSearch

https://kadpo.com.my/_next/static/chunks/app/(site)/login/page-849ddf3b9c04f661.js

js kadpo.com.my collected 2026-10-06 19:10:37 UTC 3,996 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[187],{970:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(5155);function r({message:e="Loading..."}){return(0,a.jsxs)("div",{className:"flex items-center justify-center gap-3 py-12 text-slate-500",children:[(0,a.jsx)("span",{className:"kadpo-spinner","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-[1rem]",children:e})]})}},2747:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var a=t(5155),r=t(2115),n=t(3321),i=t(8500),d=t.n(i),l=t(6831),c=t(970);function o(){let e=(0,n.useRouter)(),s=(0,n.useSearchParams)().get("next")||"/",[t,i]=(0,r.useState)(""),[c,o]=(0,r.useState)(""),[u,x]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1);async function p(a){a.preventDefault(),h(!0),x("");let r=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:c})}),n=await r.json();if(!r.ok){x(n.error||"Login failed"),h(!1);return}(0,l.G)(),e.push(s),e.refresh()}return(0,a.jsx)("div",{className:"site-container px-4 py-10 md:py-14",children:(0,a.jsxs)("div",{className:"mx-auto grid max-w-4xl gap-6 md:grid-cols-2",children:[(0,a.jsxs)("form",{onSubmit:p,className:"kadpo-card overflow-hidden",children:[(0,a.jsxs)("div",{className:"border-b border-[var(--kadpo-border)] bg-gradient-to-b from-slate-50 to-white px-8 py-8 text-center",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-[var(--kadpo-navy)]",children:"Sign In"}),(0,a.jsx)("p",{className:"mt-2 text-[1rem] text-slate-500",children:"Access your member account"})]}),(0,a.jsxs)("div",{className:"space-y-4 p-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",children:"Username"}),(0,a.jsx)("input",{required:!0,className:"kadpo-input",value:t,onChange:e=>i(e.target.value)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1.5 block text-sm font-medium text-slate-700",children:"Password"}),(0,a.jsx)("input",{required:!0,type:"password",className:"kadpo-input",value:c,onChange:e=>o(e.target.value)})]}),u&&(0,a.jsx)("p",{className:"text-center text-sm text-red-600",children:u}),(0,a.jsx)("div",{className:"pt-2 text-center",children:(0,a.jsx)("button",{type:"submit",disabled:m,className:"kadpo-btn-primary disabled:opacity-50",children:m?"Signing in...":"Login"})}),(0,a.jsx)("p",{className:"text-center text-sm",children:(0,a.jsx)(d(),{href:"/forgot-password",className:"text-[#2d5aa0] hover:underline",children:"Forgot Password"})})]})]}),(0,a.jsxs)("div",{className:"kadpo-card flex flex-col justify-center overflow-hidden text-center",children:[(0,a.jsx)("div",{className:"border-b border-[var(--kadpo-border)] bg-gradient-to-b from-[#f0f5ff] to-white px-8 py-8",children:(0,a.jsx)("h2",{className:"text-2xl font-bold tracking-tight text-[var(--kadpo-navy)]",children:"Join KADPO"})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col justify-center p-8",children:[(0,a.jsxs)("p",{className:"text-[1rem] leading-relaxed text-slate-600",children:["Not a member yet? It's free and simple.",(0,a.jsx)("br",{}),"Get instant quotes, track orders, and manage your balance online."]}),(0,a.jsx)("div",{className:"mt-8",children:(0,a.jsx)(d(),{href:"/register",className:"kadpo-btn-primary inline-block",children:"Create Account"})})]})]})]})})}function u(){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(c.A,{message:"Loading sign in..."}),children:(0,a.jsx)(o,{})})}},3321:(e,s,t)=>{"use strict";var a=t(4645);t.o(a,"usePathname")&&t.d(s,{usePathname:function(){return a.usePathname}}),t.o(a,"useRouter")&&t.d(s,{useRouter:function(){return a.useRouter}}),t.o(a,"useSearchParams")&&t.d(s,{useSearchParams:function(){return a.useSearchParams}})},4868:(e,s,t)=>{Promise.resolve().then(t.bind(t,2747))},6831:(e,s,t)=>{"use strict";t.d(s,{G:()=>r,N:()=>a});let a="kadpo-auth-changed";function r(){window.dispatchEvent(new Event(a))}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=4868)),_N_E=e.O()}]);

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.