PageSourceSearch

https://hiremindpro.com/_next/static/chunks/8282.8d55d0537553f444.js

js hiremindpro.com collected 2026-10-02 01:32:41 UTC 2,614 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8282],{8282:function(e,s,a){a.r(s),a.d(s,{default:function(){return n}});var t=a(57437),l=a(2265);function n(){let[e,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(""),[r,d]=(0,l.useState)(""),[i,o]=(0,l.useState)(""),[u,c]=(0,l.useState)(!1),[m,p]=(0,l.useState)(null),[h,x]=(0,l.useState)(null);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/account/password",{method:"GET"}),a=await e.json();e.ok?s(!!(null==a?void 0:a.hasPassword)):s(!1)}catch(e){s(!1)}})()},[]);let w=async s=>{s.preventDefault(),p(null),x(null),c(!0);try{let s=await fetch("/api/account/password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:e?a:void 0,newPassword:r,confirmPassword:i})}),t=await s.json().catch(()=>({}));s.ok?(x("Password updated successfully"),n(""),d(""),o("")):p((null==t?void 0:t.error)||"Update failed")}catch(e){p((null==e?void 0:e.message)||"Update failed")}finally{c(!1)}};return(0,t.jsxs)("div",{className:"max-w-md",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Security"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mb-4 dark:text-ink-300",children:null===e?"Loading…":e?"Change your password.":"Set a password for email sign-in in addition to Google."}),(0,t.jsxs)("form",{onSubmit:w,className:"space-y-3",children:[e?(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Current password"}),(0,t.jsx)("input",{type:"password",className:"w-full rounded border p-2",value:a,onChange:e=>n(e.target.value),required:!0})]}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-1",children:"New password"}),(0,t.jsx)("input",{type:"password",className:"w-full rounded border p-2",value:r,onChange:e=>d(e.target.value),required:!0,minLength:8}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1 dark:text-ink-400",children:"At least 8 characters, include letters and numbers."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium mb-1",children:"Confirm new password"}),(0,t.jsx)("input",{type:"password",className:"w-full rounded border p-2",value:i,onChange:e=>o(e.target.value),required:!0,minLength:8})]}),m?(0,t.jsx)("p",{className:"text-sm text-red-600",children:m}):null,h?(0,t.jsx)("p",{className:"text-sm text-green-600",children:h}):null,(0,t.jsx)("button",{disabled:u,className:"rounded bg-indigo-600 text-white px-4 py-2 disabled:opacity-50",children:u?"Saving…":e?"Change password":"Set password"})]})]})}}}]);

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.