PageSourceSearch

https://www.gant.pt/mobify/bundle/1868/pages-signup.js

js gant.pt collected 2026-10-05 18:35:57 UTC 29,560 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9666],{69384(e,t,n){n.r(t),n.d(t,{default:()=>ue});var a=n(10939),o=n(28407),l=n(77810),r=n(54443),i=n(62539),s=n(34692),c=n(16750),u=n(68066),d=n(40512),p=n(83501),m=n(64965),g=n(7711),f=n(68820),h=n(97361),y=n(17015),v=n(41624),E=n(41375),b=n(90031),C=n(77214),x=n(24476),_=n(73448),S=n(17184),k=n(27821),I=n(69725),M=n(75826),A=n.n(M),z=n(84939),L=n(95563);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(t){(0,a.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const O=({message:e,styles:t})=>e?l.createElement(i.az,{sx:t.notificationBlock},l.createElement(k.E,{sx:t.notificationText},e)):null;O.propTypes={message:A().string,styles:A().object};const P=({styles:e})=>l.createElement(i.az,{sx:e.gantClubStripes},l.createElement(i.az,{sx:T(T({},e.stripe),e.stripeGreen)}),l.createElement(i.az,{sx:T(T({},e.stripe),e.stripeGold)}),l.createElement(i.az,{sx:T(T({},e.stripe),e.stripeGreen)}),l.createElement(i.az,{sx:T(T({},e.stripe),e.stripeGold)}),l.createElement(i.az,{sx:T(T({},e.stripe),e.stripeGreen)}));P.propTypes={styles:A().object};const B=({styles:e,onEmailSignup:t,onAppleSignup:n,onGoogleSignup:a,enableApple:o=!1,enableGoogle:r=!1,onCtaClick:c,gantClubData:u,ctaUrl:d,notification:p})=>{const{formatMessage:m}=(0,s.A)(),{title:g,uspLine1:f,uspLine2:h,uspLine3:y,link:v}=u||{};return l.createElement(i.az,{sx:e.contentWrapper},l.createElement(i.az,{sx:e.heroSection},l.createElement(i.az,{sx:e.heroContainer},l.createElement(i.az,{sx:e.heroContent},l.createElement(k.E,{as:"h1",sx:e.heroTitle},m({id:"footer.gantClub.aria_label",defaultMessage:[{type:0,value:"The Gant Club"}]}))))),l.createElement(i.az,{sx:e.mainContent},l.createElement(i.az,{sx:e.contentContainer},l.createElement(i.az,{sx:e.signUpContent},l.createElement(i.az,{sx:e.gantClubSection},l.createElement(P,{styles:e}),l.createElement(i.az,{sx:e.gantClubContent},l.createElement(i.az,null,l.createElement(k.E,{sx:e.gantClubHeading},g||"Join the club"),(f||h||y)&&l.createElement(i.az,{sx:e.benefitsList},f&&l.createElement(k.E,{sx:e.benefitItem},f),h&&l.createElement(k.E,{sx:e.benefitItem},h),y&&l.createElement(k.E,{sx:e.benefitItem},y)),(null==v?void 0:v.linkText)&&l.createElement(z.A,{href:d||"#",icon:l.createElement(I.FI.ArrowRightIcon,{boxSize:2}),sx:e.ctaLink,onClick:c},v.linkText)),l.createElement(I.FI.BrandLogoHeritageIcon,{width:"30px",height:"39.375px"}))),l.createElement(O,{message:p,styles:e}),l.createElement(i.az,{sx:e.joinNowSection},l.createElement(k.E,{sx:e.joinNowHeading},m({id:"signup_page.heading.join_now",defaultMessage:[{type:0,value:"Join now"}]}))),(o||r)&&l.createElement(i.az,{sx:e.ssoButtonsSection},o&&l.createElement(L.S,{variant:"secondary",as:"button",sx:e.socialButton,onClick:n,"aria-label":m({id:"login_modal.button.continue_with_apple",defaultMessage:[{type:0,value:"Continue with Apple"}]})},l.createElement(I.FI.AppleIcon,{boxSize:"20px"}),l.createElement(k.E,{sx:e.socialButtonText},m({id:"login_modal.button.continue_with_apple",defaultMessage:[{type:0,value:"Continue with Apple"}]}))),r&&l.createElement(L.S,{variant:"secondary",as:"button",sx:e.socialButton,onClick:a,"aria-label":m({id:"login_modal.button.continue_with_google",defaultMessage:[{type:0,value:"Continue with Google"}]})},l.createElement(I.FI.GoogleIcon,{boxSize:"20px"}),l.createElement(k.E,{sx:e.socialButtonText},m({id:"login_modal.button.continue_with_google",defaultMessage:[{type:0,value:"Continue with Google"}]})))),l.createElement(i.az,{sx:e.useEmailSection},l.createElement(i.az,{sx:e.useEmailLink,onClick:t,role:"button",tabIndex:0},l.createElement(I.FI.ArrowRightIcon,{boxSize:2}),l.createElement(k.E,{sx:e.useEmailText},m({id:"login_modal.link.use_email",defaultMessage:[{type:0,value:"Use email"}]}))))))))};B.propTypes={styles:A().object.isRequired,onEmailSignup:A().func.isRequired,onAppleSignup:A().func.isRequired,onGoogleSignup:A().func.isRequired,enableApple:A().bool,enableGoogle:A().bool,onCtaClick:A().func.isRequired,gantClubData:A().object,ctaUrl:A().string,notification:A().string};const R=B;var D=n(49785),q=n(62346),N=n(5631),j=n(2768);const G=({styles:e,onBack:t,hideBackButton:n=!1,email:a,setEmail:r,title:c,setTitle:d,firstName:p,setFirstName:m,lastName:g,setLastName:f,dateOfBirth:h,setDateOfBirth:y,countryCode:v,setCountryCode:E,phoneNumber:b,setPhoneNumber:C,marketingConsent:x,setMarketingConsent:M,onContinue:A,isLoading:w,signupError:T})=>{var O,P,B;const{formatMessage:R}=(0,s.A)(),G=(0,S.Ws)(),U=(0,S.Fb)(),{locale:$}=(0,u.A)(),[F,Y]=l.useState(!1),[W,H]=l.useState(""),[V,J]=l.useState(""),[K,Z]=l.useState(""),[Q,
1X]=l.useState(""),[ee,te]=l.useState(""),ne=(ae=v,_.qo.find(e=>e.dialCode===ae)??_.qo[0]);var ae;const oe=(0,D.mN)({mode:"onTouched",defaultValues:{phone:{phone:b,countryCode:null==ne?void 0:ne.code,dialCode:(null==ne?void 0:ne.dialCode)??v}}}),le=oe.watch("phone");(0,l.useEffect)(()=>{null!=(null==le?void 0:le.phone)&&C(le.phone),null!=(null==le?void 0:le.dialCode)&&E(le.dialCode),te("")},[le,C,E]);const re=e=>e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?"":R({id:"email_signup.error.email_invalid",defaultMessage:[{type:0,value:"Please enter a valid email address"}]}):R({id:"email_signup.error.email_required",defaultMessage:[{type:0,value:"Email is required"}]}),ie=e=>{if(!e.trim())return"";const t=(e=>{const t=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(!t)return null;const n=parseInt(t[1],10),a=parseInt(t[2],10)-1,o=parseInt(t[3],10),l=new Date(o,a,n);return l.getDate()!==n||l.getMonth()!==a||l.getFullYear()!==o?null:l})(e);return t?(e=>{const t=new Date,n=t.getFullYear()-e.getFullYear(),a=t.getMonth()-e.getMonth(),o=t.getDate()-e.getDate();return a<0||0===a&&o<0?n-1>=16:n>=16})(t)?"":R({id:"credentials_form.error.date_of_birth_age",defaultMessage:[{type:0,value:"You must be at least 16 years old"}]}):R({id:"credentials_form.error.date_of_birth_invalid",defaultMessage:[{type:0,value:"Please enter a valid date (DD/MM/YYYY)"}]})},se=function(){var e=(0,o.A)(function*(){var e,t;const n=re(a),o=p.trim()?"":R({id:"credentials_form.error.first_name_required",defaultMessage:[{type:0,value:"First name is required"}]}),l=g.trim()?"":R({id:"credentials_form.error.last_name_required",defaultMessage:[{type:0,value:"Last name is required"}]}),r=ie(h);yield oe.trigger("phone");const i=(null===(e=oe.formState.errors)||void 0===e||null===(t=e.phone)||void 0===t?void 0:t.message)??"";return H(n),J(o),Z(l),X(r),te(i),!n&&!o&&!l&&!r&&!i&&x});return function(){return e.apply(this,arguments)}}(),ce=function(){var e=(0,o.A)(function*(e){null!=e&&e.preventDefault&&e.preventDefault(),(yield se())&&A()});return function(t){return e.apply(this,arguments)}}(),ue=e=>{var t,n,a,o,l,r;return"fr-ch"===(null==$||null===(t=$.id)||void 0===t?void 0:t.toLowerCase())||"it-ch"===(null==$||null===(n=$.id)||void 0===n?void 0:n.toLowerCase())||"en-ch"===(null==$||null===(a=$.id)||void 0===a?void 0:a.toLowerCase())||"nl-be"===(null==$||null===(o=$.id)||void 0===o?void 0:o.toLowerCase())||"fr-be"===(null==$||null===(l=$.id)||void 0===l?void 0:l.toLowerCase())||"de-ch"===(null==$||null===(r=$.id)||void 0===r?void 0:r.toLowerCase())?`/${null==$?void 0:$.id}${e}`:e};return l.createElement(i.az,{sx:e.contentWrapper},l.createElement(i.az,{sx:e.heroSection},l.createElement(i.az,{sx:e.heroContainer},l.createElement(i.az,{sx:e.heroContent},l.createElement(k.E,{as:"h1",sx:e.heroTitle},R({id:"footer.gantClub.aria_label",defaultMessage:[{type:0,value:"The Gant Club"}]}))))),l.createElement(i.az,{sx:e.mainContent},l.createElement(i.az,{sx:e.contentContainer},l.createElement(i.az,{sx:e.signUpContent},l.createElement(i.az,{sx:e.backLinkSection},!n&&l.createElement(i.az,{sx:e.backLink,onClick:t,role:"button",tabIndex:0},l.createElement(I.FI.ChevronLeftIcon,{boxSize:2}),l.createElement(k.E,{sx:e.backLinkText,textTransform:"uppercase"},R({id:"email_signup.link.use_another_method",defaultMessage:[{type:0,value:"Use another method"}]})))),l.createElement(i.az,{as:"form",onSubmit:ce,noValidate:!0},l.createElement(i.az,{sx:e.emailSignupFormSection},l.createElement(i.az,null,l.createElement(i.az,{sx:W||T?e.simpleInputWrapperError:e.simpleInputWrapper},l.createElement(q.p,{type:"email",value:a,onChange:e=>{return t=e.target.value,r(t),void(W&&H(""));var t},onBlur:()=>{const e=re(a);H(e)},sx:e.simpleInput,placeholder:R({id:"email_signup.placeholder.email",defaultMessage:[{type:0,value:"Email*"}]})})),W&&l.createElement(k.E,{sx:e.inputError},W),T&&l.createElement(k.E,{sx:e.inputError},T)),U&&l.createElement(i.az,{sx:e.dropdownWrapper,position:"relative"},l.createElement(i.az,{sx:e.dropdownTrigger,onClick:()=>Y(!F),role:"button",tabIndex:0},l.createElement(k.E,{sx:c?e.dropdownValueText:e.dropdownPlaceholder},c?null==G||null===(O=G.find(e=>(null==e?void 0:e.value)===c))||void 0===O?void 0:O.value:R({id:"credentials_form.label.title_optional",defaultMessage:[{type:0,value:"Title (optional)"}]})),l.createElement(i.az,{sx:e.dropdownIcon},l.createElement(I.FI.ChevronDownIcon,{boxSize:2}))),F&&l.createElement(i.az,{sx:e.dropdownMenu,role:"listbox","aria-label":R({id:"credentials_form.label.title_optional",defaultMessage:[{type:0,value:"Title (optional)"}]})},null==G?void 0:G.map(t=>l.createElement(i.az,{key:null==t?void 0:t.value,sx:e.dropdownMenuItem,onClick:()=>{return e=null==t?void 0:t.value,d(e),void Y(!1);var e},role:"option","aria-selected":c===(null==t?void 0:t.value)?"true":"false"},t.value)))),l.createElement(i.az,null,l.createElement(i.az,{sx:V?e.simpleInputWrapperError:e.simpleInputWrapper},l.createElement(q.p,{type:"text",value:p,onChange:e=>{return t=e.target.value,m(t),void(V&&J(""));var t},onBlur:()=>{p.trim()||J(R({id:"credentials_form.error.first_name_required",defaultMessage:[{type:0,value:"First name is required"}]}))},sx:e.simpleInput,placeholder:R({id:"credentials_form.placeholder.first_name",defaultMessage:[{type:0,value:"First name*"}]})})),V&&l.createElement(k.E,{sx:e.inputError},V)),l.createElement(i.az,null,l.createElement(i.az,{sx:K?e.simpleInputWrapperError:e.simpleInputWrapper},l.createElement(q.p,{type:"text",value:g,onChange:e=>{return t=e.target.value,f(t),void(K&&Z(""));var t},onBlur:()=>{g.trim()||Z(R({id:"credentials_form.error.last_name_required",defaultMessage:[{type:0,value:"Last name is required"}]}))},sx:e.simpleInput,placeholder:R({id:"credentials_form.placeholder.last_name",defaultMessage:[{type:0,value:"Last name*"}]})})),K&&l.createElement(k.E,{sx:e.inputError},K)),l.createElement(i.az,null,l.createElement(i.az,{sx:Q?e.simpleInputWrapperError:e.simpleInputWrapper},l.createElement(q.p,{type:"text",value:h,onChange:e=>(e=>{const t=(e=>{const t=e.replace(/\D/g,"").slice(0,8);return t.length<=2?t:t.length<=4?`${t.slice(0,2)}/${t.slice(2)}`:`${t.slice(0,2)}/${t.slice(2,4)}/${t.slice(4)}`})(e);y(t),Q&&X("")})(e.target.value),onBlur:()=>{const e=ie(h);X(e)},sx:e.simpleInput,placeholder:R({id:"email_signup.placeholder.date_of_birth",defaultMessage:[{type:0,value:"Date of birth (DD/MM/YYYY)"}]})})),Q&&l.createElement(k.E,{sx:e.inputError},Q)),l.createElement(i.az,null,l.createElement(j.A,{name:"phone",control:oe.control,defaultValue:{phone:b,countryCode:null==ne?void 0:ne.code,dialCode:(null==ne?void 0:ne.dialCode)??v},error:ee})),l.createElement(i.az,{sx:e.checkboxContainer},l.createElement(N.S,{isChecked:x,onChange:e=>M(e.target.checked),sx:e.checkbox},l.createElement(k.E,{sx:e.checkboxLabel},R({id:"credentials_form.marketing_consent",defaultMessage:[{type:0,value:"Yes, I consent to GANT sending offers and other information by e-mail and sms. You can change these settings at any times."}]})))),l.createElement(i.az,{sx:e.legalTextContainer},l.createElement(k.E,{sx:e.legalText},R({id:"email_signup.legal_text",defaultMessage:[{type:0,value:"By clicking 'Become a member', I agree to GANT's "},{type:1,value:"termsLink"},{type:0,value:" and agree to GANT processing my personal data. To give you the full membership experience, we will process your personal data in accordance with the GANT's "},{type:1,value:"privacyLink"},{type:0,value:". You can update your settings at any time."}]},{termsLink:l.createElement(z.A,{href:ue(R({id:"account.policies.link.terms_and_conditions",defaultMessage:[{type:0,value:"/policies/member-terms-conditions"}]})),target:"_blank",sx:e.legalLink,key:"terms"},R({id:"credentials_form.link.terms",defaultMessage:[{type:0,value:"Membership Terms & conditions"}]})),privacyLink:l.createElement(z.A,{href:ue(R({id:"account.policies.link.privacy_policy",defaultMessage:[{type:0,value:"/policies/privacy-policy"}]})),target:"_blank",sx:e.legalLink,key:"privacy"},R({id:"credentials_form.link.privacy",defaultMessage:[{type:0,value:"Privacy policy"}]}))}))),l.createElement(L.S,{type:"submit",sx:e.signupButton,isLoading:w,isDisabled:!x||!(null!=oe&&null!==(P=oe.formState)&&void 0!==P&&P.isValid)&&(null==oe||null===(B=oe.formState)||void 0===B?void 0:B.isDirty),onClick:ce,onKeyDown:e=>{var t,n;const a=!x||!(null!=oe&&null!==(t=oe.formState)&&void 0!==t&&t.isValid)&&(null==oe||null===(n=oe.formState)||void 0===n?void 0:n.isDirty);"Enter"!==e.key&&" "!==e.key||a||(e.preventDefault(),ce(e))}},l.createElement(i.az,{as:"span"},R({id:"email_signup.button.continue",defaultMessage:[{type:0,value:"Continue"}]})))))))))};G.propTypes={styles:A().object.isRequired,onBack:A().func.isRequired,hideBackButton:A().bool,email:A().string.isRequired,setEmail:A().func.isRequired,title:A().string.isRequired,setTitle:A().func.isRequired,firstName:A().string.isRequired,setFirstName:A().func.isRequired,lastName:A().string.isRequired,setLastName:A().func.isRequired,dateOfBirth:A().string.isRequired,setDateOfBirth:A().func.isRequired,countryCode:A().string.isRequired,setCountryCode:A().func.isRequired,phoneNumber:A().string.isRequired,setPhoneNumber:A().func.isRequired,marketingConsent:A().bool.isRequired,setMarketingConsent:A().func.isRequired,onContinue:A().func.isRequired,isLoading:A().bool,signupError:A().string};const U=G;var $=n(11692),F=n(14084),Y=n(95266);const W=({styles:e,onBack:t,marketingConsent:n,setMarketingConsent:a,onSignup:o,isLoading:r,isInitialLoading:c=!1})=>{const{formatMessage:d}=(0,s.A)(),{locale:p}=(0,u.A)(),m=e=>{var t,n,a,o,l,r;return"fr-ch"===(null==p||null===(t=p.id)||void 0===t?void 0:t.toLowerCase())||"it-ch"===(null==p||null===(n=p.id)||void 0===n?void 0:n.toLowerCase())||"en-ch"===(null==p||null===(a=p.id)||void 0===a?void 0:a.toLowerCase())||"nl-be"===(null==p||null===(o=p.id)||void 0===o?void 0:o.toLowerCase())||"fr-be"===(null==p||null===(l=p.id)||void 0===l?void 0:l.toLowerCase())||"de-ch"===(null==p||null===(r=p.id)||void 0===r?void 0:r.toLowerCase())?`/${null==p?void 0:p.id}${e}`:e};return l.createElement(i.az,{sx:e.contentWrapper},l.createElement(i.az,{sx:e.heroSection},l.createElement(i.az,{sx:e.heroContainer},l.createElement(i.az,{sx:e.heroContent},l.createElement(k.E,{sx:e.heroTitle},d({id:"signup_page.title.the_gant_club",defaultMessage:[{type:0,value:"The Gant Club"}]}))))),l.createElement(i.az,{sx:e.ssoPolicyMainContent},c?l.createElement($.s,{justify:"center",align:"center",height:"300px",width:"100%"},l.createElement(F.y,{size:"lg",color:"gray.500"})):l.createElement(i.az,{sx:e.contentContainer},l.createElement(i.az,{sx:e.signUpContent},l.createElement(i.az,{sx:e.ssoPolicyBackSection},l.createElement(L.S,{variant:"unstyled",sx:e.ssoPolicyBackLink,onClick:t,role:"button",tabIndex:0},l.createElement(I.FI.ChevronLeftIcon,{boxSize:2}),l.createElement(k.E,{sx:e.ssoPolicyBackLinkText,textTransform:"uppercase"},d({id:"sso_policy_agreement.link.use_another_method",defaultMessage:[{type:0,value:"Use another method"}]})))),l.createElement(i.az,{sx:e.ssoPolicySection},l.createElement(i.az,{sx:e.ssoPolicyCheckboxContainer},l.createElement(N.S,{isChecked:n,onChange:e=>a(e.target.checked),sx:e.checkbox},l.createElement(k.E,{sx:e.checkboxLabel},d({id:"sso_policy_agreement.checkbox.marketing_consent",defaultMessage:[{type:0,value:"Yes, I consent to GANT sending offers and other information by e-mail and sms. You can change these settings at any times."}]})))),l.createElement(i.az,{sx:e.ssoPolicyLegalTextContainer},l.createElement(k.E,{sx:e.legalText},d({id:"sso_policy_agreement.legal_text.signup",defaultMessage:[{type:0,value:"By clicking 'Become a member', I agree to GANT's "},{type:1,value:"termsLink"},{type:0,value:" and agree to GANT processing my personal data. To give you the full membership experience, we will process your personal data in accordance with the GANT's "},{type:1,value:"privacyLink"},{type:0,value:". You can update your settings at any time."}]},{termsLink:l.createElement(z.A,{href:m(d({id:"account.policies.link.terms_and_conditions",defaultMessage:[{type:0,value:"/policies/member-terms-conditions"}]})),sx:e.legalLink,key:"terms",target:"_blank"},d({id:"sso_policy_agreement.link.terms",defaultMessage:[{type:0,value:"Membership Terms & conditions"}]})),privacyLink:l.createElement(z.A,{href:m(d({id:"account.policies.link.privacy_policy",defaultMessage:[{type:0,value:"/policies/privacy-policy"}]})),sx:e.legalLink,key:"privacy",target:"_blank"},d({id:"sso_policy_agreement.link.privacy",defaultMessage:[{type:0,value:"Privacy Policy"}]}))})))),l.createElement(Y.$,{type:"button",sx:e.signupButton,onClick:o,isLoading:r,isDisabled:!n,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||!n||(e.preventDefault(),o())}},l.createElement(i.az,{as:"span"},d({id:"sso_policy_agreement.button.sign_up",defaultMessage:[{type:0,value:"Sign up"}]})))))))};W.propTypes={styles:A().object.isRequired,onBack:A().func.isRequired,marketingConsent:A().bool.isRequired,setMarketingConsent:A().func.isRequired,onSignup:A().func.isRequired,isLoading:A().bool,isInitialLoading:A().bool};const H=W;var V=n(37401);const J=({styles:e,onBack:t,email:n,isActivationSuccess:a=!1})=>{const{formatMessage:o}=(0,s.A)();return l.createElement(i.az,{sx:e.contentWrapper},l.createElement(V.A,null),l.createElement(i.az,{sx:e.heroSection},l.createElement(i.az,{sx:e.heroContainer},l.createElement(i.az,{sx:e.heroContent},l.createElement(k.E,{as:"h1",sx:e.heroTitle},o({id:"footer.gantClub.aria_label",defaultMessage:[{type:0,value:"The Gant Club"}]}))))),l.createElement(i.az,{sx:e.mainContent},l.createElement(i.az,{sx:e.contentContainer},l.createElement(i.az,{sx:e.signUpContent},l.createElement(i.az,{sx:e.backLinkSection},l.createElement(i.az,{sx:e.backLink,onClick:t,role:"button",tabIndex:0},l.createElement(I.FI.ChevronLeftIcon,{boxSize:2}),l.createElement(k.E,{sx:e.backLinkText,textTransform:"uppercase"},o({id:"dach_signup.link.log_in",defaultMessage:[{type:0,value:"Log in"}]})))),l.createElement(i.az,{sx:e.dachSignupConfirmationContainer},l.createElement(k.E,{sx:e.dachSignupConfirmationText},a?o({id:"dach_signup.activation_success_message",defaultMessage:[{type:0,value:"Your account has been activated"}]}):o({id:"dach_signup.confirmation_message",defaultMessage:[{type:0,value:"We have sent an email with a confirmation link to *"},{type:1,value:"email"},{type:0,value:"*. Please also check your spam folder if you do not see the email."}]},{email:l.createElement(k.E,{as:"span",fontWeight:"bold",key:"email"},n)})))))))};J.propTypes={styles:A().object.isRequired,onBack:A().func.isRequired,email:A().string,isActivationSuccess:A().bool};const K=J;var Z=n(50439),Q=n(33574),X=n(65376);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ee(Object(n),!0).forEach(function(t){(0,a.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ne=["Gant-DACH","Gant-EA-DACH","Gant-IT"],ae={"sv-SE":"+46","en-GB":"+44","en-US":"+1","de-DE":"+49","de-AT":"+43","de-CH":"+41","it-CH":"+41","en-CH":"+41","fr-CH":"+41","fr-FR":"+33","fr-BE":"+32","nl-BE":"+32","it-IT":"+39","es-ES":"+34","nl-NL":"+31","pt-PT":"+351","da-DK":"+45","fi-FI":"+358","zh-CN":"+86"},oe=()=>{const e="abcdefghijklmnopqrstuvwxyz",t="ABCDEFGHIJKLMNOPQRSTUVWXYZ",n="0123456789",a="!@#$%^&*()",o=e+t+n+a;let l="";l+=e.charAt(Math.floor(26*Math.random())),l+=t.charAt(Math.floor(26*Math.random())),l+=n.charAt(Math.floor(10*Math.random())),l+=a.charAt(Math.floor(10*Math.random()));for(let e=l.length;e<12;e++)l+=o.charAt(Math.floor(Math.random()*o.length));return l.split("").sort(()=>Math.random()-.5).join("")},le="initial",re="emailSignup",ie="ssoPolicyAgreement",se="dachSignup",ce="undefined"!=typeof window,ue=()=>{var e,t;const n=(0,r.Vl)("SignupPage"),{formatMessage:a}=(0,s.A)(),{buildUrl:k,site:I,locale:M}=(0,u.A)(),A=(0,m.useHistory)(),z=(0,g.A)(),{data:L}=(0,f.J)(),{isRegistered:w}=L||{},T=ne.includes(null==I?void 0:I.id),O=(0,b.useAuthHelper)(b.AuthHelpers.AuthorizeIDP),P=(0,b.useAuthHelper)(b.AuthHelpers.Logout),B=(0,b.useShopperCustomersMutation)("registerCustomer"),{enableApple:D,enableGoogle:q,hasAnySocialLogin:N,socialConfig:j}=(0,v.Y)(),G=j.hint||{},$=(0,h.$)(),F=j.redirectURI||"",Y=(0,C.Bz)($,F,M),[W,V]=(0,l.useState)(N?le:re),[J,ee]=(0,l.useState)(!1),[ue,de]=(0,l.useState)(!1),[pe,me]=(0,l.useState)(!1),[ge,fe]=(0,l.useState)(null),{authCode:he,usid:ye,ssoProvider:ve,clearCredentials:Ee}=(0,x.N)(),{customLoginIdpMutation:be,updateSSOConsentMutation:Ce,loginWithLocaleMutation:xe,clearECOMSessionGuard:_e}=(0,Z.d)(),Se=(0,Q.default)(),[ke,Ie]=(0,l.useState)(null),[Me,Ae]=(0,l.useState)(null),ze=(0,l.useRef)(!1),Le=ce&&null!==(e=localStorage)&&void 0!==e&&e.getItem(`${_.aO}_${null==I?void 0:I.id}`)?null===(t=JSON.parse(localStorage.getItem(`${_.aO}_${null==I?void 0:I.id}`)))||void 0===t?void 0:t.code:null;(0,l.useEffect)(()=>{if(ce){const e=new URLSearchParams(window.location.search),t=e.get("store_id"),n=e.get("signup_channel");t&&localStorage.setItem("store_id",t),n&&localStorage.setItem("signup_channel",n)}},[]);const we=(0,m.useLocation)(),Te=(0,X.A)();(0,l.useEffect)(()=>{Te.sendViewPage(we.pathname)},[we]),(0,l.useEffect)(()=>{if(he&&ye&&ve){if(ze.current)return;ze.current=!0;const e=function(){var e=(0,o.A)(function*(){me(!0),V(ie);try{const e=ce?localStorage.getItem("signup_channel"):null,{tokenResponse:t,success:n,showConsentScreen:o,userInfo:l}=yield be.mutateAsync({authCode:he,redirectURI:Y,usid:ye,authProvider:ve,signUpSourceChannel:e||"Ecom"});if(Ie(t),Ae(l),n&&o)me(!1);else if(n&&!o)try{Se.handleTokenResponse(t,!1),Se.clearECOMSession(),_e(),Ie(null),Ae(null),Ee(),(0,y.zU)("returnToPage"),z("/account")}catch(e){console.error("Auto-login error:",e),me(!1),Ie(null),Ae(null),Ee(),fe(a({id:"signup_page.error.sso_unable_to_signup",defaultMessage:[{type:0,value:"Unable to sign up with the given email. Please try again or use a different signup method."}]})),V(le)}else me(!1),Ie(null),Ae(null),Ee(),fe(a({id:"signup_page.error.sso_unable_to_signup",defaultMessage:[{type:0,value:"Unable to sign up with the given email. Please try again or use a different signup method."}]})),V(le)}catch(e){console.error("idpUserAuth error:",e),me(!1),Ie(null),Ae(null),Ee(),fe(a({id:"signup_page.error.sso_unable_to_signup",defaultMessage:[{type:0,value:"Unable to sign up with the given email. Please try again or use a different signup method."}]})),V(le)}});return function(){return e.apply(this,arguments)}}();e()}},[he,ye,ve]);const[Oe,Pe]=(0,l.useState)(!1),[Be,Re]=(0,l.useState)(""),[De,qe]=(0,l.useState)(""),[Ne,je]=(0,l.useState)(""),[Ge,Ue]=(0,l.useState)(""),[$e,Fe]=(0,l.useState)(""),[Ye,We]=(0,l.useState)(()=>(e=>ae[e]||"+46")(M.id)),[He,Ve]=(0,l.useState)(""),[Je,Ke]=(0,l.useState)(!1),[Ze,Qe]=(0,l.useState)(!1),[Xe,et]=(0,l.useState)(""),{data:tt}=(0,c.A)("gantClubSectionLoginModal",{contentTypeId:"gantClubSectionLoginModal",fieldKey:"entryId",fieldValue:"gant-club-section-login-modal"}),{link:nt}=tt||{},at=nt?k((0,d.x)(nt)):null,ot=function(){var e=(0,o.A)(function*(){(0,y.cZ)("returnToPage",window.location.pathname),(0,y.cZ)("ssoProvider","apple");try{const e=G.apple||"apple";yield O.mutateAsync({hint:e,redirectURI:Y})}catch(e){console.error("SSO signup error:",e)}finally{de(!1)}});return function(){return e.apply(this,arguments)}}(),lt=function(){var e=(0,o.A)(function*(){(0,y.cZ)("returnToPage",window.location.pathname),(0,y.cZ)("ssoProvider","google");try{const e=G.google||"google";yield O.mutateAsync({hint:e,redirectURI:Y})}catch(e){console.error("SSO signup error:",e)}finally{de(!1)}});return function(){return e.apply(this,arguments)}}(),rt=(e=!1)=>{Pe(e),V(se)},it=(0,l.useCallback)((0,o.A)(function*(){de(!0);try{if(he&&ye&&ke&&Me){const e=ce?localStorage.getItem("store_id"):null,t=ce?localStorage.getItem("signup_channel"):null,n=yield Ce.mutateAsync(te({tokenResponse:ke,userInfo:Me,signUpSourceChannel:t||"Ecom"},e&&{storeId:e}));if(T){try{yield P.mutateAsync()}catch(e){console.error("Logout error:",e)}Re(Me.email),Ie(null),Ae(null),Ee(),(0,y.zU)("returnToPage"),rt()}else{Se.handleTokenResponse(ke,!1),Se.clearECOMSession(),_e(),Ie(null),Ae(null),Ee(),(0,y.zU)("returnToPage");const e=null==n?void 0:n.crmID,t=null==n?void 0:n.sfCoreAccountId;e&&localStorage.setItem("crmId",e),t&&localStorage.setItem("sfCoreAccountId",t),localStorage.setItem("openIdModal","true");const a=new URLSearchParams({idmodal:"true"});e&&a.set("crmId",e),t&&a.set("sfCoreAccountId",t),A.push({pathname:k("/account"),search:`?${a.toString()}`})}}}catch(e){console.error("SSO error:",e)}finally{de(!1),ce&&localStorage.removeItem("signup_channel")}}),[he,ye,ke,Ee,z,Se,Ie,Ae,y.zU,de,Me,Ae,Ce,T,P,Re,rt]),st=function(){var e=(0,o.A)(function*(){Qe(!0),et("");try{var e;const t=ce?localStorage.getItem("store_id"):null,n=ce?localStorage.getItem("signup_channel"):null,o={customer:te({c_crm
1ConsumerId:null,firstName:Ne,lastName:Ge,email:Be,login:Be,c_signupSourceChannel:n||"Ecom"},t&&{c_storeId:t}),password:oe()};if(De&&(o.customer.title=(0,S.IE)(De,a)),$e&&(o.customer.c_dateOfBirth=$e),He&&(o.customer.phoneHome=`${Ye}${He}`),Le&&(o.customer.c_referredByMemberReferralCode=Le),Je&&(o.customer.c_crmTandC=!0,o.customer.c_crmNewsletter=!0),o.customer.c_locale=null==M||null===(e=M.id)||void 0===e?void 0:e.replace("-","_"),T){const e=yield B.mutateAsync({body:o});null!=e&&e.c_crmConsumerId&&localStorage.setItem("crmId",e.c_crmConsumerId),null!=e&&e.c_sfCoreAccountId&&localStorage.setItem("sfCoreAccountId",e.c_sfCoreAccountId),rt(),yield P.mutateAsync()}else{const e=yield B.mutateAsync({body:o}),t=null==e?void 0:e.c_crmConsumerId,n=null==e?void 0:e.c_sfCoreAccountId;t&&localStorage.setItem("crmId",t),n&&localStorage.setItem("sfCoreAccountId",n),yield xe.mutateAsync({username:Be,password:o.password}),localStorage.setItem("openIdModal","true");const a=new URLSearchParams({idmodal:"true"});t&&a.set("crmId",t),n&&a.set("sfCoreAccountId",n),A.push({pathname:k("/account"),search:`?${a.toString()}`})}}catch(e){var t;try{yield P.mutateAsync()}catch(e){console.error("Logout error:",e)}const l=a({id:"signup_page.error.signup_failed",defaultMessage:[{type:0,value:"We couldn't create your account. Please check your information and try again."}]});var n,o;if(400===(null==e||null===(t=e.response)||void 0===t?void 0:t.status))((null==e||null===(n=e.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.detail)||"").includes("already exists")?et(a({id:"signup_page.error.email_exists",defaultMessage:[{type:0,value:"An account with this email already exists. Please log in instead."}]})):et(l);else et(l);console.error("Email signup error:",e)}finally{Qe(!1),ce&&localStorage.removeItem("signup_channel")}});return function(){return e.apply(this,arguments)}}();if(w&&ce){ce&&Le&&localStorage.removeItem(`${_.aO}_${null==I?void 0:I.id}`);const e=k("/account");return l.createElement(m.Redirect,{to:e})}return l.createElement(i.az,{sx:n.pageContainer},l.createElement(E.A,{title:a({id:"signup_page.title",defaultMessage:[{type:0,value:"Join The Gant Club"}]}),description:a({id:"signup_page.description",defaultMessage:[{type:0,value:"Join The Gant Club and enjoy exclusive benefits"}]})}),W===le&&l.createElement(R,{styles:n,onEmailSignup:()=>{V(re)},onAppleSignup:ot,onGoogleSignup:lt,enableApple:D,enableGoogle:q,onCtaClick:()=>{(0,p.d)("gant_club_cta_click",{link_text:null==nt?void 0:nt.linkText,link_url:at})},gantClubData:tt,ctaUrl:at,notification:ge}),W===re&&l.createElement(U,{styles:n,onBack:()=>{V(le)},hideBackButton:!N,email:Be,setEmail:Re,title:De,setTitle:qe,firstName:Ne,setFirstName:je,lastName:Ge,setLastName:Ue,dateOfBirth:$e,setDateOfBirth:Fe,countryCode:Ye,setCountryCode:We,phoneNumber:He,setPhoneNumber:Ve,marketingConsent:Je,setMarketingConsent:Ke,onContinue:st,isLoading:Ze,signupError:Xe}),W===ie&&l.createElement(H,{styles:n,onBack:()=>{ee(!1),V(le)},marketingConsent:J,setMarketingConsent:ee,onSignup:it,isLoading:ue,isInitialLoading:pe}),W===se&&l.createElement(K,{styles:n,onBack:()=>{V(le)},email:Be,isActivationSuccess:Oe}))}}}]);

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.