1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8419],{63799:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/confirm_magic_link",function(){return n(57689)}])},57689:function(e,r,n){"use strict";n.r(r),n.d(r,{__N_SSP:function(){return k},default:function(){return confirm_magic_link}});var i=n(85893),o=n(97564),t=n(19236),s=n(95117),c=n(43523),a=n(67841),l=n(20966),u=n(33575),d=n(47037),_=n.n(d),f=n(11163),g=n(67294),m=n(1448);async function apiVerifyLoginPasswordless(e){let{token:r}=e,n=await (0,m.j0)("/api/fe/v3/verify_login_passwordless?t=".concat(r),{});if(n.ok)return{success:!0};try{let e=await n.json();return{success:!1,error_type:e.error_code,...e}}catch(e){return(0,m.xo)()}}var p=n(31908),x=n(61464),h=n(54070),y=n(95427),E=n(27416),k=!0,confirm_magic_link=e=>{let{pageConfig:r}=e,{classes:n}=(0,y.fc)(),d=(0,f.useRouter)(),[k,v]=(0,g.useState)(!1),[w,C]=(0,g.useState)(!1),[L,F]=(0,g.useState)(""),[b,j]=(0,g.useState)(null);(0,g.useEffect)(()=>{d.query.t&&_()(d.query.t)?(F(d.query.t),C(!1),d.replace(d.pathname,void 0,{shallow:!0})):C(!0)},[]);let handleSubmit=async()=>{v(!0);let e=await apiVerifyLoginPasswordless({token:L});e.success?(u.N9.show({title:"Success",message:"Login successful. Redirecting...",color:h.xR.LoginSuccessButtonColor,classNames:n}),await (0,E._v)(2500),await d.push("/post_login")):(e.error_type===x.$C.BadRequest?j(e.user_facing_error||m.aK):j(m.aK),v(!1))};return(0,i.jsx)(p.ZP,{pageConfig:r,pageTitle:"Finish Logging In",title:w?"":"Finish Logging In",children:w?(0,i.jsxs)(o.K,{spacing:"lg",children:[(0,i.jsx)(t.D,{order:1,fz:22,align:"center",color:h.xR.ErrorButtonColor,children:"Error"}),(0,i.jsx)(s.x,{size:"lg",color:h.xR.ErrorButtonColor,align:"center",children:"Make sure you either clicked the link in the email or copied it correctly."})]}):(0,i.jsxs)(o.K,{children:[(0,i.jsx)(c.M,{children:(0,i.jsx)(s.x,{children:"Use the button below to complete the login process."})}),(0,i.jsx)(a.z,{variant:h.Bq.LoginPrimary,onClick:handleSubmit,fullWidth:!0,mt:"lg",children:k?(0,i.jsx)(l.a,{color:h.xR.LoginSuccessButtonColor,size:"sm"}):"Login"}),b&&(0,i.jsx)(s.x,{color:h.xR.ErrorButtonTextColor,size:"md",my:"md",children:b})]})})}},61464:function(e,r,n){"use strict";var i,o;n.d(r,{$C:function(){return i},p0:function(){return parseUserFacingApiError},y2:function(){return UserFacingApiError}}),(o=i||(i={})).BadRequest="bad_request",o.InvalidToken="invalid_token",o.IncorrectPassword="incorrect_password",o.Forbidden="action_forbidden",o.EmailNotConfirmed="email_not_confirmed",o.Unauthorized="not_logged_in",o.UnexpectedError="unexpected_error",o.InvalidRequestFields="invalid_request_fields",o.ConfirmationEmailAlreadySentRecently="confirmation_email_sent",o.EmailSendFailure="email_send_failure",o.ActionDisabled="action_disabled",o.UserAccountDisabled="account_disabled",o.UserAccountLocked="account_locked",o.InvalidMfaCookie="invalid_mfa_cookie",o.RateLimitExceeded="rate_limit_exceeded",o.AccountMfaLocked="account_mfa_locked",o.IncorrectMfaCode="incorrect_mfa_code",o.ResourceNotFound="resource_not_found",o.FeatureLimitExceeded="feature_limit_exceeded",o.ActionAlreadyComplete="action_already_complete",o.InvalidCode="invalid_code",o.TooManyGrants="too_many_grants",o.InvalidTurnstileToken="invalid_turnstile_token",o.InviteNotFound="invite_not_found",o.UserMaxOrgsLimitExceeded="user_max_orgs_limit_exceeded",o.OrgMaxUsersLimitExceeded="org_max_users_limit_exceeded",o.OrgNotFound="org_not_found";let UserFacingApiError=class UserFacingApiError extends Error{constructor(e,r,n){super(e),this.user_facing_error=e,this.error_code=r,this.user_facing_errors=n}};let parseUserFacingApiError=async e=>{try{let r=await e.json();if("string"==typeof(null==r?void 0:r.user_facing_error))return new UserFacingApiError(r.user_facing_error,r.error_code,r.user_facing_errors)}catch(e){}return null}},27416:function(e,r,n){"use strict";function sleep(e){return new Promise(r=>setTimeout(r,e))}n.d(r,{_v:function(){return sleep}})}},function(e){e.O(0,[3972,7248,206,9748,9774,2888,179],function(){return e(e.s=63799)}),_N_E=e.O()}]);
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.