(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6050],{2032:(e,t,a)=>{"use strict";a.d(t,{M:()=>i});var n=a(28868);let i=e=>{let t=(0,n.l)(e);return{countryCode:(null==t?void 0:t.country)||"US",formattedPhone:(null==t?void 0:t.formatInternational())||"",phoneWithoutCode:(null==t?void 0:t.formatNational())||""}}},9712:(e,t,a)=>{"use strict";a.d(t,{$:()=>o});var n=a(95155),i=a(29300),l=a.n(i),s=a(71980),r=a.n(s);let o=e=>{let{children:t,variant:a="primary",size:i="base",withIcon:s=!1,fill:o=!1,className:d,...c}=e,u=l()(r().button,r()[a],r()[i],{[r().withIcon]:s,[r().fill]:o},d);return(0,n.jsx)("button",{className:u,...c,children:t})}},10187:(e,t,a)=>{"use strict";a.d(t,{j:()=>s,y:()=>l});var n=a(23915),i=a(16203);let l=0===(0,n.Dk)().length?(0,n.Wp)({apiKey:"AIzaSyArzhmSuVQNCvq60YIBINwemRcnqoO0E08",appId:"1:260774426049:web:997394d794ae66c8392b40",authDomain:"canyon-ranch-app.firebaseapp.com",measurementId:"G-6VPD0953GG",messagingSenderId:"260774426049",projectId:"canyon-ranch-app",storageBucket:"canyon-ranch-app.firebasestorage.ap"}):(0,n.Sx)(),s=(0,i.xI)(l)},18102:(e,t,a)=>{"use strict";a.d(t,{E:()=>s});var n=a(95155),i=a(30235),l=a.n(i);let s=e=>{let{rows:t=3}=e,a=Array.from({length:t},(e,t)=>(0,n.jsx)("div",{className:l().skeletonRow},t));return(0,n.jsx)("div",{className:l().skeleton,children:a})}},20836:(e,t,a)=>{"use strict";a.d(t,{$:()=>l});let n={lg:1280,md:900,sm:600,xl:1440,xs:400,xxl:1920},i=e=>"@media (min-width: ".concat(e,"px)"),l={lg:i(n.lg),md:i(n.md),sm:i(n.sm),xl:i(n.xl),xs:i(n.xs),xxl:i(n.xxl)}},22137:(e,t,a)=>{"use strict";a.d(t,{s:()=>r});var n=a(95155),i=a(45766),l=a(95780),s=a.n(l);let r=e=>{let{children:t}=e,{isMobile:a}=(0,i.l)();return a?null:(0,n.jsx)("h2",{className:s().pageTitle,children:t})}},24743:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(12115),i=a(37177);let l=()=>{let[e,t]=(0,n.useState)(null),a=e=>i.z6.test(e)?null:"Please enter your email address in this format: yourname@example.com";return{emailError:e,resetEmailError:()=>{t(null)},validate:e=>{let n=a(e);return t(n),null===n}}}},26046:(e,t,a)=>{"use strict";a.d(t,{Em:()=>i,GC:()=>r,H1:()=>u,Ko:()=>s,NZ:()=>n,XT:()=>l,ok:()=>c,r0:()=>o,tM:()=>d,xg:()=>m});let n="enableNotificationBell",i="enableBrazeTrigger",l="enablePreferences",s="enableStayPlanner",r="enableGuestInfoUpdate",o="enableAutoCompleteAddress",d="enablePaymentByReservation",c="enableInternationalPhoneAuth",u="enableMultiGuestBookingFE",m="enableCancelAppointmentFE"},27412:(e,t,a)=>{"use strict";a.d(t,{s:()=>l});var n=a(12115),i=a(41709);let l=()=>{let{data:e,loading:t,error:a,refetch:l}=(0,i.EjP)(),[s]=(0,i.AC2)(),[r,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(null==e?void 0:e.profile.data)&&o(e.profile.data)},[e]),{error:a,getIdpProfile:s,loading:t,refetch:l,setUserProfile:o,user:null==e?void 0:e.profile.data,userProfile:r}}},29352:(e,t,a)=>{"use strict";a.d(t,{$sl:()=>n.$sl,BSo:()=>n.BSo,Bhp:()=>n.Bhp,D19:()=>n.D19,EA0:()=>n.EA0,Evc:()=>n.Evc,GoN:()=>n.GoN,Grd:()=>n.Grd,J9v:()=>n.J9v,L0m:()=>n.L0m,NAG:()=>n.NAG,PW9:()=>n.PW9,Qk3:()=>n.Qk3,Rdq:()=>n.Rdq,S3L:()=>n.S3L,T_s:()=>n.T_s,V_y:()=>n.V_y,YT8:()=>n.YT8,_GH:()=>n._GH,eWv:()=>n.eWv,fYj:()=>n.fYj,fwh:()=>n.fwh,gv_:()=>n.gv_,htS:()=>n.htS,ifw:()=>n.ifw,ipP:()=>n.ipP,jLZ:()=>n.jLZ,lqo:()=>n.lqo,s3K:()=>n.s3K,s75:()=>n.s75,tVe:()=>n.tVe});var n=a(41709)},30235:e=>{e.exports={skeleton:"styles_skeleton__l6ntU",skeletonRow:"styles_skeletonRow__QXnw3",loading:"styles_loading__2bcon"}},37177:(e,t,a)=>{"use strict";a.d(t,{Gz:()=>i,HK:()=>s,c1:()=>d,dz:()=>r,eE:()=>l,eT:()=>c,nq:()=>o,z6:()=>n});let n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,i=/^\/[^\/]+\/(events|retreats)\/[^\/]+$/,l=/^\/[^\/]+\/(experiences)\/[^\/]+$/,s=/^\/[^\/]+\/daily-schedule$/,r=/\/stay\/?$/,o=/^\/[^\/]+\/confirmation(\/.*|\?.*|$)/,d=/^\/[^\/]+\/checkout\/?$/,c=/^\/account\/stay\/\d+$/},39455:(e,t,a)=>{"use strict";let n;a.d(t,{I9:()=>r,Jv:()=>s,V5:()=>l});var i=a(87358);n=a(83967);let l=()=>({braze:n}),s=e=>{if(n.isInitialized())return;if(n.initialize("".concat("b49b0bdb-eee0-42b6-a91a-15e26f3ffd28"),{allowUserSuppliedJavascript:!0,baseUrl:"".concat("sdk.iad-05.braze.com"),enableLogging:"true"===i.env.NEXT_PUBLIC_BRAZE_ENABLELOGGING,minimumIntervalBetweenTriggerActionsInSeconds:2}),e){var t;null===(t=n.getUser())||void 0===t||t.setCustomUserAttribute("firebase_id",e)}let a=n.getDeviceId();a&&localStorage.setItem("deviceID",a),n.requestContentCardsRefresh(),n.automaticallyShowInAppMessages(),n.openSession()},r=(e,t)=>{var a,i,l,s,r,o,d,c,u,m,p,v;let h=localStorage.getItem("ciid"),f=null===(a=e.email)||void 0===a?void 0:a.toLowerCase(),g=n.getDeviceId();if(null==t){if(!h){if(e.phoneNumber&&(null===(i=n.getUser())||void 0===i||i.setPhoneNumber(e.phoneNumber),null===(l=n.getUser())||void 0===l||l.addAlias(e.phoneNumber,"phone"),localStorage.setItem("phone",e.phoneNumber)),f&&(null===(s=n.getUser())||void 0===s||s.setEmail(f),null===(r=n.getUser())||void 0===r||r.addAlias("".concat(g,"|").concat(f),"device_id.email"),null===(o=n.getUser())||void 0===o||o.addAlias(f,"email"),localStorage.setItem("email_address",f)),e.uid&&(null===(d=n.getUser())||void 0===d||d.addAlias(e.uid,"firebase_id"),null===(c=n.getUser())||void 0===c||c.addAlias("".concat(g,"|").concat(e.uid),"device_id.firebase_id"),null===(u=n.getUser())||void 0===u||u.setCustomUserAttribute("firebase_id",e.uid)),e.displayName){let[t,...a]=e.displayName.split(" ");null===(m=n.getUser())||void 0===m||m.setFirstName(t),null===(p=n.getUser())||void 0===p||p.setLastName(a.join(" ")),localStorage.setItem("fname",t),localStorage.setItem("lname",a.join(" "))}localStorage.setItem("ciid","true")}}else t&&n.changeUser(t),(!h||e.uid)&&e.uid&&(null===(v=n.getUser())||void 0===v||v.setCustomUserAttribute("firebase_id",e.uid)),(!h||h!==t)&&t&&localStorage.setItem("ciid",t)}},42398:(e,t,a)=>{"use strict";a.d(t,{h:()=>i});var n=a(29352);let i=e=>{let{data:t,loading:a}=(0,n.Rdq)({variables:{featureFlags:e}});return{data:t&&t.getFeatureFlags.data,loading:a}}},43404:(e,t,a)=>{"use strict";a.d(t,{s:()=>s});var n=a(12115),i=a(86864),l=a(10187);let s=()=>{let[e,t]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(0,i.TT)().then(e=>{e&&t((0,i.P5)(l.y))}).catch(e=>{throw Error("Analytics initialization failed:",e)})},[]),{logAnalyticsEvent:(t,a)=>{if(!e)return;let{error:n,...l}=a,s={success:+!n,...l};try{(0,i.$s)(e,t,s)}catch(e){throw Error("Error logging event")}}}}},43905:(e,t,a)=>{"use strict";a.d(t,{Ar:()=>l,iK:()=>i,n4:()=>n});let n=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=(""+e).replace(/\D/g,"").match(/^(\d{3})(\d{3})(\d{4})$/);return a?"(".concat(a[1],")").concat(t?" ":"").concat(a[2],"-").concat(a[3]):e};function i(e,t){let a=t?",".concat(t.toString()):"";return"tel:".concat(e).concat(a).replace(/\s+/g,"")}let l=(e,t)=>{let a=e.replace(/\D/g,""),n=0;return t.replace(/\./g,()=>{var e;return null!==(e=a[n++])&&void 0!==e?e:""})}},45766:(e,t,a)=>{"use strict";a.d(t,{G:()=>i,l:()=>s});var n=a(12115),i=function(e){return e.XXL="2xl",e.XL2="1xl",e.XL="xl",e.LG="lg",e.MD="md",e.SM="sm",e}({});let l=()=>{let e=window.innerWidth;if(e>=1536)return"2xl";if(e>=1440)return"1xl";if(e>=1280)return"xl";if(e>=1024)return"lg";if(e>=768)return"md";else return"sm"},s=()=>{let[e,t]=(0,n.useState)(l());(0,n.useEffect)(()=>{let e=()=>{t(l())};return window.addEventListener("resize",e),t(l()),()=>{window.removeEventListener("resize",e)}},[]);let a="sm"===e,i=["sm"].includes(e),s=["sm","md"].includes(e),r=["md","lg"].includes(e),o=["sm","md","lg"].includes(e),d=["md","lg"].includes(e);return{isDesktop:["xl","1xl"].includes(e),isLongDesktop:["1xl","2xl"].includes(e),isMediumScreen:s,isMobile:a,isMobileOrTablet:o,isSmallScreen:i,isTablet:r,isTabletOrDesktop:d,screenSize:e}}},55917:(e,t,a)=>{"use strict";a.d(t,{Z:()=>o,h:()=>d});var n=a(95155),i=a(12115),l=a(16203),s=a(10187);let r=(0,i.createContext)({loading:!0,user:null}),o=()=>(0,i.useContext)(r),d=e=>{let{children:t}=e,[a,o]=(0,i.useState)(null),[d,c]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{d||null!==a||(0,l.zK)(s.j)},[d,a]),(0,i.useEffect)(()=>{let e=(0,l.hg)(s.j,e=>{o(e),c(!1)});return()=>e()},[]),(0,n.jsx)(r.Provider,{value:{loading:d,user:a},children:t})}},60523:(e,t,a)=>{"use strict";a.d(t,{J:()=>n});let n={alerts:{error:{background:"#E5381A",text:"#971903"},success:{background:"#E2F1E0",text:"#285B45"},warning:{background:"#F2C540",text:"#F2C540"}},bgColor:{neutral:{default:"#5c5451",neutralBase:"#fbfbfb"}},black:"#000",borders:{primary:"#e0dedc"},divider:{light:"#E1DEDB"},link:{primary:"#a64e26"},location:{las_vegas:"#937458",lenox:"#222445",tucson:"#583D52",woodside:"#24412A"},neutrals:{background:"#E0DDDA",grayscale1:"#F5F5F5",grayscale2:"#D7D7D7",grayscale3:"#AEAEAE",grayscale4:"#868686",grayscale5:"#5D5D5D",grayscale6:"#353535",grayscale7:"#262020",grayscaleBackground:"#C4C4C4",grayscaleWhite:"#FFFFFF",selected:"#C1BAB6"},primary:{cream:"#F7EDE9",dark:"#B04E21",darker:"#813918",light:"#EFDCD3",medium:"#D0957A"},secondary:{background:{lightest:"#FBF8F5"},dark:"#F4551F"},textColor:{brand:{alpha:"#121110",dark:"#6A2F14",hover:"#9B451D"},default:"#353535",primary:{darkTheme:"#FEFDFC"}},white:"#fff",whiteOptical:"#fcfbfa"}},62078:e=>{e.exports={avatarContainer:"styles_avatarContainer__pnyO7",avatar:"styles_avatar__QET9B",text:"styles_text__porGR"}},63102:(e,t,a)=>{"use strict";a.d(t,{a:()=>i,s:()=>n});let n={body:16,heading1:74,heading2:59,heading3:39,heading4:32,heading5:26},i={cg:"var(--font-cormorant-garamond)",pn:"var(--font-proxima-nova)"}},71980:e=>{e.exports={button:"styles_button__YaZn_",primary:"styles_primary__EzVYn",secondary:"styles_secondary__v0qOY",destructive:"styles_destructive__VSkC6",ghost:"styles_ghost__mui3d",text:"styles_text__sHIRI","neutral-text":"styles_neutral-text__i_68_",xl:"styles_xl__vqNgs",lg:"styles_lg__6wvoS",base:"styles_base__Wg2dz",sm:"styles_sm__gSr_X",withIcon:"styles_withIcon__b3o4j",fill:"styles_fill__nunXW"}},73366:(e,t,a)=>{"use strict";a.d(t,{z:()=>_});var n=a(12115),i=a(16428),l=a(16203),s=a(35695);let r={description:"Oops... Something went wrong",title:"Oops... Something went wrong"};var o=function(e){return e.AccountExistsWithDifferentCredential="auth/account-exists-with-different-credential",e.CodeExpired="auth/code-expired",e.EmailAlreadyInUse="auth/email-already-in-use",e.InternalError="auth/internal-error",e.InvalidLogin="auth/invalid-login",e.InvalidPhoneNumber="auth/invalid-phone-number",e.InvalidVerificationCode="auth/invalid-verification-code",e.RequiresRecentLogin="auth/requires-recent-login",e.SessionExpired="auth/session-expired",e.TooManyRequests="auth/too-many-requests",e}({});let d={"auth/account-exists-with-different-credential":{description:"Account exists with different credential",title:"Account exists with different credential"},"auth/code-expired":{description:"The verification code has expired.",title:"Code expired."},"auth/email-already-in-use":{description:"Email is already in use.",title:"Email is already in use."},"auth/internal-error":r,"auth/invalid-login":{description:"Login failed. Please check your username and password.",title:"Invalid login credentials"},"auth/invalid-phone-number":{description:"The provided value for the phone number is invalid.",title:"Invalid phone number."},"auth/invalid-verification-code":{description:"Oops... That code is wrong. Please try again.",title:"Invalid verification code."},"auth/requires-recent-login":{description:"Completing registration requires relogin",title:"Completing registration requires relogin"},"auth/session-expired":{description:"Please re-send the verification code to try again.",title:"The sms code has expired"},"auth/too-many-requests":{description:"We have blocked all requests from this device due to unusual activity. Try again later.",title:"Too many requests."}};function c(e){return Object.values(o).includes(e)?d[e]:r}let u=e=>{if(!e)return e;let t=e.replace(/[^\d]/g,""),a=t.length;if(a<4)return t;if(a<7)return"(".concat(t.slice(0,3),") ").concat(t.slice(3));{let e=t.slice(0,3),a=t.slice(3,6),n=t.slice(6,10),i="(".concat(e,") ").concat(a);return n&&(i+="-".concat(n)),i}};var m=a(41709),p=a(26046),v=a(42398);let h=()=>{let[e,t]=(0,n.useState)(30);return(0,n.useEffect)(()=>{let a=null,n=()=>{a&&clearInterval(a)};return e?a=setInterval(()=>{t(e=>e-1)},1e3):n(),()=>{n()}},[!!e]),{activateTimer:()=>{t(30)},time:e}};var f=a(10187),g=a(39455),x=a(55917),b=a(43404);function _(){let[e,t]=(0,n.useState)(""),[a,r]=(0,n.useState)(""),[d,_]=(0,n.useState)(""),[y,C]=(0,n.useState)(""),[w,N]=(0,n.useState)(null),[I,E]=(0,n.useState)(""),[j,A]=(0,n.useState)(""),[S,k]=(0,n.useState)("1"),[D,F]=(0,n.useState)(""),[P,T]=(0,n.useState)("us"),[L,U]=(0,n.useState)(!1),[B,z]=(0,n.useState)(null),[G,q]=(0,n.useState)(!1),[R,W]=(0,n.useState)(!1),[$,J]=(0,n.useState)(!1),[O,M]=(0,n.useState)(!0),{time:V,activateTimer:X}=h(),{logAnalyticsEvent:H}=(0,b.s)(),K=(0,s.useRouter)(),[Y,Z]=i.Ay.useMessage(),Q=(0,n.useRef)(),ee=(0,n.useRef)(null),et=(0,n.useRef)(null),{user:ea}=(0,x.Z)(),en=()=>{z(null)},ei=e=>{var t;return(null==e?void 0:null===(t=e.userExistsV2.data.userCustomProperties)||void 0===t?void 0:t.enableEmailPasswordAuth)===!0},el=(0,n.useCallback)(()=>{r(""),W(!1),q(!1),E(""),A(""),_(""),C(""),N(null),J(!1),A(""),U(!1),z("")},[]),es=(0,n.useCallback)(()=>{ee.current&&(ee.current.clear(),ee.current=null),et.current&&(et.current.innerHTML='
')},[]),[er,{data:eo,loading:ed}]=(0,m.ZNY)(),[ec,{loading:eu,error:em}]=(0,m.H7G)(),[ep]=(0,m.T5N)(),[ev]=(0,m.QeJ)(),[eh]=(0,m.sj_)(),[ef]=(0,m.HA)(),{data:eg}=(0,v.h)(p.ok),ex=!!(null==eg?void 0:eg[p.ok].value),eb=(0,n.useMemo)(()=>"+".concat(ex?"":"1").concat(e.replace(/\D/g,"")),[e]),e_=(0,n.useMemo)(()=>!!V,[V]),ey=(0,n.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web_login",a="",n=!1;es(),W(!0),ee.current=new l.kT(f.j,"recaptcha-container",{callback:async()=>{try{let t=ex?"+".concat(e):e.replace(/\D/g,""),a=await er({variables:{phone:t}});J(!0),ei(a.data)?U(!0):(Q.current=await (0,l.ik)(f.j,eb,ee.current),J(!0),q(!0),X()),W(!1)}catch(e){n=!0,a=e.message,Y.open({content:e.message,type:"error"}),el(),es()}finally{let e={phone:eb};n&&(e.error=!0,e.error_msg=a),H(t,e)}},"error-callback":()=>{el(),es()},"expired-callback":()=>{el(),es()},size:"invisible"}),await ee.current.verify()},[X,el,Y,eb,er,e,es]),eC=(0,n.useCallback)(async()=>{await ey(),X()},[X,ey]),ew=(0,n.useCallback)(async()=>{try{await (0,l.x9)(f.j,I,j),await eh(),await Promise.all([ev(),ep()]),el()}catch(e){z("Invalid email or password"),E(""),A("")}},[I,j,el,eh]),eN=(0,n.useMemo)(()=>(null==eo?void 0:eo.userExistsV2.data.exist)===!0,[eo]),eI=(0,n.useMemo)(()=>(null==eo?void 0:eo.userExistsV2.data.existInFb)===!0,[eo]),{braze:eE}=(0,g.V5)(),ej=(0,n.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web_login",n="",i=!1;try{var s,o,d,u;q(!1);let t=ex?"+".concat(e):e.replace(/\D/g,""),n=await er({variables:{phone:t}});if((null===(s=n.data)||void 0===s?void 0:s.userExistsV2.data.exist)||(null===(o=n.data)||void 0===o?void 0:o.userExistsV2.data.existInFb)){await Q.current.confirm(a);let e={context:{headers:{"id-token":await (null===(d=f.j.currentUser)||void 0===d?void 0:d.getIdToken(!0))}}};(null===(u=f.j.currentUser)||void 0===u?void 0:u.isAnonymous)&&await ef({variables:{phone:eb},...e}),await eh(e),await Promise.all([ev(),ep()])}else{let e=l.Oe.credential(Q.current.verificationId,a);await (0,l.OS)(f.j.currentUser,e)}el(),J(!0),eE.logCustomEvent("web_login")}catch(t){q(!0),r("");let{description:e}=c(t.code);i=!0,n=e,z(e)}finally{let e={phone:eb};i&&(e.error=!0,e.error_msg=n),H(t,e)}},[a,er,el,e,eh,ef,ea]),eA=(0,n.useCallback)(async function(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],a="",n=!1;M(t);try{var i;let{data:t}=await ec({variables:{email:I,firstName:d,gender:w,lastName:y}});ea&&await (0,l.Ww)(ea,I);let a=null==t?void 0:t.updateUser.success,n=null!==(i=null==t?void 0:t.updateUser.message)&&void 0!==i?i:null;if(a){let t=ex?"+".concat(e):e.replace(/\D/g,"");await er({variables:{phone:t}}),await ev(),await eh()}else z(n)}catch(t){t.code===o.RequiresRecentLogin&&((0,l.CI)(f.j),el(),eE.logCustomEvent("web_logout"));let{description:e}=c(t.code);n=!0,a=e,z(e)}finally{let e={phone:eb};n&&(e.error=!0,e.error_msg=a),H("web_appts_register",e)}},[I,d,y,w,K,ec,er,e,eh,ea]);return(0,n.useEffect)(()=>{!ei(eo)&&eN&&!(null==ea?void 0:ea.isAnonymous)&&(null==ea?void 0:ea.email)&&O&&K.back()},[eN,K,eo,ea,O]),{OTPCode:a,captchaLoading:R,email:I,error:em,firstName:d,gender:w,handleFormSubmit:ey,handleInput:e=>t=>{e(u(t.target.value))},handleOTPCodeSubmit:ej,handleOtpInput:e=>t=>{e(t.target.value),en()},handleReset:el,handleTestFormSubmit:ew,isPhoneSubmitted:$,isTimerActive:e_,isUserExist:eN,isUserExistInFB:eI,lastName:y,dialCode:S,loading:ed,messageContext:Z,password:j,phone:e,setCountryCode:T,countryCode:P,recaptchaWrapperRef:et,registerNewUser:eA,resendCode:eC,resetCaptcha:es,phoneFormat:D,resetSubmitError:en,setDialCode:k,setEmail:E,setFirstName:_,setGender:N,setLastName:C,setOTPCode:r,setPassword:A,setPhone:t,setPhoneFormat:F,showOTPInput:G,showTestUserForm:L,submitError:B,time:V,updateUserLoading:eu,enableInternationalPhoneAuth:ex}}},75910:(e,t,a)=>{Promise.resolve().then(a.bind(a,96352))},92227:e=>{e.exports={container:"styles_container__5OCdI"}},95780:e=>{e.exports={pageTitle:"styles_pageTitle__mBK6f"}},96352:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>U});var n=a(95155),i=a(94600),l=a(44987),s=a(60523),r=a(63102),o=a(20836);let d={ButtonPadding:l.Ay.div.withConfig({componentId:"sc-c6bdf24-0"})(["top:3rem;width:100%;position:relative;"]),ButtonWidth:l.Ay.div.withConfig({componentId:"sc-c6bdf24-1"})(["max-width:40%;font-size:15px;"]),Container:l.Ay.div.withConfig({componentId:"sc-c6bdf24-2"})(["display:flex;position:relative;flex-direction:column;justify-content:center;align-items:center;padding:0px 30px 0px 30px;color:",";","{padding:0 16rem 0 16rem;justify-content:center;}"],s.J.textColor.default,o.$.md),ContentTitle:l.Ay.span.withConfig({componentId:"sc-c6bdf24-3"})(["font-family:",",font-size:16px,"],r.a.pn),Divider:(0,l.Ay)(i.A).withConfig({componentId:"sc-c6bdf24-4"})(["width:'90%',minWidth:'90%',color:",""],s.J.divider.light),DividerTitle:(0,l.Ay)(i.A).withConfig({componentId:"sc-c6bdf24-5"})([".ant-divider-inner-text{font-size:16px;font-family:",";padding-inline:0;letter-spacing:0.08em;font-weight:400;}"],r.a.pn),ImageContainer:l.Ay.div.withConfig({componentId:"sc-c6bdf24-6"})(["padding-bottom:20px;"]),SectionContainer:l.Ay.div.withConfig({componentId:"sc-c6bdf24-7"})(["display:flex;flex-direction:column;"]),StickyHeader:l.Ay.div.withConfig({componentId:"sc-c6bdf24-8"})(["position:sticky;top:0;background-color:",";z-index:1;width:100%;"],s.J.secondary.background.lightest),Text:l.Ay.span.withConfig({componentId:"sc-c6bdf24-9"})(["font-family:",";font-size:",";font-weight:normal;text-align:-webkit-center;padding:0 8px;font-feature-settings:'pnum' on,'lnum' on;"],r.a.cg,e=>e.fontSize||"20px"),TitleContainer:l.Ay.div.withConfig({componentId:"sc-c6bdf24-10"})(["color:",";position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;padding:10px 0px 15px;gap:16px;isolation:isolate;width:100%;","{justify-content:space-between;}"],s.J.neutrals.grayscale7,o.$.md),TitleText:l.Ay.div.withConfig({componentId:"sc-c6bdf24-11"})(["font-family:",";font-size:24px;font-weight:normal;text-transform:uppercase;letter-spacing:0.06em;margin:0px;","{font-size:32px;}"],r.a.cg,o.$.md),Wrapper:l.Ay.div.withConfig({componentId:"sc-c6bdf24-12"})(["margin-bottom:9rem;width:100%;","{margin-bottom:0;}"],o.$.md)};var c=a(22137),u=a(12115),m=a(14676),p=a(57489),v=a(86446),h=a(29300),f=a.n(h),g=a(39365),x=a.n(g),b=a(43905),_=a(24743),y=a(27412),C=a(73366),w=a(26046),N=a(42398),I=a(2032),E=a(9712),j=a(18102);a(30133);var A=a(62078),S=a.n(A);let k=e=>{let{initials:t}=e;return(0,n.jsx)("div",{className:S().avatarContainer,children:(0,n.jsx)("div",{className:S().avatar,children:(0,n.jsx)("p",{className:S().text,children:t})})})};var D=a(98879),F=a.n(D);let P=()=>{var e,t,a;let{userProfile:i,refetch:l,loading:r}=(0,y.s)(),{data:o,loading:d}=(0,N.h)([w.GC,w.ok]),c=!!(null==o?void 0:null===(e=o[w.GC])||void 0===e?void 0:e.value),h=!!(null==o?void 0:o[w.ok].value),[g,A]=(0,u.useState)({email:(null==i?void 0:i.customerEmail)||"",firstName:(null==i?void 0:i.customerFirstName)||"",lastName:(null==i?void 0:i.customerLastName)||"",phoneNumber:(null==i?void 0:i.customerPhone)||""}),S="".concat((null==i?void 0:null===(t=i.customerFirstName)||void 0===t?void 0:t.charAt(0).toUpperCase())||"").concat((null==i?void 0:null===(a=i.customerLastName)||void 0===a?void 0:a.charAt(0).toUpperCase())||""),[D,P]=(0,u.useState)(!1),[T,L]=(0,u.useState)(""),{registerNewUser:U,setEmail:B,setFirstName:z,setLastName:G,setPhone:q,setCountryCode:R,setDialCode:W,setPhoneFormat:$}=(0,C.z)(),{validate:J}=(0,_.A)(),[O,M]=(0,u.useState)(!1),[V,X]=v.Ay.useNotification(),H=e=>{var t;return h?(null===(t=(0,I.M)(e))||void 0===t?void 0:t.formattedPhone)||"+1".concat((0,b.n4)(e)):(0,b.n4)(e)};(0,u.useEffect)(()=>{if((null==i?void 0:i.customerPhone)&&!d){let e=H(null==i?void 0:i.customerPhone);L(e),A(t=>({...t,phoneNumber:e}))}},[null==i?void 0:i.customerPhone,d]),(0,u.useEffect)(()=>{A({email:(null==i?void 0:i.customerEmail)||"",firstName:(null==i?void 0:i.customerFirstName)||"",lastName:(null==i?void 0:i.customerLastName)||"",phoneNumber:(null==i?void 0:i.customerPhone)&&!d?H(null==i?void 0:i.customerPhone):""})},[i,T,d]);let K=e=>{let{name:t,value:a}=e.target;A(e=>{let n={...e,[t]:a};return P(n.email!==(null==i?void 0:i.customerEmail)||n.firstName!==(null==i?void 0:i.customerFirstName)||n.lastName!==(null==i?void 0:i.customerLastName)||n.phoneNumber!==(null==i?void 0:i.customerPhone)),n})},Y=e=>{e.preventDefault(),J(g.email)&&(B(g.email),q(g.phoneNumber),z(g.firstName),G(g.lastName),M(!0),P(!1))};(0,u.useEffect)(()=>{O&&U(!1).then(()=>{Z(),M(!1),l()})},[O,U,l]);let Z=()=>{V.open({description:(0,n.jsx)("p",{className:F().notification,children:"Personal Information details have been updated."}),icon:(0,n.jsx)(p.g,{icon:m.faCheckCircle,className:F().icon}),message:"",placement:"bottomLeft",style:{background:s.J.bgColor.neutral.default,borderRadius:"12px",color:s.J.white,width:"400px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"50px",boxSizing:"border-box"}})};return r||d?(0,n.jsx)(j.E,{rows:8}):(0,n.jsxs)("div",{className:F().container,children:[(0,n.jsx)(k,{initials:S}),X,(0,n.jsx)("form",{onSubmit:Y,className:F().form,children:(0,n.jsxs)("div",{className:F().grid,children:[(0,n.jsxs)("div",{className:F().infoContainer,children:[(0,n.jsxs)("div",{className:F().inputContainer,children:[(0,n.jsx)("label",{htmlFor:"firstName",className:F().label,children:"First name"}),(0,n.jsx)("input",{type:"text",id:"firstName",name:"firstName",className:F().input,value:g.firstName,onChange:K,placeholder:"e.g. George",disabled:!c})]}),(0,n.jsxs)("div",{className:F().inputContainer,children:[(0,n.jsx)("label",{htmlFor:"lastName",className:F().label,children:"Last name"}),(0,n.jsx)("input",{type:"text",id:"lastName",name:"lastName",value:g.lastName,className:F().input,onChange:K,placeholder:"e.g. Mitchell",disabled:!c})]})]}),(0,n.jsxs)("div",{className:F().sectionDivider,children:[(0,n.jsx)("p",{className:F().text,children:"CONTACT INFO"}),(0,n.jsx)("div",{className:F().divider,children:(0,n.jsx)("div",{className:F().line})})]}),(0,n.jsxs)("div",{className:F().contactInfo,children:[(0,n.jsxs)("div",{className:F().inputContainer,children:[(0,n.jsx)("label",{htmlFor:"phoneNumber",className:F().label,children:"Phone Number"}),h?(0,n.jsx)("div",{className:F().fullWidth,children:(0,n.jsx)(x(),{buttonClass:F().flagDropdown,country:"us",dropdownClass:F().listDropdown,countryCodeEditable:!1,disableCountryCode:!1,disableDropdown:!1,disableSearchIcon:!0,enableSearch:!1,disabled:!c,inputClass:F().inputDropdown,onChange:(e,t)=>{var a,n;q(e),R(null!==(a=null==t?void 0:t.countryCode)&&void 0!==a?a:"us"),W(null!==(n=null==t?void 0:t.dialCode)&&void 0!==n?n:""),$(null==t?void 0:t.format)},value:T})}):(0,n.jsxs)("div",{className:F().numberContainer,children:[(0,n.jsx)("div",{className:f()(F().numberPrefix,F().inputText),children:"+1"}),(0,n.jsx)("input",{type:"tel",id:"phoneNumber",name:"phoneNumber",className:F().input,value:T,onChange:K,placeholder:"(- - -) - - - - - - -",disabled:!c})]})]}),(0,n.jsxs)("div",{className:F().inputContainer,children:[(0,n.jsx)("label",{htmlFor:"email",className:F().label,children:"Email"}),(0,n.jsx)("input",{type:"email",id:"email",name:"email",value:g.email,className:F().input,onChange:K,placeholder:"e.g. email@domain.com",disabled:!c})]})]})]})}),c&&(0,n.jsx)("div",{className:F().ctaContainer,children:(0,n.jsx)(E.$,{type:"submit",disabled:!D,onClick:Y,fill:!0,className:F().buttonCustom,children:O?(0,n.jsx)(p.g,{className:F().spinner,icon:m.faSpinner,spin:!0}):(0,n.jsx)(n.Fragment,{children:" Apply Changes"})})})]})};var T=a(92227),L=a.n(T);let U=()=>(0,n.jsxs)("div",{className:L().container,children:[(0,n.jsx)(c.s,{children:"Personal Information"}),(0,n.jsx)(d.Wrapper,{children:(0,n.jsx)(P,{})})]})},98879:e=>{e.exports={container:"styles_container__AUDCu",infoContainer:"styles_infoContainer__F1sqJ",contactInfo:"styles_contactInfo__C1usW",inputContainer:"styles_inputContainer__PXpjo",label:"styles_label__IHSob",input:"styles_input__9E_G1",inputText:"styles_inputText__BJD5G",sectionDivider:"styles_sectionDivider__wgrlK",text:"styles_text__s1noG",divider:"styles_divider__p88iI",line:"styles_line__sxbIv",ctaContainer:"styles_ctaContainer__bEDCb",buttonCustom:"styles_buttonCustom__JXF_Z",notification:"styles_notification__QLBsd",icon:"styles_icon__CBLvM",flagDropdown:"styles_flagDropdown__Ir4bm",inputDropdown:"styles_inputDropdown__dmsEJ",fullWidth:"styles_fullWidth__FAjYl",listDropdown:"styles_listDropdown__X_KPp",numberContainer:"styles_numberContainer__PjA8J",numberPrefix:"styles_numberPrefix__pNFaD"}}},e=>{var t=t=>e(e.s=t);e.O(0,[5307,7268,7540,7287,1286,1794,3704,1137,7489,4666,189,685,485,4987,1141,6428,8868,129,2300,1709,8441,1684,7358],()=>t(75910)),_N_E=e.O()}]);