53f7ceb70644234a865037ca0b4f7eb562be0104452d65d092b6aad2589cadc4

Source Code:

__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),r(d[0]),r(d[1]),r(d[2]);var n=r(d[3])(2449),t=(function(t){function o(n){var o;return o=t.call(this,n)||this,o.$FBSignupPage3=function(n){o.props.igAccount||o.setState({earlyError:a(d[5]).ERROR_FB_COULDNT_LOAD_INFO})},o.$FBSignupPage5=function(){o.props.history.push(r(d[6]).SIGNUP_PATH),r(d[7]).logAction_DEPRECATED('emailOrPhoneTakenNewAccount',o.getExtraDataForLogger())},o.$FBSignupPage6=function(){o.props.history.push(r(d[6]).SIGNUP_PATH),r(d[7]).logAction_DEPRECATED('emailTakenNewAccount',o.getExtraDataForLogger())},o.$FBSignupPage7=function(){o.props.history.push(r(d[8]).buildLoginLink('',{source:'fb_email_taken'})),r(d[7]).logAction_DEPRECATED('emailTakenLogIn',o.getExtraDataForLogger())},o.$FBSignupPage8=function(){o.props.history.push('/')},o.$FBSignupPage9=function(n){},o.$FBSignupPage1=null,o.$FBSignupPage2=null,o.state={earlyError:n.oAuthResponse.success?void 0:a(d[5]).ERROR_SIGNUP_UNKNOWN},o}i(d[4])(o,t);var s=o.prototype;return s.getExtraDataForLogger=function(){return{type:'fb',platform:r(d[9]).getAppPlatform(),source:i(d[10]).fbSignupPage}},s.componentDidMount=function(){var n=this;window.history.replaceState&&window.history.replaceState({},'',r(d[6]).SIGNUP_PATH),this.$FBSignupPage4=!0;var t=1,o=setInterval(function(){t-- >0?i(d[11]).reloadSDK():(clearInterval(o),r(d[7]).logAction_DEPRECATED('signupFBConnectFailed',n.getExtraDataForLogger()),r(d[12]).logLoggedOutCtaEvent({ctaType:'fb_signup_page',ctaVersion:'',eventName:'fb_connect_failed'}),n.$FBSignupPage3())},5e3);i(d[11]).sdkReady(function(){return clearInterval(o)}),r(d[9]).isLoggedIn()?this.props.oAuthResponse.accessToken&&!0===i(d[13])._("127","1")?this.props.onLinkAccountToFB(this.props.oAuthResponse):(i(d[14])('fb oauth token is missing'),this.props.history.push('/')):this.props.onLoadFBSignupOAuthLandingPage(this.props.oAuthResponse)},s.componentDidUpdate=function(n,t){this.$FBSignupPage1&&!this.isFormVisible(n)&&this.$FBSignupPage1.focusUsername()},s.componentWillUnmount=function(){this.$FBSignupPage4=!1},s.isFormVisible=function(n){return null===n.igAccount&&null!=n.fbPictureUrl&&(null!=n.emailTaken||null!=n.phoneTaken)&&null!==n.usernameSuggestions&&void 0!==n.usernameSuggestions},s.renderProfilePic=function(n){return a(d[15]).createElement("div",{className:"BdFXH",key:"profile_pic"},a(d[15]).createElement("img",{alt:r(d[3])(2364),className:"ulnoR",src:n}))},s.renderSpinner=function(){return a(d[15]).createElement("div",{className:"_ltf8",key:"spinner"},a(d[15]).createElement(r(d[16]).Spinner,{position:"absolute",size:"medium"}))},s.renderEarlyError=function(n){return a(d[15]).createElement("div",{className:"rYEZO"},a(d[15]).createElement("h3",{className:"XYpqs"},n),a(d[15]).createElement(r(d[16]).Button,{color:"ig-secondary-button",dangerouslySetClassName:{__className:"so3gD"},onClick:this.$FBSignupPage8},r(d[3])(1198)))},s.renderNewEmailOrPhoneTakenLoginFlow=function(n){return a(d[15]).createElement("div",{className:"Jen1-"},a(d[15]).createElement("div",{className:"C9bKC"},a(d[15]).createElement("p",null,a(d[15]).createElement(a(d[5]).NewGuideEmailOrPhoneTakenBody,{fbEmailOrPhone:n})),a(d[15]).createElement("p",null,a(d[5]).NEW_GUIDE_EMAIL_OR_PHONE_TAKEN_LOGIN_HEADER)),a(d[15]).createElement(i(d[17]),{errorMessage:this.props.loginError,fbConnectStatus:this.props.fbConnectStatus,hideFBLogin:!0,isFBLoggedIn:!1,nextUrl:this.props.nextUrl,onLoginWithFBClick:i(d[18]),onSubmit:this.props.onLogin,optLinkAccounts:!0,requestInFlight:this.props.requestInFlight,usernameHint:n}),a(d[15]).createElement(i(d[19]),{className:"_04B0S"}),a(d[15]).createElement(r(d[16]).Button,{borderless:!0,onClick:this.$FBSignupPage5},a(d[5]).GUIDE_CREATE_ACCOUNT_BUTTON_TEXT))},s.needEmailOrPhone=function(){var n=this.props,t=n.emailTaken,o=n.fbEmail,s=n.fbPhone,l=n.phoneTaken;return!(o&&!t)&&!(!o&&s&&!l)},s.renderTwoFactorChallenge=function(){return a(d[15]).createElement(i(d[20]),{pageIdentifier:i(d[10]).fbSignupPage,requestInFlight:this.props.requestInFlight})},s.render=function(){var t,o=this,s=!0,l=!0;if(this.state.earlyError)t=this.renderEarlyError(this.state.earlyError);else if(this.props.fbProfileError&&!this.props.igAccount)t=this.renderEarlyError(a(d[5]).ERROR_FB_COULDNT_LOAD_INFO);else if(this.props.emailTaken&&this.props.fbEmail)t=this.renderNewEmailOrPhoneTakenLoginFlow(i(d[21])(this.props.fbEmail));else if(this.props.phoneTaken&&this.props.fbPhone)t=this.renderNewEmailOrPhoneTakenLoginFlow(i(d[21])(this.props.fbPhone));else if(this.props.hasTwoFactorChallenge)t=this.renderTwoFactorChallenge();else if(this.isFormVisible(this.props)){var u=this.props,p=u.fbName,c=u.fbPictureUrl;c&&p||i(d[22])(0),this.props.fbEmail||this.props.fbPhone||i(d[22])(0),r(d[23]).getHasSkipFBSignupForm()?(s=l=!1,t=a(d[15]).createElement("div",null,a(d[15]).createElement(i(d[24]),{onSignup:this.$FBSignupPage9,requestInFlight:this.props.requestInFlight,signupResult:this.props.signupResult,usernameSuggestions:this.props.usernameSuggestions||[]}))):t=[this.renderProfilePic(c),a(d[15]).createElement(i(d[25]),{canUsePhone:!1,className:"c3Opt",errorNonce:this.props.errorNonce,fbConnectedStatus:this.props.fbConnectStatus,fbUserID:this.props.fbUserID,gdprRequired:!1,hideFBOption:!0,hideHeader:!0,initialFullName:p,key:"form",needEmailOrPhone:this.needEmailOrPhone(),needPassword:!0,onSignupFocusChange:this.props.onFocusChange,onSubmit:this.props.onSignupWithFB,pageIdentifier:i(d[10]).fbSignupPage,ref:function(n){return o.$FBSignupPage1=n},requestInFlight:this.props.requestInFlight,requireUsername:!0,signupResult:this.props.signupResult,usernameSuggestions:this.props.usernameSuggestions||[]})]}else s=!1,t=this.renderSpinner();return a(d[15]).createElement("div",{className:"_lTir",style:{justifyContent:l?'center':''}},a(d[15]).createElement(i(d[26]),null),a(d[15]).createElement(i(d[27]),null),a(d[15]).createElement(i(d[28]),{id:i(d[10]).fbSignupPage,title:n}),a(d[15]).createElement("div",{className:"_0r0cu"},s&&a(d[15]).createElement("div",{className:"w8Ejx"},a(d[15]).createElement(i(d[29]),{className:"Szr5J t98Id "+(this.props.isSmallWidth?"":"coreSpriteLoggedOutWordmark")+" "+(this.props.isSmallWidth?"coreSpriteMobileNavTypeLogo":""),href:"/"},r(d[3])(1933))),this.props.hasTwoFactorChallenge&&a(d[15]).createElement("h1",{className:"Szr5J SIUqf coreSpriteLock"}),t))},o})(a(d[15]).Component),o=r(d[33]).withRouter(r(d[34]).connect(function(n){var t,o,s,l,u,p,c,h,f,E,v,P,F=n.auth,S=n.fb,b=n.signup,N=n.twoFactor,_=(null===b||void 0===b?void 0:b.requestInFlight)||(null===N||void 0===N?void 0:N.requestInFlight)||(null===F||void 0===F?void 0:null===(t=F.login)||void 0===t?void 0:t.requestInFlight)||!1;return{emailTaken:null===b||void 0===b?void 0:b.fbEmailTaken,errorNonce:(null===b||void 0===b?void 0:b.submissionCount)||0,fbConnectStatus:S.status,fbEmail:null===b||void 0===b?void 0:null===(o=b.fbProfile)||void 0===o?void 0:null===(s=o.result)||void 0===s?void 0:s.email,fbName:null===b||void 0===b?void 0:null===(l=b.fbProfile)||void 0===l?void 0:null===(u=l.result)||void 0===u?void 0:u.name,fbPhone:null===b||void 0===b?void 0:null===(p=b.fbProfile)||void 0===p?void 0:null===(c=p.result)||void 0===c?void 0:c.phone,fbPictureUrl:null===b||void 0===b?void 0:null===(h=b.fbProfile)||void 0===h?void 0:null===(f=h.result)||void 0===f?void 0:f.profilePictureUrl,fbProfileError:null===b||void 0===b?void 0:null===(E=b.fbProfile)||void 0===E?void 0:E.error,fbUserID:Number(null===S||void 0===S?void 0:null===(v=S.authResponse)||void 0===v?void 0:v.userID),igAccount:(null===S||void 0===S?void 0:S.igProfile)||null,isSmallWidth:n.displayProperties.viewportWidth<640,loginError:null===F||void 0===F?void 0:null===(P=F.login)||void 0===P?void 0:P.errorMessage,phoneTaken:null===b||void 0===b?void 0:b.fbPhoneTaken,requestInFlight:_,signupResult:null===b||void 0===b?void 0:b.signupResult,hasTwoFactorChallenge:!!N,usernameSuggestions:null===b||void 0===b?void 0:b.usernameSuggestions,nextUrl:F.next}},function(n){return{onLinkAccountToFB:function(t){var o=t.accessToken,s=t.returnURL;n(r(d[30]).linkAccountToFB(o,s))},onLogin:function(t,o,s){n(r(d[31]).login(t,o,{source:i(d[10]).fbSignupPage,optIntoLinkedAccounts:s}))},onLoadFBSignupOAuthLandingPage:function(t){n(r(d[32]).loadFBSignupOAuthLandingPage(t))},onFocusChange:function(t,o){n(r(d[32]).changeFBSignupFormFocus(t,o))},onSignupWithFB:function(t){n(r(d[32]).signupWithFB(t,i(d[10]).fbSignupPage))}}})(t));e.default=o,e.PAGE_ID=i(d[10]).fbSignupPage},13172736,[9699330,9699329,13172737,9699332,9699333,11403268,9895952,10027060,9699351,9699342,9699344,13172738,13172739,9961492,9895942,3,9895945,13172740,10027076,13172741,13172742,9699336,9502828,12189712,13172743,13172744,10027401,10027400,9699343,9699337,13172745,11599875,13172746,6,5]);
__d(function() {},13172737,[]);
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),r(d[0]);var t=(function(t){function s(){for(var s,n,u=arguments.length,o=new Array(u),l=0;l<u;l++)o[l]=arguments[l];return n=t.call.apply(t,[this].concat(o))||this,n.state={username:null===(s=n.props.usernameSuggestions)||void 0===s?void 0:s[0],submitted:!1},n.$SuggestedUsernameFormWithCTA1=function(t){n.setState({username:t})},n.$SuggestedUsernameFormWithCTA2=function(){n.setState({submitted:!0}),n.props.onSignup(i(d[2])(n.state.username))},n}i(d[1])(s,t);return s.prototype.render=function(){return a(d[3]).createElement("div",{className:"Zk2OF"},a(d[3]).createElement(i(d[4]),{username:this.state.username,usernameSuggestions:this.props.usernameSuggestions,onChangeUsername:this.$SuggestedUsernameFormWithCTA1,signupResult:this.props.signupResult,submitted:this.state.submitted}),a(d[3]).createElement("div",{className:"Ke5GQ"},a(d[3]).createElement(r(d[5]).Button,{large:!0,disabled:null==this.state.username||''===this.state.username||this.props.requestInFlight,onClick:this.$SuggestedUsernameFormWithCTA2},r(d[6]).SIGN_UP_BUTTON_TEXT),!0===this.props.requestInFlight&&a(d[3]).createElement(r(d[5]).Spinner,{position:"absolute"})),a(d[3]).createElement(i(d[7]),{className:"Crb2D"}))},s})(a(d[3]).Component);e.default=t},13172743,[13172747,9699333,9699336,3,13172748,9895945,11403268,13172749]);
__d(function() {},13172747,[]);
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),r(d[0]);var t=(function(t){function s(){for(var s,n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return s=t.call.apply(t,[this].concat(o))||this,s.state={showCreateUsername:!s.props.usernameSuggestions.length,createUsernameTitle:r(d[2]).USERNAME_HEADER},s.$SuggestedUsernameForm1=function(){s.setState({showCreateUsername:!0,createUsernameTitle:r(d[2]).USERNAME_CHANGE}),s.props.onClickChangeUsernameButton&&s.props.onClickChangeUsernameButton()},s}i(d[1])(s,t);var n=s.prototype;return n.$SuggestedUsernameForm2=function(){return a(d[3]).createElement("div",{className:"g5v8P"},a(d[3]).createElement("div",{className:"RvNuJ"},a(d[3]).createElement("h1",{className:"faK9P"},r(d[4])(383,{username:this.props.username})),a(d[3]).createElement("h2",{className:"dDOx_"},r(d[2]).USERNAME_PAGE_CONTEXT),a(d[3]).createElement(r(d[5]).Button,{borderless:!0,dangerouslySetClassName:{__className:"_4aHaa"},onClick:this.$SuggestedUsernameForm1},r(d[2]).USERNAME_CHANGE)))},n.render=function(){return this.state.showCreateUsername?a(d[3]).createElement(i(d[6]),{onChangeUsername:this.props.onChangeUsername,signupResult:this.props.signupResult,submitted:this.props.submitted,title:this.state.createUsernameTitle,username:this.props.username,usernameSuggestions:this.props.usernameSuggestions}):this.$SuggestedUsernameForm2()},s})(a(d[3]).Component);e.default=t},13172748,[13172750,9699333,11403268,3,9699332,9895945,13172751]);
__d(function() {},13172750,[]);
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),r(d[0]);var n=(function(n){function t(){for(var t,s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return t=n.call.apply(n,[this].concat(o))||this,t.$CreateUsernameForm2=function(n){t.props.onChangeUsername(n.target.value,'change')},t.$CreateUsernameForm3=function(n){var s=t.props.usernameSuggestions.indexOf(t.props.username);t.props.onChangeUsername(t.props.usernameSuggestions[++s]||t.props.usernameSuggestions[0],'refresh')},t.$CreateUsernameForm4=function(n){return null!=n&&''!==n&&!0===t.props.submitted},t}i(d[1])(t,n);var s=t.prototype;return s.componentDidMount=function(){this.$CreateUsernameForm1&&this.$CreateUsernameForm1.focus()},s.$CreateUsernameForm5=function(){var n=this,t=this.props.signupResult,s=this.props.usernameSuggestions.length>0,o=r(d[2]).getErrorFromSignupResult('username',t);return a(d[3]).createElement(i(d[4]),{"aria-describedby":null!=o&&''!==o?"ssfErrorAlert":'',"aria-label":r(d[5]).USERNAME,"aria-required":"true",autoCapitalize:"off",autoCorrect:"off",accepted:r(d[2]).isAccepted('username',t),canRefresh:s,errorMessage:o,hasError:this.$CreateUsernameForm4(o),maxLength:30,name:"username",onChange:this.$CreateUsernameForm2,onRefresh:this.$CreateUsernameForm3,placeholder:r(d[5]).USERNAME,ref:function(t){return n.$CreateUsernameForm1=t},showInlineError:void 0!==t,value:this.props.username})},s.render=function(){return a(d[3]).createElement("div",{className:"UpOfB"},a(d[3]).createElement("h1",{className:"v274n"},this.props.title),a(d[3]).createElement("h2",{className:"c-oY4"},this.props.usernameSuggestions.length>0?r(d[5]).USERNAME_SUBTEXT:r(d[5]).USERNAME_SUBTEXT_NO_SUGGESTION),a(d[3]).createElement("form",{method:"POST"},a(d[3]).createElement("div",{className:"q0eZm"},this.$CreateUsernameForm5())))},t})(a(d[3]).Component);e.default=n},13172751,[13172752,9699333,13172753,3,11403267,11403268]);
__d(function() {},13172752,[]);