PageSourceSearch

https://cdn1.affirm.com/assets/product_flows/master/PhoneChangeEmailPin-9d38e13104201831bc4d.js

js affirm.com collected 2026-09-24 08:27:02 UTC 31,047 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkUniqueName_product_flows=globalThis.webpackChunkUniqueName_product_flows||[]).push([[7258,8436],{38990:(e,t,n)=>{n.d(t,{Z:()=>f,i:()=>m});var r=n(43369),o=n(8207),a=n(68438),i=n(99669),s=n(67294);function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t=c(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}const m=e=>({required:e,validate:t=>{const n=t.split("@"),r=n[n.length-1];return Boolean(i.CU.test(t)&&!a.BAD_EMAIL_DOMAINS.includes(r))||e}});let d=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=u(this,t,[e])).state={email:e.initialEmail||"",error:""},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(o=[{key:"setError",value:function(e){this.setState({error:e})}},{key:"setEmail",value:function(e){this.setState({email:e})}},{key:"validate",value:function(){const e=this.props.intl.formatMessage({id:"productFlows.components.common.emailField.invalidEmailAddress.error.text"}),{errorMessage:t=e}=this.props,{email:n}=this.state,r=!0===m(t).validate(n);return r||this.setError(t),{values:r?{email:n}:{},isValid:r}}},{key:"render",value:function(){const{error:e,email:t}=this.state,{formName:n="",label:o,intl:a,flowCopy:i}=this.props,l=n&&`${n}-email`;return s.createElement(r.Z,{isRequired:!0,"data-testid":"email-field","data-tracking-event":"user_typed_email","data-nid-target":l,error:e,label:o||i?.email_placeholder?.value||a.formatMessage({id:"productFlows.components.common.emailField.email.label"}),onChange:e=>{this.setEmail(e),this.setError("")},value:t,name:"email",autoComplete:"email",type:"email",isDisabled:this.props.isDisabled})}}])&&l(n.prototype,o),a&&l(n,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,a}(s.Component);const f=(0,o.Z)(d,{forwardRef:!0})},5645:(e,t,n)=>{n.r(t),n.d(t,{WithoutPageViewEmailAddress:()=>U,default:()=>I,mapDispatchToProps:()=>j,mapStateToProps:()=>C});var r=n(84432),o=n(6925),a=n(62139),i=n(16383),s=n(64449),l=n(50558),u=n(28128),c=n(9611),p=n(43369),m=n(81927),d=n(26914),f=n(8207),h=n(38990),g=n(59855),b=n(51660),y=n(15135),v=n(53002),E=n(87684),_=n(67294);function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t,n){return t=k(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}
1function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}let N=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=P(this,t,[e])).state={email:"",errors:{email:!1},isSubmitting:!1},n.handleSubmit=n.handleSubmit.bind(n),n.handleStepupSsn=n.handleStepupSsn.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){g.Z.notifyMount(),(0,v.s3)().notifyStepChange(i.Oo),E.ap.track(s.hN.eventName,{eventCategory:"UserViewsPage",pageName:i.Oo,productArea:s.w8}),async function(e){e(await(0,b.S)(!0))}(this.props.updateIovationBlackboxString.bind(this))}},{key:"componentDidUpdate",value:function(e){const{emailAddressError:t}=this.props;e.emailAddressError!==t&&t&&E.ap.track(s.vO.eventName,{eventCategory:"UserImpressesElement",pageName:i.Oo,productArea:s.w8,elementName:s.vO.elementName,errorMessage:t})}},{key:"handleSubmit",value:function(){if(this.state.isSubmitting)return;const{email:e}=this.state,{makeRequest:t,updateEmailAddress:n,updateTurnstileToken:r,runTurnstileChallenge:o,submitUrl:a}=this.props,l=(0,h.i)("Invalid email").validate(e),u=!!e&&!0===l;E.ap.track(s.M.eventName,{eventCategory:"UserInteractsElement",pageName:i.Oo,productArea:s.w8,elementName:s.M.elementName,interactionType:"click",isValidForm:u}),u?(n(e),this.setState({isSubmitting:!0}),o((e=>{this.setState({isSubmitting:!1}),e&&r(e),t({submitUrl:a})}),(()=>this.setState({isSubmitting:!1})))):this.setState({errors:{email:!0}})}},{key:"handleStepupSsn",value:function(){if(this.state.isSubmitting)return;const{makeRequest:e,stepupSsnUrl:t}=this.props;e({submitUrl:t})}},{key:"render",value:function(){const{email:e,errors:t}=this.state,{emailAddressError:n,intl:r,stepupSsnUrl:o,turnstileWidget:a}=this.props,i=t.email?r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.email.invalid"}):n;return _.createElement(u.Z,{className:y.Z.container,"aria-live":"polite"},_.createElement(u.Z,{marginBottom:"large"},_.createElement(c.Z,{weight:"bold"},r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.title"}))),_.createElement(u.Z,{marginBottom:"medium"},_.createElement(p.Z,{type:"email","data-testid":"email-address-input",label:r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.email.label"}),placeholder:r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.email.placeholder"}),onChange:e=>this.setState((t=>Object.assign({},t,{email:e,errors:Object.assign({},t.errors,{email:!1})}))),value:e,error:i,"aria-invalid":!!i}),_.createElement(u.Z,{marginTop:"x-small"},_.createElement(m.Z,{size:"small",color:"color-text-supplementary"},r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.helperText"})))),a,_.createElement(u.Z,{marginBottom:"medium"},_.createElement(d.Z,{"data-testid":"email-address-continue-btn",onClick:this.handleSubmit,fullWidth:!0},r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.continueButton"}))),o&&_.createElement(d.Z,{emphasis:d.Z.Enums.Emphasis.Tertiary,fullWidth:!0,"data-testid":"email-address-stepup-btn",onClick:this.handleStepupSsn},r.formatMessage({id:"productFlows.module.phoneChange.emailAddress.stepupButton"})))}}])&&w(n.prototype,r),o&&w(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(_.Component);const Z=(0,f.Z)(N,{forwardRef:!0}),O=(0,o.Vj)(Z,i.Oo,s.Nz),C=e=>({pending:e.orchestrator.getIn([i.Oo,"view","pending"]),emailAddressError:e.orchestrator.getIn([i.Oo,"data","error","message"]),submitUrl:e.orchestrator.getIn([i.Oo,"data","next_events","submit_email_address"]),stepupSsnUrl:e.orchestrator.getIn([i.Oo,"data","next_events","stepup_ssn"])}),j=e=>({makeRequest:t=>{const n=new URL(document.location.toString()).searchParams;e((0,a.Zg)(["skip_email_pin"],n.get("skip_email_pin")||"false")),e((0,a.$f)(t))},updateEmailAddress:t=>e((0,a.Zg)(["email_address"],t)),updateIovationBlackboxString:t=>e((0,a.Zg)(["iovation_blackbox"],t)),updateTurnstileToken:t=>e((0,a.Zg)(["turnstile_token"],t))}),U=(0,l.$j)(C,j)(O),I=(0,l.$j)(C,j)((0,r.Z)(O))},3137:(e,t,n)=>{n.r(t),n.d(t,{default:()=>G,mapDispatchToProps:()=>X,mapStateToProps:()=>z});var r=n(15543),o=n(62139),a=n(16383),i=n(5645),s=n(59258),l=n(28128),u=n(99056),c=n(35006),p=n(9611),m=n(81927),d=n(26914),f=n(86933),h=n(8207),g=n(3867),b=n(98216),y=n(87440),v=n(52893),E=n(94184),_=n.n(E),w=n(67294),P=n(70891);const k=["length","value"];function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}const N=function(e){let{length:t=4,value:n=""}=e,r=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,k);const o=4===t;return w.createElement(y.Z,{vAlign:"start"},o&&w.createElement(y.Z,{className:P.Z["email-pin-prefix__grid"],direction:"column",hAlign:"end"},w.createElement(y.Z,null,w.createElement(v.Z,{ariaLabel:"EMAIL PIN PREFIX","data-testid":"email-pin-input-prefix",autoComplete:"off",autoFocus:!0,disabled:!0,innerClassName:_()({[P.Z["email-pin__wrapper"]]:!0,[P.Z["email-pin-prefix__input"]]:!0,[P.Z["email-pin-prefix_active__span"]]:n,[P.Z["email-pin-prefix_inactive__span"]]:!n}),maxLength:2,onChange:()=>{},value:"A-"}))),w.createElement(y.Z,{hAlign:o?"start":"center"},w.createElement(y.Z,{fixed:!o},w.createElement(v.Z,S({ariaLabel:"EMAIL PIN",autoComplete:o?"off":"one-time-code",autoFocus:!0,innerClassName:_()({[P.Z["email-pin__wrapper"]]:!0,[P.Z["email-pin-code__input"]]:!0,[P.Z["email-pin-code__input--wide"]]:!o}),maxLength:t,placeholder:"0".repeat(t),value:n},r)))))};var Z=n(59259),O=n(15135),C=n(64449),j=n(53002),U=n(35905),I=n(50777),R=n(87684),x=n(85077),A=n(23118);function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(this,arguments)}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t=M(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],M(e).constructor):t.apply(e,n))}
1function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function D(e,t){return D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},D(e,t)}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let q=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),L(n=F(this,t,[e]),"pinEntryStartTimestamp",null),L(n,"renderIdvLink",(e=>{const{idvUrl:t}=n.props;return w.createElement(s.Z,T({"data-testid":"phone-change-email-pin-try-different-method-btn"},(0,U.g)((()=>n.tryAnotherVerificationMethod(t)))),e)}));const{maskedEmail:r}=n.props;return n.state={emailPin:"",emailPinSubmitted:!1,maskedEmail:r},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){(0,j.s3)().notifyStepChange(a.e9),R.ap.track(C.NR.eventName,{eventCategory:"UserViewsPage",pageName:a.e9,productArea:C.w8}),(0,x.s)(Z.El.USER_SEES_STEP_UP,{eventCategory:"UserImpressesElement",elementName:C.Wd,pageName:a.e9,productArea:C.w8,stepUpType:"email_pin",stepUpPurpose:"phone_change_auth"})}},{key:"componentDidUpdate",value:function(e){const{emailPinError:t}=this.props;t&&t!==e.emailPinError&&R.ap.track(C.jB.eventName,{eventCategory:"UserImpressesElement",pageName:a.e9,productArea:C.w8,elementName:C.jB.elementName})}},{key:"updateEmailPin",value:function(e){!this.state.emailPin&&e&&(this.pinEntryStartTimestamp=performance.now()),this.setState({emailPin:e,emailPinSubmitted:!1}),this.props.updateEmailPin(e);const t=this.props.pinLength||4;if(e.length===t){const{makeRequest:e,checkoutAri:t,merchantAri:n}=this.props;this.setState({emailPin:"",emailPinSubmitted:!0});const r=(0,I.P)(this.pinEntryStartTimestamp);return this.pinEntryStartTimestamp=null,R.ap.track(C.C1.eventName,Object.assign({eventCategory:"UserInteractsElement",pageName:a.e9,productArea:C.w8,elementName:C.C1.elementName,interactionType:"text_input",inputMethod:r},t&&"UNDEFINED"!==t?{checkoutAri:t}:{},{merchantAri:n})),(0,x.s)(Z.El.USER_SUBMITS_STEP_UP,{eventCategory:"UserChangesState",pageName:a.e9,productArea:C.w8,stateName:"email_pin",stepUpType:"email_pin",stepUpPurpose:"phone_change_auth"}),e()}return!0}},{key:"requestNewPin",value:function(e){R.ap.track(C._Z.eventName,{eventCategory:"UserInteractsElement",pageName:a.e9,productArea:C.w8,elementName:C._Z.elementName,interactionType:"click"});const{makeRequest:t}=this.props;return t({submitUrl:e})}},{key:"tryAnotherVerificationMethod",value:function(e){R.ap.track(C.xg.eventName,{eventCategory:"UserInteractsElement",pageName:a.e9,productArea:C.w8,elementName:C.xg.elementName,interactionType:"click"});const{makeRequest:t}=this.props;return t({submitUrl:e})}},{key:"render",value:function(){const{BackgroundComponent:e,emailPinError:t,emailPinErrorCode:n,pinLength:r,resendEmailPinURL:o,idvUrl:a,emailPinRequestPending:i,intl:s}=this.props,{emailPin:h,emailPinSubmitted:y,maskedEmail:v}=this.state,E=(0,A.Z)(s,n),_=E?{format:"plaintext",value:E}:t;return w.createElement("div",null,w.createElement(e,null),w.createElement(l.Z,{className:O.Z.container},i?w.createElement(b.Z,{isOpen:!0}):w.createElement(u.u,{open:!0,className:O.Z.phoneFullScreen},w.createElement(l.Z,null,_&&y&&w.createElement(c.Z,{"data-testid":"phone-change-email-pin-modal-error-message",attitude:c.Z.Enums.Attitude.Negative},w.createElement(c.Z.Emphasis,null,w.createElement(g.Z,{copy:_}))),w.createElement(p.Z,{weight:"bold","data-testid":"phone-change-email-pin-modal-title"},w.createElement(f.Z,{id:"productFlows.module.phoneChange.emailPin.title"})),w.createElement(l.Z,{marginTop:"small"},w.createElement(m.Z,{color:"components-color-content-supplementary","data-testid":"phone-change-email-pin-masked-email-paragraph"},v?w.createElement(f.Z,{id:"productFlows.module.phoneChange.emailPin.description",values:{maskedEmail:v}}):w.createElement(f.Z,{id:"productFlows.module.phoneChange.emailPin.descriptionNoEmail"}))),w.createElement(l.Z,{marginTop:"xx-large",inlineChildren:!0},w.createElement(N,{onChange:e=>this.updateEmailPin(e),value:h,"data-testid":"phone-change-email-pin-input",length:r})),w.createElement(l.Z,{marginTop:"large"},w.createElement(d.Z,{emphasis:d.Z.Enums.Emphasis.Tertiary,onClick:()=>this.requestNewPin(o),"data-testid":"phone-change-email-pin-resend-btn",fullWidth:!0},w.createElement(f.Z,{id:"productFlows.module.phoneChange.emailPin.resendButton"})),a&&w.createElement(m.Z,{color:"components-color-content-supplementary"},w.createElement(f.Z,{id:"productFlows.module.phoneChange.emailPin.idvPrompt",values:{link:this.renderIdvLink}})))))))}}])&&B(n.prototype,r),o&&B(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(w.Component);q.defaultProps={emailPinError:"",emailPinRequestPending:!1,idvUrl:"",pinLength:4,resendEmailPinURL:""};const V=(0,h.Z)(q,{forwardRef:!0});var W=n(64615),$=n(36766),Q=n(80347),Y=n(50558);const z=e=>{const t=e.orchestrator.getIn([a.e9,"data","user_lookup_by"]),{checkoutAri:n,merchantAri:o}=(0,r.e)(e);let s;return s="phone_number"===t?W.WithoutPageViewOldPhoneNumber:"email_address"===t?i.WithoutPageViewEmailAddress:"ssn9_only"===t?$.WithoutPageViewSsnOnly:Q.WithoutPageViewSSN,{emailPinError:e.orchestrator.getIn([a.e9,"data","error","message"]),emailPinErrorCode:e.orchestrator.getIn([a.e9,"data","error","code"]),resendEmailPinURL:e.orchestrator.getIn([a.e9,"data","resend_url"]),idvUrl:e.orchestrator.getIn([a.e9,"data","idv_url"]),maskedEmail:e.orchestrator.getIn([a.e9,"data","masked_email"]),pinLength:e.orchestrator.getIn([a.e9,"data","email_pin_length"]),emailPinRequestPending:e.orchestrator.getIn([a.e9,"view","pending"]),userLookupBy:t,Backgroun
1dComponent:s,checkoutAri:n,merchantAri:o}},X=e=>({makeRequest:t=>e((0,o.$f)(t)),updateEmailPin:t=>e((0,o.Zg)(["email_pin"],t))}),G=(0,Y.$j)(z,X)(V)},23118:(e,t,n)=>{n.d(t,{Z:()=>r});const r=(e,t,n)=>{switch(t){case"email_pin_mismatch":return e.formatMessage({id:"productFlows.module.phoneChange.error.emailPinMismatch"});case"phone_pin_mismatch":return e.formatMessage({id:"productFlows.module.phoneChange.error.phonePinMismatch"});case"invalid_phone_number":return e.formatMessage({id:"productFlows.module.phoneChange.error.invalidPhoneNumber"});case"invalid_state":return e.formatMessage({id:"productFlows.module.phoneChange.error.invalidState"});case"service_unavailable":return e.formatMessage({id:"productFlows.module.phoneChange.error.serviceUnavailable"});case"internal_error":return e.formatMessage({id:"productFlows.module.phoneChange.error.internalError"});case"validation_error":return e.formatMessage({id:"productFlows.module.phoneChange.error.validationError"});default:return n}}},64615:(e,t,n)=>{n.r(t),n.d(t,{WithoutPageViewOldPhoneNumber:()=>C,default:()=>j,mapDispatchToProps:()=>O,mapStateToProps:()=>Z});var r=n(84432),o=n(62139),a=n(16383),i=n(28128),s=n(9611),l=n(87440),u=n(91503),c=n(81927),p=n(26914),m=n(86933),d=n(8207),f=n(51660),h=n(15135),g=n(64449),b=n(53002),y=n(87684),v=n(67294);function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return t=w(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function P(e,t){return P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},P(e,t)}let k=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=_(this,t,[e]);const r=new URLSearchParams(window.location.search);return n.state={errors:{phoneNumber:!1},iovationBlackbox:"",phoneNumber:"",phoneNumberSubmitted:!1,verifier:r.get("verifier")||null,sessionIdentifier:r.get("session_identifier")||null,checkoutAri:r.get("checkout_ari")||null},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){(0,b.s3)().notifyStepChange(a.Pr),y.ap.track(g.xk.eventName,{eventCategory:"UserViewsPage",pageName:a.Pr,productArea:g.w8}),async function(e){e(await(0,f.S)(!0))}(this.updateIovationBlackboxString.bind(this))}},{key:"componentDidUpdate",value:function(e){const{phoneNumberError:t}=this.props;t&&t!==e.phoneNumberError&&y.ap.track(g.gQ.eventName,{eventCategory:"UserImpressesElement",pageName:a.Pr,productArea:g.w8,elementName:g.gQ.elementName})}},{key:"handleStepUpLinkClick",value:function(){const{makeRequest:e,stepupSsnUrl:t}=this.props;y.ap.track(g.WV.eventName,{eventCategory:"UserInteractsElement",pageName:a.Pr,productArea:g.w8,elementName:g.WV.elementName,interactionType:"click"}),e({submitUrl:t})}},{key:"getPhoneNumberError",value:function(){const{intl:e,phoneNumberError:t,requestPending:n}=this.props,{errors:r,phoneNumberSubmitted:o}=this.state;return o&&!n&&t?t:r.phoneNumber?e.formatMessage({id:"productFlows.module.phoneChange.oldPhoneNumber.phoneNumber.invalid"}):""}},{key:"updatePhoneNumber",value:function(e){this.setState((t=>({phoneNumber:e,errors:Object.assign({},t.errors,{phoneNumber:!1}),phoneNumberSubmitted:!1})))}},{key:"updateIovationBlackboxString",value:function(e){this.setState((()=>({iovationBlackbox:e})))}},{key:"submitPhoneNumberData",value:function(){const{makeRequest:e,updatePhoneNumber:t,updateIovationBlackboxString:n,updateVerifier:r,updateSessionIdentifier:o,updateCheckoutAri:i,submitUrl:s}=this.props,{phoneNumber:l,iovationBlackbox:u,verifier:c,sessionIdentifier:p,checkoutAri:m}=this.state;let d=!0;l&&14===l.length||(this.setState((e=>({errors:Object.assign({},e.errors,{phoneNumber:!0})}))),d=!1),y.ap.track(g.$f.eventName,{eventCategory:"UserInteractsElement",pageName:a.Pr,productArea:g.w8,elementName:g.$f.elementName,interactionType:"click",isValidForm:d}),d&&(t(l),n(u),c&&r?.(c),p&&o?.(p),m&&i?.(m),e({submitUrl:s}),this.setState({phoneNumberSubmitted:!0}))}},{key:"render",value:function(){const{intl:e}=this.props,{phoneNumber:t}=this.state;return v.createElement(i.Z,{className:h.Z.container},v.createElement("div",null,v.createElement(i.Z,{marginBottom:"large"},v.createElement(s.Z,{weight:"bold"},v.createElement(m.Z,{id:"productFlows.module.phoneChange.oldPhoneNumber.title"}))),v.createElement(l.Z,null,v.createElement(l.Z,{width:"full"},v.createElement(i.Z,{marginBottom:"medium"},v.createElement(u.Z,{"data-testid":"old-phone-number-value-input",label:e.formatMessage({id:"productFlows.module.phoneChange.oldPhoneNumber.phoneNumber.label"}),placeholder:e.formatMessage({id:"productFlows.module.phoneChange.oldPhoneNumber.phoneNumber.placeholder"}),onChange:e=>this.updatePhoneNumber(e),value:t,error:this.getPhoneNumberError()}),v.createElement(i.Z,{marginTop:"small"},v.createElement(c.Z,{color:"color-text-supplementary"},v.createElement(m.Z,{id:"productFlows.module.phoneChange.oldPhoneNumber.helperText"})))))),v.createElement(p.Z,{"data-testid":"old-phone-number-continue-btn",onClick:()=>this.submitPhoneNumberData(),fullWidth:!0},v.createElement(m.Z,{id:"productFlows.module.phoneChange.oldPhoneNumber.continueButton"})),v.createElement(i.Z,{marginTop:"medium"},v.createElement(p.Z,{"data-testid":"old-phone-number-stepup-btn",emphasis:p.Z.Enums.Emphasis.Tertiary,onClick:()=>this.handleStepUpLinkClick(),fullWidth:!0},v.createElement(m.Z,{id:"productFlows.module.phoneChange.oldPhoneNumber.stepupLink"})))))}}])&&E(n.prototype,r),o&&E(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(v.Component);const S=(0,d.Z)(k,{forwardRef:!0});var N=n(50558);const Z=e=>({requestPending:e.orchestrator.getIn([a.Pr,"view","pending"]),phoneNumberError:e.orchestrator.getIn([a.Pr,"data","error","message"]),stepupSsnUrl:e.orchestrator.getIn([a.Pr,"data","next_events","stepup_ssn"]),submitUrl:e.orchestrator.getIn([a.Pr,"data","next_events","submit_old_phone_number"])}),O=e=>({makeRequest:t=>{const n=new URL(document.location.toString()).searchParams;e((0,o.Zg)(["skip_email_pin"],n.get("skip_email_pin")||"false")),e((0,o.$f)(t))},updatePhoneNumber:t=>e((0,o.Zg)(["phone_number"],t)),updateIovationBlackboxString:t=>e((0,o.Zg)(["iovation_blackbox"],t)),updateVerifier:t=>e((0,o.Zg)(["verifier"],t)),updateSessionIdentifier:t=>e((0,o.Zg)(["session_identifier"],t)),updateCheckoutAri:t=>e((0,o.Zg)(["checkout_ari"],t))}),C=(0,N.$j)(Z,O)(S),j=(0,N.$j)(Z,O)((0,r.Z)(S))},36766:(e,t,n)=>{n.r(t),n.d(t,{WithoutPageViewSsnOnly:()=>j,default:()=>U,mapDispatchToProps:()=>C,mapStateToProps:()=>O});var r=n(84432),o=n(62139),a=n(16383),i=n(28128),s=n(9611),l=n(81927),u=n(87440),c=n(18424),p=n(26914),m=n(9604),d=n(86933),f=n(8207),h=n(51660),g=n(15135),b=n(64449),y=n(53002),v=n(87684),E=n(67294);function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t,n){return t=P(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,n||[],P(e).constructor):t.apply(e,n))}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}
1function k(e,t){return k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},k(e,t)}let S=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=w(this,t,[e]);const r=new URLSearchParams(window.location.search);return n.state={errors:{ssn:!1},iovationBlackbox:"",ssn:"",ssnSubmitted:!1,verifier:r.get("verifier")||null,sessionIdentifier:r.get("session_identifier")||null,checkoutAri:r.get("checkout_ari")||null},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){(0,y.s3)().notifyStepChange(a.f_),v.ap.track(b.iU.eventName,{eventCategory:"UserViewsPage",pageName:a.f_,productArea:b.w8}),async function(e){e(await(0,h.S)(!0))}(this.updateIovationBlackboxString.bind(this))}},{key:"componentDidUpdate",value:function(e){const{ssnError:t}=this.props;t&&t!==e.ssnError&&v.ap.track(b.wg.eventName,{eventCategory:"UserImpressesElement",pageName:a.f_,productArea:b.w8,elementName:b.wg.elementName})}},{key:"getSSNError",value:function(){const{intl:e,ssnError:t,requestPending:n}=this.props,{errors:r,ssnSubmitted:o}=this.state;return o&&!n&&t?t:r.ssn?e.formatMessage({id:"productFlows.module.phoneChange.ssnOnly.ssn.invalid"}):""}},{key:"updateSSN",value:function(e){this.setState((t=>({ssn:e,ssnSubmitted:!1,errors:Object.assign({},t.errors,{ssn:!1})})))}},{key:"updateIovationBlackboxString",value:function(e){this.setState((()=>({iovationBlackbox:e})))}},{key:"submitSSNData",value:function(){const{makeRequest:e,updateSSN:t,updateIovationBlackboxString:n,updateVerifier:r,updateSessionIdentifier:o,updateCheckoutAri:i,submitUrl:s}=this.props,{ssn:l,iovationBlackbox:u,verifier:c,sessionIdentifier:p,checkoutAri:m}=this.state;let d=!0;l&&11===l.length||(this.setState((e=>({errors:Object.assign({},e.errors,{ssn:!0})}))),d=!1),v.ap.track(b.Zd.eventName,{eventCategory:"UserInteractsElement",pageName:a.f_,productArea:b.w8,elementName:b.Zd.elementName,interactionType:"click",isValidForm:d}),d&&(t(l.replace(/-/g,"")),n(u),c&&r?.(c),p&&o?.(p),m&&i?.(m),e({submitUrl:s}),this.setState({ssnSubmitted:!0}))}},{key:"render",value:function(){const{intl:e}=this.props,{ssn:t}=this.state;return E.createElement(i.Z,{className:g.Z.container,"aria-live":"polite"},E.createElement("div",null,E.createElement(i.Z,{marginBottom:"large"},E.createElement(s.Z,{weight:"bold"},E.createElement(d.Z,{id:"productFlows.module.phoneChange.ssnOnly.title"})),E.createElement(i.Z,{marginTop:"small"},E.createElement(l.Z,{color:"color-text-supplementary"},E.createElement(d.Z,{id:"productFlows.module.phoneChange.ssnOnly.subtitle"})))),E.createElement(u.Z,null,E.createElement(u.Z,{width:"full"},E.createElement(i.Z,{marginBottom:"medium"},E.createElement(c.Z,{"data-testid":"ssn-only-value-input",onChange:e=>this.updateSSN(e),value:t,rightIcon:m.Z,placeholder:e.formatMessage({id:"productFlows.module.phoneChange.ssnOnly.ssn.placeholder"}),label:e.formatMessage({id:"productFlows.module.phoneChange.ssnOnly.ssn.label"}),error:this.getSSNError(),"aria-invalid":!!this.getSSNError()})))),E.createElement(p.Z,{"data-testid":"ssn-only-continue-btn",onClick:()=>this.submitSSNData(),fullWidth:!0},E.createElement(d.Z,{id:"productFlows.module.phoneChange.ssnOnly.continueButton"}))))}}])&&_(n.prototype,r),o&&_(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(E.Component);const N=(0,f.Z)(S,{forwardRef:!0});var Z=n(50558);const O=e=>({requestPending:e.orchestrator.getIn([a.f_,"view","pending"]),ssnError:e.orchestrator.getIn([a.f_,"data","error","message"]),submitUrl:e.orchestrator.getIn([a.f_,"data","next_events","submit_ssn_only"])}),C=e=>({makeRequest:t=>{const n=new URL(document.location.toString()).searchParams;e((0,o.Zg)(["skip_email_pin"],n.get("skip_email_pin")||"false")),e((0,o.$f)(t))},updateSSN:t=>e((0,o.Zg)(["ssn"],t)),updateIovationBlackboxString:t=>e((0,o.Zg)(["iovation_blackbox"],t)),updateVerifier:t=>e((0,o.Zg)(["verifier"],t)),updateSessionIdentifier:t=>e((0,o.Zg)(["session_identifier"],t)),updateCheckoutAri:t=>e((0,o.Zg)(["checkout_ari"],t))}),j=(0,Z.$j)(O,C)(N),U=(0,Z.$j)(O,C)((0,r.Z)(N))},50777:(e,t,n)=>{n.d(t,{P:()=>r});function r(e,t){return void 0===t&&(t=performance.now()),null===e?"manual":t-e<250?"autofill_or_paste":"manual"}},70891:(e,t,n)=>{n.d(t,{Z:()=>r});const r={"email-pin__wrapper":"pro2n8acUZt","email-pin-prefix__grid":"pro1xnSoIl-","email-pin-prefix__input":"pro3w4C_FCa","email-pin-prefix_inactive__span":"pro3tbB8LB-","email-pin-prefix_active__span":"pro95pbIYe-","email-pin-code__input":"pro3N_YeQdf","email-pin-code__input--wide":"proI6tCboYu"}}}]);

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.