!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0b6fee1b-e733-48c6-a129-4ce7b73d6f04",e._sentryDebugIdIdentifier="sentry-dbid-0b6fee1b-e733-48c6-a129-4ce7b73d6f04")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7948],{14891:function(e,t,n){"use strict";n.d(t,{P:function(){return g}});var i=n(85893),o=n(90512),s=n(4662),r=n(89448),a=n(61376),l=n(58211),c=n(9155),u=n(40411),d=n(27574),f=n(77765),h=n(52197),m=n.n(h);let g=e=>{let{email:t,stage:n}=e,{t:h}=(0,r.QT)("main"),g=a.P.auth,x=a.P.auth.stage,p="wrongDeviceForConfirm"===n||"deviceAuthorization"===n,v={icon:"wrongDeviceForConfirm"===n?"alert":"email",title:h(x[n].title),description:(0,i.jsx)(d.c,{ns:"main",values:{email:t},i18nKey:x[n].text,tOptions:{transKeepBasicHtmlNodesFor:["p"]},components:{a:(0,i.jsx)(f.r,{href:"mailto:support@bitsgap.com",color:f.M.BLUE}),blue:(0,i.jsx)("span",{className:m().highlight})}})};return(0,i.jsx)(c.P,{height:"confirmEmail"===n?"long":"short",children:(0,i.jsxs)("div",{className:(0,o.Z)(m().root,{[m().withFooter]:p}),children:[(0,i.jsx)("div",{className:m().content,children:(0,i.jsx)(u.k,{...v})}),p&&(0,i.jsxs)("footer",{className:m().footer,children:[h(g.login.cannotLogin),(0,i.jsx)(l.A,{onClick:s.x,children:h(g.login.getHelp)})]})]})})}},12065:function(e,t,n){"use strict";n.d(t,{X:function(){return G}});var i=n(85893),o=n(46670),s=n(81023),r=n(35410),a=n(14891),l=n(67294),c=n(351),u=n(89448),d=n(61376),f=n(9155),h=n(27574),m=n(58211),g=n(77765),x=n(49282),p=n.n(x);let v=(0,o.Pi)(function(e){let{auth:t}=e,{t:n}=(0,u.QT)("main"),o=d.P.auth.login,{backToLogIn:s,email:r,loginStage:a,mfaEnabled:l,password:c,setLoginStage:f,u2fEnabled:x,u2fLogin:v}=t;return(0,i.jsxs)("footer",{className:p().root,children:[(0,i.jsxs)("p",{className:p().help,children:[n(o.cannotLogin)," ",(0,i.jsx)(g.r,{href:"https://support.google.com/accounts/answer/185834",color:g.M.BLUE,external:!0,children:n(o.getHelp)})]}),("mfaCode"===a&&x||"u2f"===a&&l)&&(0,i.jsx)("p",{className:p().alternative,children:(0,i.jsx)(h.c,{i18nKey:o.useAnotherMethod,ns:"main",components:{a:(0,i.jsx)(m.A,{onClick:j})}})}),(0,i.jsxs)("p",{className:p().backLink,children:[n(o.backTo)," ",(0,i.jsx)(m.A,{onClick:function(){s()},children:n(o.title)})]})]});async function j(){"mfaCode"===a?(f("u2f"),await v(t.deviceConfirmToken||r,c)):f("mfaCode")}}),j=(0,s.Q)(v);var b=n(90551),k=n(71433),w=n(90512),P=n(13184),_=n(40946),y=n.n(_);let C=(0,o.Pi)(function(e){let{autoFocus:t=!1,inputProps:n,length:o=b.k2,onClick:s,onChange:r=()=>null,onCompleted:a=()=>null,placeholder:c="",value:u="",error:d,disabled:f}=e,h=!!d,m=e=>Array(o).fill("").map((t,n)=>e[n]??""),[g,x]=(0,l.useState)(m(u)),[p,v]=(0,l.useState)(-1),j=(0,l.useMemo)(()=>Array(o).fill(null).map(()=>(0,l.createRef)()),[o]),k=(0,l.useCallback)(e=>{var t;let n=null===(t=j[e])||void 0===t?void 0:t.current;n&&requestAnimationFrame(()=>{n.focus()})},[j]);return(0,l.useEffect)(()=>{t&&k(0)},[t,k,j]),(0,i.jsxs)("div",{className:(0,w.Z)(y().root,{[y().disabled]:f}),onClick:function(){s&&s()},children:[(0,i.jsx)("div",{className:y().items,children:j.map((e,t)=>(0,i.jsx)("input",{autoComplete:"one-time-code",className:(0,w.Z)(y().item,{[y().isError]:h}),onChange:e=>(function(e,t){let n=e.target.value,i=n.replace(g[t],"");if(!/^\d/.test(i)){_(t);return}if(i.length>1){x(m(n)),n.length===o&&(a(n),N(t));return}if(C(i,t),t===o-1){N(t);return}k(t+1)})(e,t),onFocus:()=>{var e;(null===(e=j[t])||void 0===e?void 0:e.current)&&(v(t),_(t))},onKeyDown:e=>(function(e,t){let n=e.key;if("Backspace"===n||"Delete"===n){e.preventDefault(),C("",p),k(t-1);return}n===g[t]&&k(t+1)})(e,t),onPaste:e=>(function(e,t){e.preventDefault();let n=e.clipboardData.getData("text").slice(0,o);if(/^\d/.test(n)){if(x(m(n)),n.length===o){a(n),N(t);return}k(n.length)}})(e,t),placeholder:c,ref:e,value:g[t],inputMode:"numeric",...n},t))}),d&&(0,i.jsx)("div",{className:y().errorMessage,children:(0,i.jsx)(P.u,{message:d,centered:!0})})]});function _(e){let t=j[e].current;t&&requestAnimationFrame(()=>{t.select()})}function C(e,t){let n=[...g];n[t]=e,x(n);let i=n.join(""),s=i.length===o;r(i),s&&a(i)}function N(e){var t;let n=null===(t=j[e])||void 0===t?void 0:t.current;n&&requestAnimationFrame(()=>{n.blur()})}});var N=n(24545),E=n.n(N);let L=(0,o.Pi)(function(e){let{auth:t}=e,{t:n}=(0,u.QT)("main"),o=d.P.auth.login,s=d.P.auth.stage.mfa,[r,a]=(0,l.useState)(""),[h,m]=(0,l.useState)(""),[g,x]=(0,l.useState)(!1),{email:p,loggingIn:v,login:w,password:P,sendDeviceConfirm:_,socialLogin:y}=t,N={icon:"key",title:n(s.title),description:n(s.text)};return(0,i.jsx)(f.P,{header:N,height:"short",children:(0,i.jsxs)("div",{className:E().root,children:[(0,i.jsx)(C,{value:r,onCompleted:function(e){S(e),x(!0)},onChange:function(e){S(e)},onClick:function(){x(!1)},error:g&&h?h:null,disabled:v,autoFocus:!0}),(0,i.jsx)(j,{})]})});async function L(e,n){return!t.deviceConfirmToken&&n&&n.provider&&n.auth_token?y(n.auth_token,n.provider,e):t.deviceConfirmToken?_(t.deviceConfirmToken,e):w(p,P,e)}async function S(e){m("");let t=e.replace(/[^\d]/g,"").slice(0,b.k2);if(a(t),t.length===b.k2){let e=function(){let e=(0,c.U2)(k.Ls);return e?JSON.parse(e):null}(),n=await L(t,e);m((null==n?void 0:n.message)??"")}else m(n(o.mfaValidateMessage))}}),S=(0,s.Q)(L);var Q=n(40411),T=n(42541),D=n.n(T);let q=(0,o.Pi)(function(e){let{auth:t}=e,{t:n}=(0,u.QT)("main"),o=d.P.auth.stage.u2f,{email:s,password:r,u2fLogin:a}=t,l={icon:"usb",title:n(o.title),description:(0,i.jsx)(h.c,{i18nKey:o.text,ns:"main",components:{a:(0,i.jsx)(m.A,{onClick:c})}})};return(0,i.jsx)(f.P,{height:"short",children:(0,i.jsxs)("div",{className:D().root,children:[(0,i.jsx)(Q.k,{...l}),(0,i.jsx)(j,{})]})});async function c(){await a(s,r)}}),A=(0,s.Q)(q),F=(0,o.Pi)(function(e){let{auth:t}=e,{handleSocialLogin:n}=t;return(0,l.useEffect)(()=>{let e=(0,c.U2)(k.Ls);if(e){let t=JSON.parse(e),{provider:i}=t,o=t.auth_token;n(t,o||"",i)}},[n]),null}),z=(0,s.Q)(F);var I=n(70595),M=n(84120),B=n(57897),K=n(45412),R=n(6515),U=n(45374),W=n(21778),X=n(40328),J=n.n(X);let H=(0,o.Pi)(function(e){let{auth:t}=e,{t:n}=(0,u.QT)("main"),o=d.P.auth,s=o.login,r=(0,U.S)(),{loggingIn:a,login:h,isValidEmail:x,a:p,email:v,password:j,setEmail:b,setPassword:w,setLoginStage:P,onlyGoogleAuth:_,deviceConfirmError:y}=t,[C,N]=(0,l.useState)(""),[E,L]=(0,l.useState)("");(0,l.useEffect)(()=>{N(y)},[y]),(0,l.useEffect)(()=>{(0,c.U2)(W.J6)&&N("Session expired. Please log in again to continue using the platform.")},[]);let S={title:n(s.title)};return(0,i.jsxs)(f.P,{header:S,children:[(0,i.jsxs)("form",{className:J().form,onSubmit:T,children:[(0,i.jsx)(K.o,{id:"email",testId:"login-email",onChange:function(e){Q(),v||r.createEvent("insert_login_form",{login_field:"email"}),b(e),p(e.toLowerCase())},disabled:a,error:!!C,label:n(o.email),errorText:E,autoComplete:"webauthn",autoFocus:!0,maxLength:k.b9}),!_&&(0,i.jsx)(M.W,{testId:"login-password",onChange:function(e){Q(),j||r.createEvent("insert_login_form",{login_field:"password"}),w(e)},disabled:a,errorText:C}),!_&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:J().forgotLink,children:(0,i.jsx)(m.A,{testId:"btn-forgot-password",onClick:function(){b(""),P("resetPassword")},children:n(s.forgotPassword)})}),(0,i.jsx)(R.zx,{testId:"login-form-submit",type:"submit",size:R.qE.XXL,fullWidth:!0,disabled:a||_,children:n(s.loginButton)})]})]}),(0,i.jsx)(I.L,{withPasskey:!0}),!_&&(0,i.jsxs)("div",{className:J().footer,children:[n(s.dontHaveAccount)," ",(0,i.jsx)(g.r,{color:g.M.BLUE,href:B.zN,children:n(s.signUpLink)})]}),(0,i.jsx)(z,{})]});function Q(){L(""),N("")}async function T(e){if(e.preventDefault(),(0,c.Od)(W.J6,{domain:W.JP,path:"/"}),x(v)){let e=await h(v,j);N((null==e?void 0:e.message)??"")}else L(n(o.invalidEmail))}}),O=(0,s.Q)(H),Z=(0,o.Pi)(function(e){let{auth:t}=e,{loginStage:n,email:o}=t;switch(n){case"mfaCode":return(0,i.jsx)(S,{});case"u2f":return(0,i.jsx)(A,{});case"resetPassword":return(0,i.jsx)(r.m,{stage:"resetPassword"});case"emailSent":case"deviceAuthorization":case"wrongDeviceForConfirm":return(0,i.jsx)(a.P,{stage:n,email:o});default:return(0,i.jsx)(O,{})}}),G=(0,s.Q)(Z)},35410:function(e,t,n){"use strict";n.d(t,{m:function(){return S}});var i=n(85893),o=n(46670),s=n(11163),r=n(89448),a=n(61376),l=n(81023),c=n(9155),u=n(70595),d=n(57897),f=n(58211),h=n(33543),m=n.n(h),g=n(67294),x=n(6515),p=n(45412),v=n(71433),j=n(69409),b=n.n(j);let k=(0,o.Pi)(function(e){let{auth:t}=e,{t:n}=(0,r.QT)("main"),o=a.P.auth,{setLoginStage:s,sendRecoveryLink:l,isValidEmail:c,email:u,setEmail:d,onlyGoogleAuth:f}=t,[h,m]=(0,g.useState)("");return(0,i.jsxs)("form",{className:b().root,onSubmit:j,children:[(0,i.jsx)(p.o,{id:"email",label:n(o.email),onChange:function(e){m(""),d(e)},errorText:h,value:u,maxLength:v.b9}),!f&&(0,i.jsx)(x.zx,{testId:"reset-password-submit",type:"submit",size:x.qE.XXL,fullWidth:!0,children:n(o.login.sendRecoveryLink)})]});async function j(e){e.preventDefault(),c(u)?await l(u)&&s("emailSent"):m(n(o.invalidEmail))}}),w=(0,l.Q)(k);var P=n(90551),_=n(84120),y=n(66384),C=n.n(y);let N=(0,o.Pi)(function(e){let{auth:t,isTokenChecking:n}=e,{t:o}=(0,r.QT)("main"),l=a.P.auth,c=(0,s.useRouter)(),[u,f]=(0,g.useState)(""),[h,m]=(0,g.useState)(!1),[p,v]=(0,g.useState)({isWeak:!1,validationRules:[]}),{sendNewPassword:j,validatePassword:b,parseResetPasswordHash:k,setLoginStage:w,setAlert:y}=t;return(0,i.jsxs)("form",{className:C().root,onSubmit:N,children:[(0,i.jsx)(_.W,{onChange:function(e){v(b(e,P.lo)),f(e)},disabled:h,validatorResult:p}),(0,i.jsx)(x.zx,{type:"submit",size:x.qE.XXL,fullWidth:!0,value:u,disabled:h||n,loading:n,children:o(l.login.changeButton)})]});async function N(e){e.preventDefault();let t=k();if(u.trim().length>0&&2===t.length&&!p.isWeak){let[e,n]=t;m(!0);let i=await j(e,n,u);m(!1),i&&(w("password"),y("passwordChanged"),c.push(d.vf))}}}),E=(0,l.Q)(N),L=(0,o.Pi)(function(e){let{auth:t,stage:n,isTokenChecking:o}=e,{t:l}=(0,r.QT)("main"),h=a.P.auth,g=h.stage[n],x=(0,s.useRouter)(),{setEmail:p,setLoginStage:v}=t,j={title:l(g.title),description:l(g.text)};return(0,i.jsx)(c.P,{header:j,children:(0,i.jsxs)("div",{className:m().root,children:["resetPassword"===n&&(0,i.jsx)(w,{}),"changePassword"===n&&(0,i.jsx)(E,{isTokenChecking:o}),(0,i.jsxs)("div",{className:m().footer,children:[(0,i.jsx)(u.L,{withPasskey:!0}),l(h.login.backTo)," ",(0,i.jsx)(f.A,{onClick:function(){p(""),v("password"),"changePassword"===n&&(v("password"),x.push(d.vf))},children:l(h.login.loginButton)})]})]})})}),S=(0,l.Q)(L)},4662:function(e,t,n){"use strict";n.d(t,{x:function(){return o}});var i=n(21778);function o(){!function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];!i.DM&&window.zE?window.zE.apply(null,t):console.warn("Zendesk is not initialized yet")}("messenger","open")}},56779:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var i=n(85893),o=n(19842),s=n(96372);let r=e=>{let{metaPage:t,...n}=e;return(0,i.jsx)(o.n,{...n,tNamespace:"common",tKeysMeta:s.y.head[t]})}},49282:function(e){e.exports={root:"_tG",alternative:"_tH",backLink:"_tI"}},52197:function(e){e.exports={root:"_qc",withFooter:"_qd",content:"_qe",highlight:"_qf",footer:"_qg"}},40328:function(e){e.exports={root:"_qP",form:"_qQ",footer:"_qR"}},24545:function(e){e.exports={root:"_qo"}},42541:function(e){e.exports={root:"_qp"}},66384:function(e){e.exports={root:"_tJ"}},33543:function(e){e.exports={root:"_pk",footer:"_pl"}},69409:function(e){e.exports={root:"_tK"}},40946:function(e){e.exports={root:"_u2",items:"_u3",disabled:"_u4",item:"_u5",isError:"_u6",errorMessage:"_u7"}}}]);