1import{u as Y,a as E,W as H,X as M,j as e,F as G,L as D,Y as Q,A as m,Z as p,_ as F,b as f,$ as J,B as X,a0 as S,a1 as Z,g as K,e as ee,c as ae,a2 as te,f as ne,z as se,a3 as oe,r as ie,a4 as b,p as re,a5 as N,T as A,w as le,a6 as R,a7 as ce,a8 as de,a9 as ue,aa as ge,ab as me,ac as I,ad as he,ae as pe,af as be,ag as C,J as we}from"./index-ZWP6Dbbj.js";import{r as k}from"./vendor-DKtCm5W2.js";import{i as O}from"./interpolateMarkup-iGH1mqyh.js";import{S as fe}from"./SocialLoginButtons-D9KX2QgJ.js";import{R as ke}from"./recaptcha-wrapper-kgvo4tPj.js";import{P as ye}from"./index-BsxiMeTv.js";import{R as ve}from"./RichText-BpKuIjrs.js";import{M as xe}from"./Message-CvFAeXOm.js";import{p as je}from"./login-B_fF-H8e.js";import{u as Se}from"./useRefreshSiteAccessFlags-CP3ATGr9.js";import{al as j}from"./app-BUG-_G7c.js";import"./dayjs-timezone-iana-plugin-CmU3ItL3.js";import"./collapseNbsp-BitJg-02.js";try{let a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="2e768ce5-ae90-4104-bc5a-187a53837256",a._sentryDebugIdIdentifier="sentry-dbid-2e768ce5-ae90-4104-bc5a-187a53837256")}catch{}const _e={en:"Email",nl:"Email"},Pe={en:"Forgot password?",nl:"Wachtwoord vergeten?"},Le={en:"Login",nl:"Log in"},Te={en:"Password",nl:"Wachtwoord"},De={email:_e,forgotPassword:Pe,login:Le,password:Te};function Fe(a){const t=Y(a),s=E(De),g=t.binding("password"),l=H(),c=M(),i=k.useCallback(n=>{t.onSubmit(n),t.values.captcharesponse=null},[t]);return e.jsxs(G,{...m(p.form),form:t,onSubmit:i,warnUnsaved:!1,children:[e.jsx(D,{label:s("email"),required:!0,children:e.jsx(Q,{disabled:a.disableEmail||t.submitting,required:!0,name:"email",type:"email",placeholder:s("email"),...t.binding("email"),autoComplete:"username",onChange:n=>{t.binding("email").onChange(n)},...m(p.emailInput)})}),e.jsxs(F,{gap:4,children:[e.jsx(D,{label:s("password"),required:!0,children:e.jsx(ye,{autoFocus:a.autoFocusPassword,disabled:t.submitting,required:!0,name:"password","aria-label":s("password"),placeholder:s("password"),onChange:n=>g.onChange(n.currentTarget.value),value:g.value||"",autoComplete:"current-password",...m(p.passwordInput)})}),e.jsx(f,{style:{marginLeft:"auto"},to:`/forgot-password${a.includeQueryOnForgotPassword?c.search:""}`,children:s("forgotPassword")})]}),e.jsx("br",{}),a.showCaptcha&&e.jsx(ke,{sitekey:l.recaptcha_checkbox_key,...t.binding("captcharesponse"),...m(p.recaptchaCheckbox)},a.attemptNumber),e.jsxs(F,{gap:"sm",children:[l.settings.auth_login_extra_text&&e.jsx(J,{bg:"gray.1",bdrs:"sm",p:"sm",children:e.jsx(ve,{size:"small",children:l.settings.auth_login_extra_text})}),e.jsx(X,{fullWidth:!0,type:"submit",loading:t.submitting,...m(p.submitButton),children:s("login")})]})]})}const Ne=a=>(a.status===400||a.status===401)&&(a.code===S.FAILED_CAPTCHA||a.code===S.WRONG_PASSWORD_CAPTCHA),Ae={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeedBasicsQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"detectedPrimaryLanguage"}},{kind:"Field",name:{kind:"Name",value:"image"}},{kind:"Field",name:{kind:"Name",value:"summary"}},{kind:"Field",name:{kind:"Name",value:"title"}}]}}]}}]},Re={en:"Step 1. Login to your personal account",nl:"Stap 1. Log in met je persoonlijke account"},Ie={en:"This account will be linked to your %{g:organization}, you can change this later.",nl:"Dit account wordt gelinkt aan je %{g:organization}. Dit kun je later veranderen."},Ce={en:"Step 1. Login to your personal account",nl:"Stap 1. Log in met je persoonlijke account"},Oe={en:"This account will be linked to your request for help",nl:"Dit account wordt gekoppeld aan je hulpvraag"},Ee={en:"You have successfully logged in through your organisation, but we do not have sufficient information available for your profile. Please, contact your administrator to be able to use the platform.",nl:"U bent succesvol ingelogd via uw organisatie, maar we hebben niet voldoende informatie beschikbaar voor uw profiel. Neem contact op met uw beheerder om het platform te kunnen gebruiken."},Me={en:"You have successfully logged in through your school, but we have no information available for your profile. Please, contact your administrator to be able to use the platform.",nl:"U bent succesvol ingelogd via uw school, maar we hebben geen informatie beschikbaar voor uw profiel. Neem contact op met uw beheerder om het platform te kunnen gebruiken."},Ue={en:"There was an error while logging you in",nl:"Er is een fout opgetreden tijdens het inloggen"},$e={en:"Invalid email or password. You can <sign-up-link>sign up here</sign-up-link> if you are not a member, or you can <reset-password-link>reset your password</reset-password-link> if you have lost it.",nl:"Ongeldig e-mailadres of wachtwoord. Je kunt je hier <sign-up-link> aanmelden </sign-up-link> als je nog geen lid bent, of je kunt <reset-password-link> je wachtwoord opnieuw instellen </reset-password-link> als je het kwijt bent."},We={en:"No account yet? ",nl:"Heb je nog geen account?"},qe={en:"Your password has been reset successfully. You can now log in.",nl:"Uw wachtwoord is succesvol gereset. U kunt nu inloggen."},ze={en:"Create account here",nl:"Maak hier een account aan"},Be={en:"Login",nl:"Log in"},Ve={createOrgStep:Re,createOrgStep_sub:Ie,createP2PStep:Ce,createP2PStep_sub:Oe,error_oidc_azure_missing_information:Ee,error_oidc_kennisnet_missing_information:Me,error_unknown:Ue,invalidUsernameOrPasswordMessage:$e,noAccount:We,passwordResetSuccess:qe,registerHere:ze,title:Be};function Ye(){const[a,t]=k.useState(null),[s,g]=k.useState(!1),[l,c]=k.useState(0),i=Z(),n=E(Ve),h=K(),{settings:U}=h.whitelabel,$=ee(),y=ae(),_=M(),W=te(),P=ne(),q=se(),[d]=oe(),z=Se();ie(()=>P.customMetaTags??{},!!P.customMetaTags);const v=d.get("error"),L=U.email_login_disabled&&!d.get(b.showRegularLogin),B=async r=>$(ge({...r,whitelabel:h.whitelabel})).then(async o=>{if(me(o)){const T=d.get(b.next);y(I("twoFactorAuth",{ticket:o.ticket,next:T||void 0,email:o.email||void 0,backRedirect:o.email?I("login",{email:o.email,next:T||"/"}):void 0}));return}const w=o;await W.resetStore(),w?(await z().catch(he),je({memberships:w,searchParams:d,location:_,navigate:y})):y(`/pending-verify-account?email=${encodeURIComponent(r.email)}`)}).catch(o=>{if(i.current){if(c(w=>w+1),o.status===401&&o.code===S.INVALID_USERNAME_OR_PASSWORD){t({type:"invalid-username-or-password",email:r.email});return}Ne(o)&&(t(null),g(!0))}return q()(o)});re(n("title"));const u=d.get(b.next),x=u==="/create-organization",V=u===`/${N}${h.deedsString}/create`||u?.endsWith(`/${N}${h.deedsString}/new`);return e.jsxs("div",{className:j.root,children:[x||V?e.jsxs(e.Fragment,{children:[e.jsx(A,{order:1,ta:"center",size:"h2",children:n(x?"createOrgStep":"createP2PStep")}),e.jsx(le,{ta:"center",children:n(x?"createOrgStep_sub":"createP2PStep_sub")})]}):e.jsx(A,{order:1,ta:"center",size:"h2",children:n("title")}),e.jsxs("div",{className:j.contentWrapper,children:[d.get("passwordReset")==="true"&&e.jsx(R,{status:"success",children:e.jsx("p",{children:n("passwordResetSuccess")})}),v&&e.jsx(R,{status:"danger",children:e.jsx("p",{children:O(n(`error_${ce(v)?v:"unknown"}`),{contactLink:(...r)=>e.jsx("a",{href:`mailto:${h.whitelabel.contact_email}`,target:"_blank",rel:"nofollow noreferrer noopener",children:r})})})}),e.jsx(fe,{mode:"login",hasDividerOnBottom:!L}),a?.type==="invalid-username-or-password"&&e.jsx(xe,{...m(de.invalidUsernameOrPasswordMessage),status:"danger",children:O(n("invalidUsernameOrPasswordMessage"),{"sign-up-link":(...r)=>e.jsx(f,{to:{pathname:"/register",search:`?${new URLSearchParams({...u?{next:u}:{},email:a.email}).toString()}`},children:r}),"reset-password-link":(...r)=>e.jsx(f,{to:{pathname:"/forgot-password",search:`?${new URLSearchParams({...u?{next:u}:{},email:a.email}).toString()}`},children:r})})}),!L&&e.jsxs(e.Fragment,{children:[e.jsx(Fe,{onSubmit:B,attemptNumber:l,showCaptcha:s,initialValues:{email:d.get(b.email)||""},includeQueryOnForgotPassword:!0}),e.jsxs("div",{className:j.noAccount,children:[`${n("noAccount")} `,e.jsx(f,{to:`/register${_.search}`,children:n("registerHere")})]})]})]}),e.jsx(ue,{mode:"accounts",align:"center"}),!1]})}const He=async({client:a,site:t,initialState:s,search:g})=>{if(!t.whitelabel.settings.login_wall_allow_insecure_deed_sharing||!a)return;const l=new URLSearchParams(g??"").get(b.next),c=pe({path:be({deedsTranslation:t.deedsString}),end:!0},l??"");if(!c||!c.params.deedId)return;const{deed:i}=(await a.query({query:Ae,variables:{id:c.params.deedId}})).data;if(!i)return;s||(s={});const n={currentlyActiveLanguage:t.language,originalContentLanguage:i.detectedPrimaryLanguage,shouldAttemptTranslateToUserLanguage:!1,whitelabel:t.whitelabel};s.customMetaTags={"og:type":"article","og:title":C({...n,obj:i.title}),...we(i.image),"og:description":C({...n,obj:i.summary})}};Ye.preload=He;export{Ye as default}; 2//# sourceMappingURL=index-B5hTD1vy.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.