(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{"/Nrg":function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var r,o,a,i=n("KD1n"),c=n("ERkP"),u=n("KYvd"),s=n("DQj2"),l=n("DG7P"),f=n("dmrr"),d=n("7asP"),p=n("6QEl"),h=n("135/"),g=n("jiAW"),b=c.createElement,v=p.c.h1(r||(r=Object(i.a)(["\n ","\n margin-top: 0;\n margin-bottom: ",";\n ","\n"])),Object(h.a)("large1","alternate"),Object(g.i)(3),Object(u.b)()),m=p.c.h2(o||(o=Object(i.a)(["\n ","\n margin-top: ",";\n"])),Object(h.a)("medium1","alternate"),Object(g.i)(4)),y=Object(p.c)(s.a)(a||(a=Object(i.a)(["\n margin-bottom: ",";\n"])),Object(g.i)(4)),O=function(t){var e=c.createRef(),n=c.createRef(),r=c.useContext(l.b);return c.useEffect((function(){null!==e&&null!==e.current&&window.scrollTo(e.current.offsetTop,0)}),[]),c.useEffect((function(){r.drawFocusElement("badToken",n)}),[]),b("div",{ref:e},b(v,{"data-testid":"".concat(t.testContext,"-reset-message-title"),ref:n},t.text.heading),b(f.a,{type:"success",text:t.text.platformMessage,subText:t.dynamicText}),b(m,null,t.text.subHeading),b(y,{content:t.text.safeHtml}),b(d.a,{emphasis:"low",sizing:"regular","data-testid":"".concat(t.testContext,"-not-received-button"),onClick:t.ctaHandler},t.text.cta))}},"11/B":function(t,e,n){"use strict";n.r(e),n.d(e,"LoginContext",(function(){return pe}));var r,o,a,i,c,u,s,l,f,d,p,h,g,b,v=n("QsI/"),m=n("zjfJ"),y=n("KD1n"),O=n("ERkP"),w=n("ysqo"),j=n.n(w),x=n("LWxk"),E=n("CqS1"),L=n("dNoy"),T=n("xRQW"),k=n("mv33"),P=n("kbkf"),S=n("5wVl"),_=n("n8KH"),I=n("czI7"),A=n("p6kL"),C=n("6QEl"),R=n("zygG"),N=n("fYnN"),D=n("qdM3"),G=n("hKR2"),U=n("5lgO"),F=n("eDQd"),M=n("BiMg"),B=n("xY3a"),K=n("v8K/"),q=n("UvP8"),H=n("yUWx"),W=n("135/"),X=n("jiAW"),V=n("dcTo"),z=n("e8Z3"),Y=O.createElement,Q=C.c.h2(r||(r=Object(y.a)(["\n ","\n margin-bottom: ",";\n"])),Object(W.a)("large1","alternate"),Object(X.i)(3)),$=Object(C.c)(V.a)(o||(o=Object(y.a)(["\n margin-top: ",";\n"])),Object(X.i)(2)),J=C.c.h2(a||(a=Object(y.a)(["\n ","\n"])),Object(W.a)("large1","alternate")),Z=C.c.p(i||(i=Object(y.a)(["\n ","\n margin-bottom: ",";\n"])),Object(W.a)("bodyText","default"),Object(X.i)(4)),tt=Object(C.c)(B.a)(c||(c=Object(y.a)(["\n padding: ",";\n"])),Object(X.i)(4)),et=Object(C.c)(K.a)(u||(u=Object(y.a)(["\n margin-top: ",";\n margin-bottom: ",";\n"])),(function(t){return t.reversed?Object(X.i)(2):Object(X.i)(5)}),(function(t){return t.reversed?Object(X.i)(5):Object(X.i)(2)})),nt=Object(C.c)(M.a)(s||(s=Object(y.a)(["\n width: 100%;\n"]))),rt=function(t){var e="invertRegister"===t.reverseGuestCheckoutLayout,n=Object(D.d)(),r=O.useState(null),o=Object(R.a)(r,2),a=o[0],i=o[1],c=O.useState(!1),u=Object(R.a)(c,2),s=u[0],l=u[1],f={loginGuestCheckoutTitle:Object(E.a)("account.login.guestcheckout.title"),loginGuestCheckoutEmptyBasket:Object(E.a)("account.login.guestcheckout.emptybasket.text"),loginNewCustomerTitle:Object(E.a)("account.login.newcustomers.title"),loginNewCustomerText:Object(E.a)("account.login.newcustomers.text"),loginWhyRegisterMessage:Object(E.a)("account.login.whyregister.message"),loginButtonRegister:Object(E.a)("account.login.button.register.text"),loginButtonGuestCheckoutRegisterText:Object(E.a)("account.login.button.guestcheckout.register.text"),accountRegistrationUnavailableWarning:Object(E.a)("account.register.unavailable.error")},d=t.returnTo?"".concat(T.b.Register,"?returnTo=").concat(decodeURI(t.returnTo)):T.b.Register,p=function(t,e){return Y(G.a,{"aria-live":t,message:e})},h=Object(L.b)().basketCookieKey;O.useEffect((function(){l("undefined"===typeof N.get(h))}),[]);var g=Y("div",{"data-testid":"guest-checkout-container"},Y(J,{"data-testid":"guest-checkout-title",id:"guest-checkout-title"},f.loginGuestCheckoutTitle||"Continue as a guest"),Y($,{message:s?f.loginGuestCheckoutEmptyBasket:a,type:s?"info":"error",flashMessageId:"guest checkout",renderAnnouncer:p}),!s&&Y(z.a,{containsSubscriptionProduct:t.containsSubscriptionProduct,internalServerErrorCallback:i}));return Y(O.Fragment,null,Y(P.b,{features:[S.SUPPORTED_FEATURES.REGISTRATION_HIDDEN_ON_LOGIN_PAGE],renderCondition:function(t){return!t.includes(S.SUPPORTED_FEATURES.REGISTRATION_HIDDEN_ON_LOGIN_PAGE)},renderAlternative:Y(O.Fragment,null,t.showGuestCheckout&&Y(P.b,{features:[S.SUPPORTED_FEATURES.GUEST_CHECKOUT]},Y(tt,{"aria-labelledby":"guest-checkout-title"},Y(q.Box,{width:1},g))))},Y(tt,{"aria-labelledby":"guest-journey-title"},Y(H.a,{order:e?[1,0]:[0,1]},!n.includes(F.p.RegistrationUnavailable)&&Y(q.Box,{width:1},Y(Q,{id:"guest-journey-title","data-testid":"guest-journey-title"},f.loginNewCustomerTitle),Y(Z,{"data-testid":"guest-journey-message"},f.loginNewCustomerText,f.loginWhyRegisterMessage),Y(U.a,{href:d},Y(nt,{renderedAs:"a",emphasis:"high",sizing:"regular","data-testid":"guest-journey-button"},s?f.loginButtonRegister:f.loginButtonGuestCheckoutRegisterText))),n.includes(F.p.RegistrationUnavailable)&&Y(q.Box,{width:1},Y(Q,{id:"guest-journey-title","data-testid":"guest-journey-title"},f.loginNewCustomerTitle),Y($,{message:f.accountRegistrationUnavailableWarning,type:"info",flashMessageId:"registration_unavailable",renderAnnouncer:p})),t.showGuestCheckout&&Y(P.b,{features:[S.SUPPORTED_FEATURES.GUEST_CHECKOUT]},Y(H.a,{order:e?[1,0]:[0,1]},Y(et,{reversed:e}),g))))))},ot=n("DG7P"),at=n("7xIC"),it=n.n(at),ct=n("H5qd"),ut=n.n(ct),st=n("1U1M"),lt=n("WzCI"),ft=n("U+w7"),dt=n("KYvd"),pt=n("DQj2"),ht=n("EI6B"),gt=n("c4N8"),bt=n("7asP"),vt=n("pE1c"),mt=n("GouS"),yt=O.createElement,Ot=function(t){var e=t.onSubmitHandler,n=t.forgottenPasswordHandler,r=t.onFieldInput,o=t.style,a=t.className,i=t.i18nText,c=t.renderLiveMessage,u=t.renderAnnouncer,s=t.inputScrollOffset,l=void 0===s?0:s,f=t.csrf;return yt(vt.a,Object(ht.a)({},o,{csrf:f,className:a||"",onSubmit:e,renderAnnouncer:u,fields:[{fieldName:"emailAddress",renderField:function(t,e){return yt(q.Box,{width:1,key:e},yt(mt.a,{bindref:t,offset:l},yt(gt.a,{label:i.emailAddressLabel||"Email Address",required:!0,type:"email",onInput:function(t){return r&&r.email(t)},autocomplete:"off",renderLiveMessage:c,i18nText:i})))}},{fieldName:"password",renderField:function(t,e){return yt(q.Box,{width:1,mb:5,key:e},yt(mt.a,{bindref:t,offset:l},yt(gt.a,{label:i.passwordLabel||"Password",required:!0,type:"password",onInput:function(t){return r&&r.password(t)},autocomplete:"off",renderLiveMessage:c,i18nText:i})))}}]}),yt(q.Box,{width:1,mt:4},yt(bt.a,{emphasis:"low",onClick:n,"aria-label":i.forgotPasswordAriaLabel||"Reset your forgotten password","data-testid":"button-forgot-password",_dangerouslyPreventDefaultOnMouseDown:!0},i.forgotPasswordLabel||"Forgotten your password?")),yt(q.Box,{width:1,mt:3},yt(bt.a,{type:"submit",emphasis:"high","aria-label":i.loginButtonAriaLabel||"Sign in to your account","data-testid":"button-submit-login",style:{width:"100%"}},i.loginButtonText||"Sign In")))},wt=n("jt0n"),jt=n("aA9e"),xt=n("j2PL"),Et=n("7ESh"),Lt=n("LXPo"),Tt=n("iLh1"),kt=n("NAqK"),Pt=n("VFEr"),St=n("p/+h"),_t=O.createElement,It=C.c.h2(l||(l=Object(y.a)(["\n ","\n margin-bottom: ",";\n margin-top: ","; ;\n"])),Object(W.a)("bodyText","default"),Object(X.i)(3),Object(X.i)(4)),At=ut()(f||(f=Object(y.a)(["\n query loginPageSocialProviders {\n socialLoginProviders @client {\n name\n code\n loginUrl\n iconUrl\n }\n }\n"]))),Ct=function(t){var e=Object(st.d)(At),n=e.data,r=e.loading;return _t(O.Fragment,null,_t(It,null,Object(E.a)("account.sociallogin.facebook.header.text.login")),!r&&n&&_t(St.a,{providers:n.socialLoginProviders,originUrl:t.originUrl,returnToUrl:t.returnToUrl}))},Rt=O.createElement;function Nt(){Nt=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new _(r||[]);return o(i,"_invoke",{value:T(t,n,c)}),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",g="completed",b={};function v(){}function m(){}function y(){}var O={};s(O,i,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(I([])));j&&j!==n&&r.call(j,i)&&(O=j);var x=y.prototype=v.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function T(e,n,r){var o=d;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var u=k(c,r);if(u){if(u===b)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=f(e,n,r);if("normal"===s.type){if(o=r.done?g:p,s.arg===b)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function k(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=f(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},e}function Dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Gt(t){for(var e=1;e=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},e}var $t,Jt,Zt=Object(C.c)(zt.a)(Ut||(Ut=Object(y.a)(["\n margin-top: ",";\n margin-bottom: ",";\n"])),Object(X.i)(2),Object(X.i)(4)),te=ut()(Ft||(Ft=Object(y.a)(["\n mutation forgottenPassword($input: ForgottenPasswordInput) {\n forgottenPassword(input: $input) @client {\n success\n }\n }\n"]))),ee=function(t){var e=Object(Et.a)(),n=Object(D.e)(),r=Object(Lt.b)({bucket:Lt.a.FORGOTTEN_PASSWORD}),o=O.useContext(ot.b),a=O.useState(null),i=Object(R.a)(a,2),c=i[0],u=i[1],s=Object(E.a)("account.login.forgottenpassword.error.text"),l=Object(st.c)(te),f=Object(R.a)(l,1)[0],d=function(){var n=Object(v.a)(Qt().mark((function n(o,a){var i;return Qt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=Tt.a.generate(),e.info("Attempting forgotten password request",{reqId:i,"X-Captcha-Type":r.type,"X-Captcha-Response":a}),n.prev=2,n.next=5,f({variables:{input:{username:o.emailAddress}},context:{headers:{"X-Captcha-Type":r.type,"X-Captcha-Response":a}}});case 5:t.onSuccess("login"),n.next=13;break;case 8:n.prev=8,n.t0=n.catch(2),e.debug(n.t0.message,{reqId:i,"X-Captcha-Type":r.type,"X-Captcha-Response":a}),n.t0.networkError||0!==n.t0.graphQLErrors.length||e.error(n.t0.message,n.t0),u(s);case 13:case"end":return n.stop()}}),n,null,[[2,8]])})));return function(t,e){return n.apply(this,arguments)}}(),p=function(){var t=Object(v.a)(Qt().mark((function t(e){return Qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:u(null),r.submit((function(t){return d(e,t)}));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),h=Object(L.d)().csrf;return Yt(O.Fragment,null,null!==c&&Yt(Zt,{error:c}),t.showCaptcha&&r.captcha,Yt(vt.a,{csrf:h,onSubmit:p,renderAnnouncer:t.renderAnnouncer,validateOnRender:"undefined"!==typeof o.getState("login").email&&""!==o.getState("login").email,fields:[{fieldName:"emailAddress",renderField:function(t,e){return Yt(q.Box,{width:1,mb:4,mt:3,key:e},Yt(Vt.a,{bindref:t,offset:n},Yt(gt.a,{label:Object(E.a)("form.fieldname.email"),"data-testid":"forgot-password-form-email-address",required:!0,type:"email",value:o.getState("login").email,i18nText:{requiredError:Object(E.a)("general.form.input.validation.required"),emailValidationError:Object(E.a)("general.form.input.validation.email")},onInput:function(t){o.dispatch({contextId:"login",type:"add",data:{key:"email",value:t.target&&t.target.value}})}})))}}]},Yt(q.Box,{width:[1]},Yt(bt.a,{type:"submit",emphasis:"high","data-testid":"button-submit-forgotpassword",style:{width:"100%"}},Object(E.a)("account.login.forgottenpassword.button.submit.text")))))},ne=O.createElement,re=C.c.h1($t||($t=Object(y.a)(["\n ","\n margin: 0 auto "," auto;\n "," {\n margin-bottom: ",";\n }\n ","\n"])),Object(W.a)("large1","alternate"),Object(X.i)(3),(function(t){return Object(wt.d)(t.theme.breakpointUtils.map,"sm")}),Object(X.i)(3),Object(dt.b)()),oe=function(){var t=O.useContext(ot.b),e=O.createRef(),n=O.createRef();O.useEffect((function(){null!==e&&null!==e.current&&window.scrollTo(e.current.offsetTop,0)}),[]),O.useEffect((function(){t.drawFocusElement("login",n)}),[]);var r=t.next,o=O.useState(!0),a=Object(R.a)(o,2),i=a[0],c=a[1];return ne("div",{ref:e},ne(re,{"data-testid":"forgot-password-title",ref:n},Object(E.a)("account.login.forgottenpassword.emailaddress.label.text")),ne(pt.a,{content:Object(E.a)("account.login.forgottenpassword.instructions.text")}),ne(ee,{showCaptcha:i,onSuccess:r,onEmailInput:function(e){t.dispatch({contextId:"login",type:"add",data:{key:"email",value:e.nativeEvent.target&&e.nativeEvent.target.value}})},renderAnnouncer:function(t,e){return ne(G.a,{"aria-live":t,message:e})}}),ne(q.Box,{width:1,mt:2},ne(bt.a,{emphasis:"low","data-testid":"forgot-password-cancel-button",onClick:function(){c(!1),t.dispatch({contextId:"login",type:"add",data:{key:"email",value:""}}),t.prev("login")}},Object(E.a)("account.login.forgottenpassword.button.cancel")||"Cancel")))},ae=n("/Nrg"),ie=O.createElement,ce=function(t){var e=O.useContext(ot.b),n={heading:Object(E.a)("account.login.passwordreset.success.title"),platformMessage:Object(E.a)("account.login.passwordreset.success.summary"),subHeading:Object(E.a)("account.login.passwordreset.notreceived.title"),safeHtml:Object(E.a)("account.login.passwordreset.notreceived.bullets"),cta:Object(E.a)("account.login.passwordreset.notreceived.cta")};return ie(ot.a,{style:{padding:Object(X.i)(4)},contextId:"login"},ie(ot.d,null,ie(Xt,null)),ie(ot.d,null,ie(oe,null)),ie(ot.d,null,ie(ae.a,{text:n,dynamicText:e.getState("login").email,testContext:"password-reset",ctaHandler:function(){e.dispatch({contextId:"login",type:"add",data:{key:"email",value:""}}),e.prev("login")}})))},ue=O.createElement;function se(){se=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new _(r||[]);return o(i,"_invoke",{value:T(t,n,c)}),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",p="suspendedYield",h="executing",g="completed",b={};function v(){}function m(){}function y(){}var O={};s(O,i,(function(){return this}));var w=Object.getPrototypeOf,j=w&&w(w(I([])));j&&j!==n&&r.call(j,i)&&(O=j);var x=y.prototype=v.prototype=Object.create(O);function E(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function T(e,n,r){var o=d;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var u=k(c,r);if(u){if(u===b)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var s=f(e,n,r);if("normal"===s.type){if(o=r.done?g:p,s.arg===b)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=g,r.method="throw",r.arg=s.arg)}}}function k(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var a=f(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,b;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},e}function le(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function fe(t){for(var e=1;eo[t]?1:-1))})),a((function(n){return w(w({},n),{},Object(u.a)({},t,e))}))},getState:function(t){return L[t]||{}},dispatch:T,drawFocusElement:function(t,e){b((function(n){return w(w({},n),{},Object(u.a)({},t,e.current))}))},drawFocus:function(t){if(O)j(!1);else if(g[t]){var e,n;g[t].tabIndex=-1,null===(e=g[t])||void 0===e||e.addEventListener("blur",(function(){var e;return null===(e=g[t])||void 0===e?void 0:e.removeAttribute("tabindex")})),null===(n=g[t])||void 0===n||n.focus()}}}},e)},k=function(t){var e=t.children,n=t.style,r=Object(c.a)(t,m),o=f.useState("100%"),a=Object(s.a)(o,2),u=a[0],l=a[1],h=f.useContext(E),g=f.Children.toArray(e),b=f.useRef(null),O=Object(d.d)(),w=f.useState(0),L=Object(s.a)(w,2),T=L[0],k=L[1];f.useEffect((function(){h.order[t.contextId]>=g.length&&h.reset(t.contextId)}),[h.order]),f.useEffect((function(){var t;(null===b||void 0===b?void 0:b.current)&&k(null===(t=b.current)||void 0===t?void 0:t.clientWidth)}),[]);var P=function(){return f.isValidElement(g[h.order[t.contextId]])?h.order[t.contextId]:0},S={enter:function(t){return O?{opacity:0}:{x:t>0?T:-T,opacity:0}},center:O?{opacity:1}:{x:0,opacity:1},exit:function(t){return O?{opacity:0}:{x:t<0?T:-T,opacity:0}}};return y(j,Object(i.a)({as:"section"},r,{style:{height:"string"===typeof u?u:u+(n?2*parseInt(n.padding,10):0)}}),y(v.a,{initial:!1,custom:h.direction[t.contextId]},y(x,{key:"".concat(P()),variants:S,initial:"enter",animate:"center",exit:"exit",custom:h.direction[t.contextId],transition:{duration:.4,ease:[.64,.04,.35,1]},style:n,onAnimationStart:function(){return(null===b||void 0===b?void 0:b.current)&&"number"===typeof u&&(b.current.style.position="absolute")},onAnimationComplete:function(){var e;h.drawFocus(t.contextId),(null===b||void 0===b?void 0:b.current)&&k(null===(e=b.current)||void 0===e?void 0:e.clientWidth)},ref:b},g[P()],y(p.a,{handleHeight:!0,onResize:function(t,e){return l(e)}}))))}},KeDb:function(t,e,n){"use strict";var r=n("zQIG"),o=n("8mBC"),a=n("cMav"),i=n("pSQP"),c=n("I/kN");function u(t,e,n){return e=i(e),a(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],i(t).constructor):e.apply(t,n))}var s=n("Y3ZS"),l=n("pONU");e.__esModule=!0,e.default=void 0;var f,d=l(n("ERkP")),p=n("cRaD"),h=n("fvxO"),g=s(n("7xIC")),b=n("L9lV");function v(t){return t&&"object"===typeof t?(0,h.formatWithValidation)(t):t}var m=new Map,y=window.IntersectionObserver,O={};function w(){return f||(y?f=new y((function(t){t.forEach((function(t){if(m.has(t.target)){var e=m.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&(f.unobserve(t.target),m.delete(t.target),e())}}))}),{rootMargin:"200px"}):void 0)}var j=function(t){function e(t){var n;return r(this,e),(n=u(this,e,[t])).p=void 0,n.cleanUpListeners=function(){},n.formatUrls=function(t){var e=null,n=null,r=null;return function(o,a){if(r&&o===e&&a===n)return r;var i=t(o,a);return e=o,n=a,r=i,i}}((function(t,e){return{href:(0,b.addBasePath)(v(t)),as:e?(0,b.addBasePath)(v(e)):e}})),n.linkClicked=function(t){var e=t.currentTarget,r=e.nodeName,o=e.target;if("A"!==r||!(o&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.nativeEvent&&2===t.nativeEvent.which)){var a=n.formatUrls(n.props.href,n.props.as),i=a.href,c=a.as;if(function(t){var e=(0,p.parse)(t,!1,!0),n=(0,p.parse)((0,h.getLocationOrigin)(),!1,!0);return!e.host||e.protocol===n.protocol&&e.host===n.host}(i)){var u=window.location.pathname;i=(0,p.resolve)(u,i),c=c?(0,p.resolve)(u,c):i,t.preventDefault();var s=n.props.scroll;null==s&&(s=c.indexOf("#")<0),g.default[n.props.replace?"replace":"push"](i,c,{shallow:n.props.shallow}).then((function(t){t&&s&&(window.scrollTo(0,0),document.body.focus())}))}}},n.p=!1!==t.prefetch,n}return c(e,t),o(e,[{key:"componentWillUnmount",value:function(){this.cleanUpListeners()}},{key:"getPaths",value:function(){var t=window.location.pathname,e=this.formatUrls(this.props.href,this.props.as),n=e.href,r=e.as,o=(0,p.resolve)(t,n);return[o,r?(0,p.resolve)(t,r):o]}},{key:"handleRef",value:function(t){var e=this;this.p&&y&&t&&t.tagName&&(this.cleanUpListeners(),O[this.getPaths().join("%")]||(this.cleanUpListeners=function(t,e){var n=w();return n?(n.observe(t),m.set(t,e),function(){try{n.unobserve(t)}catch(e){console.error(e)}m.delete(t)}):function(){}}(t,(function(){e.prefetch()}))))}},{key:"prefetch",value:function(t){if(this.p){var e=this.getPaths();g.default.prefetch(e[0],e[1],t).catch((function(t){0})),O[e.join("%")]=!0}}},{key:"render",value:function(){var t=this,e=this.props.children,n=this.formatUrls(this.props.href,this.props.as),r=n.href,o=n.as;"string"===typeof e&&(e=d.default.createElement("a",null,e));var a=d.Children.only(e),i={ref:function(e){t.handleRef(e),a&&"object"===typeof a&&a.ref&&("function"===typeof a.ref?a.ref(e):"object"===typeof a.ref&&(a.ref.current=e))},onMouseEnter:function(e){a.props&&"function"===typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),t.prefetch({priority:!0})},onClick:function(e){a.props&&"function"===typeof a.props.onClick&&a.props.onClick(e),e.defaultPrevented||t.linkClicked(e)}};return!this.props.passHref&&("a"!==a.type||"href"in a.props)||(i.href=o||r),d.default.cloneElement(a,i)}}])}(d.Component);e.default=j},jvFD:function(t,e,n){t.exports=n("KeDb")}}]);