(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([["www/login-mobile"],{"+wdc":function(e,t,n){var o,r,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,l=c.now();t.unstable_now=function(){return c.now()-l}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,d=null,h=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(h,0),n}};o=function(e){null!==u?setTimeout(o,0,e):(u=e,setTimeout(h,0))},r=function(e,t){d=setTimeout(e,t)},i=function(){clearTimeout(d)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,g=window.clearTimeout;if("undefined"!=typeof console){var f=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,b=null,j=-1,w=5,_=0;t.unstable_shouldYield=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=0<e?Math.floor(1e3/e):5};var y=new MessageChannel,O=y.port2;y.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();_=e+w;try{b(!0,e)?O.postMessage(null):(m=!1,b=null)}catch(n){throw O.postMessage(null),n}}else m=!1},o=function(e){b=e,m||(m=!0,O.postMessage(null))},r=function(e,n){j=p((function(){e(t.unstable_now())}),n)},i=function(){g(j),j=-1}}function v(e,t){var n=e.length;e.push(t);e:for(;;){var o=n-1>>>1,r=e[o];if(!(void 0!==r&&0<k(r,t)))break e;e[o]=t,e[n]=r,n=o}}function x(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,r=e.length;o<r;){var i=2*(o+1)-1,a=e[i],s=i+1,c=e[s];if(void 0!==a&&0>k(a,n))void 0!==c&&0>k(c,a)?(e[o]=c,e[s]=n,o=s):(e[o]=a,e[i]=n,o=i);else{if(!(void 0!==c&&0>k(c,n)))break e;e[o]=c,e[s]=n,o=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var E=[],C=[],T=1,P=null,L=3,A=!1,R=!1,I=!1;function B(e){for(var t=x(C);null!==t;){if(null===t.callback)S(C);else{if(!(t.startTime<=e))break;S(C),t.sortIndex=t.expirationTime,v(E,t)}t=x(C)}}function F(e){if(I=!1,B(e),!R)if(null!==x(E))R=!0,o(U);else{var t=x(C);null!==t&&r(F,t.startTime-e)}}function U(e,n){R=!1,I&&(I=!1,i()),A=!0;var o=L;try{for(B(n),P=x(E);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=P.callback;if("function"==typeof a){P.callback=null,L=P.priorityLevel;var s=a(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?P.callback=s:P===x(E)&&S(E),B(n)}else S(E);P=x(E)}if(null!==P)var c=!0;else{var l=x(C);null!==l&&r(F,l.startTime-n),c=!1}return c}finally{P=null,L=o,A=!1}}var N=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||A||(R=!0,o(U))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return x(E)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=N,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return e={id:T++,callback:n,priorityLevel:e,startTime:a,expirationTime:c=a+c,sortIndex:-1},a>s?(e.sortIndex=a,v(C,e),null===x(E)&&e===x(C)&&(I?i():I=!0,r(F,a-s))):(e.sortIndex=c,v(E,e),R||A||(R=!0,o(U))),e},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},"+zvl":function(e,t,n){var o=n("q1tI"),r=n("n6mq"),i=n("nKUr");t.a=function({pin:{image:e,pinDescription:t,dominantColor:n,bannerCopy:a}}){var s;return Object(i.jsx)(o.Fragment,{children:Object(i.jsxs)(r.f,{display:"flex",alignItems:"center",justifyContent:"center",margin:4,children:[Object(i.jsx)(r.f,{width:30,height:40,margin:4,children:Object(i.jsx)(r.D,{width:"100%",height:"100%",rounding:2,children:Object(i.jsx)(r.y,{src:null!==(s=(e||{}).url)&&void 0!==s?s:"",alt:t||"",naturalHeight:(e||{}).height||1,naturalWidth:(e||{}).width||1,color:n||"",fit:"cover"})})}),Object(i.jsx)(r.cb,{children:a})]})})}},"2mql":function(e,t,n){var o=n("r36Y"),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return o.isMemo(e)?a:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(g){var r=p(n);r&&r!==g&&e(t,r,o)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),f=c(n),m=0;m<a.length;++m){var b=a[m];if(!(i[b]||o&&o[b]||f&&f[b]||s&&s[b])){var j=h(n,b);try{l(t,b,j)}catch(w){}}}}return t}},"351Y":function(e,t,n){n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var o=n("7w6Q"),r=n("RNo4"),i=n("vtuW");const a="adcredits",s=()=>{if(!window)return!1;const e=Object(r.l)(window.location.search).utm_medium;return!!e&&e===a};class c{constructor(){this.key="paid.campaign.adcredits"}markEligible(){Object(i.c)(this.key,"true"),o.a.increment("partner.paid.ad_credits.seen",1,{platform:"mobile"})}isEligible(){return"true"===Object(i.a)(this.key)}claim(){Object(i.c)(this.key,"false"),o.a.increment("partner.paid.ad_credits.claimed",1,{platform:"mobile"})}}class l{constructor(){this.key="paid.marketingoffer"}markEligible(e){Object(i.c)(this.key,e),o.a.increment(`partner.paid.marketingoffer.${e}.seen`,1,{platform:"mobile"})}isEligible(){return null!=Object(i.a)(this.key)}getOfferId(){return Object(i.a)(this.key)}claim(){if(this.isEligible()){const e=Object(i.a)(this.key);Object(i.c)(this.key,null),o.a.increment(`partner.paid.marketingoffer.${e}.claimed`,1,{platform:"mobile"})}}}},"38yB":function(e,t,n){n.r(t);var o=n("/MKj"),r=n("JGxo"),i=n("q1tI"),a=n("FDmi"),s=n("PaNI"),c=n("yeqU"),l=n("y6dK"),u=n("kerF"),d=n("k1Bv"),h=n("Lr1Z"),p=n("fs0a"),g=n("oAcf"),f=n("eOdZ"),m=n("bcHz"),b=n("28DW"),j=n("yweb"),w=n("n6mq"),_=n("nKUr");function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O extends i.PureComponent{constructor(...e){super(...e),y(this,"handleBackToLoginClick",()=>{const{method:e,backToLogin:t}=this.props;Object(b.a)("unauth_mweb.login.no_account_found_screen.back_to_login."+e),t()}),y(this,"handleContinueSignupClick",()=>{const{method:e,continueSignup:t}=this.props;Object(b.a)("unauth_mweb.login.no_account_found_screen.account_created."+e),t()})}componentDidMount(){Object(b.a)("unauth_mweb.login.no_account_found_screen.shown."+this.props.method)}render(){const{email:e,method:t}=this.props;let n=this.props.i18n._("Hmm, it looks like there’s no Pinterest account that matches this email. Try logging in again?","Short text informing users the email they tried to log in with does not belong to an existing account","Short text informing users the email they tried to log in with does not belong to an existing account");return"facebook"===t?n=this.props.i18n._("Hmm, it looks like the Facebook account associated with this email isn’t on Pinterest yet.  Try logging in with a different method.","Short text informing users the Facebook account they tried to log in with is not linked to an existing account","Short text informing users the Facebook account they tried to log in with is not linked to an existing account"):"google"===t&&(n=this.props.i18n._("Hmm, it looks like the Google account associated with this email isn’t on Pinterest yet.  Try logging in with a different method.","Short text informing users the Google account they tried to log in with is not linked to an existing account","Short text informing users the Google account they tried to log in with is not linked to an existing account")),Object(_.jsxs)(w.f,{flex:"grow",children:[Object(_.jsx)(w.v,{overflow:"normal",children:this.props.i18n._("Couldn't find your Pinterest account","Heading for the page informing users the account they tried to log in to does not exist","Heading for the page informing users the account they tried to log in to does not exist")}),Object(_.jsxs)(w.f,{marginTop:10,marginBottom:3,children:[e&&Object(_.jsx)(w.cb,{weight:"bold",children:e}),Object(_.jsx)(w.f,{marginTop:4,children:Object(_.jsx)(w.cb,{children:n})}),Object(_.jsx)(w.f,{marginTop:4,children:Object(_.jsx)(w.g,{fullWidth:!0,color:"red",text:this.props.i18n._("Back to login","Text on button taking users back to login page","Text on button taking users back to login page"),onClick:this.handleBackToLoginClick})})]}),Object(_.jsx)(m.a,{onTouch:this.handleContinueSignupClick,pressState:"none",children:Object(_.jsx)(w.f,{position:"fixed",bottom:!0,left:!0,right:!0,paddingX:4,paddingY:8,children:Object(_.jsx)(w.cb,{align:"center",weight:"bold",children:this.props.i18n._("Create new account","Text button to take users to complete sign up after attempting to log in with non-existent account","Text button to take users to complete sign up after attempting to log in with non-existent account")})})},"signupConfirmationLink")]})}}var v=function(e){const t=Object(j.c)();return Object(_.jsx)(O,{...e,i18n:t})},x=n("6adH"),S=n("QtD7"),k=n("ANjH"),E=n("bUAJ"),C=n("qpbZ"),T=n("TXO6"),P=n("Q5BC"),L=n("351Y"),A=n("qEYz"),R=n("RNo4"),I=n("ulr2"),B=n("5SBu"),F=n("J8m7"),U=n("EUPR"),N=n("c50B"),D=n("AGnR"),V=n("EC67");function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const z=e=>{const t=new L.b;if(t.isEligible()){return"/business/offer/"+t.getOfferId()}return Object(R.l)(e.search).next||e.state&&e.state.next||"/"},$=e=>e._("Continue with Facebook","Text on the facebook button on the mobile web log in modal","Text on the facebook button on the mobile web log in modal"),W=e=>e._("Continue with Google","Text on the google button on the mobile web log in modal","Text on the google button on the mobile web log in modal"),q=e=>e._("Continue with LINE","Text on the Line button on the mobile web log in modal","Text on the Line button on the mobile web log in modal");class K extends i.PureComponent{constructor(...e){var t,n;super(...e),t=this,M(this,"state",{apiErrorCode:0,email:(n=this.props.location,n.state&&n.state.email||""),isLoading:!1,isValid:!1,loggedInWith:null,password:"",recaptchaV3Token:"default",emailValidationError:"",passwordValidationError:"",shouldShowSignupConfirmation:!1,registerCallback:()=>{},socialEmail:"",optOutFromPersonalizedForm:!1,shouldShowSignUpButton:!1,hasKeychainErrorShown:!0}),M(this,"clearPersonalizedLoginFromEmail",e=>{const{history:t,location:n}=this.props;if(n.state&&n.state.userInfo){const{userInfo:o,...r}=n.state;t.replace({pathname:e?"/":"/login",state:r})}}),M(this,"onLoginClick",()=>{this.trackButtonTap(30)}),M(this,"onSignUpClick",()=>{const{history:e,location:t}=this.props;this.trackButtonTap(31),e.push({pathname:"/signup/step1/",state:{email:this.state.email,password:this.state.password,isSignUpFromLoginError:!0,...t.state}})}),M(this,"trackLoginEvent",e=>{const{isAuthenticated:t,isLimitedLoginUser:n}=this.props;Object(D.e)({event_type:e,view_type:9,view_parameter:63,aux_data:{...t?{login_state:n?2:1}:{},signup_login_method:1}})}),M(this,"trackButtonTap",e=>{const{isAuthenticated:t,isLimitedLoginUser:n}=this.props;Object(D.h)({view_type:9,element:e,aux_data:{...t?{login_state:n?2:1}:{}}})}),M(this,"handleNotYouClick",()=>{this.clearPersonalizedLoginFromEmail(),this.trackButtonTap(10879),this.setState({email:"",optOutFromPersonalizedForm:!0}),Object(b.h)("click_change_signin_account")}),M(this,"handleNoAccountClick",()=>{this.clearPersonalizedLoginFromEmail(!0),this.trackButtonTap(10880),Object(b.h)("click_toggle_signup")}),M(this,"handlePasswordReset",e=>{const{resetPasswordExpActiveAndEnabled:t,showResetPasswordSentModal:n}=this.props,{email:o}=this.state;this.trackButtonTap(10881),f.d.create("UserResetPasswordResource",{username_or_email:o}).callCreate({showError:!1}).then(()=>this.setState({apiErrorCode:0}));const r=Object(N.u)(o,this.emailValidators());o&&!r&&t()&&(e.preventDefault(),n(o))}),M(this,"validateEmail",(async function(e){const{email:n}=t.state,{checkEmailExistExp:o}=t.props;let r=Object(N.u)(n,t.emailValidators());if(!r&&e){const e=await t.props.validateEmailExists(n).then(e=>e&&e.resource_response&&!e.resource_response.data?t.props.i18n._("There is no account with this email","Email not found error message","Email not found error message"):"").catch(e=>"");e&&o()&&(r=e)}const i=!r&&!t.state.passwordValidationError;e||i?t.setState({emailValidationError:r,isValid:i}):t.setState({isValid:i})})),M(this,"validatePassword",e=>{const{password:t}=this.state,n=Object(N.u)(t,[Object(N.p)({message:this.props.i18n._("The password you entered is incorrect.","Password validation error","Password validation error")})]),o=!n&&!this.state.emailValidationError;e||o?this.setState({passwordValidationError:n,isValid:o}):this.setState({isValid:o})}),M(this,"validateEmailOnBlur",()=>{setTimeout(()=>{this.validateEmail(!0)},0)}),M(this,"validatePasswordOnBlur",()=>{const{password:e}=this.state;e&&setTimeout(()=>{this.validatePassword(!0)},0)}),M(this,"emailValidators",()=>[Object(N.e)({message:this.props.i18n._("Not a valid email.","Email field validation error message","Email field validation error message")}),Object(N.p)({message:this.props.i18n._("You missed a spot! Don't forget to add your email.","Email validation error","Email validation error")})]),M(this,"handleChangeEmail",({value:e})=>{this.setState({email:e,shouldShowSignUpButton:!1,hasKeychainErrorShown:!0},()=>{this.validateEmail()})}),M(this,"handleChangePassword",({value:e})=>this.setState({password:e,hasKeychainErrorShown:!0},this.validatePassword)),M(this,"handleLogin",e=>{e&&e.preventDefault();const{history:t,location:n,login:o,showToast:r,isSignupConfirmationExpEnabled:i,noImmediateLoginRedirect:a}=this.props,{email:s,password:c,recaptchaV3Token:l}=this.state,u=n.state&&"true"===n.state.switch_account,d=u?{isSwitchAccount:u,recaptchaV3Token:l}:{recaptchaV3Token:l,noImmediateRedirect:a};let h=!1;this.trackLoginEvent(7534),o({username_or_email:s,password:c},t,z(n),d).then(()=>{this.trackLoginEvent(7536)}).catch(e=>{this.trackLoginEvent(7535);let t=e.apiErrorCode===F.o||e.message?{passwordValidationError:e.message}:{};e.apiErrorCode===F.p?(r({color:"orange",text:e.message}),t={}):e.apiErrorCode===F.n&&(s?i&&i()?h=!0:t={emailValidationError:e.message,shouldShowSignUpButton:!0}:t={emailValidationError:e.message}),this.setState({isLoading:!1,shouldShowSignupConfirmation:h,apiErrorCode:e.apiErrorCode,...t}),Object(U.h)(e=>this.setState({recaptchaV3Token:e}),e=>{},U.b)}),this.setState({isLoading:!0})}),M(this,"handleLoginTouch",e=>{this.setState({loggedInWith:e}),"Facebook"===e?Object(b.a)("unauth_mweb.facebook_connect.manual.attempt"):"Google"===e&&Object(b.a)("unauth_mweb.google_connect.manual.attempt")}),M(this,"renderPersonalizedLogin",e=>{const{i18n:t,isLimitedLoginUser:n,location:o,noImmediateLoginRedirect:r}=this.props,{emailValidationError:c,passwordValidationError:d,isValid:g,password:f,shouldShowSignUpButton:m}=this.state,{connectedToFacebook:b,connectedToGoogle:j,email:y,firstName:O,hasPassword:v,avatarSrc:x}=(e=>{const t={connectedToFacebook:e.connected_to_facebook,connectedToGoogle:e.connected_to_google,email:e.email,firstName:e.first_name,hasPassword:e.has_password,avatarSrc:""};return void 0!==e.gplus_url&&(t.connectedToGoogle=e.connected_to_google||!!e.gplus_url),e.image_medium_url?t.avatarSrc=e.image_medium_url:e.medium_image_url&&(t.avatarSrc=e.medium_image_url),t})(e),S=!!o.state&&!!o.state.userInfo,k=!v&&!b&&!j,E=v||k,T=b||k,P=j||k,L=E&&(T||P),A=O?Object(C.b)(this.props.i18n._("Welcome back, {{name}}!","Heading on personalized login page, followed by user's name","Heading on personalized login page, followed by user's name"),{name:O}):this.props.i18n._("Welcome back!","Welcome message on user login page","Welcome message on user login page"),R=e=>E&&Object(_.jsx)(l.a,{email:null!=y?y:"",handleChangeEmail:this.handleChangeEmail,handleChangePassword:this.handleChangePassword,handlePasswordReset:this.handlePasswordReset,hideEmailField:e,emailValidationError:c,passwordValidationError:d,validatePasswordOnBlur:this.validatePasswordOnBlur,validateEmailOnBlur:this.validateEmailOnBlur,isValid:g,onLoginClick:this.onLoginClick,onSignUpClick:this.onSignUpClick,onSubmit:this.handleLogin,password:f,shouldShowSignUpButton:m,showEmailAsText:!e}),I=e=>Object(_.jsx)(p.a,{fbButtonType:"continue",facebookText:T?$(t):null,googleText:P?W(t):null,lineText:k?q(t):null,next:z(o),beforeRegister:this.onSocialLoginFailure,onGoogleTouch:()=>this.handleLoginTouch("Google"),onFacebookTouch:()=>this.handleLoginTouch("Facebook"),inSocialBeforeEmailExp:e,noImmediateLoginRedirect:r});return Object(_.jsxs)(i.Fragment,{children:[S&&Object(_.jsx)(s.a,{}),Object(_.jsx)(u.a,{name:"mweb_limited_login_social_before_email",isEligible:n&&L,activate:!1,children:({anyEnabled:e})=>Object(_.jsxs)(i.Fragment,{children:[Object(_.jsxs)(w.f,{display:"flex",direction:"column",justifyContent:"center",alignItems:"center",marginTop:5,marginBottom:E&&!e?-3:5,children:[Object(_.jsx)(w.u,{alignItems:"stretch",justifyContent:"center",children:Object(_.jsx)(w.v,{overflow:"normal",size:"sm",children:A})}),Object(_.jsx)(w.f,{marginTop:3,marginBottom:3,children:Object(_.jsx)(a.a,{size:"lg",src:x,name:O||""})}),(e||!E)&&Object(_.jsx)(w.f,{children:Object(_.jsx)(w.cb,{align:"center",children:y})})]}),Object(_.jsxs)(w.f,{marginStart:"auto",marginEnd:"auto",marginTop:3,marginBottom:6,maxWidth:400,children:[e?I(e):R(e),L&&Object(_.jsx)(w.f,{marginTop:3,marginBottom:3,children:Object(_.jsx)(w.cb,{align:"center",size:"sm",weight:"bold",children:this.props.i18n._("OR","Separator for email login button and social login button","Separator for email login button and social login button")})}),e?R(e):I(e)]})]})}),Object(_.jsxs)(w.f,{alignItems:"center",direction:"column",display:"flex",flex:"grow",justifyContent:"center",marginTop:2,children:[Object(_.jsxs)(w.f,{display:"flex",justifyContent:"center","data-test-id":"login-switch-account",children:[Object(_.jsx)(w.f,{marginEnd:1,children:Object(_.jsx)(w.cb,{align:"center",children:this.props.i18n._("Not you?","Short message on the bottom of the login modal that prompts a user to log in to a different account","Short message on the bottom of the login modal that prompts a user to log in to a different account")})}),Object(_.jsx)(h.a,{to:{pathname:"/login",state:o.state},pressState:"background",onTouch:this.handleNotYouClick,children:Object(_.jsx)(w.cb,{color:"darkGray",weight:"bold",align:"center",children:this.props.i18n._("Log in with a different account","Short message on the bottom of the login modal that prompts a user to log in to a different account","Short message on the bottom of the login modal that prompts a user to log in to a different account")})})]}),Object(_.jsxs)(w.f,{display:"flex",justifyContent:"center",marginTop:4,children:[Object(_.jsx)(w.f,{marginEnd:1,"data-test-id":"signup-modal-personalized",children:Object(_.jsx)(w.cb,{children:this.props.i18n._("No Account?","Prompt for signing up","Prompt for signing up")})}),Object(_.jsx)(h.a,{to:{pathname:"/signup/step1/",state:o.state},pressState:"background",onTouch:this.handleNoAccountClick,children:Object(_.jsx)(w.cb,{color:"darkGray",weight:"bold",children:this.props.i18n._("Sign up","Prompt for signing up","Prompt for signing up")})})]})]})]})}),M(this,"onSocialLoginFailure",(e,t)=>{this.setState({shouldShowSignupConfirmation:!0,registerCallback:t,socialEmail:e})}),M(this,"handleCreateAccountClick",()=>{const{registerCallback:e}=this.state;e?e():this.onSignUpClick()}),M(this,"renderLoginButtons",e=>{const{i18n:t,location:n,noImmediateLoginRedirect:o}=this.props,r=Object(_.jsx)(p.a,{fbButtonType:"continue",facebookText:$(t),googleText:W(t),lineText:q(t),next:z(n),beforeRegister:this.onSocialLoginFailure,onGoogleTouch:()=>this.handleLoginTouch("Google"),onFacebookTouch:()=>this.handleLoginTouch("Facebook"),noImmediateLoginRedirect:o}),i=Object(_.jsx)(w.f,{marginTop:e?0:-2,marginBottom:e?2:0,children:Object(_.jsx)(w.cb,{align:"center",size:"md",weight:"bold",children:this.props.i18n._("OR","Separator for email login button and social login button","Separator for email login button and social login button")})});return e?Object(_.jsxs)(w.f,{children:[i,r]}):Object(_.jsxs)(w.f,{children:[r,i]})})}componentDidMount(){const{history:e,isAuthenticated:t,isLimitedLoginUser:n,location:o,showToast:r}=this.props,i=o.state&&"true"===o.state.switch_account;if(o.state&&o.state.shouldShowAccountExistsToast&&(r({text:this.props.i18n._("Looks like you already have a Pinterest account. Please log in.","Toast showing that a user already has a Pinterest account and can login normally","Toast showing that a user already has a Pinterest account and can login normally")}),o.state)){const{shouldShowAccountExistsToast:t,...n}=o.state;e.replace("/login/",n)}!t||n||i||Object(A.b)({history:e,next:z(o)});"permanent_account_closure"===Object(R.l)(o.search).message&&r({duration:7e3,text:this.props.i18n._("Your account has been closed. We're sad to see you go","unauthLoginPage.accountClosedToast.message","Confirmation message after a user has successfully closed their account")});const a=()=>{Object(U.h)(e=>this.setState({recaptchaV3Token:e}),e=>{},U.b)};if(a(),setInterval(a,U.f),o.state&&o.state.keychainiOSAutologinError){const e=o.state.keychainiOSAutologinError,t=e.code,n=t===F.n?{emailValidationError:e.message}:{passwordValidationError:e.message};this.setState({apiErrorCode:t,hasKeychainErrorShown:!1,...n})}const s=Object(E.h)(o);s&&e.replace("/login",{isRedirectToNextParamAfterSignup:!0,next:s})}static getDerivedStateFromProps(e,t){const{isAuthenticated:n,isLimitedLoginUser:o,location:r,loggedOutUserInfo:i,viewingUser:a}=e;return r.state&&r.state.userInfo?{email:r.state.userInfo.email}:n||!i||t.optOutFromPersonalizedForm?o&&a&&!t.optOutFromPersonalizedForm?{email:a.email}:null:{email:i.email}}render(){const{isLimitedLoginUser:e,location:t,loggedOutUserInfo:n,viewingUser:o,showPLPBanner:r,plpBannerPin:a,i18n:s,showKeychainError:u}=this.props,p=t.state&&t.state.shouldShowLoginBelow||!1,{apiErrorCode:f,email:m,emailValidationError:b,passwordValidationError:j,shouldShowSignupConfirmation:y,isLoading:O,isValid:x,loggedInWith:S,optOutFromPersonalizedForm:k,password:E,shouldShowSignUpButton:C,socialEmail:T,hasKeychainErrorShown:P}=this.state;let L=e?o:n;t.state&&t.state.userInfo&&(L=t.state.userInfo);const A=f>0&&f===F.r,R=Object(_.jsxs)(i.Fragment,{children:[Object(_.jsxs)(w.f,{marginStart:"auto",marginEnd:"auto",marginTop:3,marginBottom:6,maxWidth:400,children:[!p&&this.renderLoginButtons(p),Object(_.jsx)(l.a,{email:m,handleChangeEmail:this.handleChangeEmail,handleChangePassword:this.handleChangePassword,handlePasswordReset:this.handlePasswordReset,emailValidationError:b,passwordValidationError:j,validatePasswordOnBlur:this.validatePasswordOnBlur,validateEmailOnBlur:this.validateEmailOnBlur,isSIWAError:A,isValid:x,onLoginClick:this.onLoginClick,onSignUpClick:this.onSignUpClick,onSubmit:this.handleLogin,password:E,shouldShowSignUpButton:C}),p&&this.renderLoginButtons(p)]}),Object(_.jsxs)(w.f,{alignItems:"center",direction:"column",display:"flex",flex:"grow",justifyContent:"center",marginTop:2,children:[Object(_.jsxs)(w.u,{alignItems:"stretch",justifyContent:"center",children:[Object(_.jsx)(w.f,{marginEnd:1,"data-test-id":"signup-link",children:Object(_.jsx)(w.cb,{children:s._("No Account?","Prompt for signing up","Prompt for signing up")})}),Object(_.jsx)(h.a,{to:{pathname:"/signup/step1/",state:{...t.state,email:m}},pressState:"background",onTouch:this.handleNoAccountClick,children:Object(_.jsx)(w.cb,{color:"darkGray",weight:"bold",children:s._("Sign up","Prompt for signing up","Prompt for signing up")})})]}),Object(_.jsx)(c.a,{})]})]});return y?Object(_.jsx)(v,{email:S?T:m,method:S?S.toLowerCase():"email",backToLogin:()=>this.setState({loggedInWith:null,registerCallback:void 0,shouldShowSignupConfirmation:!1,socialEmail:""}),continueSignup:this.handleCreateAccountClick}):u?Object(_.jsxs)(i.Fragment,{children:[Object(_.jsxs)(w.f,{height:52,display:"flex",justifyContent:"center",alignItems:"center",dangerouslySetInlineStyle:{__style:{backgroundColor:"rgba(230, 0, 35, 0.08)",transition:"transform 400ms ease-in-out",transform:P?"translateY(-120%)":"translateY(0%)"}},children:[Object(_.jsx)(w.w,{icon:"workflow-status-problem",color:"darkGray",accessibilityLabel:s._("Workflow status problem accessibility label","mweb.unauth.keychain_autologin.login_page.error_message.icon","Accessibility label for error message icon")}),Object(_.jsx)(w.f,{marginStart:2,children:Object(_.jsx)(w.cb,{color:"darkGray",children:s._("Oops! We couldn't log you in","mweb.unauth.keychain_autologin.login_page.error_message","Error message to let user know there was an issue logging them in")})})]}),Object(_.jsxs)(w.f,{paddingX:r?4:0,children:[L&&!k?this.renderPersonalizedLogin(L):R,O&&Object(_.jsx)(d.a,{})]})]}):Object(_.jsxs)(i.Fragment,{children:[r&&a&&Object(_.jsx)(g.a,{pin:a}),Object(_.jsxs)(w.f,{paddingX:r?4:0,children:[L&&!k?this.renderPersonalizedLogin(L):R,O&&Object(_.jsx)(d.a,{})]})]})}}var G=Object(k.compose)(V.l,x.a,Object(o.connect)(({session:e,users:t={},experiments:n})=>({canUpsellNativeApp:e.canUseNativeApp&&"unknown"===e.pwaType,isAuthenticated:e.isAuthenticated,isLimitedLoginUser:Object(T.b)(t[e.userId]),loggedOutUserInfo:e.loggedOutUserInfo,viewingUser:t[e.userId]}),e=>({login:(t,n,o,r)=>e(Object(P.b)(t,n,o,r)),isSignupConfirmationExpEnabled:()=>["enabled","employees"].includes(e(Object(S.a)("mweb_unauth_signup_confirmation"))),resetPasswordExpActiveAndEnabled:()=>["enabled","employees"].includes(e(Object(S.a)("mweb_reset_password_lite"))),showResetPasswordSentModal:t=>e(Object(I.L)(t)),validateEmailExists:t=>e(Object(B.n)(t)),checkEmailExistExp:()=>["enabled","employees"].includes(e(Object(S.a)("mweb_check_email_exist_v5")))})))((function(e){const t=Object(j.c)();return Object(_.jsx)(K,{...e,i18n:t})})),H=n("Bb4+"),Y=n("o+5w"),X=n("tCfZ"),J=n("0G5S"),Q=n("PmFr"),Z=n("QAzJ"),ee=n("JJAz");const te=(e,t=!1)=>{const n=new L.b;if(!t&&n.isEligible()){return"/business/offer/"+n.getOfferId()}return Object(R.l)(e.search).next||e.state&&e.state.next||"/"};t.default=function(){var e,t;const n=Object(j.c)(),i=Object(V.i)(),a=Object(V.h)(),{showPLPBanner:s,pinForBanner:c}=Object(E.i)({i18n:n,location:i}),l=!(null===(e=i.state)||void 0===e||null===(t=e.keychainiOSAutologinError)||void 0===t||!t.code),u=Object(o.useSelector)(({marketingCampaign:e})=>e.params),d=Object(Z.a)("mweb_creator_access_upsell")().anyEnabled&&u.utm_campaign,h="undefined"!=typeof window&&Object(ee.a)(window)&&Object(ee.c)(window),p=!d&&!h;return p&&Object(J.a)(Q.e)?Object(_.jsx)(H.b,{children:Object(_.jsx)(w.f,{top:!0,bottom:!0,left:!0,right:!0,width:"100%",height:"100%",display:"flex",alignItems:"center",direction:"column",position:"absolute",paddingX:5,children:Object(_.jsx)(r.a,{handleContinueInBrowser:()=>{Object(b.a)("login_app_install_step.click_continue_in_browser"),a.push(Object(A.a)(te(i)))},handleOpenAppClick:()=>Object(b.a)("login_app_install_step.click_open_in_app"),InAppDeeplinkUrl:Object(A.a)(te(i,!0))})})}):Object(_.jsx)(Y.a,{viewType:9,children:Object(_.jsx)(H.b,{hasGutter:!s,showKeychainError:l,children:Object(_.jsxs)(w.f,{height:"120vh",children:[Object(_.jsx)(G,{showPLPBanner:s,plpBannerPin:c,noImmediateLoginRedirect:p,showKeychainError:l}),Object(_.jsx)(w.f,{marginTop:6,paddingX:2,children:Object(_.jsx)(X.a,{})})]})})})}},AXUD:function(e,t,n){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}));const o=412,r=429},Copi:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,h=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case h:case a:case c:case s:case g:return e;default:switch(e=e&&e.$$typeof){case u:case p:case l:return e;default:return t}}case m:case f:case i:return t}}}function j(e){return b(e)===h}t.typeOf=b,t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=m,t.Memo=f,t.Portal=i,t.Profiler=c,t.StrictMode=s,t.Suspense=g,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===h||e===c||e===s||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p)},t.isAsyncMode=function(e){return j(e)||b(e)===d},t.isConcurrentMode=j,t.isContextConsumer=function(e){return b(e)===u},t.isContextProvider=function(e){return b(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return b(e)===p},t.isFragment=function(e){return b(e)===a},t.isLazy=function(e){return b(e)===m},t.isMemo=function(e){return b(e)===f},t.isPortal=function(e){return b(e)===i},t.isProfiler=function(e){return b(e)===c},t.isStrictMode=function(e){return b(e)===s},t.isSuspense=function(e){return b(e)===g}},EUPR:function(e,t,n){n.d(t,"h",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return f}));var o=n("7w6Q");const r="onloadRecaptchaJsCallback",i="6Ldx7ZkUAAAAAF3SZ05DRL2Kdh911tCa3qFP0-0r",a="recaptcha-enterprise-src",s=(e,t,n)=>{o.a.increment("recaptcha_v3.request_token.attempt",.1,{action:n}),void 0===window.grecaptcha||void 0===window.grecaptcha.enterprise?(t(new Error("Error loading reCAPTCHA Enterprise")),o.a.increment("recaptcha_v3.request_token.js_loading_error",.1,{action:n})):window.grecaptcha.enterprise.ready(()=>{try{window.grecaptcha.enterprise.execute(i,{action:n}).then(e).catch(t)}catch(r){o.a.increment("recaptcha_v3.request_token.exec_error",.1,{action:n}),t(r)}})},c=(e,t,n)=>{if(window[r]=function(){return s(e,t,n)},document.getElementById(a))s(e,t,n);else{const e=document.createElement("script");e.id=a,e.src=`https://www.google.com/recaptcha/enterprise.js?onload=${r}&render=${i}`;const t=document.getElementsByTagName("script")[0];t.parentNode&&t.parentNode.insertBefore(e,t)}},l=105e3,u=8e3,d="mweb_auth",h="mweb_login",p="mweb_signup",g="web_auth",f="web_unauth"},GCVb:function(e,t,n){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var o=n("gxu6"),r=(n("kmwA"),n("RNo4"));const i=()=>o.a("csrftoken"),a=(e,t)=>!(e=>/^(GET|HEAD|OPTIONS|TRACE)$/.test(e))(e)&&Object(r.i)(t)},JGxo:function(e,t,n){var o=n("/MKj"),r=n("2NiC"),i=n("yweb"),a=n("n6mq"),s=n("nKUr");t.a=e=>{const t=Object(i.c)(),{handleContinueInBrowser:n,handleOpenAppClick:c,overrideAppValueProp:l,InAppDeeplinkUrl:u="/"}=e,d=Object(o.useSelector)(e=>e.session.isTablet),h=t._("Switch to the mobile app","mweb.nux.app_button_text","Text on app install button"),p=l||t._("Woohoo! You're ready to go.","mweb.nux.app_value_prop","Text that instructs user when user just finish registration");return Object(s.jsx)(a.f,{height:"90%",justifyContent:"center",display:"flex",direction:"column",maxWidth:440,margin:"auto",children:Object(s.jsxs)(a.f,{paddingX:2,paddingY:6,children:[Object(s.jsx)(a.f,{paddingY:6,justifyContent:"center",display:"flex",children:Object(s.jsx)(a.w,{color:"red",icon:"pinterest",accessibilityLabel:"Pinterest App",size:d?60:40})}),Object(s.jsxs)(a.u,{alignItems:"stretch",direction:"column",justifyContent:"center",children:[Object(s.jsx)(a.f,{paddingY:2,children:Object(s.jsx)(a.v,{align:"center",size:"sm",children:p})}),Object(s.jsx)(a.f,{alignItems:"center",dangerouslySetInlineStyle:{__style:{display:"grid"}},justifyContent:"center",marginTop:8}),Object(s.jsx)(a.f,{"data-test-id":"app-install-button",children:Object(s.jsx)(r.a,{children:e=>Object(s.jsx)(a.g,{fullWidth:!0,size:"lg",color:"red",onClick:()=>{c(),e&&e(u)},text:h})})}),Object(s.jsx)(a.f,{marginTop:2,"data-test-id":"skip-app-install-button",children:Object(s.jsx)(a.g,{fullWidth:!0,onClick:n,color:"white",size:"lg",text:t._("Continue in browser","mweb.unauth.app_upsell.continue_in_browser","App Upsell continue viewing in browser")})})]})]})})}},MKeS:function(e,t,n){n.d(t,"b",(function(){return E}));var o=n("q1tI"),r=n.n(o);function i(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=n("TOwV"),l=n("2mql"),u=n.n(l);function d(e,t){if(!e){var n=new Error("loadable: "+t);throw n.framesToPop=1,n.name="Invariant Violation",n}}function h(e){console.warn("loadable: "+e)}var p=r.a.createContext();function g(e){return e+"__LOADABLE_REQUIRED_CHUNKS__"}var f={initialChunks:{}},m="PENDING",b="REJECTED";var j=function(e){return e};function w(e){var t=e.defaultResolveComponent,n=void 0===t?j:t,o=e.render,l=e.onLoad;function h(e,t){void 0===t&&(t={});var h=function(e){return"function"==typeof e?{requireAsync:e,resolve:function(){},chunkName:function(){}}:e}(e),g={};function j(e){return t.cacheKey?t.cacheKey(e):h.resolve?h.resolve(e):"static"}function w(e,o,r){var i=t.resolveComponent?t.resolveComponent(e,o):n(e);if(t.resolveComponent&&!Object(c.isValidElementType)(i))throw new Error("resolveComponent returned something that is not a React component!");return u()(r,i,{preload:!0}),i}var _,y=function(e){var n,r;function c(n){var o;return(o=e.call(this,n)||this).state={result:null,error:null,loading:!0,cacheKey:j(n)},d(!n.__chunkExtractor||h.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),n.__chunkExtractor?(!1===t.ssr||(h.requireAsync(n).catch((function(){return null})),o.loadSync(),n.__chunkExtractor.addChunk(h.chunkName(n))),s(o)):(!1!==t.ssr&&(h.isReady&&h.isReady(n)||h.chunkName&&f.initialChunks[h.chunkName(n)])&&o.loadSync(),o)}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.getDerivedStateFromProps=function(e,t){var n=j(e);return a({},t,{cacheKey:n,loading:t.loading||t.cacheKey!==n})};var u=c.prototype;return u.componentDidMount=function(){this.mounted=!0;var e=this.getCache();e&&e.status===b&&this.setCache(),this.state.loading&&this.loadAsync()},u.componentDidUpdate=function(e,t){t.cacheKey!==this.state.cacheKey&&this.loadAsync()},u.componentWillUnmount=function(){this.mounted=!1},u.safeSetState=function(e,t){this.mounted&&this.setState(e,t)},u.getCacheKey=function(){return j(this.props)},u.getCache=function(){return g[this.getCacheKey()]},u.setCache=function(e){void 0===e&&(e=void 0),g[this.getCacheKey()]=e},u.triggerOnLoad=function(){var e=this;l&&setTimeout((function(){l(e.state.result,e.props)}))},u.loadSync=function(){if(this.state.loading)try{var e=w(h.requireSync(this.props),this.props,v);this.state.result=e,this.state.loading=!1}catch(t){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:h.resolve(this.props),chunkName:h.chunkName(this.props),error:t?t.message:t}),this.state.error=t}},u.loadAsync=function(){var e=this,t=this.resolveAsync();return t.then((function(t){var n=w(t,e.props,{Loadable:v});e.safeSetState({result:n,loading:!1},(function(){return e.triggerOnLoad()}))})).catch((function(t){return e.safeSetState({error:t,loading:!1})})),t},u.resolveAsync=function(){var e=this,t=this.props,n=(t.__chunkExtractor,t.forwardedRef,i(t,["__chunkExtractor","forwardedRef"])),o=this.getCache();return o||((o=h.requireAsync(n)).status=m,this.setCache(o),o.then((function(){o.status="RESOLVED"}),(function(t){console.error("loadable-components: failed to asynchronously load component",{fileName:h.resolve(e.props),chunkName:h.chunkName(e.props),error:t?t.message:t}),o.status=b}))),o},u.render=function(){var e=this.props,n=e.forwardedRef,r=e.fallback,s=(e.__chunkExtractor,i(e,["forwardedRef","fallback","__chunkExtractor"])),c=this.state,l=c.error,u=c.loading,d=c.result;if(t.suspense&&(this.getCache()||this.loadAsync()).status===m)throw this.loadAsync();if(l)throw l;var h=r||t.fallback||null;return u?h:o({fallback:h,result:d,options:t,props:a({},s,{ref:n})})},c}(r.a.Component),O=(_=y,function(e){return r.a.createElement(p.Consumer,null,(function(t){return r.a.createElement(_,Object.assign({__chunkExtractor:t},e))}))}),v=r.a.forwardRef((function(e,t){return r.a.createElement(O,Object.assign({forwardedRef:t},e))}));return v.preload=function(e){h.requireAsync(e)},v.load=function(e){return h.requireAsync(e)},v}return{loadable:h,lazy:function(e,t){return h(e,a({},t,{suspense:!0}))}}}var _=w({defaultResolveComponent:function(e){return e.__esModule?e.default:e.default||e},render:function(e){var t=e.result,n=e.props;return r.a.createElement(t,n)}}),y=_.loadable,O=_.lazy,v=w({onLoad:function(e,t){e&&t.forwardedRef&&("function"==typeof t.forwardedRef?t.forwardedRef(e):t.forwardedRef.current=e)},render:function(e){var t=e.result,n=e.props;return n.children?n.children(t):null}}),x=v.loadable,S=v.lazy,k="undefined"!=typeof window;function E(e,t){void 0===e&&(e=function(){});var n=(void 0===t?{}:t).namespace,o=void 0===n?"":n;if(!k)return h("`loadableReady()` must be called in browser only"),e(),Promise.resolve();var r=null;if(k){var i=g(o),a=document.getElementById(i);if(a){r=JSON.parse(a.textContent);var s=document.getElementById(i+"_ext");if(!s)throw new Error("loadable-component: @loadable/server does not match @loadable/component");JSON.parse(s.textContent).namedChunks.forEach((function(e){f.initialChunks[e]=!0}))}}if(!r)return h("`loadableReady()` requires state, please use `getScriptTags` or `getScriptElements` server-side"),e(),Promise.resolve();var c=!1;return new Promise((function(e){window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[];var t=window.__LOADABLE_LOADED_CHUNKS__,n=t.push.bind(t);function o(){r.every((function(e){return t.some((function(t){return t[0].indexOf(e)>-1}))}))&&(c||(c=!0,e()))}t.push=function(){n.apply(void 0,arguments),o()},o()})).then(e)}var C=y;C.lib=x,O.lib=S;t.a=C},MgzW:function(e,t,n){var o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(r){return!1}}()?Object.assign:function(e,t){for(var n,s,c=a(e),l=1;l<arguments.length;l++){for(var u in n=Object(arguments[l]))r.call(n,u)&&(c[u]=n[u]);if(o){s=o(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(c[s[d]]=n[s[d]])}}return c}},Ncr9:function(e,t,n){var o=n("TPPM"),r=n("XdLN"),i=n("28DW");t.a=e=>{Object(r.a)(e)||(e="/",Object(i.a)("url_reset")),Object(o.a)(e,!1)}},OadL:function(e,t,n){n.d(t,"r",(function(){return s})),n.d(t,"i",(function(){return c})),n.d(t,"a",(function(){return l})),n.d(t,"p",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"m",(function(){return h})),n.d(t,"l",(function(){return p})),n.d(t,"n",(function(){return g})),n.d(t,"d",(function(){return f})),n.d(t,"o",(function(){return m})),n.d(t,"k",(function(){return b})),n.d(t,"s",(function(){return j})),n.d(t,"q",(function(){return _})),n.d(t,"g",(function(){return y})),n.d(t,"b",(function(){return O})),n.d(t,"e",(function(){return v})),n.d(t,"c",(function(){return x})),n.d(t,"f",(function(){return S})),n.d(t,"h",(function(){return E})),n.d(t,"u",(function(){return C})),n.d(t,"t",(function(){return T}));var o=n("peh1");const r=e=>(t,n)=>t.feeds[((e,t)=>"string"==typeof e?e:e(t))(e,n)],i=e=>e.boards,a=e=>e.invites,s=e=>e.users,c=e=>e.users[e.session.userId]||null,l=e=>r(e),u=Object(o.createSelector)(e=>e.feeds,e=>Object.keys(e).filter(e=>e.includes("share-suggestions")).reduce((t,n)=>({...t,[n]:e[n]}),{})),d=Object(o.createSelector)(a,e=>Object.keys(e).reduce((t,n)=>{const o=n.split(":")[0],r=t[o]||{notPendingOwnerAction:[],pendingOwnerAction:[]};return e[n]&&"not_invited"!==e[n].status&&("pending_approval"===e[n].status?r.pendingOwnerAction.push(n):r.notPendingOwnerAction.push(n),t[o]=r),t},{})),h=Object(o.createSelector)(a,e=>Object.keys(e).reduce((t,n)=>{const o=n.split(":"),r=t[o[0]]||[];return e[n]&&"not_invited"!==e[n].status&&(r.push(n),t[o[0]]=r),t},{})),p=Object(o.createSelector)(a,e=>Object.keys(e).reduce((t,n)=>{const o=e[n];return t[n]=o,t},{})),g=Object(o.createSelector)(c,a,(e,t)=>Object.keys(t).reduce((n,o)=>{const r=o.split(":"),i=r[0],a=r[1],s=e.id===a,c=t[o]&&["new","contact_request_not_approved"].includes(t[o].status);return s&&c&&(n[i]=o),n},{})),f=Object(o.createSelector)(s,a,(e,t)=>Object.keys(t).reduce((n,o)=>{const r=t[o]||{};return n[o]=e[r.invited_by_user],n},{})),m=Object(o.createSelector)(r("notifications"),e=>e.notifications,(e=[],t)=>e.map(({id:e})=>t[e])),b=Object(o.createSelector)(e=>e.topics,e=>Object.keys(e).reduce((t,n)=>{const o=e[n];return t[o.slug]=o,t[n]=o,t},{})),j=Object(o.createSelector)(s,e=>Object.keys(e).reduce((t,n)=>{const o=e[n];return t[o.username]=o,t},{})),w=Object(o.createSelector)(c,i,(e,t)=>Object.keys(t).reduce((n,o)=>{const r=t[o];return!r.archived_by_me_at&&(r.owner===e.id||r.collaborating_users&&r.collaborating_users.includes(e.id))&&r.cover_images?n.concat([r]):n},[])),_=Object(o.createSelector)(w,e=>e.sort((e,t)=>e.name.localeCompare(t.name))),y=Object(o.createSelector)((e,t)=>e.users[t.user_id]||null,i,(e,t)=>Object.keys(t).reduce((n,o)=>{const r=t[o];return!r.archived_by_me_at&&e&&(r.owner===e.id||r.collaborating_users&&r.collaborating_users.includes(e.id))&&n.push(r),n},[])),O=(Object(o.createSelector)(s,r("suggested-creator-follows"),(e,t)=>t?t.filter(({id:t})=>{const n=e[t];return n&&n.explicitly_followed_by_me}):[]),Object(o.createSelector)(i,e=>Object.keys(e).reduce((t,n)=>{const o=e[n];return t[o.url]=o,o.oldSlugUrl&&(t[o.oldSlugUrl]=o),t},{}))),v=Object(o.createSelector)(e=>e.boardsections,e=>Object.keys(e).reduce((t,n)=>{const o=e[n];return t[`${o.board}_${o.slug}`]=o,t},{})),x=Object(o.createSelector)(s,(e,t)=>t,(e,t)=>t?[t.owner,...t.collaborating_users||[]].map(t=>e[t]).filter(Boolean):[]),S=l(({boardId:e})=>"board-sections:"+e),k=(l(({boardId:e})=>"board-collaborators:"+e),l(({pinId:e})=>"call-to-create-pins:"+e)),E=Object(o.createSelector)(e=>e.pins,k,(e=[],t=[])=>t.map(t=>e[t.id])),C=e=>e.experiences[40001]&&(40002===e.experiences[40001].experience_id||500450===e.experiences[40001].experience_id),T=e=>e.experiences[40001]&&500681===e.experiences[40001].experience_id},PaNI:function(e,t,n){n.d(t,"a",(function(){return h}));var o=n("/MKj"),r=n("hLPq"),i=n("28DW"),a=n("yweb"),s=n("isp9"),c=n("2oSX"),l=n("AGnR"),u=n("EC67"),d=n("nKUr");function h({alignIconLeft:e,bgColor:t,color:n,disableRedirect:h=!1,fallbackUrl:p,icon:g="arrow-back",onTouch:f,padding:m,placement:b,shouldUseFallbackUrl:j,size:w="lg",viewParameter:_,viewType:y}){const O=Object(a.c)(),v=Object(u.h)(),x=Object(u.i)(),S=Object(o.useSelector)(e=>e.session.isAuthenticated);return Object(d.jsx)(r.a,{accessibilityLabel:O._("Back","navigation button","navigation button"),bgColor:t,color:n,icon:g,onTouch:()=>{if(Object(c.d)({action:"back_button_click",placement:b,isAuthenticated:S}),y&&_&&Object(l.h)({view_type:y,view_parameter:_,element:34}),f&&f(),!h){const e=Object(s.b)(document.referrer);!e&&(!x.key||x.state&&"redirect"===x.state.referrer||j)&&p?v.replace(p):e?(Object(i.a)("unauth.backButton.sendToDuploNotAmp"),v.replace(e)):x.pathname.includes("/password/reset/")&&x.search&&x.search.includes("?nativeShouldDismiss=true")?v.push("/login/?dismissWebview=true"):v.goBack()}},padding:m||2,size:w,containerStyle:e?{display:"flex",alignItems:"center",marginLeft:"cancel"===g?"-4px":"-8px",width:"48px",height:"48px"}:{}})}},Q5BC:function(e,t,n){n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return x})),n.d(t,"a",(function(){return S}));var o=n("gxu6"),r=n("eOdZ"),i=n("lIBN"),a=n("QtD7"),s=n("ARZW"),c=n("jUT+"),l=n("GCVb"),u=n("sv3x"),d=n("qEYz"),h=n("2COb"),p=n("eyT9"),g=n("28DW"),f=n("A+Hl"),m=n("AYc3"),b=n("2y2F"),j=n("PmFr"),w=n("0G5S"),_=n("2oSX"),y=n("eNqV");const O=(e,t,n,o)=>({type:c.d,payload:{user:e,experiences:t,active:n,triggerable:o}}),v=(e,t,n="/",c={isAutologin:!1,isSwitchAccount:!1,noLocationReplace:!1,recaptchaV3Token:"default",noImmediateRedirect:!1,useAlternativeResourceCall:!1,trigger:"other",accountUnlinked:!1})=>async(p,g)=>{const{session:v}=g(),{country:x}=v,S=!v.isTablet&&!v.isMobile,{isAutologin:k,isSwitchAccount:E,noLocationReplace:C,recaptchaV3Token:T,noImmediateRedirect:P,useAlternativeResourceCall:L,trigger:A,accountUnlinked:R}=c,I=Object(f.c)(v.origin)&&!1;let B={get_user:!0,...e,app_type_from_client:v.appType||6,recaptchaV3Token:T};const F=Object(w.a)(j.h);F&&(B={...B,visited_pages_before_login:F});let U=I?Object(f.a)({referrer:v.referrer,facebook_id:v.facebookToken,...e,recaptchaV3Token:T}):r.d.create("UserSessionResource",B).callCreate();if(L&&e.username_or_email&&e.password){const t=new FormData;t.append("username",e.username_or_email),t.append("password",e.password);const n={method:"POST",body:t,credentials:"include",headers:{Accept:"application/json, text/javascript, */*","X-CSRFToken":Object(l.a)()||"","X-Requested-With":"XMLHttpRequest"}};U=fetch("/resource/UserSessionResource/create/",n).then(e=>{if(200!==e.status){const t=new Error(e.statusText);throw t.response=e,t}return e.json()}).catch(e=>Promise.reject(e))}try{const r=await U;p(O(r.resource_response.data.user,r.client_context.placed_experiences,r.client_context.active_experiments,r.client_context.triggerable_experiments)),Object(i.a)("authentication.login_success"),Object(_.e)({action:k?"autologin":"login",type:Object(u.d)(e),isCrossDomain:I,isMultipleAccounts:E,trigger:A});["enabled","employees"].includes(p(Object(a.a)("mweb_cctld_cookies_cleanup")))&&(o.c("fba"),o.c("logged_out")),Object(w.c)(j.e,1),"/"!==n&&Object(h.a)(!0),E?Object(y.j)().then(()=>{window.location.href="/"+r.resource_response.data.user.username+(R?"?message=unlink_successful":"")}):k&&!S||Object(d.b)({forceFullPageNavigation:S,history:t,next:n,noLocationReplace:C,noImmediateRedirect:P}),Object(b.a)(x)&&Object(m.g)({id:s.f,eventCategory:"Logins",eventName:"Mobile"}),Object(b.f)(x)&&Object(m.k)({id:"flashtalking-m-login",eventCategory:"Logins",eventName:"Mobile"}),Object(b.c)(x)&&Object(m.h)({pixelId:"dpm_pixel_login_event",eventCategory:"Logins",eventName:"Mobile"}),Object(b.d)(x)&&Object(m.i)({pixelId:"dentsu_pixel_login_event",eventCategory:"Logins",eventName:"Mobile"})}catch(N){if(1201!==N.apiErrorCode||k)throw Object(_.f)({action:k?"autologin":"login",type:Object(u.d)(e),error:N.message,isCrossDomain:I,isMultipleAccounts:E,trigger:A}),E&&Object(i.a)("authentication.login_error"),N;e.google_open_id_token&&(e.gplus_id_token=e.google_open_id_token),t&&t.push({pathname:"/login/mfa/",state:{creds:e,next:n}})}},x=(e={redirectToSwitchAccountsPage:!1})=>async(t,n)=>{const{session:a}=n(),s=!a.isTablet&&!a.isMobile;await r.d.create("UserSessionResource",{disable_auth_failure_redirect:!0}).callDelete(),Object(i.a)("logout.logout_success"),Object(g.k)("logout",{tags:{app:"web_mobile",reason:"user_initiated"}}),o.b("fba","True",720),Object(h.a)(!1),Object(w.b)(p.a),Object(w.b)(j.l),Object(w.b)(y.a),Object(w.b)(void 0),Object(w.b)("_epik_localstore_test"),await Object(y.j)();const{redirectToSwitchAccountsPage:c}=e;c?window.location.href="/switch_account/":s&&(window.location.href="/")},S=e=>t=>{t(O(e.resource_response.data.user,e.client_context.placed_experiences,e.client_context.active_experiments,e.client_context.triggerable_experiments))}},QCnb:function(e,t,n){e.exports=n("+wdc")},TOwV:function(e,t,n){e.exports=n("qT12")},YWST:function(e,t,n){n.d(t,"b",(function(){return i}));var o=n("q1tI");const r=Object(o.createContext)();function i(){return Object(o.useContext)(r)}t.a=r},"ki+g":function(e,t,n){n.d(t,"a",(function(){return l}));var o=n("/MKj"),r=n("bcHz"),i=n("yweb"),a=n("n6mq"),s=n("nKUr");const c="M11.969 17a4.983 4.983 0 0 1-2.047-.447l6.6-6.6c.281.626.447 1.316.447 2.047a5 5 0\n0 1-5 5m-5-5a5 5 0 0 1 5-5c.748 0 1.45.175 2.087.47l-6.617 6.617A4.944 4.944 0 0 1 6.969\n12m13.104-5.598l2.415-2.415a1.75 1.75 0 1 0-2.475-2.474l-3.014 3.013A12.646 12.646 0 0 0 12 3.5C6.455\n3.5 1.751 7.051 0 12a12.798 12.798 0 0 0 3.927 5.598l-2.414 2.415A1.748 1.748 0 0 0 2.75 23c.448 0 .896-.171\n1.238-.513l3.013-3.013A12.65 12.65 0 0 0 12 20.5c5.545 0 10.249-3.551 12-8.5a12.782 12.782 0 0 0-3.927-5.598\n";function l({color:e="gray",legoSettingsEnabled:t,paddingX:n=10,showPassword:l,togglePassword:u}){const d=Object(i.c)(),{isRTL:h}=Object(o.useSelector)(({session:e})=>e);return Object(s.jsx)(a.f,{left:h,right:!h,position:"absolute",paddingX:n,dangerouslySetInlineStyle:{__style:{right:t&&!h?4:void 0,top:t?24:12,transform:`translateY(${t?"-50%":"0"})`}},children:Object(s.jsx)(a.f,{display:"inlineBlock",children:t?Object(s.jsx)(a.x,{accessibilityLabel:l?d._("Show password","PasswordToggleEye.Label.Button.Toggle.Show.Password","Accessibility label for button that toggles showing the password"):d._("Hide password","PasswordToggleEye.Label.Button.Toggle.Hide.Password","Accessibility label for button that toggles hiding the password"),color:e,dangerouslySetSvgPath:l?{}:{__path:c},icon:l?"eye":void 0,inline:!0,size:"lg",onClick:u}):Object(s.jsx)(r.a,{onTouch:u,rounding:"circle",pressState:"none",children:l?Object(s.jsx)(a.w,{icon:"eye",color:"gray",inline:!0,accessibilityLabel:d._("Show password","Accessibility label for button that toggles showing the password","Accessibility label for button that toggles showing the password")}):Object(s.jsx)(a.w,{dangerouslySetSvgPath:{__path:c},color:"gray",inline:!0,accessibilityLabel:d._("Hide password","Accessibility label for button that toggles hiding the password","Accessibility label for button that toggles hiding the password")})})})})}},oAcf:function(e,t,n){var o=n("/MKj"),r=n("+zvl"),i=n("yweb"),a=n("EfoL"),s=n("EC67"),c=n("nKUr");t.a=function({pin:e}){const t=Object(i.c)(),n=Object(o.useSelector)(({session:e})=>e&&e.unauthSavePinId),l=Object(o.useSelector)(({pins:e})=>n&&e[n]),u=Object(s.i)();if(!e&&!n)return null;const d=u.pathname.startsWith("/signup");if(!u.pathname.startsWith("/login")&&!d)return null;if(l){const e=u.pathname.startsWith("/signup"),n={image:{url:Object(a.c)(l),height:1,width:1},pinDescription:l.description||"",dominantColor:l.dominant_color||"",bannerCopy:e?t._("Finish signing up to save this idea","mweb.unauth.save.flow.signup.banner","Sign up banner shown in signup page after user attempting to save the pin"):t._("Finish logging in to save this idea","mweb.unauth.save.flow.login.banner","Login banner shown in login page after user attempting to save the pin")};return Object(c.jsx)(r.a,{pin:n})}return e?Object(c.jsx)(r.a,{pin:e}):null}},peh1:function(e,t,n){function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function r(e,t){return e===t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?r:arguments[1],n=null,o=null;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return null!==n&&n.length===i.length&&i.every((function(e,o){return t(e,n[o])}))||(o=e.apply(void 0,i)),n=i,o}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var s=0,c=r.pop(),l=a(r),u=e.apply(void 0,[function(){return s++,c.apply(void 0,arguments)}].concat(n)),d=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var a=l.map((function(n){return n.apply(void 0,[e,t].concat(r))}));return u.apply(void 0,o(a))};return d.resultFunc=c,d.recomputations=function(){return s},d.resetRecomputations=function(){return s=0},d}}t.__esModule=!0,t.defaultMemoize=i,t.createSelectorCreator=s,t.createStructuredSelector=function(e){var t=arguments.length<=1||void 0===arguments[1]?c:arguments[1];if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.reduce((function(e,t,o){return e[n[o]]=t,e}),{})}))};var c=t.createSelector=s(i)},qEYz:function(e,t,n){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var o=n("7w6Q"),r=n("kmwA"),i=n("EC67");const a=["/resource/:name/:method/","/resource/commerce/:name/:method/","/:username/pins/follow/","/email/remove/","/about/trademark/form/:claim_type/","/about/copyright/dmca-pin/web-result/:id/","/about/copyright/dmca-pin/pin/:id/","/about/copyright/dmca-pin/","/suspension-appeal/submitted/","/website/confirm/","/oauth/","/settings/extension/uninstall/","/offsite/","/amp/(.*)"];var s=n("RNo4");const c=e=>e&&Object(s.i)(e)&&r.a.settings.PASSWORD_RESET_URL!==e?Object(s.k)(e).relative:"/",l=({forceFullPageNavigation:e,history:t,next:n,noLocationReplace:r,noImmediateRedirect:l=!1})=>{(e=>{const t=new URL(e,window.location.origin);return a.some(e=>!!Object(i.g)(t.pathname,{path:e,exact:!0}))})(n=Object(s.e)(n))||Object(s.g)(n)===s.a.TRUSTED_DIFFERENT_ORIGIN||!t||e?(e&&o.a.increment("webapp.duplo.navigateOnLogin.forceFullPageNavigation",1),window.location.assign(n)):l||(r?t.push(c(n)):t.replace(c(n)))}},qT12:function(e,t,n){var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,u=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,h=o?Symbol.for("react.concurrent_mode"):60111,p=o?Symbol.for("react.forward_ref"):60112,g=o?Symbol.for("react.suspense"):60113,f=o?Symbol.for("react.suspense_list"):60120,m=o?Symbol.for("react.memo"):60115,b=o?Symbol.for("react.lazy"):60116,j=o?Symbol.for("react.block"):60121,w=o?Symbol.for("react.fundamental"):60117,_=o?Symbol.for("react.responder"):60118,y=o?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case h:case a:case c:case s:case g:return e;default:switch(e=e&&e.$$typeof){case u:case p:case b:case m:case l:return e;default:return t}}case i:return t}}}function v(e){return O(e)===h}t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=b,t.Memo=m,t.Portal=i,t.Profiler=c,t.StrictMode=s,t.Suspense=g,t.isAsyncMode=function(e){return v(e)||O(e)===d},t.isConcurrentMode=v,t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return O(e)===p},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===b},t.isMemo=function(e){return O(e)===m},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===s},t.isSuspense=function(e){return O(e)===g},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===h||e===c||e===s||e===g||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===w||e.$$typeof===_||e.$$typeof===y||e.$$typeof===j)},t.typeOf=O},r36Y:function(e,t,n){e.exports=n("Copi")},sv3x:function(e,t,n){n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return w})),n.d(t,"c",(function(){return _}));var o=n("gxu6"),r=n("GI6b"),i=n("Jr++"),a=n("Ncr9"),s=n("eOdZ"),c=n("QLqj"),l=n("kmwA"),u=n("28DW"),d=n("AXUD"),h=n("VL22"),p=n("J8m7"),g=n("nKUr");const f=Object.freeze({SOFT_BANNED:0,RATE_LIMITED:1,LOGIN_ASSISTANCE:2,PASSWORD_RESET_SENT:3,PREVENT_FACEBOOK_REGISTER:4,PREVENT_GOOGLE_REGISTER:5,SUSPENDED:6}),m=[p.f,p.e,p.G,p.A,p.t,p.v,d.b],b=(p.p,p.q,p.z,p.o,p.A,[...m.filter(e=>e!==p.t&&e!==p.A),p.o,p.r]);class j{static defaultLoginRedirectUrl(){return window.location.pathname===l.a.settings.PASSWORD_RESET_URL||window.location.pathname===l.a.settings.LOGIN_URL||window.location.pathname.startsWith(l.a.settings.ADD_SECONDARY_ACCOUNT_PAGE)?"/":window.location.pathname+window.location.search}static defaultSocialLoginRedirectUrl(){return window.location.pathname.startsWith(l.a.settings.ADD_SECONDARY_ACCOUNT_PAGE)?"/":window.location.pathname}static isExceedRecaptchaLocalLimit(){const e=c.b.localStorage.getItem("urh");if(e&&e.indexOf("|")>-1){const t=e.split("|");return 3===t.length&&(new Date).getTime()/1e3-parseInt(t[0],10)<=3600}return!1}static updateRecaptchaTimeStamp(){const e=c.b.localStorage.getItem("urh");let t=[];e&&(t=e.split("|"),3===t.length&&t.shift());const n=((new Date).getTime()/1e3).toString();t.push(n);const o=t.join("|");c.b.localStorage.setItem("urh",o)}static isFullyLoggedIn(e,t){return e&&1===t}static handleRedirect(e){if(!e){e="/";const t=Object(i.a)();if(t){const n=t.next;n&&(e=n,delete t.next),e=Object(r.a)(e,t)}}Object(a.a)(e)}static handleRedirectWithFallbackWindowLocation(){this.handleRedirect(this.defaultLoginRedirectUrl())}static handleSignupRedirect(e,t){c.b.localStorage.setItem("signupTime",Date.now()),!t&&e&&"/"!==e?j.handleRedirect(e):j.handleRedirect("/")}static storeLoginCredentialsToBrowser(e){if(navigator.credentials&&e.username_or_email)try{const t=new window.PasswordCredential({id:e.username_or_email,password:e.password});navigator.credentials.store(t).then(()=>{Object(u.a)("navigatorCredentials.store.success")})}catch(t){Object(u.a)("navigatorCredentials.store.error")}}static retrieveLoginCredentialsFromBrowser(){const e=window.navigator.credentials;if(!e)return new Promise((e,t)=>{t()});return e.get({password:!0,mediation:"silent"})}static attemptLoginWithBrowserCredentials(e,t,n){if(!e)return new Promise((e,t)=>{t("No credentials")});let o,r;e.password?(r="include",o=new FormData,o.append("username",e.id),o.append("password",e.password)):r=e;return fetch("/resource/UserSessionResource/create/",{method:"POST",body:o,credentials:r,headers:{Accept:"application/json, text/javascript, */*","X-CSRFToken":t||"","X-Pinterest-AppState":n,"X-Requested-With":"XMLHttpRequest"}}).then(e=>{if(200!==e.status){const t=new Error(e.statusText);throw t.response=e,t}return Object(u.a)("navigatorCredentials.login.success"),e.json()}).catch(e=>(Object(u.a)("navigatorCredentials.login.failure"),Promise.reject(e)))}static fetchRecentlyLoggedOutUser(e){if(e)return Promise.reject();const t=s.d.create("UnauthUserDataResource");return new Promise((e,n)=>{t.callGet().then(t=>{const r=t.resource_response.data,i=!!o.a("logged_out");return r?(r.connected_to_facebook||r.connected_to_google||r.has_password||Object(u.a)("unauth.personalized_login.no_login_methods_found"),Object(u.a)("unauth.personalized_login.fetch_user_info.info.user_info_found.logged_out_cookie_"+(i?"true":"false")),e(r)):(Object(u.a)("unauth.personalized_login.fetch_user_info.info.no_user_info.logged_out_cookie_"+(i?"true":"false")),n({}))}).catch(e=>{if(e.message){const t=e.message.replace(/\s/g,"_").toLowerCase();Object(u.a)("unauth.personalized_login.fetch_user_info.error."+t)}else Object(u.a)("unauth.personalized_login.fetch_user_info.error.unknown");return n(e)})})}static handleLoginMfa(e,t,n){Object(u.a)("multi_step_login"),j.storeLoginCredentialsToBrowser(e),n?n(e,t):Object(u.a)("unauth.login.error.CLIENT_ERROR.null_mfa_handler")}static getLoginErrorState(e,t,n,o,r){let i=null;const a=e.http_status||e.httpStatus;let s,c=e.api_error_code||e.apiErrorCode;if(a===d.b&&(c=d.b),s=b.includes(c)?Object(g.jsx)(o,{api_error_code:c,errorMessage:e.message,handleTouch:()=>r(f.PASSWORD_RESET_SENT),source:t,userSearch:n}):e.message,s)switch(c){case p.o:case p.t:i={passwordValidationError:s};break;case p.p:i={facebookValidationError:s};break;case p.q:i={googleValidationError:s};break;case p.n:i={emailValidationError:s};break;case p.j:i={passwordValidationError:s};break;default:i={emailValidationError:s}}else Object(u.a)(`unauth.login.error.SERVER_ERROR.unknown.${c}.${t}`);return i}}function w(e){return e.facebook_id?h.a.FACEBOOK:e.google_open_id_token?h.a.GOOGLE_ONE_TAP:e.gplus_id_token?h.a.GOOGLE:e.line_id_token?h.a.LINE:e.username_or_email?h.a.EMAIL:h.a.OTHER}function _(e){return e.mfa_token?"mfa_token":e.mfa_resend?"mfa_resend":w(e)}t.b=j},u0Kf:function(e,t,n){n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c}));var o=n("jC6u"),r=n("RNo4"),i=n("GCVb");let a;const s=e=>a=e,c=e=>Object(o.a)(e,{csrf:{isRequired:i.b,errorIfMissing:!0,getToken:i.a},getAppVersion:()=>a.getState().session.appVersion,appendQuery:r.b,buildQuery:r.c});t.b=e=>c(e).promise},vH2r:function(e,t,n){n.d(t,"a",(function(){return f}));var o=n("/MKj");const r="gmail.com",i="yahoo.com",a="hotmail.com",s="icloud.com",c={AR:[r,a,"yahoo.com.ar"],AU:[r,a,"bigpond.com"],BR:[r,a,"yahoo.com.br"],CA:[r,a,i],DE:[r,"web.de","gmx.de"],ES:[r,a,"hotmail.es"],FR:[r,"hotmail.fr","orange.fr"],GB:[r,"hotmail.co.uk","hotmail.com"],IN:[r,i,"rediffmail.com"],IT:[r,"libero.it","hotmail.it"],JP:[r,"yahoo.co.jp","ezweb.ne.jp"],MX:[r,a,"outlook.com"],US:[r,a,i],KR:[r,"naver.com","hanmail.net","nate.com","daum.net"],ID:[r,i,"yahoo.co.id","ymail.com","rocketmail.com"],PH:[r,i,"yahoo.com.ph",s,"ymail.com"],TH:[r,a,"hotmail.co.th",i,s],VN:[r,i,"yahoo.com.vn",s,a],DEFAULT:[r,a,i]};function l(e){return e&&e.toUpperCase()in c?c[e.toUpperCase()]:c.DEFAULT}var u=n("bcHz"),d=n("QtD7"),h=n("n6mq"),p=n("nKUr");const g={border:"1px solid rgb(181, 181, 181)",zIndex:1};function f({direction:e,email:t,emailFieldElement:n,handleEmailSuggestionClick:r,showUsername:i}){const a=Object(o.useSelector)(({session:e})=>e.country),s=Object(o.useDispatch)();let c=l(a);["ID","KR","TH","PH","VN"].includes(a)&&(c=((e=>s(Object(d.a)("mweb_unauth_email_suggestion_"+e.toLowerCase())))(a)||"").startsWith("enabled")?l(a):l()),"top"===e&&(c=[...c].reverse());let f=window.innerWidth-32;const m=n;m&&(f=m.getBoundingClientRect().width);let b=g;if("top"===e){const e=m?m.offsetTop-105:200;b={...g,top:e}}else{const e=m?m.offsetTop+40:248;b={...g,top:e}}return Object(p.jsx)(h.f,{color:"white",dangerouslySetInlineStyle:{__style:b},direction:"column",display:"flex",position:"absolute",top:"top"===e,width:f,children:c.map(e=>{const n=i?t.concat(e):e;return Object(p.jsx)(h.f,{children:Object(p.jsx)("div",{role:"button",onMouseDown:()=>{r(t.concat(e))},tabIndex:0,children:Object(p.jsx)(u.a,{pressState:"none",children:Object(p.jsx)(h.f,{paddingX:3,paddingY:2,children:Object(p.jsx)(h.cb,{children:n})})})})},n)})})}},y6dK:function(e,t,n){var o=n("q1tI"),r=n("vH2r"),i=n("Lr1Z"),a=n("ki+g"),s=n("AGnR"),c=n("28DW"),l=n("yweb"),u=n("n6mq"),d=n("nKUr");function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends o.PureComponent{constructor(...e){super(...e),h(this,"state",{emailFieldElement:null,shouldShowEmailSuggestion:!1,showPassword:!1}),h(this,"handleChangeEmail",({value:e})=>{const{handleChangeEmail:t}=this.props;if(this.state.shouldShowEmailSuggestion)this.setState({shouldShowEmailSuggestion:!1});else if(e.endsWith("@")){const e=this.emailInputRef;this.setState({shouldShowEmailSuggestion:!0,emailFieldElement:e})}t&&t({value:e})}),h(this,"handlePasswordFocus",()=>{Object(c.h)("focus_password")}),h(this,"handleEmailSuggestionClick",e=>{Object(c.a)("mweb_unauth_email_suggestions.login_page.tap"),this.setState({shouldShowEmailSuggestion:!1}),this.handleChangeEmail({value:e})}),h(this,"validateEmailOnBlur",()=>{const{validateEmailOnBlur:e}=this.props;!this.state.shouldShowEmailSuggestion&&e&&e()}),h(this,"passwordReset",e=>{Object(c.h)("click_forget_password"),this.props.handlePasswordReset&&this.props.handlePasswordReset(e)}),h(this,"handleLoginClick",()=>{Object(c.h)("press_login_continue"),this.props.onLoginClick&&this.props.onLoginClick()}),h(this,"togglePassword",()=>{const{showPassword:e}=this.state;Object(s.e)({event_type:e?107:106,view_type:9,element:129}),this.setState({showPassword:!e}),Object(c.h)("click_show_password")}),h(this,"handleSignupClick",()=>{const{onSignUpClick:e}=this.props;e&&e()})}render(){const{email:e,handleChangePassword:t,hideEmailField:n,hideLoginBtn:s,hidePasswordField:c,passwordValidationError:l,emailValidationError:h,validateEmailOnBlur:p,validatePasswordOnBlur:g,isSIWAError:f,isValid:m,onSubmit:b,password:j,shouldShowSignUpButton:w,showEmailAsText:_}=this.props,{emailFieldElement:y,shouldShowEmailSuggestion:O,showPassword:v}=this.state,x=f&&l;return Object(d.jsx)(u.f,{marginTop:3,marginBottom:3,children:Object(d.jsxs)("form",{onSubmit:b,autoCapitalize:"none",autoCorrect:"off",children:[!n&&_&&Object(d.jsx)(u.f,{marginBottom:5,children:Object(d.jsx)(u.cb,{align:"center",children:e})}),!n&&!_&&Object(d.jsxs)(o.Fragment,{children:[O?Object(d.jsx)(r.a,{direction:"down",email:e,emailFieldElement:y,handleEmailSuggestionClick:this.handleEmailSuggestionClick,showUsername:!0}):null,Object(d.jsx)(u.f,{marginTop:1,children:Object(d.jsx)(u.eb,{errorMessage:h,id:"email",onBlur:p,onChange:this.handleChangeEmail,placeholder:this.props.i18n._("Email","Prompt for user to enter in email on the mobile web login page","Prompt for user to enter in email on the mobile web login page"),ref:e=>{this.emailInputRef=e},size:"lg",type:"email",value:e})})]}),c?null:Object(d.jsxs)(u.f,{children:[Object(d.jsxs)(u.f,{marginTop:2,position:"relative",children:[Object(d.jsx)(u.eb,{autoComplete:"on",errorMessage:l,id:"password",onBlur:g,onChange:t,onFocus:this.handlePasswordFocus,placeholder:this.props.i18n._("Password","Prompt for user to enter in password on the mobile web login page","Prompt for user to enter in password on the mobile web login page"),size:"lg",type:v?"text":"password",value:j}),Object(d.jsx)(a.a,{togglePassword:this.togglePassword,showPassword:v})]}),Object(d.jsx)(u.f,{marginTop:2,"data-test-id":"reset-password",children:Object(d.jsx)(i.a,{to:"/password/reset",pressState:"background",onTouch:this.passwordReset,children:Object(d.jsx)(u.cb,{size:"sm",inline:!0,weight:"bold",children:x?this.props.i18n._("Reset your password","Heading displayed when email is entered on the password reset page","Heading displayed when email is entered on the password reset page"):this.props.i18n._("Forgot your password?","Link to the password reset page","Link to the password reset page")})})})]}),w&&Object(d.jsx)(u.f,{marginTop:3,children:Object(d.jsx)(u.g,{fullWidth:!0,color:"red",type:"submit",text:this.props.i18n._("Sign up with this email","Label for sign up button","Label for sign up button"),onClick:this.handleSignupClick})}),!s&&Object(d.jsx)(u.f,{marginTop:4,children:Object(d.jsx)(u.g,{fullWidth:!0,color:"red",type:"submit",text:this.props.i18n._("Log in","Label for log in button","Label for log in button"),disabled:!m||w,onClick:this.handleLoginClick},!m||w?"disabled":"enabled")})]})})}}t.a=function(e){const t=Object(l.c)();return Object(d.jsx)(p,{...e,i18n:t})}},yeqU:function(e,t,n){var o=n("Lr1Z"),r=n("yweb"),i=n("28DW"),a=n("n6mq"),s=n("nKUr");t.a=({marginTop:e=4,marginBottom:t=0})=>{const n=Object(r.c)();return Object(s.jsxs)(a.f,{display:"flex",justifyContent:"center",alignItems:"baseline",marginTop:e,marginBottom:t,children:[Object(s.jsx)(a.f,{display:"flex",marginEnd:1,justifyContent:"center",children:Object(s.jsx)(a.cb,{align:"center",inline:!0,children:n._("Are you a business?","Prompt for business signup","Prompt for business signup")})}),Object(s.jsx)(a.f,{display:"flex",justifyContent:"center","data-test-id":"create-business",children:Object(s.jsx)(o.a,{inline:!0,newTab:!0,to:"/business/create",pressState:"background",onTouch:()=>Object(i.h)("click_business_signup"),children:Object(s.jsx)(a.cb,{align:"center",weight:"bold",children:n._("Get started here!","Prompt for signing up","Prompt for signing up")})})})]})}}},[["38yB","runtime","vendor-react",0,5,6,7,8,16,17,18,19,35,39,40,62,69]]]);
//# sourceMappingURL=https://sm.pinimg.com/webapp/www/login-mobile-a67d2a0c43fccf53768a.mjs.map