1(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[45],{QRkR:function(e,n,i){"use strict";i.r(n);var a=i("VBdi"),t=i.n(a),o=i("9mJr"),c=i("DCFE"),l=i("5cNn"),r=i("ffok"),s=i("96Qw"),d=i("H5bq"),u=i("xCJP"),m=i("MwNz"),v=i("oBzm"),f=i("Wm6N"),p=i.n(f),k=i("4j0K"),g=i("xAi6"),S=i("C9Dh"),b=i("eaup"),N=i("AOpM");i("p8di");const E=["socialLoginData"];var h=()=>{const e=m.a.get("i18n"),n=Object(s.useHistory)(),{user:i,isAuthInitialized:o,userInfo:f,pendingAction:h,setPendingAction:O}=Object(k.a)(),{setToastContent:w}=Object(v.c)(),[A,D]=Object(a.useState)(!0),{formState:_,handleSubmit:j}=Object(r.c)()||{};Object(a.useEffect)(()=>{var e,a,t;!o&&!i||o&&!i||o&&i&&!(null===i||void 0===i?void 0:i.emailVerified)&&(null===f||void 0===f||null===(e=f.user)||void 0===e?void 0:e.consent)?n.push("/account"):o&&(null===i||void 0===i?void 0:i.emailVerified)&&(null===f||void 0===f||null===(a=f.user)||void 0===a?void 0:a.consent)?n.push("/"):o&&i&&f&&!(null===f||void 0===f||null===(t=f.user)||void 0===t?void 0:t.consent)&&D(!1)},[o,i,f]);const[y]=Object(l.a)(p.a,{onCompleted:a=>{var t;if(null===a||void 0===a||null===(t=a.recordConsent)||void 0===t?void 0:t.success)if(null===i||void 0===i?void 0:i.emailVerified){if(null===h||void 0===h?void 0:h.socialLoginData){const{socialLoginData:e}=h,n=Object(c.a)(h,E);e&&O(n)}Object(u.o)(),setTimeout(()=>{n.push("/onboarding")},0)}else n.push("/account/verify");else w({message:e.t("Something went wrong message"),status:"error"})},onError:()=>{w({message:e.t("Something went wrong message"),status:"error"})},context:{api:g.a}});if(A)return t.a.createElement(S.a,null);const{isSubmitting:C,isValid:U}=_||{};return t.a.createElement("div",{className:"social-consent"},t.a.createElement("form",{onSubmit:j(async e=>{if(!o||!i)return;const{emailSignUp:n,accountSignUpConsent:a}=e;if(a)try{await y({variables:{emailSignUp:n,accountSignUpConsent:a}})}catch(t){console.error(t)}})},t.a.createElement("h1",{className:"social-consent__title"},e.t("finish-creating-account")),t.a.createElement(N.a,null),t.a.createElement(b.a,{text:e.t("create-account"),isActive:U,isLoading:C,onClick:()=>{Object(d.b)("Create Account","aj-form__submit-button","social-consent","center")}})))},O=i("9N7U");n.default=e=>{const n=m.a.get("i18n"),i=Object(O.q)(null===e||void 0===e?void 0:e.staticContext,"/account-social-consent");return t.a.createElement("main",{id:g.y.MAIN,className:"container"},t.a.createElement("div",{className:"container__inner"},t.a.createElement(o.a,null,t.a.createElement("title",null,n.t("Finish creating your account")),t.a.createElement("link",{rel:"canonical",href:i}),t.a.createElement("meta",{name:"pageType",content:"Accounts"})),t.a.createElement(h,null)))}},Wm6N:function(e,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"performPostSocialSignUpActions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"emailSignUp"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountSignUpConsent"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recordConsent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"newsletterPurpose"},value:{kind:"Variable",name:{kind:"Name",value:"emailSignUp"}}},{kind:"ObjectField",name:{kind:"Name",value:"personalizationPurpose"},value:{kind:"Variable",name:{kind:"Name",value:"accountSignUpConsent"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errorMessage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:251}};var a={};function t(e,n){for(var i=0;i<e.definitions.length;i++){var a=e.definitions[i];if(a.name&&a.name.value==n)return a}}i.definitions.forEach((function(e){if(e.name){var n=new Set;!function e(n,i){if("FragmentSpread"===n.kind)i.add(n.name.value);
1else if("VariableDefinition"===n.kind){var a=n.type;"NamedType"===a.kind&&i.add(a.name.value)}n.selectionSet&&n.selectionSet.selections.forEach((function(n){e(n,i)})),n.variableDefinitions&&n.variableDefinitions.forEach((function(n){e(n,i)})),n.definitions&&n.definitions.forEach((function(n){e(n,i)}))}(e,n),a[e.name.value]=n}})),e.exports=i,e.exports.performPostSocialSignUpActions=function(e,n){var i={kind:e.kind,definitions:[t(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var o=a[n]||new Set,c=new Set,l=new Set;for(o.forEach((function(e){l.add(e)}));l.size>0;){var r=l;l=new Set,r.forEach((function(e){c.has(e)||(c.add(e),(a[e]||new Set).forEach((function(e){l.add(e)})))}))}return c.forEach((function(n){var a=t(e,n);a&&i.definitions.push(a)})),i}(i,"performPostSocialSignUpActions")},p8di:function(e,n,i){}}]);
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.