1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[546],{2994:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var s=r(37876),a=r(14232),n=r(7555),l=r(91725),i=r(26283),o=r(26625),d=r(14099),c=r(49240),u=r(52417),p=r(78539),f=r(39393),m=r(77711),h=r(30359),x=r(43579);let y=()=>{let[e]=(0,n.ok)(),t=(0,n.Zp)(),{toast:r}=(0,x.dj)(),y=e.get("code")||e.get("token")||"",[g,v]=(0,a.useState)(""),[b,w]=(0,a.useState)(""),[N,j]=(0,a.useState)(!1),[S,k]=(0,a.useState)(!1),[A,_]=(0,a.useState)(!1),E=y.length>0;(0,a.useEffect)(()=>{if(A){let e=setTimeout(()=>t("/auth"),3e3);return()=>clearTimeout(e)}},[A,t]);let R=g.length>=8,T=g===b&&b.length>0,P=async e=>{if(e.preventDefault(),!R)return void r({title:"Password too short",description:"At least 8 characters required.",variant:"destructive"});if(!T)return void r({title:"Passwords do not match",description:"Both fields must match.",variant:"destructive"});k(!0);try{let e=await fetch("/api/auth/update-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:y,password:g})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error((null==t?void 0:t.error)||"Error ".concat(e.status));_(!0),r({title:"Password updated!",description:"Your password has been reset. Redirecting to loginâ¦",variant:"default"})}catch(e){r({title:"Password reset failed",description:e.message||"Please request a new reset link.",variant:"destructive"})}finally{k(!1)}};return A?(0,s.jsx)("div",{className:"min-h-screen bg-gradient-dark flex items-center justify-center p-4",children:(0,s.jsxs)(l.Zp,{className:"w-full max-w-md card-cyber backdrop-blur-lg",children:[(0,s.jsxs)(l.aR,{className:"text-center space-y-4",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(c.A,{className:"h-14 w-14 text-success"})}),(0,s.jsx)(l.ZB,{className:"text-xl text-foreground",children:"Password Updated"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Your password has been reset successfully. Redirecting to login in 3 secondsâ¦"})]}),(0,s.jsx)(l.Wu,{children:(0,s.jsx)(i.$,{className:"w-full",variant:"cyber",onClick:()=>t("/auth"),children:"Go to Login Now"})})]})}):E?(0,s.jsx)("div",{className:"min-h-screen bg-gradient-dark flex items-center justify-center p-4",children:(0,s.jsxs)(l.Zp,{className:"w-full max-w-md card-cyber backdrop-blur-lg",children:[(0,s.jsxs)(l.aR,{className:"text-center space-y-2",children:[(0,s.jsx)("div",{className:"flex justify-center mb-2",children:(0,s.jsx)("div",{className:"p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,s.jsx)(p.A,{className:"h-8 w-8 text-primary"})})}),(0,s.jsx)(l.ZB,{className:"text-xl text-foreground",children:"Set New Password"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Choose a strong password. Must be at least 8 characters."})]}),(0,s.jsx)(l.Wu,{children:(0,s.jsxs)("form",{onSubmit:P,className:"space-y-5",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(d.J,{htmlFor:"new-password",className:"text-foreground flex items-center gap-2",children:[(0,s.jsx)(f.A,{className:"h-4 w-4"}),"New Password"]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(o.p,{id:"new-password",type:N?"text":"password",value:g,onChange:e=>v(e.target.value),required:!0,className:"bg-input/50 border-border text-foreground placeholder:text-muted-foreground pr-10",placeholder:"Minimum 8 characters",autoFocus:!0}),(0,s.jsx)("button",{type:"button",onClick:()=>j(!N),className:"absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground","aria-label":N?"Hide password":"Show password",children:N?(0,s.jsx)(m.A,{className:"h-4 w-4"}):(0,s.jsx)(h.A,{className:"h-4 w-4"})})]}),g.length>0&&!R&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:"Too short â minimum 8 characters"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(d.J,{htmlFor:"confirm-password",className:"text-foreground flex items-center gap-2",children:[(0,s.jsx)(f.A,{className:"h-4 w-4"}),"Confirm Password"]}),(0,s.jsx)(o.p,{id:"confirm-password",type:N?"text":"password",value:b,onChange:e=>w(e.target.value),required:!0,className:"bg-input/50 border-border text-foreground placeholder:text-muted-foreground",placeholder:"Repeat your new password"}),b.length>0&&!T&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:"Passwords do not match"})]}),(0,s.jsx)(i.$,{type:"submit",variant:"cyber",className:"w-full",disabled:S||!R||!T,children:S?(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-4 h-4 border-2 border-current border-t-transparent roun
1ded-full animate-spin"}),(0,s.jsx)("span",{children:"Updating passwordâ¦"})]}):(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(c.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:"Set New Password"})]})})]})})]})}):(0,s.jsx)("div",{className:"min-h-screen bg-gradient-dark flex items-center justify-center p-4",children:(0,s.jsxs)(l.Zp,{className:"w-full max-w-md card-cyber backdrop-blur-lg",children:[(0,s.jsxs)(l.aR,{className:"text-center space-y-4",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(u.A,{className:"h-14 w-14 text-warning"})}),(0,s.jsx)(l.ZB,{className:"text-xl text-foreground",children:"Link Invalid or Expired"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"This password reset link is missing its security token. It may have expired (links are valid for 1 hour) or been used already."})]}),(0,s.jsx)(l.Wu,{children:(0,s.jsx)(i.$,{className:"w-full",variant:"cyber",onClick:()=>t("/auth?mode=reset"),children:"Request a New Reset Link"})})]})})}},7555:(e,t,r)=>{"use strict";r.d(t,{N_:()=>u,Zp:()=>o,ok:()=>c,zy:()=>d});var s=r(37876),a=r(14232),n=r(14e3),l=r(48230),i=r.n(l);function o(){let e=(0,n.useRouter)();return(0,a.useCallback)((t,r)=>{if("number"==typeof t)return void(t<0?e.back():e.forward());(null==r?void 0:r.replace)?e.replace(t):e.push(t)},[e])}function d(){let e=(0,n.usePathname)(),t=(0,n.useSearchParams)();return{pathname:e,search:t.toString()?"?".concat(t.toString()):"",hash:"",state:null,key:"default"}}function c(){let e=(0,n.useSearchParams)(),t=(0,n.useRouter)(),r=(0,n.usePathname)();return[new URLSearchParams(e.toString()),(0,a.useCallback)((s,a)=>{let n,l=new URLSearchParams(e.toString());"function"==typeof s?n=s(l):s instanceof URLSearchParams?n=s:(Object.entries(s).forEach(e=>{let[t,r]=e;return l.set(t,r)}),n=l);let i="".concat(r,"?").concat(n.toString());(null==a?void 0:a.replace)?t.replace(i):t.push(i)},[e,t,r])]}function u(e){var t;let{to:r,href:a,children:n,...l}=e;return(0,s.jsx)(i(),{href:null!=(t=null!=r?r:a)?t:"",...l,children:n})}},10714:(e,t,r)=>{"use strict";r.d(t,{s:()=>l,t:()=>n});var s=r(14232);function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return t=>{let r=!1,s=e.map(e=>{let s=a(e,t);return r||"function"!=typeof s||(r=!0),s});if(r)return()=>{for(let t=0;t<s.length;t++){let r=s[t];"function"==typeof r?r():a(e[t],null)}}}}function l(...e){return s.useCallback(n(...e),e)}},14099:(e,t,r)=>{"use strict";r.d(t,{J:()=>d});var s=r(37876),a=r(14232),n=r(59773),l=r(47137),i=r(56680);let o=(0,l.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)(n.b,{ref:t,className:(0,i.cn)(o(),r),...a})});d.displayName=n.b.displayName},26283:(e,t,r)=>{"use strict";r.d(t,{$:()=>d});var s=r(37876),a=r(14232),n=r(82987),l=r(47137),i=r(56680);let o=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium ring-offset-background transition-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-gradient-primary text-primary-foreground hover:shadow-primary hover:scale-105 transition-all duration-300",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-border bg-card/50 backdrop-blur-sm hover:bg-accent hover:text-accent-foreground hover:border-primary/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",cyber:"bg-gradient-cyber text-primary-foreground hover:shadow-accent hover:scale-105 border border-primary/20",glow:"bg-primary text-primary-foreground hover:shadow-primary animate-pulse-glow"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=a.forwardRef((e,t)=>
1{let{className:r,variant:a,size:l,asChild:d=!1,...c}=e,u=d?n.DX:"button";return(0,s.jsx)(u,{className:(0,i.cn)(o({variant:a,size:l,className:r})),ref:t,...c})});d.displayName="Button"},26625:(e,t,r)=>{"use strict";r.d(t,{p:()=>l});var s=r(37876),a=r(14232),n=r(56680);let l=a.forwardRef((e,t)=>{let{className:r,type:a,...l}=e;return(0,s.jsx)("input",{type:a,className:(0,n.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:t,...l})});l.displayName="Input"},30359:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(79065).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},39393:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(79065).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},43579:(e,t,r)=>{"use strict";r.d(t,{dj:()=>u});var s=r(14232);let a=0,n=new Map,l=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,t)},i=[],o={toasts:[]};function d(e){o=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?l(r):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(o,e),i.forEach(e=>{e(o)})}function c(e){let{...t}=e,r=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>d({type:"DISMISS_TOAST",toastId:r});return d({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||s()}}}),{id:r,dismiss:s,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function u(){let[e,t]=s.useState(o);return s.useEffect(()=>(i.push(t),()=>{let e=i.indexOf(t);e>-1&&i.splice(e,1)}),[e]),{...e,toast:c,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},47137:(e,t,r)=>{"use strict";r.d(t,{F:()=>l});var s=r(69241);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.$,l=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:l,defaultVariants:i}=t,o=Object.keys(l).map(e=>{let t=null==r?void 0:r[e],s=null==i?void 0:i[e];if(null===t)return null;let n=a(t)||a(s);return l[e][n]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return n(e,o,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...d}[t]):({...i,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},49240:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(79065).A)("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},52417:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(79065).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},56680:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n,v:()=>l});var s=r(69241),a=r(29573);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD";return new Intl.NumberFormat("en-US",{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}},58404:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ResetPassword",function(){return r(2994)}])},59773:(e,t,r)=>{"use strict";r.d(t,{b:()=>i});var s=r(14232),a=r(66326),n=r(37876),l=s.forwardRef((e,t)=>
1(0,n.jsx)(a.sG.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));l.displayName="Label";var i=l},66326:(e,t,r)=>{"use strict";r.d(t,{hO:()=>o,sG:()=>i});var s=r(14232),a=r(98477),n=r(82987),l=r(37876),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,n.TL)(`Primitive.${t}`),a=s.forwardRef((e,s)=>{let{asChild:a,...n}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(a?r:t,{...n,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function o(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}},77711:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(79065).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},78539:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(79065).A)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},82987:(e,t,r)=>{"use strict";r.d(t,{DX:()=>i,Dc:()=>d,TL:()=>l});var s,a=r(14232),n=r(10714);function l(e){let t=a.forwardRef((t,r)=>{var s;let l,i,{children:d,...u}=t,x=null,y=!1,g=[];p(d)&&"function"==typeof h&&(d=h(d._payload)),a.Children.forEach(d,e=>{var t;if(t=e,a.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===o){y=!0;let t="child"in e.props?e.props.child:e.props.children;p(t)&&"function"==typeof h&&(t=h(t._payload)),x=c(e,t),g.push(x?.props?.children)}else g.push(e)}),x?x=a.cloneElement(x,void 0,g):!y&&1===a.Children.count(d)&&a.isValidElement(d)&&(x=d);let v=x?(s=x,(i=(l=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?s.ref:(i=(l=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?s.props.ref:s.props.ref||s.ref):void 0,b=(0,n.s)(r,v);if(!x){if(d||0===d)throw Error(y?m(e):f(e));return d}let w=function(e,t){let r={...t};for(let s in t){let a=e[s],n=t[s];/^on[A-Z]/.test(s)?a&&n?r[s]=(...e)=>{let t=n(...e);return a(...e),t}:a&&(r[s]=a):"style"===s?r[s]={...a,...n}:"className"===s&&(r[s]=[a,n].filter(Boolean).join(" "))}return{...e,...r}}(u,x.props??{});return x.type!==a.Fragment&&(w.ref=r?b:v),a.cloneElement(x,w)});return t.displayName=`${e}.Slot`,t}var i=l("Slot"),o=Symbol.for("radix.slottable");function d(e){let t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=o,t}var c=(e,t)=>{if("child"in e.props){let t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null},u=Symbol.for("react.lazy");function p(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===u&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,m=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,h=(s||(s=r.t(a,2)))[" use ".trim().toString()]},91725:(e,t,r)=>{"use strict";r.d(t,{BT:()=>d,Wu:()=>c,ZB:()=>o,Zp:()=>l,aR:()=>i,wL:()=>u});var s=r(37876),a=r(14232),n=r(56680);let l=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("rounded-lg border border-border/50 bg-gradient-to-br from-card to-card/80 text-card-foreground shadow-elegant backdrop-blur-sm hover:shadow-primary transition-smooth",r),...a})});l.displayName="Card";let i=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("flex flex-col space-y-1.5 p-6",r),...a})});
1i.displayName="CardHeader";let o=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("h3",{ref:t,className:(0,n.cn)("text-2xl font-semibold leading-none tracking-tight",r),...a})});o.displayName="CardTitle";let d=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("p",{ref:t,className:(0,n.cn)("text-sm text-muted-foreground",r),...a})});d.displayName="CardDescription";let c=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("p-6 pt-0",r),...a})});c.displayName="CardContent";let u=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,s.jsx)("div",{ref:t,className:(0,n.cn)("flex items-center p-6 pt-0",r),...a})});u.displayName="CardFooter"}},e=>{e.O(0,[2741,1871,636,6593,8792],()=>e(e.s=58404)),_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.