1import{a as V,b as q,c as z,d as A,e as F,f as L,n as B,p as W}from"./chunk-AL5KE7T4.js";import{b as T}from"./chunk-GIUQ3Z3B.js";import{h as O,j as N,k as D}from"./chunk-M5HWWZMS.js";import"./chunk-6NJAKFE3.js";import"./chunk-SLVJP6U5.js";import{Ab as m,Jb as x,Ka as r,Mb as i,Nb as P,Sb as _,Ta as h,Tb as C,Ub as w,Xa as y,Z as g,_ as u,c as v,gb as d,ha as f,hb as c,hc as R,mb as M,nb as e,ob as t,pb as b,wb as S,yb as k,zc as E}from"./chunk-S7L5X5J3.js";function j(o,a){o&1&&(e(0,"p",11),i(1,"Passwords don't match yet."),t())}function J(o,a){o&1&&i(0," Updating\u2026 ")}function U(o,a){o&1&&i(0," Update password \u2192 ")}function G(o,a){if(o&1){let n=S();e(0,"div",3)(1,"p",5),i(2,"\u{1F511} Reset password"),t(),e(3,"h1",6),i(4,"Choose a new password."),t(),e(5,"p",7),i(6,"Make it at least 8 characters. You'll be signed out everywhere \u2014 sign back in with your new password after this."),t(),e(7,"form",8,0),k("ngSubmit",function(){g(n);let s=m();return u(s.onSubmit())}),e(9,"input",9),w("ngModelChange",function(s){g(n);let p=m();return C(p.password,s)||(p.password=s),u(s)}),t(),e(10,"input",10),w("ngModelChange",function(s){g(n);let p=m();return C(p.confirm,s)||(p.confirm=s),u(s)}),t(),d(11,j,2,0,"p",11),e(12,"button",12),d(13,J,1,0)(14,U,1,0),t()(),e(15,"p",13),i(16),t()()}if(o&2){let n=m();r(9),_("ngModel",n.password),r(),x("mismatch",n.mismatch()),_("ngModel",n.confirm),r(),c(n.mismatch()?11:-1),r(),M("disabled",n.loading()||n.mismatch()),r(),c(n.loading()?13:14),r(2),x("visible",!!n.error()),r(),P(n.error())}}function Y(o,a){o&1&&(e(0,"div",4)(1,"div",14),i(2,"\u26A0\uFE0F"),t(),e(3,"p",5),i(4,"Missing link"),t(),e(5,"h1",6),i(6,"No reset token in this URL."),t(),e(7,"p",7),i(8,"Reset links open from your inbox. If you got here by typing the URL, request a fresh link."),t(),e(9,"a",15),i(10,"Request reset link \u2192"),t()())}function H(o,a){o&1&&(e(0,"div",4)(1,"div",14),i(2,"\u26A0\uFE0F"),t(),e(3,"p",5),i(4,"Link expired or used"),t(),e(5,"h1",6),i(6,"This reset link no longer works."),t(),e(7,"p",7),i(8,"Reset links are good for 30 minutes and can only be used once. Request a fresh one."),t(),e(9,"a",15),i(10,"Request a new link \u2192"),t(),e(11,"p",16)(12,"a",17),i(13,"Back to sign in \u2192"),t()()())}var I=class o{constructor(a,n,l){this.route=a;this.router=n;this.auth=l;this.token=String(this.route.snapshot.queryParamMap.get("token")||""),this.token||this.step.set("no-token")}route;router;auth;password="";confirm="";step=f("form");loading=f(!1);error=f("");token="";mismatch=R(()=>this.confirm.length>0&&this.password!==this.confirm);onSubmit(){return v(this,null,function*(){if(this.password.length<8){this.error.set("Password must be at least 8 characters.");return}if(this.password!==this.confirm){this.error.set("Passwords do not match.");return}this.error.set(""),this.loading.set(!0);try{yield this.auth.resetPasswordWithToken(this.token,this.password),this.router.navigate(["/login"],{queryParams:{reset:"ok"}})}catch(a){a?.status===400?this.step.set("invalid"):this.error.set(a?.error?.detail??"Could not reset password \u2014 try again.")}finally{this.loading.set(!1)}})}static \u0275fac=function(n){return new(n||o)(h(O),h(N),h(T))};static \u0275cmp=y({type:o,selectors:[["app-reset"]],decls:5,vars:3,consts:[["f","ngForm"],[1,"gate"],["src","assets/logos/gish-vertical.svg","alt","Gish",1,"logo"],[1,"card"],[1,"card","pending-card"],[1,"eyebrow"],[1,"heading"],[1,"sub"],["autocomplete","off","novalidate","",3,"ngSubmit"],["type","password","name","password","placeholder","New password","autocomplete","new-password","autofocus","","required","",1,"gate-input",3,"ngModelChange","ngModel"],["type","password","name","confirm","placeholder","Confirm new password","autocomplete","new-password","required","",1,"gate-input",3,"ngModelChange","ngModel"],[1,"inline-warn"],["type","submit",1,"btn-primary",3,"disabled"],[1,"err"],[1,"check-icon"],["routerLink","/forgot",1,"btn-primary"],[1,"alt-row"],["routerLink","/login",1,"alt-link"]],template:function(n,l){n&1&&(e(0,"div",1),b(1,"img",2),d(2,G,17,10,"div",3),d(3,Y,11,0,"div",4),d(4,H,14,0,"div",4),t()),n&2&&(r(2),c(l.step()==="form"?2:-1),r(),c(l.step()==="no-token"?3:-1),r(),c(l.step()==="invalid"?4:-1))},dependencies:[E,W,L,V,q,z,B,F,A,D],styles:[".gate[_ngcontent-%COMP%]{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;gap:28px;position:relative;z-index:1}.logo[_ngcontent-%COMP%]{width:160px;height:auto}.card[_ngcontent-%COMP%]{width:100%;max-width:420px;display:flex;flex-direction:column;gap:16px}.eyebrow[_ngcontent-%COMP%]{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;letter-spacing:.22em;text-transform:uppercase;color:var(--gold)}.heading[_ngcontent-%COMP%]{font-family:Playfair Display,serif;font-size:26px;font-weight:900;line-height:1.2;color:var(--text1)}.sub[_ngcontent-%COMP%]{font-size:14px;color:var(--text2);line-height:1.55}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.gate-input[_ngcontent-%COMP%]{width:100%;padding:14px 16px;font-size:15px;border-radius:14px;background:#ffffff0a;border:1px solid rgba(255,255,255,.1);color:var(--text1);transition:border-color .2s}.gate-input[_ngcontent-%COMP%]::placeholder{color:var(--text3)}.gate-input[_ngcontent-%COMP%]:focus{border-color:var(--pink);outline:none}.gate-input.mismatch[_ngcontent-%COMP%]{border-color:#fca5a5}.inline-warn[_ngcontent-%COMP%]{font-family:JetBrains Mono,monospace;font-size:11px;color:#fca5a5;margin-top:-4px}.err[_ngcontent-%COMP%]{min-height:18px;font-family:JetBrains Mono,monospace;font-size:12px;color:#fca5a5;opacity:0;transition:opacity .15s}.err.visible[_ngcontent-%COMP%]{opacity:1}.alt-row[_ngcontent-%COMP%]{text-align:center;font-size:13px;color:var(--text3);font-family:JetBrains Mono,monospace}.alt-link[_ngcontent-%COMP%]{color:var(--pink);text-decoration:none}.alt-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.pending-card[_ngcontent-%COMP%]{text-align:center;gap:14px}.check-icon[_ngcontent-%COMP%]{font-size:40px;line-height:1}"]})};export{I as ResetComponent};
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.