PageSourceSearch

https://laplaceapp.com/assets/check-email-Dsv_8W2G.js

js laplaceapp.com collected 2026-10-06 07:00:38 UTC 2,088 bytes, 2 lines download raw bytes

1import{D as p,F as C,u as E,a3 as g,r as o,j as n,C as N,y as S,z as j,e as v,h as b}from"./index-DH0xAq8M.js";import{M as O}from"./mail-Dg25_yno.js";function R(){return p({mutationKey:["resend-verification"],mutationFn:async t=>C.auth.resendVerification({email:t})})}const c=60,m="verify-email:resend-cooldown:";function l(t){if(!t||typeof window>"u")return 0;const s=window.sessionStorage.getItem(`${m}${t}`);if(!s)return 0;const e=Number.parseInt(s,10);if(!Number.isFinite(e))return 0;const r=e-Date.now();return r>0?Math.ceil(r/1e3):0}function u(t,s){if(!t||typeof window>"u")return;const e=`${m}${t}`;if(s<=0){window.sessionStorage.removeItem(e);return}window.sessionStorage.setItem(e,String(Date.now()+s*1e3))}function D(){const{t}=E("auth"),e=g({from:"/$lang/check-email"}).email,r=R(),[i,a]=o.useState(()=>l(e)),[f,d]=o.useState(!1);o.useEffect(()=>{a(l(e)),d(!1)},[e]),o.useEffect(()=>{if(i<=0){u(e,0);return}const h=window.setTimeout(()=>a(y=>y-1),1e3);return()=>window.clearTimeout(h)},[i,e]);async function x(){if(!(!e||i>0))try{await r.mutateAsync(e),d(!0),u(e,c),a(c)}catch{u(e,c),a(c)}}const w=i>0?t("verifyEmailResendCooldown",{seconds:i}):t("verifyEmailResend");return n.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4",children:n.jsxs(N,{className:"w-full max-w-md",children:[n.jsxs(S,{className:"text-center",children:[n.jsx("div",{className:"mx-auto mb-2 flex size-12 items-center justify-center rounded-full bg-muted",children:n.jsx(O,{className:"size-6 text-muted-foreground"})}),n.jsx(j,{className:"text-xl",children:t("verifyEmailSentTitle")})]}),n.jsxs(v,{className:"space-y-4 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:e?t("verifyEmailSentDescription",{email:e}):t("verifyEmailSentDescriptionNoEmail")}),f&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t("verifyEmailResent")}),n.jsx(b,{type:"button",variant:"secondary",onClick:x,disabled:!e||i>0||r.isPending,children:w})]})]})})}const k=D;export{k as component};
2//# sourceMappingURL=check-email-Dsv_8W2G.js.map

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.