PageSourceSearch

https://git-hub-new-api.hf.space/static/js/async/6360.87dd7f78b2.js

js git-hub-new-api.hf.space collected 2026-10-03 16:54:25 UTC 4,557 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[6360],{226(e,s,a){var t=a(79015),l=a(30661),r=a(89077),i=a(93539),c=a(88535);function n(e){let{children:s}=e,{t:a}=(0,r.Bd)(),{systemName:n,logo:o,loading:d}=(0,c.R)();return(0,t.jsxs)("div",{className:"relative grid h-svh max-w-none",children:[(0,t.jsxs)(l.N_,{to:"/",className:"absolute top-4 left-4 z-10 flex items-center gap-2 transition-opacity hover:opacity-80 sm:top-8 sm:left-8",children:[(0,t.jsx)("div",{className:"relative h-8 w-8",children:d?(0,t.jsx)(i.E,{className:"absolute inset-0 rounded-full"}):(0,t.jsx)("img",{src:o,alt:a("Logo"),className:"h-8 w-8 rounded-full object-cover"})}),d?(0,t.jsx)(i.E,{className:"h-6 w-24"}):(0,t.jsx)("h1",{className:"text-xl font-medium",children:n})]}),(0,t.jsx)("div",{className:"container flex items-center pt-16 sm:pt-0",children:(0,t.jsx)("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 px-4 py-8 sm:w-[480px] sm:p-8",children:s})})]})}a.d(s,{D:()=>n})},89848(e,s,a){var t=a(79015),l=a(72473),r=a(70556),i=a(70367),c=a(65311),n=a(89077),o=a(26028),d=a(30518),u=a(73178),m=a(62724),p=a(62978),x=a(57598),h=a(63228),w=a(12174),f=a(226);function j(e){let{email:s,token:a}=e,{t:j}=(0,n.Bd)(),v=(0,l.Z)(),[N,b]=(0,c.useState)(""),[k,y]=(0,c.useState)(!1),[g,C]=(0,c.useState)(!1),{secondsLeft:P,isActive:R,start:S}=(0,x.L)({initialSeconds:30}),L=!!(s&&a);async function E(){if(!L||!s||!a)return void o.oR.error(j("Invalid reset link, please request a new password reset"));S(),y(!0);try{let e=await h.FH.post("/api/user/reset",{email:s,token:a},{skipBusinessError:!0});if(e?.data?.success){let s=e.data.data;b(s),await (0,w.l)(s)?o.oR.success(j("Password reset and copied to clipboard: {{password}}",{password:s})):o.oR.success(j("Password reset: {{password}}",{password:s}))}}catch{}finally{y(!1)}}async function B(){!N||await (0,w.l)(N)&&(C(!0),o.oR.success(j("Password copied to clipboard: {{password}}",{password:N})),setTimeout(()=>C(!1),2e3))}return(0,t.jsx)(f.D,{children:(0,t.jsxs)("div",{className:"w-full space-y-8",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h2",{className:"text-center text-2xl font-semibold tracking-tight sm:text-left",children:j("Reset password")}),(0,t.jsx)("p",{className:"text-muted-foreground text-left text-sm sm:text-base",children:N?j("auth.resetPasswordConfirm.success"):j("auth.resetPasswordConfirm.description")})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[!L&&(0,t.jsx)(d.Fc,{variant:"destructive",children:(0,t.jsx)(d.TN,{children:j("Invalid reset link, please request a new password reset.")})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.J,{htmlFor:"email",children:j("Email")}),(0,t.jsx)(m.p,{id:"email",type:"email",value:s||"",disabled:!0,placeholder:j("Waiting for email...")})]}),N&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.J,{htmlFor:"password",children:j("New password")}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(m.p,{id:"password",value:N,disabled:!0,className:"font-mono"}),(0,t.jsx)(u.$,{type:"button",size:"icon",variant:"outline",onClick:B,children:g?(0,t.jsx)(r.A,{className:"h-4 w-4"}):(0,t.jsx)(i.A,{className:"h-4 w-4"})})]}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs",children:j("Password has been copied to clipboard")})]}),(0,t.jsx)(u.$,{className:"w-full",onClick:N?()=>v({to:"/sign-in",replace:!0}):E,disabled:!N&&(k||R||!L),children:N?j("auth.resetPasswordConfirm.backToLogin"):R?j("auth.resetPasswordConfirm.retry",{seconds:P}):j("auth.resetPasswordConfirm.confirm")}),!N&&(0,t.jsx)(u.$,{variant:"link",className:"w-full",onClick:()=>v({to:"/sign-in",replace:!0}),children:j("Back to login")})]})]})})}a.d(s,{L:()=>j})},57598(e,s,a){var t=a(65311);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{initialSeconds:s=30,autoStart:a=!1}=e,[l,r]=(0,t.useState)(s),[i,c]=(0,t.useState)(a),n=(0,t.useRef)(null),o=(0,t.useCallback)(()=>{n.current&&(window.clearInterval(n.current),n.current=null)},[]),d=(0,t.useCallback)(()=>{o(),c(!1)},[o]),u=(0,t.useCallback)(e=>{r(e??s),c(!0),o(),n.current=window.setInterval(()=>{r(e=>e<=1?(o(),c(!1),s):e-1)},1e3)},[o,s]),m=(0,t.useCallback)(()=>{d(),r(s)},[s,d]);return(0,t.useEffect)(()=>()=>o(),[o]),{secondsLeft:l,isActive:i,start:u,stop:d,reset:m}}a.d(s,{L:()=>l})},86411(e,s,a){a.r(s);var t=a(79015),l=a(62698),r=a(89848);function i(){let e=(0,l.S)({from:"/(auth)/reset"});return(0,t.jsx)(r.L,{email:e?.email,token:e?.token})}a.d(s,{component:()=>i})}}]);

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.