1import{d as F,a2 as N,e as C,g as E,c as L,X as $,a3 as A,a as U,z as W,bb as M,bc as O,ab as q,a4 as J,ac as B,ad as G,cP as V,p as X,j as a,I as Y,T as y,w as Z,b as H,a9 as K}from"./index-DEpx10yq.js";import{r as n}from"./vendor-BuXdE1tY.js";import{R as Q}from"./RegisterForm-CvnEhlRE.js";import{aZ as m,ap as ee}from"./app-4WdNMoJ4.js";import{p as te}from"./login-BXphnDB1.js";import{u as ae}from"./useRefreshSiteAccessFlags-DMKGMgxU.js";import"./dayjs-timezone-iana-plugin-BLhLpZHa.js";import"./index-CuBUkoZP.js";import"./RichText-DbmvLbYm.js";import"./collapseNbsp-CzVL4EIi.js";import"./NoBadgeReCAPTCHA-lNk5xzVp.js";import"./recaptcha-wrapper-Clz23PAr.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c19181d3-1286-431e-b15d-a2c3ea11e04c",e._sentryDebugIdIdentifier="sentry-dbid-c19181d3-1286-431e-b15d-a2c3ea11e04c")}catch{}const oe={en:"Forgot password?",nl:"Wachtwoord vergeten?"},ne={en:"Get Started",nl:"Laten we beginnen!"},se={en:"You have been invited to join %{organization} on Deedmob!",nl:"Je bent uitgenodigd om lid te worden van %{organization} op Deedmob!"},ie={en:"Join %{organization} on Deedmob!",nl:"Word lid van %{organization} op Deedmob!"},re={forgotPassword:oe,getStarted:ne,invited:se,join:ie},Ie=()=>{const e=F(),r=N(),u=n.useRef(void 0),w=n.useRef(void 0),g=C(),v=E(),f=L(),I=$(),[p,j]=n.useState(),[b]=A(),[k,S]=n.useState(!1),[t,_]=n.useState(null),s=U(re),h=W(),x=ae();if(!e.organizationId||!e.userId||!e.token)throw new Error("organizationId or userId or token param not found in route");const c=Number(e.organizationId),d=Number(e.userId),l=e.token,D=n.useCallback(async o=>{const R={...w.current,language:s.locale,captcharesponse:o,token:l,organization_id:c,user_id:d,type:M.invite,whitelabel:v.whitelabel};return u.current&&u.current.reset(),g(O(R)).then(async i=>{if(q(i)){const P=b.get(J.next);f(B("twoFactorAuth",{ticket:i.ticket,next:P||void 0,successRedirect:`/o/${t.slug}?showOnboard=true`,email:i.email||void 0,backRedirect:i.email?`/invite/${c}/user/${d}?token=${encodeURIComponent(l)}&email=${encodeURIComponent(i.email)}`:void 0}));return}const z=i;await r.resetStore(),z?(await x().catch(G),te({memberships:z,searchParams:b,location:I,navigate:f,forceRedirectToPathname:`/o/${t.slug}?showOnboard=true`})):f(`/pending-verify-account?email=${encodeURIComponent(R.email)}`)}).catch(h())},[s.locale,l,c,d,v.whitelabel,g,r,x,b,I,f,t,h]),T=n.useCallback(o=>{w.current=o,u.current.execute()},[]);return n.useEffect(()=>{g(V({organization_id:c,token:l,user_id:d})).then(o=>{_(o.organization),S(o.tokenMatches),j({...o.user,email:o.email})}).catch(h())},[g,c,d,l,h]),X(s("join",{organization:t&&t.name||""})),!t||!p?null:a.jsxs("div",{className:m.container,children:[a.jsxs("div",{className:m.column,children:[a.jsx(Y,{src:t.image,className:ee.organizationLogo,alt:t.name,width:150,height:150,fit:"clip"}),a.jsx(y,{order:1,fw:"bold",className:m.invited,children:s("invited",{organization:t.name})})]}),a.jsxs("div",{className:m.column,children:[a.jsx(y,{order:1,fw:"bold",className:m.getStarted,children:s("getStarted")}),a.jsx(Z,{children:s("join",{organization:t.name})}),a.jsx(Q,{onSubmit:T,disableEmail:!0,initialValues:{first_names:p.first_names??void 0,last_name:p.last_name??void 0,email:p.email,promotional_consent:!1,terms:!1},captchaRef:u,registerWithCaptcha:D}),k===!1&&a.jsx(H,{to:"/forgot-password",children:s("forgotPassword")}),a.jsx(K,{mode:"accounts",align:"center"})]})]})};export{Ie as default}; 2//# sourceMappingURL=index-CImwV5JK.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.