1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[132],{83493:function(e,t,s){Promise.resolve().then(s.bind(s,77896))},77896:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return v}});var r=s(57437),a=s(2265),n=s(30982),l=s(5279),c=s(47907),i=s(65343),o=s(89792),d=s(45179),x=s(85754),u=s(90684),m=s(51652),h=s(51930),f=s(37841),b=s(473),p=s(9744),g=s(20703),j=s(84880);function v(){let e=(0,n.useTranslations)(),t=(0,l.tv)(),s=(0,c.useRouter)(),v=(0,c.useSearchParams)(),{login:N}=(0,o.a)(),[y,w]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[C,E]=(0,a.useState)(""),[P,Z]=(0,a.useState)(""),[_,L]=(0,a.useState)(""),[T,O]=(0,a.useState)(!1),U=y||S,R=(0,j.Cz)(v.get("next")),q=()=>{R?s.push(R):t.push({pathname:"/learn/watch",query:{login:"true"}})},z=async()=>{try{if(L(""),!C||!P){L(e("fillAllFields"));return}w(!0);let t=await (0,i.x4)(C.trim(),P);if(t.success){let e=await (0,i.PR)();e&&(await N(e),q())}else{let s="string"==typeof t.message?t.message:e("loginFailed");L(e(s))}}catch(t){L(e("unexpectedError"))}finally{w(!1)}};return(0,r.jsx)("section",{className:"min-h-screen flex justify-center py-8 px-4 mt-16",children:(0,r.jsx)("div",{className:"w-full max-w-sm",children:(0,r.jsxs)("div",{className:"bg-surface-raised backdrop-blur-sm rounded-2xl p-8 border border-border-subtle",children:[(0,r.jsx)("div",{className:"flex justify-center mb-6",children:(0,r.jsx)("div",{className:"w-14 h-14 rounded-2xl bg-surface-raised flex items-center justify-center border border-border-subtle",children:(0,r.jsx)(g.default,{src:"/images/icon.png",alt:"Lingosive",width:32,height:32,className:"rounded-lg"})})}),(0,r.jsx)("h1",{className:"text-2xl font-semibold text-content text-center mb-2",children:e("welcomeBack")}),(0,r.jsxs)("p",{className:"text-content-muted text-sm text-center mb-8",children:[e("dontHaveAccount")||"Don't have an account yet?"," ",(0,r.jsx)(l.rU,{href:R?{pathname:"/register",query:{next:R}}:"/register",className:"text-blue-400 hover:underline",children:e("register")||"Sign up"})]}),(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault(),z()},className:"space-y-4",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(u.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-content-faint"}),(0,r.jsx)(d.I,{type:"email",placeholder:e("email"),value:C,onChange:e=>E(e.target.value),disabled:U,className:"pl-11 h-12 bg-surface-sunken border-border-subtle text-content placeholder-gray-500 rounded-xl"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(m.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-content-faint"}),(0,r.jsx)(d.I,{type:T?"text":"password",placeholder:e("password"),value:P,onChange:e=>Z(e.target.value),disabled:U,className:"pl-11 pr-11 h-12 bg-surface-sunken border-border-subtle text-content placeholder-gray-500 rounded-xl"}),(0,r.jsx)("button",{type:"button",onClick:()=>O(!T),className:"absolute right-3 top-1/2 -translate-y-1/2 text-content-faint hover:text-content-muted",children:T?(0,r.jsx)(h.Z,{className:"w-5 h-5"}):(0,r.jsx)(f.Z,{className:"w-5 h-5"})})]}),_&&(0,r.jsx)("div",{className:"text-red-400 text-sm text-center bg-red-500/10 py-2 px-4 rounded-lg",children:_}),(0,r.jsx)(x.z,{type:"submit",disabled:U,className:"w-full h-12 bg-blue-600 hover:bg-blue-700 text-brand-contrast font-medium rounded-xl",children:y?(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),e("loading")]}):e("login")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4 my-6",children:[(0,r.jsx)("div",{className:"flex-1 h-px bg-surface-raised"}),(0,r.jsx)("span",{className:"text-content-faint text-sm",children:e("or")||"OR"}),(0,r.jsx)("div",{className:"flex-1 h-px bg-surface-raised"})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(b.Z,{redirectTo:R,onLoginStart:()=>{L(""),k(!0)},onLoginComplete:()=>k(!1),onError:e=>{L(e),k(!1)}}),(0,r.jsx)(p.Z,{disabled:U,redirectTo:R,onLoginStart:()=>{L(""),k(!0)},onLoginComplete:()=>k(!1),onError:e=>{L(e),k(!1)}})]}),(0,r.jsxs)("p",{className:"text-xs text-content-faint text-center mt-6",children:[e("agreeToTermsPrefix")," ",(0,r.jsx)(l.rU,{href:"/terms",className:"text-content-muted hover:underline",children:e("termsOfService")})," ",e("and")," ",(0,r.jsx)(l.rU,{href:"/privacy",className:"text-content-muted hover:underline",children:e("privacyPolicy")})]}),(0,r.jsx)("div",{className:"text-center mt-4",children:(0,r.jsx)(l.rU,{href:"/forgot-password",className:"text-content-muted hover:text-content text-sm",children:e("forgotPassword")})})]})})})}}},function(e){e.O(0,[7699,680,3107,9703,3661,982,5250,654,1749,9159,8286,9792,9933,2971,8069,1744],function(){return e(e.s=83493)}),_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.