PageSourceSearch

https://maritimeiq.ai/assets/index-LuonO8kF.js

js maritimeiq.ai collected 2026-10-05 13:43:39 UTC 2,073 bytes, 1 lines download raw bytes

1import{r as h,j as t}from"./vendor-react-CKhnxkKV.js";import{d as g,a as x,L as y}from"./vendor-router-Bi4U22Hf.js";import{b as j,u as f,a as b}from"./vendor-tanstack-zof0MuPS.js";import{h as l,k as n,u as w,l as A,A as d}from"./index-KQIv4q-P.js";import{i as I}from"./org-BqAvQ6or.js";const u={preview(e){return l(`/v1/invites/${encodeURIComponent(e)}/preview`)},accept(e){return l("/v1/invites/accept",{method:"POST",body:e})}};function N(e){return j({queryKey:n.invites.preview(e??""),enabled:!!e,retry:!1,queryFn:async()=>I(await u.preview(e))})}function P(){const e=f();return b({mutationFn:s=>u.accept(s),onSuccess:()=>{e.invalidateQueries({queryKey:n.session}),e.invalidateQueries({queryKey:n.orgs.all}),e.invalidateQueries({queryKey:n.adminApprovals})}})}function K(){const{token:e=""}=g(),s=x(),{isAuthenticated:p,refresh:v}=w(),i=N(e),r=P(),[a,o]=h.useState(null),m=async()=>{o(null);try{await r.mutateAsync({token:e}),await v(),s("/dashboard",{replace:!0})}catch(c){o(c instanceof d?c.message:"Could not accept invite.")}};return t.jsxs("div",{className:"auth-shell__card",children:[t.jsx("img",{src:A,alt:"MaritimeIQ"}),t.jsx("h1",{children:"Organization invite"}),i.isLoading&&t.jsx("p",{children:"Loading invite…"}),i.isError&&t.jsx("div",{className:"alert alert--danger",children:i.error instanceof d?i.error.message:"Invite is invalid or expired."}),i.data&&t.jsxs(t.Fragment,{children:[t.jsxs("p",{children:["You've been invited to ",t.jsx("strong",{children:i.data.orgName})," as"," ",t.jsx("strong",{children:i.data.role}),"."]}),t.jsxs("p",{style:{fontSize:13,color:"#717680"},children:["The invite was sent to ",t.jsx("strong",{children:i.data.email}),". You must be signed in with that address to accept."]}),a&&t.jsx("div",{className:"alert alert--danger",children:a}),p?t.jsx("button",{className:"btn btn--primary",onClick:m,disabled:r.isPending,children:r.isPending?"Accepting…":"Accept invite"}):t.jsx(y,{className:"btn btn--primary",to:`/login?next=/invite/${encodeURIComponent(e)}`,children:"Sign in to accept"})]})]})}export{K 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.