PageSourceSearch

https://app.pavetheway.ai/assets/auth.reset-password._token-BLE_cQUM.js

js pavetheway.ai collected 2026-10-05 15:17:42 UTC 2,607 bytes, 1 lines download raw bytes

1import{r,j as s}from"./vendor-react-core-DMvZfCa0.js";import{i as b,L as N}from"./vendor-tanstack-5i8CYiQV.js";import{B as A,b as h,d as C,A as R,av as x}from"./index-IpV6lXrt.js";import{A as E,a as k}from"./AuthPageLayout-dGHcyQY2.js";import{A as I,a as L}from"./alert-DxRUByaj.js";import{I as g}from"./input-BN2ITYz1.js";import{L as j}from"./label-DMAicbP4.js";import"./vendor-visuals-Bb3MflBF.js";import"./vendor-pdf-CimsPX5M.js";import"./vendor-documents-Dla32CMv.js";import"./vendor-editors-Cn1ou96H.js";import"./card-AIYwq1-q.js";import"./chevron-left-BOqZ4aKU.js";import"./circle-check-CnMfsmwU.js";function T({token:o,surface:a}){const v=b(),[n,i]=r.useState(""),[u,d]=r.useState(""),[m,c]=r.useState(!1),[l,e]=r.useState(null),[p,y]=r.useState(!1),w=a==="student"?h.student.login:h.counselor.login;async function S(t){if(t.preventDefault(),e(null),!o.trim()){e("Reset link is missing a token.");return}if(!n){e("Please enter a new password.");return}if(n!==u){e("Passwords do not match.");return}c(!0);try{await C.post(R.auth.resetPassword,{token:o,new_password:n},{authMode:"none"}),y(!0),i(""),d(""),window.setTimeout(()=>{v({to:w})},100)}catch(f){const P=f instanceof Error?f.message:"Unable to reset password.";e(P)}finally{c(!1)}}return s.jsx(E,{surface:a,title:"Set a new password",children:s.jsxs(k,{children:[s.jsx("p",{className:"mb-6 text-sm text-muted-foreground",children:"Choose a strong password you have not used before."}),s.jsxs("form",{className:"space-y-4",onSubmit:S,children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(j,{htmlFor:"new-password",children:"New password"}),s.jsx(g,{id:"new-password",type:"password",autoComplete:"new-password",required:!0,value:n,onChange:t=>i(t.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(j,{htmlFor:"confirm-password",children:"Confirm password"}),s.jsx(g,{id:"confirm-password",type:"password",autoComplete:"new-password",required:!0,value:u,onChange:t=>d(t.target.value)})]}),l?s.jsx(I,{variant:"destructive",children:s.jsx(L,{children:l})}):null,s.jsx(A,{type:"submit",className:"w-full",disabled:m||p,children:m?"Updating...":"Update password"})]}),p?s.jsx("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:"Taking you to sign in..."}):s.jsxs("p",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Remember your password?"," ",s.jsx(N,{to:w,className:"cursor-pointer text-primary hover:underline",children:"Back to login"})]})]})})}function V(){const{token:o}=x.useParams(),{surface:a}=x.useSearch();return s.jsx(T,{token:o,surface:a})}export{V as component};

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.