PageSourceSearch

https://photobucket.com/assets/js/Register-24fer_Y4.js

js photobucket.com collected 2026-09-24 06:57:30 UTC 11,481 bytes, 1 lines download raw bytes

1var se=Object.defineProperty,ie=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var z=Object.getOwnPropertySymbols;var ne=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var V=(n,o,l)=>o in n?se(n,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[o]=l,_=(n,o)=>{for(var l in o||(o={}))ne.call(o,l)&&V(n,l,o[l]);if(z)for(var l of z(o))le.call(o,l)&&V(n,l,o[l]);return n},M=(n,o)=>ie(n,oe(o));import{a as v,_ as t}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B177jzqY.js";import{d as R}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare___mf_0_unleash_mf_1_proxy_mf_2_client_mf_2_react__loadShare__.js-BdtqsXmB.js";import{cm as ce,iZ as de,cn as me,ch as ue,d5 as T,j4 as $,j as d,l as y,d0 as pe,c_ as A,cR as ge,cZ as fe,bS as G,cQ as he,j7 as H,j8 as ye}from"./index-C8DIms-h.js";import{e as P,a as C,b as k}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js-ClGO9exV.js";import{_ as we,k as be}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_router_mf_2_dom__loadShare__.js-CK4j7iSY.js";import{V as ve}from"./ViewTitle-DlDMKMwm.js";import{P as O}from"./PasswordVisibilityAdornment-Bsoiby26.js";import{S as B,a as L}from"./StyledTextField-DlxnXUWj.js";import{R as Pe}from"./RequiredParameter-sNXTeMLJ.js";import{P as Se}from"./passwordValidator-WQB-wBbJ.js";import{A as Ie}from"./AuthFormFirebase-BUGiLDRY.js";import{I as _e,a as Ae,S as Ce}from"./SSOButton-CI7gDbu2.js";import{S as ke,a as xe}from"./StyledFormAlert-CPss5llY.js";import{S as Fe}from"./StyledFormButton-G5F5YpWm.js";import{S as Ee}from"./StyledFormHeader-3hTA4y7p.js";import{S as Re}from"./StyledFormHelperTypography-CUZfauOx.js";import{a as Te,S as Be}from"./StyledFormLegalDisclaimerTypography-Dr5VR7ak.js";import{u as Le}from"./useAppleLogin-CvBJlaso.js";import{u as Ue}from"./useRegisterCloudFunction-zA2aVvBY.js";import{F as qe,C as De}from"./FormControlLabel-DDOXog2C.js";import{L as S}from"./Link-CF_mY1kC.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-D_fXcg40.js";import"./virtualExposes-_ivNhQLP.js";import"./remoteEntry-uboCqDRT.js";import"./preload-helper-s0Msbe4-.js";import"./index-DM2295YJ.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-_fD68H2V.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-BYnSnx8j.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-ckyQG2Wp.js";import"./index-CwMG8eoe.js";import"./Select-C0o-DiOk.js";import"./isMuiElement-ByswdNQJ.js";import"./List-g65CIM25.js";import"./TextField-XHezjr4a.js";import"./InviteSignupContext-DpLlkYUW.js";import"./inviteValidation-D3KKHiX7.js";import"./index-B6UHHHHX.js";import"./getThemeProps-CWzAk5Hy.js";import"./Skeleton-CHHkEUB-.js";import"./Divider-D0Q2hE10.js";import"./dividerClasses-DKoWjx9h.js";const w="redirect_idp",We=/\S+@\S+\.\S+/,ze=n=>We.test(n);function xr(){const n=ce(),o=we(),l=P(o.search),{registerUser:j}=Ue(),{attemptRedirect:N}=de(!0),[m,U]=C({termsAndServices:!1}),[u,i]=C({}),x=P(!1),q=P(localStorage.getItem(w)||""),[g,p]=C(!1),F=P(N),{init:Y}=Le(),Q=P(Y),Z={isFirebaseFacebookIdpEnabled:R("isFirebaseFacebookIdpEnabled"),isFirebaseMicrosoftIdpEnabled:R("isFirebaseMicrosoftIdpEnabled"),isFirebasePaypalIdpEnabled:R("isFirebasePaypalIdpEnabled")},J=()=>g,[b,K]=C(!1),D=()=>K(!b),{trackEvent:f}=me(),X=async e=>{var a,r;if(p(!0),!m.termsAndServices){i({general:"You must agree to our terms and services"}),p(!1);return}if(e.providerId===T.PROVIDER_ID){if(!((r=(a=window.AppleID)==null?void 0:a.auth)!=null&&r.signIn)){y.error("Apple sign-in is not available"),p(!1),i({general:"Apple sign-in is not available. Please try again later."});return}const s=await window.AppleID.auth.signIn().catch(c=>{y.error("Error during Apple signIn",c),p(!1)});if(s&&s.authorization){const c=new T().credential({idToken:s.authorization.id_token});$(d(),c);const h=d();f("idp_register_success",{username:h.currentUser,termsAndServices:!0,providerId:e.providerId})}return}if(he.isMobile){window.localStorage.setItem(w,e.providerId),H(d(),e);const s=d();f("idp_register_success",{username:s.currentUser,termsAndServices:!0,providerId:e.providerId});return}q.current=e.providerId,ye(d(),e).then(()=>{const s=d();f("idp_register_success",{username:s.currentUser,termsAndServices:!0,providerId:e.providerId})}).catch(s=>{if(s.code==="auth/popup-blocked"){window.localStorage.setItem(w,e.providerId),H(d(),e);return}p(!1)})},ee=()=>{const e=Se(m.password,m.confirmPassword,m.email),{email:a}=m;if(!a)throw new Error("Email required");
1if(!ze(a))throw new Pe("Email format is invalid.","email");return{email:a,password:e}},re=async e=>{e==null||e.preventDefault();try{const{email:a,password:r}=ee();p(!0),x.current=!0,await j(a,r),await F.current(),f("register_success",{username:d().currentUser,email:a,termsAndServices:!0})}catch(a){const r=a;f("register_failed",{error:r}),p(!1),x.current=!1;const s=r;switch(r.code){case"auth/email-already-in-use":case"auth/username-already-taken":case"auth/invalid-identifier":case"auth/email-already-taken":i({info:"email in use"});break;case"auth/invalid-email":case"auth/missing-email":i({email:"Please enter a valid email address."});break;case"auth/weak-password":case"auth/missing-password":i({password:r.message});break;case"auth/too-many-requests":i({general:"Too many attempts. Please try again later."});break;case"auth/network-request-failed":i({general:"Network error. Please check your connection and try again."});break;case"auth/operation-not-allowed":i({general:"Registration is currently unavailable. Please try again later."});break;case"auth/internal-error":i({general:"An unexpected error occurred. Please try again."});break;case"InvalidParameterException":case"InvalidPasswordException":U(M(_({},m),{confirmPassword:""})),i({password:r.message});break;case"ConfirmPasswordException":i({confirmPassword:r.message,password:r.message});break;case"RequiredParameterException":i({[s.parameterName]:r.message});break;default:i({general:r.message||"An unexpected error occurred."})}}},I=(e,a)=>{const r=_({},m),s=e.target.name;s==="termsAndServices"?r[s]=!!a:r[s]=e.target.value,U(r);const c=_({},u);delete c[s],delete c.general,i(c)};return ue(()=>{f("register_view")}),k(()=>{const e=new URLSearchParams(l.current),a=e.get("provider")==="apple",r=e.get("id_token");if(r&&a){const s=new T().credential({idToken:r});$(d(),s).then(c=>y.info({res:c})).catch(y.error)}},[]),k(()=>{Q.current("register")},[]),k(()=>{const e=localStorage.getItem(w);e&&pe(d()).then(async a=>{a&&await F.current()}).catch(a=>{const r=A(e).getProvider();a.code==="auth/account-exists-with-different-credential"&&i({info:"email in use"}),y.error({error:a,provider:r})}).finally(()=>localStorage.setItem(w,""))},[m.termsAndServices]),k(()=>{const e=d().onAuthStateChanged(async a=>{var r;if(a&&!x.current)try{await F.current()}catch(s){p(!1);const c=A(q.current).getProvider(),h=s,W=ge();if(y.error({uniqueErrorId:W,error:h}),h.code==="auth/popup-closed-by-user")return;if(h.message.includes("account-exists-with-different-credential")){const E=(r=h.customData)==null?void 0:r.email;if(E){const te=E?" (".concat(E,")"):"",ae=A(c.providerId).name;i({general:"An account exists with this email".concat(te,". You can enable single click sign on with ").concat(ae," under your account settings.")});return}}i({general:"There was an error signing in or registering your account. Unique error id: ".concat(W)})}finally{localStorage.setItem(w,"")}});return()=>e()},[m.termsAndServices]),v(Ie,{onSubmit:re,children:[t(_e,{variant:"register"}),t(ve,{title:"Create an Account"}),t(Ee,{children:"Create an Account"}),t(Ae,{children:fe.map(e=>{const{featureFlagName:a,getProvider:r}=A(e),s=r();return a&&Z[a]===!1?null:t(Ce,{action:"Sign Up with",disabled:g,providerId:e,handleProvider:()=>X(s)},"sso-button-".concat(e))})}),t(qe,{disableTypography:!0,sx:{paddingTop:3,marginRight:0,marginBottom:"20px",alignItems:"flex-start",textAlign:"left",".MuiFormControlLabel-asterisk":{display:"none"},"&.MuiFormControlLabel-root":{color:n.palette.customGrey[600],flexGrow:0,fontSize:"16px",lineHeight:"1.25"}},control:t(De,{id:"termsAndServices",name:"termsAndServices",required:!0,checked:!!m.termsAndServices,"aria-required":!0,onChange:I,disabled:g,"data-test":"terms-of-service-checkbox",inputProps:{"aria-label":"Terms of Use and Privacy Policy checkbox"},size:"small",sx:{paddingTop:"1px",borderWidth:"1px"}}),label:v(G,{children:["You must agree to our"," ",t(S,{color:"#1C47CB","data-test":"terms-of-service",href:"/legal/terms-of-service",target:"_blank",underline:"always",children:"Terms of Use"}),","," ",t(S,{color:"#1C47CB","data-test":"privacy-policy",href:"/legal/privacy-policy",target:"_blank",underline:"always",children:"Privacy Policy"})," ","and"," ",t(S,{color:"#1C47CB","data-test":"biometric-information-privacy-policy",href:"/legal/biometric-information-privacy-policy",target:"_blank",underline:"always",children:"Biometric Information Privacy Policy"})," ","before continuing."]})}),t(ke,{title:"Error logging in",body:u.general}),u.info==="email in use"&&t(xe,{body:v(G,{sx:{color:"#1C47CB"},children:["We found an account associated with this email address already. Please"," ",t("strong",{children:t(be,{style:{color:"#1C47CB"},color:"#1C47CB",to:"/auth/login".concat(o.search),children:"sign in"})})," ","to continue selecting your plan."]})}),t(B,{sx:{mt:"18px"},htmlFor:"email",children:"Email"}),t(L,{id:"email",autoFocus:!0,defaultValue:"","data-test":"email",disabled:g,error:!!u.email,fullWidth:!0,helperText:u.email,inputProps:{autoCapitalize:"off"},name:"email",onChange:I,required:!0,margin:"dense",placeholder:"[email protected]",type:"email",variant:"outlined"}),t(B,{htmlFor:"password",children:"Password"}),t(L,{id:"password","data-test":"password",disabled:g,error:!!u.password,fullWidth:!0,helperText:u.password,margin:"dense",name:"password","data-sr-redact":!0,onChange:I,required:!0,type:b?"text":"password",InputProps:{autoCapitalize:"off",endAdornment:t(O,{showPassword:b,handleClickShowPassword:D})},placeholder:""}),t(B,{htmlFor:"confirmPassword",children:"Confirm Password"}),t(L,{id:"confirmPassword","data-testid":"confirmPassword",disabled:g,error:!!u.confirmPassword,fullWidth:!0,helperText:u.confirmPassword,margin:"dense",name:"confirmPassword",onChange:I,required:!0,type:b?"text":"password",placeholder:"",InputProps:{autoCapitalize:"off",endAdornment:t(O,{showPassword:b,handleClickShowPassword:D})}}),t(Fe,{color:"primary","data-test":"submit",disabled:J(),fullWidth:!0,type:"submit",variant:"contained",children:"Create Account"}),v(Te,{sx:{fontSize:"16px"},children:["This site is protected by reCAPTCHA and the Google"," ",t(S,{style:{color:"#1C47CB"},href:"https://policies.google.com/privacy",underline:"always","data-test":"google-privacy",children:"Privacy Policy"})," ","and"," ",t(S,{style:{color:"#1C47CB"},href:"https://policies.google.com/terms",underline:"always","data-test":"google-terms-of-service",children:"Terms of Service"})," ","apply."]}),v(Re,{children:["Already a member? ",t(Be,{"data-test":"already-have-an-account-button",to:"/auth/login".concat(o.search),children:"Sign In"})]})]})}export{xr as default};

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.