1var p=Object.defineProperty;var d=(a,s)=>p(a,"name",{value:s,configurable:!0});import{f as h,j as e,ad as r}from"./emailRef-2_pXTFTA.js";import{h as f,d as b,r as m}from"./react-vendor-DAHDpbpd.js";import{A as u}from"./AuthPageFrame-BxKYKz6v.js";import{an as g,b as w}from"./icons-vendor-BkJfVEt0.js";import"./campaign-icons-DGRZg7ro.js";import"./index-BHnHaHtD.js";import"./supabase-vendor-Ba-0_w4O.js";const y=["invite","recovery","signup","magiclink","email","email_change"],L=d(()=>{const[a]=f(),s=b(),[o,l]=m.useState(null);return m.useEffect(()=>{const c=a.get("token_hash"),n=a.get("type"),i=a.get("next")??"/auth/callback",x=(()=>{if(!i)return"/auth/callback";if(i.startsWith("/"))return i;try{const t=new URL(i,window.location.origin);if(t.origin===window.location.origin)return t.pathname+t.search+t.hash}catch{}return"/auth/callback"})();if(!c||!n||!y.includes(n)){l("The link is missing required fields. Please use the button from your email.");return}(async()=>{const{error:t}=await h.auth.verifyOtp({token_hash:c,type:n});if(t){l(t.message??"We could not validate this link. It may have expired.");return}h.rpc("claim_email_proof"),s(x,{replace:!0})})()},[a,s]),o?e.jsx(u,{children:e.jsxs("div",{className:"relative w-full max-w-md
1space-y-4 rounded-[28px] border border-red-500/20 bg-[#0E1627]/90 p-8 shadow-[0_28px_90px_rgba(4,9,20,0.8)] backdrop-blur-xl font-body text-center",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-red-500/10 text-red-400 flex items-center justify-center",children:e.jsx(g,{size:28})}),e.jsx("h1",{className:r.title,children:"Link not valid"}),e.jsx("p",{className:r.subtitle,children:o}),e.jsxs("p",{className:`${r.helper} text-slate-500`,children:["If you think this is a mistake, write to"," ",e.jsx("a",{href:"mailto:[email protected]",className:r.inlineLink,children:"[email protected]"}),"."]})]})}):e.jsx(u,{children:e.jsxs("div",{className:"relative w-full max-w-md space-y-4 rounded-[28px] border border-white/10 bg-[#0E1627]/90 p-8 shadow-[0_28px_90px_rgba(4,9,20,0.8)] backdrop-blur-xl font-body text-center",children:[e.jsx("div",{className:"mx-auto w-14 h-14 rounded-full bg-violet-500/15 text-violet-300 flex items-center justify-center",children:e.jsx(w,{size:22,className:"animate-spin"})}),e.jsx("p",{className:r.subtitle,children:"Validating your linkâ¦"})]})})},"AuthConfirmPage");export{L as default};
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.