PageSourceSearch

https://app.rooks.ai/assets/_resetToken-BhEKj0Wy.js

js rooks.ai collected 2026-10-05 13:43:32 UTC 3,793 bytes, 1 lines download raw bytes

1import{af as B,ag as F,ah as L,ai as M,f as H,C as K,r,j as e,d as t,c as W,e as q,B as b,P as Y,A as G,J as N,K as x,aj as J,W as U}from"./index-F4wd8lkf.js";import{K as V}from"./key-round-DI5CbMnU.js";import{E as v}from"./eye-off-Cotr3QkN.js";import{E as S}from"./eye-B5VeZX04.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"e5ccf081b8df75adeeecd7bc7a075bafa5343e60"};var n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="0df2ba32-249e-4d23-a68a-486953389b14",s._sentryDebugIdIdentifier="sentry-dbid-0df2ba32-249e-4d23-a68a-486953389b14")}catch{}})();const m=8;function $(){const s=B({from:F.RESET_PASSWORD,select:a=>a.resetToken}),{resetPassword:{failed:n}}=L(M),f=H(),P=K(),[h,w]=r.useState(!1),[o,E]=r.useState(),[p,C]=r.useState(),[d,D]=r.useState(!1),[c,I]=r.useState(!1),[T,R]=r.useState(!1),[k,A]=r.useState(!1),[g,_]=r.useState(),j=!s,i=!(T&&o?.length&&o.length<m),l=!(k&&p?.length&&o!==p),y=o&&i&&l&&!h;async function O(a){if(a.preventDefault(),!!y&&!j){w(!0);try{const u=await f(J(o,s,P));u&&(_(u),U(u))}finally{w(!1)}}}return n&&s&&g?e("div",{className:"flex min-h-screen items-center justify-center p-4",children:e("div",{className:"w-full max-w-md",children:t(G,{variant:"destructive",children:[e(W,{children:"Could not reset password"}),t(q,{className:"flex items-center gap-2",children:[e("span",{children:g[0]}),e(b,{variant:"link",asChild:!0,className:"h-auto p-0",children:e("a",{href:Y.HOME,children:"Try again"})})]})]})})}):e("div",{className:"flex min-h-screen items-center justify-center p-4",children:e("div",{className:"w-full max-w-md",children:t("div",{className:"flex flex-col items-center gap-6 rounded-lg border bg-card p-6 shadow-sm sm:p-8",children:[e("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg bg-foreground",children:e(V,{className:"h-6 w-6 text-background"})}),t("div",{className:"text-center space-y-2",children:[e("h1",{className:"text-2xl font-bold tracking-tight",children:"Reset your password"}),e("p",{className:"text-sm text-muted-foreground",children:"Enter a new password for your account"})]}),t("form",{onSubmit:O,className:"w-full space-y-4",children:[t("div",{className:"space-y-2",children:[e(N,{htmlFor:"password",children:"New Password"}),t("div",{className:"relative",children:[e(x,{id:"password",type:d?"text":"password",placeholder:"Enter your new password",onChange:({target:{value:a}})=>{E(a)},onBlur:()=>{R(!0)},className:i?"":"border-destructive",required:!0}),e("button",{type:"button",onClick:()=>D(!d),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:d?e(v,{className:"h-4 w-4"}):e(S,{className:"h-4 w-4"})})]}),!i&&e("p",{className:"text-xs text-destructive",children:`Password must be at least ${m} characters`}),t("p",{className:"text-xs text-muted-foreground",children:["Minimum ",m," characters"]})]}),t("div",{className:"space-y-2",children:[e(N,{htmlFor:"confirm-password",children:"Confirm Password"}),t("div",{className:"relative",children:[e(x,{id:"confirm-password",type:c?"text":"password",placeholder:"Confirm your new password",onChange:({target:{value:a}})=>{C(a)},onBlur:()=>{A(!0)},className:l?"":"border-destructive",required:!0}),e("button",{type:"button",onClick:()=>I(!c),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:c?e(v,{className:"h-4 w-4"}):e(S,{className:"h-4 w-4"})})]}),!l&&e("p",{className:"text-xs text-destructive",children:"Passwords do not match"})]}),e(b,{type:"submit",className:"w-full",disabled:!y,children:h?"Resetting password...":"Reset password"})]})]})})})}const ee=$;export{ee 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.