PageSourceSearch

https://www.clearly.ca/_next/static/chunks/0my7a7i3zwu21.js

js clearly.ca collected 2026-09-24 19:00:23 UTC 24,902 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="63d04134-7cf4-0e4b-9724-67d92940e3c1")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,355308,e=>{"use strict";var t=e.i(120786),r=e.i(92808),i=e.i(843476),n=e.i(271645),l=e.i(254484),o=e.i(618566),a=e.i(259087),s=e.i(303974),u=e.i(940799);let c=(e,t)=>({success:{backgroundColor:e.palette.custom.light.green,color:e.palette.custom.green},error:{backgroundColor:e.palette.custom.light.red,color:e.palette.custom.red},warning:{backgroundColor:e.palette.custom.light.yellow,color:e.palette.custom.yellow},info:{backgroundColor:e.palette.custom.light.blue,color:e.palette.custom.blue}})[t],d=(0,u.styled)(s.Alert)(e=>{let{theme:t,severity:r}=e;return{color:t.palette.text.primary,fontWeight:700,backgroundColor:c(t,r).backgroundColor,padding:"8px 16px",".MuiAlert-icon":{color:c(t,r).color,marginRight:"8px",paddingTop:"9px",display:"flex",alignItems:"flex-start",marginTop:2}}});var E=e.i(749399),_=e.i(290213),S=e.i(234251);let f=(0,u.styled)(_.default,{name:"StyledSnackbar",slot:"Snackbar"})(()=>({"&&":{transform:"translateX(0)",left:"15px",bottom:"16px",height:"64px",opacity:"0.9",position:"absolute"}})),m=(0,u.styled)(E.SVGIcon,{name:"StyledCloseButton",slot:"CloseButton"})(()=>({cursor:"pointer",width:10,height:10})),p=(0,u.styled)(S.Button,{name:"StyledSnackbarButton",slot:"SnackbarButton"})(e=>{let{theme:t}=e;return{background:"none",border:"none",cursor:"pointer",padding:t.spacing(2.5,0,0,0),minWidth:"auto",marginRight:t.spacing(4),alignSelf:"start"}});e.s(["default",0,e=>{let{anchorOrigin:s,handleClose:u,message:c,severity:_,linkAction:S,autoHideDuration:g,ClickAwayListenerProps:C,showCloseButton:R=!1}=e,h=(0,o.usePathname)(),T=(0,n.useRef)(!0),x=!!c,v={};C&&(v={ClickAwayListenerProps:C});let y=()=>{x&&u()};return(0,n.useEffect)(()=>{T.current?T.current=!1:y()},[h]),(0,i.jsx)(f,(0,r._)((0,t._)({open:x,onClose:y,anchorOrigin:s,autoHideDuration:g},v),{children:(0,i.jsx)(d,{className:"arn-message-snackbar_alert",icon:(e=>{switch(e){case"success":return(0,i.jsx)(E.SVGIcon,{library:"validation",name:"validate"});case"info":default:return(0,i.jsx)(E.SVGIcon,{library:"validation",name:"info"});case"error":return(0,i.jsx)(E.SVGIcon,{library:"close",name:"close-circle"});case"warning":return(0,i.jsx)(E.SVGIcon,{library:"validation",name:"alert"})}})(_),action:(0,i.jsx)(p,{color:"inherit",size:"small",style:{display:R?"block":"none"},onClick:y,children:(0,i.jsx)(m,{library:"close",name:"close"})}),variant:"filled",severity:_,onClose:y,children:(0,i.jsx)(()=>{var e;return(0,i.jsx)(i.Fragment,{children:null==S?c&&(0,a.default)(c):(0,i.jsxs)("span",{children:[c&&(0,a.default)(c),(0,i.jsx)(l.Link,{href:null!=(e=null==S?void 0:S.url)?e:"/",children:S.text})]})})},{})})}))}],355308)},461357,e=>{"use strict";var t=e.i(444202);e.s(["Fade",()=>t.default])},772036,e=>{"use strict";var t=e.i(573916);e.s(["Slide",()=>t.default])},290213,e=>{"use strict";var t=e.i(120786),r=e.i(92808),i=e.i(233027),n=e.i(271645),l=e.i(519130),o=e.i(110669),a=e.i(552836),s=e.i(777539);let u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{autoHideDuration:i=null,disableWindowBlurListener:l=!1,onClose:u,open:c,resumeHideDuration:d}=e,E=(0,a.default)();n.useEffect(()=>{if(c)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key||null==u||u(e,"escapeKeyDown")}},[c,u]);let _=(0,o.default)((e,t)=>{null==u||u(e,t)}),S=(0,o.default)(e=>{u&&null!=e&&E.start(e,()=>{_(null,"timeout")})});n.useEffect(()=>(c&&S(i),E.clear),[c,i,S,E]);let f=E.clear,m=n.useCallback(()=>{null!=i&&S(null!=d?d:.5*i)},[i,d,S]);return n.useEffect(()=>{if(!l&&c)return window.addEventListener("focus",m),window.addEventListener("blur",f),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",f)}},[l,c,m,f]),{getRootProps:function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,t._)({},(0,s.default)(e),(0,s.default)(i));return(0,r._)((0,t._)({role:"presentation"},i,n),{onBlur:e=>{let t=n.onBlur;null==t||t(e),m()},onFocus:e=>{let t=n.onFocus;null==t||t(e),f()},onMouseEnter:e=>{let t=n.onMouseEnter;null==t||t(e),f()},onMouseLeave:e=>{let t=n.onMouseLeave;null==t||t(e),m()}})},onClickAway:e=>{null==u||u(e,"clickaway")}}};var c=e.i(173528),d=e.i(940799),E=e.i(210557),_=e.i(75149),S=e.i(594425),f=e.i(942196),m=e.i(55720),p=e.i(902215),g=e.i(667239),C=e.i(67719),R=e.i(540672),h=e.i(319727);function T(e){return(0,h.default)("MuiSnackbarContent",e)}(0,R.default)("MuiSnackbarContent",["root","message","action"]);var x=e.i(843476);let v=(0,d.styled)(C.default,{name:"MuiSnackbarContent",slot:"Root"})((0,_.default)(e=>{let{theme:i}=e,n="light"===i.palette.mode?.8:.98;return(0,r._)((0,t._)({},i.typography.body2),{color:i.vars?i.vars.palette.SnackbarContent.color:i.palette.getContrastText((0,g.emp
2hasize)(i.palette.background.default,n)),backgroundColor:i.vars?i.vars.palette.SnackbarContent.bg:(0,g.emphasize)(i.palette.background.default,n),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[i.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),y=(0,d.styled)("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),O=(0,d.styled)("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),I=n.forwardRef(function(e,n){let o=(0,S.useDefaultProps)({props:e,name:"MuiSnackbarContent"}),{action:a,className:s,message:u,role:c="alert"}=o,d=(0,i._)(o,["action","className","message","role"]),E=(e=>{let{classes:t}=e;return(0,l.default)({root:["root"],action:["action"],message:["message"]},T,t)})(o);return(0,x.jsxs)(v,(0,r._)((0,t._)({role:c,elevation:6,className:(0,p.default)(E.root,s),ownerState:o,ref:n},d),{children:[(0,x.jsx)(y,{className:E.message,ownerState:o,children:u}),a?(0,x.jsx)(O,{className:E.action,ownerState:o,children:a}):null]}))});function A(e){return(0,h.default)("MuiSnackbar",e)}(0,R.default)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);var N=e.i(348106);let P=(0,d.styled)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t["anchorOrigin".concat((0,f.default)(r.anchorOrigin.vertical)).concat((0,f.default)(r.anchorOrigin.horizontal))]]}})((0,_.default)(e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:e=>{let{ownerState:t}=e;return"top"===t.anchorOrigin.vertical},style:{top:8,[t.breakpoints.up("sm")]:{top:24}}},{props:e=>{let{ownerState:t}=e;return"top"!==t.anchorOrigin.vertical},style:{bottom:8,[t.breakpoints.up("sm")]:{bottom:24}}},{props:e=>{let{ownerState:t}=e;return"left"===t.anchorOrigin.horizontal},style:{justifyContent:"flex-start",[t.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:e=>{let{ownerState:t}=e;return"right"===t.anchorOrigin.horizontal},style:{justifyContent:"flex-end",[t.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:e=>{let{ownerState:t}=e;return"center"===t.anchorOrigin.horizontal},style:{[t.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}})),L=n.forwardRef(function(e,o){let a=(0,S.useDefaultProps)({props:e,name:"MuiSnackbar"}),s=(0,E.useTheme)(),d={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{action:_,anchorOrigin:{vertical:p,horizontal:g}={vertical:"bottom",horizontal:"left"},autoHideDuration:C=null,children:R,className:h,ClickAwayListenerProps:T,ContentProps:v,disableWindowBlurListener:y=!1,message:O,onBlur:L,onClose:b,onFocus:D,onMouseEnter:k,onMouseLeave:w,open:M,resumeHideDuration:B,slots:G={},slotProps:U={},TransitionComponent:j,transitionDuration:H=d,TransitionProps:Y={}}=a,{onEnter:F,onExited:K}=Y,V=(0,i._)(Y,["onEnter","onExited"]),z=(0,i._)(a,["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","slots","slotProps","TransitionComponent","transitionDuration","TransitionProps"]),W=(0,r._)((0,t._)({},a),{anchorOrigin:{vertical:p,horizontal:g},autoHideDuration:C,disableWindowBlurListener:y,TransitionComponent:j,transitionDuration:H}),X=(e=>{let{classes:t,anchorOrigin:r}=e,i={root:["root","anchorOrigin".concat((0,f.default)(r.vertical)).concat((0,f.default)(r.horizontal))]};return(0,l.default)(i,A,t)})(W),{getRootProps:Q,onClickAway:q}=u((0,t._)({},W)),[J,Z]=n.useState(!0),$={slots:(0,t._)({transition:j},G),slotProps:(0,t._)({content:v,clickAwayListener:T,transition:V},U)},[ee,et]=(0,N.default)("root",{ref:o,className:[X.root,h],elementType:P,getSlotProps:Q,externalForwardedProps:(0,t._)({},$,z),ownerState:W}),[er,ei]=(0,N.default)("clickAwayListener",{elementType:c.default,externalForwardedProps:$,getSlotProps:e=>({onClickAway:function(){for(var t,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];let l=i[0];null==(t=e.onClickAway)||t.call(e,...i),null!=l&&l.defaultMuiPrevented||q(...i)}}),ownerState:W}),{ownerState:en}=ei,el=(0,i._)(ei,["ownerState"]),[eo,ea]=(0,N.default)("content",{elementType:I,shouldForwardComponentProp:!0,externalForwardedProps:$,additionalProps:{message:O,action:_},ownerState:W}),[es,eu]=(0,N.default)("transition",{elementType:m.default,externalForwardedProps:$,getSlotProps:e=>({onEnter:function(){for(var t,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];null==(t=e.onEnter)||t.call(e,...i),((e,t)=>{Z(!1),F&&F(e,t)})(...i)},onExited:function(){for(var t,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];null==(t=e.onExited)||t.call(e,...i),(e=>{Z(!0),K&&K(e)})(...i)}}),additionalProps:{appear:!0,in:M,timeout:H,direction:"top"===p?"down":"up"},ownerState:W});return!M&&J?null:(0,x.jsx)(er,(0,r._)((0,t._)({},el,G.clickAwayListener&&{ownerState:en}),{children:(0,x.jsx)(ee,(0,r._)((0,t._)({},et),{children:(0,x.jsx)(es,(0,r._)((0,t._)({},eu),{children:R||(0,x.jsx)(eo,(0,t._)({},ea))}))}))}))});e.s(["default",0,L],290213)},948112,e=>{"use strict";var t=e.i(843476),r=e.i(665570),i=e.i(155487),n=e.i(218929),l=e.i(685615),o=e.i(948148),a=e.i(63973),s=e.i(852929),u=e.i(71464),c=e.i(340896),d=e.i(561257),E=e.i(749399),_=e.i(461357),S=e.i(772036),f=e.i(471403),m=e.i(302974),p=e.i(422233),g=e.i(681438);let C=e=>{let{onExited:C}=e,R=(0,o.useTranslations)(),{handleClose:h}=(0,n.useLoginExcellence)(),{step:T}=(0,r.useLoginExcellenceState)(),x=s.STEP_COMPONENTS_MAP[T],v=(0,i.useSelector)(a.isLoginExcellencePopupOpenSelector);return((0,l.useLoginExcellencePopupLifecycle)(),x)?(0,t.jsx)(_.Fade,{in:v,timeout:c.LOGIN_EXCELLENCE_POPUP_ANIMATION_DURATION,unmountOnExit:!0,mountOnEnter:!0,onExited:C,children:(0,t.jsxs)("div",{className:f.default.wrapper,role:"dialog","aria-modal":"true","aria-labelledby":u.DIALOG_TITLE_ID,tabIndex:-1,
2children:[(0,t.jsx)("div",{className:f.default.backdrop,onClick:h,"aria-hidden":"true"}),(0,t.jsx)(S.Slide,{in:v,timeout:c.LOGIN_EXCELLENCE_POPUP_ANIMATION_DURATION,unmountOnExit:!0,mountOnEnter:!0,direction:"up",children:(0,t.jsxs)("div",{className:f.default.contentWrapper,children:[(0,t.jsx)("button",{"data-name":d.PW_CLOSE_MOBILE_AUTH_POPUP,"data-description":m.TRACKER_DESC_CLOSE,"data-element-id":p.TRACKER_LOGIN_CLOSE,type:"button",className:f.default.closeButton,"aria-label":R("SignInPage.CTA.Close"),onClick:h,children:(0,t.jsx)(E.SVGIcon,{library:"close",name:"close-circle-filled",size:30})}),x&&(0,t.jsx)(x,{}),"email"===T?(0,t.jsx)("div",{children:(0,t.jsxs)("p",{className:f.default.TermOfServiceStatement,children:[R("SignInPage.TermsOfService.Statement"),(0,t.jsx)(g.default,{href:R("SignInPage.TermsOfService.Link"),target:"_blank",rel:"noopener noreferrer",children:R("SignInPage.TermsOfService.LinkText")})]})}):null]})})]})}):null};e.i(951600);var R=e.i(167751);e.i(215588);var h=e.i(933082);e.i(200421);var T=e.i(827423);e.i(960991);var x=e.i(714731),v=e.i(160968),y=e.i(409140);e.s(["default",0,e=>{let{onExited:i}=e,{mySite:n}=(0,R.useSite)();return(0,t.jsx)(v.QueryProvider,{children:(0,t.jsx)(h.ConfigProvider,{config:(0,T.buildSignInPageConfig)(n),children:(0,t.jsx)(x.GatewayProvider,{children:(0,t.jsx)(y.SocialLoginProvider,{children:(0,t.jsx)(r.LoginExcellenceProvider,{children:(0,t.jsx)(C,{onExited:i})})})})})})}],948112)},685615,e=>{"use strict";var t=e.i(271645),r=e.i(218929),i=e.i(702926),n=e.i(348132),l=e.i(155487),o=e.i(686558),a=e.i(485492),s=e.i(665570),u=e.i(620879);e.s(["useLoginExcellencePopupLifecycle",0,()=>{let{handleClose:e}=(0,r.useLoginExcellence)(),{shouldSendLoginEvent:c}=(0,s.useLoginExcellenceState)(),d=(0,l.useSelector)(o.loginStatusSelector),E=(0,l.useSelector)(a.userDetailsSelector),_=(0,t.useRef)(!1);(0,i.useLoginExcellenceLoginRedirect)(),(0,u.useExpiredPasswordListener)();let S=(0,t.useCallback)(t=>{"Escape"===t.key&&(t.preventDefault(),e())},[e]);(0,t.useEffect)(()=>(setTimeout(()=>{document.body.style.overflow="hidden"},0),()=>{document.body.style.overflow=""}),[]),(0,t.useEffect)(()=>(document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)),[S]),(0,t.useEffect)(()=>{(0,n.sendLoginRegisterPopupViewEvent)()},[]),(0,t.useEffect)(()=>()=>{d&&!_.current&&E&&E.email1&&c&&(_.current=!0,(0,n.sendLoginExcellenceLoginEvent)(E.email1))},[d,c,E])}])},835671,e=>{"use strict";var t=e.i(929573);t.ACCOUNT_CHILDREN.ADDRESS_ADD,t.ACCOUNT_CHILDREN.ADDRESS_ADD,t.ACCOUNT_CHILDREN.PERSONAL_INFORMATION,t.ACCOUNT_CHILDREN.DASHBOARD,t.ACCOUNT_CHILDREN.ADDRESS_BOOK,t.ACCOUNT_CHILDREN.ORDER_HISTORY,t.ACCOUNT_CHILDREN.SETTINGS,t.ACCOUNT_CHILDREN.PAYMENT_METHODS,t.ACCOUNT_CHILDREN.STORES,t.ACCOUNT_CHILDREN.FAVOURITES,t.ACCOUNT_CHILDREN.MY_CLAIMS,t.ACCOUNT_CHILDREN.ORDER_REMINDER,t.ACCOUNT_CHILDREN.ADDRESS_ADD,t.ACCOUNT_CHILDREN.SUBSCRIPTIONS,t.ACCOUNT_CHILDREN.PRESCRIPTIONS,t.ACCOUNT_CHILDREN.REFERRALS,t.ACCOUNT_CHILDREN.LOYALTY_PROGRAM,t.ACCOUNT_CHILDREN.ACTIVATE,t.ACCOUNT_CHILDREN.WELCOME,t.ACCOUNT_CHILDREN.PERSONAL_INFORMATION,e.s(["EMAIL_SEARCH_PARAM",0,"email","PARTIALLY_AUTHENTICATED_SEARCH_PARAM",0,"isPartiallyAuthenticated","PASSKEY_REGISTRATION_STEP",0,"passkeyRegistration","PASSKEY_REGISTRATION_SUCCESS_STEP",0,"passkeyRegistrationSuccess","REDIRECT_SEARCH_PARAM",0,"redirect","REGISTRATION_CID",0,"sign-in-registration-page-new-registration","STEP_SEARCH_PARAM",0,"step"])},302974,e=>{"use strict";e.s(["TRACKER_DESC_BACK",0,"Back","TRACKER_DESC_CLOSE",0,"Close","TRACKER_DESC_CONTINUE",0,"Continue","TRACKER_DESC_LOGIN",0,"Login","TRACKER_DESC_REGISTER",0,"Register","TRACKER_DESC_SUBMIT",0,"Submit"])},937868,e=>{"use strict";var t=e.i(30647),r=e.i(194088),i=e.i(271645),n=e.i(155487);e.s(["useExpiredPassword",0,()=>{let e=(0,n.useSelector)(r.passwordExpiredErrorSelector),[l,o]=(0,i.useState)(t.EMPTY_STRING);return(0,i.useEffect)(()=>{e.errorKey&&e.errorCode?o("error-message."+e.errorKey+"_"+e.errorCode):o(t.EMPTY_STRING)},[e]),{passwordExpiredErrorKey:l,setPasswordExpiredErrorKey:o}}])},146135,e=>{"use strict";var t=e.i(271645),r=e.i(618566),i=e.i(30647),n=e.i(530912);let l="".concat(i.PREVIOUS_ROUTE_STORAGE_KEY,"-current");e.s(["getPreviousRoute",0,()=>{var e;return null!=(e=n.sessionStorageUtil.get(i.PREVIOUS_ROUTE_STORAGE_KEY))?e:null},"usePreviousRoute",0,()=>{let e=(0,r.usePathname)(),o=(0,r.useSearchParams)();(0,t.useEffect)(()=>{let t=e+((null==o?void 0:o.toString())?"?".concat(null==o?void 0:o.toString()):""),r=n.sessionStorageUtil.get(l);r&&r.split("?")[0].split("#")[0]!==e&&n.sessionStorageUtil.set(i.PREVIOUS_ROUTE_STORAGE_KEY,r),n.sessionStorageUtil.set(l,t)},[e,o])}])},106148,e=>{"use strict";var t=e.i(120786),r=e.i(92808),i=e.i(271645),n=e.i(939408),l=e.i(653145),o=e.i(880202),a=e.i(948148),s=e.i(565909),u=e.i(155487),c=e.i(686558),d=e.i(862192),E=e.i(194088);e.i(951600);var _=e.i(167751),S=e.i(772839),f=e.i(976778),m=e.i(146768),p=e.i(752769),g=e.i(166138),C=e.i(753429),R=e.i(860308),h=e.i(464939),T=e.i(682826),x=e.i(968037),v=e.i(847244),y=e.i(929573),O=e.i(730967),I=e.i(747105),A=e.i(990903),N=e.i(30647),P=e.i(802997),L=e.i(27893),b=e.i(167259);e.s(["useRegistrationForm",0,function(e){var D,k,w;let{widgetName:M,email:B}=e,G=(0,f.useAppDispatch)(),U=(0,a.useTranslations)(),j=(0,s.useRouter)(),H=(0,u.useSelector)(R.locationOriginSelector),{langCode:Y}=(0,I.useStoreIdentity)(),F=(0,u.useSelector)(c.registrationStatusSelector),K=!!(0,u.useSelector)(c.guestStatusSelector),V=(0,u.useSelector)(d.orderItemsSelector),z=(0,u.useSelector)(c.returningCustomerButtonClickedSelector),W=(0,u.useSelector)(c.firstAvailableContactInformationSelector,u.shallowEqual),X=(0,u.useSelector)(c.loginStatusSelector),Q=(0,u.useSelector)(c.pendingRegistrationStatusSelector),q=(0,u.useSelector)(E.genericErrorSelector),J=(0,u.useSelector)(R.isRememberMeEnabledSelector),Z=(0,u.useSelector)(h.isPartiallyAuthenticatedSelector),$=(0,u.useSelector)(R.isNewsletterSubscriptionOnHoldSelector),ee=(0,u.useSelector)(R.smsDataCollectionEnabledSelector),et=(0,u.useSelector)(R.loyaltyProgramEnabledSelector),er=(0,u.useSelector)(R.loyaltyImplicitCommunicationsSelector),{mySite:ei}=(0,_.useSite)(),{socialData:en,setSocialData:el}=(0,S.useSocialLogin)(),{handleSignupNewsletterSubscription:eo,updateRegistrationStatus:ea}=(0,m.default)(),{userRegistrationFieldsExtended:es}=(0,p.useRegistrationFormFieldsListResolver)(),eu=ei?ei.storeID:N.EMPTY_STRING,ec=ei?ei.catalogID:N.EMPTY_STRING,ed=null!=(D=null==ei?void 0:ei.langId)?D:N.EMPTY_STRING,eE=["uk","ie"].includes(ei.country),e_=(0,u.useSelector)(R.segmentedDobEnabledSelector),[eS,ef]=(0,i.useState)(!1),[em,ep]=(0,i.useState)(!1),[eg,eC]=(0,i.useState)([]),[eR,eh]=(0,i.useState)({isPrivacyCheckboxEnabled:!1,isMarketingCheckboxEnabled:!1,isProfilingEnabled:!1,smsDataCollectionEnabled:!1,isEmailCheckboxChecked:!1,isSmsCheckboxChecked:!1,emailFieldHasLength:!1,phoneFieldHasLength:!1,extended_newsletter_opt_in:!1,isExtendedNewsletterOptInTouched:!1,isExtendedNewsletterOptInDirty:!1,isPhoneFieldOnlyPrefixOrEmpty:!1,isLoyaltyOptInChecked:!1,loyaltyProgramEnabled:!1,loyaltyImplicitCommunications:!1,segmentedDobEnabled:!1,xdateOfBirth_day_valid:!1,xdateOfBirth_day_filled:!1,xdateOfBirth_month_valid:!1,xdateOfBirth_month_filled:!1,xdateOfBirth_year_valid:!1,xdateOfBirth_year_filled:!1,ageFromDateOfBirth:0}),[eT,ex,ev]=eg||[],{formSchema:ey,fieldsList:eO}=(0,C.default)({formFieldList:es,fieldNameMap:g.RegistrationFieldNameMap,formFacts:eR}),eI=(0,i.useMemo)(()=>(0,o.yupResolver)(ey),[ey]),eA={firstName:N.EMPTY_STRING,lastName:N.EMPTY_STRING,email:null!=B?B:N.EMPTY_STRING,email2:N.EMPTY_STRING,newPassword:N.EMPTY_STRING,privacy1:!1,privacy2:!1,gender:N.EMPTY_STRING,x_loyalty_optin:!1,x_loyalty_communication:!1},eN=(0,l.useForm)({defaultValues:eA,mode:"all",resolver:eI,reValidateMode:"onBlur",shouldFocusError:!0}),{control:eP,setValue:eL,handleSubmit:eb,clearErrors:eD,setError:ek,watch:ew,setFocus:eM,formState:{isValid:eB,isDirty:eG,errors:eU}}=eN,ej=ew("email"),eH=ew("phone1"),eY=ew("privacy2"),eF=ew("email_opt"),eK=ew("sms_opt"),eV=ew("x_loyalty_optin"),ez=ew("xdateOfBirth"),eW=ew("xdateOfBirth_day"),eX=ew("xdateOfBirth_month"),eQ=ew("xdateOfBirth_year"),{touchedFields:eq,dirtyFields:eJ}=(0,l.useFormState)({control:eP,name:["privacy2"]}),eZ=eU&&Object.keys(eU).length>0,e$=!!eq.privacy2,e0=!!eJ.privacy2,e1=0===(0,P.countNationalDigits)(null!=eH?eH:N.EMPTY_STRING),e2=!eU.phone1,e6=!(null==eU?void 0:eU.xdateOfBirth_day),e9=!(null==eU?void 0:eU.xdateOfBirth_month),e8=!(null==eU?void 0:eU.xdateOfBirth_year),e7=(null==eW?void 0:eW.length)===2,e4=(null==eX?void 0:eX.length)===2,e5=(null==eQ?void 0:eQ.length)===4,e3=e5&&(null==ez?void 0:ez.length)&&e4?L.default.getYearsToDate(ez):0,te={email:"email"},tt={[A.ERROR_EMAIL_ALREADY_REGISTERED]:{errorParameters:"email"},[A.ERROR_EMAIL_ALREADY_REGISTERED_KEY]:{errorParameters:"email",errorMessage:U("error-message."+A.ERROR_EMAIL_ALREADY_REGISTERED_KEY+"_"+A.ERROR_EMAIL_ALREADY_REGISTERED)}},tr=n.default.CancelToken,ti=[],tn=(0,t._)({widget:M,cancelToken:new tr(function(e){ti.push(e)})},J&&{rememberMe:!0,updateCookies:!0});(0,i.useEffect)(()=>{eh(e=>(0,r._)((0,t._)({},e),{emailFieldHasLength:(null!=ej?ej:N.EMPTY_STRING).length>0,phoneFieldHasLength:(null!=eH?eH:N.EMPTY_STRING).length>0,isPrivacyCheckboxEnabled:eT,isMarketingCheckboxEnabled:ex,isProfilingEnabled:ev,extended_newsletter_opt_in:eY,isEmailCheckboxChecked:eF,isSmsCheckboxChecked:!!ee&&!!eK,smsDataCollectionEnabled:ee,isPhoneFieldValid:e2,isExtendedNewsletterOptInTouched:e$,isExtendedNewsletterOptInDirty:e0,isPhoneFieldOnlyPrefixOrEmpty:e1,isLoyaltyOptInChecked:eV,loyaltyProgramEnabled:et,loyaltyImplicitCommunications:er,segmentedDobEnabled:e_,xdateOfBirth_day_valid:e6,xdateOfBirth_day_filled:e7,xdateOfBirth_month_valid:e9,xdateOfBirth_month_filled:e4,xdateOfBirth_year_valid:e8,xdateOfBirth_year_filled:e5,ageFromDateOfBirth:e3}))},[ej,eH,eT,ex,ev,eY,eF,eK,ee,e2,e$,e0,e1,eV,et,er,e_,e7,e6,e4,e9,e5,e8,e3]),(0,i.useEffect)(()=>{let e=null==q?void 0:q.errorParameters,t=null==q?void 0:q.errorKey,r=null==q?void 0:q.errorMessage;if(t){if(tt[t]){var i,n,l,o;e=null!=(i=null==(l=tt[t])?void 0:l.errorParameters)?i:e,r=null!=(n=null==(o=tt[t])?void 0:o.errorMessage)?n:r}if(e){let t=te[e];t&&(ek(t,{type:"manual",message:r}),eM(t))}}},[q,eS]),(0,i.useEffect)(()=>{en&&!X&&(eL("lastName",en.lastName),eL("firstName",en.firstName),en.email!==N.EMPTY_STRING&&en.dob!==N.EMPTY_STRING&&eL("email",en.email,{shouldValidate:!0}))},[en,X]),(0,i.useEffect)(()=>
2{if(W&&!X){let{lastName:e,firstName:t,email1:r}=W;eL("lastName",e),eL("firstName",t),eL("email",r,{shouldValidate:!0})}},[W,X]),(0,i.useEffect)(()=>{if(V&&V[0]&&K){let{lastName:e,firstName:t,email1:r}=V[0];e&&eL("lastName",e),t&&eL("firstName",t),r&&eL("email",r,{shouldValidate:!0})}},[V,K]),(0,i.useEffect)(()=>{var e,t,r,i,n,l,o;(null==(r=ei.xStoreCfg)||null==(t=r.x_optins)||null==(e=t.registration)?void 0:e[0])?eC([(null==(n=ei.xStoreCfg.x_optins.registration[0])?void 0:n.x_privacy)||!1,(null==(l=ei.xStoreCfg.x_optins.registration[0])?void 0:l.x_newsLetter)||!1,(null==(o=ei.xStoreCfg.x_optins.registration[0])?void 0:o.x_profiling)||!1]):(null==(i=ei.xStoreCfg)?void 0:i.optInBoxes)&&eC(ei.xStoreCfg.optInBoxes)},[null==(k=ei.xStoreCfg)?void 0:k.x_optins,null==(w=ei.xStoreCfg)?void 0:w.optInBoxes]),(0,i.useEffect)(()=>{B&&eL("email",B,{shouldValidate:!0})},[B,eL]);let tl=!K&&Z&&X;return{formMethods:eN,handleSubmit:eb(async e=>{var i,n,l,o,a,s;ef(!0),eD(),G((0,T.resetAllErrors)());let{firstName:u,email:c}=e,d=(e=>{let{privacy2:t}=e;return!!ex&&(eE?!t:t)})(e),E=((e,i)=>{let{firstName:n,lastName:l,newPassword:o,email:a,receiveEmail:s,privacy1:u,privacy3:c,phone1:d,email_opt:E,sms_opt:_,xdateOfBirth:S,x_loyalty_optin:f,x_loyalty_communication:m}=e,p={firstName:n.trim(),lastName:l.trim(),logonId:a,logonPassword:o,logonPasswordVerify:o,registerType:"G",profileType:"C",email1:a,phone1:null!=d?d:"",storeId:eu,catalogId:ec,preferredLanguage:ed,preferredCurrency:N.EMPTY_STRING,receiveEmail:s,receiveEmailPreference:[{value:s,storeID:eu}],challengeQuestion:"-",challengeAnswer:"-"},g=(0,t._)({x_privacy:!eT||u,x_profiling:!ev||!!c},!($&&i)&&{x_newsLetter:i},et&&{x_loyalty_optin:null!=f&&f,x_loyalty_communication:null!=m&&m}),C=(0,r._)((0,t._)({},g),{x_newsletter_mobile_phone:d,x_newsLetterOptTypes:{x_consent_marketing_email:null!=E&&E,x_consent_marketing_mobile:null!=_&&_}}),R=(0,b.resolveRegistrationDateOfBirthType)(null!=S?S:N.EMPTY_STRING);return(0,r._)((0,t._)({},p,R),{x_optIn:ee?C:g})})(e,d);el(null);let _=await G((0,v.registration)((0,r._)((0,t._)({body:E},tn),{translation:U,storeId:eu})));(null==(l=_.payload)||null==(n=l.response)||null==(i=n.data)?void 0:i.errors)||(await eo({firstName:u,email:c,isNewsletterSubscriptionOnHold:$,hasNewsletterConsent:d}),"error"in _&&(null==(s=_.error)?void 0:s.message)==="Rejected"?ep(!0):await ea({hasNewsletterConsent:d})),ef(!1);let S=!!(null==ei||null==(o=ei.xStoreCfg)?void 0:o.PASSKEYS_ENABLED)&&!!(null==ei||null==(a=ei.xStoreCfg)?void 0:a.PASSKEYS_REGISTRATION_ENABLED);z&&!S&&(G((0,x.setIsReturningCustomerButtonClicked)(!1)),j.push((0,O.replaceLocaleInUrl)({isLocaleDomain:j.isLocaleDomain,locationOrigin:H,locale:Y,href:y.HOME})))}),fieldsList:eO,loading:eS||Q,formHasErrors:eZ,isValid:eB,isDirty:eG,registrationStatus:F,shouldHideCompletely:tl,showErrorSnackbar:em,setShowErrorSnackbar:ep,isLoggedIn:X,isPartiallyAuthenticated:Z,userIsGuest:K}}])}]);
3
4//# debugId=63d04134-7cf4-0e4b-9724-67d92940e3c1

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.