1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3754],{10952:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account-information",function(){return n(23482)}])},44192:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(85893);function a(e){var t=e.size,n=void 0===t?24:t;return(0,r.jsxs)("svg",{className:"animate-spin",width:n,height:n,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}},62697:function(e,t,n){"use strict";var r=n(85893),a=n(41664),s=n.n(a);n(67294);var i="text-xs leading-5 text-[#737373] underline",l=function(e){var t=e.program,n=e.className;return(0,r.jsxs)("p",{className:"font-haas-grot-text text-xs leading-5 text-[#737373] ".concat(void 0===n?"":n).trim(),children:["rideUpdates"===(void 0===t?"rideUpdates":t)?(0,r.jsxs)(r.Fragment,{children:["By continuing, you agree to receive text messages from Hitch about rides you book, including booking confirmations, driver updates and departure reminders. Message frequency varies by ride activity. Msg & data rates may apply. Reply STOP to opt out or HELP for help."," "]}):(0,r.jsxs)(r.Fragment,{children:["By requesting a link, you agree to receive a one-time text message from Hitch with a link to download the app. Msg & data rates may apply. Reply STOP to opt out or HELP for help."," "]}),"See our"," ",(0,r.jsx)(s(),{href:"/terms",children:(0,r.jsx)("a",{className:i,children:"Terms of Service"})})," ","and"," ",(0,r.jsx)(s(),{href:"/privacy-policy",children:(0,r.jsx)("a",{className:i,children:"Privacy Policy"})}),"."]})};t.Z=l},23482:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ej}});var r,a,s,i,l,o,u,c,d,m,f,h,x,p,v,b,y,g,N,j,w,E,_,C,S=n(14251),Z=n(85893),P=n(34727),k=n(97582),A=n(44192),L=n(49544),I=n(36355),D=function(e){return{id:null!==(r=e._id)&&void 0!==r?r:"",cityName:null!==(a=e.cityName)&&void 0!==a?a:"",stateName:null!==(s=e.stateName)&&void 0!==s?s:"",stateAbbr:e.stateAbbr}},F=function(e){var t;return{id:String(null!==(l=null!==(i=e._id)&&void 0!==i?i:e.id)&&void 0!==l?l:""),firstName:null!==(o=e.firstName)&&void 0!==o?o:"",lastName:e.lastName,imageUrl:null!==(c=null!==(u=e.imageUrl)&&void 0!==u?u:e.imageURL)&&void 0!==c?c:null,email:e.email,isEmailVerified:null!==(d=e.isEmailVerified)&&void 0!==d&&d,studentEmail:null!==(m=e.studentEmail)&&void 0!==m?m:null,phoneNumber:null!==(f=e.phoneNumber)&&void 0!==f?f:null,homeCity:(null===(t=e.homeCity)||void 0===t?void 0:t._id)?D(e.homeCity):null}},T=function(e,t){if(!e||"object"!=typeof e)return t;if("string"==typeof e.message&&e.message)return e.message;if("string"==typeof e.error&&e.error)return e.error;if(e.error&&"object"==typeof e.error){var n=e.error.message;if("string"==typeof n&&n)return n}return t},O=(v=(0,P.Z)(function(){var e;return(0,k.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,I.U2)("/iam/me")];case 1:return[2,F(e.sent().data)]}})}),function(){return v.apply(this,arguments)}),R=(b=(0,P.Z)(function(){var e;return(0,k.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,I.U2)("/api/city/all")];case 1:return[2,(null!=(e=t.sent().data)?e:[]).map(D)]}})}),function(){return b.apply(this,arguments)}),M=(y=(0,P.Z)(function(e){return(0,k.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,I.r$)("/api/user/me/email",{email:e})];case 1:return t.sent(),[2]}})}),function(e){return y.apply(this,arguments)}),H=(g=(0,P.Z)(function(){return(0,k.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,I.v_)("/api/user/me/resend-email-verification")];case 1:return e.sent(),[2]}})}),function(){return g.apply(this,arguments)}),V=(N=(0,P.Z)(function(e){return(0,k.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,I.v_)("/api/user/me/student-email",{email:e})];case 1:return t.sent(),[2]}})}),function(e){return N.apply(this,arguments)}),U=(j=(0,P.Z)(function(e){return(0,k.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,I.r$)("/users/me",{homeCity:e})];case 1:return t.sent(),[2]}})}),function(e){return j.apply(this,arguments)}),W=(w=(0,P.Z)(function(e){var t;return(0,k.__generator)(this,function(t){switch(t.label){case 0:return[4,(0,I.v_)("/iam/update-phone-number",{phone:e})];case 1:return[2,t.sent().data.phone_id]}})}),function(e){return w.apply(this,arguments)}),X=(E=(0,P.Z)(function(e){var t,n,r;return(0,k.__generator)(this,function(a){switch(a.label){case 0:return t=e.phone,n=e.phoneId,r=e.code,[4,(0,I.v_)("/iam/verify-phone-number",{phone_id:n,phone:t,code:r})];case 1:return a.sent(),[2]}})}),function(e){return E.apply(this,arguments)}),z=(_=(0,P.Z)(function(){return(0,k.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,I.ob)("/iam/me/delete")];case 1:return e.sent(),[2]}})}),function(){return _.apply(this,arguments)}),Y=n(78470),B=n(67294),q=function(){var e,t=!!(null===(e=(0,Y.a)().session)||void 0===e?void 0:e.userId),n=(0,B.useState)(null),r=n[0],a=n[1],s=(0,B.useState)(!0),i=s[0],l=s[1],o=(0,B.useState)(!1),u=o[0],c=o[1],d=(0,B.useCallback)((0,P.Z)(function(){return(0,k.__generator)(this,function(e){switch(e.label){case 0:if(!t)return l(!1),[2];e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,O()];case 2:return a.apply(void 0,[e.sent()]),c(!1),[3,5];case 3:return e.sent(),c(!0),[3,5];case 4:return l(!1),[7];case 5:return[2]}})}),[t]);return(0,B.useEffect)(function(){d()},[d]),{profile:r,isLoading:i,isError:u,refresh:d}},$=n(29983),K=n(94986),G=n(93245),J=n(44507),Q=n(86501),ee=function(e){var t=e.title,n=e.value,r=e.actionText,a=e.actionNeeded,s=e.onAction;return(0,Z.jsxs)("div",{children:[(0,Z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Z.jsxs)("div",{className:"flex items-center gap-[6px]",children:[(0,Z.jsx)("p",{className:"text-base text-primary",children:t}),void 0!==a&&a&&(0,Z.jsx)("span",{className:"h-[10px] w-[10px] rounded-full bg-error","aria-hidden":!0})]}),(0,Z.jsx)("button",{type:"button",onClick:s,"aria-label":"".concat(r," ").concat(t.toLowerCase()),className:"px-3 py-[2px] text-base text-primary underline hover:opacity-50",children:r})]}),(0,Z.jsx)("p",{className:"text-base text-secondary whitespace-pre-line",children:null!=n?n:"-"})]})},et=n(73935),en=function(e){var t=e.children;return(0,Z.jsx)(Z.Fragment,{children:(0,et.createPortal)(t,document.body)})},er=function(e){var t=e.children,n=e.show,r=e.handleToggle,a=e.classes,s=e.isMobile,i=(0,B.useRef)(null);return n?(0,Z.jsx)(en,{children:(0,Z.jsx)("div",{onClick:function(e){e.target===e.currentTarget&&r(!1)}
1,className:"fixed flex top-0 left-0 h-full w-full justify-center items-center ".concat(a," z-10 bg-overlay"),children:(0,Z.jsx)("div",{className:"absolute bg-white w-full ".concat(s&&"h-[75vh]"," sm:max-w-[502px] min-h-[400px] sm:rounded-xl p-4 sm:p-8 top-[50%] -translate-y-2/4"),ref:i,children:t})})}):null},ea=function(e){var t=e.show,n=e.title,r=e.onClose,a=e.children,s=e.footer;return(0,Z.jsx)(er,{show:t,handleToggle:r,classes:"!z-[1040]",children:(0,Z.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Z.jsxs)("div",{className:"flex items-start justify-between mb-6",children:[(0,Z.jsx)("p",{className:"text-lg font-medium text-primary",children:n}),(0,Z.jsx)("button",{type:"button",onClick:r,"aria-label":"Close",className:"p-1 -mr-1 rounded hover:bg-action-hover",children:(0,Z.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:(0,Z.jsx)("path",{d:"M5 5L15 15M15 5L5 15",stroke:"#252525",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),(0,Z.jsx)("div",{className:"flex-1",children:a}),s?(0,Z.jsx)("div",{className:"mt-8 pt-6 border-t border-spacer",children:s}):null]})})};(C=h||(h={})).EXPLAIN="explain",C.CONFIRM="confirm",C.DONE="done";var es,ei=function(e){var t,n=e.show,r=e.onClose,a=e.onDeleted,s=(0,B.useState)(h.EXPLAIN),i=s[0],l=s[1],o=(0,B.useState)(null),u=o[0],c=o[1],d=(0,B.useState)(!1),m=d[0],f=d[1];(0,B.useEffect)(function(){n&&(l(h.EXPLAIN),c(null))},[n]);var x=(t=(0,P.Z)(function(){var e;return(0,k.__generator)(this,function(e){switch(e.label){case 0:c(null),f(!0),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,z()];case 2:return e.sent(),[4,a()];case 3:return e.sent(),l(h.DONE),[3,6];case 4:return c(T(e.sent(),"Failed to delete account. Please try again.")),l(h.EXPLAIN),[3,6];case 5:return f(!1),[7];case 6:return[2]}})}),function(){return t.apply(this,arguments)});return i===h.DONE?(0,Z.jsx)(ea,{show:n,title:"Deletion scheduled",onClose:r,footer:(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium",onClick:r,children:"Done"}),children:(0,Z.jsx)("p",{className:"text-base text-primary",children:"Your account is scheduled for deletion and will be removed from our system in 90 days. If you sign in during that window, your account is reactivated and the deletion stops."})}):i===h.CONFIRM?(0,Z.jsx)(ea,{show:n,title:"Delete your account?",onClose:r,footer:(0,Z.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium !bg-error text-white",disabled:m,onClick:x,children:m?"Deleting...":"Yes, delete my account"}),(0,Z.jsx)($.Z,{variant:"text",className:"w-full text-center text-base font-medium border border-outline-secondary",disabled:m,onClick:function(){return l(h.EXPLAIN)},children:"No, go back"})]}),children:(0,Z.jsx)("p",{className:"text-base text-secondary",children:"Confirm that you would like to start the account deletion process."})}):(0,Z.jsxs)(ea,{show:n,title:"Would you like to delete your account?",onClose:r,footer:(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium !bg-error text-white",disabled:m,onClick:function(){return l(h.CONFIRM)},children:"Delete my account"}),children:[(0,Z.jsx)("p",{className:"text-base text-primary",children:'After your confirmation, your account status will be changed to "scheduled for deletion." It will take 90 days for your account to be fully deleted from our system. If you log in during this 90-day period, your account will be re-activated, and the deletion process will be halted.'}),u&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:u})]})},el=n(38720),eo=function(e){var t=e.show,n=e.currentEmail,r=e.isEmailVerified,a=e.onClose,s=e.onSaved,i=(0,B.useState)(n),l=i[0],o=i[1],u=(0,B.useState)(null),c=u[0],d=u[1],m=(0,B.useState)(!1),f=m[0],h=m[1],x=(0,B.useState)(!1),p=x[0],v=x[1];(0,B.useEffect)(function(){t&&(o(n),d(null))},[t,n]);var b,y,g=(0,el.oH)(l),N=l===n,j=!r&&N,w=(b=(0,P.Z)(function(){var e;return(0,k.__generator)(this,function(e){switch(e.label){case 0:d(null),h(!0),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,M(l)];case 2:return e.sent(),[4,s()];case 3:return e.sent(),a(),[3,6];case 4:return d(T(e.sent(),"Failed to update email. Please try again.")),[3,6];case 5:return h(!1),[7];case 6:return[2]}})}),function(){return b.apply(this,arguments)}),E=(y=(0,P.Z)(function(){var e;return(0,k.__generator)(this,function(e){switch(e.label){case 0:d(null),v(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,H()];case 2:return e.sent(),[3,5];case 3:return d(T(e.sent(),"Failed to resend verification. Please try again.")),[3,5];case 4:return v(!1),[7];case 5:return[2]}})}),function(){return y.apply(this,arguments)});return(0,Z.jsxs)(ea,{show:t,title:j?"Verify email":"Update email",onClose:a,footer:(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium",disabled:N||!g||f,onClick:w,children:f?"
1Saving...":"Save"}),children:[(0,Z.jsx)("p",{className:"mb-6 text-base text-primary",children:j?"Weâve sent a verification link to your email.":"Weâll send an email to confirm your new email address."}),(0,Z.jsx)(G.Z,{id:"account_email",label:"Email",type:"email",autoComplete:"email",className:"w-full border rounded",value:l,onChange:function(e){return o(e.target.value)}}),!g&&l.length>0&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:"Invalid email"}),c&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:c}),j&&(0,Z.jsx)($.Z,{variant:"text",className:"w-full mt-4 text-accent text-base",disabled:p,onClick:E,children:p?"Sending...":"Re-send email verification"})]})},eu=n(62697),ec=n(72382),ed=n(65835);(es=x||(x={})).PHONE="phone",es.VERIFY="verify";var em,ef=function(e){var t=e.show,n=e.onClose,r=e.onSaved,a=(0,B.useState)(x.PHONE),s=a[0],i=a[1],l=(0,B.useState)(""),o=l[0],u=l[1],c=(0,B.useState)(""),d=c[0],m=c[1],f=(0,B.useState)(""),h=f[0],p=f[1],v=(0,B.useState)(null),b=v[0],y=v[1],g=(0,B.useState)(!1),N=g[0],j=g[1],w=(0,B.useState)(!1),E=w[0],_=w[1],C=(0,B.useRef)(0);(0,B.useEffect)(function(){t&&(C.current+=1,i(x.PHONE),u(""),m(""),p(""),y(null),j(!1),_(!1))},[t]);var S,A,L,I="+".concat(o),D=(0,el.Y0)(I),F=6===d.length&&d.split("").every(function(e){return" "!==e}),O=(S=(0,P.Z)(function(){var e,t,n;return(0,k.__generator)(this,function(r){switch(r.label){case 0:e=C.current,y(null),j(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,W(I)];case 2:if(t=r.sent(),e!==C.current)return[2];return p(t),m(""),i(x.VERIFY),[3,5];case 3:if(n=r.sent(),e!==C.current)return[2];return y(T(n,"Failed to send verification code. Please try again.")),[3,5];case 4:return e===C.current&&j(!1),[7];case 5:return[2]}})}),function(){return S.apply(this,arguments)}),R=(A=(0,P.Z)(function(){var e,t,n;return(0,k.__generator)(this,function(r){switch(r.label){case 0:e=C.current,y(null),m(""),j(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,W(I)];case 2:if(t=r.sent(),e!==C.current)return[2];return p(t),[3,5];case 3:if(n=r.sent(),e!==C.current)return[2];return y(T(n,"Failed to resend code. Please try again.")),[3,5];case 4:return e===C.current&&j(!1),[7];case 5:return[2]}})}),function(){return A.apply(this,arguments)}),M=(L=(0,P.Z)(function(e){var t,a;return(0,k.__generator)(this,function(s){switch(s.label){case 0:t=C.current,y(null),_(!0),s.label=1;case 1:return s.trys.push([1,4,5,6]),[4,X({phone:I,phoneId:h,code:e})];case 2:return s.sent(),[4,r()];case 3:if(s.sent(),t!==C.current)return[2];return n(),[3,6];case 4:if(a=s.sent(),t!==C.current)return[2];return y(T(a,"Invalid code. Please try again.")),m(""),[3,6];case 5:return t===C.current&&_(!1),[7];case 6:return[2]}})}),function(e){return L.apply(this,arguments)});return((0,B.useEffect)(function(){s===x.VERIFY&&!E&&6===d.length&&d.split("").every(function(e){return" "!==e})&&M(d)},[d]),s===x.PHONE)?(0,Z.jsxs)(ea,{show:t,title:"Phone number",onClose:n,footer:(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium",disabled:!D||N,onClick:O,children:N?"Sending...":"Update & verify"}),children:[(0,Z.jsx)("p",{className:"mb-6 text-base text-primary",children:"Youâll receive a code to confirm your new phone number."}),(0,Z.jsx)(ed.Z,{value:o,onChange:u}),(0,Z.jsx)(eu.Z,{className:"mt-3"}),!D&&o.length>0&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:"Invalid phone number"}),b&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:b})]}):(0,Z.jsxs)(ea,{show:t,title:"Enter the code",onClose:n,footer:(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium",disabled:!F||E,onClick:function(){return M(d)},children:E?"Verifying...":"Verify"}),children:[(0,Z.jsxs)("p",{className:"mb-6 text-base text-primary",children:["We just sent a code to ",I,". Please enter it below."]}),(0,Z.jsx)(ec.Z,{value:d,valueLength:6,onChange:m}),b&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:b}),(0,Z.jsx)($.Z,{variant:"text",className:"w-full mt-4 text-accent text-base",disabled:N||E,onClick:R,children:N?"Sending...":"Resend code"})]})},eh=function(e){var t=e.show,n=e.currentStudentEmail,r=e.onClose,a=e.onSaved,s=(0,B.useState)(n),i=s[0],l=s[1],o=(0,B.useState)(null),u=o[0],c=o[1],d=(0,B.useState)(!1),m=d[0],f=d[1];(0,B.useEffect)(function(){t&&(l(n),c(null))},[t,n]);var h,x=(0,el.oH)(i)&&i.toLowerCase().endsWith(".edu"),p=(h=(0,P.Z)(function(){var e;return(0,k.__generator)(this,function(e){switch(e.label){case 0:c(null),f(!0),e.label=1;case 1:return e.trys.push([1,4,5,6]),[4,V(i)];case 2:return e.sent(),[4,a()];case 3:return e.sent(),r(),[3,6];case 4:return c(T(e.sent(),"Failed to update student email. Please try again.")),[3,6];case 5:return f(!1),[7];case 6:return[2]}})}),function(){return h.apply(this,arguments)});return(0,Z.jsxs)(ea,{show:t,title:"Student email",onClose:r,footer
1:(0,Z.jsx)($.Z,{className:"w-full text-center text-base font-medium",disabled:i===n||!x||m,onClick:p,children:m?"Saving...":"Save"}),children:[(0,Z.jsx)("p",{className:"mb-6 text-base text-primary",children:"Add a .edu email address to receive student discounts."}),(0,Z.jsx)(G.Z,{id:"account_student_email",label:"Student email",type:"email",autoComplete:"email",className:"w-full border rounded",value:i,onChange:function(e){return l(e.target.value)}}),!x&&i.length>0&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:"Invalid email"}),u&&(0,Z.jsx)("p",{className:"mt-2 text-sm text-[#D8364F]",children:u})]})};(em=p||(p={})).NONE="none",em.EMAIL="email",em.STUDENT_EMAIL="studentEmail",em.PHONE="phone",em.DELETE="delete";var ex="w-full rounded bg-action-disabled text-secondary",ep=function(){var e,t,n,r,a,s,i,l,o,u,c=q(),d=c.profile,m=c.isLoading,f=c.isError,h=c.refresh,x=(0,B.useState)([]),v=x[0],b=x[1],y=(0,B.useState)(p.NONE),g=y[0],N=y[1],j=(0,B.useState)(null),w=j[0],E=j[1];(0,B.useEffect)(function(){(0,J.L9)(J.Ns,{})},[]),(0,B.useEffect)(function(){R().then(b).catch(function(){b([])})},[]);var _,C=null!==w,S=(0,B.useMemo)(function(){return v.map(function(e){return{id:e.id,label:"".concat(e.cityName,", ").concat(null!==(t=e.stateAbbr)&&void 0!==t?t:e.stateName)}})},[v]),I=(_=(0,P.Z)(function(e){var t;return(0,k.__generator)(this,function(n){switch(n.label){case 0:E(e),n.label=1;case 1:return n.trys.push([1,4,5,6]),[4,U(e)];case 2:return n.sent(),[4,h()];case 3:return n.sent(),Q.Am.success("Home city updated."),[3,6];case 4:return t=n.sent(),Q.Am.error(T(t,"Failed to update home city. Please try again.")),[3,6];case 5:return E(null),[7];case 6:return[2]}})}),function(e){return _.apply(this,arguments)});if(m)return(0,Z.jsx)("div",{className:"flex justify-center py-20 text-primary",children:(0,Z.jsx)(A.Z,{size:32})});if(f&&!d)return(0,Z.jsxs)("div",{className:"flex flex-col items-center gap-2 py-20 text-center",children:[(0,Z.jsx)("p",{className:"text-base font-medium text-primary",children:"Unable to load account information"}),(0,Z.jsx)("p",{className:"text-base text-secondary",children:"Something went wrong on our end."}),(0,Z.jsx)($.Z,{className:"mt-4 text-base font-medium",onClick:function(){h()},children:"Try again"})]});var D=(null==d?void 0:d.email)?d.isEmailVerified?d.email:"".concat(d.email,"\nPlease verify your email"):"Receive ride receipts, confirmations, etc";return(0,Z.jsxs)("div",{children:[(0,Z.jsx)(L.V,{}),(0,Z.jsx)("h1",{className:"mb-2 text-2xl font-normal text-primary",children:"Account information"}),(0,Z.jsx)("p",{className:"mb-8 text-base text-primary",children:"We will not share or show your email or phone number to anyone."}),(0,Z.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Z.jsx)(G.Z,{id:"account_first_name",label:"First name",className:ex,value:null!==(n=null==d?void 0:d.firstName)&&void 0!==n?n:"",disabled:!0}),(0,Z.jsx)(G.Z,{id:"account_last_name",label:"Last name",className:ex,value:null!==(r=null==d?void 0:d.lastName)&&void 0!==r?r:"",disabled:!0}),(0,Z.jsx)(K.Z,{id:"account_home_city",label:"Home city",className:"w-full border rounded",options:S,value:null!==(a=null!=w?w:null==d?void 0:null===(e=d.homeCity)||void 0===e?void 0:e.id)&&void 0!==a?a:"",disabled:C||0===S.length,endAdornment:C?(0,Z.jsx)("span",{className:"pl-2 text-secondary",role:"status","aria-label":"Saving home city",children:(0,Z.jsx)(A.Z,{size:18})}):void 0,onChange:function(e){I(e.target.value)}})]}),(0,Z.jsxs)("div",{className:"mt-8 flex flex-col gap-6",children:[(0,Z.jsx)("div",{className:"border-t border-spacer"}),(0,Z.jsx)(ee,{title:"Email",value:D,actionText:(null==d?void 0:d.isEmailVerified)?"Edit":"Verify",actionNeeded:!!d&&!d.isEmailVerified,onAction:function(){return N(p.EMAIL)}}),(0,Z.jsx)("div",{className:"border-t border-spacer"}),(0,Z.jsx)(ee,{title:"Student email",value:null!==(s=null==d?void 0:d.studentEmail)&&void 0!==s?s:"Provide your student email for discounts",actionText:(null==d?void 0:d.studentEmail)?"Edit":"Add",onAction:function(){return N(p.STUDENT_EMAIL)}}),(0,Z.jsx)("div",{className:"border-t border-spacer"}),(0,Z.jsx)(ee,{title:"Phone number",value:null!==(i=null==d?void 0:d.phoneNumber)&&void 0!==i?i:void 0,actionText:"Edit",onAction:function(){return N(p.PHONE)}}),(0,Z.jsx)("div",{className:"border-t border-spacer"}),(0,Z.jsx)(ee,{title:"Account status",value:"Active",actionText:"Edit",onAction:function(){return N(p.DELETE)}})]}),(0,Z.jsx)(eo,{show:g===p.EMAIL,currentEmail:null!==(l=null==d?void 0:d.email)&&void 0!==l?l:"",isEmailVerified:null!==(o=null==d?void 0:d.isEmailVerified)&&void 0!==o&&o,onClose:function(){return N(p.NONE)},onSaved:h}),(0,Z.jsx)(eh,{show:g===p.STUDENT_EMAIL,currentStudentEmail:null!==(u=null==d?void 0:d.studentEmail)&&void 0!==u?u:"",onClose:function(){return N(p.NONE)},onSaved:h}),(0,Z.jsx)(ef,{show:g===p.PHONE,onClose:function(){return N(p.NONE)},onSaved:h}),(0,Z.jsx)(ei,{show:g===p.DELETE,onClose:function(){return N(p.NONE)},onDeleted:h})]})},ev=n(1641),eb=n(77725),ey=n(11163),eg={title:"Account information | Hitch",noindex:!0},eN=function(){var e,t=(0,ey.useRouter)(),n=(0,eb.aC)();return((0,B.useEffect)(function(){if(!n.session){t.push({pathname:"/login",query:{redirect:encodeURIComponent(t.asPath)}});return}n.session.onboarded||t.push({pathname:"/onboarding",query:{redirect:encodeURIComponent(t.asPath)}})},[t,n.session]),null===(e=n.session)||void 0===e?void 0:e.onboarded)?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ev.Z,(0,S.Z)({},eg)),(0,Z.jsx)("div",{className:"min-h-screen bg-white px-4 pb-20",style:{paddingTop:"calc(var(--app-banner-height, 0px) + 100px)"},children:(0,Z.jsx)("div",{className:"mx-auto w-full max-w-[502px]",children:(0,Z.jsx)(ep,{})})})]}):(0,Z.jsx)(ev.Z,(0,S.Z)({},eg))};eN.ssr=!0,eN.isWhiteNav=!0;var ej=eN},72382:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(85893),a=n(38720),s=n(67294);
1function i(e){var t=e.value,n=e.valueLength,i=e.onChange,l=(0,s.useMemo)(function(){for(var e=t.split(""),r=[],s=0;s<n;s++){var i=e[s];a.X1.test(i)?r.push(i):r.push("")}return r},[t,n]),o=function(e){var t=e.nextElementSibling;t&&t.focus()},u=function(e){var t=e.previousElementSibling;t&&t.focus()},c=function(e,r){var s=e.target,l=s.value.trim(),u=a.X1.test(l);if(u||""===l){var c=s.nextElementSibling;if(u||!c||""===c.value){var d=(l=u?l:" ").length;if(1===d){if(i(t.substring(0,r)+l+t.substring(r+1)),!u)return;o(s)}else d===n&&(i(l),s.blur())}}},d=function(e){var t=e.key,n=e.target;if("ArrowRight"===t||"ArrowDown"===t)return e.preventDefault(),o(n);if("ArrowLeft"===t||"ArrowUp"===t)return e.preventDefault(),u(n);var r=n.value;n.setSelectionRange(0,r.length),"Backspace"===e.key&&""===r&&u(n)},m=function(e){var t=e.target,n=t.previousElementSibling;if(n&&""===n.value)return n.focus();t.setSelectionRange(0,t.value.length)};return(0,r.jsx)("div",{className:"flex justify-between w-full max-w-[416px] gap-2",children:l.map(function(e,t){return(0,r.jsx)("input",{type:"text",inputMode:"numeric",pattern:"\\d{1}",maxLength:n,className:"input-base w-full max-w-[56px] border-solid border-[1px] border-outline-secondary rounded-[10px] p-[12px] text-center text-3xl font-bold",value:e,onChange:function(e){return c(e,t)},onKeyDown:d,onFocus:m,autoFocus:0===t},t)})})}},65835:function(e,t,n){"use strict";var r=n(85893),a=n(67555),s=n.n(a),i=function(e){var t=e.country,n=e.value,a=e.onChange;return(0,r.jsx)(s(),{specialLabel:"Phone number",country:void 0===t?"us":t,value:n,onChange:a,inputClass:"!input-base",buttonClass:"!p-2",dropdownClass:"sm:!w-[425px] !rounded-lg"})};t.Z=i}},function(e){e.O(0,[7555,4039,9774,2888,179],function(){return e(e.s=10952)}),_N_E=e.O()}]);
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.