1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[459],{97946:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return n(3102)}])},3102:function(e,t,n){"use strict";n.r(t);var r=n(52322),i=n(39097),o=n.n(i),a=n(5632),l=n.n(a),c=n(38726),s=n(2784),d=n(87749),u=n(63974),p=n(16162),h=n(99294),g=n(95011),f=n(5288),x=n(63125),m=n(90736),_=n(20051),b=n(50370),j=n(59706);t.default=(0,c.qC)(a.withRouter)(e=>{let{router:t,webConfig:n}=e;(0,s.useEffect)(()=>{(0,_.nD)()&&l().push(m.Z6.HOMEPAGE)},[]);let i=(0,b.k5)(t);return(0,r.jsx)(g.Z,{$backgroundOverride:!0,disabled:!!(0,j.K6)(n,"accounts.disable_accounts"),children:(0,r.jsx)(p.e,{children:(0,r.jsxs)(p.x,{children:[(0,r.jsx)(f.Z,{tag:"h1",accessor:"login.header",html:!0}),(0,r.jsx)(f.Z,{tag:"h3",accessor:"login.subheader",html:!0}),(0,r.jsx)(x.n,{$background:"transparent"}),(0,r.jsx)(h.Z,{}),(0,r.jsx)("p",{children:(0,r.jsx)(o(),{href:{pathname:m.Z6.FORGOT_PASSWORD},passHref:!0,onClick:()=>(0,d.O)(u.x.AUTH__CLICK_FORGOT_PASSWORD),children:(0,r.jsx)(f.Z,{accessor:"forgot_password.prompt"})})}),(0,r.jsx)(x.n,{}),(0,r.jsxs)("p",{children:[(0,r.jsx)(f.Z,{accessor:"signup.prompt",html:!0}),"\xa0",(0,r.jsx)(o(),{href:"".concat(m.Z6.SIGN_UP,"?referrer=").concat(i),children:(0,r.jsx)(f.Z,{accessor:"signup.cta"})})]})]})})})})},16162:function(e,t,n){"use strict";n.d(t,{e:function(){return a},x:function(){return l}});var r=n(43580),i=n(36525),o=n(46956);let a=r.ZP.div.withConfig({componentId:"sc-ea7b8e07-0"})(["align-items:center;display:flex;flex-direction:column;justify-content:center;min-height:calc(100vh - ","px);@media (max-width:767px){background-color:",";min-height:calc(100vh - ","px);}"],2*i._.HEADERHEIGHT,e=>{let{theme:t}=e;return t.auth_page.background_color},2*i._.MOBILE_HEADERHEIGHT),l=r.ZP.div.withConfig({componentId:"sc-ea7b8e07-1"})(e=>{var t,n,r,a;let{theme:l}=e;return{backgroundColor:null!==(t=l.auth_page.background_color)&&void 0!==t?t:"transparent",border:"1px solid ".concat(null!==(n=l.auth_page.border_color)&&void 0!==n?n:"transparent"),borderRadius:"".concat(null!==(r=l.auth_page.border_radius)&&void 0!==r?r:0,"px"),margin:"0 auto",maxWidth:"".concat(i._.MEDIUM_CONTENT,"px"),padding:"40px 20px",textAlign:"center",width:"100%",...(0,o.l)(l.auth_page.font),h1:{margin:0,...(0,o.l)(l.auth_page.secondary_font)},h3:{...(0,o.l)(l.auth_page.font,["color","font_family","font_size","font_style","line_height"]),fontWeight:"normal",margin:0},p:{margin:"20px 0 0"},a:{textDecoration:"underline",transition:"opacity 0.2s linear",...(0,o.l)(l.auth_page.tertiary_font),"&:hover":{opacity:.7}},"@media (max-width: 767px)":{borderColor:null!==(a=l.auth_page.background_color)&&void 0!==a?a:"transparent"}}})},99294:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(52322),i=n(2784),o=n(56580),a=n(5632),l=n.n(a),c=n(63955),s=n(34183),d=n(97421),u=n(47141),p=n(5288),h=n(67946),g=n(74115),f=n(62907),x=e=>{let{loading:t,onLogin:n,loadingCaptcha:i,connectionError:o,submitting:a}=e,{handleSubmit:l,register:x}=(0,c.cI)(),m=u.g7,_=t||a,b=_?"login.cta_loading":"login.cta",j=e=>{n(Object.assign({identifier:e.identifier,secret:e.secret},m))};return(0,r.jsxs)(s.yO,{onSubmit:e=>{e.preventDefault(),l(j)(e)},children:[(0,r.jsx)(g.H,{condition:!!o,children:(0,r.jsx)(f.Gz,{variant:"banner","data-testid":"login-connection-error",retryTestId:"login-connection-retry",isRetrying:!!(t||i||a),onRetry:()=>{l(j)()}})}),(0,r.jsxs)(s.x,{children:[(0,r.jsx)("legend",{children:"Login form"}),(0,r.jsxs)(s.dS,{style:{display:"flex",flexDirection:"column",gap:"0rem"},children:[(0,r.jsxs)(s.Ll,{width:"100%",$autoHeight:!0,children:[(0,r.jsx)(h.Z,{visuallyHidden:!1,htmlFor:"identifier",children:"Email"}),(0,r.jsx)(s.Fy,{type:"email",placeholder:"Enter Email",autoComplete:"email",...x("identifier"),autoFocus:!1,style:{marginBottom:"16px"}},"identifier")]},"login-form-field-identifier"),(0,r.jsxs)(s.Ll,{width:"100%",$autoHeight:!0,children:[(0,r.jsx)(h.Z,{visuallyHidden:!1,htmlFor:"identifier",children:"Password"}),(0,r.jsx)(s.Fy,{type:"password",placeholder:"Enter Password",autoComplete:"current-password",...x("secret"),autoFocus:!1,style:{marginBottom:"16
1px"}},"secret")]},"login-form-field-password")]})]}),(0,r.jsx)(d.Db,{"data-testid":"signin-button",$submitting:_,disabled:_,type:"submit",style:{width:"100%"},$buttonTheme:"primary",children:(0,r.jsx)(g.H,{condition:!!i,whenTrue:"Loading",whenFalse:(0,r.jsx)(p.Z,{accessor:b})})})]})},m=n(50370),_=n(48994),b=n(65470),j=n(44722),y=n(15325),v=()=>{let e=(0,o.useDispatch)(),{fetchCaptchaToken:t,captchaEnabled:n,loadingCaptcha:a}=(0,j.ZP)({action:u.i5.API_ACTIONS.LOGIN}),c=(0,o.useSelector)(e=>e.app.auth.loading),s=(0,o.useSelector)(e=>e.app.auth.loginConnectionError),d=(0,o.useSelector)(e=>e.app.auth.loginFailed),[p,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{(s||d)&&h(!1)},[s,d]),(0,y.h)("login");let g=(t,n)=>{e(_.Z.login(Object.assign({},t,{[u.i5.FIELD_NAME]:n}),(0,m.PA)(l()),!1,l().pathname))},f=async r=>{h(!0);let[i,o]=n?await (0,m.Y3)(t()):[null,null];if(o){e(b.Z.displayErrorToast(u.F_,!0,!0)),h(!1);return}g(r,i),e(_.Z.checkoutAsGuest(null))};return(0,r.jsx)(x,{onLogin:e=>void f(e),loading:c,loadingCaptcha:a,connectionError:s,submitting:p})}},62907:function(e,t,n){"use strict";n.d(t,{Gz:function(){return u}});var r=n(52322),i=n(2784),o=n(53237),a=n(97421),l=n(20496);let c=l.Rj,s=l.om,d=l.Qn;function u(e){let{onRetry:t,variant:n="panel",heading:o=c,message:u,retryLabel:m=l.j6,retryingLabel:_="Trying againâ¦",isRetrying:b=!1,"data-testid":j,retryTestId:y}=e,v=(0,i.useRef)(!1),E=(0,i.useRef)(null),w=(0,i.useCallback)(()=>{v.current=!1,E.current&&(clearTimeout(E.current),E.current=null)},[]);(0,i.useEffect)(()=>{b||w()},[b,w]),(0,i.useEffect)(()=>w,[w]);let C=t?(0,r.jsx)(a.Db,{"data-css-override":"StyledPrimaryButton",type:"button","data-testid":y,size:"banner"===n?"small":void 0,disabled:b,onClick:()=>{!t||b||v.current||(v.current=!0,E.current=setTimeout(w,1e3),t())},children:b?_:m}):null;return"banner"===n?(0,r.jsxs)(f,{role:"alert","data-testid":j,children:[(0,r.jsx)(x,{children:null!=u?u:d}),C]}):(0,r.jsxs)(p,{role:"alert","data-testid":j,children:[(0,r.jsx)(h,{children:o}),(0,r.jsx)(g,{children:null!=u?u:s}),C]})}let p=(0,o.zo)("div",{display:"flex",flexDirection:"column",alignItems:"center",gap:"$4",padding:"$14",textAlign:"center"}),h=(0,o.zo)("h2",{fontSize:"$text400",fontWeight:"bold",textAlign:"center",margin:0}),g=(0,o.zo)("p",{fontSize:"$text200",textAlign:"center",margin:0}),f=(0,o.zo)("div",{display:"flex",flexDirection:"column",gap:"8px",padding:"12px 16px",marginBottom:"16px",border:"1px solid var(--connection-error__border-color, #d93025)",borderRadius:"4px",backgroundColor:"var(--connection-error__background-color, #fdecea)",color:"var(--connection-error__color, #5f1414)","@sm":{flexDirection:"row",alignItems:"center",justifyContent:"center"}}),x=(0,o.zo)("p",{margin:"0 !important",fontSize:"14px",lineHeight:"20px",whiteSpace:"pre-line",paddingRight:"12px",paddingLeft:"12px"})},63125:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(43580),i=n(36525);let o=r.ZP.hr.withConfig({componentId:"sc-b1115afe-0"})(["background-color:",";display:block;height:1px;border:0;margin:","px 0;padding:0;"],e=>{let{$background:t,theme:n}=e;return t||n.global.primary_border_color},i.jl.MEDIUM)},15325:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});var r=n(2784),i=n(56580),o=n(48994);function a(e){let t=(0,i.useDispatch)();(0,r.useEffect)(()=>{t(o.Z.clearConnectionErrors(e))},[t,e])}},44722:function(e,t,n){"use strict";var r=n(2784),i=n(17473),o=n(75470),a=n(20496),l=n(50370);class c extends Error{constructor(e){super("CAPTCHA token unavailable: ".concat(e)),this.name="CaptchaUnavailableError",this.reason=e}}t.ZP=e=>{var t,n;let{action:s}=e,{executeRecaptcha:d}=(0,i.xX)(),u=(0,o.v9)(e=>e.app.organization),p=null!=(n=null==u?void 0:null===(t=u.external_auth)||void 0===t?void 0:t.captcha)&&!!n.site_key&&(!Array.isArray(n.actions)||n.actions.includes(s));return{fetchCaptchaToken:(0,r.useCallback)(async()=>{let e;if(!d)throw a.uT("CAPTCHA has not been loaded","warning",{action:s}),new c("not_loaded");let[t,n]=await (0,l.Y3)(Promise.race([d(s),new Promise((t,n)=>{e=setTimeout(()=>n(Error("CAPTCHA execution timed out after ".concat(1e4,"ms"))),1e4)})]).finally(()=>clearTimeout(e)));if(n||!t){let e=Error("Error executing CAPTCHA. Please refresh the page and try again.");throw a.Tb(e,"error",{action:s,error:n,isTokenNull:t?"no":"yes"}),new c("execution_failed")}return t},[d,s]),captchaEnabled:p,loadingCaptcha:p&&!d}}}},function(e){e.O(0,[688,462,553,270,955,807,11,888,774,179],function(){return e(e.s=97946)}),_N_E=e.O()}]); 2//# sourceMappingURL=login-4580981215fef1ae.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.