PageSourceSearch

https://app.citeverse.live/_next/static/chunks/app/login/page-2bbeb329ac09e3da.js

js citeverse.live collected 2026-10-02 00:22:25 UTC 7,419 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2626],{8145:function(e,t,s){Promise.resolve().then(s.bind(s,7057)),Promise.resolve().then(s.bind(s,558)),Promise.resolve().then(s.bind(s,385)),Promise.resolve().then(s.bind(s,7386)),Promise.resolve().then(s.bind(s,753)),Promise.resolve().then(s.bind(s,5044)),Promise.resolve().then(s.bind(s,2343)),Promise.resolve().then(s.bind(s,157)),Promise.resolve().then(s.bind(s,2003)),Promise.resolve().then(s.bind(s,5606)),Promise.resolve().then(s.bind(s,8991)),Promise.resolve().then(s.bind(s,474)),Promise.resolve().then(s.bind(s,2062)),Promise.resolve().then(s.bind(s,7657)),Promise.resolve().then(s.bind(s,3493)),Promise.resolve().then(s.bind(s,3877)),Promise.resolve().then(s.bind(s,5025)),Promise.resolve().then(s.bind(s,5701)),Promise.resolve().then(s.bind(s,3630)),Promise.resolve().then(s.bind(s,6595)),Promise.resolve().then(s.bind(s,5022)),Promise.resolve().then(s.bind(s,4300)),Promise.resolve().then(s.bind(s,2e3)),Promise.resolve().then(s.t.bind(s,6340,23))},5022:function(e,t,s){"use strict";s.d(t,{LoginForm:function(){return h}});var r=s(7573),n=s(7653),a=s(1695),i=s(8357),l=s(8897),o=s(3216),d=s(9276),c=s(1194),m=s(5990),u=s(8257);function h(){let e=(0,a.useSearchParams)(),[t,s]=(0,n.useState)(""),[h,x]=(0,n.useState)(!1),[p,f]=(0,n.useState)(!1),[b,v]=(0,n.useState)(""),[g,y]=(0,n.useState)(""),[w,j]=(0,n.useState)("credentials"),[N,P]=(0,n.useState)(""),[S,k]=(0,n.useState)(0),_=(0,c.vV)(b)&&(0,c.oy)(g);async function C(e){var t,r;e.preventDefault(),s("");let n=e.currentTarget,a=null===(t=n.elements.namedItem("username"))||void 0===t?void 0:t.value,i=null===(r=n.elements.namedItem("password"))||void 0===r?void 0:r.value;if(a&&i){f(!0);try{let e=new URLSearchParams({username:a,password:i}),t=await (0,l.ri)("/api/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e.toString()}),r=await t.json();if(t.ok&&(0,o.WY)(r)){v(a),P(r.challenge_id),k("number"==typeof r.trust_days?r.trust_days:0),j("otp");return}if(t.ok&&(0,o.YC)(r))return;s("string"==typeof r.detail?r.detail:"Invalid email or password")}catch(e){s("Network error. Please try again.")}finally{f(!1)}}}return(0,n.useEffect)(()=>{if("success"!==e.get("reset"))return;x(!0);let t=new URL(window.location.href);t.searchParams.delete("reset"),window.history.replaceState({},document.title,t.pathname+t.search)},[e]),(0,r.jsxs)("div",{className:"p-4 md:p-12 flex flex-col justify-center",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"Sign In"}),(0,r.jsx)("p",{className:"text-text-muted",children:"otp"===w?"Check your email for a verification code":"Your sessions and notes are waiting"})]}),h&&"credentials"===w&&(0,r.jsx)("div",{className:"mb-6 p-4 bg-emerald-500/10 border border-emerald-500/30 rounded-xl",children:(0,r.jsxs)("p",{className:"text-emerald-400 text-sm flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"check_circle"}),(0,r.jsx)("span",{children:d.qd})]})}),"otp"===w?(0,r.jsx)(u.H,{email:b,challengeId:N,onChallengeIdChange:P,variant:"login",trustDays:S,onBack:function(){P(""),k(0),j("credentials"),s("")}}):(0,r.jsxs)("form",{id:"loginForm",className:"space-y-6",onSubmit:C,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"login-email",className:"block text-sm font-semibold text-white mb-2",children:"Email Address"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 material-symbols-outlined text-text-muted text-xl",children:"mail"}),(0,r.jsx)("input",{type:"email",id:"login-email",name:"username",required:!0,autoComplete:"email",placeholder:"[email protected]",value:b,onChange:e=>v(e.target.value),className:"w-full pl-12 pr-4 py-3.5 bg-white/5 border border-white/10 rounded-xl text-white placeholder-text-muted focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20 transition-all"})]})]}),(0,r.jsx)(m.Z,{id:"login-password",name:"password",label:"Password",value:g,onChange:y,autoComplete:"current-password",labelRight:(0,r.jsx)(i.r,{href:"/forgot-password",className:"text-sm text-primary hover:text-primary-dark transition-colors",children:"Forgot Password?"})}),(0,r.jsx)("button",{type:"submit",disabled:p||!_,className:"w-full py-4 bg-primary text-background-dark font-bold rounded-xl hover:bg-primary-dark transition-all shadow-lg hover:scale-[1.02] active:scale-[0.98] flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-xl",children:"progress_activity"}),(0,r.jsx)("span",{children:"Signing in..."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:"Sign In"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-xl",children:"arrow_forward"})]})}),t&&(0,r.jsx)("div",{className:"p-4 bg-red-500/10 border border-red-500/30 rounded-xl",children:(0,r.jsxs)("p",{className:"text-red-400 text-sm flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"error"}),(0,r.jsx)("span",{children:t})]})})]}),(0,r.jsxs)("div",{className:"relative my-8",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("div",{className:"w-full border-t border-white/10"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-sm",children:(0,r.jsx)("span",{className:"px-4 bg-surface-dark text-text-muted",children:"New to CiteVerse?"})})]}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)(i.r,{href:"/signup",className:"inline-flex items-center gap-2 text-primary hover:text-primary-dark transition-colors font-semibold",children:[(0,r.jsx)("span",{children:"Create a free account"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_forward"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-3",children:"15 min free • No credit card required"})]})]})}},9276:function(e,t,s){"use strict";s.d(t,{DY:function(){return l},Fu:function(){return o},W7:function(){return n},ej:function(){return m},f8:function(){return c},mc:function(){return d},qd:function(){return a}});var r=s(8897);let n="If an account exists for that email, we sent a verification code. Please check your inbox.",a="Password updated. Please sign in.",i="password_reset_session";function l(){try{let e=sessionStorage.getItem(i);if(!e)return null;let t=JSON.parse(e);if(!t.email||!t.challengeId)return null;return{email:t.email,challengeId:t.challengeId}}catch(e){return null}}function o(e,t){sessionStorage.setItem(i,JSON.stringify({email:e,challengeId:t}))}function d(){sessionStorage.removeItem(i)}async function c(e){let t=await (0,r.ri)("/api/auth/password/forgot",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e.trim()})}),s=await t.json();return{res:t,data:s}}async function m(e,t,s){let n=await (0,r.ri)("/api/auth/password/reset",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({challenge_id:e,code:t.trim(),password:s})}),a=await n.json();return{res:n,data:a}}}},function(e){e.O(0,[3663,7522,9434,8897,3493,358,8439,2635,1293,1528,1744],function(){return e(e.s=8145)}),_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.